From 54d5ef4b0295786e1f61bf6d1feb9758db212844 Mon Sep 17 00:00:00 2001 From: Maggie Nolan Date: Tue, 19 May 2020 11:31:53 -0700 Subject: [PATCH] Squashed 'third_party/googleapis/' changes from 96d5a051..cd3ce265 cd3ce265 Dialogflow weekly v2 library update: - Minor comment updates. e94ad376 fix: point artman at gapic v1 for monitoring/v3 API d1a9f02f feat(v1p3beta1): added support for streaming automl action recognition. b5c20941 Deprecate unused follow_up_token field. See https://developers.google.com/assistant/smarthome/develop/notifications for more details. 5a90d467 fix: restore GAPIC v2 retry configs abd6b709 Add C++ library support for Google Cloud Storage protos 7683d068 Add sandbox_tmpfs_path parameter by defaul in .bazelrc file. This is to avoid sporadic SIGBUS JVM crashes on highly parallel builds (like our CI). More details at https://github.com/bazelbuild/bazel/issues/3236 2433bd50 cloudasset: add SearchAllResources and SearchAllIamPolicies RPCs 123873dc chore!: enable gapicv2 for monitoring/v3 API 902a8249 Use legacy gapic config for firestore admin PHP clients. 77ca422c chore: delete gapic config for oslogin/v1beta1 API 57253ab4 chore: delete gapic config for oslogin/v1beta1 API 89e89786 Publish Search Partner Data Ingestion logging proto for documentation c8e291e6 bazel: update gapic-generator hash 358c09c4 Update documentation bf17ae5f feat: Add a Flush API to enable finer grained data commit needs for dataflow. fix: add resource definition for Table/ReadStream/WriteStream message fix: add proper resource_reference for messages chore: update copyright 1b8b77db Cloud DLP - fix routing for gRPC clients by embedding location into parent instead of having it's own parameter. API still remain global only, but prepares for the addition of regional support. edd3b80f bazel: update gapic-generator hash aed11c01 chore: Ingegrate latest gapic-generator and gapic-generator-python changes. This adds support for `_opt` argument for gapic plugins. 4186d3e5 docs: Update proto comments for bigqueryreservation v1 1019b0d9 Release new file type enums and new MetadataLocation proto. 482e5206 Update python package name for datastore admin gapic client. 73d4b5d9 Removing the experimental tag from dead letter policy related fields. 83816bb3 Add kokoro-specific .bazelrc file with arguments specific only for kokoro environments. This is to fix autosynth builds when it tries building older commits. d3cc7bbf fix: update backup RPC timeouts from 30secs to 10mins fb8f62b6 fix: retry_codes in BTAdmin.GetIamPolicy for bigtable/admin/v2 684dfea7 chore: enable gapicv2 for datacatalog/v1beta1 API 2fc2caaa chore: enable gapic v2 and proto annotation for bigquery/storage/v1beta2 API. c08dcec0 chore: enable gapic v2 and proto annotation for bigquery/storage/v1 API. 30cfca09 fix: add resource definition for Table/ReadStream/WriteStream message fix: add proper resource_reference for messages chore: enable gapic v2 and proto annotation for bigquery/storage/v1alpha2 API. committer: @xiaozhenliu-gg5 839fae42 Update documentation 6dfd72d0 Add bazel build file for BigQuery Connection API v1. a3a0bf0f BREAKING_CHANGE: Removing TimeSeriesQueryLanguageCondition as an alert condition type. The condition type is unsupported and unused. It was originally added for the Monitoring Query Language Alpha feature. refactor!: Drop support for TimeSeriesQueryLanguageCondition as an alert condition type. 4bef0001 fix: add resource reference to proto files chore: update copyright and comments 1b5a8d2b Fix documentation for string_value. The value does not have to be at least 1MB, but rather, at most 1MB. e0f9d9e1 Integrate Python GAPIC Microgenerator in googleapis. This PR uses using documentai as an example. Depends on https://github.com/googleapis/gapic-generator-python/pull/402 4ca990cb Web Security Scanner V1 API a737a68e chore!: enable gapicv2 for vision/v1p4beta API ab3468cf chore!: enable gapicv2 for vision/v1p3beta API 93b25607 Google Ads API v3_1 protos and config updates. ee9e8e4e docs: minor comments change. aaff764c chore: enable gapicv2 and annotate protos for recommendationengine/v1beta1 API f78da0d5 fix: replace all retry configs removed during GAPIC config migration 7e1c7603 Add an OAuth scope annotation in build_service proto file 3f5f8a22 feat: added support for project id in scope feat: added support for order_by in SearchAllResources rpc feat: added support for search on location, labels and networkTags fields docs: updated according to above features 756b174d fix: Add missing method_signature annotations for BigTable Admin Backup RPCs c284e4f8 Configure retry for Diaglogflow v2.Environments.ListEnvironments and v2beta1.Environments.ListEnvironments. ff17eefa chore: add Python target for orgpolicy BUILD.bazel 37120642 Remove raw html from proto comments as this breaks client library documentation generators. c2bfceed Generating BUILD.bazel for maps/routes/v1alpha. 5dca7f10 Support purchasing capacity commitments in the BigQuery Reservation v1 API. 28e76243 feat: integrate gapic generator change in googleapis d14bf59a 1. Updated the config file names. 2. Added a group_by field to the ListBuildsRequest. 0d7c3565 bazel: update gapic-generator-go to v0.13.3 in WORKSPACE 1d520eaa feat: Publish ListEnvironments for Dialogflow v2/v2beta1 library. docs: Clarify WebhookResponse fields for Dialogflow v2/v2beta1 library. b3bcfd05 fix(google/maps/routes): move gapic targets to match Routes Preferred API 862cd840 chore: Update gapic-generator version The updated version is required to migrate Python clients generation from artman to bazel. 2bf9f22d chore: enable gapicv2 for bigquery/reservation/v1beta API 012c5531 feat: Adding Retry policy for OS Config V1 AgentEndpointService 45b363d3 Refactor the CEL protos to reflect their use as cross-language data representations used within various open source libraries. 42ee97c1 chore: revert bigtable-admin to Gapic V1 for Ruby only c09ec515 Use legacy gapic config for select PHP library generation b5e9b0b0 feat: add `order` field to `TagField` and `TagTemplateField` message in tags.proto fix: broken document links & polish comments feat: add csharp/ruby/PHP namespaces chore: update copyright for proto files bcc47639 docs: Update documentation to fix broken method links 69b4dc56 Publishing Routes Preferred v1alpha service definition. 6e0ac551 feat: Updated documentation for OS Config V1 OsConfigService cab24c7c fix: retry_params in GetIamPolicy for bigtable/admin/v2 101d31ac Update public client library for Cloud Monitoring to introduce new Uptime check feature. Uptime HTTP(S) checks can now be GET or POST. cdf13efa Removing experimental tag from DeadLetterPolicy for Cloud Pub/Sub. c3f3cded fix: update {Create|Delete}Backup and RestoreDatabase timeouts to 1 hour 629e6bea Add support for Search Partial Response. 160e3187 Increase the required minimum difference between start time of the next interval and the end time of the previous one from the one microsecond to one millisecond. This will enable some resource savings for in-memory storage. ab5d07c2 fix: set resource type for database parameter of Backup b8495354 chore: enable gapicv2 for bigtable/admin/v2 API 80dac49d fix: remove unused proto imports in bigtable/admin/v2 fea22b1d fix: add C++ build rules for Bigtable Admin V2. c0a07215 chore: delete gapic config for api/expr/v1alpha1/cel b5aa7d66 feat: Adding retry policy for OS Config V1Beta OsConfigService 30280606 feat: Adding retry policy for OS Config V1 OsConfigService 04eff659 Fixed documentation links. 26523a96 chore: delete gapic config for resourcemanager/v2 35672e79 chore: enable gapicv2 for datacatalog/v1beta1 API dea1f520 chore: delete gapic config for language/v1beta1 df955af5 chore: enable gapicv2 for language/v1beta2 API e2a59ff2 chore: enable gapicv2 for bigquery/reservation/v1 API c9942c00 chore: enable gapicv2 for datacatalog/v1beta1 API f561f57e bazel: upgrade gapic-generator-go to v0.13.2 a34f4eb9 chore: enable gapicv2 for asset/v1beta1 API 4efd7127 chore: enable gapicv2 for asset/v1p4beta1 API 789fd7e0 chore: enable gapicv2 for asset/v1p1beta1 API 0feb0806 chore: enable gapicv2 for asset/v1p2beta1 API 9ea892eb chore: enable gapicv2 for vision/v1 API 4d61e1cb Add speech adaptation, phrase sets and custom classes. 3824f547 feat: Adding Retry policy for OS Config V1Beta AgentEndpointService 1bd77e8c Publishing ComputeRouteMatrix request and reply messages. f9d76ac0 chore: enable gapic v2 and proto annotation for Documentai API. 13736ead Update bazel version for kokoro build to 3.0.0. (Hoping that will help with java 11 failures) ab869e90 chore: enable gapicv2 for longrunning API cf18ab52 feat: Adding OS Config AgentEndpointService V1 RegisterAgent rpc 1e92c343 Dialogflow weekly v2/v2beta1 library update: - Update comments on Contexts and Sessions resources. 1df336ab feat: Adding OS Config AgentEndpointService V1Beta RegisterAgent rpc 1692c3d5 chore: enable gapic v2 and proto annotation for automl API. 801c3fb4 docs: Update documentation to clarify naming. 41d5dee2 Dialogflow weekly v2/v2beta1 library update: - Update documentation on various resources. - Add LRO info to CreateDocument method. b21bc9b4 chore: set Ruby namespace in proto options b8c7c4e8 chore: set Ruby namespace in proto options 96c0db42 chore: enable gapicv2 for videointelligence/v1p2beta1 fd35dc68 migrate Asset v1 API to gapic v2. fe8b17af build(google/maps): update python postprocessing ac1f9049 fix (breaking change): reorder Company and Job resources in talent API to be consistent with old gapic config. 9af7212b docs: display resource name patterns in code font. c451a445 BigQuery Connection API v1. Breaking changes: Removed UpdateConnectionCredential method. Removed ListConnectionsRequest.max_results, added ListConnectionsRequest.page_size. af71ea52 chore: enable gapicv2 for vision/v1p2beta1 API 6114e2d3 chore: enable gapicv2 for vision/v1p1beta1 API ee4ea765 gapic-generator: - feat: Support extra plugin_args for php bazel rules rules (#3165) - feat: support '*' in resource definition (#3163) - fix: add null check and better error message when referenced resource is not found (#3169) e4f4b23e osconfig v1beta: fix the incorrect pattern for GuestPolicy resource and remove the obsolete history field. d741cd97 chore: enable gapicv2 for firestore/v1 API 0d69cdda chore: enable gapicv2 for firestore/admin/v1 API 6f8350c0 chore: enable gapicv2 for firestore/v1beta1 API d398d687 docs: change relative URLs to absolute URLs to fix broken links. 5520cb89 chore: update gapic-generator to cd3c9ee7 b20965f2 Updating retry configuration settings. 83d7f20c Migrate dialogflow from gapic v1 to gapic v2. Including breaking changes (resource pattern change) introduced in cl/304043500. f8a97692 chore: enable gapic v2 and proto annotation for Grafeas API. b1a5ca68 Enable gapicv2 for v1/osconfig c803327f Enable gapicv2 for osconfig/agentendpoint/v1beta 99dddf1d chore: enable gapicv2 for build/v1 API bf85ee3e chore: enable gapicv2 for cloudbuild/v1 API f497c7aa chore: enable gapic v2 and proto annotation for Web Security Scanner v1alpha API. 0669a37c chore: rename unused GAPIC v1 configs for IAM to legacy af7da29c chore: set Ruby namespace in proto options 3f767aa3 docs: Update an out-of-date external link. 9ede34d0 chore: set Ruby namespace in proto options 27daba50 chore: set Ruby namespace in proto options 82de0f6f Fix: Add missing resource name definition (from the Compute API). 74459119 docs: change relative URLs to absolute URLs to fix broken links. 1247c135 chore: enable gapicv2 for videointelligence/v1beta2 API 633c8b13 chore: enable gapicv2 for videointelligence/v1p1beta1 API 29aac60f docs: fix broken link to policy reference documentation. 54ddbbf1 bazel: update gapic-generator-go to v0.13.0 823facb4 chore: enable gapicv2 for videointelligence/v1p3beta1 6b9c969d Add API for bigqueryreservation v1. 514f7d27 chore: enable gapicv2 for phishingprotection/v1beta1 API ff74d47d fix: PHP-related fixes in BUILD.bazel and service.yamls fdbc7b1f Enable gapicv2 for osconfig/agentendpoint/v1 1490d30e Enable gapicv2 for osconfig/v1beta 7bf824e8 Enable gapicv2 for iam/credentials/v1 9ff6fd3b Updates Dataproc v1 API: - Adds Dataproc Jobs.SubmitJobAsOperation RPC - Adds SparkR and Presto job types to WorkflowTemplates - Adds new Optional Components - Clarifies usage of some APIs cad0f513 Updates to Dataproc v1beta2 API: - Adds SparkR and Presto job types to WorkflowTemplates - Adds new Optional Components - Clarifies usage of some APIs a005f045 Add support for Cloud EKM to the Cloud KMS service and resource protos. 5077b1e4 chore: set Ruby namespace in proto options d6cb4997 chore: enable gapic v2 and proto annotation for documentai API. 490bc556 Enable gapicv2 for devtools/remoteworkers/v1test2 9f78ce31 Enable gapicv2 for managedidentities/v1beta1 6e17d259 docs: treat a dummy example URL as a string literal instead of a link a8d76f99 docs: change relative URLs to absolute URLs to fix broken links. 65c749bc docs: fix formatting of some regexes and string literals. 9119eefc chore: set Ruby namespace in proto options 62a2a7cc chore: set Ruby namespace in proto options 23848c8f chore: set Ruby namespace in proto options 9514fa9e docs: change relative URLs to absolute URLs to fix broken links. 0f7b1509 fix: change config_schema_version to 2.0.0 for containeranalysis v1 gapic config. 3d52f3c1 Dialogflow weekly v2 library update: - Change `parent` field's resource_reference to specify child_type instead of type per client library generation requirement; - Change Session with its child resource pattern to support both projects/{project}/agent/sessions/{session} and projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}; - Fix `method_signature` - Regular documentation update 4a6a01ce docs: change a relative URL to an absolute URL to fix broken links. 1b969c28 chore: set Ruby namespace in proto options 5378173a Add v1beta2 SubmitJobAsOperation RPC to Dataproc. 3d5d228a Enable visibility on the GetSnapshot and GetTopicSnapshots methods 1346f5c1 Refresh public client library for Cloud Monitoring. Increase default ListTimeSeries deadline to 90s. 4a6cfccb docs: Fix link in monitoring summary description. 6e2ea9a4 fix: add interface name overrides back to logging gapic config. 01f3ccba Fix: Add package/namespace options for C#, Ruby and PHP in remaining protos. b89abbf1 chore(google/maps): Rename nox.py to noxfile.py bbf26d7f Synchronize new proto/yaml changes. 75047719 fix Dataproc: add missing `REQUIRED` annotation. 7e1b880f Add Ruby/PHP namespace options aba34235 chore: add java assembly target for accesscontextmanager BUILD.bazel dc65f39f For Secret Manager v1 and v1beta1, noted Secret ID character limitations. 2ee8c4d0 chore(deps): Update gax-java dependency This is to integrate java11 incompatibility fix b5c94cec chore: add java assembly target for orgpolicy BUILD.bazel 690f4d63 chore: use the latest protoc-java-resource-name-plugin in third_party/googleapis WORKSPACE. - trace up only one level when calculating parent types with singleton resource names 87144228 Enable gapic v2 for DLP. 17cfae00 Add a new AuthorizationType for Data Source Definition. 6da3d649 fix(google/maps): Change importpath to developers.google.com/maps/go. 2983dccd build(google/maps): only modify root build.gradle with ext plugin 00f0a285 fix: Integerate gapic-generator java_gapic rules Java11 fix a62857d2 fix: add proto_package to the artman config of dataproc v1beta2 to make artman smoketest pass. f260ba24 chore: use the latest gapic-generator in googleapis WORKSPACE. - PHP multi-pattern resource name support. - Trace up only one level when calculating parent types with singleton resource names 89c7d455 feat: Add client library options to OsConfigService v1 patch APIs. a45b0a2a dataproc: add back non-default retry parameters. committer: @hzyi-google ad895ce9 enable gapic v2 for containeranalysis. committer: @hzyi-google baf83e52 Adding "resource_reference" annotations to services. 7be2811a fix: Update gapic-generator version to pickup discogapic fixes b655808b cloudasset: add org policy and access context manager protos to client libraries. d8c5da9a Populate BAZEL.build files for AccessContextManager. cf9db716 Populate BAZEL.build files for OrgPolicy. 558b800e chore: turn on gapic v2 for Dataproc API. fix: - add missing method signatures - remove resource_reference not on a string field - adjust resource name pattern orders 8eb444cf Add logging protos for Recommender v1beta1. 48a166ce Push of PHP, C# and Ruby namespaces 42f77489 This is first release of the API protos and Bazel BUILD files for the Analytics Management API V1alpha. 8bea81bf chore: use latest protoc-java-resource-name-plugin in bazel WORKSPACE. new commits: - fix: stop generating `parseList` and `toStringList` if a multi-pattern resource name has subclasses (#79) b14af92e fix talent API incorrect placeholders in two resource name patterns. committer: @hzyi-google 8e22db90 chore(google/maps): Update postprocessing script for Java. 65816afa bazel: update gapic-generator-go to v0.12.5 and gapic-generator hash d4aa417e Fix incorrect retry config in gapic v2 for kms. fd083345 fix: osconfig/v1 update go_gapic_library target to microgen interface e2c0f2a0 Update comments for google/rpc/error_details.proto. f786c758 feat: Add OsConfigService v1 patch APIs. 0341fa3f Turn on gapic config v2 for kms. 32dc6e83 redis: v1beta1 enables REDIS_5_0 as an option for redis_version field and adds two new redis configs --stream-node-max-entries --stream-node-max-bytes 685f1648 redis: v1 enables REDIS_5_0 as an option for redis_version field and adds two new redis configs --stream-node-max-entries --stream-node-max-bytes 733cb282 Add GAPIC cofiguration for v1 client library genetration. 1b0fff5f docs: remove an internal lint declaration 2be23f3f fix(google/maps): Add post-processing rules for Google Maps APIs fd83ab21 fix: migrate osconfig/agentendpoint/v1 go_gapic_library target to microgen impl 0e07113e docs: Update documentation with links to smart home developer guides and reference pages. Remove outdated authorization instructions. 551cf1e6 feat: Add OS Config AgentEndpointService v1 PatchJobs and Tasks APIs. 1df11711 Synchronize new proto/yaml changes. 71d6c56a Refresh monitoring client libraries. Rename to Cloud Monitoring API. Added support for TimeSeriesQueryLanguageCondition condition type in alert policies. 25a1781c bazel: migrate all go_gapic_library targets to microgenerator implementation 36c0febd Update GAPIC configurations to v2 .yaml. 078f2223 Fix containeranalysis v1beta1 assembly target name 0be7105d Add BUILD.bazel file to asset/v1p1beta1 6c248fd1 Add missing resource annotations and additional_bindings to dialogflow v2 API. 9a3a7f33 Change the service name from "chromeos-moblab.googleapis.com" to "chromeosmoblab.googleapis.com" 98a33923 feat: devtools/build/v1 publish client library config annotations cfabc98c feat: home/graph/v1 publish client library config annotations & comment updates c8c8c0bd chore: use latest gapic-generator in bazel WORKSPACE. including the following commits from gapic-generator: - feat: take source protos in all sub-packages (#3144) e4daf520 Add bazel file for v1 client lib generation 275fbcce feat: pubsub/v1 add an experimental filter field to Subscription f2b18cec Fix: UpdateBackupRequest.backup is a resource, not a resource reference - remove annotation. 80038406 Cloud Billing Budget API v1beta1 Modified api documentation to include warnings about the new filter field. 0cc6c146 Cloud Billing Budget API v1alpha1 Modified api documentation to include warnings about the new filter field. ff2ea00f Fix: Add resource definition for a parent of InspectTemplate which was otherwise missing. 55fa441c Add proto definition for AccessLevel, AccessPolicy, and ServicePerimeter. e7b10591 Cloud Bigtable Managed Backup service and message proto files. d8e226f7 feat: Add time-to-live in a queue for builds 430375af docs: add missing closing backtick 0e9f1f60 bazel: Use latest release of gax_java 5058c1c9 Update GAPIC v2 with batching parameters for Logging API 64ab9744 Fix: Introduce location-based organization/folder/billing-account resources Chore: Update copyright years 23d5f09e Update field_behavior annotations in V1 and V2. b2cf37e7 Data Catalog V1 API 1976b998 Cloud DLP api update. Adds missing fields to Finding and adds support for hybrid jobs. ae78682c fix: several sample code blocks in comments are now properly indented for markdown dcd171d0 Publish Media Translation API V1Beta1 ff171345 Add protos and BUILD rules for v1 API. 8386761d feat: chromeos/modlab publish protos and config for Chrome OS Moblab API. b2e2bc62 Updates to GCS gRPC API spec: 7fd916ce Add deprecated_collections field for backward-compatiblity in PHP and monolith-generated Python and Ruby clients. 047d3a8a fix!: google/rpc refactor ErrorInfo.type to ErrorInfo.reason and comment updates. fae4bb6d Adding RetryPolicy to pubsub.proto 7d569be2 Adding additional protocol buffer annotations to v3. 13942d1a Add logging protos for Recommender v1. a1a573c3 fix: change go package to use cloud.google.com/go/maps c6fbac11 feat: publish documentai/v1beta2 protos 5202a9e0 Protos for v1beta1 release of Cloud Security Center Settings API 83518e18 Adds gapic.yaml file and BUILD.bazel file. 836c196d Regenerate recommender v1beta1 gRPC ServiceConfig file for Insights methods. 34a5450c Increases the default timeout from 20s to 30s for MetricService 5d8bffe8 feat: use the latest gapic-generator in WORKSPACE for bazel build. d631c651 Updated the GAPIC configs to include parameters for Backups APIs. 678afc70 Adding Game Servers v1beta API. 80d2bd2c Enable proto annotation and gapic v2 for talent API. 85e454be docs(google/maps/roads): remove mention of nonexported api bf839ae6 Adding protocol buffer annotations and updated config info for v1 and v2. 309b899c Publish `Backup` APIs and protos. eced64c3 add PHP client libraries 7727af0e feat: use the latest gapic-generator and protoc-java-resource-name-plugin in googleapis/WORKSPACE. 2a25aa35 Breaking change: remove the ProjectOrTenant resource and its references. a499dbb2 Update web risk v1 gapic config and BUILD file. 52701da1 Fix: apply appropriate namespace/package options for C#, PHP and Ruby. 365c029b Add CC targets to the kms protos. 4ba9aa8a Expose logo recognition API proto for GA. 1c9fc2c9 Adding ruby_package option to accessapproval.proto for the Ruby client libraries generation. 1cc6f0a7 build(google/maps/routes): generate api clients 29a47c96 Increase timeout to 1hr for method `dropRange` in bigtable/admin/v2, which is synced with the timeout setting in gapic_yaml. 8f631c4c build(google/maps/roads/v1op): move go to monorepo pattern d6681651 build(google/maps/roads/v1op): Add bazel build files to generate clients. af7dff70 Add LogPlayerReports and LogImpressions to Playable Locations service b6927fca Update BigQuery Connection API v1beta1 proto: added credential to CloudSqlProperties. 91e1fb5e chore: update protobuf (protoc) version to 3.11.2 30e36b4b Update cloud asset api v1p4beta1. ffbb4936 feat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields. bc973a15 bazel: Fix broken common dependency 71094a34 chore: bigtable/admin/v2 publish retry config 8f488efd feat: Migrate logging to GAPIC v2; release new features. 007605bf Update API for bigqueryreservation v1beta1. - Adds flex capacity commitment plan to CapacityCommitment. - Adds methods for getting and updating BiReservations. - Adds methods for updating/splitting/merging CapacityCommitments. f0b581b5 fix: recommendationengine/v1beta1 update some comments 10e9a0a8 build: add generated BUILD file for Routes Preferred API 86738c95 publish v1p1beta1: update with absolute address in comments 73d9f2ad publish v1: update with absolute address in comments d2158f24 publish v1beta2: update with absolute address in comments 7fca6129 publish v1p2beta1: update with absolute address in comments 583b7321 publish v1p3beta1: update with absolute address in comments 638253bf fix: add java_multiple_files option for automl text_sentiment.proto 373d6557 Update Recs AI Beta public bazel file dcc5d00f fix: add java_multiple_files option for automl classification.proto a3f79182 chore: automl/v1 publish annotations and retry config 01c68158 Mark return_immediately in PullRequest deprecated. c9f5e9c4 Remove out of date documentation for predicate support on the Storage API fd5b3b82 generate webrisk v1 proto 541b1ded Update cloud asset api v1p4beta1. c0d171ac Updated to include the Notification v1 API. 2346a918 Add Service Directory v1beta1 protos and configs a78ed801 Publishing v3 protos and configs. 4a180bff automl/v1beta1 publish proto updates 6de6e938 chore: use the latest gapic-generator and protoc-java-resource-name-plugin in Bazel workspace. 244ab2b8 Adds service config definition for bigqueryreservation v1 83c6f840 Update google/api/auth.proto to make AuthProvider to have JwtLocation e9e90a78 Dialogflow weekly v2/v2beta1 library update: - adding get validation result - adding field mask override control for output audio config Important updates are also posted at: https://cloud.google.com/dialogflow/docs/release-notes 1a2b05cc Adding .yaml and .json config files. dfe1cf7b Publish `QueryOptions` proto. dafc905f pubsub: revert pull init_rpc_timeout & max_rpc_timeout back to 25 seconds and reset multiplier to 1.0 f077632b firestore: add update_transform 0aba1900 cluster: use square brace for cross-reference 5dac2da1 Restore retry params in gapic config because securitycenter has non-standard default retry params. Restore a few retry codes for some idempotent methods. 1eb61455 pubsub: v1 replace IAM HTTP rules 80b2d25f Dialogflow weekly v2/v2beta1 library update: - updates to mega agent api - adding field mask override control for output audio config Important updates are also posted at: https://cloud.google.com/dialogflow/docs/release-notes 0b1876b3 Use an older version of protoc-docs-plugin that is compatible with the specified gapic-generator and protobuf versions. 1e47e676 Fix: Restore a method signature for UpdateCluster 7f910bcc Update Dataproc v1beta2 client. de287524 Fix: Reinstate method signatures that had been missed off some RPCs Fix: Correct resource types for two fields e5bc9566 Deprecate the endpoint_uris field, as it is unused. 8c12e2b4 Update Dataproc v1 client. 17567c4a Removing erroneous comment, a la https://github.com/googleapis/java-speech/pull/103 3eaaaf86 Add BUILD.bazel for v1 secretmanager.googleapis.com e76149c3 Move securitycenter v1 to use generate from annotations. 203740c7 Add StackdriverLoggingConfig field to Cloud Tasks v2 API. e4117d5e Create a Bazel BUILD file for the google.actions.type export. a9639a0a Add secretmanager.googleapis.com v1 protos ce4f4c21 asset: v1p1beta1 remove SearchResources and SearchIamPolicies cb61d6c2 asset: v1p1beta1 remove SearchResources and SearchIamPolicies ab2685d8 fix: Dataproc v1 - AutoscalingPolicy annotation 8a1020bf Update cloud asset api v1p4beta1. 5cfa1052 Add service control related proto build rule. ee4dddf8 monitoring v3: Add prefix "https://cloud.google.com/" into the link for global access cl 295167522, get ride of synth.py hacks d9835e92 Update some minor docs changes about user event proto 5f311e41 fix: use correct PHP package name in gapic configuration 6cdd74dc pubsub: v1 add client config annotations and retry config 5169f46d Added cloud asset api v1p4beta1. 56b55aa8 Fix: Resource annotations for CreateTimeSeriesRequest and ListTimeSeriesRequest should refer to valid resources. TimeSeries is not a named resource. 0646bc77 Remove unnecessary languages from bigquery-related artman configuration files. 8b78aa04 Update backend.proto for schemes and protocol 80b8f8b3 Adds artman config files for bigquerystorage endpoints v1beta2, v1alpha2, v1 2c17ac33 Add parameter to sample generated for UpdateInstance. Related to https://github.com/googleapis/python-redis/issues/4 d5e8a895 Move bigquery datatransfer to gapic v2. efd36705 fix: Add two annotations that we missed. 8a36b928 Fix: Define the "bigquery.googleapis.com/Table" resource in the BigQuery Storage API (v1beta2). c7a3caa2 Fix: Define the "bigquery.googleapis.com/Table" resource in the BigQuery Storage API (v1). 5006247a Fix: Make deprecated fields optional Fix: Deprecate SetLoggingServiceRequest.zone in line with the comments Feature: Add resource name method signatures where appropriate eabba40d Fix: C# and PHP package/namespace capitalization for BigQuery Storage v1. f8d9a858 fix: artman configuration file for bigtable-admin 0f29555d API definition for (not-yet-launched) GCS gRPC. fcc86bee fix: Bigtable Admin v2 6d9361ea refactor: Add annotations to Bigtable Admin v2. ad7616f3 Fix: Resource type in CreateLogMetricRequest should use logging.googleapis.com. Fix: ListLogEntries should have a method signature for convenience of calling it. 63796fcb Fix: Remove extraneous resource definition for cloudkms.googleapis.com/CryptoKey. e7d8a694 Depend on the latest gapic-generator and resource names plugin. 806b2854 fix: correct capitalization of Ruby namespaces in SecurityCenter V1p1beta1 1b83c924 Publish annotations and grpc service config for Logging API. e46f761c Generate the Bazel build file for recommendengine public api 68477017 Make `language_code` optional for UpdateIntentRequest and BatchUpdateIntentsRequest. 16f823f5 Add BUILD.bazel files for managedidentities API 2f53fd81 Add v1p1beta1 config file 052b2741 Add source field for user event and add field behavior annotations 1e89732b datacatalog: v1beta1 add three new RPCs to gapic v1beta1 config 9c8bd09b change the name of AccessApproval service to AccessApprovalAdmin 2e23b8fb Add ListEntryGroups method, add http bindings to support entry group tagging, and update some comments. 0275e38a Add proto_package field to managedidentities API. It is needed for APIs that still depend on artman generation. 4cdfe827 Regenerating public protos for Data Catalog to add new Custom Type Entry feature. 45d2a569 Enable client generation for v1 ManagedIdentities API. 2c17086b Add the Actions on Google common types (//google/actions/type/*). 781aadb9 Dialogflow weekly v2/v2beta1 library update: - Documentation updates Important updates are also posted at https://cloud.google.com/dialogflow/docs/release-notes e2602608 Dialogflow weekly v2/v2beta1 library update: - Documentation updates Important updates are also posted at https://cloud.google.com/dialogflow/docs/release-notes c8aef820 Add cc_proto_library and cc_grpc_library targets for Bigtable protos. e2faab04 cloudtasks: v2 replace non-standard retry params in gapic config v2 dfb4097e errorreporting: v1beta1 add legacy artman config for php b18aed55 asset: v1p1beta1 updated comment for `page_size` limit. c9ef36b7 bazel: Refactor CI build scripts a8ed9d92 fix: set Ruby module name for OrgPolicy 6c7d2850 redis: v1beta1 add UpgradeInstance and connect_mode field to Instance ae0abed4 redis: v1 add connect_mode field to Instance 3f7a0d29 Adds service config definition for bigqueryreservation v1beta1 0c88168d addition of BUILD & configuration for accessapproval v1 39bedc2e accessapproval: v1 publish protos 69d99453 Add file-level `Session` resource definition f6a1a6b4 Add file-level `Session` resource definition 29d40b78 Expose managedidentities/v1beta1/ API for client library usage. a22129a1 Expose managedidentities/v1/ API for client library usage. b5cbe4a4 SecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug. b224b317 Adds API definitions for bigqueryreservation v1beta1. c1468702 Synchronize new proto/yaml changes. ffdfa4f5 vision: v1p3beta1 publish annotations and retry config 78f61482 vision: v1p1beta1 publish annotations and retry config 60bb5a29 vision: v1p2beta1 publish annotations and retry config 3bcf7aa7 vision: v1p4beta1 publish annotations and retry config 2717b8a1 Fix dataproc artman client library generation. 7ac66d9b Add Dataproc Autoscaling API to V1. 5d932b2c - Improve documentation - Add a client_id field to StreamingPullRequest eaff9fa8 monitoring: v3 publish annotations and client retry config 70958bab BigQuery Storage Read API v1 clients. 7a15e7fe Update backend proto for Google Cloud Endpoints 3ca2c014 bazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests 9933347c bazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules) b835ab9d asset: v1p2beta1 add client config annotations c1246a29 Updating v1 protos with the latest inline documentation (in comments) and config options. Also adding a per-service .yaml file. b491d07c Revert accidental local_repository change af3400a8 Update gapic-generator dependency (prebuilt PHP binary support). 341fd569 grafeas: v1 add resource_definition for the grafeas.io/Project and change references for Project. 42e915ec Update the gapic-generator, protoc-java-resource-name-plugin and protoc-docs-plugin to the latest commit. f035f472 Fix grafeas build and update build.sh script to include gerafeas. 26ccb214 asset: v1p1beta1 add client config annotations and retry config 974ee5c0 asset: v1beta1 add client config annotations cf3b6110 Fix to protos for v1p1beta1 release of Cloud Security Command Center 4e1cfaa7 Update the public proto to support UTF-8 encoded id for CatalogService API, increase the ListCatalogItems deadline to 300s and some minor documentation change 9c483584 asset: add annotations to v1p1beta1 e19209fa Add the google.rpc.context.AttributeContext message to the open source directories. ae566296 oslogin API: move file level option on top of the file to avoid protobuf.js bug. eba3897f Add cc_proto_library and cc_grpc_library targets for Spanner and IAM protos. 8e981acf Beta launch for PersonDetection and FaceDetection features. 994e067f asset: add annotations to v1p2beta1 244e1d2c Add Playable Locations service 909f8f67 asset: add annotations to v1beta2 3c39a1d6 KMS: add file-level message for CryptoKeyPath, it is defined in gapic yaml but not in proto files. c6f3f350 containeranalysis: update v1beta1 and bazel build with annotations 92887d74 fix: fix the location of grpc config file. e26cab8a expr: add default_host and method_signature annotations to CelService 06093ae3 irm: fix v1alpha2 bazel build by adding missing proto imports a8a2514a Add proto annotation for cloud/irm API 8d16f76d Generate Memcache v1beta2 API protos and gRPC ServiceConfig files 3af1dabd grafeas: Add containeranalysis default_host to Grafeas service be2663fa fix(google/maps/roads): add missing opening bracket facc2655 Updating v2 protos with the latest inline documentation (in comments) and adding a per-service .yaml file. cda99c1f Change api_name to 'asset' for v1p1beta1 94e9e90c Adds Google Maps Road service a3b23dcb rpc: new message ErrorInfo, other comment updates 26420ef4 Add proto definition for Org Policy v1. 7f0dab81 Publish Routes Preferred API v1 service definitions. ad6e508d Fix: Qualify resource type references with "jobs.googleapis.com/" 58e770d5 cts client library af9daa4c Add more programming language options to public proto d9f2bbf2 talent: add missing resource.proto dep to Bazel build target 3b396823 Annotate Talent API. Add gRPC service config for retry. Update bazel file with google.api.resource dependency. 0735b4b0 Weekly library update. 8760d3d9 Weekly library update. 8607df84 Change Talent API timeout to 30s. 90815599 Add Recommendations AI V1Beta1 5c9a8c2b Adding no-arg method signatures for ListBillingAccounts and ListServices 50b0e828 longrunning: add grpc service config and default_host annotation to operations.proto 6cac27da Updating default deadline for Cloud Security Command Center's v1 APIs. d99df0d6 Fix: Correct spelling in C# namespace option 2fa8d481 feat: Publish Recommender v1 to GitHub. 9118db63 firestore: don't retry reads that fail with Aborted 1dbfd3fe Fix bazel build Add other langauges (Java was already there) for bigquery/storage/v1alpha2 api. c06599cd Initial commit of google.cloud.policytroubleshooter API, The API helps in troubleshooting GCP policies. Refer https://cloud.google.com/iam/docs/troubleshooting-access for more information fce7d80f Do not pass samples option for Artman config of recommender v1 API. ef179e8c fix: Address missing Bazel dependency. 8841655b Migrate Data Labeling v1beta1 to GAPIC v2. 06ec6d5d Add annotations to google.longrunning.v1 0480cf40 Migrate IAM Admin v1 to GAPIC v2. 1017173e Specify a C# namespace for BigQuery Connection v1beta1 b08714b3 fix: Integrate latest proto-docs-plugin fix. Fixes dialogflow v2 51217a67 Create BUILD file for recommender v1 acacd872 Generate recommender v1 API protos and gRPC ServiceConfig files 9d2f7133 Fix kokoro build script c43a6753 cloudtasks: replace missing RPC timeout config for v2beta2 and v2beta3 4cefc229 Synchronize new proto/yaml changes. 56f263fe Catalog API: Adding config necessary to build client libraries 4543762b Fix Bazel build billing/v1 and dialogflow/v2 remain broken (not bazel-related issues). Billing has wrong configuration, dialogflow failure is caused by a bug in documentation plugin. c9dce519 Update Bigtable docs 802c5c5f Migrate DLP to proto annotations (but not GAPIC v2). 6357f30f Remove gRPC configuration file that was in the wrong place. 360a8792 Protos for v1p1beta1 release of Cloud Security Command Center a79211c2 Roll back containeranalysis v1 to GAPIC v1. 9e60345b Publish Routes Preferred API v1 proto definitions. d52885b6 Migrate the service management API to GAPIC v2. 6ace5868 cloudtasks: replace missing RPC timeout config 51d906ca Import of Grafeas from Github. 5ef42bcd Migrate Recommender v1beta1 to GAPIC v2. 94f986af Migrate Container Analysis v1 to GAPIC v2. 7a751a27 Remove Container Analysis v1alpha1 (nobody publishes it). 3c0d9c71 Remove specious annotation from BigQuery Data Transfer before anyone accidentally does anything that uses it. 1af307a4 Migrate BigQuery Connection to GAPIC v2. 08b488e0 Exposing cloud_catalog.proto (This API is already available through REST) a6134829 Update the OS Login v1beta API description to render better in the UI. 5e182b8d Update the OS Login API description to render better in the UI. cb79155f Fix: Add a resource annotation for Agent Fix: Correct the service name in annotations for Intent and SessionEntityType f7f6e9da Added cloud asset api v1p1beta1 f2880f5b Billing account API: Adding config necessary to build client libraries dc250ffe Fix: Remove incorrect resource annotations in requests 91ef2d9d Add GAPIC annotations to Cloud KMS (but do not migrate the GAPIC config yet). 4d45a639 Refreshing Cloud Billing API protos. ec285d3d Hide not yet implemented update_transforms message a202fb3b BigQuery Storage Write API v1alpha2 clients. The service is enabled by whitelist only. 650d7f1f Update Readme.md to match latest Bazel updates 090d98ae docs(bigtable): Fix library release level listed in generated documentation 2c28f646 firestore: retry reads that fail with contention fd3091fb Sync timeout in grpc config back to 10s for tasks API with github googelapis gapic config. 49dd7d85 bazel: Integrate bazel-2.0.0 compatibility fixes 46e52fd6 bazel: Integrate bazel build file generator 1a380ea2 BigQuery Storage Read API v1beta2 clients. 5f3f1d0f Add Artman config for secretmanager. 50af0530 Synchronize new proto/yaml changes. 91818800 For Data Catalog API, 1. Add support for marking a tag template field as required when creating a new tag template. 2. Add support for updating a tag template field from required to optional. ff4a2047 Weekly library update. 192c1402 Weekly library update. d9e328ea Fix bazel build (versions 1.x) 0ca30540 secretmanager client package name option updates for java and go ade4803e iam credentials: publish v1 protos containing annotations 03e5708e securitycenter: add missing proto deps for Bazel build 8b991eb3 Add secretmanager client package name options. d400cb8d dialogflow: add operation_info annotations to BatchUpdateEntities and BatchDeleteEntities. f2b25232 Increased the default timeout time for all the Cloud Security Command Center client libraries. cb2f1eef Exposing new Resource fields in the SecurityCenterProperties proto, added more comments to the filter logic for these Resource fields, and updated the response proto for the ListFindings API with the new Resource fields. 73cebb20 Update v1beta2 clusters and jobs to include resource ids in GRPC header. 1b4e453d securitycenter: publish v1beta1 protos with annotations a985eeda Add default retry configurations for speech_v1p1beta1. 3352100a Make importing rule with the same name (but different aliases) from different repositories possible. 6ad2bb13 Updated v1beta1 protos for the client: - added support for GenericSignedAttestation which has a generic Signature - added support for CVSSv3 and WindowsDetail in Vulnerability - documentation updates fe1962e4 AdMob API v1 20191210 41fc1403 Annotate the required fields for the Monitoring Dashboards API 27d0e0f2 Remove inappropriate resource_reference annotations for UpdateWorkflowTemplateRequest.template. e5c4d3a2 Add Artman BUILD.bazel file for the Monitoring Dashboards API 2085a0d3 Fix path in the artman config for Monitoring Dashboard API. 2da72dfe Add Artman and GAPIC configs for the Monitoring Dashboards API. 9f6eeebf Add annotations to Dataproc v1. (Also forwarding comment changes from internal source control.) 19c4589a oslogin: fix v1beta retry configuration ee3f0292 Add Monitoring Dashboards API protocol buffers to Google Cloud Monitoring API. e47fdd26 bigquery datatransfer: Remove non-publicly available DataSourceService. 6156f433 Adds OSConfig v1beta protos and initial client library config 6cc9499e Add datetime.proto to google/type/BUILD.bazel fe7dd527 Cosmetic changes to proto comment as part of testing internal release instructions. 68d109ad Add annotations to securitycenter v1, but leave GAPIC v1 in place. df8a1707 Synchronize new proto/yaml changes. a69a9749 client library update a4adac3a Added DateTime, TimeZone, and Month proto files to google/type ed5dec39 change common resources from message-level annotations to file-level annotations. a00e2c57 bigquerydatatransfer: change resource type TransferRun to Run to be consistent with gapic configs bigquerydatatransfer: add missing patterns for DataSource, TransferConfig and Run (to allow the location segment) bigquerydatatransfer: add file-level Parent resource type (to allow the location segement) bigquerydatatransfer: update grpc service config with correct retry delays b10e4547 cloud asset: replace required fields for batchgetassethistory. Correct the time out duration. 6690161e Add default retry configurations for speech_v1. 9b2635ef cloudtasks: fix gapic v2 config e5676ba8 Reinstate resource name handling in GAPIC config for Asset v1. f337f7fb OSConfig AgentEndpoint: add LookupEffectiveGuestPolicy rpc c0ac9b55 Include real time feed api into v1 version 2427a3a0 firestore admin: update v1 protos with annotations & retry config 555e844d chore: publish retry configs for iam admin, cloud asset, and remoteworkers 6311dc53 firestore: update v1beta1 protos with annotations and retry config da0edeee feat: publish several retry config files for client generation 59a78053 Removing TODO comment 84639922 Fix bazel build 3bfcb3d8 Public client library for bebop_jobs_api_20191118_1_RC3 release. 27ab0db6 firestore: publish annotated protos and new retry config 38dc36a2 feat: add http annotations for operations calls 366caab9 datastore: add a legacy artman config for PHP generation 82944da2 Migrate container v1beta1 to GAPIC v2. 584dcde5 Remove resource name annotation for UpdateKeyRequest.key, because it's the resource, not a name. 6ab0171e Added resource annotation for Key message. 86c1a2db Expose Admin API methods for Key manipulation. 3ddad085 C++ targets: correct deps so they build, rename them from trace* to cloudtrace* to match the proto names. e9389365 Synchronize new proto/yaml changes. e42eaaa9 Put back C++ targets for cloud trace v2 api. d8896a3d Add initial BUILD.bazel for secretmanager.googleapis.com 2cc56cb8 Create sample for list recommendations f88e2ca6 bump Go to ga aac86d93 Documentation update. Add location_id in preparation for regionalization. 5b501cd3 Migrate Datastore Admin to GAPIC v2. 6a16d474 Migrate Datastore to GAPIC v2. 74bd9b95 mark Go lib ga f7b3d434 Add secretmanager.googleapis.com protos c34a911a iot: bump Go GAPIC to GA release level 79b7f1c5 Put back C++ targets. Previous change overrode custom C++ targets made by external teams. This PR puts those targets back. 06a84078 Populate BAZEL.build files for around 100 APIs (all APIs we publish) in all 7 langauges. 777b580a Create BUILD file for recommender v1beta1 48b385b6 Generate recommender v1beta1 gRPC ServiceConfig file 8395b0f1 fix: Set timeout to 25s, because Tasks fails for any deadline above 30s. 3ba7ddc4 fix: Shift Ruby and PHP to legacy GAPIC YAMLs for back-compat. ad6f0c00 Remove unneeded yaml files 1f42588e refactor: Migrate Tasks beta 2 to GAPIC v2. 902b51f2 refactor: Migrate Tasks to GAPIC v2 (for real this time). 17561f59 Migrate Tasks Beta 3 to GAPIC v2. f95883b1 Regenerate recommender v1beta1 protos and sanitized yaml 9a52df54 add gRPC ServiceConfig for grafeas v1 7a79d682 fix: Roll back Tasks GAPIC v2 while we investigate C# issue. 3fc31491 Migrate Tasks to GAPIC v2. 5bc0fece fix: adds operation HTTP rules back to v1p1beta1 config 5364a192 bazel: Fix build 0aa77cbe Updating common proto files in google/type/ with their latest versions. d47e1b44 fix: replace Speech Recognize RPC retry_codes_name for non-standard assignment 16543773 Regenerating public protos for datacatalog, also adding gRPC service config. 328ebe76 Change custom data type from String to google.protobuf.Struct to be consistent with other docs such as https://developers.google.com/actions/smarthome/develop/process-intents#response_format 5af83f47 (internal change without visible public changes) c53ed566 Fix typo in protobuf docs. d8dd7fe8 Fix build by adding missing deps. 3ef5ffd7 Migrate Error Reporting v1beta1 to proto annotations / GAPIC v2. 418ee8e2 Trace v2: Add remaining proto annotations, migrate to GAPIC v2. c8939434 This change updates an outdated comment for the feature importance proto field since they are no longer in [0, 1] for online predictions. 1ec8b8e2 Code refactoring 427a22b0 Import automl operation protos. 45749a04 fix: bigqueryconnection_gapic.yaml to reflect proto annotations 8385366a Revert the Trace v2 GAPIC for now. Committer: @lukesneeringer 5c8ab2c0 Migrate Trace v1 and Trace v2 to GAPIC v2. f6808ff4 Rename the `endpoint_urls` field to `endpoint_uris` to be consistent with Google API nomenclature. 1935fb88 Comment updates 0797fd5b Comment updates 9bc8d07b Rollback of "Migrate Cloud Error Reporting to proto annotations & GAPIC v2." f8720321 fix: bigtable retry config in GAPIC v2 b11664ba Migrate Cloud Error Reporting to proto annotations & GAPIC v2. 4f747bda 1. Change DataCatalog package name in java from com.google.cloud.datacatalog to com.google.cloud.datacatalog.v1beta1 (API version is included in the package). *This is a breaking change.* bc76ffd8 Use rules_proto bzl files to load proto_library 218164b3 Make the `permissions` argument in TestIamPermissions required. dec8fd8e Updating Cloud Billing Budget API documentation for clarity. a667ffab Introduced detailed status message for CreateTimeSeries: CreateTimeSeriesSummary replaces CreateTimeSeriesError, which is now deprecated and unused. be0a25ec Migrate Bigtable API to GAPIC v2 config. 88bbf96b Fix location of monitoring.yaml in Artman config for monitoring v3. dbaa01a2 Update namespace for PHP. f73b3796 Standardize pub/sub client default settings across clients: - Add retry codes for streaming pull - Decrease publish's max_rpc_timeout (mini-timeout) from 10 mins to 1 min - Decrease publish's total timeout from 10 mins to 1 min - Increase publish batching threshold from 10 to 100 elements - Increase publish batching size threshold from 1 KiB to 1 MiB 82217261 Replace local_repository with http_archive in WORKSPACE 6a8c7914 Added notification_supported_by_agent to indicate whether the agent is sending notifications to Google or not. 675de3dc Add an endpoint_urls field to the instance admin proto and adds a field_mask field to the GetInstanceRequest. f69562be Adds some clarification to IAM Policy public proto comments about the policy versioning compliance check for etag-less SetIamPolicy requests. 4e86b253 Documentation update. Add the new action for sending metrics to Stackdriver. eafaf30b fix: Restore deleted field to avoid a breaking change. ed13a73f Add GAPIC annotations to the GKE API. 6b125955 Update timeouts to 1 hour for default and streaming RPCs. 989b304c Add Service Monitoring (Service and ServiceLevelObjective) protocol buffers to Google Cloud Monitoring API. 1ef3bed9 Updating configs for AgentEndpoint to fix the client library generation. 34e661f5 Update v1beta2 clusters and jobs to include resource ids in GRPC header. 248abde0 Integrate GAPIC Python Bazel Extensions 7ffbf721 OSConfig Agentendpoint: Rename ReportTaskStart to StartNextTask 2642d868 Agentendpoint API: minor doc updates, addition of exclusive_packages|patches to PatchConfigs. d323b287 Documentation changes. 29927f71 Publishing Billing Budgets v1alpha1 API. ff413d36 Adding gRPC service config for Billing Budgets API. 3eb91187 agentendpoint: removes all gapic languages except Go from artman config a34950f9 Fix bazel build. 0ed34e9f Adds agentendpoint protos and initial client library config cad1d3b3 Updates to MediaCard 05556c26 Updates to MediaCard 2275670a Synchronize new proto/yaml changes. 5691fcb7 Synchronize new proto/yaml changes. cb542d6f Synchronize new proto/yaml changes. 311e73f0 Synchronize new proto/yaml changes. 521ce65c Synchronize new proto/yaml changes. f06bab1c Synchronize new proto/yaml changes. 8c6569ce Synchronize new proto/yaml changes. 21262f41 Synchronize new proto/yaml changes. df366ed5 Synchronize new proto/yaml changes. 58bc0f51 Synchronize new proto/yaml changes. e0935db8 Synchronize new proto/yaml changes. af4a739e Synchronize new proto/yaml changes. aac77012 Synchronize new proto/yaml changes. 271fed17 Synchronize new proto/yaml changes. 597951d8 Synchronize new proto/yaml changes. bba93d71 Synchronize new proto/yaml changes. 5b863762 Synchronize new proto/yaml changes. 8bc65fb6 Synchronize new proto/yaml changes. 30a6ca0f Synchronize new proto/yaml changes. 6bef7bd6 Synchronize new proto/yaml changes. aa33c92d Synchronize new proto/yaml changes. a4933867 Synchronize new proto/yaml changes. b21f9629 Synchronize new proto/yaml changes. 93661a24 Synchronize new proto/yaml changes. c0e494ca Synchronize new proto/yaml changes. 4e952e7e Synchronize new proto/yaml changes. 78883c8d Synchronize new proto/yaml changes. 7c4cf35d Synchronize new proto/yaml changes. f28342c5 Synchronize new proto/yaml changes. 532773ac Synchronize new proto/yaml changes. 4e47f307 Synchronize new proto/yaml changes. 3fb0873b Synchronize new proto/yaml changes. d27a4479 Synchronize new proto/yaml changes. 42e5f983 Synchronize new proto/yaml changes. d0324cf6 Synchronize new proto/yaml changes. 6e1a1c95 Synchronize new proto/yaml changes. 698b05fe Synchronize new proto/yaml changes. 56ac9df8 Synchronize new proto/yaml changes. 0d0dc517 Synchronize new proto/yaml changes. 617d4430 Synchronize new proto/yaml changes. ae7a4cc6 Synchronize new proto/yaml changes. 307d6bae Synchronize new proto/yaml changes. 5be60a62 Synchronize new proto/yaml changes. a9589347 Synchronize new proto/yaml changes. 40401ac2 Synchronize new proto/yaml changes. 95c09594 Synchronize new proto/yaml changes. ae908c2b Synchronize new proto/yaml changes. 6b43240c Synchronize new proto/yaml changes. 4195b2f2 Synchronize new proto/yaml changes. 654f6ac2 Synchronize new proto/yaml changes. 4f34b95c Synchronize new proto/yaml changes. 09c6bd21 Synchronize new proto/yaml changes. 2b27ffc4 Synchronize new proto/yaml changes. 868cc5c8 Synchronize new proto/yaml changes. 5abd9408 Synchronize new proto/yaml changes. 0e9a6d15 Synchronize new proto/yaml changes. 906335b5 Synchronize new proto/yaml changes. a05f6404 Synchronize new proto/yaml changes. c6e62c7e Synchronize new proto/yaml changes. 23b47555 Synchronize new proto/yaml changes. 82e14b22 Synchronize new proto/yaml changes. ced8c354 Synchronize new proto/yaml changes. 304d0037 Synchronize new proto/yaml changes. b21af5af Synchronize new proto/yaml changes. d042feca Synchronize new proto/yaml changes. bcc354ed Synchronize new proto/yaml changes. 49cbdc6a Synchronize new proto/yaml changes. b78d26e7 Synchronize new proto/yaml changes. bd1b0670 Synchronize new proto/yaml changes. af8dd2c1 Synchronize new proto/yaml changes. 98cad633 Synchronize new proto/yaml changes. 9cb6aa2b Synchronize new proto/yaml changes. ecab1931 Synchronize new proto/yaml changes. 2b308d08 Synchronize new proto/yaml changes. 798cef7b Synchronize new proto/yaml changes. 50e2b02e Synchronize new proto/yaml changes. 6c96f334 Synchronize new proto/yaml changes. 0576fe28 Synchronize new proto/yaml changes. b89f7fa5 Synchronize new proto/yaml changes. 192d3d82 Synchronize new proto/yaml changes. 0c0bbaeb Synchronize new proto/yaml changes. 10f91fa1 Synchronize new proto/yaml changes. 48b42e8a Synchronize new proto/yaml changes. fcbb13c4 Synchronize new proto/yaml changes. 01d7a37e Synchronize new proto/yaml changes. 455bb713 Synchronize new proto/yaml changes. 5403e7c9 Synchronize new proto/yaml changes. 9d52ad21 Synchronize new proto/yaml changes. ee5aeac2 Synchronize new proto/yaml changes. b93a3bbd Synchronize new proto/yaml changes. 2dec8f98 Synchronize new proto/yaml changes. dcebbafc Synchronize new proto/yaml changes. 6c17e292 Synchronize new proto/yaml changes. 01947e8e Synchronize new proto/yaml changes. 4bf18dfa Synchronize new proto/yaml changes. 8fca1cda Synchronize new proto/yaml changes. 122bdbf8 Synchronize new proto/yaml changes. 23c07004 Synchronize new proto/yaml changes. 8d881c9a Synchronize new proto/yaml changes. 02c1722a Synchronize new proto/yaml changes. 9863e940 Synchronize new proto/yaml changes. ceb8e2fb Synchronize new proto/yaml changes. 063d82fe Synchronize new proto/yaml changes. d9576d95 Synchronize new proto/yaml changes. 16cdca6f Synchronize new proto/yaml changes. 079b1cb3 Synchronize new proto/yaml changes. c372c656 Synchronize new proto/yaml changes. 54082ac4 Synchronize new proto/yaml changes. 2123bcae Synchronize new proto/yaml changes. 6a0b8de0 Synchronize new proto/yaml changes. 1c7e0459 Synchronize new proto/yaml changes. 247e5869 Synchronize new proto/yaml changes. fd0c01b4 Synchronize new proto/yaml changes. 96eb0451 Synchronize new proto/yaml changes. d6e70940 Synchronize new proto/yaml changes. ce3c574d Synchronize new proto/yaml changes. a6414188 Synchronize new proto/yaml changes. 588bdb66 Synchronize new proto/yaml changes. 6e012ef8 Synchronize new proto/yaml changes. 95a98344 Synchronize new proto/yaml changes. fcdec366 Synchronize new proto/yaml changes. 4d384929 Synchronize new proto/yaml changes. fb477e1e Synchronize new proto/yaml changes. cd112d8d Synchronize new proto/yaml changes. a6a3c306 Synchronize new proto/yaml changes. a9a9950d Synchronize new proto/yaml changes. 27fdfa78 Synchronize new proto/yaml changes. 97aaf564 Synchronize new proto/yaml changes. 8609fa97 Synchronize new proto/yaml changes. 4c2ca81a Synchronize new proto/yaml changes. 0df958b3 Synchronize new proto/yaml changes. 9afbe16a Synchronize new proto/yaml changes. b31371da Synchronize new proto/yaml changes. 5b5f0d54 Synchronize new proto/yaml changes. a5d0708f Synchronize new proto/yaml changes. 9dc1d37b Synchronize new proto/yaml changes. 662bfb26 Synchronize new proto/yaml changes. 17e324b2 Synchronize new proto/yaml changes. 62167121 Synchronize new proto/yaml changes. c277413f Synchronize new proto/yaml changes. 6a9bb862 Synchronize new proto/yaml changes. 640f1cf8 Synchronize new proto/yaml changes. a942ac23 Synchronize new proto/yaml changes. c687a1d6 Synchronize new proto/yaml changes. fe6115fd Synchronize new proto/yaml changes. 462f5882 Synchronize new proto/yaml changes. 2fc34e96 Synchronize new proto/yaml changes. cc332bd1 Synchronize new proto/yaml changes. eea87cb6 Synchronize new proto/yaml changes. 7d388543 Synchronize new proto/yaml changes. be6e5d03 Synchronize new proto/yaml changes. b8810393 Synchronize new proto/yaml changes. d322f1e6 Synchronize new proto/yaml changes. 999d0930 Synchronize new proto/yaml changes. 095078e8 Synchronize new proto/yaml changes. 1bed8d12 Synchronize new proto/yaml changes. 3d924055 Synchronize new proto/yaml changes. db1807a9 Synchronize new proto/yaml changes. 2e02174c Synchronize new proto/yaml changes. 44e588d9 Synchronize new proto/yaml changes. 541478d5 Synchronize new proto/yaml changes. 5e6b79e0 Synchronize new proto/yaml changes. 1c80c626 Synchronize new proto/yaml changes. 23f6c4d8 Change the min Bazel version to 0.29.1. (#580) efbb545f Synchronize new proto/yaml changes. edcf4f55 Synchronize new proto/yaml changes. 4aeb1260 Synchronize new proto/yaml changes. 5aa7c874 Merge pull request #579 from hzyi-google/master 2ed795dd Revert "wip" 6cf4128a wip 6b2ba2ae Synchronize new proto/yaml changes. a602911f Synchronize new proto/yaml changes. b7abb49e Synchronize new proto/yaml changes. dc88acb2 Synchronize new proto/yaml changes. 141be1a5 Synchronize new proto/yaml changes. 2eebba5d Synchronize new proto/yaml changes. 1cb29d0f Synchronize new proto/yaml changes. 0b6f19d5 Synchronize new proto/yaml changes. 0b52f3c5 Synchronize new proto/yaml changes. f1c04277 Synchronize new proto/yaml changes. 6a0f44c1 Synchronize new proto/yaml changes. 9192ec6f Synchronize new proto/yaml changes. b4b18255 Synchronize new proto/yaml changes. 9cba3647 Synchronize new proto/yaml changes. 26e189ad archive artifacts always b4c2ae89 speedup CI by saving one .tgz file 196b4547 Synchronize new proto/yaml changes. 3c8c87f4 Synchronize new proto/yaml changes. 9d392b16 Synchronize new proto/yaml changes. 1fc12b2d Synchronize new proto/yaml changes. 8181bf62 Synchronize new proto/yaml changes. 95b8fa5a Synchronize new proto/yaml changes. 53fe2e36 Synchronize new proto/yaml changes. e051f9df Synchronize new proto/yaml changes. 878ec92a Synchronize new proto/yaml changes. 960b76b1 Synchronize new proto/yaml changes. 7525959e Synchronize new proto/yaml changes. ae9cdf09 Synchronize new proto/yaml changes. 676104ec Synchronize new proto/yaml changes. c9a1670d Synchronize new proto/yaml changes. 0930bdac Synchronize new proto/yaml changes. 1beb0e69 Synchronize new proto/yaml changes. 445beeeb Synchronize new proto/yaml changes. 541c0153 Synchronize new proto/yaml changes. 85d476be Synchronize new proto/yaml changes. a2158681 Synchronize new proto/yaml changes. abea8146 Synchronize new proto/yaml changes. 82809578 Synchronize new proto/yaml changes. e121a355 Synchronize new proto/yaml changes. dbd38035 Synchronize new proto/yaml changes. 49f95398 Synchronize new proto/yaml changes. d42eb8b6 Synchronize new proto/yaml changes. 650caad7 Synchronize new proto/yaml changes. 37c923ef Synchronize new proto/yaml changes. b97af5f7 Synchronize new proto/yaml changes. fb6fa4cf Synchronize new proto/yaml changes. 9c9f778a Synchronize new proto/yaml changes. 4df4371d Synchronize new proto/yaml changes. 7ebb7a62 Synchronize new proto/yaml changes. 92bebf78 Synchronize new proto/yaml changes. 2a928b01 Synchronize new proto/yaml changes. 77e5e0ee Synchronize new proto/yaml changes. 11592a15 Synchronize new proto/yaml changes. 3f018e83 Synchronize new proto/yaml changes. 24cae222 Synchronize new proto/yaml changes. 4bb50a3e Synchronize new proto/yaml changes. a1b85caa Synchronize new proto/yaml changes. f6cc01ff Synchronize new proto/yaml changes. 2a02e33c Synchronize new proto/yaml changes. 82c3abe8 Synchronize new proto/yaml changes. 149dc94c Synchronize new proto/yaml changes. c4f8f6cd Synchronize new proto/yaml changes. 0b9c2e06 Synchronize new proto/yaml changes. 3406d1e8 Synchronize new proto/yaml changes. 9427411e Synchronize new proto/yaml changes. db02bc9c Synchronize new proto/yaml changes. 2a2c5518 Synchronize new proto/yaml changes. 8d3e3cba Synchronize new proto/yaml changes. ab3c556f Synchronize new proto/yaml changes. 7e56e8d4 Synchronize new proto/yaml changes. 3a1b46a6 Synchronize new proto/yaml changes. 6d298828 Synchronize new proto/yaml changes. 350f3135 Synchronize new proto/yaml changes. ac06010e Synchronize new proto/yaml changes. b7844cbd Synchronize new proto/yaml changes. a76c0889 Synchronize new proto/yaml changes. 53e64172 Fix type in README.md (#557) e699b0cb Synchronize new proto/yaml changes. 1943ffb8 Synchronize new proto/yaml changes. f94d89f4 Synchronize new proto/yaml changes. 7b212a8d Synchronize new proto/yaml changes. ddea6a7a8 Synchronize new proto/yaml changes. 3a40d3a5 Synchronize new proto/yaml changes. b92472ba Synchronize new proto/yaml changes. 1b1ef1ca Synchronize new proto/yaml changes. 65c8e9e3 Synchronize new proto/yaml changes. c7a6b35d Synchronize new proto/yaml changes. 9e3dddd5 Synchronize new proto/yaml changes. e3b51e76 Synchronize new proto/yaml changes. e042bbbe Synchronize new proto/yaml changes. c5cb094b Synchronize new proto/yaml changes. 1b3b5c4e Synchronize new proto/yaml changes. 2912605a Synchronize new proto/yaml changes. 6b4a6ba2 Synchronize new proto/yaml changes. 2da71aca Synchronize new proto/yaml changes. c6aa541d Synchronize new proto/yaml changes. 7afd4d47 Synchronize new proto/yaml changes. 0906a9e7 Synchronize new proto/yaml changes. a0ca38e4 Synchronize new proto/yaml changes. 1c1164ba Synchronize new proto/yaml changes. 6af81633 Synchronize new proto/yaml changes. ec379e9d Synchronize new proto/yaml changes. 4b12afe7 Synchronize new proto/yaml changes. be480e39 Synchronize new proto/yaml changes. 731d7736 Synchronize new proto/yaml changes. 3035bd51 Synchronize new proto/yaml changes. 6e3b55e2 Synchronize new proto/yaml changes. d7f91b11 Synchronize new proto/yaml changes. 476059b0 Synchronize new proto/yaml changes. 43e06784 Synchronize new proto/yaml changes. 9156f798 Synchronize new proto/yaml changes. 184ab77f Synchronize new proto/yaml changes. b2fecee3 Synchronize new proto/yaml changes. f78612e8 Synchronize new proto/yaml changes. e9277177 Synchronize new proto/yaml changes. 3c94c4b4 Synchronize new proto/yaml changes. 3b943eb3 Synchronize new proto/yaml changes. 0ce9d41a Synchronize new proto/yaml changes. git-subtree-dir: third_party/googleapis git-subtree-split: cd3ce2651c3921670217e664303976cdf76e9fe2 --- .bazelrc | 5 + .circleci/config.yml | 11 +- .kokoro/.bazelrc | 2 + .kokoro/build.sh | 15 + .kokoro/continuous.cfg | 3 + .kokoro/presubmit.cfg | 3 + .kokoro/setup.sh | 19 + BUILD.bazel | 129 +- README.md | 4 +- WORKSPACE | 212 +- google/actions/type/BUILD.bazel | 167 ++ google/actions/type/date_range.proto | 81 + google/actions/type/datetime_range.proto | 66 + google/actions/type/type_aog.yaml | 21 + google/ads/admob/BUILD.bazel | 1 + google/ads/admob/admob_v1.yaml | 36 + google/ads/admob/artman_admob_v1.yaml | 34 + google/ads/admob/v1/BUILD.bazel | 356 +++ google/ads/admob/v1/admob_api.proto | 221 ++ google/ads/admob/v1/admob_gapic.yaml | 150 ++ google/ads/admob/v1/admob_resources.proto | 567 +++++ google/ads/googleads/base.yaml | 276 --- google/ads/googleads/v1/common/ad_asset.proto | 8 +- .../googleads/v1/common/ad_type_infos.proto | 42 +- .../ads/googleads/v1/common/asset_types.proto | 5 +- google/ads/googleads/v1/common/bidding.proto | 33 +- .../googleads/v1/common/click_location.proto | 5 +- google/ads/googleads/v1/common/criteria.proto | 55 +- .../criterion_category_availability.proto | 17 +- .../v1/common/custom_parameter.proto | 5 +- google/ads/googleads/v1/common/dates.proto | 9 +- .../explorer_auto_optimizer_setting.proto | 11 +- .../ads/googleads/v1/common/extensions.proto | 23 +- .../ads/googleads/v1/common/feed_common.proto | 5 +- .../googleads/v1/common/final_app_url.proto | 8 +- .../googleads/v1/common/frequency_cap.proto | 14 +- .../v1/common/keyword_plan_common.proto | 8 +- .../v1/common/matching_function.proto | 28 +- google/ads/googleads/v1/common/metrics.proto | 52 +- google/ads/googleads/v1/common/policy.proto | 20 +- .../v1/common/real_time_bidding_setting.proto | 5 +- google/ads/googleads/v1/common/segments.proto | 50 +- .../ads/googleads/v1/common/simulation.proto | 15 +- .../ads/googleads/v1/common/tag_snippet.proto | 8 +- .../v1/common/targeting_setting.proto | 18 +- .../ads/googleads/v1/common/text_label.proto | 5 +- .../googleads/v1/common/url_collection.proto | 5 +- .../ads/googleads/v1/common/user_lists.proto | 52 +- google/ads/googleads/v1/common/value.proto | 3 +- .../googleads/v1/enums/access_reason.proto | 5 +- .../account_budget_proposal_status.proto | 5 +- .../enums/account_budget_proposal_type.proto | 5 +- .../v1/enums/account_budget_status.proto | 5 +- .../ad_customizer_placeholder_field.proto | 5 +- .../v1/enums/ad_group_ad_rotation_mode.proto | 5 +- .../v1/enums/ad_group_ad_status.proto | 5 +- .../ad_group_criterion_approval_status.proto | 5 +- .../v1/enums/ad_group_criterion_status.proto | 5 +- .../googleads/v1/enums/ad_group_status.proto | 5 +- .../googleads/v1/enums/ad_group_type.proto | 5 +- .../googleads/v1/enums/ad_network_type.proto | 5 +- .../ad_serving_optimization_status.proto | 5 +- .../ads/googleads/v1/enums/ad_strength.proto | 5 +- google/ads/googleads/v1/enums/ad_type.proto | 5 +- .../enums/advertising_channel_sub_type.proto | 5 +- .../v1/enums/advertising_channel_type.proto | 5 +- ...iate_location_feed_relationship_type.proto | 5 +- ...affiliate_location_placeholder_field.proto | 5 +- .../googleads/v1/enums/age_range_type.proto | 5 +- .../v1/enums/app_campaign_app_store.proto | 5 +- ..._campaign_bidding_strategy_goal_type.proto | 5 +- .../v1/enums/app_payment_model_type.proto | 5 +- .../v1/enums/app_placeholder_field.proto | 5 +- google/ads/googleads/v1/enums/app_store.proto | 5 +- .../enums/app_url_operating_system_type.proto | 5 +- .../ads/googleads/v1/enums/asset_type.proto | 5 +- .../v1/enums/attribution_model.proto | 5 +- .../v1/enums/bid_modifier_source.proto | 5 +- .../googleads/v1/enums/bidding_source.proto | 5 +- .../v1/enums/bidding_strategy_status.proto | 5 +- .../v1/enums/bidding_strategy_type.proto | 7 +- .../v1/enums/billing_setup_status.proto | 5 +- .../v1/enums/brand_safety_suitability.proto | 5 +- .../v1/enums/budget_delivery_method.proto | 5 +- .../googleads/v1/enums/budget_period.proto | 5 +- .../googleads/v1/enums/budget_status.proto | 5 +- .../ads/googleads/v1/enums/budget_type.proto | 5 +- .../call_conversion_reporting_state.proto | 5 +- .../v1/enums/call_placeholder_field.proto | 5 +- .../v1/enums/callout_placeholder_field.proto | 5 +- .../v1/enums/campaign_criterion_status.proto | 3 +- .../v1/enums/campaign_draft_status.proto | 3 +- .../v1/enums/campaign_experiment_status.proto | 3 +- ...mpaign_experiment_traffic_split_type.proto | 3 +- .../v1/enums/campaign_experiment_type.proto | 5 +- .../v1/enums/campaign_serving_status.proto | 5 +- .../v1/enums/campaign_shared_set_status.proto | 5 +- .../googleads/v1/enums/campaign_status.proto | 5 +- .../v1/enums/change_status_operation.proto | 5 +- .../enums/change_status_resource_type.proto | 5 +- .../ads/googleads/v1/enums/click_type.proto | 5 +- .../v1/enums/content_label_type.proto | 5 +- .../v1/enums/conversion_action_category.proto | 5 +- .../conversion_action_counting_type.proto | 5 +- .../v1/enums/conversion_action_status.proto | 5 +- .../v1/enums/conversion_action_type.proto | 5 +- .../v1/enums/conversion_adjustment_type.proto | 5 +- .../conversion_attribution_event_type.proto | 5 +- .../v1/enums/conversion_lag_bucket.proto | 5 +- .../conversion_or_adjustment_lag_bucket.proto | 5 +- ...n_category_channel_availability_mode.proto | 5 +- ...on_category_locale_availability_mode.proto | 7 +- .../criterion_system_serving_status.proto | 5 +- .../googleads/v1/enums/criterion_type.proto | 5 +- .../enums/custom_interest_member_type.proto | 5 +- .../v1/enums/custom_interest_status.proto | 5 +- .../v1/enums/custom_interest_type.proto | 5 +- .../v1/enums/custom_placeholder_field.proto | 5 +- .../customer_match_upload_key_type.proto | 5 +- ...onversion_eligibility_failure_reason.proto | 5 +- .../v1/enums/data_driven_model_status.proto | 5 +- .../ads/googleads/v1/enums/day_of_week.proto | 5 +- google/ads/googleads/v1/enums/device.proto | 5 +- .../v1/enums/display_ad_format_setting.proto | 5 +- .../enums/display_upload_product_type.proto | 5 +- .../enums/dsa_page_feed_criterion_field.proto | 5 +- .../enums/education_placeholder_field.proto | 5 +- .../v1/enums/extension_setting_device.proto | 5 +- .../googleads/v1/enums/extension_type.proto | 5 +- .../v1/enums/external_conversion_source.proto | 5 +- .../v1/enums/feed_attribute_type.proto | 5 +- .../feed_item_quality_approval_status.proto | 5 +- ...feed_item_quality_disapproval_reason.proto | 5 +- .../googleads/v1/enums/feed_item_status.proto | 5 +- .../v1/enums/feed_item_target_device.proto | 5 +- .../v1/enums/feed_item_target_type.proto | 5 +- .../enums/feed_item_validation_status.proto | 5 +- .../googleads/v1/enums/feed_link_status.proto | 5 +- .../enums/feed_mapping_criterion_type.proto | 5 +- .../v1/enums/feed_mapping_status.proto | 5 +- .../ads/googleads/v1/enums/feed_origin.proto | 5 +- .../ads/googleads/v1/enums/feed_status.proto | 5 +- .../v1/enums/flight_placeholder_field.proto | 5 +- .../v1/enums/frequency_cap_event_type.proto | 5 +- .../v1/enums/frequency_cap_level.proto | 5 +- .../v1/enums/frequency_cap_time_unit.proto | 5 +- .../ads/googleads/v1/enums/gender_type.proto | 5 +- .../v1/enums/geo_target_constant_status.proto | 5 +- .../v1/enums/geo_targeting_restriction.proto | 5 +- .../v1/enums/geo_targeting_type.proto | 5 +- .../v1/enums/google_ads_field_category.proto | 5 +- .../v1/enums/google_ads_field_data_type.proto | 5 +- .../v1/enums/hotel_date_selection_type.proto | 5 +- .../v1/enums/hotel_placeholder_field.proto | 5 +- .../googleads/v1/enums/hotel_rate_type.proto | 7 +- .../v1/enums/income_range_type.proto | 5 +- .../v1/enums/interaction_event_type.proto | 5 +- .../googleads/v1/enums/interaction_type.proto | 5 +- .../v1/enums/job_placeholder_field.proto | 5 +- .../v1/enums/keyword_match_type.proto | 5 +- .../keyword_plan_competition_level.proto | 5 +- .../keyword_plan_forecast_interval.proto | 5 +- .../v1/enums/keyword_plan_network.proto | 5 +- .../ads/googleads/v1/enums/label_status.proto | 5 +- .../legacy_app_install_ad_app_store.proto | 5 +- .../listing_custom_attribute_index.proto | 5 +- .../v1/enums/listing_group_type.proto | 5 +- .../v1/enums/local_placeholder_field.proto | 5 +- ..._extension_targeting_criterion_field.proto | 5 +- .../enums/location_group_radius_units.proto | 5 +- .../v1/enums/location_placeholder_field.proto | 5 +- .../v1/enums/manager_link_status.proto | 5 +- .../matching_function_context_type.proto | 5 +- .../v1/enums/matching_function_operator.proto | 5 +- .../ads/googleads/v1/enums/media_type.proto | 5 +- .../enums/merchant_center_link_status.proto | 5 +- .../v1/enums/message_placeholder_field.proto | 5 +- google/ads/googleads/v1/enums/mime_type.proto | 5 +- .../googleads/v1/enums/minute_of_hour.proto | 5 +- .../v1/enums/mobile_device_type.proto | 5 +- .../googleads/v1/enums/month_of_year.proto | 5 +- .../v1/enums/mutate_job_status.proto | 5 +- .../v1/enums/negative_geo_target_type.proto | 9 +- ...erating_system_version_operator_type.proto | 5 +- .../page_one_promoted_strategy_goal.proto | 5 +- .../v1/enums/parental_status_type.proto | 5 +- .../ads/googleads/v1/enums/payment_mode.proto | 5 +- .../googleads/v1/enums/placeholder_type.proto | 5 +- .../googleads/v1/enums/placement_type.proto | 5 +- .../v1/enums/policy_approval_status.proto | 5 +- .../v1/enums/policy_review_status.proto | 5 +- .../v1/enums/policy_topic_entry_type.proto | 5 +- ...idence_destination_mismatch_url_type.proto | 5 +- ...dence_destination_not_working_device.proto | 5 +- .../v1/enums/positive_geo_target_type.proto | 11 +- .../v1/enums/preferred_content_type.proto | 5 +- .../price_extension_price_qualifier.proto | 5 +- .../v1/enums/price_extension_price_unit.proto | 5 +- .../v1/enums/price_extension_type.proto | 5 +- .../v1/enums/price_placeholder_field.proto | 5 +- .../product_bidding_category_level.proto | 5 +- .../product_bidding_category_status.proto | 5 +- .../googleads/v1/enums/product_channel.proto | 5 +- .../enums/product_channel_exclusivity.proto | 5 +- .../v1/enums/product_condition.proto | 5 +- .../v1/enums/product_type_level.proto | 5 +- ...romotion_extension_discount_modifier.proto | 5 +- .../enums/promotion_extension_occasion.proto | 5 +- .../enums/promotion_placeholder_field.proto | 5 +- .../v1/enums/proximity_radius_units.proto | 5 +- .../v1/enums/quality_score_bucket.proto | 5 +- .../enums/real_estate_placeholder_field.proto | 5 +- .../v1/enums/recommendation_type.proto | 5 +- .../search_engine_results_page_type.proto | 5 +- .../v1/enums/search_term_match_type.proto | 5 +- .../enums/search_term_targeting_status.proto | 5 +- .../v1/enums/served_asset_field_type.proto | 5 +- .../v1/enums/shared_set_status.proto | 5 +- .../googleads/v1/enums/shared_set_type.proto | 5 +- .../simulation_modification_method.proto | 5 +- .../googleads/v1/enums/simulation_type.proto | 5 +- .../v1/enums/sitelink_placeholder_field.proto | 5 +- google/ads/googleads/v1/enums/slot.proto | 5 +- .../v1/enums/spending_limit_type.proto | 5 +- ...structured_snippet_placeholder_field.proto | 12 +- .../enums/system_managed_entity_source.proto | 5 +- ...arget_cpa_opt_in_recommendation_goal.proto | 5 +- .../target_impression_share_location.proto | 5 +- .../v1/enums/targeting_dimension.proto | 5 +- google/ads/googleads/v1/enums/time_type.proto | 5 +- .../v1/enums/tracking_code_page_format.proto | 5 +- .../v1/enums/tracking_code_type.proto | 5 +- .../v1/enums/travel_placeholder_field.proto | 5 +- .../enums/user_interest_taxonomy_type.proto | 5 +- .../v1/enums/user_list_access_status.proto | 5 +- .../v1/enums/user_list_closing_reason.proto | 5 +- .../user_list_combined_rule_operator.proto | 5 +- .../user_list_crm_data_source_type.proto | 5 +- .../user_list_date_rule_item_operator.proto | 5 +- .../user_list_logical_rule_operator.proto | 5 +- .../enums/user_list_membership_status.proto | 5 +- .../user_list_number_rule_item_operator.proto | 5 +- .../user_list_prepopulation_status.proto | 5 +- .../v1/enums/user_list_rule_type.proto | 5 +- .../v1/enums/user_list_size_range.proto | 5 +- .../user_list_string_rule_item_operator.proto | 5 +- .../googleads/v1/enums/user_list_type.proto | 5 +- .../vanity_pharma_display_url_mode.proto | 5 +- .../v1/enums/vanity_pharma_text.proto | 5 +- .../v1/enums/webpage_condition_operand.proto | 5 +- .../v1/enums/webpage_condition_operator.proto | 5 +- .../account_budget_proposal_error.proto | 5 +- .../v1/errors/ad_customizer_error.proto | 5 +- google/ads/googleads/v1/errors/ad_error.proto | 5 +- .../v1/errors/ad_group_ad_error.proto | 5 +- .../errors/ad_group_bid_modifier_error.proto | 5 +- .../v1/errors/ad_group_criterion_error.proto | 5 +- .../googleads/v1/errors/ad_group_error.proto | 5 +- .../v1/errors/ad_group_feed_error.proto | 5 +- .../v1/errors/ad_parameter_error.proto | 5 +- .../v1/errors/ad_sharing_error.proto | 5 +- .../ads/googleads/v1/errors/adx_error.proto | 5 +- .../ads/googleads/v1/errors/asset_error.proto | 5 +- .../v1/errors/authentication_error.proto | 5 +- .../v1/errors/authorization_error.proto | 12 +- .../googleads/v1/errors/bidding_error.proto | 8 +- .../v1/errors/bidding_strategy_error.proto | 5 +- .../v1/errors/billing_setup_error.proto | 47 +- .../v1/errors/campaign_budget_error.proto | 5 +- .../v1/errors/campaign_criterion_error.proto | 5 +- .../v1/errors/campaign_draft_error.proto | 3 +- .../googleads/v1/errors/campaign_error.proto | 11 +- .../v1/errors/campaign_experiment_error.proto | 3 +- .../v1/errors/campaign_feed_error.proto | 5 +- .../v1/errors/campaign_shared_set_error.proto | 5 +- .../v1/errors/change_status_error.proto | 5 +- .../v1/errors/collection_size_error.proto | 5 +- .../googleads/v1/errors/context_error.proto | 5 +- .../v1/errors/conversion_action_error.proto | 5 +- .../conversion_adjustment_upload_error.proto | 8 +- .../v1/errors/conversion_upload_error.proto | 15 +- .../v1/errors/country_code_error.proto | 5 +- .../googleads/v1/errors/criterion_error.proto | 5 +- .../v1/errors/custom_interest_error.proto | 5 +- .../errors/customer_client_link_error.proto | 5 +- .../googleads/v1/errors/customer_error.proto | 5 +- .../v1/errors/customer_feed_error.proto | 5 +- .../errors/customer_manager_link_error.proto | 5 +- .../googleads/v1/errors/database_error.proto | 5 +- .../ads/googleads/v1/errors/date_error.proto | 5 +- .../v1/errors/date_range_error.proto | 5 +- .../googleads/v1/errors/distinct_error.proto | 5 +- .../ads/googleads/v1/errors/enum_error.proto | 5 +- google/ads/googleads/v1/errors/errors.proto | 83 +- .../v1/errors/extension_feed_item_error.proto | 5 +- .../v1/errors/extension_setting_error.proto | 5 +- .../feed_attribute_reference_error.proto | 5 +- .../ads/googleads/v1/errors/feed_error.proto | 5 +- .../googleads/v1/errors/feed_item_error.proto | 5 +- .../v1/errors/feed_item_target_error.proto | 5 +- .../errors/feed_item_validation_error.proto | 5 +- .../v1/errors/feed_mapping_error.proto | 5 +- .../ads/googleads/v1/errors/field_error.proto | 5 +- .../v1/errors/field_mask_error.proto | 5 +- .../googleads/v1/errors/function_error.proto | 5 +- .../v1/errors/function_parsing_error.proto | 5 +- ...geo_target_constant_suggestion_error.proto | 5 +- .../googleads/v1/errors/header_error.proto | 5 +- google/ads/googleads/v1/errors/id_error.proto | 5 +- .../ads/googleads/v1/errors/image_error.proto | 5 +- .../googleads/v1/errors/internal_error.proto | 9 +- .../errors/keyword_plan_ad_group_error.proto | 5 +- .../errors/keyword_plan_campaign_error.proto | 5 +- .../v1/errors/keyword_plan_error.proto | 5 +- .../v1/errors/keyword_plan_idea_error.proto | 5 +- .../errors/keyword_plan_keyword_error.proto | 5 +- .../keyword_plan_negative_keyword_error.proto | 5 +- .../ads/googleads/v1/errors/label_error.proto | 5 +- .../v1/errors/language_code_error.proto | 5 +- .../v1/errors/list_operation_error.proto | 5 +- .../v1/errors/manager_link_error.proto | 3 +- .../v1/errors/media_bundle_error.proto | 5 +- .../v1/errors/media_file_error.proto | 5 +- .../v1/errors/media_upload_error.proto | 5 +- .../v1/errors/multiplier_error.proto | 5 +- .../googleads/v1/errors/mutate_error.proto | 5 +- .../v1/errors/mutate_job_error.proto | 5 +- .../errors/new_resource_creation_error.proto | 5 +- .../googleads/v1/errors/not_empty_error.proto | 5 +- .../v1/errors/not_whitelisted_error.proto | 3 +- .../ads/googleads/v1/errors/null_error.proto | 5 +- .../operation_access_denied_error.proto | 5 +- .../googleads/v1/errors/operator_error.proto | 5 +- .../v1/errors/partial_failure_error.proto | 5 +- .../v1/errors/policy_finding_error.proto | 5 +- .../policy_validation_parameter_error.proto | 8 +- .../v1/errors/policy_violation_error.proto | 5 +- .../ads/googleads/v1/errors/query_error.proto | 5 +- .../ads/googleads/v1/errors/quota_error.proto | 5 +- .../ads/googleads/v1/errors/range_error.proto | 5 +- .../v1/errors/recommendation_error.proto | 5 +- .../v1/errors/region_code_error.proto | 5 +- .../googleads/v1/errors/request_error.proto | 5 +- .../errors/resource_access_denied_error.proto | 5 +- .../resource_count_limit_exceeded_error.proto | 5 +- .../googleads/v1/errors/setting_error.proto | 11 +- .../v1/errors/shared_criterion_error.proto | 5 +- .../v1/errors/shared_set_error.proto | 5 +- .../v1/errors/size_limit_error.proto | 5 +- .../v1/errors/string_format_error.proto | 5 +- .../v1/errors/string_length_error.proto | 5 +- .../googleads/v1/errors/url_field_error.proto | 5 +- .../googleads/v1/errors/user_list_error.proto | 5 +- .../youtube_video_registration_error.proto | 5 +- google/ads/googleads/v1/googleads_gapic.yaml | 17 + .../v1/googleads_grpc_service_config.json | 118 + google/ads/googleads/v1/googleads_v1.yaml | 444 ++++ .../v1/resources/account_budget.proto | 170 +- .../resources/account_budget_proposal.proto | 131 +- google/ads/googleads/v1/resources/ad.proto | 53 +- .../ads/googleads/v1/resources/ad_group.proto | 81 +- .../googleads/v1/resources/ad_group_ad.proto | 57 +- .../v1/resources/ad_group_ad_label.proto | 39 +- .../v1/resources/ad_group_audience_view.proto | 19 +- .../v1/resources/ad_group_bid_modifier.proto | 79 +- .../v1/resources/ad_group_criterion.proto | 217 +- .../resources/ad_group_criterion_label.proto | 40 +- .../ad_group_criterion_simulation.proto | 56 +- .../ad_group_extension_setting.proto | 43 +- .../v1/resources/ad_group_feed.proto | 46 +- .../v1/resources/ad_group_label.proto | 39 +- .../v1/resources/ad_group_simulation.proto | 74 +- .../googleads/v1/resources/ad_parameter.proto | 35 +- .../v1/resources/ad_schedule_view.proto | 19 +- .../v1/resources/age_range_view.proto | 19 +- google/ads/googleads/v1/resources/asset.proto | 45 +- .../v1/resources/bidding_strategy.proto | 54 +- .../v1/resources/billing_setup.proto | 94 +- .../ads/googleads/v1/resources/campaign.proto | 168 +- .../v1/resources/campaign_audience_view.proto | 20 +- .../v1/resources/campaign_bid_modifier.proto | 38 +- .../v1/resources/campaign_budget.proto | 72 +- .../v1/resources/campaign_criterion.proto | 156 +- .../campaign_criterion_simulation.proto | 57 +- .../v1/resources/campaign_draft.proto | 53 +- .../v1/resources/campaign_experiment.proto | 59 +- .../campaign_extension_setting.proto | 43 +- .../v1/resources/campaign_feed.proto | 46 +- .../v1/resources/campaign_label.proto | 39 +- .../v1/resources/campaign_shared_set.proto | 44 +- .../v1/resources/carrier_constant.proto | 33 +- .../v1/resources/change_status.proto | 147 +- .../googleads/v1/resources/click_view.proto | 40 +- .../v1/resources/conversion_action.proto | 55 +- .../v1/resources/custom_interest.proto | 34 +- .../ads/googleads/v1/resources/customer.proto | 76 +- .../v1/resources/customer_client.proto | 38 +- .../v1/resources/customer_client_link.proto | 33 +- .../customer_extension_setting.proto | 33 +- .../v1/resources/customer_feed.proto | 37 +- .../v1/resources/customer_label.proto | 31 +- .../v1/resources/customer_manager_link.proto | 33 +- .../customer_negative_criterion.proto | 54 +- .../v1/resources/detail_placement_view.proto | 43 +- .../v1/resources/display_keyword_view.proto | 19 +- .../v1/resources/domain_category.proto | 59 +- .../dynamic_search_ads_search_term_view.proto | 38 +- .../expanded_landing_page_view.proto | 26 +- .../v1/resources/extension_feed_item.proto | 67 +- google/ads/googleads/v1/resources/feed.proto | 59 +- .../googleads/v1/resources/feed_item.proto | 122 +- .../v1/resources/feed_item_target.proto | 80 +- .../googleads/v1/resources/feed_mapping.proto | 207 +- .../v1/resources/feed_placeholder_view.proto | 24 +- .../googleads/v1/resources/gender_view.proto | 19 +- .../v1/resources/geo_target_constant.proto | 46 +- .../v1/resources/geographic_view.proto | 36 +- .../v1/resources/google_ads_field.proto | 75 +- .../v1/resources/group_placement_view.proto | 39 +- .../v1/resources/hotel_group_view.proto | 19 +- .../v1/resources/hotel_performance_view.proto | 19 +- .../googleads/v1/resources/keyword_plan.proto | 29 +- .../v1/resources/keyword_plan_ad_group.proto | 29 +- .../v1/resources/keyword_plan_campaign.proto | 40 +- .../v1/resources/keyword_plan_keyword.proto | 32 +- .../keyword_plan_negative_keyword.proto | 33 +- .../googleads/v1/resources/keyword_view.proto | 19 +- google/ads/googleads/v1/resources/label.proto | 29 +- .../v1/resources/landing_page_view.proto | 26 +- .../v1/resources/language_constant.proto | 37 +- .../v1/resources/location_view.proto | 19 +- .../v1/resources/managed_placement_view.proto | 20 +- .../googleads/v1/resources/media_file.proto | 91 +- .../v1/resources/merchant_center_link.proto | 32 +- .../mobile_app_category_constant.proto | 33 +- .../v1/resources/mobile_device_constant.proto | 41 +- .../googleads/v1/resources/mutate_job.proto | 63 +- .../operating_system_version_constant.proto | 49 +- .../paid_organic_search_term_view.proto | 25 +- .../v1/resources/parental_status_view.proto | 19 +- .../v1/resources/payments_account.proto | 45 +- .../product_bidding_category_constant.proto | 56 +- .../v1/resources/product_group_view.proto | 19 +- .../v1/resources/recommendation.proto | 297 +-- .../v1/resources/remarketing_action.proto | 29 +- .../v1/resources/search_term_view.proto | 42 +- .../v1/resources/shared_criterion.proto | 63 +- .../googleads/v1/resources/shared_set.proto | 41 +- .../resources/shopping_performance_view.proto | 19 +- .../v1/resources/topic_constant.proto | 45 +- .../googleads/v1/resources/topic_view.proto | 19 +- .../v1/resources/user_interest.proto | 52 +- .../googleads/v1/resources/user_list.proto | 79 +- google/ads/googleads/v1/resources/video.proto | 37 +- .../account_budget_proposal_service.proto | 37 +- .../v1/services/account_budget_service.proto | 21 +- .../services/ad_group_ad_label_service.proto | 40 +- .../v1/services/ad_group_ad_service.proto | 43 +- .../ad_group_audience_view_service.proto | 21 +- .../ad_group_bid_modifier_service.proto | 41 +- .../ad_group_criterion_label_service.proto | 35 +- .../services/ad_group_criterion_service.proto | 43 +- ...d_group_criterion_simulation_service.proto | 21 +- .../ad_group_extension_setting_service.proto | 35 +- .../v1/services/ad_group_feed_service.proto | 40 +- .../v1/services/ad_group_label_service.proto | 40 +- .../v1/services/ad_group_service.proto | 37 +- .../ad_group_simulation_service.proto | 24 +- .../v1/services/ad_parameter_service.proto | 41 +- .../services/ad_schedule_view_service.proto | 24 +- .../v1/services/age_range_view_service.proto | 24 +- .../googleads/v1/services/asset_service.proto | 40 +- .../services/bidding_strategy_service.proto | 40 +- .../v1/services/billing_setup_service.proto | 37 +- .../campaign_audience_view_service.proto | 24 +- .../campaign_bid_modifier_service.proto | 38 +- .../v1/services/campaign_budget_service.proto | 40 +- .../services/campaign_criterion_service.proto | 40 +- ...ampaign_criterion_simulation_service.proto | 21 +- .../v1/services/campaign_draft_service.proto | 47 +- .../campaign_experiment_service.proto | 74 +- .../campaign_extension_setting_service.proto | 35 +- .../v1/services/campaign_feed_service.proto | 40 +- .../v1/services/campaign_label_service.proto | 40 +- .../v1/services/campaign_service.proto | 40 +- .../campaign_shared_set_service.proto | 41 +- .../services/carrier_constant_service.proto | 24 +- .../v1/services/change_status_service.proto | 24 +- .../v1/services/click_view_service.proto | 24 +- .../services/conversion_action_service.proto | 43 +- ...conversion_adjustment_upload_service.proto | 25 +- .../services/conversion_upload_service.proto | 43 +- .../v1/services/custom_interest_service.proto | 40 +- .../customer_client_link_service.proto | 40 +- .../v1/services/customer_client_service.proto | 24 +- .../customer_extension_setting_service.proto | 34 +- .../v1/services/customer_feed_service.proto | 40 +- .../v1/services/customer_label_service.proto | 40 +- .../customer_manager_link_service.proto | 39 +- .../customer_negative_criterion_service.proto | 34 +- .../v1/services/customer_service.proto | 64 +- .../detail_placement_view_service.proto | 24 +- .../display_keyword_view_service.proto | 24 +- .../v1/services/domain_category_service.proto | 21 +- ..._search_ads_search_term_view_service.proto | 23 +- .../expanded_landing_page_view_service.proto | 22 +- .../extension_feed_item_service.proto | 40 +- .../v1/services/feed_item_service.proto | 40 +- .../services/feed_item_target_service.proto | 40 +- .../v1/services/feed_mapping_service.proto | 40 +- .../feed_placeholder_view_service.proto | 24 +- .../googleads/v1/services/feed_service.proto | 34 +- .../v1/services/gender_view_service.proto | 24 +- .../geo_target_constant_service.proto | 33 +- .../v1/services/geographic_view_service.proto | 24 +- .../services/google_ads_field_service.proto | 38 +- .../v1/services/google_ads_service.proto | 156 +- .../group_placement_view_service.proto | 24 +- .../services/hotel_group_view_service.proto | 24 +- .../hotel_performance_view_service.proto | 24 +- .../keyword_plan_ad_group_service.proto | 40 +- .../keyword_plan_campaign_service.proto | 37 +- .../services/keyword_plan_idea_service.proto | 20 +- .../keyword_plan_keyword_service.proto | 40 +- ...eyword_plan_negative_keyword_service.proto | 36 +- .../v1/services/keyword_plan_service.proto | 71 +- .../v1/services/keyword_view_service.proto | 24 +- .../googleads/v1/services/label_service.proto | 37 +- .../services/landing_page_view_service.proto | 25 +- .../services/language_constant_service.proto | 24 +- .../v1/services/location_view_service.proto | 24 +- .../managed_placement_view_service.proto | 24 +- .../v1/services/media_file_service.proto | 40 +- .../merchant_center_link_service.proto | 58 +- ...mobile_app_category_constant_service.proto | 21 +- .../mobile_device_constant_service.proto | 24 +- .../v1/services/mutate_job_service.proto | 92 +- ...ting_system_version_constant_service.proto | 23 +- ...aid_organic_search_term_view_service.proto | 21 +- .../parental_status_view_service.proto | 24 +- .../services/payments_account_service.proto | 31 +- ...ct_bidding_category_constant_service.proto | 23 +- .../services/product_group_view_service.proto | 24 +- .../v1/services/recommendation_service.proto | 69 +- .../services/remarketing_action_service.proto | 40 +- .../services/search_term_view_service.proto | 24 +- .../services/shared_criterion_service.proto | 40 +- .../v1/services/shared_set_service.proto | 40 +- .../shopping_performance_view_service.proto | 21 +- .../v1/services/topic_constant_service.proto | 24 +- .../v1/services/topic_view_service.proto | 24 +- .../v1/services/user_interest_service.proto | 24 +- .../v1/services/user_list_service.proto | 40 +- .../googleads/v1/services/video_service.proto | 24 +- google/ads/googleads/v2/common/ad_asset.proto | 3 +- .../googleads/v2/common/ad_type_infos.proto | 8 +- .../ads/googleads/v2/common/asset_types.proto | 3 +- google/ads/googleads/v2/common/bidding.proto | 3 +- .../googleads/v2/common/click_location.proto | 3 +- google/ads/googleads/v2/common/criteria.proto | 9 +- .../criterion_category_availability.proto | 3 +- .../v2/common/custom_parameter.proto | 3 +- google/ads/googleads/v2/common/dates.proto | 3 +- .../explorer_auto_optimizer_setting.proto | 3 +- .../ads/googleads/v2/common/extensions.proto | 14 +- .../ads/googleads/v2/common/feed_common.proto | 3 +- .../googleads/v2/common/final_app_url.proto | 3 +- .../googleads/v2/common/frequency_cap.proto | 3 +- .../v2/common/keyword_plan_common.proto | 3 +- .../v2/common/matching_function.proto | 3 +- google/ads/googleads/v2/common/metrics.proto | 9 +- google/ads/googleads/v2/common/policy.proto | 3 +- .../v2/common/real_time_bidding_setting.proto | 3 +- google/ads/googleads/v2/common/segments.proto | 7 +- .../ads/googleads/v2/common/simulation.proto | 3 +- .../ads/googleads/v2/common/tag_snippet.proto | 3 +- .../v2/common/targeting_setting.proto | 3 +- .../ads/googleads/v2/common/text_label.proto | 3 +- .../googleads/v2/common/url_collection.proto | 3 +- .../ads/googleads/v2/common/user_lists.proto | 19 +- google/ads/googleads/v2/common/value.proto | 3 +- .../googleads/v2/enums/access_reason.proto | 3 +- .../ads/googleads/v2/enums/access_role.proto | 3 +- .../account_budget_proposal_status.proto | 3 +- .../enums/account_budget_proposal_type.proto | 3 +- .../v2/enums/account_budget_status.proto | 3 +- .../ad_customizer_placeholder_field.proto | 3 +- .../v2/enums/ad_group_ad_rotation_mode.proto | 3 +- .../v2/enums/ad_group_ad_status.proto | 3 +- .../ad_group_criterion_approval_status.proto | 3 +- .../v2/enums/ad_group_criterion_status.proto | 3 +- .../googleads/v2/enums/ad_group_status.proto | 3 +- .../googleads/v2/enums/ad_group_type.proto | 3 +- .../googleads/v2/enums/ad_network_type.proto | 3 +- .../ad_serving_optimization_status.proto | 3 +- .../ads/googleads/v2/enums/ad_strength.proto | 3 +- google/ads/googleads/v2/enums/ad_type.proto | 3 +- .../enums/advertising_channel_sub_type.proto | 3 +- .../v2/enums/advertising_channel_type.proto | 3 +- ...iate_location_feed_relationship_type.proto | 3 +- ...affiliate_location_placeholder_field.proto | 3 +- .../googleads/v2/enums/age_range_type.proto | 3 +- .../v2/enums/app_campaign_app_store.proto | 3 +- ..._campaign_bidding_strategy_goal_type.proto | 3 +- .../v2/enums/app_payment_model_type.proto | 3 +- .../v2/enums/app_placeholder_field.proto | 3 +- google/ads/googleads/v2/enums/app_store.proto | 3 +- .../enums/app_url_operating_system_type.proto | 3 +- .../googleads/v2/enums/asset_field_type.proto | 3 +- .../v2/enums/asset_performance_label.proto | 3 +- .../ads/googleads/v2/enums/asset_type.proto | 3 +- .../v2/enums/attribution_model.proto | 3 +- .../v2/enums/bid_modifier_source.proto | 3 +- .../googleads/v2/enums/bidding_source.proto | 3 +- .../v2/enums/bidding_strategy_status.proto | 3 +- .../v2/enums/bidding_strategy_type.proto | 3 +- .../v2/enums/billing_setup_status.proto | 3 +- .../v2/enums/brand_safety_suitability.proto | 3 +- .../v2/enums/budget_delivery_method.proto | 3 +- .../googleads/v2/enums/budget_period.proto | 3 +- .../googleads/v2/enums/budget_status.proto | 3 +- .../ads/googleads/v2/enums/budget_type.proto | 3 +- .../call_conversion_reporting_state.proto | 3 +- .../v2/enums/call_placeholder_field.proto | 3 +- .../v2/enums/callout_placeholder_field.proto | 3 +- .../v2/enums/campaign_criterion_status.proto | 3 +- .../v2/enums/campaign_draft_status.proto | 3 +- .../v2/enums/campaign_experiment_status.proto | 3 +- ...mpaign_experiment_traffic_split_type.proto | 3 +- .../v2/enums/campaign_experiment_type.proto | 3 +- .../v2/enums/campaign_serving_status.proto | 3 +- .../v2/enums/campaign_shared_set_status.proto | 3 +- .../googleads/v2/enums/campaign_status.proto | 3 +- .../v2/enums/change_status_operation.proto | 3 +- .../enums/change_status_resource_type.proto | 3 +- .../ads/googleads/v2/enums/click_type.proto | 3 +- .../v2/enums/content_label_type.proto | 3 +- .../v2/enums/conversion_action_category.proto | 3 +- .../conversion_action_counting_type.proto | 3 +- .../v2/enums/conversion_action_status.proto | 3 +- .../v2/enums/conversion_action_type.proto | 3 +- .../v2/enums/conversion_adjustment_type.proto | 3 +- .../conversion_attribution_event_type.proto | 3 +- .../v2/enums/conversion_lag_bucket.proto | 3 +- .../conversion_or_adjustment_lag_bucket.proto | 3 +- ...n_category_channel_availability_mode.proto | 3 +- ...on_category_locale_availability_mode.proto | 3 +- .../criterion_system_serving_status.proto | 3 +- .../googleads/v2/enums/criterion_type.proto | 3 +- .../enums/custom_interest_member_type.proto | 3 +- .../v2/enums/custom_interest_status.proto | 3 +- .../v2/enums/custom_interest_type.proto | 3 +- .../v2/enums/custom_placeholder_field.proto | 3 +- .../customer_match_upload_key_type.proto | 3 +- ...onversion_eligibility_failure_reason.proto | 3 +- .../v2/enums/data_driven_model_status.proto | 3 +- .../ads/googleads/v2/enums/day_of_week.proto | 3 +- google/ads/googleads/v2/enums/device.proto | 3 +- .../v2/enums/display_ad_format_setting.proto | 3 +- .../enums/display_upload_product_type.proto | 3 +- .../googleads/v2/enums/distance_bucket.proto | 3 +- .../enums/dsa_page_feed_criterion_field.proto | 3 +- .../enums/education_placeholder_field.proto | 3 +- .../v2/enums/extension_setting_device.proto | 3 +- .../googleads/v2/enums/extension_type.proto | 6 +- .../v2/enums/external_conversion_source.proto | 3 +- .../v2/enums/feed_attribute_type.proto | 3 +- .../feed_item_quality_approval_status.proto | 3 +- ...feed_item_quality_disapproval_reason.proto | 3 +- .../googleads/v2/enums/feed_item_status.proto | 3 +- .../v2/enums/feed_item_target_device.proto | 3 +- .../v2/enums/feed_item_target_type.proto | 3 +- .../enums/feed_item_validation_status.proto | 3 +- .../googleads/v2/enums/feed_link_status.proto | 3 +- .../enums/feed_mapping_criterion_type.proto | 3 +- .../v2/enums/feed_mapping_status.proto | 3 +- .../ads/googleads/v2/enums/feed_origin.proto | 3 +- .../ads/googleads/v2/enums/feed_status.proto | 3 +- .../v2/enums/flight_placeholder_field.proto | 3 +- .../v2/enums/frequency_cap_event_type.proto | 3 +- .../v2/enums/frequency_cap_level.proto | 3 +- .../v2/enums/frequency_cap_time_unit.proto | 3 +- .../ads/googleads/v2/enums/gender_type.proto | 3 +- .../v2/enums/geo_target_constant_status.proto | 3 +- .../v2/enums/geo_targeting_restriction.proto | 3 +- .../v2/enums/geo_targeting_type.proto | 3 +- .../v2/enums/google_ads_field_category.proto | 3 +- .../v2/enums/google_ads_field_data_type.proto | 3 +- .../v2/enums/hotel_date_selection_type.proto | 3 +- .../v2/enums/hotel_placeholder_field.proto | 3 +- .../v2/enums/hotel_price_bucket.proto | 52 + .../googleads/v2/enums/hotel_rate_type.proto | 3 +- .../v2/enums/income_range_type.proto | 3 +- .../v2/enums/interaction_event_type.proto | 3 +- .../googleads/v2/enums/interaction_type.proto | 3 +- .../ads/googleads/v2/enums/invoice_type.proto | 50 + .../v2/enums/job_placeholder_field.proto | 3 +- .../v2/enums/keyword_match_type.proto | 3 +- .../keyword_plan_competition_level.proto | 3 +- .../keyword_plan_forecast_interval.proto | 3 +- .../v2/enums/keyword_plan_network.proto | 3 +- .../ads/googleads/v2/enums/label_status.proto | 3 +- .../legacy_app_install_ad_app_store.proto | 3 +- .../listing_custom_attribute_index.proto | 3 +- .../v2/enums/listing_group_type.proto | 3 +- .../v2/enums/local_placeholder_field.proto | 3 +- ..._extension_targeting_criterion_field.proto | 3 +- .../enums/location_group_radius_units.proto | 3 +- .../v2/enums/location_placeholder_field.proto | 3 +- .../v2/enums/manager_link_status.proto | 3 +- .../matching_function_context_type.proto | 3 +- .../v2/enums/matching_function_operator.proto | 3 +- .../ads/googleads/v2/enums/media_type.proto | 3 +- .../enums/merchant_center_link_status.proto | 3 +- .../v2/enums/message_placeholder_field.proto | 3 +- google/ads/googleads/v2/enums/mime_type.proto | 3 +- .../googleads/v2/enums/minute_of_hour.proto | 3 +- .../v2/enums/mobile_device_type.proto | 3 +- .../googleads/v2/enums/month_of_year.proto | 3 +- .../v2/enums/mutate_job_status.proto | 3 +- .../v2/enums/negative_geo_target_type.proto | 3 +- ...erating_system_version_operator_type.proto | 3 +- .../page_one_promoted_strategy_goal.proto | 3 +- .../v2/enums/parental_status_type.proto | 3 +- .../ads/googleads/v2/enums/payment_mode.proto | 3 +- .../googleads/v2/enums/placeholder_type.proto | 3 +- .../googleads/v2/enums/placement_type.proto | 3 +- .../v2/enums/policy_approval_status.proto | 3 +- .../v2/enums/policy_review_status.proto | 7 +- .../v2/enums/policy_topic_entry_type.proto | 3 +- ...idence_destination_mismatch_url_type.proto | 3 +- ...dence_destination_not_working_device.proto | 3 +- ...stination_not_working_dns_error_type.proto | 3 +- .../v2/enums/positive_geo_target_type.proto | 3 +- .../v2/enums/preferred_content_type.proto | 3 +- .../price_extension_price_qualifier.proto | 3 +- .../v2/enums/price_extension_price_unit.proto | 3 +- .../v2/enums/price_extension_type.proto | 3 +- .../v2/enums/price_placeholder_field.proto | 3 +- .../product_bidding_category_level.proto | 3 +- .../product_bidding_category_status.proto | 3 +- .../googleads/v2/enums/product_channel.proto | 3 +- .../enums/product_channel_exclusivity.proto | 3 +- .../v2/enums/product_condition.proto | 3 +- .../v2/enums/product_type_level.proto | 3 +- ...romotion_extension_discount_modifier.proto | 3 +- .../enums/promotion_extension_occasion.proto | 3 +- .../enums/promotion_placeholder_field.proto | 3 +- .../v2/enums/proximity_radius_units.proto | 3 +- .../v2/enums/quality_score_bucket.proto | 3 +- .../v2/enums/reach_plan_ad_length.proto | 53 + .../v2/enums/reach_plan_age_range.proto | 122 + .../enums/real_estate_placeholder_field.proto | 3 +- .../v2/enums/recommendation_type.proto | 3 +- .../search_engine_results_page_type.proto | 3 +- .../v2/enums/search_term_match_type.proto | 3 +- .../enums/search_term_targeting_status.proto | 3 +- .../v2/enums/served_asset_field_type.proto | 3 +- .../v2/enums/shared_set_status.proto | 3 +- .../googleads/v2/enums/shared_set_type.proto | 3 +- .../simulation_modification_method.proto | 3 +- .../googleads/v2/enums/simulation_type.proto | 3 +- .../v2/enums/sitelink_placeholder_field.proto | 3 +- google/ads/googleads/v2/enums/slot.proto | 3 +- .../v2/enums/spending_limit_type.proto | 3 +- ...structured_snippet_placeholder_field.proto | 3 +- .../enums/system_managed_entity_source.proto | 3 +- ...arget_cpa_opt_in_recommendation_goal.proto | 3 +- .../target_impression_share_location.proto | 3 +- .../v2/enums/targeting_dimension.proto | 3 +- google/ads/googleads/v2/enums/time_type.proto | 3 +- .../v2/enums/tracking_code_page_format.proto | 3 +- .../v2/enums/tracking_code_type.proto | 3 +- .../v2/enums/travel_placeholder_field.proto | 3 +- .../enums/user_interest_taxonomy_type.proto | 3 +- .../v2/enums/user_list_access_status.proto | 3 +- .../v2/enums/user_list_closing_reason.proto | 3 +- .../user_list_combined_rule_operator.proto | 3 +- .../user_list_crm_data_source_type.proto | 3 +- .../user_list_date_rule_item_operator.proto | 3 +- .../user_list_logical_rule_operator.proto | 3 +- .../enums/user_list_membership_status.proto | 3 +- .../user_list_number_rule_item_operator.proto | 3 +- .../user_list_prepopulation_status.proto | 3 +- .../v2/enums/user_list_rule_type.proto | 3 +- .../v2/enums/user_list_size_range.proto | 3 +- .../user_list_string_rule_item_operator.proto | 3 +- .../googleads/v2/enums/user_list_type.proto | 3 +- .../vanity_pharma_display_url_mode.proto | 3 +- .../v2/enums/vanity_pharma_text.proto | 3 +- .../v2/enums/webpage_condition_operand.proto | 3 +- .../v2/enums/webpage_condition_operator.proto | 3 +- .../v2/errors/access_invitation_error.proto | 3 +- .../account_budget_proposal_error.proto | 3 +- .../v2/errors/ad_customizer_error.proto | 3 +- google/ads/googleads/v2/errors/ad_error.proto | 3 +- .../v2/errors/ad_group_ad_error.proto | 3 +- .../errors/ad_group_bid_modifier_error.proto | 3 +- .../v2/errors/ad_group_criterion_error.proto | 3 +- .../googleads/v2/errors/ad_group_error.proto | 3 +- .../v2/errors/ad_group_feed_error.proto | 3 +- .../v2/errors/ad_parameter_error.proto | 3 +- .../v2/errors/ad_sharing_error.proto | 3 +- .../ads/googleads/v2/errors/adx_error.proto | 3 +- .../ads/googleads/v2/errors/asset_error.proto | 3 +- .../v2/errors/authentication_error.proto | 3 +- .../v2/errors/authorization_error.proto | 7 +- .../googleads/v2/errors/bidding_error.proto | 3 +- .../v2/errors/bidding_strategy_error.proto | 3 +- .../v2/errors/billing_setup_error.proto | 45 +- .../v2/errors/campaign_budget_error.proto | 3 +- .../v2/errors/campaign_criterion_error.proto | 3 +- .../v2/errors/campaign_draft_error.proto | 3 +- .../googleads/v2/errors/campaign_error.proto | 9 +- .../v2/errors/campaign_experiment_error.proto | 3 +- .../v2/errors/campaign_feed_error.proto | 3 +- .../v2/errors/campaign_shared_set_error.proto | 3 +- .../v2/errors/change_status_error.proto | 3 +- .../v2/errors/collection_size_error.proto | 3 +- .../googleads/v2/errors/context_error.proto | 3 +- .../v2/errors/conversion_action_error.proto | 3 +- .../conversion_adjustment_upload_error.proto | 3 +- .../v2/errors/conversion_upload_error.proto | 7 +- .../v2/errors/country_code_error.proto | 3 +- .../googleads/v2/errors/criterion_error.proto | 3 +- .../v2/errors/currency_code_error.proto | 3 +- .../v2/errors/custom_interest_error.proto | 3 +- .../errors/customer_client_link_error.proto | 3 +- .../googleads/v2/errors/customer_error.proto | 3 +- .../v2/errors/customer_feed_error.proto | 3 +- .../errors/customer_manager_link_error.proto | 3 +- .../googleads/v2/errors/database_error.proto | 3 +- .../ads/googleads/v2/errors/date_error.proto | 3 +- .../v2/errors/date_range_error.proto | 3 +- .../googleads/v2/errors/distinct_error.proto | 3 +- .../ads/googleads/v2/errors/enum_error.proto | 3 +- google/ads/googleads/v2/errors/errors.proto | 11 +- .../v2/errors/extension_feed_item_error.proto | 3 +- .../v2/errors/extension_setting_error.proto | 3 +- .../feed_attribute_reference_error.proto | 3 +- .../ads/googleads/v2/errors/feed_error.proto | 3 +- .../googleads/v2/errors/feed_item_error.proto | 3 +- .../v2/errors/feed_item_target_error.proto | 3 +- .../errors/feed_item_validation_error.proto | 9 +- .../v2/errors/feed_mapping_error.proto | 3 +- .../ads/googleads/v2/errors/field_error.proto | 3 +- .../v2/errors/field_mask_error.proto | 3 +- .../googleads/v2/errors/function_error.proto | 3 +- .../v2/errors/function_parsing_error.proto | 3 +- ...geo_target_constant_suggestion_error.proto | 3 +- .../googleads/v2/errors/header_error.proto | 3 +- google/ads/googleads/v2/errors/id_error.proto | 3 +- .../ads/googleads/v2/errors/image_error.proto | 3 +- .../googleads/v2/errors/internal_error.proto | 7 +- .../googleads/v2/errors/invoice_error.proto | 50 + .../errors/keyword_plan_ad_group_error.proto | 3 +- .../errors/keyword_plan_campaign_error.proto | 3 +- .../v2/errors/keyword_plan_error.proto | 3 +- .../v2/errors/keyword_plan_idea_error.proto | 3 +- .../errors/keyword_plan_keyword_error.proto | 3 +- .../keyword_plan_negative_keyword_error.proto | 3 +- .../ads/googleads/v2/errors/label_error.proto | 3 +- .../v2/errors/language_code_error.proto | 3 +- .../v2/errors/list_operation_error.proto | 3 +- .../v2/errors/manager_link_error.proto | 3 +- .../v2/errors/media_bundle_error.proto | 3 +- .../v2/errors/media_file_error.proto | 3 +- .../v2/errors/media_upload_error.proto | 3 +- .../v2/errors/multiplier_error.proto | 3 +- .../googleads/v2/errors/mutate_error.proto | 3 +- .../v2/errors/mutate_job_error.proto | 3 +- .../errors/new_resource_creation_error.proto | 3 +- .../googleads/v2/errors/not_empty_error.proto | 3 +- .../v2/errors/not_whitelisted_error.proto | 3 +- .../ads/googleads/v2/errors/null_error.proto | 3 +- .../operation_access_denied_error.proto | 3 +- .../googleads/v2/errors/operator_error.proto | 3 +- .../v2/errors/partial_failure_error.proto | 3 +- .../v2/errors/policy_finding_error.proto | 3 +- .../policy_validation_parameter_error.proto | 3 +- .../v2/errors/policy_violation_error.proto | 3 +- .../ads/googleads/v2/errors/query_error.proto | 3 +- .../ads/googleads/v2/errors/quota_error.proto | 3 +- .../ads/googleads/v2/errors/range_error.proto | 3 +- .../v2/errors/reach_plan_error.proto | 45 + .../v2/errors/recommendation_error.proto | 3 +- .../v2/errors/region_code_error.proto | 3 +- .../googleads/v2/errors/request_error.proto | 3 +- .../errors/resource_access_denied_error.proto | 3 +- .../resource_count_limit_exceeded_error.proto | 3 +- .../googleads/v2/errors/setting_error.proto | 3 +- .../v2/errors/shared_criterion_error.proto | 3 +- .../v2/errors/shared_set_error.proto | 3 +- .../v2/errors/size_limit_error.proto | 3 +- .../v2/errors/string_format_error.proto | 3 +- .../v2/errors/string_length_error.proto | 3 +- .../googleads/v2/errors/url_field_error.proto | 3 +- .../googleads/v2/errors/user_list_error.proto | 3 +- .../youtube_video_registration_error.proto | 3 +- google/ads/googleads/v2/googleads_gapic.yaml | 17 + .../v2/googleads_grpc_service_config.json | 124 ++ google/ads/googleads/v2/googleads_v2.yaml | 449 ++++ .../v2/resources/account_budget.proto | 159 +- .../resources/account_budget_proposal.proto | 121 +- google/ads/googleads/v2/resources/ad.proto | 46 +- .../ads/googleads/v2/resources/ad_group.proto | 76 +- .../googleads/v2/resources/ad_group_ad.proto | 52 +- .../v2/resources/ad_group_ad_asset_view.proto | 61 +- .../v2/resources/ad_group_ad_label.proto | 37 +- .../v2/resources/ad_group_audience_view.proto | 19 +- .../v2/resources/ad_group_bid_modifier.proto | 73 +- .../v2/resources/ad_group_criterion.proto | 198 +- .../resources/ad_group_criterion_label.proto | 37 +- .../ad_group_criterion_simulation.proto | 53 +- .../ad_group_extension_setting.proto | 36 +- .../v2/resources/ad_group_feed.proto | 41 +- .../v2/resources/ad_group_label.proto | 37 +- .../v2/resources/ad_group_simulation.proto | 67 +- .../googleads/v2/resources/ad_parameter.proto | 32 +- .../v2/resources/ad_schedule_view.proto | 19 +- .../v2/resources/age_range_view.proto | 19 +- google/ads/googleads/v2/resources/asset.proto | 43 +- .../v2/resources/bidding_strategy.proto | 39 +- .../v2/resources/billing_setup.proto | 91 +- .../ads/googleads/v2/resources/campaign.proto | 170 +- .../v2/resources/campaign_audience_view.proto | 19 +- .../v2/resources/campaign_bid_modifier.proto | 36 +- .../v2/resources/campaign_budget.proto | 63 +- .../v2/resources/campaign_criterion.proto | 151 +- .../campaign_criterion_simulation.proto | 53 +- .../v2/resources/campaign_draft.proto | 53 +- .../v2/resources/campaign_experiment.proto | 59 +- .../campaign_extension_setting.proto | 36 +- .../v2/resources/campaign_feed.proto | 41 +- .../v2/resources/campaign_label.proto | 37 +- .../v2/resources/campaign_shared_set.proto | 41 +- .../v2/resources/carrier_constant.proto | 31 +- .../v2/resources/change_status.proto | 143 +- .../googleads/v2/resources/click_view.proto | 47 +- .../v2/resources/conversion_action.proto | 39 +- .../v2/resources/custom_interest.proto | 23 +- .../ads/googleads/v2/resources/customer.proto | 71 +- .../v2/resources/customer_client.proto | 50 +- .../v2/resources/customer_client_link.proto | 27 +- .../customer_extension_setting.proto | 27 +- .../v2/resources/customer_feed.proto | 32 +- .../v2/resources/customer_label.proto | 29 +- .../v2/resources/customer_manager_link.proto | 31 +- .../customer_negative_criterion.proto | 51 +- .../v2/resources/detail_placement_view.proto | 39 +- .../v2/resources/display_keyword_view.proto | 19 +- .../v2/resources/distance_view.proto | 37 +- .../v2/resources/domain_category.proto | 56 +- .../dynamic_search_ads_search_term_view.proto | 35 +- .../expanded_landing_page_view.proto | 23 +- .../v2/resources/extension_feed_item.proto | 53 +- google/ads/googleads/v2/resources/feed.proto | 51 +- .../googleads/v2/resources/feed_item.proto | 100 +- .../v2/resources/feed_item_target.proto | 75 +- .../googleads/v2/resources/feed_mapping.proto | 140 +- .../v2/resources/feed_placeholder_view.proto | 23 +- .../googleads/v2/resources/gender_view.proto | 19 +- .../v2/resources/geo_target_constant.proto | 43 +- .../v2/resources/geographic_view.proto | 27 +- .../v2/resources/google_ads_field.proto | 71 +- .../v2/resources/group_placement_view.proto | 35 +- .../v2/resources/hotel_group_view.proto | 19 +- .../v2/resources/hotel_performance_view.proto | 19 +- .../ads/googleads/v2/resources/invoice.proto | 184 ++ .../googleads/v2/resources/keyword_plan.proto | 23 +- .../v2/resources/keyword_plan_ad_group.proto | 27 +- .../v2/resources/keyword_plan_campaign.proto | 35 +- .../v2/resources/keyword_plan_keyword.proto | 27 +- .../keyword_plan_negative_keyword.proto | 27 +- .../googleads/v2/resources/keyword_view.proto | 19 +- google/ads/googleads/v2/resources/label.proto | 27 +- .../v2/resources/landing_page_view.proto | 23 +- .../v2/resources/language_constant.proto | 35 +- .../v2/resources/location_view.proto | 19 +- .../v2/resources/managed_placement_view.proto | 19 +- .../googleads/v2/resources/media_file.proto | 87 +- .../v2/resources/merchant_center_link.proto | 27 +- .../mobile_app_category_constant.proto | 31 +- .../v2/resources/mobile_device_constant.proto | 39 +- .../googleads/v2/resources/mutate_job.proto | 61 +- .../operating_system_version_constant.proto | 39 +- .../paid_organic_search_term_view.proto | 23 +- .../v2/resources/parental_status_view.proto | 19 +- .../v2/resources/payments_account.proto | 43 +- .../product_bidding_category_constant.proto | 52 +- .../v2/resources/product_group_view.proto | 19 +- .../v2/resources/recommendation.proto | 288 +-- .../v2/resources/remarketing_action.proto | 27 +- .../v2/resources/search_term_view.proto | 36 +- .../v2/resources/shared_criterion.proto | 60 +- .../googleads/v2/resources/shared_set.proto | 39 +- .../resources/shopping_performance_view.proto | 19 +- .../v2/resources/topic_constant.proto | 36 +- .../googleads/v2/resources/topic_view.proto | 19 +- .../v2/resources/user_interest.proto | 48 +- .../googleads/v2/resources/user_list.proto | 59 +- .../v2/resources/user_location_view.proto | 31 +- google/ads/googleads/v2/resources/video.proto | 35 +- .../account_budget_proposal_service.proto | 26 +- .../v2/services/account_budget_service.proto | 15 +- .../ad_group_ad_asset_view_service.proto | 15 +- .../services/ad_group_ad_label_service.proto | 26 +- .../v2/services/ad_group_ad_service.proto | 26 +- .../ad_group_audience_view_service.proto | 15 +- .../ad_group_bid_modifier_service.proto | 26 +- .../ad_group_criterion_label_service.proto | 26 +- .../services/ad_group_criterion_service.proto | 26 +- ...d_group_criterion_simulation_service.proto | 15 +- .../ad_group_extension_setting_service.proto | 26 +- .../v2/services/ad_group_feed_service.proto | 26 +- .../v2/services/ad_group_label_service.proto | 26 +- .../v2/services/ad_group_service.proto | 26 +- .../ad_group_simulation_service.proto | 15 +- .../v2/services/ad_parameter_service.proto | 26 +- .../services/ad_schedule_view_service.proto | 15 +- .../googleads/v2/services/ad_service.proto | 26 +- .../v2/services/age_range_view_service.proto | 15 +- .../googleads/v2/services/asset_service.proto | 28 +- .../services/bidding_strategy_service.proto | 26 +- .../v2/services/billing_setup_service.proto | 28 +- .../campaign_audience_view_service.proto | 15 +- .../campaign_bid_modifier_service.proto | 26 +- .../v2/services/campaign_budget_service.proto | 26 +- .../services/campaign_criterion_service.proto | 26 +- ...ampaign_criterion_simulation_service.proto | 15 +- .../v2/services/campaign_draft_service.proto | 45 +- .../campaign_experiment_service.proto | 72 +- .../campaign_extension_setting_service.proto | 26 +- .../v2/services/campaign_feed_service.proto | 26 +- .../v2/services/campaign_label_service.proto | 26 +- .../v2/services/campaign_service.proto | 26 +- .../campaign_shared_set_service.proto | 26 +- .../services/carrier_constant_service.proto | 15 +- .../v2/services/change_status_service.proto | 15 +- .../v2/services/click_view_service.proto | 15 +- .../services/conversion_action_service.proto | 26 +- ...conversion_adjustment_upload_service.proto | 15 +- .../services/conversion_upload_service.proto | 24 +- .../v2/services/custom_interest_service.proto | 26 +- .../customer_client_link_service.proto | 26 +- .../v2/services/customer_client_service.proto | 15 +- .../customer_extension_setting_service.proto | 26 +- .../v2/services/customer_feed_service.proto | 26 +- .../v2/services/customer_label_service.proto | 26 +- .../customer_manager_link_service.proto | 26 +- .../customer_negative_criterion_service.proto | 26 +- .../v2/services/customer_service.proto | 35 +- .../detail_placement_view_service.proto | 15 +- .../display_keyword_view_service.proto | 15 +- .../v2/services/distance_view_service.proto | 15 +- .../v2/services/domain_category_service.proto | 15 +- ..._search_ads_search_term_view_service.proto | 15 +- .../expanded_landing_page_view_service.proto | 15 +- .../extension_feed_item_service.proto | 26 +- .../v2/services/feed_item_service.proto | 26 +- .../services/feed_item_target_service.proto | 24 +- .../v2/services/feed_mapping_service.proto | 26 +- .../feed_placeholder_view_service.proto | 15 +- .../googleads/v2/services/feed_service.proto | 26 +- .../v2/services/gender_view_service.proto | 15 +- .../geo_target_constant_service.proto | 17 +- .../v2/services/geographic_view_service.proto | 15 +- .../services/google_ads_field_service.proto | 20 +- .../v2/services/google_ads_service.proto | 24 +- .../group_placement_view_service.proto | 15 +- .../services/hotel_group_view_service.proto | 15 +- .../hotel_performance_view_service.proto | 15 +- .../v2/services/invoice_service.proto | 72 + .../keyword_plan_ad_group_service.proto | 26 +- .../keyword_plan_campaign_service.proto | 26 +- .../services/keyword_plan_idea_service.proto | 8 +- .../keyword_plan_keyword_service.proto | 26 +- ...eyword_plan_negative_keyword_service.proto | 26 +- .../v2/services/keyword_plan_service.proto | 36 +- .../v2/services/keyword_view_service.proto | 15 +- .../googleads/v2/services/label_service.proto | 27 +- .../services/landing_page_view_service.proto | 15 +- .../services/language_constant_service.proto | 15 +- .../v2/services/location_view_service.proto | 15 +- .../managed_placement_view_service.proto | 15 +- .../v2/services/media_file_service.proto | 27 +- .../merchant_center_link_service.proto | 33 +- ...mobile_app_category_constant_service.proto | 15 +- .../mobile_device_constant_service.proto | 15 +- .../v2/services/mutate_job_service.proto | 61 +- ...ting_system_version_constant_service.proto | 15 +- ...aid_organic_search_term_view_service.proto | 15 +- .../parental_status_view_service.proto | 15 +- .../services/payments_account_service.proto | 19 +- ...ct_bidding_category_constant_service.proto | 15 +- .../services/product_group_view_service.proto | 15 +- .../v2/services/reach_plan_service.proto | 357 +++ .../v2/services/recommendation_service.proto | 35 +- .../services/remarketing_action_service.proto | 27 +- .../services/search_term_view_service.proto | 15 +- .../services/shared_criterion_service.proto | 27 +- .../v2/services/shared_set_service.proto | 27 +- .../shopping_performance_view_service.proto | 15 +- .../v2/services/topic_constant_service.proto | 15 +- .../v2/services/topic_view_service.proto | 15 +- .../v2/services/user_interest_service.proto | 15 +- .../v2/services/user_list_service.proto | 27 +- .../services/user_location_view_service.proto | 15 +- .../googleads/v2/services/video_service.proto | 15 +- google/ads/googleads/v3/common/ad_asset.proto | 62 + .../googleads/v3/common/ad_type_infos.proto | 597 +++++ .../ads/googleads/v3/common/asset_types.proto | 81 + google/ads/googleads/v3/common/bidding.proto | 169 ++ .../googleads/v3/common/click_location.proto | 49 + google/ads/googleads/v3/common/criteria.proto | 593 +++++ .../criterion_category_availability.proto | 83 + .../v3/common/custom_parameter.proto | 41 + google/ads/googleads/v3/common/dates.proto | 40 + .../explorer_auto_optimizer_setting.proto | 39 + .../ads/googleads/v3/common/extensions.proto | 357 +++ .../ads/googleads/v3/common/feed_common.proto | 40 + .../googleads/v3/common/final_app_url.proto | 47 + .../googleads/v3/common/frequency_cap.proto | 62 + .../v3/common/keyword_plan_common.proto | 45 + .../v3/common/matching_function.proto | 127 ++ google/ads/googleads/v3/common/metrics.proto | 533 +++++ .../v3/common/offline_user_data.proto | 191 ++ google/ads/googleads/v3/common/policy.proto | 223 ++ .../v3/common/real_time_bidding_setting.proto | 38 + google/ads/googleads/v3/common/segments.proto | 313 +++ .../ads/googleads/v3/common/simulation.proto | 172 ++ .../ads/googleads/v3/common/tag_snippet.proto | 51 + .../v3/common/targeting_setting.proto | 86 + .../ads/googleads/v3/common/text_label.proto | 41 + .../googleads/v3/common/url_collection.proto | 46 + .../ads/googleads/v3/common/user_lists.proto | 292 +++ google/ads/googleads/v3/common/value.proto | 51 + .../googleads/v3/enums/access_reason.proto | 57 + .../ads/googleads/v3/enums/access_role.proto | 51 + .../account_budget_proposal_status.proto | 63 + .../enums/account_budget_proposal_type.proto | 56 + .../v3/enums/account_budget_status.proto | 53 + .../ad_customizer_placeholder_field.proto | 56 + .../v3/enums/ad_group_ad_rotation_mode.proto | 53 + .../v3/enums/ad_group_ad_status.proto | 55 + .../ad_group_criterion_approval_status.proto | 56 + .../v3/enums/ad_group_criterion_status.proto | 55 + .../googleads/v3/enums/ad_group_status.proto | 55 + .../googleads/v3/enums/ad_group_type.proto | 90 + .../googleads/v3/enums/ad_network_type.proto | 62 + .../ad_serving_optimization_status.proto | 64 + .../ads/googleads/v3/enums/ad_strength.proto | 62 + google/ads/googleads/v3/enums/ad_type.proto | 107 + .../enums/advertising_channel_sub_type.proto | 87 + .../v3/enums/advertising_channel_type.proto | 64 + ...iate_location_feed_relationship_type.proto | 48 + ...affiliate_location_placeholder_field.proto | 77 + .../googleads/v3/enums/age_range_type.proto | 65 + .../v3/enums/app_campaign_app_store.proto | 50 + ..._campaign_bidding_strategy_goal_type.proto | 64 + .../v3/enums/app_payment_model_type.proto | 47 + .../v3/enums/app_placeholder_field.proto | 75 + google/ads/googleads/v3/enums/app_store.proto | 50 + .../enums/app_url_operating_system_type.proto | 50 + .../googleads/v3/enums/asset_field_type.proto | 62 + .../v3/enums/asset_performance_label.proto | 62 + .../ads/googleads/v3/enums/asset_type.proto | 56 + .../v3/enums/attribution_model.proto | 72 + .../v3/enums/bid_modifier_source.proto | 51 + .../googleads/v3/enums/bidding_source.proto | 55 + .../v3/enums/bidding_strategy_status.proto | 52 + .../v3/enums/bidding_strategy_type.proto | 110 + .../v3/enums/billing_setup_status.proto | 58 + .../v3/enums/brand_safety_suitability.proto | 73 + .../v3/enums/budget_delivery_method.proto | 53 + .../googleads/v3/enums/budget_period.proto | 47 + .../googleads/v3/enums/budget_status.proto | 50 + .../ads/googleads/v3/enums/budget_type.proto | 66 + .../call_conversion_reporting_state.proto | 56 + .../v3/enums/call_placeholder_field.proto | 66 + .../v3/enums/callout_placeholder_field.proto | 47 + .../v3/enums/campaign_criterion_status.proto | 55 + .../v3/enums/campaign_draft_status.proto | 65 + .../v3/enums/campaign_experiment_status.proto | 77 + ...mpaign_experiment_traffic_split_type.proto | 53 + .../v3/enums/campaign_experiment_type.proto | 59 + .../v3/enums/campaign_serving_status.proto | 61 + .../v3/enums/campaign_shared_set_status.proto | 50 + .../googleads/v3/enums/campaign_status.proto | 53 + .../v3/enums/change_status_operation.proto | 54 + .../enums/change_status_resource_type.proto | 76 + .../ads/googleads/v3/enums/click_type.proto | 203 ++ .../v3/enums/content_label_type.proto | 89 + .../v3/enums/conversion_action_category.proto | 106 + .../conversion_action_counting_type.proto | 52 + .../v3/enums/conversion_action_status.proto | 54 + .../v3/enums/conversion_action_type.proto | 73 + .../v3/enums/conversion_adjustment_type.proto | 52 + .../conversion_attribution_event_type.proto | 48 + .../v3/enums/conversion_lag_bucket.proto | 117 + .../conversion_or_adjustment_lag_bucket.proto | 206 ++ ...n_category_channel_availability_mode.proto | 58 + ...on_category_locale_availability_mode.proto | 61 + .../criterion_system_serving_status.proto | 50 + .../googleads/v3/enums/criterion_type.proto | 134 ++ .../enums/custom_interest_member_type.proto | 50 + .../v3/enums/custom_interest_status.proto | 51 + .../v3/enums/custom_interest_type.proto | 50 + .../v3/enums/custom_placeholder_field.proto | 129 ++ .../customer_match_upload_key_type.proto | 53 + ...onversion_eligibility_failure_reason.proto | 68 + .../v3/enums/data_driven_model_status.proto | 62 + .../ads/googleads/v3/enums/day_of_week.proto | 65 + google/ads/googleads/v3/enums/device.proto | 59 + .../v3/enums/display_ad_format_setting.proto | 54 + .../enums/display_upload_product_type.proto | 97 + .../googleads/v3/enums/distance_bucket.proto | 127 ++ .../enums/dsa_page_feed_criterion_field.proto | 51 + .../enums/education_placeholder_field.proto | 111 + .../v3/enums/extension_setting_device.proto | 52 + .../googleads/v3/enums/extension_type.proto | 81 + .../v3/enums/external_conversion_source.proto | 130 ++ .../v3/enums/feed_attribute_type.proto | 83 + .../feed_item_quality_approval_status.proto | 52 + ...feed_item_quality_disapproval_reason.proto | 99 + .../googleads/v3/enums/feed_item_status.proto | 50 + .../v3/enums/feed_item_target_device.proto | 48 + .../v3/enums/feed_item_target_status.proto | 50 + .../v3/enums/feed_item_target_type.proto | 53 + .../enums/feed_item_validation_status.proto | 53 + .../googleads/v3/enums/feed_link_status.proto | 50 + .../enums/feed_mapping_criterion_type.proto | 50 + .../v3/enums/feed_mapping_status.proto | 50 + .../ads/googleads/v3/enums/feed_origin.proto | 53 + .../ads/googleads/v3/enums/feed_status.proto | 50 + .../v3/enums/flight_placeholder_field.proto | 118 + .../v3/enums/frequency_cap_event_type.proto | 50 + .../v3/enums/frequency_cap_level.proto | 54 + .../v3/enums/frequency_cap_time_unit.proto | 53 + .../ads/googleads/v3/enums/gender_type.proto | 53 + .../v3/enums/geo_target_constant_status.proto | 52 + .../v3/enums/geo_targeting_restriction.proto | 49 + .../v3/enums/geo_targeting_type.proto | 50 + .../v3/enums/google_ads_field_category.proto | 61 + .../v3/enums/google_ads_field_data_type.proto | 102 + .../v3/enums/hotel_date_selection_type.proto | 50 + .../v3/enums/hotel_placeholder_field.proto | 124 ++ .../v3/enums/hotel_price_bucket.proto | 52 + .../googleads/v3/enums/hotel_rate_type.proto | 62 + .../v3/enums/income_range_type.proto | 65 + .../v3/enums/interaction_event_type.proto | 62 + .../googleads/v3/enums/interaction_type.proto | 47 + .../ads/googleads/v3/enums/invoice_type.proto | 50 + .../v3/enums/job_placeholder_field.proto | 115 + .../v3/enums/keyword_match_type.proto | 53 + .../keyword_plan_competition_level.proto | 57 + .../keyword_plan_forecast_interval.proto | 56 + .../v3/enums/keyword_plan_network.proto | 50 + .../ads/googleads/v3/enums/label_status.proto | 48 + .../legacy_app_install_ad_app_store.proto | 59 + .../listing_custom_attribute_index.proto | 60 + .../v3/enums/listing_group_type.proto | 52 + .../v3/enums/local_placeholder_field.proto | 119 + ..._extension_targeting_criterion_field.proto | 62 + .../enums/location_group_radius_units.proto | 50 + .../v3/enums/location_placeholder_field.proto | 68 + .../v3/enums/manager_link_status.proto | 59 + .../matching_function_context_type.proto | 50 + .../v3/enums/matching_function_operator.proto | 65 + .../ads/googleads/v3/enums/media_type.proto | 64 + .../enums/merchant_center_link_status.proto | 53 + .../v3/enums/message_placeholder_field.proto | 61 + google/ads/googleads/v3/enums/mime_type.proto | 82 + .../googleads/v3/enums/minute_of_hour.proto | 56 + .../v3/enums/mobile_device_type.proto | 50 + .../googleads/v3/enums/month_of_year.proto | 80 + .../v3/enums/mutate_job_status.proto | 53 + .../v3/enums/negative_geo_target_type.proto | 52 + ...offline_user_data_job_failure_reason.proto | 51 + .../enums/offline_user_data_job_status.proto | 56 + .../v3/enums/offline_user_data_job_type.proto | 53 + ...erating_system_version_operator_type.proto | 50 + .../page_one_promoted_strategy_goal.proto | 30 + .../v3/enums/parental_status_type.proto | 53 + .../ads/googleads/v3/enums/payment_mode.proto | 64 + .../googleads/v3/enums/placeholder_type.proto | 121 + .../googleads/v3/enums/placement_type.proto | 59 + .../v3/enums/policy_approval_status.proto | 61 + .../v3/enums/policy_review_status.proto | 60 + .../v3/enums/policy_topic_entry_type.proto | 66 + ...idence_destination_mismatch_url_type.proto | 62 + ...dence_destination_not_working_device.proto | 57 + ...stination_not_working_dns_error_type.proto | 56 + .../v3/enums/positive_geo_target_type.proto | 56 + .../v3/enums/preferred_content_type.proto | 47 + .../price_extension_price_qualifier.proto | 53 + .../v3/enums/price_extension_price_unit.proto | 62 + .../v3/enums/price_extension_type.proto | 71 + .../v3/enums/price_placeholder_field.proto | 240 ++ .../product_bidding_category_level.proto | 57 + .../product_bidding_category_status.proto | 50 + .../googleads/v3/enums/product_channel.proto | 50 + .../enums/product_channel_exclusivity.proto | 52 + .../v3/enums/product_condition.proto | 53 + .../product_custom_attribute_index.proto | 59 + .../v3/enums/product_type_level.proto | 59 + ...romotion_extension_discount_modifier.proto | 48 + .../enums/promotion_extension_occasion.proto | 157 ++ .../enums/promotion_placeholder_field.proto | 95 + .../v3/enums/proximity_radius_units.proto | 50 + .../v3/enums/quality_score_bucket.proto | 53 + .../v3/enums/reach_plan_ad_length.proto | 53 + .../v3/enums/reach_plan_age_range.proto | 122 + .../v3/enums/reach_plan_network.proto | 54 + .../enums/real_estate_placeholder_field.proto | 115 + .../v3/enums/recommendation_type.proto | 92 + .../search_engine_results_page_type.proto | 54 + .../v3/enums/search_term_match_type.proto | 59 + .../enums/search_term_targeting_status.proto | 58 + .../v3/enums/served_asset_field_type.proto | 61 + .../v3/enums/shared_set_status.proto | 50 + .../googleads/v3/enums/shared_set_type.proto | 50 + .../simulation_modification_method.proto | 54 + .../googleads/v3/enums/simulation_type.proto | 56 + .../v3/enums/sitelink_placeholder_field.proto | 69 + google/ads/googleads/v3/enums/slot.proto | 65 + .../v3/enums/spending_limit_type.proto | 48 + ...structured_snippet_placeholder_field.proto | 55 + .../v3/enums/summary_row_setting.proto | 54 + .../enums/system_managed_entity_source.proto | 47 + ...arget_cpa_opt_in_recommendation_goal.proto | 57 + .../target_impression_share_location.proto | 55 + .../v3/enums/targeting_dimension.proto | 74 + google/ads/googleads/v3/enums/time_type.proto | 51 + .../v3/enums/tracking_code_page_format.proto | 50 + .../v3/enums/tracking_code_type.proto | 59 + .../v3/enums/travel_placeholder_field.proto | 128 ++ .../enums/user_interest_taxonomy_type.proto | 59 + .../v3/enums/user_list_access_status.proto | 50 + .../v3/enums/user_list_closing_reason.proto | 48 + .../user_list_combined_rule_operator.proto | 48 + .../user_list_crm_data_source_type.proto | 51 + .../user_list_date_rule_item_operator.proto | 54 + .../user_list_logical_rule_operator.proto | 51 + .../enums/user_list_membership_status.proto | 52 + .../user_list_number_rule_item_operator.proto | 60 + .../user_list_prepopulation_status.proto | 51 + .../v3/enums/user_list_rule_type.proto | 48 + .../v3/enums/user_list_size_range.proto | 92 + .../user_list_string_rule_item_operator.proto | 66 + .../googleads/v3/enums/user_list_type.proto | 63 + .../vanity_pharma_display_url_mode.proto | 50 + .../v3/enums/vanity_pharma_text.proto | 87 + .../v3/enums/webpage_condition_operand.proto | 59 + .../v3/enums/webpage_condition_operator.proto | 51 + .../v3/errors/access_invitation_error.proto | 50 + .../account_budget_proposal_error.proto | 118 + .../v3/errors/ad_customizer_error.proto | 59 + google/ads/googleads/v3/errors/ad_error.proto | 478 ++++ .../v3/errors/ad_group_ad_error.proto | 70 + .../errors/ad_group_bid_modifier_error.proto | 51 + .../v3/errors/ad_group_criterion_error.proto | 165 ++ .../googleads/v3/errors/ad_group_error.proto | 86 + .../v3/errors/ad_group_feed_error.proto | 67 + .../v3/errors/ad_parameter_error.proto | 50 + .../v3/errors/ad_sharing_error.proto | 54 + .../ads/googleads/v3/errors/adx_error.proto | 47 + .../ads/googleads/v3/errors/asset_error.proto | 61 + .../v3/errors/asset_link_error.proto | 47 + .../v3/errors/authentication_error.proto | 103 + .../v3/errors/authorization_error.proto | 88 + .../googleads/v3/errors/bidding_error.proto | 121 + .../v3/errors/bidding_strategy_error.proto | 61 + .../v3/errors/billing_setup_error.proto | 105 + .../v3/errors/campaign_budget_error.proto | 97 + .../v3/errors/campaign_criterion_error.proto | 81 + .../v3/errors/campaign_draft_error.proto | 79 + .../googleads/v3/errors/campaign_error.proto | 179 ++ .../v3/errors/campaign_experiment_error.proto | 81 + .../v3/errors/campaign_feed_error.proto | 67 + .../v3/errors/campaign_shared_set_error.proto | 47 + .../v3/errors/change_status_error.proto | 47 + .../v3/errors/collection_size_error.proto | 50 + .../googleads/v3/errors/context_error.proto | 50 + .../v3/errors/conversion_action_error.proto | 75 + .../conversion_adjustment_upload_error.proto | 85 + .../v3/errors/conversion_upload_error.proto | 130 ++ .../v3/errors/country_code_error.proto | 47 + .../googleads/v3/errors/criterion_error.proto | 390 ++++ .../v3/errors/currency_code_error.proto | 47 + .../v3/errors/custom_interest_error.proto | 66 + .../errors/customer_client_link_error.proto | 68 + .../googleads/v3/errors/customer_error.proto | 50 + .../v3/errors/customer_feed_error.proto | 66 + .../errors/customer_manager_link_error.proto | 75 + .../googleads/v3/errors/database_error.proto | 56 + .../ads/googleads/v3/errors/date_error.proto | 74 + .../v3/errors/date_range_error.proto | 59 + .../googleads/v3/errors/distinct_error.proto | 50 + .../ads/googleads/v3/errors/enum_error.proto | 47 + google/ads/googleads/v3/errors/errors.proto | 565 +++++ .../v3/errors/extension_feed_item_error.proto | 194 ++ .../v3/errors/extension_setting_error.proto | 257 +++ .../feed_attribute_reference_error.proto | 53 + .../ads/googleads/v3/errors/feed_error.proto | 111 + .../googleads/v3/errors/feed_item_error.proto | 71 + .../v3/errors/feed_item_target_error.proto | 70 + .../errors/feed_item_validation_error.proto | 353 +++ .../v3/errors/feed_mapping_error.proto | 100 + .../ads/googleads/v3/errors/field_error.proto | 65 + .../v3/errors/field_mask_error.proto | 58 + .../googleads/v3/errors/function_error.proto | 93 + .../v3/errors/function_parsing_error.proto | 77 + ...geo_target_constant_suggestion_error.proto | 56 + .../googleads/v3/errors/header_error.proto | 47 + google/ads/googleads/v3/errors/id_error.proto | 47 + .../ads/googleads/v3/errors/image_error.proto | 161 ++ .../googleads/v3/errors/internal_error.proto | 58 + .../googleads/v3/errors/invoice_error.proto | 50 + .../errors/keyword_plan_ad_group_error.proto | 53 + .../errors/keyword_plan_campaign_error.proto | 62 + .../v3/errors/keyword_plan_error.proto | 91 + .../v3/errors/keyword_plan_idea_error.proto | 50 + .../errors/keyword_plan_keyword_error.proto | 65 + .../keyword_plan_negative_keyword_error.proto | 46 + .../ads/googleads/v3/errors/label_error.proto | 73 + .../v3/errors/language_code_error.proto | 50 + .../v3/errors/list_operation_error.proto | 50 + .../v3/errors/manager_link_error.proto | 97 + .../v3/errors/media_bundle_error.proto | 110 + .../v3/errors/media_file_error.proto | 113 + .../v3/errors/media_upload_error.proto | 65 + .../v3/errors/multiplier_error.proto | 81 + .../googleads/v3/errors/mutate_error.proto | 69 + .../v3/errors/mutate_job_error.proto | 60 + .../errors/new_resource_creation_error.proto | 54 + .../googleads/v3/errors/not_empty_error.proto | 47 + .../v3/errors/not_whitelisted_error.proto | 47 + .../ads/googleads/v3/errors/null_error.proto | 47 + .../errors/offline_user_data_job_error.proto | 117 + .../operation_access_denied_error.proto | 74 + .../googleads/v3/errors/operator_error.proto | 47 + .../v3/errors/partial_failure_error.proto | 48 + .../v3/errors/payments_account_error.proto | 47 + .../v3/errors/policy_finding_error.proto | 51 + .../policy_validation_parameter_error.proto | 54 + .../v3/errors/policy_violation_error.proto | 47 + .../ads/googleads/v3/errors/query_error.proto | 218 ++ .../ads/googleads/v3/errors/quota_error.proto | 53 + .../ads/googleads/v3/errors/range_error.proto | 50 + .../v3/errors/reach_plan_error.proto | 45 + .../v3/errors/recommendation_error.proto | 90 + .../v3/errors/region_code_error.proto | 47 + .../googleads/v3/errors/request_error.proto | 116 + .../errors/resource_access_denied_error.proto | 47 + .../resource_count_limit_exceeded_error.proto | 93 + .../googleads/v3/errors/setting_error.proto | 82 + .../v3/errors/shared_criterion_error.proto | 47 + .../v3/errors/shared_set_error.proto | 56 + .../v3/errors/size_limit_error.proto | 50 + .../v3/errors/string_format_error.proto | 50 + .../v3/errors/string_length_error.proto | 54 + .../googleads/v3/errors/time_zone_error.proto | 47 + .../googleads/v3/errors/url_field_error.proto | 215 ++ .../googleads/v3/errors/user_data_error.proto | 53 + .../googleads/v3/errors/user_list_error.proto | 129 ++ .../youtube_video_registration_error.proto | 53 + google/ads/googleads/v3/googleads_gapic.yaml | 26 + .../v3/googleads_grpc_service_config.json | 127 ++ google/ads/googleads/v3/googleads_v3.yaml | 458 ++++ .../v3/resources/account_budget.proto | 253 +++ .../resources/account_budget_proposal.proto | 161 ++ google/ads/googleads/v3/resources/ad.proto | 178 ++ .../ads/googleads/v3/resources/ad_group.proto | 177 ++ .../googleads/v3/resources/ad_group_ad.proto | 91 + .../v3/resources/ad_group_ad_asset_view.proto | 95 + .../v3/resources/ad_group_ad_label.proto | 67 + .../v3/resources/ad_group_audience_view.proto | 54 + .../v3/resources/ad_group_bid_modifier.proto | 108 + .../v3/resources/ad_group_criterion.proto | 256 +++ .../resources/ad_group_criterion_label.proto | 67 + .../ad_group_criterion_simulation.proto | 85 + .../ad_group_extension_setting.proto | 80 + .../v3/resources/ad_group_feed.proto | 84 + .../v3/resources/ad_group_label.proto | 67 + .../v3/resources/ad_group_simulation.proto | 93 + .../googleads/v3/resources/ad_parameter.proto | 83 + .../v3/resources/ad_schedule_view.proto | 52 + .../v3/resources/age_range_view.proto | 51 + google/ads/googleads/v3/resources/asset.proto | 79 + .../v3/resources/bidding_strategy.proto | 112 + .../v3/resources/billing_setup.proto | 139 ++ .../ads/googleads/v3/resources/campaign.proto | 404 ++++ .../v3/resources/campaign_audience_view.proto | 55 + .../v3/resources/campaign_bid_modifier.proto | 75 + .../v3/resources/campaign_budget.proto | 157 ++ .../v3/resources/campaign_criterion.proto | 168 ++ .../campaign_criterion_simulation.proto | 85 + .../v3/resources/campaign_draft.proto | 99 + .../v3/resources/campaign_experiment.proto | 122 + .../campaign_extension_setting.proto | 80 + .../v3/resources/campaign_feed.proto | 84 + .../v3/resources/campaign_label.proto | 67 + .../v3/resources/campaign_shared_set.proto | 78 + .../v3/resources/carrier_constant.proto | 62 + .../v3/resources/change_status.proto | 145 ++ .../googleads/v3/resources/click_view.proto | 80 + .../v3/resources/conversion_action.proto | 144 ++ .../v3/resources/currency_constant.proto | 65 + .../v3/resources/custom_interest.proto | 90 + .../ads/googleads/v3/resources/customer.proto | 138 ++ .../v3/resources/customer_client.proto | 85 + .../v3/resources/customer_client_link.proto | 66 + .../customer_extension_setting.proto | 68 + .../v3/resources/customer_feed.proto | 76 + .../v3/resources/customer_label.proto | 63 + .../v3/resources/customer_manager_link.proto | 61 + .../customer_negative_criterion.proto | 83 + .../v3/resources/detail_placement_view.proto | 72 + .../v3/resources/display_keyword_view.proto | 51 + .../v3/resources/distance_view.proto | 63 + .../v3/resources/domain_category.proto | 91 + .../dynamic_search_ads_search_term_view.proto | 87 + .../expanded_landing_page_view.proto | 56 + .../v3/resources/extension_feed_item.proto | 149 ++ google/ads/googleads/v3/resources/feed.proto | 193 ++ .../googleads/v3/resources/feed_item.proto | 215 ++ .../v3/resources/feed_item_target.proto | 109 + .../googleads/v3/resources/feed_mapping.proto | 186 ++ .../v3/resources/feed_placeholder_view.proto | 55 + .../googleads/v3/resources/gender_view.proto | 51 + .../v3/resources/geo_target_constant.proto | 72 + .../v3/resources/geographic_view.proto | 64 + .../v3/resources/google_ads_field.proto | 118 + .../v3/resources/group_placement_view.proto | 67 + .../v3/resources/hotel_group_view.proto | 51 + .../v3/resources/hotel_performance_view.proto | 51 + .../ads/googleads/v3/resources/invoice.proto | 184 ++ .../googleads/v3/resources/keyword_plan.proto | 83 + .../v3/resources/keyword_plan_ad_group.proto | 72 + .../v3/resources/keyword_plan_campaign.proto | 99 + .../v3/resources/keyword_plan_keyword.proto | 72 + .../keyword_plan_negative_keyword.proto | 68 + .../googleads/v3/resources/keyword_view.proto | 51 + google/ads/googleads/v3/resources/label.proto | 67 + .../v3/resources/landing_page_view.proto | 56 + .../v3/resources/language_constant.proto | 65 + .../v3/resources/location_view.proto | 52 + .../v3/resources/managed_placement_view.proto | 51 + .../googleads/v3/resources/media_file.proto | 125 ++ .../v3/resources/merchant_center_link.proto | 65 + .../mobile_app_category_constant.proto | 58 + .../v3/resources/mobile_device_constant.proto | 68 + .../googleads/v3/resources/mutate_job.proto | 95 + .../v3/resources/offline_user_data_job.proto | 83 + .../operating_system_version_constant.proto | 71 + .../paid_organic_search_term_view.proto | 57 + .../v3/resources/parental_status_view.proto | 51 + .../v3/resources/payments_account.proto | 74 + .../product_bidding_category_constant.proto | 84 + .../v3/resources/product_group_view.proto | 51 + .../v3/resources/recommendation.proto | 319 +++ .../v3/resources/remarketing_action.proto | 67 + .../v3/resources/search_term_view.proto | 69 + .../v3/resources/shared_criterion.proto | 93 + .../googleads/v3/resources/shared_set.proto | 78 + .../resources/shopping_performance_view.proto | 55 + .../v3/resources/topic_constant.proto | 72 + .../googleads/v3/resources/topic_view.proto | 51 + .../v3/resources/user_interest.proto | 77 + .../googleads/v3/resources/user_list.proto | 168 ++ .../v3/resources/user_location_view.proto | 63 + google/ads/googleads/v3/resources/video.proto | 64 + .../account_budget_proposal_service.proto | 137 ++ .../v3/services/account_budget_service.proto | 61 + .../ad_group_ad_asset_view_service.proto | 58 + .../services/ad_group_ad_label_service.proto | 123 + .../v3/services/ad_group_ad_service.proto | 131 ++ .../ad_group_audience_view_service.proto | 58 + .../ad_group_bid_modifier_service.proto | 130 ++ .../ad_group_criterion_label_service.proto | 124 ++ .../services/ad_group_criterion_service.proto | 140 ++ ...d_group_criterion_simulation_service.proto | 59 + .../ad_group_extension_setting_service.proto | 134 ++ .../v3/services/ad_group_feed_service.proto | 129 ++ .../v3/services/ad_group_label_service.proto | 122 + .../v3/services/ad_group_service.proto | 127 ++ .../ad_group_simulation_service.proto | 58 + .../v3/services/ad_parameter_service.proto | 129 ++ .../services/ad_schedule_view_service.proto | 58 + .../googleads/v3/services/ad_service.proto | 104 + .../v3/services/age_range_view_service.proto | 58 + .../googleads/v3/services/asset_service.proto | 101 + .../services/bidding_strategy_service.proto | 130 ++ .../v3/services/billing_setup_service.proto | 115 + .../campaign_audience_view_service.proto | 58 + .../campaign_bid_modifier_service.proto | 130 ++ .../v3/services/campaign_budget_service.proto | 129 ++ .../services/campaign_criterion_service.proto | 128 ++ ...ampaign_criterion_simulation_service.proto | 59 + .../v3/services/campaign_draft_service.proto | 202 ++ .../campaign_experiment_service.proto | 293 +++ .../campaign_extension_setting_service.proto | 134 ++ .../v3/services/campaign_feed_service.proto | 129 ++ .../v3/services/campaign_label_service.proto | 122 + .../v3/services/campaign_service.proto | 128 ++ .../campaign_shared_set_service.proto | 121 + .../services/carrier_constant_service.proto | 58 + .../v3/services/change_status_service.proto | 58 + .../v3/services/click_view_service.proto | 58 + .../services/conversion_action_service.proto | 130 ++ ...conversion_adjustment_upload_service.proto | 167 ++ .../services/conversion_upload_service.proto | 223 ++ .../services/currency_constant_service.proto | 56 + .../v3/services/custom_interest_service.proto | 110 + .../customer_client_link_service.proto | 102 + .../v3/services/customer_client_service.proto | 58 + .../customer_extension_setting_service.proto | 134 ++ .../v3/services/customer_feed_service.proto | 129 ++ .../v3/services/customer_label_service.proto | 122 + .../customer_manager_link_service.proto | 139 ++ .../customer_negative_criterion_service.proto | 122 + .../v3/services/customer_service.proto | 157 ++ .../detail_placement_view_service.proto | 58 + .../display_keyword_view_service.proto | 58 + .../v3/services/distance_view_service.proto | 58 + .../v3/services/domain_category_service.proto | 59 + ..._search_ads_search_term_view_service.proto | 59 + .../expanded_landing_page_view_service.proto | 59 + .../extension_feed_item_service.proto | 131 ++ .../v3/services/feed_item_service.proto | 129 ++ .../services/feed_item_target_service.proto | 104 + .../v3/services/feed_mapping_service.proto | 121 + .../feed_placeholder_view_service.proto | 58 + .../googleads/v3/services/feed_service.proto | 129 ++ .../v3/services/gender_view_service.proto | 58 + .../geo_target_constant_service.proto | 129 ++ .../v3/services/geographic_view_service.proto | 58 + .../services/google_ads_field_service.proto | 97 + .../v3/services/google_ads_service.proto | 928 ++++++++ .../group_placement_view_service.proto | 58 + .../services/hotel_group_view_service.proto | 58 + .../hotel_performance_view_service.proto | 58 + .../v3/services/invoice_service.proto | 72 + .../keyword_plan_ad_group_service.proto | 131 ++ .../keyword_plan_campaign_service.proto | 132 ++ .../services/keyword_plan_idea_service.proto | 117 + .../keyword_plan_keyword_service.proto | 131 ++ ...eyword_plan_negative_keyword_service.proto | 135 ++ .../v3/services/keyword_plan_service.proto | 249 +++ .../v3/services/keyword_view_service.proto | 58 + .../googleads/v3/services/label_service.proto | 125 ++ .../services/landing_page_view_service.proto | 58 + .../services/language_constant_service.proto | 58 + .../v3/services/location_view_service.proto | 58 + .../managed_placement_view_service.proto | 58 + .../v3/services/media_file_service.proto | 114 + .../merchant_center_link_service.proto | 130 ++ ...mobile_app_category_constant_service.proto | 57 + .../mobile_device_constant_service.proto | 58 + .../v3/services/mutate_job_service.proto | 217 ++ .../offline_user_data_job_service.proto | 170 ++ ...ting_system_version_constant_service.proto | 59 + ...aid_organic_search_term_view_service.proto | 59 + .../parental_status_view_service.proto | 58 + .../services/payments_account_service.proto | 61 + ...ct_bidding_category_constant_service.proto | 59 + .../services/product_group_view_service.proto | 58 + .../v3/services/reach_plan_service.proto | 367 +++ .../v3/services/recommendation_service.proto | 255 +++ .../services/remarketing_action_service.proto | 123 + .../services/search_term_view_service.proto | 58 + .../services/shared_criterion_service.proto | 121 + .../v3/services/shared_set_service.proto | 128 ++ .../shopping_performance_view_service.proto | 59 + .../v3/services/topic_constant_service.proto | 58 + .../v3/services/topic_view_service.proto | 58 + .../v3/services/user_data_service.proto | 82 + .../v3/services/user_interest_service.proto | 58 + .../v3/services/user_list_service.proto | 128 ++ .../services/user_location_view_service.proto | 58 + .../googleads/v3/services/video_service.proto | 58 + .../analytics/management/v1alpha/BUILD.bazel | 369 +++ .../v1alpha/analyticsmanagement_gapic.yaml | 19 + .../v1alpha/analyticsmanagement_v1alpha.yaml | 106 + .../management/v1alpha/management_api.proto | 1315 +++++++++++ .../management_grpc_service_config.json | 148 ++ .../management/v1alpha/resources.proto | 526 +++++ google/api/BUILD.bazel | 149 +- google/api/auth.proto | 43 +- google/api/backend.proto | 62 +- google/api/expr/artman_cel.yaml | 37 - google/api/expr/v1alpha1/BUILD.bazel | 287 ++- google/api/expr/v1alpha1/cel_service.proto | 44 - google/api/expr/v1alpha1/checked.proto | 26 +- .../expr/v1alpha1/conformance_service.proto | 37 +- google/api/expr/v1alpha1/eval.proto | 3 +- google/api/expr/v1alpha1/explain.proto | 3 +- google/api/expr/v1alpha1/syntax.proto | 33 +- google/api/expr/v1alpha1/value.proto | 3 +- google/api/expr/v1beta1/BUILD.bazel | 2 + google/api/expr/v1beta1/decl.proto | 2 +- google/api/expr/v1beta1/eval.proto | 2 +- google/api/expr/v1beta1/expr.proto | 22 +- google/api/expr/v1beta1/source.proto | 2 +- google/api/expr/v1beta1/value.proto | 2 +- google/api/metric.proto | 101 +- google/api/resource.proto | 217 +- google/api/servicecontrol/v1/BUILD.bazel | 43 + .../api/servicecontrol/v1/check_error.proto | 39 +- google/api/servicemanagement/BUILD.bazel | 1 + .../artman_servicemanagement_v1.yaml | 5 +- .../servicemanagement_v1.yaml | 233 -- google/api/servicemanagement/v1/BUILD.bazel | 385 ++++ .../api/servicemanagement/v1/resources.proto | 18 +- .../v1/servicemanagement_gapic.legacy.yaml | 300 +++ .../v1/servicemanagement_gapic.yaml | 285 +-- ...servicemanagement_grpc_service_config.json | 12 + .../v1/servicemanagement_v1.yaml | 275 +++ .../servicemanagement/v1/servicemanager.proto | 238 +- google/artman_core.yaml | 1 + google/bigtable/BUILD.bazel | 2 +- google/bigtable/admin/BUILD.bazel | 2 +- .../admin/artman_bigtableadmin.legacy.yaml | 19 + .../bigtable/admin/artman_bigtableadmin.yaml | 7 +- .../admin/cluster/bigtableclusteradmin.yaml | 2 +- .../admin/table/bigtabletableadmin.yaml | 2 +- google/bigtable/admin/v2/BUILD.bazel | 380 +++- .../admin/v2/bigtable_instance_admin.proto | 283 ++- .../admin/v2/bigtable_table_admin.proto | 625 +++++- .../admin/v2/bigtableadmin_gapic.legacy.yaml | 1029 +++++++++ .../admin/v2/bigtableadmin_gapic.yaml | 812 ++----- .../v2/bigtableadmin_grpc_service_config.json | 199 ++ .../bigtableadmin_v2.yaml} | 193 +- google/bigtable/admin/v2/common.proto | 19 +- google/bigtable/admin/v2/instance.proto | 68 +- google/bigtable/admin/v2/table.proto | 177 +- google/bigtable/artman_bigtable.yaml | 3 +- google/bigtable/v2/BUILD.bazel | 323 ++- google/bigtable/v2/bigtable.proto | 129 +- google/bigtable/v2/bigtable_gapic.legacy.yaml | 198 ++ google/bigtable/v2/bigtable_gapic.yaml | 161 +- .../v2/bigtable_grpc_service_config.json | 78 + .../{bigtable.yaml => v2/bigtable_v2.yaml} | 17 +- google/bigtable/v2/data.proto | 7 +- google/chromeos/moblab/BUILD.bazel | 1 + google/chromeos/moblab/v1beta1/BUILD.bazel | 368 +++ .../moblab/v1beta1/build_service.proto | 186 ++ .../moblab/v1beta1/chromeosmoblab_gapic.yaml | 17 + .../v1beta1/chromeosmoblab_v1beta1.yaml | 26 + .../v1beta1/moblab_grpc_service_config.json | 35 + .../chromeos/moblab/v1beta1/resources.proto | 118 + google/cloud/BUILD.bazel | 13 + google/cloud/accessapproval/v1/BUILD.bazel | 360 +++ .../accessapproval/v1/accessapproval.proto | 481 ++++ .../v1/accessapproval_gapic.yaml | 20 + .../accessapproval/v1/accessapproval_v1.yaml | 22 + google/cloud/asset/BUILD.bazel | 2 +- google/cloud/asset/artman_cloudasset_v1.yaml | 5 +- .../asset/artman_cloudasset_v1beta1.yaml | 2 +- .../asset/artman_cloudasset_v1p2beta1.yaml | 35 + google/cloud/asset/asset_v1p2beta1.yaml | 38 + google/cloud/asset/v1/BUILD.bazel | 391 ++++ google/cloud/asset/v1/asset_service.proto | 480 +++- google/cloud/asset/v1/assets.proto | 286 ++- .../asset/v1/cloudasset_gapic.legacy.yaml | 194 ++ google/cloud/asset/v1/cloudasset_gapic.yaml | 123 +- .../v1/cloudasset_grpc_service_config.json | 54 + google/cloud/asset/v1/cloudasset_v1.yaml | 38 + google/cloud/asset/v1beta1/BUILD.bazel | 317 ++- .../cloud/asset/v1beta1/asset_service.proto | 47 +- google/cloud/asset/v1beta1/assets.proto | 9 +- .../v1beta1/cloudasset_gapic.legacy.yaml | 146 ++ .../cloud/asset/v1beta1/cloudasset_gapic.yaml | 119 +- .../cloudasset_grpc_service_config.json | 31 + .../cloudasset_v1beta1.yaml} | 34 +- google/cloud/asset/v1p1beta1/BUILD.bazel | 361 +++ .../artman_cloudasset_v1p1beta1.yaml | 35 + .../cloud/asset/v1p1beta1/asset_service.proto | 149 ++ google/cloud/asset/v1p1beta1/assets.proto | 114 + .../v1p1beta1/cloudasset_gapic.legacy.yaml | 134 ++ .../asset/v1p1beta1/cloudasset_gapic.yaml | 22 + .../cloudasset_grpc_service_config.json | 35 + .../asset/v1p1beta1/cloudasset_v1p1beta1.yaml | 44 + google/cloud/asset/v1p2beta1/BUILD.bazel | 382 ++++ .../cloud/asset/v1p2beta1/asset_service.proto | 261 +++ google/cloud/asset/v1p2beta1/assets.proto | 126 ++ .../v1p2beta1/cloudasset_gapic.legacy.yaml | 158 ++ .../asset/v1p2beta1/cloudasset_gapic.yaml | 25 + .../cloudasset_grpc_service_config.json | 43 + .../asset/v1p2beta1/cloudasset_v1p2beta1.yaml | 38 + google/cloud/asset/v1p4beta1/BUILD.bazel | 374 ++++ .../cloud/asset/v1p4beta1/asset_service.proto | 343 +++ google/cloud/asset/v1p4beta1/assets.proto | 167 ++ .../v1p4beta1/cloudasset_gapic.legacy.yaml | 117 + .../asset/v1p4beta1/cloudasset_gapic.yaml | 29 + .../cloudasset_grpc_service_config.json | 30 + .../asset/v1p4beta1/cloudasset_v1p4beta1.yaml | 44 + google/cloud/automl/BUILD.bazel | 2 +- google/cloud/automl/artman_automl_v1.yaml | 34 + google/cloud/automl/automl_v1.yaml | 117 + google/cloud/automl/v1/BUILD.bazel | 400 ++++ .../cloud/automl/v1/annotation_payload.proto | 67 + google/cloud/automl/v1/annotation_spec.proto | 49 + .../cloud/automl/v1/automl_gapic.legacy.yaml | 612 +++++ google/cloud/automl/v1/automl_gapic.yaml | 75 + .../automl/v1/automl_grpc_service_config.json | 109 + google/cloud/automl/v1/automl_v1.yaml | 127 ++ google/cloud/automl/v1/classification.proto | 177 ++ google/cloud/automl/v1/data_items.proto | 192 ++ google/cloud/automl/v1/dataset.proto | 96 + google/cloud/automl/v1/detection.proto | 87 + google/cloud/automl/v1/geometry.proto | 47 + google/cloud/automl/v1/image.proto | 206 ++ google/cloud/automl/v1/io.proto | 1377 ++++++++++++ google/cloud/automl/v1/model.proto | 112 + google/cloud/automl/v1/model_evaluation.proto | 106 + google/cloud/automl/v1/operations.proto | 167 ++ .../cloud/automl/v1/prediction_service.proto | 323 +++ google/cloud/automl/v1/service.proto | 609 +++++ google/cloud/automl/v1/text.proto | 66 + google/cloud/automl/v1/text_extraction.proto | 69 + google/cloud/automl/v1/text_segment.proto | 42 + google/cloud/automl/v1/text_sentiment.proto | 78 + google/cloud/automl/v1/translation.proto | 70 + google/cloud/automl/v1beta1/BUILD.bazel | 319 ++- .../automl/v1beta1/annotation_payload.proto | 3 +- .../automl/v1beta1/annotation_spec.proto | 13 +- .../automl/v1beta1/automl_gapic.legacy.yaml | 730 ++++++ google/cloud/automl/v1beta1/automl_gapic.yaml | 567 +---- .../v1beta1/automl_grpc_service_config.json | 133 ++ .../cloud/automl/v1beta1/automl_v1beta1.yaml | 127 ++ .../cloud/automl/v1beta1/classification.proto | 18 +- google/cloud/automl/v1beta1/column_spec.proto | 16 +- google/cloud/automl/v1beta1/data_items.proto | 134 +- google/cloud/automl/v1beta1/data_stats.proto | 3 +- google/cloud/automl/v1beta1/data_types.proto | 11 +- google/cloud/automl/v1beta1/dataset.proto | 9 +- google/cloud/automl/v1beta1/detection.proto | 15 +- google/cloud/automl/v1beta1/geometry.proto | 3 +- google/cloud/automl/v1beta1/image.proto | 52 +- google/cloud/automl/v1beta1/io.proto | 408 ++-- google/cloud/automl/v1beta1/model.proto | 21 +- .../automl/v1beta1/model_evaluation.proto | 23 +- google/cloud/automl/v1beta1/operations.proto | 3 +- .../automl/v1beta1/prediction_service.proto | 115 +- google/cloud/automl/v1beta1/ranges.proto | 3 +- google/cloud/automl/v1beta1/regression.proto | 3 +- google/cloud/automl/v1beta1/service.proto | 308 ++- google/cloud/automl/v1beta1/table_spec.proto | 13 +- google/cloud/automl/v1beta1/tables.proto | 92 +- google/cloud/automl/v1beta1/temporal.proto | 3 +- google/cloud/automl/v1beta1/text.proto | 12 +- .../automl/v1beta1/text_extraction.proto | 3 +- .../cloud/automl/v1beta1/text_segment.proto | 3 +- .../cloud/automl/v1beta1/text_sentiment.proto | 3 +- google/cloud/automl/v1beta1/translation.proto | 8 +- google/cloud/automl/v1beta1/video.proto | 3 +- google/cloud/bigquery/artman_bigquery_v2.yaml | 1 + google/cloud/bigquery/bigquery_v2.yaml | 2 + .../cloud/bigquery/connection/v1/BUILD.bazel | 179 ++ ...igqueryconnection_grpc_service_config.json | 56 + .../connection/v1/bigqueryconnection_v1.yaml | 18 + .../bigquery/connection/v1/connection.proto | 278 +++ .../bigquery/connection/v1beta1/BUILD.bazel | 372 ++++ .../artman_bigqueryconnection_v1beta1.yaml | 20 + .../bigqueryconnection_gapic.legacy.yaml | 230 ++ .../v1beta1/bigqueryconnection_gapic.yaml | 23 + ...igqueryconnection_grpc_service_config.json | 60 + .../v1beta1/bigqueryconnection_v1beta1.yaml | 18 + .../connection/v1beta1/connection.proto | 306 +++ .../cloud/bigquery/datatransfer/BUILD.bazel | 2 +- .../artman_bigquerydatatransfer.yaml | 3 +- .../bigquery/datatransfer/datatransfer.yaml | 19 - .../bigquery/datatransfer/v1/BUILD.bazel | 365 ++- .../v1/bigquerydatatransfer_gapic.legacy.yaml | 424 ++++ .../v1/bigquerydatatransfer_gapic.yaml | 390 +--- ...querydatatransfer_grpc_service_config.json | 76 + .../bigquerydatatransfer_v1.yaml} | 0 .../bigquery/datatransfer/v1/datasource.proto | 542 ----- .../datatransfer/v1/datatransfer.proto | 239 +- .../bigquery/datatransfer/v1/transfer.proto | 77 +- .../cloud/bigquery/reservation/v1/BUILD.bazel | 365 +++ .../v1/bigqueryreservation_gapic.legacy.yaml | 383 ++++ .../v1/bigqueryreservation_gapic.yaml | 29 + ...gqueryreservation_grpc_service_config.json | 100 + .../v1/bigqueryreservation_v1.yaml | 30 + .../bigquery/reservation/v1/reservation.proto | 905 ++++++++ .../bigquery/reservation/v1beta1/BUILD.bazel | 365 +++ .../artman_bigqueryreservation_v1beta1.yaml | 19 + .../bigqueryreservation_gapic.legacy.yaml | 369 +++ .../v1beta1/bigqueryreservation_gapic.yaml | 29 + ...gqueryreservation_grpc_service_config.json | 96 + .../v1beta1/bigqueryreservation_v1beta1.yaml | 23 + .../reservation/v1beta1/reservation.proto | 808 +++++++ google/cloud/bigquery/storage/BUILD.bazel | 2 +- .../storage/artman_bigquerystorage_v1.yaml | 20 + .../artman_bigquerystorage_v1alpha2.yaml | 17 + .../artman_bigquerystorage_v1beta1.yaml | 23 +- .../artman_bigquerystorage_v1beta2.yaml | 17 + google/cloud/bigquery/storage/v1/BUILD.bazel | 377 ++++ google/cloud/bigquery/storage/v1/arrow.proto | 45 + google/cloud/bigquery/storage/v1/avro.proto | 41 + .../v1/bigquerystorage_gapic.legacy.yaml | 84 + .../storage/v1/bigquerystorage_gapic.yaml | 70 + .../bigquerystorage_grpc_service_config.json | 57 + .../storage/v1/bigquerystorage_v1.yaml | 25 + .../cloud/bigquery/storage/v1/storage.proto | 236 ++ google/cloud/bigquery/storage/v1/stream.proto | 137 ++ .../bigquery/storage/v1alpha2/BUILD.bazel | 371 +++ .../bigquerystorage_gapic.legacy.yaml | 18 + .../v1alpha2/bigquerystorage_gapic.yaml | 18 + .../bigquerystorage_grpc_service_config.json | 65 + .../v1alpha2/bigquerystorage_v1alpha2.yaml | 16 + .../bigquery/storage/v1alpha2/protobuf.proto | 42 + .../bigquery/storage/v1alpha2/storage.proto | 256 +++ .../bigquery/storage/v1alpha2/stream.proto | 76 + .../bigquery/storage/v1alpha2/table.proto | 100 + .../bigquery/storage/v1beta1/BUILD.bazel | 372 +++- .../bigquery/storage/v1beta1/arrow.proto | 3 +- .../cloud/bigquery/storage/v1beta1/avro.proto | 3 +- .../v1beta1/bigquerystorage_gapic.yaml | 2 +- .../bigquerystorage_grpc_service_config.json | 65 + .../bigquerystorage_v1beta1.yaml} | 8 + .../storage/v1beta1/read_options.proto | 6 +- .../bigquery/storage/v1beta1/storage.proto | 76 +- .../storage/v1beta1/table_reference.proto | 4 +- .../bigquery/storage/v1beta2/BUILD.bazel | 377 ++++ .../bigquery/storage/v1beta2/arrow.proto | 58 + .../cloud/bigquery/storage/v1beta2/avro.proto | 36 + .../v1beta2/bigquerystorage_gapic.legacy.yaml | 84 + .../v1beta2/bigquerystorage_gapic.yaml | 70 + .../bigquerystorage_grpc_service_config.json | 57 + .../v1beta2/bigquerystorage_v1beta2.yaml | 25 + .../bigquery/storage/v1beta2/storage.proto | 230 ++ .../bigquery/storage/v1beta2/stream.proto | 142 ++ google/cloud/bigquery/v2/BUILD.bazel | 364 +++ .../bigquery/v2/bigquery_gapic.legacy.yaml | 175 ++ google/cloud/bigquery/v2/bigquery_gapic.yaml | 159 +- .../v2/bigquery_grpc_service_config.json | 25 + google/cloud/bigquery/v2/bigquery_v2.yaml | 37 + .../cloud/bigquery/v2/encryption_config.proto | 33 + google/cloud/bigquery/v2/model.proto | 203 +- .../cloud/bigquery/v2/model_reference.proto | 13 +- google/cloud/bigquery/v2/standard_sql.proto | 7 +- .../artman_billingbudgets_v1beta1.yaml} | 27 +- .../billing/budgets/v1alpha1/BUILD.bazel | 176 ++ .../budgets/v1alpha1/billingbudgets.yaml | 20 + .../billingbudgets_grpc_service_config.json | 44 + .../budgets/v1alpha1/budget_model.proto | 179 ++ .../budgets/v1alpha1/budget_service.proto | 174 ++ .../cloud/billing/budgets/v1beta1/BUILD.bazel | 364 +++ .../budgets/v1beta1/billingbudgets.yaml | 20 + .../budgets/v1beta1/billingbudgets_gapic.yaml | 70 + .../billingbudgets_grpc_service_config.json | 44 + .../budgets/v1beta1/budget_model.proto | 179 ++ .../budgets/v1beta1/budget_service.proto | 174 ++ google/cloud/billing/v1/BUILD.bazel | 373 ++++ google/cloud/billing/v1/cloud_billing.proto | 204 +- .../cloud/billing/v1/cloud_billing_gapic.yaml | 19 + .../v1/cloud_billing_grpc_service_config.json | 64 + google/cloud/billing/v1/cloud_catalog.proto | 331 +++ .../v1/cloud_catalog_grpc_service_config.json | 17 + google/cloud/billing/v1/cloudbilling.yaml | 28 + .../artman_binaryauthorization_v1beta1.yaml | 3 +- .../binaryauthorization/v1beta1/BUILD.bazel | 362 +++ .../binaryauthorization_gapic.legacy.yaml | 197 ++ .../v1beta1/binaryauthorization_gapic.yaml | 182 +- ...naryauthorization_grpc_service_config.json | 51 + .../binaryauthorization_v1beta1.yaml | 22 +- .../v1beta1/resources.proto | 48 +- .../binaryauthorization/v1beta1/service.proto | 66 +- google/cloud/common_resources.proto | 52 + google/cloud/datacatalog/v1/BUILD.bazel | 377 ++++ google/cloud/datacatalog/v1/common.proto | 38 + google/cloud/datacatalog/v1/datacatalog.proto | 1261 +++++++++++ .../datacatalog/v1/datacatalog_gapic.yaml | 18 + .../v1/datacatalog_grpc_service_config.json | 65 + .../datacatalog_v1.yaml} | 9 +- .../datacatalog/v1/gcs_fileset_spec.proto | 75 + google/cloud/datacatalog/v1/schema.proto | 55 + google/cloud/datacatalog/v1/search.proto | 84 + google/cloud/datacatalog/v1/table_spec.proto | 101 + google/cloud/datacatalog/v1/tags.proto | 229 ++ google/cloud/datacatalog/v1/timestamps.proto | 41 + google/cloud/datacatalog/v1beta1/BUILD.bazel | 381 ++++ .../artman_datacatalog_v1beta1.yaml | 4 +- google/cloud/datacatalog/v1beta1/common.proto | 38 + .../datacatalog/v1beta1/datacatalog.proto | 968 ++++++-- .../v1beta1/datacatalog_gapic.legacy.yaml | 586 +++++ .../v1beta1/datacatalog_gapic.yaml | 448 +--- .../datacatalog_grpc_service_config.json | 66 + .../v1beta1/datacatalog_v1beta1.yaml | 65 + .../v1beta1/gcs_fileset_spec.proto | 75 + .../v1beta1/policytagmanager.proto | 417 ++++ .../policytagmanagerserialization.proto | 157 ++ .../samples/datacatalog_get_entry.test.yaml | 39 + .../datacatalog_lookup_entry.test.yaml | 26 + ...atalog_lookup_entry_sql_resource.test.yaml | 26 + .../samples/datacatalog_search.test.yaml | 25 + google/cloud/datacatalog/v1beta1/schema.proto | 35 +- google/cloud/datacatalog/v1beta1/search.proto | 25 +- .../datacatalog/v1beta1/table_spec.proto | 63 +- google/cloud/datacatalog/v1beta1/tags.proto | 148 +- .../datacatalog/v1beta1/timestamps.proto | 17 +- google/cloud/datalabeling/BUILD.bazel | 1 + .../artman_datalabeling_v1beta1.yaml | 3 +- google/cloud/datalabeling/v1beta1/BUILD.bazel | 384 ++++ .../datalabeling/v1beta1/annotation.proto | 14 +- .../v1beta1/annotation_spec_set.proto | 33 +- .../v1beta1/data_labeling_service.proto | 632 ++++-- .../v1beta1/datalabeling_gapic.legacy.yaml | 669 ++++++ .../v1beta1/datalabeling_gapic.yaml | 631 +----- .../datalabeling_grpc_service_config.json | 155 ++ .../{ => v1beta1}/datalabeling_v1beta1.yaml | 3 + .../cloud/datalabeling/v1beta1/dataset.proto | 61 +- .../datalabeling/v1beta1/evaluation.proto | 114 +- .../datalabeling/v1beta1/evaluation_job.proto | 217 +- .../v1beta1/human_annotation_config.proto | 65 +- .../datalabeling/v1beta1/instruction.proto | 18 +- .../datalabeling/v1beta1/operations.proto | 18 +- google/cloud/dataproc/artman_dataproc_v1.yaml | 3 +- .../dataproc/artman_dataproc_v1beta2.yaml | 1 + google/cloud/dataproc/v1/BUILD.bazel | 318 ++- .../dataproc/v1/autoscaling_policies.proto | 349 +++ google/cloud/dataproc/v1/clusters.proto | 503 +++-- google/cloud/dataproc/v1/dataproc.yaml | 1 + .../dataproc/v1/dataproc_gapic.legacy.yaml | 778 +++++++ google/cloud/dataproc/v1/dataproc_gapic.yaml | 522 +---- .../v1/dataproc_grpc_service_config.json | 207 ++ google/cloud/dataproc/v1/dataproc_v1.yaml | 83 + google/cloud/dataproc/v1/jobs.proto | 370 +-- google/cloud/dataproc/v1/operations.proto | 30 +- google/cloud/dataproc/v1/shared.proto | 9 +- .../dataproc/v1/workflow_templates.proto | 327 ++- google/cloud/dataproc/v1beta2/BUILD.bazel | 316 ++- .../v1beta2/autoscaling_policies.proto | 165 +- google/cloud/dataproc/v1beta2/clusters.proto | 463 ++-- .../v1beta2/dataproc_gapic.legacy.yaml | 96 + .../dataproc/v1beta2/dataproc_gapic.yaml | 694 +----- .../v1beta2/dataproc_grpc_service_config.json | 215 ++ .../dataproc/v1beta2/dataproc_v1beta2.yaml | 94 + google/cloud/dataproc/v1beta2/jobs.proto | 373 ++-- .../cloud/dataproc/v1beta2/operations.proto | 5 +- google/cloud/dataproc/v1beta2/shared.proto | 15 +- .../dataproc/v1beta2/workflow_templates.proto | 276 ++- google/cloud/dialogflow/BUILD.bazel | 2 +- google/cloud/dialogflow/v2/BUILD.bazel | 279 ++- google/cloud/dialogflow/v2/agent.proto | 204 +- .../{ => v2}/artman_dialogflow_v2.yaml | 4 +- google/cloud/dialogflow/v2/audio_config.proto | 238 +- google/cloud/dialogflow/v2/context.proto | 155 +- .../v2/dialogflow_gapic.legacy.yaml | 1359 +++++++++++ .../cloud/dialogflow/v2/dialogflow_gapic.yaml | 1205 +--------- .../v2/dialogflow_grpc_service_config.json | 580 +++++ .../dialogflow/{ => v2}/dialogflow_v2.yaml | 62 +- google/cloud/dialogflow/v2/entity_type.proto | 286 ++- google/cloud/dialogflow/v2/environment.proto | 126 ++ google/cloud/dialogflow/v2/intent.proto | 588 +++-- google/cloud/dialogflow/v2/session.proto | 215 +- .../dialogflow/v2/session_entity_type.proto | 150 +- .../dialogflow/v2/validation_result.proto | 76 + google/cloud/dialogflow/v2/webhook.proto | 84 +- google/cloud/dialogflow/v2beta1/BUILD.bazel | 368 ++- google/cloud/dialogflow/v2beta1/agent.proto | 122 +- .../artman_dialogflow_v2beta1.yaml | 4 +- .../artman_dialogflow_v2beta1_java.yaml | 4 +- .../dialogflow/v2beta1/audio_config.proto | 166 +- google/cloud/dialogflow/v2beta1/context.proto | 69 +- .../dialogflow/v2beta1/dialogflow_gapic.yaml | 119 +- .../dialogflow_grpc_service_config.json | 680 ++++++ .../{ => v2beta1}/dialogflow_v2beta1.yaml | 70 +- .../cloud/dialogflow/v2beta1/document.proto | 42 +- .../dialogflow/v2beta1/entity_type.proto | 165 +- .../dialogflow/v2beta1/environment.proto | 135 ++ google/cloud/dialogflow/v2beta1/gcs.proto | 36 + google/cloud/dialogflow/v2beta1/intent.proto | 410 +++- .../dialogflow/v2beta1/knowledge_base.proto | 10 +- google/cloud/dialogflow/v2beta1/session.proto | 171 +- .../v2beta1/session_entity_type.proto | 80 +- .../v2beta1/validation_result.proto | 76 + google/cloud/dialogflow/v2beta1/webhook.proto | 84 +- google/cloud/documentai/BUILD.bazel | 1 + .../artman_documentai_v1beta1.yaml} | 8 +- .../cloud/documentai/documentai_v1beta1.yaml | 29 + google/cloud/documentai/v1beta1/BUILD.bazel | 371 +++ .../cloud/documentai/v1beta1/document.proto | 446 ++++ .../v1beta1/document_understanding.proto | 299 +++ .../v1beta1/documentai_gapic.legacy.yaml | 115 + .../documentai/v1beta1/documentai_gapic.yaml | 45 + .../documentai_grpc_service_config.json | 22 + .../cloud/documentai/v1beta1/geometry.proto | 55 + google/cloud/documentai/v1beta2/BUILD.bazel | 334 +++ .../cloud/documentai/v1beta2/document.proto | 516 +++++ .../v1beta2/document_understanding.proto | 343 +++ .../v1beta2/documentai_gapic.legacy.yaml | 118 + .../documentai/v1beta2/documentai_gapic.yaml | 47 + .../v1beta2/documentai_v1beta2.yaml | 33 + ...ocumentai_v1beta2_grpc_service_config.json | 26 + .../cloud/documentai/v1beta2/geometry.proto | 54 + google/cloud/functions/artman_functions.yaml | 3 +- google/cloud/functions/functions.yaml | 20 - google/cloud/functions/v1beta2/BUILD.bazel | 372 ++++ .../v1beta2/cloudfunctions_v1beta2.yaml | 73 + .../cloud/functions/v1beta2/functions.proto | 354 ++- .../v1beta2/functions_gapic.legacy.yaml | 148 ++ .../functions/v1beta2/functions_gapic.yaml | 132 +- .../functions_grpc_service_config.json | 47 + .../cloud/functions/v1beta2/operations.proto | 39 +- google/cloud/gaming/v1beta/BUILD.bazel | 381 ++++ google/cloud/gaming/v1beta/common.proto | 241 ++ .../gaming/v1beta/game_server_clusters.proto | 275 +++ .../v1beta/game_server_clusters_service.proto | 112 + .../gaming/v1beta/game_server_configs.proto | 180 ++ .../v1beta/game_server_configs_service.proto | 78 + .../v1beta/game_server_deployments.proto | 305 +++ .../game_server_deployments_service.proto | 133 ++ .../gaming/v1beta/gameservices_v1beta.yaml | 85 + google/cloud/gaming/v1beta/gaming_gapic.yaml | 19 + google/cloud/gaming/v1beta/realms.proto | 189 ++ .../cloud/gaming/v1beta/realms_service.proto | 96 + google/cloud/iot/BUILD.bazel | 2 +- google/cloud/iot/artman_cloudiot.yaml | 9 +- google/cloud/iot/v1/BUILD.bazel | 314 ++- .../cloud/iot/v1/cloudiot_gapic.legacy.yaml | 513 +++++ google/cloud/iot/v1/cloudiot_gapic.yaml | 456 +--- .../iot/v1/cloudiot_grpc_service_config.json | 114 + .../{cloudiot.yaml => v1/cloudiot_v1.yaml} | 7 +- google/cloud/iot/v1/device_manager.proto | 265 ++- google/cloud/iot/v1/resources.proto | 266 +-- google/cloud/irm/BUILD.bazel | 1 + google/cloud/irm/v1alpha2/BUILD.bazel | 363 +++ google/cloud/irm/v1alpha2/incidents.proto | 63 +- .../irm/v1alpha2/incidents_service.proto | 448 ++-- .../cloud/irm/v1alpha2/irm_gapic.legacy.yaml | 723 ++++++ google/cloud/irm/v1alpha2/irm_gapic.yaml | 639 +----- .../irm/v1alpha2/irm_grpc_service_config.json | 151 ++ google/cloud/irm/v1alpha2/irm_v1alpha2.yaml | 23 + google/cloud/kms/BUILD.bazel | 2 +- google/cloud/kms/artman_cloudkms.yaml | 3 +- google/cloud/kms/v1/BUILD.bazel | 320 ++- .../cloud/kms/v1/cloudkms_gapic.legacy.yaml | 683 ++++++ google/cloud/kms/v1/cloudkms_gapic.yaml | 630 +----- .../kms/v1/cloudkms_grpc_service_config.json | 128 ++ .../{cloudkms.yaml => v1/cloudkms_v1.yaml} | 3 + google/cloud/kms/v1/resources.proto | 160 +- google/cloud/kms/v1/service.proto | 358 ++- google/cloud/language/artman_language_v1.yaml | 3 +- google/cloud/language/v1/BUILD.bazel | 242 +- google/cloud/language/v1/language.tests.yaml | 123 - .../language/v1/language_gapic.legacy.yaml | 185 ++ google/cloud/language/v1/language_gapic.yaml | 355 +-- .../v1/language_grpc_service_config.json | 42 + .../cloud/language/v1/language_service.proto | 12 +- .../v1/samples/language_classify_gcs.yaml | 42 + .../v1/samples/language_classify_text.yaml | 39 + .../v1/samples/language_entities_gcs.yaml | 67 + .../v1/samples/language_entities_text.yaml | 65 + .../language_entity_sentiment_gcs.yaml | 71 + .../language_entity_sentiment_text.yaml | 69 + .../v1/samples/language_sentiment_gcs.yaml | 45 + .../v1/samples/language_sentiment_text.yaml | 43 + .../v1/samples/language_syntax_gcs.yaml | 69 + .../v1/samples/language_syntax_text.yaml | 67 + .../samples/test/analyzing_entities.test.yaml | 101 + .../test/analyzing_entity_sentiment.test.yaml | 63 + .../test/analyzing_sentiment.test.yaml | 74 + .../samples/test/analyzing_syntax.test.yaml | 72 + .../test/classifying_content.test.yaml | 51 + ..._gapic.yaml => language_gapic.legacy.yaml} | 0 google/cloud/language/v1beta2/BUILD.bazel | 306 ++- .../v1beta2/language_gapic.legacy.yaml | 109 + .../language/v1beta2/language_gapic.yaml | 58 +- .../v1beta2/language_grpc_service_config.json | 42 + .../language/v1beta2/language_service.proto | 241 +- .../language/v1beta2/language_v1beta2.yaml | 21 + google/cloud/managedidentities/v1/BUILD.bazel | 368 +++ .../v1/artman_managedidentities_v1.yaml | 35 + .../v1/managed_identities_service.proto | 421 ++++ .../v1/managedidentities_gapic.yaml | 18 + ...managedidentities_grpc_service_config.json | 49 + .../v1/managedidentities_v1.yaml | 65 + .../cloud/managedidentities/v1/resource.proto | 211 ++ .../managedidentities/v1beta1/BUILD.bazel | 366 +++ .../artman_managedidentities_v1beta1.yaml | 34 + .../v1beta1/managed_identities_service.proto | 332 +++ .../managedidentities_gapic.legacy.yaml | 295 +++ .../v1beta1/managedidentities_gapic.yaml | 35 + .../v1beta1/managedidentities_v1beta1.yaml | 65 + .../managedidentities/v1beta1/resource.proto | 206 ++ .../mediatranslation/v1beta1/BUILD.bazel | 355 +++ .../v1beta1/media_translation.proto | 197 ++ .../v1beta1/mediatranslation_gapic.yaml | 18 + .../mediatranslation_grpc_service_config.json | 19 + .../v1beta1/mediatranslation_v1beta1.yaml | 19 + google/cloud/memcache/v1beta2/BUILD.bazel | 367 +++ .../memcache/v1beta2/cloud_memcache.proto | 503 +++++ .../memcache/v1beta2/memcache_gapic.yaml | 19 + .../v1beta2/memcache_grpc_service_config.json | 37 + .../memcache/v1beta2/memcache_v1beta2.yaml | 87 + google/cloud/orgpolicy/v1/BUILD.bazel | 189 ++ google/cloud/orgpolicy/v1/orgpolicy.proto | 315 +++ .../osconfig/agentendpoint/v1/BUILD.bazel | 354 +++ .../agentendpoint/v1/agentendpoint.proto | 180 ++ .../v1/agentendpoint_grpc_service_config.json | 34 + .../v1/osconfig_gapic.legacy.yaml | 148 ++ .../agentendpoint/v1/osconfig_gapic.yaml | 22 + .../agentendpoint/v1/osconfig_v1.yaml | 19 + .../agentendpoint/v1/patch_jobs.proto | 288 +++ .../osconfig/agentendpoint/v1/tasks.proto | 179 ++ .../osconfig/agentendpoint/v1beta/BUILD.bazel | 357 +++ .../agentendpoint/v1beta/agentendpoint.proto | 187 ++ .../agentendpoint_grpc_service_config.json | 34 + .../v1beta/artman_osconfig_v1beta.yaml | 16 + .../agentendpoint/v1beta/guest_policies.proto | 561 +++++ .../v1beta/osconfig_gapic.legacy.yaml | 148 ++ .../agentendpoint/v1beta/osconfig_gapic.yaml | 42 + .../agentendpoint/v1beta/osconfig_v1beta.yaml | 19 + .../agentendpoint/v1beta/patch_jobs.proto | 288 +++ .../osconfig/agentendpoint/v1beta/tasks.proto | 179 ++ google/cloud/osconfig/v1/BUILD.bazel | 374 ++++ .../osconfig/v1/osconfig_gapic.legacy.yaml | 19 + google/cloud/osconfig/v1/osconfig_gapic.yaml | 19 + .../v1/osconfig_grpc_service_config.json | 13 + .../cloud/osconfig/v1/osconfig_service.proto | 119 + google/cloud/osconfig/v1/osconfig_v1.yaml | 24 + .../cloud/osconfig/v1/patch_deployments.proto | 251 +++ google/cloud/osconfig/v1/patch_jobs.proto | 685 ++++++ google/cloud/osconfig/v1beta/BUILD.bazel | 377 ++++ .../v1beta/artman_osconfig_v1beta.yaml | 34 + .../osconfig/v1beta/guest_policies.proto | 773 +++++++ .../v1beta/osconfig_gapic.legacy.yaml | 337 +++ .../cloud/osconfig/v1beta/osconfig_gapic.yaml | 33 + .../v1beta/osconfig_grpc_service_config.json | 13 + .../osconfig/v1beta/osconfig_service.proto | 157 ++ .../osconfig/v1beta/osconfig_v1beta.yaml | 24 + .../osconfig/v1beta/patch_deployments.proto | 227 ++ google/cloud/osconfig/v1beta/patch_jobs.proto | 638 ++++++ google/cloud/oslogin/artman_oslogin_v1.yaml | 3 +- google/cloud/oslogin/common/BUILD.bazel | 134 +- google/cloud/oslogin/common/common.proto | 49 +- google/cloud/oslogin/oslogin_v1.yaml | 40 - google/cloud/oslogin/v1/BUILD.bazel | 329 ++- google/cloud/oslogin/v1/oslogin.proto | 113 +- .../oslogin/v1/oslogin_gapic.legacy.yaml | 221 ++ google/cloud/oslogin/v1/oslogin_gapic.yaml | 185 +- .../v1/oslogin_grpc_service_config.json | 42 + google/cloud/oslogin/v1/oslogin_v1.yaml | 23 + google/cloud/oslogin/v1beta/BUILD.bazel | 322 ++- google/cloud/oslogin/v1beta/oslogin.proto | 107 +- .../v1beta/oslogin_grpc_service_config.json | 42 + .../cloud/oslogin/v1beta/oslogin_v1beta.yaml | 23 + .../artman_phishingprotection_v1beta1.yaml | 3 +- .../phishingprotection/v1beta1/BUILD.bazel | 356 +++ .../v1beta1/phishingprotection.proto | 34 +- .../phishingprotection_gapic.legacy.yaml | 135 ++ .../v1beta1/phishingprotection_gapic.yaml | 115 +- ...hishingprotection_grpc_service_config.json | 13 + .../phishingprotection_v1beta1.yaml} | 2 +- .../policytroubleshooter/v1/checker.proto | 71 + .../v1/checker_grpc_service_config.json | 19 + .../v1/explanations.proto | 242 ++ .../v1/policytroubleshooter_v1.yaml | 19 + google/cloud/recaptchaenterprise/BUILD.bazel | 1 + .../artman_recaptchaenterprise_v1beta1.yaml | 3 +- .../cloud/recaptchaenterprise/v1/BUILD.bazel | 362 +++ .../v1/recaptchaenterprise.proto | 460 ++++ .../v1/recaptchaenterprise_gapic.yaml | 24 + ...captchaenterprise_grpc_service_config.json | 37 + .../v1/recaptchaenterprise_v1.yaml | 14 + .../recaptchaenterprise/v1beta1/BUILD.bazel | 362 +++ .../v1beta1/recaptchaenterprise.proto | 315 ++- .../recaptchaenterprise_gapic.legacy.yaml | 155 ++ .../v1beta1/recaptchaenterprise_gapic.yaml | 143 +- ...captchaenterprise_grpc_service_config.json | 37 + .../recaptchaenterprise_v1beta1.yaml | 6 +- .../recommendationengine/v1beta1/BUILD.bazel | 351 +++ .../artman_recommendationengine_v1beta1.yaml | 34 + .../v1beta1/catalog.proto | 199 ++ .../v1beta1/catalog_service.proto | 199 ++ .../recommendationengine/v1beta1/common.proto | 63 + .../recommendationengine/v1beta1/import.proto | 198 ++ .../prediction_apikey_registry_service.proto | 138 ++ .../v1beta1/prediction_service.proto | 198 ++ .../recommendationengine_gapic.legacy.yaml} | 562 ++--- .../v1beta1/recommendationengine_gapic.yaml | 53 + ...ommendationengine_grpc_service_config.json | 78 + .../recommendationengine_resources.proto | 46 + .../v1beta1/recommendationengine_v1beta1.yaml | 69 + .../v1beta1/user_event.proto | 336 +++ .../v1beta1/user_event_service.proto | 274 +++ google/cloud/recommender/BUILD.bazel | 1 + .../cloud/recommender/logging/v1/BUILD.bazel | 162 ++ .../recommender/logging/v1/action_log.proto | 41 + .../recommender/logging/v1/recommender.yaml | 7 + .../recommender/logging/v1beta1/BUILD.bazel | 165 ++ .../logging/v1beta1/action_log.proto | 58 + .../logging/v1beta1/recommender.yaml | 8 + google/cloud/recommender/v1/BUILD.bazel | 367 +++ .../recommender/v1/artman_recommender_v1.yaml | 35 + .../cloud/recommender/v1/recommendation.proto | 277 +++ .../recommender/v1/recommender_gapic.yaml | 18 + .../v1/recommender_grpc_service_config.json | 44 + .../recommender/v1/recommender_service.proto | 228 ++ .../cloud/recommender/v1/recommender_v1.yaml | 19 + google/cloud/recommender/v1beta1/BUILD.bazel | 368 +++ .../artman_recommender_v1beta1.yaml | 6 +- .../cloud/recommender/v1beta1/insight.proto | 134 ++ .../recommender/v1beta1/recommendation.proto | 94 +- .../v1beta1/recommender_gapic.legacy.yaml | 178 ++ .../v1beta1/recommender_gapic.yaml | 160 +- .../recommender_grpc_service_config.json | 56 + .../v1beta1/recommender_service.proto | 226 +- .../{ => v1beta1}/recommender_v1beta1.yaml | 2 +- .../v1beta1/samples/list_recommendations.yaml | 18 + google/cloud/redis/BUILD.bazel | 2 +- google/cloud/redis/v1/BUILD.bazel | 306 ++- google/cloud/redis/v1/cloud_redis.proto | 206 +- google/cloud/redis/v1/redis_gapic.legacy.yaml | 298 +++ google/cloud/redis/v1/redis_gapic.yaml | 224 +- .../redis/v1/redis_grpc_service_config.json | 45 + google/cloud/redis/v1/redis_v1.yaml | 47 + google/cloud/redis/v1beta1/BUILD.bazel | 307 ++- google/cloud/redis/v1beta1/cloud_redis.proto | 234 +- .../redis/v1beta1/redis_gapic.legacy.yaml | 293 +++ google/cloud/redis/v1beta1/redis_gapic.yaml | 220 +- .../v1beta1/redis_grpc_service_config.json | 45 + google/cloud/redis/v1beta1/redis_v1beta1.yaml | 43 + .../artman_cloudresourcemanager.yaml | 11 +- .../resourcemanager/cloudresourcemanager.yaml | 56 - google/cloud/resourcemanager/v2/BUILD.bazel | 175 ++ ...=> cloudresourcemanager_gapic.legacy.yaml} | 1 - .../v2/cloudresourcemanager_v2.yaml | 47 + google/cloud/resourcemanager/v2/folders.proto | 241 +- google/cloud/scheduler/BUILD.bazel | 2 +- .../scheduler/artman_cloudscheduler_v1.yaml | 5 +- .../artman_cloudscheduler_v1beta1.yaml | 5 +- google/cloud/scheduler/v1/BUILD.bazel | 369 +++ .../cloud/scheduler/v1/cloudscheduler.proto | 105 +- .../v1/cloudscheduler_gapic.legacy.yaml | 261 +++ .../scheduler/v1/cloudscheduler_gapic.yaml | 237 +- .../cloudscheduler_grpc_service_config.json | 55 + .../scheduler/{ => v1}/cloudscheduler_v1.yaml | 0 google/cloud/scheduler/v1/job.proto | 7 +- google/cloud/scheduler/v1/target.proto | 42 +- google/cloud/scheduler/v1beta1/BUILD.bazel | 310 ++- .../scheduler/v1beta1/cloudscheduler.proto | 102 +- .../v1beta1/cloudscheduler_gapic.legacy.yaml | 257 +++ .../v1beta1/cloudscheduler_gapic.yaml | 232 +- .../cloudscheduler_grpc_service_config.json | 55 + .../{ => v1beta1}/cloudscheduler_v1beta1.yaml | 0 google/cloud/scheduler/v1beta1/job.proto | 7 +- google/cloud/scheduler/v1beta1/target.proto | 42 +- google/cloud/secretmanager/v1/BUILD.bazel | 371 +++ google/cloud/secretmanager/v1/resources.proto | 157 ++ .../secretmanager/v1/secretmanager_gapic.yaml | 19 + .../v1/secretmanager_grpc_service_config.json | 83 + .../secretmanager/v1/secretmanager_v1.yaml | 25 + google/cloud/secretmanager/v1/service.proto | 420 ++++ .../artman_secretmanager_v1beta1.yaml} | 12 +- google/cloud/secrets/v1beta1/BUILD.bazel | 369 +++ google/cloud/secrets/v1beta1/resources.proto | 156 ++ .../secrets/v1beta1/secretmanager_gapic.yaml | 19 + .../secretmanager_grpc_service_config.json | 83 + .../v1beta1/secretmanager_v1beta1.yaml | 25 + google/cloud/secrets/v1beta1/service.proto | 420 ++++ google/cloud/securitycenter/BUILD.bazel | 2 +- .../artman_securitycenter_v1.yaml | 9 +- .../artman_securitycenter_v1p1beta1.yaml | 37 + .../securitycenter/securitycenter_v1.yaml | 80 - .../settings/v1beta1/BUILD.bazel | 367 +++ .../settings/v1beta1/billing_settings.proto | 79 + .../settings/v1beta1/component_settings.proto | 171 ++ .../settings/v1beta1/detector.proto | 57 + .../v1beta1/securitycenter_settings.yaml | 29 + .../securitycenter_settings_gapic.yaml | 18 + ...tycenter_settings_grpc_service_config.json | 70 + .../securitycenter_settings_service.proto | 650 ++++++ .../settings/v1beta1/settings.proto | 121 + .../settings/v1beta1/sink_settings.proto | 38 + google/cloud/securitycenter/v1/BUILD.bazel | 386 ++++ google/cloud/securitycenter/v1/asset.proto | 20 +- google/cloud/securitycenter/v1/finding.proto | 35 +- .../v1/notification_config.proto | 96 + .../v1/notification_message.proto | 41 + .../v1/organization_settings.proto | 13 +- .../v1/run_asset_discovery_response.proto | 6 +- .../securitycenter/v1/security_marks.proto | 23 +- .../v1/securitycenter_gapic.legacy.yaml | 478 ++++ .../v1/securitycenter_gapic.yaml | 442 +--- .../securitycenter_grpc_service_config.json | 116 + .../v1/securitycenter_service.proto | 572 +++-- .../securitycenter/v1/securitycenter_v1.yaml | 49 + google/cloud/securitycenter/v1/source.proto | 30 +- .../cloud/securitycenter/v1beta1/BUILD.bazel | 313 ++- .../cloud/securitycenter/v1beta1/asset.proto | 11 +- .../securitycenter/v1beta1/finding.proto | 31 +- .../v1beta1/organization_settings.proto | 10 +- .../run_asset_discovery_response.proto | 50 + .../v1beta1/security_marks.proto | 21 +- .../securitycenter_grpc_service_config.json | 96 + .../v1beta1/securitycenter_service.proto | 210 +- .../v1beta1/securitycenter_v1beta1.yaml | 45 + .../cloud/securitycenter/v1beta1/source.proto | 16 +- .../securitycenter/v1p1beta1/BUILD.bazel | 386 ++++ .../securitycenter/v1p1beta1/asset.proto | 119 + .../securitycenter/v1p1beta1/finding.proto | 111 + .../v1p1beta1/notification_config.proto | 112 + .../v1p1beta1/notification_message.proto | 42 + .../v1p1beta1/organization_settings.proto | 83 + .../run_asset_discovery_response.proto | 53 + .../v1p1beta1/security_marks.proto | 57 + .../v1p1beta1/securitycenter_gapic.yaml | 18 + .../securitycenter_grpc_service_config.json | 116 + .../v1p1beta1/securitycenter_service.proto | 1277 +++++++++++ .../v1p1beta1/securitycenter_v1p1beta1.yaml | 49 + .../securitycenter/v1p1beta1/source.proto | 60 + .../servicedirectory/v1beta1/BUILD.bazel | 368 +++ .../servicedirectory/v1beta1/endpoint.proto | 63 + .../v1beta1/lookup_service.proto | 90 + .../servicedirectory/v1beta1/namespace.proto | 49 + .../v1beta1/registration_service.proto | 569 +++++ .../servicedirectory/v1beta1/service.proto | 56 + .../v1beta1/servicedirectory_gapic.yaml | 18 + .../servicedirectory_grpc_service_config.json | 26 + .../v1beta1/servicedirectory_v1beta1.yaml | 22 + google/cloud/speech/BUILD.bazel | 2 +- google/cloud/speech/artman_speech_v1.yaml | 6 +- .../cloud/speech/artman_speech_v1p1beta1.yaml | 6 +- google/cloud/speech/sample_resources.yaml | 5 +- google/cloud/speech/speech_v1p1beta1.yaml | 50 - google/cloud/speech/v1/BUILD.bazel | 311 ++- google/cloud/speech/v1/cloud_speech.proto | 241 +- .../v1/samples/speech_transcribe_async.yaml | 47 +- .../samples/speech_transcribe_async_gcs.yaml | 48 +- ...ranscribe_async_word_time_offsets_gcs.yaml | 64 +- .../speech_transcribe_enhanced_model.yaml | 52 +- .../speech_transcribe_model_selection.yaml | 45 +- ...speech_transcribe_model_selection_gcs.yaml | 43 +- .../speech_transcribe_multichannel.yaml | 53 +- .../speech_transcribe_multichannel_gcs.yaml | 54 +- .../v1/samples/speech_transcribe_sync.yaml | 47 +- .../samples/speech_transcribe_sync_gcs.yaml | 48 +- .../speech_transcribe_async.test.yaml | 2 + .../speech_transcribe_async_gcs.test.yaml | 2 + ...ribe_async_word_time_offsets_gcs.test.yaml | 2 + ...speech_transcribe_enhanced_model.test.yaml | 2 + ...peech_transcribe_model_selection.test.yaml | 2 + ...h_transcribe_model_selection_gcs.test.yaml | 2 + .../speech_transcribe_multichannel.test.yaml | 2 + ...eech_transcribe_multichannel_gcs.test.yaml | 2 + .../speech_transcribe_sync.test.yaml | 2 + .../speech_transcribe_sync_gcs.test.yaml | 2 + .../cloud/speech/v1/speech_gapic.legacy.yaml | 92 + google/cloud/speech/v1/speech_gapic.yaml | 451 +--- .../speech/v1/speech_grpc_service_config.json | 35 + google/cloud/speech/{ => v1}/speech_v1.yaml | 46 +- google/cloud/speech/v1p1beta1/BUILD.bazel | 314 ++- .../cloud/speech/v1p1beta1/cloud_speech.proto | 249 ++- google/cloud/speech/v1p1beta1/resource.proto | 129 ++ .../samples/speech_adaptation_beta.yaml | 49 + .../samples/speech_contexts_classes_beta.yaml | 43 + .../samples/speech_quickstart_beta.yaml | 35 + ...eech_transcribe_auto_punctuation_beta.yaml | 47 +- .../speech_transcribe_diarization_beta.yaml | 61 +- .../speech_transcribe_multilanguage_beta.yaml | 55 +- ..._transcribe_recognition_metadata_beta.yaml | 61 +- ...transcribe_word_level_confidence_beta.yaml | 59 +- .../speech_adaptation_beta.test.yaml | 2 + .../speech_contexts_classes_beta.test.yaml | 2 + .../speech_quickstart_beta.test.yaml | 2 + ...transcribe_auto_punctuation_beta.test.yaml | 4 +- ...eech_transcribe_diarization_beta.test.yaml | 2 + ...ch_transcribe_multilanguage_beta.test.yaml | 2 + ...scribe_recognition_metadata_beta.test.yaml | 2 + ...cribe_word_level_confidence_beta.test.yaml | 2 + .../speech/v1p1beta1/speech_gapic.legacy.yaml | 90 + .../cloud/speech/v1p1beta1/speech_gapic.yaml | 384 +--- .../v1p1beta1/speech_grpc_service_config.json | 35 + .../speech/v1p1beta1/speech_v1p1beta1.yaml | 47 + google/cloud/talent/BUILD.bazel | 1 + google/cloud/talent/talent_v4beta1.yaml | 5 + google/cloud/talent/v4beta1/BUILD.bazel | 417 ++++ google/cloud/talent/v4beta1/application.proto | 75 +- .../talent/v4beta1/application_service.proto | 94 +- google/cloud/talent/v4beta1/batch.proto | 98 +- google/cloud/talent/v4beta1/common.proto | 391 ++-- google/cloud/talent/v4beta1/company.proto | 60 +- .../talent/v4beta1/company_service.proto | 105 +- .../talent/v4beta1/completion_service.proto | 91 +- google/cloud/talent/v4beta1/event.proto | 157 +- .../cloud/talent/v4beta1/event_service.proto | 25 +- google/cloud/talent/v4beta1/filters.proto | 576 ++--- google/cloud/talent/v4beta1/histogram.proto | 19 +- google/cloud/talent/v4beta1/job.proto | 274 ++- google/cloud/talent/v4beta1/job_service.proto | 653 +++--- google/cloud/talent/v4beta1/jobs_v4beta1.yaml | 95 + google/cloud/talent/v4beta1/profile.proto | 498 +++-- .../talent/v4beta1/profile_service.proto | 300 +-- .../talent/v4beta1/talent_gapic.legacy.yaml | 1890 ++++++++++++++++ google/cloud/talent/v4beta1/talent_gapic.yaml | 1843 +-------------- .../v4beta1/talent_grpc_service_config.json | 256 +++ google/cloud/talent/v4beta1/tenant.proto | 34 +- .../cloud/talent/v4beta1/tenant_service.proto | 74 +- google/cloud/tasks/BUILD.bazel | 2 +- google/cloud/tasks/artman_cloudtasks_v2.yaml | 9 +- .../tasks/artman_cloudtasks_v2beta2.yaml | 5 +- .../tasks/artman_cloudtasks_v2beta3.yaml | 9 +- google/cloud/tasks/cloudtasks_v2beta2.yaml | 71 - google/cloud/tasks/v2/BUILD.bazel | 378 ++++ google/cloud/tasks/v2/cloudtasks.proto | 172 +- .../tasks/v2/cloudtasks_gapic.legacy.yaml | 439 ++++ google/cloud/tasks/v2/cloudtasks_gapic.yaml | 376 +--- .../v2/cloudtasks_grpc_service_config.json | 87 + .../cloud/tasks/{ => v2}/cloudtasks_v2.yaml | 0 google/cloud/tasks/v2/queue.proto | 28 +- google/cloud/tasks/v2/target.proto | 172 +- google/cloud/tasks/v2/task.proto | 18 +- google/cloud/tasks/v2beta2/BUILD.bazel | 316 ++- google/cloud/tasks/v2beta2/cloudtasks.proto | 720 +++--- .../v2beta2/cloudtasks_gapic.legacy.yaml | 511 +++++ .../cloud/tasks/v2beta2/cloudtasks_gapic.yaml | 448 +--- .../cloudtasks_grpc_service_config.json | 103 + .../tasks/v2beta2/cloudtasks_v2beta2.yaml | 29 + google/cloud/tasks/v2beta2/queue.proto | 156 +- google/cloud/tasks/v2beta2/target.proto | 181 +- google/cloud/tasks/v2beta2/task.proto | 78 +- google/cloud/tasks/v2beta3/BUILD.bazel | 315 ++- google/cloud/tasks/v2beta3/cloudtasks.proto | 172 +- .../v2beta3/cloudtasks_gapic.legacy.yaml | 434 ++++ .../cloud/tasks/v2beta3/cloudtasks_gapic.yaml | 379 +--- .../cloudtasks_grpc_service_config.json | 87 + .../{ => v2beta3}/cloudtasks_v2beta3.yaml | 0 google/cloud/tasks/v2beta3/queue.proto | 7 +- google/cloud/tasks/v2beta3/target.proto | 18 +- google/cloud/tasks/v2beta3/task.proto | 7 +- google/cloud/texttospeech/BUILD.bazel | 2 +- .../texttospeech/artman_texttospeech_v1.yaml | 1 + .../artman_texttospeech_v1beta1.yaml | 1 + google/cloud/texttospeech/v1/BUILD.bazel | 301 ++- google/cloud/texttospeech/v1/cloud_tts.proto | 209 +- .../v1/texttospeech_gapic.legacy.yaml | 135 ++ .../texttospeech/v1/texttospeech_gapic.yaml | 113 +- .../v1/texttospeech_grpc_service_config.json | 26 + .../texttospeech/v1/texttospeech_v1.yaml | 27 + google/cloud/texttospeech/v1beta1/BUILD.bazel | 301 ++- .../texttospeech/v1beta1/cloud_tts.proto | 210 +- .../v1beta1/texttospeech_gapic.legacy.yaml | 135 ++ .../v1beta1/texttospeech_gapic.yaml | 113 +- .../texttospeech_grpc_service_config.json | 26 + .../v1beta1/texttospeech_v1beta1.yaml | 27 + .../cloud/translate/artman_translate_v3.yaml | 35 + .../translate/artman_translate_v3beta1.yaml | 3 +- google/cloud/translate/translate_v3beta1.yaml | 68 - google/cloud/translate/v3/BUILD.bazel | 365 +++ .../translate/v3/translate_gapic.legacy.yaml | 244 ++ .../cloud/translate/v3/translate_gapic.yaml | 25 + .../v3/translate_grpc_service_config.json | 55 + google/cloud/translate/v3/translate_v3.yaml | 38 + .../translate/v3/translation_service.proto | 926 ++++++++ google/cloud/translate/v3beta1/BUILD.bazel | 365 +++ .../v3beta1/translate_gapic.legacy.yaml | 235 ++ .../translate/v3beta1/translate_gapic.yaml | 213 +- .../translate_grpc_service_config.json | 55 + .../translate/v3beta1/translate_v3beta1.yaml | 44 + .../v3beta1/translation_service.proto | 216 +- .../artman_videointelligence_v1.legacy.yaml | 15 + .../artman_videointelligence_v1.yaml | 6 +- google/cloud/videointelligence/v1/BUILD.bazel | 355 ++- .../v1/video_intelligence.proto | 352 ++- .../v1/videointelligence_gapic.legacy.yaml | 63 + .../v1/videointelligence_gapic.yaml | 21 +- ...videointelligence_grpc_service_config.json | 22 + .../v1/videointelligence_v1.yaml | 47 + .../videointelligence/v1beta1/BUILD.bazel | 152 -- .../v1beta1/video_intelligence.proto | 345 --- ...videointelligence_grpc_service_config.json | 22 + .../videointelligence/v1beta2/BUILD.bazel | 350 ++- .../v1beta2/video_intelligence.proto | 34 +- .../videointelligence_gapic.legacy.yaml} | 23 +- .../v1beta2/videointelligence_gapic.yaml | 18 +- ...videointelligence_grpc_service_config.json | 22 + .../videointelligence/v1p1beta1/BUILD.bazel | 350 ++- .../v1p1beta1/video_intelligence.proto | 86 +- .../videointelligence_gapic.legacy.yaml | 63 + .../v1p1beta1/videointelligence_gapic.yaml | 18 +- ...videointelligence_grpc_service_config.json | 22 + .../videointelligence/v1p2beta1/BUILD.bazel | 350 ++- .../v1p2beta1/video_intelligence.proto | 39 +- .../videointelligence_gapic.legacy.yaml | 63 + .../v1p2beta1/videointelligence_gapic.yaml | 18 +- ...videointelligence_grpc_service_config.json | 22 + .../videointelligence/v1p3beta1/BUILD.bazel | 396 +++- .../v1p3beta1/video_intelligence.proto | 692 +++--- .../videointelligence_gapic.legacy.yaml | 237 ++ .../v1p3beta1/videointelligence_gapic.yaml | 174 +- ...videointelligence_grpc_service_config.json | 40 + .../videointelligence_v1p3beta1.yaml | 35 + .../videointelligence_v1.yaml | 52 - .../videointelligence_v1beta1.yaml | 35 - .../videointelligence_v1beta2.yaml | 37 +- .../videointelligence_v1p1beta1.yaml | 22 +- .../videointelligence_v1p2beta1.yaml | 22 +- .../videointelligence_v1p3beta1.yaml | 22 +- google/cloud/vision/artman_vision_v1.yaml | 3 +- google/cloud/vision/v1/BUILD.bazel | 315 ++- google/cloud/vision/v1/image_annotator.proto | 238 +- google/cloud/vision/v1/product_search.proto | 42 +- .../vision/v1/product_search_service.proto | 402 +++- google/cloud/vision/v1/text_annotation.proto | 11 +- .../cloud/vision/v1/vision_gapic.legacy.yaml | 640 ++++++ google/cloud/vision/v1/vision_gapic.yaml | 377 +--- .../vision/v1/vision_grpc_service_config.json | 136 ++ google/cloud/vision/{ => v1}/vision_v1.yaml | 12 +- google/cloud/vision/v1/web_detection.proto | 22 +- google/cloud/vision/v1p1beta1/BUILD.bazel | 306 ++- .../vision/v1p1beta1/image_annotator.proto | 17 +- .../vision/v1p1beta1/vision_gapic.legacy.yaml | 55 + .../cloud/vision/v1p1beta1/vision_gapic.yaml | 19 +- .../v1p1beta1/vision_grpc_service_config.json | 22 + .../vision/v1p1beta1/vision_v1p1beta1.yaml | 31 + google/cloud/vision/v1p2beta1/BUILD.bazel | 304 ++- .../vision/v1p2beta1/image_annotator.proto | 32 +- .../vision/v1p2beta1/vision_gapic.legacy.yaml | 72 + .../cloud/vision/v1p2beta1/vision_gapic.yaml | 28 +- .../v1p2beta1/vision_grpc_service_config.json | 26 + .../vision/v1p2beta1/vision_v1p2beta1.yaml | 31 + google/cloud/vision/v1p3beta1/BUILD.bazel | 309 ++- .../vision/v1p3beta1/image_annotator.proto | 25 +- .../vision/v1p3beta1/product_search.proto | 8 +- .../v1p3beta1/product_search_service.proto | 283 ++- .../vision/v1p3beta1/vision_gapic.legacy.yaml | 444 ++++ .../cloud/vision/v1p3beta1/vision_gapic.yaml | 382 +--- .../v1p3beta1/vision_grpc_service_config.json | 136 ++ .../vision/v1p3beta1/vision_v1p3beta1.yaml | 39 + google/cloud/vision/v1p4beta1/BUILD.bazel | 310 ++- google/cloud/vision/v1p4beta1/face.proto | 61 + google/cloud/vision/v1p4beta1/geometry.proto | 2 +- .../vision/v1p4beta1/image_annotator.proto | 130 +- .../vision/v1p4beta1/product_search.proto | 52 +- .../v1p4beta1/product_search_service.proto | 356 ++- .../vision/v1p4beta1/text_annotation.proto | 6 +- .../vision/v1p4beta1/vision_gapic.legacy.yaml | 603 +++++ .../cloud/vision/v1p4beta1/vision_gapic.yaml | 522 +---- .../v1p4beta1/vision_grpc_service_config.json | 130 ++ .../vision/v1p4beta1/vision_v1p4beta1.yaml | 41 + .../vision/v1p4beta1/web_detection.proto | 24 +- .../cloud/webrisk/artman_webrisk_v1beta1.yaml | 3 +- google/cloud/webrisk/v1/BUILD.bazel | 358 +++ google/cloud/webrisk/v1/webrisk.proto | 353 +++ google/cloud/webrisk/v1/webrisk_gapic.yaml | 19 + .../v1/webrisk_grpc_service_config.json | 30 + .../{webrisk.yaml => v1/webrisk_v1.yaml} | 4 +- google/cloud/webrisk/v1beta1/BUILD.bazel | 356 +++ google/cloud/webrisk/v1beta1/webrisk.proto | 30 +- .../webrisk/v1beta1/webrisk_gapic.legacy.yaml | 142 ++ .../cloud/webrisk/v1beta1/webrisk_gapic.yaml | 124 +- .../v1beta1/webrisk_grpc_service_config.json | 30 + .../webrisk/v1beta1/webrisk_v1beta1.yaml | 14 + google/cloud/websecurityscanner/BUILD.bazel | 2 +- .../artman_websecurityscanner_v1alpha.yaml | 3 +- .../artman_websecurityscanner_v1beta.yaml | 3 +- .../cloud/websecurityscanner/v1/BUILD.bazel | 371 +++ .../websecurityscanner/v1/crawled_url.proto | 37 + .../cloud/websecurityscanner/v1/finding.proto | 116 + .../websecurityscanner/v1/finding_addon.proto | 144 ++ .../v1/finding_type_stats.proto | 32 + .../websecurityscanner/v1/scan_config.proto | 185 ++ .../v1/scan_config_error.proto | 186 ++ .../websecurityscanner/v1/scan_run.proto | 107 + .../v1/scan_run_error_trace.proto | 72 + .../v1/scan_run_warning_trace.proto | 55 + .../v1/web_security_scanner.proto | 334 +++ .../v1/websecurityscanner_gapic.yaml | 19 + ...ebsecurityscanner_grpc_service_config.json | 75 + .../v1/websecurityscanner_v1.yaml | 22 + .../websecurityscanner/v1alpha/BUILD.bazel | 313 ++- .../v1alpha/crawled_url.proto | 14 +- .../websecurityscanner/v1alpha/finding.proto | 44 +- .../v1alpha/finding_addon.proto | 23 +- .../v1alpha/finding_type_stats.proto | 6 +- .../v1alpha/scan_config.proto | 74 +- .../websecurityscanner/v1alpha/scan_run.proto | 19 +- .../v1alpha/web_security_scanner.proto | 177 +- .../websecurityscanner_gapic.legacy.yaml | 356 +++ .../v1alpha/websecurityscanner_gapic.yaml | 336 +-- ...ebsecurityscanner_grpc_service_config.json | 75 + .../websecurityscanner_v1alpha.yaml} | 9 +- .../websecurityscanner/v1beta/BUILD.bazel | 371 +++ .../v1beta/crawled_url.proto | 5 - .../websecurityscanner/v1beta/finding.proto | 23 +- .../v1beta/finding_addon.proto | 2 - .../v1beta/finding_type_stats.proto | 4 - .../v1beta/scan_config.proto | 56 +- .../v1beta/scan_config_error.proto | 7 +- .../websecurityscanner/v1beta/scan_run.proto | 18 +- .../v1beta/scan_run_error_trace.proto | 5 +- .../v1beta/scan_run_warning_trace.proto | 3 +- .../v1beta/web_security_scanner.proto | 162 +- .../websecurityscanner_gapic.legacy.yaml | 294 +++ .../v1beta/websecurityscanner_gapic.yaml | 273 +-- ...ebsecurityscanner_grpc_service_config.json | 75 + .../websecurityscanner_v1beta.yaml | 0 google/container/artman_container_v1.yaml | 5 +- .../container/artman_container_v1beta1.yaml | 5 +- google/container/container_v1.yaml | 82 - google/container/container_v1beta1.yaml | 86 - google/container/v1/BUILD.bazel | 308 ++- google/container/v1/cluster_service.proto | 907 ++++++-- .../container/v1/container_gapic.legacy.yaml | 524 +++++ google/container/v1/container_gapic.yaml | 494 +--- .../v1/container_grpc_service_config.json | 143 ++ google/container/v1/container_v1.yaml | 26 + google/container/v1beta1/BUILD.bazel | 358 +++ .../container/v1beta1/cluster_service.proto | 1210 +++++++--- .../v1beta1/container_gapic.legacy.yaml | 551 +++++ google/container/v1beta1/container_gapic.yaml | 526 +---- .../container_grpc_service_config.json | 152 ++ .../container/v1beta1/container_v1beta1.yaml | 24 + google/datastore/BUILD.bazel | 2 +- google/datastore/admin/BUILD.bazel | 1 + .../admin/artman_datastore_admin.yaml | 5 +- google/datastore/admin/v1/BUILD.bazel | 364 +++ .../datastore/admin/v1/datastore_admin.proto | 89 +- .../v1/datastore_admin_gapic.legacy.yaml | 133 ++ .../admin/v1/datastore_admin_gapic.yaml | 120 +- .../datastore_admin_grpc_service_config.json | 48 + .../datastore_admin_v1.yaml} | 31 +- google/datastore/admin/v1/index.proto | 46 +- google/datastore/artman_datastore.legacy.yaml | 36 + google/datastore/artman_datastore.yaml | 3 +- google/datastore/datastore.yaml | 20 - google/datastore/v1/BUILD.bazel | 306 ++- google/datastore/v1/datastore.proto | 107 +- .../datastore/v1/datastore_gapic.legacy.yaml | 126 ++ google/datastore/v1/datastore_gapic.yaml | 90 +- .../v1/datastore_grpc_service_config.json | 51 + google/datastore/v1/datastore_v1.yaml | 43 + google/datastore/v1/entity.proto | 10 +- google/datastore/v1/query.proto | 12 +- google/datastore/v1beta3/entity.proto | 4 +- google/devtools/artman_clouddebugger.yaml | 3 +- google/devtools/build/BUILD.bazel | 1 + google/devtools/build/v1/BUILD.bazel | 367 +++ google/devtools/build/v1/build_events.proto | 15 +- google/devtools/build/v1/build_status.proto | 13 +- .../v1/buildeventservice_gapic.legacy.yaml | 126 ++ .../build/v1/buildeventservice_gapic.yaml | 106 +- ...buildeventservice_grpc_service_config.json | 17 + .../build/v1/buildeventservice_v1.yaml | 21 + .../build/v1/publish_build_event.proto | 41 +- google/devtools/cloudbuild/v1/BUILD.bazel | 369 +++ .../devtools/cloudbuild/v1/cloudbuild.proto | 533 ++++- .../v1/cloudbuild_gapic.legacy.yaml} | 236 +- .../cloudbuild/v1/cloudbuild_gapic.yaml | 213 +- .../v1/cloudbuild_grpc_service_config.json | 67 + .../devtools/cloudbuild/v1/cloudbuild_v1.yaml | 54 + google/devtools/clouddebugger/BUILD.bazel | 2 +- .../devtools/clouddebugger/clouddebugger.yaml | 40 - google/devtools/clouddebugger/v2/BUILD.bazel | 376 +++- .../v2/clouddebugger_gapic.legacy.yaml | 156 ++ .../clouddebugger/v2/clouddebugger_gapic.yaml | 110 +- .../v2/clouddebugger_grpc_service_config.json | 74 + .../clouddebugger/v2/clouddebugger_v2.yaml | 33 + .../clouddebugger/v2/controller.proto | 41 +- google/devtools/clouddebugger/v2/data.proto | 8 +- .../devtools/clouddebugger/v2/debugger.proto | 74 +- .../devtools/clouderrorreporting/BUILD.bazel | 2 +- .../artman_errorreporting.legacy.yaml | 34 + .../artman_errorreporting.yaml | 2 +- .../clouderrorreporting/errorreporting.yaml | 24 - .../clouderrorreporting/v1beta1/BUILD.bazel | 321 ++- .../v1beta1/clouderrorreporting_v1beta1.yaml | 34 + .../clouderrorreporting/v1beta1/common.proto | 24 +- .../v1beta1/error_group_service.proto | 25 +- .../v1beta1/error_stats_service.proto | 201 +- .../v1beta1/errorreporting_gapic.legacy.yaml | 223 ++ .../v1beta1/errorreporting_gapic.yaml | 193 +- .../errorreporting_grpc_service_config.json | 32 + .../v1beta1/report_errors_service.proto | 83 +- google/devtools/cloudtrace/BUILD.bazel | 2 +- .../cloudtrace/artman_cloudtrace_v1.yaml | 5 +- .../cloudtrace/artman_cloudtrace_v2.yaml | 5 +- google/devtools/cloudtrace/v1/BUILD.bazel | 376 +++- .../v1/cloudtrace_gapic.legacy.yaml | 84 + .../cloudtrace/v1/cloudtrace_gapic.yaml | 48 +- .../v1/cloudtrace_grpc_service_config.json | 30 + .../cloudtrace/{ => v1}/cloudtrace_v1.yaml | 27 +- google/devtools/cloudtrace/v1/trace.proto | 67 +- google/devtools/cloudtrace/v2/BUILD.bazel | 362 ++- .../v2/cloudtrace_gapic.legacy.yaml | 141 ++ .../cloudtrace/v2/cloudtrace_gapic.yaml | 105 +- .../v2/cloudtrace_grpc_service_config.json | 31 + .../cloudtrace/{ => v2}/cloudtrace_v2.yaml | 15 +- google/devtools/cloudtrace/v2/trace.proto | 39 +- google/devtools/cloudtrace/v2/tracing.proto | 25 +- google/devtools/containeranalysis/BUILD.bazel | 2 +- .../artman_containeranalysis_v1.yaml | 3 +- .../containeranalysis/containeranalysis.yaml | 25 - .../devtools/containeranalysis/v1/BUILD.bazel | 365 +++ .../v1/containeranalysis.proto | 7 + .../v1/containeranalysis_gapic.legacy.yaml | 181 ++ .../v1/containeranalysis_gapic.yaml | 163 +- ...containeranalysis_grpc_service_config.json | 21 + .../{ => v1}/containeranalysis_v1.yaml | 6 + .../v1alpha1/bill_of_materials.proto | 102 - .../v1alpha1/containeranalysis.proto | 994 --------- .../v1alpha1/image_basis.proto | 147 -- .../v1alpha1/package_vulnerability.proto | 181 -- .../v1alpha1/provenance.proto | 223 -- .../v1alpha1/source_context.proto | 140 -- .../containeranalysis/v1beta1/BUILD.bazel | 92 +- .../v1beta1/attestation/BUILD.bazel | 17 +- .../v1beta1/attestation/attestation.proto | 78 +- .../v1beta1/build/BUILD.bazel | 9 +- .../v1beta1/build/build.proto | 28 +- .../v1beta1/common/BUILD.bazel | 9 +- .../v1beta1/common/common.proto | 51 + .../v1beta1/containeranalysis.proto | 69 +- ...containeranalysis_grpc_service_config.json | 128 ++ .../v1beta1/containeranalysis_v1beta1.yaml | 33 + .../v1beta1/cvss/BUILD.bazel | 55 + .../containeranalysis/v1beta1/cvss/cvss.proto | 85 + .../v1beta1/deployment/BUILD.bazel | 9 +- .../v1beta1/deployment/deployment.proto | 6 +- .../v1beta1/discovery/BUILD.bazel | 9 +- .../v1beta1/discovery/discovery.proto | 5 +- .../v1beta1/grafeas/BUILD.bazel | 10 +- .../v1beta1/grafeas/grafeas.proto | 12 +- .../v1beta1/image/BUILD.bazel | 9 +- .../v1beta1/image/image.proto | 51 +- .../v1beta1/package/BUILD.bazel | 9 +- .../v1beta1/package/package.proto | 32 +- .../v1beta1/provenance/BUILD.bazel | 9 +- .../v1beta1/provenance/provenance.proto | 16 +- .../v1beta1/source/BUILD.bazel | 9 +- .../v1beta1/vulnerability/BUILD.bazel | 12 +- .../v1beta1/vulnerability/vulnerability.proto | 84 +- .../v1test/remote_execution.proto | 1044 --------- .../v1test/remote_execution.yaml | 19 - .../remoteworkers/v1test2/BUILD.bazel | 372 ++++ .../devtools/remoteworkers/v1test2/bots.proto | 104 +- .../remoteworkers/v1test2/command.proto | 35 +- .../remoteworkers/v1test2/remoteworkers.yaml | 18 + .../v1test2/remoteworkers_gapic.legacy.yaml} | 89 +- .../v1test2/remoteworkers_gapic.yaml | 267 +-- .../remoteworkers_grpc_service_config.json | 52 + .../remoteworkers/v1test2/tasks.proto | 68 +- .../remoteworkers/v1test2/worker.proto | 3 +- .../resultstore/resultstore-service.yaml | 20 - google/devtools/resultstore/v2/action.proto | 73 +- google/devtools/resultstore/v2/common.proto | 28 +- .../resultstore/v2/configuration.proto | 9 +- .../resultstore/v2/configured_target.proto | 4 +- google/devtools/resultstore/v2/coverage.proto | 16 +- .../resultstore/v2/coverage_summary.proto | 2 +- .../resultstore/v2/download_metadata.proto | 35 + google/devtools/resultstore/v2/file.proto | 2 +- .../v2/file_processing_error.proto | 70 + google/devtools/resultstore/v2/file_set.proto | 18 +- .../devtools/resultstore/v2/invocation.proto | 52 +- .../resultstore/v2/resultstore_download.proto | 191 +- .../v2/resultstore_file_download.proto | 16 +- .../resultstore/v2/resultstore_upload.proto | 718 +++++- .../resultstore/v2/resultstore_v2.yaml | 32 + google/devtools/resultstore/v2/target.proto | 4 +- .../devtools/resultstore/v2/test_suite.proto | 2 +- .../resultstore/v2/upload_metadata.proto | 39 + google/devtools/source/v1/BUILD.bazel | 133 +- .../devtools/source/v1/source_context.proto | 2 +- .../library/artman_library_example_v1.yaml | 1 + google/example/library/v1/BUILD.bazel | 312 ++- google/example/library/v1/library.proto | 2 + google/firestore/BUILD.bazel | 2 +- google/firestore/admin/BUILD.bazel | 1 + google/firestore/admin/v1/BUILD.bazel | 376 ++++ google/firestore/admin/v1/field.proto | 13 +- .../firestore/admin/v1/firestore_admin.proto | 124 +- .../firestore_admin_grpc_service_config.json | 61 + .../admin/v1/firestore_gapic.legacy.yaml | 199 ++ .../firestore/admin/v1/firestore_gapic.yaml | 170 +- google/firestore/admin/v1/firestore_v1.yaml | 52 + google/firestore/admin/v1/index.proto | 18 +- google/firestore/admin/v1/location.proto | 1 - google/firestore/admin/v1/operation.proto | 23 +- .../admin/v1beta1/firestore_admin.proto | 7 +- google/firestore/admin/v1beta1/index.proto | 1 - google/firestore/admin/v1beta1/location.proto | 1 - google/firestore/admin/v1beta2/field.proto | 7 +- .../admin/v1beta2/firestore_admin.proto | 7 +- google/firestore/admin/v1beta2/index.proto | 12 +- .../firestore/admin/v1beta2/operation.proto | 1 - google/firestore/v1/BUILD.bazel | 372 ++++ google/firestore/v1/common.proto | 4 +- google/firestore/v1/document.proto | 4 +- google/firestore/v1/firestore.proto | 143 +- .../firestore/v1/firestore_gapic.legacy.yaml | 232 ++ google/firestore/v1/firestore_gapic.yaml | 159 +- .../v1/firestore_grpc_service_config.json | 114 + google/firestore/v1/firestore_v1.yaml | 44 + google/firestore/v1/query.proto | 32 +- google/firestore/v1/write.proto | 14 +- google/firestore/v1beta1/BUILD.bazel | 308 ++- google/firestore/v1beta1/common.proto | 1 - google/firestore/v1beta1/document.proto | 1 - google/firestore/v1beta1/firestore.proto | 98 +- .../v1beta1/firestore_gapic.legacy.yaml | 228 ++ google/firestore/v1beta1/firestore_gapic.yaml | 171 +- .../firestore_grpc_service_config.json | 111 + .../firestore/v1beta1/firestore_v1beta1.yaml | 32 + google/firestore/v1beta1/query.proto | 39 +- google/firestore/v1beta1/write.proto | 1 - google/geo/type/BUILD.bazel | 41 + google/geo/type/type_geo.yaml | 18 + google/geo/type/viewport.proto | 69 + google/home/graph/BUILD.bazel | 1 + google/home/graph/v1/BUILD.bazel | 361 +++ google/home/graph/v1/device.proto | 69 +- google/home/graph/v1/homegraph.proto | 321 +-- .../v1/homegraph_grpc_service_config.json | 44 + google/home/graph/v1/homegraph_v1.yaml | 12 + google/iam/BUILD.bazel | 2 +- google/iam/admin/v1/BUILD.bazel | 353 ++- google/iam/admin/v1/iam.proto | 531 +++-- google/iam/admin/v1/iam.yaml | 20 + google/iam/admin/v1/iam_gapic.legacy.yaml | 249 +++ google/iam/admin/v1/iam_gapic.yaml | 233 +- .../iam/admin/v1/iam_grpc_service_config.json | 84 + google/iam/artman_iam.yaml | 2 +- google/iam/artman_iam_admin.yaml | 3 +- google/iam/artman_iam_meta_api.yaml | 2 +- google/iam/credentials/BUILD.bazel | 2 +- google/iam/credentials/v1/BUILD.bazel | 370 ++- google/iam/credentials/v1/common.proto | 85 +- .../iam/credentials/v1/iamcredentials.proto | 17 +- .../v1/iamcredentials_gapic.legacy.yaml | 133 ++ .../credentials/v1/iamcredentials_gapic.yaml | 104 +- .../iamcredentials_grpc_service_config.json | 35 + .../iam/credentials/v1/iamcredentials_v1.yaml | 17 + google/iam/iam.yaml | 21 - google/iam/v1/BUILD.bazel | 50 +- .../{iam_gapic.yaml => iam_gapic.legacy.yaml} | 0 google/iam/v1/iam_meta_api.yaml | 85 + ...ic.yaml => iam_meta_api_gapic.legacy.yaml} | 0 google/iam/v1/iam_policy.proto | 18 +- google/iam/v1/logging/BUILD.bazel | 4 +- google/iam/v1/options.proto | 10 +- google/iam/v1/policy.proto | 65 +- .../accesscontextmanager/type/BUILD.bazel | 173 ++ .../type/device_resources.proto | 85 + .../accesscontextmanager/v1/BUILD.bazel | 182 ++ .../v1/access_level.proto | 187 ++ .../v1/access_policy.proto | 60 + .../v1/service_perimeter.proto | 152 ++ google/logging/BUILD.bazel | 2 +- google/logging/artman_logging.yaml | 9 +- google/logging/logging.yaml | 100 - google/logging/type/BUILD.bazel | 165 +- google/logging/type/http_request.proto | 5 +- google/logging/type/log_severity.proto | 3 +- google/logging/v2/BUILD.bazel | 350 ++- google/logging/v2/log_entry.proto | 163 +- google/logging/v2/logging.proto | 157 +- google/logging/v2/logging.yaml | 126 ++ google/logging/v2/logging_config.proto | 861 +++++-- google/logging/v2/logging_gapic.legacy.yaml | 572 +++++ google/logging/v2/logging_gapic.yaml | 505 +---- .../v2/logging_grpc_service_config.json | 139 ++ google/logging/v2/logging_metrics.proto | 139 +- google/longrunning/BUILD.bazel | 20 +- google/longrunning/artman_longrunning.yaml | 1 + google/longrunning/longrunning.yaml | 48 +- .../longrunning/longrunning_gapic.legacy.yaml | 100 + google/longrunning/longrunning_gapic.yaml | 48 +- .../longrunning_grpc_service_config.json | 34 + google/longrunning/operations.proto | 10 +- google/maps/BUILD.bazel | 11 + .../v3/playablelocations.proto | 178 ++ ...playablelocations_grpc_service_config.json | 14 + .../v3/playablelocations_v3.yaml | 12 + .../maps/playablelocations/v3/resources.proto | 106 + .../v3/sample/resources.proto | 206 ++ google/maps/postprocessing.bzl | 58 + google/maps/postprocessing_java.sh | 49 + google/maps/postprocessing_py.sh | 43 + google/maps/postprocessing_python.sh | 50 + google/maps/roads/v1op/BUILD.bazel | 379 ++++ google/maps/roads/v1op/roads.proto | 115 + google/maps/roads/v1op/roads_gapic.yaml | 50 + .../roads/v1op/roads_grpc_service_config.json | 14 + google/maps/roads/v1op/roads_v1op.yaml | 12 + google/maps/routes/v1/BUILD.bazel | 226 ++ .../v1/compute_route_matrix_request.proto | 72 + .../routes/v1/compute_routes_request.proto | 180 ++ .../routes/v1/compute_routes_response.proto | 45 + google/maps/routes/v1/fallback_info.proto | 71 + google/maps/routes/v1/polyline.proto | 53 + google/maps/routes/v1/route.proto | 263 +++ .../maps/routes/v1/route_matrix_element.proto | 69 + google/maps/routes/v1/route_service.proto | 78 + google/maps/routes/v1/toll_passes.proto | 39 + .../routes/v1/vehicle_emission_type.proto | 42 + google/maps/routes/v1/waypoint.proto | 81 + google/maps/routes/v1alpha/BUILD.bazel | 167 ++ .../maps/routes/v1alpha/route_service.proto | 89 + .../v1alpha/routespreferred_v1alpha.yaml | 7 + google/maps/routespreferred/v1/BUILD.bazel | 109 + .../v1/routespreferred_gapic.yaml | 33 + .../v1/routespreferred_v1.yaml | 7 + google/maps/unity/clientinfo.proto | 87 + google/monitoring/BUILD.bazel | 2 +- google/monitoring/artman_monitoring.yaml | 4 +- google/monitoring/dashboard/v1/BUILD.bazel | 388 ++++ .../dashboard/v1/artman_monitoring.yaml | 36 + google/monitoring/dashboard/v1/common.proto | 398 ++++ .../monitoring/dashboard/v1/dashboard.proto | 60 + .../dashboard/v1/dashboards_service.proto | 159 ++ .../monitoring/dashboard/v1/drilldowns.proto | 24 + google/monitoring/dashboard/v1/layouts.proto | 75 + google/monitoring/dashboard/v1/metrics.proto | 166 ++ .../monitoring/dashboard/v1/monitoring.yaml | 32 + .../dashboard/v1/monitoring_gapic.yaml | 20 + .../monitoring/dashboard/v1/scorecard.proto | 111 + google/monitoring/dashboard/v1/service.proto | 24 + google/monitoring/dashboard/v1/text.proto | 45 + google/monitoring/dashboard/v1/widget.proto | 52 + google/monitoring/dashboard/v1/xychart.proto | 147 ++ google/monitoring/monitoring.yaml | 159 -- google/monitoring/v3/BUILD.bazel | 333 ++- google/monitoring/v3/alert.proto | 103 +- google/monitoring/v3/alert_service.proto | 88 +- google/monitoring/v3/artman_monitoring.yaml | 34 + google/monitoring/v3/common.proto | 489 ++-- google/monitoring/v3/dropped_labels.proto | 8 +- google/monitoring/v3/group.proto | 30 +- google/monitoring/v3/group_service.proto | 156 +- google/monitoring/v3/metric.proto | 141 +- google/monitoring/v3/metric_service.proto | 339 ++- google/monitoring/v3/monitoring.yaml | 190 ++ .../v3/monitoring_gapic.legacy.yaml | 1336 +++++++++++ google/monitoring/v3/monitoring_gapic.yaml | 716 +----- .../v3/monitoring_grpc_service_config.json | 304 +++ google/monitoring/v3/mutation_record.proto | 4 +- google/monitoring/v3/notification.proto | 44 +- .../monitoring/v3/notification_service.proto | 179 +- google/monitoring/v3/service.proto | 419 ++++ google/monitoring/v3/service_service.proto | 346 +++ google/monitoring/v3/span_context.proto | 20 +- google/monitoring/v3/uptime.proto | 302 ++- google/monitoring/v3/uptime_service.proto | 129 +- google/privacy/dlp/BUILD.bazel | 2 +- google/privacy/dlp/artman_dlp_v2.yaml | 3 +- google/privacy/dlp/v2/BUILD.bazel | 309 ++- .../dlp/v2/artman_dlp_v2.yaml} | 10 +- google/privacy/dlp/v2/dlp.proto | 1562 ++++++++++--- google/privacy/dlp/v2/dlp_gapic.legacy.yaml | 566 +++++ google/privacy/dlp/v2/dlp_gapic.yaml | 396 +--- .../dlp/v2/dlp_grpc_service_config.json | 160 ++ google/privacy/dlp/{ => v2}/dlp_v2.yaml | 0 google/privacy/dlp/v2/storage.proto | 115 +- google/pubsub/artman_pubsub.yaml | 2 +- google/pubsub/pubsub.yaml | 67 - google/pubsub/v1/BUILD.bazel | 265 ++- google/pubsub/v1/pubsub.proto | 531 +++-- google/pubsub/v1/pubsub_gapic.legacy.yaml | 706 ++++++ google/pubsub/v1/pubsub_gapic.yaml | 469 +--- .../pubsub/v1/pubsub_grpc_service_config.json | 222 ++ google/pubsub/v1/pubsub_v1.yaml | 87 + google/rpc/BUILD.bazel | 22 + google/rpc/README.md | 2 +- google/rpc/code.proto | 7 +- google/rpc/context/BUILD.bazel | 129 ++ google/rpc/context/attribute_context.proto | 287 +++ google/rpc/error_details.proto | 62 +- google/rpc/rpc_publish.yaml | 2 +- google/rpc/status.proto | 63 +- .../logging/v1/BUILD.bazel | 162 ++ .../logging/v1/platformlog.proto | 32 + google/spanner/BUILD.bazel | 2 +- google/spanner/admin/database/BUILD.bazel | 2 +- .../artman_spanner_admin_database.legacy.yaml | 20 + .../artman_spanner_admin_database.yaml | 9 +- google/spanner/admin/database/v1/BUILD.bazel | 391 +++- google/spanner/admin/database/v1/backup.proto | 365 +++ google/spanner/admin/database/v1/common.proto | 43 + .../{ => v1}/spanner_admin_database.yaml | 0 .../spanner_admin_database_gapic.legacy.yaml | 396 ++++ .../v1/spanner_admin_database_gapic.yaml | 196 +- ...er_admin_database_grpc_service_config.json | 91 + .../database/v1/spanner_database_admin.proto | 551 ++++- google/spanner/admin/instance/BUILD.bazel | 2 +- .../artman_spanner_admin_instance.legacy.yaml | 20 + .../artman_spanner_admin_instance.yaml | 9 +- google/spanner/admin/instance/v1/BUILD.bazel | 375 +++- .../{ => v1}/spanner_admin_instance.yaml | 0 .../spanner_admin_instance_gapic.legacy.yaml | 242 ++ .../v1/spanner_admin_instance_gapic.yaml | 177 +- ...er_admin_instance_grpc_service_config.json | 63 + .../instance/v1/spanner_instance_admin.proto | 251 ++- google/spanner/artman_spanner.legacy.yaml | 20 + google/spanner/artman_spanner.yaml | 11 +- google/spanner/v1/BUILD.bazel | 329 ++- google/spanner/v1/keys.proto | 8 +- google/spanner/v1/mutation.proto | 57 +- google/spanner/v1/query_plan.proto | 43 +- google/spanner/v1/result_set.proto | 46 +- google/spanner/v1/spanner.proto | 525 +++-- google/spanner/{ => v1}/spanner.yaml | 0 google/spanner/v1/spanner_gapic.legacy.yaml | 309 +++ google/spanner/v1/spanner_gapic.yaml | 190 +- .../v1/spanner_grpc_service_config.json | 95 + google/spanner/v1/transaction.proto | 32 +- google/spanner/v1/type.proto | 87 +- google/storage/v1/BUILD.bazel | 392 ++++ google/storage/v1/storage.proto | 1981 +++++++++++++++++ google/storage/v1/storage_gapic.yaml | 21 + google/storage/v1/storage_resources.proto | 872 ++++++++ google/storage/v1/storage_service_config.json | 15 + google/storage/v1/storage_v1.yaml | 32 + google/streetview/publish/BUILD.bazel | 1 + google/streetview/publish/v1/BUILD.bazel | 366 +++ google/type/BUILD.bazel | 16 + google/type/calendar_period.proto | 1 - google/type/color.proto | 1 - google/type/date.proto | 1 - google/type/datetime.proto | 97 + google/type/dayofweek.proto | 1 - google/type/expr.proto | 1 - google/type/fraction.proto | 1 - google/type/latlng.proto | 4 +- google/type/money.proto | 1 - google/type/month.proto | 66 + google/type/postal_address.proto | 8 +- google/type/quaternion.proto | 34 +- google/type/timeofday.proto | 1 - google/type/type.yaml | 40 +- grafeas/BUILD.bazel | 1 + grafeas/v1/BUILD.bazel | 376 ++++ grafeas/v1/common.proto | 2 + grafeas/v1/discovery.proto | 7 + grafeas/v1/grafeas.proto | 125 +- grafeas/v1/grafeas_gapic.legacy.yaml | 384 ++++ grafeas/v1/grafeas_gapic.yaml | 361 +-- grafeas/v1/grafeas_grpc_service_config.json | 80 + grafeas/v1/upgrade.proto | 114 + grafeas/v1/vulnerability.proto | 14 +- repository_rules.bzl | 120 +- 3147 files changed, 236774 insertions(+), 54379 deletions(-) create mode 100644 .kokoro/.bazelrc create mode 100755 .kokoro/build.sh create mode 100644 .kokoro/continuous.cfg create mode 100644 .kokoro/presubmit.cfg create mode 100644 .kokoro/setup.sh create mode 100644 google/actions/type/BUILD.bazel create mode 100644 google/actions/type/date_range.proto create mode 100644 google/actions/type/datetime_range.proto create mode 100644 google/actions/type/type_aog.yaml create mode 100644 google/ads/admob/BUILD.bazel create mode 100644 google/ads/admob/admob_v1.yaml create mode 100644 google/ads/admob/artman_admob_v1.yaml create mode 100644 google/ads/admob/v1/BUILD.bazel create mode 100644 google/ads/admob/v1/admob_api.proto create mode 100644 google/ads/admob/v1/admob_gapic.yaml create mode 100644 google/ads/admob/v1/admob_resources.proto delete mode 100644 google/ads/googleads/base.yaml create mode 100644 google/ads/googleads/v1/googleads_gapic.yaml create mode 100644 google/ads/googleads/v1/googleads_grpc_service_config.json create mode 100644 google/ads/googleads/v1/googleads_v1.yaml create mode 100644 google/ads/googleads/v2/enums/hotel_price_bucket.proto create mode 100644 google/ads/googleads/v2/enums/invoice_type.proto create mode 100644 google/ads/googleads/v2/enums/reach_plan_ad_length.proto create mode 100644 google/ads/googleads/v2/enums/reach_plan_age_range.proto create mode 100644 google/ads/googleads/v2/errors/invoice_error.proto create mode 100644 google/ads/googleads/v2/errors/reach_plan_error.proto create mode 100644 google/ads/googleads/v2/googleads_gapic.yaml create mode 100644 google/ads/googleads/v2/googleads_grpc_service_config.json create mode 100644 google/ads/googleads/v2/googleads_v2.yaml create mode 100644 google/ads/googleads/v2/resources/invoice.proto create mode 100644 google/ads/googleads/v2/services/invoice_service.proto create mode 100644 google/ads/googleads/v2/services/reach_plan_service.proto create mode 100644 google/ads/googleads/v3/common/ad_asset.proto create mode 100644 google/ads/googleads/v3/common/ad_type_infos.proto create mode 100644 google/ads/googleads/v3/common/asset_types.proto create mode 100644 google/ads/googleads/v3/common/bidding.proto create mode 100644 google/ads/googleads/v3/common/click_location.proto create mode 100644 google/ads/googleads/v3/common/criteria.proto create mode 100644 google/ads/googleads/v3/common/criterion_category_availability.proto create mode 100644 google/ads/googleads/v3/common/custom_parameter.proto create mode 100644 google/ads/googleads/v3/common/dates.proto create mode 100644 google/ads/googleads/v3/common/explorer_auto_optimizer_setting.proto create mode 100644 google/ads/googleads/v3/common/extensions.proto create mode 100644 google/ads/googleads/v3/common/feed_common.proto create mode 100644 google/ads/googleads/v3/common/final_app_url.proto create mode 100644 google/ads/googleads/v3/common/frequency_cap.proto create mode 100644 google/ads/googleads/v3/common/keyword_plan_common.proto create mode 100644 google/ads/googleads/v3/common/matching_function.proto create mode 100644 google/ads/googleads/v3/common/metrics.proto create mode 100644 google/ads/googleads/v3/common/offline_user_data.proto create mode 100644 google/ads/googleads/v3/common/policy.proto create mode 100644 google/ads/googleads/v3/common/real_time_bidding_setting.proto create mode 100644 google/ads/googleads/v3/common/segments.proto create mode 100644 google/ads/googleads/v3/common/simulation.proto create mode 100644 google/ads/googleads/v3/common/tag_snippet.proto create mode 100644 google/ads/googleads/v3/common/targeting_setting.proto create mode 100644 google/ads/googleads/v3/common/text_label.proto create mode 100644 google/ads/googleads/v3/common/url_collection.proto create mode 100644 google/ads/googleads/v3/common/user_lists.proto create mode 100644 google/ads/googleads/v3/common/value.proto create mode 100644 google/ads/googleads/v3/enums/access_reason.proto create mode 100644 google/ads/googleads/v3/enums/access_role.proto create mode 100644 google/ads/googleads/v3/enums/account_budget_proposal_status.proto create mode 100644 google/ads/googleads/v3/enums/account_budget_proposal_type.proto create mode 100644 google/ads/googleads/v3/enums/account_budget_status.proto create mode 100644 google/ads/googleads/v3/enums/ad_customizer_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/ad_group_ad_rotation_mode.proto create mode 100644 google/ads/googleads/v3/enums/ad_group_ad_status.proto create mode 100644 google/ads/googleads/v3/enums/ad_group_criterion_approval_status.proto create mode 100644 google/ads/googleads/v3/enums/ad_group_criterion_status.proto create mode 100644 google/ads/googleads/v3/enums/ad_group_status.proto create mode 100644 google/ads/googleads/v3/enums/ad_group_type.proto create mode 100644 google/ads/googleads/v3/enums/ad_network_type.proto create mode 100644 google/ads/googleads/v3/enums/ad_serving_optimization_status.proto create mode 100644 google/ads/googleads/v3/enums/ad_strength.proto create mode 100644 google/ads/googleads/v3/enums/ad_type.proto create mode 100644 google/ads/googleads/v3/enums/advertising_channel_sub_type.proto create mode 100644 google/ads/googleads/v3/enums/advertising_channel_type.proto create mode 100644 google/ads/googleads/v3/enums/affiliate_location_feed_relationship_type.proto create mode 100644 google/ads/googleads/v3/enums/affiliate_location_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/age_range_type.proto create mode 100644 google/ads/googleads/v3/enums/app_campaign_app_store.proto create mode 100644 google/ads/googleads/v3/enums/app_campaign_bidding_strategy_goal_type.proto create mode 100644 google/ads/googleads/v3/enums/app_payment_model_type.proto create mode 100644 google/ads/googleads/v3/enums/app_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/app_store.proto create mode 100644 google/ads/googleads/v3/enums/app_url_operating_system_type.proto create mode 100644 google/ads/googleads/v3/enums/asset_field_type.proto create mode 100644 google/ads/googleads/v3/enums/asset_performance_label.proto create mode 100644 google/ads/googleads/v3/enums/asset_type.proto create mode 100644 google/ads/googleads/v3/enums/attribution_model.proto create mode 100644 google/ads/googleads/v3/enums/bid_modifier_source.proto create mode 100644 google/ads/googleads/v3/enums/bidding_source.proto create mode 100644 google/ads/googleads/v3/enums/bidding_strategy_status.proto create mode 100644 google/ads/googleads/v3/enums/bidding_strategy_type.proto create mode 100644 google/ads/googleads/v3/enums/billing_setup_status.proto create mode 100644 google/ads/googleads/v3/enums/brand_safety_suitability.proto create mode 100644 google/ads/googleads/v3/enums/budget_delivery_method.proto create mode 100644 google/ads/googleads/v3/enums/budget_period.proto create mode 100644 google/ads/googleads/v3/enums/budget_status.proto create mode 100644 google/ads/googleads/v3/enums/budget_type.proto create mode 100644 google/ads/googleads/v3/enums/call_conversion_reporting_state.proto create mode 100644 google/ads/googleads/v3/enums/call_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/callout_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/campaign_criterion_status.proto create mode 100644 google/ads/googleads/v3/enums/campaign_draft_status.proto create mode 100644 google/ads/googleads/v3/enums/campaign_experiment_status.proto create mode 100644 google/ads/googleads/v3/enums/campaign_experiment_traffic_split_type.proto create mode 100644 google/ads/googleads/v3/enums/campaign_experiment_type.proto create mode 100644 google/ads/googleads/v3/enums/campaign_serving_status.proto create mode 100644 google/ads/googleads/v3/enums/campaign_shared_set_status.proto create mode 100644 google/ads/googleads/v3/enums/campaign_status.proto create mode 100644 google/ads/googleads/v3/enums/change_status_operation.proto create mode 100644 google/ads/googleads/v3/enums/change_status_resource_type.proto create mode 100644 google/ads/googleads/v3/enums/click_type.proto create mode 100644 google/ads/googleads/v3/enums/content_label_type.proto create mode 100644 google/ads/googleads/v3/enums/conversion_action_category.proto create mode 100644 google/ads/googleads/v3/enums/conversion_action_counting_type.proto create mode 100644 google/ads/googleads/v3/enums/conversion_action_status.proto create mode 100644 google/ads/googleads/v3/enums/conversion_action_type.proto create mode 100644 google/ads/googleads/v3/enums/conversion_adjustment_type.proto create mode 100644 google/ads/googleads/v3/enums/conversion_attribution_event_type.proto create mode 100644 google/ads/googleads/v3/enums/conversion_lag_bucket.proto create mode 100644 google/ads/googleads/v3/enums/conversion_or_adjustment_lag_bucket.proto create mode 100644 google/ads/googleads/v3/enums/criterion_category_channel_availability_mode.proto create mode 100644 google/ads/googleads/v3/enums/criterion_category_locale_availability_mode.proto create mode 100644 google/ads/googleads/v3/enums/criterion_system_serving_status.proto create mode 100644 google/ads/googleads/v3/enums/criterion_type.proto create mode 100644 google/ads/googleads/v3/enums/custom_interest_member_type.proto create mode 100644 google/ads/googleads/v3/enums/custom_interest_status.proto create mode 100644 google/ads/googleads/v3/enums/custom_interest_type.proto create mode 100644 google/ads/googleads/v3/enums/custom_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/customer_match_upload_key_type.proto create mode 100644 google/ads/googleads/v3/enums/customer_pay_per_conversion_eligibility_failure_reason.proto create mode 100644 google/ads/googleads/v3/enums/data_driven_model_status.proto create mode 100644 google/ads/googleads/v3/enums/day_of_week.proto create mode 100644 google/ads/googleads/v3/enums/device.proto create mode 100644 google/ads/googleads/v3/enums/display_ad_format_setting.proto create mode 100644 google/ads/googleads/v3/enums/display_upload_product_type.proto create mode 100644 google/ads/googleads/v3/enums/distance_bucket.proto create mode 100644 google/ads/googleads/v3/enums/dsa_page_feed_criterion_field.proto create mode 100644 google/ads/googleads/v3/enums/education_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/extension_setting_device.proto create mode 100644 google/ads/googleads/v3/enums/extension_type.proto create mode 100644 google/ads/googleads/v3/enums/external_conversion_source.proto create mode 100644 google/ads/googleads/v3/enums/feed_attribute_type.proto create mode 100644 google/ads/googleads/v3/enums/feed_item_quality_approval_status.proto create mode 100644 google/ads/googleads/v3/enums/feed_item_quality_disapproval_reason.proto create mode 100644 google/ads/googleads/v3/enums/feed_item_status.proto create mode 100644 google/ads/googleads/v3/enums/feed_item_target_device.proto create mode 100644 google/ads/googleads/v3/enums/feed_item_target_status.proto create mode 100644 google/ads/googleads/v3/enums/feed_item_target_type.proto create mode 100644 google/ads/googleads/v3/enums/feed_item_validation_status.proto create mode 100644 google/ads/googleads/v3/enums/feed_link_status.proto create mode 100644 google/ads/googleads/v3/enums/feed_mapping_criterion_type.proto create mode 100644 google/ads/googleads/v3/enums/feed_mapping_status.proto create mode 100644 google/ads/googleads/v3/enums/feed_origin.proto create mode 100644 google/ads/googleads/v3/enums/feed_status.proto create mode 100644 google/ads/googleads/v3/enums/flight_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/frequency_cap_event_type.proto create mode 100644 google/ads/googleads/v3/enums/frequency_cap_level.proto create mode 100644 google/ads/googleads/v3/enums/frequency_cap_time_unit.proto create mode 100644 google/ads/googleads/v3/enums/gender_type.proto create mode 100644 google/ads/googleads/v3/enums/geo_target_constant_status.proto create mode 100644 google/ads/googleads/v3/enums/geo_targeting_restriction.proto create mode 100644 google/ads/googleads/v3/enums/geo_targeting_type.proto create mode 100644 google/ads/googleads/v3/enums/google_ads_field_category.proto create mode 100644 google/ads/googleads/v3/enums/google_ads_field_data_type.proto create mode 100644 google/ads/googleads/v3/enums/hotel_date_selection_type.proto create mode 100644 google/ads/googleads/v3/enums/hotel_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/hotel_price_bucket.proto create mode 100644 google/ads/googleads/v3/enums/hotel_rate_type.proto create mode 100644 google/ads/googleads/v3/enums/income_range_type.proto create mode 100644 google/ads/googleads/v3/enums/interaction_event_type.proto create mode 100644 google/ads/googleads/v3/enums/interaction_type.proto create mode 100644 google/ads/googleads/v3/enums/invoice_type.proto create mode 100644 google/ads/googleads/v3/enums/job_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/keyword_match_type.proto create mode 100644 google/ads/googleads/v3/enums/keyword_plan_competition_level.proto create mode 100644 google/ads/googleads/v3/enums/keyword_plan_forecast_interval.proto create mode 100644 google/ads/googleads/v3/enums/keyword_plan_network.proto create mode 100644 google/ads/googleads/v3/enums/label_status.proto create mode 100644 google/ads/googleads/v3/enums/legacy_app_install_ad_app_store.proto create mode 100644 google/ads/googleads/v3/enums/listing_custom_attribute_index.proto create mode 100644 google/ads/googleads/v3/enums/listing_group_type.proto create mode 100644 google/ads/googleads/v3/enums/local_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/location_extension_targeting_criterion_field.proto create mode 100644 google/ads/googleads/v3/enums/location_group_radius_units.proto create mode 100644 google/ads/googleads/v3/enums/location_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/manager_link_status.proto create mode 100644 google/ads/googleads/v3/enums/matching_function_context_type.proto create mode 100644 google/ads/googleads/v3/enums/matching_function_operator.proto create mode 100644 google/ads/googleads/v3/enums/media_type.proto create mode 100644 google/ads/googleads/v3/enums/merchant_center_link_status.proto create mode 100644 google/ads/googleads/v3/enums/message_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/mime_type.proto create mode 100644 google/ads/googleads/v3/enums/minute_of_hour.proto create mode 100644 google/ads/googleads/v3/enums/mobile_device_type.proto create mode 100644 google/ads/googleads/v3/enums/month_of_year.proto create mode 100644 google/ads/googleads/v3/enums/mutate_job_status.proto create mode 100644 google/ads/googleads/v3/enums/negative_geo_target_type.proto create mode 100644 google/ads/googleads/v3/enums/offline_user_data_job_failure_reason.proto create mode 100644 google/ads/googleads/v3/enums/offline_user_data_job_status.proto create mode 100644 google/ads/googleads/v3/enums/offline_user_data_job_type.proto create mode 100644 google/ads/googleads/v3/enums/operating_system_version_operator_type.proto create mode 100644 google/ads/googleads/v3/enums/page_one_promoted_strategy_goal.proto create mode 100644 google/ads/googleads/v3/enums/parental_status_type.proto create mode 100644 google/ads/googleads/v3/enums/payment_mode.proto create mode 100644 google/ads/googleads/v3/enums/placeholder_type.proto create mode 100644 google/ads/googleads/v3/enums/placement_type.proto create mode 100644 google/ads/googleads/v3/enums/policy_approval_status.proto create mode 100644 google/ads/googleads/v3/enums/policy_review_status.proto create mode 100644 google/ads/googleads/v3/enums/policy_topic_entry_type.proto create mode 100644 google/ads/googleads/v3/enums/policy_topic_evidence_destination_mismatch_url_type.proto create mode 100644 google/ads/googleads/v3/enums/policy_topic_evidence_destination_not_working_device.proto create mode 100644 google/ads/googleads/v3/enums/policy_topic_evidence_destination_not_working_dns_error_type.proto create mode 100644 google/ads/googleads/v3/enums/positive_geo_target_type.proto create mode 100644 google/ads/googleads/v3/enums/preferred_content_type.proto create mode 100644 google/ads/googleads/v3/enums/price_extension_price_qualifier.proto create mode 100644 google/ads/googleads/v3/enums/price_extension_price_unit.proto create mode 100644 google/ads/googleads/v3/enums/price_extension_type.proto create mode 100644 google/ads/googleads/v3/enums/price_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/product_bidding_category_level.proto create mode 100644 google/ads/googleads/v3/enums/product_bidding_category_status.proto create mode 100644 google/ads/googleads/v3/enums/product_channel.proto create mode 100644 google/ads/googleads/v3/enums/product_channel_exclusivity.proto create mode 100644 google/ads/googleads/v3/enums/product_condition.proto create mode 100644 google/ads/googleads/v3/enums/product_custom_attribute_index.proto create mode 100644 google/ads/googleads/v3/enums/product_type_level.proto create mode 100644 google/ads/googleads/v3/enums/promotion_extension_discount_modifier.proto create mode 100644 google/ads/googleads/v3/enums/promotion_extension_occasion.proto create mode 100644 google/ads/googleads/v3/enums/promotion_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/proximity_radius_units.proto create mode 100644 google/ads/googleads/v3/enums/quality_score_bucket.proto create mode 100644 google/ads/googleads/v3/enums/reach_plan_ad_length.proto create mode 100644 google/ads/googleads/v3/enums/reach_plan_age_range.proto create mode 100644 google/ads/googleads/v3/enums/reach_plan_network.proto create mode 100644 google/ads/googleads/v3/enums/real_estate_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/recommendation_type.proto create mode 100644 google/ads/googleads/v3/enums/search_engine_results_page_type.proto create mode 100644 google/ads/googleads/v3/enums/search_term_match_type.proto create mode 100644 google/ads/googleads/v3/enums/search_term_targeting_status.proto create mode 100644 google/ads/googleads/v3/enums/served_asset_field_type.proto create mode 100644 google/ads/googleads/v3/enums/shared_set_status.proto create mode 100644 google/ads/googleads/v3/enums/shared_set_type.proto create mode 100644 google/ads/googleads/v3/enums/simulation_modification_method.proto create mode 100644 google/ads/googleads/v3/enums/simulation_type.proto create mode 100644 google/ads/googleads/v3/enums/sitelink_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/slot.proto create mode 100644 google/ads/googleads/v3/enums/spending_limit_type.proto create mode 100644 google/ads/googleads/v3/enums/structured_snippet_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/summary_row_setting.proto create mode 100644 google/ads/googleads/v3/enums/system_managed_entity_source.proto create mode 100644 google/ads/googleads/v3/enums/target_cpa_opt_in_recommendation_goal.proto create mode 100644 google/ads/googleads/v3/enums/target_impression_share_location.proto create mode 100644 google/ads/googleads/v3/enums/targeting_dimension.proto create mode 100644 google/ads/googleads/v3/enums/time_type.proto create mode 100644 google/ads/googleads/v3/enums/tracking_code_page_format.proto create mode 100644 google/ads/googleads/v3/enums/tracking_code_type.proto create mode 100644 google/ads/googleads/v3/enums/travel_placeholder_field.proto create mode 100644 google/ads/googleads/v3/enums/user_interest_taxonomy_type.proto create mode 100644 google/ads/googleads/v3/enums/user_list_access_status.proto create mode 100644 google/ads/googleads/v3/enums/user_list_closing_reason.proto create mode 100644 google/ads/googleads/v3/enums/user_list_combined_rule_operator.proto create mode 100644 google/ads/googleads/v3/enums/user_list_crm_data_source_type.proto create mode 100644 google/ads/googleads/v3/enums/user_list_date_rule_item_operator.proto create mode 100644 google/ads/googleads/v3/enums/user_list_logical_rule_operator.proto create mode 100644 google/ads/googleads/v3/enums/user_list_membership_status.proto create mode 100644 google/ads/googleads/v3/enums/user_list_number_rule_item_operator.proto create mode 100644 google/ads/googleads/v3/enums/user_list_prepopulation_status.proto create mode 100644 google/ads/googleads/v3/enums/user_list_rule_type.proto create mode 100644 google/ads/googleads/v3/enums/user_list_size_range.proto create mode 100644 google/ads/googleads/v3/enums/user_list_string_rule_item_operator.proto create mode 100644 google/ads/googleads/v3/enums/user_list_type.proto create mode 100644 google/ads/googleads/v3/enums/vanity_pharma_display_url_mode.proto create mode 100644 google/ads/googleads/v3/enums/vanity_pharma_text.proto create mode 100644 google/ads/googleads/v3/enums/webpage_condition_operand.proto create mode 100644 google/ads/googleads/v3/enums/webpage_condition_operator.proto create mode 100644 google/ads/googleads/v3/errors/access_invitation_error.proto create mode 100644 google/ads/googleads/v3/errors/account_budget_proposal_error.proto create mode 100644 google/ads/googleads/v3/errors/ad_customizer_error.proto create mode 100644 google/ads/googleads/v3/errors/ad_error.proto create mode 100644 google/ads/googleads/v3/errors/ad_group_ad_error.proto create mode 100644 google/ads/googleads/v3/errors/ad_group_bid_modifier_error.proto create mode 100644 google/ads/googleads/v3/errors/ad_group_criterion_error.proto create mode 100644 google/ads/googleads/v3/errors/ad_group_error.proto create mode 100644 google/ads/googleads/v3/errors/ad_group_feed_error.proto create mode 100644 google/ads/googleads/v3/errors/ad_parameter_error.proto create mode 100644 google/ads/googleads/v3/errors/ad_sharing_error.proto create mode 100644 google/ads/googleads/v3/errors/adx_error.proto create mode 100644 google/ads/googleads/v3/errors/asset_error.proto create mode 100644 google/ads/googleads/v3/errors/asset_link_error.proto create mode 100644 google/ads/googleads/v3/errors/authentication_error.proto create mode 100644 google/ads/googleads/v3/errors/authorization_error.proto create mode 100644 google/ads/googleads/v3/errors/bidding_error.proto create mode 100644 google/ads/googleads/v3/errors/bidding_strategy_error.proto create mode 100644 google/ads/googleads/v3/errors/billing_setup_error.proto create mode 100644 google/ads/googleads/v3/errors/campaign_budget_error.proto create mode 100644 google/ads/googleads/v3/errors/campaign_criterion_error.proto create mode 100644 google/ads/googleads/v3/errors/campaign_draft_error.proto create mode 100644 google/ads/googleads/v3/errors/campaign_error.proto create mode 100644 google/ads/googleads/v3/errors/campaign_experiment_error.proto create mode 100644 google/ads/googleads/v3/errors/campaign_feed_error.proto create mode 100644 google/ads/googleads/v3/errors/campaign_shared_set_error.proto create mode 100644 google/ads/googleads/v3/errors/change_status_error.proto create mode 100644 google/ads/googleads/v3/errors/collection_size_error.proto create mode 100644 google/ads/googleads/v3/errors/context_error.proto create mode 100644 google/ads/googleads/v3/errors/conversion_action_error.proto create mode 100644 google/ads/googleads/v3/errors/conversion_adjustment_upload_error.proto create mode 100644 google/ads/googleads/v3/errors/conversion_upload_error.proto create mode 100644 google/ads/googleads/v3/errors/country_code_error.proto create mode 100644 google/ads/googleads/v3/errors/criterion_error.proto create mode 100644 google/ads/googleads/v3/errors/currency_code_error.proto create mode 100644 google/ads/googleads/v3/errors/custom_interest_error.proto create mode 100644 google/ads/googleads/v3/errors/customer_client_link_error.proto create mode 100644 google/ads/googleads/v3/errors/customer_error.proto create mode 100644 google/ads/googleads/v3/errors/customer_feed_error.proto create mode 100644 google/ads/googleads/v3/errors/customer_manager_link_error.proto create mode 100644 google/ads/googleads/v3/errors/database_error.proto create mode 100644 google/ads/googleads/v3/errors/date_error.proto create mode 100644 google/ads/googleads/v3/errors/date_range_error.proto create mode 100644 google/ads/googleads/v3/errors/distinct_error.proto create mode 100644 google/ads/googleads/v3/errors/enum_error.proto create mode 100644 google/ads/googleads/v3/errors/errors.proto create mode 100644 google/ads/googleads/v3/errors/extension_feed_item_error.proto create mode 100644 google/ads/googleads/v3/errors/extension_setting_error.proto create mode 100644 google/ads/googleads/v3/errors/feed_attribute_reference_error.proto create mode 100644 google/ads/googleads/v3/errors/feed_error.proto create mode 100644 google/ads/googleads/v3/errors/feed_item_error.proto create mode 100644 google/ads/googleads/v3/errors/feed_item_target_error.proto create mode 100644 google/ads/googleads/v3/errors/feed_item_validation_error.proto create mode 100644 google/ads/googleads/v3/errors/feed_mapping_error.proto create mode 100644 google/ads/googleads/v3/errors/field_error.proto create mode 100644 google/ads/googleads/v3/errors/field_mask_error.proto create mode 100644 google/ads/googleads/v3/errors/function_error.proto create mode 100644 google/ads/googleads/v3/errors/function_parsing_error.proto create mode 100644 google/ads/googleads/v3/errors/geo_target_constant_suggestion_error.proto create mode 100644 google/ads/googleads/v3/errors/header_error.proto create mode 100644 google/ads/googleads/v3/errors/id_error.proto create mode 100644 google/ads/googleads/v3/errors/image_error.proto create mode 100644 google/ads/googleads/v3/errors/internal_error.proto create mode 100644 google/ads/googleads/v3/errors/invoice_error.proto create mode 100644 google/ads/googleads/v3/errors/keyword_plan_ad_group_error.proto create mode 100644 google/ads/googleads/v3/errors/keyword_plan_campaign_error.proto create mode 100644 google/ads/googleads/v3/errors/keyword_plan_error.proto create mode 100644 google/ads/googleads/v3/errors/keyword_plan_idea_error.proto create mode 100644 google/ads/googleads/v3/errors/keyword_plan_keyword_error.proto create mode 100644 google/ads/googleads/v3/errors/keyword_plan_negative_keyword_error.proto create mode 100644 google/ads/googleads/v3/errors/label_error.proto create mode 100644 google/ads/googleads/v3/errors/language_code_error.proto create mode 100644 google/ads/googleads/v3/errors/list_operation_error.proto create mode 100644 google/ads/googleads/v3/errors/manager_link_error.proto create mode 100644 google/ads/googleads/v3/errors/media_bundle_error.proto create mode 100644 google/ads/googleads/v3/errors/media_file_error.proto create mode 100644 google/ads/googleads/v3/errors/media_upload_error.proto create mode 100644 google/ads/googleads/v3/errors/multiplier_error.proto create mode 100644 google/ads/googleads/v3/errors/mutate_error.proto create mode 100644 google/ads/googleads/v3/errors/mutate_job_error.proto create mode 100644 google/ads/googleads/v3/errors/new_resource_creation_error.proto create mode 100644 google/ads/googleads/v3/errors/not_empty_error.proto create mode 100644 google/ads/googleads/v3/errors/not_whitelisted_error.proto create mode 100644 google/ads/googleads/v3/errors/null_error.proto create mode 100644 google/ads/googleads/v3/errors/offline_user_data_job_error.proto create mode 100644 google/ads/googleads/v3/errors/operation_access_denied_error.proto create mode 100644 google/ads/googleads/v3/errors/operator_error.proto create mode 100644 google/ads/googleads/v3/errors/partial_failure_error.proto create mode 100644 google/ads/googleads/v3/errors/payments_account_error.proto create mode 100644 google/ads/googleads/v3/errors/policy_finding_error.proto create mode 100644 google/ads/googleads/v3/errors/policy_validation_parameter_error.proto create mode 100644 google/ads/googleads/v3/errors/policy_violation_error.proto create mode 100644 google/ads/googleads/v3/errors/query_error.proto create mode 100644 google/ads/googleads/v3/errors/quota_error.proto create mode 100644 google/ads/googleads/v3/errors/range_error.proto create mode 100644 google/ads/googleads/v3/errors/reach_plan_error.proto create mode 100644 google/ads/googleads/v3/errors/recommendation_error.proto create mode 100644 google/ads/googleads/v3/errors/region_code_error.proto create mode 100644 google/ads/googleads/v3/errors/request_error.proto create mode 100644 google/ads/googleads/v3/errors/resource_access_denied_error.proto create mode 100644 google/ads/googleads/v3/errors/resource_count_limit_exceeded_error.proto create mode 100644 google/ads/googleads/v3/errors/setting_error.proto create mode 100644 google/ads/googleads/v3/errors/shared_criterion_error.proto create mode 100644 google/ads/googleads/v3/errors/shared_set_error.proto create mode 100644 google/ads/googleads/v3/errors/size_limit_error.proto create mode 100644 google/ads/googleads/v3/errors/string_format_error.proto create mode 100644 google/ads/googleads/v3/errors/string_length_error.proto create mode 100644 google/ads/googleads/v3/errors/time_zone_error.proto create mode 100644 google/ads/googleads/v3/errors/url_field_error.proto create mode 100644 google/ads/googleads/v3/errors/user_data_error.proto create mode 100644 google/ads/googleads/v3/errors/user_list_error.proto create mode 100644 google/ads/googleads/v3/errors/youtube_video_registration_error.proto create mode 100644 google/ads/googleads/v3/googleads_gapic.yaml create mode 100644 google/ads/googleads/v3/googleads_grpc_service_config.json create mode 100644 google/ads/googleads/v3/googleads_v3.yaml create mode 100644 google/ads/googleads/v3/resources/account_budget.proto create mode 100644 google/ads/googleads/v3/resources/account_budget_proposal.proto create mode 100644 google/ads/googleads/v3/resources/ad.proto create mode 100644 google/ads/googleads/v3/resources/ad_group.proto create mode 100644 google/ads/googleads/v3/resources/ad_group_ad.proto create mode 100644 google/ads/googleads/v3/resources/ad_group_ad_asset_view.proto create mode 100644 google/ads/googleads/v3/resources/ad_group_ad_label.proto create mode 100644 google/ads/googleads/v3/resources/ad_group_audience_view.proto create mode 100644 google/ads/googleads/v3/resources/ad_group_bid_modifier.proto create mode 100644 google/ads/googleads/v3/resources/ad_group_criterion.proto create mode 100644 google/ads/googleads/v3/resources/ad_group_criterion_label.proto create mode 100644 google/ads/googleads/v3/resources/ad_group_criterion_simulation.proto create mode 100644 google/ads/googleads/v3/resources/ad_group_extension_setting.proto create mode 100644 google/ads/googleads/v3/resources/ad_group_feed.proto create mode 100644 google/ads/googleads/v3/resources/ad_group_label.proto create mode 100644 google/ads/googleads/v3/resources/ad_group_simulation.proto create mode 100644 google/ads/googleads/v3/resources/ad_parameter.proto create mode 100644 google/ads/googleads/v3/resources/ad_schedule_view.proto create mode 100644 google/ads/googleads/v3/resources/age_range_view.proto create mode 100644 google/ads/googleads/v3/resources/asset.proto create mode 100644 google/ads/googleads/v3/resources/bidding_strategy.proto create mode 100644 google/ads/googleads/v3/resources/billing_setup.proto create mode 100644 google/ads/googleads/v3/resources/campaign.proto create mode 100644 google/ads/googleads/v3/resources/campaign_audience_view.proto create mode 100644 google/ads/googleads/v3/resources/campaign_bid_modifier.proto create mode 100644 google/ads/googleads/v3/resources/campaign_budget.proto create mode 100644 google/ads/googleads/v3/resources/campaign_criterion.proto create mode 100644 google/ads/googleads/v3/resources/campaign_criterion_simulation.proto create mode 100644 google/ads/googleads/v3/resources/campaign_draft.proto create mode 100644 google/ads/googleads/v3/resources/campaign_experiment.proto create mode 100644 google/ads/googleads/v3/resources/campaign_extension_setting.proto create mode 100644 google/ads/googleads/v3/resources/campaign_feed.proto create mode 100644 google/ads/googleads/v3/resources/campaign_label.proto create mode 100644 google/ads/googleads/v3/resources/campaign_shared_set.proto create mode 100644 google/ads/googleads/v3/resources/carrier_constant.proto create mode 100644 google/ads/googleads/v3/resources/change_status.proto create mode 100644 google/ads/googleads/v3/resources/click_view.proto create mode 100644 google/ads/googleads/v3/resources/conversion_action.proto create mode 100644 google/ads/googleads/v3/resources/currency_constant.proto create mode 100644 google/ads/googleads/v3/resources/custom_interest.proto create mode 100644 google/ads/googleads/v3/resources/customer.proto create mode 100644 google/ads/googleads/v3/resources/customer_client.proto create mode 100644 google/ads/googleads/v3/resources/customer_client_link.proto create mode 100644 google/ads/googleads/v3/resources/customer_extension_setting.proto create mode 100644 google/ads/googleads/v3/resources/customer_feed.proto create mode 100644 google/ads/googleads/v3/resources/customer_label.proto create mode 100644 google/ads/googleads/v3/resources/customer_manager_link.proto create mode 100644 google/ads/googleads/v3/resources/customer_negative_criterion.proto create mode 100644 google/ads/googleads/v3/resources/detail_placement_view.proto create mode 100644 google/ads/googleads/v3/resources/display_keyword_view.proto create mode 100644 google/ads/googleads/v3/resources/distance_view.proto create mode 100644 google/ads/googleads/v3/resources/domain_category.proto create mode 100644 google/ads/googleads/v3/resources/dynamic_search_ads_search_term_view.proto create mode 100644 google/ads/googleads/v3/resources/expanded_landing_page_view.proto create mode 100644 google/ads/googleads/v3/resources/extension_feed_item.proto create mode 100644 google/ads/googleads/v3/resources/feed.proto create mode 100644 google/ads/googleads/v3/resources/feed_item.proto create mode 100644 google/ads/googleads/v3/resources/feed_item_target.proto create mode 100644 google/ads/googleads/v3/resources/feed_mapping.proto create mode 100644 google/ads/googleads/v3/resources/feed_placeholder_view.proto create mode 100644 google/ads/googleads/v3/resources/gender_view.proto create mode 100644 google/ads/googleads/v3/resources/geo_target_constant.proto create mode 100644 google/ads/googleads/v3/resources/geographic_view.proto create mode 100644 google/ads/googleads/v3/resources/google_ads_field.proto create mode 100644 google/ads/googleads/v3/resources/group_placement_view.proto create mode 100644 google/ads/googleads/v3/resources/hotel_group_view.proto create mode 100644 google/ads/googleads/v3/resources/hotel_performance_view.proto create mode 100644 google/ads/googleads/v3/resources/invoice.proto create mode 100644 google/ads/googleads/v3/resources/keyword_plan.proto create mode 100644 google/ads/googleads/v3/resources/keyword_plan_ad_group.proto create mode 100644 google/ads/googleads/v3/resources/keyword_plan_campaign.proto create mode 100644 google/ads/googleads/v3/resources/keyword_plan_keyword.proto create mode 100644 google/ads/googleads/v3/resources/keyword_plan_negative_keyword.proto create mode 100644 google/ads/googleads/v3/resources/keyword_view.proto create mode 100644 google/ads/googleads/v3/resources/label.proto create mode 100644 google/ads/googleads/v3/resources/landing_page_view.proto create mode 100644 google/ads/googleads/v3/resources/language_constant.proto create mode 100644 google/ads/googleads/v3/resources/location_view.proto create mode 100644 google/ads/googleads/v3/resources/managed_placement_view.proto create mode 100644 google/ads/googleads/v3/resources/media_file.proto create mode 100644 google/ads/googleads/v3/resources/merchant_center_link.proto create mode 100644 google/ads/googleads/v3/resources/mobile_app_category_constant.proto create mode 100644 google/ads/googleads/v3/resources/mobile_device_constant.proto create mode 100644 google/ads/googleads/v3/resources/mutate_job.proto create mode 100644 google/ads/googleads/v3/resources/offline_user_data_job.proto create mode 100644 google/ads/googleads/v3/resources/operating_system_version_constant.proto create mode 100644 google/ads/googleads/v3/resources/paid_organic_search_term_view.proto create mode 100644 google/ads/googleads/v3/resources/parental_status_view.proto create mode 100644 google/ads/googleads/v3/resources/payments_account.proto create mode 100644 google/ads/googleads/v3/resources/product_bidding_category_constant.proto create mode 100644 google/ads/googleads/v3/resources/product_group_view.proto create mode 100644 google/ads/googleads/v3/resources/recommendation.proto create mode 100644 google/ads/googleads/v3/resources/remarketing_action.proto create mode 100644 google/ads/googleads/v3/resources/search_term_view.proto create mode 100644 google/ads/googleads/v3/resources/shared_criterion.proto create mode 100644 google/ads/googleads/v3/resources/shared_set.proto create mode 100644 google/ads/googleads/v3/resources/shopping_performance_view.proto create mode 100644 google/ads/googleads/v3/resources/topic_constant.proto create mode 100644 google/ads/googleads/v3/resources/topic_view.proto create mode 100644 google/ads/googleads/v3/resources/user_interest.proto create mode 100644 google/ads/googleads/v3/resources/user_list.proto create mode 100644 google/ads/googleads/v3/resources/user_location_view.proto create mode 100644 google/ads/googleads/v3/resources/video.proto create mode 100644 google/ads/googleads/v3/services/account_budget_proposal_service.proto create mode 100644 google/ads/googleads/v3/services/account_budget_service.proto create mode 100644 google/ads/googleads/v3/services/ad_group_ad_asset_view_service.proto create mode 100644 google/ads/googleads/v3/services/ad_group_ad_label_service.proto create mode 100644 google/ads/googleads/v3/services/ad_group_ad_service.proto create mode 100644 google/ads/googleads/v3/services/ad_group_audience_view_service.proto create mode 100644 google/ads/googleads/v3/services/ad_group_bid_modifier_service.proto create mode 100644 google/ads/googleads/v3/services/ad_group_criterion_label_service.proto create mode 100644 google/ads/googleads/v3/services/ad_group_criterion_service.proto create mode 100644 google/ads/googleads/v3/services/ad_group_criterion_simulation_service.proto create mode 100644 google/ads/googleads/v3/services/ad_group_extension_setting_service.proto create mode 100644 google/ads/googleads/v3/services/ad_group_feed_service.proto create mode 100644 google/ads/googleads/v3/services/ad_group_label_service.proto create mode 100644 google/ads/googleads/v3/services/ad_group_service.proto create mode 100644 google/ads/googleads/v3/services/ad_group_simulation_service.proto create mode 100644 google/ads/googleads/v3/services/ad_parameter_service.proto create mode 100644 google/ads/googleads/v3/services/ad_schedule_view_service.proto create mode 100644 google/ads/googleads/v3/services/ad_service.proto create mode 100644 google/ads/googleads/v3/services/age_range_view_service.proto create mode 100644 google/ads/googleads/v3/services/asset_service.proto create mode 100644 google/ads/googleads/v3/services/bidding_strategy_service.proto create mode 100644 google/ads/googleads/v3/services/billing_setup_service.proto create mode 100644 google/ads/googleads/v3/services/campaign_audience_view_service.proto create mode 100644 google/ads/googleads/v3/services/campaign_bid_modifier_service.proto create mode 100644 google/ads/googleads/v3/services/campaign_budget_service.proto create mode 100644 google/ads/googleads/v3/services/campaign_criterion_service.proto create mode 100644 google/ads/googleads/v3/services/campaign_criterion_simulation_service.proto create mode 100644 google/ads/googleads/v3/services/campaign_draft_service.proto create mode 100644 google/ads/googleads/v3/services/campaign_experiment_service.proto create mode 100644 google/ads/googleads/v3/services/campaign_extension_setting_service.proto create mode 100644 google/ads/googleads/v3/services/campaign_feed_service.proto create mode 100644 google/ads/googleads/v3/services/campaign_label_service.proto create mode 100644 google/ads/googleads/v3/services/campaign_service.proto create mode 100644 google/ads/googleads/v3/services/campaign_shared_set_service.proto create mode 100644 google/ads/googleads/v3/services/carrier_constant_service.proto create mode 100644 google/ads/googleads/v3/services/change_status_service.proto create mode 100644 google/ads/googleads/v3/services/click_view_service.proto create mode 100644 google/ads/googleads/v3/services/conversion_action_service.proto create mode 100644 google/ads/googleads/v3/services/conversion_adjustment_upload_service.proto create mode 100644 google/ads/googleads/v3/services/conversion_upload_service.proto create mode 100644 google/ads/googleads/v3/services/currency_constant_service.proto create mode 100644 google/ads/googleads/v3/services/custom_interest_service.proto create mode 100644 google/ads/googleads/v3/services/customer_client_link_service.proto create mode 100644 google/ads/googleads/v3/services/customer_client_service.proto create mode 100644 google/ads/googleads/v3/services/customer_extension_setting_service.proto create mode 100644 google/ads/googleads/v3/services/customer_feed_service.proto create mode 100644 google/ads/googleads/v3/services/customer_label_service.proto create mode 100644 google/ads/googleads/v3/services/customer_manager_link_service.proto create mode 100644 google/ads/googleads/v3/services/customer_negative_criterion_service.proto create mode 100644 google/ads/googleads/v3/services/customer_service.proto create mode 100644 google/ads/googleads/v3/services/detail_placement_view_service.proto create mode 100644 google/ads/googleads/v3/services/display_keyword_view_service.proto create mode 100644 google/ads/googleads/v3/services/distance_view_service.proto create mode 100644 google/ads/googleads/v3/services/domain_category_service.proto create mode 100644 google/ads/googleads/v3/services/dynamic_search_ads_search_term_view_service.proto create mode 100644 google/ads/googleads/v3/services/expanded_landing_page_view_service.proto create mode 100644 google/ads/googleads/v3/services/extension_feed_item_service.proto create mode 100644 google/ads/googleads/v3/services/feed_item_service.proto create mode 100644 google/ads/googleads/v3/services/feed_item_target_service.proto create mode 100644 google/ads/googleads/v3/services/feed_mapping_service.proto create mode 100644 google/ads/googleads/v3/services/feed_placeholder_view_service.proto create mode 100644 google/ads/googleads/v3/services/feed_service.proto create mode 100644 google/ads/googleads/v3/services/gender_view_service.proto create mode 100644 google/ads/googleads/v3/services/geo_target_constant_service.proto create mode 100644 google/ads/googleads/v3/services/geographic_view_service.proto create mode 100644 google/ads/googleads/v3/services/google_ads_field_service.proto create mode 100644 google/ads/googleads/v3/services/google_ads_service.proto create mode 100644 google/ads/googleads/v3/services/group_placement_view_service.proto create mode 100644 google/ads/googleads/v3/services/hotel_group_view_service.proto create mode 100644 google/ads/googleads/v3/services/hotel_performance_view_service.proto create mode 100644 google/ads/googleads/v3/services/invoice_service.proto create mode 100644 google/ads/googleads/v3/services/keyword_plan_ad_group_service.proto create mode 100644 google/ads/googleads/v3/services/keyword_plan_campaign_service.proto create mode 100644 google/ads/googleads/v3/services/keyword_plan_idea_service.proto create mode 100644 google/ads/googleads/v3/services/keyword_plan_keyword_service.proto create mode 100644 google/ads/googleads/v3/services/keyword_plan_negative_keyword_service.proto create mode 100644 google/ads/googleads/v3/services/keyword_plan_service.proto create mode 100644 google/ads/googleads/v3/services/keyword_view_service.proto create mode 100644 google/ads/googleads/v3/services/label_service.proto create mode 100644 google/ads/googleads/v3/services/landing_page_view_service.proto create mode 100644 google/ads/googleads/v3/services/language_constant_service.proto create mode 100644 google/ads/googleads/v3/services/location_view_service.proto create mode 100644 google/ads/googleads/v3/services/managed_placement_view_service.proto create mode 100644 google/ads/googleads/v3/services/media_file_service.proto create mode 100644 google/ads/googleads/v3/services/merchant_center_link_service.proto create mode 100644 google/ads/googleads/v3/services/mobile_app_category_constant_service.proto create mode 100644 google/ads/googleads/v3/services/mobile_device_constant_service.proto create mode 100644 google/ads/googleads/v3/services/mutate_job_service.proto create mode 100644 google/ads/googleads/v3/services/offline_user_data_job_service.proto create mode 100644 google/ads/googleads/v3/services/operating_system_version_constant_service.proto create mode 100644 google/ads/googleads/v3/services/paid_organic_search_term_view_service.proto create mode 100644 google/ads/googleads/v3/services/parental_status_view_service.proto create mode 100644 google/ads/googleads/v3/services/payments_account_service.proto create mode 100644 google/ads/googleads/v3/services/product_bidding_category_constant_service.proto create mode 100644 google/ads/googleads/v3/services/product_group_view_service.proto create mode 100644 google/ads/googleads/v3/services/reach_plan_service.proto create mode 100644 google/ads/googleads/v3/services/recommendation_service.proto create mode 100644 google/ads/googleads/v3/services/remarketing_action_service.proto create mode 100644 google/ads/googleads/v3/services/search_term_view_service.proto create mode 100644 google/ads/googleads/v3/services/shared_criterion_service.proto create mode 100644 google/ads/googleads/v3/services/shared_set_service.proto create mode 100644 google/ads/googleads/v3/services/shopping_performance_view_service.proto create mode 100644 google/ads/googleads/v3/services/topic_constant_service.proto create mode 100644 google/ads/googleads/v3/services/topic_view_service.proto create mode 100644 google/ads/googleads/v3/services/user_data_service.proto create mode 100644 google/ads/googleads/v3/services/user_interest_service.proto create mode 100644 google/ads/googleads/v3/services/user_list_service.proto create mode 100644 google/ads/googleads/v3/services/user_location_view_service.proto create mode 100644 google/ads/googleads/v3/services/video_service.proto create mode 100644 google/analytics/management/v1alpha/BUILD.bazel create mode 100644 google/analytics/management/v1alpha/analyticsmanagement_gapic.yaml create mode 100644 google/analytics/management/v1alpha/analyticsmanagement_v1alpha.yaml create mode 100644 google/analytics/management/v1alpha/management_api.proto create mode 100644 google/analytics/management/v1alpha/management_grpc_service_config.json create mode 100644 google/analytics/management/v1alpha/resources.proto delete mode 100644 google/api/expr/artman_cel.yaml delete mode 100644 google/api/expr/v1alpha1/cel_service.proto create mode 100644 google/api/servicecontrol/v1/BUILD.bazel delete mode 100644 google/api/servicemanagement/servicemanagement_v1.yaml create mode 100644 google/api/servicemanagement/v1/BUILD.bazel create mode 100644 google/api/servicemanagement/v1/servicemanagement_gapic.legacy.yaml create mode 100755 google/api/servicemanagement/v1/servicemanagement_grpc_service_config.json create mode 100644 google/api/servicemanagement/v1/servicemanagement_v1.yaml create mode 100644 google/bigtable/admin/artman_bigtableadmin.legacy.yaml create mode 100644 google/bigtable/admin/v2/bigtableadmin_gapic.legacy.yaml create mode 100755 google/bigtable/admin/v2/bigtableadmin_grpc_service_config.json rename google/bigtable/admin/{bigtableadmin.yaml => v2/bigtableadmin_v2.yaml} (52%) create mode 100644 google/bigtable/v2/bigtable_gapic.legacy.yaml create mode 100755 google/bigtable/v2/bigtable_grpc_service_config.json rename google/bigtable/{bigtable.yaml => v2/bigtable_v2.yaml} (60%) create mode 100644 google/chromeos/moblab/BUILD.bazel create mode 100644 google/chromeos/moblab/v1beta1/BUILD.bazel create mode 100644 google/chromeos/moblab/v1beta1/build_service.proto create mode 100644 google/chromeos/moblab/v1beta1/chromeosmoblab_gapic.yaml create mode 100644 google/chromeos/moblab/v1beta1/chromeosmoblab_v1beta1.yaml create mode 100644 google/chromeos/moblab/v1beta1/moblab_grpc_service_config.json create mode 100644 google/chromeos/moblab/v1beta1/resources.proto create mode 100644 google/cloud/BUILD.bazel create mode 100644 google/cloud/accessapproval/v1/BUILD.bazel create mode 100644 google/cloud/accessapproval/v1/accessapproval.proto create mode 100644 google/cloud/accessapproval/v1/accessapproval_gapic.yaml create mode 100644 google/cloud/accessapproval/v1/accessapproval_v1.yaml create mode 100644 google/cloud/asset/artman_cloudasset_v1p2beta1.yaml create mode 100644 google/cloud/asset/asset_v1p2beta1.yaml create mode 100644 google/cloud/asset/v1/BUILD.bazel create mode 100644 google/cloud/asset/v1/cloudasset_gapic.legacy.yaml create mode 100755 google/cloud/asset/v1/cloudasset_grpc_service_config.json create mode 100644 google/cloud/asset/v1/cloudasset_v1.yaml create mode 100644 google/cloud/asset/v1beta1/cloudasset_gapic.legacy.yaml create mode 100755 google/cloud/asset/v1beta1/cloudasset_grpc_service_config.json rename google/cloud/asset/{asset_v1.yaml => v1beta1/cloudasset_v1beta1.yaml} (55%) create mode 100644 google/cloud/asset/v1p1beta1/BUILD.bazel create mode 100644 google/cloud/asset/v1p1beta1/artman_cloudasset_v1p1beta1.yaml create mode 100644 google/cloud/asset/v1p1beta1/asset_service.proto create mode 100644 google/cloud/asset/v1p1beta1/assets.proto create mode 100644 google/cloud/asset/v1p1beta1/cloudasset_gapic.legacy.yaml create mode 100644 google/cloud/asset/v1p1beta1/cloudasset_gapic.yaml create mode 100755 google/cloud/asset/v1p1beta1/cloudasset_grpc_service_config.json create mode 100644 google/cloud/asset/v1p1beta1/cloudasset_v1p1beta1.yaml create mode 100644 google/cloud/asset/v1p2beta1/BUILD.bazel create mode 100644 google/cloud/asset/v1p2beta1/asset_service.proto create mode 100644 google/cloud/asset/v1p2beta1/assets.proto create mode 100644 google/cloud/asset/v1p2beta1/cloudasset_gapic.legacy.yaml create mode 100644 google/cloud/asset/v1p2beta1/cloudasset_gapic.yaml create mode 100755 google/cloud/asset/v1p2beta1/cloudasset_grpc_service_config.json create mode 100644 google/cloud/asset/v1p2beta1/cloudasset_v1p2beta1.yaml create mode 100644 google/cloud/asset/v1p4beta1/BUILD.bazel create mode 100644 google/cloud/asset/v1p4beta1/asset_service.proto create mode 100644 google/cloud/asset/v1p4beta1/assets.proto create mode 100644 google/cloud/asset/v1p4beta1/cloudasset_gapic.legacy.yaml create mode 100644 google/cloud/asset/v1p4beta1/cloudasset_gapic.yaml create mode 100644 google/cloud/asset/v1p4beta1/cloudasset_grpc_service_config.json create mode 100644 google/cloud/asset/v1p4beta1/cloudasset_v1p4beta1.yaml create mode 100644 google/cloud/automl/artman_automl_v1.yaml create mode 100644 google/cloud/automl/automl_v1.yaml create mode 100644 google/cloud/automl/v1/BUILD.bazel create mode 100644 google/cloud/automl/v1/annotation_payload.proto create mode 100644 google/cloud/automl/v1/annotation_spec.proto create mode 100644 google/cloud/automl/v1/automl_gapic.legacy.yaml create mode 100644 google/cloud/automl/v1/automl_gapic.yaml create mode 100644 google/cloud/automl/v1/automl_grpc_service_config.json create mode 100644 google/cloud/automl/v1/automl_v1.yaml create mode 100644 google/cloud/automl/v1/classification.proto create mode 100644 google/cloud/automl/v1/data_items.proto create mode 100644 google/cloud/automl/v1/dataset.proto create mode 100644 google/cloud/automl/v1/detection.proto create mode 100644 google/cloud/automl/v1/geometry.proto create mode 100644 google/cloud/automl/v1/image.proto create mode 100644 google/cloud/automl/v1/io.proto create mode 100644 google/cloud/automl/v1/model.proto create mode 100644 google/cloud/automl/v1/model_evaluation.proto create mode 100644 google/cloud/automl/v1/operations.proto create mode 100644 google/cloud/automl/v1/prediction_service.proto create mode 100644 google/cloud/automl/v1/service.proto create mode 100644 google/cloud/automl/v1/text.proto create mode 100644 google/cloud/automl/v1/text_extraction.proto create mode 100644 google/cloud/automl/v1/text_segment.proto create mode 100644 google/cloud/automl/v1/text_sentiment.proto create mode 100644 google/cloud/automl/v1/translation.proto create mode 100644 google/cloud/automl/v1beta1/automl_gapic.legacy.yaml create mode 100755 google/cloud/automl/v1beta1/automl_grpc_service_config.json create mode 100644 google/cloud/automl/v1beta1/automl_v1beta1.yaml create mode 100644 google/cloud/bigquery/connection/v1/BUILD.bazel create mode 100755 google/cloud/bigquery/connection/v1/bigqueryconnection_grpc_service_config.json create mode 100644 google/cloud/bigquery/connection/v1/bigqueryconnection_v1.yaml create mode 100644 google/cloud/bigquery/connection/v1/connection.proto create mode 100644 google/cloud/bigquery/connection/v1beta1/BUILD.bazel create mode 100644 google/cloud/bigquery/connection/v1beta1/artman_bigqueryconnection_v1beta1.yaml create mode 100644 google/cloud/bigquery/connection/v1beta1/bigqueryconnection_gapic.legacy.yaml create mode 100644 google/cloud/bigquery/connection/v1beta1/bigqueryconnection_gapic.yaml create mode 100755 google/cloud/bigquery/connection/v1beta1/bigqueryconnection_grpc_service_config.json create mode 100644 google/cloud/bigquery/connection/v1beta1/bigqueryconnection_v1beta1.yaml create mode 100644 google/cloud/bigquery/connection/v1beta1/connection.proto delete mode 100644 google/cloud/bigquery/datatransfer/datatransfer.yaml create mode 100644 google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.legacy.yaml create mode 100755 google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_grpc_service_config.json rename google/cloud/bigquery/datatransfer/{bigquerydatatransfer.yaml => v1/bigquerydatatransfer_v1.yaml} (100%) delete mode 100644 google/cloud/bigquery/datatransfer/v1/datasource.proto create mode 100644 google/cloud/bigquery/reservation/v1/BUILD.bazel create mode 100644 google/cloud/bigquery/reservation/v1/bigqueryreservation_gapic.legacy.yaml create mode 100644 google/cloud/bigquery/reservation/v1/bigqueryreservation_gapic.yaml create mode 100755 google/cloud/bigquery/reservation/v1/bigqueryreservation_grpc_service_config.json create mode 100644 google/cloud/bigquery/reservation/v1/bigqueryreservation_v1.yaml create mode 100644 google/cloud/bigquery/reservation/v1/reservation.proto create mode 100644 google/cloud/bigquery/reservation/v1beta1/BUILD.bazel create mode 100644 google/cloud/bigquery/reservation/v1beta1/artman_bigqueryreservation_v1beta1.yaml create mode 100644 google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_gapic.legacy.yaml create mode 100644 google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_gapic.yaml create mode 100755 google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_grpc_service_config.json create mode 100644 google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_v1beta1.yaml create mode 100644 google/cloud/bigquery/reservation/v1beta1/reservation.proto create mode 100644 google/cloud/bigquery/storage/artman_bigquerystorage_v1.yaml create mode 100644 google/cloud/bigquery/storage/artman_bigquerystorage_v1alpha2.yaml create mode 100644 google/cloud/bigquery/storage/artman_bigquerystorage_v1beta2.yaml create mode 100644 google/cloud/bigquery/storage/v1/BUILD.bazel create mode 100644 google/cloud/bigquery/storage/v1/arrow.proto create mode 100644 google/cloud/bigquery/storage/v1/avro.proto create mode 100644 google/cloud/bigquery/storage/v1/bigquerystorage_gapic.legacy.yaml create mode 100644 google/cloud/bigquery/storage/v1/bigquerystorage_gapic.yaml create mode 100644 google/cloud/bigquery/storage/v1/bigquerystorage_grpc_service_config.json create mode 100644 google/cloud/bigquery/storage/v1/bigquerystorage_v1.yaml create mode 100644 google/cloud/bigquery/storage/v1/storage.proto create mode 100644 google/cloud/bigquery/storage/v1/stream.proto create mode 100644 google/cloud/bigquery/storage/v1alpha2/BUILD.bazel create mode 100644 google/cloud/bigquery/storage/v1alpha2/bigquerystorage_gapic.legacy.yaml create mode 100644 google/cloud/bigquery/storage/v1alpha2/bigquerystorage_gapic.yaml create mode 100644 google/cloud/bigquery/storage/v1alpha2/bigquerystorage_grpc_service_config.json create mode 100644 google/cloud/bigquery/storage/v1alpha2/bigquerystorage_v1alpha2.yaml create mode 100644 google/cloud/bigquery/storage/v1alpha2/protobuf.proto create mode 100644 google/cloud/bigquery/storage/v1alpha2/storage.proto create mode 100644 google/cloud/bigquery/storage/v1alpha2/stream.proto create mode 100644 google/cloud/bigquery/storage/v1alpha2/table.proto create mode 100644 google/cloud/bigquery/storage/v1beta1/bigquerystorage_grpc_service_config.json rename google/cloud/bigquery/storage/{storage_v1beta1.yaml => v1beta1/bigquerystorage_v1beta1.yaml} (60%) create mode 100644 google/cloud/bigquery/storage/v1beta2/BUILD.bazel create mode 100644 google/cloud/bigquery/storage/v1beta2/arrow.proto create mode 100644 google/cloud/bigquery/storage/v1beta2/avro.proto create mode 100644 google/cloud/bigquery/storage/v1beta2/bigquerystorage_gapic.legacy.yaml create mode 100644 google/cloud/bigquery/storage/v1beta2/bigquerystorage_gapic.yaml create mode 100644 google/cloud/bigquery/storage/v1beta2/bigquerystorage_grpc_service_config.json create mode 100644 google/cloud/bigquery/storage/v1beta2/bigquerystorage_v1beta2.yaml create mode 100644 google/cloud/bigquery/storage/v1beta2/storage.proto create mode 100644 google/cloud/bigquery/storage/v1beta2/stream.proto create mode 100644 google/cloud/bigquery/v2/BUILD.bazel create mode 100644 google/cloud/bigquery/v2/bigquery_gapic.legacy.yaml create mode 100755 google/cloud/bigquery/v2/bigquery_grpc_service_config.json create mode 100644 google/cloud/bigquery/v2/bigquery_v2.yaml create mode 100644 google/cloud/bigquery/v2/encryption_config.proto rename google/cloud/{videointelligence/artman_videointelligence_v1beta1.yaml => billing/budgets/artman_billingbudgets_v1beta1.yaml} (78%) create mode 100644 google/cloud/billing/budgets/v1alpha1/BUILD.bazel create mode 100644 google/cloud/billing/budgets/v1alpha1/billingbudgets.yaml create mode 100644 google/cloud/billing/budgets/v1alpha1/billingbudgets_grpc_service_config.json create mode 100644 google/cloud/billing/budgets/v1alpha1/budget_model.proto create mode 100644 google/cloud/billing/budgets/v1alpha1/budget_service.proto create mode 100644 google/cloud/billing/budgets/v1beta1/BUILD.bazel create mode 100644 google/cloud/billing/budgets/v1beta1/billingbudgets.yaml create mode 100644 google/cloud/billing/budgets/v1beta1/billingbudgets_gapic.yaml create mode 100644 google/cloud/billing/budgets/v1beta1/billingbudgets_grpc_service_config.json create mode 100644 google/cloud/billing/budgets/v1beta1/budget_model.proto create mode 100644 google/cloud/billing/budgets/v1beta1/budget_service.proto create mode 100644 google/cloud/billing/v1/BUILD.bazel create mode 100644 google/cloud/billing/v1/cloud_billing_gapic.yaml create mode 100644 google/cloud/billing/v1/cloud_billing_grpc_service_config.json create mode 100644 google/cloud/billing/v1/cloud_catalog.proto create mode 100644 google/cloud/billing/v1/cloud_catalog_grpc_service_config.json create mode 100644 google/cloud/billing/v1/cloudbilling.yaml create mode 100644 google/cloud/binaryauthorization/v1beta1/BUILD.bazel create mode 100644 google/cloud/binaryauthorization/v1beta1/binaryauthorization_gapic.legacy.yaml create mode 100755 google/cloud/binaryauthorization/v1beta1/binaryauthorization_grpc_service_config.json rename google/cloud/binaryauthorization/{ => v1beta1}/binaryauthorization_v1beta1.yaml (68%) create mode 100644 google/cloud/common_resources.proto create mode 100644 google/cloud/datacatalog/v1/BUILD.bazel create mode 100644 google/cloud/datacatalog/v1/common.proto create mode 100644 google/cloud/datacatalog/v1/datacatalog.proto create mode 100644 google/cloud/datacatalog/v1/datacatalog_gapic.yaml create mode 100755 google/cloud/datacatalog/v1/datacatalog_grpc_service_config.json rename google/cloud/datacatalog/{datacatalog_v1beta1.yaml => v1/datacatalog_v1.yaml} (86%) create mode 100644 google/cloud/datacatalog/v1/gcs_fileset_spec.proto create mode 100644 google/cloud/datacatalog/v1/schema.proto create mode 100644 google/cloud/datacatalog/v1/search.proto create mode 100644 google/cloud/datacatalog/v1/table_spec.proto create mode 100644 google/cloud/datacatalog/v1/tags.proto create mode 100644 google/cloud/datacatalog/v1/timestamps.proto create mode 100644 google/cloud/datacatalog/v1beta1/BUILD.bazel rename google/cloud/datacatalog/{ => v1beta1}/artman_datacatalog_v1beta1.yaml (91%) create mode 100644 google/cloud/datacatalog/v1beta1/common.proto create mode 100644 google/cloud/datacatalog/v1beta1/datacatalog_gapic.legacy.yaml create mode 100755 google/cloud/datacatalog/v1beta1/datacatalog_grpc_service_config.json create mode 100644 google/cloud/datacatalog/v1beta1/datacatalog_v1beta1.yaml create mode 100644 google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto create mode 100644 google/cloud/datacatalog/v1beta1/policytagmanager.proto create mode 100644 google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto create mode 100644 google/cloud/datacatalog/v1beta1/samples/datacatalog_get_entry.test.yaml create mode 100644 google/cloud/datacatalog/v1beta1/samples/datacatalog_lookup_entry.test.yaml create mode 100644 google/cloud/datacatalog/v1beta1/samples/datacatalog_lookup_entry_sql_resource.test.yaml create mode 100644 google/cloud/datacatalog/v1beta1/samples/datacatalog_search.test.yaml create mode 100644 google/cloud/datalabeling/BUILD.bazel create mode 100644 google/cloud/datalabeling/v1beta1/BUILD.bazel create mode 100644 google/cloud/datalabeling/v1beta1/datalabeling_gapic.legacy.yaml create mode 100755 google/cloud/datalabeling/v1beta1/datalabeling_grpc_service_config.json rename google/cloud/datalabeling/{ => v1beta1}/datalabeling_v1beta1.yaml (97%) create mode 100644 google/cloud/dataproc/v1/autoscaling_policies.proto create mode 100644 google/cloud/dataproc/v1/dataproc_gapic.legacy.yaml create mode 100755 google/cloud/dataproc/v1/dataproc_grpc_service_config.json create mode 100644 google/cloud/dataproc/v1/dataproc_v1.yaml create mode 100644 google/cloud/dataproc/v1beta2/dataproc_gapic.legacy.yaml create mode 100755 google/cloud/dataproc/v1beta2/dataproc_grpc_service_config.json create mode 100644 google/cloud/dataproc/v1beta2/dataproc_v1beta2.yaml rename google/cloud/dialogflow/{ => v2}/artman_dialogflow_v2.yaml (92%) create mode 100644 google/cloud/dialogflow/v2/dialogflow_gapic.legacy.yaml create mode 100755 google/cloud/dialogflow/v2/dialogflow_grpc_service_config.json rename google/cloud/dialogflow/{ => v2}/dialogflow_v2.yaml (59%) create mode 100644 google/cloud/dialogflow/v2/environment.proto create mode 100644 google/cloud/dialogflow/v2/validation_result.proto rename google/cloud/dialogflow/{ => v2beta1}/artman_dialogflow_v2beta1.yaml (90%) rename google/cloud/dialogflow/{ => v2beta1}/artman_dialogflow_v2beta1_java.yaml (83%) create mode 100755 google/cloud/dialogflow/v2beta1/dialogflow_grpc_service_config.json rename google/cloud/dialogflow/{ => v2beta1}/dialogflow_v2beta1.yaml (66%) create mode 100644 google/cloud/dialogflow/v2beta1/environment.proto create mode 100644 google/cloud/dialogflow/v2beta1/gcs.proto create mode 100644 google/cloud/dialogflow/v2beta1/validation_result.proto create mode 100644 google/cloud/documentai/BUILD.bazel rename google/cloud/{texttospeech/artman_texttospeech.yaml => documentai/artman_documentai_v1beta1.yaml} (78%) create mode 100644 google/cloud/documentai/documentai_v1beta1.yaml create mode 100644 google/cloud/documentai/v1beta1/BUILD.bazel create mode 100644 google/cloud/documentai/v1beta1/document.proto create mode 100644 google/cloud/documentai/v1beta1/document_understanding.proto create mode 100644 google/cloud/documentai/v1beta1/documentai_gapic.legacy.yaml create mode 100644 google/cloud/documentai/v1beta1/documentai_gapic.yaml create mode 100755 google/cloud/documentai/v1beta1/documentai_grpc_service_config.json create mode 100644 google/cloud/documentai/v1beta1/geometry.proto create mode 100644 google/cloud/documentai/v1beta2/BUILD.bazel create mode 100644 google/cloud/documentai/v1beta2/document.proto create mode 100644 google/cloud/documentai/v1beta2/document_understanding.proto create mode 100644 google/cloud/documentai/v1beta2/documentai_gapic.legacy.yaml create mode 100644 google/cloud/documentai/v1beta2/documentai_gapic.yaml create mode 100644 google/cloud/documentai/v1beta2/documentai_v1beta2.yaml create mode 100644 google/cloud/documentai/v1beta2/documentai_v1beta2_grpc_service_config.json create mode 100644 google/cloud/documentai/v1beta2/geometry.proto delete mode 100644 google/cloud/functions/functions.yaml create mode 100644 google/cloud/functions/v1beta2/BUILD.bazel create mode 100644 google/cloud/functions/v1beta2/cloudfunctions_v1beta2.yaml create mode 100644 google/cloud/functions/v1beta2/functions_gapic.legacy.yaml create mode 100755 google/cloud/functions/v1beta2/functions_grpc_service_config.json create mode 100644 google/cloud/gaming/v1beta/BUILD.bazel create mode 100644 google/cloud/gaming/v1beta/common.proto create mode 100644 google/cloud/gaming/v1beta/game_server_clusters.proto create mode 100644 google/cloud/gaming/v1beta/game_server_clusters_service.proto create mode 100644 google/cloud/gaming/v1beta/game_server_configs.proto create mode 100644 google/cloud/gaming/v1beta/game_server_configs_service.proto create mode 100644 google/cloud/gaming/v1beta/game_server_deployments.proto create mode 100644 google/cloud/gaming/v1beta/game_server_deployments_service.proto create mode 100644 google/cloud/gaming/v1beta/gameservices_v1beta.yaml create mode 100644 google/cloud/gaming/v1beta/gaming_gapic.yaml create mode 100644 google/cloud/gaming/v1beta/realms.proto create mode 100644 google/cloud/gaming/v1beta/realms_service.proto create mode 100644 google/cloud/iot/v1/cloudiot_gapic.legacy.yaml create mode 100755 google/cloud/iot/v1/cloudiot_grpc_service_config.json rename google/cloud/iot/{cloudiot.yaml => v1/cloudiot_v1.yaml} (73%) create mode 100644 google/cloud/irm/BUILD.bazel create mode 100644 google/cloud/irm/v1alpha2/BUILD.bazel create mode 100644 google/cloud/irm/v1alpha2/irm_gapic.legacy.yaml create mode 100755 google/cloud/irm/v1alpha2/irm_grpc_service_config.json create mode 100644 google/cloud/irm/v1alpha2/irm_v1alpha2.yaml create mode 100644 google/cloud/kms/v1/cloudkms_gapic.legacy.yaml create mode 100755 google/cloud/kms/v1/cloudkms_grpc_service_config.json rename google/cloud/kms/{cloudkms.yaml => v1/cloudkms_v1.yaml} (96%) delete mode 100644 google/cloud/language/v1/language.tests.yaml create mode 100644 google/cloud/language/v1/language_gapic.legacy.yaml create mode 100755 google/cloud/language/v1/language_grpc_service_config.json create mode 100644 google/cloud/language/v1/samples/language_classify_gcs.yaml create mode 100644 google/cloud/language/v1/samples/language_classify_text.yaml create mode 100644 google/cloud/language/v1/samples/language_entities_gcs.yaml create mode 100644 google/cloud/language/v1/samples/language_entities_text.yaml create mode 100644 google/cloud/language/v1/samples/language_entity_sentiment_gcs.yaml create mode 100644 google/cloud/language/v1/samples/language_entity_sentiment_text.yaml create mode 100644 google/cloud/language/v1/samples/language_sentiment_gcs.yaml create mode 100644 google/cloud/language/v1/samples/language_sentiment_text.yaml create mode 100644 google/cloud/language/v1/samples/language_syntax_gcs.yaml create mode 100644 google/cloud/language/v1/samples/language_syntax_text.yaml create mode 100644 google/cloud/language/v1/samples/test/analyzing_entities.test.yaml create mode 100644 google/cloud/language/v1/samples/test/analyzing_entity_sentiment.test.yaml create mode 100644 google/cloud/language/v1/samples/test/analyzing_sentiment.test.yaml create mode 100644 google/cloud/language/v1/samples/test/analyzing_syntax.test.yaml create mode 100644 google/cloud/language/v1/samples/test/classifying_content.test.yaml rename google/cloud/language/v1beta1/{language_gapic.yaml => language_gapic.legacy.yaml} (100%) create mode 100644 google/cloud/language/v1beta2/language_gapic.legacy.yaml create mode 100755 google/cloud/language/v1beta2/language_grpc_service_config.json create mode 100644 google/cloud/language/v1beta2/language_v1beta2.yaml create mode 100644 google/cloud/managedidentities/v1/BUILD.bazel create mode 100644 google/cloud/managedidentities/v1/artman_managedidentities_v1.yaml create mode 100644 google/cloud/managedidentities/v1/managed_identities_service.proto create mode 100644 google/cloud/managedidentities/v1/managedidentities_gapic.yaml create mode 100644 google/cloud/managedidentities/v1/managedidentities_grpc_service_config.json create mode 100644 google/cloud/managedidentities/v1/managedidentities_v1.yaml create mode 100644 google/cloud/managedidentities/v1/resource.proto create mode 100644 google/cloud/managedidentities/v1beta1/BUILD.bazel create mode 100644 google/cloud/managedidentities/v1beta1/artman_managedidentities_v1beta1.yaml create mode 100644 google/cloud/managedidentities/v1beta1/managed_identities_service.proto create mode 100644 google/cloud/managedidentities/v1beta1/managedidentities_gapic.legacy.yaml create mode 100644 google/cloud/managedidentities/v1beta1/managedidentities_gapic.yaml create mode 100644 google/cloud/managedidentities/v1beta1/managedidentities_v1beta1.yaml create mode 100644 google/cloud/managedidentities/v1beta1/resource.proto create mode 100644 google/cloud/mediatranslation/v1beta1/BUILD.bazel create mode 100644 google/cloud/mediatranslation/v1beta1/media_translation.proto create mode 100644 google/cloud/mediatranslation/v1beta1/mediatranslation_gapic.yaml create mode 100644 google/cloud/mediatranslation/v1beta1/mediatranslation_grpc_service_config.json create mode 100644 google/cloud/mediatranslation/v1beta1/mediatranslation_v1beta1.yaml create mode 100644 google/cloud/memcache/v1beta2/BUILD.bazel create mode 100644 google/cloud/memcache/v1beta2/cloud_memcache.proto create mode 100644 google/cloud/memcache/v1beta2/memcache_gapic.yaml create mode 100644 google/cloud/memcache/v1beta2/memcache_grpc_service_config.json create mode 100644 google/cloud/memcache/v1beta2/memcache_v1beta2.yaml create mode 100644 google/cloud/orgpolicy/v1/BUILD.bazel create mode 100644 google/cloud/orgpolicy/v1/orgpolicy.proto create mode 100644 google/cloud/osconfig/agentendpoint/v1/BUILD.bazel create mode 100644 google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto create mode 100644 google/cloud/osconfig/agentendpoint/v1/agentendpoint_grpc_service_config.json create mode 100644 google/cloud/osconfig/agentendpoint/v1/osconfig_gapic.legacy.yaml create mode 100644 google/cloud/osconfig/agentendpoint/v1/osconfig_gapic.yaml create mode 100644 google/cloud/osconfig/agentendpoint/v1/osconfig_v1.yaml create mode 100644 google/cloud/osconfig/agentendpoint/v1/patch_jobs.proto create mode 100644 google/cloud/osconfig/agentendpoint/v1/tasks.proto create mode 100644 google/cloud/osconfig/agentendpoint/v1beta/BUILD.bazel create mode 100644 google/cloud/osconfig/agentendpoint/v1beta/agentendpoint.proto create mode 100644 google/cloud/osconfig/agentendpoint/v1beta/agentendpoint_grpc_service_config.json create mode 100644 google/cloud/osconfig/agentendpoint/v1beta/artman_osconfig_v1beta.yaml create mode 100644 google/cloud/osconfig/agentendpoint/v1beta/guest_policies.proto create mode 100644 google/cloud/osconfig/agentendpoint/v1beta/osconfig_gapic.legacy.yaml create mode 100644 google/cloud/osconfig/agentendpoint/v1beta/osconfig_gapic.yaml create mode 100644 google/cloud/osconfig/agentendpoint/v1beta/osconfig_v1beta.yaml create mode 100644 google/cloud/osconfig/agentendpoint/v1beta/patch_jobs.proto create mode 100644 google/cloud/osconfig/agentendpoint/v1beta/tasks.proto create mode 100644 google/cloud/osconfig/v1/BUILD.bazel create mode 100644 google/cloud/osconfig/v1/osconfig_gapic.legacy.yaml create mode 100644 google/cloud/osconfig/v1/osconfig_gapic.yaml create mode 100644 google/cloud/osconfig/v1/osconfig_grpc_service_config.json create mode 100644 google/cloud/osconfig/v1/osconfig_service.proto create mode 100644 google/cloud/osconfig/v1/osconfig_v1.yaml create mode 100644 google/cloud/osconfig/v1/patch_deployments.proto create mode 100644 google/cloud/osconfig/v1/patch_jobs.proto create mode 100644 google/cloud/osconfig/v1beta/BUILD.bazel create mode 100644 google/cloud/osconfig/v1beta/artman_osconfig_v1beta.yaml create mode 100644 google/cloud/osconfig/v1beta/guest_policies.proto create mode 100644 google/cloud/osconfig/v1beta/osconfig_gapic.legacy.yaml create mode 100644 google/cloud/osconfig/v1beta/osconfig_gapic.yaml create mode 100644 google/cloud/osconfig/v1beta/osconfig_grpc_service_config.json create mode 100644 google/cloud/osconfig/v1beta/osconfig_service.proto create mode 100644 google/cloud/osconfig/v1beta/osconfig_v1beta.yaml create mode 100644 google/cloud/osconfig/v1beta/patch_deployments.proto create mode 100644 google/cloud/osconfig/v1beta/patch_jobs.proto delete mode 100644 google/cloud/oslogin/oslogin_v1.yaml create mode 100644 google/cloud/oslogin/v1/oslogin_gapic.legacy.yaml create mode 100644 google/cloud/oslogin/v1/oslogin_grpc_service_config.json create mode 100644 google/cloud/oslogin/v1/oslogin_v1.yaml create mode 100644 google/cloud/oslogin/v1beta/oslogin_grpc_service_config.json create mode 100644 google/cloud/oslogin/v1beta/oslogin_v1beta.yaml create mode 100644 google/cloud/phishingprotection/v1beta1/BUILD.bazel create mode 100644 google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.legacy.yaml create mode 100755 google/cloud/phishingprotection/v1beta1/phishingprotection_grpc_service_config.json rename google/cloud/phishingprotection/{phishingprotection.yaml => v1beta1/phishingprotection_v1beta1.yaml} (75%) create mode 100644 google/cloud/policytroubleshooter/v1/checker.proto create mode 100644 google/cloud/policytroubleshooter/v1/checker_grpc_service_config.json create mode 100644 google/cloud/policytroubleshooter/v1/explanations.proto create mode 100644 google/cloud/policytroubleshooter/v1/policytroubleshooter_v1.yaml create mode 100644 google/cloud/recaptchaenterprise/BUILD.bazel create mode 100644 google/cloud/recaptchaenterprise/v1/BUILD.bazel create mode 100644 google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto create mode 100644 google/cloud/recaptchaenterprise/v1/recaptchaenterprise_gapic.yaml create mode 100755 google/cloud/recaptchaenterprise/v1/recaptchaenterprise_grpc_service_config.json create mode 100644 google/cloud/recaptchaenterprise/v1/recaptchaenterprise_v1.yaml create mode 100644 google/cloud/recaptchaenterprise/v1beta1/BUILD.bazel create mode 100644 google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.legacy.yaml create mode 100755 google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_grpc_service_config.json rename google/cloud/recaptchaenterprise/{ => v1beta1}/recaptchaenterprise_v1beta1.yaml (51%) create mode 100644 google/cloud/recommendationengine/v1beta1/BUILD.bazel create mode 100644 google/cloud/recommendationengine/v1beta1/artman_recommendationengine_v1beta1.yaml create mode 100644 google/cloud/recommendationengine/v1beta1/catalog.proto create mode 100644 google/cloud/recommendationengine/v1beta1/catalog_service.proto create mode 100644 google/cloud/recommendationengine/v1beta1/common.proto create mode 100644 google/cloud/recommendationengine/v1beta1/import.proto create mode 100644 google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service.proto create mode 100644 google/cloud/recommendationengine/v1beta1/prediction_service.proto rename google/{devtools/resultstore/v2/resultstore_gapic.yaml => cloud/recommendationengine/v1beta1/recommendationengine_gapic.legacy.yaml} (60%) create mode 100644 google/cloud/recommendationengine/v1beta1/recommendationengine_gapic.yaml create mode 100644 google/cloud/recommendationengine/v1beta1/recommendationengine_grpc_service_config.json create mode 100644 google/cloud/recommendationengine/v1beta1/recommendationengine_resources.proto create mode 100644 google/cloud/recommendationengine/v1beta1/recommendationengine_v1beta1.yaml create mode 100644 google/cloud/recommendationengine/v1beta1/user_event.proto create mode 100644 google/cloud/recommendationengine/v1beta1/user_event_service.proto create mode 100644 google/cloud/recommender/BUILD.bazel create mode 100644 google/cloud/recommender/logging/v1/BUILD.bazel create mode 100644 google/cloud/recommender/logging/v1/action_log.proto create mode 100644 google/cloud/recommender/logging/v1/recommender.yaml create mode 100644 google/cloud/recommender/logging/v1beta1/BUILD.bazel create mode 100644 google/cloud/recommender/logging/v1beta1/action_log.proto create mode 100644 google/cloud/recommender/logging/v1beta1/recommender.yaml create mode 100644 google/cloud/recommender/v1/BUILD.bazel create mode 100644 google/cloud/recommender/v1/artman_recommender_v1.yaml create mode 100644 google/cloud/recommender/v1/recommendation.proto create mode 100644 google/cloud/recommender/v1/recommender_gapic.yaml create mode 100644 google/cloud/recommender/v1/recommender_grpc_service_config.json create mode 100644 google/cloud/recommender/v1/recommender_service.proto create mode 100644 google/cloud/recommender/v1/recommender_v1.yaml create mode 100644 google/cloud/recommender/v1beta1/BUILD.bazel rename google/cloud/recommender/{ => v1beta1}/artman_recommender_v1beta1.yaml (84%) create mode 100644 google/cloud/recommender/v1beta1/insight.proto create mode 100644 google/cloud/recommender/v1beta1/recommender_gapic.legacy.yaml create mode 100644 google/cloud/recommender/v1beta1/recommender_grpc_service_config.json rename google/cloud/recommender/{ => v1beta1}/recommender_v1beta1.yaml (95%) create mode 100644 google/cloud/recommender/v1beta1/samples/list_recommendations.yaml create mode 100644 google/cloud/redis/v1/redis_gapic.legacy.yaml create mode 100755 google/cloud/redis/v1/redis_grpc_service_config.json create mode 100644 google/cloud/redis/v1/redis_v1.yaml create mode 100644 google/cloud/redis/v1beta1/redis_gapic.legacy.yaml create mode 100755 google/cloud/redis/v1beta1/redis_grpc_service_config.json create mode 100644 google/cloud/redis/v1beta1/redis_v1beta1.yaml delete mode 100644 google/cloud/resourcemanager/cloudresourcemanager.yaml create mode 100644 google/cloud/resourcemanager/v2/BUILD.bazel rename google/cloud/resourcemanager/v2/{cloudresourcemanager_gapic.yaml => cloudresourcemanager_gapic.legacy.yaml} (99%) create mode 100644 google/cloud/resourcemanager/v2/cloudresourcemanager_v2.yaml create mode 100644 google/cloud/scheduler/v1/BUILD.bazel create mode 100644 google/cloud/scheduler/v1/cloudscheduler_gapic.legacy.yaml create mode 100755 google/cloud/scheduler/v1/cloudscheduler_grpc_service_config.json rename google/cloud/scheduler/{ => v1}/cloudscheduler_v1.yaml (100%) create mode 100644 google/cloud/scheduler/v1beta1/cloudscheduler_gapic.legacy.yaml create mode 100755 google/cloud/scheduler/v1beta1/cloudscheduler_grpc_service_config.json rename google/cloud/scheduler/{ => v1beta1}/cloudscheduler_v1beta1.yaml (100%) create mode 100644 google/cloud/secretmanager/v1/BUILD.bazel create mode 100644 google/cloud/secretmanager/v1/resources.proto create mode 100644 google/cloud/secretmanager/v1/secretmanager_gapic.yaml create mode 100644 google/cloud/secretmanager/v1/secretmanager_grpc_service_config.json create mode 100644 google/cloud/secretmanager/v1/secretmanager_v1.yaml create mode 100644 google/cloud/secretmanager/v1/service.proto rename google/{devtools/containeranalysis/artman_containeranalysis.yaml => cloud/secrets/artman_secretmanager_v1beta1.yaml} (72%) create mode 100644 google/cloud/secrets/v1beta1/BUILD.bazel create mode 100644 google/cloud/secrets/v1beta1/resources.proto create mode 100644 google/cloud/secrets/v1beta1/secretmanager_gapic.yaml create mode 100644 google/cloud/secrets/v1beta1/secretmanager_grpc_service_config.json create mode 100644 google/cloud/secrets/v1beta1/secretmanager_v1beta1.yaml create mode 100644 google/cloud/secrets/v1beta1/service.proto create mode 100644 google/cloud/securitycenter/artman_securitycenter_v1p1beta1.yaml delete mode 100644 google/cloud/securitycenter/securitycenter_v1.yaml create mode 100644 google/cloud/securitycenter/settings/v1beta1/BUILD.bazel create mode 100644 google/cloud/securitycenter/settings/v1beta1/billing_settings.proto create mode 100644 google/cloud/securitycenter/settings/v1beta1/component_settings.proto create mode 100644 google/cloud/securitycenter/settings/v1beta1/detector.proto create mode 100644 google/cloud/securitycenter/settings/v1beta1/securitycenter_settings.yaml create mode 100644 google/cloud/securitycenter/settings/v1beta1/securitycenter_settings_gapic.yaml create mode 100644 google/cloud/securitycenter/settings/v1beta1/securitycenter_settings_grpc_service_config.json create mode 100644 google/cloud/securitycenter/settings/v1beta1/securitycenter_settings_service.proto create mode 100644 google/cloud/securitycenter/settings/v1beta1/settings.proto create mode 100644 google/cloud/securitycenter/settings/v1beta1/sink_settings.proto create mode 100644 google/cloud/securitycenter/v1/BUILD.bazel create mode 100644 google/cloud/securitycenter/v1/notification_config.proto create mode 100644 google/cloud/securitycenter/v1/notification_message.proto create mode 100644 google/cloud/securitycenter/v1/securitycenter_gapic.legacy.yaml create mode 100755 google/cloud/securitycenter/v1/securitycenter_grpc_service_config.json create mode 100644 google/cloud/securitycenter/v1/securitycenter_v1.yaml create mode 100644 google/cloud/securitycenter/v1beta1/run_asset_discovery_response.proto create mode 100755 google/cloud/securitycenter/v1beta1/securitycenter_grpc_service_config.json create mode 100644 google/cloud/securitycenter/v1beta1/securitycenter_v1beta1.yaml create mode 100644 google/cloud/securitycenter/v1p1beta1/BUILD.bazel create mode 100644 google/cloud/securitycenter/v1p1beta1/asset.proto create mode 100644 google/cloud/securitycenter/v1p1beta1/finding.proto create mode 100644 google/cloud/securitycenter/v1p1beta1/notification_config.proto create mode 100644 google/cloud/securitycenter/v1p1beta1/notification_message.proto create mode 100644 google/cloud/securitycenter/v1p1beta1/organization_settings.proto create mode 100644 google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto create mode 100644 google/cloud/securitycenter/v1p1beta1/security_marks.proto create mode 100644 google/cloud/securitycenter/v1p1beta1/securitycenter_gapic.yaml create mode 100755 google/cloud/securitycenter/v1p1beta1/securitycenter_grpc_service_config.json create mode 100644 google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto create mode 100644 google/cloud/securitycenter/v1p1beta1/securitycenter_v1p1beta1.yaml create mode 100644 google/cloud/securitycenter/v1p1beta1/source.proto create mode 100644 google/cloud/servicedirectory/v1beta1/BUILD.bazel create mode 100644 google/cloud/servicedirectory/v1beta1/endpoint.proto create mode 100644 google/cloud/servicedirectory/v1beta1/lookup_service.proto create mode 100644 google/cloud/servicedirectory/v1beta1/namespace.proto create mode 100644 google/cloud/servicedirectory/v1beta1/registration_service.proto create mode 100644 google/cloud/servicedirectory/v1beta1/service.proto create mode 100644 google/cloud/servicedirectory/v1beta1/servicedirectory_gapic.yaml create mode 100644 google/cloud/servicedirectory/v1beta1/servicedirectory_grpc_service_config.json create mode 100644 google/cloud/servicedirectory/v1beta1/servicedirectory_v1beta1.yaml delete mode 100644 google/cloud/speech/speech_v1p1beta1.yaml rename google/cloud/speech/v1/samples/{ => test}/speech_transcribe_async.test.yaml (95%) rename google/cloud/speech/v1/samples/{ => test}/speech_transcribe_async_gcs.test.yaml (96%) rename google/cloud/speech/v1/samples/{ => test}/speech_transcribe_async_word_time_offsets_gcs.test.yaml (97%) rename google/cloud/speech/v1/samples/{ => test}/speech_transcribe_enhanced_model.test.yaml (96%) rename google/cloud/speech/v1/samples/{ => test}/speech_transcribe_model_selection.test.yaml (97%) rename google/cloud/speech/v1/samples/{ => test}/speech_transcribe_model_selection_gcs.test.yaml (97%) rename google/cloud/speech/v1/samples/{ => test}/speech_transcribe_multichannel.test.yaml (96%) rename google/cloud/speech/v1/samples/{ => test}/speech_transcribe_multichannel_gcs.test.yaml (96%) rename google/cloud/speech/v1/samples/{ => test}/speech_transcribe_sync.test.yaml (95%) rename google/cloud/speech/v1/samples/{ => test}/speech_transcribe_sync_gcs.test.yaml (95%) create mode 100644 google/cloud/speech/v1/speech_gapic.legacy.yaml create mode 100755 google/cloud/speech/v1/speech_grpc_service_config.json rename google/cloud/speech/{ => v1}/speech_v1.yaml (53%) create mode 100644 google/cloud/speech/v1p1beta1/resource.proto create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_adaptation_beta.yaml create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_contexts_classes_beta.yaml create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_quickstart_beta.yaml rename google/cloud/speech/v1p1beta1/samples/{ => test}/speech_adaptation_beta.test.yaml (87%) rename google/cloud/speech/v1p1beta1/samples/{ => test}/speech_contexts_classes_beta.test.yaml (88%) rename google/cloud/speech/v1p1beta1/samples/{ => test}/speech_quickstart_beta.test.yaml (87%) rename google/cloud/speech/v1p1beta1/samples/{ => test}/speech_transcribe_auto_punctuation_beta.test.yaml (93%) rename google/cloud/speech/v1p1beta1/samples/{ => test}/speech_transcribe_diarization_beta.test.yaml (97%) rename google/cloud/speech/v1p1beta1/samples/{ => test}/speech_transcribe_multilanguage_beta.test.yaml (97%) rename google/cloud/speech/v1p1beta1/samples/{ => test}/speech_transcribe_recognition_metadata_beta.test.yaml (95%) rename google/cloud/speech/v1p1beta1/samples/{ => test}/speech_transcribe_word_level_confidence_beta.test.yaml (96%) create mode 100644 google/cloud/speech/v1p1beta1/speech_gapic.legacy.yaml create mode 100755 google/cloud/speech/v1p1beta1/speech_grpc_service_config.json create mode 100644 google/cloud/speech/v1p1beta1/speech_v1p1beta1.yaml create mode 100644 google/cloud/talent/BUILD.bazel create mode 100644 google/cloud/talent/v4beta1/BUILD.bazel create mode 100644 google/cloud/talent/v4beta1/jobs_v4beta1.yaml create mode 100644 google/cloud/talent/v4beta1/talent_gapic.legacy.yaml create mode 100755 google/cloud/talent/v4beta1/talent_grpc_service_config.json delete mode 100644 google/cloud/tasks/cloudtasks_v2beta2.yaml create mode 100644 google/cloud/tasks/v2/BUILD.bazel create mode 100644 google/cloud/tasks/v2/cloudtasks_gapic.legacy.yaml create mode 100755 google/cloud/tasks/v2/cloudtasks_grpc_service_config.json rename google/cloud/tasks/{ => v2}/cloudtasks_v2.yaml (100%) create mode 100644 google/cloud/tasks/v2beta2/cloudtasks_gapic.legacy.yaml create mode 100755 google/cloud/tasks/v2beta2/cloudtasks_grpc_service_config.json create mode 100644 google/cloud/tasks/v2beta2/cloudtasks_v2beta2.yaml create mode 100644 google/cloud/tasks/v2beta3/cloudtasks_gapic.legacy.yaml create mode 100755 google/cloud/tasks/v2beta3/cloudtasks_grpc_service_config.json rename google/cloud/tasks/{ => v2beta3}/cloudtasks_v2beta3.yaml (100%) create mode 100644 google/cloud/texttospeech/v1/texttospeech_gapic.legacy.yaml create mode 100755 google/cloud/texttospeech/v1/texttospeech_grpc_service_config.json create mode 100644 google/cloud/texttospeech/v1/texttospeech_v1.yaml create mode 100644 google/cloud/texttospeech/v1beta1/texttospeech_gapic.legacy.yaml create mode 100755 google/cloud/texttospeech/v1beta1/texttospeech_grpc_service_config.json create mode 100644 google/cloud/texttospeech/v1beta1/texttospeech_v1beta1.yaml create mode 100644 google/cloud/translate/artman_translate_v3.yaml delete mode 100644 google/cloud/translate/translate_v3beta1.yaml create mode 100644 google/cloud/translate/v3/BUILD.bazel create mode 100644 google/cloud/translate/v3/translate_gapic.legacy.yaml create mode 100644 google/cloud/translate/v3/translate_gapic.yaml create mode 100755 google/cloud/translate/v3/translate_grpc_service_config.json create mode 100644 google/cloud/translate/v3/translate_v3.yaml create mode 100644 google/cloud/translate/v3/translation_service.proto create mode 100644 google/cloud/translate/v3beta1/BUILD.bazel create mode 100644 google/cloud/translate/v3beta1/translate_gapic.legacy.yaml create mode 100755 google/cloud/translate/v3beta1/translate_grpc_service_config.json create mode 100644 google/cloud/translate/v3beta1/translate_v3beta1.yaml create mode 100644 google/cloud/videointelligence/artman_videointelligence_v1.legacy.yaml create mode 100644 google/cloud/videointelligence/v1/videointelligence_gapic.legacy.yaml create mode 100755 google/cloud/videointelligence/v1/videointelligence_grpc_service_config.json create mode 100644 google/cloud/videointelligence/v1/videointelligence_v1.yaml delete mode 100644 google/cloud/videointelligence/v1beta1/BUILD.bazel delete mode 100644 google/cloud/videointelligence/v1beta1/video_intelligence.proto create mode 100755 google/cloud/videointelligence/v1beta1/videointelligence_grpc_service_config.json rename google/cloud/videointelligence/{v1beta1/videointelligence_gapic.yaml => v1beta2/videointelligence_gapic.legacy.yaml} (68%) create mode 100755 google/cloud/videointelligence/v1beta2/videointelligence_grpc_service_config.json create mode 100644 google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.legacy.yaml create mode 100755 google/cloud/videointelligence/v1p1beta1/videointelligence_grpc_service_config.json create mode 100644 google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.legacy.yaml create mode 100755 google/cloud/videointelligence/v1p2beta1/videointelligence_grpc_service_config.json create mode 100644 google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.legacy.yaml create mode 100755 google/cloud/videointelligence/v1p3beta1/videointelligence_grpc_service_config.json create mode 100644 google/cloud/videointelligence/v1p3beta1/videointelligence_v1p3beta1.yaml delete mode 100644 google/cloud/videointelligence/videointelligence_v1.yaml delete mode 100644 google/cloud/videointelligence/videointelligence_v1beta1.yaml create mode 100644 google/cloud/vision/v1/vision_gapic.legacy.yaml create mode 100755 google/cloud/vision/v1/vision_grpc_service_config.json rename google/cloud/vision/{ => v1}/vision_v1.yaml (74%) create mode 100644 google/cloud/vision/v1p1beta1/vision_gapic.legacy.yaml create mode 100755 google/cloud/vision/v1p1beta1/vision_grpc_service_config.json create mode 100644 google/cloud/vision/v1p1beta1/vision_v1p1beta1.yaml create mode 100644 google/cloud/vision/v1p2beta1/vision_gapic.legacy.yaml create mode 100755 google/cloud/vision/v1p2beta1/vision_grpc_service_config.json create mode 100644 google/cloud/vision/v1p2beta1/vision_v1p2beta1.yaml create mode 100644 google/cloud/vision/v1p3beta1/vision_gapic.legacy.yaml create mode 100755 google/cloud/vision/v1p3beta1/vision_grpc_service_config.json create mode 100644 google/cloud/vision/v1p3beta1/vision_v1p3beta1.yaml create mode 100644 google/cloud/vision/v1p4beta1/face.proto create mode 100644 google/cloud/vision/v1p4beta1/vision_gapic.legacy.yaml create mode 100755 google/cloud/vision/v1p4beta1/vision_grpc_service_config.json create mode 100644 google/cloud/vision/v1p4beta1/vision_v1p4beta1.yaml create mode 100644 google/cloud/webrisk/v1/BUILD.bazel create mode 100644 google/cloud/webrisk/v1/webrisk.proto create mode 100644 google/cloud/webrisk/v1/webrisk_gapic.yaml create mode 100755 google/cloud/webrisk/v1/webrisk_grpc_service_config.json rename google/cloud/webrisk/{webrisk.yaml => v1/webrisk_v1.yaml} (67%) create mode 100644 google/cloud/webrisk/v1beta1/BUILD.bazel create mode 100644 google/cloud/webrisk/v1beta1/webrisk_gapic.legacy.yaml create mode 100755 google/cloud/webrisk/v1beta1/webrisk_grpc_service_config.json create mode 100644 google/cloud/webrisk/v1beta1/webrisk_v1beta1.yaml create mode 100644 google/cloud/websecurityscanner/v1/BUILD.bazel create mode 100644 google/cloud/websecurityscanner/v1/crawled_url.proto create mode 100644 google/cloud/websecurityscanner/v1/finding.proto create mode 100644 google/cloud/websecurityscanner/v1/finding_addon.proto create mode 100644 google/cloud/websecurityscanner/v1/finding_type_stats.proto create mode 100644 google/cloud/websecurityscanner/v1/scan_config.proto create mode 100644 google/cloud/websecurityscanner/v1/scan_config_error.proto create mode 100644 google/cloud/websecurityscanner/v1/scan_run.proto create mode 100644 google/cloud/websecurityscanner/v1/scan_run_error_trace.proto create mode 100644 google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto create mode 100644 google/cloud/websecurityscanner/v1/web_security_scanner.proto create mode 100644 google/cloud/websecurityscanner/v1/websecurityscanner_gapic.yaml create mode 100644 google/cloud/websecurityscanner/v1/websecurityscanner_grpc_service_config.json create mode 100644 google/cloud/websecurityscanner/v1/websecurityscanner_v1.yaml create mode 100644 google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.legacy.yaml create mode 100755 google/cloud/websecurityscanner/v1alpha/websecurityscanner_grpc_service_config.json rename google/cloud/websecurityscanner/{web_security_scanner_v1alpha.yaml => v1alpha/websecurityscanner_v1alpha.yaml} (54%) create mode 100644 google/cloud/websecurityscanner/v1beta/BUILD.bazel create mode 100644 google/cloud/websecurityscanner/v1beta/websecurityscanner_gapic.legacy.yaml create mode 100755 google/cloud/websecurityscanner/v1beta/websecurityscanner_grpc_service_config.json rename google/cloud/websecurityscanner/{ => v1beta}/websecurityscanner_v1beta.yaml (100%) delete mode 100644 google/container/container_v1.yaml delete mode 100644 google/container/container_v1beta1.yaml create mode 100644 google/container/v1/container_gapic.legacy.yaml create mode 100755 google/container/v1/container_grpc_service_config.json create mode 100644 google/container/v1/container_v1.yaml create mode 100644 google/container/v1beta1/BUILD.bazel create mode 100644 google/container/v1beta1/container_gapic.legacy.yaml create mode 100755 google/container/v1beta1/container_grpc_service_config.json create mode 100644 google/container/v1beta1/container_v1beta1.yaml create mode 100644 google/datastore/admin/BUILD.bazel create mode 100644 google/datastore/admin/v1/BUILD.bazel create mode 100644 google/datastore/admin/v1/datastore_admin_gapic.legacy.yaml create mode 100755 google/datastore/admin/v1/datastore_admin_grpc_service_config.json rename google/datastore/admin/{datastore_admin.yaml => v1/datastore_admin_v1.yaml} (71%) create mode 100644 google/datastore/artman_datastore.legacy.yaml delete mode 100644 google/datastore/datastore.yaml create mode 100644 google/datastore/v1/datastore_gapic.legacy.yaml create mode 100755 google/datastore/v1/datastore_grpc_service_config.json create mode 100644 google/datastore/v1/datastore_v1.yaml create mode 100644 google/devtools/build/BUILD.bazel create mode 100644 google/devtools/build/v1/BUILD.bazel create mode 100644 google/devtools/build/v1/buildeventservice_gapic.legacy.yaml create mode 100755 google/devtools/build/v1/buildeventservice_grpc_service_config.json create mode 100644 google/devtools/build/v1/buildeventservice_v1.yaml create mode 100644 google/devtools/cloudbuild/v1/BUILD.bazel rename google/devtools/{containeranalysis/v1alpha1/containeranalysis_gapic.yaml => cloudbuild/v1/cloudbuild_gapic.legacy.yaml} (61%) create mode 100755 google/devtools/cloudbuild/v1/cloudbuild_grpc_service_config.json create mode 100644 google/devtools/cloudbuild/v1/cloudbuild_v1.yaml delete mode 100644 google/devtools/clouddebugger/clouddebugger.yaml create mode 100644 google/devtools/clouddebugger/v2/clouddebugger_gapic.legacy.yaml create mode 100755 google/devtools/clouddebugger/v2/clouddebugger_grpc_service_config.json create mode 100644 google/devtools/clouddebugger/v2/clouddebugger_v2.yaml create mode 100644 google/devtools/clouderrorreporting/artman_errorreporting.legacy.yaml delete mode 100644 google/devtools/clouderrorreporting/errorreporting.yaml create mode 100644 google/devtools/clouderrorreporting/v1beta1/clouderrorreporting_v1beta1.yaml create mode 100644 google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.legacy.yaml create mode 100755 google/devtools/clouderrorreporting/v1beta1/errorreporting_grpc_service_config.json create mode 100644 google/devtools/cloudtrace/v1/cloudtrace_gapic.legacy.yaml create mode 100755 google/devtools/cloudtrace/v1/cloudtrace_grpc_service_config.json rename google/devtools/cloudtrace/{ => v1}/cloudtrace_v1.yaml (60%) create mode 100644 google/devtools/cloudtrace/v2/cloudtrace_gapic.legacy.yaml create mode 100755 google/devtools/cloudtrace/v2/cloudtrace_grpc_service_config.json rename google/devtools/cloudtrace/{ => v2}/cloudtrace_v2.yaml (50%) delete mode 100644 google/devtools/containeranalysis/containeranalysis.yaml create mode 100644 google/devtools/containeranalysis/v1/BUILD.bazel create mode 100644 google/devtools/containeranalysis/v1/containeranalysis_gapic.legacy.yaml create mode 100755 google/devtools/containeranalysis/v1/containeranalysis_grpc_service_config.json rename google/devtools/containeranalysis/{ => v1}/containeranalysis_v1.yaml (79%) delete mode 100644 google/devtools/containeranalysis/v1alpha1/bill_of_materials.proto delete mode 100644 google/devtools/containeranalysis/v1alpha1/containeranalysis.proto delete mode 100644 google/devtools/containeranalysis/v1alpha1/image_basis.proto delete mode 100644 google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto delete mode 100644 google/devtools/containeranalysis/v1alpha1/provenance.proto delete mode 100644 google/devtools/containeranalysis/v1alpha1/source_context.proto create mode 100755 google/devtools/containeranalysis/v1beta1/containeranalysis_grpc_service_config.json create mode 100644 google/devtools/containeranalysis/v1beta1/containeranalysis_v1beta1.yaml create mode 100644 google/devtools/containeranalysis/v1beta1/cvss/BUILD.bazel create mode 100644 google/devtools/containeranalysis/v1beta1/cvss/cvss.proto delete mode 100644 google/devtools/remoteexecution/v1test/remote_execution.proto delete mode 100644 google/devtools/remoteexecution/v1test/remote_execution.yaml create mode 100644 google/devtools/remoteworkers/v1test2/BUILD.bazel create mode 100644 google/devtools/remoteworkers/v1test2/remoteworkers.yaml rename google/{api/expr/v1alpha1/cel_gapic.yaml => devtools/remoteworkers/v1test2/remoteworkers_gapic.legacy.yaml} (85%) create mode 100755 google/devtools/remoteworkers/v1test2/remoteworkers_grpc_service_config.json delete mode 100644 google/devtools/resultstore/resultstore-service.yaml create mode 100644 google/devtools/resultstore/v2/download_metadata.proto create mode 100644 google/devtools/resultstore/v2/file_processing_error.proto create mode 100644 google/devtools/resultstore/v2/resultstore_v2.yaml create mode 100644 google/devtools/resultstore/v2/upload_metadata.proto create mode 100644 google/firestore/admin/BUILD.bazel create mode 100644 google/firestore/admin/v1/BUILD.bazel create mode 100755 google/firestore/admin/v1/firestore_admin_grpc_service_config.json create mode 100644 google/firestore/admin/v1/firestore_gapic.legacy.yaml create mode 100644 google/firestore/admin/v1/firestore_v1.yaml create mode 100644 google/firestore/v1/BUILD.bazel create mode 100644 google/firestore/v1/firestore_gapic.legacy.yaml create mode 100755 google/firestore/v1/firestore_grpc_service_config.json create mode 100644 google/firestore/v1/firestore_v1.yaml create mode 100644 google/firestore/v1beta1/firestore_gapic.legacy.yaml create mode 100755 google/firestore/v1beta1/firestore_grpc_service_config.json create mode 100644 google/firestore/v1beta1/firestore_v1beta1.yaml create mode 100644 google/geo/type/BUILD.bazel create mode 100644 google/geo/type/type_geo.yaml create mode 100644 google/geo/type/viewport.proto create mode 100644 google/home/graph/BUILD.bazel create mode 100644 google/home/graph/v1/BUILD.bazel create mode 100755 google/home/graph/v1/homegraph_grpc_service_config.json create mode 100644 google/home/graph/v1/homegraph_v1.yaml create mode 100644 google/iam/admin/v1/iam.yaml create mode 100644 google/iam/admin/v1/iam_gapic.legacy.yaml create mode 100755 google/iam/admin/v1/iam_grpc_service_config.json create mode 100644 google/iam/credentials/v1/iamcredentials_gapic.legacy.yaml create mode 100755 google/iam/credentials/v1/iamcredentials_grpc_service_config.json create mode 100644 google/iam/credentials/v1/iamcredentials_v1.yaml delete mode 100644 google/iam/iam.yaml rename google/iam/v1/{iam_gapic.yaml => iam_gapic.legacy.yaml} (100%) create mode 100644 google/iam/v1/iam_meta_api.yaml rename google/iam/v1/{iam_meta_api_gapic.yaml => iam_meta_api_gapic.legacy.yaml} (100%) create mode 100644 google/identity/accesscontextmanager/type/BUILD.bazel create mode 100644 google/identity/accesscontextmanager/type/device_resources.proto create mode 100644 google/identity/accesscontextmanager/v1/BUILD.bazel create mode 100644 google/identity/accesscontextmanager/v1/access_level.proto create mode 100644 google/identity/accesscontextmanager/v1/access_policy.proto create mode 100644 google/identity/accesscontextmanager/v1/service_perimeter.proto delete mode 100644 google/logging/logging.yaml create mode 100644 google/logging/v2/logging.yaml create mode 100644 google/logging/v2/logging_gapic.legacy.yaml create mode 100755 google/logging/v2/logging_grpc_service_config.json create mode 100644 google/longrunning/longrunning_gapic.legacy.yaml create mode 100644 google/longrunning/longrunning_grpc_service_config.json create mode 100644 google/maps/BUILD.bazel create mode 100644 google/maps/playablelocations/v3/playablelocations.proto create mode 100644 google/maps/playablelocations/v3/playablelocations_grpc_service_config.json create mode 100644 google/maps/playablelocations/v3/playablelocations_v3.yaml create mode 100644 google/maps/playablelocations/v3/resources.proto create mode 100644 google/maps/playablelocations/v3/sample/resources.proto create mode 100644 google/maps/postprocessing.bzl create mode 100755 google/maps/postprocessing_java.sh create mode 100755 google/maps/postprocessing_py.sh create mode 100755 google/maps/postprocessing_python.sh create mode 100644 google/maps/roads/v1op/BUILD.bazel create mode 100644 google/maps/roads/v1op/roads.proto create mode 100644 google/maps/roads/v1op/roads_gapic.yaml create mode 100644 google/maps/roads/v1op/roads_grpc_service_config.json create mode 100644 google/maps/roads/v1op/roads_v1op.yaml create mode 100644 google/maps/routes/v1/BUILD.bazel create mode 100644 google/maps/routes/v1/compute_route_matrix_request.proto create mode 100644 google/maps/routes/v1/compute_routes_request.proto create mode 100644 google/maps/routes/v1/compute_routes_response.proto create mode 100644 google/maps/routes/v1/fallback_info.proto create mode 100644 google/maps/routes/v1/polyline.proto create mode 100644 google/maps/routes/v1/route.proto create mode 100644 google/maps/routes/v1/route_matrix_element.proto create mode 100644 google/maps/routes/v1/route_service.proto create mode 100644 google/maps/routes/v1/toll_passes.proto create mode 100644 google/maps/routes/v1/vehicle_emission_type.proto create mode 100644 google/maps/routes/v1/waypoint.proto create mode 100644 google/maps/routes/v1alpha/BUILD.bazel create mode 100644 google/maps/routes/v1alpha/route_service.proto create mode 100644 google/maps/routes/v1alpha/routespreferred_v1alpha.yaml create mode 100644 google/maps/routespreferred/v1/BUILD.bazel create mode 100644 google/maps/routespreferred/v1/routespreferred_gapic.yaml create mode 100644 google/maps/routespreferred/v1/routespreferred_v1.yaml create mode 100644 google/maps/unity/clientinfo.proto create mode 100644 google/monitoring/dashboard/v1/BUILD.bazel create mode 100644 google/monitoring/dashboard/v1/artman_monitoring.yaml create mode 100644 google/monitoring/dashboard/v1/common.proto create mode 100644 google/monitoring/dashboard/v1/dashboard.proto create mode 100644 google/monitoring/dashboard/v1/dashboards_service.proto create mode 100644 google/monitoring/dashboard/v1/drilldowns.proto create mode 100644 google/monitoring/dashboard/v1/layouts.proto create mode 100644 google/monitoring/dashboard/v1/metrics.proto create mode 100644 google/monitoring/dashboard/v1/monitoring.yaml create mode 100644 google/monitoring/dashboard/v1/monitoring_gapic.yaml create mode 100644 google/monitoring/dashboard/v1/scorecard.proto create mode 100644 google/monitoring/dashboard/v1/service.proto create mode 100644 google/monitoring/dashboard/v1/text.proto create mode 100644 google/monitoring/dashboard/v1/widget.proto create mode 100644 google/monitoring/dashboard/v1/xychart.proto delete mode 100644 google/monitoring/monitoring.yaml create mode 100644 google/monitoring/v3/artman_monitoring.yaml create mode 100644 google/monitoring/v3/monitoring.yaml create mode 100644 google/monitoring/v3/monitoring_gapic.legacy.yaml create mode 100755 google/monitoring/v3/monitoring_grpc_service_config.json create mode 100644 google/monitoring/v3/service.proto create mode 100644 google/monitoring/v3/service_service.proto rename google/{devtools/resultstore/artman_resultstore.yaml => privacy/dlp/v2/artman_dlp_v2.yaml} (77%) create mode 100644 google/privacy/dlp/v2/dlp_gapic.legacy.yaml create mode 100755 google/privacy/dlp/v2/dlp_grpc_service_config.json rename google/privacy/dlp/{ => v2}/dlp_v2.yaml (100%) delete mode 100644 google/pubsub/pubsub.yaml create mode 100644 google/pubsub/v1/pubsub_gapic.legacy.yaml create mode 100755 google/pubsub/v1/pubsub_grpc_service_config.json create mode 100644 google/pubsub/v1/pubsub_v1.yaml create mode 100644 google/rpc/context/BUILD.bazel create mode 100644 google/rpc/context/attribute_context.proto create mode 100644 google/search/partnerdataingestion/logging/v1/BUILD.bazel create mode 100644 google/search/partnerdataingestion/logging/v1/platformlog.proto create mode 100644 google/spanner/admin/database/artman_spanner_admin_database.legacy.yaml create mode 100644 google/spanner/admin/database/v1/backup.proto create mode 100644 google/spanner/admin/database/v1/common.proto rename google/spanner/admin/database/{ => v1}/spanner_admin_database.yaml (100%) create mode 100644 google/spanner/admin/database/v1/spanner_admin_database_gapic.legacy.yaml create mode 100755 google/spanner/admin/database/v1/spanner_admin_database_grpc_service_config.json create mode 100644 google/spanner/admin/instance/artman_spanner_admin_instance.legacy.yaml rename google/spanner/admin/instance/{ => v1}/spanner_admin_instance.yaml (100%) create mode 100644 google/spanner/admin/instance/v1/spanner_admin_instance_gapic.legacy.yaml create mode 100755 google/spanner/admin/instance/v1/spanner_admin_instance_grpc_service_config.json create mode 100644 google/spanner/artman_spanner.legacy.yaml rename google/spanner/{ => v1}/spanner.yaml (100%) create mode 100644 google/spanner/v1/spanner_gapic.legacy.yaml create mode 100755 google/spanner/v1/spanner_grpc_service_config.json create mode 100644 google/storage/v1/BUILD.bazel create mode 100644 google/storage/v1/storage.proto create mode 100644 google/storage/v1/storage_gapic.yaml create mode 100644 google/storage/v1/storage_resources.proto create mode 100644 google/storage/v1/storage_service_config.json create mode 100644 google/storage/v1/storage_v1.yaml create mode 100644 google/streetview/publish/BUILD.bazel create mode 100644 google/streetview/publish/v1/BUILD.bazel create mode 100644 google/type/datetime.proto create mode 100644 google/type/month.proto create mode 100644 grafeas/BUILD.bazel create mode 100644 grafeas/v1/BUILD.bazel create mode 100644 grafeas/v1/grafeas_gapic.legacy.yaml create mode 100755 grafeas/v1/grafeas_grpc_service_config.json create mode 100644 grafeas/v1/upgrade.proto diff --git a/.bazelrc b/.bazelrc index bd7573426..db6c4f65e 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,2 +1,7 @@ # To make proto_library rules to include source info in the descriptor build --protocopt=--include_source_info + +# This is to avoid JVM SIGBUS crashes on highly parallel builds, +# see https://github.com/bazelbuild/bazel/issues/3236 for more details +build --enable_platform_specific_config +build:linux --sandbox_tmpfs_path=/tmp \ No newline at end of file diff --git a/.circleci/config.yml b/.circleci/config.yml index 2ea704fc3..a17328bfd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,12 +24,18 @@ jobs: mkdir /tmp/reports export RUNNING_IN_ARTMAN_DOCKER=True smoketest_artman.py --root-dir=/var/code/googleapis/ --log=/tmp/reports/smoketest.log + - run: + name: Archive artifacts + command: | + mkdir /var/code/googleapis-tgz + tar cfz /var/code/googleapis-tgz/googleapis.tar.gz /var/code/googleapis + when: always - store_test_results: path: /tmp/reports - store_artifacts: path: /tmp/reports - store_artifacts: - path: /var/code/googleapis + path: /var/code/googleapis-tgz working_directory: /var/code/googleapis/ workflows: @@ -39,4 +45,5 @@ workflows: - smoke-all: filters: branches: - only: master + only: + - master diff --git a/.kokoro/.bazelrc b/.kokoro/.bazelrc new file mode 100644 index 000000000..37ad7713a --- /dev/null +++ b/.kokoro/.bazelrc @@ -0,0 +1,2 @@ +build --extra_toolchains=@gapic_generator_python//:pyenv3_toolchain --define=gapic_gen_python=3.6 +test --extra_toolchains=@gapic_generator_python//:pyenv3_toolchain --define=gapic_gen_python=3.6 diff --git a/.kokoro/build.sh b/.kokoro/build.sh new file mode 100755 index 000000000..fe41332f4 --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +cd ${KOKORO_ARTIFACTS_DIR}/github/googleapis +cp .kokoro/.bazelrc $HOME/.bazelrc + +# shellcheck source=/dev/null +source .kokoro/setup.sh + +# +# Run build and tests +# +${BAZEL} --output_user_root=${BAZEL_ROOT} build --keep_going //... +${BAZEL} --output_user_root=${BAZEL_ROOT} test --flaky_test_attempts=3 --keep_going //... diff --git a/.kokoro/continuous.cfg b/.kokoro/continuous.cfg new file mode 100644 index 000000000..19a1c5163 --- /dev/null +++ b/.kokoro/continuous.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "googleapis/.kokoro/build.sh" diff --git a/.kokoro/presubmit.cfg b/.kokoro/presubmit.cfg new file mode 100644 index 000000000..19a1c5163 --- /dev/null +++ b/.kokoro/presubmit.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "googleapis/.kokoro/build.sh" diff --git a/.kokoro/setup.sh b/.kokoro/setup.sh new file mode 100644 index 000000000..26607b4f3 --- /dev/null +++ b/.kokoro/setup.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e + +# +# Install bazel +# +mkdir ${KOKORO_ROOT}/tools +cd ${KOKORO_ROOT}/tools +curl -L https://github.com/bazelbuild/bazel/releases/download/3.0.0/bazel-3.0.0-linux-x86_64 -o bazel +chmod +x bazel +mkdir bazel_root +cd - + +# gapic-generator-python requires python 3.6+ +pyenv global 3.6.1 + +BAZEL=${KOKORO_ROOT}/tools/bazel +BAZEL_ROOT=${KOKORO_ROOT}/tools/bazel_root diff --git a/BUILD.bazel b/BUILD.bazel index c93a75378..1bc525514 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,129 +1,6 @@ load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") -# Target used by Cloud Build to build GAPIC libraries. -# To find all available rules, use: -# $ grep -Er '\-(java|go|php)"' -pkg_tar( - name = 'gapic-cloud-build', - deps = [ - '//google/api/expr/v1alpha1:gapi-cloud-cel-v1alpha1-go', - '//google/api/expr/v1alpha1:google-cloud-cel-v1alpha1-java', - '//google/bigtable/admin/v2:gapi-cloud-bigtableadmin-v2-go', - '//google/bigtable/admin/v2:google-cloud-bigtable-admin-v2-java', - '//google/bigtable/v2:gapi-cloud-bigtable-v2-go', - '//google/bigtable/v2:google-cloud-bigtable-v2-java', - '//google/cloud/asset/v1beta1:gapi-cloud-asset-v1beta1-go', - '//google/cloud/asset/v1beta1:google-cloud-asset-v1beta1-java', - '//google/cloud/automl/v1beta1:gapi-cloud-automl-v1beta1-go', - '//google/cloud/automl/v1beta1:google-cloud-automl-v1beta1-java', - '//google/cloud/bigquery/datatransfer/v1:gapi-cloud-bigquerydatatransfer-v1-go', - '//google/cloud/bigquery/datatransfer/v1:google-cloud-bigquerydatatransfer-v1-java', - '//google/cloud/bigquery/storage/v1beta1:gapi-cloud-bigquerystorage-v1-go', - '//google/cloud/bigquery/storage/v1beta1:google-cloud-bigquerystorage-v1-java', - '//google/cloud/dataproc/v1beta2:gapi-cloud-dataproc-v1beta2-go', - '//google/cloud/dataproc/v1beta2:google-cloud-dataproc-v1beta2-java', - '//google/cloud/dataproc/v1:gapi-cloud-dataproc-v1-go', - '//google/cloud/dataproc/v1:google-cloud-dataproc-v1-java', - '//google/cloud/dialogflow/v2beta1:gapi-cloud-dialogflow-v2beta1-go', - '//google/cloud/dialogflow/v2beta1:google-cloud-dialogflow-v2beta1-java', - '//google/cloud/dialogflow/v2:gapi-cloud-dialogflow-v2-go', - '//google/cloud/dialogflow/v2:google-cloud-dialogflow-v2-java', - '//google/cloud/dialogflow/v2:google-cloud-dialogflow-v2-php', - '//google/cloud/iot/v1:gapi-cloud-iot-v1-go', - '//google/cloud/iot/v1:google-cloud-iot-v1-java', - '//google/cloud/kms/v1:gapi-cloud-kms-v1-go', - '//google/cloud/kms/v1:google-cloud-kms-v1-java', - '//google/cloud/language/v1beta2:gapi-cloud-language-v1beta2-go', - '//google/cloud/language/v1beta2:google-cloud-language-v1beta2-java', - '//google/cloud/language/v1:gapi-cloud-language-v1-go', - '//google/cloud/language/v1:google-cloud-language-v1-java', - '//google/cloud/language/v1:google-cloud-language-v1-php', - '//google/cloud/oslogin/v1beta:gapi-cloud-oslogin-v1beta-go', - '//google/cloud/oslogin/v1beta:google-cloud-oslogin-v1beta-java', - '//google/cloud/oslogin/v1:gapi-cloud-oslogin-v1-go', - '//google/cloud/oslogin/v1:google-cloud-oslogin-v1-java', - '//google/cloud/redis/v1beta1:gapi-cloud-redis-v1beta1-go', - '//google/cloud/redis/v1beta1:google-cloud-redis-v1beta1-java', - '//google/cloud/redis/v1:gapi-cloud-redis-v1-go', - '//google/cloud/redis/v1:google-cloud-redis-v1-java', - '//google/cloud/scheduler/v1beta1:gapi-cloud-scheduler-v1beta1-go', - '//google/cloud/scheduler/v1beta1:google-cloud-scheduler-v1beta1-java', - '//google/cloud/securitycenter/v1beta1:gapi-cloud-securitycenter-v1beta1-go', - '//google/cloud/securitycenter/v1beta1:google-cloud-securitycenter-v1beta1-java', - '//google/cloud/speech/v1:gapi-cloud-speech-v1-go', - '//google/cloud/speech/v1:google-cloud-speech-v1-java', - '//google/cloud/speech/v1p1beta1:gapi-cloud-speech-v1p1beta1-go', - '//google/cloud/speech/v1p1beta1:google-cloud-speech-v1p1beta1-java', - '//google/cloud/tasks/v2beta2:gapi-cloud-tasks-v2beta2-go', - '//google/cloud/tasks/v2beta2:google-cloud-tasks-v2beta2-java', - '//google/cloud/tasks/v2beta3:gapi-cloud-tasks-v2beta3-go', - '//google/cloud/tasks/v2beta3:google-cloud-tasks-v2beta3-java', - '//google/cloud/texttospeech/v1beta1:gapi-cloud-texttospeech-v1beta1-go', - '//google/cloud/texttospeech/v1beta1:google-cloud-texttospeech-v1beta1-java', - '//google/cloud/texttospeech/v1:gapi-cloud-texttospeech-v1-go', - '//google/cloud/texttospeech/v1:google-cloud-texttospeech-v1-java', - '//google/cloud/videointelligence/v1beta1:gapi-cloud-video-intelligence-v1beta1-go', - '//google/cloud/videointelligence/v1beta1:google-cloud-video-intelligence-v1beta1-java', - '//google/cloud/videointelligence/v1beta2:gapi-cloud-video-intelligence-v1beta2-go', - '//google/cloud/videointelligence/v1beta2:google-cloud-video-intelligence-v1beta2-java', - '//google/cloud/videointelligence/v1:gapi-cloud-video-intelligence-v1-go', - '//google/cloud/videointelligence/v1:google-cloud-video-intelligence-v1-java', - '//google/cloud/videointelligence/v1p1beta1:gapi-cloud-video-intelligence-v1p1beta1-go', - '//google/cloud/videointelligence/v1p1beta1:google-cloud-video-intelligence-v1p1beta1-java', - '//google/cloud/videointelligence/v1p2beta1:gapi-cloud-video-intelligence-v1p2beta1-go', - '//google/cloud/videointelligence/v1p2beta1:google-cloud-video-intelligence-v1p2beta1-java', - '//google/cloud/videointelligence/v1p3beta1:gapi-cloud-video-intelligence-v1p3beta1-go', - '//google/cloud/vision/v1:gapi-cloud-vision-v1-go', - '//google/cloud/vision/v1:google-cloud-vision-v1-java', - '//google/cloud/vision/v1p1beta1:gapi-cloud-vision-v1p1beta1-go', - '//google/cloud/vision/v1p1beta1:google-cloud-vision-v1p1beta1-java', - '//google/cloud/vision/v1p2beta1:gapi-cloud-vision-v1p2beta1-go', - '//google/cloud/vision/v1p2beta1:google-cloud-vision-v1p2beta1-java', - '//google/cloud/vision/v1p3beta1:gapi-cloud-vision-v1p3beta1-go', - '//google/cloud/vision/v1p3beta1:google-cloud-vision-v1p3beta1-java', - '//google/cloud/vision/v1p4beta1:gapi-cloud-vision-v1p4beta1-go', - '//google/cloud/vision/v1p4beta1:google-cloud-vision-v1p4beta1-java', - '//google/cloud/websecurityscanner/v1alpha:gapi-cloud-websecurityscanner-v1alpha-go', - '//google/cloud/websecurityscanner/v1alpha:google-cloud-websecurityscanner-v1alpha-java', - '//google/container/v1:gapi-cloud-container-v1-go', - '//google/container/v1:google-cloud-container-v1-java', - '//google/datastore/v1:gapi-cloud-datastore-v1-go', - '//google/datastore/v1:google-cloud-datastore-v1-java', - '//google/devtools/clouddebugger/v2:gapi-cloud-debugger-v2-go', - '//google/devtools/clouddebugger/v2:google-cloud-debugger-v2-java', - '//google/devtools/clouderrorreporting/v1beta1:gapi-cloud-error-reporting-v1beta1-go', - '//google/devtools/clouderrorreporting/v1beta1:google-cloud-error-reporting-v1beta1-java', - '//google/devtools/cloudtrace/v1:gapi-cloud-trace-v1-go', - '//google/devtools/cloudtrace/v1:google-cloud-trace-v1-java', - '//google/devtools/cloudtrace/v2:gapi-cloud-trace-v2-go', - '//google/devtools/cloudtrace/v2:google-cloud-trace-v2-java', - '//google/devtools/containeranalysis/v1beta1:gapi-cloud-containeranalysis-v1-go', - '//google/devtools/containeranalysis/v1beta1:google-cloud-containeranalysis-v1-java', - '//google/devtools/source/v1:gapi-cloud-source-v1-go', - '//google/example/library/v1:gapi-cloud-library-v1-go', - '//google/example/library/v1:google-cloud-library-v1-java', - '//google/firestore/v1beta1:gapi-cloud-firestore-v1beta1-go', - '//google/firestore/v1beta1:google-cloud-firestore-v1beta1-java', - '//google/iam/admin/v1:gapi-cloud-iam-admin-v1-go', - '//google/iam/credentials/v1:gapi-cloud-iamcredentials-v1-go', - '//google/iam/credentials/v1:google-cloud-iamcredentials-v1-java', - '//google/iam/v1:gapi-cloud-iam-v1-go', - '//google/iam/v1/logging:gapi-cloud-iam-admin-go', - '//google/logging/v2:gapi-cloud-logging-v2-go', - '//google/logging/v2:google-cloud-logging-v2-java', - '//google/longrunning:gapi-cloud-longrunning-go', - '//google/monitoring/v3:gapi-cloud-monitoring-v3-go', - '//google/monitoring/v3:google-cloud-monitoring-v3-java', - '//google/privacy/dlp/v2:gapi-cloud-dlp-v2-go', - '//google/privacy/dlp/v2:google-cloud-dlp-v2-java', - '//google/pubsub/v1:gapi-cloud-pubsub-v1-go', - '//google/pubsub/v1:google-cloud-pubsub-v1-java', - '//google/pubsub/v1:google-cloud-pubsub-v1-php', - '//google/spanner/admin/database/v1:gapi-cloud-spanner-admin-database-v1-go', - '//google/spanner/admin/database/v1:google-cloud-spanner-admin-database-v1-java', - '//google/spanner/admin/instance/v1:gapi-cloud-spanner-admin-instance-v1-go', - '//google/spanner/admin/instance/v1:google-cloud-spanner-admin-instance-v1-java', - '//google/spanner/v1:gapi-cloud-spanner-v1-go', - '//google/spanner/v1:google-cloud-spanner-v1-java', - ] +alias( + name = "build_gen", + actual = "@com_google_api_codegen//rules_gapic/bazel:build_file_generator", ) diff --git a/README.md b/README.md index 3e5a4cdd7..6ba73116d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ libraries, documentation, and other artifacts. ### Bazel The recommended way to build the API client libraries is through -[Bazel](https://bazel.build/) >= 0.23.0. +[Bazel](https://bazel.build/) >= 2.0.0. First, [install bazel](https://docs.bazel.build/versions/master/install.html). @@ -39,7 +39,7 @@ To build the Java package for one library: bazel build //google/example/library/v1:google-cloud-library-v1-java ``` -Bazel packages exist in all the libraries for Java and Go. +Bazel packages exist in all the libraries for Java, Go, Python, Ruby, Node.js, PHP and C#. ### Artman diff --git a/WORKSPACE b/WORKSPACE index d4239160d..a5387b785 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -11,39 +11,127 @@ load("//:repository_rules.bzl", "switched_rules_by_language") switched_rules_by_language( name = "com_google_googleapis_imports", cc = True, + csharp = True, gapic = True, go = True, grpc = True, java = True, nodejs = True, php = True, + python = True, + ruby = True, ) +# Protobuf depends on very old version of bazel_skylib (forward compatible with the new one). +# Importing older version of bazel_skylib first (this is one of the things that protobuf_deps() call +# below will do) breaks the grpc repositories, so importing the proper version explicitly before +# everything else. +http_archive( + name = "bazel_skylib", + urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/0.9.0/bazel_skylib-0.9.0.tar.gz"], +) + +# Python rules should go early in the dependencies list, otherwise a wrong +# version of the library will be selected as a transitive dependency of gRPC. +http_archive( + name = "rules_python", + url = "https://github.com/bazelbuild/rules_python/archive/748aa53d7701e71101dfd15d800e100f6ff8e5d1.zip", + strip_prefix = "rules_python-748aa53d7701e71101dfd15d800e100f6ff8e5d1" +) + +http_archive( + name = "com_google_protobuf", + strip_prefix = "protobuf-fe1790ca0df67173702f70d5646b82f48f412b99", # this is 3.11.2 + urls = ["https://github.com/protocolbuffers/protobuf/archive/fe1790ca0df67173702f70d5646b82f48f412b99.zip"], +) + +load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") + +protobuf_deps() + +http_archive( + name = "rules_proto", + sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", + strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + ], +) + +load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") + +rules_proto_dependencies() + +rules_proto_toolchains() + # Note gapic-generator contains java-specific and common code, that is why it is imported in common # section http_archive( name = "com_google_api_codegen", - strip_prefix = "gapic-generator-c075bbe8eff3a1094a03cd77474d8dbcb010f954", - urls = ["https://github.com/googleapis/gapic-generator/archive/c075bbe8eff3a1094a03cd77474d8dbcb010f954.zip"], + strip_prefix = "gapic-generator-acd31461ee04391df79ae8a33f793569791aa1a0", + urls = ["https://github.com/googleapis/gapic-generator/archive/acd31461ee04391df79ae8a33f793569791aa1a0.zip"], +) + +# rules_go (support Golang under bazel) +# This is not in the Go section because we override the same, older dependency brought in by gRPC. +# TODO(ndietz): move this back to the Go section if gRPC is updated per https://github.com/grpc/grpc/issues/22172 +http_archive( + name = "io_bazel_rules_go", + sha256 = "e6a6c016b0663e06fa5fccf1cd8152eab8aa8180c583ec20c872f4f9953a7ac5", + url = "https://github.com/bazelbuild/rules_go/releases/download/v0.22.1/rules_go-v0.22.1.tar.gz", ) +load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") + +go_rules_dependencies() + +go_register_toolchains() + ############################################################################## -# Java +# C++ ############################################################################## - -# java_gapic artifacts runtime dependencies (gax-java) -# -# Keeping it here to see how this goes (what will be more maintainable: direct import of gax or via -# gapic-generator). +# C++ must go before everything else, since the key dependencies (protobuf and gRPC) +# are C++ repositories and they have the highest chance to have the correct versions of the +# transitive dependencies (for those dependencies which are shared by many other repositories +# imported in this workspace). # -#load("@com_google_api_codegen//rules_gapic/java:java_gapic_repositories.bzl", "java_gapic_repositories") -# -#java_gapic_repositories() +# Note, even though protobuf and gRPC are mostly written in C++, they are used to generate stuff +# for most of the other languages as well, so they can be considered as the core cross-language +# dependencies. + +http_archive( + name = "com_github_grpc_grpc", + strip_prefix = "grpc-8347f4753568b5b66e49111c60ae2841278d3f33", # this is 1.25.0 with fixes + urls = ["https://github.com/grpc/grpc/archive/8347f4753568b5b66e49111c60ae2841278d3f33.zip"], +) + +load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") + +grpc_deps() + +load("@upb//bazel:repository_defs.bzl", "bazel_version_repository") + +bazel_version_repository( + name = "bazel_version", +) + +load("@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies") + +apple_rules_dependencies() + +load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies") + +apple_support_dependencies() + +############################################################################## +# Java +############################################################################## http_archive( name = "com_google_api_gax_java", - strip_prefix = "gax-java-6b170195c18e0d8abc8385ef063d6da9773f87de", - urls = ["https://github.com/googleapis/gax-java/archive/6b170195c18e0d8abc8385ef063d6da9773f87de.zip"], + strip_prefix = "gax-java-730046855da122b26adbaa3fcf535becd8afa292", # 1.55.0 with fixes + urls = ["https://github.com/googleapis/gax-java/archive/730046855da122b26adbaa3fcf535becd8afa292.zip"], ) load("@com_google_api_gax_java//:repository_rules.bzl", "com_google_api_gax_java_properties") @@ -57,6 +145,10 @@ load("@com_google_api_gax_java//:repositories.bzl", "com_google_api_gax_java_rep com_google_api_gax_java_repositories() +load("@io_grpc_grpc_java//:repositories.bzl", "grpc_java_repositories") + +grpc_java_repositories() + # gapic-generator transitive # (goes AFTER java-gax, since both java gax and gapic-generator are written in java and may conflict) load("@com_google_api_codegen//:repository_rules.bzl", "com_google_api_codegen_properties") @@ -68,6 +160,12 @@ com_google_api_codegen_properties( load("@com_google_api_codegen//:repositories.bzl", "com_google_api_codegen_repositories") +http_archive( + name = "com_google_protoc_java_resource_names_plugin", + strip_prefix = "protoc-java-resource-names-plugin-64dafb71ea9a385a8da89989f0b9dab925bf4610", + urls = ["https://github.com/googleapis/protoc-java-resource-names-plugin/archive/64dafb71ea9a385a8da89989f0b9dab925bf4610.zip"], +) + com_google_api_codegen_repositories() # protoc-java-resource-names-plugin (loaded in com_google_api_codegen_repositories()) @@ -77,68 +175,84 @@ load( "com_google_protoc_java_resource_names_plugin_repositories", ) -com_google_protoc_java_resource_names_plugin_repositories(omit_com_google_protobuf = True) +com_google_protoc_java_resource_names_plugin_repositories() ############################################################################## -# Go +# Python ############################################################################## +load("@com_google_api_codegen//rules_gapic/python:py_gapic_repositories.bzl", "py_gapic_repositories") + +py_gapic_repositories() -# rules_go (support Golang under bazel) http_archive( - name = "io_bazel_rules_go", - sha256 = "a82a352bffae6bee4e95f68a8d80a70e87f42c4741e6a448bec11998fcc82329", - url = "https://github.com/bazelbuild/rules_go/releases/download/0.18.5/rules_go-0.18.5.tar.gz", + name = "protoc_docs_plugin", + strip_prefix = "protoc-docs-plugin-b2502d56b5ec2d47e063976da773206af295362d", + urls = ["https://github.com/googleapis/protoc-docs-plugin/archive/b2502d56b5ec2d47e063976da773206af295362d.zip"], ) -load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_toolchains") +load( + "@protoc_docs_plugin//:repositories.bzl", + "protoc_docs_plugin_register_toolchains", + "protoc_docs_plugin_repositories", +) -go_rules_dependencies() +protoc_docs_plugin_repositories() -go_register_toolchains() +protoc_docs_plugin_register_toolchains() -# bazel-gazelle (support Golang under bazel) +load("@rules_python//python:repositories.bzl", "py_repositories") +py_repositories() + +load("@rules_python//python:pip.bzl", "pip_repositories") +pip_repositories() + +# Change upstream repository once PR is merged http_archive( - name = "bazel_gazelle", - strip_prefix = "bazel-gazelle-0.17.0", - urls = ["https://github.com/bazelbuild/bazel-gazelle/archive/0.17.0.zip"], + name = "gapic_generator_python", + urls = ["https://github.com/googleapis/gapic-generator-python/archive/2d332245b0a7b38f0770a051ed6ed0e631fc9296.zip"], + strip_prefix = "gapic-generator-python-2d332245b0a7b38f0770a051ed6ed0e631fc9296", ) -load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") +load("@gapic_generator_python//:repositories.bzl", + "gapic_generator_python", + "gapic_generator_register_toolchains" +) -gazelle_dependencies() +gapic_generator_python() -# go_gapic artifacts runtime dependencies (gax-go) -load("@com_google_api_codegen//rules_gapic/go:go_gapic_repositories.bzl", "go_gapic_repositories") +gapic_generator_register_toolchains() -go_gapic_repositories() +load("@gapic_generator_python_pip_deps//:requirements.bzl", "pip_install") + +pip_install() ############################################################################## -# C++ +# Go ############################################################################## +# bazel-gazelle (support Golang under bazel) http_archive( - name = "com_google_gapic_generator_cpp", - strip_prefix = "gapic-generator-cpp-2d9229952b649e53b2e986f5a3031d0d374af9e1", - urls = ["https://github.com/googleapis/gapic-generator-cpp/archive/2d9229952b649e53b2e986f5a3031d0d374af9e1.zip"], + name = "bazel_gazelle", + urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.20.0/bazel-gazelle-v0.20.0.tar.gz"], ) -load( - "@com_google_gapic_generator_cpp//gax:repositories.bzl", - "com_google_gapic_generator_cpp_gax_repositories", -) +load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") -com_google_gapic_generator_cpp_gax_repositories() +gazelle_dependencies() -load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") +http_archive( + name = "com_googleapis_gapic_generator_go", + strip_prefix = "gapic-generator-go-0.13.3", + urls = ["https://github.com/googleapis/gapic-generator-go/archive/v0.13.3.tar.gz"], +) -grpc_deps() +load("@com_googleapis_gapic_generator_go//:repositories.bzl", "com_googleapis_gapic_generator_go_repositories") -load( - "@com_google_gapic_generator_cpp//:repositories.bzl", - "com_google_gapic_generator_cpp_repositories", -) +com_googleapis_gapic_generator_go_repositories() -com_google_gapic_generator_cpp_repositories() +load("@com_googleapis_gapic_generator_go//rules_go_gapic:go_gapic_repositories.bzl", "go_gapic_repositories") + +go_gapic_repositories() ############################################################################## # PHP @@ -148,7 +262,9 @@ load("@com_google_api_codegen//rules_gapic/php:php_gapic_repositories.bzl", "php php( name = "php", - version = "7.1.30", + prebuilt_phps = ["@com_google_api_codegen//rules_gapic/php:resources/php-7.1.30_linux_x86_64.tar.gz"], + strip_prefix = "php-7.1.30", + urls = ["https://www.php.net/distributions/php-7.1.30.tar.gz"], ) php_gapic_repositories() diff --git a/google/actions/type/BUILD.bazel b/google/actions/type/BUILD.bazel new file mode 100644 index 000000000..d865c47c4 --- /dev/null +++ b/google/actions/type/BUILD.bazel @@ -0,0 +1,167 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "date_range_proto", + srcs = ["date_range.proto"], + deps = [ + "//google/type:date_proto", + ], +) + +proto_library( + name = "datetime_range_proto", + srcs = ["datetime_range.proto"], + deps = [ + "//google/type:datetime_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_proto_library", +) + +java_proto_library( + name = "type_java_proto", + deps = [ + ":date_range_proto", + ":datetime_range_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", +) + +go_proto_library( + name = "date_range_go_proto", + importpath = "google.golang.org/genproto/googleapis/type/date_range", + protos = [ + ":date_range_proto", + ], + deps = ["//google/type:date_go_proto"], +) + + +go_proto_library( + name = "datetime_range_go_proto", + importpath = "google.golang.org/genproto/googleapis/type/datetime_range", + protos = [ + ":datetime_range_proto", + ], + deps = ["//google/type:datetime_go_proto"], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "py_proto_library", +) + +py_proto_library( + name = "date_range_py_proto", + deps = [":date_range_proto"], +) + +py_proto_library( + name = "datetime_range_py_proto", + deps = [":datetime_range_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_proto_library", +) + +php_proto_library( + name = "date_range_php_proto", + deps = [":date_range_proto"], +) + +php_proto_library( + name = "datetime_range_php_proto", + deps = [":datetime_range_proto"], +) + +############################################################################## +# Node.js +############################################################################## + + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_proto_library", +) + +ruby_proto_library( + name = "date_range_ruby_proto", + deps = [":date_range_proto"], +) + +ruby_proto_library( + name = "datetime_range_ruby_proto", + deps = [":datetime_range_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_proto_library", +) + +csharp_proto_library( + name = "date_range_csharp_proto", + deps = [":date_range_proto"], +) + +csharp_proto_library( + name = "datetime_range_csharp_proto", + deps = [":datetime_range_proto"], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_proto_library", +) + +cc_proto_library( + name = "date_range_cc_proto", + deps = [ + ":date_range_proto", + ], +) + +cc_proto_library( + name = "datetime_range_cc_proto", + deps = [ + ":datetime_range_proto", + ], +) diff --git a/google/actions/type/date_range.proto b/google/actions/type/date_range.proto new file mode 100644 index 000000000..20860f47c --- /dev/null +++ b/google/actions/type/date_range.proto @@ -0,0 +1,81 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.actions.type; + +import "google/type/date.proto"; + +option go_package = "google.golang.org/genproto/googleapis/type/date_range;date_range"; +option java_multiple_files = true; +option java_outer_classname = "DateRangeProto"; +option java_package = "com.google.actions.type"; +option objc_class_prefix = "AOGTP"; + +// Represents a range based on whole or partial calendar dates, e.g. the +// duration of a hotel reservation or the Common Era. This can represent: +// +// * A range between full dates, e.g. the duration of a hotel reservation +// * A range between years, e.g. a historical era +// * A range between year/month dates, e.g. the duration of a job on a resume +// * A range beginning in a year, e.g. the Common Era +// * A range ending on a specific date, e.g. the period of time before an event +// +// While [google.type.Date][google.type.Date] allows zero years, DateRange does not. Year must +// always be non-zero. +// +// End cannot be chronologically before start. For example, if start has year +// 2000, end cannot have year 1999. +// +// When both set, start and end must have exactly the same precision. That is, +// they must have the same fields populated with non-zero values. For example, +// if start specifies only year and month, then end must also specify only year +// and month (but not day). +// +// The date range is inclusive. That is, the dates specified by start and end +// are part of the date range. For example, the date January 1, 2000 falls +// within any date with start or end equal to January 1, 2000. When determining +// whether a date is inside a date range, the date should only be compared to +// start and end when those values are set. +// +// When a date and date range are specified to different degrees of precision, +// the rules for evaluating whether that date is inside the date range are as +// follows: +// +// * When comparing the date to the start of the date range, unspecified months +// should be replaced with 1, and unspecified days should be replaced with 1. +// For example, the year 2000 is within the date range with start equal to +// January 1, 2000 and no end. And the date January 1, 2000 is within the +// date range with start equal to the year 2000 and no end. +// +// * When comparing the date to the end of the date range, unspecified months +// should be replaced with 12, and unspecified days should be replaced with +// the last valid day for the month/year. For example, the year 2000 is +// within the date range with start equal to January 1, 1999 and end equal to +// December 31, 2000. And the date December 31, 2001 is within the date range +// with start equal to the year 2000 and end equal to the year 2001. +// +// The semantics of start and end are the same as those of [google.type.Date][google.type.Date], +// except that year must always be non-zero in DateRange. +message DateRange { + // Date at which the date range begins. If unset, the date range has no + // beginning bound. + google.type.Date start = 1; + + // Date at which the date range ends. If unset, the date range has no ending + // bound. + google.type.Date end = 2; +} diff --git a/google/actions/type/datetime_range.proto b/google/actions/type/datetime_range.proto new file mode 100644 index 000000000..6702c2bc4 --- /dev/null +++ b/google/actions/type/datetime_range.proto @@ -0,0 +1,66 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.actions.type; + +import "google/type/datetime.proto"; + +option go_package = "google.golang.org/genproto/googleapis/type/date_time_range;date_time_range"; +option java_multiple_files = true; +option java_outer_classname = "DateTimeRangeProto"; +option java_package = "com.google.actions.type"; +option objc_class_prefix = "AOGTP"; + +// Represents a date and time range. This can represent: +// +// * A range between points in time with time zone or offset, e.g. the duration +// of a flight which starts in the "America/New_York" time zone and ends in +// the "Australia/Sydney" time zone +// * A range between points in time without time zone/offset info, e.g. an +// appointment in local time +// * A range starting at a specific date and time, e.g. the range of time which +// can be measured in milliseconds since the Unix epoch (period starting with +// 1970-01-01T00:00:00Z) +// * A range ending at a specific date and time, e.g. range of time before +// a deadline +// +// When considering whether a DateTime falls within a DateTimeRange, the start +// of the range is inclusive and the end is exclusive. +// +// While [google.type.DateTime][google.type.DateTime] allows zero years, DateTimeRange does not. +// Year must always be non-zero. +// +// When both start and end are set, either both or neither must have a +// time_offset. When set, time_offset can be specified by either utc_offset or +// time_zone and must match for start and end, that is if start has utc_offset +// set then end must also have utc_offset set. The values of utc_offset or +// time_zone need not be the same for start and end. +// +// When both start and end are set, start must be chronologically less than or +// equal to end. When start and end are equal, the range is empty. +// +// The semantics of start and end are the same as those of +// [google.type.DateTime][google.type.DateTime]. +message DateTimeRange { + // DateTime at which the date range begins. If unset, the range has no + // beginning bound. + google.type.DateTime start = 1; + + // DateTime at which the date range ends. If unset, the range has no ending + // bound. + google.type.DateTime end = 2; +} diff --git a/google/actions/type/type_aog.yaml b/google/actions/type/type_aog.yaml new file mode 100644 index 000000000..9d284e121 --- /dev/null +++ b/google/actions/type/type_aog.yaml @@ -0,0 +1,21 @@ +type: google.api.Service +config_version: 1 +name: type.aog.googleapis.com +title: Common Actions on Google Types + +types: +- name: google.actions.type.DateRange +- name: google.actions.type.DateTimeRange + +documentation: + summary: Defines common types for Actions on Google APIs. + overview: |- + This package contains definitions of common types for Actions on Google + APIs, which are used in addition to the common Google API types in the + google.type package. These types are not versioned, and must go through + extensive review before being created. + + Like the types in google.type, all types defined in this package are + suitable for different APIs to exchange data, and will never break binary + compatibility. They should have design quality comparable to major + programming languages like Java and C#. diff --git a/google/ads/admob/BUILD.bazel b/google/ads/admob/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/ads/admob/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/ads/admob/admob_v1.yaml b/google/ads/admob/admob_v1.yaml new file mode 100644 index 000000000..120576d26 --- /dev/null +++ b/google/ads/admob/admob_v1.yaml @@ -0,0 +1,36 @@ +type: google.api.Service +config_version: 3 +name: admob.googleapis.com +title: AdMob API + +apis: +- name: google.ads.admob.v1.AdMobApi + +documentation: + summary: The Google AdMob API lets you programmatically get reports on earnings. + +authentication: + rules: + - selector: 'google.ads.admob.v1.AdMobApi.GetPublisherAccount' + oauth: + canonical_scopes: https://www.googleapis.com/auth/admob.report + - selector: 'google.ads.admob.v1.AdMobApi.ListPublisherAccounts' + oauth: + canonical_scopes: https://www.googleapis.com/auth/admob.report + - selector: 'google.ads.admob.v1.AdMobApi.GenerateMediationReport' + oauth: + canonical_scopes: https://www.googleapis.com/auth/admob.report + - selector: 'google.ads.admob.v1.AdMobApi.GenerateNetworkReport' + oauth: + canonical_scopes: https://www.googleapis.com/auth/admob.report + +backend: + rules: + - selector: 'google.ads.admob.v1.AdMobApi.GetPublisherAccount' + deadline: 5.0 + - selector: 'google.ads.admob.v1.AdMobApi.ListPublisherAccounts' + deadline: 10.0 + - selector: 'google.ads.admob.v1.AdMobApi.GenerateMediationReport' + deadline: 60.0 + - selector: 'google.ads.admob.v1.AdMobApi.GenerateNetworkReport' + deadline: 60.0 diff --git a/google/ads/admob/artman_admob_v1.yaml b/google/ads/admob/artman_admob_v1.yaml new file mode 100644 index 000000000..f733a8806 --- /dev/null +++ b/google/ads/admob/artman_admob_v1.yaml @@ -0,0 +1,34 @@ +common: + api_name: admob + api_version: v1 + organization_name: ads + proto_deps: + - name: google-common-protos + src_proto_paths: + - . + service_yaml: admob_v1.yaml + gapic_yaml: v1/admob_gapic.yaml +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: php_gapic + type: GAPIC + language: PHP +- name: go_gapic + type: GAPIC + language: GO +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: csharp_gapic + type: GAPIC + language: CSHARP diff --git a/google/ads/admob/v1/BUILD.bazel b/google/ads/admob/v1/BUILD.bazel new file mode 100644 index 000000000..00b36f06f --- /dev/null +++ b/google/ads/admob/v1/BUILD.bazel @@ -0,0 +1,356 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "admob_proto", + srcs = [ + "admob_api.proto", + "admob_resources.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/type:date_proto", + ], +) + +proto_library_with_info( + name = "admob_proto_with_info", + deps = [ + ":admob_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "admob_java_proto", + deps = [":admob_proto"], +) + +java_grpc_library( + name = "admob_java_grpc", + srcs = [":admob_proto"], + deps = [":admob_java_proto"], +) + +java_gapic_library( + name = "admob_java_gapic", + src = ":admob_proto_with_info", + gapic_yaml = "admob_gapic.yaml", + package = "google.ads.admob.v1", + service_yaml = "//google/ads/admob:admob_v1.yaml", + test_deps = [ + ":admob_java_grpc", + ], + deps = [ + ":admob_java_proto", + ], +) + +java_gapic_test( + name = "admob_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.ads.admob.v1.AdMobApiClientTest", + ], + runtime_deps = [":admob_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-ads-admob-v1-java", + deps = [ + ":admob_java_gapic", + ":admob_java_grpc", + ":admob_java_proto", + ":admob_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "admob_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/ads/admob/v1", + protos = [":admob_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/type:date_go_proto", + ], +) + +go_gapic_library( + name = "admob_go_gapic", + srcs = [":admob_proto_with_info"], + grpc_service_config = "", + importpath = "cloud.google.com/go/ads/admob/apiv1;admob", + service_yaml = "//google/ads/admob:admob_v1.yaml", + deps = [ + ":admob_go_proto", + ], +) + +go_test( + name = "admob_go_gapic_test", + srcs = [":admob_go_gapic_srcjar_test"], + embed = [":admob_go_gapic"], + importpath = "cloud.google.com/go/ads/admob/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-ads-admob-v1-go", + deps = [ + ":admob_go_gapic", + ":admob_go_gapic_srcjar-test.srcjar", + ":admob_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "admob_moved_proto", + srcs = [":admob_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/type:date_proto", + ], +) + +py_proto_library( + name = "admob_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":admob_moved_proto"], +) + +py_grpc_library( + name = "admob_py_grpc", + srcs = [":admob_moved_proto"], + deps = [":admob_py_proto"], +) + +py_gapic_library( + name = "admob_py_gapic", + src = ":admob_proto_with_info", + gapic_yaml = "admob_gapic.yaml", + package = "google.ads.admob.v1", + service_yaml = "//google/ads/admob:admob_v1.yaml", + deps = [ + ":admob_py_grpc", + ":admob_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "ads-admob-v1-py", + deps = [ + ":admob_py_gapic", + ":admob_py_grpc", + ":admob_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "admob_php_proto", + deps = [":admob_proto"], +) + +php_grpc_library( + name = "admob_php_grpc", + srcs = [":admob_proto"], + deps = [":admob_php_proto"], +) + +php_gapic_library( + name = "admob_php_gapic", + src = ":admob_proto_with_info", + gapic_yaml = "admob_gapic.yaml", + package = "google.ads.admob.v1", + service_yaml = "//google/ads/admob:admob_v1.yaml", + deps = [ + ":admob_php_grpc", + ":admob_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-ads-admob-v1-php", + deps = [ + ":admob_php_gapic", + ":admob_php_grpc", + ":admob_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "admob_nodejs_gapic", + src = ":admob_proto_with_info", + gapic_yaml = "admob_gapic.yaml", + package = "google.ads.admob.v1", + service_yaml = "//google/ads/admob:admob_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "ads-admob-v1-nodejs", + deps = [ + ":admob_nodejs_gapic", + ":admob_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "admob_ruby_proto", + deps = [":admob_proto"], +) + +ruby_grpc_library( + name = "admob_ruby_grpc", + srcs = [":admob_proto"], + deps = [":admob_ruby_proto"], +) + +ruby_gapic_library( + name = "admob_ruby_gapic", + src = ":admob_proto_with_info", + gapic_yaml = "admob_gapic.yaml", + package = "google.ads.admob.v1", + service_yaml = "//google/ads/admob:admob_v1.yaml", + deps = [ + ":admob_ruby_grpc", + ":admob_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-ads-admob-v1-ruby", + deps = [ + ":admob_ruby_gapic", + ":admob_ruby_grpc", + ":admob_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "admob_csharp_proto", + deps = [":admob_proto"], +) + +csharp_grpc_library( + name = "admob_csharp_grpc", + srcs = [":admob_proto"], + deps = [":admob_csharp_proto"], +) + +csharp_gapic_library( + name = "admob_csharp_gapic", + src = ":admob_proto_with_info", + gapic_yaml = "admob_gapic.yaml", + package = "google.ads.admob.v1", + service_yaml = "//google/ads/admob:admob_v1.yaml", + deps = [ + ":admob_csharp_grpc", + ":admob_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-ads-admob-v1-csharp", + deps = [ + ":admob_csharp_gapic", + ":admob_csharp_grpc", + ":admob_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/ads/admob/v1/admob_api.proto b/google/ads/admob/v1/admob_api.proto new file mode 100644 index 000000000..12486651a --- /dev/null +++ b/google/ads/admob/v1/admob_api.proto @@ -0,0 +1,221 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.ads.admob.v1; + +import "google/ads/admob/v1/admob_resources.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; + +option go_package = "google.golang.org/genproto/googleapis/ads/admob/v1;admob"; +option java_outer_classname = "AdMobApiProto"; +option java_package = "com.google.ads.admob.v1"; + +// The AdMob API allows AdMob publishers to access their account settings and +// generate reports. +service AdMobApi { + option (google.api.default_host) = "admob.googleapis.com"; + + // Gets information about the specified AdMob publisher account. + rpc GetPublisherAccount(GetPublisherAccountRequest) + returns (PublisherAccount) { + option (google.api.http) = { + get: "/v1/{name=accounts/*}" + }; + } + + // Lists the AdMob publisher account accessible with the client credential. + // Currently, all credentials have access to at most one AdMob account. + rpc ListPublisherAccounts(ListPublisherAccountsRequest) + returns (ListPublisherAccountsResponse) { + option (google.api.http) = { + get: "/v1/accounts" + }; + } + + // Generates an AdMob Network report based on the provided report + // specification. + rpc GenerateNetworkReport(GenerateNetworkReportRequest) + returns (stream GenerateNetworkReportResponse) { + option (google.api.http) = { + post: "/v1/{parent=accounts/*}/networkReport:generate" + body: "*" + }; + } + + // Generates an AdMob Mediation report based on the provided report + // specification. + rpc GenerateMediationReport(GenerateMediationReportRequest) + returns (stream GenerateMediationReportResponse) { + option (google.api.http) = { + post: "/v1/{parent=accounts/*}/mediationReport:generate" + body: "*" + }; + } +} + +// Request to retrieve the specified publisher account. +message GetPublisherAccountRequest { + // Resource name of the publisher account to retrieve. + // Example: accounts/pub-9876543210987654 + string name = 1; +} + +// Request to retrieve the AdMob publisher account accessible with the client +// credential. Currently all credentials have access to at most 1 account. +message ListPublisherAccountsRequest { + // Maximum number of accounts to return. + int32 page_size = 1; + + // The value returned by the last `ListPublisherAccountsResponse`; indicates + // that this is a continuation of a prior `ListPublisherAccounts` call, and + // that the system should return the next page of data. + string page_token = 2; +} + +// Response for the publisher account list request. +message ListPublisherAccountsResponse { + // Publisher that the client credentials can access. + repeated PublisherAccount account = 1; + + // If not empty, indicates that there might be more accounts for the request; + // you must pass this value in a new `ListPublisherAccountsRequest`. + string next_page_token = 2; +} + +// Request to generate an AdMob Mediation report. +message GenerateMediationReportRequest { + // Resource name of the account to generate the report for. + // Example: accounts/pub-9876543210987654 + string parent = 1; + + // Network report specification. + MediationReportSpec report_spec = 2; +} + +// The streaming response for the AdMob Mediation report where the first +// response contains the report header, then a stream of row responses, and +// finally a footer as the last response message. +// +// For example: +// +// [{ +// "header": { +// "date_range": { +// "start_date": {"year": 2018, "month": 9, "day": 1}, +// "end_date": {"year": 2018, "month": 9, "day": 30} +// } +// "localization_settings": { +// "currency_code": "USD", +// "language_code": "en-US" +// } +// } +// }, +// { +// "row": { +// "dimension_values": { +// "DATE": {"value": "20180918"}, +// "APP": { +// "value": "ca-app-pub-8123415297019784~1001342552", +// "display_label": "My app name!" +// } +// }, +// "metric_values": { +// "ESTIMATED_EARNINGS": {"decimal_value": "1324746"} +// } +// } +// }, +// { +// "footer": {"matching_row_count": 1} +// }] +message GenerateMediationReportResponse { + // Each stream response message contains one type of payload. + oneof payload { + // Report generation settings that describes the report contents, such as + // the report date range and localization settings. + ReportHeader header = 1; + + // Actual report data. + ReportRow row = 2; + + // Additional information about the generated report, such as warnings about + // the data. + ReportFooter footer = 3; + } +} + +// Request to generate an AdMob Network report. +message GenerateNetworkReportRequest { + // Resource name of the account to generate the report for. + // Example: accounts/pub-9876543210987654 + string parent = 1; + + // Network report specification. + NetworkReportSpec report_spec = 2; +} + +// The streaming response for the AdMob Network report where the first response +// contains the report header, then a stream of row responses, and finally a +// footer as the last response message. +// +// For example: +// +// [{ +// "header": { +// "dateRange": { +// "startDate": {"year": 2018, "month": 9, "day": 1}, +// "endDate": {"year": 2018, "month": 9, "day": 30} +// } +// "localizationSettings": { +// "currencyCode": "USD", +// "languageCode": "en-US" +// } +// } +// }, +// { +// "row": { +// "dimensionValues": { +// "DATE": {"value": "20180918"}, +// "APP": { +// "value": "ca-app-pub-8123415297019784~1001342552", +// displayLabel: "My app name!" +// } +// }, +// "metricValues": { +// "ESTIMATED_EARNINGS": {"microsValue": 6500000} +// } +// } +// }, +// ... +// { +// "footer": {"matchingRowCount": 5} +// }] +message GenerateNetworkReportResponse { + // Each stream response message contains one type of payload. + oneof payload { + // Report generation settings that describes the report contents, such as + // the report date range and localization settings. + ReportHeader header = 1; + + // Actual report data. + ReportRow row = 2; + + // Additional information about the generated report, such as warnings about + // the data. + ReportFooter footer = 3; + } +} diff --git a/google/ads/admob/v1/admob_gapic.yaml b/google/ads/admob/v1/admob_gapic.yaml new file mode 100644 index 000000000..042e2f728 --- /dev/null +++ b/google/ads/admob/v1/admob_gapic.yaml @@ -0,0 +1,150 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.ads.admob.v1 + python: + package_name: google.cloud.ads.admob_v1.gapic + go: + package_name: cloud.google.com/go/ads/admob/apiv1 + csharp: + package_name: Google.Ads.Admob.V1 + ruby: + package_name: Google::Cloud::Ads::Admob::V1 + php: + package_name: Google\Cloud\Ads\Admob\V1 + nodejs: + package_name: admob.v1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.ads.admob.v1.AdMobApi + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: accounts/{account} + entity_name: account + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: GetPublisherAccount + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: account + timeout_millis: 60000 + - name: ListPublisherAccounts + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: account + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: GenerateNetworkReport + flattening: + groups: + - parameters: + - parent + - report_spec + required_fields: + - parent + - report_spec + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: account + timeout_millis: 60000 + - name: GenerateMediationReport + flattening: + groups: + - parameters: + - parent + - report_spec + required_fields: + - parent + - report_spec + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: account + timeout_millis: 60000 diff --git a/google/ads/admob/v1/admob_resources.proto b/google/ads/admob/v1/admob_resources.proto new file mode 100644 index 000000000..200bb3208 --- /dev/null +++ b/google/ads/admob/v1/admob_resources.proto @@ -0,0 +1,567 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.ads.admob.v1; + +import "google/type/date.proto"; + +option go_package = "google.golang.org/genproto/googleapis/ads/admob/v1;admob"; +option java_outer_classname = "AdMobResourceProto"; +option java_package = "com.google.ads.admob.v1"; + +// A publisher account contains information relevant to the use of this API, +// such as the time zone used for the reports. +message PublisherAccount { + // Resource name of this account. + // Format is accounts/{publisher_id}. + string name = 1; + + // The unique ID by which this publisher account can be identified + // in the API requests (for example, pub-1234567890). + string publisher_id = 2; + + // The time zone that is used in reports that are generated for this account. + // The value is a time-zone ID as specified by the CLDR project, + // for example, "America/Los_Angeles". + string reporting_time_zone = 3; + + // Currency code of the earning-related metrics, which is the 3-letter code + // defined in ISO 4217. The daily average rate is used for the currency + // conversion. + string currency_code = 4; +} + +// The specification for generating an AdMob Network report. +// For example, the specification to get clicks and estimated earnings for only +// the 'US' and 'CN' countries can look like the following example: +// +// { +// 'date_range': { +// 'start_date': {'year': 2018, 'month': 9, 'day': 1}, +// 'end_date': {'year': 2018, 'month': 9, 'day': 30} +// }, +// 'dimensions': ['DATE', 'APP', 'COUNTRY'], +// 'metrics': ['CLICKS', 'ESTIMATED_EARNINGS'], +// 'dimension_filters': [ +// { +// 'dimension': 'COUNTRY', +// 'matches_any': {'values': [{'value': 'US', 'value': 'CN'}]} +// } +// ], +// 'sort_conditions': [ +// {'dimension':'APP', order: 'ASCENDING'}, +// {'metric':'CLICKS', order: 'DESCENDING'} +// ], +// 'localization_settings': { +// 'currency_code': 'USD', +// 'language_code': 'en-US' +// } +// } +// +// For a better understanding, you can treat the preceding specification like +// the following pseudo SQL: +// +// SELECT DATE, APP, COUNTRY, CLICKS, ESTIMATED_EARNINGS +// FROM NETWORK_REPORT +// WHERE DATE >= '2018-09-01' AND DATE <= '2018-09-30' +// AND COUNTRY IN ('US', 'CN') +// GROUP BY DATE, APP, COUNTRY +// ORDER BY APP ASC, CLICKS DESC; +message NetworkReportSpec { + // Describes which report rows to match based on their dimension values. + message DimensionFilter { + // Applies the filter criterion to the specified dimension. + Dimension dimension = 1; + + // Filter operator to be applied. + oneof operator { + // Matches a row if its value for the specified dimension is in one of the + // values specified in this condition. + StringList matches_any = 2; + } + } + + // Sorting direction to be applied on a dimension or a metric. + message SortCondition { + // Identifies which values to sort on. + oneof sort_on { + // Sort by the specified dimension. + Dimension dimension = 1; + + // Sort by the specified metric. + Metric metric = 2; + } + + // Sorting order of the dimension or metric. + SortOrder order = 3; + } + + // The dimensions of the network report. Dimensions are data attributes to + // break down or refine the quantitative measurements (metrics) by certain + // attributes, such as the ad format or the platform an ad was viewed on. + enum Dimension { + // Default value for an unset field. Do not use. + DIMENSION_UNSPECIFIED = 0; + + // A date in the YYYY-MM-DD format (for example, "2018-12-21"). Requests can + // specify at most one time dimension. + DATE = 1; + + // A month in the YYYY-MM format (for example, "2018-12"). Requests can + // specify at most one time dimension. + MONTH = 2; + + // The date of the first day of a week in the YYYY-MM-DD format + // (for example, "2018-12-21"). Requests can specify at most one time + // dimension. + WEEK = 3; + + // The unique ID of the ad unit (for example, "ca-app-pub-1234/1234"). + // If AD_UNIT dimension is specified, then APP is included automatically. + AD_UNIT = 4; + + // The unique ID of the mobile application (for example, + // "ca-app-pub-1234~1234"). + APP = 5; + + // CLDR country code of the place where the ad views/clicks occur (for + // example, "US" or "FR"). This is a geography dimension. + COUNTRY = 7; + + // Format of the ad unit (for example, "banner", "native"), an ad delivery + // dimension. + FORMAT = 8; + + // Mobile OS platform of the app (for example, "Android" or "iOS"). + PLATFORM = 9; + } + + // The metrics of the network report. Metrics are quantitative measurements + // indicating how the publisher business is performing. They are aggregated + // from the individual ad events and grouped by the report dimensions. The + // metric value is either integer, or decimal (without rounding). + enum Metric { + // Default value for an unset field. Do not use. + METRIC_UNSPECIFIED = 0; + + // The number of ad requests. The value is an integer. + AD_REQUESTS = 1; + + // The number of times a user clicks an ad. The value is an integer. + CLICKS = 2; + + // The estimated earnings of the AdMob publisher. The currency unit (USD, + // EUR, or other) of the earning metrics are determined by the localization + // setting for currency. The amount is in micros. For example, $6.50 would + // be represented as 6500000. + ESTIMATED_EARNINGS = 3; + + // The total number of ads shown to users. The value is an integer. + IMPRESSIONS = 4; + + // The ratio of clicks over impressions. The value is a double precision + // (approximate) decimal value. + IMPRESSION_CTR = 5; + + // The estimated earnings per thousand ad impressions. The value is in + // micros. For example, $1.03 would be represented as 1030000. + IMPRESSION_RPM = 6; + + // The number of times ads are returned in response to a request. The value + // is an integer. + MATCHED_REQUESTS = 7; + + // The ratio of matched ad requests over the total ad requests. The value is + // a double precision (approximate) decimal value. + MATCH_RATE = 8; + + // The ratio of ads that are displayed over ads that are returned, defined + // as impressions / matched requests. The value is a double precision + // (approximate) decimal value. + SHOW_RATE = 9; + } + + // The date range for which the report is generated. + DateRange date_range = 1; + + // List of dimensions of the report. The value combination of these dimensions + // determines the row of the report. If no dimensions are specified, the + // report returns a single row of requested metrics for the entire account. + repeated Dimension dimensions = 2; + + // List of metrics of the report. A report must specify at least one metric. + repeated Metric metrics = 3; + + // Describes which report rows to match based on their dimension values. + repeated DimensionFilter dimension_filters = 4; + + // Describes the sorting of report rows. The order of the condition in the + // list defines its precedence; the earlier the condition, the higher its + // precedence. If no sort conditions are specified, the row ordering is + // undefined. + repeated SortCondition sort_conditions = 5; + + // Localization settings of the report. + LocalizationSettings localization_settings = 6; + + // Maximum number of report data rows to return. If the value is not set, the + // API returns as many rows as possible, up to 100000. Acceptable values are + // 1-100000, inclusive. Any other values are treated as 100000. + int32 max_report_rows = 7; +} + +// The specification for generating an AdMob Mediation report. +// For example, the specification to get observed ECPM sliced by ad source and +// app for the 'US' and 'CN' countries can look like the following example: +// +// { +// "date_range": { +// "start_date": {"year": 2018, "month": 9, "day": 1}, +// "end_date": {"year": 2018, "month": 9, "day": 30} +// }, +// "dimensions": ["AD_SOURCE", "APP", "COUNTRY"], +// "metrics": ["OBSERVED_ECPM"], +// "dimension_filters": [ +// { +// "dimension": "COUNTRY", +// "matches_any": {"values": [{"value": "US", "value": "CN"}]} +// } +// ], +// "sort_conditions": [ +// {"dimension":"APP", order: "ASCENDING"} +// ], +// "localization_settings": { +// "currency_code": "USD", +// "language_code": "en-US" +// } +// } +// +// For a better understanding, you can treat the preceding specification like +// the following pseudo SQL: +// +// SELECT AD_SOURCE, APP, COUNTRY, OBSERVED_ECPM +// FROM MEDIATION_REPORT +// WHERE DATE >= '2018-09-01' AND DATE <= '2018-09-30' +// AND COUNTRY IN ('US', 'CN') +// GROUP BY AD_SOURCE, APP, COUNTRY +// ORDER BY APP ASC; +message MediationReportSpec { + // Describes which report rows to match based on their dimension values. + message DimensionFilter { + // Applies the filter criterion to the specified dimension. + Dimension dimension = 1; + + // Filter operator to be applied. + oneof operator { + // Matches a row if its value for the specified dimension is in one of the + // values specified in this condition. + StringList matches_any = 2; + } + } + + // Sorting direction to be applied on a dimension or a metric. + message SortCondition { + // Identifies which values to sort on. + oneof sort_on { + // Sort by the specified dimension. + Dimension dimension = 1; + + // Sort by the specified metric. + Metric metric = 2; + } + + // Sorting order of the dimension or metric. + SortOrder order = 3; + } + + // The dimensions of the mediation report. Dimensions are data attributes to + // break down or refine the quantitative measurements (metrics) by certain + // attributes, such as the ad format or the platform an ad was viewed on. + enum Dimension { + // Default value for an unset field. Do not use. + DIMENSION_UNSPECIFIED = 0; + + // A date in the YYYY-MM-DD format (for example, "2018-12-21"). Requests can + // specify at most one time dimension. + DATE = 1; + + // A month in the YYYY-MM format (for example, "2018-12"). Requests can + // specify at most one time dimension. + MONTH = 2; + + // The date of the first day of a week in the YYYY-MM-DD format + // (for example, "2018-12-21"). Requests can specify at most one time + // dimension. + WEEK = 3; + + // The unique ID of the ad source (for example, "5450213213286189855" and + // "AdMob Network" as label value). + AD_SOURCE = 4; + + // The unique ID of the ad source instance (for example, + // "ca-app-pub-1234#5678" and "AdMob (default)" as label value). + // Warning: The dimension is incompatible with ESTIMATED_EARNINGS and + // OBSERVED_ECPM metrics. + AD_SOURCE_INSTANCE = 5; + + // The unique ID of the ad unit (for example, "ca-app-pub-1234/8790"). + // If AD_UNIT dimension is specified, then APP is included automatically. + AD_UNIT = 6; + + // The unique ID of the mobile application (for example, + // "ca-app-pub-1234~1234"). + APP = 7; + + // The unique ID of the mediation group (for example, + // "ca-app-pub-1234:mg:1234" and "AdMob (default)" as label value). + // Warning: The dimension is incompatible with ESTIMATED_EARNINGS and + // OBSERVED_ECPM metrics. + MEDIATION_GROUP = 11; + + // CLDR country code of the place where the ad views/clicks occur (for + // example, "US" or "FR"). This is a geography dimension. + COUNTRY = 8; + + // Format of the ad unit (for example, "banner", "native"), an ad delivery + // dimension. + FORMAT = 9; + + // Mobile OS platform of the app (for example, "Android" or "iOS"). + PLATFORM = 10; + } + + // The metrics of the mediation report. Metrics are quantitative measurements + // indicating how the publisher business is performing. They are aggregated + // from the individual ad events and grouped by the report dimensions. The + // metric value is either integer, or decimal (without rounding). + enum Metric { + // Default value for an unset field. Do not use. + METRIC_UNSPECIFIED = 0; + + // The number of requests. The value is an integer. + AD_REQUESTS = 1; + + // The number of times a user clicks an ad. The value is an integer. + CLICKS = 2; + + // The estimated earnings of the AdMob publisher. The currency unit (USD, + // EUR, or other) of the earning metrics are determined by the localization + // setting for currency. The amount is in micros. For example, $6.50 would + // be represented as 6500000. + // Warning: The metric is incompatible with AD_SOURCE_INSTANCE and + // MEDIATION_GROUP dimensions. + ESTIMATED_EARNINGS = 3; + + // The total number of ads shown to users. The value is an integer. + IMPRESSIONS = 4; + + // The ratio of clicks over impressions. The value is a double precision + // (approximate) decimal value. + IMPRESSION_CTR = 5; + + // The number of times ads are returned in response to a request. The value + // is an integer. + MATCHED_REQUESTS = 6; + + // The ratio of matched ad requests over the total ad requests. The value is + // a double precision (approximate) decimal value. + MATCH_RATE = 7; + + // The third-party ad network's estimated average eCPM. The currency unit + // (USD, EUR, or other) of the earning metrics are determined by the + // localization setting for currency. The amount is in micros. For example, + // $2.30 would be represented as 2300000. + // Warning: The metric is incompatible with AD_SOURCE_INSTANCE and + // MEDIATION_GROUP dimensions. + OBSERVED_ECPM = 8; + } + + // The date range for which the report is generated. + DateRange date_range = 1; + + // List of dimensions of the report. The value combination of these dimensions + // determines the row of the report. If no dimensions are specified, the + // report returns a single row of requested metrics for the entire account. + repeated Dimension dimensions = 2; + + // List of metrics of the report. A report must specify at least one metric. + repeated Metric metrics = 3; + + // Describes which report rows to match based on their dimension values. + repeated DimensionFilter dimension_filters = 4; + + // Describes the sorting of report rows. The order of the condition in the + // list defines its precedence; the earlier the condition, the higher its + // precedence. If no sort conditions are specified, the row ordering is + // undefined. + repeated SortCondition sort_conditions = 5; + + // Localization settings of the report. + LocalizationSettings localization_settings = 6; + + // Maximum number of report data rows to return. If the value is not set, the + // API returns as many rows as possible, up to 100000. Acceptable values are + // 1-100000, inclusive. Any other values are treated as 100000. + int32 max_report_rows = 7; +} + +// A row of the returning report. +message ReportRow { + // Representation of a dimension value. + message DimensionValue { + // Dimension value in the format specified in the report's spec Dimension + // enum. + string value = 1; + + // The localized string representation of the value. If unspecified, the + // display label should be derived from the value. + string display_label = 2; + } + + // Representation of a metric value. + message MetricValue { + // Metric value in the format specified in the report's spec Metric enum + // name. + oneof value { + // Metric integer value. + int64 integer_value = 1; + + // Double precision (approximate) decimal values. Rates are from 0 to 1. + double double_value = 2; + + // Amount in micros. One million is equivalent to one unit. Currency value + // is in the unit (USD, EUR or other) specified by the request. + // For example, $6.50 whould be represented as 6500000 micros. + int64 micros_value = 3; + } + } + + // Map of dimension values in a row, with keys as enum name of the dimensions. + map dimension_values = 1; + + // Map of metric values in a row, with keys as enum name of the metrics. If + // a metric being requested has no value returned, the map will not include + // it. + map metric_values = 2; +} + +// Warnings associated with generation of the report. +message ReportWarning { + // Warning type. + enum Type { + // Default value for an unset field. Do not use. + TYPE_UNSPECIFIED = 0; + + // Some data in this report is aggregated based on a time zone different + // from the requested time zone. This could happen if a local time-zone + // report has the start time before the last time this time zone changed. + // The description field will contain the date of the last time zone + // change. + DATA_BEFORE_ACCOUNT_TIMEZONE_CHANGE = 1; + + // There is an unusual delay in processing the source data for the + // requested date range. The report results might be less up to date than + // usual. AdMob is aware of the issue and is actively working to resolve + // it. + DATA_DELAYED = 2; + + // Warnings that are exposed without a specific type. Useful when new + // warning types are added but the API is not changed yet. + OTHER = 3; + + // The currency being requested is not the account currency. The earning + // metrics will be based on the requested currency, and thus not a good + // estimation of the final payment anymore, due to the currency rate + // fluctuation. + REPORT_CURRENCY_NOT_ACCOUNT_CURRENCY = 4; + } + + // Type of the warning. + Type type = 1; + + // Describes the details of the warning message, in English. + string description = 2; +} + +// Groups data helps to treat the generated report. Always sent as a first +// message in the stream response. +message ReportHeader { + // The date range for which the report is generated. This is identical to the + // range specified in the report request. + DateRange date_range = 1; + + // Localization settings of the report. This is identical to the settings + // in the report request. + LocalizationSettings localization_settings = 2; + + // The report time zone. The value is a time-zone ID as specified by the CLDR + // project, for example, "America/Los_Angeles". + string reporting_time_zone = 3; +} + +// Groups data available after report generation, for example, warnings and row +// counts. Always sent as the last message in the stream response. +message ReportFooter { + // Warnings associated with generation of the report. + repeated ReportWarning warnings = 1; + + // Total number of rows that did match the request. + int64 matching_row_count = 2; +} + +// Specification of a single date range. Both dates are inclusive. +message DateRange { + // Start date of the date range, inclusive. Must be less than or equal to the + // end date. + google.type.Date start_date = 1; + + // End date of the date range, inclusive. Must be greater than or equal to the + // start date. + google.type.Date end_date = 2; +} + +// Localization settings for reports, such as currency and language. It affects +// how metrics are calculated. +message LocalizationSettings { + // Currency code of the earning related metrics, which is the 3-letter code + // defined in ISO 4217. The daily average rate is used for the currency + // conversion. Defaults to the account currency code if unspecified. + string currency_code = 1; + + // Language used for any localized text, such as some dimension value display + // labels. The language tag defined in the IETF BCP47. Defaults to 'en-US' if + // unspecified. + string language_code = 2; +} + +// List of string values. +message StringList { + // The string values. + repeated string values = 1; +} + +// The sorting order. +enum SortOrder { + // Default value for an unset field. Do not use. + SORT_ORDER_UNSPECIFIED = 0; + + // Sort dimension value or metric value in ascending order. + ASCENDING = 1; + + // Sort dimension value or metric value in descending order. + DESCENDING = 2; +} diff --git a/google/ads/googleads/base.yaml b/google/ads/googleads/base.yaml deleted file mode 100644 index a18b0c0df..000000000 --- a/google/ads/googleads/base.yaml +++ /dev/null @@ -1,276 +0,0 @@ -type: google.api.Service -config_version: 3 -name: googleads.googleapis.com -title: Google Ads API - -apis: -- name: google.ads.googleads.v0.services.AccountBudgetProposalService -- name: google.ads.googleads.v0.services.AccountBudgetService -- name: google.ads.googleads.v0.services.AdGroupAdService -- name: google.ads.googleads.v0.services.AdGroupAudienceViewService -- name: google.ads.googleads.v0.services.AdGroupBidModifierService -- name: google.ads.googleads.v0.services.AdGroupCriterionService -- name: google.ads.googleads.v0.services.AdGroupFeedService -- name: google.ads.googleads.v0.services.AdGroupService -- name: google.ads.googleads.v0.services.AgeRangeViewService -- name: google.ads.googleads.v0.services.BiddingStrategyService -- name: google.ads.googleads.v0.services.BillingSetupService -- name: google.ads.googleads.v0.services.CampaignAudienceViewService -- name: google.ads.googleads.v0.services.CampaignBidModifierService -- name: google.ads.googleads.v0.services.CampaignBudgetService -- name: google.ads.googleads.v0.services.CampaignCriterionService -- name: google.ads.googleads.v0.services.CampaignFeedService -- name: google.ads.googleads.v0.services.CampaignGroupService -- name: google.ads.googleads.v0.services.CampaignService -- name: google.ads.googleads.v0.services.CampaignSharedSetService -- name: google.ads.googleads.v0.services.CarrierConstantService -- name: google.ads.googleads.v0.services.ChangeStatusService -- name: google.ads.googleads.v0.services.ConversionActionService -- name: google.ads.googleads.v0.services.CustomerClientLinkService -- name: google.ads.googleads.v0.services.CustomerClientService -- name: google.ads.googleads.v0.services.CustomerFeedService -- name: google.ads.googleads.v0.services.CustomerManagerLinkService -- name: google.ads.googleads.v0.services.CustomerService -- name: google.ads.googleads.v0.services.DisplayKeywordViewService -- name: google.ads.googleads.v0.services.FeedItemService -- name: google.ads.googleads.v0.services.FeedMappingService -- name: google.ads.googleads.v0.services.FeedService -- name: google.ads.googleads.v0.services.GenderViewService -- name: google.ads.googleads.v0.services.GeoTargetConstantService -- name: google.ads.googleads.v0.services.GoogleAdsFieldService -- name: google.ads.googleads.v0.services.SharedCriterionService -- name: google.ads.googleads.v0.services.SharedSetService -- name: google.ads.googleads.v0.services.UserListService -- name: google.ads.googleads.v0.services.GoogleAdsService -- name: google.ads.googleads.v0.services.HotelGroupViewService -- name: google.ads.googleads.v0.services.HotelPerformanceViewService -- name: google.ads.googleads.v0.services.KeywordPlanAdGroupService -- name: google.ads.googleads.v0.services.KeywordPlanCampaignService -- name: google.ads.googleads.v0.services.KeywordPlanIdeaService -- name: google.ads.googleads.v0.services.KeywordPlanKeywordService -- name: google.ads.googleads.v0.services.KeywordPlanNegativeKeywordService -- name: google.ads.googleads.v0.services.KeywordPlanService -- name: google.ads.googleads.v0.services.KeywordViewService -- name: google.ads.googleads.v0.services.LanguageConstantService -- name: google.ads.googleads.v0.services.ManagedPlacementViewService -- name: google.ads.googleads.v0.services.MediaFileService -- name: google.ads.googleads.v0.services.ParentalStatusViewService -- name: google.ads.googleads.v0.services.PaymentsAccountService -- name: google.ads.googleads.v0.services.ProductGroupViewService -- name: google.ads.googleads.v0.services.RecommendationService -- name: google.ads.googleads.v0.services.SearchTermViewService -- name: google.ads.googleads.v0.services.TopicConstantService -- name: google.ads.googleads.v0.services.TopicViewService -- name: google.ads.googleads.v0.services.UserInterestService -- name: google.ads.googleads.v0.services.VideoService - -types: -- name: google.ads.googleads.v0.errors.GoogleAdsFailure - -documentation: - summary: |- - Manage your AdWords accounts, campaigns, and reports with this REST-based - API. - overview: |- - # This warning always fires when the last path segment of packages is not - - # the version - -backend: - rules: - - selector: google.ads.googleads.v0.services.AccountBudgetProposalService.GetAccountBudgetProposal - deadline: 60.0 - - selector: google.ads.googleads.v0.services.AccountBudgetProposalService.MutateAccountBudgetProposal - deadline: 60.0 - - selector: google.ads.googleads.v0.services.AccountBudgetService.GetAccountBudget - deadline: 60.0 - - selector: google.ads.googleads.v0.services.AdGroupAdService.GetAdGroupAd - deadline: 60.0 - - selector: google.ads.googleads.v0.services.AdGroupAdService.MutateAdGroupAds - deadline: 60.0 - - selector: google.ads.googleads.v0.services.AdGroupAudienceViewService.GetAdGroupAudienceView - deadline: 60.0 - - selector: google.ads.googleads.v0.services.AdGroupBidModifierService.GetAdGroupBidModifier - deadline: 60.0 - - selector: google.ads.googleads.v0.services.AdGroupBidModifierService.MutateAdGroupBidModifiers - deadline: 60.0 - - selector: google.ads.googleads.v0.services.AdGroupCriterionService.GetAdGroupCriterion - deadline: 60.0 - - selector: google.ads.googleads.v0.services.AdGroupCriterionService.MutateAdGroupCriteria - deadline: 60.0 - - selector: google.ads.googleads.v0.services.AdGroupFeedService.GetAdGroupFeed - deadline: 60.0 - - selector: google.ads.googleads.v0.services.AdGroupFeedService.MutateAdGroupFeeds - deadline: 60.0 - - selector: google.ads.googleads.v0.services.AdGroupService.GetAdGroup - deadline: 60.0 - - selector: google.ads.googleads.v0.services.AdGroupService.MutateAdGroups - deadline: 60.0 - - selector: google.ads.googleads.v0.services.AgeRangeViewService.GetAgeRangeView - deadline: 60.0 - - selector: google.ads.googleads.v0.services.BiddingStrategyService.GetBiddingStrategy - deadline: 60.0 - - selector: google.ads.googleads.v0.services.BiddingStrategyService.MutateBiddingStrategies - deadline: 60.0 - - selector: google.ads.googleads.v0.services.BillingSetupService.GetBillingSetup - deadline: 60.0 - - selector: google.ads.googleads.v0.services.BillingSetupService.MutateBillingSetup - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignAudienceViewService.GetCampaignAudienceView - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignBidModifierService.GetCampaignBidModifier - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignBidModifierService.MutateCampaignBidModifiers - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignBudgetService.GetCampaignBudget - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignBudgetService.MutateCampaignBudgets - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignCriterionService.GetCampaignCriterion - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignCriterionService.MutateCampaignCriteria - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignFeedService.GetCampaignFeed - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignFeedService.MutateCampaignFeeds - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignGroupService.GetCampaignGroup - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignGroupService.MutateCampaignGroups - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignService.GetCampaign - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignService.MutateCampaigns - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignSharedSetService.GetCampaignSharedSet - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CampaignSharedSetService.MutateCampaignSharedSets - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CarrierConstantService.GetCarrierConstant - deadline: 60.0 - - selector: google.ads.googleads.v0.services.ChangeStatusService.GetChangeStatus - deadline: 60.0 - - selector: google.ads.googleads.v0.services.ConversionActionService.GetConversionAction - deadline: 60.0 - - selector: google.ads.googleads.v0.services.ConversionActionService.MutateConversionActions - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CustomerClientLinkService.GetCustomerClientLink - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CustomerClientService.GetCustomerClient - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CustomerFeedService.GetCustomerFeed - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CustomerFeedService.MutateCustomerFeeds - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CustomerManagerLinkService.GetCustomerManagerLink - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CustomerService.GetCustomer - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CustomerService.MutateCustomer - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CustomerService.ListAccessibleCustomers - deadline: 60.0 - - selector: google.ads.googleads.v0.services.CustomerService.CreateCustomerClient - deadline: 60.0 - - selector: google.ads.googleads.v0.services.DisplayKeywordViewService.GetDisplayKeywordView - deadline: 60.0 - - selector: google.ads.googleads.v0.services.FeedItemService.GetFeedItem - deadline: 60.0 - - selector: google.ads.googleads.v0.services.FeedItemService.MutateFeedItems - deadline: 60.0 - - selector: google.ads.googleads.v0.services.FeedMappingService.GetFeedMapping - deadline: 60.0 - - selector: google.ads.googleads.v0.services.FeedMappingService.MutateFeedMappings - deadline: 60.0 - - selector: google.ads.googleads.v0.services.FeedService.GetFeed - deadline: 60.0 - - selector: google.ads.googleads.v0.services.FeedService.MutateFeeds - deadline: 60.0 - - selector: google.ads.googleads.v0.services.GenderViewService.GetGenderView - deadline: 60.0 - - selector: google.ads.googleads.v0.services.GeoTargetConstantService.GetGeoTargetConstant - deadline: 60.0 - - selector: google.ads.googleads.v0.services.GeoTargetConstantService.SuggestGeoTargetConstants - deadline: 60.0 - - selector: google.ads.googleads.v0.services.GoogleAdsFieldService.GetGoogleAdsField - deadline: 600.0 - - selector: google.ads.googleads.v0.services.GoogleAdsFieldService.SearchGoogleAdsFields - deadline: 600.0 - - selector: google.ads.googleads.v0.services.SharedCriterionService.GetSharedCriterion - deadline: 60.0 - - selector: google.ads.googleads.v0.services.SharedCriterionService.MutateSharedCriteria - deadline: 60.0 - - selector: google.ads.googleads.v0.services.SharedSetService.GetSharedSet - deadline: 60.0 - - selector: google.ads.googleads.v0.services.SharedSetService.MutateSharedSets - deadline: 60.0 - - selector: google.ads.googleads.v0.services.UserListService.GetUserList - deadline: 60.0 - - selector: google.ads.googleads.v0.services.UserListService.MutateUserLists - deadline: 60.0 - - selector: google.ads.googleads.v0.services.GoogleAdsService.Search - deadline: 600.0 - - selector: google.ads.googleads.v0.services.GoogleAdsService.Mutate - deadline: 600.0 - - selector: google.ads.googleads.v0.services.HotelGroupViewService.GetHotelGroupView - deadline: 60.0 - - selector: google.ads.googleads.v0.services.HotelPerformanceViewService.GetHotelPerformanceView - deadline: 60.0 - - selector: google.ads.googleads.v0.services.KeywordPlanAdGroupService.GetKeywordPlanAdGroup - deadline: 60.0 - - selector: google.ads.googleads.v0.services.KeywordPlanAdGroupService.MutateKeywordPlanAdGroups - deadline: 60.0 - - selector: google.ads.googleads.v0.services.KeywordPlanCampaignService.GetKeywordPlanCampaign - deadline: 60.0 - - selector: google.ads.googleads.v0.services.KeywordPlanCampaignService.MutateKeywordPlanCampaigns - deadline: 60.0 - - selector: google.ads.googleads.v0.services.KeywordPlanIdeaService.GenerateKeywordIdeas - deadline: 600.0 - - selector: google.ads.googleads.v0.services.KeywordPlanKeywordService.GetKeywordPlanKeyword - deadline: 60.0 - - selector: google.ads.googleads.v0.services.KeywordPlanKeywordService.MutateKeywordPlanKeywords - deadline: 60.0 - - selector: google.ads.googleads.v0.services.KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword - deadline: 60.0 - - selector: google.ads.googleads.v0.services.KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords - deadline: 60.0 - - selector: google.ads.googleads.v0.services.KeywordPlanService.GetKeywordPlan - deadline: 60.0 - - selector: google.ads.googleads.v0.services.KeywordPlanService.MutateKeywordPlans - deadline: 60.0 - - selector: google.ads.googleads.v0.services.KeywordPlanService.GenerateForecastMetrics - deadline: 600.0 - - selector: google.ads.googleads.v0.services.KeywordPlanService.GenerateHistoricalMetrics - deadline: 600.0 - - selector: google.ads.googleads.v0.services.KeywordViewService.GetKeywordView - deadline: 60.0 - - selector: google.ads.googleads.v0.services.LanguageConstantService.GetLanguageConstant - deadline: 60.0 - - selector: google.ads.googleads.v0.services.ManagedPlacementViewService.GetManagedPlacementView - deadline: 60.0 - - selector: google.ads.googleads.v0.services.MediaFileService.GetMediaFile - deadline: 60.0 - - selector: google.ads.googleads.v0.services.MediaFileService.MutateMediaFiles - deadline: 60.0 - - selector: google.ads.googleads.v0.services.ParentalStatusViewService.GetParentalStatusView - deadline: 60.0 - - selector: google.ads.googleads.v0.services.PaymentsAccountService.ListPaymentsAccounts - deadline: 60.0 - - selector: google.ads.googleads.v0.services.ProductGroupViewService.GetProductGroupView - deadline: 60.0 - - selector: google.ads.googleads.v0.services.RecommendationService.GetRecommendation - deadline: 600.0 - - selector: google.ads.googleads.v0.services.RecommendationService.ApplyRecommendation - deadline: 600.0 - - selector: google.ads.googleads.v0.services.RecommendationService.DismissRecommendation - deadline: 600.0 - - selector: google.ads.googleads.v0.services.SearchTermViewService.GetSearchTermView - deadline: 60.0 - - selector: google.ads.googleads.v0.services.TopicConstantService.GetTopicConstant - deadline: 60.0 - - selector: google.ads.googleads.v0.services.TopicViewService.GetTopicView - deadline: 60.0 - - selector: google.ads.googleads.v0.services.UserInterestService.GetUserInterest - deadline: 60.0 - - selector: google.ads.googleads.v0.services.VideoService.GetVideo - deadline: 60.0 diff --git a/google/ads/googleads/v1/common/ad_asset.proto b/google/ads/googleads/v1/common/ad_asset.proto index 0b919064a..e2c41757d 100644 --- a/google/ads/googleads/v1/common/ad_asset.proto +++ b/google/ads/googleads/v1/common/ad_asset.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.common; import "google/ads/googleads/v1/enums/served_asset_field_type.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -41,8 +40,7 @@ message AdTextAsset { // within this field. Multiple assets can be pinned to the same field. An // asset that is unpinned or pinned to a different field will not serve in a // field where some other asset has been pinned. - google.ads.googleads.v1.enums.ServedAssetFieldTypeEnum.ServedAssetFieldType - pinned_field = 2; + google.ads.googleads.v1.enums.ServedAssetFieldTypeEnum.ServedAssetFieldType pinned_field = 2; } // An image asset used inside an ad. diff --git a/google/ads/googleads/v1/common/ad_type_infos.proto b/google/ads/googleads/v1/common/ad_type_infos.proto index 2bf23d5c3..44b563760 100644 --- a/google/ads/googleads/v1/common/ad_type_infos.proto +++ b/google/ads/googleads/v1/common/ad_type_infos.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -23,8 +22,8 @@ import "google/ads/googleads/v1/enums/display_ad_format_setting.proto"; import "google/ads/googleads/v1/enums/display_upload_product_type.proto"; import "google/ads/googleads/v1/enums/legacy_app_install_ad_app_store.proto"; import "google/ads/googleads/v1/enums/mime_type.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -116,8 +115,7 @@ message CallOnlyAdInfo { // The call conversion behavior of this call only ad. It can use its own call // conversion setting, inherit the account level setting, or be disabled. - google.ads.googleads.v1.enums.CallConversionReportingStateEnum - .CallConversionReportingState conversion_reporting_state = 10; + google.ads.googleads.v1.enums.CallConversionReportingStateEnum.CallConversionReportingState conversion_reporting_state = 10; } // An expanded dynamic search ad. @@ -127,13 +125,19 @@ message ExpandedDynamicSearchAdInfo { } // A hotel ad. -message HotelAdInfo {} +message HotelAdInfo { + +} // A Smart Shopping ad. -message ShoppingSmartAdInfo {} +message ShoppingSmartAdInfo { + +} // A standard Shopping ad. -message ShoppingProductAdInfo {} +message ShoppingProductAdInfo { + +} // A Shopping Comparison Listing ad. message ShoppingComparisonListingAdInfo { @@ -274,11 +278,15 @@ message ImageAdInfo { // Representation of video bumper in-stream ad format (very short in-stream // non-skippable video ad). -message VideoBumperInStreamAdInfo {} +message VideoBumperInStreamAdInfo { + +} // Representation of video non-skippable in-stream ad format (15 second // in-stream non-skippable video ad). -message VideoNonSkippableInStreamAdInfo {} +message VideoNonSkippableInStreamAdInfo { + +} // Representation of video TrueView in-stream ad format (ad shown during video // playback, often at beginning, which displays a skip button a few seconds into @@ -404,8 +412,7 @@ message LegacyResponsiveDisplayAdInfo { google.protobuf.StringValue square_marketing_image = 12; // Specifies which format the ad will be served in. Default is ALL_FORMATS. - google.ads.googleads.v1.enums.DisplayAdFormatSettingEnum - .DisplayAdFormatSetting format_setting = 13; + google.ads.googleads.v1.enums.DisplayAdFormatSettingEnum.DisplayAdFormatSetting format_setting = 13; // Prefix before price. E.g. 'as low as'. google.protobuf.StringValue price_prefix = 14; @@ -465,8 +472,7 @@ message LegacyAppInstallAdInfo { google.protobuf.StringValue app_id = 1; // The app store the mobile app is available in. - google.ads.googleads.v1.enums.LegacyAppInstallAdAppStoreEnum - .LegacyAppInstallAdAppStore app_store = 2; + google.ads.googleads.v1.enums.LegacyAppInstallAdAppStoreEnum.LegacyAppInstallAdAppStore app_store = 2; // The headline of the ad. google.protobuf.StringValue headline = 3; @@ -513,7 +519,7 @@ message ResponsiveDisplayAdInfo { // least 1 and max 5 headlines can be specified. repeated AdTextAsset descriptions = 7; - // Optional YouTube vidoes for the ad. A maximum of 5 videos can be specified. + // Optional YouTube videos for the ad. A maximum of 5 videos can be specified. repeated AdVideoAsset youtube_videos = 8; // The advertiser/brand name. Maximum display width is 25. @@ -547,8 +553,7 @@ message ResponsiveDisplayAdInfo { google.protobuf.StringValue promo_text = 15; // Specifies which format the ad will be served in. Default is ALL_FORMATS. - google.ads.googleads.v1.enums.DisplayAdFormatSettingEnum - .DisplayAdFormatSetting format_setting = 16; + google.ads.googleads.v1.enums.DisplayAdFormatSettingEnum.DisplayAdFormatSetting format_setting = 16; } // A generic type of display ad. The exact ad format is controlled by the @@ -556,8 +561,7 @@ message ResponsiveDisplayAdInfo { // need to be included with the ad. message DisplayUploadAdInfo { // The product type of this ad. See comments on the enum for details. - google.ads.googleads.v1.enums.DisplayUploadProductTypeEnum - .DisplayUploadProductType display_upload_product_type = 1; + google.ads.googleads.v1.enums.DisplayUploadProductTypeEnum.DisplayUploadProductType display_upload_product_type = 1; // The asset data that makes up the ad. oneof media_asset { diff --git a/google/ads/googleads/v1/common/asset_types.proto b/google/ads/googleads/v1/common/asset_types.proto index 7127dfbee..948a7d071 100644 --- a/google/ads/googleads/v1/common/asset_types.proto +++ b/google/ads/googleads/v1/common/asset_types.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.common; import "google/ads/googleads/v1/enums/mime_type.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; diff --git a/google/ads/googleads/v1/common/bidding.proto b/google/ads/googleads/v1/common/bidding.proto index d6b9f18f3..3d00cbacf 100644 --- a/google/ads/googleads/v1/common/bidding.proto +++ b/google/ads/googleads/v1/common/bidding.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,8 @@ package google.ads.googleads.v1.common; import "google/ads/googleads/v1/enums/page_one_promoted_strategy_goal.proto"; import "google/ads/googleads/v1/enums/target_impression_share_location.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -46,7 +45,9 @@ message Commission { // An automated bidding strategy that raises bids for clicks // that seem more likely to lead to a conversion and lowers // them for clicks where they seem less likely. -message EnhancedCpc {} +message EnhancedCpc { + +} // Manual click-based bidding where user pays per click. message ManualCpc { @@ -55,14 +56,20 @@ message ManualCpc { } // Manual impression-based bidding where user pays per thousand impressions. -message ManualCpm {} +message ManualCpm { + +} // View based bidding where user pays per video view. -message ManualCpv {} +message ManualCpv { + +} // An automated bidding strategy that sets bids to help get the most conversions // for your campaign while spending your budget. -message MaximizeConversions {} +message MaximizeConversions { + +} // An automated bidding strategy which tries to maximize conversion value // given a daily budget. @@ -77,11 +84,11 @@ message MaximizeConversionValue { // An automated bidding strategy which sets CPC bids to target impressions on // page one, or page one promoted slots on google.com. +// This strategy is deprecated. message PageOnePromoted { // The strategy goal of where impressions are desired to be shown on // search result pages. - google.ads.googleads.v1.enums.PageOnePromotedStrategyGoalEnum - .PageOnePromotedStrategyGoal strategy_goal = 1; + google.ads.googleads.v1.enums.PageOnePromotedStrategyGoalEnum.PageOnePromotedStrategyGoal strategy_goal = 1; // Maximum bid limit that can be set by the bid strategy. // The limit applies to all keywords managed by the strategy. @@ -126,7 +133,9 @@ message TargetCpa { // Target CPM (cost per thousand impressions) is an automated bidding strategy // that sets bids to optimize performance given the target CPM you set. -message TargetCpm {} +message TargetCpm { + +} // An automated bidding strategy that sets bids so that a certain percentage of // search ads are shown at the top of the first page (or other targeted @@ -134,8 +143,7 @@ message TargetCpm {} // Next Id = 4 message TargetImpressionShare { // The targeted location on the search results page. - google.ads.googleads.v1.enums.TargetImpressionShareLocationEnum - .TargetImpressionShareLocation location = 1; + google.ads.googleads.v1.enums.TargetImpressionShareLocationEnum.TargetImpressionShareLocation location = 1; // The desired fraction of ads to be shown in the targeted location in micros. // E.g. 1% equals 10,000. @@ -149,6 +157,7 @@ message TargetImpressionShare { // An automated bidding strategy that sets bids based on the target fraction of // auctions where the advertiser should outrank a specific competitor. +// This strategy is deprecated. message TargetOutrankShare { // The target fraction of auctions where the advertiser should outrank the // competitor. diff --git a/google/ads/googleads/v1/common/click_location.proto b/google/ads/googleads/v1/common/click_location.proto index 39076fd57..2e86246e5 100644 --- a/google/ads/googleads/v1/common/click_location.proto +++ b/google/ads/googleads/v1/common/click_location.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.common; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; diff --git a/google/ads/googleads/v1/common/criteria.proto b/google/ads/googleads/v1/common/criteria.proto index 1ae53f31d..29e8c0238 100644 --- a/google/ads/googleads/v1/common/criteria.proto +++ b/google/ads/googleads/v1/common/criteria.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -41,8 +40,8 @@ import "google/ads/googleads/v1/enums/product_type_level.proto"; import "google/ads/googleads/v1/enums/proximity_radius_units.proto"; import "google/ads/googleads/v1/enums/webpage_condition_operand.proto"; import "google/ads/googleads/v1/enums/webpage_condition_operator.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -61,8 +60,7 @@ message KeywordInfo { google.protobuf.StringValue text = 1; // The match type of the keyword. - google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType - match_type = 2; + google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 2; } // A placement criterion. This can be used to modify bids for sites when @@ -89,10 +87,10 @@ message MobileApplicationInfo { // corresponding platform. // For iOS, this native identifier is the 9 digit string that appears at the // end of an App Store URL (e.g., "476943146" for "Flood-It! 2" whose App - // Store link is http://itunes.apple.com/us/app/flood-it!-2/id476943146). + // Store link is "http://itunes.apple.com/us/app/flood-it!-2/id476943146"). // For Android, this native identifier is the application's package name // (e.g., "com.labpixies.colordrips" for "Color Drips" given Google Play link - // https://play.google.com/store/apps/details?id=com.labpixies.colordrips). + // "https://play.google.com/store/apps/details?id=com.labpixies.colordrips"). // A well formed app id for Google Ads API would thus be "1-476943146" for iOS // and "2-com.labpixies.colordrips" for Android. // This field is required and must be set in CREATE operations. @@ -117,8 +115,7 @@ message DeviceInfo { // A preferred content criterion. message PreferredContentInfo { // Type of the preferred content. - google.ads.googleads.v1.enums.PreferredContentTypeEnum.PreferredContentType - type = 2; + google.ads.googleads.v1.enums.PreferredContentTypeEnum.PreferredContentType type = 2; } // A listing group criterion. @@ -231,8 +228,7 @@ message ListingCustomAttributeInfo { google.protobuf.StringValue value = 1; // Indicates the index of the custom attribute. - google.ads.googleads.v1.enums.ListingCustomAttributeIndexEnum - .ListingCustomAttributeIndex index = 2; + google.ads.googleads.v1.enums.ListingCustomAttributeIndexEnum.ListingCustomAttributeIndex index = 2; } // Bidding category of a product offer. @@ -240,7 +236,7 @@ message ProductBiddingCategoryInfo { // ID of the product bidding category. // // This ID is equivalent to the google_product_category ID as described in - // this article: https://support.google.com/merchants/answer/6324436. + // this article: https://support.google.com/merchants/answer/6324436 google.protobuf.Int64Value id = 1; // Two-letter upper-case country code of the product bidding category. It must @@ -248,8 +244,7 @@ message ProductBiddingCategoryInfo { google.protobuf.StringValue country_code = 2; // Level of the product bidding category. - google.ads.googleads.v1.enums.ProductBiddingCategoryLevelEnum - .ProductBiddingCategoryLevel level = 3; + google.ads.googleads.v1.enums.ProductBiddingCategoryLevelEnum.ProductBiddingCategoryLevel level = 3; } // Locality of a product offer. @@ -261,15 +256,13 @@ message ProductChannelInfo { // Availability of a product offer. message ProductChannelExclusivityInfo { // Value of the availability. - google.ads.googleads.v1.enums.ProductChannelExclusivityEnum - .ProductChannelExclusivity channel_exclusivity = 1; + google.ads.googleads.v1.enums.ProductChannelExclusivityEnum.ProductChannelExclusivity channel_exclusivity = 1; } // Condition of a product offer. message ProductConditionInfo { // Value of the condition. - google.ads.googleads.v1.enums.ProductConditionEnum.ProductCondition - condition = 1; + google.ads.googleads.v1.enums.ProductConditionEnum.ProductCondition condition = 1; } // Item id of a product offer. @@ -288,13 +281,14 @@ message ProductTypeInfo { } // Unknown listing dimension. -message UnknownListingDimensionInfo {} +message UnknownListingDimensionInfo { + +} // Criterion for hotel date selection (default dates vs. user selected). message HotelDateSelectionTypeInfo { // Type of the hotel date selection - google.ads.googleads.v1.enums.HotelDateSelectionTypeEnum - .HotelDateSelectionType type = 1; + google.ads.googleads.v1.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType type = 1; } // Criterion for number of days prior to the stay the booking is being made. @@ -389,8 +383,7 @@ message IncomeRangeInfo { // A parental status criterion. message ParentalStatusInfo { // Type of the parental status. - google.ads.googleads.v1.enums.ParentalStatusTypeEnum.ParentalStatusType type = - 1; + google.ads.googleads.v1.enums.ParentalStatusTypeEnum.ParentalStatusType type = 1; } // A YouTube Video criterion. @@ -428,8 +421,7 @@ message ProximityInfo { google.protobuf.DoubleValue radius = 2; // The unit of measurement of the radius. Default is KILOMETERS. - google.ads.googleads.v1.enums.ProximityRadiusUnitsEnum.ProximityRadiusUnits - radius_units = 3; + google.ads.googleads.v1.enums.ProximityRadiusUnitsEnum.ProximityRadiusUnits radius_units = 3; // Full address. AddressInfo address = 4; @@ -540,13 +532,10 @@ message WebpageInfo { // Logical expression for targeting webpages of an advertiser's website. message WebpageConditionInfo { // Operand of webpage targeting condition. - google.ads.googleads.v1.enums.WebpageConditionOperandEnum - .WebpageConditionOperand operand = 1; + google.ads.googleads.v1.enums.WebpageConditionOperandEnum.WebpageConditionOperand operand = 1; // Operator of webpage targeting condition. - google.ads.googleads.v1.enums.WebpageConditionOperatorEnum - .WebpageConditionOperator - operator = 2; + google.ads.googleads.v1.enums.WebpageConditionOperatorEnum.WebpageConditionOperator operator = 2; // Argument of webpage targeting condition. google.protobuf.StringValue argument = 3; @@ -561,8 +550,7 @@ message OperatingSystemVersionInfo { // An app payment model criterion. message AppPaymentModelInfo { // Type of the app payment model. - google.ads.googleads.v1.enums.AppPaymentModelTypeEnum.AppPaymentModelType - type = 1; + google.ads.googleads.v1.enums.AppPaymentModelTypeEnum.AppPaymentModelType type = 1; } // A mobile device criterion. @@ -601,6 +589,5 @@ message LocationGroupInfo { // Unit of the radius, miles and meters supported currently. // This is required and must be set in CREATE operations. - google.ads.googleads.v1.enums.LocationGroupRadiusUnitsEnum - .LocationGroupRadiusUnits radius_units = 4; + google.ads.googleads.v1.enums.LocationGroupRadiusUnitsEnum.LocationGroupRadiusUnits radius_units = 4; } diff --git a/google/ads/googleads/v1/common/criterion_category_availability.proto b/google/ads/googleads/v1/common/criterion_category_availability.proto index 1b87d016b..28624e025 100644 --- a/google/ads/googleads/v1/common/criterion_category_availability.proto +++ b/google/ads/googleads/v1/common/criterion_category_availability.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -21,8 +20,8 @@ import "google/ads/googleads/v1/enums/advertising_channel_sub_type.proto"; import "google/ads/googleads/v1/enums/advertising_channel_type.proto"; import "google/ads/googleads/v1/enums/criterion_category_channel_availability_mode.proto"; import "google/ads/googleads/v1/enums/criterion_category_locale_availability_mode.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -53,16 +52,13 @@ message CriterionCategoryChannelAvailability { // CHANNEL_TYPE_AND_SUBTYPES (advertising_channel_type, // advertising_channel_sub_type, and include_default_channel_sub_type will all // be set). - google.ads.googleads.v1.enums.CriterionCategoryChannelAvailabilityModeEnum - .CriterionCategoryChannelAvailabilityMode availability_mode = 1; + google.ads.googleads.v1.enums.CriterionCategoryChannelAvailabilityModeEnum.CriterionCategoryChannelAvailabilityMode availability_mode = 1; // Channel type the category is available to. - google.ads.googleads.v1.enums.AdvertisingChannelTypeEnum - .AdvertisingChannelType advertising_channel_type = 2; + google.ads.googleads.v1.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 2; // Channel subtypes under the channel type the category is available to. - repeated google.ads.googleads.v1.enums.AdvertisingChannelSubTypeEnum - .AdvertisingChannelSubType advertising_channel_sub_type = 3; + repeated google.ads.googleads.v1.enums.AdvertisingChannelSubTypeEnum.AdvertisingChannelSubType advertising_channel_sub_type = 3; // Whether default channel sub type is included. For example, // advertising_channel_type being DISPLAY and include_default_channel_sub_type @@ -77,8 +73,7 @@ message CriterionCategoryLocaleAvailability { // language will be empty), COUNTRY (only country will be set), LANGUAGE (only // language wil be set), COUNTRY_AND_LANGUAGE (both country and language will // be set). - google.ads.googleads.v1.enums.CriterionCategoryLocaleAvailabilityModeEnum - .CriterionCategoryLocaleAvailabilityMode availability_mode = 1; + google.ads.googleads.v1.enums.CriterionCategoryLocaleAvailabilityModeEnum.CriterionCategoryLocaleAvailabilityMode availability_mode = 1; // Code of the country. google.protobuf.StringValue country_code = 2; diff --git a/google/ads/googleads/v1/common/custom_parameter.proto b/google/ads/googleads/v1/common/custom_parameter.proto index 4fc8d0e6c..e2df7c6d4 100644 --- a/google/ads/googleads/v1/common/custom_parameter.proto +++ b/google/ads/googleads/v1/common/custom_parameter.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.common; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; diff --git a/google/ads/googleads/v1/common/dates.proto b/google/ads/googleads/v1/common/dates.proto index ecc33db4e..4d6415f05 100644 --- a/google/ads/googleads/v1/common/dates.proto +++ b/google/ads/googleads/v1/common/dates.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.common; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -33,9 +32,9 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Common"; // A date range. message DateRange { - // The start date, in yyyy-mm-dd format. + // The start date, in yyyy-mm-dd format. This date is inclusive. google.protobuf.StringValue start_date = 1; - // The end date, in yyyy-mm-dd format. + // The end date, in yyyy-mm-dd format. This date is inclusive. google.protobuf.StringValue end_date = 2; } diff --git a/google/ads/googleads/v1/common/explorer_auto_optimizer_setting.proto b/google/ads/googleads/v1/common/explorer_auto_optimizer_setting.proto index a8fcd1bf4..f3a314dab 100644 --- a/google/ads/googleads/v1/common/explorer_auto_optimizer_setting.proto +++ b/google/ads/googleads/v1/common/explorer_auto_optimizer_setting.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.common; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -31,9 +30,9 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Common"; // Proto file describing ExplorerAutoOptimizerSetting -// Settings for the -// -// Display Campaign Optimizer, initially termed "Explorer". +// Settings for the Display Campaign Optimizer, initially named "Explorer". +// Learn more about +// [automatic targeting](https://support.google.com/google-ads/answer/190596). message ExplorerAutoOptimizerSetting { // Indicates whether the optimizer is turned on. google.protobuf.BoolValue opt_in = 1; diff --git a/google/ads/googleads/v1/common/extensions.proto b/google/ads/googleads/v1/common/extensions.proto index becf03434..b9f6f31d4 100644 --- a/google/ads/googleads/v1/common/extensions.proto +++ b/google/ads/googleads/v1/common/extensions.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -26,8 +25,8 @@ import "google/ads/googleads/v1/enums/price_extension_price_unit.proto"; import "google/ads/googleads/v1/enums/price_extension_type.proto"; import "google/ads/googleads/v1/enums/promotion_extension_discount_modifier.proto"; import "google/ads/googleads/v1/enums/promotion_extension_occasion.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -100,8 +99,7 @@ message CallFeedItem { // Enum value that indicates whether this call extension uses its own call // conversion setting (or just have call conversion disabled), or following // the account level setting. - google.ads.googleads.v1.enums.CallConversionReportingStateEnum - .CallConversionReportingState call_conversion_reporting_state = 6; + google.ads.googleads.v1.enums.CallConversionReportingStateEnum.CallConversionReportingState call_conversion_reporting_state = 6; } // Represents a callout extension. @@ -196,12 +194,10 @@ message TextMessageFeedItem { // Represents a Price extension. message PriceFeedItem { // Price extension type of this extension. - google.ads.googleads.v1.enums.PriceExtensionTypeEnum.PriceExtensionType type = - 1; + google.ads.googleads.v1.enums.PriceExtensionTypeEnum.PriceExtensionType type = 1; // Price qualifier for all offers of this price extension. - google.ads.googleads.v1.enums.PriceExtensionPriceQualifierEnum - .PriceExtensionPriceQualifier price_qualifier = 2; + google.ads.googleads.v1.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier price_qualifier = 2; // Tracking URL template for all offers of this price extension. google.protobuf.StringValue tracking_url_template = 3; @@ -229,8 +225,7 @@ message PriceOffer { Money price = 3; // Price unit for this offer. - google.ads.googleads.v1.enums.PriceExtensionPriceUnitEnum - .PriceExtensionPriceUnit unit = 4; + google.ads.googleads.v1.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4; // A list of possible final URLs after all cross domain redirects. repeated google.protobuf.StringValue final_urls = 5; @@ -246,8 +241,7 @@ message PromotionFeedItem { google.protobuf.StringValue promotion_target = 1; // Enum that modifies the qualification of the discount. - google.ads.googleads.v1.enums.PromotionExtensionDiscountModifierEnum - .PromotionExtensionDiscountModifier discount_modifier = 2; + google.ads.googleads.v1.enums.PromotionExtensionDiscountModifierEnum.PromotionExtensionDiscountModifier discount_modifier = 2; // Start date of when the promotion is eligible to be redeemed. google.protobuf.StringValue promotion_start_date = 7; @@ -258,8 +252,7 @@ message PromotionFeedItem { // The occasion the promotion was intended for. // If an occasion is set, the redemption window will need to fall within // the date range associated with the occasion. - google.ads.googleads.v1.enums.PromotionExtensionOccasionEnum - .PromotionExtensionOccasion occasion = 9; + google.ads.googleads.v1.enums.PromotionExtensionOccasionEnum.PromotionExtensionOccasion occasion = 9; // A list of possible final URLs after all cross domain redirects. // This field is required. diff --git a/google/ads/googleads/v1/common/feed_common.proto b/google/ads/googleads/v1/common/feed_common.proto index 8b67f2b3a..3a4dd3263 100644 --- a/google/ads/googleads/v1/common/feed_common.proto +++ b/google/ads/googleads/v1/common/feed_common.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.common; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; diff --git a/google/ads/googleads/v1/common/final_app_url.proto b/google/ads/googleads/v1/common/final_app_url.proto index 9c6375a50..169afff7f 100644 --- a/google/ads/googleads/v1/common/final_app_url.proto +++ b/google/ads/googleads/v1/common/final_app_url.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.common; import "google/ads/googleads/v1/enums/app_url_operating_system_type.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -35,8 +34,7 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Common"; // A URL for deep linking into an app for the given operating system. message FinalAppUrl { // The operating system targeted by this URL. Required. - google.ads.googleads.v1.enums.AppUrlOperatingSystemTypeEnum - .AppUrlOperatingSystemType os_type = 1; + google.ads.googleads.v1.enums.AppUrlOperatingSystemTypeEnum.AppUrlOperatingSystemType os_type = 1; // The app deep link URL. Deep links specify a location in an app that // corresponds to the content you'd like to show, and should be of the form diff --git a/google/ads/googleads/v1/common/frequency_cap.proto b/google/ads/googleads/v1/common/frequency_cap.proto index 4d877e9f9..aaef68d67 100644 --- a/google/ads/googleads/v1/common/frequency_cap.proto +++ b/google/ads/googleads/v1/common/frequency_cap.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,8 +19,8 @@ package google.ads.googleads.v1.common; import "google/ads/googleads/v1/enums/frequency_cap_event_type.proto"; import "google/ads/googleads/v1/enums/frequency_cap_level.proto"; import "google/ads/googleads/v1/enums/frequency_cap_time_unit.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -50,16 +49,13 @@ message FrequencyCapEntry { message FrequencyCapKey { // The level on which the cap is to be applied (e.g. ad group ad, ad group). // The cap is applied to all the entities of this level. - google.ads.googleads.v1.enums.FrequencyCapLevelEnum.FrequencyCapLevel level = - 1; + google.ads.googleads.v1.enums.FrequencyCapLevelEnum.FrequencyCapLevel level = 1; // The type of event that the cap applies to (e.g. impression). - google.ads.googleads.v1.enums.FrequencyCapEventTypeEnum.FrequencyCapEventType - event_type = 3; + google.ads.googleads.v1.enums.FrequencyCapEventTypeEnum.FrequencyCapEventType event_type = 3; // Unit of time the cap is defined at (e.g. day, week). - google.ads.googleads.v1.enums.FrequencyCapTimeUnitEnum.FrequencyCapTimeUnit - time_unit = 2; + google.ads.googleads.v1.enums.FrequencyCapTimeUnitEnum.FrequencyCapTimeUnit time_unit = 2; // Number of time units the cap lasts. google.protobuf.Int32Value time_length = 4; diff --git a/google/ads/googleads/v1/common/keyword_plan_common.proto b/google/ads/googleads/v1/common/keyword_plan_common.proto index 15e989995..5afc324cf 100644 --- a/google/ads/googleads/v1/common/keyword_plan_common.proto +++ b/google/ads/googleads/v1/common/keyword_plan_common.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.common; import "google/ads/googleads/v1/enums/keyword_plan_competition_level.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -38,6 +37,5 @@ message KeywordPlanHistoricalMetrics { google.protobuf.Int64Value avg_monthly_searches = 1; // The competition level for the query. - google.ads.googleads.v1.enums.KeywordPlanCompetitionLevelEnum - .KeywordPlanCompetitionLevel competition = 2; + google.ads.googleads.v1.enums.KeywordPlanCompetitionLevelEnum.KeywordPlanCompetitionLevel competition = 2; } diff --git a/google/ads/googleads/v1/common/matching_function.proto b/google/ads/googleads/v1/common/matching_function.proto index c79d5e0aa..4ba7f5151 100644 --- a/google/ads/googleads/v1/common/matching_function.proto +++ b/google/ads/googleads/v1/common/matching_function.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,8 @@ package google.ads.googleads.v1.common; import "google/ads/googleads/v1/enums/matching_function_context_type.proto"; import "google/ads/googleads/v1/enums/matching_function_operator.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -40,15 +39,15 @@ message MatchingFunction { // String representation of the Function. // // Examples: - // 1) IDENTITY(true) or IDENTITY(false). All or none feed items serve. - // 2) EQUALS(CONTEXT.DEVICE,"Mobile") - // 3) IN(FEED_ITEM_ID,{1000001,1000002,1000003}) - // 4) CONTAINS_ANY(FeedAttribute[12345678,0],{"Mars cruise","Venus cruise"}) - // 5) AND(IN(FEED_ITEM_ID,{10001,10002}),EQUALS(CONTEXT.DEVICE,"Mobile")) - // See // - // https: - // //developers.google.com/adwords/api/docs/guides/feed-matching-functions + // 1. IDENTITY(true) or IDENTITY(false). All or no feed items served. + // 2. EQUALS(CONTEXT.DEVICE,"Mobile") + // 3. IN(FEED_ITEM_ID,{1000001,1000002,1000003}) + // 4. CONTAINS_ANY(FeedAttribute[12345678,0],{"Mars cruise","Venus cruise"}) + // 5. AND(IN(FEED_ITEM_ID,{10001,10002}),EQUALS(CONTEXT.DEVICE,"Mobile")) + // + // For more details, visit + // https://developers.google.com/adwords/api/docs/guides/feed-matching-functions // // Note that because multiple strings may represent the same underlying // function (whitespace and single versus double quotation marks, for @@ -57,9 +56,7 @@ message MatchingFunction { google.protobuf.StringValue function_string = 1; // Operator for a function. - google.ads.googleads.v1.enums.MatchingFunctionOperatorEnum - .MatchingFunctionOperator - operator = 4; + google.ads.googleads.v1.enums.MatchingFunctionOperatorEnum.MatchingFunctionOperator operator = 4; // The operands on the left hand side of the equation. This is also the // operand to be used for single operand expressions such as NOT. @@ -109,8 +106,7 @@ message Operand { // An operand in a function referring to a value in the request context. message RequestContextOperand { // Type of value to be referred in the request context. - google.ads.googleads.v1.enums.MatchingFunctionContextTypeEnum - .MatchingFunctionContextType context_type = 1; + google.ads.googleads.v1.enums.MatchingFunctionContextTypeEnum.MatchingFunctionContextType context_type = 1; } // Different operands that can be used in a matching function. Required. diff --git a/google/ads/googleads/v1/common/metrics.proto b/google/ads/googleads/v1/common/metrics.proto index 139e77a46..9cb045165 100644 --- a/google/ads/googleads/v1/common/metrics.proto +++ b/google/ads/googleads/v1/common/metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,8 @@ package google.ads.googleads.v1.common; import "google/ads/googleads/v1/enums/interaction_event_type.proto"; import "google/ads/googleads/v1/enums/quality_score_bucket.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -94,8 +93,7 @@ message Metrics { // The value of all conversions from interactions divided by the total number // of interactions. - google.protobuf.DoubleValue - all_conversions_from_interactions_value_per_interaction = 67; + google.protobuf.DoubleValue all_conversions_from_interactions_value_per_interaction = 67; // The number of times people clicked a link to view a store's menu after // clicking an ad. @@ -232,8 +230,7 @@ message Metrics { // The value of conversions from interactions divided by the number of ad // interactions. This only includes conversion actions which // include_in_conversions_metric attribute is set to true. - google.protobuf.DoubleValue - conversions_from_interactions_value_per_interaction = 72; + google.protobuf.DoubleValue conversions_from_interactions_value_per_interaction = 72; // The number of conversions. This only includes conversion actions which // include_in_conversions_metric attribute is set to true. @@ -254,8 +251,7 @@ message Metrics { // The cost of ad interactions divided by current model attributed // conversions. This only includes conversion actions which // include_in_conversions_metric attribute is set to true. - google.protobuf.DoubleValue cost_per_current_model_attributed_conversion = - 106; + google.protobuf.DoubleValue cost_per_current_model_attributed_conversion = 106; // Conversions from when a customer clicks on a Google Ads ad on one device, // then converts on a different device or browser. @@ -275,15 +271,12 @@ message Metrics { // number of ad interactions (such as clicks for text ads or views for video // ads). This only includes conversion actions which // include_in_conversions_metric attribute is set to true. - google.protobuf.DoubleValue - current_model_attributed_conversions_from_interactions_rate = 102; + google.protobuf.DoubleValue current_model_attributed_conversions_from_interactions_rate = 102; // The value of current model attributed conversions from interactions divided // by the number of ad interactions. This only includes conversion actions // which include_in_conversions_metric attribute is set to true. - google.protobuf.DoubleValue - current_model_attributed_conversions_from_interactions_value_per_interaction = - 103; + google.protobuf.DoubleValue current_model_attributed_conversions_from_interactions_value_per_interaction = 103; // The total value of current model attributed conversions. This only includes // conversion actions which include_in_conversions_metric attribute is set to @@ -293,8 +286,7 @@ message Metrics { // The value of current model attributed conversions divided by the cost of ad // interactions. This only includes conversion actions which // include_in_conversions_metric attribute is set to true. - google.protobuf.DoubleValue - current_model_attributed_conversions_value_per_cost = 105; + google.protobuf.DoubleValue current_model_attributed_conversions_value_per_cost = 105; // How often people engage with your ad after it's shown to them. This is the // number of ad expansions divided by the number of times your ad is shown. @@ -309,19 +301,16 @@ message Metrics { google.protobuf.DoubleValue hotel_average_lead_value_micros = 75; // The creative historical quality score. - google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket - historical_creative_quality_score = 80; + google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket historical_creative_quality_score = 80; // The quality of historical landing page experience. - google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket - historical_landing_page_quality_score = 81; + google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket historical_landing_page_quality_score = 81; // The historical quality score. google.protobuf.Int64Value historical_quality_score = 82; // The historical search predicted click through rate (CTR). - google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket - historical_search_predicted_ctr = 83; + google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket historical_search_predicted_ctr = 83; // The number of times the ad was forwarded to someone else as a message. google.protobuf.Int64Value gmail_forwards = 85; @@ -357,8 +346,7 @@ message Metrics { google.protobuf.Int64Value interactions = 39; // The types of payable and free interactions. - repeated google.ads.googleads.v1.enums.InteractionEventTypeEnum - .InteractionEventType interaction_event_types = 100; + repeated google.ads.googleads.v1.enums.InteractionEventTypeEnum.InteractionEventType interaction_event_types = 100; // The percentage of clicks filtered out of your total number of clicks // (filtered + non-filtered clicks) during the reporting period. @@ -418,16 +406,15 @@ message Metrics { // The percentage of the customer's Shopping or Search ad impressions that are // shown in the most prominent Shopping position. See - // this Merchant - // Center article for details. Any value below 0.1 is reported as 0.0999. + // https://support.google.com/google-ads/answer/7501826 + // for details. Any value below 0.1 is reported as 0.0999. google.protobuf.DoubleValue search_absolute_top_impression_share = 78; // The number estimating how often your ad wasn't the very first ad above the // organic search results due to a low budget. Note: Search // budget lost absolute top impression share is reported in the range of 0 to // 0.9. Any value above 0.9 is reported as 0.9001. - google.protobuf.DoubleValue search_budget_lost_absolute_top_impression_share = - 88; + google.protobuf.DoubleValue search_budget_lost_absolute_top_impression_share = 88; // The estimated percent of times that your ad was eligible to show on the // Search Network but didn't because your budget was too low. Note: Search @@ -465,8 +452,7 @@ message Metrics { // organic search results due to poor Ad Rank. // Note: Search rank lost absolute top impression share is reported in the // range of 0 to 0.9. Any value above 0.9 is reported as 0.9001. - google.protobuf.DoubleValue search_rank_lost_absolute_top_impression_share = - 90; + google.protobuf.DoubleValue search_rank_lost_absolute_top_impression_share = 90; // The estimated percentage of impressions on the Search Network // that your ads didn't receive due to poor Ad Rank. @@ -497,8 +483,7 @@ message Metrics { // The percentage of ad clicks to Accelerated Mobile Pages (AMP) landing pages // that reach a valid AMP page. - google.protobuf.DoubleValue valid_accelerated_mobile_pages_clicks_percentage = - 108; + google.protobuf.DoubleValue valid_accelerated_mobile_pages_clicks_percentage = 108; // The value of all conversions divided by the number of all conversions. google.protobuf.DoubleValue value_per_all_conversions = 52; @@ -511,8 +496,7 @@ message Metrics { // The value of current model attributed conversions divided by the number of // the conversions. This only includes conversion actions which // include_in_conversions_metric attribute is set to true. - google.protobuf.DoubleValue value_per_current_model_attributed_conversion = - 94; + google.protobuf.DoubleValue value_per_current_model_attributed_conversion = 94; // Percentage of impressions where the viewer watched all of your video. google.protobuf.DoubleValue video_quartile_100_rate = 54; diff --git a/google/ads/googleads/v1/common/policy.proto b/google/ads/googleads/v1/common/policy.proto index 5fbbb2991..34699ef10 100644 --- a/google/ads/googleads/v1/common/policy.proto +++ b/google/ads/googleads/v1/common/policy.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,8 +19,8 @@ package google.ads.googleads.v1.common; import "google/ads/googleads/v1/enums/policy_topic_entry_type.proto"; import "google/ads/googleads/v1/enums/policy_topic_evidence_destination_mismatch_url_type.proto"; import "google/ads/googleads/v1/enums/policy_topic_evidence_destination_not_working_device.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -90,8 +89,7 @@ message PolicyTopicEntry { google.protobuf.StringValue topic = 1; // Describes the negative or positive effect this policy will have on serving. - google.ads.googleads.v1.enums.PolicyTopicEntryTypeEnum.PolicyTopicEntryType - type = 2; + google.ads.googleads.v1.enums.PolicyTopicEntryTypeEnum.PolicyTopicEntryType type = 2; // Additional information that explains policy finding // (e.g. the brand name for a trademark finding). @@ -129,9 +127,7 @@ message PolicyTopicEvidence { // Evidence of mismatches between the URLs of a resource. message DestinationMismatch { // The set of URLs that did not match each other. - repeated google.ads.googleads.v1.enums - .PolicyTopicEvidenceDestinationMismatchUrlTypeEnum - .PolicyTopicEvidenceDestinationMismatchUrlType url_types = 1; + repeated google.ads.googleads.v1.enums.PolicyTopicEvidenceDestinationMismatchUrlTypeEnum.PolicyTopicEvidenceDestinationMismatchUrlType url_types = 1; } // Evidence details when the destination is returning an HTTP error @@ -141,9 +137,7 @@ message PolicyTopicEvidence { google.protobuf.StringValue expanded_url = 3; // The type of device that failed to load the URL. - google.ads.googleads.v1.enums - .PolicyTopicEvidenceDestinationNotWorkingDeviceEnum - .PolicyTopicEvidenceDestinationNotWorkingDevice device = 4; + google.ads.googleads.v1.enums.PolicyTopicEvidenceDestinationNotWorkingDeviceEnum.PolicyTopicEvidenceDestinationNotWorkingDevice device = 4; // The time the URL was last checked. // The format is "YYYY-MM-DD HH:MM:SS". @@ -192,7 +186,9 @@ message PolicyTopicConstraint { // Indicates that a policy topic was constrained due to disapproval of the // website for reseller purposes. - message ResellerConstraint {} + message ResellerConstraint { + + } // Indicates that a resource's ability to serve in a particular country is // constrained. diff --git a/google/ads/googleads/v1/common/real_time_bidding_setting.proto b/google/ads/googleads/v1/common/real_time_bidding_setting.proto index 58118f0c9..089add795 100644 --- a/google/ads/googleads/v1/common/real_time_bidding_setting.proto +++ b/google/ads/googleads/v1/common/real_time_bidding_setting.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.common; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; diff --git a/google/ads/googleads/v1/common/segments.proto b/google/ads/googleads/v1/common/segments.proto index 2b07813da..2f3d30d6c 100644 --- a/google/ads/googleads/v1/common/segments.proto +++ b/google/ads/googleads/v1/common/segments.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -37,8 +36,8 @@ import "google/ads/googleads/v1/enums/product_condition.proto"; import "google/ads/googleads/v1/enums/search_engine_results_page_type.proto"; import "google/ads/googleads/v1/enums/search_term_match_type.proto"; import "google/ads/googleads/v1/enums/slot.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -54,8 +53,7 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Common"; // Segment only fields. message Segments { // Ad network type. - google.ads.googleads.v1.enums.AdNetworkTypeEnum.AdNetworkType - ad_network_type = 3; + google.ads.googleads.v1.enums.AdNetworkTypeEnum.AdNetworkType ad_network_type = 3; // Click type. google.ads.googleads.v1.enums.ClickTypeEnum.ClickType click_type = 26; @@ -64,8 +62,7 @@ message Segments { google.protobuf.StringValue conversion_action = 52; // Conversion action category. - google.ads.googleads.v1.enums.ConversionActionCategoryEnum - .ConversionActionCategory conversion_action_category = 53; + google.ads.googleads.v1.enums.ConversionActionCategoryEnum.ConversionActionCategory conversion_action_category = 53; // Conversion action name. google.protobuf.StringValue conversion_action_name = 54; @@ -78,18 +75,15 @@ message Segments { google.protobuf.BoolValue conversion_adjustment = 27; // Conversion attribution event type. - google.ads.googleads.v1.enums.ConversionAttributionEventTypeEnum - .ConversionAttributionEventType conversion_attribution_event_type = 2; + google.ads.googleads.v1.enums.ConversionAttributionEventTypeEnum.ConversionAttributionEventType conversion_attribution_event_type = 2; // An enum value representing the number of days between the impression and // the conversion. - google.ads.googleads.v1.enums.ConversionLagBucketEnum.ConversionLagBucket - conversion_lag_bucket = 50; + google.ads.googleads.v1.enums.ConversionLagBucketEnum.ConversionLagBucket conversion_lag_bucket = 50; // An enum value representing the number of days between the impression and // the conversion or between the impression and adjustments to the conversion. - google.ads.googleads.v1.enums.ConversionOrAdjustmentLagBucketEnum - .ConversionOrAdjustmentLagBucket conversion_or_adjustment_lag_bucket = 51; + google.ads.googleads.v1.enums.ConversionOrAdjustmentLagBucketEnum.ConversionOrAdjustmentLagBucket conversion_or_adjustment_lag_bucket = 51; // Date to which metrics apply. // yyyy-MM-dd format, e.g., 2018-04-17. @@ -102,8 +96,7 @@ message Segments { google.ads.googleads.v1.enums.DeviceEnum.Device device = 1; // External conversion source. - google.ads.googleads.v1.enums.ExternalConversionSourceEnum - .ExternalConversionSource external_conversion_source = 55; + google.ads.googleads.v1.enums.ExternalConversionSourceEnum.ExternalConversionSource external_conversion_source = 55; // Resource name of the geo target constant that represents an airport. google.protobuf.StringValue geo_target_airport = 65; @@ -146,8 +139,7 @@ message Segments { google.protobuf.StringValue hotel_check_in_date = 8; // Hotel check-in day of week. - google.ads.googleads.v1.enums.DayOfWeekEnum.DayOfWeek - hotel_check_in_day_of_week = 9; + google.ads.googleads.v1.enums.DayOfWeekEnum.DayOfWeek hotel_check_in_day_of_week = 9; // Hotel city. google.protobuf.StringValue hotel_city = 10; @@ -159,8 +151,7 @@ message Segments { google.protobuf.StringValue hotel_country = 12; // Hotel date selection type. - google.ads.googleads.v1.enums.HotelDateSelectionTypeEnum - .HotelDateSelectionType hotel_date_selection_type = 13; + google.ads.googleads.v1.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType hotel_date_selection_type = 13; // Hotel length of stay. google.protobuf.Int32Value hotel_length_of_stay = 14; @@ -169,8 +160,7 @@ message Segments { google.protobuf.StringValue hotel_rate_rule_id = 73; // Hotel rate type. - google.ads.googleads.v1.enums.HotelRateTypeEnum.HotelRateType - hotel_rate_type = 74; + google.ads.googleads.v1.enums.HotelRateTypeEnum.HotelRateType hotel_rate_type = 74; // Hotel state. google.protobuf.StringValue hotel_state = 15; @@ -197,8 +187,7 @@ message Segments { google.protobuf.StringValue partner_hotel_id = 19; // Placeholder type. This is only used with feed item metrics. - google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType - placeholder_type = 20; + google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 20; // Aggregator ID of the product. google.protobuf.UInt64Value product_aggregator_id = 28; @@ -222,16 +211,13 @@ message Segments { google.protobuf.StringValue product_brand = 29; // Channel of the product. - google.ads.googleads.v1.enums.ProductChannelEnum.ProductChannel - product_channel = 30; + google.ads.googleads.v1.enums.ProductChannelEnum.ProductChannel product_channel = 30; // Channel exclusivity of the product. - google.ads.googleads.v1.enums.ProductChannelExclusivityEnum - .ProductChannelExclusivity product_channel_exclusivity = 31; + google.ads.googleads.v1.enums.ProductChannelExclusivityEnum.ProductChannelExclusivity product_channel_exclusivity = 31; // Condition of the product. - google.ads.googleads.v1.enums.ProductConditionEnum.ProductCondition - product_condition = 32; + google.ads.googleads.v1.enums.ProductConditionEnum.ProductCondition product_condition = 32; // Resource name of the geo target constant for the country of sale of the // product. @@ -288,12 +274,10 @@ message Segments { google.protobuf.StringValue quarter = 21; // Type of the search engine results page. - google.ads.googleads.v1.enums.SearchEngineResultsPageTypeEnum - .SearchEngineResultsPageType search_engine_results_page_type = 70; + google.ads.googleads.v1.enums.SearchEngineResultsPageTypeEnum.SearchEngineResultsPageType search_engine_results_page_type = 70; // Match type of the keyword that triggered the ad, including variants. - google.ads.googleads.v1.enums.SearchTermMatchTypeEnum.SearchTermMatchType - search_term_match_type = 22; + google.ads.googleads.v1.enums.SearchTermMatchTypeEnum.SearchTermMatchType search_term_match_type = 22; // Position of the ad. google.ads.googleads.v1.enums.SlotEnum.Slot slot = 23; diff --git a/google/ads/googleads/v1/common/simulation.proto b/google/ads/googleads/v1/common/simulation.proto index b56c58633..3d7b829ee 100644 --- a/google/ads/googleads/v1/common/simulation.proto +++ b/google/ads/googleads/v1/common/simulation.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.common; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -61,9 +60,11 @@ message BidModifierSimulationPoint { google.protobuf.DoubleValue bid_modifier = 1; // Projected number of biddable conversions. + // Only search advertising channel type supports this field. google.protobuf.DoubleValue biddable_conversions = 2; // Projected total value of biddable conversions. + // Only search advertising channel type supports this field. google.protobuf.DoubleValue biddable_conversions_value = 3; // Projected number of clicks. @@ -76,12 +77,15 @@ message BidModifierSimulationPoint { google.protobuf.Int64Value impressions = 6; // Projected number of top slot impressions. + // Only search advertising channel type supports this field. google.protobuf.Int64Value top_slot_impressions = 7; // Projected number of biddable conversions for the parent resource. + // Only search advertising channel type supports this field. google.protobuf.DoubleValue parent_biddable_conversions = 8; // Projected total value of biddable conversions for the parent resource. + // Only search advertising channel type supports this field. google.protobuf.DoubleValue parent_biddable_conversions_value = 9; // Projected number of clicks for the parent resource. @@ -94,6 +98,7 @@ message BidModifierSimulationPoint { google.protobuf.Int64Value parent_impressions = 12; // Projected number of top slot impressions for the parent resource. + // Only search advertising channel type supports this field. google.protobuf.Int64Value parent_top_slot_impressions = 13; } @@ -118,7 +123,7 @@ message CpcBidSimulationPoint { google.protobuf.Int64Value impressions = 6; // Projected number of top slot impressions. - // Display network does not support this field at the ad group level. + // Only search advertising channel type supports this field. google.protobuf.Int64Value top_slot_impressions = 7; } @@ -155,6 +160,6 @@ message TargetCpaSimulationPoint { google.protobuf.Int64Value impressions = 6; // Projected number of top slot impressions. - // Display network does not support this field at the ad group level. + // Only search advertising channel type supports this field. google.protobuf.Int64Value top_slot_impressions = 7; } diff --git a/google/ads/googleads/v1/common/tag_snippet.proto b/google/ads/googleads/v1/common/tag_snippet.proto index 4d7912063..ff1533d33 100644 --- a/google/ads/googleads/v1/common/tag_snippet.proto +++ b/google/ads/googleads/v1/common/tag_snippet.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,8 @@ package google.ads.googleads.v1.common; import "google/ads/googleads/v1/enums/tracking_code_page_format.proto"; import "google/ads/googleads/v1/enums/tracking_code_type.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -40,8 +39,7 @@ message TagSnippet { // The format of the web page where the tracking tag and snippet will be // installed, e.g. HTML. - google.ads.googleads.v1.enums.TrackingCodePageFormatEnum - .TrackingCodePageFormat page_format = 2; + google.ads.googleads.v1.enums.TrackingCodePageFormatEnum.TrackingCodePageFormat page_format = 2; // The site tag that adds visitors to your basic remarketing lists and sets // new cookies on your domain. diff --git a/google/ads/googleads/v1/common/targeting_setting.proto b/google/ads/googleads/v1/common/targeting_setting.proto index fd794ec57..8a8ed29d7 100644 --- a/google/ads/googleads/v1/common/targeting_setting.proto +++ b/google/ads/googleads/v1/common/targeting_setting.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.common; import "google/ads/googleads/v1/enums/targeting_dimension.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -32,9 +31,9 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Common"; // Proto file describing TargetingSetting -// Settings for the -// -// targeting related features, at Campaign and AdGroup level. +// Settings for the targeting-related features, at the campaign and ad group +// levels. For more details about the targeting setting, visit +// https://support.google.com/google-ads/answer/7365594 message TargetingSetting { // The per-targeting-dimension setting to restrict the reach of your campaign // or ad group. @@ -44,14 +43,13 @@ message TargetingSetting { // The list of per-targeting-dimension targeting settings. message TargetRestriction { // The targeting dimension that these settings apply to. - google.ads.googleads.v1.enums.TargetingDimensionEnum.TargetingDimension - targeting_dimension = 1; + google.ads.googleads.v1.enums.TargetingDimensionEnum.TargetingDimension targeting_dimension = 1; // Indicates whether to restrict your ads to show only for the criteria you // have selected for this targeting_dimension, or to target all values for // this targeting_dimension and show ads based on your targeting in other - // TargetingDimensions. A value of 'true' means that these criteria will only - // apply bid modifiers, and not affect targeting. A value of 'false' means + // TargetingDimensions. A value of `true` means that these criteria will only + // apply bid modifiers, and not affect targeting. A value of `false` means // that these criteria will restrict targeting as well as applying bid // modifiers. google.protobuf.BoolValue bid_only = 2; diff --git a/google/ads/googleads/v1/common/text_label.proto b/google/ads/googleads/v1/common/text_label.proto index f5cd3f7be..017988a88 100644 --- a/google/ads/googleads/v1/common/text_label.proto +++ b/google/ads/googleads/v1/common/text_label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.common; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; diff --git a/google/ads/googleads/v1/common/url_collection.proto b/google/ads/googleads/v1/common/url_collection.proto index 622fdc3b7..8be5ff27e 100644 --- a/google/ads/googleads/v1/common/url_collection.proto +++ b/google/ads/googleads/v1/common/url_collection.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.common; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; diff --git a/google/ads/googleads/v1/common/user_lists.proto b/google/ads/googleads/v1/common/user_lists.proto index 96e6d70fa..f38c8a085 100644 --- a/google/ads/googleads/v1/common/user_lists.proto +++ b/google/ads/googleads/v1/common/user_lists.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -26,8 +25,8 @@ import "google/ads/googleads/v1/enums/user_list_number_rule_item_operator.proto" import "google/ads/googleads/v1/enums/user_list_prepopulation_status.proto"; import "google/ads/googleads/v1/enums/user_list_rule_type.proto"; import "google/ads/googleads/v1/enums/user_list_string_rule_item_operator.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; @@ -64,13 +63,11 @@ message CrmBasedUserListInfo { // Matching key type of the list. // Mixed data types are not allowed on the same list. // This field is required for an ADD operation. - google.ads.googleads.v1.enums.CustomerMatchUploadKeyTypeEnum - .CustomerMatchUploadKeyType upload_key_type = 2; + google.ads.googleads.v1.enums.CustomerMatchUploadKeyTypeEnum.CustomerMatchUploadKeyType upload_key_type = 2; // Data source of the list. Default value is FIRST_PARTY. // Only whitelisted customers can create third-party sourced CRM lists. - google.ads.googleads.v1.enums.UserListCrmDataSourceTypeEnum - .UserListCrmDataSourceType data_source_type = 3; + google.ads.googleads.v1.enums.UserListCrmDataSourceTypeEnum.UserListCrmDataSourceType data_source_type = 3; } // A client defined rule based on custom parameters sent by web sites or @@ -84,8 +81,7 @@ message UserListRuleInfo { // // Currently AND of ORs (conjunctive normal form) is only supported for // ExpressionRuleUserList. - google.ads.googleads.v1.enums.UserListRuleTypeEnum.UserListRuleType - rule_type = 1; + google.ads.googleads.v1.enums.UserListRuleTypeEnum.UserListRuleType rule_type = 1; // List of rule item groups that defines this rule. // Rule item groups are grouped together based on rule_type. @@ -98,7 +94,7 @@ message UserListRuleItemGroupInfo { repeated UserListRuleItemInfo rule_items = 1; } -// An atomic rule fragment. +// An atomic rule item. message UserListRuleItemInfo { // Rule variable name. It should match the corresponding key name fired // by the pixel. @@ -110,27 +106,25 @@ message UserListRuleItemInfo { // This field must be populated when creating a new rule item. google.protobuf.StringValue name = 1; - // An atomic rule fragment. + // An atomic rule item. oneof rule_item { - // An atomic rule fragment composed of a number operation. + // An atomic rule item composed of a number operation. UserListNumberRuleItemInfo number_rule_item = 2; - // An atomic rule fragment composed of a string operation. + // An atomic rule item composed of a string operation. UserListStringRuleItemInfo string_rule_item = 3; - // An atomic rule fragment composed of a date operation. + // An atomic rule item composed of a date operation. UserListDateRuleItemInfo date_rule_item = 4; } } -// A rule item composed of date operation. +// A rule item composed of a date operation. message UserListDateRuleItemInfo { // Date comparison operator. // This field is required and must be populated when creating new date // rule item. - google.ads.googleads.v1.enums.UserListDateRuleItemOperatorEnum - .UserListDateRuleItemOperator - operator = 1; + google.ads.googleads.v1.enums.UserListDateRuleItemOperatorEnum.UserListDateRuleItemOperator operator = 1; // String representing date value to be compared with the rule variable. // Supported date format is YYYY-MM-DD. @@ -143,14 +137,12 @@ message UserListDateRuleItemInfo { google.protobuf.Int64Value offset_in_days = 3; } -// A rule item composed of number operation. +// A rule item composed of a number operation. message UserListNumberRuleItemInfo { // Number comparison operator. // This field is required and must be populated when creating a new number // rule item. - google.ads.googleads.v1.enums.UserListNumberRuleItemOperatorEnum - .UserListNumberRuleItemOperator - operator = 1; + google.ads.googleads.v1.enums.UserListNumberRuleItemOperatorEnum.UserListNumberRuleItemOperator operator = 1; // Number value to be compared with the variable. // This field is required and must be populated when creating a new number @@ -158,14 +150,12 @@ message UserListNumberRuleItemInfo { google.protobuf.DoubleValue value = 2; } -// A rule item fragment composed of date operation. +// A rule item composed of a string operation. message UserListStringRuleItemInfo { // String comparison operator. // This field is required and must be populated when creating a new string // rule item. - google.ads.googleads.v1.enums.UserListStringRuleItemOperatorEnum - .UserListStringRuleItemOperator - operator = 1; + google.ads.googleads.v1.enums.UserListStringRuleItemOperatorEnum.UserListStringRuleItemOperator operator = 1; // The right hand side of the string rule item. For URLs or referrer URLs, // the value can not contain illegal URL chars such as newlines, quotes, @@ -191,8 +181,7 @@ message CombinedRuleUserListInfo { // Operator to connect the two operands. // // Required for creating a combined rule user list. - google.ads.googleads.v1.enums.UserListCombinedRuleOperatorEnum - .UserListCombinedRuleOperator rule_operator = 3; + google.ads.googleads.v1.enums.UserListCombinedRuleOperatorEnum.UserListCombinedRuleOperator rule_operator = 3; } // Visitors of a page during specific dates. @@ -236,8 +225,7 @@ message RuleBasedUserListInfo { // list's membership duration and the date when the remarketing tag is added. // The status will be updated to FINISHED once request is processed, or FAILED // if the request fails. - google.ads.googleads.v1.enums.UserListPrepopulationStatusEnum - .UserListPrepopulationStatus prepopulation_status = 1; + google.ads.googleads.v1.enums.UserListPrepopulationStatusEnum.UserListPrepopulationStatus prepopulation_status = 1; // Subtypes of rule based user lists. oneof rule_based_user_list { @@ -273,9 +261,7 @@ message LogicalUserListInfo { // list of user lists as operands. message UserListLogicalRuleInfo { // The logical operator of the rule. - google.ads.googleads.v1.enums.UserListLogicalRuleOperatorEnum - .UserListLogicalRuleOperator - operator = 1; + google.ads.googleads.v1.enums.UserListLogicalRuleOperatorEnum.UserListLogicalRuleOperator operator = 1; // The list of operands of the rule. repeated LogicalUserListOperandInfo rule_operands = 2; diff --git a/google/ads/googleads/v1/common/value.proto b/google/ads/googleads/v1/common/value.proto index b37dfb15c..9341788ae 100644 --- a/google/ads/googleads/v1/common/value.proto +++ b/google/ads/googleads/v1/common/value.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v1/enums/access_reason.proto b/google/ads/googleads/v1/enums/access_reason.proto index 08add76c4..39256c284 100644 --- a/google/ads/googleads/v1/enums/access_reason.proto +++ b/google/ads/googleads/v1/enums/access_reason.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -53,4 +52,6 @@ message AccessReasonEnum { // The resource is accessible to the user. AFFILIATED = 6; } + + } diff --git a/google/ads/googleads/v1/enums/account_budget_proposal_status.proto b/google/ads/googleads/v1/enums/account_budget_proposal_status.proto index f2532fe7e..2b678f99a 100644 --- a/google/ads/googleads/v1/enums/account_budget_proposal_status.proto +++ b/google/ads/googleads/v1/enums/account_budget_proposal_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -59,4 +58,6 @@ message AccountBudgetProposalStatusEnum { // acceptance email. REJECTED = 6; } + + } diff --git a/google/ads/googleads/v1/enums/account_budget_proposal_type.proto b/google/ads/googleads/v1/enums/account_budget_proposal_type.proto index 61ff472da..bf6bf185a 100644 --- a/google/ads/googleads/v1/enums/account_budget_proposal_type.proto +++ b/google/ads/googleads/v1/enums/account_budget_proposal_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -52,4 +51,6 @@ message AccountBudgetProposalTypeEnum { // Identifies a request to remove a budget that hasn't started yet. REMOVE = 5; } + + } diff --git a/google/ads/googleads/v1/enums/account_budget_status.proto b/google/ads/googleads/v1/enums/account_budget_status.proto index 391c7ccdb..afc3faa48 100644 --- a/google/ads/googleads/v1/enums/account_budget_status.proto +++ b/google/ads/googleads/v1/enums/account_budget_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message AccountBudgetStatusEnum { // The account budget has been cancelled by the user. CANCELLED = 4; } + + } diff --git a/google/ads/googleads/v1/enums/ad_customizer_placeholder_field.proto b/google/ads/googleads/v1/enums/ad_customizer_placeholder_field.proto index fc8fbae7d..38a8bde6e 100644 --- a/google/ads/googleads/v1/enums/ad_customizer_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/ad_customizer_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -52,4 +51,6 @@ message AdCustomizerPlaceholderFieldEnum { // Data Type: STRING. String value to be inserted. STRING = 5; } + + } diff --git a/google/ads/googleads/v1/enums/ad_group_ad_rotation_mode.proto b/google/ads/googleads/v1/enums/ad_group_ad_rotation_mode.proto index 59763e9c2..8b112c7f4 100644 --- a/google/ads/googleads/v1/enums/ad_group_ad_rotation_mode.proto +++ b/google/ads/googleads/v1/enums/ad_group_ad_rotation_mode.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message AdGroupAdRotationModeEnum { // Rotate evenly forever. ROTATE_FOREVER = 3; } + + } diff --git a/google/ads/googleads/v1/enums/ad_group_ad_status.proto b/google/ads/googleads/v1/enums/ad_group_ad_status.proto index cadf1a399..ab170bd3b 100644 --- a/google/ads/googleads/v1/enums/ad_group_ad_status.proto +++ b/google/ads/googleads/v1/enums/ad_group_ad_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -51,4 +50,6 @@ message AdGroupAdStatusEnum { // The ad group ad is removed. REMOVED = 4; } + + } diff --git a/google/ads/googleads/v1/enums/ad_group_criterion_approval_status.proto b/google/ads/googleads/v1/enums/ad_group_criterion_approval_status.proto index 9e79e540d..fd0bc6717 100644 --- a/google/ads/googleads/v1/enums/ad_group_criterion_approval_status.proto +++ b/google/ads/googleads/v1/enums/ad_group_criterion_approval_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -52,4 +51,6 @@ message AdGroupCriterionApprovalStatusEnum { // Under review. UNDER_REVIEW = 5; } + + } diff --git a/google/ads/googleads/v1/enums/ad_group_criterion_status.proto b/google/ads/googleads/v1/enums/ad_group_criterion_status.proto index 2d43b8615..f9c0f2043 100644 --- a/google/ads/googleads/v1/enums/ad_group_criterion_status.proto +++ b/google/ads/googleads/v1/enums/ad_group_criterion_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -51,4 +50,6 @@ message AdGroupCriterionStatusEnum { // The ad group criterion is removed. REMOVED = 4; } + + } diff --git a/google/ads/googleads/v1/enums/ad_group_status.proto b/google/ads/googleads/v1/enums/ad_group_status.proto index 9103e23ba..79de69f3a 100644 --- a/google/ads/googleads/v1/enums/ad_group_status.proto +++ b/google/ads/googleads/v1/enums/ad_group_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -51,4 +50,6 @@ message AdGroupStatusEnum { // The ad group is removed. REMOVED = 4; } + + } diff --git a/google/ads/googleads/v1/enums/ad_group_type.proto b/google/ads/googleads/v1/enums/ad_group_type.proto index 3802f1285..f6e03dd2f 100644 --- a/google/ads/googleads/v1/enums/ad_group_type.proto +++ b/google/ads/googleads/v1/enums/ad_group_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -80,4 +79,6 @@ message AdGroupTypeEnum { // The type for ad groups in Shopping Comparison Listing campaigns. SHOPPING_COMPARISON_LISTING_ADS = 14; } + + } diff --git a/google/ads/googleads/v1/enums/ad_network_type.proto b/google/ads/googleads/v1/enums/ad_network_type.proto index 803104d14..64c77cfb5 100644 --- a/google/ads/googleads/v1/enums/ad_network_type.proto +++ b/google/ads/googleads/v1/enums/ad_network_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -58,4 +57,6 @@ message AdNetworkTypeEnum { // Cross-network. MIXED = 7; } + + } diff --git a/google/ads/googleads/v1/enums/ad_serving_optimization_status.proto b/google/ads/googleads/v1/enums/ad_serving_optimization_status.proto index 6e3f50c5e..1668b0431 100644 --- a/google/ads/googleads/v1/enums/ad_serving_optimization_status.proto +++ b/google/ads/googleads/v1/enums/ad_serving_optimization_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -60,4 +59,6 @@ message AdServingOptimizationStatusEnum { // Ad serving optimization status is not available. UNAVAILABLE = 6; } + + } diff --git a/google/ads/googleads/v1/enums/ad_strength.proto b/google/ads/googleads/v1/enums/ad_strength.proto index fdc944c1c..cbd7aa470 100644 --- a/google/ads/googleads/v1/enums/ad_strength.proto +++ b/google/ads/googleads/v1/enums/ad_strength.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -58,4 +57,6 @@ message AdStrengthEnum { // Excellent strength. EXCELLENT = 7; } + + } diff --git a/google/ads/googleads/v1/enums/ad_type.proto b/google/ads/googleads/v1/enums/ad_type.proto index 52c1bc30b..9dd1c9c4e 100644 --- a/google/ads/googleads/v1/enums/ad_type.proto +++ b/google/ads/googleads/v1/enums/ad_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -100,4 +99,6 @@ message AdTypeEnum { // The ad is a Shopping Comparison Listing ad. SHOPPING_COMPARISON_LISTING_AD = 24; } + + } diff --git a/google/ads/googleads/v1/enums/advertising_channel_sub_type.proto b/google/ads/googleads/v1/enums/advertising_channel_sub_type.proto index 5ca28b98e..5cd4f2b80 100644 --- a/google/ads/googleads/v1/enums/advertising_channel_sub_type.proto +++ b/google/ads/googleads/v1/enums/advertising_channel_sub_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -83,4 +82,6 @@ message AdvertisingChannelSubTypeEnum { // Shopping Comparison Listing campaigns. SHOPPING_COMPARISON_LISTING_ADS = 15; } + + } diff --git a/google/ads/googleads/v1/enums/advertising_channel_type.proto b/google/ads/googleads/v1/enums/advertising_channel_type.proto index 25cf0bf9b..3145bd879 100644 --- a/google/ads/googleads/v1/enums/advertising_channel_type.proto +++ b/google/ads/googleads/v1/enums/advertising_channel_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -60,4 +59,6 @@ message AdvertisingChannelTypeEnum { // across multiple channels. MULTI_CHANNEL = 7; } + + } diff --git a/google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type.proto b/google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type.proto index 06ca33eb9..206078dc4 100644 --- a/google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type.proto +++ b/google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -44,4 +43,6 @@ message AffiliateLocationFeedRelationshipTypeEnum { // General retailer relationship. GENERAL_RETAILER = 2; } + + } diff --git a/google/ads/googleads/v1/enums/affiliate_location_placeholder_field.proto b/google/ads/googleads/v1/enums/affiliate_location_placeholder_field.proto index 8c2ed679f..edcb3268a 100644 --- a/google/ads/googleads/v1/enums/affiliate_location_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/affiliate_location_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -73,4 +72,6 @@ message AffiliateLocationPlaceholderFieldEnum { // Data Type: STRING. Name of the chain. CHAIN_NAME = 12; } + + } diff --git a/google/ads/googleads/v1/enums/age_range_type.proto b/google/ads/googleads/v1/enums/age_range_type.proto index 2937e8235..ba6f73e48 100644 --- a/google/ads/googleads/v1/enums/age_range_type.proto +++ b/google/ads/googleads/v1/enums/age_range_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -61,4 +60,6 @@ message AgeRangeTypeEnum { // Undetermined age range. AGE_RANGE_UNDETERMINED = 503999; } + + } diff --git a/google/ads/googleads/v1/enums/app_campaign_app_store.proto b/google/ads/googleads/v1/enums/app_campaign_app_store.proto index 802ad127c..343a9cba2 100644 --- a/google/ads/googleads/v1/enums/app_campaign_app_store.proto +++ b/google/ads/googleads/v1/enums/app_campaign_app_store.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message AppCampaignAppStoreEnum { // Google play. GOOGLE_APP_STORE = 3; } + + } diff --git a/google/ads/googleads/v1/enums/app_campaign_bidding_strategy_goal_type.proto b/google/ads/googleads/v1/enums/app_campaign_bidding_strategy_goal_type.proto index b88c58203..e5358b5f7 100644 --- a/google/ads/googleads/v1/enums/app_campaign_bidding_strategy_goal_type.proto +++ b/google/ads/googleads/v1/enums/app_campaign_bidding_strategy_goal_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -60,4 +59,6 @@ message AppCampaignBiddingStrategyGoalTypeEnum { // spend. OPTIMIZE_RETURN_ON_ADVERTISING_SPEND = 5; } + + } diff --git a/google/ads/googleads/v1/enums/app_payment_model_type.proto b/google/ads/googleads/v1/enums/app_payment_model_type.proto index cee3fad31..416128804 100644 --- a/google/ads/googleads/v1/enums/app_payment_model_type.proto +++ b/google/ads/googleads/v1/enums/app_payment_model_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message AppPaymentModelTypeEnum { // Represents paid-for apps. PAID = 30; } + + } diff --git a/google/ads/googleads/v1/enums/app_placeholder_field.proto b/google/ads/googleads/v1/enums/app_placeholder_field.proto index e9fa23316..062eb538f 100644 --- a/google/ads/googleads/v1/enums/app_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/app_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -71,4 +70,6 @@ message AppPlaceholderFieldEnum { // parallel tracking. FINAL_URL_SUFFIX = 9; } + + } diff --git a/google/ads/googleads/v1/enums/app_store.proto b/google/ads/googleads/v1/enums/app_store.proto index 7b37b6c16..007510b3b 100644 --- a/google/ads/googleads/v1/enums/app_store.proto +++ b/google/ads/googleads/v1/enums/app_store.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message AppStoreEnum { // Google Play. GOOGLE_PLAY = 3; } + + } diff --git a/google/ads/googleads/v1/enums/app_url_operating_system_type.proto b/google/ads/googleads/v1/enums/app_url_operating_system_type.proto index 8b047775f..cf5ceb50d 100644 --- a/google/ads/googleads/v1/enums/app_url_operating_system_type.proto +++ b/google/ads/googleads/v1/enums/app_url_operating_system_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message AppUrlOperatingSystemTypeEnum { // The Android operating system. ANDROID = 3; } + + } diff --git a/google/ads/googleads/v1/enums/asset_type.proto b/google/ads/googleads/v1/enums/asset_type.proto index 836b5a8ff..cf6bad492 100644 --- a/google/ads/googleads/v1/enums/asset_type.proto +++ b/google/ads/googleads/v1/enums/asset_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -52,4 +51,6 @@ message AssetTypeEnum { // Text asset. TEXT = 5; } + + } diff --git a/google/ads/googleads/v1/enums/attribution_model.proto b/google/ads/googleads/v1/enums/attribution_model.proto index 21d8cb43a..56944070d 100644 --- a/google/ads/googleads/v1/enums/attribution_model.proto +++ b/google/ads/googleads/v1/enums/attribution_model.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -68,4 +67,6 @@ message AttributionModelEnum { // distribution of credit among clicks using Google Search attribution. GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN = 106; } + + } diff --git a/google/ads/googleads/v1/enums/bid_modifier_source.proto b/google/ads/googleads/v1/enums/bid_modifier_source.proto index 7c6c1551b..c7d9e96eb 100644 --- a/google/ads/googleads/v1/enums/bid_modifier_source.proto +++ b/google/ads/googleads/v1/enums/bid_modifier_source.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -47,4 +46,6 @@ message BidModifierSourceEnum { // The bid modifier is specified (overridden) at the ad group level. AD_GROUP = 3; } + + } diff --git a/google/ads/googleads/v1/enums/bidding_source.proto b/google/ads/googleads/v1/enums/bidding_source.proto index f0bc2719a..ce355e3ec 100644 --- a/google/ads/googleads/v1/enums/bidding_source.proto +++ b/google/ads/googleads/v1/enums/bidding_source.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -51,4 +50,6 @@ message BiddingSourceEnum { // The bid or target is defined on the ad group criterion. AD_GROUP_CRITERION = 7; } + + } diff --git a/google/ads/googleads/v1/enums/bidding_strategy_status.proto b/google/ads/googleads/v1/enums/bidding_strategy_status.proto index cd7a79112..fa0fc0bfa 100644 --- a/google/ads/googleads/v1/enums/bidding_strategy_status.proto +++ b/google/ads/googleads/v1/enums/bidding_strategy_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -48,4 +47,6 @@ message BiddingStrategyStatusEnum { // The bidding strategy is removed. REMOVED = 4; } + + } diff --git a/google/ads/googleads/v1/enums/bidding_strategy_type.proto b/google/ads/googleads/v1/enums/bidding_strategy_type.proto index b63fa045c..598f8be77 100644 --- a/google/ads/googleads/v1/enums/bidding_strategy_type.proto +++ b/google/ads/googleads/v1/enums/bidding_strategy_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -69,6 +68,7 @@ message BiddingStrategyTypeEnum { // Page-One Promoted bidding scheme, which sets max cpc bids to // target impressions on page one or page one promoted slots on google.com. + // This enum value is deprecated. PAGE_ONE_PROMOTED = 5; // Percent Cpc is bidding strategy where bids are a fraction of the @@ -93,6 +93,7 @@ message BiddingStrategyTypeEnum { // Target Outrank Share is an automated bidding strategy that sets bids // based on the target fraction of auctions where the advertiser // should outrank a specific competitor. + // This enum value is deprecated. TARGET_OUTRANK_SHARE = 7; // Target ROAS is an automated bidding strategy @@ -104,4 +105,6 @@ message BiddingStrategyTypeEnum { // to help get as many clicks as possible within your budget. TARGET_SPEND = 9; } + + } diff --git a/google/ads/googleads/v1/enums/billing_setup_status.proto b/google/ads/googleads/v1/enums/billing_setup_status.proto index f7ff5820c..251ffbebe 100644 --- a/google/ads/googleads/v1/enums/billing_setup_status.proto +++ b/google/ads/googleads/v1/enums/billing_setup_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -54,4 +53,6 @@ message BillingSetupStatusEnum { // The billing setup was cancelled by the user prior to approval. CANCELLED = 5; } + + } diff --git a/google/ads/googleads/v1/enums/brand_safety_suitability.proto b/google/ads/googleads/v1/enums/brand_safety_suitability.proto index e3d4a8ad2..cf5bb8d2f 100644 --- a/google/ads/googleads/v1/enums/brand_safety_suitability.proto +++ b/google/ads/googleads/v1/enums/brand_safety_suitability.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -69,4 +68,6 @@ message BrandSafetySuitabilityEnum { // Google video partners. LIMITED_INVENTORY = 4; } + + } diff --git a/google/ads/googleads/v1/enums/budget_delivery_method.proto b/google/ads/googleads/v1/enums/budget_delivery_method.proto index 5a0a869e6..fd6ddb7c0 100644 --- a/google/ads/googleads/v1/enums/budget_delivery_method.proto +++ b/google/ads/googleads/v1/enums/budget_delivery_method.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message BudgetDeliveryMethodEnum { // and ads will serve as fast as possible. ACCELERATED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/budget_period.proto b/google/ads/googleads/v1/enums/budget_period.proto index 0182d7419..eeb1779d7 100644 --- a/google/ads/googleads/v1/enums/budget_period.proto +++ b/google/ads/googleads/v1/enums/budget_period.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message BudgetPeriodEnum { // Fixed daily budget. FIXED_DAILY = 4; } + + } diff --git a/google/ads/googleads/v1/enums/budget_status.proto b/google/ads/googleads/v1/enums/budget_status.proto index 25f09a1d5..b32db5630 100644 --- a/google/ads/googleads/v1/enums/budget_status.proto +++ b/google/ads/googleads/v1/enums/budget_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message BudgetStatusEnum { // Budget is removed. REMOVED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/budget_type.proto b/google/ads/googleads/v1/enums/budget_type.proto index 93b690212..4335a6efd 100644 --- a/google/ads/googleads/v1/enums/budget_type.proto +++ b/google/ads/googleads/v1/enums/budget_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -62,4 +61,6 @@ message BudgetTypeEnum { // BiddingStrategyType.TARGET_CPA and PaymentMode.CONVERSIONS. FIXED_CPA = 4; } + + } diff --git a/google/ads/googleads/v1/enums/call_conversion_reporting_state.proto b/google/ads/googleads/v1/enums/call_conversion_reporting_state.proto index 8d54ac5e4..3c9a0876b 100644 --- a/google/ads/googleads/v1/enums/call_conversion_reporting_state.proto +++ b/google/ads/googleads/v1/enums/call_conversion_reporting_state.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -52,4 +51,6 @@ message CallConversionReportingStateEnum { // (call only ads/call extensions) level. USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION = 4; } + + } diff --git a/google/ads/googleads/v1/enums/call_placeholder_field.proto b/google/ads/googleads/v1/enums/call_placeholder_field.proto index 90e211ea4..7fa76f554 100644 --- a/google/ads/googleads/v1/enums/call_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/call_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -62,4 +61,6 @@ message CallPlaceholderFieldEnum { // USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION. CONVERSION_REPORTING_STATE = 6; } + + } diff --git a/google/ads/googleads/v1/enums/callout_placeholder_field.proto b/google/ads/googleads/v1/enums/callout_placeholder_field.proto index 5ad14dd18..95f3c4469 100644 --- a/google/ads/googleads/v1/enums/callout_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/callout_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message CalloutPlaceholderFieldEnum { // Data Type: STRING. Callout text. CALLOUT_TEXT = 2; } + + } diff --git a/google/ads/googleads/v1/enums/campaign_criterion_status.proto b/google/ads/googleads/v1/enums/campaign_criterion_status.proto index c3fe9dc22..2e9007690 100644 --- a/google/ads/googleads/v1/enums/campaign_criterion_status.proto +++ b/google/ads/googleads/v1/enums/campaign_criterion_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v1/enums/campaign_draft_status.proto b/google/ads/googleads/v1/enums/campaign_draft_status.proto index 3602b5b8b..0a91cdc8a 100644 --- a/google/ads/googleads/v1/enums/campaign_draft_status.proto +++ b/google/ads/googleads/v1/enums/campaign_draft_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v1/enums/campaign_experiment_status.proto b/google/ads/googleads/v1/enums/campaign_experiment_status.proto index 0dc848323..ddcfd117e 100644 --- a/google/ads/googleads/v1/enums/campaign_experiment_status.proto +++ b/google/ads/googleads/v1/enums/campaign_experiment_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v1/enums/campaign_experiment_traffic_split_type.proto b/google/ads/googleads/v1/enums/campaign_experiment_traffic_split_type.proto index 7711d0dfb..3ae8019f9 100644 --- a/google/ads/googleads/v1/enums/campaign_experiment_traffic_split_type.proto +++ b/google/ads/googleads/v1/enums/campaign_experiment_traffic_split_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v1/enums/campaign_experiment_type.proto b/google/ads/googleads/v1/enums/campaign_experiment_type.proto index c547a395d..041fb6df0 100644 --- a/google/ads/googleads/v1/enums/campaign_experiment_type.proto +++ b/google/ads/googleads/v1/enums/campaign_experiment_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,4 +54,6 @@ message CampaignExperimentTypeEnum { // from the BASE campaign to this experiment campaign. EXPERIMENT = 4; } + + } diff --git a/google/ads/googleads/v1/enums/campaign_serving_status.proto b/google/ads/googleads/v1/enums/campaign_serving_status.proto index 625195bac..4cdb491b4 100644 --- a/google/ads/googleads/v1/enums/campaign_serving_status.proto +++ b/google/ads/googleads/v1/enums/campaign_serving_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -57,4 +56,6 @@ message CampaignServingStatusEnum { // Suspended. SUSPENDED = 6; } + + } diff --git a/google/ads/googleads/v1/enums/campaign_shared_set_status.proto b/google/ads/googleads/v1/enums/campaign_shared_set_status.proto index cbb2d4aff..8fd1e9778 100644 --- a/google/ads/googleads/v1/enums/campaign_shared_set_status.proto +++ b/google/ads/googleads/v1/enums/campaign_shared_set_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message CampaignSharedSetStatusEnum { // The campaign shared set is removed and can no longer be used. REMOVED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/campaign_status.proto b/google/ads/googleads/v1/enums/campaign_status.proto index cdec3f5ba..e4d64c086 100644 --- a/google/ads/googleads/v1/enums/campaign_status.proto +++ b/google/ads/googleads/v1/enums/campaign_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message CampaignStatusEnum { // Campaign has been removed. REMOVED = 4; } + + } diff --git a/google/ads/googleads/v1/enums/change_status_operation.proto b/google/ads/googleads/v1/enums/change_status_operation.proto index b6b045f84..2265bcf3e 100644 --- a/google/ads/googleads/v1/enums/change_status_operation.proto +++ b/google/ads/googleads/v1/enums/change_status_operation.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -50,4 +49,6 @@ message ChangeStatusOperationEnum { // The resource was removed. REMOVED = 4; } + + } diff --git a/google/ads/googleads/v1/enums/change_status_resource_type.proto b/google/ads/googleads/v1/enums/change_status_resource_type.proto index 1eeee0328..1cccab74d 100644 --- a/google/ads/googleads/v1/enums/change_status_resource_type.proto +++ b/google/ads/googleads/v1/enums/change_status_resource_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -72,4 +71,6 @@ message ChangeStatusResourceTypeEnum { // An AdGroupBidModifier resource change. AD_GROUP_BID_MODIFIER = 13; } + + } diff --git a/google/ads/googleads/v1/enums/click_type.proto b/google/ads/googleads/v1/enums/click_type.proto index 2722fa36c..89ea837a0 100644 --- a/google/ads/googleads/v1/enums/click_type.proto +++ b/google/ads/googleads/v1/enums/click_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -199,4 +198,6 @@ message ClickTypeEnum { // Shopping - Comparison Listing. SHOPPING_COMPARISON_LISTING = 56; } + + } diff --git a/google/ads/googleads/v1/enums/content_label_type.proto b/google/ads/googleads/v1/enums/content_label_type.proto index df2437060..36b77a6c7 100644 --- a/google/ads/googleads/v1/enums/content_label_type.proto +++ b/google/ads/googleads/v1/enums/content_label_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -85,4 +84,6 @@ message ContentLabelTypeEnum { // Live streaming video. LIVE_STREAMING_VIDEO = 16; } + + } diff --git a/google/ads/googleads/v1/enums/conversion_action_category.proto b/google/ads/googleads/v1/enums/conversion_action_category.proto index b12de553c..fabe144c6 100644 --- a/google/ads/googleads/v1/enums/conversion_action_category.proto +++ b/google/ads/googleads/v1/enums/conversion_action_category.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -57,4 +56,6 @@ message ConversionActionCategoryEnum { // Software download action (as for an app). DOWNLOAD = 7; } + + } diff --git a/google/ads/googleads/v1/enums/conversion_action_counting_type.proto b/google/ads/googleads/v1/enums/conversion_action_counting_type.proto index ed4b54f27..6b010ad0e 100644 --- a/google/ads/googleads/v1/enums/conversion_action_counting_type.proto +++ b/google/ads/googleads/v1/enums/conversion_action_counting_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -48,4 +47,6 @@ message ConversionActionCountingTypeEnum { // Count all conversions per click. MANY_PER_CLICK = 3; } + + } diff --git a/google/ads/googleads/v1/enums/conversion_action_status.proto b/google/ads/googleads/v1/enums/conversion_action_status.proto index 576762b72..128a469cb 100644 --- a/google/ads/googleads/v1/enums/conversion_action_status.proto +++ b/google/ads/googleads/v1/enums/conversion_action_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -50,4 +49,6 @@ message ConversionActionStatusEnum { // appear in the UI. HIDDEN = 4; } + + } diff --git a/google/ads/googleads/v1/enums/conversion_action_type.proto b/google/ads/googleads/v1/enums/conversion_action_type.proto index bc59c5c24..371950eb3 100644 --- a/google/ads/googleads/v1/enums/conversion_action_type.proto +++ b/google/ads/googleads/v1/enums/conversion_action_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -69,4 +68,6 @@ message ConversionActionTypeEnum { // number from an advertiser's website. WEBSITE_CALL = 9; } + + } diff --git a/google/ads/googleads/v1/enums/conversion_adjustment_type.proto b/google/ads/googleads/v1/enums/conversion_adjustment_type.proto index 76f6632d1..928696718 100644 --- a/google/ads/googleads/v1/enums/conversion_adjustment_type.proto +++ b/google/ads/googleads/v1/enums/conversion_adjustment_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -48,4 +47,6 @@ message ConversionAdjustmentTypeEnum { // Changes the value of a conversion. RESTATEMENT = 3; } + + } diff --git a/google/ads/googleads/v1/enums/conversion_attribution_event_type.proto b/google/ads/googleads/v1/enums/conversion_attribution_event_type.proto index d8646edf6..f4f713fa3 100644 --- a/google/ads/googleads/v1/enums/conversion_attribution_event_type.proto +++ b/google/ads/googleads/v1/enums/conversion_attribution_event_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -44,4 +43,6 @@ message ConversionAttributionEventTypeEnum { // The conversion is attributed to an interaction. INTERACTION = 3; } + + } diff --git a/google/ads/googleads/v1/enums/conversion_lag_bucket.proto b/google/ads/googleads/v1/enums/conversion_lag_bucket.proto index cd68a9945..06e9d35c4 100644 --- a/google/ads/googleads/v1/enums/conversion_lag_bucket.proto +++ b/google/ads/googleads/v1/enums/conversion_lag_bucket.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -113,4 +112,6 @@ message ConversionLagBucketEnum { // 90 days is not. SIXTY_TO_NINETY_DAYS = 20; } + + } diff --git a/google/ads/googleads/v1/enums/conversion_or_adjustment_lag_bucket.proto b/google/ads/googleads/v1/enums/conversion_or_adjustment_lag_bucket.proto index fbe31e145..890dc832f 100644 --- a/google/ads/googleads/v1/enums/conversion_or_adjustment_lag_bucket.proto +++ b/google/ads/googleads/v1/enums/conversion_or_adjustment_lag_bucket.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -202,4 +201,6 @@ message ConversionOrAdjustmentLagBucketEnum { // conversion adjustment lag bucket was available in Google Ads. ADJUSTMENT_UNKNOWN = 42; } + + } diff --git a/google/ads/googleads/v1/enums/criterion_category_channel_availability_mode.proto b/google/ads/googleads/v1/enums/criterion_category_channel_availability_mode.proto index f03422800..f036a8cd6 100644 --- a/google/ads/googleads/v1/enums/criterion_category_channel_availability_mode.proto +++ b/google/ads/googleads/v1/enums/criterion_category_channel_availability_mode.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -54,4 +53,6 @@ message CriterionCategoryChannelAvailabilityModeEnum { // subtype(s). CHANNEL_TYPE_AND_SUBSET_SUBTYPES = 4; } + + } diff --git a/google/ads/googleads/v1/enums/criterion_category_locale_availability_mode.proto b/google/ads/googleads/v1/enums/criterion_category_locale_availability_mode.proto index 8016d5127..48137d584 100644 --- a/google/ads/googleads/v1/enums/criterion_category_locale_availability_mode.proto +++ b/google/ads/googleads/v1/enums/criterion_category_locale_availability_mode.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -30,7 +29,7 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Enums"; // Proto file describing the criterion category locale availability mode. -// Describes locale availabilty mode for a criterion availability - whether +// Describes locale availability mode for a criterion availability - whether // it's available globally, or a particular country with all languages, or a // particular language with all countries, or a country-language pair. message CriterionCategoryLocaleAvailabilityModeEnum { @@ -57,4 +56,6 @@ message CriterionCategoryLocaleAvailabilityModeEnum { // pairs. COUNTRY_AND_LANGUAGE = 5; } + + } diff --git a/google/ads/googleads/v1/enums/criterion_system_serving_status.proto b/google/ads/googleads/v1/enums/criterion_system_serving_status.proto index 24572d233..8bfd8094b 100644 --- a/google/ads/googleads/v1/enums/criterion_system_serving_status.proto +++ b/google/ads/googleads/v1/enums/criterion_system_serving_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message CriterionSystemServingStatusEnum { // Low search volume. RARELY_SERVED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/criterion_type.proto b/google/ads/googleads/v1/enums/criterion_type.proto index b01cb67cf..0cf61f790 100644 --- a/google/ads/googleads/v1/enums/criterion_type.proto +++ b/google/ads/googleads/v1/enums/criterion_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -130,4 +129,6 @@ message CriterionTypeEnum { // Location group. LOCATION_GROUP = 31; } + + } diff --git a/google/ads/googleads/v1/enums/custom_interest_member_type.proto b/google/ads/googleads/v1/enums/custom_interest_member_type.proto index dda2be01a..70c0d1f55 100644 --- a/google/ads/googleads/v1/enums/custom_interest_member_type.proto +++ b/google/ads/googleads/v1/enums/custom_interest_member_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message CustomInterestMemberTypeEnum { // Custom interest member type URL. URL = 3; } + + } diff --git a/google/ads/googleads/v1/enums/custom_interest_status.proto b/google/ads/googleads/v1/enums/custom_interest_status.proto index aa3d18db0..9b870a52b 100644 --- a/google/ads/googleads/v1/enums/custom_interest_status.proto +++ b/google/ads/googleads/v1/enums/custom_interest_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -47,4 +46,6 @@ message CustomInterestStatusEnum { // targeting. REMOVED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/custom_interest_type.proto b/google/ads/googleads/v1/enums/custom_interest_type.proto index 8f7799599..800526bd6 100644 --- a/google/ads/googleads/v1/enums/custom_interest_type.proto +++ b/google/ads/googleads/v1/enums/custom_interest_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message CustomInterestTypeEnum { // Allows advertisers to define custom intent audience lists. CUSTOM_INTENT = 3; } + + } diff --git a/google/ads/googleads/v1/enums/custom_placeholder_field.proto b/google/ads/googleads/v1/enums/custom_placeholder_field.proto index 2316153fd..2b82bde2a 100644 --- a/google/ads/googleads/v1/enums/custom_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/custom_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -125,4 +124,6 @@ message CustomPlaceholderFieldEnum { // Data Type: INT64. iOS app store ID. IOS_APP_STORE_ID = 21; } + + } diff --git a/google/ads/googleads/v1/enums/customer_match_upload_key_type.proto b/google/ads/googleads/v1/enums/customer_match_upload_key_type.proto index 656f144c3..192a23c30 100644 --- a/google/ads/googleads/v1/enums/customer_match_upload_key_type.proto +++ b/google/ads/googleads/v1/enums/customer_match_upload_key_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message CustomerMatchUploadKeyTypeEnum { // Members are matched from mobile advertising ids. MOBILE_ADVERTISING_ID = 4; } + + } diff --git a/google/ads/googleads/v1/enums/customer_pay_per_conversion_eligibility_failure_reason.proto b/google/ads/googleads/v1/enums/customer_pay_per_conversion_eligibility_failure_reason.proto index 55062cbd1..8dc3426ab 100644 --- a/google/ads/googleads/v1/enums/customer_pay_per_conversion_eligibility_failure_reason.proto +++ b/google/ads/googleads/v1/enums/customer_pay_per_conversion_eligibility_failure_reason.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -64,4 +63,6 @@ message CustomerPayPerConversionEligibilityFailureReasonEnum { // Customer is not eligible due to other reasons. OTHER = 8; } + + } diff --git a/google/ads/googleads/v1/enums/data_driven_model_status.proto b/google/ads/googleads/v1/enums/data_driven_model_status.proto index dea3f238a..ad89884dc 100644 --- a/google/ads/googleads/v1/enums/data_driven_model_status.proto +++ b/google/ads/googleads/v1/enums/data_driven_model_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -58,4 +57,6 @@ message DataDrivenModelStatusEnum { // period. NEVER_GENERATED = 5; } + + } diff --git a/google/ads/googleads/v1/enums/day_of_week.proto b/google/ads/googleads/v1/enums/day_of_week.proto index 6a43f0798..8a7ab98cc 100644 --- a/google/ads/googleads/v1/enums/day_of_week.proto +++ b/google/ads/googleads/v1/enums/day_of_week.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -61,4 +60,6 @@ message DayOfWeekEnum { // Sunday. SUNDAY = 8; } + + } diff --git a/google/ads/googleads/v1/enums/device.proto b/google/ads/googleads/v1/enums/device.proto index 21e4d9575..2bf7a317c 100644 --- a/google/ads/googleads/v1/enums/device.proto +++ b/google/ads/googleads/v1/enums/device.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,4 +54,6 @@ message DeviceEnum { // Other device types. OTHER = 5; } + + } diff --git a/google/ads/googleads/v1/enums/display_ad_format_setting.proto b/google/ads/googleads/v1/enums/display_ad_format_setting.proto index feb9bde52..51cbc70df 100644 --- a/google/ads/googleads/v1/enums/display_ad_format_setting.proto +++ b/google/ads/googleads/v1/enums/display_ad_format_setting.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -50,4 +49,6 @@ message DisplayAdFormatSettingEnum { // and not by Google. NATIVE = 4; } + + } diff --git a/google/ads/googleads/v1/enums/display_upload_product_type.proto b/google/ads/googleads/v1/enums/display_upload_product_type.proto index 858b1b434..96b69ef11 100644 --- a/google/ads/googleads/v1/enums/display_upload_product_type.proto +++ b/google/ads/googleads/v1/enums/display_upload_product_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -93,4 +92,6 @@ message DisplayUploadProductTypeEnum { // used in a hotel campaign. DYNAMIC_HTML5_HOTEL_AD = 11; } + + } diff --git a/google/ads/googleads/v1/enums/dsa_page_feed_criterion_field.proto b/google/ads/googleads/v1/enums/dsa_page_feed_criterion_field.proto index ad8b424e9..4079b129d 100644 --- a/google/ads/googleads/v1/enums/dsa_page_feed_criterion_field.proto +++ b/google/ads/googleads/v1/enums/dsa_page_feed_criterion_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -47,4 +46,6 @@ message DsaPageFeedCriterionFieldEnum { // your page feed. LABEL = 3; } + + } diff --git a/google/ads/googleads/v1/enums/education_placeholder_field.proto b/google/ads/googleads/v1/enums/education_placeholder_field.proto index 164ad8beb..d0f07843e 100644 --- a/google/ads/googleads/v1/enums/education_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/education_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -107,4 +106,6 @@ message EducationPlaceholderFieldEnum { // Data Type: INT64. iOS app store ID. IOS_APP_STORE_ID = 18; } + + } diff --git a/google/ads/googleads/v1/enums/extension_setting_device.proto b/google/ads/googleads/v1/enums/extension_setting_device.proto index e0084aae1..c6099574a 100644 --- a/google/ads/googleads/v1/enums/extension_setting_device.proto +++ b/google/ads/googleads/v1/enums/extension_setting_device.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -48,4 +47,6 @@ message ExtensionSettingDeviceEnum { // desktop devices. DESKTOP = 3; } + + } diff --git a/google/ads/googleads/v1/enums/extension_type.proto b/google/ads/googleads/v1/enums/extension_type.proto index 8a47b2e7c..577cd5d9c 100644 --- a/google/ads/googleads/v1/enums/extension_type.proto +++ b/google/ads/googleads/v1/enums/extension_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -77,4 +76,6 @@ message ExtensionTypeEnum { // Affiliate location. AFFILIATE_LOCATION = 13; } + + } diff --git a/google/ads/googleads/v1/enums/external_conversion_source.proto b/google/ads/googleads/v1/enums/external_conversion_source.proto index dfdbd9286..3a4e92f78 100644 --- a/google/ads/googleads/v1/enums/external_conversion_source.proto +++ b/google/ads/googleads/v1/enums/external_conversion_source.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -126,4 +125,6 @@ message ExternalConversionSourceEnum { // uploads. Displayed in Google Ads UI as 'Store sales (direct)'. STORE_SALES_DIRECT = 22; } + + } diff --git a/google/ads/googleads/v1/enums/feed_attribute_type.proto b/google/ads/googleads/v1/enums/feed_attribute_type.proto index 46ef8cc6d..b45bde76b 100644 --- a/google/ads/googleads/v1/enums/feed_attribute_type.proto +++ b/google/ads/googleads/v1/enums/feed_attribute_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -79,4 +78,6 @@ message FeedAttributeTypeEnum { // Price. PRICE = 14; } + + } diff --git a/google/ads/googleads/v1/enums/feed_item_quality_approval_status.proto b/google/ads/googleads/v1/enums/feed_item_quality_approval_status.proto index ad547474e..d0cc2a77c 100644 --- a/google/ads/googleads/v1/enums/feed_item_quality_approval_status.proto +++ b/google/ads/googleads/v1/enums/feed_item_quality_approval_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -48,4 +47,6 @@ message FeedItemQualityApprovalStatusEnum { // the quality_disapproval_reasons field. DISAPPROVED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/feed_item_quality_disapproval_reason.proto b/google/ads/googleads/v1/enums/feed_item_quality_disapproval_reason.proto index e9745025c..598bf2723 100644 --- a/google/ads/googleads/v1/enums/feed_item_quality_disapproval_reason.proto +++ b/google/ads/googleads/v1/enums/feed_item_quality_disapproval_reason.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -95,4 +94,6 @@ message FeedItemQualityDisapprovalReasonEnum { // Structured snippet contain promotional text. STRUCTURED_SNIPPETS_HAS_PROMOTIONAL_TEXT = 19; } + + } diff --git a/google/ads/googleads/v1/enums/feed_item_status.proto b/google/ads/googleads/v1/enums/feed_item_status.proto index 9a4c41766..5477853e6 100644 --- a/google/ads/googleads/v1/enums/feed_item_status.proto +++ b/google/ads/googleads/v1/enums/feed_item_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message FeedItemStatusEnum { // Feed item has been removed. REMOVED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/feed_item_target_device.proto b/google/ads/googleads/v1/enums/feed_item_target_device.proto index 8eb86f6eb..e4ac3f6d6 100644 --- a/google/ads/googleads/v1/enums/feed_item_target_device.proto +++ b/google/ads/googleads/v1/enums/feed_item_target_device.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -44,4 +43,6 @@ message FeedItemTargetDeviceEnum { // Mobile. MOBILE = 2; } + + } diff --git a/google/ads/googleads/v1/enums/feed_item_target_type.proto b/google/ads/googleads/v1/enums/feed_item_target_type.proto index f68c169c3..acfa62c2c 100644 --- a/google/ads/googleads/v1/enums/feed_item_target_type.proto +++ b/google/ads/googleads/v1/enums/feed_item_target_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message FeedItemTargetTypeEnum { // Feed item targets a criterion. CRITERION = 4; } + + } diff --git a/google/ads/googleads/v1/enums/feed_item_validation_status.proto b/google/ads/googleads/v1/enums/feed_item_validation_status.proto index 56fc06249..a18ea9bd9 100644 --- a/google/ads/googleads/v1/enums/feed_item_validation_status.proto +++ b/google/ads/googleads/v1/enums/feed_item_validation_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message FeedItemValidationStatusEnum { // Feed item is semantically well-formed. VALID = 4; } + + } diff --git a/google/ads/googleads/v1/enums/feed_link_status.proto b/google/ads/googleads/v1/enums/feed_link_status.proto index 242f3cf2f..4e76f2ddd 100644 --- a/google/ads/googleads/v1/enums/feed_link_status.proto +++ b/google/ads/googleads/v1/enums/feed_link_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message FeedLinkStatusEnum { // Feed link has been removed. REMOVED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/feed_mapping_criterion_type.proto b/google/ads/googleads/v1/enums/feed_mapping_criterion_type.proto index 949dd8d75..5358cfb13 100644 --- a/google/ads/googleads/v1/enums/feed_mapping_criterion_type.proto +++ b/google/ads/googleads/v1/enums/feed_mapping_criterion_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message FeedMappingCriterionTypeEnum { // Allows url targeting for your dynamic search ads within a page feed. DSA_PAGE_FEED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/feed_mapping_status.proto b/google/ads/googleads/v1/enums/feed_mapping_status.proto index fe31a4005..f2244d444 100644 --- a/google/ads/googleads/v1/enums/feed_mapping_status.proto +++ b/google/ads/googleads/v1/enums/feed_mapping_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message FeedMappingStatusEnum { // Feed mapping has been removed. REMOVED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/feed_origin.proto b/google/ads/googleads/v1/enums/feed_origin.proto index 3371b1753..7d0479fe7 100644 --- a/google/ads/googleads/v1/enums/feed_origin.proto +++ b/google/ads/googleads/v1/enums/feed_origin.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message FeedOriginEnum { // for the placeholder type of the feed. GOOGLE = 3; } + + } diff --git a/google/ads/googleads/v1/enums/feed_status.proto b/google/ads/googleads/v1/enums/feed_status.proto index 25444e88c..0f66cb0bf 100644 --- a/google/ads/googleads/v1/enums/feed_status.proto +++ b/google/ads/googleads/v1/enums/feed_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message FeedStatusEnum { // Feed has been removed. REMOVED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/flight_placeholder_field.proto b/google/ads/googleads/v1/enums/flight_placeholder_field.proto index 410bd521e..4d8a3bf43 100644 --- a/google/ads/googleads/v1/enums/flight_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/flight_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -114,4 +113,6 @@ message FlightPlaceholderFieldEnum { // Data Type: INT64. iOS app store ID. IOS_APP_STORE_ID = 18; } + + } diff --git a/google/ads/googleads/v1/enums/frequency_cap_event_type.proto b/google/ads/googleads/v1/enums/frequency_cap_event_type.proto index 538e4aed8..5f9548a5a 100644 --- a/google/ads/googleads/v1/enums/frequency_cap_event_type.proto +++ b/google/ads/googleads/v1/enums/frequency_cap_event_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message FrequencyCapEventTypeEnum { // The cap applies on video ad views. VIDEO_VIEW = 3; } + + } diff --git a/google/ads/googleads/v1/enums/frequency_cap_level.proto b/google/ads/googleads/v1/enums/frequency_cap_level.proto index 48a166b61..9a6c043e6 100644 --- a/google/ads/googleads/v1/enums/frequency_cap_level.proto +++ b/google/ads/googleads/v1/enums/frequency_cap_level.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -50,4 +49,6 @@ message FrequencyCapLevelEnum { // The cap is applied at the campaign level. CAMPAIGN = 4; } + + } diff --git a/google/ads/googleads/v1/enums/frequency_cap_time_unit.proto b/google/ads/googleads/v1/enums/frequency_cap_time_unit.proto index d67532882..53da73c04 100644 --- a/google/ads/googleads/v1/enums/frequency_cap_time_unit.proto +++ b/google/ads/googleads/v1/enums/frequency_cap_time_unit.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message FrequencyCapTimeUnitEnum { // The cap would define limit per one month. MONTH = 4; } + + } diff --git a/google/ads/googleads/v1/enums/gender_type.proto b/google/ads/googleads/v1/enums/gender_type.proto index 0782bc10c..794094e11 100644 --- a/google/ads/googleads/v1/enums/gender_type.proto +++ b/google/ads/googleads/v1/enums/gender_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message GenderTypeEnum { // Undetermined gender. UNDETERMINED = 20; } + + } diff --git a/google/ads/googleads/v1/enums/geo_target_constant_status.proto b/google/ads/googleads/v1/enums/geo_target_constant_status.proto index 415cff4e4..8352ed14d 100644 --- a/google/ads/googleads/v1/enums/geo_target_constant_status.proto +++ b/google/ads/googleads/v1/enums/geo_target_constant_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -48,4 +47,6 @@ message GeoTargetConstantStatusEnum { // The geo target constant is obsolete and will be removed. REMOVAL_PLANNED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/geo_targeting_restriction.proto b/google/ads/googleads/v1/enums/geo_targeting_restriction.proto index 9407898d3..4b1c89d75 100644 --- a/google/ads/googleads/v1/enums/geo_targeting_restriction.proto +++ b/google/ads/googleads/v1/enums/geo_targeting_restriction.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -45,4 +44,6 @@ message GeoTargetingRestrictionEnum { // the user. LOCATION_OF_PRESENCE = 2; } + + } diff --git a/google/ads/googleads/v1/enums/geo_targeting_type.proto b/google/ads/googleads/v1/enums/geo_targeting_type.proto index bfb00f014..7b6233c80 100644 --- a/google/ads/googleads/v1/enums/geo_targeting_type.proto +++ b/google/ads/googleads/v1/enums/geo_targeting_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message GeoTargetingTypeEnum { // Location of the user issuing the query. LOCATION_OF_PRESENCE = 3; } + + } diff --git a/google/ads/googleads/v1/enums/google_ads_field_category.proto b/google/ads/googleads/v1/enums/google_ads_field_category.proto index b12096dcc..9e9253cb5 100644 --- a/google/ads/googleads/v1/enums/google_ads_field_category.proto +++ b/google/ads/googleads/v1/enums/google_ads_field_category.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -57,4 +56,6 @@ message GoogleAdsFieldCategoryEnum { // search queries. METRIC = 6; } + + } diff --git a/google/ads/googleads/v1/enums/google_ads_field_data_type.proto b/google/ads/googleads/v1/enums/google_ads_field_data_type.proto index d84d34aa7..d588805fd 100644 --- a/google/ads/googleads/v1/enums/google_ads_field_data_type.proto +++ b/google/ads/googleads/v1/enums/google_ads_field_data_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -98,4 +97,6 @@ message GoogleAdsFieldDataTypeEnum { // Applicable operators: =, !=, <, >, <=, >=, BETWEEN, IN, NOT IN UINT64 = 12; } + + } diff --git a/google/ads/googleads/v1/enums/hotel_date_selection_type.proto b/google/ads/googleads/v1/enums/hotel_date_selection_type.proto index 321668ade..581d0d2c8 100644 --- a/google/ads/googleads/v1/enums/hotel_date_selection_type.proto +++ b/google/ads/googleads/v1/enums/hotel_date_selection_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message HotelDateSelectionTypeEnum { // Dates selected by the user. USER_SELECTED = 51; } + + } diff --git a/google/ads/googleads/v1/enums/hotel_placeholder_field.proto b/google/ads/googleads/v1/enums/hotel_placeholder_field.proto index 9a9a2f553..6a5ae437a 100644 --- a/google/ads/googleads/v1/enums/hotel_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/hotel_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -120,4 +119,6 @@ message HotelPlaceholderFieldEnum { // Data Type: INT64. iOS app store ID. IOS_APP_STORE_ID = 21; } + + } diff --git a/google/ads/googleads/v1/enums/hotel_rate_type.proto b/google/ads/googleads/v1/enums/hotel_rate_type.proto index 6a1525230..c9446c012 100644 --- a/google/ads/googleads/v1/enums/hotel_rate_type.proto +++ b/google/ads/googleads/v1/enums/hotel_rate_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -48,9 +47,9 @@ message HotelRateTypeEnum { // A membership program rate is available and satisfies basic requirements // like having a public rate available. UI treatment will strikethrough the - // public rate and indicate that a discount is available to the user. See + // public rate and indicate that a discount is available to the user. For + // more on Qualified Rates, visit // https://developers.google.com/hotels/hotel-ads/dev-guide/qualified-rates - // for more information. QUALIFIED_RATE = 4; // Rates available to users that satisfy some eligibility criteria. e.g. diff --git a/google/ads/googleads/v1/enums/income_range_type.proto b/google/ads/googleads/v1/enums/income_range_type.proto index 8539677ab..11b8a4dfe 100644 --- a/google/ads/googleads/v1/enums/income_range_type.proto +++ b/google/ads/googleads/v1/enums/income_range_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -61,4 +60,6 @@ message IncomeRangeTypeEnum { // Undetermined income range. INCOME_RANGE_UNDETERMINED = 510000; } + + } diff --git a/google/ads/googleads/v1/enums/interaction_event_type.proto b/google/ads/googleads/v1/enums/interaction_event_type.proto index 2326c7722..8a1a5f3fe 100644 --- a/google/ads/googleads/v1/enums/interaction_event_type.proto +++ b/google/ads/googleads/v1/enums/interaction_event_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -58,4 +57,6 @@ message InteractionEventTypeEnum { // These are simply other (ad) conversions. NONE = 5; } + + } diff --git a/google/ads/googleads/v1/enums/interaction_type.proto b/google/ads/googleads/v1/enums/interaction_type.proto index d6a805833..2162b8b7c 100644 --- a/google/ads/googleads/v1/enums/interaction_type.proto +++ b/google/ads/googleads/v1/enums/interaction_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message InteractionTypeEnum { // Calls. CALLS = 8000; } + + } diff --git a/google/ads/googleads/v1/enums/job_placeholder_field.proto b/google/ads/googleads/v1/enums/job_placeholder_field.proto index c619ba958..b09443cbf 100644 --- a/google/ads/googleads/v1/enums/job_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/job_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -111,4 +110,6 @@ message JobPlaceholderFieldEnum { // Data Type: INT64. iOS app store ID. IOS_APP_STORE_ID = 19; } + + } diff --git a/google/ads/googleads/v1/enums/keyword_match_type.proto b/google/ads/googleads/v1/enums/keyword_match_type.proto index 923f465ac..a9f0760da 100644 --- a/google/ads/googleads/v1/enums/keyword_match_type.proto +++ b/google/ads/googleads/v1/enums/keyword_match_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message KeywordMatchTypeEnum { // Broad match. BROAD = 4; } + + } diff --git a/google/ads/googleads/v1/enums/keyword_plan_competition_level.proto b/google/ads/googleads/v1/enums/keyword_plan_competition_level.proto index 598ec7c18..ff157550b 100644 --- a/google/ads/googleads/v1/enums/keyword_plan_competition_level.proto +++ b/google/ads/googleads/v1/enums/keyword_plan_competition_level.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -53,4 +52,6 @@ message KeywordPlanCompetitionLevelEnum { // High competition. HIGH = 4; } + + } diff --git a/google/ads/googleads/v1/enums/keyword_plan_forecast_interval.proto b/google/ads/googleads/v1/enums/keyword_plan_forecast_interval.proto index 2dcc6bad7..8e667c4bb 100644 --- a/google/ads/googleads/v1/enums/keyword_plan_forecast_interval.proto +++ b/google/ads/googleads/v1/enums/keyword_plan_forecast_interval.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -52,4 +51,6 @@ message KeywordPlanForecastIntervalEnum { // The next quarter date range for keyword plan. NEXT_QUARTER = 5; } + + } diff --git a/google/ads/googleads/v1/enums/keyword_plan_network.proto b/google/ads/googleads/v1/enums/keyword_plan_network.proto index e43ba8c50..25cf4530d 100644 --- a/google/ads/googleads/v1/enums/keyword_plan_network.proto +++ b/google/ads/googleads/v1/enums/keyword_plan_network.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message KeywordPlanNetworkEnum { // Google Search + Search partners. GOOGLE_SEARCH_AND_PARTNERS = 3; } + + } diff --git a/google/ads/googleads/v1/enums/label_status.proto b/google/ads/googleads/v1/enums/label_status.proto index b675846d4..156b1787f 100644 --- a/google/ads/googleads/v1/enums/label_status.proto +++ b/google/ads/googleads/v1/enums/label_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -44,4 +43,6 @@ message LabelStatusEnum { // Label is removed. REMOVED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/legacy_app_install_ad_app_store.proto b/google/ads/googleads/v1/enums/legacy_app_install_ad_app_store.proto index 9d7dc2b44..3188cafbc 100644 --- a/google/ads/googleads/v1/enums/legacy_app_install_ad_app_store.proto +++ b/google/ads/googleads/v1/enums/legacy_app_install_ad_app_store.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,4 +54,6 @@ message LegacyAppInstallAdAppStoreEnum { // The app is hosted in a Chinese app store. CN_APP_STORE = 6; } + + } diff --git a/google/ads/googleads/v1/enums/listing_custom_attribute_index.proto b/google/ads/googleads/v1/enums/listing_custom_attribute_index.proto index 9ca9134d5..10b9071c5 100644 --- a/google/ads/googleads/v1/enums/listing_custom_attribute_index.proto +++ b/google/ads/googleads/v1/enums/listing_custom_attribute_index.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,4 +54,6 @@ message ListingCustomAttributeIndexEnum { // Fifth listing custom attribute. INDEX4 = 11; } + + } diff --git a/google/ads/googleads/v1/enums/listing_group_type.proto b/google/ads/googleads/v1/enums/listing_group_type.proto index 4ac77989a..450d67c51 100644 --- a/google/ads/googleads/v1/enums/listing_group_type.proto +++ b/google/ads/googleads/v1/enums/listing_group_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -48,4 +47,6 @@ message ListingGroupTypeEnum { // Listing group unit that defines a bid. UNIT = 3; } + + } diff --git a/google/ads/googleads/v1/enums/local_placeholder_field.proto b/google/ads/googleads/v1/enums/local_placeholder_field.proto index 8fae98efd..4724500fd 100644 --- a/google/ads/googleads/v1/enums/local_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/local_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -115,4 +114,6 @@ message LocalPlaceholderFieldEnum { // Data Type: INT64. iOS app store ID. IOS_APP_STORE_ID = 20; } + + } diff --git a/google/ads/googleads/v1/enums/location_extension_targeting_criterion_field.proto b/google/ads/googleads/v1/enums/location_extension_targeting_criterion_field.proto index ed4ccb5c5..3831d3b70 100644 --- a/google/ads/googleads/v1/enums/location_extension_targeting_criterion_field.proto +++ b/google/ads/googleads/v1/enums/location_extension_targeting_criterion_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -58,4 +57,6 @@ message LocationExtensionTargetingCriterionFieldEnum { // Data Type: STRING. Country code of the business address. COUNTRY_CODE = 7; } + + } diff --git a/google/ads/googleads/v1/enums/location_group_radius_units.proto b/google/ads/googleads/v1/enums/location_group_radius_units.proto index 797e7f2f8..34becc481 100644 --- a/google/ads/googleads/v1/enums/location_group_radius_units.proto +++ b/google/ads/googleads/v1/enums/location_group_radius_units.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message LocationGroupRadiusUnitsEnum { // Miles MILES = 3; } + + } diff --git a/google/ads/googleads/v1/enums/location_placeholder_field.proto b/google/ads/googleads/v1/enums/location_placeholder_field.proto index 64c5dcae2..28883dd77 100644 --- a/google/ads/googleads/v1/enums/location_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/location_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -64,4 +63,6 @@ message LocationPlaceholderFieldEnum { // Data Type: STRING. Phone number of the business. PHONE_NUMBER = 9; } + + } diff --git a/google/ads/googleads/v1/enums/manager_link_status.proto b/google/ads/googleads/v1/enums/manager_link_status.proto index b3e317147..65d1e3436 100644 --- a/google/ads/googleads/v1/enums/manager_link_status.proto +++ b/google/ads/googleads/v1/enums/manager_link_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,4 +54,6 @@ message ManagerLinkStatusEnum { // canceled it. CANCELED = 6; } + + } diff --git a/google/ads/googleads/v1/enums/matching_function_context_type.proto b/google/ads/googleads/v1/enums/matching_function_context_type.proto index 4cf2ce4d8..050542bf5 100644 --- a/google/ads/googleads/v1/enums/matching_function_context_type.proto +++ b/google/ads/googleads/v1/enums/matching_function_context_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message MatchingFunctionContextTypeEnum { // The device being used (possible values are 'Desktop' or 'Mobile'). DEVICE_NAME = 3; } + + } diff --git a/google/ads/googleads/v1/enums/matching_function_operator.proto b/google/ads/googleads/v1/enums/matching_function_operator.proto index d3de57117..5f34c241d 100644 --- a/google/ads/googleads/v1/enums/matching_function_operator.proto +++ b/google/ads/googleads/v1/enums/matching_function_operator.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -61,4 +60,6 @@ message MatchingFunctionOperatorEnum { // ConstantOperands. CONTAINS_ANY = 6; } + + } diff --git a/google/ads/googleads/v1/enums/media_type.proto b/google/ads/googleads/v1/enums/media_type.proto index 182a88aef..68fc3bbd4 100644 --- a/google/ads/googleads/v1/enums/media_type.proto +++ b/google/ads/googleads/v1/enums/media_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -60,4 +59,6 @@ message MediaTypeEnum { // Animated image, such as animated GIF. DYNAMIC_IMAGE = 7; } + + } diff --git a/google/ads/googleads/v1/enums/merchant_center_link_status.proto b/google/ads/googleads/v1/enums/merchant_center_link_status.proto index 0d8b4b304..72ef1be52 100644 --- a/google/ads/googleads/v1/enums/merchant_center_link_status.proto +++ b/google/ads/googleads/v1/enums/merchant_center_link_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message MerchantCenterLinkStatusEnum { // owner and hasn't been confirmed by the customer. PENDING = 3; } + + } diff --git a/google/ads/googleads/v1/enums/message_placeholder_field.proto b/google/ads/googleads/v1/enums/message_placeholder_field.proto index 0d91c7871..888e2586a 100644 --- a/google/ads/googleads/v1/enums/message_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/message_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -57,4 +56,6 @@ message MessagePlaceholderFieldEnum { // messaging apps when they tap to send you a message. MESSAGE_TEXT = 6; } + + } diff --git a/google/ads/googleads/v1/enums/mime_type.proto b/google/ads/googleads/v1/enums/mime_type.proto index 86b088055..e15a53e2b 100644 --- a/google/ads/googleads/v1/enums/mime_type.proto +++ b/google/ads/googleads/v1/enums/mime_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -78,4 +77,6 @@ message MimeTypeEnum { // MIME type of application/x-html5-ad-zip. HTML5_AD_ZIP = 13; } + + } diff --git a/google/ads/googleads/v1/enums/minute_of_hour.proto b/google/ads/googleads/v1/enums/minute_of_hour.proto index 443daadeb..99ff09972 100644 --- a/google/ads/googleads/v1/enums/minute_of_hour.proto +++ b/google/ads/googleads/v1/enums/minute_of_hour.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -52,4 +51,6 @@ message MinuteOfHourEnum { // Forty-five minutes past the hour. FORTY_FIVE = 5; } + + } diff --git a/google/ads/googleads/v1/enums/mobile_device_type.proto b/google/ads/googleads/v1/enums/mobile_device_type.proto index c4ebc9bfd..ef37bbf7d 100644 --- a/google/ads/googleads/v1/enums/mobile_device_type.proto +++ b/google/ads/googleads/v1/enums/mobile_device_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message MobileDeviceTypeEnum { // Tablets. TABLET = 3; } + + } diff --git a/google/ads/googleads/v1/enums/month_of_year.proto b/google/ads/googleads/v1/enums/month_of_year.proto index 35a53068c..8ec281765 100644 --- a/google/ads/googleads/v1/enums/month_of_year.proto +++ b/google/ads/googleads/v1/enums/month_of_year.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -76,4 +75,6 @@ message MonthOfYearEnum { // December. DECEMBER = 13; } + + } diff --git a/google/ads/googleads/v1/enums/mutate_job_status.proto b/google/ads/googleads/v1/enums/mutate_job_status.proto index ec3010ae4..42fcf140f 100644 --- a/google/ads/googleads/v1/enums/mutate_job_status.proto +++ b/google/ads/googleads/v1/enums/mutate_job_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message MutateJobStatusEnum { // The job is done. DONE = 4; } + + } diff --git a/google/ads/googleads/v1/enums/negative_geo_target_type.proto b/google/ads/googleads/v1/enums/negative_geo_target_type.proto index 92ea054f2..73ef5dddc 100644 --- a/google/ads/googleads/v1/enums/negative_geo_target_type.proto +++ b/google/ads/googleads/v1/enums/negative_geo_target_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -42,10 +41,16 @@ message NegativeGeoTargetTypeEnum { // Specifies that a user is excluded from seeing the ad if they // are in, or show interest in, advertiser's excluded locations. + // DONT_CARE is removed in V2, use PRESENCE_OR_INTEREST + // instead. DONT_CARE = 2; // Specifies that a user is excluded from seeing the ad if they // are in advertiser's excluded locations. + // LOCATION_OF_PRESENCE is removed in V2, use PRESENCE + // instead. LOCATION_OF_PRESENCE = 3; } + + } diff --git a/google/ads/googleads/v1/enums/operating_system_version_operator_type.proto b/google/ads/googleads/v1/enums/operating_system_version_operator_type.proto index 2cfa2e83b..9b909796c 100644 --- a/google/ads/googleads/v1/enums/operating_system_version_operator_type.proto +++ b/google/ads/googleads/v1/enums/operating_system_version_operator_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message OperatingSystemVersionOperatorTypeEnum { // Greater than or equals to the specified version. GREATER_THAN_EQUALS_TO = 4; } + + } diff --git a/google/ads/googleads/v1/enums/page_one_promoted_strategy_goal.proto b/google/ads/googleads/v1/enums/page_one_promoted_strategy_goal.proto index a51fa76a8..a2263fce9 100644 --- a/google/ads/googleads/v1/enums/page_one_promoted_strategy_goal.proto +++ b/google/ads/googleads/v1/enums/page_one_promoted_strategy_goal.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -47,4 +46,6 @@ message PageOnePromotedStrategyGoalEnum { // Top slots of the first page on google.com. FIRST_PAGE_PROMOTED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/parental_status_type.proto b/google/ads/googleads/v1/enums/parental_status_type.proto index de8998a6e..14a5b8973 100644 --- a/google/ads/googleads/v1/enums/parental_status_type.proto +++ b/google/ads/googleads/v1/enums/parental_status_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message ParentalStatusTypeEnum { // Undetermined parental status. UNDETERMINED = 302; } + + } diff --git a/google/ads/googleads/v1/enums/payment_mode.proto b/google/ads/googleads/v1/enums/payment_mode.proto index 3c7727247..2bbac0ca0 100644 --- a/google/ads/googleads/v1/enums/payment_mode.proto +++ b/google/ads/googleads/v1/enums/payment_mode.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,4 +54,6 @@ message PaymentModeEnum { // mode. See Customer.eligibility_failure_reasons for details. CONVERSIONS = 6; } + + } diff --git a/google/ads/googleads/v1/enums/placeholder_type.proto b/google/ads/googleads/v1/enums/placeholder_type.proto index e848c4219..64e3925c4 100644 --- a/google/ads/googleads/v1/enums/placeholder_type.proto +++ b/google/ads/googleads/v1/enums/placeholder_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -117,4 +116,6 @@ message PlaceholderTypeEnum { // Indicates that this feed is for job dynamic remarketing. DYNAMIC_JOB = 20; } + + } diff --git a/google/ads/googleads/v1/enums/placement_type.proto b/google/ads/googleads/v1/enums/placement_type.proto index b507b3361..e55e670cf 100644 --- a/google/ads/googleads/v1/enums/placement_type.proto +++ b/google/ads/googleads/v1/enums/placement_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,4 +54,6 @@ message PlacementTypeEnum { // YouTube channels(e.g. 'youtube.com::L8ZULXASCc1I_oaOT0NaOQ'). YOUTUBE_CHANNEL = 6; } + + } diff --git a/google/ads/googleads/v1/enums/policy_approval_status.proto b/google/ads/googleads/v1/enums/policy_approval_status.proto index 1eb7515f5..5d93b9bb5 100644 --- a/google/ads/googleads/v1/enums/policy_approval_status.proto +++ b/google/ads/googleads/v1/enums/policy_approval_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -57,4 +56,6 @@ message PolicyApprovalStatusEnum { // searching for information about the targeted countries. AREA_OF_INTEREST_ONLY = 5; } + + } diff --git a/google/ads/googleads/v1/enums/policy_review_status.proto b/google/ads/googleads/v1/enums/policy_review_status.proto index 1fbb5042c..6646f95ce 100644 --- a/google/ads/googleads/v1/enums/policy_review_status.proto +++ b/google/ads/googleads/v1/enums/policy_review_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -52,4 +51,6 @@ message PolicyReviewStatusEnum { // been appealed. UNDER_APPEAL = 4; } + + } diff --git a/google/ads/googleads/v1/enums/policy_topic_entry_type.proto b/google/ads/googleads/v1/enums/policy_topic_entry_type.proto index 623b8571e..409f7694e 100644 --- a/google/ads/googleads/v1/enums/policy_topic_entry_type.proto +++ b/google/ads/googleads/v1/enums/policy_topic_entry_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -62,4 +61,6 @@ message PolicyTopicEntryTypeEnum { // through area of interest. AREA_OF_INTEREST_ONLY = 7; } + + } diff --git a/google/ads/googleads/v1/enums/policy_topic_evidence_destination_mismatch_url_type.proto b/google/ads/googleads/v1/enums/policy_topic_evidence_destination_mismatch_url_type.proto index f6796924e..38a736e0c 100644 --- a/google/ads/googleads/v1/enums/policy_topic_evidence_destination_mismatch_url_type.proto +++ b/google/ads/googleads/v1/enums/policy_topic_evidence_destination_mismatch_url_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -58,4 +57,6 @@ message PolicyTopicEvidenceDestinationMismatchUrlTypeEnum { // The tracking url template, with substituted mobile url. MOBILE_TRACKING_URL = 6; } + + } diff --git a/google/ads/googleads/v1/enums/policy_topic_evidence_destination_not_working_device.proto b/google/ads/googleads/v1/enums/policy_topic_evidence_destination_not_working_device.proto index 6a2da5fd2..45680b06a 100644 --- a/google/ads/googleads/v1/enums/policy_topic_evidence_destination_not_working_device.proto +++ b/google/ads/googleads/v1/enums/policy_topic_evidence_destination_not_working_device.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -53,4 +52,6 @@ message PolicyTopicEvidenceDestinationNotWorkingDeviceEnum { // Landing page doesn't work on iOS device. IOS = 4; } + + } diff --git a/google/ads/googleads/v1/enums/positive_geo_target_type.proto b/google/ads/googleads/v1/enums/positive_geo_target_type.proto index 4143674be..2985300f1 100644 --- a/google/ads/googleads/v1/enums/positive_geo_target_type.proto +++ b/google/ads/googleads/v1/enums/positive_geo_target_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -42,14 +41,22 @@ message PositiveGeoTargetTypeEnum { // Specifies that an ad is triggered if the user is in, // or shows interest in, advertiser's targeted locations. + // DONT_CARE is removed in V2, use PRESENCE_OR_INTEREST + // instead. DONT_CARE = 2; // Specifies that an ad is triggered if the user // searches for advertiser's targeted locations. + // AREA_OF_INTEREST is removed in V2, use + // SEARCH_INTEREST instead. AREA_OF_INTEREST = 3; // Specifies that an ad is triggered if the user is in // or regularly in advertiser's targeted locations. + // LOCATION_OF_PRESENCE is removed in V2, use PRESENCE + // instead. LOCATION_OF_PRESENCE = 4; } + + } diff --git a/google/ads/googleads/v1/enums/preferred_content_type.proto b/google/ads/googleads/v1/enums/preferred_content_type.proto index 8831ea124..596814a45 100644 --- a/google/ads/googleads/v1/enums/preferred_content_type.proto +++ b/google/ads/googleads/v1/enums/preferred_content_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message PreferredContentTypeEnum { // Represents top content on YouTube. YOUTUBE_TOP_CONTENT = 400; } + + } diff --git a/google/ads/googleads/v1/enums/price_extension_price_qualifier.proto b/google/ads/googleads/v1/enums/price_extension_price_qualifier.proto index 9a3e87666..d618c0e9c 100644 --- a/google/ads/googleads/v1/enums/price_extension_price_qualifier.proto +++ b/google/ads/googleads/v1/enums/price_extension_price_qualifier.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message PriceExtensionPriceQualifierEnum { // 'Average' qualifier for the price. AVERAGE = 4; } + + } diff --git a/google/ads/googleads/v1/enums/price_extension_price_unit.proto b/google/ads/googleads/v1/enums/price_extension_price_unit.proto index 865b5a4e4..6a2ad6809 100644 --- a/google/ads/googleads/v1/enums/price_extension_price_unit.proto +++ b/google/ads/googleads/v1/enums/price_extension_price_unit.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -58,4 +57,6 @@ message PriceExtensionPriceUnitEnum { // Per night. PER_NIGHT = 7; } + + } diff --git a/google/ads/googleads/v1/enums/price_extension_type.proto b/google/ads/googleads/v1/enums/price_extension_type.proto index a3edef132..8ab826a23 100644 --- a/google/ads/googleads/v1/enums/price_extension_type.proto +++ b/google/ads/googleads/v1/enums/price_extension_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -67,4 +66,6 @@ message PriceExtensionTypeEnum { // The type for showing a collection of related service tiers. SERVICE_TIERS = 10; } + + } diff --git a/google/ads/googleads/v1/enums/price_placeholder_field.proto b/google/ads/googleads/v1/enums/price_placeholder_field.proto index 14e966056..8e8745c26 100644 --- a/google/ads/googleads/v1/enums/price_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/price_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -236,4 +235,6 @@ message PricePlaceholderFieldEnum { // using Upgraded URLs. ITEM_8_FINAL_MOBILE_URLS = 805; } + + } diff --git a/google/ads/googleads/v1/enums/product_bidding_category_level.proto b/google/ads/googleads/v1/enums/product_bidding_category_level.proto index 4a35b986a..c25bd075a 100644 --- a/google/ads/googleads/v1/enums/product_bidding_category_level.proto +++ b/google/ads/googleads/v1/enums/product_bidding_category_level.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -53,4 +52,6 @@ message ProductBiddingCategoryLevelEnum { // Level 5. LEVEL5 = 6; } + + } diff --git a/google/ads/googleads/v1/enums/product_bidding_category_status.proto b/google/ads/googleads/v1/enums/product_bidding_category_status.proto index 5edc363e8..d58b1737d 100644 --- a/google/ads/googleads/v1/enums/product_bidding_category_status.proto +++ b/google/ads/googleads/v1/enums/product_bidding_category_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message ProductBiddingCategoryStatusEnum { // The category is obsolete. Used only for reporting purposes. OBSOLETE = 3; } + + } diff --git a/google/ads/googleads/v1/enums/product_channel.proto b/google/ads/googleads/v1/enums/product_channel.proto index d4436556d..d8d46c70c 100644 --- a/google/ads/googleads/v1/enums/product_channel.proto +++ b/google/ads/googleads/v1/enums/product_channel.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message ProductChannelEnum { // The item is sold in local stores. LOCAL = 3; } + + } diff --git a/google/ads/googleads/v1/enums/product_channel_exclusivity.proto b/google/ads/googleads/v1/enums/product_channel_exclusivity.proto index 839f3aabd..49fedc58f 100644 --- a/google/ads/googleads/v1/enums/product_channel_exclusivity.proto +++ b/google/ads/googleads/v1/enums/product_channel_exclusivity.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -48,4 +47,6 @@ message ProductChannelExclusivityEnum { // it is available for purchase in both ShoppingProductChannels. MULTI_CHANNEL = 3; } + + } diff --git a/google/ads/googleads/v1/enums/product_condition.proto b/google/ads/googleads/v1/enums/product_condition.proto index 14cf0560f..b1e819ac3 100644 --- a/google/ads/googleads/v1/enums/product_condition.proto +++ b/google/ads/googleads/v1/enums/product_condition.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message ProductConditionEnum { // The product condition is used. USED = 5; } + + } diff --git a/google/ads/googleads/v1/enums/product_type_level.proto b/google/ads/googleads/v1/enums/product_type_level.proto index 7857e18aa..516dfd925 100644 --- a/google/ads/googleads/v1/enums/product_type_level.proto +++ b/google/ads/googleads/v1/enums/product_type_level.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,4 +54,6 @@ message ProductTypeLevelEnum { // Level 5. LEVEL5 = 11; } + + } diff --git a/google/ads/googleads/v1/enums/promotion_extension_discount_modifier.proto b/google/ads/googleads/v1/enums/promotion_extension_discount_modifier.proto index 5eaef320c..defbb5ec0 100644 --- a/google/ads/googleads/v1/enums/promotion_extension_discount_modifier.proto +++ b/google/ads/googleads/v1/enums/promotion_extension_discount_modifier.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -44,4 +43,6 @@ message PromotionExtensionDiscountModifierEnum { // 'Up to'. UP_TO = 2; } + + } diff --git a/google/ads/googleads/v1/enums/promotion_extension_occasion.proto b/google/ads/googleads/v1/enums/promotion_extension_occasion.proto index 824cabde2..9db26de35 100644 --- a/google/ads/googleads/v1/enums/promotion_extension_occasion.proto +++ b/google/ads/googleads/v1/enums/promotion_extension_occasion.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -153,4 +152,6 @@ message PromotionExtensionOccasionEnum { // Available in Japanese: Year-end Gift. YEAR_END_GIFT = 38; } + + } diff --git a/google/ads/googleads/v1/enums/promotion_placeholder_field.proto b/google/ads/googleads/v1/enums/promotion_placeholder_field.proto index dd9f0d1f3..3304235c9 100644 --- a/google/ads/googleads/v1/enums/promotion_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/promotion_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -91,4 +90,6 @@ message PromotionPlaceholderFieldEnum { // tracking. FINAL_URL_SUFFIX = 15; } + + } diff --git a/google/ads/googleads/v1/enums/proximity_radius_units.proto b/google/ads/googleads/v1/enums/proximity_radius_units.proto index cd6433e31..f61b8b6e1 100644 --- a/google/ads/googleads/v1/enums/proximity_radius_units.proto +++ b/google/ads/googleads/v1/enums/proximity_radius_units.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message ProximityRadiusUnitsEnum { // Kilometers KILOMETERS = 3; } + + } diff --git a/google/ads/googleads/v1/enums/quality_score_bucket.proto b/google/ads/googleads/v1/enums/quality_score_bucket.proto index 397fd222a..01e9c46c0 100644 --- a/google/ads/googleads/v1/enums/quality_score_bucket.proto +++ b/google/ads/googleads/v1/enums/quality_score_bucket.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message QualityScoreBucketEnum { // Quality of the creative is above average. ABOVE_AVERAGE = 4; } + + } diff --git a/google/ads/googleads/v1/enums/real_estate_placeholder_field.proto b/google/ads/googleads/v1/enums/real_estate_placeholder_field.proto index 0d157abe1..1cddf8c90 100644 --- a/google/ads/googleads/v1/enums/real_estate_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/real_estate_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -111,4 +110,6 @@ message RealEstatePlaceholderFieldEnum { // Data Type: INT64. iOS app store ID. IOS_APP_STORE_ID = 19; } + + } diff --git a/google/ads/googleads/v1/enums/recommendation_type.proto b/google/ads/googleads/v1/enums/recommendation_type.proto index 6c3d2e381..3695e1e6f 100644 --- a/google/ads/googleads/v1/enums/recommendation_type.proto +++ b/google/ads/googleads/v1/enums/recommendation_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -88,4 +87,6 @@ message RecommendationTypeEnum { // budget. MOVE_UNUSED_BUDGET = 15; } + + } diff --git a/google/ads/googleads/v1/enums/search_engine_results_page_type.proto b/google/ads/googleads/v1/enums/search_engine_results_page_type.proto index 61bc78ddf..7d802d588 100644 --- a/google/ads/googleads/v1/enums/search_engine_results_page_type.proto +++ b/google/ads/googleads/v1/enums/search_engine_results_page_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -50,4 +49,6 @@ message SearchEngineResultsPageTypeEnum { // page. ADS_AND_ORGANIC = 4; } + + } diff --git a/google/ads/googleads/v1/enums/search_term_match_type.proto b/google/ads/googleads/v1/enums/search_term_match_type.proto index ccaff2e6b..76e3630d7 100644 --- a/google/ads/googleads/v1/enums/search_term_match_type.proto +++ b/google/ads/googleads/v1/enums/search_term_match_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,4 +54,6 @@ message SearchTermMatchTypeEnum { // Phrase match (close variant). NEAR_PHRASE = 6; } + + } diff --git a/google/ads/googleads/v1/enums/search_term_targeting_status.proto b/google/ads/googleads/v1/enums/search_term_targeting_status.proto index ac482c3fd..4f1727d56 100644 --- a/google/ads/googleads/v1/enums/search_term_targeting_status.proto +++ b/google/ads/googleads/v1/enums/search_term_targeting_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -54,4 +53,6 @@ message SearchTermTargetingStatusEnum { // Search term is neither targeted nor excluded. NONE = 5; } + + } diff --git a/google/ads/googleads/v1/enums/served_asset_field_type.proto b/google/ads/googleads/v1/enums/served_asset_field_type.proto index c1d2ee9b8..ff366869d 100644 --- a/google/ads/googleads/v1/enums/served_asset_field_type.proto +++ b/google/ads/googleads/v1/enums/served_asset_field_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -57,4 +56,6 @@ message ServedAssetFieldTypeEnum { // The asset is used in description 2. DESCRIPTION_2 = 6; } + + } diff --git a/google/ads/googleads/v1/enums/shared_set_status.proto b/google/ads/googleads/v1/enums/shared_set_status.proto index 42b90ea8f..285fa42f5 100644 --- a/google/ads/googleads/v1/enums/shared_set_status.proto +++ b/google/ads/googleads/v1/enums/shared_set_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message SharedSetStatusEnum { // The shared set is removed and can no longer be used. REMOVED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/shared_set_type.proto b/google/ads/googleads/v1/enums/shared_set_type.proto index 61f8aafaa..01e7565ed 100644 --- a/google/ads/googleads/v1/enums/shared_set_type.proto +++ b/google/ads/googleads/v1/enums/shared_set_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message SharedSetTypeEnum { // A set of placements that can be excluded from targeting. NEGATIVE_PLACEMENTS = 3; } + + } diff --git a/google/ads/googleads/v1/enums/simulation_modification_method.proto b/google/ads/googleads/v1/enums/simulation_modification_method.proto index 308e6b29f..3e660cac2 100644 --- a/google/ads/googleads/v1/enums/simulation_modification_method.proto +++ b/google/ads/googleads/v1/enums/simulation_modification_method.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -50,4 +49,6 @@ message SimulationModificationMethodEnum { // do not include these resources. DEFAULT = 3; } + + } diff --git a/google/ads/googleads/v1/enums/simulation_type.proto b/google/ads/googleads/v1/enums/simulation_type.proto index d0d7bcb4d..4be3e3080 100644 --- a/google/ads/googleads/v1/enums/simulation_type.proto +++ b/google/ads/googleads/v1/enums/simulation_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -52,4 +51,6 @@ message SimulationTypeEnum { // The simulation is for a bid modifier. BID_MODIFIER = 5; } + + } diff --git a/google/ads/googleads/v1/enums/sitelink_placeholder_field.proto b/google/ads/googleads/v1/enums/sitelink_placeholder_field.proto index 644464bb8..1715712ed 100644 --- a/google/ads/googleads/v1/enums/sitelink_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/sitelink_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -65,4 +64,6 @@ message SitelinkPlaceholderFieldEnum { // tracking. FINAL_URL_SUFFIX = 8; } + + } diff --git a/google/ads/googleads/v1/enums/slot.proto b/google/ads/googleads/v1/enums/slot.proto index a2a1fff27..045d55973 100644 --- a/google/ads/googleads/v1/enums/slot.proto +++ b/google/ads/googleads/v1/enums/slot.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -61,4 +60,6 @@ message SlotEnum { // Cross-network. MIXED = 8; } + + } diff --git a/google/ads/googleads/v1/enums/spending_limit_type.proto b/google/ads/googleads/v1/enums/spending_limit_type.proto index 5d36236a6..8e32a7c7a 100644 --- a/google/ads/googleads/v1/enums/spending_limit_type.proto +++ b/google/ads/googleads/v1/enums/spending_limit_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -44,4 +43,6 @@ message SpendingLimitTypeEnum { // Infinite, indicates unlimited spending power. INFINITE = 2; } + + } diff --git a/google/ads/googleads/v1/enums/structured_snippet_placeholder_field.proto b/google/ads/googleads/v1/enums/structured_snippet_placeholder_field.proto index 4ed19963d..48c345a1c 100644 --- a/google/ads/googleads/v1/enums/structured_snippet_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/structured_snippet_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -41,10 +40,9 @@ message StructuredSnippetPlaceholderFieldEnum { UNKNOWN = 1; // Data Type: STRING. The category of snippet of your products/services. - // Must match one of the predefined structured snippets headers exactly. - // See - // https://developers.google.com/adwords/api - // /docs/appendix/structured-snippet-headers + // Must match exactly one of the predefined structured snippets headers. + // For a list, visit + // https://developers.google.com/adwords/api/docs/appendix/structured-snippet-headers HEADER = 2; // Data Type: STRING_LIST. Text values that describe your products/services. @@ -52,4 +50,6 @@ message StructuredSnippetPlaceholderFieldEnum { // permitted. A snippet can be at most 25 characters. SNIPPETS = 3; } + + } diff --git a/google/ads/googleads/v1/enums/system_managed_entity_source.proto b/google/ads/googleads/v1/enums/system_managed_entity_source.proto index 36732a588..bf42a3019 100644 --- a/google/ads/googleads/v1/enums/system_managed_entity_source.proto +++ b/google/ads/googleads/v1/enums/system_managed_entity_source.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message SystemManagedResourceSourceEnum { // Generated ad variations experiment ad. AD_VARIATIONS = 2; } + + } diff --git a/google/ads/googleads/v1/enums/target_cpa_opt_in_recommendation_goal.proto b/google/ads/googleads/v1/enums/target_cpa_opt_in_recommendation_goal.proto index 6c3506a60..2e5e4a50f 100644 --- a/google/ads/googleads/v1/enums/target_cpa_opt_in_recommendation_goal.proto +++ b/google/ads/googleads/v1/enums/target_cpa_opt_in_recommendation_goal.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -53,4 +52,6 @@ message TargetCpaOptInRecommendationGoalEnum { // to, yet lower than, the actual CPA (computed for past 28 days). CLOSEST_CPA = 5; } + + } diff --git a/google/ads/googleads/v1/enums/target_impression_share_location.proto b/google/ads/googleads/v1/enums/target_impression_share_location.proto index f29cd4394..dd2f28f4d 100644 --- a/google/ads/googleads/v1/enums/target_impression_share_location.proto +++ b/google/ads/googleads/v1/enums/target_impression_share_location.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -51,4 +50,6 @@ message TargetImpressionShareLocationEnum { // Top slot in the top box of ads. ABSOLUTE_TOP_OF_PAGE = 4; } + + } diff --git a/google/ads/googleads/v1/enums/targeting_dimension.proto b/google/ads/googleads/v1/enums/targeting_dimension.proto index 5263e2cef..a7b709c91 100644 --- a/google/ads/googleads/v1/enums/targeting_dimension.proto +++ b/google/ads/googleads/v1/enums/targeting_dimension.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -70,4 +69,6 @@ message TargetingDimensionEnum { // Criteria for income range targeting. INCOME_RANGE = 9; } + + } diff --git a/google/ads/googleads/v1/enums/time_type.proto b/google/ads/googleads/v1/enums/time_type.proto index fa462f1f9..19fb4924e 100644 --- a/google/ads/googleads/v1/enums/time_type.proto +++ b/google/ads/googleads/v1/enums/time_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -47,4 +46,6 @@ message TimeTypeEnum { // An infinite point in the future. FOREVER = 3; } + + } diff --git a/google/ads/googleads/v1/enums/tracking_code_page_format.proto b/google/ads/googleads/v1/enums/tracking_code_page_format.proto index 8991c7c9f..0012373bf 100644 --- a/google/ads/googleads/v1/enums/tracking_code_page_format.proto +++ b/google/ads/googleads/v1/enums/tracking_code_page_format.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message TrackingCodePageFormatEnum { // Google AMP page format. AMP = 3; } + + } diff --git a/google/ads/googleads/v1/enums/tracking_code_type.proto b/google/ads/googleads/v1/enums/tracking_code_type.proto index af214ec10..0507fd826 100644 --- a/google/ads/googleads/v1/enums/tracking_code_type.proto +++ b/google/ads/googleads/v1/enums/tracking_code_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -51,4 +50,6 @@ message TrackingCodeTypeEnum { // function which fires the tag. CLICK_TO_CALL = 4; } + + } diff --git a/google/ads/googleads/v1/enums/travel_placeholder_field.proto b/google/ads/googleads/v1/enums/travel_placeholder_field.proto index 708f063f6..21f6b36f3 100644 --- a/google/ads/googleads/v1/enums/travel_placeholder_field.proto +++ b/google/ads/googleads/v1/enums/travel_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -124,4 +123,6 @@ message TravelPlaceholderFieldEnum { // Data Type: INT64. iOS app store ID. IOS_APP_STORE_ID = 21; } + + } diff --git a/google/ads/googleads/v1/enums/user_interest_taxonomy_type.proto b/google/ads/googleads/v1/enums/user_interest_taxonomy_type.proto index b66e485fd..2f72b03c3 100644 --- a/google/ads/googleads/v1/enums/user_interest_taxonomy_type.proto +++ b/google/ads/googleads/v1/enums/user_interest_taxonomy_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,4 +54,6 @@ message UserInterestTaxonomyTypeEnum { // User interest criteria for new smart phone users. NEW_SMART_PHONE_USER = 6; } + + } diff --git a/google/ads/googleads/v1/enums/user_list_access_status.proto b/google/ads/googleads/v1/enums/user_list_access_status.proto index 3ee9c9138..10d94962a 100644 --- a/google/ads/googleads/v1/enums/user_list_access_status.proto +++ b/google/ads/googleads/v1/enums/user_list_access_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message UserListAccessStatusEnum { // The access is disabled. DISABLED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/user_list_closing_reason.proto b/google/ads/googleads/v1/enums/user_list_closing_reason.proto index 9e9293a86..f99ccd9c7 100644 --- a/google/ads/googleads/v1/enums/user_list_closing_reason.proto +++ b/google/ads/googleads/v1/enums/user_list_closing_reason.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -44,4 +43,6 @@ message UserListClosingReasonEnum { // The userlist was closed because of not being used for over one year. UNUSED = 2; } + + } diff --git a/google/ads/googleads/v1/enums/user_list_combined_rule_operator.proto b/google/ads/googleads/v1/enums/user_list_combined_rule_operator.proto index a3699f81f..90690f11b 100644 --- a/google/ads/googleads/v1/enums/user_list_combined_rule_operator.proto +++ b/google/ads/googleads/v1/enums/user_list_combined_rule_operator.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -44,4 +43,6 @@ message UserListCombinedRuleOperatorEnum { // A AND NOT B. AND_NOT = 3; } + + } diff --git a/google/ads/googleads/v1/enums/user_list_crm_data_source_type.proto b/google/ads/googleads/v1/enums/user_list_crm_data_source_type.proto index cdaf25341..05dd3ee21 100644 --- a/google/ads/googleads/v1/enums/user_list_crm_data_source_type.proto +++ b/google/ads/googleads/v1/enums/user_list_crm_data_source_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -47,4 +46,6 @@ message UserListCrmDataSourceTypeEnum { // The uploaded data is from a third-party voter file. THIRD_PARTY_VOTER_FILE = 4; } + + } diff --git a/google/ads/googleads/v1/enums/user_list_date_rule_item_operator.proto b/google/ads/googleads/v1/enums/user_list_date_rule_item_operator.proto index 043b55be3..0b4772094 100644 --- a/google/ads/googleads/v1/enums/user_list_date_rule_item_operator.proto +++ b/google/ads/googleads/v1/enums/user_list_date_rule_item_operator.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -50,4 +49,6 @@ message UserListDateRuleItemOperatorEnum { // After. AFTER = 5; } + + } diff --git a/google/ads/googleads/v1/enums/user_list_logical_rule_operator.proto b/google/ads/googleads/v1/enums/user_list_logical_rule_operator.proto index c08003d32..a30710abc 100644 --- a/google/ads/googleads/v1/enums/user_list_logical_rule_operator.proto +++ b/google/ads/googleads/v1/enums/user_list_logical_rule_operator.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -47,4 +46,6 @@ message UserListLogicalRuleOperatorEnum { // Not - none of the operands. NONE = 4; } + + } diff --git a/google/ads/googleads/v1/enums/user_list_membership_status.proto b/google/ads/googleads/v1/enums/user_list_membership_status.proto index 6b6001b13..82c16775e 100644 --- a/google/ads/googleads/v1/enums/user_list_membership_status.proto +++ b/google/ads/googleads/v1/enums/user_list_membership_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -48,4 +47,6 @@ message UserListMembershipStatusEnum { // Closed status - No new members being added. Cannot be used for targeting. CLOSED = 3; } + + } diff --git a/google/ads/googleads/v1/enums/user_list_number_rule_item_operator.proto b/google/ads/googleads/v1/enums/user_list_number_rule_item_operator.proto index 3b91468ac..f579f4006 100644 --- a/google/ads/googleads/v1/enums/user_list_number_rule_item_operator.proto +++ b/google/ads/googleads/v1/enums/user_list_number_rule_item_operator.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -56,4 +55,6 @@ message UserListNumberRuleItemOperatorEnum { // Less than or equal. LESS_THAN_OR_EQUAL = 7; } + + } diff --git a/google/ads/googleads/v1/enums/user_list_prepopulation_status.proto b/google/ads/googleads/v1/enums/user_list_prepopulation_status.proto index 290e6f8a8..27432c9a2 100644 --- a/google/ads/googleads/v1/enums/user_list_prepopulation_status.proto +++ b/google/ads/googleads/v1/enums/user_list_prepopulation_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -47,4 +46,6 @@ message UserListPrepopulationStatusEnum { // Prepopulation failed. FAILED = 4; } + + } diff --git a/google/ads/googleads/v1/enums/user_list_rule_type.proto b/google/ads/googleads/v1/enums/user_list_rule_type.proto index 6444d4d97..19b818a5b 100644 --- a/google/ads/googleads/v1/enums/user_list_rule_type.proto +++ b/google/ads/googleads/v1/enums/user_list_rule_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -44,4 +43,6 @@ message UserListRuleTypeEnum { // Disjunctive normal form. OR_OF_ANDS = 3; } + + } diff --git a/google/ads/googleads/v1/enums/user_list_size_range.proto b/google/ads/googleads/v1/enums/user_list_size_range.proto index 03d663fdb..41d65d58a 100644 --- a/google/ads/googleads/v1/enums/user_list_size_range.proto +++ b/google/ads/googleads/v1/enums/user_list_size_range.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -88,4 +87,6 @@ message UserListSizeRangeEnum { // User list has over 50 million users. OVER_FIFTY_MILLION = 17; } + + } diff --git a/google/ads/googleads/v1/enums/user_list_string_rule_item_operator.proto b/google/ads/googleads/v1/enums/user_list_string_rule_item_operator.proto index e6d16c11a..8e2c9450c 100644 --- a/google/ads/googleads/v1/enums/user_list_string_rule_item_operator.proto +++ b/google/ads/googleads/v1/enums/user_list_string_rule_item_operator.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -62,4 +61,6 @@ message UserListStringRuleItemOperatorEnum { // Not ends with. NOT_ENDS_WITH = 9; } + + } diff --git a/google/ads/googleads/v1/enums/user_list_type.proto b/google/ads/googleads/v1/enums/user_list_type.proto index ba9f95b00..a1bbd2811 100644 --- a/google/ads/googleads/v1/enums/user_list_type.proto +++ b/google/ads/googleads/v1/enums/user_list_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -59,4 +58,6 @@ message UserListTypeEnum { // emails or other formats. CRM_BASED = 7; } + + } diff --git a/google/ads/googleads/v1/enums/vanity_pharma_display_url_mode.proto b/google/ads/googleads/v1/enums/vanity_pharma_display_url_mode.proto index 46d4ec076..d007b0f89 100644 --- a/google/ads/googleads/v1/enums/vanity_pharma_display_url_mode.proto +++ b/google/ads/googleads/v1/enums/vanity_pharma_display_url_mode.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message VanityPharmaDisplayUrlModeEnum { // Replace vanity pharma URL with description of the website. WEBSITE_DESCRIPTION = 3; } + + } diff --git a/google/ads/googleads/v1/enums/vanity_pharma_text.proto b/google/ads/googleads/v1/enums/vanity_pharma_text.proto index bcddf820d..4291acb1b 100644 --- a/google/ads/googleads/v1/enums/vanity_pharma_text.proto +++ b/google/ads/googleads/v1/enums/vanity_pharma_text.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -83,4 +82,6 @@ message VanityPharmaTextEnum { // vacunas con receta). PRESCRIPTION_VACCINE_WEBSITE_ES = 13; } + + } diff --git a/google/ads/googleads/v1/enums/webpage_condition_operand.proto b/google/ads/googleads/v1/enums/webpage_condition_operand.proto index 8910e27e0..bb305773f 100644 --- a/google/ads/googleads/v1/enums/webpage_condition_operand.proto +++ b/google/ads/googleads/v1/enums/webpage_condition_operand.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,4 +54,6 @@ message WebpageConditionOperandEnum { // Operand denoting a webpage custom label targeting condition. CUSTOM_LABEL = 6; } + + } diff --git a/google/ads/googleads/v1/enums/webpage_condition_operator.proto b/google/ads/googleads/v1/enums/webpage_condition_operator.proto index 41a70fb50..7758ae6ea 100644 --- a/google/ads/googleads/v1/enums/webpage_condition_operator.proto +++ b/google/ads/googleads/v1/enums/webpage_condition_operator.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -47,4 +46,6 @@ message WebpageConditionOperatorEnum { // The argument web condition is part of the compared web condition. CONTAINS = 3; } + + } diff --git a/google/ads/googleads/v1/errors/account_budget_proposal_error.proto b/google/ads/googleads/v1/errors/account_budget_proposal_error.proto index 9d7ff7b80..01f09b366 100644 --- a/google/ads/googleads/v1/errors/account_budget_proposal_error.proto +++ b/google/ads/googleads/v1/errors/account_budget_proposal_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -110,4 +109,6 @@ message AccountBudgetProposalErrorEnum { // Mutates are not allowed for the given billing setup. INVALID_BILLING_SETUP = 23; } + + } diff --git a/google/ads/googleads/v1/errors/ad_customizer_error.proto b/google/ads/googleads/v1/errors/ad_customizer_error.proto index 6b0bfc910..0cb4f1e59 100644 --- a/google/ads/googleads/v1/errors/ad_customizer_error.proto +++ b/google/ads/googleads/v1/errors/ad_customizer_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,4 +54,6 @@ message AdCustomizerErrorEnum { // A user list referenced in an IF function does not exist. UNKNOWN_USER_LIST = 6; } + + } diff --git a/google/ads/googleads/v1/errors/ad_error.proto b/google/ads/googleads/v1/errors/ad_error.proto index 3fa72c514..2265c5e24 100644 --- a/google/ads/googleads/v1/errors/ad_error.proto +++ b/google/ads/googleads/v1/errors/ad_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -450,4 +449,6 @@ message AdErrorEnum { // The display upload product type is not supported in this campaign. PRODUCT_TYPE_NOT_SUPPORTED_IN_THIS_CAMPAIGN = 133; } + + } diff --git a/google/ads/googleads/v1/errors/ad_group_ad_error.proto b/google/ads/googleads/v1/errors/ad_group_ad_error.proto index 5e60f6310..235499d60 100644 --- a/google/ads/googleads/v1/errors/ad_group_ad_error.proto +++ b/google/ads/googleads/v1/errors/ad_group_ad_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -66,4 +65,6 @@ message AdGroupAdErrorEnum { // An ad may only be modified once per call RESOURCE_REFERENCED_IN_MULTIPLE_OPS = 9; } + + } diff --git a/google/ads/googleads/v1/errors/ad_group_bid_modifier_error.proto b/google/ads/googleads/v1/errors/ad_group_bid_modifier_error.proto index 19a30b48b..fb5293466 100644 --- a/google/ads/googleads/v1/errors/ad_group_bid_modifier_error.proto +++ b/google/ads/googleads/v1/errors/ad_group_bid_modifier_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -47,4 +46,6 @@ message AdGroupBidModifierErrorEnum { // campaign is opted out of the same criterion. CANNOT_OVERRIDE_OPTED_OUT_CAMPAIGN_CRITERION_BID_MODIFIER = 3; } + + } diff --git a/google/ads/googleads/v1/errors/ad_group_criterion_error.proto b/google/ads/googleads/v1/errors/ad_group_criterion_error.proto index 151d3f6f6..a759627bb 100644 --- a/google/ads/googleads/v1/errors/ad_group_criterion_error.proto +++ b/google/ads/googleads/v1/errors/ad_group_criterion_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -161,4 +160,6 @@ message AdGroupCriterionErrorEnum { // Listing group in an ADD operation specifies a non temporary criterion id. LISTING_GROUP_ADD_MAY_ONLY_USE_TEMP_ID = 47; } + + } diff --git a/google/ads/googleads/v1/errors/ad_group_error.proto b/google/ads/googleads/v1/errors/ad_group_error.proto index d755ca67f..58b3df6dd 100644 --- a/google/ads/googleads/v1/errors/ad_group_error.proto +++ b/google/ads/googleads/v1/errors/ad_group_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -79,4 +78,6 @@ message AdGroupErrorEnum { // campaigns that have DynamicSearchAdsSetting attached. CANNOT_ADD_ADGROUP_OF_TYPE_DSA_TO_CAMPAIGN_WITHOUT_DSA_SETTING = 14; } + + } diff --git a/google/ads/googleads/v1/errors/ad_group_feed_error.proto b/google/ads/googleads/v1/errors/ad_group_feed_error.proto index 85781dff8..93c7f22a0 100644 --- a/google/ads/googleads/v1/errors/ad_group_feed_error.proto +++ b/google/ads/googleads/v1/errors/ad_group_feed_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -63,4 +62,6 @@ message AdGroupFeedErrorEnum { // CustomerFeed for the specified feed. NO_EXISTING_LOCATION_CUSTOMER_FEED = 8; } + + } diff --git a/google/ads/googleads/v1/errors/ad_parameter_error.proto b/google/ads/googleads/v1/errors/ad_parameter_error.proto index f4eeac966..64b72ddfb 100644 --- a/google/ads/googleads/v1/errors/ad_parameter_error.proto +++ b/google/ads/googleads/v1/errors/ad_parameter_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message AdParameterErrorEnum { // The insertion text is invalid. INVALID_INSERTION_TEXT_FORMAT = 3; } + + } diff --git a/google/ads/googleads/v1/errors/ad_sharing_error.proto b/google/ads/googleads/v1/errors/ad_sharing_error.proto index 8e0c66ac3..7b5566693 100644 --- a/google/ads/googleads/v1/errors/ad_sharing_error.proto +++ b/google/ads/googleads/v1/errors/ad_sharing_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -50,4 +49,6 @@ message AdSharingErrorEnum { // Cannot add AdGroupAd on inactive Ad. CANNOT_SHARE_INACTIVE_AD = 4; } + + } diff --git a/google/ads/googleads/v1/errors/adx_error.proto b/google/ads/googleads/v1/errors/adx_error.proto index ee1613044..5f80474f0 100644 --- a/google/ads/googleads/v1/errors/adx_error.proto +++ b/google/ads/googleads/v1/errors/adx_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message AdxErrorEnum { // Attempt to use non-AdX feature by AdX customer. UNSUPPORTED_FEATURE = 2; } + + } diff --git a/google/ads/googleads/v1/errors/asset_error.proto b/google/ads/googleads/v1/errors/asset_error.proto index dcdb4deeb..cd456f202 100644 --- a/google/ads/googleads/v1/errors/asset_error.proto +++ b/google/ads/googleads/v1/errors/asset_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -57,4 +56,6 @@ message AssetErrorEnum { // represents the same content. CANNOT_MODIFY_ASSET_NAME = 6; } + + } diff --git a/google/ads/googleads/v1/errors/authentication_error.proto b/google/ads/googleads/v1/errors/authentication_error.proto index 093322abb..9a45e4b9f 100644 --- a/google/ads/googleads/v1/errors/authentication_error.proto +++ b/google/ads/googleads/v1/errors/authentication_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -99,4 +98,6 @@ message AuthenticationErrorEnum { // Google account at https://landing.google.com/advancedprotection. ADVANCED_PROTECTION_NOT_ENROLLED = 24; } + + } diff --git a/google/ads/googleads/v1/errors/authorization_error.proto b/google/ads/googleads/v1/errors/authorization_error.proto index 8eecb446a..d8ddf1fe1 100644 --- a/google/ads/googleads/v1/errors/authorization_error.proto +++ b/google/ads/googleads/v1/errors/authorization_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -41,10 +40,9 @@ message AuthorizationErrorEnum { UNKNOWN = 1; // User doesn't have permission to access customer. Note: If you're - // accessing a client customer, the manager's customer id must be set in the - // 'login-customer-id' header. See - // https://developers.google.com/google-ads/api/docs/concepts/ - // call-structure#login-customer-id + // accessing a client customer, the manager's customer ID must be set in the + // `login-customer-id` header. Learn more at + // https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid USER_PERMISSION_DENIED = 2; // The developer token is not whitelisted. @@ -78,4 +76,6 @@ message AuthorizationErrorEnum { // only be used with test accounts. DEVELOPER_TOKEN_NOT_APPROVED = 10; } + + } diff --git a/google/ads/googleads/v1/errors/bidding_error.proto b/google/ads/googleads/v1/errors/bidding_error.proto index 84789fe55..58f1b6fda 100644 --- a/google/ads/googleads/v1/errors/bidding_error.proto +++ b/google/ads/googleads/v1/errors/bidding_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -70,8 +69,7 @@ message BiddingErrorEnum { // Cannot target content network only as campaign uses Page One Promoted // bidding strategy. - CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CAMPAIGN_LEVEL_POP_BIDDING_STRATEGY = - 23; + CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CAMPAIGN_LEVEL_POP_BIDDING_STRATEGY = 23; // Budget Optimizer and Target Spend bidding strategies are not supported // for campaigns with AdSchedule targeting. @@ -115,4 +113,6 @@ message BiddingErrorEnum { // The field is not compatible with the bidding strategy type. NOT_COMPATIBLE_WITH_BIDDING_STRATEGY_TYPE = 36; } + + } diff --git a/google/ads/googleads/v1/errors/bidding_strategy_error.proto b/google/ads/googleads/v1/errors/bidding_strategy_error.proto index 8489fb4fa..ce7c1256c 100644 --- a/google/ads/googleads/v1/errors/bidding_strategy_error.proto +++ b/google/ads/googleads/v1/errors/bidding_strategy_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -57,4 +56,6 @@ message BiddingStrategyErrorEnum { // strategy goal type. INCOMPATIBLE_BIDDING_STRATEGY_AND_BIDDING_STRATEGY_GOAL_TYPE = 6; } + + } diff --git a/google/ads/googleads/v1/errors/billing_setup_error.proto b/google/ads/googleads/v1/errors/billing_setup_error.proto index 4298be4c3..bdcc616cf 100644 --- a/google/ads/googleads/v1/errors/billing_setup_error.proto +++ b/google/ads/googleads/v1/errors/billing_setup_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -40,61 +39,63 @@ message BillingSetupErrorEnum { // The received error code is not known in this version. UNKNOWN = 1; - // Cannot use both an existing Payments account and a new Payments account - // when setting up billing. + // Cannot specify both an existing payments account and a new payments + // account when setting up billing. CANNOT_USE_EXISTING_AND_NEW_ACCOUNT = 2; - // Cannot cancel an APPROVED billing setup whose start time has passed. + // Cannot cancel an approved billing setup whose start time has passed. CANNOT_REMOVE_STARTED_BILLING_SETUP = 3; - // Cannot perform a Change of Bill-To (CBT) to the same Payments account. + // Cannot perform a Change of Bill-To (CBT) to the same payments account. CANNOT_CHANGE_BILLING_TO_SAME_PAYMENTS_ACCOUNT = 4; - // Billing Setups can only be used by customers with ENABLED or DRAFT + // Billing setups can only be used by customers with ENABLED or DRAFT // status. BILLING_SETUP_NOT_PERMITTED_FOR_CUSTOMER_STATUS = 5; - // Billing Setups must either include a correctly formatted existing - // Payments account id, or a non-empty new Payments account name. + // Billing setups must either include a correctly formatted existing + // payments account id, or a non-empty new payments account name. INVALID_PAYMENTS_ACCOUNT = 6; // Only billable and third-party customers can create billing setups. BILLING_SETUP_NOT_PERMITTED_FOR_CUSTOMER_CATEGORY = 7; - // Billing Setup creations can only use NOW for start time type. + // Billing setup creations can only use NOW for start time type. INVALID_START_TIME_TYPE = 8; - // Billing Setups can only be created for a third-party customer if they do + // Billing setups can only be created for a third-party customer if they do // not already have a setup. THIRD_PARTY_ALREADY_HAS_BILLING = 9; - // Billing Setups cannot be created if there is already a pending billing in - // progress, ie. a billing known to Payments. + // Billing setups cannot be created if there is already a pending billing in + // progress. BILLING_SETUP_IN_PROGRESS = 10; - // Billing Setups can only be created by customers who have permission to + // Billing setups can only be created by customers who have permission to // setup billings. Users can contact a representative for help setting up // permissions. NO_SIGNUP_PERMISSION = 11; - // Billing Setups cannot be created if there is already a future-approved + // Billing setups cannot be created if there is already a future-approved // billing. CHANGE_OF_BILL_TO_IN_PROGRESS = 12; - // Billing Setup creation failed because Payments could not find the - // requested Payments profile. + // Requested payments profile not found. PAYMENTS_PROFILE_NOT_FOUND = 13; - // Billing Setup creation failed because Payments could not find the - // requested Payments account. + // Requested payments account not found. PAYMENTS_ACCOUNT_NOT_FOUND = 14; - // Billing Setup creation failed because Payments considers requested - // Payments profile ineligible. + // Billing setup creation failed because the payments profile is ineligible. PAYMENTS_PROFILE_INELIGIBLE = 15; - // Billing Setup creation failed because Payments considers requested - // Payments account ineligible. + // Billing setup creation failed because the payments account is ineligible. PAYMENTS_ACCOUNT_INELIGIBLE = 16; + + // Billing setup creation failed because the payments profile needs internal + // approval. + CUSTOMER_NEEDS_INTERNAL_APPROVAL = 17; } + + } diff --git a/google/ads/googleads/v1/errors/campaign_budget_error.proto b/google/ads/googleads/v1/errors/campaign_budget_error.proto index b4faaf74f..4793c3672 100644 --- a/google/ads/googleads/v1/errors/campaign_budget_error.proto +++ b/google/ads/googleads/v1/errors/campaign_budget_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -90,4 +89,6 @@ message CampaignBudgetErrorEnum { // A money amount was not a multiple of a minimum unit. NON_MULTIPLE_OF_MINIMUM_CURRENCY_UNIT = 16; } + + } diff --git a/google/ads/googleads/v1/errors/campaign_criterion_error.proto b/google/ads/googleads/v1/errors/campaign_criterion_error.proto index 98a955f2d..9e37d29e9 100644 --- a/google/ads/googleads/v1/errors/campaign_criterion_error.proto +++ b/google/ads/googleads/v1/errors/campaign_criterion_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -77,4 +76,6 @@ message CampaignCriterionErrorEnum { // Negative criteria are immutable, so updates are not allowed. CANNOT_UPDATE_NEGATIVE_CRITERION = 12; } + + } diff --git a/google/ads/googleads/v1/errors/campaign_draft_error.proto b/google/ads/googleads/v1/errors/campaign_draft_error.proto index 0835a9d58..e39988ca5 100644 --- a/google/ads/googleads/v1/errors/campaign_draft_error.proto +++ b/google/ads/googleads/v1/errors/campaign_draft_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v1/errors/campaign_error.proto b/google/ads/googleads/v1/errors/campaign_error.proto index 16c759fb6..3128993f6 100644 --- a/google/ads/googleads/v1/errors/campaign_error.proto +++ b/google/ads/googleads/v1/errors/campaign_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -82,11 +81,11 @@ message CampaignErrorEnum { // Given status is invalid. INVALID_AD_SERVING_OPTIMIZATION_STATUS = 15; - // Error in the campaign level tracking url. + // Error in the campaign level tracking URL. INVALID_TRACKING_URL = 16; - // Cannot set both tracking url template and tracking setting. An user has - // to clear legacy tracking setting in order to add tracking url template. + // Cannot set both tracking URL template and tracking setting. A user has + // to clear legacy tracking setting in order to add tracking URL template. CANNOT_SET_BOTH_TRACKING_URL_TEMPLATE_AND_TRACKING_SETTING = 17; // The maximum number of impressions for Frequency Cap should be an integer @@ -171,4 +170,6 @@ message CampaignErrorEnum { // Comparison Listing Ads. MERCHANT_NOT_ALLOWED_FOR_COMPARISON_LISTING_ADS = 43; } + + } diff --git a/google/ads/googleads/v1/errors/campaign_experiment_error.proto b/google/ads/googleads/v1/errors/campaign_experiment_error.proto index c2f38cf3e..94737a9f5 100644 --- a/google/ads/googleads/v1/errors/campaign_experiment_error.proto +++ b/google/ads/googleads/v1/errors/campaign_experiment_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v1/errors/campaign_feed_error.proto b/google/ads/googleads/v1/errors/campaign_feed_error.proto index a918de901..7940d209e 100644 --- a/google/ads/googleads/v1/errors/campaign_feed_error.proto +++ b/google/ads/googleads/v1/errors/campaign_feed_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -59,4 +58,6 @@ message CampaignFeedErrorEnum { // Feed mapping for this placeholder type does not exist. MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE = 8; } + + } diff --git a/google/ads/googleads/v1/errors/campaign_shared_set_error.proto b/google/ads/googleads/v1/errors/campaign_shared_set_error.proto index f6572032a..99261b050 100644 --- a/google/ads/googleads/v1/errors/campaign_shared_set_error.proto +++ b/google/ads/googleads/v1/errors/campaign_shared_set_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message CampaignSharedSetErrorEnum { // The shared set belongs to another customer and permission isn't granted. SHARED_SET_ACCESS_DENIED = 2; } + + } diff --git a/google/ads/googleads/v1/errors/change_status_error.proto b/google/ads/googleads/v1/errors/change_status_error.proto index 9c76488f6..4fe6010db 100644 --- a/google/ads/googleads/v1/errors/change_status_error.proto +++ b/google/ads/googleads/v1/errors/change_status_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message ChangeStatusErrorEnum { // The requested start date is too old. START_DATE_TOO_OLD = 3; } + + } diff --git a/google/ads/googleads/v1/errors/collection_size_error.proto b/google/ads/googleads/v1/errors/collection_size_error.proto index ea8746124..343d62a5a 100644 --- a/google/ads/googleads/v1/errors/collection_size_error.proto +++ b/google/ads/googleads/v1/errors/collection_size_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message CollectionSizeErrorEnum { // Too many. TOO_MANY = 3; } + + } diff --git a/google/ads/googleads/v1/errors/context_error.proto b/google/ads/googleads/v1/errors/context_error.proto index 49a4fccbd..80a5492c5 100644 --- a/google/ads/googleads/v1/errors/context_error.proto +++ b/google/ads/googleads/v1/errors/context_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message ContextErrorEnum { // The operation is not allowed for removed resources. OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE = 3; } + + } diff --git a/google/ads/googleads/v1/errors/conversion_action_error.proto b/google/ads/googleads/v1/errors/conversion_action_error.proto index f35075317..a29021592 100644 --- a/google/ads/googleads/v1/errors/conversion_action_error.proto +++ b/google/ads/googleads/v1/errors/conversion_action_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -71,4 +70,6 @@ message ConversionActionErrorEnum { // added. DATA_DRIVEN_MODEL_UNKNOWN = 9; } + + } diff --git a/google/ads/googleads/v1/errors/conversion_adjustment_upload_error.proto b/google/ads/googleads/v1/errors/conversion_adjustment_upload_error.proto index 1de28be1c..0f9b17baa 100644 --- a/google/ads/googleads/v1/errors/conversion_adjustment_upload_error.proto +++ b/google/ads/googleads/v1/errors/conversion_adjustment_upload_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -73,7 +72,8 @@ message ConversionAdjustmentUploadErrorEnum { // Restatements cannot be reported for a conversion action that always uses // the default value. - CANNOT_RESTATE_CONVERSION_ACTION_THAT_ALWAYS_USES_DEFAULT_CONVERSION_VALUE = - 10; + CANNOT_RESTATE_CONVERSION_ACTION_THAT_ALWAYS_USES_DEFAULT_CONVERSION_VALUE = 10; } + + } diff --git a/google/ads/googleads/v1/errors/conversion_upload_error.proto b/google/ads/googleads/v1/errors/conversion_upload_error.proto index 8d8f53382..112b80a2c 100644 --- a/google/ads/googleads/v1/errors/conversion_upload_error.proto +++ b/google/ads/googleads/v1/errors/conversion_upload_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -56,7 +55,7 @@ message ConversionUploadErrorEnum { EXPIRED_GCLID = 5; // The click associated with the given gclid occurred too recently. Please - // try uploading again after 24 hours have passed since the click occurred. + // try uploading again after 6 hours have passed since the click occurred. TOO_RECENT_GCLID = 6; // The click associated with the given gclid could not be found in the @@ -83,15 +82,13 @@ message ConversionUploadErrorEnum { // The specified conversion action does not use an external attribution // model, but external_attribution_data was set. - EXTERNAL_ATTRIBUTION_DATA_SET_FOR_NON_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = - 12; + EXTERNAL_ATTRIBUTION_DATA_SET_FOR_NON_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = 12; // The specified conversion action uses an external attribution model, but // external_attribution_data or one of its contained fields was not set. // Both external_attribution_credit and external_attribution_model must be // set for externally attributed conversion actions. - EXTERNAL_ATTRIBUTION_DATA_NOT_SET_FOR_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = - 13; + EXTERNAL_ATTRIBUTION_DATA_NOT_SET_FOR_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = 13; // Order IDs are not supported for conversion actions which use an external // attribution model. @@ -105,7 +102,7 @@ message ConversionUploadErrorEnum { // conversion action combination. DUPLICATE_ORDER_ID = 16; - // The call occurred too recently. Please try uploading again after 24 hours + // The call occurred too recently. Please try uploading again after 6 hours // have passed since the call occurred. TOO_RECENT_CALL = 17; @@ -128,4 +125,6 @@ message ConversionUploadErrorEnum { // number "6502531234". UNPARSEABLE_CALLERS_PHONE_NUMBER = 22; } + + } diff --git a/google/ads/googleads/v1/errors/country_code_error.proto b/google/ads/googleads/v1/errors/country_code_error.proto index 18122a07c..5f9445211 100644 --- a/google/ads/googleads/v1/errors/country_code_error.proto +++ b/google/ads/googleads/v1/errors/country_code_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message CountryCodeErrorEnum { // The country code is invalid. INVALID_COUNTRY_CODE = 2; } + + } diff --git a/google/ads/googleads/v1/errors/criterion_error.proto b/google/ads/googleads/v1/errors/criterion_error.proto index a471293af..97a052af8 100644 --- a/google/ads/googleads/v1/errors/criterion_error.proto +++ b/google/ads/googleads/v1/errors/criterion_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -365,4 +364,6 @@ message CriterionErrorEnum { // A webpage criterion cannot be added to a non-DSA ad group. WEBPAGE_CRITERION_NOT_SUPPORTED_ON_NON_DSA_AD_GROUP = 95; } + + } diff --git a/google/ads/googleads/v1/errors/custom_interest_error.proto b/google/ads/googleads/v1/errors/custom_interest_error.proto index 61664befc..2a5310bd1 100644 --- a/google/ads/googleads/v1/errors/custom_interest_error.proto +++ b/google/ads/googleads/v1/errors/custom_interest_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -62,4 +61,6 @@ message CustomInterestErrorEnum { // Cannot mutate custom interest type. CANNOT_CHANGE_TYPE = 8; } + + } diff --git a/google/ads/googleads/v1/errors/customer_client_link_error.proto b/google/ads/googleads/v1/errors/customer_client_link_error.proto index 8c360ab56..6a0d5ac50 100644 --- a/google/ads/googleads/v1/errors/customer_client_link_error.proto +++ b/google/ads/googleads/v1/errors/customer_client_link_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -61,4 +60,6 @@ message CustomerClientLinkErrorEnum { // Parent manager account has the maximum number of linked accounts. CUSTOMER_HAS_TOO_MANY_ACCOUNTS_AT_MANAGER = 8; } + + } diff --git a/google/ads/googleads/v1/errors/customer_error.proto b/google/ads/googleads/v1/errors/customer_error.proto index f694c8877..2069e71a6 100644 --- a/google/ads/googleads/v1/errors/customer_error.proto +++ b/google/ads/googleads/v1/errors/customer_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -47,4 +46,6 @@ message CustomerErrorEnum { // CustomerService cannot get a customer that has not been fully set up. ACCOUNT_NOT_SET_UP = 3; } + + } diff --git a/google/ads/googleads/v1/errors/customer_feed_error.proto b/google/ads/googleads/v1/errors/customer_feed_error.proto index aaefc25ea..68d7df5fa 100644 --- a/google/ads/googleads/v1/errors/customer_feed_error.proto +++ b/google/ads/googleads/v1/errors/customer_feed_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -62,4 +61,6 @@ message CustomerFeedErrorEnum { // Placeholder not allowed at the account level. PLACEHOLDER_TYPE_NOT_ALLOWED_ON_CUSTOMER_FEED = 8; } + + } diff --git a/google/ads/googleads/v1/errors/customer_manager_link_error.proto b/google/ads/googleads/v1/errors/customer_manager_link_error.proto index bb8487ce2..9a3e5c556 100644 --- a/google/ads/googleads/v1/errors/customer_manager_link_error.proto +++ b/google/ads/googleads/v1/errors/customer_manager_link_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -67,4 +66,6 @@ message CustomerManagerLinkErrorEnum { // duplicate children. DUPLICATE_CHILD_FOUND = 9; } + + } diff --git a/google/ads/googleads/v1/errors/database_error.proto b/google/ads/googleads/v1/errors/database_error.proto index 18438fa9a..d1369ca19 100644 --- a/google/ads/googleads/v1/errors/database_error.proto +++ b/google/ads/googleads/v1/errors/database_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -44,4 +43,6 @@ message DatabaseErrorEnum { // Please retry the request. CONCURRENT_MODIFICATION = 2; } + + } diff --git a/google/ads/googleads/v1/errors/date_error.proto b/google/ads/googleads/v1/errors/date_error.proto index a7848ffdd..981b88234 100644 --- a/google/ads/googleads/v1/errors/date_error.proto +++ b/google/ads/googleads/v1/errors/date_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -70,4 +69,6 @@ message DateErrorEnum { // Both dates in range are null. DATE_RANGE_MINIMUM_AND_MAXIMUM_DATES_BOTH_NULL = 10; } + + } diff --git a/google/ads/googleads/v1/errors/date_range_error.proto b/google/ads/googleads/v1/errors/date_range_error.proto index 96b91891b..fbedd34ff 100644 --- a/google/ads/googleads/v1/errors/date_range_error.proto +++ b/google/ads/googleads/v1/errors/date_range_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,4 +54,6 @@ message DateRangeErrorEnum { // Trying to change start date on a resource that has started. CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED = 6; } + + } diff --git a/google/ads/googleads/v1/errors/distinct_error.proto b/google/ads/googleads/v1/errors/distinct_error.proto index d715d500a..6cd6df6d7 100644 --- a/google/ads/googleads/v1/errors/distinct_error.proto +++ b/google/ads/googleads/v1/errors/distinct_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message DistinctErrorEnum { // Duplicate type. DUPLICATE_TYPE = 3; } + + } diff --git a/google/ads/googleads/v1/errors/enum_error.proto b/google/ads/googleads/v1/errors/enum_error.proto index 650d39811..80099f0ae 100644 --- a/google/ads/googleads/v1/errors/enum_error.proto +++ b/google/ads/googleads/v1/errors/enum_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message EnumErrorEnum { // The enum value is not permitted. ENUM_VALUE_NOT_PERMITTED = 3; } + + } diff --git a/google/ads/googleads/v1/errors/errors.proto b/google/ads/googleads/v1/errors/errors.proto index 34aa4e188..256a6d683 100644 --- a/google/ads/googleads/v1/errors/errors.proto +++ b/google/ads/googleads/v1/errors/errors.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -121,8 +120,8 @@ import "google/ads/googleads/v1/errors/string_length_error.proto"; import "google/ads/googleads/v1/errors/url_field_error.proto"; import "google/ads/googleads/v1/errors/user_list_error.proto"; import "google/ads/googleads/v1/errors/youtube_video_registration_error.proto"; -import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors"; @@ -211,8 +210,7 @@ message ErrorCode { AuthenticationErrorEnum.AuthenticationError authentication_error = 17; // Indicates failure to properly authenticate user. - AdGroupCriterionErrorEnum.AdGroupCriterionError ad_group_criterion_error = - 18; + AdGroupCriterionErrorEnum.AdGroupCriterionError ad_group_criterion_error = 18; // The reasons for the ad customizer error AdCustomizerErrorEnum.AdCustomizerError ad_customizer_error = 19; @@ -233,8 +231,7 @@ message ErrorCode { BiddingErrorEnum.BiddingError bidding_error = 26; // The reasons for the campaign criterion error - CampaignCriterionErrorEnum.CampaignCriterionError campaign_criterion_error = - 29; + CampaignCriterionErrorEnum.CampaignCriterionError campaign_criterion_error = 29; // The reasons for the collection size error CollectionSizeErrorEnum.CollectionSizeError collection_size_error = 31; @@ -258,8 +255,7 @@ message ErrorCode { DistinctErrorEnum.DistinctError distinct_error = 35; // The reasons for the feed attribute reference error - FeedAttributeReferenceErrorEnum.FeedAttributeReferenceError - feed_attribute_reference_error = 36; + FeedAttributeReferenceErrorEnum.FeedAttributeReferenceError feed_attribute_reference_error = 36; // The reasons for the function error FunctionErrorEnum.FunctionError function_error = 37; @@ -289,8 +285,7 @@ message ErrorCode { MultiplierErrorEnum.MultiplierError multiplier_error = 44; // The reasons for the new resource creation error - NewResourceCreationErrorEnum.NewResourceCreationError - new_resource_creation_error = 45; + NewResourceCreationErrorEnum.NewResourceCreationError new_resource_creation_error = 45; // The reasons for the not empty error NotEmptyErrorEnum.NotEmptyError not_empty_error = 46; @@ -320,24 +315,19 @@ message ErrorCode { StringLengthErrorEnum.StringLengthError string_length_error = 54; // The reasons for the operation access denied error - OperationAccessDeniedErrorEnum.OperationAccessDeniedError - operation_access_denied_error = 55; + OperationAccessDeniedErrorEnum.OperationAccessDeniedError operation_access_denied_error = 55; // The reasons for the resource access denied error - ResourceAccessDeniedErrorEnum.ResourceAccessDeniedError - resource_access_denied_error = 56; + ResourceAccessDeniedErrorEnum.ResourceAccessDeniedError resource_access_denied_error = 56; // The reasons for the resource count limit exceeded error - ResourceCountLimitExceededErrorEnum.ResourceCountLimitExceededError - resource_count_limit_exceeded_error = 57; + ResourceCountLimitExceededErrorEnum.ResourceCountLimitExceededError resource_count_limit_exceeded_error = 57; // The reasons for YouTube video registration errors. - YoutubeVideoRegistrationErrorEnum.YoutubeVideoRegistrationError - youtube_video_registration_error = 117; + YoutubeVideoRegistrationErrorEnum.YoutubeVideoRegistrationError youtube_video_registration_error = 117; // The reasons for the ad group bid modifier error - AdGroupBidModifierErrorEnum.AdGroupBidModifierError - ad_group_bid_modifier_error = 59; + AdGroupBidModifierErrorEnum.AdGroupBidModifierError ad_group_bid_modifier_error = 59; // The reasons for the context error ContextErrorEnum.ContextError context_error = 60; @@ -352,20 +342,16 @@ message ErrorCode { SharedCriterionErrorEnum.SharedCriterionError shared_criterion_error = 63; // The reasons for the campaign shared set error - CampaignSharedSetErrorEnum.CampaignSharedSetError - campaign_shared_set_error = 64; + CampaignSharedSetErrorEnum.CampaignSharedSetError campaign_shared_set_error = 64; // The reasons for the conversion action error - ConversionActionErrorEnum.ConversionActionError conversion_action_error = - 65; + ConversionActionErrorEnum.ConversionActionError conversion_action_error = 65; // The reasons for the conversion adjustment upload error - ConversionAdjustmentUploadErrorEnum.ConversionAdjustmentUploadError - conversion_adjustment_upload_error = 115; + ConversionAdjustmentUploadErrorEnum.ConversionAdjustmentUploadError conversion_adjustment_upload_error = 115; // The reasons for the conversion upload error - ConversionUploadErrorEnum.ConversionUploadError conversion_upload_error = - 111; + ConversionUploadErrorEnum.ConversionUploadError conversion_upload_error = 111; // The reasons for the header error. HeaderErrorEnum.HeaderError header_error = 66; @@ -383,27 +369,22 @@ message ErrorCode { KeywordPlanErrorEnum.KeywordPlanError keyword_plan_error = 71; // The reason for keyword plan campaign error. - KeywordPlanCampaignErrorEnum.KeywordPlanCampaignError - keyword_plan_campaign_error = 72; + KeywordPlanCampaignErrorEnum.KeywordPlanCampaignError keyword_plan_campaign_error = 72; // The reason for keyword plan negative keyword error. - KeywordPlanNegativeKeywordErrorEnum.KeywordPlanNegativeKeywordError - keyword_plan_negative_keyword_error = 73; + KeywordPlanNegativeKeywordErrorEnum.KeywordPlanNegativeKeywordError keyword_plan_negative_keyword_error = 73; // The reason for keyword plan ad group error. - KeywordPlanAdGroupErrorEnum.KeywordPlanAdGroupError - keyword_plan_ad_group_error = 74; + KeywordPlanAdGroupErrorEnum.KeywordPlanAdGroupError keyword_plan_ad_group_error = 74; // The reason for keyword plan keyword error. - KeywordPlanKeywordErrorEnum.KeywordPlanKeywordError - keyword_plan_keyword_error = 75; + KeywordPlanKeywordErrorEnum.KeywordPlanKeywordError keyword_plan_keyword_error = 75; // The reason for keyword idea error. KeywordPlanIdeaErrorEnum.KeywordPlanIdeaError keyword_plan_idea_error = 76; // The reasons for account budget proposal errors. - AccountBudgetProposalErrorEnum.AccountBudgetProposalError - account_budget_proposal_error = 77; + AccountBudgetProposalErrorEnum.AccountBudgetProposalError account_budget_proposal_error = 77; // The reasons for the user list error UserListErrorEnum.UserListError user_list_error = 78; @@ -415,8 +396,7 @@ message ErrorCode { FeedErrorEnum.FeedError feed_error = 80; // The reasons for the geo target constant suggestion error. - GeoTargetConstantSuggestionErrorEnum.GeoTargetConstantSuggestionError - geo_target_constant_suggestion_error = 81; + GeoTargetConstantSuggestionErrorEnum.GeoTargetConstantSuggestionError geo_target_constant_suggestion_error = 81; // The reasons for the campaign draft error CampaignDraftErrorEnum.CampaignDraftError campaign_draft_error = 82; @@ -431,12 +411,10 @@ message ErrorCode { BillingSetupErrorEnum.BillingSetupError billing_setup_error = 87; // The reasons for the customer client link error - CustomerClientLinkErrorEnum.CustomerClientLinkError - customer_client_link_error = 88; + CustomerClientLinkErrorEnum.CustomerClientLinkError customer_client_link_error = 88; // The reasons for the customer manager link error - CustomerManagerLinkErrorEnum.CustomerManagerLinkError - customer_manager_link_error = 91; + CustomerManagerLinkErrorEnum.CustomerManagerLinkError customer_manager_link_error = 91; // The reasons for the feed mapping error FeedMappingErrorEnum.FeedMappingError feed_mapping_error = 92; @@ -457,19 +435,16 @@ message ErrorCode { CampaignExperimentErrorEnum.CampaignExperimentError campaign_experiment_error = 98; // The reasons for the extension feed item error - ExtensionFeedItemErrorEnum.ExtensionFeedItemError - extension_feed_item_error = 100; + ExtensionFeedItemErrorEnum.ExtensionFeedItemError extension_feed_item_error = 100; // The reasons for the ad parameter error AdParameterErrorEnum.AdParameterError ad_parameter_error = 101; // The reasons for the feed item validation error - FeedItemValidationErrorEnum.FeedItemValidationError - feed_item_validation_error = 102; + FeedItemValidationErrorEnum.FeedItemValidationError feed_item_validation_error = 102; // The reasons for the extension setting error - ExtensionSettingErrorEnum.ExtensionSettingError extension_setting_error = - 103; + ExtensionSettingErrorEnum.ExtensionSettingError extension_setting_error = 103; // The reasons for the feed item target error FeedItemTargetErrorEnum.FeedItemTargetError feed_item_target_error = 104; @@ -484,8 +459,7 @@ message ErrorCode { PartialFailureErrorEnum.PartialFailureError partial_failure_error = 112; // The reasons for the policy validation parameter error - PolicyValidationParameterErrorEnum.PolicyValidationParameterError - policy_validation_parameter_error = 114; + PolicyValidationParameterErrorEnum.PolicyValidationParameterError policy_validation_parameter_error = 114; // The reasons for the size limit error SizeLimitErrorEnum.SizeLimitError size_limit_error = 118; @@ -551,6 +525,5 @@ message PolicyFindingDetails { // The list of policy topics for the resource. Contains the PROHIBITED or // FULLY_LIMITED policy topic entries that prevented the resource from being // saved (among any other entries the resource may also have). - repeated google.ads.googleads.v1.common.PolicyTopicEntry - policy_topic_entries = 1; + repeated google.ads.googleads.v1.common.PolicyTopicEntry policy_topic_entries = 1; } diff --git a/google/ads/googleads/v1/errors/extension_feed_item_error.proto b/google/ads/googleads/v1/errors/extension_feed_item_error.proto index 9ab38917f..39f285ecf 100644 --- a/google/ads/googleads/v1/errors/extension_feed_item_error.proto +++ b/google/ads/googleads/v1/errors/extension_feed_item_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -184,4 +183,6 @@ message ExtensionFeedItemErrorEnum { // This field has too many decimal places specified. TOO_MANY_DECIMAL_PLACES_SPECIFIED = 44; } + + } diff --git a/google/ads/googleads/v1/errors/extension_setting_error.proto b/google/ads/googleads/v1/errors/extension_setting_error.proto index 2883c1a09..cefdbb99f 100644 --- a/google/ads/googleads/v1/errors/extension_setting_error.proto +++ b/google/ads/googleads/v1/errors/extension_setting_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -253,4 +252,6 @@ message ExtensionSettingErrorEnum { // name in the update mask. EXTENSION_SETTING_UPDATE_IS_A_NOOP = 67; } + + } diff --git a/google/ads/googleads/v1/errors/feed_attribute_reference_error.proto b/google/ads/googleads/v1/errors/feed_attribute_reference_error.proto index e3be51cee..b140e848e 100644 --- a/google/ads/googleads/v1/errors/feed_attribute_reference_error.proto +++ b/google/ads/googleads/v1/errors/feed_attribute_reference_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message FeedAttributeReferenceErrorEnum { // There is no feed attribute in an enabled feed with the given name. INVALID_FEED_ATTRIBUTE_NAME = 4; } + + } diff --git a/google/ads/googleads/v1/errors/feed_error.proto b/google/ads/googleads/v1/errors/feed_error.proto index d58b2e251..3420c63be 100644 --- a/google/ads/googleads/v1/errors/feed_error.proto +++ b/google/ads/googleads/v1/errors/feed_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -101,4 +100,6 @@ message FeedErrorEnum { // There is already a feed with the given system feed generation data. DUPLICATE_SYSTEM_FEED = 21; } + + } diff --git a/google/ads/googleads/v1/errors/feed_item_error.proto b/google/ads/googleads/v1/errors/feed_item_error.proto index d2e1d43a2..70af9a105 100644 --- a/google/ads/googleads/v1/errors/feed_item_error.proto +++ b/google/ads/googleads/v1/errors/feed_item_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -67,4 +66,6 @@ message FeedItemErrorEnum { // The feed attribute value is too large. SIZE_TOO_LARGE_FOR_MULTI_VALUE_ATTRIBUTE = 10; } + + } diff --git a/google/ads/googleads/v1/errors/feed_item_target_error.proto b/google/ads/googleads/v1/errors/feed_item_target_error.proto index ae72ec2a5..ad1e0c55a 100644 --- a/google/ads/googleads/v1/errors/feed_item_target_error.proto +++ b/google/ads/googleads/v1/errors/feed_item_target_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -60,4 +59,6 @@ message FeedItemTargetErrorEnum { // group target. CANNOT_HAVE_ENABLED_CAMPAIGN_AND_ENABLED_AD_GROUP_TARGETS = 7; } + + } diff --git a/google/ads/googleads/v1/errors/feed_item_validation_error.proto b/google/ads/googleads/v1/errors/feed_item_validation_error.proto index c8d2eb965..f7a9966fe 100644 --- a/google/ads/googleads/v1/errors/feed_item_validation_error.proto +++ b/google/ads/googleads/v1/errors/feed_item_validation_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -343,4 +342,6 @@ message FeedItemValidationErrorEnum { // Longitude value is missing. MISSING_LONGITUDE_VALUE = 96; } + + } diff --git a/google/ads/googleads/v1/errors/feed_mapping_error.proto b/google/ads/googleads/v1/errors/feed_mapping_error.proto index 7084bd5fd..d5505eaa0 100644 --- a/google/ads/googleads/v1/errors/feed_mapping_error.proto +++ b/google/ads/googleads/v1/errors/feed_mapping_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -93,4 +92,6 @@ message FeedMappingErrorEnum { // with the given type. INVALID_PLACEHOLDER_TYPE_FOR_SYSTEM_GENERATED_FEED_TYPE = 18; } + + } diff --git a/google/ads/googleads/v1/errors/field_error.proto b/google/ads/googleads/v1/errors/field_error.proto index 5d60fdfd7..e39986881 100644 --- a/google/ads/googleads/v1/errors/field_error.proto +++ b/google/ads/googleads/v1/errors/field_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -61,4 +60,6 @@ message FieldErrorEnum { // The field's value is on a blacklist for this field. BLACKLISTED_VALUE = 8; } + + } diff --git a/google/ads/googleads/v1/errors/field_mask_error.proto b/google/ads/googleads/v1/errors/field_mask_error.proto index e07334b16..520c9f287 100644 --- a/google/ads/googleads/v1/errors/field_mask_error.proto +++ b/google/ads/googleads/v1/errors/field_mask_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -54,4 +53,6 @@ message FieldMaskErrorEnum { // all the subfields of the invalid field. FIELD_HAS_SUBFIELDS = 3; } + + } diff --git a/google/ads/googleads/v1/errors/function_error.proto b/google/ads/googleads/v1/errors/function_error.proto index 4d726d5b5..0d6763fb7 100644 --- a/google/ads/googleads/v1/errors/function_error.proto +++ b/google/ads/googleads/v1/errors/function_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -89,4 +88,6 @@ message FunctionErrorEnum { // Invalid attribute name. INVALID_ATTRIBUTE_NAME = 17; } + + } diff --git a/google/ads/googleads/v1/errors/function_parsing_error.proto b/google/ads/googleads/v1/errors/function_parsing_error.proto index ad3e1fc0f..1361fe202 100644 --- a/google/ads/googleads/v1/errors/function_parsing_error.proto +++ b/google/ads/googleads/v1/errors/function_parsing_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -73,4 +72,6 @@ message FunctionParsingErrorEnum { // Function had too many operands. TOO_MANY_OPERANDS = 12; } + + } diff --git a/google/ads/googleads/v1/errors/geo_target_constant_suggestion_error.proto b/google/ads/googleads/v1/errors/geo_target_constant_suggestion_error.proto index 5af9e7408..6219dd305 100644 --- a/google/ads/googleads/v1/errors/geo_target_constant_suggestion_error.proto +++ b/google/ads/googleads/v1/errors/geo_target_constant_suggestion_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -52,4 +51,6 @@ message GeoTargetConstantSuggestionErrorEnum { // the request. REQUEST_PARAMETERS_UNSET = 5; } + + } diff --git a/google/ads/googleads/v1/errors/header_error.proto b/google/ads/googleads/v1/errors/header_error.proto index a3c7e5a7f..bbc789473 100644 --- a/google/ads/googleads/v1/errors/header_error.proto +++ b/google/ads/googleads/v1/errors/header_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message HeaderErrorEnum { // The login customer id could not be validated. INVALID_LOGIN_CUSTOMER_ID = 3; } + + } diff --git a/google/ads/googleads/v1/errors/id_error.proto b/google/ads/googleads/v1/errors/id_error.proto index 2a5a4e7f5..a940e35ee 100644 --- a/google/ads/googleads/v1/errors/id_error.proto +++ b/google/ads/googleads/v1/errors/id_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message IdErrorEnum { // Id not found NOT_FOUND = 2; } + + } diff --git a/google/ads/googleads/v1/errors/image_error.proto b/google/ads/googleads/v1/errors/image_error.proto index d58e7da83..bb4486177 100644 --- a/google/ads/googleads/v1/errors/image_error.proto +++ b/google/ads/googleads/v1/errors/image_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -152,4 +151,6 @@ message ImageErrorEnum { // There was a problem reading the image file. PROBLEM_READING_FILE = 38; } + + } diff --git a/google/ads/googleads/v1/errors/internal_error.proto b/google/ads/googleads/v1/errors/internal_error.proto index ae89eaf9a..26552666e 100644 --- a/google/ads/googleads/v1/errors/internal_error.proto +++ b/google/ads/googleads/v1/errors/internal_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,12 +42,14 @@ message InternalErrorEnum { // Google Ads API encountered unexpected internal error. INTERNAL_ERROR = 2; - // The intended error code doesn't exist in any API version. This will be - // fixed by adding a new error code as soon as possible. + // The intended error code doesn't exist in specified API version. It will + // be released in a future API version. ERROR_CODE_NOT_PUBLISHED = 3; // Google Ads API encountered an unexpected transient error. The user // should retry their request in these cases. TRANSIENT_ERROR = 4; } + + } diff --git a/google/ads/googleads/v1/errors/keyword_plan_ad_group_error.proto b/google/ads/googleads/v1/errors/keyword_plan_ad_group_error.proto index 1bf241a6f..5e7ef2290 100644 --- a/google/ads/googleads/v1/errors/keyword_plan_ad_group_error.proto +++ b/google/ads/googleads/v1/errors/keyword_plan_ad_group_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message KeywordPlanAdGroupErrorEnum { // AdGroup name or other keyword plan AdGroup name in the request. DUPLICATE_NAME = 3; } + + } diff --git a/google/ads/googleads/v1/errors/keyword_plan_campaign_error.proto b/google/ads/googleads/v1/errors/keyword_plan_campaign_error.proto index a91299d66..ab0820988 100644 --- a/google/ads/googleads/v1/errors/keyword_plan_campaign_error.proto +++ b/google/ads/googleads/v1/errors/keyword_plan_campaign_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -58,4 +57,6 @@ message KeywordPlanCampaignErrorEnum { // The number of geo targets in the keyword plan campaign exceeds limits. MAX_GEOS_EXCEEDED = 6; } + + } diff --git a/google/ads/googleads/v1/errors/keyword_plan_error.proto b/google/ads/googleads/v1/errors/keyword_plan_error.proto index 7031f745d..1db1eff68 100644 --- a/google/ads/googleads/v1/errors/keyword_plan_error.proto +++ b/google/ads/googleads/v1/errors/keyword_plan_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -87,4 +86,6 @@ message KeywordPlanErrorEnum { // The plan's name is invalid. INVALID_NAME = 16; } + + } diff --git a/google/ads/googleads/v1/errors/keyword_plan_idea_error.proto b/google/ads/googleads/v1/errors/keyword_plan_idea_error.proto index 351eae94e..3a0a235f5 100644 --- a/google/ads/googleads/v1/errors/keyword_plan_idea_error.proto +++ b/google/ads/googleads/v1/errors/keyword_plan_idea_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message KeywordPlanIdeaErrorEnum { // The input has an invalid value. INVALID_VALUE = 3; } + + } diff --git a/google/ads/googleads/v1/errors/keyword_plan_keyword_error.proto b/google/ads/googleads/v1/errors/keyword_plan_keyword_error.proto index 85afa96e2..f36cbcdb1 100644 --- a/google/ads/googleads/v1/errors/keyword_plan_keyword_error.proto +++ b/google/ads/googleads/v1/errors/keyword_plan_keyword_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -61,4 +60,6 @@ message KeywordPlanKeywordErrorEnum { // Keyword or negative keyword has invalid text. INVALID_KEYWORD_TEXT = 7; } + + } diff --git a/google/ads/googleads/v1/errors/keyword_plan_negative_keyword_error.proto b/google/ads/googleads/v1/errors/keyword_plan_negative_keyword_error.proto index 840b2d6d4..6e66cc406 100644 --- a/google/ads/googleads/v1/errors/keyword_plan_negative_keyword_error.proto +++ b/google/ads/googleads/v1/errors/keyword_plan_negative_keyword_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -42,4 +41,6 @@ message KeywordPlanNegativeKeywordErrorEnum { // The received error code is not known in this version. UNKNOWN = 1; } + + } diff --git a/google/ads/googleads/v1/errors/label_error.proto b/google/ads/googleads/v1/errors/label_error.proto index 9085f847b..0053452b1 100644 --- a/google/ads/googleads/v1/errors/label_error.proto +++ b/google/ads/googleads/v1/errors/label_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -69,4 +68,6 @@ message LabelErrorEnum { // resource. CANNOT_ATTACH_NON_MANAGER_LABEL_TO_CUSTOMER = 10; } + + } diff --git a/google/ads/googleads/v1/errors/language_code_error.proto b/google/ads/googleads/v1/errors/language_code_error.proto index fb861c621..73a427576 100644 --- a/google/ads/googleads/v1/errors/language_code_error.proto +++ b/google/ads/googleads/v1/errors/language_code_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message LanguageCodeErrorEnum { // The language is not allowed to use. INVALID_LANGUAGE_CODE = 3; } + + } diff --git a/google/ads/googleads/v1/errors/list_operation_error.proto b/google/ads/googleads/v1/errors/list_operation_error.proto index 3525c7fe8..abf58a4bd 100644 --- a/google/ads/googleads/v1/errors/list_operation_error.proto +++ b/google/ads/googleads/v1/errors/list_operation_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message ListOperationErrorEnum { // Duplicate or identical value is sent in multiple list operations. DUPLICATE_VALUES = 8; } + + } diff --git a/google/ads/googleads/v1/errors/manager_link_error.proto b/google/ads/googleads/v1/errors/manager_link_error.proto index 67494823a..bc7d418f7 100644 --- a/google/ads/googleads/v1/errors/manager_link_error.proto +++ b/google/ads/googleads/v1/errors/manager_link_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v1/errors/media_bundle_error.proto b/google/ads/googleads/v1/errors/media_bundle_error.proto index e04d3e8a9..e31218f1f 100644 --- a/google/ads/googleads/v1/errors/media_bundle_error.proto +++ b/google/ads/googleads/v1/errors/media_bundle_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -106,4 +105,6 @@ message MediaBundleErrorEnum { // Custom exits not allowed in HTML5 entry. CUSTOM_EXIT_NOT_ALLOWED = 24; } + + } diff --git a/google/ads/googleads/v1/errors/media_file_error.proto b/google/ads/googleads/v1/errors/media_file_error.proto index ed906596c..4c082004e 100644 --- a/google/ads/googleads/v1/errors/media_file_error.proto +++ b/google/ads/googleads/v1/errors/media_file_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -109,4 +108,6 @@ message MediaFileErrorEnum { // The YouTube video ID is syntactically valid but the video was not found. YOU_TUBE_VIDEO_NOT_FOUND = 24; } + + } diff --git a/google/ads/googleads/v1/errors/media_upload_error.proto b/google/ads/googleads/v1/errors/media_upload_error.proto index 66edf6197..2474d6707 100644 --- a/google/ads/googleads/v1/errors/media_upload_error.proto +++ b/google/ads/googleads/v1/errors/media_upload_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -52,4 +51,6 @@ message MediaUploadErrorEnum { // The image or media bundle format is not allowed. FORMAT_NOT_ALLOWED = 5; } + + } diff --git a/google/ads/googleads/v1/errors/multiplier_error.proto b/google/ads/googleads/v1/errors/multiplier_error.proto index 845e71c1b..bc006fecf 100644 --- a/google/ads/googleads/v1/errors/multiplier_error.proto +++ b/google/ads/googleads/v1/errors/multiplier_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -77,4 +76,6 @@ message MultiplierErrorEnum { // Multiplier type (cpc vs. cpm) needs to match campaign's bidding strategy MULTIPLIER_AND_BIDDING_STRATEGY_TYPE_MISMATCH = 13; } + + } diff --git a/google/ads/googleads/v1/errors/mutate_error.proto b/google/ads/googleads/v1/errors/mutate_error.proto index 42f828faa..a0b346b1c 100644 --- a/google/ads/googleads/v1/errors/mutate_error.proto +++ b/google/ads/googleads/v1/errors/mutate_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -59,4 +58,6 @@ message MutateErrorEnum { // The resource being created already exists. RESOURCE_ALREADY_EXISTS = 11; } + + } diff --git a/google/ads/googleads/v1/errors/mutate_job_error.proto b/google/ads/googleads/v1/errors/mutate_job_error.proto index 14ef13771..55cb37e19 100644 --- a/google/ads/googleads/v1/errors/mutate_job_error.proto +++ b/google/ads/googleads/v1/errors/mutate_job_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -56,4 +55,6 @@ message MutateJobErrorEnum { // The page size for ListMutateJobResults was invalid. INVALID_PAGE_SIZE = 6; } + + } diff --git a/google/ads/googleads/v1/errors/new_resource_creation_error.proto b/google/ads/googleads/v1/errors/new_resource_creation_error.proto index 216c86711..68ebec486 100644 --- a/google/ads/googleads/v1/errors/new_resource_creation_error.proto +++ b/google/ads/googleads/v1/errors/new_resource_creation_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -50,4 +49,6 @@ message NewResourceCreationErrorEnum { // validation will be done for this child resource. TEMP_ID_RESOURCE_HAD_ERRORS = 4; } + + } diff --git a/google/ads/googleads/v1/errors/not_empty_error.proto b/google/ads/googleads/v1/errors/not_empty_error.proto index c87622e3c..7381108d8 100644 --- a/google/ads/googleads/v1/errors/not_empty_error.proto +++ b/google/ads/googleads/v1/errors/not_empty_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message NotEmptyErrorEnum { // Empty list. EMPTY_LIST = 2; } + + } diff --git a/google/ads/googleads/v1/errors/not_whitelisted_error.proto b/google/ads/googleads/v1/errors/not_whitelisted_error.proto index 256efb2b9..e8062ee80 100644 --- a/google/ads/googleads/v1/errors/not_whitelisted_error.proto +++ b/google/ads/googleads/v1/errors/not_whitelisted_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v1/errors/null_error.proto b/google/ads/googleads/v1/errors/null_error.proto index 2c70a688d..889abec16 100644 --- a/google/ads/googleads/v1/errors/null_error.proto +++ b/google/ads/googleads/v1/errors/null_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message NullErrorEnum { // Specified list/container must not contain any null elements NULL_CONTENT = 2; } + + } diff --git a/google/ads/googleads/v1/errors/operation_access_denied_error.proto b/google/ads/googleads/v1/errors/operation_access_denied_error.proto index 329e87767..66d162468 100644 --- a/google/ads/googleads/v1/errors/operation_access_denied_error.proto +++ b/google/ads/googleads/v1/errors/operation_access_denied_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -70,4 +69,6 @@ message OperationAccessDeniedErrorEnum { // The mutate is not allowed for this customer. MUTATE_NOT_PERMITTED_FOR_CUSTOMER = 11; } + + } diff --git a/google/ads/googleads/v1/errors/operator_error.proto b/google/ads/googleads/v1/errors/operator_error.proto index 2d037a492..9833d7dfd 100644 --- a/google/ads/googleads/v1/errors/operator_error.proto +++ b/google/ads/googleads/v1/errors/operator_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message OperatorErrorEnum { // Operator not supported. OPERATOR_NOT_SUPPORTED = 2; } + + } diff --git a/google/ads/googleads/v1/errors/partial_failure_error.proto b/google/ads/googleads/v1/errors/partial_failure_error.proto index ca61292a8..9d1707c6d 100644 --- a/google/ads/googleads/v1/errors/partial_failure_error.proto +++ b/google/ads/googleads/v1/errors/partial_failure_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -44,4 +43,6 @@ message PartialFailureErrorEnum { // This method requires this field be set to true. PARTIAL_FAILURE_MODE_REQUIRED = 2; } + + } diff --git a/google/ads/googleads/v1/errors/policy_finding_error.proto b/google/ads/googleads/v1/errors/policy_finding_error.proto index ea5710d48..d62fea7f2 100644 --- a/google/ads/googleads/v1/errors/policy_finding_error.proto +++ b/google/ads/googleads/v1/errors/policy_finding_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -47,4 +46,6 @@ message PolicyFindingErrorEnum { // The given policy topic does not exist. POLICY_TOPIC_NOT_FOUND = 3; } + + } diff --git a/google/ads/googleads/v1/errors/policy_validation_parameter_error.proto b/google/ads/googleads/v1/errors/policy_validation_parameter_error.proto index 3bb919ee9..3caba8e7d 100644 --- a/google/ads/googleads/v1/errors/policy_validation_parameter_error.proto +++ b/google/ads/googleads/v1/errors/policy_validation_parameter_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -48,7 +47,8 @@ message PolicyValidationParameterErrorEnum { // Cannot set ignorable policy topics and exempt policy violation keys in // the same policy violation parameter. - CANNOT_SET_BOTH_IGNORABLE_POLICY_TOPICS_AND_EXEMPT_POLICY_VIOLATION_KEYS = - 4; + CANNOT_SET_BOTH_IGNORABLE_POLICY_TOPICS_AND_EXEMPT_POLICY_VIOLATION_KEYS = 4; } + + } diff --git a/google/ads/googleads/v1/errors/policy_violation_error.proto b/google/ads/googleads/v1/errors/policy_violation_error.proto index 2b112ffdb..b2ae65b6f 100644 --- a/google/ads/googleads/v1/errors/policy_violation_error.proto +++ b/google/ads/googleads/v1/errors/policy_violation_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message PolicyViolationErrorEnum { // A policy was violated. See PolicyViolationDetails for more detail. POLICY_ERROR = 2; } + + } diff --git a/google/ads/googleads/v1/errors/query_error.proto b/google/ads/googleads/v1/errors/query_error.proto index 35b080fbd..0cdbd8b23 100644 --- a/google/ads/googleads/v1/errors/query_error.proto +++ b/google/ads/googleads/v1/errors/query_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -210,4 +209,6 @@ message QueryErrorEnum { // account. REQUESTED_METRICS_FOR_MANAGER = 59; } + + } diff --git a/google/ads/googleads/v1/errors/quota_error.proto b/google/ads/googleads/v1/errors/quota_error.proto index 71943834a..4eb84001f 100644 --- a/google/ads/googleads/v1/errors/quota_error.proto +++ b/google/ads/googleads/v1/errors/quota_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -49,4 +48,6 @@ message QuotaErrorEnum { // Too many requests in a short amount of time. RESOURCE_TEMPORARILY_EXHAUSTED = 4; } + + } diff --git a/google/ads/googleads/v1/errors/range_error.proto b/google/ads/googleads/v1/errors/range_error.proto index affa14d97..966be9339 100644 --- a/google/ads/googleads/v1/errors/range_error.proto +++ b/google/ads/googleads/v1/errors/range_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message RangeErrorEnum { // Too high. TOO_HIGH = 3; } + + } diff --git a/google/ads/googleads/v1/errors/recommendation_error.proto b/google/ads/googleads/v1/errors/recommendation_error.proto index 20294dfc9..046c610e3 100644 --- a/google/ads/googleads/v1/errors/recommendation_error.proto +++ b/google/ads/googleads/v1/errors/recommendation_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -86,4 +85,6 @@ message RecommendationErrorEnum { // The recommendation apply request was malformed and invalid. INVALID_APPLY_REQUEST = 15; } + + } diff --git a/google/ads/googleads/v1/errors/region_code_error.proto b/google/ads/googleads/v1/errors/region_code_error.proto index 712b66215..edae214c8 100644 --- a/google/ads/googleads/v1/errors/region_code_error.proto +++ b/google/ads/googleads/v1/errors/region_code_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message RegionCodeErrorEnum { // Invalid region code. INVALID_REGION_CODE = 2; } + + } diff --git a/google/ads/googleads/v1/errors/request_error.proto b/google/ads/googleads/v1/errors/request_error.proto index 50f103973..5d6d1648d 100644 --- a/google/ads/googleads/v1/errors/request_error.proto +++ b/google/ads/googleads/v1/errors/request_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -97,4 +96,6 @@ message RequestErrorEnum { // page_token is set in the validate only request VALIDATE_ONLY_REQUEST_HAS_PAGE_TOKEN = 21; } + + } diff --git a/google/ads/googleads/v1/errors/resource_access_denied_error.proto b/google/ads/googleads/v1/errors/resource_access_denied_error.proto index 0cf38bdb0..f51b5cf02 100644 --- a/google/ads/googleads/v1/errors/resource_access_denied_error.proto +++ b/google/ads/googleads/v1/errors/resource_access_denied_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message ResourceAccessDeniedErrorEnum { // User did not have write access. WRITE_ACCESS_DENIED = 3; } + + } diff --git a/google/ads/googleads/v1/errors/resource_count_limit_exceeded_error.proto b/google/ads/googleads/v1/errors/resource_count_limit_exceeded_error.proto index 9a6365699..ae487eaf3 100644 --- a/google/ads/googleads/v1/errors/resource_count_limit_exceeded_error.proto +++ b/google/ads/googleads/v1/errors/resource_count_limit_exceeded_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -84,4 +83,6 @@ message ResourceCountLimitExceededErrorEnum { // that can be returned. RESPONSE_ROW_LIMIT_EXCEEDED = 9; } + + } diff --git a/google/ads/googleads/v1/errors/setting_error.proto b/google/ads/googleads/v1/errors/setting_error.proto index 23ae8e0c7..4956bfdaf 100644 --- a/google/ads/googleads/v1/errors/setting_error.proto +++ b/google/ads/googleads/v1/errors/setting_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,14 +54,12 @@ message SettingErrorEnum { // set any of the Demographic CriterionTypeGroups (AGE_RANGE, GENDER, // PARENT, INCOME_RANGE) to false (it's okay to not set them at all, in // which case the system will set them to true automatically). - TARGETING_SETTING_DEMOGRAPHIC_CRITERION_TYPE_GROUPS_MUST_BE_SET_TO_TARGET_ALL = - 6; + TARGETING_SETTING_DEMOGRAPHIC_CRITERION_TYPE_GROUPS_MUST_BE_SET_TO_TARGET_ALL = 6; // TargetingSetting cannot change any of // the Demographic CriterionTypeGroups (AGE_RANGE, GENDER, PARENT, // INCOME_RANGE) from true to false. - TARGETING_SETTING_CANNOT_CHANGE_TARGET_ALL_TO_FALSE_FOR_DEMOGRAPHIC_CRITERION_TYPE_GROUP = - 7; + TARGETING_SETTING_CANNOT_CHANGE_TARGET_ALL_TO_FALSE_FOR_DEMOGRAPHIC_CRITERION_TYPE_GROUP = 7; // At least one feed id should be present. DYNAMIC_SEARCH_ADS_SETTING_AT_LEAST_ONE_FEED_ID_MUST_BE_PRESENT = 8; @@ -103,4 +100,6 @@ message SettingErrorEnum { // Too many exclamation marks in universal app campaign ad text ideas. TOO_MANY_EXCLAMATION_MARKS = 19; } + + } diff --git a/google/ads/googleads/v1/errors/shared_criterion_error.proto b/google/ads/googleads/v1/errors/shared_criterion_error.proto index a63ab665e..ea6af8562 100644 --- a/google/ads/googleads/v1/errors/shared_criterion_error.proto +++ b/google/ads/googleads/v1/errors/shared_criterion_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,4 +42,6 @@ message SharedCriterionErrorEnum { // The criterion is not appropriate for the shared set type. CRITERION_TYPE_NOT_ALLOWED_FOR_SHARED_SET_TYPE = 2; } + + } diff --git a/google/ads/googleads/v1/errors/shared_set_error.proto b/google/ads/googleads/v1/errors/shared_set_error.proto index 530753bfd..8c8f7214c 100644 --- a/google/ads/googleads/v1/errors/shared_set_error.proto +++ b/google/ads/googleads/v1/errors/shared_set_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -52,4 +51,6 @@ message SharedSetErrorEnum { // The shared set cannot be removed because it is in use. SHARED_SET_IN_USE = 5; } + + } diff --git a/google/ads/googleads/v1/errors/size_limit_error.proto b/google/ads/googleads/v1/errors/size_limit_error.proto index bf192be97..5d0bcce80 100644 --- a/google/ads/googleads/v1/errors/size_limit_error.proto +++ b/google/ads/googleads/v1/errors/size_limit_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message SizeLimitErrorEnum { // The number of entries in the response exceeds the system limit. RESPONSE_SIZE_LIMIT_EXCEEDED = 3; } + + } diff --git a/google/ads/googleads/v1/errors/string_format_error.proto b/google/ads/googleads/v1/errors/string_format_error.proto index 1e05d7b72..ef8f0b6b8 100644 --- a/google/ads/googleads/v1/errors/string_format_error.proto +++ b/google/ads/googleads/v1/errors/string_format_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message StringFormatErrorEnum { // The input string value is invalid for the associated field. INVALID_FORMAT = 3; } + + } diff --git a/google/ads/googleads/v1/errors/string_length_error.proto b/google/ads/googleads/v1/errors/string_length_error.proto index fba2e6eae..8f3219693 100644 --- a/google/ads/googleads/v1/errors/string_length_error.proto +++ b/google/ads/googleads/v1/errors/string_length_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message StringLengthErrorEnum { // Too long. TOO_LONG = 3; } + + } diff --git a/google/ads/googleads/v1/errors/url_field_error.proto b/google/ads/googleads/v1/errors/url_field_error.proto index f1d7203d8..84116b9aa 100644 --- a/google/ads/googleads/v1/errors/url_field_error.proto +++ b/google/ads/googleads/v1/errors/url_field_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -211,4 +210,6 @@ message UrlFieldErrorEnum { // Custom parameter value cannot be null. NULL_CUSTOM_PARAMETER_VALUE = 57; } + + } diff --git a/google/ads/googleads/v1/errors/user_list_error.proto b/google/ads/googleads/v1/errors/user_list_error.proto index 7b3acb470..9f3b18881 100644 --- a/google/ads/googleads/v1/errors/user_list_error.proto +++ b/google/ads/googleads/v1/errors/user_list_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -125,4 +124,6 @@ message UserListErrorEnum { // types of lists in its rules. CAN_NOT_MIX_CRM_BASED_IN_LOGICAL_LIST_WITH_OTHER_LISTS = 36; } + + } diff --git a/google/ads/googleads/v1/errors/youtube_video_registration_error.proto b/google/ads/googleads/v1/errors/youtube_video_registration_error.proto index 1f50b2d9f..747780b7e 100644 --- a/google/ads/googleads/v1/errors/youtube_video_registration_error.proto +++ b/google/ads/googleads/v1/errors/youtube_video_registration_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -46,4 +45,6 @@ message YoutubeVideoRegistrationErrorEnum { // Video to be registered is not accessible (e.g. private). VIDEO_NOT_ACCESSIBLE = 3; } + + } diff --git a/google/ads/googleads/v1/googleads_gapic.yaml b/google/ads/googleads/v1/googleads_gapic.yaml new file mode 100644 index 000000000..86047019d --- /dev/null +++ b/google/ads/googleads/v1/googleads_gapic.yaml @@ -0,0 +1,17 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + csharp: + package_name: Google.Ads.GoogleAds.V1.Services + go: + package_name: google.golang.org/google/ads/googleads/v1/services + java: + package_name: com.google.ads.googleads.v1.services + nodejs: + package_name: v1.services + php: + package_name: Google\Ads\Googleads\V1\Services + python: + package_name: google.ads.googleads_v1.gapic.services + ruby: + package_name: Google::Ads::Googleads::V1::Services diff --git a/google/ads/googleads/v1/googleads_grpc_service_config.json b/google/ads/googleads/v1/googleads_grpc_service_config.json new file mode 100644 index 000000000..d3a6a57d0 --- /dev/null +++ b/google/ads/googleads/v1/googleads_grpc_service_config.json @@ -0,0 +1,118 @@ +{ + "methodConfig": [ + { + "name": [ + { "service": "google.ads.googleads.v1.services.AccountBudgetProposalService" }, + { "service": "google.ads.googleads.v1.services.AccountBudgetService" }, + { "service": "google.ads.googleads.v1.services.AdGroupAdLabelService" }, + { "service": "google.ads.googleads.v1.services.AdGroupAdService" }, + { "service": "google.ads.googleads.v1.services.AdGroupAudienceViewService" }, + { "service": "google.ads.googleads.v1.services.AdGroupBidModifierService" }, + { "service": "google.ads.googleads.v1.services.AdGroupCriterionLabelService" }, + { "service": "google.ads.googleads.v1.services.AdGroupCriterionService" }, + { "service": "google.ads.googleads.v1.services.AdGroupCriterionSimulationService" }, + { "service": "google.ads.googleads.v1.services.AdGroupExtensionSettingService" }, + { "service": "google.ads.googleads.v1.services.AdGroupFeedService" }, + { "service": "google.ads.googleads.v1.services.AdGroupLabelService" }, + { "service": "google.ads.googleads.v1.services.AdGroupService" }, + { "service": "google.ads.googleads.v1.services.AdGroupSimulationService" }, + { "service": "google.ads.googleads.v1.services.AdParameterService" }, + { "service": "google.ads.googleads.v1.services.AdScheduleViewService" }, + { "service": "google.ads.googleads.v1.services.AgeRangeViewService" }, + { "service": "google.ads.googleads.v1.services.AssetService" }, + { "service": "google.ads.googleads.v1.services.BiddingStrategyService" }, + { "service": "google.ads.googleads.v1.services.BillingSetupService" }, + { "service": "google.ads.googleads.v1.services.CampaignAudienceViewService" }, + { "service": "google.ads.googleads.v1.services.CampaignBidModifierService" }, + { "service": "google.ads.googleads.v1.services.CampaignBudgetService" }, + { "service": "google.ads.googleads.v1.services.CampaignCriterionService" }, + { "service": "google.ads.googleads.v1.services.CampaignCriterionSimulationService" }, + { "service": "google.ads.googleads.v1.services.CampaignDraftService" }, + { "service": "google.ads.googleads.v1.services.CampaignExperimentService" }, + { "service": "google.ads.googleads.v1.services.CampaignExtensionSettingService" }, + { "service": "google.ads.googleads.v1.services.CampaignFeedService" }, + { "service": "google.ads.googleads.v1.services.CampaignLabelService" }, + { "service": "google.ads.googleads.v1.services.CampaignService" }, + { "service": "google.ads.googleads.v1.services.CampaignSharedSetService" }, + { "service": "google.ads.googleads.v1.services.CarrierConstantService" }, + { "service": "google.ads.googleads.v1.services.ChangeStatusService" }, + { "service": "google.ads.googleads.v1.services.ClickViewService" }, + { "service": "google.ads.googleads.v1.services.ConversionActionService" }, + { "service": "google.ads.googleads.v1.services.ConversionAdjustmentUploadService" }, + { "service": "google.ads.googleads.v1.services.ConversionUploadService" }, + { "service": "google.ads.googleads.v1.services.CustomInterestService" }, + { "service": "google.ads.googleads.v1.services.CustomerClientLinkService" }, + { "service": "google.ads.googleads.v1.services.CustomerClientService" }, + { "service": "google.ads.googleads.v1.services.CustomerExtensionSettingService" }, + { "service": "google.ads.googleads.v1.services.CustomerFeedService" }, + { "service": "google.ads.googleads.v1.services.CustomerLabelService" }, + { "service": "google.ads.googleads.v1.services.CustomerManagerLinkService" }, + { "service": "google.ads.googleads.v1.services.CustomerNegativeCriterionService" }, + { "service": "google.ads.googleads.v1.services.CustomerService" }, + { "service": "google.ads.googleads.v1.services.DetailPlacementViewService" }, + { "service": "google.ads.googleads.v1.services.DisplayKeywordViewService" }, + { "service": "google.ads.googleads.v1.services.DomainCategoryService" }, + { "service": "google.ads.googleads.v1.services.DynamicSearchAdsSearchTermViewService" }, + { "service": "google.ads.googleads.v1.services.ExpandedLandingPageViewService" }, + { "service": "google.ads.googleads.v1.services.ExtensionFeedItemService" }, + { "service": "google.ads.googleads.v1.services.FeedItemService" }, + { "service": "google.ads.googleads.v1.services.FeedItemTargetService" }, + { "service": "google.ads.googleads.v1.services.FeedMappingService" }, + { "service": "google.ads.googleads.v1.services.FeedPlaceholderViewService" }, + { "service": "google.ads.googleads.v1.services.FeedService" }, + { "service": "google.ads.googleads.v1.services.GenderViewService" }, + { "service": "google.ads.googleads.v1.services.GeographicViewService" }, + { "service": "google.ads.googleads.v1.services.GeoTargetConstantService" }, + { "service": "google.ads.googleads.v1.services.GoogleAdsFieldService" }, + { "service": "google.ads.googleads.v1.services.GoogleAdsService" }, + { "service": "google.ads.googleads.v1.services.GroupPlacementViewService" }, + { "service": "google.ads.googleads.v1.services.HotelGroupViewService" }, + { "service": "google.ads.googleads.v1.services.HotelPerformanceViewService" }, + { "service": "google.ads.googleads.v1.services.KeywordPlanAdGroupService" }, + { "service": "google.ads.googleads.v1.services.KeywordPlanCampaignService" }, + { "service": "google.ads.googleads.v1.services.KeywordPlanIdeaService" }, + { "service": "google.ads.googleads.v1.services.KeywordPlanKeywordService" }, + { "service": "google.ads.googleads.v1.services.KeywordPlanNegativeKeywordService" }, + { "service": "google.ads.googleads.v1.services.KeywordPlanService" }, + { "service": "google.ads.googleads.v1.services.KeywordViewService" }, + { "service": "google.ads.googleads.v1.services.LabelService" }, + { "service": "google.ads.googleads.v1.services.LandingPageViewService" }, + { "service": "google.ads.googleads.v1.services.LanguageConstantService" }, + { "service": "google.ads.googleads.v1.services.LocationViewService" }, + { "service": "google.ads.googleads.v1.services.ManagedPlacementViewService" }, + { "service": "google.ads.googleads.v1.services.MediaFileService" }, + { "service": "google.ads.googleads.v1.services.MerchantCenterLinkService" }, + { "service": "google.ads.googleads.v1.services.MobileAppCategoryConstantService" }, + { "service": "google.ads.googleads.v1.services.MobileDeviceConstantService" }, + { "service": "google.ads.googleads.v1.services.MutateJobService" }, + { "service": "google.ads.googleads.v1.services.OperatingSystemVersionConstantService" }, + { "service": "google.ads.googleads.v1.services.PaidOrganicSearchTermViewService" }, + { "service": "google.ads.googleads.v1.services.ParentalStatusViewService" }, + { "service": "google.ads.googleads.v1.services.PaymentsAccountService" }, + { "service": "google.ads.googleads.v1.services.ProductBiddingCategoryConstantService" }, + { "service": "google.ads.googleads.v1.services.ProductGroupViewService" }, + { "service": "google.ads.googleads.v1.services.RecommendationService" }, + { "service": "google.ads.googleads.v1.services.RemarketingActionService" }, + { "service": "google.ads.googleads.v1.services.SearchTermViewService" }, + { "service": "google.ads.googleads.v1.services.SharedCriterionService" }, + { "service": "google.ads.googleads.v1.services.SharedSetService" }, + { "service": "google.ads.googleads.v1.services.ShoppingPerformanceViewService" }, + { "service": "google.ads.googleads.v1.services.TopicConstantService" }, + { "service": "google.ads.googleads.v1.services.TopicViewService" }, + { "service": "google.ads.googleads.v1.services.UserInterestService" }, + { "service": "google.ads.googleads.v1.services.UserListService" }, + { "service": "google.ads.googleads.v1.services.VideoService" } + ], + "timeout": "3600s", + "retryPolicy": { + "initialBackoff": "5s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/ads/googleads/v1/googleads_v1.yaml b/google/ads/googleads/v1/googleads_v1.yaml new file mode 100644 index 000000000..f05885e26 --- /dev/null +++ b/google/ads/googleads/v1/googleads_v1.yaml @@ -0,0 +1,444 @@ +type: google.api.Service +config_version: 3 +name: googleads.googleapis.com +title: Google Ads API + +apis: +- name: google.ads.googleads.v1.services.AccountBudgetProposalService +- name: google.ads.googleads.v1.services.AccountBudgetService +- name: google.ads.googleads.v1.services.AdGroupAdLabelService +- name: google.ads.googleads.v1.services.AdGroupAdService +- name: google.ads.googleads.v1.services.AdGroupAudienceViewService +- name: google.ads.googleads.v1.services.AdGroupBidModifierService +- name: google.ads.googleads.v1.services.AdGroupCriterionLabelService +- name: google.ads.googleads.v1.services.AdGroupCriterionService +- name: google.ads.googleads.v1.services.AdGroupCriterionSimulationService +- name: google.ads.googleads.v1.services.AdGroupExtensionSettingService +- name: google.ads.googleads.v1.services.AdGroupFeedService +- name: google.ads.googleads.v1.services.AdGroupLabelService +- name: google.ads.googleads.v1.services.AdGroupService +- name: google.ads.googleads.v1.services.AdGroupSimulationService +- name: google.ads.googleads.v1.services.AdParameterService +- name: google.ads.googleads.v1.services.AdScheduleViewService +- name: google.ads.googleads.v1.services.AgeRangeViewService +- name: google.ads.googleads.v1.services.AssetService +- name: google.ads.googleads.v1.services.BiddingStrategyService +- name: google.ads.googleads.v1.services.BillingSetupService +- name: google.ads.googleads.v1.services.CampaignAudienceViewService +- name: google.ads.googleads.v1.services.CampaignBidModifierService +- name: google.ads.googleads.v1.services.CampaignBudgetService +- name: google.ads.googleads.v1.services.CampaignCriterionService +- name: google.ads.googleads.v1.services.CampaignCriterionSimulationService +- name: google.ads.googleads.v1.services.CampaignDraftService +- name: google.ads.googleads.v1.services.CampaignExperimentService +- name: google.ads.googleads.v1.services.CampaignExtensionSettingService +- name: google.ads.googleads.v1.services.CampaignFeedService +- name: google.ads.googleads.v1.services.CampaignLabelService +- name: google.ads.googleads.v1.services.CampaignService +- name: google.ads.googleads.v1.services.CampaignSharedSetService +- name: google.ads.googleads.v1.services.CarrierConstantService +- name: google.ads.googleads.v1.services.ChangeStatusService +- name: google.ads.googleads.v1.services.ClickViewService +- name: google.ads.googleads.v1.services.ConversionActionService +- name: google.ads.googleads.v1.services.ConversionAdjustmentUploadService +- name: google.ads.googleads.v1.services.ConversionUploadService +- name: google.ads.googleads.v1.services.CustomInterestService +- name: google.ads.googleads.v1.services.CustomerClientLinkService +- name: google.ads.googleads.v1.services.CustomerClientService +- name: google.ads.googleads.v1.services.CustomerExtensionSettingService +- name: google.ads.googleads.v1.services.CustomerFeedService +- name: google.ads.googleads.v1.services.CustomerLabelService +- name: google.ads.googleads.v1.services.CustomerManagerLinkService +- name: google.ads.googleads.v1.services.CustomerNegativeCriterionService +- name: google.ads.googleads.v1.services.CustomerService +- name: google.ads.googleads.v1.services.DetailPlacementViewService +- name: google.ads.googleads.v1.services.DisplayKeywordViewService +- name: google.ads.googleads.v1.services.DomainCategoryService +- name: google.ads.googleads.v1.services.DynamicSearchAdsSearchTermViewService +- name: google.ads.googleads.v1.services.ExpandedLandingPageViewService +- name: google.ads.googleads.v1.services.ExtensionFeedItemService +- name: google.ads.googleads.v1.services.FeedItemService +- name: google.ads.googleads.v1.services.FeedItemTargetService +- name: google.ads.googleads.v1.services.FeedMappingService +- name: google.ads.googleads.v1.services.FeedPlaceholderViewService +- name: google.ads.googleads.v1.services.FeedService +- name: google.ads.googleads.v1.services.GenderViewService +- name: google.ads.googleads.v1.services.GeoTargetConstantService +- name: google.ads.googleads.v1.services.GeographicViewService +- name: google.ads.googleads.v1.services.GoogleAdsFieldService +- name: google.ads.googleads.v1.services.GoogleAdsService +- name: google.ads.googleads.v1.services.GroupPlacementViewService +- name: google.ads.googleads.v1.services.HotelGroupViewService +- name: google.ads.googleads.v1.services.HotelPerformanceViewService +- name: google.ads.googleads.v1.services.KeywordPlanAdGroupService +- name: google.ads.googleads.v1.services.KeywordPlanCampaignService +- name: google.ads.googleads.v1.services.KeywordPlanIdeaService +- name: google.ads.googleads.v1.services.KeywordPlanKeywordService +- name: google.ads.googleads.v1.services.KeywordPlanNegativeKeywordService +- name: google.ads.googleads.v1.services.KeywordPlanService +- name: google.ads.googleads.v1.services.KeywordViewService +- name: google.ads.googleads.v1.services.LabelService +- name: google.ads.googleads.v1.services.LandingPageViewService +- name: google.ads.googleads.v1.services.LanguageConstantService +- name: google.ads.googleads.v1.services.LocationViewService +- name: google.ads.googleads.v1.services.ManagedPlacementViewService +- name: google.ads.googleads.v1.services.MediaFileService +- name: google.ads.googleads.v1.services.MerchantCenterLinkService +- name: google.ads.googleads.v1.services.MobileAppCategoryConstantService +- name: google.ads.googleads.v1.services.MobileDeviceConstantService +- name: google.ads.googleads.v1.services.MutateJobService +- name: google.ads.googleads.v1.services.OperatingSystemVersionConstantService +- name: google.ads.googleads.v1.services.PaidOrganicSearchTermViewService +- name: google.ads.googleads.v1.services.ParentalStatusViewService +- name: google.ads.googleads.v1.services.PaymentsAccountService +- name: google.ads.googleads.v1.services.ProductBiddingCategoryConstantService +- name: google.ads.googleads.v1.services.ProductGroupViewService +- name: google.ads.googleads.v1.services.RecommendationService +- name: google.ads.googleads.v1.services.RemarketingActionService +- name: google.ads.googleads.v1.services.SearchTermViewService +- name: google.ads.googleads.v1.services.SharedCriterionService +- name: google.ads.googleads.v1.services.SharedSetService +- name: google.ads.googleads.v1.services.ShoppingPerformanceViewService +- name: google.ads.googleads.v1.services.TopicConstantService +- name: google.ads.googleads.v1.services.TopicViewService +- name: google.ads.googleads.v1.services.UserInterestService +- name: google.ads.googleads.v1.services.UserListService +- name: google.ads.googleads.v1.services.VideoService + +types: +- name: google.ads.googleads.v1.errors.GoogleAdsFailure +- name: google.ads.googleads.v1.resources.MutateJob.MutateJobMetadata +- name: google.ads.googleads.v1.services.CreateCampaignExperimentMetadata + +documentation: + summary: |- + Manage your AdWords accounts, campaigns, and reports with this REST-based + API. + overview: |- + # This warning always fires when the last path segment of packages is not + + # the version + +backend: + rules: + - selector: google.ads.googleads.v1.services.AccountBudgetProposalService.GetAccountBudgetProposal + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AccountBudgetProposalService.MutateAccountBudgetProposal + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AccountBudgetService.GetAccountBudget + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupAdLabelService.GetAdGroupAdLabel + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupAdLabelService.MutateAdGroupAdLabels + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupAdService.GetAdGroupAd + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupAdService.MutateAdGroupAds + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupAudienceViewService.GetAdGroupAudienceView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupBidModifierService.GetAdGroupBidModifier + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupBidModifierService.MutateAdGroupBidModifiers + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupCriterionLabelService.GetAdGroupCriterionLabel + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupCriterionLabelService.MutateAdGroupCriterionLabels + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupCriterionService.GetAdGroupCriterion + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupCriterionService.MutateAdGroupCriteria + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupCriterionSimulationService.GetAdGroupCriterionSimulation + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupExtensionSettingService.GetAdGroupExtensionSetting + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupExtensionSettingService.MutateAdGroupExtensionSettings + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupFeedService.GetAdGroupFeed + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupFeedService.MutateAdGroupFeeds + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupLabelService.GetAdGroupLabel + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupLabelService.MutateAdGroupLabels + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupService.GetAdGroup + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupService.MutateAdGroups + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdGroupSimulationService.GetAdGroupSimulation + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdParameterService.GetAdParameter + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdParameterService.MutateAdParameters + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AdScheduleViewService.GetAdScheduleView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AgeRangeViewService.GetAgeRangeView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AssetService.GetAsset + deadline: 60.0 + - selector: google.ads.googleads.v1.services.AssetService.MutateAssets + deadline: 60.0 + - selector: google.ads.googleads.v1.services.BiddingStrategyService.GetBiddingStrategy + deadline: 60.0 + - selector: google.ads.googleads.v1.services.BiddingStrategyService.MutateBiddingStrategies + deadline: 60.0 + - selector: google.ads.googleads.v1.services.BillingSetupService.GetBillingSetup + deadline: 60.0 + - selector: google.ads.googleads.v1.services.BillingSetupService.MutateBillingSetup + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignAudienceViewService.GetCampaignAudienceView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignBidModifierService.GetCampaignBidModifier + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignBidModifierService.MutateCampaignBidModifiers + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignBudgetService.GetCampaignBudget + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignBudgetService.MutateCampaignBudgets + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignCriterionService.GetCampaignCriterion + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignCriterionService.MutateCampaignCriteria + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignCriterionSimulationService.GetCampaignCriterionSimulation + deadline: 60.0 + - selector: 'google.ads.googleads.v1.services.CampaignDraftService.*' + deadline: 60.0 + - selector: 'google.ads.googleads.v1.services.CampaignExperimentService.*' + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignExtensionSettingService.GetCampaignExtensionSetting + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignExtensionSettingService.MutateCampaignExtensionSettings + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignFeedService.GetCampaignFeed + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignFeedService.MutateCampaignFeeds + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignLabelService.GetCampaignLabel + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignLabelService.MutateCampaignLabels + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignService.GetCampaign + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignService.MutateCampaigns + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignSharedSetService.GetCampaignSharedSet + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CampaignSharedSetService.MutateCampaignSharedSets + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CarrierConstantService.GetCarrierConstant + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ChangeStatusService.GetChangeStatus + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ClickViewService.GetClickView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ConversionActionService.GetConversionAction + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ConversionActionService.MutateConversionActions + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ConversionAdjustmentUploadService.UploadConversionAdjustments + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ConversionUploadService.UploadCallConversions + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ConversionUploadService.UploadClickConversions + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomInterestService.GetCustomInterest + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomInterestService.MutateCustomInterests + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomerClientLinkService.GetCustomerClientLink + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomerClientLinkService.MutateCustomerClientLink + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomerClientService.GetCustomerClient + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomerExtensionSettingService.GetCustomerExtensionSetting + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomerExtensionSettingService.MutateCustomerExtensionSettings + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomerFeedService.GetCustomerFeed + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomerFeedService.MutateCustomerFeeds + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomerLabelService.GetCustomerLabel + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomerLabelService.MutateCustomerLabels + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomerManagerLinkService.GetCustomerManagerLink + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomerManagerLinkService.MutateCustomerManagerLink + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomerNegativeCriterionService.GetCustomerNegativeCriterion + deadline: 60.0 + - selector: google.ads.googleads.v1.services.CustomerNegativeCriterionService.MutateCustomerNegativeCriteria + deadline: 60.0 + - selector: 'google.ads.googleads.v1.services.CustomerService.*' + deadline: 60.0 + - selector: google.ads.googleads.v1.services.DetailPlacementViewService.GetDetailPlacementView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.DisplayKeywordViewService.GetDisplayKeywordView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.DomainCategoryService.GetDomainCategory + deadline: 60.0 + - selector: google.ads.googleads.v1.services.DynamicSearchAdsSearchTermViewService.GetDynamicSearchAdsSearchTermView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ExpandedLandingPageViewService.GetExpandedLandingPageView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ExtensionFeedItemService.GetExtensionFeedItem + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ExtensionFeedItemService.MutateExtensionFeedItems + deadline: 60.0 + - selector: google.ads.googleads.v1.services.FeedItemService.GetFeedItem + deadline: 60.0 + - selector: google.ads.googleads.v1.services.FeedItemService.MutateFeedItems + deadline: 60.0 + - selector: google.ads.googleads.v1.services.FeedItemTargetService.GetFeedItemTarget + deadline: 60.0 + - selector: google.ads.googleads.v1.services.FeedItemTargetService.MutateFeedItemTargets + deadline: 60.0 + - selector: google.ads.googleads.v1.services.FeedMappingService.GetFeedMapping + deadline: 60.0 + - selector: google.ads.googleads.v1.services.FeedMappingService.MutateFeedMappings + deadline: 60.0 + - selector: google.ads.googleads.v1.services.FeedPlaceholderViewService.GetFeedPlaceholderView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.FeedService.GetFeed + deadline: 60.0 + - selector: google.ads.googleads.v1.services.FeedService.MutateFeeds + deadline: 60.0 + - selector: google.ads.googleads.v1.services.GenderViewService.GetGenderView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.GeoTargetConstantService.GetGeoTargetConstant + deadline: 60.0 + - selector: google.ads.googleads.v1.services.GeoTargetConstantService.SuggestGeoTargetConstants + deadline: 60.0 + - selector: google.ads.googleads.v1.services.GeographicViewService.GetGeographicView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.GoogleAdsFieldService.GetGoogleAdsField + deadline: 600.0 + - selector: google.ads.googleads.v1.services.GoogleAdsFieldService.SearchGoogleAdsFields + deadline: 600.0 + - selector: google.ads.googleads.v1.services.GoogleAdsService.Mutate + deadline: 600.0 + - selector: google.ads.googleads.v1.services.GoogleAdsService.Search + deadline: 3600.0 + - selector: google.ads.googleads.v1.services.GroupPlacementViewService.GetGroupPlacementView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.HotelGroupViewService.GetHotelGroupView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.HotelPerformanceViewService.GetHotelPerformanceView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.KeywordPlanAdGroupService.GetKeywordPlanAdGroup + deadline: 60.0 + - selector: google.ads.googleads.v1.services.KeywordPlanAdGroupService.MutateKeywordPlanAdGroups + deadline: 60.0 + - selector: google.ads.googleads.v1.services.KeywordPlanCampaignService.GetKeywordPlanCampaign + deadline: 60.0 + - selector: google.ads.googleads.v1.services.KeywordPlanCampaignService.MutateKeywordPlanCampaigns + deadline: 60.0 + - selector: google.ads.googleads.v1.services.KeywordPlanIdeaService.GenerateKeywordIdeas + deadline: 600.0 + - selector: google.ads.googleads.v1.services.KeywordPlanKeywordService.GetKeywordPlanKeyword + deadline: 60.0 + - selector: google.ads.googleads.v1.services.KeywordPlanKeywordService.MutateKeywordPlanKeywords + deadline: 60.0 + - selector: google.ads.googleads.v1.services.KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword + deadline: 60.0 + - selector: google.ads.googleads.v1.services.KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords + deadline: 60.0 + - selector: google.ads.googleads.v1.services.KeywordPlanService.GenerateForecastMetrics + deadline: 600.0 + - selector: google.ads.googleads.v1.services.KeywordPlanService.GenerateHistoricalMetrics + deadline: 600.0 + - selector: google.ads.googleads.v1.services.KeywordPlanService.GetKeywordPlan + deadline: 60.0 + - selector: google.ads.googleads.v1.services.KeywordPlanService.MutateKeywordPlans + deadline: 60.0 + - selector: google.ads.googleads.v1.services.KeywordViewService.GetKeywordView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.LabelService.GetLabel + deadline: 60.0 + - selector: google.ads.googleads.v1.services.LabelService.MutateLabels + deadline: 60.0 + - selector: google.ads.googleads.v1.services.LandingPageViewService.GetLandingPageView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.LanguageConstantService.GetLanguageConstant + deadline: 60.0 + - selector: google.ads.googleads.v1.services.LocationViewService.GetLocationView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ManagedPlacementViewService.GetManagedPlacementView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.MediaFileService.GetMediaFile + deadline: 60.0 + - selector: google.ads.googleads.v1.services.MediaFileService.MutateMediaFiles + deadline: 60.0 + - selector: 'google.ads.googleads.v1.services.MerchantCenterLinkService.*' + deadline: 60.0 + - selector: google.ads.googleads.v1.services.MobileAppCategoryConstantService.GetMobileAppCategoryConstant + deadline: 60.0 + - selector: google.ads.googleads.v1.services.MobileDeviceConstantService.GetMobileDeviceConstant + deadline: 60.0 + - selector: 'google.ads.googleads.v1.services.MutateJobService.*' + deadline: 60.0 + - selector: google.ads.googleads.v1.services.OperatingSystemVersionConstantService.GetOperatingSystemVersionConstant + deadline: 60.0 + - selector: google.ads.googleads.v1.services.PaidOrganicSearchTermViewService.GetPaidOrganicSearchTermView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ParentalStatusViewService.GetParentalStatusView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.PaymentsAccountService.ListPaymentsAccounts + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ProductBiddingCategoryConstantService.GetProductBiddingCategoryConstant + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ProductGroupViewService.GetProductGroupView + deadline: 60.0 + - selector: 'google.ads.googleads.v1.services.RecommendationService.*' + deadline: 600.0 + - selector: google.ads.googleads.v1.services.RemarketingActionService.GetRemarketingAction + deadline: 60.0 + - selector: google.ads.googleads.v1.services.RemarketingActionService.MutateRemarketingActions + deadline: 60.0 + - selector: google.ads.googleads.v1.services.SearchTermViewService.GetSearchTermView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.SharedCriterionService.GetSharedCriterion + deadline: 60.0 + - selector: google.ads.googleads.v1.services.SharedCriterionService.MutateSharedCriteria + deadline: 60.0 + - selector: google.ads.googleads.v1.services.SharedSetService.GetSharedSet + deadline: 60.0 + - selector: google.ads.googleads.v1.services.SharedSetService.MutateSharedSets + deadline: 60.0 + - selector: google.ads.googleads.v1.services.ShoppingPerformanceViewService.GetShoppingPerformanceView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.TopicConstantService.GetTopicConstant + deadline: 60.0 + - selector: google.ads.googleads.v1.services.TopicViewService.GetTopicView + deadline: 60.0 + - selector: google.ads.googleads.v1.services.UserInterestService.GetUserInterest + deadline: 60.0 + - selector: google.ads.googleads.v1.services.UserListService.GetUserList + deadline: 60.0 + - selector: google.ads.googleads.v1.services.UserListService.MutateUserLists + deadline: 60.0 + - selector: google.ads.googleads.v1.services.VideoService.GetVideo + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + +http: + rules: + - selector: google.longrunning.Operations.CancelOperation + post: '/v1/{name=customers/*/operations/*}:cancel' + body: '*' + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=customers/*/operations/*}' + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=customers/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=customers/*/operations}' + - selector: google.longrunning.Operations.WaitOperation + post: '/v1/{name=customers/*/operations/*}:wait' + body: '*' diff --git a/google/ads/googleads/v1/resources/account_budget.proto b/google/ads/googleads/v1/resources/account_budget.proto index 55125e2d0..9ea08f6f2 100644 --- a/google/ads/googleads/v1/resources/account_budget.proto +++ b/google/ads/googleads/v1/resources/account_budget.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -21,8 +20,10 @@ import "google/ads/googleads/v1/enums/account_budget_proposal_type.proto"; import "google/ads/googleads/v1/enums/account_budget_status.proto"; import "google/ads/googleads/v1/enums/spending_limit_type.proto"; import "google/ads/googleads/v1/enums/time_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -52,122 +53,137 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // adjustments. Adjustments create differences between the 'approved' and // 'adjusted' fields, which would otherwise be identical. message AccountBudget { + option (google.api.resource) = { + type: "googleads.googleapis.com/AccountBudget" + pattern: "customers/{customer}/accountBudgets/{account_budget}" + }; + // A pending proposal associated with the enclosing account-level budget, // if applicable. message PendingAccountBudgetProposal { - // The resource name of the proposal. + // Output only. The resource name of the proposal. // AccountBudgetProposal resource names have the form: // - // // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}` - google.protobuf.StringValue account_budget_proposal = 1; - - // The type of this proposal, e.g. END to end the budget associated + google.protobuf.StringValue account_budget_proposal = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudgetProposal" + } + ]; + + // Output only. The type of this proposal, e.g. END to end the budget associated // with this proposal. - google.ads.googleads.v1.enums.AccountBudgetProposalTypeEnum - .AccountBudgetProposalType proposal_type = 2; + google.ads.googleads.v1.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name to assign to the account-level budget. - google.protobuf.StringValue name = 3; + // Output only. The name to assign to the account-level budget. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The start time in yyyy-MM-dd HH:mm:ss format. - google.protobuf.StringValue start_date_time = 4; + // Output only. The start time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue start_date_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A purchase order number is a value that helps users reference this budget + // Output only. A purchase order number is a value that helps users reference this budget // in their monthly invoices. - google.protobuf.StringValue purchase_order_number = 9; + google.protobuf.StringValue purchase_order_number = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Notes associated with this budget. - google.protobuf.StringValue notes = 10; + // Output only. Notes associated with this budget. + google.protobuf.StringValue notes = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The time when this account-level budget proposal was created. + // Output only. The time when this account-level budget proposal was created. // Formatted as yyyy-MM-dd HH:mm:ss. - google.protobuf.StringValue creation_date_time = 11; + google.protobuf.StringValue creation_date_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; // The end time of the account-level budget. oneof end_time { - // The end time in yyyy-MM-dd HH:mm:ss format. - google.protobuf.StringValue end_date_time = 5; + // Output only. The end time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue end_date_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The end time as a well-defined type, e.g. FOREVER. - google.ads.googleads.v1.enums.TimeTypeEnum.TimeType end_time_type = 6; + // Output only. The end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v1.enums.TimeTypeEnum.TimeType end_time_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The spending limit. oneof spending_limit { - // The spending limit in micros. One million is equivalent to + // Output only. The spending limit in micros. One million is equivalent to // one unit. - google.protobuf.Int64Value spending_limit_micros = 7; + google.protobuf.Int64Value spending_limit_micros = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The spending limit as a well-defined type, e.g. INFINITE. - google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType - spending_limit_type = 8; + // Output only. The spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType spending_limit_type = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } } - // The resource name of the account-level budget. + // Output only. The resource name of the account-level budget. // AccountBudget resource names have the form: // // `customers/{customer_id}/accountBudgets/{account_budget_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudget" + } + ]; - // The ID of the account-level budget. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the account-level budget. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource name of the billing setup associated with this account-level + // Output only. The resource name of the billing setup associated with this account-level // budget. BillingSetup resource names have the form: // // `customers/{customer_id}/billingSetups/{billing_setup_id}` - google.protobuf.StringValue billing_setup = 3; + google.protobuf.StringValue billing_setup = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BillingSetup" + } + ]; - // The status of this account-level budget. - google.ads.googleads.v1.enums.AccountBudgetStatusEnum.AccountBudgetStatus - status = 4; + // Output only. The status of this account-level budget. + google.ads.googleads.v1.enums.AccountBudgetStatusEnum.AccountBudgetStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name of the account-level budget. - google.protobuf.StringValue name = 5; + // Output only. The name of the account-level budget. + google.protobuf.StringValue name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The proposed start time of the account-level budget in + // Output only. The proposed start time of the account-level budget in // yyyy-MM-dd HH:mm:ss format. If a start time type of NOW was proposed, // this is the time of request. - google.protobuf.StringValue proposed_start_date_time = 6; + google.protobuf.StringValue proposed_start_date_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The approved start time of the account-level budget in yyyy-MM-dd HH:mm:ss + // Output only. The approved start time of the account-level budget in yyyy-MM-dd HH:mm:ss // format. // // For example, if a new budget is approved after the proposed start time, // the approved start time is the time of approval. - google.protobuf.StringValue approved_start_date_time = 7; + google.protobuf.StringValue approved_start_date_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The total adjustments amount. + // Output only. The total adjustments amount. // // An example of an adjustment is courtesy credits. - google.protobuf.Int64Value total_adjustments_micros = 18; + google.protobuf.Int64Value total_adjustments_micros = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The value of Ads that have been served, in micros. + // Output only. The value of Ads that have been served, in micros. // // This includes overdelivery costs, in which case a credit might be // automatically applied to the budget (see total_adjustments_micros). - google.protobuf.Int64Value amount_served_micros = 19; + google.protobuf.Int64Value amount_served_micros = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A purchase order number is a value that helps users reference this budget + // Output only. A purchase order number is a value that helps users reference this budget // in their monthly invoices. - google.protobuf.StringValue purchase_order_number = 20; + google.protobuf.StringValue purchase_order_number = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Notes associated with the budget. - google.protobuf.StringValue notes = 21; + // Output only. Notes associated with the budget. + google.protobuf.StringValue notes = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The pending proposal to modify this budget, if applicable. - PendingAccountBudgetProposal pending_proposal = 22; + // Output only. The pending proposal to modify this budget, if applicable. + PendingAccountBudgetProposal pending_proposal = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; // The proposed end time of the account-level budget. oneof proposed_end_time { - // The proposed end time in yyyy-MM-dd HH:mm:ss format. - google.protobuf.StringValue proposed_end_date_time = 8; + // Output only. The proposed end time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue proposed_end_date_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The proposed end time as a well-defined type, e.g. FOREVER. - google.ads.googleads.v1.enums.TimeTypeEnum.TimeType proposed_end_time_type = - 9; + // Output only. The proposed end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v1.enums.TimeTypeEnum.TimeType proposed_end_time_type = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The approved end time of the account-level budget. @@ -175,23 +191,21 @@ message AccountBudget { // For example, if a budget's end time is updated and the proposal is approved // after the proposed end time, the approved end time is the time of approval. oneof approved_end_time { - // The approved end time in yyyy-MM-dd HH:mm:ss format. - google.protobuf.StringValue approved_end_date_time = 10; + // Output only. The approved end time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue approved_end_date_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The approved end time as a well-defined type, e.g. FOREVER. - google.ads.googleads.v1.enums.TimeTypeEnum.TimeType approved_end_time_type = - 11; + // Output only. The approved end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v1.enums.TimeTypeEnum.TimeType approved_end_time_type = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The proposed spending limit. oneof proposed_spending_limit { - // The proposed spending limit in micros. One million is equivalent to + // Output only. The proposed spending limit in micros. One million is equivalent to // one unit. - google.protobuf.Int64Value proposed_spending_limit_micros = 12; + google.protobuf.Int64Value proposed_spending_limit_micros = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The proposed spending limit as a well-defined type, e.g. INFINITE. - google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType - proposed_spending_limit_type = 13; + // Output only. The proposed spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType proposed_spending_limit_type = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The approved spending limit. @@ -200,16 +214,15 @@ message AccountBudget { // proposed spending limit at the time the proposal is approved, the approved // spending limit is set to the amount already spent. oneof approved_spending_limit { - // The approved spending limit in micros. One million is equivalent to + // Output only. The approved spending limit in micros. One million is equivalent to // one unit. This will only be populated if the proposed spending limit // is finite, and will always be greater than or equal to the // proposed spending limit. - google.protobuf.Int64Value approved_spending_limit_micros = 14; + google.protobuf.Int64Value approved_spending_limit_micros = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The approved spending limit as a well-defined type, e.g. INFINITE. This + // Output only. The approved spending limit as a well-defined type, e.g. INFINITE. This // will only be populated if the approved spending limit is INFINITE. - google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType - approved_spending_limit_type = 15; + google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType approved_spending_limit_type = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The spending limit after adjustments have been applied. Adjustments are @@ -217,7 +230,7 @@ message AccountBudget { // // This value has the final say on how much the account is allowed to spend. oneof adjusted_spending_limit { - // The adjusted spending limit in micros. One million is equivalent to + // Output only. The adjusted spending limit in micros. One million is equivalent to // one unit. // // If the approved spending limit is finite, the adjusted @@ -229,13 +242,12 @@ message AccountBudget { // // For example, a debit adjustment reduces how much the account is // allowed to spend. - google.protobuf.Int64Value adjusted_spending_limit_micros = 16; + google.protobuf.Int64Value adjusted_spending_limit_micros = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The adjusted spending limit as a well-defined type, e.g. INFINITE. + // Output only. The adjusted spending limit as a well-defined type, e.g. INFINITE. // This will only be populated if the adjusted spending limit is INFINITE, // which is guaranteed to be true if the approved spending limit is // INFINITE. - google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType - adjusted_spending_limit_type = 17; + google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType adjusted_spending_limit_type = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v1/resources/account_budget_proposal.proto b/google/ads/googleads/v1/resources/account_budget_proposal.proto index 00a9f4265..3fbfd50ff 100644 --- a/google/ads/googleads/v1/resources/account_budget_proposal.proto +++ b/google/ads/googleads/v1/resources/account_budget_proposal.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -21,8 +20,10 @@ import "google/ads/googleads/v1/enums/account_budget_proposal_status.proto"; import "google/ads/googleads/v1/enums/account_budget_proposal_type.proto"; import "google/ads/googleads/v1/enums/spending_limit_type.proto"; import "google/ads/googleads/v1/enums/time_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -45,104 +46,116 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // Please note that the proposal type (proposal_type) changes which fields are // required and which must remain empty. message AccountBudgetProposal { - // The resource name of the proposal. + option (google.api.resource) = { + type: "googleads.googleapis.com/AccountBudgetProposal" + pattern: "customers/{customer}/accountBudgetProposals/{account_budget_proposal}" + }; + + // Immutable. The resource name of the proposal. // AccountBudgetProposal resource names have the form: // - // // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}` - string resource_name = 1; - - // The ID of the proposal. - google.protobuf.Int64Value id = 14; - - // The resource name of the billing setup associated with this proposal. - google.protobuf.StringValue billing_setup = 2; - - // The resource name of the account-level budget associated with this + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudgetProposal" + } + ]; + + // Output only. The ID of the proposal. + google.protobuf.Int64Value id = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The resource name of the billing setup associated with this proposal. + google.protobuf.StringValue billing_setup = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BillingSetup" + } + ]; + + // Immutable. The resource name of the account-level budget associated with this // proposal. - google.protobuf.StringValue account_budget = 3; - - // The type of this proposal, e.g. END to end the budget associated with this + google.protobuf.StringValue account_budget = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudget" + } + ]; + + // Immutable. The type of this proposal, e.g. END to end the budget associated with this // proposal. - google.ads.googleads.v1.enums.AccountBudgetProposalTypeEnum - .AccountBudgetProposalType proposal_type = 4; + google.ads.googleads.v1.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 4 [(google.api.field_behavior) = IMMUTABLE]; - // The status of this proposal. + // Output only. The status of this proposal. // When a new proposal is created, the status defaults to PENDING. - google.ads.googleads.v1.enums.AccountBudgetProposalStatusEnum - .AccountBudgetProposalStatus status = 15; + google.ads.googleads.v1.enums.AccountBudgetProposalStatusEnum.AccountBudgetProposalStatus status = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name to assign to the account-level budget. - google.protobuf.StringValue proposed_name = 5; + // Immutable. The name to assign to the account-level budget. + google.protobuf.StringValue proposed_name = 5 [(google.api.field_behavior) = IMMUTABLE]; - // The approved start date time in yyyy-mm-dd hh:mm:ss format. - google.protobuf.StringValue approved_start_date_time = 20; + // Output only. The approved start date time in yyyy-mm-dd hh:mm:ss format. + google.protobuf.StringValue approved_start_date_time = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A purchase order number is a value that enables the user to help them + // Immutable. A purchase order number is a value that enables the user to help them // reference this budget in their monthly invoices. - google.protobuf.StringValue proposed_purchase_order_number = 12; + google.protobuf.StringValue proposed_purchase_order_number = 12 [(google.api.field_behavior) = IMMUTABLE]; - // Notes associated with this budget. - google.protobuf.StringValue proposed_notes = 13; + // Immutable. Notes associated with this budget. + google.protobuf.StringValue proposed_notes = 13 [(google.api.field_behavior) = IMMUTABLE]; - // The date time when this account-level budget proposal was created, which is + // Output only. The date time when this account-level budget proposal was created, which is // not the same as its approval date time, if applicable. - google.protobuf.StringValue creation_date_time = 16; + google.protobuf.StringValue creation_date_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The date time when this account-level budget was approved, if applicable. - google.protobuf.StringValue approval_date_time = 17; + // Output only. The date time when this account-level budget was approved, if applicable. + google.protobuf.StringValue approval_date_time = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; // The proposed start date time of the account-level budget, which cannot be // in the past. oneof proposed_start_time { - // The proposed start date time in yyyy-mm-dd hh:mm:ss format. - google.protobuf.StringValue proposed_start_date_time = 18; + // Immutable. The proposed start date time in yyyy-mm-dd hh:mm:ss format. + google.protobuf.StringValue proposed_start_date_time = 18 [(google.api.field_behavior) = IMMUTABLE]; - // The proposed start date time as a well-defined type, e.g. NOW. - google.ads.googleads.v1.enums.TimeTypeEnum.TimeType - proposed_start_time_type = 7; + // Immutable. The proposed start date time as a well-defined type, e.g. NOW. + google.ads.googleads.v1.enums.TimeTypeEnum.TimeType proposed_start_time_type = 7 [(google.api.field_behavior) = IMMUTABLE]; } // The proposed end date time of the account-level budget, which cannot be in // the past. oneof proposed_end_time { - // The proposed end date time in yyyy-mm-dd hh:mm:ss format. - google.protobuf.StringValue proposed_end_date_time = 19; + // Immutable. The proposed end date time in yyyy-mm-dd hh:mm:ss format. + google.protobuf.StringValue proposed_end_date_time = 19 [(google.api.field_behavior) = IMMUTABLE]; - // The proposed end date time as a well-defined type, e.g. FOREVER. - google.ads.googleads.v1.enums.TimeTypeEnum.TimeType proposed_end_time_type = - 9; + // Immutable. The proposed end date time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v1.enums.TimeTypeEnum.TimeType proposed_end_time_type = 9 [(google.api.field_behavior) = IMMUTABLE]; } // The approved end date time of the account-level budget. oneof approved_end_time { - // The approved end date time in yyyy-mm-dd hh:mm:ss format. - google.protobuf.StringValue approved_end_date_time = 21; + // Output only. The approved end date time in yyyy-mm-dd hh:mm:ss format. + google.protobuf.StringValue approved_end_date_time = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The approved end date time as a well-defined type, e.g. FOREVER. - google.ads.googleads.v1.enums.TimeTypeEnum.TimeType approved_end_time_type = - 22; + // Output only. The approved end date time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v1.enums.TimeTypeEnum.TimeType approved_end_time_type = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The proposed spending limit. oneof proposed_spending_limit { - // The proposed spending limit in micros. One million is equivalent to + // Immutable. The proposed spending limit in micros. One million is equivalent to // one unit. - google.protobuf.Int64Value proposed_spending_limit_micros = 10; + google.protobuf.Int64Value proposed_spending_limit_micros = 10 [(google.api.field_behavior) = IMMUTABLE]; - // The proposed spending limit as a well-defined type, e.g. INFINITE. - google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType - proposed_spending_limit_type = 11; + // Immutable. The proposed spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType proposed_spending_limit_type = 11 [(google.api.field_behavior) = IMMUTABLE]; } // The approved spending limit. oneof approved_spending_limit { - // The approved spending limit in micros. One million is equivalent to + // Output only. The approved spending limit in micros. One million is equivalent to // one unit. - google.protobuf.Int64Value approved_spending_limit_micros = 23; + google.protobuf.Int64Value approved_spending_limit_micros = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The approved spending limit as a well-defined type, e.g. INFINITE. - google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType - approved_spending_limit_type = 24; + // Output only. The approved spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType approved_spending_limit_type = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v1/resources/ad.proto b/google/ads/googleads/v1/resources/ad.proto index d89cd11e8..8a54706d7 100644 --- a/google/ads/googleads/v1/resources/ad.proto +++ b/google/ads/googleads/v1/resources/ad.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -24,8 +23,9 @@ import "google/ads/googleads/v1/common/url_collection.proto"; import "google/ads/googleads/v1/enums/ad_type.proto"; import "google/ads/googleads/v1/enums/device.proto"; import "google/ads/googleads/v1/enums/system_managed_entity_source.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -40,8 +40,8 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // An ad. message Ad { - // The ID of the ad. - google.protobuf.Int64Value id = 1; + // Output only. The ID of the ad. + google.protobuf.Int64Value id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // The list of possible final URLs after all cross-domain redirects for the // ad. @@ -60,20 +60,19 @@ message Ad { // The list of mappings that can be used to substitute custom parameter tags // in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`. - repeated google.ads.googleads.v1.common.CustomParameter - url_custom_parameters = 10; + repeated google.ads.googleads.v1.common.CustomParameter url_custom_parameters = 10; // The URL that appears in the ad description for some ad formats. google.protobuf.StringValue display_url = 4; - // The type of ad. - google.ads.googleads.v1.enums.AdTypeEnum.AdType type = 5; + // Output only. The type of ad. + google.ads.googleads.v1.enums.AdTypeEnum.AdType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Indicates if this ad was automatically added by Google Ads and not by a + // Output only. Indicates if this ad was automatically added by Google Ads and not by a // user. For example, this could happen when ads are automatically created as // suggestions for new ads based on knowledge of how existing ads are // performing. - google.protobuf.BoolValue added_by_google_ads = 19; + google.protobuf.BoolValue added_by_google_ads = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; // The device preference for the ad. You can only specify a preference for // mobile devices. When this preference is set the ad will be preferred over @@ -87,14 +86,13 @@ message Ad { // can be referenced from other fields in the ad. repeated google.ads.googleads.v1.common.UrlCollection url_collections = 26; - // The name of the ad. This is only used to be able to identify the ad. It + // Immutable. The name of the ad. This is only used to be able to identify the ad. It // does not need to be unique and does not affect the served ad. - google.protobuf.StringValue name = 23; + google.protobuf.StringValue name = 23 [(google.api.field_behavior) = IMMUTABLE]; - // If this ad is system managed, then this field will indicate the source. + // Output only. If this ad is system managed, then this field will indicate the source. // This field is read-only. - google.ads.googleads.v1.enums.SystemManagedResourceSourceEnum - .SystemManagedResourceSource system_managed_resource_source = 27; + google.ads.googleads.v1.enums.SystemManagedResourceSourceEnum.SystemManagedResourceSource system_managed_resource_source = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; // Details pertinent to the ad type. Exactly one value must be set. oneof ad_data { @@ -112,8 +110,7 @@ message Ad { // auto-generated at serving time according to domain name specific // information provided by `dynamic_search_ads_setting` linked at the // campaign level. - google.ads.googleads.v1.common.ExpandedDynamicSearchAdInfo - expanded_dynamic_search_ad = 14; + google.ads.googleads.v1.common.ExpandedDynamicSearchAdInfo expanded_dynamic_search_ad = 14; // Details pertaining to a hotel ad. google.ads.googleads.v1.common.HotelAdInfo hotel_ad = 15; @@ -122,8 +119,7 @@ message Ad { google.ads.googleads.v1.common.ShoppingSmartAdInfo shopping_smart_ad = 17; // Details pertaining to a Shopping product ad. - google.ads.googleads.v1.common.ShoppingProductAdInfo shopping_product_ad = - 18; + google.ads.googleads.v1.common.ShoppingProductAdInfo shopping_product_ad = 18; // Details pertaining to a Gmail ad. google.ads.googleads.v1.common.GmailAdInfo gmail_ad = 21; @@ -135,23 +131,19 @@ message Ad { google.ads.googleads.v1.common.VideoAdInfo video_ad = 24; // Details pertaining to a responsive search ad. - google.ads.googleads.v1.common.ResponsiveSearchAdInfo responsive_search_ad = - 25; + google.ads.googleads.v1.common.ResponsiveSearchAdInfo responsive_search_ad = 25; // Details pertaining to a legacy responsive display ad. - google.ads.googleads.v1.common.LegacyResponsiveDisplayAdInfo - legacy_responsive_display_ad = 28; + google.ads.googleads.v1.common.LegacyResponsiveDisplayAdInfo legacy_responsive_display_ad = 28; // Details pertaining to an app ad. google.ads.googleads.v1.common.AppAdInfo app_ad = 29; - // Details pertaining to a legacy app install ad. - google.ads.googleads.v1.common.LegacyAppInstallAdInfo - legacy_app_install_ad = 30; + // Immutable. Details pertaining to a legacy app install ad. + google.ads.googleads.v1.common.LegacyAppInstallAdInfo legacy_app_install_ad = 30 [(google.api.field_behavior) = IMMUTABLE]; // Details pertaining to a responsive display ad. - google.ads.googleads.v1.common.ResponsiveDisplayAdInfo - responsive_display_ad = 31; + google.ads.googleads.v1.common.ResponsiveDisplayAdInfo responsive_display_ad = 31; // Details pertaining to a display upload ad. google.ads.googleads.v1.common.DisplayUploadAdInfo display_upload_ad = 33; @@ -160,7 +152,6 @@ message Ad { google.ads.googleads.v1.common.AppEngagementAdInfo app_engagement_ad = 34; // Details pertaining to a Shopping Comparison Listing ad. - google.ads.googleads.v1.common.ShoppingComparisonListingAdInfo - shopping_comparison_listing_ad = 36; + google.ads.googleads.v1.common.ShoppingComparisonListingAdInfo shopping_comparison_listing_ad = 36; } } diff --git a/google/ads/googleads/v1/resources/ad_group.proto b/google/ads/googleads/v1/resources/ad_group.proto index c4ad34b33..6975139f8 100644 --- a/google/ads/googleads/v1/resources/ad_group.proto +++ b/google/ads/googleads/v1/resources/ad_group.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -25,8 +24,10 @@ import "google/ads/googleads/v1/enums/ad_group_status.proto"; import "google/ads/googleads/v1/enums/ad_group_type.proto"; import "google/ads/googleads/v1/enums/bidding_source.proto"; import "google/ads/googleads/v1/enums/targeting_dimension.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -41,14 +42,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // An ad group. message AdGroup { - // The resource name of the ad group. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroup" + pattern: "customers/{customer}/adGroups/{ad_group}" + }; + + // Immutable. The resource name of the ad group. // Ad group resource names have the form: // // `customers/{customer_id}/adGroups/{ad_group_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; - // The ID of the ad group. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the ad group. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the ad group. // @@ -64,32 +75,40 @@ message AdGroup { // The status of the ad group. google.ads.googleads.v1.enums.AdGroupStatusEnum.AdGroupStatus status = 5; - // The type of the ad group. - google.ads.googleads.v1.enums.AdGroupTypeEnum.AdGroupType type = 12; + // Immutable. The type of the ad group. + google.ads.googleads.v1.enums.AdGroupTypeEnum.AdGroupType type = 12 [(google.api.field_behavior) = IMMUTABLE]; // The ad rotation mode of the ad group. - google.ads.googleads.v1.enums.AdGroupAdRotationModeEnum.AdGroupAdRotationMode - ad_rotation_mode = 22; + google.ads.googleads.v1.enums.AdGroupAdRotationModeEnum.AdGroupAdRotationMode ad_rotation_mode = 22; - // For draft or experiment ad groups, this field is the resource name of the + // Output only. For draft or experiment ad groups, this field is the resource name of the // base ad group from which this ad group was created. If a draft or // experiment ad group does not have a base ad group, then this field is null. // // For base ad groups, this field equals the ad group resource name. // // This field is read-only. - google.protobuf.StringValue base_ad_group = 18; + google.protobuf.StringValue base_ad_group = 18 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; // The URL template for constructing a tracking URL. google.protobuf.StringValue tracking_url_template = 13; // The list of mappings used to substitute custom parameter tags in a // `tracking_url_template`, `final_urls`, or `mobile_final_urls`. - repeated google.ads.googleads.v1.common.CustomParameter - url_custom_parameters = 6; + repeated google.ads.googleads.v1.common.CustomParameter url_custom_parameters = 6; - // The campaign to which the ad group belongs. - google.protobuf.StringValue campaign = 10; + // Immutable. The campaign to which the ad group belongs. + google.protobuf.StringValue campaign = 10 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; // The maximum CPC (cost-per-click) bid. google.protobuf.Int64Value cpc_bid_micros = 14; @@ -100,8 +119,8 @@ message AdGroup { // The target CPA (cost-per-acquisition). google.protobuf.Int64Value target_cpa_micros = 27; - // The CPV (cost-per-view) bid. - google.protobuf.Int64Value cpv_bid_micros = 17; + // Output only. The CPV (cost-per-view) bid. + google.protobuf.Int64Value cpv_bid_micros = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; // Average amount in micros that the advertiser is willing to pay for every // thousand times the ad is shown. @@ -119,14 +138,12 @@ message AdGroup { google.protobuf.Int64Value percent_cpc_bid_micros = 20; // Settings for the Display Campaign Optimizer, initially termed "Explorer". - google.ads.googleads.v1.common.ExplorerAutoOptimizerSetting - explorer_auto_optimizer_setting = 21; + google.ads.googleads.v1.common.ExplorerAutoOptimizerSetting explorer_auto_optimizer_setting = 21; // Allows advertisers to specify a targeting dimension on which to place // absolute bids. This is only applicable for campaigns that target only the // display network and not search. - google.ads.googleads.v1.enums.TargetingDimensionEnum.TargetingDimension - display_custom_bid_dimension = 23; + google.ads.googleads.v1.enums.TargetingDimensionEnum.TargetingDimension display_custom_bid_dimension = 23; // URL template for appending params to Final URL. google.protobuf.StringValue final_url_suffix = 24; @@ -134,21 +151,19 @@ message AdGroup { // Setting for targeting related features. google.ads.googleads.v1.common.TargetingSetting targeting_setting = 25; - // The effective target CPA (cost-per-acquisition). + // Output only. The effective target CPA (cost-per-acquisition). // This field is read-only. - google.protobuf.Int64Value effective_target_cpa_micros = 28; + google.protobuf.Int64Value effective_target_cpa_micros = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Source of the effective target CPA. + // Output only. Source of the effective target CPA. // This field is read-only. - google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource - effective_target_cpa_source = 29; + google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource effective_target_cpa_source = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The effective target ROAS (return-on-ad-spend). + // Output only. The effective target ROAS (return-on-ad-spend). // This field is read-only. - google.protobuf.DoubleValue effective_target_roas = 31; + google.protobuf.DoubleValue effective_target_roas = 31 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Source of the effective target ROAS. + // Output only. Source of the effective target ROAS. // This field is read-only. - google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource - effective_target_roas_source = 32; + google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource effective_target_roas_source = 32 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/ad_group_ad.proto b/google/ads/googleads/v1/resources/ad_group_ad.proto index 67b7886f6..8d01e7013 100644 --- a/google/ads/googleads/v1/resources/ad_group_ad.proto +++ b/google/ads/googleads/v1/resources/ad_group_ad.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -23,8 +22,10 @@ import "google/ads/googleads/v1/enums/ad_strength.proto"; import "google/ads/googleads/v1/enums/policy_approval_status.proto"; import "google/ads/googleads/v1/enums/policy_review_status.proto"; import "google/ads/googleads/v1/resources/ad.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -39,40 +40,52 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // An ad group ad. message AdGroupAd { - // The resource name of the ad. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupAd" + pattern: "customers/{customer}/adGroupAds/{ad_group_ad}" + }; + + // Immutable. The resource name of the ad. // Ad group ad resource names have the form: // // `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; // The status of the ad. google.ads.googleads.v1.enums.AdGroupAdStatusEnum.AdGroupAdStatus status = 3; - // The ad group to which the ad belongs. - google.protobuf.StringValue ad_group = 4; + // Immutable. The ad group to which the ad belongs. + google.protobuf.StringValue ad_group = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; - // The ad. - Ad ad = 5; + // Immutable. The ad. + Ad ad = 5 [(google.api.field_behavior) = IMMUTABLE]; - // Policy information for the ad. - AdGroupAdPolicySummary policy_summary = 6; + // Output only. Policy information for the ad. + AdGroupAdPolicySummary policy_summary = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Overall ad strength for this ad group ad. - google.ads.googleads.v1.enums.AdStrengthEnum.AdStrength ad_strength = 7; + // Output only. Overall ad strength for this ad group ad. + google.ads.googleads.v1.enums.AdStrengthEnum.AdStrength ad_strength = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Contains policy information for an ad. message AdGroupAdPolicySummary { - // The list of policy findings for this ad. - repeated google.ads.googleads.v1.common.PolicyTopicEntry - policy_topic_entries = 1; + // Output only. The list of policy findings for this ad. + repeated google.ads.googleads.v1.common.PolicyTopicEntry policy_topic_entries = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Where in the review process this ad is. - google.ads.googleads.v1.enums.PolicyReviewStatusEnum.PolicyReviewStatus - review_status = 2; + // Output only. Where in the review process this ad is. + google.ads.googleads.v1.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The overall approval status of this ad, calculated based on the status of + // Output only. The overall approval status of this ad, calculated based on the status of // its individual policy topic entries. - google.ads.googleads.v1.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus - approval_status = 3; + google.ads.googleads.v1.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/ad_group_ad_label.proto b/google/ads/googleads/v1/resources/ad_group_ad_label.proto index aaecc193f..b1be0c131 100644 --- a/google/ads/googleads/v1/resources/ad_group_ad_label.proto +++ b/google/ads/googleads/v1/resources/ad_group_ad_label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -33,14 +34,34 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A relationship between an ad group ad and a label. message AdGroupAdLabel { - // The resource name of the ad group ad label. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupAdLabel" + pattern: "customers/{customer}/adGroupAdLabels/{ad_group_ad_label}" + }; + + // Immutable. The resource name of the ad group ad label. // Ad group ad label resource names have the form: // `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAdLabel" + } + ]; - // The ad group ad to which the label is attached. - google.protobuf.StringValue ad_group_ad = 2; + // Immutable. The ad group ad to which the label is attached. + google.protobuf.StringValue ad_group_ad = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; - // The label assigned to the ad group ad. - google.protobuf.StringValue label = 3; + // Immutable. The label assigned to the ad group ad. + google.protobuf.StringValue label = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; } diff --git a/google/ads/googleads/v1/resources/ad_group_audience_view.proto b/google/ads/googleads/v1/resources/ad_group_audience_view.proto index 6a7e7af98..5d8e6a611 100644 --- a/google/ads/googleads/v1/resources/ad_group_audience_view.proto +++ b/google/ads/googleads/v1/resources/ad_group_audience_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; @@ -35,9 +36,19 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // Network and YouTube Network ads, and remarketing lists for search ads (RLSA), // aggregated at the audience level. message AdGroupAudienceView { - // The resource name of the ad group audience view. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupAudienceView" + pattern: "customers/{customer}/adGroupAudienceViews/{ad_group_audience_view}" + }; + + // Output only. The resource name of the ad group audience view. // Ad group audience view resource names have the form: // // `customers/{customer_id}/adGroupAudienceViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAudienceView" + } + ]; } diff --git a/google/ads/googleads/v1/resources/ad_group_bid_modifier.proto b/google/ads/googleads/v1/resources/ad_group_bid_modifier.proto index 152c3dfa0..7de5203c7 100644 --- a/google/ads/googleads/v1/resources/ad_group_bid_modifier.proto +++ b/google/ads/googleads/v1/resources/ad_group_bid_modifier.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/criteria.proto"; import "google/ads/googleads/v1/enums/bid_modifier_source.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,57 +36,73 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // Represents an ad group bid modifier. message AdGroupBidModifier { - // The resource name of the ad group bid modifier. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupBidModifier" + pattern: "customers/{customer}/adGroupBidModifiers/{ad_group_bid_modifier}" + }; + + // Immutable. The resource name of the ad group bid modifier. // Ad group bid modifier resource names have the form: // // `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}~{criterion_id}` - string resource_name = 1; - - // The ad group to which this criterion belongs. - google.protobuf.StringValue ad_group = 2; - - // The ID of the criterion to bid modify. + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupBidModifier" + } + ]; + + // Immutable. The ad group to which this criterion belongs. + google.protobuf.StringValue ad_group = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Output only. The ID of the criterion to bid modify. // // This field is ignored for mutates. - google.protobuf.Int64Value criterion_id = 3; + google.protobuf.Int64Value criterion_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The modifier for the bid when the criterion matches. The modifier must be // in the range: 0.1 - 10.0. The range is 1.0 - 6.0 for PreferredContent. // Use 0 to opt out of a Device type. google.protobuf.DoubleValue bid_modifier = 4; - // The base ad group from which this draft/trial adgroup bid modifier was + // Output only. The base ad group from which this draft/trial adgroup bid modifier was // created. If ad_group is a base ad group then this field will be equal to // ad_group. If the ad group was created in the draft or trial and has no // corresponding base ad group, then this field will be null. // This field is readonly. - google.protobuf.StringValue base_ad_group = 9; + google.protobuf.StringValue base_ad_group = 9 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; - // Bid modifier source. - google.ads.googleads.v1.enums.BidModifierSourceEnum.BidModifierSource - bid_modifier_source = 10; + // Output only. Bid modifier source. + google.ads.googleads.v1.enums.BidModifierSourceEnum.BidModifierSource bid_modifier_source = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // The criterion of this ad group bid modifier. oneof criterion { - // Criterion for hotel date selection (default dates vs. user selected). - google.ads.googleads.v1.common.HotelDateSelectionTypeInfo - hotel_date_selection_type = 5; + // Immutable. Criterion for hotel date selection (default dates vs. user selected). + google.ads.googleads.v1.common.HotelDateSelectionTypeInfo hotel_date_selection_type = 5 [(google.api.field_behavior) = IMMUTABLE]; - // Criterion for number of days prior to the stay the booking is being made. - google.ads.googleads.v1.common.HotelAdvanceBookingWindowInfo - hotel_advance_booking_window = 6; + // Immutable. Criterion for number of days prior to the stay the booking is being made. + google.ads.googleads.v1.common.HotelAdvanceBookingWindowInfo hotel_advance_booking_window = 6 [(google.api.field_behavior) = IMMUTABLE]; - // Criterion for length of hotel stay in nights. - google.ads.googleads.v1.common.HotelLengthOfStayInfo hotel_length_of_stay = - 7; + // Immutable. Criterion for length of hotel stay in nights. + google.ads.googleads.v1.common.HotelLengthOfStayInfo hotel_length_of_stay = 7 [(google.api.field_behavior) = IMMUTABLE]; - // Criterion for day of the week the booking is for. - google.ads.googleads.v1.common.HotelCheckInDayInfo hotel_check_in_day = 8; + // Immutable. Criterion for day of the week the booking is for. + google.ads.googleads.v1.common.HotelCheckInDayInfo hotel_check_in_day = 8 [(google.api.field_behavior) = IMMUTABLE]; - // A device criterion. - google.ads.googleads.v1.common.DeviceInfo device = 11; + // Immutable. A device criterion. + google.ads.googleads.v1.common.DeviceInfo device = 11 [(google.api.field_behavior) = IMMUTABLE]; - // A preferred content criterion. - google.ads.googleads.v1.common.PreferredContentInfo preferred_content = 12; + // Immutable. A preferred content criterion. + google.ads.googleads.v1.common.PreferredContentInfo preferred_content = 12 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v1/resources/ad_group_criterion.proto b/google/ads/googleads/v1/resources/ad_group_criterion.proto index 10ef22aba..28a967409 100644 --- a/google/ads/googleads/v1/resources/ad_group_criterion.proto +++ b/google/ads/googleads/v1/resources/ad_group_criterion.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -25,8 +24,10 @@ import "google/ads/googleads/v1/enums/bidding_source.proto"; import "google/ads/googleads/v1/enums/criterion_system_serving_status.proto"; import "google/ads/googleads/v1/enums/criterion_type.proto"; import "google/ads/googleads/v1/enums/quality_score_bucket.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -41,87 +42,96 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // An ad group criterion. message AdGroupCriterion { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupCriterion" + pattern: "customers/{customer}/adGroupCriteria/{ad_group_criterion}" + }; + // A container for ad group criterion quality information. message QualityInfo { - // The quality score. + // Output only. The quality score. // // This field may not be populated if Google does not have enough // information to determine a value. - google.protobuf.Int32Value quality_score = 1; + google.protobuf.Int32Value quality_score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The performance of the ad compared to other advertisers. - google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket - creative_quality_score = 2; + // Output only. The performance of the ad compared to other advertisers. + google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket creative_quality_score = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The quality score of the landing page. - google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket - post_click_quality_score = 3; + // Output only. The quality score of the landing page. + google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket post_click_quality_score = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The click-through rate compared to that of other advertisers. - google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket - search_predicted_ctr = 4; + // Output only. The click-through rate compared to that of other advertisers. + google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket search_predicted_ctr = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Estimates for criterion bids at various positions. message PositionEstimates { - // The estimate of the CPC bid required for ad to be shown on first + // Output only. The estimate of the CPC bid required for ad to be shown on first // page of search results. - google.protobuf.Int64Value first_page_cpc_micros = 1; + google.protobuf.Int64Value first_page_cpc_micros = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The estimate of the CPC bid required for ad to be displayed in first + // Output only. The estimate of the CPC bid required for ad to be displayed in first // position, at the top of the first page of search results. - google.protobuf.Int64Value first_position_cpc_micros = 2; + google.protobuf.Int64Value first_position_cpc_micros = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The estimate of the CPC bid required for ad to be displayed at the top + // Output only. The estimate of the CPC bid required for ad to be displayed at the top // of the first page of search results. - google.protobuf.Int64Value top_of_page_cpc_micros = 3; + google.protobuf.Int64Value top_of_page_cpc_micros = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Estimate of how many clicks per week you might get by changing your + // Output only. Estimate of how many clicks per week you might get by changing your // keyword bid to the value in first_position_cpc_micros. - google.protobuf.Int64Value estimated_add_clicks_at_first_position_cpc = 4; + google.protobuf.Int64Value estimated_add_clicks_at_first_position_cpc = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Estimate of how your cost per week might change when changing your + // Output only. Estimate of how your cost per week might change when changing your // keyword bid to the value in first_position_cpc_micros. - google.protobuf.Int64Value estimated_add_cost_at_first_position_cpc = 5; + google.protobuf.Int64Value estimated_add_cost_at_first_position_cpc = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // The resource name of the ad group criterion. + // Immutable. The resource name of the ad group criterion. // Ad group criterion resource names have the form: // // `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}` - string resource_name = 1; - - // The ID of the criterion. + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; + + // Output only. The ID of the criterion. // // This field is ignored for mutates. - google.protobuf.Int64Value criterion_id = 26; + google.protobuf.Int64Value criterion_id = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; // The status of the criterion. - google.ads.googleads.v1.enums.AdGroupCriterionStatusEnum - .AdGroupCriterionStatus status = 3; + google.ads.googleads.v1.enums.AdGroupCriterionStatusEnum.AdGroupCriterionStatus status = 3; - // Information regarding the quality of the criterion. - QualityInfo quality_info = 4; + // Output only. Information regarding the quality of the criterion. + QualityInfo quality_info = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The ad group to which the criterion belongs. - google.protobuf.StringValue ad_group = 5; + // Immutable. The ad group to which the criterion belongs. + google.protobuf.StringValue ad_group = 5 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; - // The type of the criterion. - google.ads.googleads.v1.enums.CriterionTypeEnum.CriterionType type = 25; + // Output only. The type of the criterion. + google.ads.googleads.v1.enums.CriterionTypeEnum.CriterionType type = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether to target (`false`) or exclude (`true`) the criterion. + // Immutable. Whether to target (`false`) or exclude (`true`) the criterion. // // This field is immutable. To switch a criterion from positive to negative, // remove then re-add it. - google.protobuf.BoolValue negative = 31; + google.protobuf.BoolValue negative = 31 [(google.api.field_behavior) = IMMUTABLE]; - // Serving status of the criterion. - google.ads.googleads.v1.enums.CriterionSystemServingStatusEnum - .CriterionSystemServingStatus system_serving_status = 52; + // Output only. Serving status of the criterion. + google.ads.googleads.v1.enums.CriterionSystemServingStatusEnum.CriterionSystemServingStatus system_serving_status = 52 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Approval status of the criterion. - google.ads.googleads.v1.enums.AdGroupCriterionApprovalStatusEnum - .AdGroupCriterionApprovalStatus approval_status = 53; + // Output only. Approval status of the criterion. + google.ads.googleads.v1.enums.AdGroupCriterionApprovalStatusEnum.AdGroupCriterionApprovalStatus approval_status = 53 [(google.api.field_behavior) = OUTPUT_ONLY]; // The modifier for the bid when the criterion matches. The modifier must be // in the range: 0.1 - 10.0. Most targetable criteria types support modifiers. @@ -141,36 +151,32 @@ message AdGroupCriterion { // value stored here is 1,000,000 * [fraction]. google.protobuf.Int64Value percent_cpc_bid_micros = 33; - // The effective CPC (cost-per-click) bid. - google.protobuf.Int64Value effective_cpc_bid_micros = 18; + // Output only. The effective CPC (cost-per-click) bid. + google.protobuf.Int64Value effective_cpc_bid_micros = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The effective CPM (cost-per-thousand viewable impressions) bid. - google.protobuf.Int64Value effective_cpm_bid_micros = 19; + // Output only. The effective CPM (cost-per-thousand viewable impressions) bid. + google.protobuf.Int64Value effective_cpm_bid_micros = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The effective CPV (cost-per-view) bid. - google.protobuf.Int64Value effective_cpv_bid_micros = 20; + // Output only. The effective CPV (cost-per-view) bid. + google.protobuf.Int64Value effective_cpv_bid_micros = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The effective Percent CPC bid amount. - google.protobuf.Int64Value effective_percent_cpc_bid_micros = 34; + // Output only. The effective Percent CPC bid amount. + google.protobuf.Int64Value effective_percent_cpc_bid_micros = 34 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Source of the effective CPC bid. - google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource - effective_cpc_bid_source = 21; + // Output only. Source of the effective CPC bid. + google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource effective_cpc_bid_source = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Source of the effective CPM bid. - google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource - effective_cpm_bid_source = 22; + // Output only. Source of the effective CPM bid. + google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource effective_cpm_bid_source = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Source of the effective CPV bid. - google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource - effective_cpv_bid_source = 23; + // Output only. Source of the effective CPV bid. + google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource effective_cpv_bid_source = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Source of the effective Percent CPC bid. - google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource - effective_percent_cpc_bid_source = 35; + // Output only. Source of the effective Percent CPC bid. + google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource effective_percent_cpc_bid_source = 35 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Estimates for criterion bids at various positions. - PositionEstimates position_estimates = 10; + // Output only. Estimates for criterion bids at various positions. + PositionEstimates position_estimates = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // The list of possible final URLs after all cross-domain redirects for the // ad. @@ -187,67 +193,64 @@ message AdGroupCriterion { // The list of mappings used to substitute custom parameter tags in a // `tracking_url_template`, `final_urls`, or `mobile_final_urls`. - repeated google.ads.googleads.v1.common.CustomParameter - url_custom_parameters = 14; + repeated google.ads.googleads.v1.common.CustomParameter url_custom_parameters = 14; // The ad group criterion. // // Exactly one must be set. oneof criterion { - // Keyword. - google.ads.googleads.v1.common.KeywordInfo keyword = 27; + // Immutable. Keyword. + google.ads.googleads.v1.common.KeywordInfo keyword = 27 [(google.api.field_behavior) = IMMUTABLE]; - // Placement. - google.ads.googleads.v1.common.PlacementInfo placement = 28; + // Immutable. Placement. + google.ads.googleads.v1.common.PlacementInfo placement = 28 [(google.api.field_behavior) = IMMUTABLE]; - // Mobile app category. - google.ads.googleads.v1.common.MobileAppCategoryInfo mobile_app_category = - 29; + // Immutable. Mobile app category. + google.ads.googleads.v1.common.MobileAppCategoryInfo mobile_app_category = 29 [(google.api.field_behavior) = IMMUTABLE]; - // Mobile application. - google.ads.googleads.v1.common.MobileApplicationInfo mobile_application = - 30; + // Immutable. Mobile application. + google.ads.googleads.v1.common.MobileApplicationInfo mobile_application = 30 [(google.api.field_behavior) = IMMUTABLE]; - // Listing group. - google.ads.googleads.v1.common.ListingGroupInfo listing_group = 32; + // Immutable. Listing group. + google.ads.googleads.v1.common.ListingGroupInfo listing_group = 32 [(google.api.field_behavior) = IMMUTABLE]; - // Age range. - google.ads.googleads.v1.common.AgeRangeInfo age_range = 36; + // Immutable. Age range. + google.ads.googleads.v1.common.AgeRangeInfo age_range = 36 [(google.api.field_behavior) = IMMUTABLE]; - // Gender. - google.ads.googleads.v1.common.GenderInfo gender = 37; + // Immutable. Gender. + google.ads.googleads.v1.common.GenderInfo gender = 37 [(google.api.field_behavior) = IMMUTABLE]; - // Income range. - google.ads.googleads.v1.common.IncomeRangeInfo income_range = 38; + // Immutable. Income range. + google.ads.googleads.v1.common.IncomeRangeInfo income_range = 38 [(google.api.field_behavior) = IMMUTABLE]; - // Parental status. - google.ads.googleads.v1.common.ParentalStatusInfo parental_status = 39; + // Immutable. Parental status. + google.ads.googleads.v1.common.ParentalStatusInfo parental_status = 39 [(google.api.field_behavior) = IMMUTABLE]; - // User List. - google.ads.googleads.v1.common.UserListInfo user_list = 42; + // Immutable. User List. + google.ads.googleads.v1.common.UserListInfo user_list = 42 [(google.api.field_behavior) = IMMUTABLE]; - // YouTube Video. - google.ads.googleads.v1.common.YouTubeVideoInfo youtube_video = 40; + // Immutable. YouTube Video. + google.ads.googleads.v1.common.YouTubeVideoInfo youtube_video = 40 [(google.api.field_behavior) = IMMUTABLE]; - // YouTube Channel. - google.ads.googleads.v1.common.YouTubeChannelInfo youtube_channel = 41; + // Immutable. YouTube Channel. + google.ads.googleads.v1.common.YouTubeChannelInfo youtube_channel = 41 [(google.api.field_behavior) = IMMUTABLE]; - // Topic. - google.ads.googleads.v1.common.TopicInfo topic = 43; + // Immutable. Topic. + google.ads.googleads.v1.common.TopicInfo topic = 43 [(google.api.field_behavior) = IMMUTABLE]; - // User Interest. - google.ads.googleads.v1.common.UserInterestInfo user_interest = 45; + // Immutable. User Interest. + google.ads.googleads.v1.common.UserInterestInfo user_interest = 45 [(google.api.field_behavior) = IMMUTABLE]; - // Webpage - google.ads.googleads.v1.common.WebpageInfo webpage = 46; + // Immutable. Webpage + google.ads.googleads.v1.common.WebpageInfo webpage = 46 [(google.api.field_behavior) = IMMUTABLE]; - // App Payment Model. - google.ads.googleads.v1.common.AppPaymentModelInfo app_payment_model = 47; + // Immutable. App Payment Model. + google.ads.googleads.v1.common.AppPaymentModelInfo app_payment_model = 47 [(google.api.field_behavior) = IMMUTABLE]; - // Custom Affinity. - google.ads.googleads.v1.common.CustomAffinityInfo custom_affinity = 48; + // Immutable. Custom Affinity. + google.ads.googleads.v1.common.CustomAffinityInfo custom_affinity = 48 [(google.api.field_behavior) = IMMUTABLE]; - // Custom Intent. - google.ads.googleads.v1.common.CustomIntentInfo custom_intent = 49; + // Immutable. Custom Intent. + google.ads.googleads.v1.common.CustomIntentInfo custom_intent = 49 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v1/resources/ad_group_criterion_label.proto b/google/ads/googleads/v1/resources/ad_group_criterion_label.proto index 121f6772d..6d5bc87ad 100644 --- a/google/ads/googleads/v1/resources/ad_group_criterion_label.proto +++ b/google/ads/googleads/v1/resources/ad_group_criterion_label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -33,15 +34,34 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A relationship between an ad group criterion and a label. message AdGroupCriterionLabel { - // The resource name of the ad group criterion label. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupCriterionLabel" + pattern: "customers/{customer}/adGroupCriterionLabels/{ad_group_criterion_label}" + }; + + // Immutable. The resource name of the ad group criterion label. // Ad group criterion label resource names have the form: - // // `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterionLabel" + } + ]; - // The ad group criterion to which the label is attached. - google.protobuf.StringValue ad_group_criterion = 2; + // Immutable. The ad group criterion to which the label is attached. + google.protobuf.StringValue ad_group_criterion = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; - // The label assigned to the ad group criterion. - google.protobuf.StringValue label = 3; + // Immutable. The label assigned to the ad group criterion. + google.protobuf.StringValue label = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; } diff --git a/google/ads/googleads/v1/resources/ad_group_criterion_simulation.proto b/google/ads/googleads/v1/resources/ad_group_criterion_simulation.proto index e846e635a..c014d2764 100644 --- a/google/ads/googleads/v1/resources/ad_group_criterion_simulation.proto +++ b/google/ads/googleads/v1/resources/ad_group_criterion_simulation.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,8 +19,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/simulation.proto"; import "google/ads/googleads/v1/enums/simulation_modification_method.proto"; import "google/ads/googleads/v1/enums/simulation_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -38,38 +39,47 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // channel type, criterion type, simulation type, and simulation modification // method are detailed below respectively. // -// SEARCH KEYWORD CPC_BID UNIFORM +// 1. DISPLAY - KEYWORD - CPC_BID - UNIFORM +// 2. SEARCH - KEYWORD - CPC_BID - UNIFORM +// 3. SHOPPING - LISTING_GROUP - CPC_BID - UNIFORM message AdGroupCriterionSimulation { - // The resource name of the ad group criterion simulation. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupCriterionSimulation" + pattern: "customers/{customer}/adGroupCriterionSimulations/{ad_group_criterion_simulation}" + }; + + // Output only. The resource name of the ad group criterion simulation. // Ad group criterion simulation resource names have the form: // - // // `customers/{customer_id}/adGroupCriterionSimulations/{ad_group_id}~{criterion_id}~{type}~{modification_method}~{start_date}~{end_date}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterionSimulation" + } + ]; - // AdGroup ID of the simulation. - google.protobuf.Int64Value ad_group_id = 2; + // Output only. AdGroup ID of the simulation. + google.protobuf.Int64Value ad_group_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Criterion ID of the simulation. - google.protobuf.Int64Value criterion_id = 3; + // Output only. Criterion ID of the simulation. + google.protobuf.Int64Value criterion_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The field that the simulation modifies. - google.ads.googleads.v1.enums.SimulationTypeEnum.SimulationType type = 4; + // Output only. The field that the simulation modifies. + google.ads.googleads.v1.enums.SimulationTypeEnum.SimulationType type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // How the simulation modifies the field. - google.ads.googleads.v1.enums.SimulationModificationMethodEnum - .SimulationModificationMethod modification_method = 5; + // Output only. How the simulation modifies the field. + google.ads.googleads.v1.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // First day on which the simulation is based, in YYYY-MM-DD format. - google.protobuf.StringValue start_date = 6; + // Output only. First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Last day on which the simulation is based, in YYYY-MM-DD format. - google.protobuf.StringValue end_date = 7; + // Output only. Last day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue end_date = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // List of simulation points. oneof point_list { - // Simulation points if the simulation type is CPC_BID. - google.ads.googleads.v1.common.CpcBidSimulationPointList - cpc_bid_point_list = 8; + // Output only. Simulation points if the simulation type is CPC_BID. + google.ads.googleads.v1.common.CpcBidSimulationPointList cpc_bid_point_list = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v1/resources/ad_group_extension_setting.proto b/google/ads/googleads/v1/resources/ad_group_extension_setting.proto index fef67a91c..fba1f6b0c 100644 --- a/google/ads/googleads/v1/resources/ad_group_extension_setting.proto +++ b/google/ads/googleads/v1/resources/ad_group_extension_setting.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/extension_setting_device.proto"; import "google/ads/googleads/v1/enums/extension_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,31 +36,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // An ad group extension setting. message AdGroupExtensionSetting { - // The resource name of the ad group extension setting. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupExtensionSetting" + pattern: "customers/{customer}/adGroupExtensionSettings/{ad_group_extension_setting}" + }; + + // Immutable. The resource name of the ad group extension setting. // AdGroupExtensionSetting resource names have the form: // - // // `customers/{customer_id}/adGroupExtensionSettings/{ad_group_id}~{extension_type}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupExtensionSetting" + } + ]; - // The extension type of the ad group extension setting. - google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = - 2; + // Immutable. The extension type of the ad group extension setting. + google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = 2 [(google.api.field_behavior) = IMMUTABLE]; - // The resource name of the ad group. The linked extension feed items will + // Immutable. The resource name of the ad group. The linked extension feed items will // serve under this ad group. // AdGroup resource names have the form: // // `customers/{customer_id}/adGroups/{ad_group_id}` - google.protobuf.StringValue ad_group = 3; + google.protobuf.StringValue ad_group = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; // The resource names of the extension feed items to serve under the ad group. // ExtensionFeedItem resource names have the form: // // `customers/{customer_id}/extensionFeedItems/{feed_item_id}` - repeated google.protobuf.StringValue extension_feed_items = 4; + repeated google.protobuf.StringValue extension_feed_items = 4 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + }]; // The device for which the extensions will serve. Optional. - google.ads.googleads.v1.enums.ExtensionSettingDeviceEnum - .ExtensionSettingDevice device = 5; + google.ads.googleads.v1.enums.ExtensionSettingDeviceEnum.ExtensionSettingDevice device = 5; } diff --git a/google/ads/googleads/v1/resources/ad_group_feed.proto b/google/ads/googleads/v1/resources/ad_group_feed.proto index e1f1601fd..982f0cd9e 100644 --- a/google/ads/googleads/v1/resources/ad_group_feed.proto +++ b/google/ads/googleads/v1/resources/ad_group_feed.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,8 +19,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/matching_function.proto"; import "google/ads/googleads/v1/enums/feed_link_status.proto"; import "google/ads/googleads/v1/enums/placeholder_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -36,29 +37,48 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // An ad group feed. message AdGroupFeed { - // The resource name of the ad group feed. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupFeed" + pattern: "customers/{customer}/adGroupFeeds/{ad_group_feed}" + }; + + // Immutable. The resource name of the ad group feed. // Ad group feed resource names have the form: // // `customers/{customer_id}/adGroupFeeds/{ad_group_id}~{feed_id} - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupFeed" + } + ]; - // The feed being linked to the ad group. - google.protobuf.StringValue feed = 2; + // Immutable. The feed being linked to the ad group. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; - // The ad group being linked to the feed. - google.protobuf.StringValue ad_group = 3; + // Immutable. The ad group being linked to the feed. + google.protobuf.StringValue ad_group = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; // Indicates which placeholder types the feed may populate under the connected // ad group. Required. - repeated google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType - placeholder_types = 4; + repeated google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType placeholder_types = 4; // Matching function associated with the AdGroupFeed. // The matching function is used to filter the set of feed items selected. // Required. google.ads.googleads.v1.common.MatchingFunction matching_function = 5; - // Status of the ad group feed. + // Output only. Status of the ad group feed. // This field is read-only. - google.ads.googleads.v1.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6; + google.ads.googleads.v1.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/ad_group_label.proto b/google/ads/googleads/v1/resources/ad_group_label.proto index db9f20d4e..932351f59 100644 --- a/google/ads/googleads/v1/resources/ad_group_label.proto +++ b/google/ads/googleads/v1/resources/ad_group_label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -33,14 +34,34 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A relationship between an ad group and a label. message AdGroupLabel { - // The resource name of the ad group label. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupLabel" + pattern: "customers/{customer}/adGroupLabels/{ad_group_label}" + }; + + // Immutable. The resource name of the ad group label. // Ad group label resource names have the form: // `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupLabel" + } + ]; - // The ad group to which the label is attached. - google.protobuf.StringValue ad_group = 2; + // Immutable. The ad group to which the label is attached. + google.protobuf.StringValue ad_group = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; - // The label assigned to the ad group. - google.protobuf.StringValue label = 3; + // Immutable. The label assigned to the ad group. + google.protobuf.StringValue label = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; } diff --git a/google/ads/googleads/v1/resources/ad_group_simulation.proto b/google/ads/googleads/v1/resources/ad_group_simulation.proto index 303b30e37..9f1035d46 100644 --- a/google/ads/googleads/v1/resources/ad_group_simulation.proto +++ b/google/ads/googleads/v1/resources/ad_group_simulation.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,8 +19,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/simulation.proto"; import "google/ads/googleads/v1/enums/simulation_modification_method.proto"; import "google/ads/googleads/v1/enums/simulation_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -38,50 +39,55 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // channel type, simulation type and simulation modification method is // detailed below respectively. // -// SEARCH CPC_BID DEFAULT -// SEARCH CPC_BID UNIFORM -// SEARCH TARGET_CPA UNIFORM -// DISPLAY CPC_BID DEFAULT -// DISPLAY CPC_BID UNIFORM -// DISPLAY TARGET_CPA UNIFORM -// VIDEO CPV_BID DEFAULT -// VIDEO CPV_BID UNIFORM +// 1. SEARCH - CPC_BID - DEFAULT +// 2. SEARCH - CPC_BID - UNIFORM +// 3. SEARCH - TARGET_CPA - UNIFORM +// 4. DISPLAY - CPC_BID - DEFAULT +// 5. DISPLAY - CPC_BID - UNIFORM +// 6. DISPLAY - TARGET_CPA - UNIFORM +// 7. VIDEO - CPV_BID - DEFAULT +// 8. VIDEO - CPV_BID - UNIFORM message AdGroupSimulation { - // The resource name of the ad group simulation. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupSimulation" + pattern: "customers/{customer}/adGroupSimulations/{ad_group_simulation}" + }; + + // Output only. The resource name of the ad group simulation. // Ad group simulation resource names have the form: // - // // `customers/{customer_id}/adGroupSimulations/{ad_group_id}~{type}~{modification_method}~{start_date}~{end_date}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupSimulation" + } + ]; - // Ad group id of the simulation. - google.protobuf.Int64Value ad_group_id = 2; + // Output only. Ad group id of the simulation. + google.protobuf.Int64Value ad_group_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The field that the simulation modifies. - google.ads.googleads.v1.enums.SimulationTypeEnum.SimulationType type = 3; + // Output only. The field that the simulation modifies. + google.ads.googleads.v1.enums.SimulationTypeEnum.SimulationType type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // How the simulation modifies the field. - google.ads.googleads.v1.enums.SimulationModificationMethodEnum - .SimulationModificationMethod modification_method = 4; + // Output only. How the simulation modifies the field. + google.ads.googleads.v1.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // First day on which the simulation is based, in YYYY-MM-DD format. - google.protobuf.StringValue start_date = 5; + // Output only. First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Last day on which the simulation is based, in YYYY-MM-DD format - google.protobuf.StringValue end_date = 6; + // Output only. Last day on which the simulation is based, in YYYY-MM-DD format + google.protobuf.StringValue end_date = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // List of simulation points. oneof point_list { - // Simulation points if the simulation type is CPC_BID. - google.ads.googleads.v1.common.CpcBidSimulationPointList - cpc_bid_point_list = 8; + // Output only. Simulation points if the simulation type is CPC_BID. + google.ads.googleads.v1.common.CpcBidSimulationPointList cpc_bid_point_list = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Simulation points if the simulation type is CPV_BID. - google.ads.googleads.v1.common.CpvBidSimulationPointList - cpv_bid_point_list = 10; + // Output only. Simulation points if the simulation type is CPV_BID. + google.ads.googleads.v1.common.CpvBidSimulationPointList cpv_bid_point_list = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Simulation points if the simulation type is TARGET_CPA. - google.ads.googleads.v1.common.TargetCpaSimulationPointList - target_cpa_point_list = 9; + // Output only. Simulation points if the simulation type is TARGET_CPA. + google.ads.googleads.v1.common.TargetCpaSimulationPointList target_cpa_point_list = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v1/resources/ad_parameter.proto b/google/ads/googleads/v1/resources/ad_parameter.proto index 6c53fe38a..17d25c085 100644 --- a/google/ads/googleads/v1/resources/ad_parameter.proto +++ b/google/ads/googleads/v1/resources/ad_parameter.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -38,18 +39,32 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // In the ad the parameters are referenced by a placeholder of the form // "{param#:value}". E.g. "{param1:$17}" message AdParameter { - // The resource name of the ad parameter. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdParameter" + pattern: "customers/{customer}/adParameters/{ad_parameter}" + }; + + // Immutable. The resource name of the ad parameter. // Ad parameter resource names have the form: // - // // `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdParameter" + } + ]; - // The ad group criterion that this ad parameter belongs to. - google.protobuf.StringValue ad_group_criterion = 2; + // Immutable. The ad group criterion that this ad parameter belongs to. + google.protobuf.StringValue ad_group_criterion = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; - // The unique index of this ad parameter. Must be either 1 or 2. - google.protobuf.Int64Value parameter_index = 3; + // Immutable. The unique index of this ad parameter. Must be either 1 or 2. + google.protobuf.Int64Value parameter_index = 3 [(google.api.field_behavior) = IMMUTABLE]; // Numeric value to insert into the ad text. The following restrictions // apply: diff --git a/google/ads/googleads/v1/resources/ad_schedule_view.proto b/google/ads/googleads/v1/resources/ad_schedule_view.proto index 80fbeda47..a7828292b 100644 --- a/google/ads/googleads/v1/resources/ad_schedule_view.proto +++ b/google/ads/googleads/v1/resources/ad_schedule_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; @@ -33,9 +34,19 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // An ad schedule view summarizes the performance of campaigns by // AdSchedule criteria. message AdScheduleView { - // The resource name of the ad schedule view. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdScheduleView" + pattern: "customers/{customer}/adScheduleViews/{ad_schedule_view}" + }; + + // Output only. The resource name of the ad schedule view. // AdSchedule view resource names have the form: // // `customers/{customer_id}/adScheduleViews/{campaign_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdScheduleView" + } + ]; } diff --git a/google/ads/googleads/v1/resources/age_range_view.proto b/google/ads/googleads/v1/resources/age_range_view.proto index da1e80850..cc0b8392d 100644 --- a/google/ads/googleads/v1/resources/age_range_view.proto +++ b/google/ads/googleads/v1/resources/age_range_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // An age range view. message AgeRangeView { - // The resource name of the age range view. + option (google.api.resource) = { + type: "googleads.googleapis.com/AgeRangeView" + pattern: "customers/{customer}/ageRangeViews/{age_range_view}" + }; + + // Output only. The resource name of the age range view. // Age range view resource names have the form: // // `customers/{customer_id}/ageRangeViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AgeRangeView" + } + ]; } diff --git a/google/ads/googleads/v1/resources/asset.proto b/google/ads/googleads/v1/resources/asset.proto index d30514a65..052aba2e6 100644 --- a/google/ads/googleads/v1/resources/asset.proto +++ b/google/ads/googleads/v1/resources/asset.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/asset_types.proto"; import "google/ads/googleads/v1/enums/asset_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -36,33 +37,43 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // Asset is a part of an ad which can be shared across multiple ads. // It can be an image (ImageAsset), a video (YoutubeVideoAsset), etc. message Asset { - // The resource name of the asset. + option (google.api.resource) = { + type: "googleads.googleapis.com/Asset" + pattern: "customers/{customer}/assets/{asset}" + }; + + // Immutable. The resource name of the asset. // Asset resource names have the form: // // `customers/{customer_id}/assets/{asset_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Asset" + } + ]; - // The ID of the asset. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the asset. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional name of the asset. google.protobuf.StringValue name = 3; - // Type of the asset. - google.ads.googleads.v1.enums.AssetTypeEnum.AssetType type = 4; + // Output only. Type of the asset. + google.ads.googleads.v1.enums.AssetTypeEnum.AssetType type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // The specific type of the asset. oneof asset_data { - // A YouTube video asset. - google.ads.googleads.v1.common.YoutubeVideoAsset youtube_video_asset = 5; + // Immutable. A YouTube video asset. + google.ads.googleads.v1.common.YoutubeVideoAsset youtube_video_asset = 5 [(google.api.field_behavior) = IMMUTABLE]; - // A media bundle asset. - google.ads.googleads.v1.common.MediaBundleAsset media_bundle_asset = 6; + // Immutable. A media bundle asset. + google.ads.googleads.v1.common.MediaBundleAsset media_bundle_asset = 6 [(google.api.field_behavior) = IMMUTABLE]; - // An image asset. - google.ads.googleads.v1.common.ImageAsset image_asset = 7; + // Output only. An image asset. + google.ads.googleads.v1.common.ImageAsset image_asset = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A text asset. - google.ads.googleads.v1.common.TextAsset text_asset = 8; + // Output only. A text asset. + google.ads.googleads.v1.common.TextAsset text_asset = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v1/resources/bidding_strategy.proto b/google/ads/googleads/v1/resources/bidding_strategy.proto index 774a6a6e3..2ce35b417 100644 --- a/google/ads/googleads/v1/resources/bidding_strategy.proto +++ b/google/ads/googleads/v1/resources/bidding_strategy.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,8 +19,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/bidding.proto"; import "google/ads/googleads/v1/enums/bidding_strategy_status.proto"; import "google/ads/googleads/v1/enums/bidding_strategy_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -36,14 +37,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A bidding strategy. message BiddingStrategy { - // The resource name of the bidding strategy. + option (google.api.resource) = { + type: "googleads.googleapis.com/BiddingStrategy" + pattern: "customers/{customer}/biddingStrategies/{bidding_strategy}" + }; + + // Immutable. The resource name of the bidding strategy. // Bidding strategy resource names have the form: // // `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BiddingStrategy" + } + ]; - // The ID of the bidding strategy. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the bidding strategy. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the bidding strategy. // All bidding strategies within an account must be named distinctly. @@ -52,28 +63,26 @@ message BiddingStrategy { // in UTF-8 bytes, (trimmed). google.protobuf.StringValue name = 4; - // The status of the bidding strategy. + // Output only. The status of the bidding strategy. // // This field is read-only. - google.ads.googleads.v1.enums.BiddingStrategyStatusEnum.BiddingStrategyStatus - status = 15; + google.ads.googleads.v1.enums.BiddingStrategyStatusEnum.BiddingStrategyStatus status = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The type of the bidding strategy. + // Output only. The type of the bidding strategy. // Create a bidding strategy by setting the bidding scheme. // // This field is read-only. - google.ads.googleads.v1.enums.BiddingStrategyTypeEnum.BiddingStrategyType - type = 5; + google.ads.googleads.v1.enums.BiddingStrategyTypeEnum.BiddingStrategyType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number of campaigns attached to this bidding strategy. + // Output only. The number of campaigns attached to this bidding strategy. // // This field is read-only. - google.protobuf.Int64Value campaign_count = 13; + google.protobuf.Int64Value campaign_count = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number of non-removed campaigns attached to this bidding strategy. + // Output only. The number of non-removed campaigns attached to this bidding strategy. // // This field is read-only. - google.protobuf.Int64Value non_removed_campaign_count = 14; + google.protobuf.Int64Value non_removed_campaign_count = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; // The bidding scheme. // @@ -86,6 +95,10 @@ message BiddingStrategy { // A bidding strategy that sets max CPC bids to target impressions on // page one or page one promoted slots on google.com. + // This field is deprecated. Creating a new bidding strategy with this + // field or attaching bidding strategies with this field to a campaign will + // fail. Mutates to strategies that already have this scheme populated are + // allowed. google.ads.googleads.v1.common.PageOnePromoted page_one_promoted = 8; // A bidding strategy that sets bids to help get as many conversions as @@ -94,11 +107,14 @@ message BiddingStrategy { // A bidding strategy that automatically optimizes towards a desired // percentage of impressions. - google.ads.googleads.v1.common.TargetImpressionShare - target_impression_share = 48; + google.ads.googleads.v1.common.TargetImpressionShare target_impression_share = 48; // A bidding strategy that sets bids based on the target fraction of // auctions where the advertiser should outrank a specific competitor. + // This field is deprecated. Creating a new bidding strategy with this + // field or attaching bidding strategies with this field to a campaign will + // fail. Mutates to strategies that already have this scheme populated are + // allowed. google.ads.googleads.v1.common.TargetOutrankShare target_outrank_share = 10; // A bidding strategy that helps you maximize revenue while averaging a diff --git a/google/ads/googleads/v1/resources/billing_setup.proto b/google/ads/googleads/v1/resources/billing_setup.proto index 143ee2892..efaa11d4c 100644 --- a/google/ads/googleads/v1/resources/billing_setup.proto +++ b/google/ads/googleads/v1/resources/billing_setup.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/billing_setup_status.proto"; import "google/ads/googleads/v1/enums/time_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -33,69 +34,82 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // Proto file describing the BillingSetup resource. -// A billing setup across Ads and Payments systems; an association between a -// Payments account and an advertiser. A billing setup is specific to one -// advertiser. +// A billing setup, which associates a payments account and an advertiser. A +// billing setup is specific to one advertiser. message BillingSetup { - // Container of Payments account information for this billing. + option (google.api.resource) = { + type: "googleads.googleapis.com/BillingSetup" + pattern: "customers/{customer}/billingSetups/{billing_setup}" + }; + + // Container of payments account information for this billing. message PaymentsAccountInfo { - // A 16 digit id used to identify the Payments account associated with the + // Output only. A 16 digit id used to identify the payments account associated with the // billing setup. // // This must be passed as a string with dashes, e.g. "1234-5678-9012-3456". - google.protobuf.StringValue payments_account_id = 1; + google.protobuf.StringValue payments_account_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name of the Payments account associated with the billing setup. + // Immutable. The name of the payments account associated with the billing setup. // - // This enables the user to specify a meaningful name for a Payments account + // This enables the user to specify a meaningful name for a payments account // to aid in reconciling monthly invoices. // // This name will be printed in the monthly invoices. - google.protobuf.StringValue payments_account_name = 2; + google.protobuf.StringValue payments_account_name = 2 [(google.api.field_behavior) = IMMUTABLE]; - // A 12 digit id used to identify the Payments profile associated with the + // Immutable. A 12 digit id used to identify the payments profile associated with the // billing setup. // // This must be passed in as a string with dashes, e.g. "1234-5678-9012". - google.protobuf.StringValue payments_profile_id = 3; + google.protobuf.StringValue payments_profile_id = 3 [(google.api.field_behavior) = IMMUTABLE]; - // The name of the Payments profile associated with the billing setup. - google.protobuf.StringValue payments_profile_name = 4; + // Output only. The name of the payments profile associated with the billing setup. + google.protobuf.StringValue payments_profile_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A secondary payments profile id present in uncommon situations, e.g. + // Output only. A secondary payments profile id present in uncommon situations, e.g. // when a sequential liability agreement has been arranged. - google.protobuf.StringValue secondary_payments_profile_id = 5; + google.protobuf.StringValue secondary_payments_profile_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // The resource name of the billing setup. + // Immutable. The resource name of the billing setup. // BillingSetup resource names have the form: // // `customers/{customer_id}/billingSetups/{billing_setup_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BillingSetup" + } + ]; - // The ID of the billing setup. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the billing setup. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The status of the billing setup. - google.ads.googleads.v1.enums.BillingSetupStatusEnum.BillingSetupStatus - status = 3; + // Output only. The status of the billing setup. + google.ads.googleads.v1.enums.BillingSetupStatusEnum.BillingSetupStatus status = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource name of the Payments account associated with this billing + // Immutable. The resource name of the payments account associated with this billing // setup. Payments resource names have the form: // // `customers/{customer_id}/paymentsAccounts/{payments_account_id}` - // When setting up billing, this is used to signup with an existing Payments + // When setting up billing, this is used to signup with an existing payments // account (and then payments_account_info should not be set). // When getting a billing setup, this and payments_account_info will be // populated. - google.protobuf.StringValue payments_account = 11; - - // The Payments account information associated with this billing setup. - // When setting up billing, this is used to signup with a new Payments account + google.protobuf.StringValue payments_account = 11 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/PaymentsAccount" + } + ]; + + // Immutable. The payments account information associated with this billing setup. + // When setting up billing, this is used to signup with a new payments account // (and then payments_account should not be set). // When getting a billing setup, this and payments_account will be // populated. - PaymentsAccountInfo payments_account_info = 12; + PaymentsAccountInfo payments_account_info = 12 [(google.api.field_behavior) = IMMUTABLE]; // When creating a new billing setup, this is when the setup should take // effect. NOW is the only acceptable start time if the customer doesn't have @@ -105,21 +119,21 @@ message BillingSetup { // However, if the setup was approved (see status) after the requested start // time, then this is the approval time. oneof start_time { - // The start date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. Only a + // Immutable. The start date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. Only a // future time is allowed. - google.protobuf.StringValue start_date_time = 9; + google.protobuf.StringValue start_date_time = 9 [(google.api.field_behavior) = IMMUTABLE]; - // The start time as a type. Only NOW is allowed. - google.ads.googleads.v1.enums.TimeTypeEnum.TimeType start_time_type = 10; + // Immutable. The start time as a type. Only NOW is allowed. + google.ads.googleads.v1.enums.TimeTypeEnum.TimeType start_time_type = 10 [(google.api.field_behavior) = IMMUTABLE]; } // When the billing setup ends / ended. This is either FOREVER or the start // time of the next scheduled billing setup. oneof end_time { - // The end date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. - google.protobuf.StringValue end_date_time = 13; + // Output only. The end date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue end_date_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The end time as a type. The only possible value is FOREVER. - google.ads.googleads.v1.enums.TimeTypeEnum.TimeType end_time_type = 14; + // Output only. The end time as a type. The only possible value is FOREVER. + google.ads.googleads.v1.enums.TimeTypeEnum.TimeType end_time_type = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v1/resources/campaign.proto b/google/ads/googleads/v1/resources/campaign.proto index 4eeb48747..0f3ba2ada 100644 --- a/google/ads/googleads/v1/resources/campaign.proto +++ b/google/ads/googleads/v1/resources/campaign.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -37,6 +36,8 @@ import "google/ads/googleads/v1/enums/payment_mode.proto"; import "google/ads/googleads/v1/enums/positive_geo_target_type.proto"; import "google/ads/googleads/v1/enums/vanity_pharma_display_url_mode.proto"; import "google/ads/googleads/v1/enums/vanity_pharma_text.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -53,6 +54,11 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A campaign. message Campaign { + option (google.api.resource) = { + type: "googleads.googleapis.com/Campaign" + pattern: "customers/{customer}/campaigns/{campaign}" + }; + // The network settings for the campaign. message NetworkSettings { // Whether ads will be served with google.com search results. @@ -73,18 +79,21 @@ message Campaign { // Campaign-level settings for hotel ads. message HotelSettingInfo { - // The linked Hotel Center account. - google.protobuf.Int64Value hotel_center_id = 1; + // Immutable. The linked Hotel Center account. + google.protobuf.Int64Value hotel_center_id = 1 [(google.api.field_behavior) = IMMUTABLE]; } - // Describes how unbranded pharma ads will be displayed. - message VanityPharma { - // The display mode for vanity pharma URLs. - google.ads.googleads.v1.enums.VanityPharmaDisplayUrlModeEnum.VanityPharmaDisplayUrlMode vanity_pharma_display_url_mode = 1; + // Campaign-level settings for App Campaigns. + message AppCampaignSetting { + // Represents the goal which the bidding strategy of this app campaign + // should optimize towards. + google.ads.googleads.v1.enums.AppCampaignBiddingStrategyGoalTypeEnum.AppCampaignBiddingStrategyGoalType bidding_strategy_goal_type = 1; - // The text that will be displayed in display URL of the text ad when - // website description is the selected display mode for vanity pharma URLs. - google.ads.googleads.v1.enums.VanityPharmaTextEnum.VanityPharmaText vanity_pharma_text = 2; + // Immutable. A string that uniquely identifies a mobile application. + google.protobuf.StringValue app_id = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The application store that distributes this specific app. + google.ads.googleads.v1.enums.AppCampaignAppStoreEnum.AppCampaignAppStore app_store = 3 [(google.api.field_behavior) = IMMUTABLE]; } // The setting for controlling Dynamic Search Ads (DSA). @@ -99,24 +108,39 @@ message Campaign { // Whether the campaign uses advertiser supplied URLs exclusively. google.protobuf.BoolValue use_supplied_urls_only = 3; - // The list of page feeds associated with the campaign. - repeated google.protobuf.StringValue feeds = 5; + // Output only. The list of page feeds associated with the campaign. + repeated google.protobuf.StringValue feeds = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + } + + // Describes how unbranded pharma ads will be displayed. + message VanityPharma { + // The display mode for vanity pharma URLs. + google.ads.googleads.v1.enums.VanityPharmaDisplayUrlModeEnum.VanityPharmaDisplayUrlMode vanity_pharma_display_url_mode = 1; + + // The text that will be displayed in display URL of the text ad when + // website description is the selected display mode for vanity pharma URLs. + google.ads.googleads.v1.enums.VanityPharmaTextEnum.VanityPharmaText vanity_pharma_text = 2; } // The setting for Shopping campaigns. Defines the universe of products that // can be advertised by the campaign, and how this campaign interacts with // other Shopping campaigns. message ShoppingSetting { - // ID of the Merchant Center account. + // Immutable. ID of the Merchant Center account. // This field is required for create operations. This field is immutable for // Shopping campaigns. - google.protobuf.Int64Value merchant_id = 1; + google.protobuf.Int64Value merchant_id = 1 [(google.api.field_behavior) = IMMUTABLE]; - // Sales country of products to include in the campaign. + // Immutable. Sales country of products to include in the campaign. // This field is required for Shopping campaigns. This field is immutable. // This field is optional for non-Shopping campaigns, but it must be equal // to 'ZZ' if set. - google.protobuf.StringValue sales_country = 2; + google.protobuf.StringValue sales_country = 2 [(google.api.field_behavior) = IMMUTABLE]; // Priority of the campaign. Campaigns with numerically higher priorities // take precedence over those with lower priorities. @@ -130,30 +154,10 @@ message Campaign { google.protobuf.BoolValue enable_local = 4; } - // Campaign level settings for tracking information. + // Campaign-level settings for tracking information. message TrackingSetting { - // The url used for dynamic tracking. - google.protobuf.StringValue tracking_url = 1; - } - - // Selective optimization setting for this campaign, which includes a set of - // conversion actions to optimize this campaign towards. - message SelectiveOptimization { - // The selected set of conversion actions for optimizing this campaign. - repeated google.protobuf.StringValue conversion_actions = 1; - } - - // Campaign level settings for App Campaigns. - message AppCampaignSetting { - // Represents the goal which the bidding strategy of this app campaign - // should optimize towards. - google.ads.googleads.v1.enums.AppCampaignBiddingStrategyGoalTypeEnum.AppCampaignBiddingStrategyGoalType bidding_strategy_goal_type = 1; - - // A string that uniquely identifies a mobile application. - google.protobuf.StringValue app_id = 2; - - // The application store that distributes this specific app. - google.ads.googleads.v1.enums.AppCampaignAppStoreEnum.AppCampaignAppStore app_store = 3; + // Output only. The url used for dynamic tracking. + google.protobuf.StringValue tracking_url = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Represents a collection of settings related to ads geotargeting. @@ -165,14 +169,28 @@ message Campaign { google.ads.googleads.v1.enums.NegativeGeoTargetTypeEnum.NegativeGeoTargetType negative_geo_target_type = 2; } - // The resource name of the campaign. + // Selective optimization setting for this campaign, which includes a set of + // conversion actions to optimize this campaign towards. + message SelectiveOptimization { + // The selected set of conversion actions for optimizing this campaign. + repeated google.protobuf.StringValue conversion_actions = 1 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ConversionAction" + }]; + } + + // Immutable. The resource name of the campaign. // Campaign resource names have the form: // // `customers/{customer_id}/campaigns/{campaign_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The ID of the campaign. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the campaign. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the campaign. // @@ -188,13 +206,13 @@ message Campaign { // When a new campaign is added, the status defaults to ENABLED. google.ads.googleads.v1.enums.CampaignStatusEnum.CampaignStatus status = 5; - // The ad serving status of the campaign. - google.ads.googleads.v1.enums.CampaignServingStatusEnum.CampaignServingStatus serving_status = 21; + // Output only. The ad serving status of the campaign. + google.ads.googleads.v1.enums.CampaignServingStatusEnum.CampaignServingStatus serving_status = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; // The ad serving optimization status of the campaign. google.ads.googleads.v1.enums.AdServingOptimizationStatusEnum.AdServingOptimizationStatus ad_serving_optimization_status = 8; - // The primary serving target for ads within the campaign. + // Immutable. The primary serving target for ads within the campaign. // The targeting options can be refined in `network_settings`. // // This field is required and should not be empty when creating new @@ -202,14 +220,14 @@ message Campaign { // // Can be set only when creating campaigns. // After the campaign is created, the field can not be changed. - google.ads.googleads.v1.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 9; + google.ads.googleads.v1.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 9 [(google.api.field_behavior) = IMMUTABLE]; - // Optional refinement to `advertising_channel_type`. + // Immutable. Optional refinement to `advertising_channel_type`. // Must be a valid sub-type of the parent channel type. // // Can be set only when creating campaigns. // After campaign is created, the field can not be changed. - google.ads.googleads.v1.enums.AdvertisingChannelSubTypeEnum.AdvertisingChannelSubType advertising_channel_sub_type = 10; + google.ads.googleads.v1.enums.AdvertisingChannelSubTypeEnum.AdvertisingChannelSubType advertising_channel_sub_type = 10 [(google.api.field_behavior) = IMMUTABLE]; // The URL template for constructing a tracking URL. google.protobuf.StringValue tracking_url_template = 11; @@ -225,8 +243,8 @@ message Campaign { // The network settings for the campaign. NetworkSettings network_settings = 14; - // The hotel setting for the campaign. - HotelSettingInfo hotel_setting = 32; + // Immutable. The hotel setting for the campaign. + HotelSettingInfo hotel_setting = 32 [(google.api.field_behavior) = IMMUTABLE]; // The setting for controlling Dynamic Search Ads (DSA). DynamicSearchAdsSetting dynamic_search_ads_setting = 33; @@ -243,29 +261,41 @@ message Campaign { // The setting related to App Campaign. AppCampaignSetting app_campaign_setting = 51; - // The resource names of labels attached to this campaign. - repeated google.protobuf.StringValue labels = 53; + // Output only. The resource names of labels attached to this campaign. + repeated google.protobuf.StringValue labels = 53 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignLabel" + } + ]; - // The type of campaign: normal, draft, or experiment. - google.ads.googleads.v1.enums.CampaignExperimentTypeEnum.CampaignExperimentType experiment_type = 17; + // Output only. The type of campaign: normal, draft, or experiment. + google.ads.googleads.v1.enums.CampaignExperimentTypeEnum.CampaignExperimentType experiment_type = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource name of the base campaign of a draft or experiment campaign. + // Output only. The resource name of the base campaign of a draft or experiment campaign. // For base campaigns, this is equal to `resource_name`. // // This field is read-only. - google.protobuf.StringValue base_campaign = 28; + google.protobuf.StringValue base_campaign = 28 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; // The budget of the campaign. - google.protobuf.StringValue campaign_budget = 6; + google.protobuf.StringValue campaign_budget = 6 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBudget" + }]; - // The type of bidding strategy. + // Output only. The type of bidding strategy. // // A bidding strategy can be created by setting either the bidding scheme to // create a standard bidding strategy or the `bidding_strategy` field to // create a portfolio bidding strategy. // // This field is read-only. - google.ads.googleads.v1.enums.BiddingStrategyTypeEnum.BiddingStrategyType bidding_strategy_type = 22; + google.ads.googleads.v1.enums.BiddingStrategyTypeEnum.BiddingStrategyType bidding_strategy_type = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; // The date when campaign started. // @@ -284,8 +314,8 @@ message Campaign { // A list that limits how often each user will see this campaign's ads. repeated google.ads.googleads.v1.common.FrequencyCapEntry frequency_caps = 40; - // 3-Tier Brand Safety setting for the campaign. - google.ads.googleads.v1.enums.BrandSafetySuitabilityEnum.BrandSafetySuitability video_brand_safety_suitability = 42; + // Output only. 3-Tier Brand Safety setting for the campaign. + google.ads.googleads.v1.enums.BrandSafetySuitabilityEnum.BrandSafetySuitability video_brand_safety_suitability = 42 [(google.api.field_behavior) = OUTPUT_ONLY]; // Describes how unbranded pharma ads will be displayed. VanityPharma vanity_pharma = 44; @@ -294,8 +324,8 @@ message Campaign { // conversion actions to optimize this campaign towards. SelectiveOptimization selective_optimization = 45; - // Campaign level settings for tracking information. - TrackingSetting tracking_setting = 46; + // Output only. Campaign-level settings for tracking information. + TrackingSetting tracking_setting = 46 [(google.api.field_behavior) = OUTPUT_ONLY]; // Payment mode for the campaign. google.ads.googleads.v1.enums.PaymentModeEnum.PaymentMode payment_mode = 52; @@ -306,7 +336,9 @@ message Campaign { // standard, that is embedded into the campaign. oneof campaign_bidding_strategy { // Portfolio bidding strategy used by campaign. - google.protobuf.StringValue bidding_strategy = 23; + google.protobuf.StringValue bidding_strategy = 23 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/BiddingStrategy" + }]; // Commission is an automatic bidding strategy in which the advertiser pays // a certain portion of the conversion value. @@ -321,8 +353,8 @@ message Campaign { // impressions. google.ads.googleads.v1.common.ManualCpm manual_cpm = 25; - // A bidding strategy that pays a configurable amount per video view. - google.ads.googleads.v1.common.ManualCpv manual_cpv = 37; + // Output only. A bidding strategy that pays a configurable amount per video view. + google.ads.googleads.v1.common.ManualCpv manual_cpv = 37 [(google.api.field_behavior) = OUTPUT_ONLY]; // Standard Maximize Conversions bidding strategy that automatically // maximizes number of conversions given a daily budget. diff --git a/google/ads/googleads/v1/resources/campaign_audience_view.proto b/google/ads/googleads/v1/resources/campaign_audience_view.proto index 431db796f..ba3cf6d76 100644 --- a/google/ads/googleads/v1/resources/campaign_audience_view.proto +++ b/google/ads/googleads/v1/resources/campaign_audience_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; @@ -36,10 +37,19 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // aggregated by campaign and audience criterion. This view only includes // audiences attached at the campaign level. message CampaignAudienceView { - // The resource name of the campaign audience view. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignAudienceView" + pattern: "customers/{customer}/campaignAudienceViews/{campaign_audience_view}" + }; + + // Output only. The resource name of the campaign audience view. // Campaign audience view resource names have the form: // - // // `customers/{customer_id}/campaignAudienceViews/{campaign_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignAudienceView" + } + ]; } diff --git a/google/ads/googleads/v1/resources/campaign_bid_modifier.proto b/google/ads/googleads/v1/resources/campaign_bid_modifier.proto index 6dfbb9eca..1bbbe87b7 100644 --- a/google/ads/googleads/v1/resources/campaign_bid_modifier.proto +++ b/google/ads/googleads/v1/resources/campaign_bid_modifier.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/criteria.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -34,26 +35,41 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // Represents a bid-modifiable only criterion at the campaign level. message CampaignBidModifier { - // The resource name of the campaign bid modifier. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignBidModifier" + pattern: "customers/{customer}/campaignBidModifiers/{campaign_bid_modifier}" + }; + + // Immutable. The resource name of the campaign bid modifier. // Campaign bid modifier resource names have the form: // // `customers/{customer_id}/campaignBidModifiers/{campaign_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBidModifier" + } + ]; - // The campaign to which this criterion belongs. - google.protobuf.StringValue campaign = 2; + // Output only. The campaign to which this criterion belongs. + google.protobuf.StringValue campaign = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The ID of the criterion to bid modify. + // Output only. The ID of the criterion to bid modify. // // This field is ignored for mutates. - google.protobuf.Int64Value criterion_id = 3; + google.protobuf.Int64Value criterion_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The modifier for the bid when the criterion matches. google.protobuf.DoubleValue bid_modifier = 4; // The criterion of this campaign bid modifier. oneof criterion { - // Criterion for interaction type. Only supported for search campaigns. - google.ads.googleads.v1.common.InteractionTypeInfo interaction_type = 5; + // Immutable. Criterion for interaction type. Only supported for search campaigns. + google.ads.googleads.v1.common.InteractionTypeInfo interaction_type = 5 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v1/resources/campaign_budget.proto b/google/ads/googleads/v1/resources/campaign_budget.proto index 48555f962..df1aaa4a2 100644 --- a/google/ads/googleads/v1/resources/campaign_budget.proto +++ b/google/ads/googleads/v1/resources/campaign_budget.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -21,8 +20,10 @@ import "google/ads/googleads/v1/enums/budget_delivery_method.proto"; import "google/ads/googleads/v1/enums/budget_period.proto"; import "google/ads/googleads/v1/enums/budget_status.proto"; import "google/ads/googleads/v1/enums/budget_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -37,19 +38,29 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A campaign budget. message CampaignBudget { - // The resource name of the campaign budget. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignBudget" + pattern: "customers/{customer}/campaignBudgets/{campaign_budget}" + }; + + // Immutable. The resource name of the campaign budget. // Campaign budget resource names have the form: // // `customers/{customer_id}/campaignBudgets/{budget_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBudget" + } + ]; - // The ID of the campaign budget. + // Output only. The ID of the campaign budget. // // A campaign budget is created using the CampaignBudgetService create // operation and is assigned a budget ID. A budget ID can be shared across // different campaigns; the system will then allocate the campaign budget // among different campaigns to get optimum results. - google.protobuf.Int64Value id = 3; + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the campaign budget. // @@ -72,15 +83,14 @@ message CampaignBudget { // currency unit. google.protobuf.Int64Value total_amount_micros = 10; - // The status of this campaign budget. This field is read-only. - google.ads.googleads.v1.enums.BudgetStatusEnum.BudgetStatus status = 6; + // Output only. The status of this campaign budget. This field is read-only. + google.ads.googleads.v1.enums.BudgetStatusEnum.BudgetStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // The delivery method that determines the rate at which the campaign budget // is spent. // // Defaults to STANDARD if unspecified in a create operation. - google.ads.googleads.v1.enums.BudgetDeliveryMethodEnum.BudgetDeliveryMethod - delivery_method = 7; + google.ads.googleads.v1.enums.BudgetDeliveryMethodEnum.BudgetDeliveryMethod delivery_method = 7; // Specifies whether the budget is explicitly shared. Defaults to true if // unspecified in a create operation. @@ -99,53 +109,49 @@ message CampaignBudget { // A shared campaign budget can never become non-shared. google.protobuf.BoolValue explicitly_shared = 8; - // The number of campaigns actively using the budget. + // Output only. The number of campaigns actively using the budget. // // This field is read-only. - google.protobuf.Int64Value reference_count = 9; + google.protobuf.Int64Value reference_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Indicates whether there is a recommended budget for this campaign budget. + // Output only. Indicates whether there is a recommended budget for this campaign budget. // // This field is read-only. - google.protobuf.BoolValue has_recommended_budget = 11; + google.protobuf.BoolValue has_recommended_budget = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The recommended budget amount. If no recommendation is available, this will + // Output only. The recommended budget amount. If no recommendation is available, this will // be set to the budget amount. // Amount is specified in micros, where one million is equivalent to one // currency unit. // // This field is read-only. - google.protobuf.Int64Value recommended_budget_amount_micros = 12; + google.protobuf.Int64Value recommended_budget_amount_micros = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Period over which to spend the budget. Defaults to DAILY if not specified. - google.ads.googleads.v1.enums.BudgetPeriodEnum.BudgetPeriod period = 13; + // Immutable. Period over which to spend the budget. Defaults to DAILY if not specified. + google.ads.googleads.v1.enums.BudgetPeriodEnum.BudgetPeriod period = 13 [(google.api.field_behavior) = IMMUTABLE]; - // The estimated change in weekly clicks if the recommended budget is applied. + // Output only. The estimated change in weekly clicks if the recommended budget is applied. // // This field is read-only. - google.protobuf.Int64Value recommended_budget_estimated_change_weekly_clicks = - 14; + google.protobuf.Int64Value recommended_budget_estimated_change_weekly_clicks = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The estimated change in weekly cost in micros if the recommended budget is + // Output only. The estimated change in weekly cost in micros if the recommended budget is // applied. One million is equivalent to one currency unit. // // This field is read-only. - google.protobuf.Int64Value - recommended_budget_estimated_change_weekly_cost_micros = 15; + google.protobuf.Int64Value recommended_budget_estimated_change_weekly_cost_micros = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The estimated change in weekly interactions if the recommended budget is + // Output only. The estimated change in weekly interactions if the recommended budget is // applied. // // This field is read-only. - google.protobuf.Int64Value - recommended_budget_estimated_change_weekly_interactions = 16; + google.protobuf.Int64Value recommended_budget_estimated_change_weekly_interactions = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The estimated change in weekly views if the recommended budget is applied. + // Output only. The estimated change in weekly views if the recommended budget is applied. // // This field is read-only. - google.protobuf.Int64Value recommended_budget_estimated_change_weekly_views = - 17; + google.protobuf.Int64Value recommended_budget_estimated_change_weekly_views = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The type of the campaign budget. - google.ads.googleads.v1.enums.BudgetTypeEnum.BudgetType type = 18; + // Immutable. The type of the campaign budget. + google.ads.googleads.v1.enums.BudgetTypeEnum.BudgetType type = 18 [(google.api.field_behavior) = IMMUTABLE]; } diff --git a/google/ads/googleads/v1/resources/campaign_criterion.proto b/google/ads/googleads/v1/resources/campaign_criterion.proto index 8c959400f..4e9230035 100644 --- a/google/ads/googleads/v1/resources/campaign_criterion.proto +++ b/google/ads/googleads/v1/resources/campaign_criterion.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,8 +19,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/criteria.proto"; import "google/ads/googleads/v1/enums/campaign_criterion_status.proto"; import "google/ads/googleads/v1/enums/criterion_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -36,118 +37,129 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A campaign criterion. message CampaignCriterion { - // The resource name of the campaign criterion. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignCriterion" + pattern: "customers/{customer}/campaignCriteria/{campaign_criterion}" + }; + + // Immutable. The resource name of the campaign criterion. // Campaign criterion resource names have the form: // // `customers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}` - string resource_name = 1; - - // The campaign to which the criterion belongs. - google.protobuf.StringValue campaign = 4; - - // The ID of the criterion. + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterion" + } + ]; + + // Immutable. The campaign to which the criterion belongs. + google.protobuf.StringValue campaign = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Output only. The ID of the criterion. // // This field is ignored during mutate. - google.protobuf.Int64Value criterion_id = 5; + google.protobuf.Int64Value criterion_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // The modifier for the bids when the criterion matches. The modifier must be // in the range: 0.1 - 10.0. Most targetable criteria types support modifiers. // Use 0 to opt out of a Device type. google.protobuf.FloatValue bid_modifier = 14; - // Whether to target (`false`) or exclude (`true`) the criterion. - google.protobuf.BoolValue negative = 7; + // Immutable. Whether to target (`false`) or exclude (`true`) the criterion. + google.protobuf.BoolValue negative = 7 [(google.api.field_behavior) = IMMUTABLE]; - // The type of the criterion. - google.ads.googleads.v1.enums.CriterionTypeEnum.CriterionType type = 6; + // Output only. The type of the criterion. + google.ads.googleads.v1.enums.CriterionTypeEnum.CriterionType type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // The status of the criterion. - google.ads.googleads.v1.enums.CampaignCriterionStatusEnum - .CampaignCriterionStatus status = 35; + google.ads.googleads.v1.enums.CampaignCriterionStatusEnum.CampaignCriterionStatus status = 35; // The campaign criterion. // // Exactly one must be set. oneof criterion { - // Keyword. - google.ads.googleads.v1.common.KeywordInfo keyword = 8; + // Immutable. Keyword. + google.ads.googleads.v1.common.KeywordInfo keyword = 8 [(google.api.field_behavior) = IMMUTABLE]; - // Placement. - google.ads.googleads.v1.common.PlacementInfo placement = 9; + // Immutable. Placement. + google.ads.googleads.v1.common.PlacementInfo placement = 9 [(google.api.field_behavior) = IMMUTABLE]; - // Mobile app category. - google.ads.googleads.v1.common.MobileAppCategoryInfo mobile_app_category = - 10; + // Immutable. Mobile app category. + google.ads.googleads.v1.common.MobileAppCategoryInfo mobile_app_category = 10 [(google.api.field_behavior) = IMMUTABLE]; - // Mobile application. - google.ads.googleads.v1.common.MobileApplicationInfo mobile_application = - 11; + // Immutable. Mobile application. + google.ads.googleads.v1.common.MobileApplicationInfo mobile_application = 11 [(google.api.field_behavior) = IMMUTABLE]; - // Location. - google.ads.googleads.v1.common.LocationInfo location = 12; + // Immutable. Location. + google.ads.googleads.v1.common.LocationInfo location = 12 [(google.api.field_behavior) = IMMUTABLE]; - // Device. - google.ads.googleads.v1.common.DeviceInfo device = 13; + // Immutable. Device. + google.ads.googleads.v1.common.DeviceInfo device = 13 [(google.api.field_behavior) = IMMUTABLE]; - // Ad Schedule. - google.ads.googleads.v1.common.AdScheduleInfo ad_schedule = 15; + // Immutable. Ad Schedule. + google.ads.googleads.v1.common.AdScheduleInfo ad_schedule = 15 [(google.api.field_behavior) = IMMUTABLE]; - // Age range. - google.ads.googleads.v1.common.AgeRangeInfo age_range = 16; + // Immutable. Age range. + google.ads.googleads.v1.common.AgeRangeInfo age_range = 16 [(google.api.field_behavior) = IMMUTABLE]; - // Gender. - google.ads.googleads.v1.common.GenderInfo gender = 17; + // Immutable. Gender. + google.ads.googleads.v1.common.GenderInfo gender = 17 [(google.api.field_behavior) = IMMUTABLE]; - // Income range. - google.ads.googleads.v1.common.IncomeRangeInfo income_range = 18; + // Immutable. Income range. + google.ads.googleads.v1.common.IncomeRangeInfo income_range = 18 [(google.api.field_behavior) = IMMUTABLE]; - // Parental status. - google.ads.googleads.v1.common.ParentalStatusInfo parental_status = 19; + // Immutable. Parental status. + google.ads.googleads.v1.common.ParentalStatusInfo parental_status = 19 [(google.api.field_behavior) = IMMUTABLE]; - // User List. - google.ads.googleads.v1.common.UserListInfo user_list = 22; + // Immutable. User List. + google.ads.googleads.v1.common.UserListInfo user_list = 22 [(google.api.field_behavior) = IMMUTABLE]; - // YouTube Video. - google.ads.googleads.v1.common.YouTubeVideoInfo youtube_video = 20; + // Immutable. YouTube Video. + google.ads.googleads.v1.common.YouTubeVideoInfo youtube_video = 20 [(google.api.field_behavior) = IMMUTABLE]; - // YouTube Channel. - google.ads.googleads.v1.common.YouTubeChannelInfo youtube_channel = 21; + // Immutable. YouTube Channel. + google.ads.googleads.v1.common.YouTubeChannelInfo youtube_channel = 21 [(google.api.field_behavior) = IMMUTABLE]; - // Proximity. - google.ads.googleads.v1.common.ProximityInfo proximity = 23; + // Immutable. Proximity. + google.ads.googleads.v1.common.ProximityInfo proximity = 23 [(google.api.field_behavior) = IMMUTABLE]; - // Topic. - google.ads.googleads.v1.common.TopicInfo topic = 24; + // Immutable. Topic. + google.ads.googleads.v1.common.TopicInfo topic = 24 [(google.api.field_behavior) = IMMUTABLE]; - // Listing scope. - google.ads.googleads.v1.common.ListingScopeInfo listing_scope = 25; + // Immutable. Listing scope. + google.ads.googleads.v1.common.ListingScopeInfo listing_scope = 25 [(google.api.field_behavior) = IMMUTABLE]; - // Language. - google.ads.googleads.v1.common.LanguageInfo language = 26; + // Immutable. Language. + google.ads.googleads.v1.common.LanguageInfo language = 26 [(google.api.field_behavior) = IMMUTABLE]; - // IpBlock. - google.ads.googleads.v1.common.IpBlockInfo ip_block = 27; + // Immutable. IpBlock. + google.ads.googleads.v1.common.IpBlockInfo ip_block = 27 [(google.api.field_behavior) = IMMUTABLE]; - // ContentLabel. - google.ads.googleads.v1.common.ContentLabelInfo content_label = 28; + // Immutable. ContentLabel. + google.ads.googleads.v1.common.ContentLabelInfo content_label = 28 [(google.api.field_behavior) = IMMUTABLE]; - // Carrier. - google.ads.googleads.v1.common.CarrierInfo carrier = 29; + // Immutable. Carrier. + google.ads.googleads.v1.common.CarrierInfo carrier = 29 [(google.api.field_behavior) = IMMUTABLE]; - // User Interest. - google.ads.googleads.v1.common.UserInterestInfo user_interest = 30; + // Immutable. User Interest. + google.ads.googleads.v1.common.UserInterestInfo user_interest = 30 [(google.api.field_behavior) = IMMUTABLE]; - // Webpage. - google.ads.googleads.v1.common.WebpageInfo webpage = 31; + // Immutable. Webpage. + google.ads.googleads.v1.common.WebpageInfo webpage = 31 [(google.api.field_behavior) = IMMUTABLE]; - // Operating system version. - google.ads.googleads.v1.common.OperatingSystemVersionInfo - operating_system_version = 32; + // Immutable. Operating system version. + google.ads.googleads.v1.common.OperatingSystemVersionInfo operating_system_version = 32 [(google.api.field_behavior) = IMMUTABLE]; - // Mobile Device. - google.ads.googleads.v1.common.MobileDeviceInfo mobile_device = 33; + // Immutable. Mobile Device. + google.ads.googleads.v1.common.MobileDeviceInfo mobile_device = 33 [(google.api.field_behavior) = IMMUTABLE]; - // Location Group - google.ads.googleads.v1.common.LocationGroupInfo location_group = 34; + // Immutable. Location Group + google.ads.googleads.v1.common.LocationGroupInfo location_group = 34 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v1/resources/campaign_criterion_simulation.proto b/google/ads/googleads/v1/resources/campaign_criterion_simulation.proto index d85140b0f..451fcf83c 100644 --- a/google/ads/googleads/v1/resources/campaign_criterion_simulation.proto +++ b/google/ads/googleads/v1/resources/campaign_criterion_simulation.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,8 +19,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/simulation.proto"; import "google/ads/googleads/v1/enums/simulation_modification_method.proto"; import "google/ads/googleads/v1/enums/simulation_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -38,39 +39,47 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // channel type, criterion ids, simulation type and simulation modification // method is detailed below respectively. // -// SEARCH 30000,30001,30002 BID_MODIFIER UNIFORM -// DISPLAY 30001 BID_MODIFIER UNIFORM +// 1. SEARCH - 30000,30001,30002 - BID_MODIFIER - UNIFORM +// 2. SHOPPING - 30000,30001,30002 - BID_MODIFIER - UNIFORM +// 3. DISPLAY - 30001 - BID_MODIFIER - UNIFORM message CampaignCriterionSimulation { - // The resource name of the campaign criterion simulation. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignCriterionSimulation" + pattern: "customers/{customer}/campaignCriterionSimulations/{campaign_criterion_simulation}" + }; + + // Output only. The resource name of the campaign criterion simulation. // Campaign criterion simulation resource names have the form: // - // // `customers/{customer_id}/campaignCriterionSimulations/{campaign_id}~{criterion_id}~{type}~{modification_method}~{start_date}~{end_date}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterionSimulation" + } + ]; - // Campaign ID of the simulation. - google.protobuf.Int64Value campaign_id = 2; + // Output only. Campaign ID of the simulation. + google.protobuf.Int64Value campaign_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Criterion ID of the simulation. - google.protobuf.Int64Value criterion_id = 3; + // Output only. Criterion ID of the simulation. + google.protobuf.Int64Value criterion_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The field that the simulation modifies. - google.ads.googleads.v1.enums.SimulationTypeEnum.SimulationType type = 4; + // Output only. The field that the simulation modifies. + google.ads.googleads.v1.enums.SimulationTypeEnum.SimulationType type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // How the simulation modifies the field. - google.ads.googleads.v1.enums.SimulationModificationMethodEnum - .SimulationModificationMethod modification_method = 5; + // Output only. How the simulation modifies the field. + google.ads.googleads.v1.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // First day on which the simulation is based, in YYYY-MM-DD format. - google.protobuf.StringValue start_date = 6; + // Output only. First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Last day on which the simulation is based, in YYYY-MM-DD format. - google.protobuf.StringValue end_date = 7; + // Output only. Last day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue end_date = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // List of simulation points. oneof point_list { - // Simulation points if the simulation type is BID_MODIFIER. - google.ads.googleads.v1.common.BidModifierSimulationPointList - bid_modifier_point_list = 8; + // Output only. Simulation points if the simulation type is BID_MODIFIER. + google.ads.googleads.v1.common.BidModifierSimulationPointList bid_modifier_point_list = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v1/resources/campaign_draft.proto b/google/ads/googleads/v1/resources/campaign_draft.proto index 3ad444338..f09c2e9ba 100644 --- a/google/ads/googleads/v1/resources/campaign_draft.proto +++ b/google/ads/googleads/v1/resources/campaign_draft.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/campaign_draft_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -34,19 +35,34 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A campaign draft. message CampaignDraft { - // The resource name of the campaign draft. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignDraft" + pattern: "customers/{customer}/campaignDrafts/{campaign_draft}" + }; + + // Immutable. The resource name of the campaign draft. // Campaign draft resource names have the form: // // `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignDraft" + } + ]; - // The ID of the draft. + // Output only. The ID of the draft. // // This field is read-only. - google.protobuf.Int64Value draft_id = 2; + google.protobuf.Int64Value draft_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The base campaign to which the draft belongs. - google.protobuf.StringValue base_campaign = 3; + // Immutable. The base campaign to which the draft belongs. + google.protobuf.StringValue base_campaign = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; // The name of the campaign draft. // @@ -57,22 +73,27 @@ message CampaignDraft { // (code point 0xA) or carriage return (code point 0xD) characters. google.protobuf.StringValue name = 4; - // Resource name of the Campaign that results from overlaying the draft + // Output only. Resource name of the Campaign that results from overlaying the draft // changes onto the base campaign. // // This field is read-only. - google.protobuf.StringValue draft_campaign = 5; + google.protobuf.StringValue draft_campaign = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The status of the campaign draft. This field is read-only. + // Output only. The status of the campaign draft. This field is read-only. // // When a new campaign draft is added, the status defaults to PROPOSED. - google.ads.googleads.v1.enums.CampaignDraftStatusEnum.CampaignDraftStatus status = 6; + google.ads.googleads.v1.enums.CampaignDraftStatusEnum.CampaignDraftStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether there is an experiment based on this draft currently serving. - google.protobuf.BoolValue has_experiment_running = 7; + // Output only. Whether there is an experiment based on this draft currently serving. + google.protobuf.BoolValue has_experiment_running = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource name of the long-running operation that can be used to poll + // Output only. The resource name of the long-running operation that can be used to poll // for completion of draft promotion. This is only set if the draft promotion // is in progress or finished. - google.protobuf.StringValue long_running_operation = 8; + google.protobuf.StringValue long_running_operation = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/campaign_experiment.proto b/google/ads/googleads/v1/resources/campaign_experiment.proto index 336999b31..6b62d7631 100644 --- a/google/ads/googleads/v1/resources/campaign_experiment.proto +++ b/google/ads/googleads/v1/resources/campaign_experiment.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/campaign_experiment_status.proto"; import "google/ads/googleads/v1/enums/campaign_experiment_traffic_split_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -36,19 +37,34 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // An A/B experiment that compares the performance of the base campaign // (the control) and a variation of that campaign (the experiment). message CampaignExperiment { - // The resource name of the campaign experiment. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignExperiment" + pattern: "customers/{customer}/campaignExperiments/{campaign_experiment}" + }; + + // Immutable. The resource name of the campaign experiment. // Campaign experiment resource names have the form: // // `customers/{customer_id}/campaignExperiments/{campaign_experiment_id}` - string resource_name = 1; - - // The ID of the campaign experiment. + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExperiment" + } + ]; + + // Output only. The ID of the campaign experiment. // // This field is read-only. - google.protobuf.Int64Value id = 2; + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The campaign draft with staged changes to the base campaign. - google.protobuf.StringValue campaign_draft = 3; + // Immutable. The campaign draft with staged changes to the base campaign. + google.protobuf.StringValue campaign_draft = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignDraft" + } + ]; // The name of the campaign experiment. // @@ -63,24 +79,29 @@ message CampaignExperiment { // The description of the experiment. google.protobuf.StringValue description = 5; - // Share of traffic directed to experiment as a percent (must be between 1 and + // Immutable. Share of traffic directed to experiment as a percent (must be between 1 and // 99 inclusive. Base campaign receives the remainder of the traffic // (100 - traffic_split_percent). Required for create. - google.protobuf.Int64Value traffic_split_percent = 6; + google.protobuf.Int64Value traffic_split_percent = 6 [(google.api.field_behavior) = IMMUTABLE]; - // Determines the behavior of the traffic split. - google.ads.googleads.v1.enums.CampaignExperimentTrafficSplitTypeEnum.CampaignExperimentTrafficSplitType traffic_split_type = 7; + // Immutable. Determines the behavior of the traffic split. + google.ads.googleads.v1.enums.CampaignExperimentTrafficSplitTypeEnum.CampaignExperimentTrafficSplitType traffic_split_type = 7 [(google.api.field_behavior) = IMMUTABLE]; - // The experiment campaign, as opposed to the base campaign. - google.protobuf.StringValue experiment_campaign = 8; + // Output only. The experiment campaign, as opposed to the base campaign. + google.protobuf.StringValue experiment_campaign = 8 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The status of the campaign experiment. This field is read-only. - google.ads.googleads.v1.enums.CampaignExperimentStatusEnum.CampaignExperimentStatus status = 9; + // Output only. The status of the campaign experiment. This field is read-only. + google.ads.googleads.v1.enums.CampaignExperimentStatusEnum.CampaignExperimentStatus status = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource name of the long-running operation that can be used to poll + // Output only. The resource name of the long-running operation that can be used to poll // for completion of experiment create or promote. The most recent long // running operation is returned. - google.protobuf.StringValue long_running_operation = 10; + google.protobuf.StringValue long_running_operation = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Date when the campaign experiment starts. By default, the experiment starts // now or on the campaign's start date, whichever is later. If this field is diff --git a/google/ads/googleads/v1/resources/campaign_extension_setting.proto b/google/ads/googleads/v1/resources/campaign_extension_setting.proto index e225959cf..d8abea21d 100644 --- a/google/ads/googleads/v1/resources/campaign_extension_setting.proto +++ b/google/ads/googleads/v1/resources/campaign_extension_setting.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/extension_setting_device.proto"; import "google/ads/googleads/v1/enums/extension_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,31 +36,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A campaign extension setting. message CampaignExtensionSetting { - // The resource name of the campaign extension setting. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignExtensionSetting" + pattern: "customers/{customer}/campaignExtensionSettings/{campaign_extension_setting}" + }; + + // Immutable. The resource name of the campaign extension setting. // CampaignExtensionSetting resource names have the form: // - // // `customers/{customer_id}/campaignExtensionSettings/{campaign_id}~{extension_type}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExtensionSetting" + } + ]; - // The extension type of the customer extension setting. - google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = - 2; + // Immutable. The extension type of the customer extension setting. + google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = 2 [(google.api.field_behavior) = IMMUTABLE]; - // The resource name of the campaign. The linked extension feed items will + // Immutable. The resource name of the campaign. The linked extension feed items will // serve under this campaign. // Campaign resource names have the form: // // `customers/{customer_id}/campaigns/{campaign_id}` - google.protobuf.StringValue campaign = 3; + google.protobuf.StringValue campaign = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; // The resource names of the extension feed items to serve under the campaign. // ExtensionFeedItem resource names have the form: // // `customers/{customer_id}/extensionFeedItems/{feed_item_id}` - repeated google.protobuf.StringValue extension_feed_items = 4; + repeated google.protobuf.StringValue extension_feed_items = 4 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + }]; // The device for which the extensions will serve. Optional. - google.ads.googleads.v1.enums.ExtensionSettingDeviceEnum - .ExtensionSettingDevice device = 5; + google.ads.googleads.v1.enums.ExtensionSettingDeviceEnum.ExtensionSettingDevice device = 5; } diff --git a/google/ads/googleads/v1/resources/campaign_feed.proto b/google/ads/googleads/v1/resources/campaign_feed.proto index 234beb3ff..b33eb9d59 100644 --- a/google/ads/googleads/v1/resources/campaign_feed.proto +++ b/google/ads/googleads/v1/resources/campaign_feed.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,8 +19,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/matching_function.proto"; import "google/ads/googleads/v1/enums/feed_link_status.proto"; import "google/ads/googleads/v1/enums/placeholder_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -36,29 +37,48 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A campaign feed. message CampaignFeed { - // The resource name of the campaign feed. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignFeed" + pattern: "customers/{customer}/campaignFeeds/{campaign_feed}" + }; + + // Immutable. The resource name of the campaign feed. // Campaign feed resource names have the form: // // `customers/{customer_id}/campaignFeeds/{campaign_id}~{feed_id} - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignFeed" + } + ]; - // The feed to which the CampaignFeed belongs. - google.protobuf.StringValue feed = 2; + // Immutable. The feed to which the CampaignFeed belongs. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; - // The campaign to which the CampaignFeed belongs. - google.protobuf.StringValue campaign = 3; + // Immutable. The campaign to which the CampaignFeed belongs. + google.protobuf.StringValue campaign = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; // Indicates which placeholder types the feed may populate under the connected // campaign. Required. - repeated google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType - placeholder_types = 4; + repeated google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType placeholder_types = 4; // Matching function associated with the CampaignFeed. // The matching function is used to filter the set of feed items selected. // Required. google.ads.googleads.v1.common.MatchingFunction matching_function = 5; - // Status of the campaign feed. + // Output only. Status of the campaign feed. // This field is read-only. - google.ads.googleads.v1.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6; + google.ads.googleads.v1.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/campaign_label.proto b/google/ads/googleads/v1/resources/campaign_label.proto index 00aa7dba2..8d189691c 100644 --- a/google/ads/googleads/v1/resources/campaign_label.proto +++ b/google/ads/googleads/v1/resources/campaign_label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -33,14 +34,34 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // Represents a relationship between a campaign and a label. message CampaignLabel { - // Name of the resource. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignLabel" + pattern: "customers/{customer}/campaignLabels/{campaign_label}" + }; + + // Immutable. Name of the resource. // Campaign label resource names have the form: // `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignLabel" + } + ]; - // The campaign to which the label is attached. - google.protobuf.StringValue campaign = 2; + // Immutable. The campaign to which the label is attached. + google.protobuf.StringValue campaign = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The label assigned to the campaign. - google.protobuf.StringValue label = 3; + // Immutable. The label assigned to the campaign. + google.protobuf.StringValue label = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; } diff --git a/google/ads/googleads/v1/resources/campaign_shared_set.proto b/google/ads/googleads/v1/resources/campaign_shared_set.proto index 80b829912..a7961a451 100644 --- a/google/ads/googleads/v1/resources/campaign_shared_set.proto +++ b/google/ads/googleads/v1/resources/campaign_shared_set.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/campaign_shared_set_status.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,24 +36,43 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // CampaignSharedSets are used for managing the shared sets associated with a // campaign. message CampaignSharedSet { - // The resource name of the campaign shared set. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignSharedSet" + pattern: "customers/{customer}/campaignSharedSets/{campaign_shared_set}" + }; + + // Immutable. The resource name of the campaign shared set. // Campaign shared set resource names have the form: // // `customers/{customer_id}/campaignSharedSets/{campaign_id}~{shared_set_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignSharedSet" + } + ]; - // The campaign to which the campaign shared set belongs. - google.protobuf.StringValue campaign = 3; + // Immutable. The campaign to which the campaign shared set belongs. + google.protobuf.StringValue campaign = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The shared set associated with the campaign. This may be a negative keyword + // Immutable. The shared set associated with the campaign. This may be a negative keyword // shared set of another customer. This customer should be a manager of the // other customer, otherwise the campaign shared set will exist but have no // serving effect. Only negative keyword shared sets can be associated with // Shopping campaigns. Only negative placement shared sets can be associated // with Display mobile app campaigns. - google.protobuf.StringValue shared_set = 4; + google.protobuf.StringValue shared_set = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedSet" + } + ]; - // The status of this campaign shared set. Read only. - google.ads.googleads.v1.enums.CampaignSharedSetStatusEnum - .CampaignSharedSetStatus status = 2; + // Output only. The status of this campaign shared set. Read only. + google.ads.googleads.v1.enums.CampaignSharedSetStatusEnum.CampaignSharedSetStatus status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/carrier_constant.proto b/google/ads/googleads/v1/resources/carrier_constant.proto index 944a60bb3..93f1d087d 100644 --- a/google/ads/googleads/v1/resources/carrier_constant.proto +++ b/google/ads/googleads/v1/resources/carrier_constant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -33,19 +34,29 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A carrier criterion that can be used in campaign targeting. message CarrierConstant { - // The resource name of the carrier criterion. + option (google.api.resource) = { + type: "googleads.googleapis.com/CarrierConstant" + pattern: "carrierConstants/{carrier_constant}" + }; + + // Output only. The resource name of the carrier criterion. // Carrier criterion resource names have the form: // // `carrierConstants/{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CarrierConstant" + } + ]; - // The ID of the carrier criterion. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the carrier criterion. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The full name of the carrier in English. - google.protobuf.StringValue name = 3; + // Output only. The full name of the carrier in English. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The country code of the country where the carrier is located, e.g., "AR", + // Output only. The country code of the country where the carrier is located, e.g., "AR", // "FR", etc. - google.protobuf.StringValue country_code = 4; + google.protobuf.StringValue country_code = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/change_status.proto b/google/ads/googleads/v1/resources/change_status.proto index 22b759d1c..0c9ac1305 100644 --- a/google/ads/googleads/v1/resources/change_status.proto +++ b/google/ads/googleads/v1/resources/change_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/change_status_operation.proto"; import "google/ads/googleads/v1/enums/change_status_resource_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,52 +36,110 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // Describes the status of returned resource. message ChangeStatus { - // The resource name of the change status. + option (google.api.resource) = { + type: "googleads.googleapis.com/ChangeStatus" + pattern: "customers/{customer}/changeStatus/{change_status}" + }; + + // Output only. The resource name of the change status. // Change status resource names have the form: // // `customers/{customer_id}/changeStatus/{change_status_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ChangeStatus" + } + ]; - // Time at which the most recent change has occurred on this resource. - google.protobuf.StringValue last_change_date_time = 3; + // Output only. Time at which the most recent change has occurred on this resource. + google.protobuf.StringValue last_change_date_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Represents the type of the changed resource. This dictates what fields + // Output only. Represents the type of the changed resource. This dictates what fields // will be set. For example, for AD_GROUP, campaign and ad_group fields will // be set. - google.ads.googleads.v1.enums.ChangeStatusResourceTypeEnum - .ChangeStatusResourceType resource_type = 4; - - // The Campaign affected by this change. - google.protobuf.StringValue campaign = 5; - - // The AdGroup affected by this change. - google.protobuf.StringValue ad_group = 6; - - // Represents the status of the changed resource. - google.ads.googleads.v1.enums.ChangeStatusOperationEnum.ChangeStatusOperation - resource_status = 8; - - // The AdGroupAd affected by this change. - google.protobuf.StringValue ad_group_ad = 9; - - // The AdGroupCriterion affected by this change. - google.protobuf.StringValue ad_group_criterion = 10; - - // The CampaignCriterion affected by this change. - google.protobuf.StringValue campaign_criterion = 11; - - // The Feed affected by this change. - google.protobuf.StringValue feed = 12; - - // The FeedItem affected by this change. - google.protobuf.StringValue feed_item = 13; - - // The AdGroupFeed affected by this change. - google.protobuf.StringValue ad_group_feed = 14; - - // The CampaignFeed affected by this change. - google.protobuf.StringValue campaign_feed = 15; - - // The AdGroupBidModifier affected by this change. - google.protobuf.StringValue ad_group_bid_modifier = 16; + google.ads.googleads.v1.enums.ChangeStatusResourceTypeEnum.ChangeStatusResourceType resource_type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Campaign affected by this change. + google.protobuf.StringValue campaign = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Output only. The AdGroup affected by this change. + google.protobuf.StringValue ad_group = 6 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Output only. Represents the status of the changed resource. + google.ads.googleads.v1.enums.ChangeStatusOperationEnum.ChangeStatusOperation resource_status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The AdGroupAd affected by this change. + google.protobuf.StringValue ad_group_ad = 9 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; + + // Output only. The AdGroupCriterion affected by this change. + google.protobuf.StringValue ad_group_criterion = 10 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; + + // Output only. The CampaignCriterion affected by this change. + google.protobuf.StringValue campaign_criterion = 11 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterion" + } + ]; + + // Output only. The Feed affected by this change. + google.protobuf.StringValue feed = 12 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + + // Output only. The FeedItem affected by this change. + google.protobuf.StringValue feed_item = 13 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItem" + } + ]; + + // Output only. The AdGroupFeed affected by this change. + google.protobuf.StringValue ad_group_feed = 14 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupFeed" + } + ]; + + // Output only. The CampaignFeed affected by this change. + google.protobuf.StringValue campaign_feed = 15 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignFeed" + } + ]; + + // Output only. The AdGroupBidModifier affected by this change. + google.protobuf.StringValue ad_group_bid_modifier = 16 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupBidModifier" + } + ]; } diff --git a/google/ads/googleads/v1/resources/click_view.proto b/google/ads/googleads/v1/resources/click_view.proto index f7e5912bb..693108552 100644 --- a/google/ads/googleads/v1/resources/click_view.proto +++ b/google/ads/googleads/v1/resources/click_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/click_location.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,24 +36,37 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A click view with metrics aggregated at each click level, including both // valid and invalid clicks. For non-Search campaigns, metrics.clicks // represents the number of valid and invalid interactions. +// Queries including ClickView must have a filter limiting the results to one +// day and can be requested for dates back to 90 days before the time of the +// request. message ClickView { - // The resource name of the click view. + option (google.api.resource) = { + type: "googleads.googleapis.com/ClickView" + pattern: "customers/{customer}/clickViews/{click_view}" + }; + + // Output only. The resource name of the click view. // Click view resource names have the form: // // `customers/{customer_id}/clickViews/{date (yyyy-MM-dd)}~{gclid}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ClickView" + } + ]; - // The Google Click ID. - google.protobuf.StringValue gclid = 2; + // Output only. The Google Click ID. + google.protobuf.StringValue gclid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The location criteria matching the area of interest associated with the + // Output only. The location criteria matching the area of interest associated with the // impression. - google.ads.googleads.v1.common.ClickLocation area_of_interest = 3; + google.ads.googleads.v1.common.ClickLocation area_of_interest = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The location criteria matching the location of presence associated with the + // Output only. The location criteria matching the location of presence associated with the // impression. - google.ads.googleads.v1.common.ClickLocation location_of_presence = 4; + google.ads.googleads.v1.common.ClickLocation location_of_presence = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Page number in search results where the ad was shown. - google.protobuf.Int64Value page_number = 5; + // Output only. Page number in search results where the ad was shown. + google.protobuf.Int64Value page_number = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/conversion_action.proto b/google/ads/googleads/v1/resources/conversion_action.proto index 0918eefb0..e780394d1 100644 --- a/google/ads/googleads/v1/resources/conversion_action.proto +++ b/google/ads/googleads/v1/resources/conversion_action.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -24,8 +23,10 @@ import "google/ads/googleads/v1/enums/conversion_action_counting_type.proto"; import "google/ads/googleads/v1/enums/conversion_action_status.proto"; import "google/ads/googleads/v1/enums/conversion_action_type.proto"; import "google/ads/googleads/v1/enums/data_driven_model_status.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -40,16 +41,19 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A conversion action. message ConversionAction { + option (google.api.resource) = { + type: "googleads.googleapis.com/ConversionAction" + pattern: "customers/{customer}/conversionActions/{conversion_action}" + }; + // Settings related to this conversion action's attribution model. message AttributionModelSettings { // The attribution model type of this conversion action. - google.ads.googleads.v1.enums.AttributionModelEnum.AttributionModel - attribution_model = 1; + google.ads.googleads.v1.enums.AttributionModelEnum.AttributionModel attribution_model = 1; - // The status of the data-driven attribution model for the conversion + // Output only. The status of the data-driven attribution model for the conversion // action. - google.ads.googleads.v1.enums.DataDrivenModelStatusEnum - .DataDrivenModelStatus data_driven_model_status = 2; + google.ads.googleads.v1.enums.DataDrivenModelStatusEnum.DataDrivenModelStatus data_driven_model_status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Settings related to the value for conversion events associated with this @@ -71,14 +75,19 @@ message ConversionAction { google.protobuf.BoolValue always_use_default_value = 3; } - // The resource name of the conversion action. + // Immutable. The resource name of the conversion action. // Conversion action resource names have the form: // // `customers/{customer_id}/conversionActions/{conversion_action_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ConversionAction" + } + ]; - // The ID of the conversion action. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the conversion action. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the conversion action. // @@ -87,20 +96,17 @@ message ConversionAction { google.protobuf.StringValue name = 3; // The status of this conversion action for conversion event accrual. - google.ads.googleads.v1.enums.ConversionActionStatusEnum - .ConversionActionStatus status = 4; + google.ads.googleads.v1.enums.ConversionActionStatusEnum.ConversionActionStatus status = 4; - // The type of this conversion action. - google.ads.googleads.v1.enums.ConversionActionTypeEnum.ConversionActionType - type = 5; + // Immutable. The type of this conversion action. + google.ads.googleads.v1.enums.ConversionActionTypeEnum.ConversionActionType type = 5 [(google.api.field_behavior) = IMMUTABLE]; // The category of conversions reported for this conversion action. - google.ads.googleads.v1.enums.ConversionActionCategoryEnum - .ConversionActionCategory category = 6; + google.ads.googleads.v1.enums.ConversionActionCategoryEnum.ConversionActionCategory category = 6; - // The resource name of the conversion action owner customer, or null if this + // Output only. The resource name of the conversion action owner customer, or null if this // is a system-defined conversion action. - google.protobuf.StringValue owner_customer = 7; + google.protobuf.StringValue owner_customer = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Whether this conversion action should be included in the "conversions" // metric. @@ -119,14 +125,13 @@ message ConversionAction { ValueSettings value_settings = 11; // How to count conversion events for the conversion action. - google.ads.googleads.v1.enums.ConversionActionCountingTypeEnum - .ConversionActionCountingType counting_type = 12; + google.ads.googleads.v1.enums.ConversionActionCountingTypeEnum.ConversionActionCountingType counting_type = 12; // Settings related to this conversion action's attribution model. AttributionModelSettings attribution_model_settings = 13; - // The snippets used for tracking conversions. - repeated google.ads.googleads.v1.common.TagSnippet tag_snippets = 14; + // Output only. The snippets used for tracking conversions. + repeated google.ads.googleads.v1.common.TagSnippet tag_snippets = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; // The phone call duration in seconds after which a conversion should be // reported for this conversion action. diff --git a/google/ads/googleads/v1/resources/custom_interest.proto b/google/ads/googleads/v1/resources/custom_interest.proto index 933513df4..d0c9488a4 100644 --- a/google/ads/googleads/v1/resources/custom_interest.proto +++ b/google/ads/googleads/v1/resources/custom_interest.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,8 +19,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/custom_interest_member_type.proto"; import "google/ads/googleads/v1/enums/custom_interest_status.proto"; import "google/ads/googleads/v1/enums/custom_interest_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -36,19 +37,28 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A custom interest. This is a list of users by interest. message CustomInterest { - // The resource name of the custom interest. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomInterest" + pattern: "customers/{customer}/customInterests/{custom_interest}" + }; + + // Immutable. The resource name of the custom interest. // Custom interest resource names have the form: // // `customers/{customer_id}/customInterests/{custom_interest_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomInterest" + } + ]; - // Id of the custom interest. - google.protobuf.Int64Value id = 2; + // Output only. Id of the custom interest. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Status of this custom interest. Indicates whether the custom interest is // enabled or removed. - google.ads.googleads.v1.enums.CustomInterestStatusEnum.CustomInterestStatus - status = 3; + google.ads.googleads.v1.enums.CustomInterestStatusEnum.CustomInterestStatus status = 3; // Name of the custom interest. It should be unique across the same custom // affinity audience. @@ -57,8 +67,7 @@ message CustomInterest { // Type of the custom interest, CUSTOM_AFFINITY or CUSTOM_INTENT. // By default the type is set to CUSTOM_AFFINITY. - google.ads.googleads.v1.enums.CustomInterestTypeEnum.CustomInterestType type = - 5; + google.ads.googleads.v1.enums.CustomInterestTypeEnum.CustomInterestType type = 5; // Description of this custom interest audience. google.protobuf.StringValue description = 6; @@ -73,8 +82,7 @@ message CustomInterest { // It is immutable, that is, it can only be created or removed but not changed. message CustomInterestMember { // The type of custom interest member, KEYWORD or URL. - google.ads.googleads.v1.enums.CustomInterestMemberTypeEnum - .CustomInterestMemberType member_type = 1; + google.ads.googleads.v1.enums.CustomInterestMemberTypeEnum.CustomInterestMemberType member_type = 1; // Keyword text when member_type is KEYWORD or URL string when // member_type is URL. diff --git a/google/ads/googleads/v1/resources/customer.proto b/google/ads/googleads/v1/resources/customer.proto index e03a0d9f9..daf474365 100644 --- a/google/ads/googleads/v1/resources/customer.proto +++ b/google/ads/googleads/v1/resources/customer.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/customer_pay_per_conversion_eligibility_failure_reason.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -34,25 +35,35 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A customer. message Customer { - // The resource name of the customer. + option (google.api.resource) = { + type: "googleads.googleapis.com/Customer" + pattern: "customers/{customer}" + }; + + // Immutable. The resource name of the customer. // Customer resource names have the form: // // `customers/{customer_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Customer" + } + ]; - // The ID of the customer. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the customer. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional, non-unique descriptive name of the customer. google.protobuf.StringValue descriptive_name = 4; - // The currency in which the account operates. + // Immutable. The currency in which the account operates. // A subset of the currency codes from the ISO 4217 standard is // supported. - google.protobuf.StringValue currency_code = 5; + google.protobuf.StringValue currency_code = 5 [(google.api.field_behavior) = IMMUTABLE]; - // The local timezone ID of the customer. - google.protobuf.StringValue time_zone = 6; + // Immutable. The local timezone ID of the customer. + google.protobuf.StringValue time_zone = 6 [(google.api.field_behavior) = IMMUTABLE]; // The URL template for constructing a tracking URL out of parameters. google.protobuf.StringValue tracking_url_template = 7; @@ -63,32 +74,29 @@ message Customer { // Whether auto-tagging is enabled for the customer. google.protobuf.BoolValue auto_tagging_enabled = 8; - // Whether the Customer has a Partners program badge. If the Customer is not + // Output only. Whether the Customer has a Partners program badge. If the Customer is not // associated with the Partners program, this will be false. For more // information, see https://support.google.com/partners/answer/3125774. - google.protobuf.BoolValue has_partners_badge = 9; + google.protobuf.BoolValue has_partners_badge = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the customer is a manager. - google.protobuf.BoolValue manager = 12; + // Output only. Whether the customer is a manager. + google.protobuf.BoolValue manager = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the customer is a test account. - google.protobuf.BoolValue test_account = 13; + // Output only. Whether the customer is a test account. + google.protobuf.BoolValue test_account = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Call reporting setting for a customer. CallReportingSetting call_reporting_setting = 10; - // Conversion tracking setting for a customer. - ConversionTrackingSetting conversion_tracking_setting = 14; + // Output only. Conversion tracking setting for a customer. + ConversionTrackingSetting conversion_tracking_setting = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Remarketing setting for a customer. - RemarketingSetting remarketing_setting = 15; + // Output only. Remarketing setting for a customer. + RemarketingSetting remarketing_setting = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Reasons why the customer is not eligible to use PaymentMode.CONVERSIONS. If + // Output only. Reasons why the customer is not eligible to use PaymentMode.CONVERSIONS. If // the list is empty, the customer is eligible. This field is read-only. - repeated google.ads.googleads.v1.enums - .CustomerPayPerConversionEligibilityFailureReasonEnum - .CustomerPayPerConversionEligibilityFailureReason - pay_per_conversion_eligibility_failure_reasons = 16; + repeated google.ads.googleads.v1.enums.CustomerPayPerConversionEligibilityFailureReasonEnum.CustomerPayPerConversionEligibilityFailureReason pay_per_conversion_eligibility_failure_reasons = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Call reporting setting for a customer. @@ -103,26 +111,28 @@ message CallReportingSetting { // Customer-level call conversion action to attribute a call conversion to. // If not set a default conversion action is used. Only in effect when // call_conversion_reporting_enabled is set to true. - google.protobuf.StringValue call_conversion_action = 9; + google.protobuf.StringValue call_conversion_action = 9 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ConversionAction" + }]; } // A collection of customer-wide settings related to Google Ads Conversion // Tracking. message ConversionTrackingSetting { - // The conversion tracking id used for this account. This id is automatically + // Output only. The conversion tracking id used for this account. This id is automatically // assigned after any conversion tracking feature is used. If the customer // doesn't use conversion tracking, this is 0. This field is read-only. - google.protobuf.Int64Value conversion_tracking_id = 1; + google.protobuf.Int64Value conversion_tracking_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The conversion tracking id of the customer's manager. This is set when the + // Output only. The conversion tracking id of the customer's manager. This is set when the // customer is opted into cross account conversion tracking, and it overrides // conversion_tracking_id. This field can only be managed through the Google // Ads UI. This field is read-only. - google.protobuf.Int64Value cross_account_conversion_tracking_id = 2; + google.protobuf.Int64Value cross_account_conversion_tracking_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Remarketing setting for a customer. message RemarketingSetting { - // The Google global site tag. - google.protobuf.StringValue google_global_site_tag = 1; + // Output only. The Google global site tag. + google.protobuf.StringValue google_global_site_tag = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/customer_client.proto b/google/ads/googleads/v1/resources/customer_client.proto index fd47f7848..1c4a4645b 100644 --- a/google/ads/googleads/v1/resources/customer_client.proto +++ b/google/ads/googleads/v1/resources/customer_client.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,22 +36,31 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // exist for manager customers. All direct and indirect client customers are // included, as well as the manager itself. message CustomerClient { - // The resource name of the customer client. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerClient" + pattern: "customers/{customer}/customerClients/{customer_client}" + }; + + // Output only. The resource name of the customer client. // CustomerClient resource names have the form: // `customers/{customer_id}/customerClients/{client_customer_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerClient" + } + ]; - // The resource name of the client-customer which is linked to + // Output only. The resource name of the client-customer which is linked to // the given customer. Read only. - google.protobuf.StringValue client_customer = 3; + google.protobuf.StringValue client_customer = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Specifies whether this is a hidden account. Learn more about hidden - // accounts here. Read - // only. - google.protobuf.BoolValue hidden = 4; + // Output only. Specifies whether this is a + // [hidden account](https://support.google.com/google-ads/answer/7519830). + // Read only. + google.protobuf.BoolValue hidden = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Distance between given customer and client. For self link, the level value + // Output only. Distance between given customer and client. For self link, the level value // will be 0. Read only. - google.protobuf.Int64Value level = 5; + google.protobuf.Int64Value level = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/customer_client_link.proto b/google/ads/googleads/v1/resources/customer_client_link.proto index e6c188a07..4b0e266de 100644 --- a/google/ads/googleads/v1/resources/customer_client_link.proto +++ b/google/ads/googleads/v1/resources/customer_client_link.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/manager_link_status.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -34,21 +35,29 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // Represents customer client link relationship. message CustomerClientLink { - // Name of the resource. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerClientLink" + pattern: "customers/{customer}/customerClientLinks/{customer_client_link}" + }; + + // Immutable. Name of the resource. // CustomerClientLink resource names have the form: - // // `customers/{customer_id}/customerClientLinks/{client_customer_id}~{manager_link_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerClientLink" + } + ]; - // The client customer linked to this customer. - google.protobuf.StringValue client_customer = 3; + // Immutable. The client customer linked to this customer. + google.protobuf.StringValue client_customer = 3 [(google.api.field_behavior) = IMMUTABLE]; - // This is uniquely identifies a customer client link. Read only. - google.protobuf.Int64Value manager_link_id = 4; + // Output only. This is uniquely identifies a customer client link. Read only. + google.protobuf.Int64Value manager_link_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // This is the status of the link between client and manager. - google.ads.googleads.v1.enums.ManagerLinkStatusEnum.ManagerLinkStatus status = - 5; + google.ads.googleads.v1.enums.ManagerLinkStatusEnum.ManagerLinkStatus status = 5; // The visibility of the link. Users can choose whether or not to see hidden // links in the AdWords UI. diff --git a/google/ads/googleads/v1/resources/customer_extension_setting.proto b/google/ads/googleads/v1/resources/customer_extension_setting.proto index 4ef620bc1..6de1674c1 100644 --- a/google/ads/googleads/v1/resources/customer_extension_setting.proto +++ b/google/ads/googleads/v1/resources/customer_extension_setting.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/extension_setting_device.proto"; import "google/ads/googleads/v1/enums/extension_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,23 +36,33 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A customer extension setting. message CustomerExtensionSetting { - // The resource name of the customer extension setting. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerExtensionSetting" + pattern: "customers/{customer}/customerExtensionSettings/{customer_extension_setting}" + }; + + // Immutable. The resource name of the customer extension setting. // CustomerExtensionSetting resource names have the form: // // `customers/{customer_id}/customerExtensionSettings/{extension_type}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerExtensionSetting" + } + ]; - // The extension type of the customer extension setting. - google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = - 2; + // Immutable. The extension type of the customer extension setting. + google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = 2 [(google.api.field_behavior) = IMMUTABLE]; // The resource names of the extension feed items to serve under the customer. // ExtensionFeedItem resource names have the form: // // `customers/{customer_id}/extensionFeedItems/{feed_item_id}` - repeated google.protobuf.StringValue extension_feed_items = 3; + repeated google.protobuf.StringValue extension_feed_items = 3 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + }]; // The device for which the extensions will serve. Optional. - google.ads.googleads.v1.enums.ExtensionSettingDeviceEnum - .ExtensionSettingDevice device = 4; + google.ads.googleads.v1.enums.ExtensionSettingDeviceEnum.ExtensionSettingDevice device = 4; } diff --git a/google/ads/googleads/v1/resources/customer_feed.proto b/google/ads/googleads/v1/resources/customer_feed.proto index a81cfa479..dd7ceaf02 100644 --- a/google/ads/googleads/v1/resources/customer_feed.proto +++ b/google/ads/googleads/v1/resources/customer_feed.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,8 +19,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/matching_function.proto"; import "google/ads/googleads/v1/enums/feed_link_status.proto"; import "google/ads/googleads/v1/enums/placeholder_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -36,26 +37,40 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A customer feed. message CustomerFeed { - // The resource name of the customer feed. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerFeed" + pattern: "customers/{customer}/customerFeeds/{customer_feed}" + }; + + // Immutable. The resource name of the customer feed. // Customer feed resource names have the form: // // `customers/{customer_id}/customerFeeds/{feed_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerFeed" + } + ]; - // The feed being linked to the customer. - google.protobuf.StringValue feed = 2; + // Immutable. The feed being linked to the customer. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; // Indicates which placeholder types the feed may populate under the connected // customer. Required. - repeated google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType - placeholder_types = 3; + repeated google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType placeholder_types = 3; // Matching function associated with the CustomerFeed. // The matching function is used to filter the set of feed items selected. // Required. google.ads.googleads.v1.common.MatchingFunction matching_function = 4; - // Status of the customer feed. + // Output only. Status of the customer feed. // This field is read-only. - google.ads.googleads.v1.enums.FeedLinkStatusEnum.FeedLinkStatus status = 5; + google.ads.googleads.v1.enums.FeedLinkStatusEnum.FeedLinkStatus status = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/customer_label.proto b/google/ads/googleads/v1/resources/customer_label.proto index 28c994e1c..f9a9e243f 100644 --- a/google/ads/googleads/v1/resources/customer_label.proto +++ b/google/ads/googleads/v1/resources/customer_label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,18 +36,28 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // not have access to all the labels attached to it. Additional CustomerLabels // may be returned by increasing permissions with login-customer-id. message CustomerLabel { - // Name of the resource. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerLabel" + pattern: "customers/{customer}/customerLabels/{customer_label}" + }; + + // Immutable. Name of the resource. // Customer label resource names have the form: // `customers/{customer_id}/customerLabels/{label_id}` - string resource_name = 1; - - // The resource name of the customer to which the label is attached. + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerLabel" + } + ]; + + // Output only. The resource name of the customer to which the label is attached. // Read only. - google.protobuf.StringValue customer = 2; + google.protobuf.StringValue customer = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource name of the label assigned to the customer. + // Output only. The resource name of the label assigned to the customer. // // Note: the Customer ID portion of the label resource name is not // validated when creating a new CustomerLabel. - google.protobuf.StringValue label = 3; + google.protobuf.StringValue label = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/customer_manager_link.proto b/google/ads/googleads/v1/resources/customer_manager_link.proto index d6f406c78..e2f82d673 100644 --- a/google/ads/googleads/v1/resources/customer_manager_link.proto +++ b/google/ads/googleads/v1/resources/customer_manager_link.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/manager_link_status.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -34,19 +35,27 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // Represents customer-manager link relationship. message CustomerManagerLink { - // Name of the resource. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerManagerLink" + pattern: "customers/{customer}/customerManagerLinks/{customer_manager_link}" + }; + + // Immutable. Name of the resource. // CustomerManagerLink resource names have the form: - // // `customers/{customer_id}/customerManagerLinks/{manager_customer_id}~{manager_link_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerManagerLink" + } + ]; - // The manager customer linked to the customer. - google.protobuf.StringValue manager_customer = 3; + // Output only. The manager customer linked to the customer. + google.protobuf.StringValue manager_customer = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // ID of the customer-manager link. This field is read only. - google.protobuf.Int64Value manager_link_id = 4; + // Output only. ID of the customer-manager link. This field is read only. + google.protobuf.Int64Value manager_link_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Status of the link between the customer and the manager. - google.ads.googleads.v1.enums.ManagerLinkStatusEnum.ManagerLinkStatus status = - 5; + google.ads.googleads.v1.enums.ManagerLinkStatusEnum.ManagerLinkStatus status = 5; } diff --git a/google/ads/googleads/v1/resources/customer_negative_criterion.proto b/google/ads/googleads/v1/resources/customer_negative_criterion.proto index 20af93ed1..a033ffacd 100644 --- a/google/ads/googleads/v1/resources/customer_negative_criterion.proto +++ b/google/ads/googleads/v1/resources/customer_negative_criterion.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/criteria.proto"; import "google/ads/googleads/v1/enums/criterion_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,39 +36,48 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A negative criterion for exclusions at the customer level. message CustomerNegativeCriterion { - // The resource name of the customer negative criterion. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerNegativeCriterion" + pattern: "customers/{customer}/customerNegativeCriteria/{customer_negative_criterion}" + }; + + // Immutable. The resource name of the customer negative criterion. // Customer negative criterion resource names have the form: // // `customers/{customer_id}/customerNegativeCriteria/{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerNegativeCriterion" + } + ]; - // The ID of the criterion. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the criterion. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The type of the criterion. - google.ads.googleads.v1.enums.CriterionTypeEnum.CriterionType type = 3; + // Output only. The type of the criterion. + google.ads.googleads.v1.enums.CriterionTypeEnum.CriterionType type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The customer negative criterion. // // Exactly one must be set. oneof criterion { - // ContentLabel. - google.ads.googleads.v1.common.ContentLabelInfo content_label = 4; + // Immutable. ContentLabel. + google.ads.googleads.v1.common.ContentLabelInfo content_label = 4 [(google.api.field_behavior) = IMMUTABLE]; - // MobileApplication. - google.ads.googleads.v1.common.MobileApplicationInfo mobile_application = 5; + // Immutable. MobileApplication. + google.ads.googleads.v1.common.MobileApplicationInfo mobile_application = 5 [(google.api.field_behavior) = IMMUTABLE]; - // MobileAppCategory. - google.ads.googleads.v1.common.MobileAppCategoryInfo mobile_app_category = - 6; + // Immutable. MobileAppCategory. + google.ads.googleads.v1.common.MobileAppCategoryInfo mobile_app_category = 6 [(google.api.field_behavior) = IMMUTABLE]; - // Placement. - google.ads.googleads.v1.common.PlacementInfo placement = 7; + // Immutable. Placement. + google.ads.googleads.v1.common.PlacementInfo placement = 7 [(google.api.field_behavior) = IMMUTABLE]; - // YouTube Video. - google.ads.googleads.v1.common.YouTubeVideoInfo youtube_video = 8; + // Immutable. YouTube Video. + google.ads.googleads.v1.common.YouTubeVideoInfo youtube_video = 8 [(google.api.field_behavior) = IMMUTABLE]; - // YouTube Channel. - google.ads.googleads.v1.common.YouTubeChannelInfo youtube_channel = 9; + // Immutable. YouTube Channel. + google.ads.googleads.v1.common.YouTubeChannelInfo youtube_channel = 9 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v1/resources/detail_placement_view.proto b/google/ads/googleads/v1/resources/detail_placement_view.proto index 1007504c3..93337976f 100644 --- a/google/ads/googleads/v1/resources/detail_placement_view.proto +++ b/google/ads/googleads/v1/resources/detail_placement_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/placement_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -34,30 +35,38 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A view with metrics aggregated by ad group and URL or YouTube video. message DetailPlacementView { - // The resource name of the detail placement view. + option (google.api.resource) = { + type: "googleads.googleapis.com/DetailPlacementView" + pattern: "customers/{customer}/detailPlacementViews/{detail_placement_view}" + }; + + // Output only. The resource name of the detail placement view. // Detail placement view resource names have the form: // - // // `customers/{customer_id}/detailPlacementViews/{ad_group_id}~{base64_placement}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DetailPlacementView" + } + ]; - // The automatic placement string at detail level, e. g. website URL, mobile + // Output only. The automatic placement string at detail level, e. g. website URL, mobile // application ID, or a YouTube video ID. - google.protobuf.StringValue placement = 2; + google.protobuf.StringValue placement = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The display name is URL name for websites, YouTube video name for YouTube + // Output only. The display name is URL name for websites, YouTube video name for YouTube // videos, and translated mobile app name for mobile apps. - google.protobuf.StringValue display_name = 3; + google.protobuf.StringValue display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // URL of the group placement, e.g. domain, link to the mobile application in + // Output only. URL of the group placement, e.g. domain, link to the mobile application in // app store, or a YouTube channel URL. - google.protobuf.StringValue group_placement_target_url = 4; + google.protobuf.StringValue group_placement_target_url = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // URL of the placement, e.g. website, link to the mobile application in app + // Output only. URL of the placement, e.g. website, link to the mobile application in app // store, or a YouTube video URL. - google.protobuf.StringValue target_url = 5; + google.protobuf.StringValue target_url = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Type of the placement, e.g. Website, YouTube Video, and Mobile Application. - google.ads.googleads.v1.enums.PlacementTypeEnum.PlacementType placement_type = - 6; + // Output only. Type of the placement, e.g. Website, YouTube Video, and Mobile Application. + google.ads.googleads.v1.enums.PlacementTypeEnum.PlacementType placement_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/display_keyword_view.proto b/google/ads/googleads/v1/resources/display_keyword_view.proto index 98c6c6f57..d65b7a55c 100644 --- a/google/ads/googleads/v1/resources/display_keyword_view.proto +++ b/google/ads/googleads/v1/resources/display_keyword_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A display keyword view. message DisplayKeywordView { - // The resource name of the display keyword view. + option (google.api.resource) = { + type: "googleads.googleapis.com/DisplayKeywordView" + pattern: "customers/{customer}/displayKeywordViews/{display_keyword_view}" + }; + + // Output only. The resource name of the display keyword view. // Display Keyword view resource names have the form: // // `customers/{customer_id}/displayKeywordViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DisplayKeywordView" + } + ]; } diff --git a/google/ads/googleads/v1/resources/domain_category.proto b/google/ads/googleads/v1/resources/domain_category.proto index 0cd40addc..1abb8f65d 100644 --- a/google/ads/googleads/v1/resources/domain_category.proto +++ b/google/ads/googleads/v1/resources/domain_category.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -36,41 +37,55 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // the domain. The categories can be targeted using WebpageConditionInfo. // See: https://support.google.com/google-ads/answer/2471185 message DomainCategory { - // The resource name of the domain category. + option (google.api.resource) = { + type: "googleads.googleapis.com/DomainCategory" + pattern: "customers/{customer}/domainCategories/{domain_category}" + }; + + // Output only. The resource name of the domain category. // Domain category resource names have the form: // - // // `customers/{customer_id}/domainCategories/{campaign_id}~{category_base64}~{language_code}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DomainCategory" + } + ]; - // The campaign this category is recommended for. - google.protobuf.StringValue campaign = 2; + // Output only. The campaign this category is recommended for. + google.protobuf.StringValue campaign = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // Recommended category for the website domain. e.g. if you have a website + // Output only. Recommended category for the website domain. e.g. if you have a website // about electronics, the categories could be "cameras", "televisions", etc. - google.protobuf.StringValue category = 3; + google.protobuf.StringValue category = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The language code specifying the language of the website. e.g. "en" for + // Output only. The language code specifying the language of the website. e.g. "en" for // English. The language can be specified in the DynamicSearchAdsSetting // required for dynamic search ads. This is the language of the pages from // your website that you want Google Ads to find, create ads for, // and match searches with. - google.protobuf.StringValue language_code = 4; + google.protobuf.StringValue language_code = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The domain for the website. The domain can be specified in the + // Output only. The domain for the website. The domain can be specified in the // DynamicSearchAdsSetting required for dynamic search ads. - google.protobuf.StringValue domain = 5; + google.protobuf.StringValue domain = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Fraction of pages on your site that this category matches. - google.protobuf.DoubleValue coverage_fraction = 6; + // Output only. Fraction of pages on your site that this category matches. + google.protobuf.DoubleValue coverage_fraction = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The position of this category in the set of categories. Lower numbers + // Output only. The position of this category in the set of categories. Lower numbers // indicate a better match for the domain. null indicates not recommended. - google.protobuf.Int64Value category_rank = 7; + google.protobuf.Int64Value category_rank = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Indicates whether this category has sub-categories. - google.protobuf.BoolValue has_children = 8; + // Output only. Indicates whether this category has sub-categories. + google.protobuf.BoolValue has_children = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The recommended cost per click for the category. - google.protobuf.Int64Value recommended_cpc_bid_micros = 9; + // Output only. The recommended cost per click for the category. + google.protobuf.Int64Value recommended_cpc_bid_micros = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto b/google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto index 3332eb188..7e041685d 100644 --- a/google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto +++ b/google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -33,30 +34,39 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A dynamic search ads search term view. message DynamicSearchAdsSearchTermView { - // The resource name of the dynamic search ads search term view. + option (google.api.resource) = { + type: "googleads.googleapis.com/DynamicSearchAdsSearchTermView" + pattern: "customers/{customer}/dynamicSearchAdsSearchTermViews/{dynamic_search_ads_search_term_view}" + }; + + // Output only. The resource name of the dynamic search ads search term view. // Dynamic search ads search term view resource names have the form: // - // // `customers/{customer_id}/dynamicSearchAdsSearchTermViews/{ad_group_id}~{search_term_fp}~{headline_fp}~{landing_page_fp}~{page_url_fp}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DynamicSearchAdsSearchTermView" + } + ]; - // Search term + // Output only. Search term // // This field is read-only. - google.protobuf.StringValue search_term = 2; + google.protobuf.StringValue search_term = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The dynamically generated headline of the Dynamic Search Ad. + // Output only. The dynamically generated headline of the Dynamic Search Ad. // // This field is read-only. - google.protobuf.StringValue headline = 3; + google.protobuf.StringValue headline = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The dynamically selected landing page URL of the impression. + // Output only. The dynamically selected landing page URL of the impression. // // This field is read-only. - google.protobuf.StringValue landing_page = 4; + google.protobuf.StringValue landing_page = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The URL of page feed item served for the impression. + // Output only. The URL of page feed item served for the impression. // // This field is read-only. - google.protobuf.StringValue page_url = 5; + google.protobuf.StringValue page_url = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/expanded_landing_page_view.proto b/google/ads/googleads/v1/resources/expanded_landing_page_view.proto index 72115b4f8..a272c724a 100644 --- a/google/ads/googleads/v1/resources/expanded_landing_page_view.proto +++ b/google/ads/googleads/v1/resources/expanded_landing_page_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -34,13 +35,22 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A landing page view with metrics aggregated at the expanded final URL // level. message ExpandedLandingPageView { - // The resource name of the expanded landing page view. + option (google.api.resource) = { + type: "googleads.googleapis.com/ExpandedLandingPageView" + pattern: "customers/{customer}/expandedLandingPageViews/{expanded_landing_page_view}" + }; + + // Output only. The resource name of the expanded landing page view. // Expanded landing page view resource names have the form: // - // // `customers/{customer_id}/expandedLandingPageViews/{expanded_final_url_fingerprint}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ExpandedLandingPageView" + } + ]; - // The final URL that clicks are directed to. - google.protobuf.StringValue expanded_final_url = 2; + // Output only. The final URL that clicks are directed to. + google.protobuf.StringValue expanded_final_url = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/extension_feed_item.proto b/google/ads/googleads/v1/resources/extension_feed_item.proto index 6dd6e2dca..92f705f64 100644 --- a/google/ads/googleads/v1/resources/extension_feed_item.proto +++ b/google/ads/googleads/v1/resources/extension_feed_item.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -22,8 +21,10 @@ import "google/ads/googleads/v1/common/extensions.proto"; import "google/ads/googleads/v1/enums/extension_type.proto"; import "google/ads/googleads/v1/enums/feed_item_status.proto"; import "google/ads/googleads/v1/enums/feed_item_target_device.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -38,24 +39,34 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // An extension feed item. message ExtensionFeedItem { - // The resource name of the extension feed item. + option (google.api.resource) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + pattern: "customers/{customer}/extensionFeedItems/{extension_feed_item}" + }; + + // Immutable. The resource name of the extension feed item. // Extension feed item resource names have the form: // // `customers/{customer_id}/extensionFeedItems/{feed_item_id}` - string resource_name = 1; - - // The extension type of the extension feed item. + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + } + ]; + + // Output only. The extension type of the extension feed item. // This field is read-only. - google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = - 13; + google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Start time in which this feed item is effective and can begin serving. + // Start time in which this feed item is effective and can begin serving. The + // time is in the customer's time zone. // The format is "YYYY-MM-DD HH:MM:SS". // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30" google.protobuf.StringValue start_date_time = 5; // End time in which this feed item is no longer effective and will stop - // serving. + // serving. The time is in the customer's time zone. // The format is "YYYY-MM-DD HH:MM:SS". // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30" google.protobuf.StringValue end_date_time = 6; @@ -66,15 +77,16 @@ message ExtensionFeedItem { repeated google.ads.googleads.v1.common.AdScheduleInfo ad_schedules = 16; // The targeted device. - google.ads.googleads.v1.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice - device = 17; + google.ads.googleads.v1.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 17; // The targeted geo target constant. - google.protobuf.StringValue targeted_geo_target_constant = 20; + google.protobuf.StringValue targeted_geo_target_constant = 20 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + }]; - // Status of the feed item. + // Output only. Status of the feed item. // This field is read-only. - google.ads.googleads.v1.enums.FeedItemStatusEnum.FeedItemStatus status = 4; + google.ads.googleads.v1.enums.FeedItemStatusEnum.FeedItemStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Extension type. oneof extension { @@ -82,8 +94,7 @@ message ExtensionFeedItem { google.ads.googleads.v1.common.SitelinkFeedItem sitelink_feed_item = 2; // Structured snippet extension. - google.ads.googleads.v1.common.StructuredSnippetFeedItem - structured_snippet_feed_item = 3; + google.ads.googleads.v1.common.StructuredSnippetFeedItem structured_snippet_feed_item = 3; // App extension. google.ads.googleads.v1.common.AppFeedItem app_feed_item = 7; @@ -95,8 +106,7 @@ message ExtensionFeedItem { google.ads.googleads.v1.common.CalloutFeedItem callout_feed_item = 9; // Text message extension. - google.ads.googleads.v1.common.TextMessageFeedItem text_message_feed_item = - 10; + google.ads.googleads.v1.common.TextMessageFeedItem text_message_feed_item = 10; // Price extension. google.ads.googleads.v1.common.PriceFeedItem price_feed_item = 11; @@ -104,24 +114,27 @@ message ExtensionFeedItem { // Promotion extension. google.ads.googleads.v1.common.PromotionFeedItem promotion_feed_item = 12; - // Location extension. Locations are synced from a GMB account into a feed. + // Output only. Location extension. Locations are synced from a GMB account into a feed. // This field is read-only. - google.ads.googleads.v1.common.LocationFeedItem location_feed_item = 14; + google.ads.googleads.v1.common.LocationFeedItem location_feed_item = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Affiliate location extension. Feed locations are populated by Google Ads + // Output only. Affiliate location extension. Feed locations are populated by Google Ads // based on a chain ID. // This field is read-only. - google.ads.googleads.v1.common.AffiliateLocationFeedItem - affiliate_location_feed_item = 15; + google.ads.googleads.v1.common.AffiliateLocationFeedItem affiliate_location_feed_item = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Targeting at either the campaign or ad group level. Feed items that target // a campaign or ad group will only serve with that resource. oneof serving_resource_targeting { // The targeted campaign. - google.protobuf.StringValue targeted_campaign = 18; + google.protobuf.StringValue targeted_campaign = 18 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + }]; // The targeted ad group. - google.protobuf.StringValue targeted_ad_group = 19; + google.protobuf.StringValue targeted_ad_group = 19 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + }]; } } diff --git a/google/ads/googleads/v1/resources/feed.proto b/google/ads/googleads/v1/resources/feed.proto index 2df4a00d5..e88f1e9d3 100644 --- a/google/ads/googleads/v1/resources/feed.proto +++ b/google/ads/googleads/v1/resources/feed.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -21,8 +20,10 @@ import "google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type. import "google/ads/googleads/v1/enums/feed_attribute_type.proto"; import "google/ads/googleads/v1/enums/feed_origin.proto"; import "google/ads/googleads/v1/enums/feed_status.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -37,6 +38,11 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A feed. message Feed { + option (google.api.resource) = { + type: "googleads.googleapis.com/Feed" + pattern: "customers/{customer}/feeds/{feed}" + }; + // Data used to configure a location feed populated from Google My Business // Locations. message PlacesLocationFeedData { @@ -52,10 +58,10 @@ message Feed { google.protobuf.StringValue http_authorization_header = 3; } - // Required authentication token (from OAuth API) for the email. + // Immutable. Required authentication token (from OAuth API) for the email. // This field can only be specified in a create request. All its subfields // are not selectable. - OAuthInfo oauth_info = 1; + OAuthInfo oauth_info = 1 [(google.api.field_behavior) = IMMUTABLE]; // Email address of a Google My Business account or email address of a // manager of the Google My Business account. Required. @@ -93,24 +99,30 @@ message Feed { repeated google.protobuf.Int64Value chain_ids = 1; // The relationship the chains have with the advertiser. - google.ads.googleads.v1.enums.AffiliateLocationFeedRelationshipTypeEnum - .AffiliateLocationFeedRelationshipType relationship_type = 2; + google.ads.googleads.v1.enums.AffiliateLocationFeedRelationshipTypeEnum.AffiliateLocationFeedRelationshipType relationship_type = 2; } - // The resource name of the feed. + // Immutable. The resource name of the feed. // Feed resource names have the form: // // `customers/{customer_id}/feeds/{feed_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; - // The ID of the feed. + // Output only. The ID of the feed. // This field is read-only. - google.protobuf.Int64Value id = 2; + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Name of the feed. Required. - google.protobuf.StringValue name = 3; + // Immutable. Name of the feed. Required. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = IMMUTABLE]; - // The Feed's attributes. Required on CREATE. + // The Feed's attributes. Required on CREATE, unless + // system_feed_generation_data is provided, in which case Google Ads will + // update the feed with the correct attributes. // Disallowed on UPDATE. Use attribute_operations to add new attributes. repeated FeedAttribute attributes = 4; @@ -118,12 +130,12 @@ message Feed { // be added, not removed. repeated FeedAttributeOperation attribute_operations = 9; - // Specifies who manages the FeedAttributes for the Feed. - google.ads.googleads.v1.enums.FeedOriginEnum.FeedOrigin origin = 5; + // Immutable. Specifies who manages the FeedAttributes for the Feed. + google.ads.googleads.v1.enums.FeedOriginEnum.FeedOrigin origin = 5 [(google.api.field_behavior) = IMMUTABLE]; - // Status of the feed. + // Output only. Status of the feed. // This field is read-only. - google.ads.googleads.v1.enums.FeedStatusEnum.FeedStatus status = 8; + google.ads.googleads.v1.enums.FeedStatusEnum.FeedStatus status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // The system data for the Feed. This data specifies information for // generating the feed items of the system generated feed. @@ -150,8 +162,7 @@ message FeedAttribute { google.protobuf.StringValue name = 2; // Data type for feed attribute. Required. - google.ads.googleads.v1.enums.FeedAttributeTypeEnum.FeedAttributeType type = - 3; + google.ads.googleads.v1.enums.FeedAttributeTypeEnum.FeedAttributeType type = 3; // Indicates that data corresponding to this attribute is part of a // FeedItem's unique key. It defaults to false if it is unspecified. Note @@ -174,9 +185,9 @@ message FeedAttributeOperation { ADD = 2; } - // Type of list operation to perform. - Operator operator = 1; + // Output only. Type of list operation to perform. + Operator operator = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The feed attribute being added to the list. - FeedAttribute value = 2; + // Output only. The feed attribute being added to the list. + FeedAttribute value = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/feed_item.proto b/google/ads/googleads/v1/resources/feed_item.proto index d0885daca..9d6be40a7 100644 --- a/google/ads/googleads/v1/resources/feed_item.proto +++ b/google/ads/googleads/v1/resources/feed_item.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -28,8 +27,10 @@ import "google/ads/googleads/v1/enums/geo_targeting_restriction.proto"; import "google/ads/googleads/v1/enums/policy_approval_status.proto"; import "google/ads/googleads/v1/enums/policy_review_status.proto"; import "google/ads/googleads/v1/errors/feed_item_validation_error.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -44,25 +45,41 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A feed item. message FeedItem { - // The resource name of the feed item. + option (google.api.resource) = { + type: "googleads.googleapis.com/FeedItem" + pattern: "customers/{customer}/feedItems/{feed_item}" + }; + + // Immutable. The resource name of the feed item. // Feed item resource names have the form: // // `customers/{customer_id}/feedItems/{feed_id}~{feed_item_id}` - string resource_name = 1; - - // The feed to which this feed item belongs. - google.protobuf.StringValue feed = 2; - - // The ID of this feed item. - google.protobuf.Int64Value id = 3; - - // Start time in which this feed item is effective and can begin serving. + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItem" + } + ]; + + // Immutable. The feed to which this feed item belongs. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + + // Output only. The ID of this feed item. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Start time in which this feed item is effective and can begin serving. The + // time is in the customer's time zone. // The format is "YYYY-MM-DD HH:MM:SS". // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30" google.protobuf.StringValue start_date_time = 4; // End time in which this feed item is no longer effective and will stop - // serving. + // serving. The time is in the customer's time zone. // The format is "YYYY-MM-DD HH:MM:SS". // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30" google.protobuf.StringValue end_date_time = 5; @@ -72,25 +89,23 @@ message FeedItem { // Geo targeting restriction specifies the type of location that can be used // for targeting. - google.ads.googleads.v1.enums.GeoTargetingRestrictionEnum - .GeoTargetingRestriction geo_targeting_restriction = 7; + google.ads.googleads.v1.enums.GeoTargetingRestrictionEnum.GeoTargetingRestriction geo_targeting_restriction = 7; // The list of mappings used to substitute custom parameter tags in a // `tracking_url_template`, `final_urls`, or `mobile_final_urls`. - repeated google.ads.googleads.v1.common.CustomParameter - url_custom_parameters = 8; + repeated google.ads.googleads.v1.common.CustomParameter url_custom_parameters = 8; - // Status of the feed item. + // Output only. Status of the feed item. // This field is read-only. - google.ads.googleads.v1.enums.FeedItemStatusEnum.FeedItemStatus status = 9; + google.ads.googleads.v1.enums.FeedItemStatusEnum.FeedItemStatus status = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // List of info about a feed item's validation and approval state for active + // Output only. List of info about a feed item's validation and approval state for active // feed mappings. There will be an entry in the list for each type of feed // mapping associated with the feed, e.g. a feed with a sitelink and a call // feed mapping would cause every feed item associated with that feed to have // an entry in this list for both sitelink and call. // This field is read-only. - repeated FeedItemPlaceholderPolicyInfo policy_infos = 10; + repeated FeedItemPlaceholderPolicyInfo policy_infos = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A feed item attribute value. @@ -109,8 +124,8 @@ message FeedItemAttributeValue { // String value. Should be set if feed_attribute_id refers to a feed attribute // of type STRING, URL or DATE_TIME. // For STRING the maximum length is 1500 characters. For URL the maximum - // length is 2076 characters. For DATE_TIME the format of the string must - // be the same as start and end time for the feed item. + // length is 2076 characters. For DATE_TIME the string must be in the format + // "YYYYMMDD HHMMSS". google.protobuf.StringValue string_value = 4; // Double value. Should be set if feed_attribute_id refers to a feed attribute @@ -148,59 +163,52 @@ message FeedItemAttributeValue { // Policy, validation, and quality approval info for a feed item for the // specified placeholder type. message FeedItemPlaceholderPolicyInfo { - // The placeholder type. - google.protobuf.Int32Value placeholder_type = 1; + // Output only. The placeholder type. + google.protobuf.Int32Value placeholder_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The FeedMapping that contains the placeholder type. - google.protobuf.StringValue feed_mapping_resource_name = 2; + // Output only. The FeedMapping that contains the placeholder type. + google.protobuf.StringValue feed_mapping_resource_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Where the placeholder type is in the review process. - google.ads.googleads.v1.enums.PolicyReviewStatusEnum.PolicyReviewStatus - review_status = 3; + // Output only. Where the placeholder type is in the review process. + google.ads.googleads.v1.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The overall approval status of the placeholder type, calculated based on + // Output only. The overall approval status of the placeholder type, calculated based on // the status of its individual policy topic entries. - google.ads.googleads.v1.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus - approval_status = 4; + google.ads.googleads.v1.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The list of policy findings for the placeholder type. - repeated google.ads.googleads.v1.common.PolicyTopicEntry - policy_topic_entries = 5; + // Output only. The list of policy findings for the placeholder type. + repeated google.ads.googleads.v1.common.PolicyTopicEntry policy_topic_entries = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The validation status of the palceholder type. - google.ads.googleads.v1.enums.FeedItemValidationStatusEnum - .FeedItemValidationStatus validation_status = 6; + // Output only. The validation status of the palceholder type. + google.ads.googleads.v1.enums.FeedItemValidationStatusEnum.FeedItemValidationStatus validation_status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // List of placeholder type validation errors. - repeated FeedItemValidationError validation_errors = 7; + // Output only. List of placeholder type validation errors. + repeated FeedItemValidationError validation_errors = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Placeholder type quality evaluation approval status. - google.ads.googleads.v1.enums.FeedItemQualityApprovalStatusEnum - .FeedItemQualityApprovalStatus quality_approval_status = 8; + // Output only. Placeholder type quality evaluation approval status. + google.ads.googleads.v1.enums.FeedItemQualityApprovalStatusEnum.FeedItemQualityApprovalStatus quality_approval_status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // List of placeholder type quality evaluation disapproval reasons. - repeated google.ads.googleads.v1.enums.FeedItemQualityDisapprovalReasonEnum - .FeedItemQualityDisapprovalReason quality_disapproval_reasons = 9; + // Output only. List of placeholder type quality evaluation disapproval reasons. + repeated google.ads.googleads.v1.enums.FeedItemQualityDisapprovalReasonEnum.FeedItemQualityDisapprovalReason quality_disapproval_reasons = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Stores a validation error and the set of offending feed attributes which // together are responsible for causing a feed item validation error. message FeedItemValidationError { - // Error code indicating what validation error was triggered. The description + // Output only. Error code indicating what validation error was triggered. The description // of the error can be found in the 'description' field. - google.ads.googleads.v1.errors.FeedItemValidationErrorEnum - .FeedItemValidationError validation_error = 1; + google.ads.googleads.v1.errors.FeedItemValidationErrorEnum.FeedItemValidationError validation_error = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The description of the validation error. - google.protobuf.StringValue description = 2; + // Output only. The description of the validation error. + google.protobuf.StringValue description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Set of feed attributes in the feed item flagged during validation. If + // Output only. Set of feed attributes in the feed item flagged during validation. If // empty, no specific feed attributes can be associated with the error // (e.g. error across the entire feed item). - repeated google.protobuf.Int64Value feed_attribute_ids = 3; + repeated google.protobuf.Int64Value feed_attribute_ids = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Any extra information related to this error which is not captured by + // Output only. Any extra information related to this error which is not captured by // validation_error and feed_attribute_id (e.g. placeholder field IDs when // feed_attribute_id is not mapped). Note that extra_info is not localized. - google.protobuf.StringValue extra_info = 5; + google.protobuf.StringValue extra_info = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/feed_item_target.proto b/google/ads/googleads/v1/resources/feed_item_target.proto index cbff9f828..a11376bc9 100644 --- a/google/ads/googleads/v1/resources/feed_item_target.proto +++ b/google/ads/googleads/v1/resources/feed_item_target.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,8 +19,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/criteria.proto"; import "google/ads/googleads/v1/enums/feed_item_target_device.proto"; import "google/ads/googleads/v1/enums/feed_item_target_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -36,41 +37,68 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A feed item target. message FeedItemTarget { - // The resource name of the feed item target. + option (google.api.resource) = { + type: "googleads.googleapis.com/FeedItemTarget" + pattern: "customers/{customer}/feedItemTargets/{feed_item_target}" + }; + + // Immutable. The resource name of the feed item target. // Feed item target resource names have the form: - // // `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItemTarget" + } + ]; - // The feed item to which this feed item target belongs. - google.protobuf.StringValue feed_item = 2; + // Immutable. The feed item to which this feed item target belongs. + google.protobuf.StringValue feed_item = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItem" + } + ]; - // The target type of this feed item target. This field is read-only. - google.ads.googleads.v1.enums.FeedItemTargetTypeEnum.FeedItemTargetType - feed_item_target_type = 3; + // Output only. The target type of this feed item target. This field is read-only. + google.ads.googleads.v1.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The ID of the targeted resource. This field is read-only. - google.protobuf.Int64Value feed_item_target_id = 6; + // Output only. The ID of the targeted resource. This field is read-only. + google.protobuf.Int64Value feed_item_target_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // The targeted resource. oneof target { - // The targeted campaign. - google.protobuf.StringValue campaign = 4; + // Immutable. The targeted campaign. + google.protobuf.StringValue campaign = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The targeted ad group. - google.protobuf.StringValue ad_group = 5; + // Immutable. The targeted ad group. + google.protobuf.StringValue ad_group = 5 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; - // The targeted keyword. - google.ads.googleads.v1.common.KeywordInfo keyword = 7; + // Immutable. The targeted keyword. + google.ads.googleads.v1.common.KeywordInfo keyword = 7 [(google.api.field_behavior) = IMMUTABLE]; - // The targeted geo target constant resource name. - google.protobuf.StringValue geo_target_constant = 8; + // Immutable. The targeted geo target constant resource name. + google.protobuf.StringValue geo_target_constant = 8 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + } + ]; - // The targeted device. - google.ads.googleads.v1.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice - device = 9; + // Immutable. The targeted device. + google.ads.googleads.v1.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(google.api.field_behavior) = IMMUTABLE]; - // The targeted schedule. - google.ads.googleads.v1.common.AdScheduleInfo ad_schedule = 10; + // Immutable. The targeted schedule. + google.ads.googleads.v1.common.AdScheduleInfo ad_schedule = 10 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v1/resources/feed_mapping.proto b/google/ads/googleads/v1/resources/feed_mapping.proto index 57292cf96..966ba7ecd 100644 --- a/google/ads/googleads/v1/resources/feed_mapping.proto +++ b/google/ads/googleads/v1/resources/feed_mapping.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -41,8 +40,10 @@ import "google/ads/googleads/v1/enums/real_estate_placeholder_field.proto"; import "google/ads/googleads/v1/enums/sitelink_placeholder_field.proto"; import "google/ads/googleads/v1/enums/structured_snippet_placeholder_field.proto"; import "google/ads/googleads/v1/enums/travel_placeholder_field.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -57,139 +58,129 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A feed mapping. message FeedMapping { - // The resource name of the feed mapping. + option (google.api.resource) = { + type: "googleads.googleapis.com/FeedMapping" + pattern: "customers/{customer}/feedMappings/{feed_mapping}" + }; + + // Immutable. The resource name of the feed mapping. // Feed mapping resource names have the form: // // `customers/{customer_id}/feedMappings/{feed_id}~{feed_mapping_id}` - string resource_name = 1; - - // The feed of this feed mapping. - google.protobuf.StringValue feed = 2; - - // Feed attributes to field mappings. These mappings are a one-to-many + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedMapping" + } + ]; + + // Immutable. The feed of this feed mapping. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + + // Immutable. Feed attributes to field mappings. These mappings are a one-to-many // relationship meaning that 1 feed attribute can be used to populate // multiple placeholder fields, but 1 placeholder field can only draw // data from 1 feed attribute. Ad Customizer is an exception, 1 placeholder // field can be mapped to multiple feed attributes. Required. - repeated AttributeFieldMapping attribute_field_mappings = 5; + repeated AttributeFieldMapping attribute_field_mappings = 5 [(google.api.field_behavior) = IMMUTABLE]; - // Status of the feed mapping. + // Output only. Status of the feed mapping. // This field is read-only. - google.ads.googleads.v1.enums.FeedMappingStatusEnum.FeedMappingStatus status = - 6; + google.ads.googleads.v1.enums.FeedMappingStatusEnum.FeedMappingStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Feed mapping target. Can be either a placeholder or a criterion. For a // given feed, the active FeedMappings must have unique targets. Required. oneof target { - // The placeholder type of this mapping (i.e., if the mapping maps feed + // Immutable. The placeholder type of this mapping (i.e., if the mapping maps feed // attributes to placeholder fields). - google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType - placeholder_type = 3; + google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 3 [(google.api.field_behavior) = IMMUTABLE]; - // The criterion type of this mapping (i.e., if the mapping maps feed + // Immutable. The criterion type of this mapping (i.e., if the mapping maps feed // attributes to criterion fields). - google.ads.googleads.v1.enums.FeedMappingCriterionTypeEnum - .FeedMappingCriterionType criterion_type = 4; + google.ads.googleads.v1.enums.FeedMappingCriterionTypeEnum.FeedMappingCriterionType criterion_type = 4 [(google.api.field_behavior) = IMMUTABLE]; } } // Maps from feed attribute id to a placeholder or criterion field id. message AttributeFieldMapping { - // Feed attribute from which to map. - google.protobuf.Int64Value feed_attribute_id = 1; + // Immutable. Feed attribute from which to map. + google.protobuf.Int64Value feed_attribute_id = 1 [(google.api.field_behavior) = IMMUTABLE]; - // The placeholder field ID. If a placeholder field enum is not published in + // Output only. The placeholder field ID. If a placeholder field enum is not published in // the current API version, then this field will be populated and the field // oneof will be empty. // This field is read-only. - google.protobuf.Int64Value field_id = 2; + google.protobuf.Int64Value field_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Placeholder or criterion field to be populated using data from // the above feed attribute. Required. oneof field { - // Sitelink Placeholder Fields. - google.ads.googleads.v1.enums.SitelinkPlaceholderFieldEnum - .SitelinkPlaceholderField sitelink_field = 3; - - // Call Placeholder Fields. - google.ads.googleads.v1.enums.CallPlaceholderFieldEnum.CallPlaceholderField - call_field = 4; - - // App Placeholder Fields. - google.ads.googleads.v1.enums.AppPlaceholderFieldEnum.AppPlaceholderField - app_field = 5; - - // Location Placeholder Fields. This field is read-only. - google.ads.googleads.v1.enums.LocationPlaceholderFieldEnum - .LocationPlaceholderField location_field = 6; - - // Affiliate Location Placeholder Fields. This field is read-only. - google.ads.googleads.v1.enums.AffiliateLocationPlaceholderFieldEnum - .AffiliateLocationPlaceholderField affiliate_location_field = 7; - - // Callout Placeholder Fields. - google.ads.googleads.v1.enums.CalloutPlaceholderFieldEnum - .CalloutPlaceholderField callout_field = 8; - - // Structured Snippet Placeholder Fields. - google.ads.googleads.v1.enums.StructuredSnippetPlaceholderFieldEnum - .StructuredSnippetPlaceholderField structured_snippet_field = 9; - - // Message Placeholder Fields. - google.ads.googleads.v1.enums.MessagePlaceholderFieldEnum - .MessagePlaceholderField message_field = 10; - - // Price Placeholder Fields. - google.ads.googleads.v1.enums.PricePlaceholderFieldEnum - .PricePlaceholderField price_field = 11; - - // Promotion Placeholder Fields. - google.ads.googleads.v1.enums.PromotionPlaceholderFieldEnum - .PromotionPlaceholderField promotion_field = 12; - - // Ad Customizer Placeholder Fields - google.ads.googleads.v1.enums.AdCustomizerPlaceholderFieldEnum - .AdCustomizerPlaceholderField ad_customizer_field = 13; - - // Dynamic Search Ad Page Feed Fields. - google.ads.googleads.v1.enums.DsaPageFeedCriterionFieldEnum - .DsaPageFeedCriterionField dsa_page_feed_field = 14; - - // Location Target Fields. - google.ads.googleads.v1.enums.LocationExtensionTargetingCriterionFieldEnum - .LocationExtensionTargetingCriterionField - location_extension_targeting_field = 15; - - // Education Placeholder Fields - google.ads.googleads.v1.enums.EducationPlaceholderFieldEnum - .EducationPlaceholderField education_field = 16; - - // Flight Placeholder Fields - google.ads.googleads.v1.enums.FlightPlaceholderFieldEnum - .FlightPlaceholderField flight_field = 17; - - // Custom Placeholder Fields - google.ads.googleads.v1.enums.CustomPlaceholderFieldEnum - .CustomPlaceholderField custom_field = 18; - - // Hotel Placeholder Fields - google.ads.googleads.v1.enums.HotelPlaceholderFieldEnum - .HotelPlaceholderField hotel_field = 19; - - // Real Estate Placeholder Fields - google.ads.googleads.v1.enums.RealEstatePlaceholderFieldEnum - .RealEstatePlaceholderField real_estate_field = 20; - - // Travel Placeholder Fields - google.ads.googleads.v1.enums.TravelPlaceholderFieldEnum - .TravelPlaceholderField travel_field = 21; - - // Local Placeholder Fields - google.ads.googleads.v1.enums.LocalPlaceholderFieldEnum - .LocalPlaceholderField local_field = 22; - - // Job Placeholder Fields - google.ads.googleads.v1.enums.JobPlaceholderFieldEnum.JobPlaceholderField - job_field = 23; + // Immutable. Sitelink Placeholder Fields. + google.ads.googleads.v1.enums.SitelinkPlaceholderFieldEnum.SitelinkPlaceholderField sitelink_field = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Call Placeholder Fields. + google.ads.googleads.v1.enums.CallPlaceholderFieldEnum.CallPlaceholderField call_field = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. App Placeholder Fields. + google.ads.googleads.v1.enums.AppPlaceholderFieldEnum.AppPlaceholderField app_field = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Location Placeholder Fields. This field is read-only. + google.ads.googleads.v1.enums.LocationPlaceholderFieldEnum.LocationPlaceholderField location_field = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Affiliate Location Placeholder Fields. This field is read-only. + google.ads.googleads.v1.enums.AffiliateLocationPlaceholderFieldEnum.AffiliateLocationPlaceholderField affiliate_location_field = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Callout Placeholder Fields. + google.ads.googleads.v1.enums.CalloutPlaceholderFieldEnum.CalloutPlaceholderField callout_field = 8 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Structured Snippet Placeholder Fields. + google.ads.googleads.v1.enums.StructuredSnippetPlaceholderFieldEnum.StructuredSnippetPlaceholderField structured_snippet_field = 9 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Message Placeholder Fields. + google.ads.googleads.v1.enums.MessagePlaceholderFieldEnum.MessagePlaceholderField message_field = 10 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Price Placeholder Fields. + google.ads.googleads.v1.enums.PricePlaceholderFieldEnum.PricePlaceholderField price_field = 11 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Promotion Placeholder Fields. + google.ads.googleads.v1.enums.PromotionPlaceholderFieldEnum.PromotionPlaceholderField promotion_field = 12 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Ad Customizer Placeholder Fields + google.ads.googleads.v1.enums.AdCustomizerPlaceholderFieldEnum.AdCustomizerPlaceholderField ad_customizer_field = 13 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Dynamic Search Ad Page Feed Fields. + google.ads.googleads.v1.enums.DsaPageFeedCriterionFieldEnum.DsaPageFeedCriterionField dsa_page_feed_field = 14 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Location Target Fields. + google.ads.googleads.v1.enums.LocationExtensionTargetingCriterionFieldEnum.LocationExtensionTargetingCriterionField location_extension_targeting_field = 15 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Education Placeholder Fields + google.ads.googleads.v1.enums.EducationPlaceholderFieldEnum.EducationPlaceholderField education_field = 16 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Flight Placeholder Fields + google.ads.googleads.v1.enums.FlightPlaceholderFieldEnum.FlightPlaceholderField flight_field = 17 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Custom Placeholder Fields + google.ads.googleads.v1.enums.CustomPlaceholderFieldEnum.CustomPlaceholderField custom_field = 18 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Hotel Placeholder Fields + google.ads.googleads.v1.enums.HotelPlaceholderFieldEnum.HotelPlaceholderField hotel_field = 19 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Real Estate Placeholder Fields + google.ads.googleads.v1.enums.RealEstatePlaceholderFieldEnum.RealEstatePlaceholderField real_estate_field = 20 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Travel Placeholder Fields + google.ads.googleads.v1.enums.TravelPlaceholderFieldEnum.TravelPlaceholderField travel_field = 21 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Local Placeholder Fields + google.ads.googleads.v1.enums.LocalPlaceholderFieldEnum.LocalPlaceholderField local_field = 22 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Job Placeholder Fields + google.ads.googleads.v1.enums.JobPlaceholderFieldEnum.JobPlaceholderField job_field = 23 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v1/resources/feed_placeholder_view.proto b/google/ads/googleads/v1/resources/feed_placeholder_view.proto index 0b03a8834..1e6f17a05 100644 --- a/google/ads/googleads/v1/resources/feed_placeholder_view.proto +++ b/google/ads/googleads/v1/resources/feed_placeholder_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/placeholder_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; @@ -33,13 +34,22 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A feed placeholder view. message FeedPlaceholderView { - // The resource name of the feed placeholder view. + option (google.api.resource) = { + type: "googleads.googleapis.com/FeedPlaceholderView" + pattern: "customers/{customer}/feedPlaceholderViews/{feed_placeholder_view}" + }; + + // Output only. The resource name of the feed placeholder view. // Feed placeholder view resource names have the form: // // `customers/{customer_id}/feedPlaceholderViews/{placeholder_type}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedPlaceholderView" + } + ]; - // The placeholder type of the feed placeholder view. - google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType - placeholder_type = 2; + // Output only. The placeholder type of the feed placeholder view. + google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/gender_view.proto b/google/ads/googleads/v1/resources/gender_view.proto index dac1df670..482286d1d 100644 --- a/google/ads/googleads/v1/resources/gender_view.proto +++ b/google/ads/googleads/v1/resources/gender_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A gender view. message GenderView { - // The resource name of the gender view. + option (google.api.resource) = { + type: "googleads.googleapis.com/GenderView" + pattern: "customers/{customer}/genderViews/{gender_view}" + }; + + // Output only. The resource name of the gender view. // Gender view resource names have the form: // // `customers/{customer_id}/genderViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GenderView" + } + ]; } diff --git a/google/ads/googleads/v1/resources/geo_target_constant.proto b/google/ads/googleads/v1/resources/geo_target_constant.proto index e89d7e99f..6da966027 100644 --- a/google/ads/googleads/v1/resources/geo_target_constant.proto +++ b/google/ads/googleads/v1/resources/geo_target_constant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/geo_target_constant_status.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -34,29 +35,38 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A geo target constant. message GeoTargetConstant { - // The resource name of the geo target constant. + option (google.api.resource) = { + type: "googleads.googleapis.com/GeoTargetConstant" + pattern: "geoTargetConstants/{geo_target_constant}" + }; + + // Output only. The resource name of the geo target constant. // Geo target constant resource names have the form: // // `geoTargetConstants/{geo_target_constant_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + } + ]; - // The ID of the geo target constant. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the geo target constant. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Geo target constant English name. - google.protobuf.StringValue name = 4; + // Output only. Geo target constant English name. + google.protobuf.StringValue name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The ISO-3166-1 alpha-2 country code that is associated with the target. - google.protobuf.StringValue country_code = 5; + // Output only. The ISO-3166-1 alpha-2 country code that is associated with the target. + google.protobuf.StringValue country_code = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Geo target constant target type. - google.protobuf.StringValue target_type = 6; + // Output only. Geo target constant target type. + google.protobuf.StringValue target_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Geo target constant status. - google.ads.googleads.v1.enums.GeoTargetConstantStatusEnum - .GeoTargetConstantStatus status = 7; + // Output only. Geo target constant status. + google.ads.googleads.v1.enums.GeoTargetConstantStatusEnum.GeoTargetConstantStatus status = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The fully qualified English name, consisting of the target's name and that + // Output only. The fully qualified English name, consisting of the target's name and that // of its parent and country. - google.protobuf.StringValue canonical_name = 8; + google.protobuf.StringValue canonical_name = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/geographic_view.proto b/google/ads/googleads/v1/resources/geographic_view.proto index 9514db058..35edaa2d7 100644 --- a/google/ads/googleads/v1/resources/geographic_view.proto +++ b/google/ads/googleads/v1/resources/geographic_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/geo_targeting_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -39,17 +40,30 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // the user or an area of interest. If other segment fields are used, you may // get more than one row per country. message GeographicView { - // The resource name of the geographic view. + option (google.api.resource) = { + type: "googleads.googleapis.com/GeographicView" + pattern: "customers/{customer}/geographicViews/{geographic_view}" + }; + + // Output only. The resource name of the geographic view. // Geographic view resource names have the form: // - // // `customers/{customer_id}/geographicViews/{country_criterion_id}~{location_type}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeographicView" + } + ]; - // CriterionId for the geo target for a country. - google.protobuf.StringValue country_geo_target_constant = 2; + // Output only. CriterionId for the geo target for a country. + google.protobuf.StringValue country_geo_target_constant = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + } + ]; - // Type of the geo targeting of the campaign. - google.ads.googleads.v1.enums.GeoTargetingTypeEnum.GeoTargetingType - location_type = 3; + // Output only. Type of the geo targeting of the campaign. + google.ads.googleads.v1.enums.GeoTargetingTypeEnum.GeoTargetingType location_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/google_ads_field.proto b/google/ads/googleads/v1/resources/google_ads_field.proto index bb7fe280e..27c2d9e7e 100644 --- a/google/ads/googleads/v1/resources/google_ads_field.proto +++ b/google/ads/googleads/v1/resources/google_ads_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/google_ads_field_category.proto"; import "google/ads/googleads/v1/enums/google_ads_field_data_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,52 +36,61 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A field or resource (artifact) used by GoogleAdsService. message GoogleAdsField { - // The resource name of the artifact. + option (google.api.resource) = { + type: "googleads.googleapis.com/GoogleAdsField" + pattern: "googleAdsFields/{google_ads_field}" + }; + + // Output only. The resource name of the artifact. // Artifact resource names have the form: // // `googleAdsFields/{name}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GoogleAdsField" + } + ]; - // The name of the artifact. - google.protobuf.StringValue name = 2; + // Output only. The name of the artifact. + google.protobuf.StringValue name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The category of the artifact. - google.ads.googleads.v1.enums.GoogleAdsFieldCategoryEnum - .GoogleAdsFieldCategory category = 3; + // Output only. The category of the artifact. + google.ads.googleads.v1.enums.GoogleAdsFieldCategoryEnum.GoogleAdsFieldCategory category = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the artifact can be used in a SELECT clause in search + // Output only. Whether the artifact can be used in a SELECT clause in search // queries. - google.protobuf.BoolValue selectable = 4; + google.protobuf.BoolValue selectable = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the artifact can be used in a WHERE clause in search + // Output only. Whether the artifact can be used in a WHERE clause in search // queries. - google.protobuf.BoolValue filterable = 5; + google.protobuf.BoolValue filterable = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the artifact can be used in a ORDER BY clause in search + // Output only. Whether the artifact can be used in a ORDER BY clause in search // queries. - google.protobuf.BoolValue sortable = 6; + google.protobuf.BoolValue sortable = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The names of all resources, segments, and metrics that are selectable with + // Output only. The names of all resources, segments, and metrics that are selectable with // the described artifact. - repeated google.protobuf.StringValue selectable_with = 7; + repeated google.protobuf.StringValue selectable_with = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The names of all resources that are selectable with the described + // Output only. The names of all resources that are selectable with the described // artifact. Fields from these resources do not segment metrics when included // in search queries. // // This field is only set for artifacts whose category is RESOURCE. - repeated google.protobuf.StringValue attribute_resources = 8; + repeated google.protobuf.StringValue attribute_resources = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // At and beyond version V1 this field lists the names of all metrics that are + // Output only. At and beyond version V1 this field lists the names of all metrics that are // selectable with the described artifact when it is used in the FROM clause. // It is only set for artifacts whose category is RESOURCE. // // Before version V1 this field lists the names of all metrics that are // selectable with the described artifact. It is only set for artifacts whose // category is either RESOURCE or SEGMENT - repeated google.protobuf.StringValue metrics = 9; + repeated google.protobuf.StringValue metrics = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // At and beyond version V1 this field lists the names of all artifacts, + // Output only. At and beyond version V1 this field lists the names of all artifacts, // whether a segment or another resource, that segment metrics when included // in search queries and when the described artifact is used in the FROM // clause. It is only set for artifacts whose category is RESOURCE. @@ -89,21 +99,20 @@ message GoogleAdsField { // segment or another resource, that segment metrics when included in search // queries. It is only set for artifacts of category RESOURCE, SEGMENT or // METRIC. - repeated google.protobuf.StringValue segments = 10; + repeated google.protobuf.StringValue segments = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Values the artifact can assume if it is a field of type ENUM. + // Output only. Values the artifact can assume if it is a field of type ENUM. // // This field is only set for artifacts of category SEGMENT or ATTRIBUTE. - repeated google.protobuf.StringValue enum_values = 11; + repeated google.protobuf.StringValue enum_values = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - // This field determines the operators that can be used with the artifact + // Output only. This field determines the operators that can be used with the artifact // in WHERE clauses. - google.ads.googleads.v1.enums.GoogleAdsFieldDataTypeEnum - .GoogleAdsFieldDataType data_type = 12; + google.ads.googleads.v1.enums.GoogleAdsFieldDataTypeEnum.GoogleAdsFieldDataType data_type = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The URL of proto describing the artifact's data type. - google.protobuf.StringValue type_url = 13; + // Output only. The URL of proto describing the artifact's data type. + google.protobuf.StringValue type_url = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the field artifact is repeated. - google.protobuf.BoolValue is_repeated = 14; + // Output only. Whether the field artifact is repeated. + google.protobuf.BoolValue is_repeated = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/group_placement_view.proto b/google/ads/googleads/v1/resources/group_placement_view.proto index 1eb44e618..229467961 100644 --- a/google/ads/googleads/v1/resources/group_placement_view.proto +++ b/google/ads/googleads/v1/resources/group_placement_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/placement_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -34,25 +35,33 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A group placement view. message GroupPlacementView { - // The resource name of the group placement view. + option (google.api.resource) = { + type: "googleads.googleapis.com/GroupPlacementView" + pattern: "customers/{customer}/groupPlacementViews/{group_placement_view}" + }; + + // Output only. The resource name of the group placement view. // Group placement view resource names have the form: // - // // `customers/{customer_id}/groupPlacementViews/{ad_group_id}~{base64_placement}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GroupPlacementView" + } + ]; - // The automatic placement string at group level, e. g. web domain, mobile + // Output only. The automatic placement string at group level, e. g. web domain, mobile // app ID, or a YouTube channel ID. - google.protobuf.StringValue placement = 2; + google.protobuf.StringValue placement = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Domain name for websites and YouTube channel name for YouTube channels. - google.protobuf.StringValue display_name = 3; + // Output only. Domain name for websites and YouTube channel name for YouTube channels. + google.protobuf.StringValue display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // URL of the group placement, e.g. domain, link to the mobile application in + // Output only. URL of the group placement, e.g. domain, link to the mobile application in // app store, or a YouTube channel URL. - google.protobuf.StringValue target_url = 4; + google.protobuf.StringValue target_url = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Type of the placement, e.g. Website, YouTube Channel, Mobile Application. - google.ads.googleads.v1.enums.PlacementTypeEnum.PlacementType placement_type = - 5; + // Output only. Type of the placement, e.g. Website, YouTube Channel, Mobile Application. + google.ads.googleads.v1.enums.PlacementTypeEnum.PlacementType placement_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/hotel_group_view.proto b/google/ads/googleads/v1/resources/hotel_group_view.proto index 5384add73..ff0b5ada3 100644 --- a/google/ads/googleads/v1/resources/hotel_group_view.proto +++ b/google/ads/googleads/v1/resources/hotel_group_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A hotel group view. message HotelGroupView { - // The resource name of the hotel group view. + option (google.api.resource) = { + type: "googleads.googleapis.com/HotelGroupView" + pattern: "customers/{customer}/hotelGroupViews/{hotel_group_view}" + }; + + // Output only. The resource name of the hotel group view. // Hotel Group view resource names have the form: // // `customers/{customer_id}/hotelGroupViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/HotelGroupView" + } + ]; } diff --git a/google/ads/googleads/v1/resources/hotel_performance_view.proto b/google/ads/googleads/v1/resources/hotel_performance_view.proto index 3a815fd92..961e55cee 100644 --- a/google/ads/googleads/v1/resources/hotel_performance_view.proto +++ b/google/ads/googleads/v1/resources/hotel_performance_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A hotel performance view. message HotelPerformanceView { - // The resource name of the hotel performance view. + option (google.api.resource) = { + type: "googleads.googleapis.com/HotelPerformanceView" + pattern: "customers/{customer}/hotelPerformanceView" + }; + + // Output only. The resource name of the hotel performance view. // Hotel performance view resource names have the form: // // `customers/{customer_id}/hotelPerformanceView` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/HotelPerformanceView" + } + ]; } diff --git a/google/ads/googleads/v1/resources/keyword_plan.proto b/google/ads/googleads/v1/resources/keyword_plan.proto index fd2d38f9f..19cbac4f3 100644 --- a/google/ads/googleads/v1/resources/keyword_plan.proto +++ b/google/ads/googleads/v1/resources/keyword_plan.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/dates.proto"; import "google/ads/googleads/v1/enums/keyword_plan_forecast_interval.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -37,14 +38,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // Max number of saved keyword plans: 10000. // It's possible to remove plans if limit is reached. message KeywordPlan { - // The resource name of the Keyword Planner plan. + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlan" + pattern: "customers/{customer}/keywordPlans/{keyword_plan}" + }; + + // Immutable. The resource name of the Keyword Planner plan. // KeywordPlan resource names have the form: // // `customers/{customer_id}/keywordPlans/{kp_plan_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlan" + } + ]; - // The ID of the keyword plan. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the keyword plan. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the keyword plan. // @@ -61,12 +72,12 @@ message KeywordPlanForecastPeriod { // Required. The date used for forecasting the Plan. oneof interval { // A future date range relative to the current date used for forecasting. - google.ads.googleads.v1.enums.KeywordPlanForecastIntervalEnum - .KeywordPlanForecastInterval date_interval = 1; + google.ads.googleads.v1.enums.KeywordPlanForecastIntervalEnum.KeywordPlanForecastInterval date_interval = 1; // The custom date range used for forecasting. // The start and end dates must be in the future. Otherwise, an error will // be returned when the forecasting action is performed. + // The start and end dates are inclusive. google.ads.googleads.v1.common.DateRange date_range = 2; } } diff --git a/google/ads/googleads/v1/resources/keyword_plan_ad_group.proto b/google/ads/googleads/v1/resources/keyword_plan_ad_group.proto index c3d31c8b3..25bd7eeb6 100644 --- a/google/ads/googleads/v1/resources/keyword_plan_ad_group.proto +++ b/google/ads/googleads/v1/resources/keyword_plan_ad_group.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -34,17 +35,29 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A Keyword Planner ad group. // Max number of keyword plan ad groups per plan: 200. message KeywordPlanAdGroup { - // The resource name of the Keyword Planner ad group. + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlanAdGroup" + pattern: "customers/{customer}/keywordPlanAdGroups/{keyword_plan_ad_group}" + }; + + // Immutable. The resource name of the Keyword Planner ad group. // KeywordPlanAdGroup resource names have the form: // // `customers/{customer_id}/keywordPlanAdGroups/{kp_ad_group_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanAdGroup" + } + ]; // The keyword plan campaign to which this ad group belongs. - google.protobuf.StringValue keyword_plan_campaign = 2; + google.protobuf.StringValue keyword_plan_campaign = 2 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + }]; - // The ID of the keyword plan ad group. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the keyword plan ad group. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the keyword plan ad group. // diff --git a/google/ads/googleads/v1/resources/keyword_plan_campaign.proto b/google/ads/googleads/v1/resources/keyword_plan_campaign.proto index 8e26b57cf..2f6bb8a5f 100644 --- a/google/ads/googleads/v1/resources/keyword_plan_campaign.proto +++ b/google/ads/googleads/v1/resources/keyword_plan_campaign.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/keyword_plan_network.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,17 +36,29 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A Keyword Plan campaign. // Max number of keyword plan campaigns per plan allowed: 1. message KeywordPlanCampaign { - // The resource name of the Keyword Plan campaign. + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + pattern: "customers/{customer}/keywordPlanCampaigns/{keyword_plan_campaign}" + }; + + // Immutable. The resource name of the Keyword Plan campaign. // KeywordPlanCampaign resource names have the form: // // `customers/{customer_id}/keywordPlanCampaigns/{kp_campaign_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + } + ]; // The keyword plan this campaign belongs to. - google.protobuf.StringValue keyword_plan = 2; + google.protobuf.StringValue keyword_plan = 2 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlan" + }]; - // The ID of the Keyword Plan campaign. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the Keyword Plan campaign. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the Keyword Plan campaign. // @@ -55,14 +68,15 @@ message KeywordPlanCampaign { // The languages targeted for the Keyword Plan campaign. // Max allowed: 1. - repeated google.protobuf.StringValue language_constants = 5; + repeated google.protobuf.StringValue language_constants = 5 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/LanguageConstant" + }]; // Targeting network. // // This field is required and should not be empty when creating Keyword Plan // campaigns. - google.ads.googleads.v1.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork - keyword_plan_network = 6; + google.ads.googleads.v1.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 6; // A default max cpc bid in micros, and in the account currency, for all ad // groups under the campaign. @@ -80,5 +94,7 @@ message KeywordPlanCampaign { // Next ID: 3 message KeywordPlanGeoTarget { // Required. The resource name of the geo target. - google.protobuf.StringValue geo_target_constant = 1; + google.protobuf.StringValue geo_target_constant = 1 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + }]; } diff --git a/google/ads/googleads/v1/resources/keyword_plan_keyword.proto b/google/ads/googleads/v1/resources/keyword_plan_keyword.proto index 6e969a7b6..db80508db 100644 --- a/google/ads/googleads/v1/resources/keyword_plan_keyword.proto +++ b/google/ads/googleads/v1/resources/keyword_plan_keyword.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/keyword_match_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,24 +36,35 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A Keyword Plan ad group keyword. // Max number of keyword plan keywords per plan: 2500. message KeywordPlanKeyword { - // The resource name of the Keyword Plan ad group keyword. + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlanKeyword" + pattern: "customers/{customer}/keywordPlanKeywords/{keyword_plan_keyword}" + }; + + // Immutable. The resource name of the Keyword Plan ad group keyword. // KeywordPlanKeyword resource names have the form: // // `customers/{customer_id}/keywordPlanKeywords/{kp_ad_group_keyword_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanKeyword" + } + ]; // The Keyword Plan ad group to which this keyword belongs. - google.protobuf.StringValue keyword_plan_ad_group = 2; + google.protobuf.StringValue keyword_plan_ad_group = 2 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanAdGroup" + }]; - // The ID of the Keyword Plan keyword. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the Keyword Plan keyword. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The keyword text. google.protobuf.StringValue text = 4; // The keyword match type. - google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType - match_type = 5; + google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 5; // A keyword level max cpc bid in micros, in the account currency, that // overrides the keyword plan ad group cpc bid. diff --git a/google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto b/google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto index 546dd4546..e63beb463 100644 --- a/google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto +++ b/google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/keyword_match_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,23 +36,33 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A Keyword Plan negative keyword. // Max number of keyword plan negative keywords per plan: 1000. message KeywordPlanNegativeKeyword { - // The resource name of the Keyword Plan negative keyword. + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlanNegativeKeyword" + pattern: "customers/{customer}/keywordPlanNegativeKeywords/{keyword_plan_negative_keyword}" + }; + + // Immutable. The resource name of the Keyword Plan negative keyword. // KeywordPlanNegativeKeyword resource names have the form: // - // // `customers/{customer_id}/keywordPlanNegativeKeywords/{kp_negative_keyword_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanNegativeKeyword" + } + ]; // The Keyword Plan campaign to which this negative keyword belongs. - google.protobuf.StringValue keyword_plan_campaign = 2; + google.protobuf.StringValue keyword_plan_campaign = 2 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + }]; - // The ID of the Keyword Plan negative keyword. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the Keyword Plan negative keyword. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The keyword text. google.protobuf.StringValue text = 4; // The keyword match type. - google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType - match_type = 5; + google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 5; } diff --git a/google/ads/googleads/v1/resources/keyword_view.proto b/google/ads/googleads/v1/resources/keyword_view.proto index 90fba7058..f0d885036 100644 --- a/google/ads/googleads/v1/resources/keyword_view.proto +++ b/google/ads/googleads/v1/resources/keyword_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A keyword view. message KeywordView { - // The resource name of the keyword view. + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordView" + pattern: "customers/{customer}/keywordViews/{keyword_view}" + }; + + // Output only. The resource name of the keyword view. // Keyword view resource names have the form: // // `customers/{customer_id}/keywordViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordView" + } + ]; } diff --git a/google/ads/googleads/v1/resources/label.proto b/google/ads/googleads/v1/resources/label.proto index aa30abe0a..8202a65f0 100644 --- a/google/ads/googleads/v1/resources/label.proto +++ b/google/ads/googleads/v1/resources/label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/text_label.proto"; import "google/ads/googleads/v1/enums/label_status.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -33,13 +34,23 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A label. message Label { - // Name of the resource. + option (google.api.resource) = { + type: "googleads.googleapis.com/Label" + pattern: "customers/{customer}/labels/{label}" + }; + + // Immutable. Name of the resource. // Label resource names have the form: // `customers/{customer_id}/labels/{label_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; - // Id of the label. Read only. - google.protobuf.Int64Value id = 2; + // Output only. Id of the label. Read only. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the label. // @@ -48,8 +59,8 @@ message Label { // The length of this string should be between 1 and 80, inclusive. google.protobuf.StringValue name = 3; - // Status of the label. Read only. - google.ads.googleads.v1.enums.LabelStatusEnum.LabelStatus status = 4; + // Output only. Status of the label. Read only. + google.ads.googleads.v1.enums.LabelStatusEnum.LabelStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // A type of label displaying text on a colored background. google.ads.googleads.v1.common.TextLabel text_label = 5; diff --git a/google/ads/googleads/v1/resources/landing_page_view.proto b/google/ads/googleads/v1/resources/landing_page_view.proto index f2aa756c0..093b64b10 100644 --- a/google/ads/googleads/v1/resources/landing_page_view.proto +++ b/google/ads/googleads/v1/resources/landing_page_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -34,13 +35,22 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A landing page view with metrics aggregated at the unexpanded final URL // level. message LandingPageView { - // The resource name of the landing page view. + option (google.api.resource) = { + type: "googleads.googleapis.com/LandingPageView" + pattern: "customers/{customer}/landingPageViews/{landing_page_view}" + }; + + // Output only. The resource name of the landing page view. // Landing page view resource names have the form: // - // // `customers/{customer_id}/landingPageViews/{unexpanded_final_url_fingerprint}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LandingPageView" + } + ]; - // The advertiser-specified final URL. - google.protobuf.StringValue unexpanded_final_url = 2; + // Output only. The advertiser-specified final URL. + google.protobuf.StringValue unexpanded_final_url = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/language_constant.proto b/google/ads/googleads/v1/resources/language_constant.proto index 77c7a2db3..9a797e040 100644 --- a/google/ads/googleads/v1/resources/language_constant.proto +++ b/google/ads/googleads/v1/resources/language_constant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -33,22 +34,32 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A language. message LanguageConstant { - // The resource name of the language constant. + option (google.api.resource) = { + type: "googleads.googleapis.com/LanguageConstant" + pattern: "languageConstants/{language_constant}" + }; + + // Output only. The resource name of the language constant. // Language constant resource names have the form: // // `languageConstants/{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LanguageConstant" + } + ]; - // The ID of the language constant. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the language constant. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The language code, e.g. "en_US", "en_AU", "es", "fr", etc. - google.protobuf.StringValue code = 3; + // Output only. The language code, e.g. "en_US", "en_AU", "es", "fr", etc. + google.protobuf.StringValue code = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The full name of the language in English, e.g., "English (US)", "Spanish", + // Output only. The full name of the language in English, e.g., "English (US)", "Spanish", // etc. - google.protobuf.StringValue name = 4; + google.protobuf.StringValue name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the language is targetable. - google.protobuf.BoolValue targetable = 5; + // Output only. Whether the language is targetable. + google.protobuf.BoolValue targetable = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/location_view.proto b/google/ads/googleads/v1/resources/location_view.proto index 68d43e6de..9e872128b 100644 --- a/google/ads/googleads/v1/resources/location_view.proto +++ b/google/ads/googleads/v1/resources/location_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; @@ -33,9 +34,19 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A location view summarizes the performance of campaigns by // Location criteria. message LocationView { - // The resource name of the location view. + option (google.api.resource) = { + type: "googleads.googleapis.com/LocationView" + pattern: "customers/{customer}/locationViews/{location_view}" + }; + + // Output only. The resource name of the location view. // Location view resource names have the form: // // `customers/{customer_id}/locationViews/{campaign_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LocationView" + } + ]; } diff --git a/google/ads/googleads/v1/resources/managed_placement_view.proto b/google/ads/googleads/v1/resources/managed_placement_view.proto index 4e6b4ab4a..c9addb1ee 100644 --- a/google/ads/googleads/v1/resources/managed_placement_view.proto +++ b/google/ads/googleads/v1/resources/managed_placement_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; @@ -32,10 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A managed placement view. message ManagedPlacementView { - // The resource name of the Managed Placement view. + option (google.api.resource) = { + type: "googleads.googleapis.com/ManagedPlacementView" + pattern: "customers/{customer}/managedPlacementViews/{managed_placement_view}" + }; + + // Output only. The resource name of the Managed Placement view. // Managed placement view resource names have the form: // - // // `customers/{customer_id}/managedPlacementViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ManagedPlacementView" + } + ]; } diff --git a/google/ads/googleads/v1/resources/media_file.proto b/google/ads/googleads/v1/resources/media_file.proto index 5002b006c..ed1133fe9 100644 --- a/google/ads/googleads/v1/resources/media_file.proto +++ b/google/ads/googleads/v1/resources/media_file.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/media_type.proto"; import "google/ads/googleads/v1/enums/mime_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,80 +36,90 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A media file. message MediaFile { - // The resource name of the media file. + option (google.api.resource) = { + type: "googleads.googleapis.com/MediaFile" + pattern: "customers/{customer}/mediaFiles/{media_file}" + }; + + // Immutable. The resource name of the media file. // Media file resource names have the form: // // `customers/{customer_id}/mediaFiles/{media_file_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MediaFile" + } + ]; - // The ID of the media file. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the media file. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Type of the media file. - google.ads.googleads.v1.enums.MediaTypeEnum.MediaType type = 5; + // Immutable. Type of the media file. + google.ads.googleads.v1.enums.MediaTypeEnum.MediaType type = 5 [(google.api.field_behavior) = IMMUTABLE]; - // The mime type of the media file. - google.ads.googleads.v1.enums.MimeTypeEnum.MimeType mime_type = 6; + // Output only. The mime type of the media file. + google.ads.googleads.v1.enums.MimeTypeEnum.MimeType mime_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The URL of where the original media file was downloaded from (or a file - // name). - google.protobuf.StringValue source_url = 7; + // Immutable. The URL of where the original media file was downloaded from (or a file + // name). Only used for media of type AUDIO and IMAGE. + google.protobuf.StringValue source_url = 7 [(google.api.field_behavior) = IMMUTABLE]; - // The name of the media file. The name can be used by clients to help + // Immutable. The name of the media file. The name can be used by clients to help // identify previously uploaded media. - google.protobuf.StringValue name = 8; + google.protobuf.StringValue name = 8 [(google.api.field_behavior) = IMMUTABLE]; - // The size of the media file in bytes. - google.protobuf.Int64Value file_size = 9; + // Output only. The size of the media file in bytes. + google.protobuf.Int64Value file_size = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // The specific type of the media file. oneof mediatype { - // Encapsulates an Image. - MediaImage image = 3; + // Immutable. Encapsulates an Image. + MediaImage image = 3 [(google.api.field_behavior) = IMMUTABLE]; - // A ZIP archive media the content of which contains HTML5 assets. - MediaBundle media_bundle = 4; + // Immutable. A ZIP archive media the content of which contains HTML5 assets. + MediaBundle media_bundle = 4 [(google.api.field_behavior) = IMMUTABLE]; - // Encapsulates an Audio. - MediaAudio audio = 10; + // Output only. Encapsulates an Audio. + MediaAudio audio = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Encapsulates a Video. - MediaVideo video = 11; + // Immutable. Encapsulates a Video. + MediaVideo video = 11 [(google.api.field_behavior) = IMMUTABLE]; } } // Encapsulates an Image. message MediaImage { - // Raw image data. - google.protobuf.BytesValue data = 1; + // Immutable. Raw image data. + google.protobuf.BytesValue data = 1 [(google.api.field_behavior) = IMMUTABLE]; } // Represents a ZIP archive media the content of which contains HTML5 assets. message MediaBundle { - // Raw zipped data. - google.protobuf.BytesValue data = 1; + // Immutable. Raw zipped data. + google.protobuf.BytesValue data = 1 [(google.api.field_behavior) = IMMUTABLE]; } // Encapsulates an Audio. message MediaAudio { - // The duration of the Audio in milliseconds. - google.protobuf.Int64Value ad_duration_millis = 1; + // Output only. The duration of the Audio in milliseconds. + google.protobuf.Int64Value ad_duration_millis = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Encapsulates a Video. message MediaVideo { - // The duration of the Video in milliseconds. - google.protobuf.Int64Value ad_duration_millis = 1; + // Output only. The duration of the Video in milliseconds. + google.protobuf.Int64Value ad_duration_millis = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The YouTube video ID (as seen in YouTube URLs). - google.protobuf.StringValue youtube_video_id = 2; + // Immutable. The YouTube video ID (as seen in YouTube URLs). + google.protobuf.StringValue youtube_video_id = 2 [(google.api.field_behavior) = IMMUTABLE]; - // The Advertising Digital Identification code for this video, as defined by + // Output only. The Advertising Digital Identification code for this video, as defined by // the American Association of Advertising Agencies, used mainly for // television commercials. - google.protobuf.StringValue advertising_id_code = 3; + google.protobuf.StringValue advertising_id_code = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The Industry Standard Commercial Identifier code for this video, used + // Output only. The Industry Standard Commercial Identifier code for this video, used // mainly for television commercials. - google.protobuf.StringValue isci_code = 4; + google.protobuf.StringValue isci_code = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/merchant_center_link.proto b/google/ads/googleads/v1/resources/merchant_center_link.proto index 55100b262..b860df139 100644 --- a/google/ads/googleads/v1/resources/merchant_center_link.proto +++ b/google/ads/googleads/v1/resources/merchant_center_link.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/merchant_center_link_status.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,21 +36,30 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A data sharing connection, proposed or in use, // between a Google Ads Customer and a Merchant Center account. message MerchantCenterLink { - // The resource name of the merchant center link. + option (google.api.resource) = { + type: "googleads.googleapis.com/MerchantCenterLink" + pattern: "customers/{customer}/merchantCenterLinks/{merchant_center_link}" + }; + + // Immutable. The resource name of the merchant center link. // Merchant center link resource names have the form: // // `customers/{customer_id}/merchantCenterLinks/{merchant_center_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MerchantCenterLink" + } + ]; - // The ID of the Merchant Center account. + // Output only. The ID of the Merchant Center account. // This field is readonly. - google.protobuf.Int64Value id = 3; + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name of the Merchant Center account. + // Output only. The name of the Merchant Center account. // This field is readonly. - google.protobuf.StringValue merchant_center_account_name = 4; + google.protobuf.StringValue merchant_center_account_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // The status of the link. - google.ads.googleads.v1.enums.MerchantCenterLinkStatusEnum - .MerchantCenterLinkStatus status = 5; + google.ads.googleads.v1.enums.MerchantCenterLinkStatusEnum.MerchantCenterLinkStatus status = 5; } diff --git a/google/ads/googleads/v1/resources/mobile_app_category_constant.proto b/google/ads/googleads/v1/resources/mobile_app_category_constant.proto index f859dc04f..a645d9a52 100644 --- a/google/ads/googleads/v1/resources/mobile_app_category_constant.proto +++ b/google/ads/googleads/v1/resources/mobile_app_category_constant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -33,15 +34,25 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A mobile application category constant. message MobileAppCategoryConstant { - // The resource name of the mobile app category constant. + option (google.api.resource) = { + type: "googleads.googleapis.com/MobileAppCategoryConstant" + pattern: "mobileAppCategoryConstants/{mobile_app_category_constant}" + }; + + // Output only. The resource name of the mobile app category constant. // Mobile app category constant resource names have the form: // // `mobileAppCategoryConstants/{mobile_app_category_id}` - string resource_name = 1; - - // The ID of the mobile app category constant. - google.protobuf.Int32Value id = 2; - - // Mobile app category name. - google.protobuf.StringValue name = 3; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MobileAppCategoryConstant" + } + ]; + + // Output only. The ID of the mobile app category constant. + google.protobuf.Int32Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Mobile app category name. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/mobile_device_constant.proto b/google/ads/googleads/v1/resources/mobile_device_constant.proto index b68852cef..47e8558ac 100644 --- a/google/ads/googleads/v1/resources/mobile_device_constant.proto +++ b/google/ads/googleads/v1/resources/mobile_device_constant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/mobile_device_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -34,24 +35,34 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A mobile device constant. message MobileDeviceConstant { - // The resource name of the mobile device constant. + option (google.api.resource) = { + type: "googleads.googleapis.com/MobileDeviceConstant" + pattern: "mobileDeviceConstants/{mobile_device_constant}" + }; + + // Output only. The resource name of the mobile device constant. // Mobile device constant resource names have the form: // // `mobileDeviceConstants/{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MobileDeviceConstant" + } + ]; - // The ID of the mobile device constant. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the mobile device constant. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name of the mobile device. - google.protobuf.StringValue name = 3; + // Output only. The name of the mobile device. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The manufacturer of the mobile device. - google.protobuf.StringValue manufacturer_name = 4; + // Output only. The manufacturer of the mobile device. + google.protobuf.StringValue manufacturer_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The operating system of the mobile device. - google.protobuf.StringValue operating_system_name = 5; + // Output only. The operating system of the mobile device. + google.protobuf.StringValue operating_system_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The type of mobile device. - google.ads.googleads.v1.enums.MobileDeviceTypeEnum.MobileDeviceType type = 6; + // Output only. The type of mobile device. + google.ads.googleads.v1.enums.MobileDeviceTypeEnum.MobileDeviceType type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/mutate_job.proto b/google/ads/googleads/v1/resources/mutate_job.proto index 038ca8ba7..12ce38714 100644 --- a/google/ads/googleads/v1/resources/mutate_job.proto +++ b/google/ads/googleads/v1/resources/mutate_job.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/mutate_job_status.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -33,52 +34,62 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // Proto file describing the mutate job resource. // A list of mutates being processed asynchronously. The mutates are uploaded -// by the user. The mutates themselves aren’t readable and the results of the +// by the user. The mutates themselves aren't readable and the results of the // job can only be read using MutateJobService.ListMutateJobResults. message MutateJob { + option (google.api.resource) = { + type: "googleads.googleapis.com/MutateJob" + pattern: "customers/{customer}/mutateJobs/{mutate_job}" + }; + // Additional information about the mutate job. This message is also used as // metadata returned in mutate job Long Running Operations. message MutateJobMetadata { - // The time when this mutate job was created. + // Output only. The time when this mutate job was created. // Formatted as yyyy-mm-dd hh:mm:ss. Example: "2018-03-05 09:15:00" - google.protobuf.StringValue creation_date_time = 1; + google.protobuf.StringValue creation_date_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The time when this mutate job was completed. + // Output only. The time when this mutate job was completed. // Formatted as yyyy-MM-dd HH:mm:ss. Example: "2018-03-05 09:16:00" - google.protobuf.StringValue completion_date_time = 2; + google.protobuf.StringValue completion_date_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The fraction (between 0.0 and 1.0) of mutates that have been processed. + // Output only. The fraction (between 0.0 and 1.0) of mutates that have been processed. // This is empty if the job hasn't started running yet. - google.protobuf.DoubleValue estimated_completion_ratio = 3; + google.protobuf.DoubleValue estimated_completion_ratio = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number of mutate operations in the mutate job. - google.protobuf.Int64Value operation_count = 4; + // Output only. The number of mutate operations in the mutate job. + google.protobuf.Int64Value operation_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number of mutate operations executed by the mutate job. + // Output only. The number of mutate operations executed by the mutate job. // Present only if the job has started running. - google.protobuf.Int64Value executed_operation_count = 5; + google.protobuf.Int64Value executed_operation_count = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // The resource name of the mutate job. + // Immutable. The resource name of the mutate job. // Mutate job resource names have the form: // // `customers/{customer_id}/mutateJobs/{mutate_job_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; - // ID of this mutate job. - google.protobuf.Int64Value id = 2; + // Output only. ID of this mutate job. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The next sequence token to use when adding operations. Only set when the + // Output only. The next sequence token to use when adding operations. Only set when the // mutate job status is PENDING. - google.protobuf.StringValue next_add_sequence_token = 3; + google.protobuf.StringValue next_add_sequence_token = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Contains additional information about this mutate job. - MutateJobMetadata metadata = 4; + // Output only. Contains additional information about this mutate job. + MutateJobMetadata metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Status of this mutate job. - google.ads.googleads.v1.enums.MutateJobStatusEnum.MutateJobStatus status = 5; + // Output only. Status of this mutate job. + google.ads.googleads.v1.enums.MutateJobStatusEnum.MutateJobStatus status = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource name of the long-running operation that can be used to poll + // Output only. The resource name of the long-running operation that can be used to poll // for completion. Only set when the mutate job status is RUNNING or DONE. - google.protobuf.StringValue long_running_operation = 6; + google.protobuf.StringValue long_running_operation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/operating_system_version_constant.proto b/google/ads/googleads/v1/resources/operating_system_version_constant.proto index 29c61b1e0..e81cd8630 100644 --- a/google/ads/googleads/v1/resources/operating_system_version_constant.proto +++ b/google/ads/googleads/v1/resources/operating_system_version_constant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/enums/operating_system_version_operator_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -33,32 +34,38 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // Proto file describing the operating system version constant resource. // A mobile operating system version or a range of versions, depending on -// 'operator_type'. The complete list of available mobile platforms is available -// - // here - repeated google.protobuf.StringValue path = 4; + // "Pets & Animals/Pets/Dogs" category. List of available topic categories at + // https://developers.google.com/adwords/api/docs/appendix/verticals + repeated google.protobuf.StringValue path = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/topic_view.proto b/google/ads/googleads/v1/resources/topic_view.proto index 4a0a016a3..e7b8c3e15 100644 --- a/google/ads/googleads/v1/resources/topic_view.proto +++ b/google/ads/googleads/v1/resources/topic_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A topic view. message TopicView { - // The resource name of the topic view. + option (google.api.resource) = { + type: "googleads.googleapis.com/TopicView" + pattern: "customers/{customer}/topicViews/{topic_view}" + }; + + // Output only. The resource name of the topic view. // Topic view resource names have the form: // // `customers/{customer_id}/topicViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/TopicView" + } + ]; } diff --git a/google/ads/googleads/v1/resources/user_interest.proto b/google/ads/googleads/v1/resources/user_interest.proto index 61f8847f0..2ab92157d 100644 --- a/google/ads/googleads/v1/resources/user_interest.proto +++ b/google/ads/googleads/v1/resources/user_interest.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.resources; import "google/ads/googleads/v1/common/criterion_category_availability.proto"; import "google/ads/googleads/v1/enums/user_interest_taxonomy_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -35,29 +36,42 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A user interest: a particular interest-based vertical to be targeted. message UserInterest { - // The resource name of the user interest. + option (google.api.resource) = { + type: "googleads.googleapis.com/UserInterest" + pattern: "customers/{customer}/userInterests/{user_interest}" + }; + + // Output only. The resource name of the user interest. // User interest resource names have the form: // // `customers/{customer_id}/userInterests/{user_interest_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserInterest" + } + ]; - // Taxonomy type of the user interest. - google.ads.googleads.v1.enums.UserInterestTaxonomyTypeEnum - .UserInterestTaxonomyType taxonomy_type = 2; + // Output only. Taxonomy type of the user interest. + google.ads.googleads.v1.enums.UserInterestTaxonomyTypeEnum.UserInterestTaxonomyType taxonomy_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The ID of the user interest. - google.protobuf.Int64Value user_interest_id = 3; + // Output only. The ID of the user interest. + google.protobuf.Int64Value user_interest_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name of the user interest. - google.protobuf.StringValue name = 4; + // Output only. The name of the user interest. + google.protobuf.StringValue name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The parent of the user interest. - google.protobuf.StringValue user_interest_parent = 5; + // Output only. The parent of the user interest. + google.protobuf.StringValue user_interest_parent = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserInterest" + } + ]; - // True if the user interest is launched to all channels and locales. - google.protobuf.BoolValue launched_to_all = 6; + // Output only. True if the user interest is launched to all channels and locales. + google.protobuf.BoolValue launched_to_all = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Availability information of the user interest. - repeated google.ads.googleads.v1.common.CriterionCategoryAvailability - availabilities = 7; + // Output only. Availability information of the user interest. + repeated google.ads.googleads.v1.common.CriterionCategoryAvailability availabilities = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/resources/user_list.proto b/google/ads/googleads/v1/resources/user_list.proto index 6fa7ce782..e9c6538ca 100644 --- a/google/ads/googleads/v1/resources/user_list.proto +++ b/google/ads/googleads/v1/resources/user_list.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -24,8 +23,10 @@ import "google/ads/googleads/v1/enums/user_list_closing_reason.proto"; import "google/ads/googleads/v1/enums/user_list_membership_status.proto"; import "google/ads/googleads/v1/enums/user_list_size_range.proto"; import "google/ads/googleads/v1/enums/user_list_type.proto"; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -40,21 +41,31 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A user list. This is a list of users a customer may target. message UserList { - // The resource name of the user list. + option (google.api.resource) = { + type: "googleads.googleapis.com/UserList" + pattern: "customers/{customer}/userLists/{user_list}" + }; + + // Immutable. The resource name of the user list. // User list resource names have the form: // // `customers/{customer_id}/userLists/{user_list_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserList" + } + ]; - // Id of the user list. - google.protobuf.Int64Value id = 2; + // Output only. Id of the user list. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A flag that indicates if a user may edit a list. Depends on the list + // Output only. A flag that indicates if a user may edit a list. Depends on the list // ownership and list type. For example, external remarketing user lists are // not editable. // // This field is read-only. - google.protobuf.BoolValue read_only = 3; + google.protobuf.BoolValue read_only = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Name of this user list. Depending on its access_reason, the user list name // may not be unique (e.g. if access_reason=SHARED) @@ -66,8 +77,7 @@ message UserList { // Membership status of this user list. Indicates whether a user list is open // or active. Only open user lists can accumulate more users and can be // targeted to. - google.ads.googleads.v1.enums.UserListMembershipStatusEnum - .UserListMembershipStatus membership_status = 6; + google.ads.googleads.v1.enums.UserListMembershipStatusEnum.UserListMembershipStatus membership_status = 6; // An ID from external system. It is used by user list sellers to correlate // IDs on their systems. @@ -81,80 +91,73 @@ message UserList { // It'll be ignored for logical_user_list. google.protobuf.Int64Value membership_life_span = 8; - // Estimated number of users in this user list, on the Google Display Network. + // Output only. Estimated number of users in this user list, on the Google Display Network. // This value is null if the number of users has not yet been determined. // // This field is read-only. - google.protobuf.Int64Value size_for_display = 9; + google.protobuf.Int64Value size_for_display = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Size range in terms of number of users of the UserList, on the Google + // Output only. Size range in terms of number of users of the UserList, on the Google // Display Network. // // This field is read-only. - google.ads.googleads.v1.enums.UserListSizeRangeEnum.UserListSizeRange - size_range_for_display = 10; + google.ads.googleads.v1.enums.UserListSizeRangeEnum.UserListSizeRange size_range_for_display = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Estimated number of users in this user list in the google.com domain. + // Output only. Estimated number of users in this user list in the google.com domain. // These are the users available for targeting in Search campaigns. // This value is null if the number of users has not yet been determined. // // This field is read-only. - google.protobuf.Int64Value size_for_search = 11; + google.protobuf.Int64Value size_for_search = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Size range in terms of number of users of the UserList, for Search ads. + // Output only. Size range in terms of number of users of the UserList, for Search ads. // // This field is read-only. - google.ads.googleads.v1.enums.UserListSizeRangeEnum.UserListSizeRange - size_range_for_search = 12; + google.ads.googleads.v1.enums.UserListSizeRangeEnum.UserListSizeRange size_range_for_search = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Type of this list. + // Output only. Type of this list. // // This field is read-only. - google.ads.googleads.v1.enums.UserListTypeEnum.UserListType type = 13; + google.ads.googleads.v1.enums.UserListTypeEnum.UserListType type = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Indicating the reason why this user list membership status is closed. It is // only populated on lists that were automatically closed due to inactivity, // and will be cleared once the list membership status becomes open. - google.ads.googleads.v1.enums.UserListClosingReasonEnum.UserListClosingReason - closing_reason = 14; + google.ads.googleads.v1.enums.UserListClosingReasonEnum.UserListClosingReason closing_reason = 14; - // Indicates the reason this account has been granted access to the list. + // Output only. Indicates the reason this account has been granted access to the list. // The reason can be SHARED, OWNED, LICENSED or SUBSCRIBED. // // This field is read-only. - google.ads.googleads.v1.enums.AccessReasonEnum.AccessReason access_reason = - 15; + google.ads.googleads.v1.enums.AccessReasonEnum.AccessReason access_reason = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; // Indicates if this share is still enabled. When a UserList is shared with // the user this field is set to ENABLED. Later the userList owner can decide // to revoke the share and make it DISABLED. // The default value of this field is set to ENABLED. - google.ads.googleads.v1.enums.UserListAccessStatusEnum.UserListAccessStatus - account_user_list_status = 16; + google.ads.googleads.v1.enums.UserListAccessStatusEnum.UserListAccessStatus account_user_list_status = 16; // Indicates if this user list is eligible for Google Search Network. google.protobuf.BoolValue eligible_for_search = 17; - // Indicates this user list is eligible for Google Display Network. + // Output only. Indicates this user list is eligible for Google Display Network. // // This field is read-only. - google.protobuf.BoolValue eligible_for_display = 18; + google.protobuf.BoolValue eligible_for_display = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; // The user list. // // Exactly one must be set. oneof user_list { // User list of CRM users provided by the advertiser. - google.ads.googleads.v1.common.CrmBasedUserListInfo crm_based_user_list = - 19; + google.ads.googleads.v1.common.CrmBasedUserListInfo crm_based_user_list = 19; - // User list which are similar to users from another UserList. + // Output only. User list which are similar to users from another UserList. // These lists are readonly and automatically created by google. - google.ads.googleads.v1.common.SimilarUserListInfo similar_user_list = 20; + google.ads.googleads.v1.common.SimilarUserListInfo similar_user_list = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; // User list generated by a rule. - google.ads.googleads.v1.common.RuleBasedUserListInfo rule_based_user_list = - 21; + google.ads.googleads.v1.common.RuleBasedUserListInfo rule_based_user_list = 21; // User list that is a custom combination of user lists and user interests. google.ads.googleads.v1.common.LogicalUserListInfo logical_user_list = 22; diff --git a/google/ads/googleads/v1/resources/video.proto b/google/ads/googleads/v1/resources/video.proto index 1a75018d6..1201fd7d3 100644 --- a/google/ads/googleads/v1/resources/video.proto +++ b/google/ads/googleads/v1/resources/video.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.resources; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; @@ -33,21 +34,31 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; // A video. message Video { - // The resource name of the video. + option (google.api.resource) = { + type: "googleads.googleapis.com/Video" + pattern: "customers/{customer}/videos/{video}" + }; + + // Output only. The resource name of the video. // Video resource names have the form: // // `customers/{customer_id}/videos/{video_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Video" + } + ]; - // The ID of the video. - google.protobuf.StringValue id = 2; + // Output only. The ID of the video. + google.protobuf.StringValue id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The owner channel id of the video. - google.protobuf.StringValue channel_id = 3; + // Output only. The owner channel id of the video. + google.protobuf.StringValue channel_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The duration of the video in milliseconds. - google.protobuf.Int64Value duration_millis = 4; + // Output only. The duration of the video in milliseconds. + google.protobuf.Int64Value duration_millis = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The title of the video. - google.protobuf.StringValue title = 5; + // Output only. The title of the video. + google.protobuf.StringValue title = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v1/services/account_budget_proposal_service.proto b/google/ads/googleads/v1/services/account_budget_proposal_service.proto index 288cb317b..db5e82fea 100644 --- a/google/ads/googleads/v1/services/account_budget_proposal_service.proto +++ b/google/ads/googleads/v1/services/account_budget_proposal_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/account_budget_proposal.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -38,7 +40,8 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // existing one. // // Reads for account-level budgets managed by these proposals will be -// supported in a future version. Please use BudgetOrderService until then: +// supported in a future version. Until then, please use the +// BudgetOrderService from the AdWords API. Learn more at // https://developers.google.com/adwords/api/docs/guides/budget-order // // Mutates: @@ -46,40 +49,47 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // UPDATE operations aren't supported. // The REMOVE operation cancels a pending proposal. service AccountBudgetProposalService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns an account-level budget proposal in full detail. - rpc GetAccountBudgetProposal(GetAccountBudgetProposalRequest) - returns (google.ads.googleads.v1.resources.AccountBudgetProposal) { + rpc GetAccountBudgetProposal(GetAccountBudgetProposalRequest) returns (google.ads.googleads.v1.resources.AccountBudgetProposal) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/accountBudgetProposals/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes account budget proposals. Operation statuses // are returned. - rpc MutateAccountBudgetProposal(MutateAccountBudgetProposalRequest) - returns (MutateAccountBudgetProposalResponse) { + rpc MutateAccountBudgetProposal(MutateAccountBudgetProposalRequest) returns (MutateAccountBudgetProposalResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/accountBudgetProposals:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operation"; } } // Request message for // [AccountBudgetProposalService.GetAccountBudgetProposal][google.ads.googleads.v1.services.AccountBudgetProposalService.GetAccountBudgetProposal]. message GetAccountBudgetProposalRequest { - // The resource name of the account-level budget proposal to fetch. - string resource_name = 1; + // Required. The resource name of the account-level budget proposal to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudgetProposal" + } + ]; } // Request message for // [AccountBudgetProposalService.MutateAccountBudgetProposal][google.ads.googleads.v1.services.AccountBudgetProposalService.MutateAccountBudgetProposal]. message MutateAccountBudgetProposalRequest { - // The ID of the customer. - string customer_id = 1; + // Required. The ID of the customer. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The operation to perform on an individual account-level budget proposal. - AccountBudgetProposalOperation operation = 2; + // Required. The operation to perform on an individual account-level budget proposal. + AccountBudgetProposalOperation operation = 2 [(google.api.field_behavior) = REQUIRED]; // If true, the request is validated but not executed. Only errors are // returned, not results. @@ -108,7 +118,6 @@ message AccountBudgetProposalOperation { // Remove operation: A resource name for the removed proposal is expected, // in this format: // - // // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}` // A request may be cancelled iff it is pending. string remove = 1; diff --git a/google/ads/googleads/v1/services/account_budget_service.proto b/google/ads/googleads/v1/services/account_budget_service.proto index b8c3adb55..5148e8a2e 100644 --- a/google/ads/googleads/v1/services/account_budget_service.proto +++ b/google/ads/googleads/v1/services/account_budget_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/account_budget.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -35,18 +37,25 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // // Account-level budgets are mutated by creating proposal resources. service AccountBudgetService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns an account-level budget in full detail. - rpc GetAccountBudget(GetAccountBudgetRequest) - returns (google.ads.googleads.v1.resources.AccountBudget) { + rpc GetAccountBudget(GetAccountBudgetRequest) returns (google.ads.googleads.v1.resources.AccountBudget) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/accountBudgets/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [AccountBudgetService.GetAccountBudget][google.ads.googleads.v1.services.AccountBudgetService.GetAccountBudget]. message GetAccountBudgetRequest { - // The resource name of the account-level budget to fetch. - string resource_name = 1; + // Required. The resource name of the account-level budget to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudget" + } + ]; } diff --git a/google/ads/googleads/v1/services/ad_group_ad_label_service.proto b/google/ads/googleads/v1/services/ad_group_ad_label_service.proto index 1d2458203..8f6970c03 100644 --- a/google/ads/googleads/v1/services/ad_group_ad_label_service.proto +++ b/google/ads/googleads/v1/services/ad_group_ad_label_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,7 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/ad_group_ad_label.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -35,40 +36,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage labels on ad group ads. service AdGroupAdLabelService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested ad group ad label in full detail. - rpc GetAdGroupAdLabel(GetAdGroupAdLabelRequest) - returns (google.ads.googleads.v1.resources.AdGroupAdLabel) { + rpc GetAdGroupAdLabel(GetAdGroupAdLabelRequest) returns (google.ads.googleads.v1.resources.AdGroupAdLabel) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/adGroupAdLabels/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates and removes ad group ad labels. // Operation statuses are returned. - rpc MutateAdGroupAdLabels(MutateAdGroupAdLabelsRequest) - returns (MutateAdGroupAdLabelsResponse) { + rpc MutateAdGroupAdLabels(MutateAdGroupAdLabelsRequest) returns (MutateAdGroupAdLabelsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/adGroupAdLabels:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [AdGroupAdLabelService.GetAdGroupAdLabel][google.ads.googleads.v1.services.AdGroupAdLabelService.GetAdGroupAdLabel]. +// Request message for [AdGroupAdLabelService.GetAdGroupAdLabel][google.ads.googleads.v1.services.AdGroupAdLabelService.GetAdGroupAdLabel]. message GetAdGroupAdLabelRequest { - // The resource name of the ad group ad label to fetch. - string resource_name = 1; + // Required. The resource name of the ad group ad label to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAdLabel" + } + ]; } -// Request message for -// [AdGroupAdLabelService.MutateAdGroupAdLabels][google.ads.googleads.v1.services.AdGroupAdLabelService.MutateAdGroupAdLabels]. +// Request message for [AdGroupAdLabelService.MutateAdGroupAdLabels][google.ads.googleads.v1.services.AdGroupAdLabelService.MutateAdGroupAdLabels]. message MutateAdGroupAdLabelsRequest { - // ID of the customer whose ad group ad labels are being modified. - string customer_id = 1; + // Required. ID of the customer whose ad group ad labels are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on ad group ad labels. - repeated AdGroupAdLabelOperation operations = 2; + // Required. The list of operations to perform on ad group ad labels. + repeated AdGroupAdLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/ad_group_ad_service.proto b/google/ads/googleads/v1/services/ad_group_ad_service.proto index 93c441133..d82723cb7 100644 --- a/google/ads/googleads/v1/services/ad_group_ad_service.proto +++ b/google/ads/googleads/v1/services/ad_group_ad_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,8 +19,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/common/policy.proto"; import "google/ads/googleads/v1/resources/ad_group_ad.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -37,39 +38,44 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage ads in an ad group. service AdGroupAdService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested ad in full detail. - rpc GetAdGroupAd(GetAdGroupAdRequest) - returns (google.ads.googleads.v1.resources.AdGroupAd) { + rpc GetAdGroupAd(GetAdGroupAdRequest) returns (google.ads.googleads.v1.resources.AdGroupAd) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/adGroupAds/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes ads. Operation statuses are returned. - rpc MutateAdGroupAds(MutateAdGroupAdsRequest) - returns (MutateAdGroupAdsResponse) { + rpc MutateAdGroupAds(MutateAdGroupAdsRequest) returns (MutateAdGroupAdsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/adGroupAds:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [AdGroupAdService.GetAdGroupAd][google.ads.googleads.v1.services.AdGroupAdService.GetAdGroupAd]. +// Request message for [AdGroupAdService.GetAdGroupAd][google.ads.googleads.v1.services.AdGroupAdService.GetAdGroupAd]. message GetAdGroupAdRequest { - // The resource name of the ad to fetch. - string resource_name = 1; + // Required. The resource name of the ad to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; } -// Request message for -// [AdGroupAdService.MutateAdGroupAds][google.ads.googleads.v1.services.AdGroupAdService.MutateAdGroupAds]. +// Request message for [AdGroupAdService.MutateAdGroupAds][google.ads.googleads.v1.services.AdGroupAdService.MutateAdGroupAds]. message MutateAdGroupAdsRequest { - // The ID of the customer whose ads are being modified. - string customer_id = 1; + // Required. The ID of the customer whose ads are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual ads. - repeated AdGroupAdOperation operations = 2; + // Required. The list of operations to perform on individual ads. + repeated AdGroupAdOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -88,8 +94,7 @@ message AdGroupAdOperation { google.protobuf.FieldMask update_mask = 4; // Configuration for how policies are validated. - google.ads.googleads.v1.common.PolicyValidationParameter - policy_validation_parameter = 5; + google.ads.googleads.v1.common.PolicyValidationParameter policy_validation_parameter = 5; // The mutate operation. oneof operation { diff --git a/google/ads/googleads/v1/services/ad_group_audience_view_service.proto b/google/ads/googleads/v1/services/ad_group_audience_view_service.proto index 213e6374b..6dfb2edde 100644 --- a/google/ads/googleads/v1/services/ad_group_audience_view_service.proto +++ b/google/ads/googleads/v1/services/ad_group_audience_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/ad_group_audience_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,17 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage ad group audience views. service AdGroupAudienceViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested ad group audience view in full detail. - rpc GetAdGroupAudienceView(GetAdGroupAudienceViewRequest) - returns (google.ads.googleads.v1.resources.AdGroupAudienceView) { + rpc GetAdGroupAudienceView(GetAdGroupAudienceViewRequest) returns (google.ads.googleads.v1.resources.AdGroupAudienceView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/adGroupAudienceViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [AdGroupAudienceViewService.GetAdGoupAudienceView][]. message GetAdGroupAudienceViewRequest { - // The resource name of the ad group audience view to fetch. - string resource_name = 1; + // Required. The resource name of the ad group audience view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAudienceView" + } + ]; } diff --git a/google/ads/googleads/v1/services/ad_group_bid_modifier_service.proto b/google/ads/googleads/v1/services/ad_group_bid_modifier_service.proto index db02be227..d26b7b37c 100644 --- a/google/ads/googleads/v1/services/ad_group_bid_modifier_service.proto +++ b/google/ads/googleads/v1/services/ad_group_bid_modifier_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/ad_group_bid_modifier.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,40 +37,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage ad group bid modifiers. service AdGroupBidModifierService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested ad group bid modifier in full detail. - rpc GetAdGroupBidModifier(GetAdGroupBidModifierRequest) - returns (google.ads.googleads.v1.resources.AdGroupBidModifier) { + rpc GetAdGroupBidModifier(GetAdGroupBidModifierRequest) returns (google.ads.googleads.v1.resources.AdGroupBidModifier) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/adGroupBidModifiers/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes ad group bid modifiers. // Operation statuses are returned. - rpc MutateAdGroupBidModifiers(MutateAdGroupBidModifiersRequest) - returns (MutateAdGroupBidModifiersResponse) { + rpc MutateAdGroupBidModifiers(MutateAdGroupBidModifiersRequest) returns (MutateAdGroupBidModifiersResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/adGroupBidModifiers:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [AdGroupBidModifierService.GetAdGroupBidModifier][google.ads.googleads.v1.services.AdGroupBidModifierService.GetAdGroupBidModifier]. +// Request message for [AdGroupBidModifierService.GetAdGroupBidModifier][google.ads.googleads.v1.services.AdGroupBidModifierService.GetAdGroupBidModifier]. message GetAdGroupBidModifierRequest { - // The resource name of the ad group bid modifier to fetch. - string resource_name = 1; + // Required. The resource name of the ad group bid modifier to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupBidModifier" + } + ]; } -// Request message for -// [AdGroupBidModifierService.MutateAdGroupBidModifiers][google.ads.googleads.v1.services.AdGroupBidModifierService.MutateAdGroupBidModifiers]. +// Request message for [AdGroupBidModifierService.MutateAdGroupBidModifiers][google.ads.googleads.v1.services.AdGroupBidModifierService.MutateAdGroupBidModifiers]. message MutateAdGroupBidModifiersRequest { - // ID of the customer whose ad group bid modifiers are being modified. - string customer_id = 1; + // Required. ID of the customer whose ad group bid modifiers are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual ad group bid modifiers. - repeated AdGroupBidModifierOperation operations = 2; + // Required. The list of operations to perform on individual ad group bid modifiers. + repeated AdGroupBidModifierOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -100,7 +106,6 @@ message AdGroupBidModifierOperation { // Remove operation: A resource name for the removed ad group bid modifier // is expected, in this format: // - // // `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}~{criterion_id}` string remove = 3; } diff --git a/google/ads/googleads/v1/services/ad_group_criterion_label_service.proto b/google/ads/googleads/v1/services/ad_group_criterion_label_service.proto index e3ba75b10..584938396 100644 --- a/google/ads/googleads/v1/services/ad_group_criterion_label_service.proto +++ b/google/ads/googleads/v1/services/ad_group_criterion_label_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,7 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/ad_group_criterion_label.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -35,40 +36,47 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage labels on ad group criteria. service AdGroupCriterionLabelService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested ad group criterion label in full detail. - rpc GetAdGroupCriterionLabel(GetAdGroupCriterionLabelRequest) - returns (google.ads.googleads.v1.resources.AdGroupCriterionLabel) { + rpc GetAdGroupCriterionLabel(GetAdGroupCriterionLabelRequest) returns (google.ads.googleads.v1.resources.AdGroupCriterionLabel) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/adGroupCriterionLabels/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates and removes ad group criterion labels. // Operation statuses are returned. - rpc MutateAdGroupCriterionLabels(MutateAdGroupCriterionLabelsRequest) - returns (MutateAdGroupCriterionLabelsResponse) { + rpc MutateAdGroupCriterionLabels(MutateAdGroupCriterionLabelsRequest) returns (MutateAdGroupCriterionLabelsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/adGroupCriterionLabels:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for // [AdGroupCriterionLabelService.GetAdGroupCriterionLabel][google.ads.googleads.v1.services.AdGroupCriterionLabelService.GetAdGroupCriterionLabel]. message GetAdGroupCriterionLabelRequest { - // The resource name of the ad group criterion label to fetch. - string resource_name = 1; + // Required. The resource name of the ad group criterion label to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterionLabel" + } + ]; } // Request message for // [AdGroupCriterionLabelService.MutateAdGroupCriterionLabels][google.ads.googleads.v1.services.AdGroupCriterionLabelService.MutateAdGroupCriterionLabels]. message MutateAdGroupCriterionLabelsRequest { - // ID of the customer whose ad group criterion labels are being modified. - string customer_id = 1; + // Required. ID of the customer whose ad group criterion labels are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on ad group criterion labels. - repeated AdGroupCriterionLabelOperation operations = 2; + // Required. The list of operations to perform on ad group criterion labels. + repeated AdGroupCriterionLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -92,7 +100,6 @@ message AdGroupCriterionLabelOperation { // Remove operation: A resource name for the ad group criterion label // being removed, in this format: // - // // `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}` string remove = 2; } diff --git a/google/ads/googleads/v1/services/ad_group_criterion_service.proto b/google/ads/googleads/v1/services/ad_group_criterion_service.proto index 3a3a2ff4c..94590dad4 100644 --- a/google/ads/googleads/v1/services/ad_group_criterion_service.proto +++ b/google/ads/googleads/v1/services/ad_group_criterion_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,8 +19,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/common/policy.proto"; import "google/ads/googleads/v1/resources/ad_group_criterion.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -37,39 +38,44 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage ad group criteria. service AdGroupCriterionService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested criterion in full detail. - rpc GetAdGroupCriterion(GetAdGroupCriterionRequest) - returns (google.ads.googleads.v1.resources.AdGroupCriterion) { + rpc GetAdGroupCriterion(GetAdGroupCriterionRequest) returns (google.ads.googleads.v1.resources.AdGroupCriterion) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/adGroupCriteria/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes criteria. Operation statuses are returned. - rpc MutateAdGroupCriteria(MutateAdGroupCriteriaRequest) - returns (MutateAdGroupCriteriaResponse) { + rpc MutateAdGroupCriteria(MutateAdGroupCriteriaRequest) returns (MutateAdGroupCriteriaResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/adGroupCriteria:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [AdGroupCriterionService.GetAdGroupCriterion][google.ads.googleads.v1.services.AdGroupCriterionService.GetAdGroupCriterion]. +// Request message for [AdGroupCriterionService.GetAdGroupCriterion][google.ads.googleads.v1.services.AdGroupCriterionService.GetAdGroupCriterion]. message GetAdGroupCriterionRequest { - // The resource name of the criterion to fetch. - string resource_name = 1; + // Required. The resource name of the criterion to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; } -// Request message for -// [AdGroupCriterionService.MutateAdGroupCriteria][google.ads.googleads.v1.services.AdGroupCriterionService.MutateAdGroupCriteria]. +// Request message for [AdGroupCriterionService.MutateAdGroupCriteria][google.ads.googleads.v1.services.AdGroupCriterionService.MutateAdGroupCriteria]. message MutateAdGroupCriteriaRequest { - // ID of the customer whose criteria are being modified. - string customer_id = 1; + // Required. ID of the customer whose criteria are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual criteria. - repeated AdGroupCriterionOperation operations = 2; + // Required. The list of operations to perform on individual criteria. + repeated AdGroupCriterionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -96,8 +102,7 @@ message AdGroupCriterionOperation { // to serve. They may begin serving at a later time due to a change in // policies, re-review of the resource, or a change in advertiser // certificates. - repeated google.ads.googleads.v1.common.PolicyViolationKey - exempt_policy_violation_keys = 5; + repeated google.ads.googleads.v1.common.PolicyViolationKey exempt_policy_violation_keys = 5; // The mutate operation. oneof operation { diff --git a/google/ads/googleads/v1/services/ad_group_criterion_simulation_service.proto b/google/ads/googleads/v1/services/ad_group_criterion_simulation_service.proto index e51aeb1d4..392e80dab 100644 --- a/google/ads/googleads/v1/services/ad_group_criterion_simulation_service.proto +++ b/google/ads/googleads/v1/services/ad_group_criterion_simulation_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/ad_group_criterion_simulation.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,25 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch ad group criterion simulations. service AdGroupCriterionSimulationService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested ad group criterion simulation in full detail. - rpc GetAdGroupCriterionSimulation(GetAdGroupCriterionSimulationRequest) - returns (google.ads.googleads.v1.resources.AdGroupCriterionSimulation) { + rpc GetAdGroupCriterionSimulation(GetAdGroupCriterionSimulationRequest) returns (google.ads.googleads.v1.resources.AdGroupCriterionSimulation) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/adGroupCriterionSimulations/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [AdGroupCriterionSimulationService.GetAdGroupCriterionSimulation][google.ads.googleads.v1.services.AdGroupCriterionSimulationService.GetAdGroupCriterionSimulation]. message GetAdGroupCriterionSimulationRequest { - // The resource name of the ad group criterion simulation to fetch. - string resource_name = 1; + // Required. The resource name of the ad group criterion simulation to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterionSimulation" + } + ]; } diff --git a/google/ads/googleads/v1/services/ad_group_extension_setting_service.proto b/google/ads/googleads/v1/services/ad_group_extension_setting_service.proto index b7496dd8b..cc9e22afb 100644 --- a/google/ads/googleads/v1/services/ad_group_extension_setting_service.proto +++ b/google/ads/googleads/v1/services/ad_group_extension_setting_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/ad_group_extension_setting.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,42 +37,49 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage ad group extension settings. service AdGroupExtensionSettingService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested ad group extension setting in full detail. - rpc GetAdGroupExtensionSetting(GetAdGroupExtensionSettingRequest) - returns (google.ads.googleads.v1.resources.AdGroupExtensionSetting) { + rpc GetAdGroupExtensionSetting(GetAdGroupExtensionSettingRequest) returns (google.ads.googleads.v1.resources.AdGroupExtensionSetting) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/adGroupExtensionSettings/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes ad group extension settings. Operation // statuses are returned. - rpc MutateAdGroupExtensionSettings(MutateAdGroupExtensionSettingsRequest) - returns (MutateAdGroupExtensionSettingsResponse) { + rpc MutateAdGroupExtensionSettings(MutateAdGroupExtensionSettingsRequest) returns (MutateAdGroupExtensionSettingsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/adGroupExtensionSettings:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for // [AdGroupExtensionSettingService.GetAdGroupExtensionSetting][google.ads.googleads.v1.services.AdGroupExtensionSettingService.GetAdGroupExtensionSetting]. message GetAdGroupExtensionSettingRequest { - // The resource name of the ad group extension setting to fetch. - string resource_name = 1; + // Required. The resource name of the ad group extension setting to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupExtensionSetting" + } + ]; } // Request message for // [AdGroupExtensionSettingService.MutateAdGroupExtensionSettings][google.ads.googleads.v1.services.AdGroupExtensionSettingService.MutateAdGroupExtensionSettings]. message MutateAdGroupExtensionSettingsRequest { - // The ID of the customer whose ad group extension settings are being + // Required. The ID of the customer whose ad group extension settings are being // modified. - string customer_id = 1; + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual ad group extension + // Required. The list of operations to perform on individual ad group extension // settings. - repeated AdGroupExtensionSettingOperation operations = 2; + repeated AdGroupExtensionSettingOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -102,7 +110,6 @@ message AdGroupExtensionSettingOperation { // Remove operation: A resource name for the removed ad group extension // setting is expected, in this format: // - // // `customers/{customer_id}/adGroupExtensionSettings/{ad_group_id}~{extension_type}` string remove = 3; } diff --git a/google/ads/googleads/v1/services/ad_group_feed_service.proto b/google/ads/googleads/v1/services/ad_group_feed_service.proto index 5780852bd..eae9ae2cd 100644 --- a/google/ads/googleads/v1/services/ad_group_feed_service.proto +++ b/google/ads/googleads/v1/services/ad_group_feed_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/ad_group_feed.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,40 +37,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage ad group feeds. service AdGroupFeedService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested ad group feed in full detail. - rpc GetAdGroupFeed(GetAdGroupFeedRequest) - returns (google.ads.googleads.v1.resources.AdGroupFeed) { + rpc GetAdGroupFeed(GetAdGroupFeedRequest) returns (google.ads.googleads.v1.resources.AdGroupFeed) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/adGroupFeeds/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes ad group feeds. Operation statuses are // returned. - rpc MutateAdGroupFeeds(MutateAdGroupFeedsRequest) - returns (MutateAdGroupFeedsResponse) { + rpc MutateAdGroupFeeds(MutateAdGroupFeedsRequest) returns (MutateAdGroupFeedsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/adGroupFeeds:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [AdGroupFeedService.GetAdGroupFeed][google.ads.googleads.v1.services.AdGroupFeedService.GetAdGroupFeed]. +// Request message for [AdGroupFeedService.GetAdGroupFeed][google.ads.googleads.v1.services.AdGroupFeedService.GetAdGroupFeed]. message GetAdGroupFeedRequest { - // The resource name of the ad group feed to fetch. - string resource_name = 1; + // Required. The resource name of the ad group feed to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupFeed" + } + ]; } -// Request message for -// [AdGroupFeedService.MutateAdGroupFeeds][google.ads.googleads.v1.services.AdGroupFeedService.MutateAdGroupFeeds]. +// Request message for [AdGroupFeedService.MutateAdGroupFeeds][google.ads.googleads.v1.services.AdGroupFeedService.MutateAdGroupFeeds]. message MutateAdGroupFeedsRequest { - // The ID of the customer whose ad group feeds are being modified. - string customer_id = 1; + // Required. The ID of the customer whose ad group feeds are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual ad group feeds. - repeated AdGroupFeedOperation operations = 2; + // Required. The list of operations to perform on individual ad group feeds. + repeated AdGroupFeedOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/ad_group_label_service.proto b/google/ads/googleads/v1/services/ad_group_label_service.proto index c6c71ef62..50581bbc3 100644 --- a/google/ads/googleads/v1/services/ad_group_label_service.proto +++ b/google/ads/googleads/v1/services/ad_group_label_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,7 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/ad_group_label.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -35,40 +36,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage labels on ad groups. service AdGroupLabelService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested ad group label in full detail. - rpc GetAdGroupLabel(GetAdGroupLabelRequest) - returns (google.ads.googleads.v1.resources.AdGroupLabel) { + rpc GetAdGroupLabel(GetAdGroupLabelRequest) returns (google.ads.googleads.v1.resources.AdGroupLabel) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/adGroupLabels/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates and removes ad group labels. // Operation statuses are returned. - rpc MutateAdGroupLabels(MutateAdGroupLabelsRequest) - returns (MutateAdGroupLabelsResponse) { + rpc MutateAdGroupLabels(MutateAdGroupLabelsRequest) returns (MutateAdGroupLabelsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/adGroupLabels:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [AdGroupLabelService.GetAdGroupLabel][google.ads.googleads.v1.services.AdGroupLabelService.GetAdGroupLabel]. +// Request message for [AdGroupLabelService.GetAdGroupLabel][google.ads.googleads.v1.services.AdGroupLabelService.GetAdGroupLabel]. message GetAdGroupLabelRequest { - // The resource name of the ad group label to fetch. - string resource_name = 1; + // Required. The resource name of the ad group label to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupLabel" + } + ]; } -// Request message for -// [AdGroupLabelService.MutateAdGroupLabels][google.ads.googleads.v1.services.AdGroupLabelService.MutateAdGroupLabels]. +// Request message for [AdGroupLabelService.MutateAdGroupLabels][google.ads.googleads.v1.services.AdGroupLabelService.MutateAdGroupLabels]. message MutateAdGroupLabelsRequest { - // ID of the customer whose ad group labels are being modified. - string customer_id = 1; + // Required. ID of the customer whose ad group labels are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on ad group labels. - repeated AdGroupLabelOperation operations = 2; + // Required. The list of operations to perform on ad group labels. + repeated AdGroupLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/ad_group_service.proto b/google/ads/googleads/v1/services/ad_group_service.proto index 4ec9aaa0f..9da36c765 100644 --- a/google/ads/googleads/v1/services/ad_group_service.proto +++ b/google/ads/googleads/v1/services/ad_group_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/ad_group.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,12 +37,14 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage ad groups. service AdGroupService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested ad group in full detail. - rpc GetAdGroup(GetAdGroupRequest) - returns (google.ads.googleads.v1.resources.AdGroup) { + rpc GetAdGroup(GetAdGroupRequest) returns (google.ads.googleads.v1.resources.AdGroup) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/adGroups/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes ad groups. Operation statuses are returned. @@ -50,24 +53,28 @@ service AdGroupService { post: "/v1/customers/{customer_id=*}/adGroups:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [AdGroupService.GetAdGroup][google.ads.googleads.v1.services.AdGroupService.GetAdGroup]. +// Request message for [AdGroupService.GetAdGroup][google.ads.googleads.v1.services.AdGroupService.GetAdGroup]. message GetAdGroupRequest { - // The resource name of the ad group to fetch. - string resource_name = 1; + // Required. The resource name of the ad group to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; } -// Request message for -// [AdGroupService.MutateAdGroups][google.ads.googleads.v1.services.AdGroupService.MutateAdGroups]. +// Request message for [AdGroupService.MutateAdGroups][google.ads.googleads.v1.services.AdGroupService.MutateAdGroups]. message MutateAdGroupsRequest { - // The ID of the customer whose ad groups are being modified. - string customer_id = 1; + // Required. The ID of the customer whose ad groups are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual ad groups. - repeated AdGroupOperation operations = 2; + // Required. The list of operations to perform on individual ad groups. + repeated AdGroupOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/ad_group_simulation_service.proto b/google/ads/googleads/v1/services/ad_group_simulation_service.proto index b178f2e70..916ce3032 100644 --- a/google/ads/googleads/v1/services/ad_group_simulation_service.proto +++ b/google/ads/googleads/v1/services/ad_group_simulation_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/ad_group_simulation.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch ad group simulations. service AdGroupSimulationService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested ad group simulation in full detail. - rpc GetAdGroupSimulation(GetAdGroupSimulationRequest) - returns (google.ads.googleads.v1.resources.AdGroupSimulation) { + rpc GetAdGroupSimulation(GetAdGroupSimulationRequest) returns (google.ads.googleads.v1.resources.AdGroupSimulation) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/adGroupSimulations/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [AdGroupSimulationService.GetAdGroupSimulation][google.ads.googleads.v1.services.AdGroupSimulationService.GetAdGroupSimulation]. +// Request message for [AdGroupSimulationService.GetAdGroupSimulation][google.ads.googleads.v1.services.AdGroupSimulationService.GetAdGroupSimulation]. message GetAdGroupSimulationRequest { - // The resource name of the ad group simulation to fetch. - string resource_name = 1; + // Required. The resource name of the ad group simulation to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupSimulation" + } + ]; } diff --git a/google/ads/googleads/v1/services/ad_parameter_service.proto b/google/ads/googleads/v1/services/ad_parameter_service.proto index 34055da79..a5f500e92 100644 --- a/google/ads/googleads/v1/services/ad_parameter_service.proto +++ b/google/ads/googleads/v1/services/ad_parameter_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/ad_parameter.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,40 +37,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage ad parameters. service AdParameterService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested ad parameter in full detail. - rpc GetAdParameter(GetAdParameterRequest) - returns (google.ads.googleads.v1.resources.AdParameter) { + rpc GetAdParameter(GetAdParameterRequest) returns (google.ads.googleads.v1.resources.AdParameter) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/adParameters/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes ad parameters. Operation statuses are // returned. - rpc MutateAdParameters(MutateAdParametersRequest) - returns (MutateAdParametersResponse) { + rpc MutateAdParameters(MutateAdParametersRequest) returns (MutateAdParametersResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/adParameters:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [AdParameterService.GetAdParameter][google.ads.googleads.v1.services.AdParameterService.GetAdParameter] +// Request message for [AdParameterService.GetAdParameter][google.ads.googleads.v1.services.AdParameterService.GetAdParameter] message GetAdParameterRequest { - // The resource name of the ad parameter to fetch. - string resource_name = 1; + // Required. The resource name of the ad parameter to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdParameter" + } + ]; } -// Request message for -// [AdParameterService.MutateAdParameters][google.ads.googleads.v1.services.AdParameterService.MutateAdParameters] +// Request message for [AdParameterService.MutateAdParameters][google.ads.googleads.v1.services.AdParameterService.MutateAdParameters] message MutateAdParametersRequest { - // The ID of the customer whose ad parameters are being modified. - string customer_id = 1; + // Required. The ID of the customer whose ad parameters are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual ad parameters. - repeated AdParameterOperation operations = 2; + // Required. The list of operations to perform on individual ad parameters. + repeated AdParameterOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -99,7 +105,6 @@ message AdParameterOperation { // Remove operation: A resource name for the ad parameter to remove is // expected in this format: // - // // `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}` string remove = 3; } diff --git a/google/ads/googleads/v1/services/ad_schedule_view_service.proto b/google/ads/googleads/v1/services/ad_schedule_view_service.proto index 68ad7a99f..12786018c 100644 --- a/google/ads/googleads/v1/services/ad_schedule_view_service.proto +++ b/google/ads/googleads/v1/services/ad_schedule_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/ad_schedule_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch ad schedule views. service AdScheduleViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested ad schedule view in full detail. - rpc GetAdScheduleView(GetAdScheduleViewRequest) - returns (google.ads.googleads.v1.resources.AdScheduleView) { + rpc GetAdScheduleView(GetAdScheduleViewRequest) returns (google.ads.googleads.v1.resources.AdScheduleView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/adScheduleViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [AdScheduleViewService.GetAdScheduleView][google.ads.googleads.v1.services.AdScheduleViewService.GetAdScheduleView]. +// Request message for [AdScheduleViewService.GetAdScheduleView][google.ads.googleads.v1.services.AdScheduleViewService.GetAdScheduleView]. message GetAdScheduleViewRequest { - // The resource name of the ad schedule view to fetch. - string resource_name = 1; + // Required. The resource name of the ad schedule view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdScheduleView" + } + ]; } diff --git a/google/ads/googleads/v1/services/age_range_view_service.proto b/google/ads/googleads/v1/services/age_range_view_service.proto index 3b895b801..9df60b5b3 100644 --- a/google/ads/googleads/v1/services/age_range_view_service.proto +++ b/google/ads/googleads/v1/services/age_range_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/age_range_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage age range views. service AgeRangeViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested age range view in full detail. - rpc GetAgeRangeView(GetAgeRangeViewRequest) - returns (google.ads.googleads.v1.resources.AgeRangeView) { + rpc GetAgeRangeView(GetAgeRangeViewRequest) returns (google.ads.googleads.v1.resources.AgeRangeView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/ageRangeViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [AgeRangeViewService.GetAgeRangeView][google.ads.googleads.v1.services.AgeRangeViewService.GetAgeRangeView]. +// Request message for [AgeRangeViewService.GetAgeRangeView][google.ads.googleads.v1.services.AgeRangeViewService.GetAgeRangeView]. message GetAgeRangeViewRequest { - // The resource name of the age range view to fetch. - string resource_name = 1; + // Required. The resource name of the age range view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AgeRangeView" + } + ]; } diff --git a/google/ads/googleads/v1/services/asset_service.proto b/google/ads/googleads/v1/services/asset_service.proto index 92c0017b9..4c6a79e0d 100644 --- a/google/ads/googleads/v1/services/asset_service.proto +++ b/google/ads/googleads/v1/services/asset_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/asset.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -35,12 +37,14 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // YoutubeVideoAsset, MediaBundleAsset and ImageAsset. TextAsset should be // created with Ad inline. service AssetService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested asset in full detail. - rpc GetAsset(GetAssetRequest) - returns (google.ads.googleads.v1.resources.Asset) { + rpc GetAsset(GetAssetRequest) returns (google.ads.googleads.v1.resources.Asset) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/assets/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates assets. Operation statuses are returned. @@ -49,29 +53,33 @@ service AssetService { post: "/v1/customers/{customer_id=*}/assets:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [AssetService.GetAsset][google.ads.googleads.v1.services.AssetService.GetAsset] +// Request message for [AssetService.GetAsset][google.ads.googleads.v1.services.AssetService.GetAsset] message GetAssetRequest { - // The resource name of the asset to fetch. - string resource_name = 1; + // Required. The resource name of the asset to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Asset" + } + ]; } -// Request message for -// [AssetService.MutateAssets][google.ads.googleads.v1.services.AssetService.MutateAssets] +// Request message for [AssetService.MutateAssets][google.ads.googleads.v1.services.AssetService.MutateAssets] message MutateAssetsRequest { - // The ID of the customer whose assets are being modified. - string customer_id = 1; + // Required. The ID of the customer whose assets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual assets. - repeated AssetOperation operations = 2; + // Required. The list of operations to perform on individual assets. + repeated AssetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; } // A single operation to create an asset. Supported asset types are -// YoutubeVideoAsset, MediaBundleAsset and ImageAsset. TextAsset should be -// created with Ad inline. +// YoutubeVideoAsset, MediaBundleAsset, ImageAsset, and LeadFormAsset. TextAsset +// should be created with Ad inline. message AssetOperation { // The mutate operation. oneof operation { diff --git a/google/ads/googleads/v1/services/bidding_strategy_service.proto b/google/ads/googleads/v1/services/bidding_strategy_service.proto index 196a19f47..a7ebf6f92 100644 --- a/google/ads/googleads/v1/services/bidding_strategy_service.proto +++ b/google/ads/googleads/v1/services/bidding_strategy_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/bidding_strategy.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,40 +37,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage bidding strategies. service BiddingStrategyService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested bidding strategy in full detail. - rpc GetBiddingStrategy(GetBiddingStrategyRequest) - returns (google.ads.googleads.v1.resources.BiddingStrategy) { + rpc GetBiddingStrategy(GetBiddingStrategyRequest) returns (google.ads.googleads.v1.resources.BiddingStrategy) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/biddingStrategies/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes bidding strategies. Operation statuses are // returned. - rpc MutateBiddingStrategies(MutateBiddingStrategiesRequest) - returns (MutateBiddingStrategiesResponse) { + rpc MutateBiddingStrategies(MutateBiddingStrategiesRequest) returns (MutateBiddingStrategiesResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/biddingStrategies:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [BiddingStrategyService.GetBiddingStrategy][google.ads.googleads.v1.services.BiddingStrategyService.GetBiddingStrategy]. +// Request message for [BiddingStrategyService.GetBiddingStrategy][google.ads.googleads.v1.services.BiddingStrategyService.GetBiddingStrategy]. message GetBiddingStrategyRequest { - // The resource name of the bidding strategy to fetch. - string resource_name = 1; + // Required. The resource name of the bidding strategy to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BiddingStrategy" + } + ]; } -// Request message for -// [BiddingStrategyService.MutateBiddingStrategies][google.ads.googleads.v1.services.BiddingStrategyService.MutateBiddingStrategies]. +// Request message for [BiddingStrategyService.MutateBiddingStrategies][google.ads.googleads.v1.services.BiddingStrategyService.MutateBiddingStrategies]. message MutateBiddingStrategiesRequest { - // The ID of the customer whose bidding strategies are being modified. - string customer_id = 1; + // Required. The ID of the customer whose bidding strategies are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual bidding strategies. - repeated BiddingStrategyOperation operations = 2; + // Required. The list of operations to perform on individual bidding strategies. + repeated BiddingStrategyOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/billing_setup_service.proto b/google/ads/googleads/v1/services/billing_setup_service.proto index 46653674a..dfb9b8dd0 100644 --- a/google/ads/googleads/v1/services/billing_setup_service.proto +++ b/google/ads/googleads/v1/services/billing_setup_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/billing_setup.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,46 +35,53 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // A service for designating the business entity responsible for accrued costs. // -// A billing setup is associated with a Payments account. Billing-related -// activity for all billing setups associated with a particular Payments account +// A billing setup is associated with a payments account. Billing-related +// activity for all billing setups associated with a particular payments account // will appear on a single invoice generated monthly. // // Mutates: // The REMOVE operation cancels a pending billing setup. // The CREATE operation creates a new billing setup. service BillingSetupService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns a billing setup. - rpc GetBillingSetup(GetBillingSetupRequest) - returns (google.ads.googleads.v1.resources.BillingSetup) { + rpc GetBillingSetup(GetBillingSetupRequest) returns (google.ads.googleads.v1.resources.BillingSetup) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/billingSetups/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates a billing setup, or cancels an existing billing setup. - rpc MutateBillingSetup(MutateBillingSetupRequest) - returns (MutateBillingSetupResponse) { + rpc MutateBillingSetup(MutateBillingSetupRequest) returns (MutateBillingSetupResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/billingSetups:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operation"; } } // Request message for // [BillingSetupService.GetBillingSetup][google.ads.googleads.v1.services.BillingSetupService.GetBillingSetup]. message GetBillingSetupRequest { - // The resource name of the billing setup to fetch. - string resource_name = 1; + // Required. The resource name of the billing setup to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BillingSetup" + } + ]; } // Request message for billing setup mutate operations. message MutateBillingSetupRequest { - // Id of the customer to apply the billing setup mutate operation to. - string customer_id = 1; + // Required. Id of the customer to apply the billing setup mutate operation to. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The operation to perform. - BillingSetupOperation operation = 2; + // Required. The operation to perform. + BillingSetupOperation operation = 2 [(google.api.field_behavior) = REQUIRED]; } // A single operation on a billing setup, which describes the cancellation of an diff --git a/google/ads/googleads/v1/services/campaign_audience_view_service.proto b/google/ads/googleads/v1/services/campaign_audience_view_service.proto index fc59212a7..56583654a 100644 --- a/google/ads/googleads/v1/services/campaign_audience_view_service.proto +++ b/google/ads/googleads/v1/services/campaign_audience_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/campaign_audience_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage campaign audience views. service CampaignAudienceViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested campaign audience view in full detail. - rpc GetCampaignAudienceView(GetCampaignAudienceViewRequest) - returns (google.ads.googleads.v1.resources.CampaignAudienceView) { + rpc GetCampaignAudienceView(GetCampaignAudienceViewRequest) returns (google.ads.googleads.v1.resources.CampaignAudienceView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/campaignAudienceViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [CampaignAudienceViewService.GetCampaignAudienceView][google.ads.googleads.v1.services.CampaignAudienceViewService.GetCampaignAudienceView]. +// Request message for [CampaignAudienceViewService.GetCampaignAudienceView][google.ads.googleads.v1.services.CampaignAudienceViewService.GetCampaignAudienceView]. message GetCampaignAudienceViewRequest { - // The resource name of the campaign audience view to fetch. - string resource_name = 1; + // Required. The resource name of the campaign audience view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignAudienceView" + } + ]; } diff --git a/google/ads/googleads/v1/services/campaign_bid_modifier_service.proto b/google/ads/googleads/v1/services/campaign_bid_modifier_service.proto index c5c374d9a..0ea62c2a2 100644 --- a/google/ads/googleads/v1/services/campaign_bid_modifier_service.proto +++ b/google/ads/googleads/v1/services/campaign_bid_modifier_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/campaign_bid_modifier.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,39 +37,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage campaign bid modifiers. service CampaignBidModifierService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested campaign bid modifier in full detail. - rpc GetCampaignBidModifier(GetCampaignBidModifierRequest) - returns (google.ads.googleads.v1.resources.CampaignBidModifier) { + rpc GetCampaignBidModifier(GetCampaignBidModifierRequest) returns (google.ads.googleads.v1.resources.CampaignBidModifier) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/campaignBidModifiers/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes campaign bid modifiers. // Operation statuses are returned. - rpc MutateCampaignBidModifiers(MutateCampaignBidModifiersRequest) - returns (MutateCampaignBidModifiersResponse) { + rpc MutateCampaignBidModifiers(MutateCampaignBidModifiersRequest) returns (MutateCampaignBidModifiersResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/campaignBidModifiers:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [CampaignBidModifierService.GetCampaignBidModifier][google.ads.googleads.v1.services.CampaignBidModifierService.GetCampaignBidModifier]. +// Request message for [CampaignBidModifierService.GetCampaignBidModifier][google.ads.googleads.v1.services.CampaignBidModifierService.GetCampaignBidModifier]. message GetCampaignBidModifierRequest { - // The resource name of the campaign bid modifier to fetch. - string resource_name = 1; + // Required. The resource name of the campaign bid modifier to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBidModifier" + } + ]; } // Request message for [CampaignBidModifierService.MutateCampaignBidModifier][]. message MutateCampaignBidModifiersRequest { - // ID of the customer whose campaign bid modifiers are being modified. - string customer_id = 1; + // Required. ID of the customer whose campaign bid modifiers are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaign bid modifiers. - repeated CampaignBidModifierOperation operations = 2; + // Required. The list of operations to perform on individual campaign bid modifiers. + repeated CampaignBidModifierOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -99,7 +106,6 @@ message CampaignBidModifierOperation { // Remove operation: A resource name for the removed campaign bid modifier // is expected, in this format: // - // // `customers/{customer_id}/CampaignBidModifiers/{campaign_id}~{criterion_id}` string remove = 3; } diff --git a/google/ads/googleads/v1/services/campaign_budget_service.proto b/google/ads/googleads/v1/services/campaign_budget_service.proto index 720e1d533..6ba0345db 100644 --- a/google/ads/googleads/v1/services/campaign_budget_service.proto +++ b/google/ads/googleads/v1/services/campaign_budget_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/campaign_budget.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,40 +37,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage campaign budgets. service CampaignBudgetService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested Campaign Budget in full detail. - rpc GetCampaignBudget(GetCampaignBudgetRequest) - returns (google.ads.googleads.v1.resources.CampaignBudget) { + rpc GetCampaignBudget(GetCampaignBudgetRequest) returns (google.ads.googleads.v1.resources.CampaignBudget) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/campaignBudgets/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes campaign budgets. Operation statuses are // returned. - rpc MutateCampaignBudgets(MutateCampaignBudgetsRequest) - returns (MutateCampaignBudgetsResponse) { + rpc MutateCampaignBudgets(MutateCampaignBudgetsRequest) returns (MutateCampaignBudgetsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/campaignBudgets:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [CampaignBudgetService.GetCampaignBudget][google.ads.googleads.v1.services.CampaignBudgetService.GetCampaignBudget]. +// Request message for [CampaignBudgetService.GetCampaignBudget][google.ads.googleads.v1.services.CampaignBudgetService.GetCampaignBudget]. message GetCampaignBudgetRequest { - // The resource name of the campaign budget to fetch. - string resource_name = 1; + // Required. The resource name of the campaign budget to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBudget" + } + ]; } -// Request message for -// [CampaignBudgetService.MutateCampaignBudgets][google.ads.googleads.v1.services.CampaignBudgetService.MutateCampaignBudgets]. +// Request message for [CampaignBudgetService.MutateCampaignBudgets][google.ads.googleads.v1.services.CampaignBudgetService.MutateCampaignBudgets]. message MutateCampaignBudgetsRequest { - // The ID of the customer whose campaign budgets are being modified. - string customer_id = 1; + // Required. The ID of the customer whose campaign budgets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaign budgets. - repeated CampaignBudgetOperation operations = 2; + // Required. The list of operations to perform on individual campaign budgets. + repeated CampaignBudgetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/campaign_criterion_service.proto b/google/ads/googleads/v1/services/campaign_criterion_service.proto index 5e2edec7b..bd6122d5f 100644 --- a/google/ads/googleads/v1/services/campaign_criterion_service.proto +++ b/google/ads/googleads/v1/services/campaign_criterion_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/campaign_criterion.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,39 +37,44 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage campaign criteria. service CampaignCriterionService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested criterion in full detail. - rpc GetCampaignCriterion(GetCampaignCriterionRequest) - returns (google.ads.googleads.v1.resources.CampaignCriterion) { + rpc GetCampaignCriterion(GetCampaignCriterionRequest) returns (google.ads.googleads.v1.resources.CampaignCriterion) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/campaignCriteria/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes criteria. Operation statuses are returned. - rpc MutateCampaignCriteria(MutateCampaignCriteriaRequest) - returns (MutateCampaignCriteriaResponse) { + rpc MutateCampaignCriteria(MutateCampaignCriteriaRequest) returns (MutateCampaignCriteriaResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/campaignCriteria:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [CampaignCriterionService.GetCampaignCriterion][google.ads.googleads.v1.services.CampaignCriterionService.GetCampaignCriterion]. +// Request message for [CampaignCriterionService.GetCampaignCriterion][google.ads.googleads.v1.services.CampaignCriterionService.GetCampaignCriterion]. message GetCampaignCriterionRequest { - // The resource name of the criterion to fetch. - string resource_name = 1; + // Required. The resource name of the criterion to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterion" + } + ]; } -// Request message for -// [CampaignCriterionService.MutateCampaignCriteria][google.ads.googleads.v1.services.CampaignCriterionService.MutateCampaignCriteria]. +// Request message for [CampaignCriterionService.MutateCampaignCriteria][google.ads.googleads.v1.services.CampaignCriterionService.MutateCampaignCriteria]. message MutateCampaignCriteriaRequest { - // The ID of the customer whose criteria are being modified. - string customer_id = 1; + // Required. The ID of the customer whose criteria are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual criteria. - repeated CampaignCriterionOperation operations = 2; + // Required. The list of operations to perform on individual criteria. + repeated CampaignCriterionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/campaign_criterion_simulation_service.proto b/google/ads/googleads/v1/services/campaign_criterion_simulation_service.proto index 55f39bf94..02627ebb5 100644 --- a/google/ads/googleads/v1/services/campaign_criterion_simulation_service.proto +++ b/google/ads/googleads/v1/services/campaign_criterion_simulation_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/campaign_criterion_simulation.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,25 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch campaign criterion simulations. service CampaignCriterionSimulationService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested campaign criterion simulation in full detail. - rpc GetCampaignCriterionSimulation(GetCampaignCriterionSimulationRequest) - returns (google.ads.googleads.v1.resources.CampaignCriterionSimulation) { + rpc GetCampaignCriterionSimulation(GetCampaignCriterionSimulationRequest) returns (google.ads.googleads.v1.resources.CampaignCriterionSimulation) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/campaignCriterionSimulations/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [CampaignCriterionSimulationService.GetCampaignCriterionSimulation][google.ads.googleads.v1.services.CampaignCriterionSimulationService.GetCampaignCriterionSimulation]. message GetCampaignCriterionSimulationRequest { - // The resource name of the campaign criterion simulation to fetch. - string resource_name = 1; + // Required. The resource name of the campaign criterion simulation to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterionSimulation" + } + ]; } diff --git a/google/ads/googleads/v1/services/campaign_draft_service.proto b/google/ads/googleads/v1/services/campaign_draft_service.proto index f075b42bd..4ff909a0d 100644 --- a/google/ads/googleads/v1/services/campaign_draft_service.proto +++ b/google/ads/googleads/v1/services/campaign_draft_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/campaign_draft.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -37,11 +38,14 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage campaign drafts. service CampaignDraftService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested campaign draft in full detail. rpc GetCampaignDraft(GetCampaignDraftRequest) returns (google.ads.googleads.v1.resources.CampaignDraft) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/campaignDrafts/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes campaign drafts. Operation statuses are @@ -51,6 +55,7 @@ service CampaignDraftService { post: "/v1/customers/{customer_id=*}/campaignDrafts:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } // Promotes the changes in a draft back to the base campaign. @@ -67,6 +72,11 @@ service CampaignDraftService { post: "/v1/{campaign_draft=customers/*/campaignDrafts/*}:promote" body: "*" }; + option (google.api.method_signature) = "campaign_draft"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Empty" + }; } // Returns all errors that occurred during CampaignDraft promote. Throws an @@ -76,22 +86,28 @@ service CampaignDraftService { option (google.api.http) = { get: "/v1/{resource_name=customers/*/campaignDrafts/*}:listAsyncErrors" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [CampaignDraftService.GetCampaignDraft][google.ads.googleads.v1.services.CampaignDraftService.GetCampaignDraft]. message GetCampaignDraftRequest { - // The resource name of the campaign draft to fetch. - string resource_name = 1; + // Required. The resource name of the campaign draft to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignDraft" + } + ]; } // Request message for [CampaignDraftService.MutateCampaignDrafts][google.ads.googleads.v1.services.CampaignDraftService.MutateCampaignDrafts]. message MutateCampaignDraftsRequest { - // The ID of the customer whose campaign drafts are being modified. - string customer_id = 1; + // Required. The ID of the customer whose campaign drafts are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaign drafts. - repeated CampaignDraftOperation operations = 2; + // Required. The list of operations to perform on individual campaign drafts. + repeated CampaignDraftOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -106,8 +122,8 @@ message MutateCampaignDraftsRequest { // Request message for [CampaignDraftService.PromoteCampaignDraft][google.ads.googleads.v1.services.CampaignDraftService.PromoteCampaignDraft]. message PromoteCampaignDraftRequest { - // The resource name of the campaign draft to promote. - string campaign_draft = 1; + // Required. The resource name of the campaign draft to promote. + string campaign_draft = 1 [(google.api.field_behavior) = REQUIRED]; } // A single operation (create, update, remove) on a campaign draft. @@ -153,8 +169,13 @@ message MutateCampaignDraftResult { // Request message for [CampaignDraftService.ListCampaignDraftAsyncErrors][google.ads.googleads.v1.services.CampaignDraftService.ListCampaignDraftAsyncErrors]. message ListCampaignDraftAsyncErrorsRequest { - // The name of the campaign draft from which to retrieve the async errors. - string resource_name = 1; + // Required. The name of the campaign draft from which to retrieve the async errors. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignDraft" + } + ]; // Token of the page to retrieve. If not specified, the first // page of results will be returned. Use the value obtained from diff --git a/google/ads/googleads/v1/services/campaign_experiment_service.proto b/google/ads/googleads/v1/services/campaign_experiment_service.proto index 2d0e5c1d3..b02873441 100644 --- a/google/ads/googleads/v1/services/campaign_experiment_service.proto +++ b/google/ads/googleads/v1/services/campaign_experiment_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,10 +18,12 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/campaign_experiment.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -47,11 +48,14 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // A campaign experiment is created from a draft of changes to the base campaign // and will be a snapshot of changes in the draft at the time of creation. service CampaignExperimentService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested campaign experiment in full detail. rpc GetCampaignExperiment(GetCampaignExperimentRequest) returns (google.ads.googleads.v1.resources.CampaignExperiment) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/campaignExperiments/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates a campaign experiment based on a campaign draft. The draft campaign @@ -69,6 +73,11 @@ service CampaignExperimentService { post: "/v1/customers/{customer_id=*}/campaignExperiments:create" body: "*" }; + option (google.api.method_signature) = "customer_id,campaign_experiment"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.ads.googleads.v1.services.CreateCampaignExperimentMetadata" + }; } // Updates campaign experiments. Operation statuses are returned. @@ -77,6 +86,7 @@ service CampaignExperimentService { post: "/v1/customers/{customer_id=*}/campaignExperiments:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } // Graduates a campaign experiment to a full campaign. The base and experiment @@ -86,6 +96,7 @@ service CampaignExperimentService { post: "/v1/{campaign_experiment=customers/*/campaignExperiments/*}:graduate" body: "*" }; + option (google.api.method_signature) = "campaign_experiment,campaign_budget"; } // Promotes the changes in a experiment campaign back to the base campaign. @@ -99,6 +110,11 @@ service CampaignExperimentService { post: "/v1/{campaign_experiment=customers/*/campaignExperiments/*}:promote" body: "*" }; + option (google.api.method_signature) = "campaign_experiment"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Empty" + }; } // Immediately ends a campaign experiment, changing the experiment's scheduled @@ -109,6 +125,7 @@ service CampaignExperimentService { post: "/v1/{campaign_experiment=customers/*/campaignExperiments/*}:end" body: "*" }; + option (google.api.method_signature) = "campaign_experiment"; } // Returns all errors that occurred during CampaignExperiment create or @@ -118,22 +135,28 @@ service CampaignExperimentService { option (google.api.http) = { get: "/v1/{resource_name=customers/*/campaignExperiments/*}:listAsyncErrors" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [CampaignExperimentService.GetCampaignExperiment][google.ads.googleads.v1.services.CampaignExperimentService.GetCampaignExperiment]. message GetCampaignExperimentRequest { - // The resource name of the campaign experiment to fetch. - string resource_name = 1; + // Required. The resource name of the campaign experiment to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExperiment" + } + ]; } // Request message for [CampaignExperimentService.MutateCampaignExperiments][google.ads.googleads.v1.services.CampaignExperimentService.MutateCampaignExperiments]. message MutateCampaignExperimentsRequest { - // The ID of the customer whose campaign experiments are being modified. - string customer_id = 1; + // Required. The ID of the customer whose campaign experiments are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaign experiments. - repeated CampaignExperimentOperation operations = 2; + // Required. The list of operations to perform on individual campaign experiments. + repeated CampaignExperimentOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -185,11 +208,11 @@ message MutateCampaignExperimentResult { // Request message for [CampaignExperimentService.CreateCampaignExperiment][google.ads.googleads.v1.services.CampaignExperimentService.CreateCampaignExperiment]. message CreateCampaignExperimentRequest { - // The ID of the customer whose campaign experiment is being created. - string customer_id = 1; + // Required. The ID of the customer whose campaign experiment is being created. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The campaign experiment to be created. - google.ads.googleads.v1.resources.CampaignExperiment campaign_experiment = 2; + // Required. The campaign experiment to be created. + google.ads.googleads.v1.resources.CampaignExperiment campaign_experiment = 2 [(google.api.field_behavior) = REQUIRED]; // If true, the request is validated but not executed. Only errors are // returned, not results. @@ -205,12 +228,12 @@ message CreateCampaignExperimentMetadata { // Request message for [CampaignExperimentService.GraduateCampaignExperiment][google.ads.googleads.v1.services.CampaignExperimentService.GraduateCampaignExperiment]. message GraduateCampaignExperimentRequest { - // The resource name of the campaign experiment to graduate. - string campaign_experiment = 1; + // Required. The resource name of the campaign experiment to graduate. + string campaign_experiment = 1 [(google.api.field_behavior) = REQUIRED]; - // Resource name of the budget to attach to the campaign graduated from the + // Required. Resource name of the budget to attach to the campaign graduated from the // experiment. - string campaign_budget = 2; + string campaign_budget = 2 [(google.api.field_behavior) = REQUIRED]; } // Response message for campaign experiment graduate. @@ -222,22 +245,27 @@ message GraduateCampaignExperimentResponse { // Request message for [CampaignExperimentService.PromoteCampaignExperiment][google.ads.googleads.v1.services.CampaignExperimentService.PromoteCampaignExperiment]. message PromoteCampaignExperimentRequest { - // The resource name of the campaign experiment to promote. - string campaign_experiment = 1; + // Required. The resource name of the campaign experiment to promote. + string campaign_experiment = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for [CampaignExperimentService.EndCampaignExperiment][google.ads.googleads.v1.services.CampaignExperimentService.EndCampaignExperiment]. message EndCampaignExperimentRequest { - // The resource name of the campaign experiment to end. - string campaign_experiment = 1; + // Required. The resource name of the campaign experiment to end. + string campaign_experiment = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [CampaignExperimentService.ListCampaignExperimentAsyncErrors][google.ads.googleads.v1.services.CampaignExperimentService.ListCampaignExperimentAsyncErrors]. message ListCampaignExperimentAsyncErrorsRequest { - // The name of the campaign experiment from which to retrieve the async + // Required. The name of the campaign experiment from which to retrieve the async // errors. - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExperiment" + } + ]; // Token of the page to retrieve. If not specified, the first // page of results will be returned. Use the value obtained from diff --git a/google/ads/googleads/v1/services/campaign_extension_setting_service.proto b/google/ads/googleads/v1/services/campaign_extension_setting_service.proto index db4ff15c7..269ea15ec 100644 --- a/google/ads/googleads/v1/services/campaign_extension_setting_service.proto +++ b/google/ads/googleads/v1/services/campaign_extension_setting_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/campaign_extension_setting.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,42 +37,49 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage campaign extension settings. service CampaignExtensionSettingService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested campaign extension setting in full detail. - rpc GetCampaignExtensionSetting(GetCampaignExtensionSettingRequest) - returns (google.ads.googleads.v1.resources.CampaignExtensionSetting) { + rpc GetCampaignExtensionSetting(GetCampaignExtensionSettingRequest) returns (google.ads.googleads.v1.resources.CampaignExtensionSetting) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/campaignExtensionSettings/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes campaign extension settings. Operation // statuses are returned. - rpc MutateCampaignExtensionSettings(MutateCampaignExtensionSettingsRequest) - returns (MutateCampaignExtensionSettingsResponse) { + rpc MutateCampaignExtensionSettings(MutateCampaignExtensionSettingsRequest) returns (MutateCampaignExtensionSettingsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/campaignExtensionSettings:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for // [CampaignExtensionSettingService.GetCampaignExtensionSetting][google.ads.googleads.v1.services.CampaignExtensionSettingService.GetCampaignExtensionSetting]. message GetCampaignExtensionSettingRequest { - // The resource name of the campaign extension setting to fetch. - string resource_name = 1; + // Required. The resource name of the campaign extension setting to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExtensionSetting" + } + ]; } // Request message for // [CampaignExtensionSettingService.MutateCampaignExtensionSettings][google.ads.googleads.v1.services.CampaignExtensionSettingService.MutateCampaignExtensionSettings]. message MutateCampaignExtensionSettingsRequest { - // The ID of the customer whose campaign extension settings are being + // Required. The ID of the customer whose campaign extension settings are being // modified. - string customer_id = 1; + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaign extension + // Required. The list of operations to perform on individual campaign extension // settings. - repeated CampaignExtensionSettingOperation operations = 2; + repeated CampaignExtensionSettingOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -102,7 +110,6 @@ message CampaignExtensionSettingOperation { // Remove operation: A resource name for the removed campaign extension // setting is expected, in this format: // - // // `customers/{customer_id}/campaignExtensionSettings/{campaign_id}~{extension_type}` string remove = 3; } diff --git a/google/ads/googleads/v1/services/campaign_feed_service.proto b/google/ads/googleads/v1/services/campaign_feed_service.proto index 26c55adc2..8db7ecb5b 100644 --- a/google/ads/googleads/v1/services/campaign_feed_service.proto +++ b/google/ads/googleads/v1/services/campaign_feed_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/campaign_feed.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,40 +37,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage campaign feeds. service CampaignFeedService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested campaign feed in full detail. - rpc GetCampaignFeed(GetCampaignFeedRequest) - returns (google.ads.googleads.v1.resources.CampaignFeed) { + rpc GetCampaignFeed(GetCampaignFeedRequest) returns (google.ads.googleads.v1.resources.CampaignFeed) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/campaignFeeds/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes campaign feeds. Operation statuses are // returned. - rpc MutateCampaignFeeds(MutateCampaignFeedsRequest) - returns (MutateCampaignFeedsResponse) { + rpc MutateCampaignFeeds(MutateCampaignFeedsRequest) returns (MutateCampaignFeedsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/campaignFeeds:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [CampaignFeedService.GetCampaignFeed][google.ads.googleads.v1.services.CampaignFeedService.GetCampaignFeed]. +// Request message for [CampaignFeedService.GetCampaignFeed][google.ads.googleads.v1.services.CampaignFeedService.GetCampaignFeed]. message GetCampaignFeedRequest { - // The resource name of the campaign feed to fetch. - string resource_name = 1; + // Required. The resource name of the campaign feed to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignFeed" + } + ]; } -// Request message for -// [CampaignFeedService.MutateCampaignFeeds][google.ads.googleads.v1.services.CampaignFeedService.MutateCampaignFeeds]. +// Request message for [CampaignFeedService.MutateCampaignFeeds][google.ads.googleads.v1.services.CampaignFeedService.MutateCampaignFeeds]. message MutateCampaignFeedsRequest { - // The ID of the customer whose campaign feeds are being modified. - string customer_id = 1; + // Required. The ID of the customer whose campaign feeds are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaign feeds. - repeated CampaignFeedOperation operations = 2; + // Required. The list of operations to perform on individual campaign feeds. + repeated CampaignFeedOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/campaign_label_service.proto b/google/ads/googleads/v1/services/campaign_label_service.proto index 56df99167..8bebec481 100644 --- a/google/ads/googleads/v1/services/campaign_label_service.proto +++ b/google/ads/googleads/v1/services/campaign_label_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,7 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/campaign_label.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -35,40 +36,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage labels on campaigns. service CampaignLabelService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested campaign-label relationship in full detail. - rpc GetCampaignLabel(GetCampaignLabelRequest) - returns (google.ads.googleads.v1.resources.CampaignLabel) { + rpc GetCampaignLabel(GetCampaignLabelRequest) returns (google.ads.googleads.v1.resources.CampaignLabel) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/campaignLabels/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates and removes campaign-label relationships. // Operation statuses are returned. - rpc MutateCampaignLabels(MutateCampaignLabelsRequest) - returns (MutateCampaignLabelsResponse) { + rpc MutateCampaignLabels(MutateCampaignLabelsRequest) returns (MutateCampaignLabelsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/campaignLabels:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [CampaignLabelService.GetCampaignLabel][google.ads.googleads.v1.services.CampaignLabelService.GetCampaignLabel]. +// Request message for [CampaignLabelService.GetCampaignLabel][google.ads.googleads.v1.services.CampaignLabelService.GetCampaignLabel]. message GetCampaignLabelRequest { - // The resource name of the campaign-label relationship to fetch. - string resource_name = 1; + // Required. The resource name of the campaign-label relationship to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignLabel" + } + ]; } -// Request message for -// [CampaignLabelService.MutateCampaignLabels][google.ads.googleads.v1.services.CampaignLabelService.MutateCampaignLabels]. +// Request message for [CampaignLabelService.MutateCampaignLabels][google.ads.googleads.v1.services.CampaignLabelService.MutateCampaignLabels]. message MutateCampaignLabelsRequest { - // ID of the customer whose campaign-label relationships are being modified. - string customer_id = 1; + // Required. ID of the customer whose campaign-label relationships are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on campaign-label relationships. - repeated CampaignLabelOperation operations = 2; + // Required. The list of operations to perform on campaign-label relationships. + repeated CampaignLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/campaign_service.proto b/google/ads/googleads/v1/services/campaign_service.proto index 542c0bc7b..d73d7de49 100644 --- a/google/ads/googleads/v1/services/campaign_service.proto +++ b/google/ads/googleads/v1/services/campaign_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/campaign.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,39 +37,44 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage campaigns. service CampaignService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested campaign in full detail. - rpc GetCampaign(GetCampaignRequest) - returns (google.ads.googleads.v1.resources.Campaign) { + rpc GetCampaign(GetCampaignRequest) returns (google.ads.googleads.v1.resources.Campaign) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/campaigns/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes campaigns. Operation statuses are returned. - rpc MutateCampaigns(MutateCampaignsRequest) - returns (MutateCampaignsResponse) { + rpc MutateCampaigns(MutateCampaignsRequest) returns (MutateCampaignsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/campaigns:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [CampaignService.GetCampaign][google.ads.googleads.v1.services.CampaignService.GetCampaign]. +// Request message for [CampaignService.GetCampaign][google.ads.googleads.v1.services.CampaignService.GetCampaign]. message GetCampaignRequest { - // The resource name of the campaign to fetch. - string resource_name = 1; + // Required. The resource name of the campaign to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; } -// Request message for -// [CampaignService.MutateCampaigns][google.ads.googleads.v1.services.CampaignService.MutateCampaigns]. +// Request message for [CampaignService.MutateCampaigns][google.ads.googleads.v1.services.CampaignService.MutateCampaigns]. message MutateCampaignsRequest { - // The ID of the customer whose campaigns are being modified. - string customer_id = 1; + // Required. The ID of the customer whose campaigns are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaigns. - repeated CampaignOperation operations = 2; + // Required. The list of operations to perform on individual campaigns. + repeated CampaignOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/campaign_shared_set_service.proto b/google/ads/googleads/v1/services/campaign_shared_set_service.proto index acc9a9afe..3c3a7f224 100644 --- a/google/ads/googleads/v1/services/campaign_shared_set_service.proto +++ b/google/ads/googleads/v1/services/campaign_shared_set_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,7 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/campaign_shared_set.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -35,39 +36,44 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage campaign shared sets. service CampaignSharedSetService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested campaign shared set in full detail. - rpc GetCampaignSharedSet(GetCampaignSharedSetRequest) - returns (google.ads.googleads.v1.resources.CampaignSharedSet) { + rpc GetCampaignSharedSet(GetCampaignSharedSetRequest) returns (google.ads.googleads.v1.resources.CampaignSharedSet) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/campaignSharedSets/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or removes campaign shared sets. Operation statuses are returned. - rpc MutateCampaignSharedSets(MutateCampaignSharedSetsRequest) - returns (MutateCampaignSharedSetsResponse) { + rpc MutateCampaignSharedSets(MutateCampaignSharedSetsRequest) returns (MutateCampaignSharedSetsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/campaignSharedSets:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [CampaignSharedSetService.GetCampaignSharedSet][google.ads.googleads.v1.services.CampaignSharedSetService.GetCampaignSharedSet]. +// Request message for [CampaignSharedSetService.GetCampaignSharedSet][google.ads.googleads.v1.services.CampaignSharedSetService.GetCampaignSharedSet]. message GetCampaignSharedSetRequest { - // The resource name of the campaign shared set to fetch. - string resource_name = 1; + // Required. The resource name of the campaign shared set to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignSharedSet" + } + ]; } -// Request message for -// [CampaignSharedSetService.MutateCampaignSharedSets][google.ads.googleads.v1.services.CampaignSharedSetService.MutateCampaignSharedSets]. +// Request message for [CampaignSharedSetService.MutateCampaignSharedSets][google.ads.googleads.v1.services.CampaignSharedSetService.MutateCampaignSharedSets]. message MutateCampaignSharedSetsRequest { - // The ID of the customer whose campaign shared sets are being modified. - string customer_id = 1; + // Required. The ID of the customer whose campaign shared sets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaign shared sets. - repeated CampaignSharedSetOperation operations = 2; + // Required. The list of operations to perform on individual campaign shared sets. + repeated CampaignSharedSetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -91,7 +97,6 @@ message CampaignSharedSetOperation { // Remove operation: A resource name for the removed campaign shared set is // expected, in this format: // - // // `customers/{customer_id}/campaignSharedSets/{campaign_id}~{shared_set_id}` string remove = 3; } diff --git a/google/ads/googleads/v1/services/carrier_constant_service.proto b/google/ads/googleads/v1/services/carrier_constant_service.proto index 10aa6ad86..deff08a42 100644 --- a/google/ads/googleads/v1/services/carrier_constant_service.proto +++ b/google/ads/googleads/v1/services/carrier_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/carrier_constant.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch carrier constants. service CarrierConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested carrier constant in full detail. - rpc GetCarrierConstant(GetCarrierConstantRequest) - returns (google.ads.googleads.v1.resources.CarrierConstant) { + rpc GetCarrierConstant(GetCarrierConstantRequest) returns (google.ads.googleads.v1.resources.CarrierConstant) { option (google.api.http) = { get: "/v1/{resource_name=carrierConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [CarrierConstantService.GetCarrierConstant][google.ads.googleads.v1.services.CarrierConstantService.GetCarrierConstant]. +// Request message for [CarrierConstantService.GetCarrierConstant][google.ads.googleads.v1.services.CarrierConstantService.GetCarrierConstant]. message GetCarrierConstantRequest { - // Resource name of the carrier constant to fetch. - string resource_name = 1; + // Required. Resource name of the carrier constant to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CarrierConstant" + } + ]; } diff --git a/google/ads/googleads/v1/services/change_status_service.proto b/google/ads/googleads/v1/services/change_status_service.proto index 42534f27d..f28795a87 100644 --- a/google/ads/googleads/v1/services/change_status_service.proto +++ b/google/ads/googleads/v1/services/change_status_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/change_status.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch change statuses. service ChangeStatusService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested change status in full detail. - rpc GetChangeStatus(GetChangeStatusRequest) - returns (google.ads.googleads.v1.resources.ChangeStatus) { + rpc GetChangeStatus(GetChangeStatusRequest) returns (google.ads.googleads.v1.resources.ChangeStatus) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/changeStatus/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// '[ChangeStatusService.GetChangeStatus][google.ads.googleads.v1.services.ChangeStatusService.GetChangeStatus]'. +// Request message for '[ChangeStatusService.GetChangeStatus][google.ads.googleads.v1.services.ChangeStatusService.GetChangeStatus]'. message GetChangeStatusRequest { - // The resource name of the change status to fetch. - string resource_name = 1; + // Required. The resource name of the change status to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ChangeStatus" + } + ]; } diff --git a/google/ads/googleads/v1/services/click_view_service.proto b/google/ads/googleads/v1/services/click_view_service.proto index 4ba02a293..1dcf615cd 100644 --- a/google/ads/googleads/v1/services/click_view_service.proto +++ b/google/ads/googleads/v1/services/click_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/click_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch click views. service ClickViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested click view in full detail. - rpc GetClickView(GetClickViewRequest) - returns (google.ads.googleads.v1.resources.ClickView) { + rpc GetClickView(GetClickViewRequest) returns (google.ads.googleads.v1.resources.ClickView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/clickViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [ClickViewService.GetClickView][google.ads.googleads.v1.services.ClickViewService.GetClickView]. +// Request message for [ClickViewService.GetClickView][google.ads.googleads.v1.services.ClickViewService.GetClickView]. message GetClickViewRequest { - // The resource name of the click view to fetch. - string resource_name = 1; + // Required. The resource name of the click view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ClickView" + } + ]; } diff --git a/google/ads/googleads/v1/services/conversion_action_service.proto b/google/ads/googleads/v1/services/conversion_action_service.proto index a7ac01ff0..428dd62e3 100644 --- a/google/ads/googleads/v1/services/conversion_action_service.proto +++ b/google/ads/googleads/v1/services/conversion_action_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/conversion_action.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,40 +37,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage conversion actions. service ConversionActionService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested conversion action. - rpc GetConversionAction(GetConversionActionRequest) - returns (google.ads.googleads.v1.resources.ConversionAction) { + rpc GetConversionAction(GetConversionActionRequest) returns (google.ads.googleads.v1.resources.ConversionAction) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/conversionActions/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates or removes conversion actions. Operation statuses are // returned. - rpc MutateConversionActions(MutateConversionActionsRequest) - returns (MutateConversionActionsResponse) { + rpc MutateConversionActions(MutateConversionActionsRequest) returns (MutateConversionActionsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/conversionActions:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [ConversionActionService.GetConversionAction][google.ads.googleads.v1.services.ConversionActionService.GetConversionAction]. +// Request message for [ConversionActionService.GetConversionAction][google.ads.googleads.v1.services.ConversionActionService.GetConversionAction]. message GetConversionActionRequest { - // The resource name of the conversion action to fetch. - string resource_name = 1; + // Required. The resource name of the conversion action to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ConversionAction" + } + ]; } -// Request message for -// [ConversionActionService.MutateConversionActions][google.ads.googleads.v1.services.ConversionActionService.MutateConversionActions]. +// Request message for [ConversionActionService.MutateConversionActions][google.ads.googleads.v1.services.ConversionActionService.MutateConversionActions]. message MutateConversionActionsRequest { - // The ID of the customer whose conversion actions are being modified. - string customer_id = 1; + // Required. The ID of the customer whose conversion actions are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual conversion actions. - repeated ConversionActionOperation operations = 2; + // Required. The list of operations to perform on individual conversion actions. + repeated ConversionActionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -105,8 +111,7 @@ message ConversionActionOperation { } } -// Response message for -// [ConversionActionService.MutateConversionActions][google.ads.googleads.v1.services.ConversionActionService.MutateConversionActions]. +// Response message for [ConversionActionService.MutateConversionActions][google.ads.googleads.v1.services.ConversionActionService.MutateConversionActions]. message MutateConversionActionsResponse { // Errors that pertain to operation failures in the partial failure mode. // Returned only when partial_failure = true and all errors occur inside the diff --git a/google/ads/googleads/v1/services/conversion_adjustment_upload_service.proto b/google/ads/googleads/v1/services/conversion_adjustment_upload_service.proto index 70b0a2d7c..f54aceb0f 100644 --- a/google/ads/googleads/v1/services/conversion_adjustment_upload_service.proto +++ b/google/ads/googleads/v1/services/conversion_adjustment_upload_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/enums/conversion_adjustment_type.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; @@ -33,24 +34,26 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to upload conversion adjustments. service ConversionAdjustmentUploadService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Processes the given conversion adjustments. - rpc UploadConversionAdjustments(UploadConversionAdjustmentsRequest) - returns (UploadConversionAdjustmentsResponse) { + rpc UploadConversionAdjustments(UploadConversionAdjustmentsRequest) returns (UploadConversionAdjustmentsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}:uploadConversionAdjustments" body: "*" }; + option (google.api.method_signature) = "customer_id,conversion_adjustments"; } } // Request message for // [ConversionAdjustmentUploadService.UploadConversionAdjustments][google.ads.googleads.v1.services.ConversionAdjustmentUploadService.UploadConversionAdjustments]. message UploadConversionAdjustmentsRequest { - // The ID of the customer performing the upload. - string customer_id = 1; + // Required. The ID of the customer performing the upload. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The conversion adjustments that are being uploaded. - repeated ConversionAdjustment conversion_adjustments = 2; + // Required. The conversion adjustments that are being uploaded. + repeated ConversionAdjustment conversion_adjustments = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried out @@ -92,8 +95,7 @@ message ConversionAdjustment { google.protobuf.StringValue adjustment_date_time = 4; // The adjustment type. - google.ads.googleads.v1.enums.ConversionAdjustmentTypeEnum - .ConversionAdjustmentType adjustment_type = 5; + google.ads.googleads.v1.enums.ConversionAdjustmentTypeEnum.ConversionAdjustmentType adjustment_type = 5; // Information needed to restate the conversion's value. // Required for restatements. Should not be supplied for retractions. An error @@ -151,8 +153,7 @@ message ConversionAdjustmentResult { google.protobuf.StringValue adjustment_date_time = 4; // The adjustment type. - google.ads.googleads.v1.enums.ConversionAdjustmentTypeEnum - .ConversionAdjustmentType adjustment_type = 5; + google.ads.googleads.v1.enums.ConversionAdjustmentTypeEnum.ConversionAdjustmentType adjustment_type = 5; // Identifies the conversion that was adjusted. oneof conversion_identifier { diff --git a/google/ads/googleads/v1/services/conversion_upload_service.proto b/google/ads/googleads/v1/services/conversion_upload_service.proto index f3d316379..4d7da51f0 100644 --- a/google/ads/googleads/v1/services/conversion_upload_service.proto +++ b/google/ads/googleads/v1/services/conversion_upload_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v1.services; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; @@ -32,33 +33,34 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to upload conversions. service ConversionUploadService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Processes the given click conversions. - rpc UploadClickConversions(UploadClickConversionsRequest) - returns (UploadClickConversionsResponse) { + rpc UploadClickConversions(UploadClickConversionsRequest) returns (UploadClickConversionsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}:uploadClickConversions" body: "*" }; + option (google.api.method_signature) = "customer_id,conversions"; } // Processes the given call conversions. - rpc UploadCallConversions(UploadCallConversionsRequest) - returns (UploadCallConversionsResponse) { + rpc UploadCallConversions(UploadCallConversionsRequest) returns (UploadCallConversionsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}:uploadCallConversions" body: "*" }; + option (google.api.method_signature) = "customer_id,conversions"; } } -// Request message for -// [ConversionUploadService.UploadClickConversions][google.ads.googleads.v1.services.ConversionUploadService.UploadClickConversions]. +// Request message for [ConversionUploadService.UploadClickConversions][google.ads.googleads.v1.services.ConversionUploadService.UploadClickConversions]. message UploadClickConversionsRequest { - // The ID of the customer performing the upload. - string customer_id = 1; + // Required. The ID of the customer performing the upload. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The conversions that are being uploaded. - repeated ClickConversion conversions = 2; + // Required. The conversions that are being uploaded. + repeated ClickConversion conversions = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -71,8 +73,7 @@ message UploadClickConversionsRequest { bool validate_only = 4; } -// Response message for -// [ConversionUploadService.UploadClickConversions][google.ads.googleads.v1.services.ConversionUploadService.UploadClickConversions]. +// Response message for [ConversionUploadService.UploadClickConversions][google.ads.googleads.v1.services.ConversionUploadService.UploadClickConversions]. message UploadClickConversionsResponse { // Errors that pertain to conversion failures in the partial failure mode. // Returned when all errors occur inside the conversions. If any errors occur @@ -85,14 +86,13 @@ message UploadClickConversionsResponse { repeated ClickConversionResult results = 2; } -// Request message for -// [ConversionUploadService.UploadCallConversions][google.ads.googleads.v1.services.ConversionUploadService.UploadCallConversions]. +// Request message for [ConversionUploadService.UploadCallConversions][google.ads.googleads.v1.services.ConversionUploadService.UploadCallConversions]. message UploadCallConversionsRequest { - // The ID of the customer performing the upload. - string customer_id = 1; + // Required. The ID of the customer performing the upload. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The conversions that are being uploaded. - repeated CallConversion conversions = 2; + // Required. The conversions that are being uploaded. + repeated CallConversion conversions = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -105,8 +105,7 @@ message UploadCallConversionsRequest { bool validate_only = 4; } -// Response message for -// [ConversionUploadService.UploadCallConversions][google.ads.googleads.v1.services.ConversionUploadService.UploadCallConversions]. +// Response message for [ConversionUploadService.UploadCallConversions][google.ads.googleads.v1.services.ConversionUploadService.UploadCallConversions]. message UploadCallConversionsResponse { // Errors that pertain to conversion failures in the partial failure mode. // Returned when all errors occur inside the conversions. If any errors occur diff --git a/google/ads/googleads/v1/services/custom_interest_service.proto b/google/ads/googleads/v1/services/custom_interest_service.proto index 4dfc1638a..59bc67f2e 100644 --- a/google/ads/googleads/v1/services/custom_interest_service.proto +++ b/google/ads/googleads/v1/services/custom_interest_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/custom_interest.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -35,39 +36,44 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage custom interests. service CustomInterestService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested custom interest in full detail. - rpc GetCustomInterest(GetCustomInterestRequest) - returns (google.ads.googleads.v1.resources.CustomInterest) { + rpc GetCustomInterest(GetCustomInterestRequest) returns (google.ads.googleads.v1.resources.CustomInterest) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/customInterests/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or updates custom interests. Operation statuses are returned. - rpc MutateCustomInterests(MutateCustomInterestsRequest) - returns (MutateCustomInterestsResponse) { + rpc MutateCustomInterests(MutateCustomInterestsRequest) returns (MutateCustomInterestsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/customInterests:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [CustomInterestService.GetCustomInterest][google.ads.googleads.v1.services.CustomInterestService.GetCustomInterest]. +// Request message for [CustomInterestService.GetCustomInterest][google.ads.googleads.v1.services.CustomInterestService.GetCustomInterest]. message GetCustomInterestRequest { - // The resource name of the custom interest to fetch. - string resource_name = 1; + // Required. The resource name of the custom interest to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomInterest" + } + ]; } -// Request message for -// [CustomInterestService.MutateCustomInterests][google.ads.googleads.v1.services.CustomInterestService.MutateCustomInterests]. +// Request message for [CustomInterestService.MutateCustomInterests][google.ads.googleads.v1.services.CustomInterestService.MutateCustomInterests]. message MutateCustomInterestsRequest { - // The ID of the customer whose custom interests are being modified. - string customer_id = 1; + // Required. The ID of the customer whose custom interests are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual custom interests. - repeated CustomInterestOperation operations = 2; + // Required. The list of operations to perform on individual custom interests. + repeated CustomInterestOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, the request is validated but not executed. Only errors are // returned, not results. diff --git a/google/ads/googleads/v1/services/customer_client_link_service.proto b/google/ads/googleads/v1/services/customer_client_link_service.proto index c98e43914..d5898fbeb 100644 --- a/google/ads/googleads/v1/services/customer_client_link_service.proto +++ b/google/ads/googleads/v1/services/customer_client_link_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/customer_client_link.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,39 +34,44 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage customer client links. service CustomerClientLinkService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested CustomerClientLink in full detail. - rpc GetCustomerClientLink(GetCustomerClientLinkRequest) - returns (google.ads.googleads.v1.resources.CustomerClientLink) { + rpc GetCustomerClientLink(GetCustomerClientLinkRequest) returns (google.ads.googleads.v1.resources.CustomerClientLink) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/customerClientLinks/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or updates a customer client link. Operation statuses are returned. - rpc MutateCustomerClientLink(MutateCustomerClientLinkRequest) - returns (MutateCustomerClientLinkResponse) { + rpc MutateCustomerClientLink(MutateCustomerClientLinkRequest) returns (MutateCustomerClientLinkResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/customerClientLinks:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operation"; } } -// Request message for -// [CustomerClientLinkService.GetCustomerClientLink][google.ads.googleads.v1.services.CustomerClientLinkService.GetCustomerClientLink]. +// Request message for [CustomerClientLinkService.GetCustomerClientLink][google.ads.googleads.v1.services.CustomerClientLinkService.GetCustomerClientLink]. message GetCustomerClientLinkRequest { - // The resource name of the customer client link to fetch. - string resource_name = 1; + // Required. The resource name of the customer client link to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerClientLink" + } + ]; } -// Request message for -// [CustomerClientLinkService.MutateCustomerClientLink][google.ads.googleads.v1.services.CustomerClientLinkService.MutateCustomerClientLink]. +// Request message for [CustomerClientLinkService.MutateCustomerClientLink][google.ads.googleads.v1.services.CustomerClientLinkService.MutateCustomerClientLink]. message MutateCustomerClientLinkRequest { - // The ID of the customer whose customer link are being modified. - string customer_id = 1; + // Required. The ID of the customer whose customer link are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The operation to perform on the individual CustomerClientLink. - CustomerClientLinkOperation operation = 2; + // Required. The operation to perform on the individual CustomerClientLink. + CustomerClientLinkOperation operation = 2 [(google.api.field_behavior) = REQUIRED]; } // A single operation (create, update) on a CustomerClientLink. diff --git a/google/ads/googleads/v1/services/customer_client_service.proto b/google/ads/googleads/v1/services/customer_client_service.proto index 1dd809305..ed5e3e36f 100644 --- a/google/ads/googleads/v1/services/customer_client_service.proto +++ b/google/ads/googleads/v1/services/customer_client_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/customer_client.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to get clients in a customer's hierarchy. service CustomerClientService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested client in full detail. - rpc GetCustomerClient(GetCustomerClientRequest) - returns (google.ads.googleads.v1.resources.CustomerClient) { + rpc GetCustomerClient(GetCustomerClientRequest) returns (google.ads.googleads.v1.resources.CustomerClient) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/customerClients/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [CustomerClientService.GetCustomerClient][google.ads.googleads.v1.services.CustomerClientService.GetCustomerClient]. +// Request message for [CustomerClientService.GetCustomerClient][google.ads.googleads.v1.services.CustomerClientService.GetCustomerClient]. message GetCustomerClientRequest { - // The resource name of the client to fetch. - string resource_name = 1; + // Required. The resource name of the client to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerClient" + } + ]; } diff --git a/google/ads/googleads/v1/services/customer_extension_setting_service.proto b/google/ads/googleads/v1/services/customer_extension_setting_service.proto index 9ec4974cd..1e58b5809 100644 --- a/google/ads/googleads/v1/services/customer_extension_setting_service.proto +++ b/google/ads/googleads/v1/services/customer_extension_setting_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/customer_extension_setting.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,42 +37,49 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage customer extension settings. service CustomerExtensionSettingService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested customer extension setting in full detail. - rpc GetCustomerExtensionSetting(GetCustomerExtensionSettingRequest) - returns (google.ads.googleads.v1.resources.CustomerExtensionSetting) { + rpc GetCustomerExtensionSetting(GetCustomerExtensionSettingRequest) returns (google.ads.googleads.v1.resources.CustomerExtensionSetting) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/customerExtensionSettings/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes customer extension settings. Operation // statuses are returned. - rpc MutateCustomerExtensionSettings(MutateCustomerExtensionSettingsRequest) - returns (MutateCustomerExtensionSettingsResponse) { + rpc MutateCustomerExtensionSettings(MutateCustomerExtensionSettingsRequest) returns (MutateCustomerExtensionSettingsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/customerExtensionSettings:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for // [CustomerExtensionSettingService.GetCustomerExtensionSetting][google.ads.googleads.v1.services.CustomerExtensionSettingService.GetCustomerExtensionSetting]. message GetCustomerExtensionSettingRequest { - // The resource name of the customer extension setting to fetch. - string resource_name = 1; + // Required. The resource name of the customer extension setting to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerExtensionSetting" + } + ]; } // Request message for // [CustomerExtensionSettingService.MutateCustomerExtensionSettings][google.ads.googleads.v1.services.CustomerExtensionSettingService.MutateCustomerExtensionSettings]. message MutateCustomerExtensionSettingsRequest { - // The ID of the customer whose customer extension settings are being + // Required. The ID of the customer whose customer extension settings are being // modified. - string customer_id = 1; + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual customer extension + // Required. The list of operations to perform on individual customer extension // settings. - repeated CustomerExtensionSettingOperation operations = 2; + repeated CustomerExtensionSettingOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/customer_feed_service.proto b/google/ads/googleads/v1/services/customer_feed_service.proto index 2fecf58e7..3c94faa77 100644 --- a/google/ads/googleads/v1/services/customer_feed_service.proto +++ b/google/ads/googleads/v1/services/customer_feed_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/customer_feed.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,40 +37,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage customer feeds. service CustomerFeedService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested customer feed in full detail. - rpc GetCustomerFeed(GetCustomerFeedRequest) - returns (google.ads.googleads.v1.resources.CustomerFeed) { + rpc GetCustomerFeed(GetCustomerFeedRequest) returns (google.ads.googleads.v1.resources.CustomerFeed) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/customerFeeds/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes customer feeds. Operation statuses are // returned. - rpc MutateCustomerFeeds(MutateCustomerFeedsRequest) - returns (MutateCustomerFeedsResponse) { + rpc MutateCustomerFeeds(MutateCustomerFeedsRequest) returns (MutateCustomerFeedsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/customerFeeds:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [CustomerFeedService.GetCustomerFeed][google.ads.googleads.v1.services.CustomerFeedService.GetCustomerFeed]. +// Request message for [CustomerFeedService.GetCustomerFeed][google.ads.googleads.v1.services.CustomerFeedService.GetCustomerFeed]. message GetCustomerFeedRequest { - // The resource name of the customer feed to fetch. - string resource_name = 1; + // Required. The resource name of the customer feed to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerFeed" + } + ]; } -// Request message for -// [CustomerFeedService.MutateCustomerFeeds][google.ads.googleads.v1.services.CustomerFeedService.MutateCustomerFeeds]. +// Request message for [CustomerFeedService.MutateCustomerFeeds][google.ads.googleads.v1.services.CustomerFeedService.MutateCustomerFeeds]. message MutateCustomerFeedsRequest { - // The ID of the customer whose customer feeds are being modified. - string customer_id = 1; + // Required. The ID of the customer whose customer feeds are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual customer feeds. - repeated CustomerFeedOperation operations = 2; + // Required. The list of operations to perform on individual customer feeds. + repeated CustomerFeedOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/customer_label_service.proto b/google/ads/googleads/v1/services/customer_label_service.proto index e9780aee4..8513c8043 100644 --- a/google/ads/googleads/v1/services/customer_label_service.proto +++ b/google/ads/googleads/v1/services/customer_label_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,7 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/customer_label.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -35,40 +36,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage labels on customers. service CustomerLabelService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested customer-label relationship in full detail. - rpc GetCustomerLabel(GetCustomerLabelRequest) - returns (google.ads.googleads.v1.resources.CustomerLabel) { + rpc GetCustomerLabel(GetCustomerLabelRequest) returns (google.ads.googleads.v1.resources.CustomerLabel) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/customerLabels/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates and removes customer-label relationships. // Operation statuses are returned. - rpc MutateCustomerLabels(MutateCustomerLabelsRequest) - returns (MutateCustomerLabelsResponse) { + rpc MutateCustomerLabels(MutateCustomerLabelsRequest) returns (MutateCustomerLabelsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/customerLabels:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [CustomerLabelService.GetCustomerLabel][google.ads.googleads.v1.services.CustomerLabelService.GetCustomerLabel]. +// Request message for [CustomerLabelService.GetCustomerLabel][google.ads.googleads.v1.services.CustomerLabelService.GetCustomerLabel]. message GetCustomerLabelRequest { - // The resource name of the customer-label relationship to fetch. - string resource_name = 1; + // Required. The resource name of the customer-label relationship to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerLabel" + } + ]; } -// Request message for -// [CustomerLabelService.MutateCustomerLabels][google.ads.googleads.v1.services.CustomerLabelService.MutateCustomerLabels]. +// Request message for [CustomerLabelService.MutateCustomerLabels][google.ads.googleads.v1.services.CustomerLabelService.MutateCustomerLabels]. message MutateCustomerLabelsRequest { - // ID of the customer whose customer-label relationships are being modified. - string customer_id = 1; + // Required. ID of the customer whose customer-label relationships are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on customer-label relationships. - repeated CustomerLabelOperation operations = 2; + // Required. The list of operations to perform on customer-label relationships. + repeated CustomerLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/customer_manager_link_service.proto b/google/ads/googleads/v1/services/customer_manager_link_service.proto index 0992880fd..7f1050d7f 100644 --- a/google/ads/googleads/v1/services/customer_manager_link_service.proto +++ b/google/ads/googleads/v1/services/customer_manager_link_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/customer_manager_link.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -32,39 +34,44 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage customer-manager links. service CustomerManagerLinkService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested CustomerManagerLink in full detail. - rpc GetCustomerManagerLink(GetCustomerManagerLinkRequest) - returns (google.ads.googleads.v1.resources.CustomerManagerLink) { + rpc GetCustomerManagerLink(GetCustomerManagerLinkRequest) returns (google.ads.googleads.v1.resources.CustomerManagerLink) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/customerManagerLinks/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or updates customer manager links. Operation statuses are returned. - rpc MutateCustomerManagerLink(MutateCustomerManagerLinkRequest) - returns (MutateCustomerManagerLinkResponse) { + rpc MutateCustomerManagerLink(MutateCustomerManagerLinkRequest) returns (MutateCustomerManagerLinkResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/customerManagerLinks:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [CustomerManagerLinkService.GetCustomerManagerLink][google.ads.googleads.v1.services.CustomerManagerLinkService.GetCustomerManagerLink]. +// Request message for [CustomerManagerLinkService.GetCustomerManagerLink][google.ads.googleads.v1.services.CustomerManagerLinkService.GetCustomerManagerLink]. message GetCustomerManagerLinkRequest { - // The resource name of the CustomerManagerLink to fetch. - string resource_name = 1; + // Required. The resource name of the CustomerManagerLink to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerManagerLink" + } + ]; } -// Request message for -// [CustomerManagerLinkService.MutateCustomerManagerLink][google.ads.googleads.v1.services.CustomerManagerLinkService.MutateCustomerManagerLink]. +// Request message for [CustomerManagerLinkService.MutateCustomerManagerLink][google.ads.googleads.v1.services.CustomerManagerLinkService.MutateCustomerManagerLink]. message MutateCustomerManagerLinkRequest { - // The ID of the customer whose customer manager links are being modified. - string customer_id = 1; + // Required. The ID of the customer whose customer manager links are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual customer manager links. - repeated CustomerManagerLinkOperation operations = 2; + // Required. The list of operations to perform on individual customer manager links. + repeated CustomerManagerLinkOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; } // Updates the status of a CustomerManagerLink. diff --git a/google/ads/googleads/v1/services/customer_negative_criterion_service.proto b/google/ads/googleads/v1/services/customer_negative_criterion_service.proto index bdcdc044c..939b8392a 100644 --- a/google/ads/googleads/v1/services/customer_negative_criterion_service.proto +++ b/google/ads/googleads/v1/services/customer_negative_criterion_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,7 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/customer_negative_criterion.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -35,39 +36,46 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage customer negative criteria. service CustomerNegativeCriterionService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested criterion in full detail. - rpc GetCustomerNegativeCriterion(GetCustomerNegativeCriterionRequest) - returns (google.ads.googleads.v1.resources.CustomerNegativeCriterion) { + rpc GetCustomerNegativeCriterion(GetCustomerNegativeCriterionRequest) returns (google.ads.googleads.v1.resources.CustomerNegativeCriterion) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/customerNegativeCriteria/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or removes criteria. Operation statuses are returned. - rpc MutateCustomerNegativeCriteria(MutateCustomerNegativeCriteriaRequest) - returns (MutateCustomerNegativeCriteriaResponse) { + rpc MutateCustomerNegativeCriteria(MutateCustomerNegativeCriteriaRequest) returns (MutateCustomerNegativeCriteriaResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/customerNegativeCriteria:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for // [CustomerNegativeCriterionService.GetCustomerNegativeCriterion][google.ads.googleads.v1.services.CustomerNegativeCriterionService.GetCustomerNegativeCriterion]. message GetCustomerNegativeCriterionRequest { - // The resource name of the criterion to fetch. - string resource_name = 1; + // Required. The resource name of the criterion to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerNegativeCriterion" + } + ]; } // Request message for // [CustomerNegativeCriterionService.MutateCustomerNegativeCriteria][google.ads.googleads.v1.services.CustomerNegativeCriterionService.MutateCustomerNegativeCriteria]. message MutateCustomerNegativeCriteriaRequest { - // The ID of the customer whose criteria are being modified. - string customer_id = 1; + // Required. The ID of the customer whose criteria are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual criteria. - repeated CustomerNegativeCriterionOperation operations = 2; + // Required. The list of operations to perform on individual criteria. + repeated CustomerNegativeCriterionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/customer_service.proto b/google/ads/googleads/v1/services/customer_service.proto index 1fcfea14f..9b2eb12d0 100644 --- a/google/ads/googleads/v1/services/customer_service.proto +++ b/google/ads/googleads/v1/services/customer_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/customer.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/wrappers.proto"; @@ -35,12 +37,14 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage customers. service CustomerService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested customer in full detail. - rpc GetCustomer(GetCustomerRequest) - returns (google.ads.googleads.v1.resources.Customer) { + rpc GetCustomer(GetCustomerRequest) returns (google.ads.googleads.v1.resources.Customer) { option (google.api.http) = { get: "/v1/{resource_name=customers/*}" }; + option (google.api.method_signature) = "resource_name"; } // Updates a customer. Operation statuses are returned. @@ -49,57 +53,59 @@ service CustomerService { post: "/v1/customers/{customer_id=*}:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operation"; } // Returns resource names of customers directly accessible by the // user authenticating the call. - rpc ListAccessibleCustomers(ListAccessibleCustomersRequest) - returns (ListAccessibleCustomersResponse) { + rpc ListAccessibleCustomers(ListAccessibleCustomersRequest) returns (ListAccessibleCustomersResponse) { option (google.api.http) = { get: "/v1/customers:listAccessibleCustomers" }; } // Creates a new client under manager. The new client customer is returned. - rpc CreateCustomerClient(CreateCustomerClientRequest) - returns (CreateCustomerClientResponse) { + rpc CreateCustomerClient(CreateCustomerClientRequest) returns (CreateCustomerClientResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}:createCustomerClient" body: "*" }; + option (google.api.method_signature) = "customer_id,customer_client"; } } -// Request message for -// [CustomerService.GetCustomer][google.ads.googleads.v1.services.CustomerService.GetCustomer]. +// Request message for [CustomerService.GetCustomer][google.ads.googleads.v1.services.CustomerService.GetCustomer]. message GetCustomerRequest { - // The resource name of the customer to fetch. - string resource_name = 1; + // Required. The resource name of the customer to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Customer" + } + ]; } -// Request message for -// [CustomerService.MutateCustomer][google.ads.googleads.v1.services.CustomerService.MutateCustomer]. +// Request message for [CustomerService.MutateCustomer][google.ads.googleads.v1.services.CustomerService.MutateCustomer]. message MutateCustomerRequest { - // The ID of the customer being modified. - string customer_id = 1; + // Required. The ID of the customer being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The operation to perform on the customer - CustomerOperation operation = 4; + // Required. The operation to perform on the customer + CustomerOperation operation = 4 [(google.api.field_behavior) = REQUIRED]; // If true, the request is validated but not executed. Only errors are // returned, not results. bool validate_only = 5; } -// Request message for -// [CustomerService.CreateCustomerClient][google.ads.googleads.v1.services.CustomerService.CreateCustomerClient]. +// Request message for [CustomerService.CreateCustomerClient][google.ads.googleads.v1.services.CustomerService.CreateCustomerClient]. message CreateCustomerClientRequest { - // The ID of the Manager under whom client customer is being created. - string customer_id = 1; + // Required. The ID of the Manager under whom client customer is being created. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The new client customer to create. The resource name on this customer + // Required. The new client customer to create. The resource name on this customer // will be ignored. - google.ads.googleads.v1.resources.Customer customer_client = 2; + google.ads.googleads.v1.resources.Customer customer_client = 2 [(google.api.field_behavior) = REQUIRED]; } // A single update on a customer. @@ -129,12 +135,12 @@ message MutateCustomerResult { string resource_name = 1; } -// Request message for -// [CustomerService.ListAccessibleCustomers][google.ads.googleads.v1.services.CustomerService.ListAccessibleCustomers]. -message ListAccessibleCustomersRequest {} +// Request message for [CustomerService.ListAccessibleCustomers][google.ads.googleads.v1.services.CustomerService.ListAccessibleCustomers]. +message ListAccessibleCustomersRequest { + +} -// Response message for -// [CustomerService.ListAccessibleCustomers][google.ads.googleads.v1.services.CustomerService.ListAccessibleCustomers]. +// Response message for [CustomerService.ListAccessibleCustomers][google.ads.googleads.v1.services.CustomerService.ListAccessibleCustomers]. message ListAccessibleCustomersResponse { // Resource name of customers directly accessible by the // user authenticating the call. diff --git a/google/ads/googleads/v1/services/detail_placement_view_service.proto b/google/ads/googleads/v1/services/detail_placement_view_service.proto index 6c1d44ea8..ae057813c 100644 --- a/google/ads/googleads/v1/services/detail_placement_view_service.proto +++ b/google/ads/googleads/v1/services/detail_placement_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/detail_placement_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch Detail Placement views. service DetailPlacementViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested Detail Placement view in full detail. - rpc GetDetailPlacementView(GetDetailPlacementViewRequest) - returns (google.ads.googleads.v1.resources.DetailPlacementView) { + rpc GetDetailPlacementView(GetDetailPlacementViewRequest) returns (google.ads.googleads.v1.resources.DetailPlacementView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/detailPlacementViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [DetailPlacementViewService.GetDetailPlacementView][google.ads.googleads.v1.services.DetailPlacementViewService.GetDetailPlacementView]. +// Request message for [DetailPlacementViewService.GetDetailPlacementView][google.ads.googleads.v1.services.DetailPlacementViewService.GetDetailPlacementView]. message GetDetailPlacementViewRequest { - // The resource name of the Detail Placement view to fetch. - string resource_name = 1; + // Required. The resource name of the Detail Placement view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DetailPlacementView" + } + ]; } diff --git a/google/ads/googleads/v1/services/display_keyword_view_service.proto b/google/ads/googleads/v1/services/display_keyword_view_service.proto index 7052cec34..177c2a366 100644 --- a/google/ads/googleads/v1/services/display_keyword_view_service.proto +++ b/google/ads/googleads/v1/services/display_keyword_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/display_keyword_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage display keyword views. service DisplayKeywordViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested display keyword view in full detail. - rpc GetDisplayKeywordView(GetDisplayKeywordViewRequest) - returns (google.ads.googleads.v1.resources.DisplayKeywordView) { + rpc GetDisplayKeywordView(GetDisplayKeywordViewRequest) returns (google.ads.googleads.v1.resources.DisplayKeywordView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/displayKeywordViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [DisplayKeywordViewService.GetDisplayKeywordView][google.ads.googleads.v1.services.DisplayKeywordViewService.GetDisplayKeywordView]. +// Request message for [DisplayKeywordViewService.GetDisplayKeywordView][google.ads.googleads.v1.services.DisplayKeywordViewService.GetDisplayKeywordView]. message GetDisplayKeywordViewRequest { - // The resource name of the display keyword view to fetch. - string resource_name = 1; + // Required. The resource name of the display keyword view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DisplayKeywordView" + } + ]; } diff --git a/google/ads/googleads/v1/services/domain_category_service.proto b/google/ads/googleads/v1/services/domain_category_service.proto index 046117896..afdfb057d 100644 --- a/google/ads/googleads/v1/services/domain_category_service.proto +++ b/google/ads/googleads/v1/services/domain_category_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/domain_category.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,25 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch domain categories. service DomainCategoryService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested domain category. - rpc GetDomainCategory(GetDomainCategoryRequest) - returns (google.ads.googleads.v1.resources.DomainCategory) { + rpc GetDomainCategory(GetDomainCategoryRequest) returns (google.ads.googleads.v1.resources.DomainCategory) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/domainCategories/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [DomainCategoryService.GetDomainCategory][google.ads.googleads.v1.services.DomainCategoryService.GetDomainCategory]. message GetDomainCategoryRequest { - // Resource name of the domain category to fetch. - string resource_name = 1; + // Required. Resource name of the domain category to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DomainCategory" + } + ]; } diff --git a/google/ads/googleads/v1/services/dynamic_search_ads_search_term_view_service.proto b/google/ads/googleads/v1/services/dynamic_search_ads_search_term_view_service.proto index 2a1642a98..607ebf46e 100644 --- a/google/ads/googleads/v1/services/dynamic_search_ads_search_term_view_service.proto +++ b/google/ads/googleads/v1/services/dynamic_search_ads_search_term_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,20 +35,25 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch dynamic search ads views. service DynamicSearchAdsSearchTermViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested dynamic search ads search term view in full detail. - rpc GetDynamicSearchAdsSearchTermView( - GetDynamicSearchAdsSearchTermViewRequest) - returns ( - google.ads.googleads.v1.resources.DynamicSearchAdsSearchTermView) { + rpc GetDynamicSearchAdsSearchTermView(GetDynamicSearchAdsSearchTermViewRequest) returns (google.ads.googleads.v1.resources.DynamicSearchAdsSearchTermView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/dynamicSearchAdsSearchTermViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [DynamicSearchAdsSearchTermViewService.GetDynamicSearchAdsSearchTermView][google.ads.googleads.v1.services.DynamicSearchAdsSearchTermViewService.GetDynamicSearchAdsSearchTermView]. message GetDynamicSearchAdsSearchTermViewRequest { - // The resource name of the dynamic search ads search term view to fetch. - string resource_name = 1; + // Required. The resource name of the dynamic search ads search term view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DynamicSearchAdsSearchTermView" + } + ]; } diff --git a/google/ads/googleads/v1/services/expanded_landing_page_view_service.proto b/google/ads/googleads/v1/services/expanded_landing_page_view_service.proto index d3950d83c..7d15ecb94 100644 --- a/google/ads/googleads/v1/services/expanded_landing_page_view_service.proto +++ b/google/ads/googleads/v1/services/expanded_landing_page_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,7 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/expanded_landing_page_view.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -34,18 +35,25 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch expanded landing page views. service ExpandedLandingPageViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested expanded landing page view in full detail. - rpc GetExpandedLandingPageView(GetExpandedLandingPageViewRequest) - returns (google.ads.googleads.v1.resources.ExpandedLandingPageView) { + rpc GetExpandedLandingPageView(GetExpandedLandingPageViewRequest) returns (google.ads.googleads.v1.resources.ExpandedLandingPageView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/expandedLandingPageViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [ExpandedLandingPageViewService.GetExpandedLandingPageView][google.ads.googleads.v1.services.ExpandedLandingPageViewService.GetExpandedLandingPageView]. message GetExpandedLandingPageViewRequest { - // The resource name of the expanded landing page view to fetch. - string resource_name = 1; + // Required. The resource name of the expanded landing page view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ExpandedLandingPageView" + } + ]; } diff --git a/google/ads/googleads/v1/services/extension_feed_item_service.proto b/google/ads/googleads/v1/services/extension_feed_item_service.proto index 6dc3b2ed1..c988e2f65 100644 --- a/google/ads/googleads/v1/services/extension_feed_item_service.proto +++ b/google/ads/googleads/v1/services/extension_feed_item_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/extension_feed_item.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -35,41 +36,46 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage extension feed items. service ExtensionFeedItemService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested extension feed item in full detail. - rpc GetExtensionFeedItem(GetExtensionFeedItemRequest) - returns (google.ads.googleads.v1.resources.ExtensionFeedItem) { + rpc GetExtensionFeedItem(GetExtensionFeedItemRequest) returns (google.ads.googleads.v1.resources.ExtensionFeedItem) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/extensionFeedItems/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes extension feed items. Operation // statuses are returned. - rpc MutateExtensionFeedItems(MutateExtensionFeedItemsRequest) - returns (MutateExtensionFeedItemsResponse) { + rpc MutateExtensionFeedItems(MutateExtensionFeedItemsRequest) returns (MutateExtensionFeedItemsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/extensionFeedItems:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [ExtensionFeedItemService.GetExtensionFeedItem][google.ads.googleads.v1.services.ExtensionFeedItemService.GetExtensionFeedItem]. +// Request message for [ExtensionFeedItemService.GetExtensionFeedItem][google.ads.googleads.v1.services.ExtensionFeedItemService.GetExtensionFeedItem]. message GetExtensionFeedItemRequest { - // The resource name of the extension feed item to fetch. - string resource_name = 1; + // Required. The resource name of the extension feed item to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + } + ]; } -// Request message for -// [ExtensionFeedItemService.MutateExtensionFeedItems][google.ads.googleads.v1.services.ExtensionFeedItemService.MutateExtensionFeedItems]. +// Request message for [ExtensionFeedItemService.MutateExtensionFeedItems][google.ads.googleads.v1.services.ExtensionFeedItemService.MutateExtensionFeedItems]. message MutateExtensionFeedItemsRequest { - // The ID of the customer whose extension feed items are being + // Required. The ID of the customer whose extension feed items are being // modified. - string customer_id = 1; + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual extension feed items. - repeated ExtensionFeedItemOperation operations = 2; + // Required. The list of operations to perform on individual extension feed items. + repeated ExtensionFeedItemOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, the request is validated but not executed. Only errors are // returned, not results. diff --git a/google/ads/googleads/v1/services/feed_item_service.proto b/google/ads/googleads/v1/services/feed_item_service.proto index e293f8ded..d476026d4 100644 --- a/google/ads/googleads/v1/services/feed_item_service.proto +++ b/google/ads/googleads/v1/services/feed_item_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/feed_item.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,40 +37,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage feed items. service FeedItemService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested feed item in full detail. - rpc GetFeedItem(GetFeedItemRequest) - returns (google.ads.googleads.v1.resources.FeedItem) { + rpc GetFeedItem(GetFeedItemRequest) returns (google.ads.googleads.v1.resources.FeedItem) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/feedItems/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes feed items. Operation statuses are // returned. - rpc MutateFeedItems(MutateFeedItemsRequest) - returns (MutateFeedItemsResponse) { + rpc MutateFeedItems(MutateFeedItemsRequest) returns (MutateFeedItemsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/feedItems:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [FeedItemService.GetFeedItem][google.ads.googleads.v1.services.FeedItemService.GetFeedItem]. +// Request message for [FeedItemService.GetFeedItem][google.ads.googleads.v1.services.FeedItemService.GetFeedItem]. message GetFeedItemRequest { - // The resource name of the feed item to fetch. - string resource_name = 1; + // Required. The resource name of the feed item to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItem" + } + ]; } -// Request message for -// [FeedItemService.MutateFeedItems][google.ads.googleads.v1.services.FeedItemService.MutateFeedItems]. +// Request message for [FeedItemService.MutateFeedItems][google.ads.googleads.v1.services.FeedItemService.MutateFeedItems]. message MutateFeedItemsRequest { - // The ID of the customer whose feed items are being modified. - string customer_id = 1; + // Required. The ID of the customer whose feed items are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual feed items. - repeated FeedItemOperation operations = 2; + // Required. The list of operations to perform on individual feed items. + repeated FeedItemOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/feed_item_target_service.proto b/google/ads/googleads/v1/services/feed_item_target_service.proto index f710b0109..5f0953f10 100644 --- a/google/ads/googleads/v1/services/feed_item_target_service.proto +++ b/google/ads/googleads/v1/services/feed_item_target_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/feed_item_target.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,39 +35,44 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage feed item targets. service FeedItemTargetService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested feed item targets in full detail. - rpc GetFeedItemTarget(GetFeedItemTargetRequest) - returns (google.ads.googleads.v1.resources.FeedItemTarget) { + rpc GetFeedItemTarget(GetFeedItemTargetRequest) returns (google.ads.googleads.v1.resources.FeedItemTarget) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/feedItemTargets/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or removes feed item targets. Operation statuses are returned. - rpc MutateFeedItemTargets(MutateFeedItemTargetsRequest) - returns (MutateFeedItemTargetsResponse) { + rpc MutateFeedItemTargets(MutateFeedItemTargetsRequest) returns (MutateFeedItemTargetsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/feedItemTargets:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [FeedItemTargetService.GetFeedItemTarget][google.ads.googleads.v1.services.FeedItemTargetService.GetFeedItemTarget]. +// Request message for [FeedItemTargetService.GetFeedItemTarget][google.ads.googleads.v1.services.FeedItemTargetService.GetFeedItemTarget]. message GetFeedItemTargetRequest { - // The resource name of the feed item targets to fetch. - string resource_name = 1; + // Required. The resource name of the feed item targets to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItemTarget" + } + ]; } -// Request message for -// [FeedItemTargetService.MutateFeedItemTargets][google.ads.googleads.v1.services.FeedItemTargetService.MutateFeedItemTargets]. +// Request message for [FeedItemTargetService.MutateFeedItemTargets][google.ads.googleads.v1.services.FeedItemTargetService.MutateFeedItemTargets]. message MutateFeedItemTargetsRequest { - // The ID of the customer whose feed item targets are being modified. - string customer_id = 1; + // Required. The ID of the customer whose feed item targets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual feed item targets. - repeated FeedItemTargetOperation operations = 2; + // Required. The list of operations to perform on individual feed item targets. + repeated FeedItemTargetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; } // A single operation (create, remove) on an feed item target. @@ -79,7 +86,6 @@ message FeedItemTargetOperation { // Remove operation: A resource name for the removed feed item target is // expected, in this format: // - // // `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}` string remove = 2; } diff --git a/google/ads/googleads/v1/services/feed_mapping_service.proto b/google/ads/googleads/v1/services/feed_mapping_service.proto index 2e85a6005..39ee2c519 100644 --- a/google/ads/googleads/v1/services/feed_mapping_service.proto +++ b/google/ads/googleads/v1/services/feed_mapping_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,7 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/feed_mapping.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -35,40 +36,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage feed mappings. service FeedMappingService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested feed mapping in full detail. - rpc GetFeedMapping(GetFeedMappingRequest) - returns (google.ads.googleads.v1.resources.FeedMapping) { + rpc GetFeedMapping(GetFeedMappingRequest) returns (google.ads.googleads.v1.resources.FeedMapping) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/feedMappings/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or removes feed mappings. Operation statuses are // returned. - rpc MutateFeedMappings(MutateFeedMappingsRequest) - returns (MutateFeedMappingsResponse) { + rpc MutateFeedMappings(MutateFeedMappingsRequest) returns (MutateFeedMappingsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/feedMappings:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [FeedMappingService.GetFeedMapping][google.ads.googleads.v1.services.FeedMappingService.GetFeedMapping]. +// Request message for [FeedMappingService.GetFeedMapping][google.ads.googleads.v1.services.FeedMappingService.GetFeedMapping]. message GetFeedMappingRequest { - // The resource name of the feed mapping to fetch. - string resource_name = 1; + // Required. The resource name of the feed mapping to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedMapping" + } + ]; } -// Request message for -// [FeedMappingService.MutateFeedMappings][google.ads.googleads.v1.services.FeedMappingService.MutateFeedMappings]. +// Request message for [FeedMappingService.MutateFeedMappings][google.ads.googleads.v1.services.FeedMappingService.MutateFeedMappings]. message MutateFeedMappingsRequest { - // The ID of the customer whose feed mappings are being modified. - string customer_id = 1; + // Required. The ID of the customer whose feed mappings are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual feed mappings. - repeated FeedMappingOperation operations = 2; + // Required. The list of operations to perform on individual feed mappings. + repeated FeedMappingOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/feed_placeholder_view_service.proto b/google/ads/googleads/v1/services/feed_placeholder_view_service.proto index 6430fd9ee..2eec7014a 100644 --- a/google/ads/googleads/v1/services/feed_placeholder_view_service.proto +++ b/google/ads/googleads/v1/services/feed_placeholder_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/feed_placeholder_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch feed placeholder views. service FeedPlaceholderViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested feed placeholder view in full detail. - rpc GetFeedPlaceholderView(GetFeedPlaceholderViewRequest) - returns (google.ads.googleads.v1.resources.FeedPlaceholderView) { + rpc GetFeedPlaceholderView(GetFeedPlaceholderViewRequest) returns (google.ads.googleads.v1.resources.FeedPlaceholderView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/feedPlaceholderViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [FeedPlaceholderViewService.GetFeedPlaceholderView][google.ads.googleads.v1.services.FeedPlaceholderViewService.GetFeedPlaceholderView]. +// Request message for [FeedPlaceholderViewService.GetFeedPlaceholderView][google.ads.googleads.v1.services.FeedPlaceholderViewService.GetFeedPlaceholderView]. message GetFeedPlaceholderViewRequest { - // The resource name of the feed placeholder view to fetch. - string resource_name = 1; + // Required. The resource name of the feed placeholder view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedPlaceholderView" + } + ]; } diff --git a/google/ads/googleads/v1/services/feed_service.proto b/google/ads/googleads/v1/services/feed_service.proto index a3964a64f..0de0bb37a 100644 --- a/google/ads/googleads/v1/services/feed_service.proto +++ b/google/ads/googleads/v1/services/feed_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/feed.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,11 +37,14 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage feeds. service FeedService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested feed in full detail. rpc GetFeed(GetFeedRequest) returns (google.ads.googleads.v1.resources.Feed) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/feeds/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes feeds. Operation statuses are @@ -50,24 +54,28 @@ service FeedService { post: "/v1/customers/{customer_id=*}/feeds:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [FeedService.GetFeed][google.ads.googleads.v1.services.FeedService.GetFeed]. +// Request message for [FeedService.GetFeed][google.ads.googleads.v1.services.FeedService.GetFeed]. message GetFeedRequest { - // The resource name of the feed to fetch. - string resource_name = 1; + // Required. The resource name of the feed to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; } -// Request message for -// [FeedService.MutateFeeds][google.ads.googleads.v1.services.FeedService.MutateFeeds]. +// Request message for [FeedService.MutateFeeds][google.ads.googleads.v1.services.FeedService.MutateFeeds]. message MutateFeedsRequest { - // The ID of the customer whose feeds are being modified. - string customer_id = 1; + // Required. The ID of the customer whose feeds are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual feeds. - repeated FeedOperation operations = 2; + // Required. The list of operations to perform on individual feeds. + repeated FeedOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/gender_view_service.proto b/google/ads/googleads/v1/services/gender_view_service.proto index 51c08635a..fc6b3db21 100644 --- a/google/ads/googleads/v1/services/gender_view_service.proto +++ b/google/ads/googleads/v1/services/gender_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/gender_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage gender views. service GenderViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested gender view in full detail. - rpc GetGenderView(GetGenderViewRequest) - returns (google.ads.googleads.v1.resources.GenderView) { + rpc GetGenderView(GetGenderViewRequest) returns (google.ads.googleads.v1.resources.GenderView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/genderViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [GenderViewService.GetGenderView][google.ads.googleads.v1.services.GenderViewService.GetGenderView]. +// Request message for [GenderViewService.GetGenderView][google.ads.googleads.v1.services.GenderViewService.GetGenderView]. message GetGenderViewRequest { - // The resource name of the gender view to fetch. - string resource_name = 1; + // Required. The resource name of the gender view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GenderView" + } + ]; } diff --git a/google/ads/googleads/v1/services/geo_target_constant_service.proto b/google/ads/googleads/v1/services/geo_target_constant_service.proto index ce79e7ad1..f403dec83 100644 --- a/google/ads/googleads/v1/services/geo_target_constant_service.proto +++ b/google/ads/googleads/v1/services/geo_target_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/geo_target_constant.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -34,17 +36,18 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch geo target constants. service GeoTargetConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested geo target constant in full detail. - rpc GetGeoTargetConstant(GetGeoTargetConstantRequest) - returns (google.ads.googleads.v1.resources.GeoTargetConstant) { + rpc GetGeoTargetConstant(GetGeoTargetConstantRequest) returns (google.ads.googleads.v1.resources.GeoTargetConstant) { option (google.api.http) = { get: "/v1/{resource_name=geoTargetConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } // Returns GeoTargetConstant suggestions by location name or by resource name. - rpc SuggestGeoTargetConstants(SuggestGeoTargetConstantsRequest) - returns (SuggestGeoTargetConstantsResponse) { + rpc SuggestGeoTargetConstants(SuggestGeoTargetConstantsRequest) returns (SuggestGeoTargetConstantsResponse) { option (google.api.http) = { post: "/v1/geoTargetConstants:suggest" body: "*" @@ -52,11 +55,15 @@ service GeoTargetConstantService { } } -// Request message for -// [GeoTargetConstantService.GetGeoTargetConstant][google.ads.googleads.v1.services.GeoTargetConstantService.GetGeoTargetConstant]. +// Request message for [GeoTargetConstantService.GetGeoTargetConstant][google.ads.googleads.v1.services.GeoTargetConstantService.GetGeoTargetConstant]. message GetGeoTargetConstantRequest { - // The resource name of the geo target constant to fetch. - string resource_name = 1; + // Required. The resource name of the geo target constant to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + } + ]; } // Request message for @@ -92,8 +99,7 @@ message SuggestGeoTargetConstantsRequest { } } -// Response message for -// [GeoTargetConstantService.SuggestGeoTargetConstants][google.ads.googleads.v1.services.GeoTargetConstantService.SuggestGeoTargetConstants] +// Response message for [GeoTargetConstantService.SuggestGeoTargetConstants][google.ads.googleads.v1.services.GeoTargetConstantService.SuggestGeoTargetConstants] message SuggestGeoTargetConstantsResponse { // Geo target constant suggestions. repeated GeoTargetConstantSuggestion geo_target_constant_suggestions = 1; @@ -119,6 +125,5 @@ message GeoTargetConstantSuggestion { google.ads.googleads.v1.resources.GeoTargetConstant geo_target_constant = 4; // The list of parents of the geo target constant. - repeated google.ads.googleads.v1.resources.GeoTargetConstant - geo_target_constant_parents = 5; + repeated google.ads.googleads.v1.resources.GeoTargetConstant geo_target_constant_parents = 5; } diff --git a/google/ads/googleads/v1/services/geographic_view_service.proto b/google/ads/googleads/v1/services/geographic_view_service.proto index f30ab4287..ef25b2bd6 100644 --- a/google/ads/googleads/v1/services/geographic_view_service.proto +++ b/google/ads/googleads/v1/services/geographic_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/geographic_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage geographic views. service GeographicViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested geographic view in full detail. - rpc GetGeographicView(GetGeographicViewRequest) - returns (google.ads.googleads.v1.resources.GeographicView) { + rpc GetGeographicView(GetGeographicViewRequest) returns (google.ads.googleads.v1.resources.GeographicView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/geographicViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [GeographicViewService.GetGeographicView][google.ads.googleads.v1.services.GeographicViewService.GetGeographicView]. +// Request message for [GeographicViewService.GetGeographicView][google.ads.googleads.v1.services.GeographicViewService.GetGeographicView]. message GetGeographicViewRequest { - // The resource name of the geographic view to fetch. - string resource_name = 1; + // Required. The resource name of the geographic view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeographicView" + } + ]; } diff --git a/google/ads/googleads/v1/services/google_ads_field_service.proto b/google/ads/googleads/v1/services/google_ads_field_service.proto index 1bf9a6159..8a8c5cc68 100644 --- a/google/ads/googleads/v1/services/google_ads_field_service.proto +++ b/google/ads/googleads/v1/services/google_ads_field_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/google_ads_field.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,36 +35,41 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch Google Ads API fields. service GoogleAdsFieldService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns just the requested field. - rpc GetGoogleAdsField(GetGoogleAdsFieldRequest) - returns (google.ads.googleads.v1.resources.GoogleAdsField) { + rpc GetGoogleAdsField(GetGoogleAdsFieldRequest) returns (google.ads.googleads.v1.resources.GoogleAdsField) { option (google.api.http) = { get: "/v1/{resource_name=googleAdsFields/*}" }; + option (google.api.method_signature) = "resource_name"; } // Returns all fields that match the search query. - rpc SearchGoogleAdsFields(SearchGoogleAdsFieldsRequest) - returns (SearchGoogleAdsFieldsResponse) { + rpc SearchGoogleAdsFields(SearchGoogleAdsFieldsRequest) returns (SearchGoogleAdsFieldsResponse) { option (google.api.http) = { post: "/v1/googleAdsFields:search" body: "*" }; + option (google.api.method_signature) = "query"; } } -// Request message for -// [GoogleAdsFieldService.GetGoogleAdsField][google.ads.googleads.v1.services.GoogleAdsFieldService.GetGoogleAdsField]. +// Request message for [GoogleAdsFieldService.GetGoogleAdsField][google.ads.googleads.v1.services.GoogleAdsFieldService.GetGoogleAdsField]. message GetGoogleAdsFieldRequest { - // The resource name of the field to get. - string resource_name = 1; + // Required. The resource name of the field to get. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GoogleAdsField" + } + ]; } -// Request message for -// [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v1.services.GoogleAdsFieldService.SearchGoogleAdsFields]. +// Request message for [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v1.services.GoogleAdsFieldService.SearchGoogleAdsFields]. message SearchGoogleAdsFieldsRequest { - // The query string. - string query = 1; + // Required. The query string. + string query = 1 [(google.api.field_behavior) = REQUIRED]; // Token of the page to retrieve. If not specified, the first page of // results will be returned. Use the value obtained from `next_page_token` @@ -75,8 +82,7 @@ message SearchGoogleAdsFieldsRequest { int32 page_size = 3; } -// Response message for -// [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v1.services.GoogleAdsFieldService.SearchGoogleAdsFields]. +// Response message for [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v1.services.GoogleAdsFieldService.SearchGoogleAdsFields]. message SearchGoogleAdsFieldsResponse { // The list of fields that matched the query. repeated google.ads.googleads.v1.resources.GoogleAdsField results = 1; diff --git a/google/ads/googleads/v1/services/google_ads_service.proto b/google/ads/googleads/v1/services/google_ads_service.proto index 92cc352e8..6aefc793f 100644 --- a/google/ads/googleads/v1/services/google_ads_service.proto +++ b/google/ads/googleads/v1/services/google_ads_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -152,6 +151,8 @@ import "google/ads/googleads/v1/services/shared_criterion_service.proto"; import "google/ads/googleads/v1/services/shared_set_service.proto"; import "google/ads/googleads/v1/services/user_list_service.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; @@ -168,12 +169,15 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch data and metrics across resources. service GoogleAdsService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns all rows that match the search query. rpc Search(SearchGoogleAdsRequest) returns (SearchGoogleAdsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/googleAds:search" body: "*" }; + option (google.api.method_signature) = "customer_id,query"; } // Creates, updates, or removes resources. This method supports atomic @@ -183,9 +187,10 @@ service GoogleAdsService { // // This method is essentially a wrapper around a series of mutate methods. The // only features it offers over calling those methods directly are: + // // - Atomic transactions // - Temp resource names (described below) - // - Somewhat reduced latency over making a series of mutate calls. + // - Somewhat reduced latency over making a series of mutate calls // // Note: Only resources that support atomic transactions are included, so this // method can't replace all calls to individual services. @@ -201,15 +206,16 @@ service GoogleAdsService { // // Temp resource names are a special type of resource name used to create a // resource and reference that resource in the same request. For example, if a - // campaign budget is created with 'resource_name' equal to - // 'customers/123/campaignBudgets/-1', that resource name can be reused in - // the 'Campaign.budget' field in the same request. That way, the two + // campaign budget is created with `resource_name` equal to + // `customers/123/campaignBudgets/-1`, that resource name can be reused in + // the `Campaign.budget` field in the same request. That way, the two // resources are created and linked atomically. // // To create a temp resource name, put a negative number in the part of the // name that the server would normally allocate. // // Note: + // // - Resources must be created with a temp name before the name can be reused. // For example, the previous CampaignBudget+Campaign example would fail if // the mutate order was reversed. @@ -230,17 +236,17 @@ service GoogleAdsService { post: "/v1/customers/{customer_id=*}/googleAds:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,mutate_operations"; } } -// Request message for -// [GoogleAdsService.Search][google.ads.googleads.v1.services.GoogleAdsService.Search]. +// Request message for [GoogleAdsService.Search][google.ads.googleads.v1.services.GoogleAdsService.Search]. message SearchGoogleAdsRequest { - // The ID of the customer being queried. - string customer_id = 1; + // Required. The ID of the customer being queried. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The query string. - string query = 2; + // Required. The query string. + string query = 2 [(google.api.field_behavior) = REQUIRED]; // Token of the page to retrieve. If not specified, the first // page of results will be returned. Use the value obtained from @@ -257,8 +263,7 @@ message SearchGoogleAdsRequest { bool validate_only = 5; } -// Response message for -// [GoogleAdsService.Search][google.ads.googleads.v1.services.GoogleAdsService.Search]. +// Response message for [GoogleAdsService.Search][google.ads.googleads.v1.services.GoogleAdsService.Search]. message SearchGoogleAdsResponse { // The list of rows that matched the query. repeated GoogleAdsRow results = 1; @@ -283,8 +288,7 @@ message GoogleAdsRow { google.ads.googleads.v1.resources.AccountBudget account_budget = 42; // The account budget proposal referenced in the query. - google.ads.googleads.v1.resources.AccountBudgetProposal - account_budget_proposal = 43; + google.ads.googleads.v1.resources.AccountBudgetProposal account_budget_proposal = 43; // The ad group referenced in the query. google.ads.googleads.v1.resources.AdGroup ad_group = 3; @@ -296,27 +300,22 @@ message GoogleAdsRow { google.ads.googleads.v1.resources.AdGroupAdLabel ad_group_ad_label = 120; // The ad group audience view referenced in the query. - google.ads.googleads.v1.resources.AdGroupAudienceView ad_group_audience_view = - 57; + google.ads.googleads.v1.resources.AdGroupAudienceView ad_group_audience_view = 57; // The bid modifier referenced in the query. - google.ads.googleads.v1.resources.AdGroupBidModifier ad_group_bid_modifier = - 24; + google.ads.googleads.v1.resources.AdGroupBidModifier ad_group_bid_modifier = 24; // The criterion referenced in the query. google.ads.googleads.v1.resources.AdGroupCriterion ad_group_criterion = 17; // The ad group criterion label referenced in the query. - google.ads.googleads.v1.resources.AdGroupCriterionLabel - ad_group_criterion_label = 121; + google.ads.googleads.v1.resources.AdGroupCriterionLabel ad_group_criterion_label = 121; // The ad group criterion simulation referenced in the query. - google.ads.googleads.v1.resources.AdGroupCriterionSimulation - ad_group_criterion_simulation = 110; + google.ads.googleads.v1.resources.AdGroupCriterionSimulation ad_group_criterion_simulation = 110; // The ad group extension setting referenced in the query. - google.ads.googleads.v1.resources.AdGroupExtensionSetting - ad_group_extension_setting = 112; + google.ads.googleads.v1.resources.AdGroupExtensionSetting ad_group_extension_setting = 112; // The ad group feed referenced in the query. google.ads.googleads.v1.resources.AdGroupFeed ad_group_feed = 67; @@ -355,19 +354,16 @@ message GoogleAdsRow { google.ads.googleads.v1.resources.Campaign campaign = 2; // The campaign audience view referenced in the query. - google.ads.googleads.v1.resources.CampaignAudienceView - campaign_audience_view = 69; + google.ads.googleads.v1.resources.CampaignAudienceView campaign_audience_view = 69; // The campaign bid modifier referenced in the query. - google.ads.googleads.v1.resources.CampaignBidModifier campaign_bid_modifier = - 26; + google.ads.googleads.v1.resources.CampaignBidModifier campaign_bid_modifier = 26; // The campaign criterion referenced in the query. google.ads.googleads.v1.resources.CampaignCriterion campaign_criterion = 20; // The campaign criterion simulation referenced in the query. - google.ads.googleads.v1.resources.CampaignCriterionSimulation - campaign_criterion_simulation = 111; + google.ads.googleads.v1.resources.CampaignCriterionSimulation campaign_criterion_simulation = 111; // The campaign draft referenced in the query. google.ads.googleads.v1.resources.CampaignDraft campaign_draft = 49; @@ -376,8 +372,7 @@ message GoogleAdsRow { google.ads.googleads.v1.resources.CampaignExperiment campaign_experiment = 84; // The campaign extension setting referenced in the query. - google.ads.googleads.v1.resources.CampaignExtensionSetting - campaign_extension_setting = 113; + google.ads.googleads.v1.resources.CampaignExtensionSetting campaign_extension_setting = 113; // The campaign feed referenced in the query. google.ads.googleads.v1.resources.CampaignFeed campaign_feed = 63; @@ -407,19 +402,16 @@ message GoogleAdsRow { google.ads.googleads.v1.resources.Customer customer = 1; // The CustomerManagerLink referenced in the query. - google.ads.googleads.v1.resources.CustomerManagerLink customer_manager_link = - 61; + google.ads.googleads.v1.resources.CustomerManagerLink customer_manager_link = 61; // The CustomerClientLink referenced in the query. - google.ads.googleads.v1.resources.CustomerClientLink customer_client_link = - 62; + google.ads.googleads.v1.resources.CustomerClientLink customer_client_link = 62; // The CustomerClient referenced in the query. google.ads.googleads.v1.resources.CustomerClient customer_client = 70; // The customer extension setting referenced in the query. - google.ads.googleads.v1.resources.CustomerExtensionSetting - customer_extension_setting = 114; + google.ads.googleads.v1.resources.CustomerExtensionSetting customer_extension_setting = 114; // The customer feed referenced in the query. google.ads.googleads.v1.resources.CustomerFeed customer_feed = 64; @@ -428,24 +420,19 @@ message GoogleAdsRow { google.ads.googleads.v1.resources.CustomerLabel customer_label = 124; // The customer negative criterion referenced in the query. - google.ads.googleads.v1.resources.CustomerNegativeCriterion - customer_negative_criterion = 88; + google.ads.googleads.v1.resources.CustomerNegativeCriterion customer_negative_criterion = 88; // The detail placement view referenced in the query. - google.ads.googleads.v1.resources.DetailPlacementView detail_placement_view = - 118; + google.ads.googleads.v1.resources.DetailPlacementView detail_placement_view = 118; // The display keyword view referenced in the query. - google.ads.googleads.v1.resources.DisplayKeywordView display_keyword_view = - 47; + google.ads.googleads.v1.resources.DisplayKeywordView display_keyword_view = 47; // The dynamic search ads search term view referenced in the query. - google.ads.googleads.v1.resources.DynamicSearchAdsSearchTermView - dynamic_search_ads_search_term_view = 106; + google.ads.googleads.v1.resources.DynamicSearchAdsSearchTermView dynamic_search_ads_search_term_view = 106; // The expanded landing page view referenced in the query. - google.ads.googleads.v1.resources.ExpandedLandingPageView - expanded_landing_page_view = 128; + google.ads.googleads.v1.resources.ExpandedLandingPageView expanded_landing_page_view = 128; // The extension feed item referenced in the query. google.ads.googleads.v1.resources.ExtensionFeedItem extension_feed_item = 85; @@ -463,8 +450,7 @@ message GoogleAdsRow { google.ads.googleads.v1.resources.FeedMapping feed_mapping = 58; // The feed placeholder view referenced in the query. - google.ads.googleads.v1.resources.FeedPlaceholderView feed_placeholder_view = - 97; + google.ads.googleads.v1.resources.FeedPlaceholderView feed_placeholder_view = 97; // The gender view referenced in the query. google.ads.googleads.v1.resources.GenderView gender_view = 40; @@ -476,15 +462,13 @@ message GoogleAdsRow { google.ads.googleads.v1.resources.GeographicView geographic_view = 125; // The group placement view referenced in the query. - google.ads.googleads.v1.resources.GroupPlacementView group_placement_view = - 119; + google.ads.googleads.v1.resources.GroupPlacementView group_placement_view = 119; // The hotel group view referenced in the query. google.ads.googleads.v1.resources.HotelGroupView hotel_group_view = 51; // The hotel performance view referenced in the query. - google.ads.googleads.v1.resources.HotelPerformanceView - hotel_performance_view = 71; + google.ads.googleads.v1.resources.HotelPerformanceView hotel_performance_view = 71; // The keyword view referenced in the query. google.ads.googleads.v1.resources.KeywordView keyword_view = 21; @@ -493,20 +477,16 @@ message GoogleAdsRow { google.ads.googleads.v1.resources.KeywordPlan keyword_plan = 32; // The keyword plan campaign referenced in the query. - google.ads.googleads.v1.resources.KeywordPlanCampaign keyword_plan_campaign = - 33; + google.ads.googleads.v1.resources.KeywordPlanCampaign keyword_plan_campaign = 33; // The keyword plan negative keyword referenced in the query. - google.ads.googleads.v1.resources.KeywordPlanNegativeKeyword - keyword_plan_negative_keyword = 34; + google.ads.googleads.v1.resources.KeywordPlanNegativeKeyword keyword_plan_negative_keyword = 34; // The keyword plan ad group referenced in the query. - google.ads.googleads.v1.resources.KeywordPlanAdGroup keyword_plan_ad_group = - 35; + google.ads.googleads.v1.resources.KeywordPlanAdGroup keyword_plan_ad_group = 35; // The keyword plan keyword referenced in the query. - google.ads.googleads.v1.resources.KeywordPlanKeyword keyword_plan_keyword = - 36; + google.ads.googleads.v1.resources.KeywordPlanKeyword keyword_plan_keyword = 36; // The label referenced in the query. google.ads.googleads.v1.resources.Label label = 52; @@ -521,38 +501,31 @@ message GoogleAdsRow { google.ads.googleads.v1.resources.LocationView location_view = 123; // The managed placement view referenced in the query. - google.ads.googleads.v1.resources.ManagedPlacementView - managed_placement_view = 53; + google.ads.googleads.v1.resources.ManagedPlacementView managed_placement_view = 53; // The media file referenced in the query. google.ads.googleads.v1.resources.MediaFile media_file = 90; // The mobile app category constant referenced in the query. - google.ads.googleads.v1.resources.MobileAppCategoryConstant - mobile_app_category_constant = 87; + google.ads.googleads.v1.resources.MobileAppCategoryConstant mobile_app_category_constant = 87; // The mobile device constant referenced in the query. - google.ads.googleads.v1.resources.MobileDeviceConstant - mobile_device_constant = 98; + google.ads.googleads.v1.resources.MobileDeviceConstant mobile_device_constant = 98; // The mutate job referenced in the query. google.ads.googleads.v1.resources.MutateJob mutate_job = 127; // The operating system version constant referenced in the query. - google.ads.googleads.v1.resources.OperatingSystemVersionConstant - operating_system_version_constant = 86; + google.ads.googleads.v1.resources.OperatingSystemVersionConstant operating_system_version_constant = 86; // The paid organic search term view referenced in the query. - google.ads.googleads.v1.resources.PaidOrganicSearchTermView - paid_organic_search_term_view = 129; + google.ads.googleads.v1.resources.PaidOrganicSearchTermView paid_organic_search_term_view = 129; // The parental status view referenced in the query. - google.ads.googleads.v1.resources.ParentalStatusView parental_status_view = - 45; + google.ads.googleads.v1.resources.ParentalStatusView parental_status_view = 45; // The Product Bidding Category referenced in the query. - google.ads.googleads.v1.resources.ProductBiddingCategoryConstant - product_bidding_category_constant = 109; + google.ads.googleads.v1.resources.ProductBiddingCategoryConstant product_bidding_category_constant = 109; // The product group view referenced in the query. google.ads.googleads.v1.resources.ProductGroupView product_group_view = 54; @@ -570,8 +543,7 @@ message GoogleAdsRow { google.ads.googleads.v1.resources.SharedSet shared_set = 27; // The shopping performance view referenced in the query. - google.ads.googleads.v1.resources.ShoppingPerformanceView - shopping_performance_view = 117; + google.ads.googleads.v1.resources.ShoppingPerformanceView shopping_performance_view = 117; // The topic view referenced in the query. google.ads.googleads.v1.resources.TopicView topic_view = 44; @@ -598,14 +570,13 @@ message GoogleAdsRow { google.ads.googleads.v1.common.Segments segments = 102; } -// Request message for -// [GoogleAdsService.Mutate][google.ads.googleads.v1.services.GoogleAdsService.Mutate]. +// Request message for [GoogleAdsService.Mutate][google.ads.googleads.v1.services.GoogleAdsService.Mutate]. message MutateGoogleAdsRequest { - // The ID of the customer whose resources are being modified. - string customer_id = 1; + // Required. The ID of the customer whose resources are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual resources. - repeated MutateOperation mutate_operations = 2; + // Required. The list of operations to perform on individual resources. + repeated MutateOperation mutate_operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -618,12 +589,11 @@ message MutateGoogleAdsRequest { bool validate_only = 4; } -// Response message for -// [GoogleAdsService.Mutate][google.ads.googleads.v1.services.GoogleAdsService.Mutate]. +// Response message for [GoogleAdsService.Mutate][google.ads.googleads.v1.services.GoogleAdsService.Mutate]. message MutateGoogleAdsResponse { // Errors that pertain to operation failures in the partial failure mode. // Returned only when partial_failure = true and all errors occur inside the - // operations. If any errors occur outside the operations (e.g. auth errors), + // operations. If any errors occur outside the operations (e.g., auth errors), // we return an RPC level error. google.rpc.Status partial_failure_error = 3; @@ -714,8 +684,7 @@ message MutateOperation { CustomerLabelOperation customer_label_operation = 32; // A customer negative criterion mutate operation. - CustomerNegativeCriterionOperation customer_negative_criterion_operation = - 34; + CustomerNegativeCriterionOperation customer_negative_criterion_operation = 34; // A customer mutate operation. CustomerOperation customer_operation = 35; @@ -757,7 +726,7 @@ message MutateOperation { // Response message for the resource mutate. message MutateOperationResponse { - // The mutate response + // The mutate response. oneof response { // The result for the ad group ad label mutate. MutateAdGroupAdLabelResult ad_group_ad_label_result = 17; @@ -838,8 +807,7 @@ message MutateOperationResponse { MutateCustomerLabelResult customer_label_result = 32; // The result for the customer negative criterion mutate. - MutateCustomerNegativeCriteriaResult customer_negative_criterion_result = - 34; + MutateCustomerNegativeCriteriaResult customer_negative_criterion_result = 34; // The result for the customer mutate. MutateCustomerResult customer_result = 35; diff --git a/google/ads/googleads/v1/services/group_placement_view_service.proto b/google/ads/googleads/v1/services/group_placement_view_service.proto index f6071e887..e5fb3a0bd 100644 --- a/google/ads/googleads/v1/services/group_placement_view_service.proto +++ b/google/ads/googleads/v1/services/group_placement_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/group_placement_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch Group Placement views. service GroupPlacementViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested Group Placement view in full detail. - rpc GetGroupPlacementView(GetGroupPlacementViewRequest) - returns (google.ads.googleads.v1.resources.GroupPlacementView) { + rpc GetGroupPlacementView(GetGroupPlacementViewRequest) returns (google.ads.googleads.v1.resources.GroupPlacementView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/groupPlacementViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [GroupPlacementViewService.GetGroupPlacementView][google.ads.googleads.v1.services.GroupPlacementViewService.GetGroupPlacementView]. +// Request message for [GroupPlacementViewService.GetGroupPlacementView][google.ads.googleads.v1.services.GroupPlacementViewService.GetGroupPlacementView]. message GetGroupPlacementViewRequest { - // The resource name of the Group Placement view to fetch. - string resource_name = 1; + // Required. The resource name of the Group Placement view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GroupPlacementView" + } + ]; } diff --git a/google/ads/googleads/v1/services/hotel_group_view_service.proto b/google/ads/googleads/v1/services/hotel_group_view_service.proto index 745035c36..a2b9f3d61 100644 --- a/google/ads/googleads/v1/services/hotel_group_view_service.proto +++ b/google/ads/googleads/v1/services/hotel_group_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/hotel_group_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage Hotel Group Views. service HotelGroupViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested Hotel Group View in full detail. - rpc GetHotelGroupView(GetHotelGroupViewRequest) - returns (google.ads.googleads.v1.resources.HotelGroupView) { + rpc GetHotelGroupView(GetHotelGroupViewRequest) returns (google.ads.googleads.v1.resources.HotelGroupView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/hotelGroupViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [HotelGroupViewService.GetHotelGroupView][google.ads.googleads.v1.services.HotelGroupViewService.GetHotelGroupView]. +// Request message for [HotelGroupViewService.GetHotelGroupView][google.ads.googleads.v1.services.HotelGroupViewService.GetHotelGroupView]. message GetHotelGroupViewRequest { - // Resource name of the Hotel Group View to fetch. - string resource_name = 1; + // Required. Resource name of the Hotel Group View to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/HotelGroupView" + } + ]; } diff --git a/google/ads/googleads/v1/services/hotel_performance_view_service.proto b/google/ads/googleads/v1/services/hotel_performance_view_service.proto index 08344d7ec..0eaa5f956 100644 --- a/google/ads/googleads/v1/services/hotel_performance_view_service.proto +++ b/google/ads/googleads/v1/services/hotel_performance_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/hotel_performance_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage Hotel Performance Views. service HotelPerformanceViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested Hotel Performance View in full detail. - rpc GetHotelPerformanceView(GetHotelPerformanceViewRequest) - returns (google.ads.googleads.v1.resources.HotelPerformanceView) { + rpc GetHotelPerformanceView(GetHotelPerformanceViewRequest) returns (google.ads.googleads.v1.resources.HotelPerformanceView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/hotelPerformanceView}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [HotelPerformanceViewService.GetHotelPerformanceView][google.ads.googleads.v1.services.HotelPerformanceViewService.GetHotelPerformanceView]. +// Request message for [HotelPerformanceViewService.GetHotelPerformanceView][google.ads.googleads.v1.services.HotelPerformanceViewService.GetHotelPerformanceView]. message GetHotelPerformanceViewRequest { - // Resource name of the Hotel Performance View to fetch. - string resource_name = 1; + // Required. Resource name of the Hotel Performance View to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/HotelPerformanceView" + } + ]; } diff --git a/google/ads/googleads/v1/services/keyword_plan_ad_group_service.proto b/google/ads/googleads/v1/services/keyword_plan_ad_group_service.proto index b40a603b6..fcdb02d73 100644 --- a/google/ads/googleads/v1/services/keyword_plan_ad_group_service.proto +++ b/google/ads/googleads/v1/services/keyword_plan_ad_group_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/keyword_plan_ad_group.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,40 +37,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage Keyword Plan ad groups. service KeywordPlanAdGroupService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested Keyword Plan ad group in full detail. - rpc GetKeywordPlanAdGroup(GetKeywordPlanAdGroupRequest) - returns (google.ads.googleads.v1.resources.KeywordPlanAdGroup) { + rpc GetKeywordPlanAdGroup(GetKeywordPlanAdGroupRequest) returns (google.ads.googleads.v1.resources.KeywordPlanAdGroup) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/keywordPlanAdGroups/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes Keyword Plan ad groups. Operation statuses are // returned. - rpc MutateKeywordPlanAdGroups(MutateKeywordPlanAdGroupsRequest) - returns (MutateKeywordPlanAdGroupsResponse) { + rpc MutateKeywordPlanAdGroups(MutateKeywordPlanAdGroupsRequest) returns (MutateKeywordPlanAdGroupsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/keywordPlanAdGroups:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [KeywordPlanAdGroupService.GetKeywordPlanAdGroup][google.ads.googleads.v1.services.KeywordPlanAdGroupService.GetKeywordPlanAdGroup]. +// Request message for [KeywordPlanAdGroupService.GetKeywordPlanAdGroup][google.ads.googleads.v1.services.KeywordPlanAdGroupService.GetKeywordPlanAdGroup]. message GetKeywordPlanAdGroupRequest { - // The resource name of the Keyword Plan ad group to fetch. - string resource_name = 1; + // Required. The resource name of the Keyword Plan ad group to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanAdGroup" + } + ]; } -// Request message for -// [KeywordPlanAdGroupService.MutateKeywordPlanAdGroups][google.ads.googleads.v1.services.KeywordPlanAdGroupService.MutateKeywordPlanAdGroups]. +// Request message for [KeywordPlanAdGroupService.MutateKeywordPlanAdGroups][google.ads.googleads.v1.services.KeywordPlanAdGroupService.MutateKeywordPlanAdGroups]. message MutateKeywordPlanAdGroupsRequest { - // The ID of the customer whose Keyword Plan ad groups are being modified. - string customer_id = 1; + // Required. The ID of the customer whose Keyword Plan ad groups are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual Keyword Plan ad groups. - repeated KeywordPlanAdGroupOperation operations = 2; + // Required. The list of operations to perform on individual Keyword Plan ad groups. + repeated KeywordPlanAdGroupOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/keyword_plan_campaign_service.proto b/google/ads/googleads/v1/services/keyword_plan_campaign_service.proto index bb1e301ab..0d111dfc2 100644 --- a/google/ads/googleads/v1/services/keyword_plan_campaign_service.proto +++ b/google/ads/googleads/v1/services/keyword_plan_campaign_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/keyword_plan_campaign.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,40 +37,46 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage Keyword Plan campaigns. service KeywordPlanCampaignService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested Keyword Plan campaign in full detail. - rpc GetKeywordPlanCampaign(GetKeywordPlanCampaignRequest) - returns (google.ads.googleads.v1.resources.KeywordPlanCampaign) { + rpc GetKeywordPlanCampaign(GetKeywordPlanCampaignRequest) returns (google.ads.googleads.v1.resources.KeywordPlanCampaign) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/keywordPlanCampaigns/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes Keyword Plan campaigns. Operation statuses are // returned. - rpc MutateKeywordPlanCampaigns(MutateKeywordPlanCampaignsRequest) - returns (MutateKeywordPlanCampaignsResponse) { + rpc MutateKeywordPlanCampaigns(MutateKeywordPlanCampaignsRequest) returns (MutateKeywordPlanCampaignsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/keywordPlanCampaigns:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [KeywordPlanCampaignService.GetKeywordPlanCampaign][google.ads.googleads.v1.services.KeywordPlanCampaignService.GetKeywordPlanCampaign]. +// Request message for [KeywordPlanCampaignService.GetKeywordPlanCampaign][google.ads.googleads.v1.services.KeywordPlanCampaignService.GetKeywordPlanCampaign]. message GetKeywordPlanCampaignRequest { - // The resource name of the Keyword Plan campaign to fetch. - string resource_name = 1; + // Required. The resource name of the Keyword Plan campaign to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + } + ]; } // Request message for // [KeywordPlanCampaignService.MutateKeywordPlanCampaigns][google.ads.googleads.v1.services.KeywordPlanCampaignService.MutateKeywordPlanCampaigns]. message MutateKeywordPlanCampaignsRequest { - // The ID of the customer whose Keyword Plan campaigns are being modified. - string customer_id = 1; + // Required. The ID of the customer whose Keyword Plan campaigns are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual Keyword Plan campaigns. - repeated KeywordPlanCampaignOperation operations = 2; + // Required. The list of operations to perform on individual Keyword Plan campaigns. + repeated KeywordPlanCampaignOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/keyword_plan_idea_service.proto b/google/ads/googleads/v1/services/keyword_plan_idea_service.proto index f009288c1..2e9beedfe 100644 --- a/google/ads/googleads/v1/services/keyword_plan_idea_service.proto +++ b/google/ads/googleads/v1/services/keyword_plan_idea_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,7 +19,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/common/keyword_plan_common.proto"; import "google/ads/googleads/v1/enums/keyword_plan_network.proto"; import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -35,9 +36,10 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to generate keyword ideas. service KeywordPlanIdeaService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns a list of keyword ideas. - rpc GenerateKeywordIdeas(GenerateKeywordIdeasRequest) - returns (GenerateKeywordIdeaResponse) { + rpc GenerateKeywordIdeas(GenerateKeywordIdeasRequest) returns (GenerateKeywordIdeaResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}:generateKeywordIdeas" body: "*" @@ -50,17 +52,16 @@ message GenerateKeywordIdeasRequest { // The ID of the customer with the recommendation. string customer_id = 1; - // The resource name of the language to target. + // Required. The resource name of the language to target. // Required - google.protobuf.StringValue language = 7; + google.protobuf.StringValue language = 7 [(google.api.field_behavior) = REQUIRED]; // The resource names of the location to target. // Max 10 repeated google.protobuf.StringValue geo_target_constants = 8; // Targeting network. - google.ads.googleads.v1.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork - keyword_plan_network = 9; + google.ads.googleads.v1.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 9; // The type of seed to generate keyword ideas. oneof seed { @@ -112,6 +113,5 @@ message GenerateKeywordIdeaResult { google.protobuf.StringValue text = 2; // The historical metrics for the keyword - google.ads.googleads.v1.common.KeywordPlanHistoricalMetrics - keyword_idea_metrics = 3; + google.ads.googleads.v1.common.KeywordPlanHistoricalMetrics keyword_idea_metrics = 3; } diff --git a/google/ads/googleads/v1/services/keyword_plan_keyword_service.proto b/google/ads/googleads/v1/services/keyword_plan_keyword_service.proto index 63b0ced19..0c0dcdca5 100644 --- a/google/ads/googleads/v1/services/keyword_plan_keyword_service.proto +++ b/google/ads/googleads/v1/services/keyword_plan_keyword_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/keyword_plan_keyword.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,40 +37,45 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage Keyword Plan ad group keywords. service KeywordPlanKeywordService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested Keyword Plan keyword in full detail. - rpc GetKeywordPlanKeyword(GetKeywordPlanKeywordRequest) - returns (google.ads.googleads.v1.resources.KeywordPlanKeyword) { + rpc GetKeywordPlanKeyword(GetKeywordPlanKeywordRequest) returns (google.ads.googleads.v1.resources.KeywordPlanKeyword) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/keywordPlanKeywords/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes Keyword Plan keywords. Operation statuses are // returned. - rpc MutateKeywordPlanKeywords(MutateKeywordPlanKeywordsRequest) - returns (MutateKeywordPlanKeywordsResponse) { + rpc MutateKeywordPlanKeywords(MutateKeywordPlanKeywordsRequest) returns (MutateKeywordPlanKeywordsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/keywordPlanKeywords:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [KeywordPlanKeywordService.GetKeywordPlanKeyword][google.ads.googleads.v1.services.KeywordPlanKeywordService.GetKeywordPlanKeyword]. +// Request message for [KeywordPlanKeywordService.GetKeywordPlanKeyword][google.ads.googleads.v1.services.KeywordPlanKeywordService.GetKeywordPlanKeyword]. message GetKeywordPlanKeywordRequest { - // The resource name of the ad group keyword to fetch. - string resource_name = 1; + // Required. The resource name of the ad group keyword to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanKeyword" + } + ]; } -// Request message for -// [KeywordPlanKeywordService.MutateKeywordPlanKeywords][google.ads.googleads.v1.services.KeywordPlanKeywordService.MutateKeywordPlanKeywords]. +// Request message for [KeywordPlanKeywordService.MutateKeywordPlanKeywords][google.ads.googleads.v1.services.KeywordPlanKeywordService.MutateKeywordPlanKeywords]. message MutateKeywordPlanKeywordsRequest { - // The ID of the customer whose Keyword Plan keywords are being modified. - string customer_id = 1; + // Required. The ID of the customer whose Keyword Plan keywords are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual Keyword Plan keywords. - repeated KeywordPlanKeywordOperation operations = 2; + // Required. The list of operations to perform on individual Keyword Plan keywords. + repeated KeywordPlanKeywordOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/keyword_plan_negative_keyword_service.proto b/google/ads/googleads/v1/services/keyword_plan_negative_keyword_service.proto index baa1fe248..6ffc716e2 100644 --- a/google/ads/googleads/v1/services/keyword_plan_negative_keyword_service.proto +++ b/google/ads/googleads/v1/services/keyword_plan_negative_keyword_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,42 +37,48 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage Keyword Plan negative keywords. service KeywordPlanNegativeKeywordService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested plan in full detail. - rpc GetKeywordPlanNegativeKeyword(GetKeywordPlanNegativeKeywordRequest) - returns (google.ads.googleads.v1.resources.KeywordPlanNegativeKeyword) { + rpc GetKeywordPlanNegativeKeyword(GetKeywordPlanNegativeKeywordRequest) returns (google.ads.googleads.v1.resources.KeywordPlanNegativeKeyword) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/keywordPlanNegativeKeywords/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes Keyword Plan negative keywords. Operation // statuses are returned. - rpc MutateKeywordPlanNegativeKeywords( - MutateKeywordPlanNegativeKeywordsRequest) - returns (MutateKeywordPlanNegativeKeywordsResponse) { + rpc MutateKeywordPlanNegativeKeywords(MutateKeywordPlanNegativeKeywordsRequest) returns (MutateKeywordPlanNegativeKeywordsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/keywordPlanNegativeKeywords:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for // [KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword][google.ads.googleads.v1.services.KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword]. message GetKeywordPlanNegativeKeywordRequest { - // The resource name of the plan to fetch. - string resource_name = 1; + // Required. The resource name of the plan to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanNegativeKeyword" + } + ]; } // Request message for // [KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords][google.ads.googleads.v1.services.KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords]. message MutateKeywordPlanNegativeKeywordsRequest { - // The ID of the customer whose negative keywords are being modified. - string customer_id = 1; + // Required. The ID of the customer whose negative keywords are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual Keyword Plan negative + // Required. The list of operations to perform on individual Keyword Plan negative // keywords. - repeated KeywordPlanNegativeKeywordOperation operations = 2; + repeated KeywordPlanNegativeKeywordOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -104,7 +111,6 @@ message KeywordPlanNegativeKeywordOperation { // Remove operation: A resource name for the removed Keyword Plan negative // keywords expected in this format: // - // // `customers/{customer_id}/keywordPlanNegativeKeywords/{kp_negative_keyword_id}` string remove = 3; } diff --git a/google/ads/googleads/v1/services/keyword_plan_service.proto b/google/ads/googleads/v1/services/keyword_plan_service.proto index eb5b31619..9f27a3be5 100644 --- a/google/ads/googleads/v1/services/keyword_plan_service.proto +++ b/google/ads/googleads/v1/services/keyword_plan_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/common/keyword_plan_common.proto"; import "google/ads/googleads/v1/resources/keyword_plan.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; @@ -37,58 +39,63 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage keyword plans. service KeywordPlanService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested plan in full detail. - rpc GetKeywordPlan(GetKeywordPlanRequest) - returns (google.ads.googleads.v1.resources.KeywordPlan) { + rpc GetKeywordPlan(GetKeywordPlanRequest) returns (google.ads.googleads.v1.resources.KeywordPlan) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/keywordPlans/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes keyword plans. Operation statuses are // returned. - rpc MutateKeywordPlans(MutateKeywordPlansRequest) - returns (MutateKeywordPlansResponse) { + rpc MutateKeywordPlans(MutateKeywordPlansRequest) returns (MutateKeywordPlansResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/keywordPlans:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } // Returns the requested Keyword Plan forecasts. - rpc GenerateForecastMetrics(GenerateForecastMetricsRequest) - returns (GenerateForecastMetricsResponse) { + rpc GenerateForecastMetrics(GenerateForecastMetricsRequest) returns (GenerateForecastMetricsResponse) { option (google.api.http) = { post: "/v1/{keyword_plan=customers/*/keywordPlans/*}:generateForecastMetrics" body: "*" }; + option (google.api.method_signature) = "keyword_plan"; } // Returns the requested Keyword Plan historical metrics. - rpc GenerateHistoricalMetrics(GenerateHistoricalMetricsRequest) - returns (GenerateHistoricalMetricsResponse) { + rpc GenerateHistoricalMetrics(GenerateHistoricalMetricsRequest) returns (GenerateHistoricalMetricsResponse) { option (google.api.http) = { post: "/v1/{keyword_plan=customers/*/keywordPlans/*}:generateHistoricalMetrics" body: "*" }; + option (google.api.method_signature) = "keyword_plan"; } } -// Request message for -// [KeywordPlanService.GetKeywordPlan][google.ads.googleads.v1.services.KeywordPlanService.GetKeywordPlan]. +// Request message for [KeywordPlanService.GetKeywordPlan][google.ads.googleads.v1.services.KeywordPlanService.GetKeywordPlan]. message GetKeywordPlanRequest { - // The resource name of the plan to fetch. - string resource_name = 1; + // Required. The resource name of the plan to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlan" + } + ]; } -// Request message for -// [KeywordPlanService.MutateKeywordPlans][google.ads.googleads.v1.services.KeywordPlanService.MutateKeywordPlans]. +// Request message for [KeywordPlanService.MutateKeywordPlans][google.ads.googleads.v1.services.KeywordPlanService.MutateKeywordPlans]. message MutateKeywordPlansRequest { - // The ID of the customer whose keyword plans are being modified. - string customer_id = 1; + // Required. The ID of the customer whose keyword plans are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual keyword plans. - repeated KeywordPlanOperation operations = 2; + // Required. The list of operations to perform on individual keyword plans. + repeated KeywordPlanOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -142,15 +149,13 @@ message MutateKeywordPlansResult { string resource_name = 1; } -// Request message for -// [KeywordPlanService.GenerateForecastMetrics][google.ads.googleads.v1.services.KeywordPlanService.GenerateForecastMetrics]. +// Request message for [KeywordPlanService.GenerateForecastMetrics][google.ads.googleads.v1.services.KeywordPlanService.GenerateForecastMetrics]. message GenerateForecastMetricsRequest { - // The resource name of the keyword plan to be forecasted. - string keyword_plan = 1; + // Required. The resource name of the keyword plan to be forecasted. + string keyword_plan = 1 [(google.api.field_behavior) = REQUIRED]; } -// Response message for -// [KeywordPlanService.GenerateForecastMetrics][google.ads.googleads.v1.services.KeywordPlanService.GenerateForecastMetrics]. +// Response message for [KeywordPlanService.GenerateForecastMetrics][google.ads.googleads.v1.services.KeywordPlanService.GenerateForecastMetrics]. message GenerateForecastMetricsResponse { // List of campaign forecasts. // One maximum. @@ -189,7 +194,6 @@ message KeywordPlanAdGroupForecast { message KeywordPlanKeywordForecast { // The resource name of the Keyword Plan keyword related to the forecast. // - // // `customers/{customer_id}/keywordPlanAdGroupKeywords/{keyword_plan_ad_group_keyword_id}` google.protobuf.StringValue keyword_plan_ad_group_keyword = 1; @@ -215,16 +219,14 @@ message ForecastMetrics { google.protobuf.Int64Value cost_micros = 6; } -// Request message for -// [KeywordPlanService.GenerateHistoricalMetrics][google.ads.googleads.v1.services.KeywordPlanService.GenerateHistoricalMetrics]. +// Request message for [KeywordPlanService.GenerateHistoricalMetrics][google.ads.googleads.v1.services.KeywordPlanService.GenerateHistoricalMetrics]. message GenerateHistoricalMetricsRequest { - // The resource name of the keyword plan of which historical metrics are + // Required. The resource name of the keyword plan of which historical metrics are // requested. - string keyword_plan = 1; + string keyword_plan = 1 [(google.api.field_behavior) = REQUIRED]; } -// Response message for -// [KeywordPlanService.GenerateHistoricalMetrics][google.ads.googleads.v1.services.KeywordPlanService.GenerateHistoricalMetrics]. +// Response message for [KeywordPlanService.GenerateHistoricalMetrics][google.ads.googleads.v1.services.KeywordPlanService.GenerateHistoricalMetrics]. message GenerateHistoricalMetricsResponse { // List of keyword historical metrics. repeated KeywordPlanKeywordHistoricalMetrics metrics = 1; @@ -243,6 +245,5 @@ message KeywordPlanKeywordHistoricalMetrics { // The historical metrics for the query associated with one or more // ad_group_keywords in the plan. - google.ads.googleads.v1.common.KeywordPlanHistoricalMetrics keyword_metrics = - 2; + google.ads.googleads.v1.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; } diff --git a/google/ads/googleads/v1/services/keyword_view_service.proto b/google/ads/googleads/v1/services/keyword_view_service.proto index 820341126..313fefc1e 100644 --- a/google/ads/googleads/v1/services/keyword_view_service.proto +++ b/google/ads/googleads/v1/services/keyword_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/keyword_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage keyword views. service KeywordViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested keyword view in full detail. - rpc GetKeywordView(GetKeywordViewRequest) - returns (google.ads.googleads.v1.resources.KeywordView) { + rpc GetKeywordView(GetKeywordViewRequest) returns (google.ads.googleads.v1.resources.KeywordView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/keywordViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [KeywordViewService.GetKeywordView][google.ads.googleads.v1.services.KeywordViewService.GetKeywordView]. +// Request message for [KeywordViewService.GetKeywordView][google.ads.googleads.v1.services.KeywordViewService.GetKeywordView]. message GetKeywordViewRequest { - // The resource name of the keyword view to fetch. - string resource_name = 1; + // Required. The resource name of the keyword view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordView" + } + ]; } diff --git a/google/ads/googleads/v1/services/label_service.proto b/google/ads/googleads/v1/services/label_service.proto index f5f6f8782..d56c619f3 100644 --- a/google/ads/googleads/v1/services/label_service.proto +++ b/google/ads/googleads/v1/services/label_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/label.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -34,12 +35,14 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage labels. service LabelService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested label in full detail. - rpc GetLabel(GetLabelRequest) - returns (google.ads.googleads.v1.resources.Label) { + rpc GetLabel(GetLabelRequest) returns (google.ads.googleads.v1.resources.Label) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/labels/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes labels. Operation statuses are returned. @@ -48,24 +51,28 @@ service LabelService { post: "/v1/customers/{customer_id=*}/labels:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [LabelService.GetLabel][google.ads.googleads.v1.services.LabelService.GetLabel]. +// Request message for [LabelService.GetLabel][google.ads.googleads.v1.services.LabelService.GetLabel]. message GetLabelRequest { - // The resource name of the label to fetch. - string resource_name = 1; + // Required. The resource name of the label to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; } -// Request message for -// [LabelService.MutateLabels][google.ads.googleads.v1.services.LabelService.MutateLabels]. +// Request message for [LabelService.MutateLabels][google.ads.googleads.v1.services.LabelService.MutateLabels]. message MutateLabelsRequest { - // ID of the customer whose labels are being modified. - string customer_id = 1; + // Required. ID of the customer whose labels are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on labels. - repeated LabelOperation operations = 2; + // Required. The list of operations to perform on labels. + repeated LabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/landing_page_view_service.proto b/google/ads/googleads/v1/services/landing_page_view_service.proto index 0d703e826..e4fadcb00 100644 --- a/google/ads/googleads/v1/services/landing_page_view_service.proto +++ b/google/ads/googleads/v1/services/landing_page_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,7 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/landing_page_view.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -34,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch landing page views. service LandingPageViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested landing page view in full detail. - rpc GetLandingPageView(GetLandingPageViewRequest) - returns (google.ads.googleads.v1.resources.LandingPageView) { + rpc GetLandingPageView(GetLandingPageViewRequest) returns (google.ads.googleads.v1.resources.LandingPageView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/landingPageViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [LandingPageViewService.GetLandingPageView][google.ads.googleads.v1.services.LandingPageViewService.GetLandingPageView]. +// Request message for [LandingPageViewService.GetLandingPageView][google.ads.googleads.v1.services.LandingPageViewService.GetLandingPageView]. message GetLandingPageViewRequest { - // The resource name of the landing page view to fetch. - string resource_name = 1; + // Required. The resource name of the landing page view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LandingPageView" + } + ]; } diff --git a/google/ads/googleads/v1/services/language_constant_service.proto b/google/ads/googleads/v1/services/language_constant_service.proto index cdd76ea75..c9b3f4fbd 100644 --- a/google/ads/googleads/v1/services/language_constant_service.proto +++ b/google/ads/googleads/v1/services/language_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/language_constant.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch language constants. service LanguageConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested language constant. - rpc GetLanguageConstant(GetLanguageConstantRequest) - returns (google.ads.googleads.v1.resources.LanguageConstant) { + rpc GetLanguageConstant(GetLanguageConstantRequest) returns (google.ads.googleads.v1.resources.LanguageConstant) { option (google.api.http) = { get: "/v1/{resource_name=languageConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [LanguageConstantService.GetLanguageConstant][google.ads.googleads.v1.services.LanguageConstantService.GetLanguageConstant]. +// Request message for [LanguageConstantService.GetLanguageConstant][google.ads.googleads.v1.services.LanguageConstantService.GetLanguageConstant]. message GetLanguageConstantRequest { - // Resource name of the language constant to fetch. - string resource_name = 1; + // Required. Resource name of the language constant to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LanguageConstant" + } + ]; } diff --git a/google/ads/googleads/v1/services/location_view_service.proto b/google/ads/googleads/v1/services/location_view_service.proto index a7eae73bc..1ac910f46 100644 --- a/google/ads/googleads/v1/services/location_view_service.proto +++ b/google/ads/googleads/v1/services/location_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/location_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch location views. service LocationViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested location view in full detail. - rpc GetLocationView(GetLocationViewRequest) - returns (google.ads.googleads.v1.resources.LocationView) { + rpc GetLocationView(GetLocationViewRequest) returns (google.ads.googleads.v1.resources.LocationView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/locationViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [LocationViewService.GetLocationView][google.ads.googleads.v1.services.LocationViewService.GetLocationView]. +// Request message for [LocationViewService.GetLocationView][google.ads.googleads.v1.services.LocationViewService.GetLocationView]. message GetLocationViewRequest { - // The resource name of the location view to fetch. - string resource_name = 1; + // Required. The resource name of the location view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LocationView" + } + ]; } diff --git a/google/ads/googleads/v1/services/managed_placement_view_service.proto b/google/ads/googleads/v1/services/managed_placement_view_service.proto index 49aef4d50..00f743a37 100644 --- a/google/ads/googleads/v1/services/managed_placement_view_service.proto +++ b/google/ads/googleads/v1/services/managed_placement_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/managed_placement_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage Managed Placement views. service ManagedPlacementViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested Managed Placement view in full detail. - rpc GetManagedPlacementView(GetManagedPlacementViewRequest) - returns (google.ads.googleads.v1.resources.ManagedPlacementView) { + rpc GetManagedPlacementView(GetManagedPlacementViewRequest) returns (google.ads.googleads.v1.resources.ManagedPlacementView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/managedPlacementViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [ManagedPlacementViewService.GetManagedPlacementView][google.ads.googleads.v1.services.ManagedPlacementViewService.GetManagedPlacementView]. +// Request message for [ManagedPlacementViewService.GetManagedPlacementView][google.ads.googleads.v1.services.ManagedPlacementViewService.GetManagedPlacementView]. message GetManagedPlacementViewRequest { - // The resource name of the Managed Placement View to fetch. - string resource_name = 1; + // Required. The resource name of the Managed Placement View to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ManagedPlacementView" + } + ]; } diff --git a/google/ads/googleads/v1/services/media_file_service.proto b/google/ads/googleads/v1/services/media_file_service.proto index a34073fa2..ee41ffb62 100644 --- a/google/ads/googleads/v1/services/media_file_service.proto +++ b/google/ads/googleads/v1/services/media_file_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,7 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/media_file.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -35,39 +36,44 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage media files. service MediaFileService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested media file in full detail. - rpc GetMediaFile(GetMediaFileRequest) - returns (google.ads.googleads.v1.resources.MediaFile) { + rpc GetMediaFile(GetMediaFileRequest) returns (google.ads.googleads.v1.resources.MediaFile) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/mediaFiles/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates media files. Operation statuses are returned. - rpc MutateMediaFiles(MutateMediaFilesRequest) - returns (MutateMediaFilesResponse) { + rpc MutateMediaFiles(MutateMediaFilesRequest) returns (MutateMediaFilesResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/mediaFiles:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [MediaFileService.GetMediaFile][google.ads.googleads.v1.services.MediaFileService.GetMediaFile] +// Request message for [MediaFileService.GetMediaFile][google.ads.googleads.v1.services.MediaFileService.GetMediaFile] message GetMediaFileRequest { - // The resource name of the media file to fetch. - string resource_name = 1; + // Required. The resource name of the media file to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MediaFile" + } + ]; } -// Request message for -// [MediaFileService.MutateMediaFiles][google.ads.googleads.v1.services.MediaFileService.MutateMediaFiles] +// Request message for [MediaFileService.MutateMediaFiles][google.ads.googleads.v1.services.MediaFileService.MutateMediaFiles] message MutateMediaFilesRequest { - // The ID of the customer whose media files are being modified. - string customer_id = 1; + // Required. The ID of the customer whose media files are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual media file. - repeated MediaFileOperation operations = 2; + // Required. The list of operations to perform on individual media file. + repeated MediaFileOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/merchant_center_link_service.proto b/google/ads/googleads/v1/services/merchant_center_link_service.proto index 10ea4dbd9..9eaceb7a3 100644 --- a/google/ads/googleads/v1/services/merchant_center_link_service.proto +++ b/google/ads/googleads/v1/services/merchant_center_link_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/merchant_center_link.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -35,63 +37,65 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // This service allows management of links between Google Ads and Google // Merchant Center. service MerchantCenterLinkService { - // Returns Merchant Center links available tor this customer. - rpc ListMerchantCenterLinks(ListMerchantCenterLinksRequest) - returns (ListMerchantCenterLinksResponse) { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns Merchant Center links available for this customer. + rpc ListMerchantCenterLinks(ListMerchantCenterLinksRequest) returns (ListMerchantCenterLinksResponse) { option (google.api.http) = { get: "/v1/customers/{customer_id=*}/merchantCenterLinks" }; + option (google.api.method_signature) = "customer_id"; } // Returns the Merchant Center link in full detail. - rpc GetMerchantCenterLink(GetMerchantCenterLinkRequest) - returns (google.ads.googleads.v1.resources.MerchantCenterLink) { + rpc GetMerchantCenterLink(GetMerchantCenterLinkRequest) returns (google.ads.googleads.v1.resources.MerchantCenterLink) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/merchantCenterLinks/*}" }; + option (google.api.method_signature) = "resource_name"; } // Updates status or removes a Merchant Center link. - rpc MutateMerchantCenterLink(MutateMerchantCenterLinkRequest) - returns (MutateMerchantCenterLinkResponse) { + rpc MutateMerchantCenterLink(MutateMerchantCenterLinkRequest) returns (MutateMerchantCenterLinkResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/merchantCenterLinks:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operation"; } } -// Request message for -// [MerchantCenterLinkService.ListMerchantCenterLinks][google.ads.googleads.v1.services.MerchantCenterLinkService.ListMerchantCenterLinks]. +// Request message for [MerchantCenterLinkService.ListMerchantCenterLinks][google.ads.googleads.v1.services.MerchantCenterLinkService.ListMerchantCenterLinks]. message ListMerchantCenterLinksRequest { - // The ID of the customer onto which to apply the Merchant Center link list + // Required. The ID of the customer onto which to apply the Merchant Center link list // operation. - string customer_id = 1; + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; } -// Response message for -// [MerchantCenterLinkService.ListMerchantCenterLinks][google.ads.googleads.v1.services.MerchantCenterLinkService.ListMerchantCenterLinks]. +// Response message for [MerchantCenterLinkService.ListMerchantCenterLinks][google.ads.googleads.v1.services.MerchantCenterLinkService.ListMerchantCenterLinks]. message ListMerchantCenterLinksResponse { // Merchant Center links available for the requested customer - repeated google.ads.googleads.v1.resources.MerchantCenterLink - merchant_center_links = 1; + repeated google.ads.googleads.v1.resources.MerchantCenterLink merchant_center_links = 1; } -// Request message for -// [MerchantCenterLinkService.GetMerchantCenterLink][google.ads.googleads.v1.services.MerchantCenterLinkService.GetMerchantCenterLink]. +// Request message for [MerchantCenterLinkService.GetMerchantCenterLink][google.ads.googleads.v1.services.MerchantCenterLinkService.GetMerchantCenterLink]. message GetMerchantCenterLinkRequest { - // Resource name of the Merchant Center link. - string resource_name = 1; + // Required. Resource name of the Merchant Center link. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MerchantCenterLink" + } + ]; } -// Request message for -// [MerchantCenterLinkService.MutateMerchantCenterLink][google.ads.googleads.v1.services.MerchantCenterLinkService.MutateMerchantCenterLink]. +// Request message for [MerchantCenterLinkService.MutateMerchantCenterLink][google.ads.googleads.v1.services.MerchantCenterLinkService.MutateMerchantCenterLink]. message MutateMerchantCenterLinkRequest { - // The ID of the customer being modified. - string customer_id = 1; + // Required. The ID of the customer being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The operation to perform on the link - MerchantCenterLinkOperation operation = 2; + // Required. The operation to perform on the link + MerchantCenterLinkOperation operation = 2 [(google.api.field_behavior) = REQUIRED]; } // A single update on a Merchant Center link. diff --git a/google/ads/googleads/v1/services/mobile_app_category_constant_service.proto b/google/ads/googleads/v1/services/mobile_app_category_constant_service.proto index 3cfae7aec..f5d1e1b71 100644 --- a/google/ads/googleads/v1/services/mobile_app_category_constant_service.proto +++ b/google/ads/googleads/v1/services/mobile_app_category_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/mobile_app_category_constant.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -31,18 +33,25 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch mobile app category constants. service MobileAppCategoryConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested mobile app category constant. - rpc GetMobileAppCategoryConstant(GetMobileAppCategoryConstantRequest) - returns (google.ads.googleads.v1.resources.MobileAppCategoryConstant) { + rpc GetMobileAppCategoryConstant(GetMobileAppCategoryConstantRequest) returns (google.ads.googleads.v1.resources.MobileAppCategoryConstant) { option (google.api.http) = { get: "/v1/{resource_name=mobileAppCategoryConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [MobileAppCategoryConstantService.GetMobileAppCategoryConstant][google.ads.googleads.v1.services.MobileAppCategoryConstantService.GetMobileAppCategoryConstant]. message GetMobileAppCategoryConstantRequest { - // Resource name of the mobile app category constant to fetch. - string resource_name = 1; + // Required. Resource name of the mobile app category constant to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MobileAppCategoryConstant" + } + ]; } diff --git a/google/ads/googleads/v1/services/mobile_device_constant_service.proto b/google/ads/googleads/v1/services/mobile_device_constant_service.proto index e269b404c..0e2aa8d49 100644 --- a/google/ads/googleads/v1/services/mobile_device_constant_service.proto +++ b/google/ads/googleads/v1/services/mobile_device_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/mobile_device_constant.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch mobile device constants. service MobileDeviceConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested mobile device constant in full detail. - rpc GetMobileDeviceConstant(GetMobileDeviceConstantRequest) - returns (google.ads.googleads.v1.resources.MobileDeviceConstant) { + rpc GetMobileDeviceConstant(GetMobileDeviceConstantRequest) returns (google.ads.googleads.v1.resources.MobileDeviceConstant) { option (google.api.http) = { get: "/v1/{resource_name=mobileDeviceConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [MobileDeviceConstantService.GetMobileDeviceConstant][google.ads.googleads.v1.services.MobileDeviceConstantService.GetMobileDeviceConstant]. +// Request message for [MobileDeviceConstantService.GetMobileDeviceConstant][google.ads.googleads.v1.services.MobileDeviceConstantService.GetMobileDeviceConstant]. message GetMobileDeviceConstantRequest { - // Resource name of the mobile device to fetch. - string resource_name = 1; + // Required. Resource name of the mobile device to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MobileDeviceConstant" + } + ]; } diff --git a/google/ads/googleads/v1/services/mutate_job_service.proto b/google/ads/googleads/v1/services/mutate_job_service.proto index 06dd654e7..28a49451d 100644 --- a/google/ads/googleads/v1/services/mutate_job_service.proto +++ b/google/ads/googleads/v1/services/mutate_job_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/mutate_job.proto"; import "google/ads/googleads/v1/services/google_ads_service.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/rpc/status.proto"; @@ -36,30 +38,32 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage mutate jobs. service MutateJobService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Creates a mutate job. - rpc CreateMutateJob(CreateMutateJobRequest) - returns (CreateMutateJobResponse) { + rpc CreateMutateJob(CreateMutateJobRequest) returns (CreateMutateJobResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/mutateJobs:create" body: "*" }; + option (google.api.method_signature) = "customer_id"; } // Returns the mutate job. - rpc GetMutateJob(GetMutateJobRequest) - returns (google.ads.googleads.v1.resources.MutateJob) { + rpc GetMutateJob(GetMutateJobRequest) returns (google.ads.googleads.v1.resources.MutateJob) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/mutateJobs/*}" }; + option (google.api.method_signature) = "resource_name"; } // Returns the results of the mutate job. The job must be done. // Supports standard list paging. - rpc ListMutateJobResults(ListMutateJobResultsRequest) - returns (ListMutateJobResultsResponse) { + rpc ListMutateJobResults(ListMutateJobResultsRequest) returns (ListMutateJobResultsResponse) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/mutateJobs/*}:listResults" }; + option (google.api.method_signature) = "resource_name"; } // Runs the mutate job. @@ -72,22 +76,28 @@ service MutateJobService { post: "/v1/{resource_name=customers/*/mutateJobs/*}:run" body: "*" }; + option (google.api.method_signature) = "resource_name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.ads.googleads.v1.resources.MutateJob.MutateJobMetadata" + }; } // Add operations to the mutate job. - rpc AddMutateJobOperations(AddMutateJobOperationsRequest) - returns (AddMutateJobOperationsResponse) { + rpc AddMutateJobOperations(AddMutateJobOperationsRequest) returns (AddMutateJobOperationsResponse) { option (google.api.http) = { post: "/v1/{resource_name=customers/*/mutateJobs/*}:addOperations" body: "*" }; + option (google.api.method_signature) = "resource_name,sequence_token,mutate_operations"; + option (google.api.method_signature) = "resource_name,mutate_operations"; } } // Request message for [MutateJobService.CreateMutateJobRequest][] message CreateMutateJobRequest { - // The ID of the customer for which to create a mutate job. - string customer_id = 1; + // Required. The ID of the customer for which to create a mutate job. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; } // Response message for [MutateJobService.CreateMutateJobResponse][] @@ -96,25 +106,37 @@ message CreateMutateJobResponse { string resource_name = 1; } -// Request message for -// [MutateJobService.GetMutateJob][google.ads.googleads.v1.services.MutateJobService.GetMutateJob] +// Request message for [MutateJobService.GetMutateJob][google.ads.googleads.v1.services.MutateJobService.GetMutateJob] message GetMutateJobRequest { - // The resource name of the MutateJob to get. - string resource_name = 1; + // Required. The resource name of the MutateJob to get. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; } -// Request message for -// [MutateJobService.RunMutateJob][google.ads.googleads.v1.services.MutateJobService.RunMutateJob] +// Request message for [MutateJobService.RunMutateJob][google.ads.googleads.v1.services.MutateJobService.RunMutateJob] message RunMutateJobRequest { - // The resource name of the MutateJob to run. - string resource_name = 1; + // Required. The resource name of the MutateJob to run. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; } -// Request message for -// [MutateJobService.AddMutateJobOperations][google.ads.googleads.v1.services.MutateJobService.AddMutateJobOperations] +// Request message for [MutateJobService.AddMutateJobOperations][google.ads.googleads.v1.services.MutateJobService.AddMutateJobOperations] message AddMutateJobOperationsRequest { - // The resource name of the MutateJob. - string resource_name = 1; + // Required. The resource name of the MutateJob. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; // A token used to enforce sequencing. // @@ -124,7 +146,7 @@ message AddMutateJobOperationsRequest { // response. string sequence_token = 2; - // The list of mutates being added. + // Required. The list of mutates being added. // // Operations can use negative integers as temp ids to signify dependencies // between entities created in this MutateJob. For example, a customer with @@ -133,11 +155,10 @@ message AddMutateJobOperationsRequest { // explicitly set to "customers/1234/campaigns/-1", and creating an ad group // in the second operation with the campaign field also set to // "customers/1234/campaigns/-1". - repeated MutateOperation mutate_operations = 3; + repeated MutateOperation mutate_operations = 3 [(google.api.field_behavior) = REQUIRED]; } -// Response message for -// [MutateJobService.AddMutateJobOperations][google.ads.googleads.v1.services.MutateJobService.AddMutateJobOperations] +// Response message for [MutateJobService.AddMutateJobOperations][google.ads.googleads.v1.services.MutateJobService.AddMutateJobOperations] message AddMutateJobOperationsResponse { // The total number of operations added so far for this job. int64 total_operations = 1; @@ -148,11 +169,15 @@ message AddMutateJobOperationsResponse { string next_sequence_token = 2; } -// Request message for -// [MutateJobService.ListMutateJobResults][google.ads.googleads.v1.services.MutateJobService.ListMutateJobResults]. +// Request message for [MutateJobService.ListMutateJobResults][google.ads.googleads.v1.services.MutateJobService.ListMutateJobResults]. message ListMutateJobResultsRequest { - // The resource name of the MutateJob whose results are being listed. - string resource_name = 1; + // Required. The resource name of the MutateJob whose results are being listed. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; // Token of the page to retrieve. If not specified, the first // page of results will be returned. Use the value obtained from @@ -166,8 +191,7 @@ message ListMutateJobResultsRequest { int32 page_size = 3; } -// Response message for -// [MutateJobService.ListMutateJobResults][google.ads.googleads.v1.services.MutateJobService.ListMutateJobResults]. +// Response message for [MutateJobService.ListMutateJobResults][google.ads.googleads.v1.services.MutateJobService.ListMutateJobResults]. message ListMutateJobResultsResponse { // The list of rows that matched the query. repeated MutateJobResult results = 1; diff --git a/google/ads/googleads/v1/services/operating_system_version_constant_service.proto b/google/ads/googleads/v1/services/operating_system_version_constant_service.proto index 66c447fab..78b4f5297 100644 --- a/google/ads/googleads/v1/services/operating_system_version_constant_service.proto +++ b/google/ads/googleads/v1/services/operating_system_version_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/operating_system_version_constant.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,20 +35,25 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch Operating System Version constants. service OperatingSystemVersionConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested OS version constant in full detail. - rpc GetOperatingSystemVersionConstant( - GetOperatingSystemVersionConstantRequest) - returns ( - google.ads.googleads.v1.resources.OperatingSystemVersionConstant) { + rpc GetOperatingSystemVersionConstant(GetOperatingSystemVersionConstantRequest) returns (google.ads.googleads.v1.resources.OperatingSystemVersionConstant) { option (google.api.http) = { get: "/v1/{resource_name=operatingSystemVersionConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [OperatingSystemVersionConstantService.GetOperatingSystemVersionConstant][google.ads.googleads.v1.services.OperatingSystemVersionConstantService.GetOperatingSystemVersionConstant]. message GetOperatingSystemVersionConstantRequest { - // Resource name of the OS version to fetch. - string resource_name = 1; + // Required. Resource name of the OS version to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/OperatingSystemVersionConstant" + } + ]; } diff --git a/google/ads/googleads/v1/services/paid_organic_search_term_view_service.proto b/google/ads/googleads/v1/services/paid_organic_search_term_view_service.proto index 420cc8309..8f3175839 100644 --- a/google/ads/googleads/v1/services/paid_organic_search_term_view_service.proto +++ b/google/ads/googleads/v1/services/paid_organic_search_term_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/paid_organic_search_term_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,25 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch paid organic search term views. service PaidOrganicSearchTermViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested paid organic search term view in full detail. - rpc GetPaidOrganicSearchTermView(GetPaidOrganicSearchTermViewRequest) - returns (google.ads.googleads.v1.resources.PaidOrganicSearchTermView) { + rpc GetPaidOrganicSearchTermView(GetPaidOrganicSearchTermViewRequest) returns (google.ads.googleads.v1.resources.PaidOrganicSearchTermView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/paidOrganicSearchTermViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [PaidOrganicSearchTermViewService.GetPaidOrganicSearchTermView][google.ads.googleads.v1.services.PaidOrganicSearchTermViewService.GetPaidOrganicSearchTermView]. message GetPaidOrganicSearchTermViewRequest { - // The resource name of the paid organic search term view to fetch. - string resource_name = 1; + // Required. The resource name of the paid organic search term view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/PaidOrganicSearchTermView" + } + ]; } diff --git a/google/ads/googleads/v1/services/parental_status_view_service.proto b/google/ads/googleads/v1/services/parental_status_view_service.proto index 0e4e97ea5..047ace092 100644 --- a/google/ads/googleads/v1/services/parental_status_view_service.proto +++ b/google/ads/googleads/v1/services/parental_status_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/parental_status_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage parental status views. service ParentalStatusViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested parental status view in full detail. - rpc GetParentalStatusView(GetParentalStatusViewRequest) - returns (google.ads.googleads.v1.resources.ParentalStatusView) { + rpc GetParentalStatusView(GetParentalStatusViewRequest) returns (google.ads.googleads.v1.resources.ParentalStatusView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/parentalStatusViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [ParentalStatusViewService.GetParentalStatusView][google.ads.googleads.v1.services.ParentalStatusViewService.GetParentalStatusView]. +// Request message for [ParentalStatusViewService.GetParentalStatusView][google.ads.googleads.v1.services.ParentalStatusViewService.GetParentalStatusView]. message GetParentalStatusViewRequest { - // The resource name of the parental status view to fetch. - string resource_name = 1; + // Required. The resource name of the parental status view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ParentalStatusView" + } + ]; } diff --git a/google/ads/googleads/v1/services/payments_account_service.proto b/google/ads/googleads/v1/services/payments_account_service.proto index 6633099a8..e2d540779 100644 --- a/google/ads/googleads/v1/services/payments_account_service.proto +++ b/google/ads/googleads/v1/services/payments_account_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/payments_account.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -29,32 +30,32 @@ option objc_class_prefix = "GAA"; option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services"; option ruby_package = "Google::Ads::GoogleAds::V1::Services"; -// Proto file describing the Payments account service. +// Proto file describing the payments account service. -// Service to provide Payments accounts that can be used to set up consolidated +// Service to provide payments accounts that can be used to set up consolidated // billing. service PaymentsAccountService { - // Returns all Payments accounts associated with all managers + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns all payments accounts associated with all managers // between the login customer ID and specified serving customer in the // hierarchy, inclusive. - rpc ListPaymentsAccounts(ListPaymentsAccountsRequest) - returns (ListPaymentsAccountsResponse) { + rpc ListPaymentsAccounts(ListPaymentsAccountsRequest) returns (ListPaymentsAccountsResponse) { option (google.api.http) = { get: "/v1/customers/{customer_id=*}/paymentsAccounts" }; + option (google.api.method_signature) = "customer_id"; } } -// Request message for fetching all accessible Payments accounts. +// Request message for fetching all accessible payments accounts. message ListPaymentsAccountsRequest { - // The ID of the customer to apply the PaymentsAccount list operation to. - string customer_id = 1; + // Required. The ID of the customer to apply the PaymentsAccount list operation to. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; } -// Response message for -// [PaymentsAccountService.ListPaymentsAccounts][google.ads.googleads.v1.services.PaymentsAccountService.ListPaymentsAccounts]. +// Response message for [PaymentsAccountService.ListPaymentsAccounts][google.ads.googleads.v1.services.PaymentsAccountService.ListPaymentsAccounts]. message ListPaymentsAccountsResponse { - // The list of accessible Payments accounts. - repeated google.ads.googleads.v1.resources.PaymentsAccount payments_accounts = - 1; + // The list of accessible payments accounts. + repeated google.ads.googleads.v1.resources.PaymentsAccount payments_accounts = 1; } diff --git a/google/ads/googleads/v1/services/product_bidding_category_constant_service.proto b/google/ads/googleads/v1/services/product_bidding_category_constant_service.proto index f51258df1..6adcc3ab6 100644 --- a/google/ads/googleads/v1/services/product_bidding_category_constant_service.proto +++ b/google/ads/googleads/v1/services/product_bidding_category_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/product_bidding_category_constant.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,20 +35,25 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch Product Bidding Categories. service ProductBiddingCategoryConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested Product Bidding Category in full detail. - rpc GetProductBiddingCategoryConstant( - GetProductBiddingCategoryConstantRequest) - returns ( - google.ads.googleads.v1.resources.ProductBiddingCategoryConstant) { + rpc GetProductBiddingCategoryConstant(GetProductBiddingCategoryConstantRequest) returns (google.ads.googleads.v1.resources.ProductBiddingCategoryConstant) { option (google.api.http) = { get: "/v1/{resource_name=productBiddingCategoryConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [ProductBiddingCategoryService.GetProductBiddingCategory][]. message GetProductBiddingCategoryConstantRequest { - // Resource name of the Product Bidding Category to fetch. - string resource_name = 1; + // Required. Resource name of the Product Bidding Category to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ProductBiddingCategoryConstant" + } + ]; } diff --git a/google/ads/googleads/v1/services/product_group_view_service.proto b/google/ads/googleads/v1/services/product_group_view_service.proto index 041afda91..c76997857 100644 --- a/google/ads/googleads/v1/services/product_group_view_service.proto +++ b/google/ads/googleads/v1/services/product_group_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/product_group_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage product group views. service ProductGroupViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested product group view in full detail. - rpc GetProductGroupView(GetProductGroupViewRequest) - returns (google.ads.googleads.v1.resources.ProductGroupView) { + rpc GetProductGroupView(GetProductGroupViewRequest) returns (google.ads.googleads.v1.resources.ProductGroupView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/productGroupViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [ProductGroupViewService.GetProductGroupView][google.ads.googleads.v1.services.ProductGroupViewService.GetProductGroupView]. +// Request message for [ProductGroupViewService.GetProductGroupView][google.ads.googleads.v1.services.ProductGroupViewService.GetProductGroupView]. message GetProductGroupViewRequest { - // The resource name of the product group view to fetch. - string resource_name = 1; + // Required. The resource name of the product group view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ProductGroupView" + } + ]; } diff --git a/google/ads/googleads/v1/services/recommendation_service.proto b/google/ads/googleads/v1/services/recommendation_service.proto index b94934cab..676bc332e 100644 --- a/google/ads/googleads/v1/services/recommendation_service.proto +++ b/google/ads/googleads/v1/services/recommendation_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -22,6 +21,9 @@ import "google/ads/googleads/v1/enums/keyword_match_type.proto"; import "google/ads/googleads/v1/resources/ad.proto"; import "google/ads/googleads/v1/resources/recommendation.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; @@ -38,50 +40,55 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage recommendations. service RecommendationService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested recommendation in full detail. - rpc GetRecommendation(GetRecommendationRequest) - returns (google.ads.googleads.v1.resources.Recommendation) { + rpc GetRecommendation(GetRecommendationRequest) returns (google.ads.googleads.v1.resources.Recommendation) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/recommendations/*}" }; + option (google.api.method_signature) = "resource_name"; } // Applies given recommendations with corresponding apply parameters. - rpc ApplyRecommendation(ApplyRecommendationRequest) - returns (ApplyRecommendationResponse) { + rpc ApplyRecommendation(ApplyRecommendationRequest) returns (ApplyRecommendationResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/recommendations:apply" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } // Dismisses given recommendations. - rpc DismissRecommendation(DismissRecommendationRequest) - returns (DismissRecommendationResponse) { + rpc DismissRecommendation(DismissRecommendationRequest) returns (DismissRecommendationResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/recommendations:dismiss" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [RecommendationService.GetRecommendation][google.ads.googleads.v1.services.RecommendationService.GetRecommendation]. +// Request message for [RecommendationService.GetRecommendation][google.ads.googleads.v1.services.RecommendationService.GetRecommendation]. message GetRecommendationRequest { - // The resource name of the recommendation to fetch. - string resource_name = 1; + // Required. The resource name of the recommendation to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Recommendation" + } + ]; } -// Request message for -// [RecommendationService.ApplyRecommendation][google.ads.googleads.v1.services.RecommendationService.ApplyRecommendation]. +// Request message for [RecommendationService.ApplyRecommendation][google.ads.googleads.v1.services.RecommendationService.ApplyRecommendation]. message ApplyRecommendationRequest { - // The ID of the customer with the recommendation. - string customer_id = 1; + // Required. The ID of the customer with the recommendation. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to apply recommendations. + // Required. The list of operations to apply recommendations. // If partial_failure=false all recommendations should be of the same type // There is a limit of 100 operations per request. - repeated ApplyRecommendationOperation operations = 2; + repeated ApplyRecommendationOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, operations will be carried @@ -113,8 +120,7 @@ message ApplyRecommendationOperation { google.protobuf.StringValue ad_group = 1; // The match type of the keyword. This is a required field. - google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType - match_type = 2; + google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 2; // Optional, CPC bid to set for the keyword. If not set, keyword will use // bid based on bidding strategy used by target ad group. @@ -134,8 +140,7 @@ message ApplyRecommendationOperation { // Parameters to use when applying callout extension recommendation. message CalloutExtensionParameters { // Callout extensions to be added. This is a required field. - repeated google.ads.googleads.v1.common.CalloutFeedItem callout_extensions = - 1; + repeated google.ads.googleads.v1.common.CalloutFeedItem callout_extensions = 1; } // Parameters to use when applying call extension recommendation. @@ -147,8 +152,7 @@ message ApplyRecommendationOperation { // Parameters to use when applying sitelink extension recommendation. message SitelinkExtensionParameters { // Sitelink extensions to be added. This is a required field. - repeated google.ads.googleads.v1.common.SitelinkFeedItem - sitelink_extensions = 1; + repeated google.ads.googleads.v1.common.SitelinkFeedItem sitelink_extensions = 1; } // Parameters to use when applying move unused budget recommendation. @@ -191,8 +195,7 @@ message ApplyRecommendationOperation { } } -// Response message for -// [RecommendationService.ApplyRecommendation][google.ads.googleads.v1.services.RecommendationService.ApplyRecommendation]. +// Response message for [RecommendationService.ApplyRecommendation][google.ads.googleads.v1.services.RecommendationService.ApplyRecommendation]. message ApplyRecommendationResponse { // Results of operations to apply recommendations. repeated ApplyRecommendationResult results = 1; @@ -210,8 +213,7 @@ message ApplyRecommendationResult { string resource_name = 1; } -// Request message for -// [RecommendationService.DismissRecommendation][google.ads.googleads.v1.services.RecommendationService.DismissRecommendation]. +// Request message for [RecommendationService.DismissRecommendation][google.ads.googleads.v1.services.RecommendationService.DismissRecommendation]. message DismissRecommendationRequest { // Operation to dismiss a single recommendation identified by resource_name. message DismissRecommendationOperation { @@ -219,13 +221,13 @@ message DismissRecommendationRequest { string resource_name = 1; } - // The ID of the customer with the recommendation. - string customer_id = 1; + // Required. The ID of the customer with the recommendation. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to dismiss recommendations. + // Required. The list of operations to dismiss recommendations. // If partial_failure=false all recommendations should be of the same type // There is a limit of 100 operations per request. - repeated DismissRecommendationOperation operations = 3; + repeated DismissRecommendationOperation operations = 3 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, operations will be carried in a @@ -234,8 +236,7 @@ message DismissRecommendationRequest { bool partial_failure = 2; } -// Response message for -// [RecommendationService.DismissRecommendation][google.ads.googleads.v1.services.RecommendationService.DismissRecommendation]. +// Response message for [RecommendationService.DismissRecommendation][google.ads.googleads.v1.services.RecommendationService.DismissRecommendation]. message DismissRecommendationResponse { // The result of dismissing a recommendation. message DismissRecommendationResult { diff --git a/google/ads/googleads/v1/services/remarketing_action_service.proto b/google/ads/googleads/v1/services/remarketing_action_service.proto index fcd4119d1..e9c102a35 100644 --- a/google/ads/googleads/v1/services/remarketing_action_service.proto +++ b/google/ads/googleads/v1/services/remarketing_action_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/remarketing_action.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,39 +37,44 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage remarketing actions. service RemarketingActionService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested remarketing action in full detail. - rpc GetRemarketingAction(GetRemarketingActionRequest) - returns (google.ads.googleads.v1.resources.RemarketingAction) { + rpc GetRemarketingAction(GetRemarketingActionRequest) returns (google.ads.googleads.v1.resources.RemarketingAction) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/remarketingActions/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or updates remarketing actions. Operation statuses are returned. - rpc MutateRemarketingActions(MutateRemarketingActionsRequest) - returns (MutateRemarketingActionsResponse) { + rpc MutateRemarketingActions(MutateRemarketingActionsRequest) returns (MutateRemarketingActionsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/remarketingActions:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [RemarketingActionService.GetRemarketingAction][google.ads.googleads.v1.services.RemarketingActionService.GetRemarketingAction]. +// Request message for [RemarketingActionService.GetRemarketingAction][google.ads.googleads.v1.services.RemarketingActionService.GetRemarketingAction]. message GetRemarketingActionRequest { - // The resource name of the remarketing action to fetch. - string resource_name = 1; + // Required. The resource name of the remarketing action to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/RemarketingAction" + } + ]; } -// Request message for -// [RemarketingActionService.MutateRemarketingActions][google.ads.googleads.v1.services.RemarketingActionService.MutateRemarketingActions]. +// Request message for [RemarketingActionService.MutateRemarketingActions][google.ads.googleads.v1.services.RemarketingActionService.MutateRemarketingActions]. message MutateRemarketingActionsRequest { - // The ID of the customer whose remarketing actions are being modified. - string customer_id = 1; + // Required. The ID of the customer whose remarketing actions are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual remarketing actions. - repeated RemarketingActionOperation operations = 2; + // Required. The list of operations to perform on individual remarketing actions. + repeated RemarketingActionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/search_term_view_service.proto b/google/ads/googleads/v1/services/search_term_view_service.proto index 947faab8b..b32c4b0d2 100644 --- a/google/ads/googleads/v1/services/search_term_view_service.proto +++ b/google/ads/googleads/v1/services/search_term_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/search_term_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage search term views. service SearchTermViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the attributes of the requested search term view. - rpc GetSearchTermView(GetSearchTermViewRequest) - returns (google.ads.googleads.v1.resources.SearchTermView) { + rpc GetSearchTermView(GetSearchTermViewRequest) returns (google.ads.googleads.v1.resources.SearchTermView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/searchTermViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [SearchTermViewService.GetSearchTermView][google.ads.googleads.v1.services.SearchTermViewService.GetSearchTermView]. +// Request message for [SearchTermViewService.GetSearchTermView][google.ads.googleads.v1.services.SearchTermViewService.GetSearchTermView]. message GetSearchTermViewRequest { - // The resource name of the search term view to fetch. - string resource_name = 1; + // Required. The resource name of the search term view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SearchTermView" + } + ]; } diff --git a/google/ads/googleads/v1/services/shared_criterion_service.proto b/google/ads/googleads/v1/services/shared_criterion_service.proto index 2ef8b122f..39558b446 100644 --- a/google/ads/googleads/v1/services/shared_criterion_service.proto +++ b/google/ads/googleads/v1/services/shared_criterion_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,7 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/shared_criterion.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -35,39 +36,44 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage shared criteria. service SharedCriterionService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested shared criterion in full detail. - rpc GetSharedCriterion(GetSharedCriterionRequest) - returns (google.ads.googleads.v1.resources.SharedCriterion) { + rpc GetSharedCriterion(GetSharedCriterionRequest) returns (google.ads.googleads.v1.resources.SharedCriterion) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/sharedCriteria/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or removes shared criteria. Operation statuses are returned. - rpc MutateSharedCriteria(MutateSharedCriteriaRequest) - returns (MutateSharedCriteriaResponse) { + rpc MutateSharedCriteria(MutateSharedCriteriaRequest) returns (MutateSharedCriteriaResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/sharedCriteria:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [SharedCriterionService.GetSharedCriterion][google.ads.googleads.v1.services.SharedCriterionService.GetSharedCriterion]. +// Request message for [SharedCriterionService.GetSharedCriterion][google.ads.googleads.v1.services.SharedCriterionService.GetSharedCriterion]. message GetSharedCriterionRequest { - // The resource name of the shared criterion to fetch. - string resource_name = 1; + // Required. The resource name of the shared criterion to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedCriterion" + } + ]; } -// Request message for -// [SharedCriterionService.MutateSharedCriteria][google.ads.googleads.v1.services.SharedCriterionService.MutateSharedCriteria]. +// Request message for [SharedCriterionService.MutateSharedCriteria][google.ads.googleads.v1.services.SharedCriterionService.MutateSharedCriteria]. message MutateSharedCriteriaRequest { - // The ID of the customer whose shared criteria are being modified. - string customer_id = 1; + // Required. The ID of the customer whose shared criteria are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual shared criteria. - repeated SharedCriterionOperation operations = 2; + // Required. The list of operations to perform on individual shared criteria. + repeated SharedCriterionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/shared_set_service.proto b/google/ads/googleads/v1/services/shared_set_service.proto index 54d9bda7b..a5b869069 100644 --- a/google/ads/googleads/v1/services/shared_set_service.proto +++ b/google/ads/googleads/v1/services/shared_set_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/shared_set.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,39 +37,44 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage shared sets. service SharedSetService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested shared set in full detail. - rpc GetSharedSet(GetSharedSetRequest) - returns (google.ads.googleads.v1.resources.SharedSet) { + rpc GetSharedSet(GetSharedSetRequest) returns (google.ads.googleads.v1.resources.SharedSet) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/sharedSets/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes shared sets. Operation statuses are returned. - rpc MutateSharedSets(MutateSharedSetsRequest) - returns (MutateSharedSetsResponse) { + rpc MutateSharedSets(MutateSharedSetsRequest) returns (MutateSharedSetsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/sharedSets:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [SharedSetService.GetSharedSet][google.ads.googleads.v1.services.SharedSetService.GetSharedSet]. +// Request message for [SharedSetService.GetSharedSet][google.ads.googleads.v1.services.SharedSetService.GetSharedSet]. message GetSharedSetRequest { - // The resource name of the shared set to fetch. - string resource_name = 1; + // Required. The resource name of the shared set to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedSet" + } + ]; } -// Request message for -// [SharedSetService.MutateSharedSets][google.ads.googleads.v1.services.SharedSetService.MutateSharedSets]. +// Request message for [SharedSetService.MutateSharedSets][google.ads.googleads.v1.services.SharedSetService.MutateSharedSets]. message MutateSharedSetsRequest { - // The ID of the customer whose shared sets are being modified. - string customer_id = 1; + // Required. The ID of the customer whose shared sets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual shared sets. - repeated SharedSetOperation operations = 2; + // Required. The list of operations to perform on individual shared sets. + repeated SharedSetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/shopping_performance_view_service.proto b/google/ads/googleads/v1/services/shopping_performance_view_service.proto index 22b4633f2..490386ec2 100644 --- a/google/ads/googleads/v1/services/shopping_performance_view_service.proto +++ b/google/ads/googleads/v1/services/shopping_performance_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/shopping_performance_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,25 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch Shopping performance views. service ShoppingPerformanceViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested Shopping performance view in full detail. - rpc GetShoppingPerformanceView(GetShoppingPerformanceViewRequest) - returns (google.ads.googleads.v1.resources.ShoppingPerformanceView) { + rpc GetShoppingPerformanceView(GetShoppingPerformanceViewRequest) returns (google.ads.googleads.v1.resources.ShoppingPerformanceView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/shoppingPerformanceView}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [ShoppingPerformanceViewService.GetShoppingPerformanceView][google.ads.googleads.v1.services.ShoppingPerformanceViewService.GetShoppingPerformanceView]. message GetShoppingPerformanceViewRequest { - // The resource name of the Shopping performance view to fetch. - string resource_name = 1; + // Required. The resource name of the Shopping performance view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ShoppingPerformanceView" + } + ]; } diff --git a/google/ads/googleads/v1/services/topic_constant_service.proto b/google/ads/googleads/v1/services/topic_constant_service.proto index 3211fcfd9..f4710f38b 100644 --- a/google/ads/googleads/v1/services/topic_constant_service.proto +++ b/google/ads/googleads/v1/services/topic_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/topic_constant.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch topic constants. service TopicConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested topic constant in full detail. - rpc GetTopicConstant(GetTopicConstantRequest) - returns (google.ads.googleads.v1.resources.TopicConstant) { + rpc GetTopicConstant(GetTopicConstantRequest) returns (google.ads.googleads.v1.resources.TopicConstant) { option (google.api.http) = { get: "/v1/{resource_name=topicConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [TopicConstantService.GetTopicConstant][google.ads.googleads.v1.services.TopicConstantService.GetTopicConstant]. +// Request message for [TopicConstantService.GetTopicConstant][google.ads.googleads.v1.services.TopicConstantService.GetTopicConstant]. message GetTopicConstantRequest { - // Resource name of the Topic to fetch. - string resource_name = 1; + // Required. Resource name of the Topic to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/TopicConstant" + } + ]; } diff --git a/google/ads/googleads/v1/services/topic_view_service.proto b/google/ads/googleads/v1/services/topic_view_service.proto index dad38e45b..9bedae696 100644 --- a/google/ads/googleads/v1/services/topic_view_service.proto +++ b/google/ads/googleads/v1/services/topic_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/topic_view.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage topic views. service TopicViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested topic view in full detail. - rpc GetTopicView(GetTopicViewRequest) - returns (google.ads.googleads.v1.resources.TopicView) { + rpc GetTopicView(GetTopicViewRequest) returns (google.ads.googleads.v1.resources.TopicView) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/topicViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [TopicViewService.GetTopicView][google.ads.googleads.v1.services.TopicViewService.GetTopicView]. +// Request message for [TopicViewService.GetTopicView][google.ads.googleads.v1.services.TopicViewService.GetTopicView]. message GetTopicViewRequest { - // The resource name of the topic view to fetch. - string resource_name = 1; + // Required. The resource name of the topic view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/TopicView" + } + ]; } diff --git a/google/ads/googleads/v1/services/user_interest_service.proto b/google/ads/googleads/v1/services/user_interest_service.proto index 56dba8c7d..12360c74c 100644 --- a/google/ads/googleads/v1/services/user_interest_service.proto +++ b/google/ads/googleads/v1/services/user_interest_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/user_interest.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to fetch Google Ads User Interest. service UserInterestService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested user interest in full detail - rpc GetUserInterest(GetUserInterestRequest) - returns (google.ads.googleads.v1.resources.UserInterest) { + rpc GetUserInterest(GetUserInterestRequest) returns (google.ads.googleads.v1.resources.UserInterest) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/userInterests/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [UserInterestService.GetUserInterest][google.ads.googleads.v1.services.UserInterestService.GetUserInterest]. +// Request message for [UserInterestService.GetUserInterest][google.ads.googleads.v1.services.UserInterestService.GetUserInterest]. message GetUserInterestRequest { - // Resource name of the UserInterest to fetch. - string resource_name = 1; + // Required. Resource name of the UserInterest to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserInterest" + } + ]; } diff --git a/google/ads/googleads/v1/services/user_list_service.proto b/google/ads/googleads/v1/services/user_list_service.proto index 2af44cdad..3f1524585 100644 --- a/google/ads/googleads/v1/services/user_list_service.proto +++ b/google/ads/googleads/v1/services/user_list_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/user_list.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; @@ -36,39 +37,44 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage user lists. service UserListService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested user list. - rpc GetUserList(GetUserListRequest) - returns (google.ads.googleads.v1.resources.UserList) { + rpc GetUserList(GetUserListRequest) returns (google.ads.googleads.v1.resources.UserList) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/userLists/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or updates user lists. Operation statuses are returned. - rpc MutateUserLists(MutateUserListsRequest) - returns (MutateUserListsResponse) { + rpc MutateUserLists(MutateUserListsRequest) returns (MutateUserListsResponse) { option (google.api.http) = { post: "/v1/customers/{customer_id=*}/userLists:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } -// Request message for -// [UserListService.GetUserList][google.ads.googleads.v1.services.UserListService.GetUserList]. +// Request message for [UserListService.GetUserList][google.ads.googleads.v1.services.UserListService.GetUserList]. message GetUserListRequest { - // The resource name of the user list to fetch. - string resource_name = 1; + // Required. The resource name of the user list to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserList" + } + ]; } -// Request message for -// [UserListService.MutateUserLists][google.ads.googleads.v1.services.UserListService.MutateUserLists]. +// Request message for [UserListService.MutateUserLists][google.ads.googleads.v1.services.UserListService.MutateUserLists]. message MutateUserListsRequest { - // The ID of the customer whose user lists are being modified. - string customer_id = 1; + // Required. The ID of the customer whose user lists are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual user lists. - repeated UserListOperation operations = 2; + // Required. The list of operations to perform on individual user lists. + repeated UserListOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v1/services/video_service.proto b/google/ads/googleads/v1/services/video_service.proto index 5c03a6a47..b278f5e6b 100644 --- a/google/ads/googleads/v1/services/video_service.proto +++ b/google/ads/googleads/v1/services/video_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,9 @@ package google.ads.googleads.v1.services; import "google/ads/googleads/v1/resources/video.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; @@ -33,18 +35,24 @@ option ruby_package = "Google::Ads::GoogleAds::V1::Services"; // Service to manage videos. service VideoService { + option (google.api.default_host) = "googleads.googleapis.com"; + // Returns the requested video in full detail. - rpc GetVideo(GetVideoRequest) - returns (google.ads.googleads.v1.resources.Video) { + rpc GetVideo(GetVideoRequest) returns (google.ads.googleads.v1.resources.Video) { option (google.api.http) = { get: "/v1/{resource_name=customers/*/videos/*}" }; + option (google.api.method_signature) = "resource_name"; } } -// Request message for -// [VideoService.GetVideo][google.ads.googleads.v1.services.VideoService.GetVideo]. +// Request message for [VideoService.GetVideo][google.ads.googleads.v1.services.VideoService.GetVideo]. message GetVideoRequest { - // The resource name of the video to fetch. - string resource_name = 1; + // Required. The resource name of the video to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Video" + } + ]; } diff --git a/google/ads/googleads/v2/common/ad_asset.proto b/google/ads/googleads/v2/common/ad_asset.proto index 0ca6d0ace..529437adb 100644 --- a/google/ads/googleads/v2/common/ad_asset.proto +++ b/google/ads/googleads/v2/common/ad_asset.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/ad_type_infos.proto b/google/ads/googleads/v2/common/ad_type_infos.proto index e9953a80e..2cbf7325d 100644 --- a/google/ads/googleads/v2/common/ad_type_infos.proto +++ b/google/ads/googleads/v2/common/ad_type_infos.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -123,6 +122,9 @@ message CallOnlyAdInfo { message ExpandedDynamicSearchAdInfo { // The description of the ad. google.protobuf.StringValue description = 1; + + // The second description of the ad. + google.protobuf.StringValue description2 = 2; } // A hotel ad. @@ -522,7 +524,7 @@ message ResponsiveDisplayAdInfo { // least 1 and max 5 headlines can be specified. repeated AdTextAsset descriptions = 7; - // Optional YouTube vidoes for the ad. A maximum of 5 videos can be specified. + // Optional YouTube videos for the ad. A maximum of 5 videos can be specified. repeated AdVideoAsset youtube_videos = 8; // The advertiser/brand name. Maximum display width is 25. diff --git a/google/ads/googleads/v2/common/asset_types.proto b/google/ads/googleads/v2/common/asset_types.proto index 09060d766..62aea928e 100644 --- a/google/ads/googleads/v2/common/asset_types.proto +++ b/google/ads/googleads/v2/common/asset_types.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/bidding.proto b/google/ads/googleads/v2/common/bidding.proto index 016e3f3c7..a3633c633 100644 --- a/google/ads/googleads/v2/common/bidding.proto +++ b/google/ads/googleads/v2/common/bidding.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/click_location.proto b/google/ads/googleads/v2/common/click_location.proto index 79888b52c..b4e2f1b96 100644 --- a/google/ads/googleads/v2/common/click_location.proto +++ b/google/ads/googleads/v2/common/click_location.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/criteria.proto b/google/ads/googleads/v2/common/criteria.proto index b7ac1cca3..2e6ac5b24 100644 --- a/google/ads/googleads/v2/common/criteria.proto +++ b/google/ads/googleads/v2/common/criteria.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -88,10 +87,10 @@ message MobileApplicationInfo { // corresponding platform. // For iOS, this native identifier is the 9 digit string that appears at the // end of an App Store URL (e.g., "476943146" for "Flood-It! 2" whose App - // Store link is http://itunes.apple.com/us/app/flood-it!-2/id476943146). + // Store link is "http://itunes.apple.com/us/app/flood-it!-2/id476943146"). // For Android, this native identifier is the application's package name // (e.g., "com.labpixies.colordrips" for "Color Drips" given Google Play link - // https://play.google.com/store/apps/details?id=com.labpixies.colordrips). + // "https://play.google.com/store/apps/details?id=com.labpixies.colordrips"). // A well formed app id for Google Ads API would thus be "1-476943146" for iOS // and "2-com.labpixies.colordrips" for Android. // This field is required and must be set in CREATE operations. @@ -237,7 +236,7 @@ message ProductBiddingCategoryInfo { // ID of the product bidding category. // // This ID is equivalent to the google_product_category ID as described in - // this article: https://support.google.com/merchants/answer/6324436. + // this article: https://support.google.com/merchants/answer/6324436 google.protobuf.Int64Value id = 1; // Two-letter upper-case country code of the product bidding category. It must diff --git a/google/ads/googleads/v2/common/criterion_category_availability.proto b/google/ads/googleads/v2/common/criterion_category_availability.proto index f067d48c6..6f39b0fb1 100644 --- a/google/ads/googleads/v2/common/criterion_category_availability.proto +++ b/google/ads/googleads/v2/common/criterion_category_availability.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/custom_parameter.proto b/google/ads/googleads/v2/common/custom_parameter.proto index 9634fe593..ae2e9b4b2 100644 --- a/google/ads/googleads/v2/common/custom_parameter.proto +++ b/google/ads/googleads/v2/common/custom_parameter.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/dates.proto b/google/ads/googleads/v2/common/dates.proto index 6ead41507..02e82df22 100644 --- a/google/ads/googleads/v2/common/dates.proto +++ b/google/ads/googleads/v2/common/dates.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/explorer_auto_optimizer_setting.proto b/google/ads/googleads/v2/common/explorer_auto_optimizer_setting.proto index c106ea66f..7fe154cd8 100644 --- a/google/ads/googleads/v2/common/explorer_auto_optimizer_setting.proto +++ b/google/ads/googleads/v2/common/explorer_auto_optimizer_setting.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/extensions.proto b/google/ads/googleads/v2/common/extensions.proto index 9576eda73..9c5e91569 100644 --- a/google/ads/googleads/v2/common/extensions.proto +++ b/google/ads/googleads/v2/common/extensions.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -345,3 +344,14 @@ message SitelinkFeedItem { // parallel tracking. google.protobuf.StringValue final_url_suffix = 8; } + +// Represents a hotel callout extension. +message HotelCalloutFeedItem { + // The callout text. + // The length of this string should be between 1 and 25, inclusive. + google.protobuf.StringValue text = 1; + + // The language of the hotel callout text. + // IETF BCP 47 compliant language code. + google.protobuf.StringValue language_code = 2; +} diff --git a/google/ads/googleads/v2/common/feed_common.proto b/google/ads/googleads/v2/common/feed_common.proto index 39590d92d..f759bf5d2 100644 --- a/google/ads/googleads/v2/common/feed_common.proto +++ b/google/ads/googleads/v2/common/feed_common.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/final_app_url.proto b/google/ads/googleads/v2/common/final_app_url.proto index 236570085..573ce3972 100644 --- a/google/ads/googleads/v2/common/final_app_url.proto +++ b/google/ads/googleads/v2/common/final_app_url.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/frequency_cap.proto b/google/ads/googleads/v2/common/frequency_cap.proto index 9d0f575ae..f170f51f6 100644 --- a/google/ads/googleads/v2/common/frequency_cap.proto +++ b/google/ads/googleads/v2/common/frequency_cap.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/keyword_plan_common.proto b/google/ads/googleads/v2/common/keyword_plan_common.proto index 9543c582c..4134367cf 100644 --- a/google/ads/googleads/v2/common/keyword_plan_common.proto +++ b/google/ads/googleads/v2/common/keyword_plan_common.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/matching_function.proto b/google/ads/googleads/v2/common/matching_function.proto index 1596c7f38..ef0b3dad6 100644 --- a/google/ads/googleads/v2/common/matching_function.proto +++ b/google/ads/googleads/v2/common/matching_function.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/metrics.proto b/google/ads/googleads/v2/common/metrics.proto index 55a8a5cd1..8040b8e67 100644 --- a/google/ads/googleads/v2/common/metrics.proto +++ b/google/ads/googleads/v2/common/metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -294,6 +293,10 @@ message Metrics { // Average lead value of hotel. google.protobuf.DoubleValue hotel_average_lead_value_micros = 75; + // The average price difference between the price offered by reporting hotel + // advertiser and the cheapest price offered by the competing advertiser. + google.protobuf.DoubleValue hotel_price_difference_percentage = 129; + // The creative historical quality score. google.ads.googleads.v2.enums.QualityScoreBucketEnum.QualityScoreBucket historical_creative_quality_score = 80; @@ -410,7 +413,7 @@ message Metrics { // The percentage of the customer's Shopping or Search ad impressions that are // shown in the most prominent Shopping position. See - // [this article](https://support.google.com/google-ads/answer/7501826) + // https://support.google.com/google-ads/answer/7501826 // for details. Any value below 0.1 is reported as 0.0999. google.protobuf.DoubleValue search_absolute_top_impression_share = 78; diff --git a/google/ads/googleads/v2/common/policy.proto b/google/ads/googleads/v2/common/policy.proto index d96446823..2e8ea35dc 100644 --- a/google/ads/googleads/v2/common/policy.proto +++ b/google/ads/googleads/v2/common/policy.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/real_time_bidding_setting.proto b/google/ads/googleads/v2/common/real_time_bidding_setting.proto index 2869d1eb6..356ecfc71 100644 --- a/google/ads/googleads/v2/common/real_time_bidding_setting.proto +++ b/google/ads/googleads/v2/common/real_time_bidding_setting.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/segments.proto b/google/ads/googleads/v2/common/segments.proto index 8f3761a88..54d141d5a 100644 --- a/google/ads/googleads/v2/common/segments.proto +++ b/google/ads/googleads/v2/common/segments.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -28,6 +27,7 @@ import "google/ads/googleads/v2/enums/day_of_week.proto"; import "google/ads/googleads/v2/enums/device.proto"; import "google/ads/googleads/v2/enums/external_conversion_source.proto"; import "google/ads/googleads/v2/enums/hotel_date_selection_type.proto"; +import "google/ads/googleads/v2/enums/hotel_price_bucket.proto"; import "google/ads/googleads/v2/enums/hotel_rate_type.proto"; import "google/ads/googleads/v2/enums/month_of_year.proto"; import "google/ads/googleads/v2/enums/placeholder_type.proto"; @@ -169,6 +169,9 @@ message Segments { // Hotel rate type. google.ads.googleads.v2.enums.HotelRateTypeEnum.HotelRateType hotel_rate_type = 74; + // Hotel price bucket. + google.ads.googleads.v2.enums.HotelPriceBucketEnum.HotelPriceBucket hotel_price_bucket = 78; + // Hotel state. google.protobuf.StringValue hotel_state = 15; diff --git a/google/ads/googleads/v2/common/simulation.proto b/google/ads/googleads/v2/common/simulation.proto index 69a140104..2b1827898 100644 --- a/google/ads/googleads/v2/common/simulation.proto +++ b/google/ads/googleads/v2/common/simulation.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/tag_snippet.proto b/google/ads/googleads/v2/common/tag_snippet.proto index 7631d762d..3a7d47f0d 100644 --- a/google/ads/googleads/v2/common/tag_snippet.proto +++ b/google/ads/googleads/v2/common/tag_snippet.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/targeting_setting.proto b/google/ads/googleads/v2/common/targeting_setting.proto index a6a55d821..fceab364e 100644 --- a/google/ads/googleads/v2/common/targeting_setting.proto +++ b/google/ads/googleads/v2/common/targeting_setting.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/text_label.proto b/google/ads/googleads/v2/common/text_label.proto index 6c091fd5d..53e17e6e4 100644 --- a/google/ads/googleads/v2/common/text_label.proto +++ b/google/ads/googleads/v2/common/text_label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/url_collection.proto b/google/ads/googleads/v2/common/url_collection.proto index c7bc7a314..fff0df712 100644 --- a/google/ads/googleads/v2/common/url_collection.proto +++ b/google/ads/googleads/v2/common/url_collection.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/common/user_lists.proto b/google/ads/googleads/v2/common/user_lists.proto index 6e204016b..a99e78593 100644 --- a/google/ads/googleads/v2/common/user_lists.proto +++ b/google/ads/googleads/v2/common/user_lists.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -95,7 +94,7 @@ message UserListRuleItemGroupInfo { repeated UserListRuleItemInfo rule_items = 1; } -// An atomic rule fragment. +// An atomic rule item. message UserListRuleItemInfo { // Rule variable name. It should match the corresponding key name fired // by the pixel. @@ -107,20 +106,20 @@ message UserListRuleItemInfo { // This field must be populated when creating a new rule item. google.protobuf.StringValue name = 1; - // An atomic rule fragment. + // An atomic rule item. oneof rule_item { - // An atomic rule fragment composed of a number operation. + // An atomic rule item composed of a number operation. UserListNumberRuleItemInfo number_rule_item = 2; - // An atomic rule fragment composed of a string operation. + // An atomic rule item composed of a string operation. UserListStringRuleItemInfo string_rule_item = 3; - // An atomic rule fragment composed of a date operation. + // An atomic rule item composed of a date operation. UserListDateRuleItemInfo date_rule_item = 4; } } -// A rule item composed of date operation. +// A rule item composed of a date operation. message UserListDateRuleItemInfo { // Date comparison operator. // This field is required and must be populated when creating new date @@ -138,7 +137,7 @@ message UserListDateRuleItemInfo { google.protobuf.Int64Value offset_in_days = 3; } -// A rule item composed of number operation. +// A rule item composed of a number operation. message UserListNumberRuleItemInfo { // Number comparison operator. // This field is required and must be populated when creating a new number @@ -151,7 +150,7 @@ message UserListNumberRuleItemInfo { google.protobuf.DoubleValue value = 2; } -// A rule item fragment composed of date operation. +// A rule item composed of a string operation. message UserListStringRuleItemInfo { // String comparison operator. // This field is required and must be populated when creating a new string diff --git a/google/ads/googleads/v2/common/value.proto b/google/ads/googleads/v2/common/value.proto index d899fd675..0642c9228 100644 --- a/google/ads/googleads/v2/common/value.proto +++ b/google/ads/googleads/v2/common/value.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/access_reason.proto b/google/ads/googleads/v2/enums/access_reason.proto index 01f7773b1..3c456389e 100644 --- a/google/ads/googleads/v2/enums/access_reason.proto +++ b/google/ads/googleads/v2/enums/access_reason.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/access_role.proto b/google/ads/googleads/v2/enums/access_role.proto index f0c0b19fe..5e00bf68d 100644 --- a/google/ads/googleads/v2/enums/access_role.proto +++ b/google/ads/googleads/v2/enums/access_role.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/account_budget_proposal_status.proto b/google/ads/googleads/v2/enums/account_budget_proposal_status.proto index de2077435..44e5976ad 100644 --- a/google/ads/googleads/v2/enums/account_budget_proposal_status.proto +++ b/google/ads/googleads/v2/enums/account_budget_proposal_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/account_budget_proposal_type.proto b/google/ads/googleads/v2/enums/account_budget_proposal_type.proto index 91df41fa2..a2288afd0 100644 --- a/google/ads/googleads/v2/enums/account_budget_proposal_type.proto +++ b/google/ads/googleads/v2/enums/account_budget_proposal_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/account_budget_status.proto b/google/ads/googleads/v2/enums/account_budget_status.proto index d39190f48..8a17c5f94 100644 --- a/google/ads/googleads/v2/enums/account_budget_status.proto +++ b/google/ads/googleads/v2/enums/account_budget_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/ad_customizer_placeholder_field.proto b/google/ads/googleads/v2/enums/ad_customizer_placeholder_field.proto index 10ed0355c..53ecb8c04 100644 --- a/google/ads/googleads/v2/enums/ad_customizer_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/ad_customizer_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/ad_group_ad_rotation_mode.proto b/google/ads/googleads/v2/enums/ad_group_ad_rotation_mode.proto index e3ee2a9a3..f9d120b09 100644 --- a/google/ads/googleads/v2/enums/ad_group_ad_rotation_mode.proto +++ b/google/ads/googleads/v2/enums/ad_group_ad_rotation_mode.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/ad_group_ad_status.proto b/google/ads/googleads/v2/enums/ad_group_ad_status.proto index 906e6bbbb..f6656553f 100644 --- a/google/ads/googleads/v2/enums/ad_group_ad_status.proto +++ b/google/ads/googleads/v2/enums/ad_group_ad_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/ad_group_criterion_approval_status.proto b/google/ads/googleads/v2/enums/ad_group_criterion_approval_status.proto index 7add7c98e..00c6012a8 100644 --- a/google/ads/googleads/v2/enums/ad_group_criterion_approval_status.proto +++ b/google/ads/googleads/v2/enums/ad_group_criterion_approval_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/ad_group_criterion_status.proto b/google/ads/googleads/v2/enums/ad_group_criterion_status.proto index cac580ae7..5bc43a373 100644 --- a/google/ads/googleads/v2/enums/ad_group_criterion_status.proto +++ b/google/ads/googleads/v2/enums/ad_group_criterion_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/ad_group_status.proto b/google/ads/googleads/v2/enums/ad_group_status.proto index ca2191a20..318360888 100644 --- a/google/ads/googleads/v2/enums/ad_group_status.proto +++ b/google/ads/googleads/v2/enums/ad_group_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/ad_group_type.proto b/google/ads/googleads/v2/enums/ad_group_type.proto index 1bc24973a..624a8fe6e 100644 --- a/google/ads/googleads/v2/enums/ad_group_type.proto +++ b/google/ads/googleads/v2/enums/ad_group_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/ad_network_type.proto b/google/ads/googleads/v2/enums/ad_network_type.proto index 4bdb41318..9ff247713 100644 --- a/google/ads/googleads/v2/enums/ad_network_type.proto +++ b/google/ads/googleads/v2/enums/ad_network_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/ad_serving_optimization_status.proto b/google/ads/googleads/v2/enums/ad_serving_optimization_status.proto index a63903844..4b4983779 100644 --- a/google/ads/googleads/v2/enums/ad_serving_optimization_status.proto +++ b/google/ads/googleads/v2/enums/ad_serving_optimization_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/ad_strength.proto b/google/ads/googleads/v2/enums/ad_strength.proto index 1bb8b2a5b..a66d1c813 100644 --- a/google/ads/googleads/v2/enums/ad_strength.proto +++ b/google/ads/googleads/v2/enums/ad_strength.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/ad_type.proto b/google/ads/googleads/v2/enums/ad_type.proto index 4ab10599d..17415dd25 100644 --- a/google/ads/googleads/v2/enums/ad_type.proto +++ b/google/ads/googleads/v2/enums/ad_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/advertising_channel_sub_type.proto b/google/ads/googleads/v2/enums/advertising_channel_sub_type.proto index 8f9f3cf4c..f29075893 100644 --- a/google/ads/googleads/v2/enums/advertising_channel_sub_type.proto +++ b/google/ads/googleads/v2/enums/advertising_channel_sub_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/advertising_channel_type.proto b/google/ads/googleads/v2/enums/advertising_channel_type.proto index 027cdbcca..20b1de289 100644 --- a/google/ads/googleads/v2/enums/advertising_channel_type.proto +++ b/google/ads/googleads/v2/enums/advertising_channel_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/affiliate_location_feed_relationship_type.proto b/google/ads/googleads/v2/enums/affiliate_location_feed_relationship_type.proto index 8289101fb..2d3bab1c6 100644 --- a/google/ads/googleads/v2/enums/affiliate_location_feed_relationship_type.proto +++ b/google/ads/googleads/v2/enums/affiliate_location_feed_relationship_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/affiliate_location_placeholder_field.proto b/google/ads/googleads/v2/enums/affiliate_location_placeholder_field.proto index f2adb8dbe..f32fe221a 100644 --- a/google/ads/googleads/v2/enums/affiliate_location_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/affiliate_location_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/age_range_type.proto b/google/ads/googleads/v2/enums/age_range_type.proto index 8d15a5c6b..75fb0d7af 100644 --- a/google/ads/googleads/v2/enums/age_range_type.proto +++ b/google/ads/googleads/v2/enums/age_range_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/app_campaign_app_store.proto b/google/ads/googleads/v2/enums/app_campaign_app_store.proto index 49f4a88aa..cd10eda2e 100644 --- a/google/ads/googleads/v2/enums/app_campaign_app_store.proto +++ b/google/ads/googleads/v2/enums/app_campaign_app_store.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/app_campaign_bidding_strategy_goal_type.proto b/google/ads/googleads/v2/enums/app_campaign_bidding_strategy_goal_type.proto index d6dc7dcd7..4743ef355 100644 --- a/google/ads/googleads/v2/enums/app_campaign_bidding_strategy_goal_type.proto +++ b/google/ads/googleads/v2/enums/app_campaign_bidding_strategy_goal_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/app_payment_model_type.proto b/google/ads/googleads/v2/enums/app_payment_model_type.proto index f85fedd64..38e9e4189 100644 --- a/google/ads/googleads/v2/enums/app_payment_model_type.proto +++ b/google/ads/googleads/v2/enums/app_payment_model_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/app_placeholder_field.proto b/google/ads/googleads/v2/enums/app_placeholder_field.proto index 3fc34b803..d68a0c840 100644 --- a/google/ads/googleads/v2/enums/app_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/app_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/app_store.proto b/google/ads/googleads/v2/enums/app_store.proto index a12b57b00..6549a407d 100644 --- a/google/ads/googleads/v2/enums/app_store.proto +++ b/google/ads/googleads/v2/enums/app_store.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/app_url_operating_system_type.proto b/google/ads/googleads/v2/enums/app_url_operating_system_type.proto index f56691efa..a547c9082 100644 --- a/google/ads/googleads/v2/enums/app_url_operating_system_type.proto +++ b/google/ads/googleads/v2/enums/app_url_operating_system_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/asset_field_type.proto b/google/ads/googleads/v2/enums/asset_field_type.proto index fa2664717..93d25a5fb 100644 --- a/google/ads/googleads/v2/enums/asset_field_type.proto +++ b/google/ads/googleads/v2/enums/asset_field_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/asset_performance_label.proto b/google/ads/googleads/v2/enums/asset_performance_label.proto index 205a30b94..23295bc36 100644 --- a/google/ads/googleads/v2/enums/asset_performance_label.proto +++ b/google/ads/googleads/v2/enums/asset_performance_label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/asset_type.proto b/google/ads/googleads/v2/enums/asset_type.proto index 808516839..4a0e762ae 100644 --- a/google/ads/googleads/v2/enums/asset_type.proto +++ b/google/ads/googleads/v2/enums/asset_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/attribution_model.proto b/google/ads/googleads/v2/enums/attribution_model.proto index 0f0b0ae46..ad30f7086 100644 --- a/google/ads/googleads/v2/enums/attribution_model.proto +++ b/google/ads/googleads/v2/enums/attribution_model.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/bid_modifier_source.proto b/google/ads/googleads/v2/enums/bid_modifier_source.proto index 494df692a..b2c04f9d4 100644 --- a/google/ads/googleads/v2/enums/bid_modifier_source.proto +++ b/google/ads/googleads/v2/enums/bid_modifier_source.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/bidding_source.proto b/google/ads/googleads/v2/enums/bidding_source.proto index 6f6cd5d60..6e35777d7 100644 --- a/google/ads/googleads/v2/enums/bidding_source.proto +++ b/google/ads/googleads/v2/enums/bidding_source.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/bidding_strategy_status.proto b/google/ads/googleads/v2/enums/bidding_strategy_status.proto index ae543a854..fc8c5e8c5 100644 --- a/google/ads/googleads/v2/enums/bidding_strategy_status.proto +++ b/google/ads/googleads/v2/enums/bidding_strategy_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/bidding_strategy_type.proto b/google/ads/googleads/v2/enums/bidding_strategy_type.proto index 42474f55c..62326f55d 100644 --- a/google/ads/googleads/v2/enums/bidding_strategy_type.proto +++ b/google/ads/googleads/v2/enums/bidding_strategy_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/billing_setup_status.proto b/google/ads/googleads/v2/enums/billing_setup_status.proto index 23c2a7a25..06a25f010 100644 --- a/google/ads/googleads/v2/enums/billing_setup_status.proto +++ b/google/ads/googleads/v2/enums/billing_setup_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/brand_safety_suitability.proto b/google/ads/googleads/v2/enums/brand_safety_suitability.proto index d59c93203..f822e44ab 100644 --- a/google/ads/googleads/v2/enums/brand_safety_suitability.proto +++ b/google/ads/googleads/v2/enums/brand_safety_suitability.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/budget_delivery_method.proto b/google/ads/googleads/v2/enums/budget_delivery_method.proto index 1d8bc02bb..9d5e4d98e 100644 --- a/google/ads/googleads/v2/enums/budget_delivery_method.proto +++ b/google/ads/googleads/v2/enums/budget_delivery_method.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/budget_period.proto b/google/ads/googleads/v2/enums/budget_period.proto index aef6ce526..2be12f638 100644 --- a/google/ads/googleads/v2/enums/budget_period.proto +++ b/google/ads/googleads/v2/enums/budget_period.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/budget_status.proto b/google/ads/googleads/v2/enums/budget_status.proto index e2e3b8a5c..22ec5458b 100644 --- a/google/ads/googleads/v2/enums/budget_status.proto +++ b/google/ads/googleads/v2/enums/budget_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/budget_type.proto b/google/ads/googleads/v2/enums/budget_type.proto index 6e9fc133a..81ba40642 100644 --- a/google/ads/googleads/v2/enums/budget_type.proto +++ b/google/ads/googleads/v2/enums/budget_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/call_conversion_reporting_state.proto b/google/ads/googleads/v2/enums/call_conversion_reporting_state.proto index d4175bb68..11eb222f4 100644 --- a/google/ads/googleads/v2/enums/call_conversion_reporting_state.proto +++ b/google/ads/googleads/v2/enums/call_conversion_reporting_state.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/call_placeholder_field.proto b/google/ads/googleads/v2/enums/call_placeholder_field.proto index 7f7ed94dc..6709beeb5 100644 --- a/google/ads/googleads/v2/enums/call_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/call_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/callout_placeholder_field.proto b/google/ads/googleads/v2/enums/callout_placeholder_field.proto index 2e6c3613e..ee1c505fe 100644 --- a/google/ads/googleads/v2/enums/callout_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/callout_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/campaign_criterion_status.proto b/google/ads/googleads/v2/enums/campaign_criterion_status.proto index 2c42aa3db..651ecacf8 100644 --- a/google/ads/googleads/v2/enums/campaign_criterion_status.proto +++ b/google/ads/googleads/v2/enums/campaign_criterion_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/campaign_draft_status.proto b/google/ads/googleads/v2/enums/campaign_draft_status.proto index 18877e356..4a6d16032 100644 --- a/google/ads/googleads/v2/enums/campaign_draft_status.proto +++ b/google/ads/googleads/v2/enums/campaign_draft_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/campaign_experiment_status.proto b/google/ads/googleads/v2/enums/campaign_experiment_status.proto index 4a73946a6..20861643e 100644 --- a/google/ads/googleads/v2/enums/campaign_experiment_status.proto +++ b/google/ads/googleads/v2/enums/campaign_experiment_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/campaign_experiment_traffic_split_type.proto b/google/ads/googleads/v2/enums/campaign_experiment_traffic_split_type.proto index fcb1de0be..de392b142 100644 --- a/google/ads/googleads/v2/enums/campaign_experiment_traffic_split_type.proto +++ b/google/ads/googleads/v2/enums/campaign_experiment_traffic_split_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/campaign_experiment_type.proto b/google/ads/googleads/v2/enums/campaign_experiment_type.proto index 01a6f7168..c645942c9 100644 --- a/google/ads/googleads/v2/enums/campaign_experiment_type.proto +++ b/google/ads/googleads/v2/enums/campaign_experiment_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/campaign_serving_status.proto b/google/ads/googleads/v2/enums/campaign_serving_status.proto index ee998e3c2..73f540c79 100644 --- a/google/ads/googleads/v2/enums/campaign_serving_status.proto +++ b/google/ads/googleads/v2/enums/campaign_serving_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/campaign_shared_set_status.proto b/google/ads/googleads/v2/enums/campaign_shared_set_status.proto index f35ec7200..0db57b7e1 100644 --- a/google/ads/googleads/v2/enums/campaign_shared_set_status.proto +++ b/google/ads/googleads/v2/enums/campaign_shared_set_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/campaign_status.proto b/google/ads/googleads/v2/enums/campaign_status.proto index 21ffd9d2d..ef4ffcb2f 100644 --- a/google/ads/googleads/v2/enums/campaign_status.proto +++ b/google/ads/googleads/v2/enums/campaign_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/change_status_operation.proto b/google/ads/googleads/v2/enums/change_status_operation.proto index 8361cc339..6fed1073d 100644 --- a/google/ads/googleads/v2/enums/change_status_operation.proto +++ b/google/ads/googleads/v2/enums/change_status_operation.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/change_status_resource_type.proto b/google/ads/googleads/v2/enums/change_status_resource_type.proto index 983aa47e7..a2a19b588 100644 --- a/google/ads/googleads/v2/enums/change_status_resource_type.proto +++ b/google/ads/googleads/v2/enums/change_status_resource_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/click_type.proto b/google/ads/googleads/v2/enums/click_type.proto index 6318147f1..2d16d5687 100644 --- a/google/ads/googleads/v2/enums/click_type.proto +++ b/google/ads/googleads/v2/enums/click_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/content_label_type.proto b/google/ads/googleads/v2/enums/content_label_type.proto index 17b4fb3e5..672454455 100644 --- a/google/ads/googleads/v2/enums/content_label_type.proto +++ b/google/ads/googleads/v2/enums/content_label_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/conversion_action_category.proto b/google/ads/googleads/v2/enums/conversion_action_category.proto index 6000b0618..244ab4478 100644 --- a/google/ads/googleads/v2/enums/conversion_action_category.proto +++ b/google/ads/googleads/v2/enums/conversion_action_category.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/conversion_action_counting_type.proto b/google/ads/googleads/v2/enums/conversion_action_counting_type.proto index 354c33ba3..68ce9d811 100644 --- a/google/ads/googleads/v2/enums/conversion_action_counting_type.proto +++ b/google/ads/googleads/v2/enums/conversion_action_counting_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/conversion_action_status.proto b/google/ads/googleads/v2/enums/conversion_action_status.proto index 623d89edc..d08ad0f61 100644 --- a/google/ads/googleads/v2/enums/conversion_action_status.proto +++ b/google/ads/googleads/v2/enums/conversion_action_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/conversion_action_type.proto b/google/ads/googleads/v2/enums/conversion_action_type.proto index c610e1906..a00e67edd 100644 --- a/google/ads/googleads/v2/enums/conversion_action_type.proto +++ b/google/ads/googleads/v2/enums/conversion_action_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/conversion_adjustment_type.proto b/google/ads/googleads/v2/enums/conversion_adjustment_type.proto index be3d9468c..bbe168519 100644 --- a/google/ads/googleads/v2/enums/conversion_adjustment_type.proto +++ b/google/ads/googleads/v2/enums/conversion_adjustment_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/conversion_attribution_event_type.proto b/google/ads/googleads/v2/enums/conversion_attribution_event_type.proto index 6bdf939be..071ed6bdb 100644 --- a/google/ads/googleads/v2/enums/conversion_attribution_event_type.proto +++ b/google/ads/googleads/v2/enums/conversion_attribution_event_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/conversion_lag_bucket.proto b/google/ads/googleads/v2/enums/conversion_lag_bucket.proto index 94a099bf3..35924a0a5 100644 --- a/google/ads/googleads/v2/enums/conversion_lag_bucket.proto +++ b/google/ads/googleads/v2/enums/conversion_lag_bucket.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/conversion_or_adjustment_lag_bucket.proto b/google/ads/googleads/v2/enums/conversion_or_adjustment_lag_bucket.proto index b5caee44a..b27e555b4 100644 --- a/google/ads/googleads/v2/enums/conversion_or_adjustment_lag_bucket.proto +++ b/google/ads/googleads/v2/enums/conversion_or_adjustment_lag_bucket.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/criterion_category_channel_availability_mode.proto b/google/ads/googleads/v2/enums/criterion_category_channel_availability_mode.proto index 1d7e15c19..4897380e3 100644 --- a/google/ads/googleads/v2/enums/criterion_category_channel_availability_mode.proto +++ b/google/ads/googleads/v2/enums/criterion_category_channel_availability_mode.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/criterion_category_locale_availability_mode.proto b/google/ads/googleads/v2/enums/criterion_category_locale_availability_mode.proto index 16b68bbc4..3228c3e46 100644 --- a/google/ads/googleads/v2/enums/criterion_category_locale_availability_mode.proto +++ b/google/ads/googleads/v2/enums/criterion_category_locale_availability_mode.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/criterion_system_serving_status.proto b/google/ads/googleads/v2/enums/criterion_system_serving_status.proto index 857ccbfc7..7b92a0450 100644 --- a/google/ads/googleads/v2/enums/criterion_system_serving_status.proto +++ b/google/ads/googleads/v2/enums/criterion_system_serving_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/criterion_type.proto b/google/ads/googleads/v2/enums/criterion_type.proto index 7f9a76ccb..bb761dab4 100644 --- a/google/ads/googleads/v2/enums/criterion_type.proto +++ b/google/ads/googleads/v2/enums/criterion_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/custom_interest_member_type.proto b/google/ads/googleads/v2/enums/custom_interest_member_type.proto index a0b9dabe3..4046d0b7d 100644 --- a/google/ads/googleads/v2/enums/custom_interest_member_type.proto +++ b/google/ads/googleads/v2/enums/custom_interest_member_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/custom_interest_status.proto b/google/ads/googleads/v2/enums/custom_interest_status.proto index 9f9ab6f14..7f1db044e 100644 --- a/google/ads/googleads/v2/enums/custom_interest_status.proto +++ b/google/ads/googleads/v2/enums/custom_interest_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/custom_interest_type.proto b/google/ads/googleads/v2/enums/custom_interest_type.proto index 2751f2eac..62d2b32b7 100644 --- a/google/ads/googleads/v2/enums/custom_interest_type.proto +++ b/google/ads/googleads/v2/enums/custom_interest_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/custom_placeholder_field.proto b/google/ads/googleads/v2/enums/custom_placeholder_field.proto index c614c2304..774269fcf 100644 --- a/google/ads/googleads/v2/enums/custom_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/custom_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/customer_match_upload_key_type.proto b/google/ads/googleads/v2/enums/customer_match_upload_key_type.proto index 16fdfc046..03c554d70 100644 --- a/google/ads/googleads/v2/enums/customer_match_upload_key_type.proto +++ b/google/ads/googleads/v2/enums/customer_match_upload_key_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/customer_pay_per_conversion_eligibility_failure_reason.proto b/google/ads/googleads/v2/enums/customer_pay_per_conversion_eligibility_failure_reason.proto index f016e30c0..33903b222 100644 --- a/google/ads/googleads/v2/enums/customer_pay_per_conversion_eligibility_failure_reason.proto +++ b/google/ads/googleads/v2/enums/customer_pay_per_conversion_eligibility_failure_reason.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/data_driven_model_status.proto b/google/ads/googleads/v2/enums/data_driven_model_status.proto index fe72a5486..10cab1e4b 100644 --- a/google/ads/googleads/v2/enums/data_driven_model_status.proto +++ b/google/ads/googleads/v2/enums/data_driven_model_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/day_of_week.proto b/google/ads/googleads/v2/enums/day_of_week.proto index 423b490eb..594cba531 100644 --- a/google/ads/googleads/v2/enums/day_of_week.proto +++ b/google/ads/googleads/v2/enums/day_of_week.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/device.proto b/google/ads/googleads/v2/enums/device.proto index 67bd0073f..54072ae86 100644 --- a/google/ads/googleads/v2/enums/device.proto +++ b/google/ads/googleads/v2/enums/device.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/display_ad_format_setting.proto b/google/ads/googleads/v2/enums/display_ad_format_setting.proto index c65af3993..85547718c 100644 --- a/google/ads/googleads/v2/enums/display_ad_format_setting.proto +++ b/google/ads/googleads/v2/enums/display_ad_format_setting.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/display_upload_product_type.proto b/google/ads/googleads/v2/enums/display_upload_product_type.proto index 0dc6b7b63..3f4e09863 100644 --- a/google/ads/googleads/v2/enums/display_upload_product_type.proto +++ b/google/ads/googleads/v2/enums/display_upload_product_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/distance_bucket.proto b/google/ads/googleads/v2/enums/distance_bucket.proto index 6aa1e810d..79dab2806 100644 --- a/google/ads/googleads/v2/enums/distance_bucket.proto +++ b/google/ads/googleads/v2/enums/distance_bucket.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/dsa_page_feed_criterion_field.proto b/google/ads/googleads/v2/enums/dsa_page_feed_criterion_field.proto index 2192313d8..5fcb3ffd0 100644 --- a/google/ads/googleads/v2/enums/dsa_page_feed_criterion_field.proto +++ b/google/ads/googleads/v2/enums/dsa_page_feed_criterion_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/education_placeholder_field.proto b/google/ads/googleads/v2/enums/education_placeholder_field.proto index 63e860ae7..cec0bbe23 100644 --- a/google/ads/googleads/v2/enums/education_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/education_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/extension_setting_device.proto b/google/ads/googleads/v2/enums/extension_setting_device.proto index dec6416d4..c2fdcc6c2 100644 --- a/google/ads/googleads/v2/enums/extension_setting_device.proto +++ b/google/ads/googleads/v2/enums/extension_setting_device.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/extension_type.proto b/google/ads/googleads/v2/enums/extension_type.proto index 446421749..db1c835bd 100644 --- a/google/ads/googleads/v2/enums/extension_type.proto +++ b/google/ads/googleads/v2/enums/extension_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -73,6 +72,9 @@ message ExtensionTypeEnum { // Affiliate location. AFFILIATE_LOCATION = 13; + + // Hotel callout + HOTEL_CALLOUT = 15; } diff --git a/google/ads/googleads/v2/enums/external_conversion_source.proto b/google/ads/googleads/v2/enums/external_conversion_source.proto index ad2389354..6c2fb8c18 100644 --- a/google/ads/googleads/v2/enums/external_conversion_source.proto +++ b/google/ads/googleads/v2/enums/external_conversion_source.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/feed_attribute_type.proto b/google/ads/googleads/v2/enums/feed_attribute_type.proto index 83205a14e..bb1dcba1c 100644 --- a/google/ads/googleads/v2/enums/feed_attribute_type.proto +++ b/google/ads/googleads/v2/enums/feed_attribute_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/feed_item_quality_approval_status.proto b/google/ads/googleads/v2/enums/feed_item_quality_approval_status.proto index fdba5dbc9..261916332 100644 --- a/google/ads/googleads/v2/enums/feed_item_quality_approval_status.proto +++ b/google/ads/googleads/v2/enums/feed_item_quality_approval_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/feed_item_quality_disapproval_reason.proto b/google/ads/googleads/v2/enums/feed_item_quality_disapproval_reason.proto index 11273709c..320c9f4aa 100644 --- a/google/ads/googleads/v2/enums/feed_item_quality_disapproval_reason.proto +++ b/google/ads/googleads/v2/enums/feed_item_quality_disapproval_reason.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/feed_item_status.proto b/google/ads/googleads/v2/enums/feed_item_status.proto index 2a4336f72..3f5bd12f0 100644 --- a/google/ads/googleads/v2/enums/feed_item_status.proto +++ b/google/ads/googleads/v2/enums/feed_item_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/feed_item_target_device.proto b/google/ads/googleads/v2/enums/feed_item_target_device.proto index 65208edaa..3b51631f1 100644 --- a/google/ads/googleads/v2/enums/feed_item_target_device.proto +++ b/google/ads/googleads/v2/enums/feed_item_target_device.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/feed_item_target_type.proto b/google/ads/googleads/v2/enums/feed_item_target_type.proto index 33b3b5603..7c608f191 100644 --- a/google/ads/googleads/v2/enums/feed_item_target_type.proto +++ b/google/ads/googleads/v2/enums/feed_item_target_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/feed_item_validation_status.proto b/google/ads/googleads/v2/enums/feed_item_validation_status.proto index 8fb22b4cd..54bbf03fe 100644 --- a/google/ads/googleads/v2/enums/feed_item_validation_status.proto +++ b/google/ads/googleads/v2/enums/feed_item_validation_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/feed_link_status.proto b/google/ads/googleads/v2/enums/feed_link_status.proto index e4d82c6d2..c12e33cd4 100644 --- a/google/ads/googleads/v2/enums/feed_link_status.proto +++ b/google/ads/googleads/v2/enums/feed_link_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/feed_mapping_criterion_type.proto b/google/ads/googleads/v2/enums/feed_mapping_criterion_type.proto index 2f7bb5d57..692aa39ed 100644 --- a/google/ads/googleads/v2/enums/feed_mapping_criterion_type.proto +++ b/google/ads/googleads/v2/enums/feed_mapping_criterion_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/feed_mapping_status.proto b/google/ads/googleads/v2/enums/feed_mapping_status.proto index 65771e68f..7d80a3b76 100644 --- a/google/ads/googleads/v2/enums/feed_mapping_status.proto +++ b/google/ads/googleads/v2/enums/feed_mapping_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/feed_origin.proto b/google/ads/googleads/v2/enums/feed_origin.proto index 093a5b55d..181907689 100644 --- a/google/ads/googleads/v2/enums/feed_origin.proto +++ b/google/ads/googleads/v2/enums/feed_origin.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/feed_status.proto b/google/ads/googleads/v2/enums/feed_status.proto index 339a43c16..4a879bba1 100644 --- a/google/ads/googleads/v2/enums/feed_status.proto +++ b/google/ads/googleads/v2/enums/feed_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/flight_placeholder_field.proto b/google/ads/googleads/v2/enums/flight_placeholder_field.proto index 98f5131bf..a1b860ec8 100644 --- a/google/ads/googleads/v2/enums/flight_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/flight_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/frequency_cap_event_type.proto b/google/ads/googleads/v2/enums/frequency_cap_event_type.proto index 780367315..508ae156e 100644 --- a/google/ads/googleads/v2/enums/frequency_cap_event_type.proto +++ b/google/ads/googleads/v2/enums/frequency_cap_event_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/frequency_cap_level.proto b/google/ads/googleads/v2/enums/frequency_cap_level.proto index a3e55fcff..818d5d477 100644 --- a/google/ads/googleads/v2/enums/frequency_cap_level.proto +++ b/google/ads/googleads/v2/enums/frequency_cap_level.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/frequency_cap_time_unit.proto b/google/ads/googleads/v2/enums/frequency_cap_time_unit.proto index b5da86cf3..7b3ac4525 100644 --- a/google/ads/googleads/v2/enums/frequency_cap_time_unit.proto +++ b/google/ads/googleads/v2/enums/frequency_cap_time_unit.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/gender_type.proto b/google/ads/googleads/v2/enums/gender_type.proto index f81e4fa0a..160484acf 100644 --- a/google/ads/googleads/v2/enums/gender_type.proto +++ b/google/ads/googleads/v2/enums/gender_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/geo_target_constant_status.proto b/google/ads/googleads/v2/enums/geo_target_constant_status.proto index a52f86f9a..3aa14de15 100644 --- a/google/ads/googleads/v2/enums/geo_target_constant_status.proto +++ b/google/ads/googleads/v2/enums/geo_target_constant_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/geo_targeting_restriction.proto b/google/ads/googleads/v2/enums/geo_targeting_restriction.proto index 1d2e66fd0..deb6d4a2b 100644 --- a/google/ads/googleads/v2/enums/geo_targeting_restriction.proto +++ b/google/ads/googleads/v2/enums/geo_targeting_restriction.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/geo_targeting_type.proto b/google/ads/googleads/v2/enums/geo_targeting_type.proto index 968c9e2c3..375fcbba3 100644 --- a/google/ads/googleads/v2/enums/geo_targeting_type.proto +++ b/google/ads/googleads/v2/enums/geo_targeting_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/google_ads_field_category.proto b/google/ads/googleads/v2/enums/google_ads_field_category.proto index e4aab7ff3..4d42bdc93 100644 --- a/google/ads/googleads/v2/enums/google_ads_field_category.proto +++ b/google/ads/googleads/v2/enums/google_ads_field_category.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/google_ads_field_data_type.proto b/google/ads/googleads/v2/enums/google_ads_field_data_type.proto index ff39c44e1..aaa4024e7 100644 --- a/google/ads/googleads/v2/enums/google_ads_field_data_type.proto +++ b/google/ads/googleads/v2/enums/google_ads_field_data_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/hotel_date_selection_type.proto b/google/ads/googleads/v2/enums/hotel_date_selection_type.proto index 25a12f2b9..0332b71df 100644 --- a/google/ads/googleads/v2/enums/hotel_date_selection_type.proto +++ b/google/ads/googleads/v2/enums/hotel_date_selection_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/hotel_placeholder_field.proto b/google/ads/googleads/v2/enums/hotel_placeholder_field.proto index 6117772c2..11a453b22 100644 --- a/google/ads/googleads/v2/enums/hotel_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/hotel_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/hotel_price_bucket.proto b/google/ads/googleads/v2/enums/hotel_price_bucket.proto new file mode 100644 index 000000000..ff8f70de5 --- /dev/null +++ b/google/ads/googleads/v2/enums/hotel_price_bucket.proto @@ -0,0 +1,52 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v2.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "HotelPriceBucketProto"; +option java_package = "com.google.ads.googleads.v2.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V2::Enums"; + +// Proto file describing hotel price buckets. + +// Container for enum describing hotel price bucket for a hotel itinerary. +message HotelPriceBucketEnum { + // Enum describing possible hotel price buckets. + enum HotelPriceBucket { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Tied for lowest price. Partner is within a small variance of the lowest + // price. + LOWEST_TIED = 3; + + // Not lowest price. Partner is not within a small variance of the lowest + // price. + NOT_LOWEST = 4; + } + + +} diff --git a/google/ads/googleads/v2/enums/hotel_rate_type.proto b/google/ads/googleads/v2/enums/hotel_rate_type.proto index 9a184225a..2c4e517e1 100644 --- a/google/ads/googleads/v2/enums/hotel_rate_type.proto +++ b/google/ads/googleads/v2/enums/hotel_rate_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/income_range_type.proto b/google/ads/googleads/v2/enums/income_range_type.proto index 4e0aaef24..d44dacc76 100644 --- a/google/ads/googleads/v2/enums/income_range_type.proto +++ b/google/ads/googleads/v2/enums/income_range_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/interaction_event_type.proto b/google/ads/googleads/v2/enums/interaction_event_type.proto index 6fb7ddd6d..8bd60efb1 100644 --- a/google/ads/googleads/v2/enums/interaction_event_type.proto +++ b/google/ads/googleads/v2/enums/interaction_event_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/interaction_type.proto b/google/ads/googleads/v2/enums/interaction_type.proto index be3a9b649..a6fd4a8fb 100644 --- a/google/ads/googleads/v2/enums/interaction_type.proto +++ b/google/ads/googleads/v2/enums/interaction_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/invoice_type.proto b/google/ads/googleads/v2/enums/invoice_type.proto new file mode 100644 index 000000000..aefc46171 --- /dev/null +++ b/google/ads/googleads/v2/enums/invoice_type.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v2.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "InvoiceTypeProto"; +option java_package = "com.google.ads.googleads.v2.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V2::Enums"; + +// Proto file describing invoice types. + +// Container for enum describing the type of invoices. +message InvoiceTypeEnum { + // The possible type of invoices. + enum InvoiceType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // An invoice with a negative amount. The account receives a credit. + CREDIT_MEMO = 2; + + // An invoice with a positive amount. The account owes a balance. + INVOICE = 3; + } + + +} diff --git a/google/ads/googleads/v2/enums/job_placeholder_field.proto b/google/ads/googleads/v2/enums/job_placeholder_field.proto index 2326fbfcc..a4593e97b 100644 --- a/google/ads/googleads/v2/enums/job_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/job_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/keyword_match_type.proto b/google/ads/googleads/v2/enums/keyword_match_type.proto index 2e6dcfea4..45f930e32 100644 --- a/google/ads/googleads/v2/enums/keyword_match_type.proto +++ b/google/ads/googleads/v2/enums/keyword_match_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/keyword_plan_competition_level.proto b/google/ads/googleads/v2/enums/keyword_plan_competition_level.proto index 490f42169..f09a1f548 100644 --- a/google/ads/googleads/v2/enums/keyword_plan_competition_level.proto +++ b/google/ads/googleads/v2/enums/keyword_plan_competition_level.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/keyword_plan_forecast_interval.proto b/google/ads/googleads/v2/enums/keyword_plan_forecast_interval.proto index df74e1193..a8d9fc179 100644 --- a/google/ads/googleads/v2/enums/keyword_plan_forecast_interval.proto +++ b/google/ads/googleads/v2/enums/keyword_plan_forecast_interval.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/keyword_plan_network.proto b/google/ads/googleads/v2/enums/keyword_plan_network.proto index 210a1a5db..9064c6d75 100644 --- a/google/ads/googleads/v2/enums/keyword_plan_network.proto +++ b/google/ads/googleads/v2/enums/keyword_plan_network.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/label_status.proto b/google/ads/googleads/v2/enums/label_status.proto index de559d875..f333303e1 100644 --- a/google/ads/googleads/v2/enums/label_status.proto +++ b/google/ads/googleads/v2/enums/label_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/legacy_app_install_ad_app_store.proto b/google/ads/googleads/v2/enums/legacy_app_install_ad_app_store.proto index 95a3dd7a7..d8ed2c4f9 100644 --- a/google/ads/googleads/v2/enums/legacy_app_install_ad_app_store.proto +++ b/google/ads/googleads/v2/enums/legacy_app_install_ad_app_store.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/listing_custom_attribute_index.proto b/google/ads/googleads/v2/enums/listing_custom_attribute_index.proto index 7bfa77989..053d15c8f 100644 --- a/google/ads/googleads/v2/enums/listing_custom_attribute_index.proto +++ b/google/ads/googleads/v2/enums/listing_custom_attribute_index.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/listing_group_type.proto b/google/ads/googleads/v2/enums/listing_group_type.proto index de2d03457..4212b71f2 100644 --- a/google/ads/googleads/v2/enums/listing_group_type.proto +++ b/google/ads/googleads/v2/enums/listing_group_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/local_placeholder_field.proto b/google/ads/googleads/v2/enums/local_placeholder_field.proto index df2b246dc..2fd0382e8 100644 --- a/google/ads/googleads/v2/enums/local_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/local_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/location_extension_targeting_criterion_field.proto b/google/ads/googleads/v2/enums/location_extension_targeting_criterion_field.proto index f1fda3fe9..8c113f6d4 100644 --- a/google/ads/googleads/v2/enums/location_extension_targeting_criterion_field.proto +++ b/google/ads/googleads/v2/enums/location_extension_targeting_criterion_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/location_group_radius_units.proto b/google/ads/googleads/v2/enums/location_group_radius_units.proto index 5b3f94c2a..d6cfa0c5f 100644 --- a/google/ads/googleads/v2/enums/location_group_radius_units.proto +++ b/google/ads/googleads/v2/enums/location_group_radius_units.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/location_placeholder_field.proto b/google/ads/googleads/v2/enums/location_placeholder_field.proto index 438cb8941..b4a16ad16 100644 --- a/google/ads/googleads/v2/enums/location_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/location_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/manager_link_status.proto b/google/ads/googleads/v2/enums/manager_link_status.proto index 5336a7a99..693373fe1 100644 --- a/google/ads/googleads/v2/enums/manager_link_status.proto +++ b/google/ads/googleads/v2/enums/manager_link_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/matching_function_context_type.proto b/google/ads/googleads/v2/enums/matching_function_context_type.proto index 581d094b5..42b082fcc 100644 --- a/google/ads/googleads/v2/enums/matching_function_context_type.proto +++ b/google/ads/googleads/v2/enums/matching_function_context_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/matching_function_operator.proto b/google/ads/googleads/v2/enums/matching_function_operator.proto index 2932d75a9..c6092ad40 100644 --- a/google/ads/googleads/v2/enums/matching_function_operator.proto +++ b/google/ads/googleads/v2/enums/matching_function_operator.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/media_type.proto b/google/ads/googleads/v2/enums/media_type.proto index 781100457..15f7e5f7d 100644 --- a/google/ads/googleads/v2/enums/media_type.proto +++ b/google/ads/googleads/v2/enums/media_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/merchant_center_link_status.proto b/google/ads/googleads/v2/enums/merchant_center_link_status.proto index 617f65858..a1ac95746 100644 --- a/google/ads/googleads/v2/enums/merchant_center_link_status.proto +++ b/google/ads/googleads/v2/enums/merchant_center_link_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/message_placeholder_field.proto b/google/ads/googleads/v2/enums/message_placeholder_field.proto index 61246afa8..3af72e6ef 100644 --- a/google/ads/googleads/v2/enums/message_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/message_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/mime_type.proto b/google/ads/googleads/v2/enums/mime_type.proto index a6b1e6653..7fd3d343a 100644 --- a/google/ads/googleads/v2/enums/mime_type.proto +++ b/google/ads/googleads/v2/enums/mime_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/minute_of_hour.proto b/google/ads/googleads/v2/enums/minute_of_hour.proto index 34cb46454..b18c5a8e8 100644 --- a/google/ads/googleads/v2/enums/minute_of_hour.proto +++ b/google/ads/googleads/v2/enums/minute_of_hour.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/mobile_device_type.proto b/google/ads/googleads/v2/enums/mobile_device_type.proto index e6e0d2a08..0e812ae42 100644 --- a/google/ads/googleads/v2/enums/mobile_device_type.proto +++ b/google/ads/googleads/v2/enums/mobile_device_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/month_of_year.proto b/google/ads/googleads/v2/enums/month_of_year.proto index 5cc318649..67d3cf7d1 100644 --- a/google/ads/googleads/v2/enums/month_of_year.proto +++ b/google/ads/googleads/v2/enums/month_of_year.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/mutate_job_status.proto b/google/ads/googleads/v2/enums/mutate_job_status.proto index 8c88eab95..5bec9c32d 100644 --- a/google/ads/googleads/v2/enums/mutate_job_status.proto +++ b/google/ads/googleads/v2/enums/mutate_job_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/negative_geo_target_type.proto b/google/ads/googleads/v2/enums/negative_geo_target_type.proto index c1165ac8f..531b87a1b 100644 --- a/google/ads/googleads/v2/enums/negative_geo_target_type.proto +++ b/google/ads/googleads/v2/enums/negative_geo_target_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/operating_system_version_operator_type.proto b/google/ads/googleads/v2/enums/operating_system_version_operator_type.proto index 1a46ed04c..f33a81ede 100644 --- a/google/ads/googleads/v2/enums/operating_system_version_operator_type.proto +++ b/google/ads/googleads/v2/enums/operating_system_version_operator_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/page_one_promoted_strategy_goal.proto b/google/ads/googleads/v2/enums/page_one_promoted_strategy_goal.proto index 7c9adbbf0..3017a9746 100644 --- a/google/ads/googleads/v2/enums/page_one_promoted_strategy_goal.proto +++ b/google/ads/googleads/v2/enums/page_one_promoted_strategy_goal.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/parental_status_type.proto b/google/ads/googleads/v2/enums/parental_status_type.proto index 772c5c55b..435c48c73 100644 --- a/google/ads/googleads/v2/enums/parental_status_type.proto +++ b/google/ads/googleads/v2/enums/parental_status_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/payment_mode.proto b/google/ads/googleads/v2/enums/payment_mode.proto index 815ede508..c00c95ea5 100644 --- a/google/ads/googleads/v2/enums/payment_mode.proto +++ b/google/ads/googleads/v2/enums/payment_mode.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/placeholder_type.proto b/google/ads/googleads/v2/enums/placeholder_type.proto index 4d83356e5..81bd57556 100644 --- a/google/ads/googleads/v2/enums/placeholder_type.proto +++ b/google/ads/googleads/v2/enums/placeholder_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/placement_type.proto b/google/ads/googleads/v2/enums/placement_type.proto index a2fadcbc5..cb4b57f44 100644 --- a/google/ads/googleads/v2/enums/placement_type.proto +++ b/google/ads/googleads/v2/enums/placement_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/policy_approval_status.proto b/google/ads/googleads/v2/enums/policy_approval_status.proto index de6f2d7d5..ce5739be4 100644 --- a/google/ads/googleads/v2/enums/policy_approval_status.proto +++ b/google/ads/googleads/v2/enums/policy_approval_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/policy_review_status.proto b/google/ads/googleads/v2/enums/policy_review_status.proto index 268e9c61c..8e023567d 100644 --- a/google/ads/googleads/v2/enums/policy_review_status.proto +++ b/google/ads/googleads/v2/enums/policy_review_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -51,6 +50,10 @@ message PolicyReviewStatusEnum { // The resource has been resubmitted for approval or its policy decision has // been appealed. UNDER_APPEAL = 4; + + // The resource is eligible and may be serving but could still undergo + // further review. + ELIGIBLE_MAY_SERVE = 5; } diff --git a/google/ads/googleads/v2/enums/policy_topic_entry_type.proto b/google/ads/googleads/v2/enums/policy_topic_entry_type.proto index 9bbd1ac7e..9399ace3b 100644 --- a/google/ads/googleads/v2/enums/policy_topic_entry_type.proto +++ b/google/ads/googleads/v2/enums/policy_topic_entry_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/policy_topic_evidence_destination_mismatch_url_type.proto b/google/ads/googleads/v2/enums/policy_topic_evidence_destination_mismatch_url_type.proto index 539b9eeaf..a7eb35c8b 100644 --- a/google/ads/googleads/v2/enums/policy_topic_evidence_destination_mismatch_url_type.proto +++ b/google/ads/googleads/v2/enums/policy_topic_evidence_destination_mismatch_url_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/policy_topic_evidence_destination_not_working_device.proto b/google/ads/googleads/v2/enums/policy_topic_evidence_destination_not_working_device.proto index 222525e28..fc280ccc1 100644 --- a/google/ads/googleads/v2/enums/policy_topic_evidence_destination_not_working_device.proto +++ b/google/ads/googleads/v2/enums/policy_topic_evidence_destination_not_working_device.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/policy_topic_evidence_destination_not_working_dns_error_type.proto b/google/ads/googleads/v2/enums/policy_topic_evidence_destination_not_working_dns_error_type.proto index fcf16dd11..ff859d220 100644 --- a/google/ads/googleads/v2/enums/policy_topic_evidence_destination_not_working_dns_error_type.proto +++ b/google/ads/googleads/v2/enums/policy_topic_evidence_destination_not_working_dns_error_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/positive_geo_target_type.proto b/google/ads/googleads/v2/enums/positive_geo_target_type.proto index f094d3ca8..85bae4837 100644 --- a/google/ads/googleads/v2/enums/positive_geo_target_type.proto +++ b/google/ads/googleads/v2/enums/positive_geo_target_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/preferred_content_type.proto b/google/ads/googleads/v2/enums/preferred_content_type.proto index fe276bfb9..825c00f5a 100644 --- a/google/ads/googleads/v2/enums/preferred_content_type.proto +++ b/google/ads/googleads/v2/enums/preferred_content_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/price_extension_price_qualifier.proto b/google/ads/googleads/v2/enums/price_extension_price_qualifier.proto index a0fa76ddc..9675bc5c4 100644 --- a/google/ads/googleads/v2/enums/price_extension_price_qualifier.proto +++ b/google/ads/googleads/v2/enums/price_extension_price_qualifier.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/price_extension_price_unit.proto b/google/ads/googleads/v2/enums/price_extension_price_unit.proto index 412f35118..fc93171a0 100644 --- a/google/ads/googleads/v2/enums/price_extension_price_unit.proto +++ b/google/ads/googleads/v2/enums/price_extension_price_unit.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/price_extension_type.proto b/google/ads/googleads/v2/enums/price_extension_type.proto index 495de62a9..23e66aa36 100644 --- a/google/ads/googleads/v2/enums/price_extension_type.proto +++ b/google/ads/googleads/v2/enums/price_extension_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/price_placeholder_field.proto b/google/ads/googleads/v2/enums/price_placeholder_field.proto index c4aba0bc4..e69c12d0a 100644 --- a/google/ads/googleads/v2/enums/price_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/price_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/product_bidding_category_level.proto b/google/ads/googleads/v2/enums/product_bidding_category_level.proto index 8033b2c8a..02de9216e 100644 --- a/google/ads/googleads/v2/enums/product_bidding_category_level.proto +++ b/google/ads/googleads/v2/enums/product_bidding_category_level.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/product_bidding_category_status.proto b/google/ads/googleads/v2/enums/product_bidding_category_status.proto index 300d2e8d6..a0d91c443 100644 --- a/google/ads/googleads/v2/enums/product_bidding_category_status.proto +++ b/google/ads/googleads/v2/enums/product_bidding_category_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/product_channel.proto b/google/ads/googleads/v2/enums/product_channel.proto index ddb6fe9e0..ef03baa22 100644 --- a/google/ads/googleads/v2/enums/product_channel.proto +++ b/google/ads/googleads/v2/enums/product_channel.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/product_channel_exclusivity.proto b/google/ads/googleads/v2/enums/product_channel_exclusivity.proto index d1676a32b..87981228b 100644 --- a/google/ads/googleads/v2/enums/product_channel_exclusivity.proto +++ b/google/ads/googleads/v2/enums/product_channel_exclusivity.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/product_condition.proto b/google/ads/googleads/v2/enums/product_condition.proto index 2a2f41f04..c80813210 100644 --- a/google/ads/googleads/v2/enums/product_condition.proto +++ b/google/ads/googleads/v2/enums/product_condition.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/product_type_level.proto b/google/ads/googleads/v2/enums/product_type_level.proto index 81ab5b460..936ceae1e 100644 --- a/google/ads/googleads/v2/enums/product_type_level.proto +++ b/google/ads/googleads/v2/enums/product_type_level.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/promotion_extension_discount_modifier.proto b/google/ads/googleads/v2/enums/promotion_extension_discount_modifier.proto index 6e01ba9d3..038da7aca 100644 --- a/google/ads/googleads/v2/enums/promotion_extension_discount_modifier.proto +++ b/google/ads/googleads/v2/enums/promotion_extension_discount_modifier.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/promotion_extension_occasion.proto b/google/ads/googleads/v2/enums/promotion_extension_occasion.proto index 2aea2f815..953b82a38 100644 --- a/google/ads/googleads/v2/enums/promotion_extension_occasion.proto +++ b/google/ads/googleads/v2/enums/promotion_extension_occasion.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/promotion_placeholder_field.proto b/google/ads/googleads/v2/enums/promotion_placeholder_field.proto index d1e47e2c4..7e754d863 100644 --- a/google/ads/googleads/v2/enums/promotion_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/promotion_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/proximity_radius_units.proto b/google/ads/googleads/v2/enums/proximity_radius_units.proto index 6b1c1e9ef..0c163124b 100644 --- a/google/ads/googleads/v2/enums/proximity_radius_units.proto +++ b/google/ads/googleads/v2/enums/proximity_radius_units.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/quality_score_bucket.proto b/google/ads/googleads/v2/enums/quality_score_bucket.proto index b1a1d079d..58e14c5ff 100644 --- a/google/ads/googleads/v2/enums/quality_score_bucket.proto +++ b/google/ads/googleads/v2/enums/quality_score_bucket.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/reach_plan_ad_length.proto b/google/ads/googleads/v2/enums/reach_plan_ad_length.proto new file mode 100644 index 000000000..594ee1687 --- /dev/null +++ b/google/ads/googleads/v2/enums/reach_plan_ad_length.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v2.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ReachPlanAdLengthProto"; +option java_package = "com.google.ads.googleads.v2.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V2::Enums"; + +// Proto file describing ad lengths of a plannable video ad. + +// Message describing length of a plannable video ad. +message ReachPlanAdLengthEnum { + // Possible ad length values. + enum ReachPlanAdLength { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // 6 seconds long ad. + SIX_SECONDS = 2; + + // 15 or 20 seconds long ad. + FIFTEEN_OR_TWENTY_SECONDS = 3; + + // More than 20 seconds long ad. + TWENTY_SECONDS_OR_MORE = 4; + } + + +} diff --git a/google/ads/googleads/v2/enums/reach_plan_age_range.proto b/google/ads/googleads/v2/enums/reach_plan_age_range.proto new file mode 100644 index 000000000..e06ac0f51 --- /dev/null +++ b/google/ads/googleads/v2/enums/reach_plan_age_range.proto @@ -0,0 +1,122 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v2.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ReachPlanAgeRangeProto"; +option java_package = "com.google.ads.googleads.v2.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V2::Enums"; + +// Proto file describing a plannable age range. + +// Message describing plannable age ranges. +message ReachPlanAgeRangeEnum { + // Possible plannable age range values. + enum ReachPlanAgeRange { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Between 18 and 24 years old. + AGE_RANGE_18_24 = 503001; + + // Between 18 and 34 years old. + AGE_RANGE_18_34 = 2; + + // Between 18 and 44 years old. + AGE_RANGE_18_44 = 3; + + // Between 18 and 49 years old. + AGE_RANGE_18_49 = 4; + + // Between 18 and 54 years old. + AGE_RANGE_18_54 = 5; + + // Between 18 and 64 years old. + AGE_RANGE_18_64 = 6; + + // Between 18 and 65+ years old. + AGE_RANGE_18_65_UP = 7; + + // Between 21 and 34 years old. + AGE_RANGE_21_34 = 8; + + // Between 25 and 34 years old. + AGE_RANGE_25_34 = 503002; + + // Between 25 and 44 years old. + AGE_RANGE_25_44 = 9; + + // Between 25 and 49 years old. + AGE_RANGE_25_49 = 10; + + // Between 25 and 54 years old. + AGE_RANGE_25_54 = 11; + + // Between 25 and 64 years old. + AGE_RANGE_25_64 = 12; + + // Between 25 and 65+ years old. + AGE_RANGE_25_65_UP = 13; + + // Between 35 and 44 years old. + AGE_RANGE_35_44 = 503003; + + // Between 35 and 49 years old. + AGE_RANGE_35_49 = 14; + + // Between 35 and 54 years old. + AGE_RANGE_35_54 = 15; + + // Between 35 and 64 years old. + AGE_RANGE_35_64 = 16; + + // Between 35 and 65+ years old. + AGE_RANGE_35_65_UP = 17; + + // Between 45 and 54 years old. + AGE_RANGE_45_54 = 503004; + + // Between 45 and 64 years old. + AGE_RANGE_45_64 = 18; + + // Between 45 and 65+ years old. + AGE_RANGE_45_65_UP = 19; + + // Between 50 and 65+ years old. + AGE_RANGE_50_65_UP = 20; + + // Between 55 and 64 years old. + AGE_RANGE_55_64 = 503005; + + // Between 55 and 65+ years old. + AGE_RANGE_55_65_UP = 21; + + // 65 years old and beyond. + AGE_RANGE_65_UP = 503006; + } + + +} diff --git a/google/ads/googleads/v2/enums/real_estate_placeholder_field.proto b/google/ads/googleads/v2/enums/real_estate_placeholder_field.proto index 666a4c202..a72209799 100644 --- a/google/ads/googleads/v2/enums/real_estate_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/real_estate_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/recommendation_type.proto b/google/ads/googleads/v2/enums/recommendation_type.proto index 03b35e9e2..b13cca955 100644 --- a/google/ads/googleads/v2/enums/recommendation_type.proto +++ b/google/ads/googleads/v2/enums/recommendation_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/search_engine_results_page_type.proto b/google/ads/googleads/v2/enums/search_engine_results_page_type.proto index f0d62f1e2..60d713e49 100644 --- a/google/ads/googleads/v2/enums/search_engine_results_page_type.proto +++ b/google/ads/googleads/v2/enums/search_engine_results_page_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/search_term_match_type.proto b/google/ads/googleads/v2/enums/search_term_match_type.proto index 930501d87..4c4e9f0f5 100644 --- a/google/ads/googleads/v2/enums/search_term_match_type.proto +++ b/google/ads/googleads/v2/enums/search_term_match_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/search_term_targeting_status.proto b/google/ads/googleads/v2/enums/search_term_targeting_status.proto index 0a9dd7740..522005deb 100644 --- a/google/ads/googleads/v2/enums/search_term_targeting_status.proto +++ b/google/ads/googleads/v2/enums/search_term_targeting_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/served_asset_field_type.proto b/google/ads/googleads/v2/enums/served_asset_field_type.proto index 9aab79c7b..8b32f6005 100644 --- a/google/ads/googleads/v2/enums/served_asset_field_type.proto +++ b/google/ads/googleads/v2/enums/served_asset_field_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/shared_set_status.proto b/google/ads/googleads/v2/enums/shared_set_status.proto index f51fe626d..d6d0f0219 100644 --- a/google/ads/googleads/v2/enums/shared_set_status.proto +++ b/google/ads/googleads/v2/enums/shared_set_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/shared_set_type.proto b/google/ads/googleads/v2/enums/shared_set_type.proto index f24b30b4a..588d4291b 100644 --- a/google/ads/googleads/v2/enums/shared_set_type.proto +++ b/google/ads/googleads/v2/enums/shared_set_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/simulation_modification_method.proto b/google/ads/googleads/v2/enums/simulation_modification_method.proto index 830ac8cae..f1eecdc73 100644 --- a/google/ads/googleads/v2/enums/simulation_modification_method.proto +++ b/google/ads/googleads/v2/enums/simulation_modification_method.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/simulation_type.proto b/google/ads/googleads/v2/enums/simulation_type.proto index b7b51f771..98dec8b03 100644 --- a/google/ads/googleads/v2/enums/simulation_type.proto +++ b/google/ads/googleads/v2/enums/simulation_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/sitelink_placeholder_field.proto b/google/ads/googleads/v2/enums/sitelink_placeholder_field.proto index c5886e3e3..11648fc01 100644 --- a/google/ads/googleads/v2/enums/sitelink_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/sitelink_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/slot.proto b/google/ads/googleads/v2/enums/slot.proto index c7bba3fee..c56035061 100644 --- a/google/ads/googleads/v2/enums/slot.proto +++ b/google/ads/googleads/v2/enums/slot.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/spending_limit_type.proto b/google/ads/googleads/v2/enums/spending_limit_type.proto index 1870c94b4..b24fa7709 100644 --- a/google/ads/googleads/v2/enums/spending_limit_type.proto +++ b/google/ads/googleads/v2/enums/spending_limit_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/structured_snippet_placeholder_field.proto b/google/ads/googleads/v2/enums/structured_snippet_placeholder_field.proto index 6ccf3f933..b5f08bc1f 100644 --- a/google/ads/googleads/v2/enums/structured_snippet_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/structured_snippet_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/system_managed_entity_source.proto b/google/ads/googleads/v2/enums/system_managed_entity_source.proto index 9317f1c71..0eb9f54b1 100644 --- a/google/ads/googleads/v2/enums/system_managed_entity_source.proto +++ b/google/ads/googleads/v2/enums/system_managed_entity_source.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/target_cpa_opt_in_recommendation_goal.proto b/google/ads/googleads/v2/enums/target_cpa_opt_in_recommendation_goal.proto index c22dafebf..52fb4ad57 100644 --- a/google/ads/googleads/v2/enums/target_cpa_opt_in_recommendation_goal.proto +++ b/google/ads/googleads/v2/enums/target_cpa_opt_in_recommendation_goal.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/target_impression_share_location.proto b/google/ads/googleads/v2/enums/target_impression_share_location.proto index d1a94132c..af59ba35e 100644 --- a/google/ads/googleads/v2/enums/target_impression_share_location.proto +++ b/google/ads/googleads/v2/enums/target_impression_share_location.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/targeting_dimension.proto b/google/ads/googleads/v2/enums/targeting_dimension.proto index 0fed13821..a23ae7818 100644 --- a/google/ads/googleads/v2/enums/targeting_dimension.proto +++ b/google/ads/googleads/v2/enums/targeting_dimension.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/time_type.proto b/google/ads/googleads/v2/enums/time_type.proto index a4dee47a7..dbea32554 100644 --- a/google/ads/googleads/v2/enums/time_type.proto +++ b/google/ads/googleads/v2/enums/time_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/tracking_code_page_format.proto b/google/ads/googleads/v2/enums/tracking_code_page_format.proto index 827d2d3b5..0ca161692 100644 --- a/google/ads/googleads/v2/enums/tracking_code_page_format.proto +++ b/google/ads/googleads/v2/enums/tracking_code_page_format.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/tracking_code_type.proto b/google/ads/googleads/v2/enums/tracking_code_type.proto index ab244490e..f7f13f515 100644 --- a/google/ads/googleads/v2/enums/tracking_code_type.proto +++ b/google/ads/googleads/v2/enums/tracking_code_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/travel_placeholder_field.proto b/google/ads/googleads/v2/enums/travel_placeholder_field.proto index 199f7e053..a2a83f970 100644 --- a/google/ads/googleads/v2/enums/travel_placeholder_field.proto +++ b/google/ads/googleads/v2/enums/travel_placeholder_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/user_interest_taxonomy_type.proto b/google/ads/googleads/v2/enums/user_interest_taxonomy_type.proto index 5e39b760e..8213b0034 100644 --- a/google/ads/googleads/v2/enums/user_interest_taxonomy_type.proto +++ b/google/ads/googleads/v2/enums/user_interest_taxonomy_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/user_list_access_status.proto b/google/ads/googleads/v2/enums/user_list_access_status.proto index e85e2be6c..6a8741bcb 100644 --- a/google/ads/googleads/v2/enums/user_list_access_status.proto +++ b/google/ads/googleads/v2/enums/user_list_access_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/user_list_closing_reason.proto b/google/ads/googleads/v2/enums/user_list_closing_reason.proto index f8286e4ed..4623fb5ea 100644 --- a/google/ads/googleads/v2/enums/user_list_closing_reason.proto +++ b/google/ads/googleads/v2/enums/user_list_closing_reason.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/user_list_combined_rule_operator.proto b/google/ads/googleads/v2/enums/user_list_combined_rule_operator.proto index 8a19ee684..d1e09f62b 100644 --- a/google/ads/googleads/v2/enums/user_list_combined_rule_operator.proto +++ b/google/ads/googleads/v2/enums/user_list_combined_rule_operator.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/user_list_crm_data_source_type.proto b/google/ads/googleads/v2/enums/user_list_crm_data_source_type.proto index b70f190c5..2f9230755 100644 --- a/google/ads/googleads/v2/enums/user_list_crm_data_source_type.proto +++ b/google/ads/googleads/v2/enums/user_list_crm_data_source_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/user_list_date_rule_item_operator.proto b/google/ads/googleads/v2/enums/user_list_date_rule_item_operator.proto index 526c6d8a7..0a14a98d4 100644 --- a/google/ads/googleads/v2/enums/user_list_date_rule_item_operator.proto +++ b/google/ads/googleads/v2/enums/user_list_date_rule_item_operator.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/user_list_logical_rule_operator.proto b/google/ads/googleads/v2/enums/user_list_logical_rule_operator.proto index 485af7f5e..f97b429e9 100644 --- a/google/ads/googleads/v2/enums/user_list_logical_rule_operator.proto +++ b/google/ads/googleads/v2/enums/user_list_logical_rule_operator.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/user_list_membership_status.proto b/google/ads/googleads/v2/enums/user_list_membership_status.proto index af55c67e1..74feef61a 100644 --- a/google/ads/googleads/v2/enums/user_list_membership_status.proto +++ b/google/ads/googleads/v2/enums/user_list_membership_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/user_list_number_rule_item_operator.proto b/google/ads/googleads/v2/enums/user_list_number_rule_item_operator.proto index 489b5b154..b066bc380 100644 --- a/google/ads/googleads/v2/enums/user_list_number_rule_item_operator.proto +++ b/google/ads/googleads/v2/enums/user_list_number_rule_item_operator.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/user_list_prepopulation_status.proto b/google/ads/googleads/v2/enums/user_list_prepopulation_status.proto index 2c97a7195..be562939c 100644 --- a/google/ads/googleads/v2/enums/user_list_prepopulation_status.proto +++ b/google/ads/googleads/v2/enums/user_list_prepopulation_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/user_list_rule_type.proto b/google/ads/googleads/v2/enums/user_list_rule_type.proto index 0598d55d6..01e02dc96 100644 --- a/google/ads/googleads/v2/enums/user_list_rule_type.proto +++ b/google/ads/googleads/v2/enums/user_list_rule_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/user_list_size_range.proto b/google/ads/googleads/v2/enums/user_list_size_range.proto index b4d062cab..2f8cdb163 100644 --- a/google/ads/googleads/v2/enums/user_list_size_range.proto +++ b/google/ads/googleads/v2/enums/user_list_size_range.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/user_list_string_rule_item_operator.proto b/google/ads/googleads/v2/enums/user_list_string_rule_item_operator.proto index fdb660c3a..697b9093d 100644 --- a/google/ads/googleads/v2/enums/user_list_string_rule_item_operator.proto +++ b/google/ads/googleads/v2/enums/user_list_string_rule_item_operator.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/user_list_type.proto b/google/ads/googleads/v2/enums/user_list_type.proto index ce9207f23..1fb82b3be 100644 --- a/google/ads/googleads/v2/enums/user_list_type.proto +++ b/google/ads/googleads/v2/enums/user_list_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/vanity_pharma_display_url_mode.proto b/google/ads/googleads/v2/enums/vanity_pharma_display_url_mode.proto index 9bae73bac..07de2ed9e 100644 --- a/google/ads/googleads/v2/enums/vanity_pharma_display_url_mode.proto +++ b/google/ads/googleads/v2/enums/vanity_pharma_display_url_mode.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/vanity_pharma_text.proto b/google/ads/googleads/v2/enums/vanity_pharma_text.proto index 5c89fe440..6d0180cc6 100644 --- a/google/ads/googleads/v2/enums/vanity_pharma_text.proto +++ b/google/ads/googleads/v2/enums/vanity_pharma_text.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/webpage_condition_operand.proto b/google/ads/googleads/v2/enums/webpage_condition_operand.proto index 8f961a2ff..d51824c4f 100644 --- a/google/ads/googleads/v2/enums/webpage_condition_operand.proto +++ b/google/ads/googleads/v2/enums/webpage_condition_operand.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/enums/webpage_condition_operator.proto b/google/ads/googleads/v2/enums/webpage_condition_operator.proto index 3f1e547f6..f92af671e 100644 --- a/google/ads/googleads/v2/enums/webpage_condition_operator.proto +++ b/google/ads/googleads/v2/enums/webpage_condition_operator.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/access_invitation_error.proto b/google/ads/googleads/v2/errors/access_invitation_error.proto index 94981d996..88520bad1 100644 --- a/google/ads/googleads/v2/errors/access_invitation_error.proto +++ b/google/ads/googleads/v2/errors/access_invitation_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/account_budget_proposal_error.proto b/google/ads/googleads/v2/errors/account_budget_proposal_error.proto index e4faa70a9..8803f761d 100644 --- a/google/ads/googleads/v2/errors/account_budget_proposal_error.proto +++ b/google/ads/googleads/v2/errors/account_budget_proposal_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/ad_customizer_error.proto b/google/ads/googleads/v2/errors/ad_customizer_error.proto index 0ac20307c..128417997 100644 --- a/google/ads/googleads/v2/errors/ad_customizer_error.proto +++ b/google/ads/googleads/v2/errors/ad_customizer_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/ad_error.proto b/google/ads/googleads/v2/errors/ad_error.proto index 2c59fada8..6fdfcc161 100644 --- a/google/ads/googleads/v2/errors/ad_error.proto +++ b/google/ads/googleads/v2/errors/ad_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/ad_group_ad_error.proto b/google/ads/googleads/v2/errors/ad_group_ad_error.proto index 55d90fb06..482f5129b 100644 --- a/google/ads/googleads/v2/errors/ad_group_ad_error.proto +++ b/google/ads/googleads/v2/errors/ad_group_ad_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/ad_group_bid_modifier_error.proto b/google/ads/googleads/v2/errors/ad_group_bid_modifier_error.proto index 65834bb69..9d5d63fcd 100644 --- a/google/ads/googleads/v2/errors/ad_group_bid_modifier_error.proto +++ b/google/ads/googleads/v2/errors/ad_group_bid_modifier_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/ad_group_criterion_error.proto b/google/ads/googleads/v2/errors/ad_group_criterion_error.proto index ea96df9dd..5394d3445 100644 --- a/google/ads/googleads/v2/errors/ad_group_criterion_error.proto +++ b/google/ads/googleads/v2/errors/ad_group_criterion_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/ad_group_error.proto b/google/ads/googleads/v2/errors/ad_group_error.proto index 1b197c9c8..69695f664 100644 --- a/google/ads/googleads/v2/errors/ad_group_error.proto +++ b/google/ads/googleads/v2/errors/ad_group_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/ad_group_feed_error.proto b/google/ads/googleads/v2/errors/ad_group_feed_error.proto index cfdc268bf..d2b9aa55e 100644 --- a/google/ads/googleads/v2/errors/ad_group_feed_error.proto +++ b/google/ads/googleads/v2/errors/ad_group_feed_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/ad_parameter_error.proto b/google/ads/googleads/v2/errors/ad_parameter_error.proto index 561765b35..fef5101a7 100644 --- a/google/ads/googleads/v2/errors/ad_parameter_error.proto +++ b/google/ads/googleads/v2/errors/ad_parameter_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/ad_sharing_error.proto b/google/ads/googleads/v2/errors/ad_sharing_error.proto index 1296d56a1..fe4d37492 100644 --- a/google/ads/googleads/v2/errors/ad_sharing_error.proto +++ b/google/ads/googleads/v2/errors/ad_sharing_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/adx_error.proto b/google/ads/googleads/v2/errors/adx_error.proto index 47646546e..3867d691c 100644 --- a/google/ads/googleads/v2/errors/adx_error.proto +++ b/google/ads/googleads/v2/errors/adx_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/asset_error.proto b/google/ads/googleads/v2/errors/asset_error.proto index 9b69fea80..db43c58c4 100644 --- a/google/ads/googleads/v2/errors/asset_error.proto +++ b/google/ads/googleads/v2/errors/asset_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/authentication_error.proto b/google/ads/googleads/v2/errors/authentication_error.proto index 1a639d9b5..ad2332542 100644 --- a/google/ads/googleads/v2/errors/authentication_error.proto +++ b/google/ads/googleads/v2/errors/authentication_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/authorization_error.proto b/google/ads/googleads/v2/errors/authorization_error.proto index b01f6594e..e116eb686 100644 --- a/google/ads/googleads/v2/errors/authorization_error.proto +++ b/google/ads/googleads/v2/errors/authorization_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -76,6 +75,10 @@ message AuthorizationErrorEnum { // The developer token is not approved. Non-approved developer tokens can // only be used with test accounts. DEVELOPER_TOKEN_NOT_APPROVED = 10; + + // The login customer specified does not have access to the account + // specified, so the request is invalid. + INVALID_LOGIN_CUSTOMER_ID_SERVING_CUSTOMER_ID_COMBINATION = 11; } diff --git a/google/ads/googleads/v2/errors/bidding_error.proto b/google/ads/googleads/v2/errors/bidding_error.proto index 5c84b226e..7b2ae6991 100644 --- a/google/ads/googleads/v2/errors/bidding_error.proto +++ b/google/ads/googleads/v2/errors/bidding_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/bidding_strategy_error.proto b/google/ads/googleads/v2/errors/bidding_strategy_error.proto index f7ecea26d..40c38ef6d 100644 --- a/google/ads/googleads/v2/errors/bidding_strategy_error.proto +++ b/google/ads/googleads/v2/errors/bidding_strategy_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/billing_setup_error.proto b/google/ads/googleads/v2/errors/billing_setup_error.proto index 7965b69b4..fda491061 100644 --- a/google/ads/googleads/v2/errors/billing_setup_error.proto +++ b/google/ads/googleads/v2/errors/billing_setup_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -40,62 +39,62 @@ message BillingSetupErrorEnum { // The received error code is not known in this version. UNKNOWN = 1; - // Cannot use both an existing Payments account and a new Payments account - // when setting up billing. + // Cannot specify both an existing payments account and a new payments + // account when setting up billing. CANNOT_USE_EXISTING_AND_NEW_ACCOUNT = 2; - // Cannot cancel an APPROVED billing setup whose start time has passed. + // Cannot cancel an approved billing setup whose start time has passed. CANNOT_REMOVE_STARTED_BILLING_SETUP = 3; - // Cannot perform a Change of Bill-To (CBT) to the same Payments account. + // Cannot perform a Change of Bill-To (CBT) to the same payments account. CANNOT_CHANGE_BILLING_TO_SAME_PAYMENTS_ACCOUNT = 4; - // Billing Setups can only be used by customers with ENABLED or DRAFT + // Billing setups can only be used by customers with ENABLED or DRAFT // status. BILLING_SETUP_NOT_PERMITTED_FOR_CUSTOMER_STATUS = 5; - // Billing Setups must either include a correctly formatted existing - // Payments account id, or a non-empty new Payments account name. + // Billing setups must either include a correctly formatted existing + // payments account id, or a non-empty new payments account name. INVALID_PAYMENTS_ACCOUNT = 6; // Only billable and third-party customers can create billing setups. BILLING_SETUP_NOT_PERMITTED_FOR_CUSTOMER_CATEGORY = 7; - // Billing Setup creations can only use NOW for start time type. + // Billing setup creations can only use NOW for start time type. INVALID_START_TIME_TYPE = 8; - // Billing Setups can only be created for a third-party customer if they do + // Billing setups can only be created for a third-party customer if they do // not already have a setup. THIRD_PARTY_ALREADY_HAS_BILLING = 9; - // Billing Setups cannot be created if there is already a pending billing in - // progress, ie. a billing known to Payments. + // Billing setups cannot be created if there is already a pending billing in + // progress. BILLING_SETUP_IN_PROGRESS = 10; - // Billing Setups can only be created by customers who have permission to + // Billing setups can only be created by customers who have permission to // setup billings. Users can contact a representative for help setting up // permissions. NO_SIGNUP_PERMISSION = 11; - // Billing Setups cannot be created if there is already a future-approved + // Billing setups cannot be created if there is already a future-approved // billing. CHANGE_OF_BILL_TO_IN_PROGRESS = 12; - // Billing Setup creation failed because Payments could not find the - // requested Payments profile. + // Requested payments profile not found. PAYMENTS_PROFILE_NOT_FOUND = 13; - // Billing Setup creation failed because Payments could not find the - // requested Payments account. + // Requested payments account not found. PAYMENTS_ACCOUNT_NOT_FOUND = 14; - // Billing Setup creation failed because Payments considers requested - // Payments profile ineligible. + // Billing setup creation failed because the payments profile is ineligible. PAYMENTS_PROFILE_INELIGIBLE = 15; - // Billing Setup creation failed because Payments considers requested - // Payments account ineligible. + // Billing setup creation failed because the payments account is ineligible. PAYMENTS_ACCOUNT_INELIGIBLE = 16; + + // Billing setup creation failed because the payments profile needs internal + // approval. + CUSTOMER_NEEDS_INTERNAL_APPROVAL = 17; } diff --git a/google/ads/googleads/v2/errors/campaign_budget_error.proto b/google/ads/googleads/v2/errors/campaign_budget_error.proto index 7ab1b149f..c5ce64106 100644 --- a/google/ads/googleads/v2/errors/campaign_budget_error.proto +++ b/google/ads/googleads/v2/errors/campaign_budget_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/campaign_criterion_error.proto b/google/ads/googleads/v2/errors/campaign_criterion_error.proto index ba0a017c8..fc6ec6884 100644 --- a/google/ads/googleads/v2/errors/campaign_criterion_error.proto +++ b/google/ads/googleads/v2/errors/campaign_criterion_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/campaign_draft_error.proto b/google/ads/googleads/v2/errors/campaign_draft_error.proto index 257ccb137..2884fffaa 100644 --- a/google/ads/googleads/v2/errors/campaign_draft_error.proto +++ b/google/ads/googleads/v2/errors/campaign_draft_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/campaign_error.proto b/google/ads/googleads/v2/errors/campaign_error.proto index c35bebe43..1738e54b6 100644 --- a/google/ads/googleads/v2/errors/campaign_error.proto +++ b/google/ads/googleads/v2/errors/campaign_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -82,11 +81,11 @@ message CampaignErrorEnum { // Given status is invalid. INVALID_AD_SERVING_OPTIMIZATION_STATUS = 15; - // Error in the campaign level tracking url. + // Error in the campaign level tracking URL. INVALID_TRACKING_URL = 16; - // Cannot set both tracking url template and tracking setting. An user has - // to clear legacy tracking setting in order to add tracking url template. + // Cannot set both tracking URL template and tracking setting. A user has + // to clear legacy tracking setting in order to add tracking URL template. CANNOT_SET_BOTH_TRACKING_URL_TEMPLATE_AND_TRACKING_SETTING = 17; // The maximum number of impressions for Frequency Cap should be an integer diff --git a/google/ads/googleads/v2/errors/campaign_experiment_error.proto b/google/ads/googleads/v2/errors/campaign_experiment_error.proto index 25db480ce..45e81b8ee 100644 --- a/google/ads/googleads/v2/errors/campaign_experiment_error.proto +++ b/google/ads/googleads/v2/errors/campaign_experiment_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/campaign_feed_error.proto b/google/ads/googleads/v2/errors/campaign_feed_error.proto index 37fd105dd..e7acbfd22 100644 --- a/google/ads/googleads/v2/errors/campaign_feed_error.proto +++ b/google/ads/googleads/v2/errors/campaign_feed_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/campaign_shared_set_error.proto b/google/ads/googleads/v2/errors/campaign_shared_set_error.proto index 0623b73a3..71cbbd33e 100644 --- a/google/ads/googleads/v2/errors/campaign_shared_set_error.proto +++ b/google/ads/googleads/v2/errors/campaign_shared_set_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/change_status_error.proto b/google/ads/googleads/v2/errors/change_status_error.proto index 957f2f685..08179adcf 100644 --- a/google/ads/googleads/v2/errors/change_status_error.proto +++ b/google/ads/googleads/v2/errors/change_status_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/collection_size_error.proto b/google/ads/googleads/v2/errors/collection_size_error.proto index 32dee5f9c..ddccb1146 100644 --- a/google/ads/googleads/v2/errors/collection_size_error.proto +++ b/google/ads/googleads/v2/errors/collection_size_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/context_error.proto b/google/ads/googleads/v2/errors/context_error.proto index 90ac6cbba..d952d8621 100644 --- a/google/ads/googleads/v2/errors/context_error.proto +++ b/google/ads/googleads/v2/errors/context_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/conversion_action_error.proto b/google/ads/googleads/v2/errors/conversion_action_error.proto index 083641e2a..0eb311cf1 100644 --- a/google/ads/googleads/v2/errors/conversion_action_error.proto +++ b/google/ads/googleads/v2/errors/conversion_action_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/conversion_adjustment_upload_error.proto b/google/ads/googleads/v2/errors/conversion_adjustment_upload_error.proto index d2eb1e904..0d31c6cb3 100644 --- a/google/ads/googleads/v2/errors/conversion_adjustment_upload_error.proto +++ b/google/ads/googleads/v2/errors/conversion_adjustment_upload_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/conversion_upload_error.proto b/google/ads/googleads/v2/errors/conversion_upload_error.proto index af55a4724..ec70cfb2c 100644 --- a/google/ads/googleads/v2/errors/conversion_upload_error.proto +++ b/google/ads/googleads/v2/errors/conversion_upload_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -56,7 +55,7 @@ message ConversionUploadErrorEnum { EXPIRED_GCLID = 5; // The click associated with the given gclid occurred too recently. Please - // try uploading again after 24 hours have passed since the click occurred. + // try uploading again after 6 hours have passed since the click occurred. TOO_RECENT_GCLID = 6; // The click associated with the given gclid could not be found in the @@ -103,7 +102,7 @@ message ConversionUploadErrorEnum { // conversion action combination. DUPLICATE_ORDER_ID = 16; - // The call occurred too recently. Please try uploading again after 24 hours + // The call occurred too recently. Please try uploading again after 6 hours // have passed since the call occurred. TOO_RECENT_CALL = 17; diff --git a/google/ads/googleads/v2/errors/country_code_error.proto b/google/ads/googleads/v2/errors/country_code_error.proto index c1a8ea55e..ed94ebe34 100644 --- a/google/ads/googleads/v2/errors/country_code_error.proto +++ b/google/ads/googleads/v2/errors/country_code_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/criterion_error.proto b/google/ads/googleads/v2/errors/criterion_error.proto index 8a39c6d09..5cc77705f 100644 --- a/google/ads/googleads/v2/errors/criterion_error.proto +++ b/google/ads/googleads/v2/errors/criterion_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/currency_code_error.proto b/google/ads/googleads/v2/errors/currency_code_error.proto index 3889e9b64..67cd74102 100644 --- a/google/ads/googleads/v2/errors/currency_code_error.proto +++ b/google/ads/googleads/v2/errors/currency_code_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/custom_interest_error.proto b/google/ads/googleads/v2/errors/custom_interest_error.proto index d457d84b2..542bdbfae 100644 --- a/google/ads/googleads/v2/errors/custom_interest_error.proto +++ b/google/ads/googleads/v2/errors/custom_interest_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/customer_client_link_error.proto b/google/ads/googleads/v2/errors/customer_client_link_error.proto index 4543aef14..2d169f870 100644 --- a/google/ads/googleads/v2/errors/customer_client_link_error.proto +++ b/google/ads/googleads/v2/errors/customer_client_link_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/customer_error.proto b/google/ads/googleads/v2/errors/customer_error.proto index 1bab8b7d0..1a9049660 100644 --- a/google/ads/googleads/v2/errors/customer_error.proto +++ b/google/ads/googleads/v2/errors/customer_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/customer_feed_error.proto b/google/ads/googleads/v2/errors/customer_feed_error.proto index 6c8290bcf..1fb7d9daa 100644 --- a/google/ads/googleads/v2/errors/customer_feed_error.proto +++ b/google/ads/googleads/v2/errors/customer_feed_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/customer_manager_link_error.proto b/google/ads/googleads/v2/errors/customer_manager_link_error.proto index 48d2ad85e..b808e9d9c 100644 --- a/google/ads/googleads/v2/errors/customer_manager_link_error.proto +++ b/google/ads/googleads/v2/errors/customer_manager_link_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/database_error.proto b/google/ads/googleads/v2/errors/database_error.proto index 5018e03ec..542e4ec9f 100644 --- a/google/ads/googleads/v2/errors/database_error.proto +++ b/google/ads/googleads/v2/errors/database_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/date_error.proto b/google/ads/googleads/v2/errors/date_error.proto index 803069a6a..1f956ae4a 100644 --- a/google/ads/googleads/v2/errors/date_error.proto +++ b/google/ads/googleads/v2/errors/date_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/date_range_error.proto b/google/ads/googleads/v2/errors/date_range_error.proto index a748d7fad..935b1d915 100644 --- a/google/ads/googleads/v2/errors/date_range_error.proto +++ b/google/ads/googleads/v2/errors/date_range_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/distinct_error.proto b/google/ads/googleads/v2/errors/distinct_error.proto index cc80a645b..50beaf2eb 100644 --- a/google/ads/googleads/v2/errors/distinct_error.proto +++ b/google/ads/googleads/v2/errors/distinct_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/enum_error.proto b/google/ads/googleads/v2/errors/enum_error.proto index c03ca0d66..2dc2bc83d 100644 --- a/google/ads/googleads/v2/errors/enum_error.proto +++ b/google/ads/googleads/v2/errors/enum_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/errors.proto b/google/ads/googleads/v2/errors/errors.proto index e0714b8bc..2c70a9812 100644 --- a/google/ads/googleads/v2/errors/errors.proto +++ b/google/ads/googleads/v2/errors/errors.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -80,6 +79,7 @@ import "google/ads/googleads/v2/errors/header_error.proto"; import "google/ads/googleads/v2/errors/id_error.proto"; import "google/ads/googleads/v2/errors/image_error.proto"; import "google/ads/googleads/v2/errors/internal_error.proto"; +import "google/ads/googleads/v2/errors/invoice_error.proto"; import "google/ads/googleads/v2/errors/keyword_plan_ad_group_error.proto"; import "google/ads/googleads/v2/errors/keyword_plan_campaign_error.proto"; import "google/ads/googleads/v2/errors/keyword_plan_error.proto"; @@ -109,6 +109,7 @@ import "google/ads/googleads/v2/errors/policy_violation_error.proto"; import "google/ads/googleads/v2/errors/query_error.proto"; import "google/ads/googleads/v2/errors/quota_error.proto"; import "google/ads/googleads/v2/errors/range_error.proto"; +import "google/ads/googleads/v2/errors/reach_plan_error.proto"; import "google/ads/googleads/v2/errors/recommendation_error.proto"; import "google/ads/googleads/v2/errors/region_code_error.proto"; import "google/ads/googleads/v2/errors/request_error.proto"; @@ -478,6 +479,12 @@ message ErrorCode { // The reasons for the access invitation error AccessInvitationErrorEnum.AccessInvitationError access_invitation_error = 124; + + // The reasons for the reach plan error + ReachPlanErrorEnum.ReachPlanError reach_plan_error = 125; + + // The reasons for the invoice error + InvoiceErrorEnum.InvoiceError invoice_error = 126; } } diff --git a/google/ads/googleads/v2/errors/extension_feed_item_error.proto b/google/ads/googleads/v2/errors/extension_feed_item_error.proto index ba98509f3..b9d148048 100644 --- a/google/ads/googleads/v2/errors/extension_feed_item_error.proto +++ b/google/ads/googleads/v2/errors/extension_feed_item_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/extension_setting_error.proto b/google/ads/googleads/v2/errors/extension_setting_error.proto index 85a646400..c21b6a636 100644 --- a/google/ads/googleads/v2/errors/extension_setting_error.proto +++ b/google/ads/googleads/v2/errors/extension_setting_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/feed_attribute_reference_error.proto b/google/ads/googleads/v2/errors/feed_attribute_reference_error.proto index cbd82ea95..dcd03b9d5 100644 --- a/google/ads/googleads/v2/errors/feed_attribute_reference_error.proto +++ b/google/ads/googleads/v2/errors/feed_attribute_reference_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/feed_error.proto b/google/ads/googleads/v2/errors/feed_error.proto index 43461f666..4a1510482 100644 --- a/google/ads/googleads/v2/errors/feed_error.proto +++ b/google/ads/googleads/v2/errors/feed_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/feed_item_error.proto b/google/ads/googleads/v2/errors/feed_item_error.proto index a26c2efc9..c85c05a8e 100644 --- a/google/ads/googleads/v2/errors/feed_item_error.proto +++ b/google/ads/googleads/v2/errors/feed_item_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/feed_item_target_error.proto b/google/ads/googleads/v2/errors/feed_item_target_error.proto index b54277f71..8de9235d3 100644 --- a/google/ads/googleads/v2/errors/feed_item_target_error.proto +++ b/google/ads/googleads/v2/errors/feed_item_target_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/feed_item_validation_error.proto b/google/ads/googleads/v2/errors/feed_item_validation_error.proto index f4fe8425b..0864c6025 100644 --- a/google/ads/googleads/v2/errors/feed_item_validation_error.proto +++ b/google/ads/googleads/v2/errors/feed_item_validation_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -342,6 +341,12 @@ message FeedItemValidationErrorEnum { // Longitude value is missing. MISSING_LONGITUDE_VALUE = 96; + + // Unable to find address. + ADDRESS_NOT_FOUND = 97; + + // Cannot target provided address. + ADDRESS_NOT_TARGETABLE = 98; } diff --git a/google/ads/googleads/v2/errors/feed_mapping_error.proto b/google/ads/googleads/v2/errors/feed_mapping_error.proto index 72c62c30e..d00965b67 100644 --- a/google/ads/googleads/v2/errors/feed_mapping_error.proto +++ b/google/ads/googleads/v2/errors/feed_mapping_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/field_error.proto b/google/ads/googleads/v2/errors/field_error.proto index 06932760b..860535da3 100644 --- a/google/ads/googleads/v2/errors/field_error.proto +++ b/google/ads/googleads/v2/errors/field_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/field_mask_error.proto b/google/ads/googleads/v2/errors/field_mask_error.proto index 89ef40671..17fc36a48 100644 --- a/google/ads/googleads/v2/errors/field_mask_error.proto +++ b/google/ads/googleads/v2/errors/field_mask_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/function_error.proto b/google/ads/googleads/v2/errors/function_error.proto index bdf31bc01..82e18864d 100644 --- a/google/ads/googleads/v2/errors/function_error.proto +++ b/google/ads/googleads/v2/errors/function_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/function_parsing_error.proto b/google/ads/googleads/v2/errors/function_parsing_error.proto index b93804c4d..396579c59 100644 --- a/google/ads/googleads/v2/errors/function_parsing_error.proto +++ b/google/ads/googleads/v2/errors/function_parsing_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/geo_target_constant_suggestion_error.proto b/google/ads/googleads/v2/errors/geo_target_constant_suggestion_error.proto index 4a4904464..e0f8479b9 100644 --- a/google/ads/googleads/v2/errors/geo_target_constant_suggestion_error.proto +++ b/google/ads/googleads/v2/errors/geo_target_constant_suggestion_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/header_error.proto b/google/ads/googleads/v2/errors/header_error.proto index bd3276d88..c230cebb0 100644 --- a/google/ads/googleads/v2/errors/header_error.proto +++ b/google/ads/googleads/v2/errors/header_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/id_error.proto b/google/ads/googleads/v2/errors/id_error.proto index 4324e8f9b..8ede7d189 100644 --- a/google/ads/googleads/v2/errors/id_error.proto +++ b/google/ads/googleads/v2/errors/id_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/image_error.proto b/google/ads/googleads/v2/errors/image_error.proto index 2d76b5391..4907e1325 100644 --- a/google/ads/googleads/v2/errors/image_error.proto +++ b/google/ads/googleads/v2/errors/image_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/internal_error.proto b/google/ads/googleads/v2/errors/internal_error.proto index f0f6d7a02..1a7210bf3 100644 --- a/google/ads/googleads/v2/errors/internal_error.proto +++ b/google/ads/googleads/v2/errors/internal_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -43,8 +42,8 @@ message InternalErrorEnum { // Google Ads API encountered unexpected internal error. INTERNAL_ERROR = 2; - // The intended error code doesn't exist in any API version. This will be - // fixed by adding a new error code as soon as possible. + // The intended error code doesn't exist in specified API version. It will + // be released in a future API version. ERROR_CODE_NOT_PUBLISHED = 3; // Google Ads API encountered an unexpected transient error. The user diff --git a/google/ads/googleads/v2/errors/invoice_error.proto b/google/ads/googleads/v2/errors/invoice_error.proto new file mode 100644 index 000000000..a454930db --- /dev/null +++ b/google/ads/googleads/v2/errors/invoice_error.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v2.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "InvoiceErrorProto"; +option java_package = "com.google.ads.googleads.v2.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V2::Errors"; + +// Proto file describing invoice errors. + +// Container for enum describing possible invoice errors. +message InvoiceErrorEnum { + // Enum describing possible invoice errors. + enum InvoiceError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Cannot request invoices issued before 2019-01-01. + YEAR_MONTH_TOO_OLD = 2; + + // Cannot request invoices for customer who doesn't receive invoices. + NOT_INVOICED_CUSTOMER = 3; + } + + +} diff --git a/google/ads/googleads/v2/errors/keyword_plan_ad_group_error.proto b/google/ads/googleads/v2/errors/keyword_plan_ad_group_error.proto index 15cd514e7..b2a2a0058 100644 --- a/google/ads/googleads/v2/errors/keyword_plan_ad_group_error.proto +++ b/google/ads/googleads/v2/errors/keyword_plan_ad_group_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/keyword_plan_campaign_error.proto b/google/ads/googleads/v2/errors/keyword_plan_campaign_error.proto index 50b7b2eb4..c43f04a62 100644 --- a/google/ads/googleads/v2/errors/keyword_plan_campaign_error.proto +++ b/google/ads/googleads/v2/errors/keyword_plan_campaign_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/keyword_plan_error.proto b/google/ads/googleads/v2/errors/keyword_plan_error.proto index f2b71eb0e..b6bcac5dc 100644 --- a/google/ads/googleads/v2/errors/keyword_plan_error.proto +++ b/google/ads/googleads/v2/errors/keyword_plan_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/keyword_plan_idea_error.proto b/google/ads/googleads/v2/errors/keyword_plan_idea_error.proto index c5c1fff69..603b4a725 100644 --- a/google/ads/googleads/v2/errors/keyword_plan_idea_error.proto +++ b/google/ads/googleads/v2/errors/keyword_plan_idea_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/keyword_plan_keyword_error.proto b/google/ads/googleads/v2/errors/keyword_plan_keyword_error.proto index 12a19d431..353707501 100644 --- a/google/ads/googleads/v2/errors/keyword_plan_keyword_error.proto +++ b/google/ads/googleads/v2/errors/keyword_plan_keyword_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/keyword_plan_negative_keyword_error.proto b/google/ads/googleads/v2/errors/keyword_plan_negative_keyword_error.proto index b835f81d9..cfb9d2f54 100644 --- a/google/ads/googleads/v2/errors/keyword_plan_negative_keyword_error.proto +++ b/google/ads/googleads/v2/errors/keyword_plan_negative_keyword_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/label_error.proto b/google/ads/googleads/v2/errors/label_error.proto index 1698d3d8e..790b63e20 100644 --- a/google/ads/googleads/v2/errors/label_error.proto +++ b/google/ads/googleads/v2/errors/label_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/language_code_error.proto b/google/ads/googleads/v2/errors/language_code_error.proto index 6fe688ac9..024cfd28e 100644 --- a/google/ads/googleads/v2/errors/language_code_error.proto +++ b/google/ads/googleads/v2/errors/language_code_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/list_operation_error.proto b/google/ads/googleads/v2/errors/list_operation_error.proto index 535b8f3db..01cb3b073 100644 --- a/google/ads/googleads/v2/errors/list_operation_error.proto +++ b/google/ads/googleads/v2/errors/list_operation_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/manager_link_error.proto b/google/ads/googleads/v2/errors/manager_link_error.proto index 13a567de7..8ee62f156 100644 --- a/google/ads/googleads/v2/errors/manager_link_error.proto +++ b/google/ads/googleads/v2/errors/manager_link_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/media_bundle_error.proto b/google/ads/googleads/v2/errors/media_bundle_error.proto index 54976519c..9f7ddc418 100644 --- a/google/ads/googleads/v2/errors/media_bundle_error.proto +++ b/google/ads/googleads/v2/errors/media_bundle_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/media_file_error.proto b/google/ads/googleads/v2/errors/media_file_error.proto index 9e8505e1d..700e4438f 100644 --- a/google/ads/googleads/v2/errors/media_file_error.proto +++ b/google/ads/googleads/v2/errors/media_file_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/media_upload_error.proto b/google/ads/googleads/v2/errors/media_upload_error.proto index f14383534..d9da83549 100644 --- a/google/ads/googleads/v2/errors/media_upload_error.proto +++ b/google/ads/googleads/v2/errors/media_upload_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/multiplier_error.proto b/google/ads/googleads/v2/errors/multiplier_error.proto index bf3ffbdb8..182a1ec93 100644 --- a/google/ads/googleads/v2/errors/multiplier_error.proto +++ b/google/ads/googleads/v2/errors/multiplier_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/mutate_error.proto b/google/ads/googleads/v2/errors/mutate_error.proto index 78a492a84..1eed6c083 100644 --- a/google/ads/googleads/v2/errors/mutate_error.proto +++ b/google/ads/googleads/v2/errors/mutate_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/mutate_job_error.proto b/google/ads/googleads/v2/errors/mutate_job_error.proto index 482c8bcfe..3b1d306a8 100644 --- a/google/ads/googleads/v2/errors/mutate_job_error.proto +++ b/google/ads/googleads/v2/errors/mutate_job_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/new_resource_creation_error.proto b/google/ads/googleads/v2/errors/new_resource_creation_error.proto index 0a329e5fa..0d32d0079 100644 --- a/google/ads/googleads/v2/errors/new_resource_creation_error.proto +++ b/google/ads/googleads/v2/errors/new_resource_creation_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/not_empty_error.proto b/google/ads/googleads/v2/errors/not_empty_error.proto index 6ce8e191c..a745082ab 100644 --- a/google/ads/googleads/v2/errors/not_empty_error.proto +++ b/google/ads/googleads/v2/errors/not_empty_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/not_whitelisted_error.proto b/google/ads/googleads/v2/errors/not_whitelisted_error.proto index 559f694a6..80940a19e 100644 --- a/google/ads/googleads/v2/errors/not_whitelisted_error.proto +++ b/google/ads/googleads/v2/errors/not_whitelisted_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/null_error.proto b/google/ads/googleads/v2/errors/null_error.proto index f93b149d5..640e49ef6 100644 --- a/google/ads/googleads/v2/errors/null_error.proto +++ b/google/ads/googleads/v2/errors/null_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/operation_access_denied_error.proto b/google/ads/googleads/v2/errors/operation_access_denied_error.proto index 59986c22f..9d3dbe8cb 100644 --- a/google/ads/googleads/v2/errors/operation_access_denied_error.proto +++ b/google/ads/googleads/v2/errors/operation_access_denied_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/operator_error.proto b/google/ads/googleads/v2/errors/operator_error.proto index 8e56aaa42..2a43d832c 100644 --- a/google/ads/googleads/v2/errors/operator_error.proto +++ b/google/ads/googleads/v2/errors/operator_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/partial_failure_error.proto b/google/ads/googleads/v2/errors/partial_failure_error.proto index f6d7e9f94..807aacd11 100644 --- a/google/ads/googleads/v2/errors/partial_failure_error.proto +++ b/google/ads/googleads/v2/errors/partial_failure_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/policy_finding_error.proto b/google/ads/googleads/v2/errors/policy_finding_error.proto index 15701cdb5..29895a6ed 100644 --- a/google/ads/googleads/v2/errors/policy_finding_error.proto +++ b/google/ads/googleads/v2/errors/policy_finding_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/policy_validation_parameter_error.proto b/google/ads/googleads/v2/errors/policy_validation_parameter_error.proto index 5cb642369..3ac696471 100644 --- a/google/ads/googleads/v2/errors/policy_validation_parameter_error.proto +++ b/google/ads/googleads/v2/errors/policy_validation_parameter_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/policy_violation_error.proto b/google/ads/googleads/v2/errors/policy_violation_error.proto index 07e462bfc..ba8dfec84 100644 --- a/google/ads/googleads/v2/errors/policy_violation_error.proto +++ b/google/ads/googleads/v2/errors/policy_violation_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/query_error.proto b/google/ads/googleads/v2/errors/query_error.proto index 8a56b4897..32637921d 100644 --- a/google/ads/googleads/v2/errors/query_error.proto +++ b/google/ads/googleads/v2/errors/query_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/quota_error.proto b/google/ads/googleads/v2/errors/quota_error.proto index 869c3e8a8..337d9405d 100644 --- a/google/ads/googleads/v2/errors/quota_error.proto +++ b/google/ads/googleads/v2/errors/quota_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/range_error.proto b/google/ads/googleads/v2/errors/range_error.proto index 954701048..e1ab6bf81 100644 --- a/google/ads/googleads/v2/errors/range_error.proto +++ b/google/ads/googleads/v2/errors/range_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/reach_plan_error.proto b/google/ads/googleads/v2/errors/reach_plan_error.proto new file mode 100644 index 000000000..80df2ff43 --- /dev/null +++ b/google/ads/googleads/v2/errors/reach_plan_error.proto @@ -0,0 +1,45 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v2.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ReachPlanErrorProto"; +option java_package = "com.google.ads.googleads.v2.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V2::Errors"; + +// Proto file describing errors generated from ReachPlanService. + +// Container for enum describing possible errors returned from +// the ReachPlanService. +message ReachPlanErrorEnum { + // Enum describing possible errors from ReachPlanService. + enum ReachPlanError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + } + + +} diff --git a/google/ads/googleads/v2/errors/recommendation_error.proto b/google/ads/googleads/v2/errors/recommendation_error.proto index 34a0d6d81..1fdeb71b0 100644 --- a/google/ads/googleads/v2/errors/recommendation_error.proto +++ b/google/ads/googleads/v2/errors/recommendation_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/region_code_error.proto b/google/ads/googleads/v2/errors/region_code_error.proto index 608fd1378..49ba7747e 100644 --- a/google/ads/googleads/v2/errors/region_code_error.proto +++ b/google/ads/googleads/v2/errors/region_code_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/request_error.proto b/google/ads/googleads/v2/errors/request_error.proto index 0a9569511..5b1f126d6 100644 --- a/google/ads/googleads/v2/errors/request_error.proto +++ b/google/ads/googleads/v2/errors/request_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/resource_access_denied_error.proto b/google/ads/googleads/v2/errors/resource_access_denied_error.proto index a683d4521..09db63c58 100644 --- a/google/ads/googleads/v2/errors/resource_access_denied_error.proto +++ b/google/ads/googleads/v2/errors/resource_access_denied_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/resource_count_limit_exceeded_error.proto b/google/ads/googleads/v2/errors/resource_count_limit_exceeded_error.proto index 025f69b3d..0b9e6701c 100644 --- a/google/ads/googleads/v2/errors/resource_count_limit_exceeded_error.proto +++ b/google/ads/googleads/v2/errors/resource_count_limit_exceeded_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/setting_error.proto b/google/ads/googleads/v2/errors/setting_error.proto index 5aa5f09a3..eb60df171 100644 --- a/google/ads/googleads/v2/errors/setting_error.proto +++ b/google/ads/googleads/v2/errors/setting_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/shared_criterion_error.proto b/google/ads/googleads/v2/errors/shared_criterion_error.proto index 1af20ad74..3870b6814 100644 --- a/google/ads/googleads/v2/errors/shared_criterion_error.proto +++ b/google/ads/googleads/v2/errors/shared_criterion_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/shared_set_error.proto b/google/ads/googleads/v2/errors/shared_set_error.proto index d47e1d41e..b868c66f0 100644 --- a/google/ads/googleads/v2/errors/shared_set_error.proto +++ b/google/ads/googleads/v2/errors/shared_set_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/size_limit_error.proto b/google/ads/googleads/v2/errors/size_limit_error.proto index f49ee810d..9a94beef3 100644 --- a/google/ads/googleads/v2/errors/size_limit_error.proto +++ b/google/ads/googleads/v2/errors/size_limit_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/string_format_error.proto b/google/ads/googleads/v2/errors/string_format_error.proto index 63b3916ec..7dddad081 100644 --- a/google/ads/googleads/v2/errors/string_format_error.proto +++ b/google/ads/googleads/v2/errors/string_format_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/string_length_error.proto b/google/ads/googleads/v2/errors/string_length_error.proto index 3191fb42b..8764ca727 100644 --- a/google/ads/googleads/v2/errors/string_length_error.proto +++ b/google/ads/googleads/v2/errors/string_length_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/url_field_error.proto b/google/ads/googleads/v2/errors/url_field_error.proto index 715aac112..2e306caef 100644 --- a/google/ads/googleads/v2/errors/url_field_error.proto +++ b/google/ads/googleads/v2/errors/url_field_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/user_list_error.proto b/google/ads/googleads/v2/errors/user_list_error.proto index afd4d5d4d..6c01b42e4 100644 --- a/google/ads/googleads/v2/errors/user_list_error.proto +++ b/google/ads/googleads/v2/errors/user_list_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/errors/youtube_video_registration_error.proto b/google/ads/googleads/v2/errors/youtube_video_registration_error.proto index 7eec32be0..4f93401c7 100644 --- a/google/ads/googleads/v2/errors/youtube_video_registration_error.proto +++ b/google/ads/googleads/v2/errors/youtube_video_registration_error.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/ads/googleads/v2/googleads_gapic.yaml b/google/ads/googleads/v2/googleads_gapic.yaml new file mode 100644 index 000000000..ff8c544fd --- /dev/null +++ b/google/ads/googleads/v2/googleads_gapic.yaml @@ -0,0 +1,17 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + csharp: + package_name: Google.Ads.GoogleAds.V2.Services + go: + package_name: google.golang.org/google/ads/googleads/v2/services + java: + package_name: com.google.ads.googleads.v2.services + nodejs: + package_name: v2.services + php: + package_name: Google\Ads\Googleads\V2\Services + python: + package_name: google.ads.googleads_v2.gapic.services + ruby: + package_name: Google::Ads::Googleads::V2::Services diff --git a/google/ads/googleads/v2/googleads_grpc_service_config.json b/google/ads/googleads/v2/googleads_grpc_service_config.json new file mode 100644 index 000000000..d2a0c54bc --- /dev/null +++ b/google/ads/googleads/v2/googleads_grpc_service_config.json @@ -0,0 +1,124 @@ +{ + "methodConfig": [ + { + "name": [ + { "service": "google.ads.googleads.v2.services.AccountBudgetProposalService" }, + { "service": "google.ads.googleads.v2.services.AccountBudgetService" }, + { "service": "google.ads.googleads.v2.services.AdGroupAdLabelService" }, + { "service": "google.ads.googleads.v2.services.AdGroupAdAssetViewService" }, + { "service": "google.ads.googleads.v2.services.AdGroupAdService" }, + { "service": "google.ads.googleads.v2.services.AdGroupAudienceViewService" }, + { "service": "google.ads.googleads.v2.services.AdGroupBidModifierService" }, + { "service": "google.ads.googleads.v2.services.AdGroupCriterionLabelService" }, + { "service": "google.ads.googleads.v2.services.AdGroupCriterionService" }, + { "service": "google.ads.googleads.v2.services.AdGroupCriterionSimulationService" }, + { "service": "google.ads.googleads.v2.services.AdGroupExtensionSettingService" }, + { "service": "google.ads.googleads.v2.services.AdGroupFeedService" }, + { "service": "google.ads.googleads.v2.services.AdGroupLabelService" }, + { "service": "google.ads.googleads.v2.services.AdGroupService" }, + { "service": "google.ads.googleads.v2.services.AdGroupSimulationService" }, + { "service": "google.ads.googleads.v2.services.AdParameterService" }, + { "service": "google.ads.googleads.v2.services.AdScheduleViewService" }, + { "service": "google.ads.googleads.v2.services.AdService" }, + { "service": "google.ads.googleads.v2.services.AgeRangeViewService" }, + { "service": "google.ads.googleads.v2.services.AssetService" }, + { "service": "google.ads.googleads.v2.services.BiddingStrategyService" }, + { "service": "google.ads.googleads.v2.services.BillingSetupService" }, + { "service": "google.ads.googleads.v2.services.CampaignAudienceViewService" }, + { "service": "google.ads.googleads.v2.services.CampaignBidModifierService" }, + { "service": "google.ads.googleads.v2.services.CampaignBudgetService" }, + { "service": "google.ads.googleads.v2.services.CampaignCriterionService" }, + { "service": "google.ads.googleads.v2.services.CampaignCriterionSimulationService" }, + { "service": "google.ads.googleads.v2.services.CampaignDraftService" }, + { "service": "google.ads.googleads.v2.services.CampaignExperimentService" }, + { "service": "google.ads.googleads.v2.services.CampaignExtensionSettingService" }, + { "service": "google.ads.googleads.v2.services.CampaignFeedService" }, + { "service": "google.ads.googleads.v2.services.CampaignLabelService" }, + { "service": "google.ads.googleads.v2.services.CampaignService" }, + { "service": "google.ads.googleads.v2.services.CampaignSharedSetService" }, + { "service": "google.ads.googleads.v2.services.CarrierConstantService" }, + { "service": "google.ads.googleads.v2.services.ChangeStatusService" }, + { "service": "google.ads.googleads.v2.services.ClickViewService" }, + { "service": "google.ads.googleads.v2.services.ConversionActionService" }, + { "service": "google.ads.googleads.v2.services.ConversionAdjustmentUploadService" }, + { "service": "google.ads.googleads.v2.services.ConversionUploadService" }, + { "service": "google.ads.googleads.v2.services.CustomInterestService" }, + { "service": "google.ads.googleads.v2.services.CustomerClientLinkService" }, + { "service": "google.ads.googleads.v2.services.CustomerClientService" }, + { "service": "google.ads.googleads.v2.services.CustomerExtensionSettingService" }, + { "service": "google.ads.googleads.v2.services.CustomerFeedService" }, + { "service": "google.ads.googleads.v2.services.CustomerLabelService" }, + { "service": "google.ads.googleads.v2.services.CustomerManagerLinkService" }, + { "service": "google.ads.googleads.v2.services.CustomerNegativeCriterionService" }, + { "service": "google.ads.googleads.v2.services.CustomerService" }, + { "service": "google.ads.googleads.v2.services.DetailPlacementViewService" }, + { "service": "google.ads.googleads.v2.services.DisplayKeywordViewService" }, + { "service": "google.ads.googleads.v2.services.DistanceViewService" }, + { "service": "google.ads.googleads.v2.services.DomainCategoryService" }, + { "service": "google.ads.googleads.v2.services.DynamicSearchAdsSearchTermViewService" }, + { "service": "google.ads.googleads.v2.services.ExpandedLandingPageViewService" }, + { "service": "google.ads.googleads.v2.services.ExtensionFeedItemService" }, + { "service": "google.ads.googleads.v2.services.FeedItemService" }, + { "service": "google.ads.googleads.v2.services.FeedItemTargetService" }, + { "service": "google.ads.googleads.v2.services.FeedMappingService" }, + { "service": "google.ads.googleads.v2.services.FeedPlaceholderViewService" }, + { "service": "google.ads.googleads.v2.services.FeedService" }, + { "service": "google.ads.googleads.v2.services.GenderViewService" }, + { "service": "google.ads.googleads.v2.services.GeographicViewService" }, + { "service": "google.ads.googleads.v2.services.GeoTargetConstantService" }, + { "service": "google.ads.googleads.v2.services.GoogleAdsFieldService" }, + { "service": "google.ads.googleads.v2.services.GoogleAdsService" }, + { "service": "google.ads.googleads.v2.services.GroupPlacementViewService" }, + { "service": "google.ads.googleads.v2.services.HotelGroupViewService" }, + { "service": "google.ads.googleads.v2.services.HotelPerformanceViewService" }, + { "service": "google.ads.googleads.v2.services.InvoiceService" }, + { "service": "google.ads.googleads.v2.services.KeywordPlanAdGroupService" }, + { "service": "google.ads.googleads.v2.services.KeywordPlanCampaignService" }, + { "service": "google.ads.googleads.v2.services.KeywordPlanIdeaService" }, + { "service": "google.ads.googleads.v2.services.KeywordPlanKeywordService" }, + { "service": "google.ads.googleads.v2.services.KeywordPlanNegativeKeywordService" }, + { "service": "google.ads.googleads.v2.services.KeywordPlanService" }, + { "service": "google.ads.googleads.v2.services.KeywordViewService" }, + { "service": "google.ads.googleads.v2.services.LabelService" }, + { "service": "google.ads.googleads.v2.services.LandingPageViewService" }, + { "service": "google.ads.googleads.v2.services.LanguageConstantService" }, + { "service": "google.ads.googleads.v2.services.LocationViewService" }, + { "service": "google.ads.googleads.v2.services.ManagedPlacementViewService" }, + { "service": "google.ads.googleads.v2.services.MediaFileService" }, + { "service": "google.ads.googleads.v2.services.MerchantCenterLinkService" }, + { "service": "google.ads.googleads.v2.services.MobileAppCategoryConstantService" }, + { "service": "google.ads.googleads.v2.services.MobileDeviceConstantService" }, + { "service": "google.ads.googleads.v2.services.MutateJobService" }, + { "service": "google.ads.googleads.v2.services.OperatingSystemVersionConstantService" }, + { "service": "google.ads.googleads.v2.services.PaidOrganicSearchTermViewService" }, + { "service": "google.ads.googleads.v2.services.ParentalStatusViewService" }, + { "service": "google.ads.googleads.v2.services.PaymentsAccountService" }, + { "service": "google.ads.googleads.v2.services.ProductBiddingCategoryConstantService" }, + { "service": "google.ads.googleads.v2.services.ProductGroupViewService" }, + { "service": "google.ads.googleads.v2.services.ReachPlanService" }, + { "service": "google.ads.googleads.v2.services.RecommendationService" }, + { "service": "google.ads.googleads.v2.services.RemarketingActionService" }, + { "service": "google.ads.googleads.v2.services.SearchTermViewService" }, + { "service": "google.ads.googleads.v2.services.SharedCriterionService" }, + { "service": "google.ads.googleads.v2.services.SharedSetService" }, + { "service": "google.ads.googleads.v2.services.ShoppingPerformanceViewService" }, + { "service": "google.ads.googleads.v2.services.TopicConstantService" }, + { "service": "google.ads.googleads.v2.services.TopicViewService" }, + { "service": "google.ads.googleads.v2.services.UserInterestService" }, + { "service": "google.ads.googleads.v2.services.UserListService" }, + { "service": "google.ads.googleads.v2.services.UserLocationViewService" }, + { "service": "google.ads.googleads.v2.services.VideoService" } + ], + "timeout": "3600s", + "retryPolicy": { + "initialBackoff": "5s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/ads/googleads/v2/googleads_v2.yaml b/google/ads/googleads/v2/googleads_v2.yaml new file mode 100644 index 000000000..7774a300d --- /dev/null +++ b/google/ads/googleads/v2/googleads_v2.yaml @@ -0,0 +1,449 @@ +type: google.api.Service +config_version: 3 +name: googleads.googleapis.com +title: Google Ads API + +apis: +- name: google.ads.googleads.v2.services.AccountBudgetProposalService +- name: google.ads.googleads.v2.services.AccountBudgetService +- name: google.ads.googleads.v2.services.AdGroupAdAssetViewService +- name: google.ads.googleads.v2.services.AdGroupAdLabelService +- name: google.ads.googleads.v2.services.AdGroupAdService +- name: google.ads.googleads.v2.services.AdGroupAudienceViewService +- name: google.ads.googleads.v2.services.AdGroupBidModifierService +- name: google.ads.googleads.v2.services.AdGroupCriterionLabelService +- name: google.ads.googleads.v2.services.AdGroupCriterionService +- name: google.ads.googleads.v2.services.AdGroupCriterionSimulationService +- name: google.ads.googleads.v2.services.AdGroupExtensionSettingService +- name: google.ads.googleads.v2.services.AdGroupFeedService +- name: google.ads.googleads.v2.services.AdGroupLabelService +- name: google.ads.googleads.v2.services.AdGroupService +- name: google.ads.googleads.v2.services.AdGroupSimulationService +- name: google.ads.googleads.v2.services.AdParameterService +- name: google.ads.googleads.v2.services.AdScheduleViewService +- name: google.ads.googleads.v2.services.AdService +- name: google.ads.googleads.v2.services.AgeRangeViewService +- name: google.ads.googleads.v2.services.AssetService +- name: google.ads.googleads.v2.services.BiddingStrategyService +- name: google.ads.googleads.v2.services.BillingSetupService +- name: google.ads.googleads.v2.services.CampaignAudienceViewService +- name: google.ads.googleads.v2.services.CampaignBidModifierService +- name: google.ads.googleads.v2.services.CampaignBudgetService +- name: google.ads.googleads.v2.services.CampaignCriterionService +- name: google.ads.googleads.v2.services.CampaignCriterionSimulationService +- name: google.ads.googleads.v2.services.CampaignDraftService +- name: google.ads.googleads.v2.services.CampaignExperimentService +- name: google.ads.googleads.v2.services.CampaignExtensionSettingService +- name: google.ads.googleads.v2.services.CampaignFeedService +- name: google.ads.googleads.v2.services.CampaignLabelService +- name: google.ads.googleads.v2.services.CampaignService +- name: google.ads.googleads.v2.services.CampaignSharedSetService +- name: google.ads.googleads.v2.services.CarrierConstantService +- name: google.ads.googleads.v2.services.ChangeStatusService +- name: google.ads.googleads.v2.services.ClickViewService +- name: google.ads.googleads.v2.services.ConversionActionService +- name: google.ads.googleads.v2.services.ConversionAdjustmentUploadService +- name: google.ads.googleads.v2.services.ConversionUploadService +- name: google.ads.googleads.v2.services.CustomInterestService +- name: google.ads.googleads.v2.services.CustomerClientLinkService +- name: google.ads.googleads.v2.services.CustomerClientService +- name: google.ads.googleads.v2.services.CustomerExtensionSettingService +- name: google.ads.googleads.v2.services.CustomerFeedService +- name: google.ads.googleads.v2.services.CustomerLabelService +- name: google.ads.googleads.v2.services.CustomerManagerLinkService +- name: google.ads.googleads.v2.services.CustomerNegativeCriterionService +- name: google.ads.googleads.v2.services.CustomerService +- name: google.ads.googleads.v2.services.DetailPlacementViewService +- name: google.ads.googleads.v2.services.DisplayKeywordViewService +- name: google.ads.googleads.v2.services.DistanceViewService +- name: google.ads.googleads.v2.services.DomainCategoryService +- name: google.ads.googleads.v2.services.DynamicSearchAdsSearchTermViewService +- name: google.ads.googleads.v2.services.ExpandedLandingPageViewService +- name: google.ads.googleads.v2.services.ExtensionFeedItemService +- name: google.ads.googleads.v2.services.FeedItemService +- name: google.ads.googleads.v2.services.FeedItemTargetService +- name: google.ads.googleads.v2.services.FeedMappingService +- name: google.ads.googleads.v2.services.FeedPlaceholderViewService +- name: google.ads.googleads.v2.services.FeedService +- name: google.ads.googleads.v2.services.GenderViewService +- name: google.ads.googleads.v2.services.GeoTargetConstantService +- name: google.ads.googleads.v2.services.GeographicViewService +- name: google.ads.googleads.v2.services.GoogleAdsFieldService +- name: google.ads.googleads.v2.services.GoogleAdsService +- name: google.ads.googleads.v2.services.GroupPlacementViewService +- name: google.ads.googleads.v2.services.HotelGroupViewService +- name: google.ads.googleads.v2.services.HotelPerformanceViewService +- name: google.ads.googleads.v2.services.InvoiceService +- name: google.ads.googleads.v2.services.KeywordPlanAdGroupService +- name: google.ads.googleads.v2.services.KeywordPlanCampaignService +- name: google.ads.googleads.v2.services.KeywordPlanIdeaService +- name: google.ads.googleads.v2.services.KeywordPlanKeywordService +- name: google.ads.googleads.v2.services.KeywordPlanNegativeKeywordService +- name: google.ads.googleads.v2.services.KeywordPlanService +- name: google.ads.googleads.v2.services.KeywordViewService +- name: google.ads.googleads.v2.services.LabelService +- name: google.ads.googleads.v2.services.LandingPageViewService +- name: google.ads.googleads.v2.services.LanguageConstantService +- name: google.ads.googleads.v2.services.LocationViewService +- name: google.ads.googleads.v2.services.ManagedPlacementViewService +- name: google.ads.googleads.v2.services.MediaFileService +- name: google.ads.googleads.v2.services.MerchantCenterLinkService +- name: google.ads.googleads.v2.services.MobileAppCategoryConstantService +- name: google.ads.googleads.v2.services.MobileDeviceConstantService +- name: google.ads.googleads.v2.services.MutateJobService +- name: google.ads.googleads.v2.services.OperatingSystemVersionConstantService +- name: google.ads.googleads.v2.services.PaidOrganicSearchTermViewService +- name: google.ads.googleads.v2.services.ParentalStatusViewService +- name: google.ads.googleads.v2.services.PaymentsAccountService +- name: google.ads.googleads.v2.services.ProductBiddingCategoryConstantService +- name: google.ads.googleads.v2.services.ProductGroupViewService +- name: google.ads.googleads.v2.services.ReachPlanService +- name: google.ads.googleads.v2.services.RecommendationService +- name: google.ads.googleads.v2.services.RemarketingActionService +- name: google.ads.googleads.v2.services.SearchTermViewService +- name: google.ads.googleads.v2.services.SharedCriterionService +- name: google.ads.googleads.v2.services.SharedSetService +- name: google.ads.googleads.v2.services.ShoppingPerformanceViewService +- name: google.ads.googleads.v2.services.TopicConstantService +- name: google.ads.googleads.v2.services.TopicViewService +- name: google.ads.googleads.v2.services.UserInterestService +- name: google.ads.googleads.v2.services.UserListService +- name: google.ads.googleads.v2.services.UserLocationViewService +- name: google.ads.googleads.v2.services.VideoService + +types: +- name: google.ads.googleads.v2.errors.GoogleAdsFailure +- name: google.ads.googleads.v2.resources.MutateJob.MutateJobMetadata +- name: google.ads.googleads.v2.services.CreateCampaignExperimentMetadata + +documentation: + summary: |- + Manage your AdWords accounts, campaigns, and reports with this REST-based + API. + overview: |- + # This warning always fires when the last path segment of packages is not + + # the version + +backend: + rules: + - selector: google.ads.googleads.v2.services.AccountBudgetProposalService.GetAccountBudgetProposal + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AccountBudgetProposalService.MutateAccountBudgetProposal + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AccountBudgetService.GetAccountBudget + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupAdAssetViewService.GetAdGroupAdAssetView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupAdLabelService.GetAdGroupAdLabel + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupAdLabelService.MutateAdGroupAdLabels + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupAdService.GetAdGroupAd + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupAdService.MutateAdGroupAds + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupAudienceViewService.GetAdGroupAudienceView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupBidModifierService.GetAdGroupBidModifier + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupBidModifierService.MutateAdGroupBidModifiers + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupCriterionLabelService.GetAdGroupCriterionLabel + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupCriterionLabelService.MutateAdGroupCriterionLabels + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupCriterionService.GetAdGroupCriterion + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupCriterionService.MutateAdGroupCriteria + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupCriterionSimulationService.GetAdGroupCriterionSimulation + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupExtensionSettingService.GetAdGroupExtensionSetting + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupExtensionSettingService.MutateAdGroupExtensionSettings + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupFeedService.GetAdGroupFeed + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupFeedService.MutateAdGroupFeeds + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupLabelService.GetAdGroupLabel + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupLabelService.MutateAdGroupLabels + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupService.GetAdGroup + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupService.MutateAdGroups + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdGroupSimulationService.GetAdGroupSimulation + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdParameterService.GetAdParameter + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdParameterService.MutateAdParameters + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdScheduleViewService.GetAdScheduleView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdService.GetAd + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AdService.MutateAds + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AgeRangeViewService.GetAgeRangeView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AssetService.GetAsset + deadline: 60.0 + - selector: google.ads.googleads.v2.services.AssetService.MutateAssets + deadline: 60.0 + - selector: google.ads.googleads.v2.services.BiddingStrategyService.GetBiddingStrategy + deadline: 60.0 + - selector: google.ads.googleads.v2.services.BiddingStrategyService.MutateBiddingStrategies + deadline: 60.0 + - selector: google.ads.googleads.v2.services.BillingSetupService.GetBillingSetup + deadline: 60.0 + - selector: google.ads.googleads.v2.services.BillingSetupService.MutateBillingSetup + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignAudienceViewService.GetCampaignAudienceView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignBidModifierService.GetCampaignBidModifier + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignBidModifierService.MutateCampaignBidModifiers + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignBudgetService.GetCampaignBudget + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignBudgetService.MutateCampaignBudgets + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignCriterionService.GetCampaignCriterion + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignCriterionService.MutateCampaignCriteria + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignCriterionSimulationService.GetCampaignCriterionSimulation + deadline: 60.0 + - selector: 'google.ads.googleads.v2.services.CampaignDraftService.*' + deadline: 60.0 + - selector: 'google.ads.googleads.v2.services.CampaignExperimentService.*' + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignExtensionSettingService.GetCampaignExtensionSetting + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignExtensionSettingService.MutateCampaignExtensionSettings + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignFeedService.GetCampaignFeed + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignFeedService.MutateCampaignFeeds + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignLabelService.GetCampaignLabel + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignLabelService.MutateCampaignLabels + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignService.GetCampaign + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignService.MutateCampaigns + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignSharedSetService.GetCampaignSharedSet + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CampaignSharedSetService.MutateCampaignSharedSets + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CarrierConstantService.GetCarrierConstant + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ChangeStatusService.GetChangeStatus + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ClickViewService.GetClickView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ConversionActionService.GetConversionAction + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ConversionActionService.MutateConversionActions + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ConversionAdjustmentUploadService.UploadConversionAdjustments + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ConversionUploadService.UploadCallConversions + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ConversionUploadService.UploadClickConversions + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomInterestService.GetCustomInterest + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomInterestService.MutateCustomInterests + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomerClientLinkService.GetCustomerClientLink + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomerClientLinkService.MutateCustomerClientLink + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomerClientService.GetCustomerClient + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomerExtensionSettingService.GetCustomerExtensionSetting + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomerExtensionSettingService.MutateCustomerExtensionSettings + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomerFeedService.GetCustomerFeed + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomerFeedService.MutateCustomerFeeds + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomerLabelService.GetCustomerLabel + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomerLabelService.MutateCustomerLabels + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomerManagerLinkService.GetCustomerManagerLink + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomerManagerLinkService.MutateCustomerManagerLink + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomerNegativeCriterionService.GetCustomerNegativeCriterion + deadline: 60.0 + - selector: google.ads.googleads.v2.services.CustomerNegativeCriterionService.MutateCustomerNegativeCriteria + deadline: 60.0 + - selector: 'google.ads.googleads.v2.services.CustomerService.*' + deadline: 60.0 + - selector: google.ads.googleads.v2.services.DetailPlacementViewService.GetDetailPlacementView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.DisplayKeywordViewService.GetDisplayKeywordView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.DistanceViewService.GetDistanceView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.DomainCategoryService.GetDomainCategory + deadline: 60.0 + - selector: google.ads.googleads.v2.services.DynamicSearchAdsSearchTermViewService.GetDynamicSearchAdsSearchTermView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ExpandedLandingPageViewService.GetExpandedLandingPageView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ExtensionFeedItemService.GetExtensionFeedItem + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ExtensionFeedItemService.MutateExtensionFeedItems + deadline: 60.0 + - selector: google.ads.googleads.v2.services.FeedItemService.GetFeedItem + deadline: 60.0 + - selector: google.ads.googleads.v2.services.FeedItemService.MutateFeedItems + deadline: 60.0 + - selector: google.ads.googleads.v2.services.FeedItemTargetService.GetFeedItemTarget + deadline: 60.0 + - selector: google.ads.googleads.v2.services.FeedItemTargetService.MutateFeedItemTargets + deadline: 60.0 + - selector: google.ads.googleads.v2.services.FeedMappingService.GetFeedMapping + deadline: 60.0 + - selector: google.ads.googleads.v2.services.FeedMappingService.MutateFeedMappings + deadline: 60.0 + - selector: google.ads.googleads.v2.services.FeedPlaceholderViewService.GetFeedPlaceholderView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.FeedService.GetFeed + deadline: 60.0 + - selector: google.ads.googleads.v2.services.FeedService.MutateFeeds + deadline: 60.0 + - selector: google.ads.googleads.v2.services.GenderViewService.GetGenderView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.GeoTargetConstantService.GetGeoTargetConstant + deadline: 60.0 + - selector: google.ads.googleads.v2.services.GeoTargetConstantService.SuggestGeoTargetConstants + deadline: 60.0 + - selector: google.ads.googleads.v2.services.GeographicViewService.GetGeographicView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.GoogleAdsFieldService.GetGoogleAdsField + deadline: 600.0 + - selector: google.ads.googleads.v2.services.GoogleAdsFieldService.SearchGoogleAdsFields + deadline: 600.0 + - selector: google.ads.googleads.v2.services.GoogleAdsService.Mutate + deadline: 600.0 + - selector: google.ads.googleads.v2.services.GoogleAdsService.Search + deadline: 3600.0 + - selector: google.ads.googleads.v2.services.GroupPlacementViewService.GetGroupPlacementView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.HotelGroupViewService.GetHotelGroupView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.HotelPerformanceViewService.GetHotelPerformanceView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.InvoiceService.ListInvoices + deadline: 60.0 + - selector: google.ads.googleads.v2.services.KeywordPlanAdGroupService.GetKeywordPlanAdGroup + deadline: 60.0 + - selector: google.ads.googleads.v2.services.KeywordPlanAdGroupService.MutateKeywordPlanAdGroups + deadline: 60.0 + - selector: google.ads.googleads.v2.services.KeywordPlanCampaignService.GetKeywordPlanCampaign + deadline: 60.0 + - selector: google.ads.googleads.v2.services.KeywordPlanCampaignService.MutateKeywordPlanCampaigns + deadline: 60.0 + - selector: google.ads.googleads.v2.services.KeywordPlanIdeaService.GenerateKeywordIdeas + deadline: 600.0 + - selector: google.ads.googleads.v2.services.KeywordPlanKeywordService.GetKeywordPlanKeyword + deadline: 60.0 + - selector: google.ads.googleads.v2.services.KeywordPlanKeywordService.MutateKeywordPlanKeywords + deadline: 60.0 + - selector: google.ads.googleads.v2.services.KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword + deadline: 60.0 + - selector: google.ads.googleads.v2.services.KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords + deadline: 60.0 + - selector: google.ads.googleads.v2.services.KeywordPlanService.GenerateForecastMetrics + deadline: 600.0 + - selector: google.ads.googleads.v2.services.KeywordPlanService.GenerateHistoricalMetrics + deadline: 600.0 + - selector: google.ads.googleads.v2.services.KeywordPlanService.GetKeywordPlan + deadline: 60.0 + - selector: google.ads.googleads.v2.services.KeywordPlanService.MutateKeywordPlans + deadline: 60.0 + - selector: google.ads.googleads.v2.services.KeywordViewService.GetKeywordView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.LabelService.GetLabel + deadline: 60.0 + - selector: google.ads.googleads.v2.services.LabelService.MutateLabels + deadline: 60.0 + - selector: google.ads.googleads.v2.services.LandingPageViewService.GetLandingPageView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.LanguageConstantService.GetLanguageConstant + deadline: 60.0 + - selector: google.ads.googleads.v2.services.LocationViewService.GetLocationView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ManagedPlacementViewService.GetManagedPlacementView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.MediaFileService.GetMediaFile + deadline: 60.0 + - selector: google.ads.googleads.v2.services.MediaFileService.MutateMediaFiles + deadline: 60.0 + - selector: 'google.ads.googleads.v2.services.MerchantCenterLinkService.*' + deadline: 60.0 + - selector: google.ads.googleads.v2.services.MobileAppCategoryConstantService.GetMobileAppCategoryConstant + deadline: 60.0 + - selector: google.ads.googleads.v2.services.MobileDeviceConstantService.GetMobileDeviceConstant + deadline: 60.0 + - selector: 'google.ads.googleads.v2.services.MutateJobService.*' + deadline: 60.0 + - selector: google.ads.googleads.v2.services.OperatingSystemVersionConstantService.GetOperatingSystemVersionConstant + deadline: 60.0 + - selector: google.ads.googleads.v2.services.PaidOrganicSearchTermViewService.GetPaidOrganicSearchTermView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ParentalStatusViewService.GetParentalStatusView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.PaymentsAccountService.ListPaymentsAccounts + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ProductBiddingCategoryConstantService.GetProductBiddingCategoryConstant + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ProductGroupViewService.GetProductGroupView + deadline: 60.0 + - selector: 'google.ads.googleads.v2.services.ReachPlanService.*' + deadline: 600.0 + - selector: 'google.ads.googleads.v2.services.RecommendationService.*' + deadline: 600.0 + - selector: google.ads.googleads.v2.services.RemarketingActionService.GetRemarketingAction + deadline: 60.0 + - selector: google.ads.googleads.v2.services.RemarketingActionService.MutateRemarketingActions + deadline: 60.0 + - selector: google.ads.googleads.v2.services.SearchTermViewService.GetSearchTermView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.SharedCriterionService.GetSharedCriterion + deadline: 60.0 + - selector: google.ads.googleads.v2.services.SharedCriterionService.MutateSharedCriteria + deadline: 60.0 + - selector: google.ads.googleads.v2.services.SharedSetService.GetSharedSet + deadline: 60.0 + - selector: google.ads.googleads.v2.services.SharedSetService.MutateSharedSets + deadline: 60.0 + - selector: google.ads.googleads.v2.services.ShoppingPerformanceViewService.GetShoppingPerformanceView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.TopicConstantService.GetTopicConstant + deadline: 60.0 + - selector: google.ads.googleads.v2.services.TopicViewService.GetTopicView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.UserInterestService.GetUserInterest + deadline: 60.0 + - selector: google.ads.googleads.v2.services.UserListService.GetUserList + deadline: 60.0 + - selector: google.ads.googleads.v2.services.UserListService.MutateUserLists + deadline: 60.0 + - selector: google.ads.googleads.v2.services.UserLocationViewService.GetUserLocationView + deadline: 60.0 + - selector: google.ads.googleads.v2.services.VideoService.GetVideo + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 diff --git a/google/ads/googleads/v2/resources/account_budget.proto b/google/ads/googleads/v2/resources/account_budget.proto index 74abe4d32..bd2a699b3 100644 --- a/google/ads/googleads/v2/resources/account_budget.proto +++ b/google/ads/googleads/v2/resources/account_budget.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -21,6 +20,8 @@ import "google/ads/googleads/v2/enums/account_budget_proposal_type.proto"; import "google/ads/googleads/v2/enums/account_budget_status.proto"; import "google/ads/googleads/v2/enums/spending_limit_type.proto"; import "google/ads/googleads/v2/enums/time_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -52,117 +53,137 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // adjustments. Adjustments create differences between the 'approved' and // 'adjusted' fields, which would otherwise be identical. message AccountBudget { + option (google.api.resource) = { + type: "googleads.googleapis.com/AccountBudget" + pattern: "customers/{customer}/accountBudgets/{account_budget}" + }; + // A pending proposal associated with the enclosing account-level budget, // if applicable. message PendingAccountBudgetProposal { - // The resource name of the proposal. + // Output only. The resource name of the proposal. // AccountBudgetProposal resource names have the form: // // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}` - google.protobuf.StringValue account_budget_proposal = 1; - - // The type of this proposal, e.g. END to end the budget associated + google.protobuf.StringValue account_budget_proposal = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudgetProposal" + } + ]; + + // Output only. The type of this proposal, e.g. END to end the budget associated // with this proposal. - google.ads.googleads.v2.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 2; + google.ads.googleads.v2.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name to assign to the account-level budget. - google.protobuf.StringValue name = 3; + // Output only. The name to assign to the account-level budget. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The start time in yyyy-MM-dd HH:mm:ss format. - google.protobuf.StringValue start_date_time = 4; + // Output only. The start time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue start_date_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A purchase order number is a value that helps users reference this budget + // Output only. A purchase order number is a value that helps users reference this budget // in their monthly invoices. - google.protobuf.StringValue purchase_order_number = 9; + google.protobuf.StringValue purchase_order_number = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Notes associated with this budget. - google.protobuf.StringValue notes = 10; + // Output only. Notes associated with this budget. + google.protobuf.StringValue notes = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The time when this account-level budget proposal was created. + // Output only. The time when this account-level budget proposal was created. // Formatted as yyyy-MM-dd HH:mm:ss. - google.protobuf.StringValue creation_date_time = 11; + google.protobuf.StringValue creation_date_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; // The end time of the account-level budget. oneof end_time { - // The end time in yyyy-MM-dd HH:mm:ss format. - google.protobuf.StringValue end_date_time = 5; + // Output only. The end time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue end_date_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The end time as a well-defined type, e.g. FOREVER. - google.ads.googleads.v2.enums.TimeTypeEnum.TimeType end_time_type = 6; + // Output only. The end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v2.enums.TimeTypeEnum.TimeType end_time_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The spending limit. oneof spending_limit { - // The spending limit in micros. One million is equivalent to + // Output only. The spending limit in micros. One million is equivalent to // one unit. - google.protobuf.Int64Value spending_limit_micros = 7; + google.protobuf.Int64Value spending_limit_micros = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The spending limit as a well-defined type, e.g. INFINITE. - google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType spending_limit_type = 8; + // Output only. The spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType spending_limit_type = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } } - // The resource name of the account-level budget. + // Output only. The resource name of the account-level budget. // AccountBudget resource names have the form: // // `customers/{customer_id}/accountBudgets/{account_budget_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudget" + } + ]; - // The ID of the account-level budget. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the account-level budget. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource name of the billing setup associated with this account-level + // Output only. The resource name of the billing setup associated with this account-level // budget. BillingSetup resource names have the form: // // `customers/{customer_id}/billingSetups/{billing_setup_id}` - google.protobuf.StringValue billing_setup = 3; + google.protobuf.StringValue billing_setup = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BillingSetup" + } + ]; - // The status of this account-level budget. - google.ads.googleads.v2.enums.AccountBudgetStatusEnum.AccountBudgetStatus status = 4; + // Output only. The status of this account-level budget. + google.ads.googleads.v2.enums.AccountBudgetStatusEnum.AccountBudgetStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name of the account-level budget. - google.protobuf.StringValue name = 5; + // Output only. The name of the account-level budget. + google.protobuf.StringValue name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The proposed start time of the account-level budget in + // Output only. The proposed start time of the account-level budget in // yyyy-MM-dd HH:mm:ss format. If a start time type of NOW was proposed, // this is the time of request. - google.protobuf.StringValue proposed_start_date_time = 6; + google.protobuf.StringValue proposed_start_date_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The approved start time of the account-level budget in yyyy-MM-dd HH:mm:ss + // Output only. The approved start time of the account-level budget in yyyy-MM-dd HH:mm:ss // format. // // For example, if a new budget is approved after the proposed start time, // the approved start time is the time of approval. - google.protobuf.StringValue approved_start_date_time = 7; + google.protobuf.StringValue approved_start_date_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The total adjustments amount. + // Output only. The total adjustments amount. // // An example of an adjustment is courtesy credits. - google.protobuf.Int64Value total_adjustments_micros = 18; + google.protobuf.Int64Value total_adjustments_micros = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The value of Ads that have been served, in micros. + // Output only. The value of Ads that have been served, in micros. // // This includes overdelivery costs, in which case a credit might be // automatically applied to the budget (see total_adjustments_micros). - google.protobuf.Int64Value amount_served_micros = 19; + google.protobuf.Int64Value amount_served_micros = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A purchase order number is a value that helps users reference this budget + // Output only. A purchase order number is a value that helps users reference this budget // in their monthly invoices. - google.protobuf.StringValue purchase_order_number = 20; + google.protobuf.StringValue purchase_order_number = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Notes associated with the budget. - google.protobuf.StringValue notes = 21; + // Output only. Notes associated with the budget. + google.protobuf.StringValue notes = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The pending proposal to modify this budget, if applicable. - PendingAccountBudgetProposal pending_proposal = 22; + // Output only. The pending proposal to modify this budget, if applicable. + PendingAccountBudgetProposal pending_proposal = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; // The proposed end time of the account-level budget. oneof proposed_end_time { - // The proposed end time in yyyy-MM-dd HH:mm:ss format. - google.protobuf.StringValue proposed_end_date_time = 8; + // Output only. The proposed end time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue proposed_end_date_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The proposed end time as a well-defined type, e.g. FOREVER. - google.ads.googleads.v2.enums.TimeTypeEnum.TimeType proposed_end_time_type = 9; + // Output only. The proposed end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v2.enums.TimeTypeEnum.TimeType proposed_end_time_type = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The approved end time of the account-level budget. @@ -170,21 +191,21 @@ message AccountBudget { // For example, if a budget's end time is updated and the proposal is approved // after the proposed end time, the approved end time is the time of approval. oneof approved_end_time { - // The approved end time in yyyy-MM-dd HH:mm:ss format. - google.protobuf.StringValue approved_end_date_time = 10; + // Output only. The approved end time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue approved_end_date_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The approved end time as a well-defined type, e.g. FOREVER. - google.ads.googleads.v2.enums.TimeTypeEnum.TimeType approved_end_time_type = 11; + // Output only. The approved end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v2.enums.TimeTypeEnum.TimeType approved_end_time_type = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The proposed spending limit. oneof proposed_spending_limit { - // The proposed spending limit in micros. One million is equivalent to + // Output only. The proposed spending limit in micros. One million is equivalent to // one unit. - google.protobuf.Int64Value proposed_spending_limit_micros = 12; + google.protobuf.Int64Value proposed_spending_limit_micros = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The proposed spending limit as a well-defined type, e.g. INFINITE. - google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType proposed_spending_limit_type = 13; + // Output only. The proposed spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType proposed_spending_limit_type = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The approved spending limit. @@ -193,15 +214,15 @@ message AccountBudget { // proposed spending limit at the time the proposal is approved, the approved // spending limit is set to the amount already spent. oneof approved_spending_limit { - // The approved spending limit in micros. One million is equivalent to + // Output only. The approved spending limit in micros. One million is equivalent to // one unit. This will only be populated if the proposed spending limit // is finite, and will always be greater than or equal to the // proposed spending limit. - google.protobuf.Int64Value approved_spending_limit_micros = 14; + google.protobuf.Int64Value approved_spending_limit_micros = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The approved spending limit as a well-defined type, e.g. INFINITE. This + // Output only. The approved spending limit as a well-defined type, e.g. INFINITE. This // will only be populated if the approved spending limit is INFINITE. - google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType approved_spending_limit_type = 15; + google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType approved_spending_limit_type = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The spending limit after adjustments have been applied. Adjustments are @@ -209,7 +230,7 @@ message AccountBudget { // // This value has the final say on how much the account is allowed to spend. oneof adjusted_spending_limit { - // The adjusted spending limit in micros. One million is equivalent to + // Output only. The adjusted spending limit in micros. One million is equivalent to // one unit. // // If the approved spending limit is finite, the adjusted @@ -221,12 +242,12 @@ message AccountBudget { // // For example, a debit adjustment reduces how much the account is // allowed to spend. - google.protobuf.Int64Value adjusted_spending_limit_micros = 16; + google.protobuf.Int64Value adjusted_spending_limit_micros = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The adjusted spending limit as a well-defined type, e.g. INFINITE. + // Output only. The adjusted spending limit as a well-defined type, e.g. INFINITE. // This will only be populated if the adjusted spending limit is INFINITE, // which is guaranteed to be true if the approved spending limit is // INFINITE. - google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType adjusted_spending_limit_type = 17; + google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType adjusted_spending_limit_type = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v2/resources/account_budget_proposal.proto b/google/ads/googleads/v2/resources/account_budget_proposal.proto index 7d8e9302d..9fe5123c3 100644 --- a/google/ads/googleads/v2/resources/account_budget_proposal.proto +++ b/google/ads/googleads/v2/resources/account_budget_proposal.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -21,6 +20,8 @@ import "google/ads/googleads/v2/enums/account_budget_proposal_status.proto"; import "google/ads/googleads/v2/enums/account_budget_proposal_type.proto"; import "google/ads/googleads/v2/enums/spending_limit_type.proto"; import "google/ads/googleads/v2/enums/time_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -45,96 +46,116 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // Please note that the proposal type (proposal_type) changes which fields are // required and which must remain empty. message AccountBudgetProposal { - // The resource name of the proposal. + option (google.api.resource) = { + type: "googleads.googleapis.com/AccountBudgetProposal" + pattern: "customers/{customer}/accountBudgetProposals/{account_budget_proposal}" + }; + + // Immutable. The resource name of the proposal. // AccountBudgetProposal resource names have the form: // // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}` - string resource_name = 1; - - // The ID of the proposal. - google.protobuf.Int64Value id = 14; - - // The resource name of the billing setup associated with this proposal. - google.protobuf.StringValue billing_setup = 2; - - // The resource name of the account-level budget associated with this + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudgetProposal" + } + ]; + + // Output only. The ID of the proposal. + google.protobuf.Int64Value id = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The resource name of the billing setup associated with this proposal. + google.protobuf.StringValue billing_setup = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BillingSetup" + } + ]; + + // Immutable. The resource name of the account-level budget associated with this // proposal. - google.protobuf.StringValue account_budget = 3; - - // The type of this proposal, e.g. END to end the budget associated with this + google.protobuf.StringValue account_budget = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudget" + } + ]; + + // Immutable. The type of this proposal, e.g. END to end the budget associated with this // proposal. - google.ads.googleads.v2.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 4; + google.ads.googleads.v2.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 4 [(google.api.field_behavior) = IMMUTABLE]; - // The status of this proposal. + // Output only. The status of this proposal. // When a new proposal is created, the status defaults to PENDING. - google.ads.googleads.v2.enums.AccountBudgetProposalStatusEnum.AccountBudgetProposalStatus status = 15; + google.ads.googleads.v2.enums.AccountBudgetProposalStatusEnum.AccountBudgetProposalStatus status = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name to assign to the account-level budget. - google.protobuf.StringValue proposed_name = 5; + // Immutable. The name to assign to the account-level budget. + google.protobuf.StringValue proposed_name = 5 [(google.api.field_behavior) = IMMUTABLE]; - // The approved start date time in yyyy-mm-dd hh:mm:ss format. - google.protobuf.StringValue approved_start_date_time = 20; + // Output only. The approved start date time in yyyy-mm-dd hh:mm:ss format. + google.protobuf.StringValue approved_start_date_time = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A purchase order number is a value that enables the user to help them + // Immutable. A purchase order number is a value that enables the user to help them // reference this budget in their monthly invoices. - google.protobuf.StringValue proposed_purchase_order_number = 12; + google.protobuf.StringValue proposed_purchase_order_number = 12 [(google.api.field_behavior) = IMMUTABLE]; - // Notes associated with this budget. - google.protobuf.StringValue proposed_notes = 13; + // Immutable. Notes associated with this budget. + google.protobuf.StringValue proposed_notes = 13 [(google.api.field_behavior) = IMMUTABLE]; - // The date time when this account-level budget proposal was created, which is + // Output only. The date time when this account-level budget proposal was created, which is // not the same as its approval date time, if applicable. - google.protobuf.StringValue creation_date_time = 16; + google.protobuf.StringValue creation_date_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The date time when this account-level budget was approved, if applicable. - google.protobuf.StringValue approval_date_time = 17; + // Output only. The date time when this account-level budget was approved, if applicable. + google.protobuf.StringValue approval_date_time = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; // The proposed start date time of the account-level budget, which cannot be // in the past. oneof proposed_start_time { - // The proposed start date time in yyyy-mm-dd hh:mm:ss format. - google.protobuf.StringValue proposed_start_date_time = 18; + // Immutable. The proposed start date time in yyyy-mm-dd hh:mm:ss format. + google.protobuf.StringValue proposed_start_date_time = 18 [(google.api.field_behavior) = IMMUTABLE]; - // The proposed start date time as a well-defined type, e.g. NOW. - google.ads.googleads.v2.enums.TimeTypeEnum.TimeType proposed_start_time_type = 7; + // Immutable. The proposed start date time as a well-defined type, e.g. NOW. + google.ads.googleads.v2.enums.TimeTypeEnum.TimeType proposed_start_time_type = 7 [(google.api.field_behavior) = IMMUTABLE]; } // The proposed end date time of the account-level budget, which cannot be in // the past. oneof proposed_end_time { - // The proposed end date time in yyyy-mm-dd hh:mm:ss format. - google.protobuf.StringValue proposed_end_date_time = 19; + // Immutable. The proposed end date time in yyyy-mm-dd hh:mm:ss format. + google.protobuf.StringValue proposed_end_date_time = 19 [(google.api.field_behavior) = IMMUTABLE]; - // The proposed end date time as a well-defined type, e.g. FOREVER. - google.ads.googleads.v2.enums.TimeTypeEnum.TimeType proposed_end_time_type = 9; + // Immutable. The proposed end date time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v2.enums.TimeTypeEnum.TimeType proposed_end_time_type = 9 [(google.api.field_behavior) = IMMUTABLE]; } // The approved end date time of the account-level budget. oneof approved_end_time { - // The approved end date time in yyyy-mm-dd hh:mm:ss format. - google.protobuf.StringValue approved_end_date_time = 21; + // Output only. The approved end date time in yyyy-mm-dd hh:mm:ss format. + google.protobuf.StringValue approved_end_date_time = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The approved end date time as a well-defined type, e.g. FOREVER. - google.ads.googleads.v2.enums.TimeTypeEnum.TimeType approved_end_time_type = 22; + // Output only. The approved end date time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v2.enums.TimeTypeEnum.TimeType approved_end_time_type = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The proposed spending limit. oneof proposed_spending_limit { - // The proposed spending limit in micros. One million is equivalent to + // Immutable. The proposed spending limit in micros. One million is equivalent to // one unit. - google.protobuf.Int64Value proposed_spending_limit_micros = 10; + google.protobuf.Int64Value proposed_spending_limit_micros = 10 [(google.api.field_behavior) = IMMUTABLE]; - // The proposed spending limit as a well-defined type, e.g. INFINITE. - google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType proposed_spending_limit_type = 11; + // Immutable. The proposed spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType proposed_spending_limit_type = 11 [(google.api.field_behavior) = IMMUTABLE]; } // The approved spending limit. oneof approved_spending_limit { - // The approved spending limit in micros. One million is equivalent to + // Output only. The approved spending limit in micros. One million is equivalent to // one unit. - google.protobuf.Int64Value approved_spending_limit_micros = 23; + google.protobuf.Int64Value approved_spending_limit_micros = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The approved spending limit as a well-defined type, e.g. INFINITE. - google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType approved_spending_limit_type = 24; + // Output only. The approved spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType approved_spending_limit_type = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v2/resources/ad.proto b/google/ads/googleads/v2/resources/ad.proto index 36c839b4b..a8580b581 100644 --- a/google/ads/googleads/v2/resources/ad.proto +++ b/google/ads/googleads/v2/resources/ad.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -24,6 +23,8 @@ import "google/ads/googleads/v2/common/url_collection.proto"; import "google/ads/googleads/v2/enums/ad_type.proto"; import "google/ads/googleads/v2/enums/device.proto"; import "google/ads/googleads/v2/enums/system_managed_entity_source.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -40,14 +41,24 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // An ad. message Ad { - // The resource name of the ad. + option (google.api.resource) = { + type: "googleads.googleapis.com/Ad" + pattern: "customers/{customer}/ads/{ad}" + }; + + // Immutable. The resource name of the ad. // Ad resource names have the form: // // `customers/{customer_id}/ads/{ad_id}` - string resource_name = 37; + string resource_name = 37 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Ad" + } + ]; - // The ID of the ad. - google.protobuf.Int64Value id = 1; + // Output only. The ID of the ad. + google.protobuf.Int64Value id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // The list of possible final URLs after all cross-domain redirects for the // ad. @@ -64,6 +75,9 @@ message Ad { // The URL template for constructing a tracking URL. google.protobuf.StringValue tracking_url_template = 12; + // The suffix to use when constructing a final URL. + google.protobuf.StringValue final_url_suffix = 38; + // The list of mappings that can be used to substitute custom parameter tags // in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`. repeated google.ads.googleads.v2.common.CustomParameter url_custom_parameters = 10; @@ -71,14 +85,14 @@ message Ad { // The URL that appears in the ad description for some ad formats. google.protobuf.StringValue display_url = 4; - // The type of ad. - google.ads.googleads.v2.enums.AdTypeEnum.AdType type = 5; + // Output only. The type of ad. + google.ads.googleads.v2.enums.AdTypeEnum.AdType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Indicates if this ad was automatically added by Google Ads and not by a + // Output only. Indicates if this ad was automatically added by Google Ads and not by a // user. For example, this could happen when ads are automatically created as // suggestions for new ads based on knowledge of how existing ads are // performing. - google.protobuf.BoolValue added_by_google_ads = 19; + google.protobuf.BoolValue added_by_google_ads = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; // The device preference for the ad. You can only specify a preference for // mobile devices. When this preference is set the ad will be preferred over @@ -92,13 +106,13 @@ message Ad { // can be referenced from other fields in the ad. repeated google.ads.googleads.v2.common.UrlCollection url_collections = 26; - // The name of the ad. This is only used to be able to identify the ad. It + // Immutable. The name of the ad. This is only used to be able to identify the ad. It // does not need to be unique and does not affect the served ad. - google.protobuf.StringValue name = 23; + google.protobuf.StringValue name = 23 [(google.api.field_behavior) = IMMUTABLE]; - // If this ad is system managed, then this field will indicate the source. + // Output only. If this ad is system managed, then this field will indicate the source. // This field is read-only. - google.ads.googleads.v2.enums.SystemManagedResourceSourceEnum.SystemManagedResourceSource system_managed_resource_source = 27; + google.ads.googleads.v2.enums.SystemManagedResourceSourceEnum.SystemManagedResourceSource system_managed_resource_source = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; // Details pertinent to the ad type. Exactly one value must be set. oneof ad_data { @@ -145,8 +159,8 @@ message Ad { // Details pertaining to an app ad. google.ads.googleads.v2.common.AppAdInfo app_ad = 29; - // Details pertaining to a legacy app install ad. - google.ads.googleads.v2.common.LegacyAppInstallAdInfo legacy_app_install_ad = 30; + // Immutable. Details pertaining to a legacy app install ad. + google.ads.googleads.v2.common.LegacyAppInstallAdInfo legacy_app_install_ad = 30 [(google.api.field_behavior) = IMMUTABLE]; // Details pertaining to a responsive display ad. google.ads.googleads.v2.common.ResponsiveDisplayAdInfo responsive_display_ad = 31; diff --git a/google/ads/googleads/v2/resources/ad_group.proto b/google/ads/googleads/v2/resources/ad_group.proto index e1d85f74e..e7c50c1e2 100644 --- a/google/ads/googleads/v2/resources/ad_group.proto +++ b/google/ads/googleads/v2/resources/ad_group.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -25,6 +24,8 @@ import "google/ads/googleads/v2/enums/ad_group_status.proto"; import "google/ads/googleads/v2/enums/ad_group_type.proto"; import "google/ads/googleads/v2/enums/bidding_source.proto"; import "google/ads/googleads/v2/enums/targeting_dimension.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -41,14 +42,24 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // An ad group. message AdGroup { - // The resource name of the ad group. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroup" + pattern: "customers/{customer}/adGroups/{ad_group}" + }; + + // Immutable. The resource name of the ad group. // Ad group resource names have the form: // // `customers/{customer_id}/adGroups/{ad_group_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; - // The ID of the ad group. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the ad group. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the ad group. // @@ -64,20 +75,25 @@ message AdGroup { // The status of the ad group. google.ads.googleads.v2.enums.AdGroupStatusEnum.AdGroupStatus status = 5; - // The type of the ad group. - google.ads.googleads.v2.enums.AdGroupTypeEnum.AdGroupType type = 12; + // Immutable. The type of the ad group. + google.ads.googleads.v2.enums.AdGroupTypeEnum.AdGroupType type = 12 [(google.api.field_behavior) = IMMUTABLE]; // The ad rotation mode of the ad group. google.ads.googleads.v2.enums.AdGroupAdRotationModeEnum.AdGroupAdRotationMode ad_rotation_mode = 22; - // For draft or experiment ad groups, this field is the resource name of the + // Output only. For draft or experiment ad groups, this field is the resource name of the // base ad group from which this ad group was created. If a draft or // experiment ad group does not have a base ad group, then this field is null. // // For base ad groups, this field equals the ad group resource name. // // This field is read-only. - google.protobuf.StringValue base_ad_group = 18; + google.protobuf.StringValue base_ad_group = 18 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; // The URL template for constructing a tracking URL. google.protobuf.StringValue tracking_url_template = 13; @@ -86,8 +102,13 @@ message AdGroup { // `tracking_url_template`, `final_urls`, or `mobile_final_urls`. repeated google.ads.googleads.v2.common.CustomParameter url_custom_parameters = 6; - // The campaign to which the ad group belongs. - google.protobuf.StringValue campaign = 10; + // Immutable. The campaign to which the ad group belongs. + google.protobuf.StringValue campaign = 10 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; // The maximum CPC (cost-per-click) bid. google.protobuf.Int64Value cpc_bid_micros = 14; @@ -98,8 +119,8 @@ message AdGroup { // The target CPA (cost-per-acquisition). google.protobuf.Int64Value target_cpa_micros = 27; - // The CPV (cost-per-view) bid. - google.protobuf.Int64Value cpv_bid_micros = 17; + // Output only. The CPV (cost-per-view) bid. + google.protobuf.Int64Value cpv_bid_micros = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; // Average amount in micros that the advertiser is willing to pay for every // thousand times the ad is shown. @@ -130,22 +151,27 @@ message AdGroup { // Setting for targeting related features. google.ads.googleads.v2.common.TargetingSetting targeting_setting = 25; - // The effective target CPA (cost-per-acquisition). + // Output only. The effective target CPA (cost-per-acquisition). // This field is read-only. - google.protobuf.Int64Value effective_target_cpa_micros = 28; + google.protobuf.Int64Value effective_target_cpa_micros = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Source of the effective target CPA. + // Output only. Source of the effective target CPA. // This field is read-only. - google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_target_cpa_source = 29; + google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_target_cpa_source = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The effective target ROAS (return-on-ad-spend). + // Output only. The effective target ROAS (return-on-ad-spend). // This field is read-only. - google.protobuf.DoubleValue effective_target_roas = 31; + google.protobuf.DoubleValue effective_target_roas = 31 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Source of the effective target ROAS. + // Output only. Source of the effective target ROAS. // This field is read-only. - google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_target_roas_source = 32; - - // The resource names of labels attached to this ad group. - repeated google.protobuf.StringValue labels = 33; + google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_target_roas_source = 32 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource names of labels attached to this ad group. + repeated google.protobuf.StringValue labels = 33 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupLabel" + } + ]; } diff --git a/google/ads/googleads/v2/resources/ad_group_ad.proto b/google/ads/googleads/v2/resources/ad_group_ad.proto index ff2a256e1..cd63541d7 100644 --- a/google/ads/googleads/v2/resources/ad_group_ad.proto +++ b/google/ads/googleads/v2/resources/ad_group_ad.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -23,6 +22,8 @@ import "google/ads/googleads/v2/enums/ad_strength.proto"; import "google/ads/googleads/v2/enums/policy_approval_status.proto"; import "google/ads/googleads/v2/enums/policy_review_status.proto"; import "google/ads/googleads/v2/resources/ad.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -39,37 +40,52 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // An ad group ad. message AdGroupAd { - // The resource name of the ad. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupAd" + pattern: "customers/{customer}/adGroupAds/{ad_group_ad}" + }; + + // Immutable. The resource name of the ad. // Ad group ad resource names have the form: // // `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; // The status of the ad. google.ads.googleads.v2.enums.AdGroupAdStatusEnum.AdGroupAdStatus status = 3; - // The ad group to which the ad belongs. - google.protobuf.StringValue ad_group = 4; + // Immutable. The ad group to which the ad belongs. + google.protobuf.StringValue ad_group = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; - // The ad. - Ad ad = 5; + // Immutable. The ad. + Ad ad = 5 [(google.api.field_behavior) = IMMUTABLE]; - // Policy information for the ad. - AdGroupAdPolicySummary policy_summary = 6; + // Output only. Policy information for the ad. + AdGroupAdPolicySummary policy_summary = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Overall ad strength for this ad group ad. - google.ads.googleads.v2.enums.AdStrengthEnum.AdStrength ad_strength = 7; + // Output only. Overall ad strength for this ad group ad. + google.ads.googleads.v2.enums.AdStrengthEnum.AdStrength ad_strength = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Contains policy information for an ad. message AdGroupAdPolicySummary { - // The list of policy findings for this ad. - repeated google.ads.googleads.v2.common.PolicyTopicEntry policy_topic_entries = 1; + // Output only. The list of policy findings for this ad. + repeated google.ads.googleads.v2.common.PolicyTopicEntry policy_topic_entries = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Where in the review process this ad is. - google.ads.googleads.v2.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 2; + // Output only. Where in the review process this ad is. + google.ads.googleads.v2.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The overall approval status of this ad, calculated based on the status of + // Output only. The overall approval status of this ad, calculated based on the status of // its individual policy topic entries. - google.ads.googleads.v2.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 3; + google.ads.googleads.v2.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/ad_group_ad_asset_view.proto b/google/ads/googleads/v2/resources/ad_group_ad_asset_view.proto index 88a772ce5..f6fc28fd0 100644 --- a/google/ads/googleads/v2/resources/ad_group_ad_asset_view.proto +++ b/google/ads/googleads/v2/resources/ad_group_ad_asset_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -22,6 +21,8 @@ import "google/ads/googleads/v2/enums/asset_field_type.proto"; import "google/ads/googleads/v2/enums/asset_performance_label.proto"; import "google/ads/googleads/v2/enums/policy_approval_status.proto"; import "google/ads/googleads/v2/enums/policy_review_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -38,37 +39,57 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A link between an AdGroupAd and an Asset. message AdGroupAdAssetView { - // The resource name of the ad group ad asset view. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupAdAssetView" + pattern: "customers/{customer}/adGroupAdAssets/{ad_group_ad_asset_view}" + }; + + // Output only. The resource name of the ad group ad asset view. // Ad group ad asset view resource names have the form: // // `customers/{customer_id}/adGroupAdAssets/{AdGroupAdAsset.ad_group_id}~{AdGroupAdAsset.ad.ad_id}~{AdGroupAdAsset.asset_id}~{AdGroupAdAsset.asset_field_type}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAdAssetView" + } + ]; - // The ad group ad to which the asset is linked. - google.protobuf.StringValue ad_group_ad = 5; + // Output only. The ad group ad to which the asset is linked. + google.protobuf.StringValue ad_group_ad = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; - // The asset which is linked to the ad group ad. - google.protobuf.StringValue asset = 6; + // Output only. The asset which is linked to the ad group ad. + google.protobuf.StringValue asset = 6 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Asset" + } + ]; - // Role that the asset takes in the ad. - google.ads.googleads.v2.enums.AssetFieldTypeEnum.AssetFieldType field_type = 2; + // Output only. Role that the asset takes in the ad. + google.ads.googleads.v2.enums.AssetFieldTypeEnum.AssetFieldType field_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Policy information for the ad group ad asset. - AdGroupAdAssetPolicySummary policy_summary = 3; + // Output only. Policy information for the ad group ad asset. + AdGroupAdAssetPolicySummary policy_summary = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Performance of an asset linkage. - google.ads.googleads.v2.enums.AssetPerformanceLabelEnum.AssetPerformanceLabel performance_label = 4; + // Output only. Performance of an asset linkage. + google.ads.googleads.v2.enums.AssetPerformanceLabelEnum.AssetPerformanceLabel performance_label = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Contains policy information for an ad group ad asset. message AdGroupAdAssetPolicySummary { - // The list of policy findings for the ad group ad asset. - repeated google.ads.googleads.v2.common.PolicyTopicEntry policy_topic_entries = 1; + // Output only. The list of policy findings for the ad group ad asset. + repeated google.ads.googleads.v2.common.PolicyTopicEntry policy_topic_entries = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Where in the review process this ad group ad asset is. - google.ads.googleads.v2.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 2; + // Output only. Where in the review process this ad group ad asset is. + google.ads.googleads.v2.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The overall approval status of this ad group ad asset, calculated based on + // Output only. The overall approval status of this ad group ad asset, calculated based on // the status of its individual policy topic entries. - google.ads.googleads.v2.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 3; + google.ads.googleads.v2.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/ad_group_ad_label.proto b/google/ads/googleads/v2/resources/ad_group_ad_label.proto index fe7640ab1..9f8928fbf 100644 --- a/google/ads/googleads/v2/resources/ad_group_ad_label.proto +++ b/google/ads/googleads/v2/resources/ad_group_ad_label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -33,14 +34,34 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A relationship between an ad group ad and a label. message AdGroupAdLabel { - // The resource name of the ad group ad label. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupAdLabel" + pattern: "customers/{customer}/adGroupAdLabels/{ad_group_ad_label}" + }; + + // Immutable. The resource name of the ad group ad label. // Ad group ad label resource names have the form: // `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAdLabel" + } + ]; - // The ad group ad to which the label is attached. - google.protobuf.StringValue ad_group_ad = 2; + // Immutable. The ad group ad to which the label is attached. + google.protobuf.StringValue ad_group_ad = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; - // The label assigned to the ad group ad. - google.protobuf.StringValue label = 3; + // Immutable. The label assigned to the ad group ad. + google.protobuf.StringValue label = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; } diff --git a/google/ads/googleads/v2/resources/ad_group_audience_view.proto b/google/ads/googleads/v2/resources/ad_group_audience_view.proto index 78adb1b1e..34b8b7826 100644 --- a/google/ads/googleads/v2/resources/ad_group_audience_view.proto +++ b/google/ads/googleads/v2/resources/ad_group_audience_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -35,9 +36,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // Network and YouTube Network ads, and remarketing lists for search ads (RLSA), // aggregated at the audience level. message AdGroupAudienceView { - // The resource name of the ad group audience view. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupAudienceView" + pattern: "customers/{customer}/adGroupAudienceViews/{ad_group_audience_view}" + }; + + // Output only. The resource name of the ad group audience view. // Ad group audience view resource names have the form: // // `customers/{customer_id}/adGroupAudienceViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAudienceView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/ad_group_bid_modifier.proto b/google/ads/googleads/v2/resources/ad_group_bid_modifier.proto index 8565356ae..b547e8c4a 100644 --- a/google/ads/googleads/v2/resources/ad_group_bid_modifier.proto +++ b/google/ads/googleads/v2/resources/ad_group_bid_modifier.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/criteria.proto"; import "google/ads/googleads/v2/enums/bid_modifier_source.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,53 +36,73 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // Represents an ad group bid modifier. message AdGroupBidModifier { - // The resource name of the ad group bid modifier. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupBidModifier" + pattern: "customers/{customer}/adGroupBidModifiers/{ad_group_bid_modifier}" + }; + + // Immutable. The resource name of the ad group bid modifier. // Ad group bid modifier resource names have the form: // // `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}~{criterion_id}` - string resource_name = 1; - - // The ad group to which this criterion belongs. - google.protobuf.StringValue ad_group = 2; - - // The ID of the criterion to bid modify. + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupBidModifier" + } + ]; + + // Immutable. The ad group to which this criterion belongs. + google.protobuf.StringValue ad_group = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Output only. The ID of the criterion to bid modify. // // This field is ignored for mutates. - google.protobuf.Int64Value criterion_id = 3; + google.protobuf.Int64Value criterion_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The modifier for the bid when the criterion matches. The modifier must be // in the range: 0.1 - 10.0. The range is 1.0 - 6.0 for PreferredContent. // Use 0 to opt out of a Device type. google.protobuf.DoubleValue bid_modifier = 4; - // The base ad group from which this draft/trial adgroup bid modifier was + // Output only. The base ad group from which this draft/trial adgroup bid modifier was // created. If ad_group is a base ad group then this field will be equal to // ad_group. If the ad group was created in the draft or trial and has no // corresponding base ad group, then this field will be null. // This field is readonly. - google.protobuf.StringValue base_ad_group = 9; + google.protobuf.StringValue base_ad_group = 9 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; - // Bid modifier source. - google.ads.googleads.v2.enums.BidModifierSourceEnum.BidModifierSource bid_modifier_source = 10; + // Output only. Bid modifier source. + google.ads.googleads.v2.enums.BidModifierSourceEnum.BidModifierSource bid_modifier_source = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // The criterion of this ad group bid modifier. oneof criterion { - // Criterion for hotel date selection (default dates vs. user selected). - google.ads.googleads.v2.common.HotelDateSelectionTypeInfo hotel_date_selection_type = 5; + // Immutable. Criterion for hotel date selection (default dates vs. user selected). + google.ads.googleads.v2.common.HotelDateSelectionTypeInfo hotel_date_selection_type = 5 [(google.api.field_behavior) = IMMUTABLE]; - // Criterion for number of days prior to the stay the booking is being made. - google.ads.googleads.v2.common.HotelAdvanceBookingWindowInfo hotel_advance_booking_window = 6; + // Immutable. Criterion for number of days prior to the stay the booking is being made. + google.ads.googleads.v2.common.HotelAdvanceBookingWindowInfo hotel_advance_booking_window = 6 [(google.api.field_behavior) = IMMUTABLE]; - // Criterion for length of hotel stay in nights. - google.ads.googleads.v2.common.HotelLengthOfStayInfo hotel_length_of_stay = 7; + // Immutable. Criterion for length of hotel stay in nights. + google.ads.googleads.v2.common.HotelLengthOfStayInfo hotel_length_of_stay = 7 [(google.api.field_behavior) = IMMUTABLE]; - // Criterion for day of the week the booking is for. - google.ads.googleads.v2.common.HotelCheckInDayInfo hotel_check_in_day = 8; + // Immutable. Criterion for day of the week the booking is for. + google.ads.googleads.v2.common.HotelCheckInDayInfo hotel_check_in_day = 8 [(google.api.field_behavior) = IMMUTABLE]; - // A device criterion. - google.ads.googleads.v2.common.DeviceInfo device = 11; + // Immutable. A device criterion. + google.ads.googleads.v2.common.DeviceInfo device = 11 [(google.api.field_behavior) = IMMUTABLE]; - // A preferred content criterion. - google.ads.googleads.v2.common.PreferredContentInfo preferred_content = 12; + // Immutable. A preferred content criterion. + google.ads.googleads.v2.common.PreferredContentInfo preferred_content = 12 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v2/resources/ad_group_criterion.proto b/google/ads/googleads/v2/resources/ad_group_criterion.proto index b839cfb45..c9bb36601 100644 --- a/google/ads/googleads/v2/resources/ad_group_criterion.proto +++ b/google/ads/googleads/v2/resources/ad_group_criterion.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -25,6 +24,8 @@ import "google/ads/googleads/v2/enums/bidding_source.proto"; import "google/ads/googleads/v2/enums/criterion_system_serving_status.proto"; import "google/ads/googleads/v2/enums/criterion_type.proto"; import "google/ads/googleads/v2/enums/quality_score_bucket.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -41,81 +42,96 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // An ad group criterion. message AdGroupCriterion { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupCriterion" + pattern: "customers/{customer}/adGroupCriteria/{ad_group_criterion}" + }; + // A container for ad group criterion quality information. message QualityInfo { - // The quality score. + // Output only. The quality score. // // This field may not be populated if Google does not have enough // information to determine a value. - google.protobuf.Int32Value quality_score = 1; + google.protobuf.Int32Value quality_score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The performance of the ad compared to other advertisers. - google.ads.googleads.v2.enums.QualityScoreBucketEnum.QualityScoreBucket creative_quality_score = 2; + // Output only. The performance of the ad compared to other advertisers. + google.ads.googleads.v2.enums.QualityScoreBucketEnum.QualityScoreBucket creative_quality_score = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The quality score of the landing page. - google.ads.googleads.v2.enums.QualityScoreBucketEnum.QualityScoreBucket post_click_quality_score = 3; + // Output only. The quality score of the landing page. + google.ads.googleads.v2.enums.QualityScoreBucketEnum.QualityScoreBucket post_click_quality_score = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The click-through rate compared to that of other advertisers. - google.ads.googleads.v2.enums.QualityScoreBucketEnum.QualityScoreBucket search_predicted_ctr = 4; + // Output only. The click-through rate compared to that of other advertisers. + google.ads.googleads.v2.enums.QualityScoreBucketEnum.QualityScoreBucket search_predicted_ctr = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Estimates for criterion bids at various positions. message PositionEstimates { - // The estimate of the CPC bid required for ad to be shown on first + // Output only. The estimate of the CPC bid required for ad to be shown on first // page of search results. - google.protobuf.Int64Value first_page_cpc_micros = 1; + google.protobuf.Int64Value first_page_cpc_micros = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The estimate of the CPC bid required for ad to be displayed in first + // Output only. The estimate of the CPC bid required for ad to be displayed in first // position, at the top of the first page of search results. - google.protobuf.Int64Value first_position_cpc_micros = 2; + google.protobuf.Int64Value first_position_cpc_micros = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The estimate of the CPC bid required for ad to be displayed at the top + // Output only. The estimate of the CPC bid required for ad to be displayed at the top // of the first page of search results. - google.protobuf.Int64Value top_of_page_cpc_micros = 3; + google.protobuf.Int64Value top_of_page_cpc_micros = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Estimate of how many clicks per week you might get by changing your + // Output only. Estimate of how many clicks per week you might get by changing your // keyword bid to the value in first_position_cpc_micros. - google.protobuf.Int64Value estimated_add_clicks_at_first_position_cpc = 4; + google.protobuf.Int64Value estimated_add_clicks_at_first_position_cpc = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Estimate of how your cost per week might change when changing your + // Output only. Estimate of how your cost per week might change when changing your // keyword bid to the value in first_position_cpc_micros. - google.protobuf.Int64Value estimated_add_cost_at_first_position_cpc = 5; + google.protobuf.Int64Value estimated_add_cost_at_first_position_cpc = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // The resource name of the ad group criterion. + // Immutable. The resource name of the ad group criterion. // Ad group criterion resource names have the form: // // `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}` - string resource_name = 1; - - // The ID of the criterion. + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; + + // Output only. The ID of the criterion. // // This field is ignored for mutates. - google.protobuf.Int64Value criterion_id = 26; + google.protobuf.Int64Value criterion_id = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; // The status of the criterion. google.ads.googleads.v2.enums.AdGroupCriterionStatusEnum.AdGroupCriterionStatus status = 3; - // Information regarding the quality of the criterion. - QualityInfo quality_info = 4; + // Output only. Information regarding the quality of the criterion. + QualityInfo quality_info = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The ad group to which the criterion belongs. - google.protobuf.StringValue ad_group = 5; + // Immutable. The ad group to which the criterion belongs. + google.protobuf.StringValue ad_group = 5 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; - // The type of the criterion. - google.ads.googleads.v2.enums.CriterionTypeEnum.CriterionType type = 25; + // Output only. The type of the criterion. + google.ads.googleads.v2.enums.CriterionTypeEnum.CriterionType type = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether to target (`false`) or exclude (`true`) the criterion. + // Immutable. Whether to target (`false`) or exclude (`true`) the criterion. // // This field is immutable. To switch a criterion from positive to negative, // remove then re-add it. - google.protobuf.BoolValue negative = 31; + google.protobuf.BoolValue negative = 31 [(google.api.field_behavior) = IMMUTABLE]; - // Serving status of the criterion. - google.ads.googleads.v2.enums.CriterionSystemServingStatusEnum.CriterionSystemServingStatus system_serving_status = 52; + // Output only. Serving status of the criterion. + google.ads.googleads.v2.enums.CriterionSystemServingStatusEnum.CriterionSystemServingStatus system_serving_status = 52 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Approval status of the criterion. - google.ads.googleads.v2.enums.AdGroupCriterionApprovalStatusEnum.AdGroupCriterionApprovalStatus approval_status = 53; + // Output only. Approval status of the criterion. + google.ads.googleads.v2.enums.AdGroupCriterionApprovalStatusEnum.AdGroupCriterionApprovalStatus approval_status = 53 [(google.api.field_behavior) = OUTPUT_ONLY]; // The modifier for the bid when the criterion matches. The modifier must be // in the range: 0.1 - 10.0. Most targetable criteria types support modifiers. @@ -135,32 +151,32 @@ message AdGroupCriterion { // value stored here is 1,000,000 * [fraction]. google.protobuf.Int64Value percent_cpc_bid_micros = 33; - // The effective CPC (cost-per-click) bid. - google.protobuf.Int64Value effective_cpc_bid_micros = 18; + // Output only. The effective CPC (cost-per-click) bid. + google.protobuf.Int64Value effective_cpc_bid_micros = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The effective CPM (cost-per-thousand viewable impressions) bid. - google.protobuf.Int64Value effective_cpm_bid_micros = 19; + // Output only. The effective CPM (cost-per-thousand viewable impressions) bid. + google.protobuf.Int64Value effective_cpm_bid_micros = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The effective CPV (cost-per-view) bid. - google.protobuf.Int64Value effective_cpv_bid_micros = 20; + // Output only. The effective CPV (cost-per-view) bid. + google.protobuf.Int64Value effective_cpv_bid_micros = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The effective Percent CPC bid amount. - google.protobuf.Int64Value effective_percent_cpc_bid_micros = 34; + // Output only. The effective Percent CPC bid amount. + google.protobuf.Int64Value effective_percent_cpc_bid_micros = 34 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Source of the effective CPC bid. - google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_cpc_bid_source = 21; + // Output only. Source of the effective CPC bid. + google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_cpc_bid_source = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Source of the effective CPM bid. - google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_cpm_bid_source = 22; + // Output only. Source of the effective CPM bid. + google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_cpm_bid_source = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Source of the effective CPV bid. - google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_cpv_bid_source = 23; + // Output only. Source of the effective CPV bid. + google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_cpv_bid_source = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Source of the effective Percent CPC bid. - google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_percent_cpc_bid_source = 35; + // Output only. Source of the effective Percent CPC bid. + google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_percent_cpc_bid_source = 35 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Estimates for criterion bids at various positions. - PositionEstimates position_estimates = 10; + // Output only. Estimates for criterion bids at various positions. + PositionEstimates position_estimates = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // The list of possible final URLs after all cross-domain redirects for the // ad. @@ -183,58 +199,58 @@ message AdGroupCriterion { // // Exactly one must be set. oneof criterion { - // Keyword. - google.ads.googleads.v2.common.KeywordInfo keyword = 27; + // Immutable. Keyword. + google.ads.googleads.v2.common.KeywordInfo keyword = 27 [(google.api.field_behavior) = IMMUTABLE]; - // Placement. - google.ads.googleads.v2.common.PlacementInfo placement = 28; + // Immutable. Placement. + google.ads.googleads.v2.common.PlacementInfo placement = 28 [(google.api.field_behavior) = IMMUTABLE]; - // Mobile app category. - google.ads.googleads.v2.common.MobileAppCategoryInfo mobile_app_category = 29; + // Immutable. Mobile app category. + google.ads.googleads.v2.common.MobileAppCategoryInfo mobile_app_category = 29 [(google.api.field_behavior) = IMMUTABLE]; - // Mobile application. - google.ads.googleads.v2.common.MobileApplicationInfo mobile_application = 30; + // Immutable. Mobile application. + google.ads.googleads.v2.common.MobileApplicationInfo mobile_application = 30 [(google.api.field_behavior) = IMMUTABLE]; - // Listing group. - google.ads.googleads.v2.common.ListingGroupInfo listing_group = 32; + // Immutable. Listing group. + google.ads.googleads.v2.common.ListingGroupInfo listing_group = 32 [(google.api.field_behavior) = IMMUTABLE]; - // Age range. - google.ads.googleads.v2.common.AgeRangeInfo age_range = 36; + // Immutable. Age range. + google.ads.googleads.v2.common.AgeRangeInfo age_range = 36 [(google.api.field_behavior) = IMMUTABLE]; - // Gender. - google.ads.googleads.v2.common.GenderInfo gender = 37; + // Immutable. Gender. + google.ads.googleads.v2.common.GenderInfo gender = 37 [(google.api.field_behavior) = IMMUTABLE]; - // Income range. - google.ads.googleads.v2.common.IncomeRangeInfo income_range = 38; + // Immutable. Income range. + google.ads.googleads.v2.common.IncomeRangeInfo income_range = 38 [(google.api.field_behavior) = IMMUTABLE]; - // Parental status. - google.ads.googleads.v2.common.ParentalStatusInfo parental_status = 39; + // Immutable. Parental status. + google.ads.googleads.v2.common.ParentalStatusInfo parental_status = 39 [(google.api.field_behavior) = IMMUTABLE]; - // User List. - google.ads.googleads.v2.common.UserListInfo user_list = 42; + // Immutable. User List. + google.ads.googleads.v2.common.UserListInfo user_list = 42 [(google.api.field_behavior) = IMMUTABLE]; - // YouTube Video. - google.ads.googleads.v2.common.YouTubeVideoInfo youtube_video = 40; + // Immutable. YouTube Video. + google.ads.googleads.v2.common.YouTubeVideoInfo youtube_video = 40 [(google.api.field_behavior) = IMMUTABLE]; - // YouTube Channel. - google.ads.googleads.v2.common.YouTubeChannelInfo youtube_channel = 41; + // Immutable. YouTube Channel. + google.ads.googleads.v2.common.YouTubeChannelInfo youtube_channel = 41 [(google.api.field_behavior) = IMMUTABLE]; - // Topic. - google.ads.googleads.v2.common.TopicInfo topic = 43; + // Immutable. Topic. + google.ads.googleads.v2.common.TopicInfo topic = 43 [(google.api.field_behavior) = IMMUTABLE]; - // User Interest. - google.ads.googleads.v2.common.UserInterestInfo user_interest = 45; + // Immutable. User Interest. + google.ads.googleads.v2.common.UserInterestInfo user_interest = 45 [(google.api.field_behavior) = IMMUTABLE]; - // Webpage - google.ads.googleads.v2.common.WebpageInfo webpage = 46; + // Immutable. Webpage + google.ads.googleads.v2.common.WebpageInfo webpage = 46 [(google.api.field_behavior) = IMMUTABLE]; - // App Payment Model. - google.ads.googleads.v2.common.AppPaymentModelInfo app_payment_model = 47; + // Immutable. App Payment Model. + google.ads.googleads.v2.common.AppPaymentModelInfo app_payment_model = 47 [(google.api.field_behavior) = IMMUTABLE]; - // Custom Affinity. - google.ads.googleads.v2.common.CustomAffinityInfo custom_affinity = 48; + // Immutable. Custom Affinity. + google.ads.googleads.v2.common.CustomAffinityInfo custom_affinity = 48 [(google.api.field_behavior) = IMMUTABLE]; - // Custom Intent. - google.ads.googleads.v2.common.CustomIntentInfo custom_intent = 49; + // Immutable. Custom Intent. + google.ads.googleads.v2.common.CustomIntentInfo custom_intent = 49 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v2/resources/ad_group_criterion_label.proto b/google/ads/googleads/v2/resources/ad_group_criterion_label.proto index 25f65231c..f343dd74b 100644 --- a/google/ads/googleads/v2/resources/ad_group_criterion_label.proto +++ b/google/ads/googleads/v2/resources/ad_group_criterion_label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -33,14 +34,34 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A relationship between an ad group criterion and a label. message AdGroupCriterionLabel { - // The resource name of the ad group criterion label. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupCriterionLabel" + pattern: "customers/{customer}/adGroupCriterionLabels/{ad_group_criterion_label}" + }; + + // Immutable. The resource name of the ad group criterion label. // Ad group criterion label resource names have the form: // `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterionLabel" + } + ]; - // The ad group criterion to which the label is attached. - google.protobuf.StringValue ad_group_criterion = 2; + // Immutable. The ad group criterion to which the label is attached. + google.protobuf.StringValue ad_group_criterion = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; - // The label assigned to the ad group criterion. - google.protobuf.StringValue label = 3; + // Immutable. The label assigned to the ad group criterion. + google.protobuf.StringValue label = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; } diff --git a/google/ads/googleads/v2/resources/ad_group_criterion_simulation.proto b/google/ads/googleads/v2/resources/ad_group_criterion_simulation.proto index 4cf32d5e2..f9c8cabfc 100644 --- a/google/ads/googleads/v2/resources/ad_group_criterion_simulation.proto +++ b/google/ads/googleads/v2/resources/ad_group_criterion_simulation.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/simulation.proto"; import "google/ads/googleads/v2/enums/simulation_modification_method.proto"; import "google/ads/googleads/v2/enums/simulation_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -38,37 +39,47 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // channel type, criterion type, simulation type, and simulation modification // method are detailed below respectively. // -// DISPLAY KEYWORD CPC_BID UNIFORM -// SEARCH KEYWORD CPC_BID UNIFORM -// SHOPPING LISTING_GROUP CPC_BID UNIFORM +// 1. DISPLAY - KEYWORD - CPC_BID - UNIFORM +// 2. SEARCH - KEYWORD - CPC_BID - UNIFORM +// 3. SHOPPING - LISTING_GROUP - CPC_BID - UNIFORM message AdGroupCriterionSimulation { - // The resource name of the ad group criterion simulation. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupCriterionSimulation" + pattern: "customers/{customer}/adGroupCriterionSimulations/{ad_group_criterion_simulation}" + }; + + // Output only. The resource name of the ad group criterion simulation. // Ad group criterion simulation resource names have the form: // // `customers/{customer_id}/adGroupCriterionSimulations/{ad_group_id}~{criterion_id}~{type}~{modification_method}~{start_date}~{end_date}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterionSimulation" + } + ]; - // AdGroup ID of the simulation. - google.protobuf.Int64Value ad_group_id = 2; + // Output only. AdGroup ID of the simulation. + google.protobuf.Int64Value ad_group_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Criterion ID of the simulation. - google.protobuf.Int64Value criterion_id = 3; + // Output only. Criterion ID of the simulation. + google.protobuf.Int64Value criterion_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The field that the simulation modifies. - google.ads.googleads.v2.enums.SimulationTypeEnum.SimulationType type = 4; + // Output only. The field that the simulation modifies. + google.ads.googleads.v2.enums.SimulationTypeEnum.SimulationType type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // How the simulation modifies the field. - google.ads.googleads.v2.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 5; + // Output only. How the simulation modifies the field. + google.ads.googleads.v2.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // First day on which the simulation is based, in YYYY-MM-DD format. - google.protobuf.StringValue start_date = 6; + // Output only. First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Last day on which the simulation is based, in YYYY-MM-DD format. - google.protobuf.StringValue end_date = 7; + // Output only. Last day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue end_date = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // List of simulation points. oneof point_list { - // Simulation points if the simulation type is CPC_BID. - google.ads.googleads.v2.common.CpcBidSimulationPointList cpc_bid_point_list = 8; + // Output only. Simulation points if the simulation type is CPC_BID. + google.ads.googleads.v2.common.CpcBidSimulationPointList cpc_bid_point_list = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v2/resources/ad_group_extension_setting.proto b/google/ads/googleads/v2/resources/ad_group_extension_setting.proto index f1244580a..cb2d5d9cc 100644 --- a/google/ads/googleads/v2/resources/ad_group_extension_setting.proto +++ b/google/ads/googleads/v2/resources/ad_group_extension_setting.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/extension_setting_device.proto"; import "google/ads/googleads/v2/enums/extension_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,27 +36,44 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // An ad group extension setting. message AdGroupExtensionSetting { - // The resource name of the ad group extension setting. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupExtensionSetting" + pattern: "customers/{customer}/adGroupExtensionSettings/{ad_group_extension_setting}" + }; + + // Immutable. The resource name of the ad group extension setting. // AdGroupExtensionSetting resource names have the form: // // `customers/{customer_id}/adGroupExtensionSettings/{ad_group_id}~{extension_type}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupExtensionSetting" + } + ]; - // The extension type of the ad group extension setting. - google.ads.googleads.v2.enums.ExtensionTypeEnum.ExtensionType extension_type = 2; + // Immutable. The extension type of the ad group extension setting. + google.ads.googleads.v2.enums.ExtensionTypeEnum.ExtensionType extension_type = 2 [(google.api.field_behavior) = IMMUTABLE]; - // The resource name of the ad group. The linked extension feed items will + // Immutable. The resource name of the ad group. The linked extension feed items will // serve under this ad group. // AdGroup resource names have the form: // // `customers/{customer_id}/adGroups/{ad_group_id}` - google.protobuf.StringValue ad_group = 3; + google.protobuf.StringValue ad_group = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; // The resource names of the extension feed items to serve under the ad group. // ExtensionFeedItem resource names have the form: // // `customers/{customer_id}/extensionFeedItems/{feed_item_id}` - repeated google.protobuf.StringValue extension_feed_items = 4; + repeated google.protobuf.StringValue extension_feed_items = 4 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + }]; // The device for which the extensions will serve. Optional. google.ads.googleads.v2.enums.ExtensionSettingDeviceEnum.ExtensionSettingDevice device = 5; diff --git a/google/ads/googleads/v2/resources/ad_group_feed.proto b/google/ads/googleads/v2/resources/ad_group_feed.proto index 9d7692c92..2820d5d97 100644 --- a/google/ads/googleads/v2/resources/ad_group_feed.proto +++ b/google/ads/googleads/v2/resources/ad_group_feed.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/matching_function.proto"; import "google/ads/googleads/v2/enums/feed_link_status.proto"; import "google/ads/googleads/v2/enums/placeholder_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -36,17 +37,37 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // An ad group feed. message AdGroupFeed { - // The resource name of the ad group feed. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupFeed" + pattern: "customers/{customer}/adGroupFeeds/{ad_group_feed}" + }; + + // Immutable. The resource name of the ad group feed. // Ad group feed resource names have the form: // // `customers/{customer_id}/adGroupFeeds/{ad_group_id}~{feed_id} - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupFeed" + } + ]; - // The feed being linked to the ad group. - google.protobuf.StringValue feed = 2; + // Immutable. The feed being linked to the ad group. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; - // The ad group being linked to the feed. - google.protobuf.StringValue ad_group = 3; + // Immutable. The ad group being linked to the feed. + google.protobuf.StringValue ad_group = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; // Indicates which placeholder types the feed may populate under the connected // ad group. Required. @@ -57,7 +78,7 @@ message AdGroupFeed { // Required. google.ads.googleads.v2.common.MatchingFunction matching_function = 5; - // Status of the ad group feed. + // Output only. Status of the ad group feed. // This field is read-only. - google.ads.googleads.v2.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6; + google.ads.googleads.v2.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/ad_group_label.proto b/google/ads/googleads/v2/resources/ad_group_label.proto index 7595e9643..818648824 100644 --- a/google/ads/googleads/v2/resources/ad_group_label.proto +++ b/google/ads/googleads/v2/resources/ad_group_label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -33,14 +34,34 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A relationship between an ad group and a label. message AdGroupLabel { - // The resource name of the ad group label. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupLabel" + pattern: "customers/{customer}/adGroupLabels/{ad_group_label}" + }; + + // Immutable. The resource name of the ad group label. // Ad group label resource names have the form: // `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupLabel" + } + ]; - // The ad group to which the label is attached. - google.protobuf.StringValue ad_group = 2; + // Immutable. The ad group to which the label is attached. + google.protobuf.StringValue ad_group = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; - // The label assigned to the ad group. - google.protobuf.StringValue label = 3; + // Immutable. The label assigned to the ad group. + google.protobuf.StringValue label = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; } diff --git a/google/ads/googleads/v2/resources/ad_group_simulation.proto b/google/ads/googleads/v2/resources/ad_group_simulation.proto index af4b9e884..c4cee7b16 100644 --- a/google/ads/googleads/v2/resources/ad_group_simulation.proto +++ b/google/ads/googleads/v2/resources/ad_group_simulation.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/simulation.proto"; import "google/ads/googleads/v2/enums/simulation_modification_method.proto"; import "google/ads/googleads/v2/enums/simulation_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -38,45 +39,55 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // channel type, simulation type and simulation modification method is // detailed below respectively. // -// SEARCH CPC_BID DEFAULT -// SEARCH CPC_BID UNIFORM -// SEARCH TARGET_CPA UNIFORM -// DISPLAY CPC_BID DEFAULT -// DISPLAY CPC_BID UNIFORM -// DISPLAY TARGET_CPA UNIFORM -// VIDEO CPV_BID DEFAULT -// VIDEO CPV_BID UNIFORM +// 1. SEARCH - CPC_BID - DEFAULT +// 2. SEARCH - CPC_BID - UNIFORM +// 3. SEARCH - TARGET_CPA - UNIFORM +// 4. DISPLAY - CPC_BID - DEFAULT +// 5. DISPLAY - CPC_BID - UNIFORM +// 6. DISPLAY - TARGET_CPA - UNIFORM +// 7. VIDEO - CPV_BID - DEFAULT +// 8. VIDEO - CPV_BID - UNIFORM message AdGroupSimulation { - // The resource name of the ad group simulation. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupSimulation" + pattern: "customers/{customer}/adGroupSimulations/{ad_group_simulation}" + }; + + // Output only. The resource name of the ad group simulation. // Ad group simulation resource names have the form: // // `customers/{customer_id}/adGroupSimulations/{ad_group_id}~{type}~{modification_method}~{start_date}~{end_date}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupSimulation" + } + ]; - // Ad group id of the simulation. - google.protobuf.Int64Value ad_group_id = 2; + // Output only. Ad group id of the simulation. + google.protobuf.Int64Value ad_group_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The field that the simulation modifies. - google.ads.googleads.v2.enums.SimulationTypeEnum.SimulationType type = 3; + // Output only. The field that the simulation modifies. + google.ads.googleads.v2.enums.SimulationTypeEnum.SimulationType type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // How the simulation modifies the field. - google.ads.googleads.v2.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 4; + // Output only. How the simulation modifies the field. + google.ads.googleads.v2.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // First day on which the simulation is based, in YYYY-MM-DD format. - google.protobuf.StringValue start_date = 5; + // Output only. First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Last day on which the simulation is based, in YYYY-MM-DD format - google.protobuf.StringValue end_date = 6; + // Output only. Last day on which the simulation is based, in YYYY-MM-DD format + google.protobuf.StringValue end_date = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // List of simulation points. oneof point_list { - // Simulation points if the simulation type is CPC_BID. - google.ads.googleads.v2.common.CpcBidSimulationPointList cpc_bid_point_list = 8; + // Output only. Simulation points if the simulation type is CPC_BID. + google.ads.googleads.v2.common.CpcBidSimulationPointList cpc_bid_point_list = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Simulation points if the simulation type is CPV_BID. - google.ads.googleads.v2.common.CpvBidSimulationPointList cpv_bid_point_list = 10; + // Output only. Simulation points if the simulation type is CPV_BID. + google.ads.googleads.v2.common.CpvBidSimulationPointList cpv_bid_point_list = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Simulation points if the simulation type is TARGET_CPA. - google.ads.googleads.v2.common.TargetCpaSimulationPointList target_cpa_point_list = 9; + // Output only. Simulation points if the simulation type is TARGET_CPA. + google.ads.googleads.v2.common.TargetCpaSimulationPointList target_cpa_point_list = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v2/resources/ad_parameter.proto b/google/ads/googleads/v2/resources/ad_parameter.proto index 4f11cfb8d..d0c7297ae 100644 --- a/google/ads/googleads/v2/resources/ad_parameter.proto +++ b/google/ads/googleads/v2/resources/ad_parameter.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -38,17 +39,32 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // In the ad the parameters are referenced by a placeholder of the form // "{param#:value}". E.g. "{param1:$17}" message AdParameter { - // The resource name of the ad parameter. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdParameter" + pattern: "customers/{customer}/adParameters/{ad_parameter}" + }; + + // Immutable. The resource name of the ad parameter. // Ad parameter resource names have the form: // // `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdParameter" + } + ]; - // The ad group criterion that this ad parameter belongs to. - google.protobuf.StringValue ad_group_criterion = 2; + // Immutable. The ad group criterion that this ad parameter belongs to. + google.protobuf.StringValue ad_group_criterion = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; - // The unique index of this ad parameter. Must be either 1 or 2. - google.protobuf.Int64Value parameter_index = 3; + // Immutable. The unique index of this ad parameter. Must be either 1 or 2. + google.protobuf.Int64Value parameter_index = 3 [(google.api.field_behavior) = IMMUTABLE]; // Numeric value to insert into the ad text. The following restrictions // apply: diff --git a/google/ads/googleads/v2/resources/ad_schedule_view.proto b/google/ads/googleads/v2/resources/ad_schedule_view.proto index 618c96106..79dc8b2cb 100644 --- a/google/ads/googleads/v2/resources/ad_schedule_view.proto +++ b/google/ads/googleads/v2/resources/ad_schedule_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -33,9 +34,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // An ad schedule view summarizes the performance of campaigns by // AdSchedule criteria. message AdScheduleView { - // The resource name of the ad schedule view. + option (google.api.resource) = { + type: "googleads.googleapis.com/AdScheduleView" + pattern: "customers/{customer}/adScheduleViews/{ad_schedule_view}" + }; + + // Output only. The resource name of the ad schedule view. // AdSchedule view resource names have the form: // // `customers/{customer_id}/adScheduleViews/{campaign_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdScheduleView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/age_range_view.proto b/google/ads/googleads/v2/resources/age_range_view.proto index 5f1c1b405..1f28a9e2f 100644 --- a/google/ads/googleads/v2/resources/age_range_view.proto +++ b/google/ads/googleads/v2/resources/age_range_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // An age range view. message AgeRangeView { - // The resource name of the age range view. + option (google.api.resource) = { + type: "googleads.googleapis.com/AgeRangeView" + pattern: "customers/{customer}/ageRangeViews/{age_range_view}" + }; + + // Output only. The resource name of the age range view. // Age range view resource names have the form: // // `customers/{customer_id}/ageRangeViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AgeRangeView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/asset.proto b/google/ads/googleads/v2/resources/asset.proto index fc473ce3c..48cdbe291 100644 --- a/google/ads/googleads/v2/resources/asset.proto +++ b/google/ads/googleads/v2/resources/asset.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/asset_types.proto"; import "google/ads/googleads/v2/enums/asset_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -36,33 +37,43 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // Asset is a part of an ad which can be shared across multiple ads. // It can be an image (ImageAsset), a video (YoutubeVideoAsset), etc. message Asset { - // The resource name of the asset. + option (google.api.resource) = { + type: "googleads.googleapis.com/Asset" + pattern: "customers/{customer}/assets/{asset}" + }; + + // Immutable. The resource name of the asset. // Asset resource names have the form: // // `customers/{customer_id}/assets/{asset_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Asset" + } + ]; - // The ID of the asset. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the asset. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional name of the asset. google.protobuf.StringValue name = 3; - // Type of the asset. - google.ads.googleads.v2.enums.AssetTypeEnum.AssetType type = 4; + // Output only. Type of the asset. + google.ads.googleads.v2.enums.AssetTypeEnum.AssetType type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // The specific type of the asset. oneof asset_data { - // A YouTube video asset. - google.ads.googleads.v2.common.YoutubeVideoAsset youtube_video_asset = 5; + // Immutable. A YouTube video asset. + google.ads.googleads.v2.common.YoutubeVideoAsset youtube_video_asset = 5 [(google.api.field_behavior) = IMMUTABLE]; - // A media bundle asset. - google.ads.googleads.v2.common.MediaBundleAsset media_bundle_asset = 6; + // Immutable. A media bundle asset. + google.ads.googleads.v2.common.MediaBundleAsset media_bundle_asset = 6 [(google.api.field_behavior) = IMMUTABLE]; - // An image asset. - google.ads.googleads.v2.common.ImageAsset image_asset = 7; + // Output only. An image asset. + google.ads.googleads.v2.common.ImageAsset image_asset = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A text asset. - google.ads.googleads.v2.common.TextAsset text_asset = 8; + // Output only. A text asset. + google.ads.googleads.v2.common.TextAsset text_asset = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v2/resources/bidding_strategy.proto b/google/ads/googleads/v2/resources/bidding_strategy.proto index 1c3cf33a8..3e7281535 100644 --- a/google/ads/googleads/v2/resources/bidding_strategy.proto +++ b/google/ads/googleads/v2/resources/bidding_strategy.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/bidding.proto"; import "google/ads/googleads/v2/enums/bidding_strategy_status.proto"; import "google/ads/googleads/v2/enums/bidding_strategy_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -36,14 +37,24 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A bidding strategy. message BiddingStrategy { - // The resource name of the bidding strategy. + option (google.api.resource) = { + type: "googleads.googleapis.com/BiddingStrategy" + pattern: "customers/{customer}/biddingStrategies/{bidding_strategy}" + }; + + // Immutable. The resource name of the bidding strategy. // Bidding strategy resource names have the form: // // `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BiddingStrategy" + } + ]; - // The ID of the bidding strategy. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the bidding strategy. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the bidding strategy. // All bidding strategies within an account must be named distinctly. @@ -52,26 +63,26 @@ message BiddingStrategy { // in UTF-8 bytes, (trimmed). google.protobuf.StringValue name = 4; - // The status of the bidding strategy. + // Output only. The status of the bidding strategy. // // This field is read-only. - google.ads.googleads.v2.enums.BiddingStrategyStatusEnum.BiddingStrategyStatus status = 15; + google.ads.googleads.v2.enums.BiddingStrategyStatusEnum.BiddingStrategyStatus status = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The type of the bidding strategy. + // Output only. The type of the bidding strategy. // Create a bidding strategy by setting the bidding scheme. // // This field is read-only. - google.ads.googleads.v2.enums.BiddingStrategyTypeEnum.BiddingStrategyType type = 5; + google.ads.googleads.v2.enums.BiddingStrategyTypeEnum.BiddingStrategyType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number of campaigns attached to this bidding strategy. + // Output only. The number of campaigns attached to this bidding strategy. // // This field is read-only. - google.protobuf.Int64Value campaign_count = 13; + google.protobuf.Int64Value campaign_count = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number of non-removed campaigns attached to this bidding strategy. + // Output only. The number of non-removed campaigns attached to this bidding strategy. // // This field is read-only. - google.protobuf.Int64Value non_removed_campaign_count = 14; + google.protobuf.Int64Value non_removed_campaign_count = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; // The bidding scheme. // diff --git a/google/ads/googleads/v2/resources/billing_setup.proto b/google/ads/googleads/v2/resources/billing_setup.proto index 15d1c3843..f8ab981a5 100644 --- a/google/ads/googleads/v2/resources/billing_setup.proto +++ b/google/ads/googleads/v2/resources/billing_setup.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/billing_setup_status.proto"; import "google/ads/googleads/v2/enums/time_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -33,68 +34,82 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // Proto file describing the BillingSetup resource. -// A billing setup across Ads and Payments systems; an association between a -// Payments account and an advertiser. A billing setup is specific to one -// advertiser. +// A billing setup, which associates a payments account and an advertiser. A +// billing setup is specific to one advertiser. message BillingSetup { - // Container of Payments account information for this billing. + option (google.api.resource) = { + type: "googleads.googleapis.com/BillingSetup" + pattern: "customers/{customer}/billingSetups/{billing_setup}" + }; + + // Container of payments account information for this billing. message PaymentsAccountInfo { - // A 16 digit id used to identify the Payments account associated with the + // Output only. A 16 digit id used to identify the payments account associated with the // billing setup. // // This must be passed as a string with dashes, e.g. "1234-5678-9012-3456". - google.protobuf.StringValue payments_account_id = 1; + google.protobuf.StringValue payments_account_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name of the Payments account associated with the billing setup. + // Immutable. The name of the payments account associated with the billing setup. // - // This enables the user to specify a meaningful name for a Payments account + // This enables the user to specify a meaningful name for a payments account // to aid in reconciling monthly invoices. // // This name will be printed in the monthly invoices. - google.protobuf.StringValue payments_account_name = 2; + google.protobuf.StringValue payments_account_name = 2 [(google.api.field_behavior) = IMMUTABLE]; - // A 12 digit id used to identify the Payments profile associated with the + // Immutable. A 12 digit id used to identify the payments profile associated with the // billing setup. // // This must be passed in as a string with dashes, e.g. "1234-5678-9012". - google.protobuf.StringValue payments_profile_id = 3; + google.protobuf.StringValue payments_profile_id = 3 [(google.api.field_behavior) = IMMUTABLE]; - // The name of the Payments profile associated with the billing setup. - google.protobuf.StringValue payments_profile_name = 4; + // Output only. The name of the payments profile associated with the billing setup. + google.protobuf.StringValue payments_profile_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A secondary payments profile id present in uncommon situations, e.g. + // Output only. A secondary payments profile id present in uncommon situations, e.g. // when a sequential liability agreement has been arranged. - google.protobuf.StringValue secondary_payments_profile_id = 5; + google.protobuf.StringValue secondary_payments_profile_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // The resource name of the billing setup. + // Immutable. The resource name of the billing setup. // BillingSetup resource names have the form: // // `customers/{customer_id}/billingSetups/{billing_setup_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BillingSetup" + } + ]; - // The ID of the billing setup. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the billing setup. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The status of the billing setup. - google.ads.googleads.v2.enums.BillingSetupStatusEnum.BillingSetupStatus status = 3; + // Output only. The status of the billing setup. + google.ads.googleads.v2.enums.BillingSetupStatusEnum.BillingSetupStatus status = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource name of the Payments account associated with this billing + // Immutable. The resource name of the payments account associated with this billing // setup. Payments resource names have the form: // // `customers/{customer_id}/paymentsAccounts/{payments_account_id}` - // When setting up billing, this is used to signup with an existing Payments + // When setting up billing, this is used to signup with an existing payments // account (and then payments_account_info should not be set). // When getting a billing setup, this and payments_account_info will be // populated. - google.protobuf.StringValue payments_account = 11; - - // The Payments account information associated with this billing setup. - // When setting up billing, this is used to signup with a new Payments account + google.protobuf.StringValue payments_account = 11 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/PaymentsAccount" + } + ]; + + // Immutable. The payments account information associated with this billing setup. + // When setting up billing, this is used to signup with a new payments account // (and then payments_account should not be set). // When getting a billing setup, this and payments_account will be // populated. - PaymentsAccountInfo payments_account_info = 12; + PaymentsAccountInfo payments_account_info = 12 [(google.api.field_behavior) = IMMUTABLE]; // When creating a new billing setup, this is when the setup should take // effect. NOW is the only acceptable start time if the customer doesn't have @@ -104,21 +119,21 @@ message BillingSetup { // However, if the setup was approved (see status) after the requested start // time, then this is the approval time. oneof start_time { - // The start date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. Only a + // Immutable. The start date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. Only a // future time is allowed. - google.protobuf.StringValue start_date_time = 9; + google.protobuf.StringValue start_date_time = 9 [(google.api.field_behavior) = IMMUTABLE]; - // The start time as a type. Only NOW is allowed. - google.ads.googleads.v2.enums.TimeTypeEnum.TimeType start_time_type = 10; + // Immutable. The start time as a type. Only NOW is allowed. + google.ads.googleads.v2.enums.TimeTypeEnum.TimeType start_time_type = 10 [(google.api.field_behavior) = IMMUTABLE]; } // When the billing setup ends / ended. This is either FOREVER or the start // time of the next scheduled billing setup. oneof end_time { - // The end date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. - google.protobuf.StringValue end_date_time = 13; + // Output only. The end date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue end_date_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The end time as a type. The only possible value is FOREVER. - google.ads.googleads.v2.enums.TimeTypeEnum.TimeType end_time_type = 14; + // Output only. The end time as a type. The only possible value is FOREVER. + google.ads.googleads.v2.enums.TimeTypeEnum.TimeType end_time_type = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v2/resources/campaign.proto b/google/ads/googleads/v2/resources/campaign.proto index e42a01aaa..4d3287cc4 100644 --- a/google/ads/googleads/v2/resources/campaign.proto +++ b/google/ads/googleads/v2/resources/campaign.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -37,6 +36,8 @@ import "google/ads/googleads/v2/enums/payment_mode.proto"; import "google/ads/googleads/v2/enums/positive_geo_target_type.proto"; import "google/ads/googleads/v2/enums/vanity_pharma_display_url_mode.proto"; import "google/ads/googleads/v2/enums/vanity_pharma_text.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -53,6 +54,11 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A campaign. message Campaign { + option (google.api.resource) = { + type: "googleads.googleapis.com/Campaign" + pattern: "customers/{customer}/campaigns/{campaign}" + }; + // The network settings for the campaign. message NetworkSettings { // Whether ads will be served with google.com search results. @@ -73,8 +79,18 @@ message Campaign { // Campaign-level settings for hotel ads. message HotelSettingInfo { - // The linked Hotel Center account. - google.protobuf.Int64Value hotel_center_id = 1; + // Immutable. The linked Hotel Center account. + google.protobuf.Int64Value hotel_center_id = 1 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Describes how unbranded pharma ads will be displayed. + message VanityPharma { + // The display mode for vanity pharma URLs. + google.ads.googleads.v2.enums.VanityPharmaDisplayUrlModeEnum.VanityPharmaDisplayUrlMode vanity_pharma_display_url_mode = 1; + + // The text that will be displayed in display URL of the text ad when + // website description is the selected display mode for vanity pharma URLs. + google.ads.googleads.v2.enums.VanityPharmaTextEnum.VanityPharmaText vanity_pharma_text = 2; } // The setting for controlling Dynamic Search Ads (DSA). @@ -89,24 +105,38 @@ message Campaign { // Whether the campaign uses advertiser supplied URLs exclusively. google.protobuf.BoolValue use_supplied_urls_only = 3; - // The list of page feeds associated with the campaign. - repeated google.protobuf.StringValue feeds = 5; + // Output only. The list of page feeds associated with the campaign. + repeated google.protobuf.StringValue feeds = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + } + + // Selective optimization setting for this campaign, which includes a set of + // conversion actions to optimize this campaign towards. + message SelectiveOptimization { + // The selected set of conversion actions for optimizing this campaign. + repeated google.protobuf.StringValue conversion_actions = 1 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ConversionAction" + }]; } // The setting for Shopping campaigns. Defines the universe of products that // can be advertised by the campaign, and how this campaign interacts with // other Shopping campaigns. message ShoppingSetting { - // ID of the Merchant Center account. + // Immutable. ID of the Merchant Center account. // This field is required for create operations. This field is immutable for // Shopping campaigns. - google.protobuf.Int64Value merchant_id = 1; + google.protobuf.Int64Value merchant_id = 1 [(google.api.field_behavior) = IMMUTABLE]; - // Sales country of products to include in the campaign. + // Immutable. Sales country of products to include in the campaign. // This field is required for Shopping campaigns. This field is immutable. // This field is optional for non-Shopping campaigns, but it must be equal // to 'ZZ' if set. - google.protobuf.StringValue sales_country = 2; + google.protobuf.StringValue sales_country = 2 [(google.api.field_behavior) = IMMUTABLE]; // Priority of the campaign. Campaigns with numerically higher priorities // take precedence over those with lower priorities. @@ -120,59 +150,47 @@ message Campaign { google.protobuf.BoolValue enable_local = 4; } - // Campaign level settings for tracking information. + // Campaign-level settings for tracking information. message TrackingSetting { - // The url used for dynamic tracking. - google.protobuf.StringValue tracking_url = 1; - } - - // Represents a collection of settings related to ads geotargeting. - message GeoTargetTypeSetting { - // The setting used for positive geotargeting in this particular campaign. - google.ads.googleads.v2.enums.PositiveGeoTargetTypeEnum.PositiveGeoTargetType positive_geo_target_type = 1; - - // The setting used for negative geotargeting in this particular campaign. - google.ads.googleads.v2.enums.NegativeGeoTargetTypeEnum.NegativeGeoTargetType negative_geo_target_type = 2; - } - - // Selective optimization setting for this campaign, which includes a set of - // conversion actions to optimize this campaign towards. - message SelectiveOptimization { - // The selected set of conversion actions for optimizing this campaign. - repeated google.protobuf.StringValue conversion_actions = 1; + // Output only. The url used for dynamic tracking. + google.protobuf.StringValue tracking_url = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // Campaign level settings for App Campaigns. + // Campaign-level settings for App Campaigns. message AppCampaignSetting { // Represents the goal which the bidding strategy of this app campaign // should optimize towards. google.ads.googleads.v2.enums.AppCampaignBiddingStrategyGoalTypeEnum.AppCampaignBiddingStrategyGoalType bidding_strategy_goal_type = 1; - // A string that uniquely identifies a mobile application. - google.protobuf.StringValue app_id = 2; + // Immutable. A string that uniquely identifies a mobile application. + google.protobuf.StringValue app_id = 2 [(google.api.field_behavior) = IMMUTABLE]; - // The application store that distributes this specific app. - google.ads.googleads.v2.enums.AppCampaignAppStoreEnum.AppCampaignAppStore app_store = 3; + // Immutable. The application store that distributes this specific app. + google.ads.googleads.v2.enums.AppCampaignAppStoreEnum.AppCampaignAppStore app_store = 3 [(google.api.field_behavior) = IMMUTABLE]; } - // Describes how unbranded pharma ads will be displayed. - message VanityPharma { - // The display mode for vanity pharma URLs. - google.ads.googleads.v2.enums.VanityPharmaDisplayUrlModeEnum.VanityPharmaDisplayUrlMode vanity_pharma_display_url_mode = 1; + // Represents a collection of settings related to ads geotargeting. + message GeoTargetTypeSetting { + // The setting used for positive geotargeting in this particular campaign. + google.ads.googleads.v2.enums.PositiveGeoTargetTypeEnum.PositiveGeoTargetType positive_geo_target_type = 1; - // The text that will be displayed in display URL of the text ad when - // website description is the selected display mode for vanity pharma URLs. - google.ads.googleads.v2.enums.VanityPharmaTextEnum.VanityPharmaText vanity_pharma_text = 2; + // The setting used for negative geotargeting in this particular campaign. + google.ads.googleads.v2.enums.NegativeGeoTargetTypeEnum.NegativeGeoTargetType negative_geo_target_type = 2; } - // The resource name of the campaign. + // Immutable. The resource name of the campaign. // Campaign resource names have the form: // // `customers/{customer_id}/campaigns/{campaign_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The ID of the campaign. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the campaign. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the campaign. // @@ -188,13 +206,13 @@ message Campaign { // When a new campaign is added, the status defaults to ENABLED. google.ads.googleads.v2.enums.CampaignStatusEnum.CampaignStatus status = 5; - // The ad serving status of the campaign. - google.ads.googleads.v2.enums.CampaignServingStatusEnum.CampaignServingStatus serving_status = 21; + // Output only. The ad serving status of the campaign. + google.ads.googleads.v2.enums.CampaignServingStatusEnum.CampaignServingStatus serving_status = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; // The ad serving optimization status of the campaign. google.ads.googleads.v2.enums.AdServingOptimizationStatusEnum.AdServingOptimizationStatus ad_serving_optimization_status = 8; - // The primary serving target for ads within the campaign. + // Immutable. The primary serving target for ads within the campaign. // The targeting options can be refined in `network_settings`. // // This field is required and should not be empty when creating new @@ -202,14 +220,14 @@ message Campaign { // // Can be set only when creating campaigns. // After the campaign is created, the field can not be changed. - google.ads.googleads.v2.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 9; + google.ads.googleads.v2.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 9 [(google.api.field_behavior) = IMMUTABLE]; - // Optional refinement to `advertising_channel_type`. + // Immutable. Optional refinement to `advertising_channel_type`. // Must be a valid sub-type of the parent channel type. // // Can be set only when creating campaigns. // After campaign is created, the field can not be changed. - google.ads.googleads.v2.enums.AdvertisingChannelSubTypeEnum.AdvertisingChannelSubType advertising_channel_sub_type = 10; + google.ads.googleads.v2.enums.AdvertisingChannelSubTypeEnum.AdvertisingChannelSubType advertising_channel_sub_type = 10 [(google.api.field_behavior) = IMMUTABLE]; // The URL template for constructing a tracking URL. google.protobuf.StringValue tracking_url_template = 11; @@ -225,8 +243,8 @@ message Campaign { // The network settings for the campaign. NetworkSettings network_settings = 14; - // The hotel setting for the campaign. - HotelSettingInfo hotel_setting = 32; + // Immutable. The hotel setting for the campaign. + HotelSettingInfo hotel_setting = 32 [(google.api.field_behavior) = IMMUTABLE]; // The setting for controlling Dynamic Search Ads (DSA). DynamicSearchAdsSetting dynamic_search_ads_setting = 33; @@ -243,29 +261,41 @@ message Campaign { // The setting related to App Campaign. AppCampaignSetting app_campaign_setting = 51; - // The resource names of labels attached to this campaign. - repeated google.protobuf.StringValue labels = 53; + // Output only. The resource names of labels attached to this campaign. + repeated google.protobuf.StringValue labels = 53 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignLabel" + } + ]; - // The type of campaign: normal, draft, or experiment. - google.ads.googleads.v2.enums.CampaignExperimentTypeEnum.CampaignExperimentType experiment_type = 17; + // Output only. The type of campaign: normal, draft, or experiment. + google.ads.googleads.v2.enums.CampaignExperimentTypeEnum.CampaignExperimentType experiment_type = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource name of the base campaign of a draft or experiment campaign. + // Output only. The resource name of the base campaign of a draft or experiment campaign. // For base campaigns, this is equal to `resource_name`. // // This field is read-only. - google.protobuf.StringValue base_campaign = 28; + google.protobuf.StringValue base_campaign = 28 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; // The budget of the campaign. - google.protobuf.StringValue campaign_budget = 6; + google.protobuf.StringValue campaign_budget = 6 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBudget" + }]; - // The type of bidding strategy. + // Output only. The type of bidding strategy. // // A bidding strategy can be created by setting either the bidding scheme to // create a standard bidding strategy or the `bidding_strategy` field to // create a portfolio bidding strategy. // // This field is read-only. - google.ads.googleads.v2.enums.BiddingStrategyTypeEnum.BiddingStrategyType bidding_strategy_type = 22; + google.ads.googleads.v2.enums.BiddingStrategyTypeEnum.BiddingStrategyType bidding_strategy_type = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; // The date when campaign started. // @@ -284,8 +314,8 @@ message Campaign { // A list that limits how often each user will see this campaign's ads. repeated google.ads.googleads.v2.common.FrequencyCapEntry frequency_caps = 40; - // 3-Tier Brand Safety setting for the campaign. - google.ads.googleads.v2.enums.BrandSafetySuitabilityEnum.BrandSafetySuitability video_brand_safety_suitability = 42; + // Output only. 3-Tier Brand Safety setting for the campaign. + google.ads.googleads.v2.enums.BrandSafetySuitabilityEnum.BrandSafetySuitability video_brand_safety_suitability = 42 [(google.api.field_behavior) = OUTPUT_ONLY]; // Describes how unbranded pharma ads will be displayed. VanityPharma vanity_pharma = 44; @@ -294,8 +324,8 @@ message Campaign { // conversion actions to optimize this campaign towards. SelectiveOptimization selective_optimization = 45; - // Campaign level settings for tracking information. - TrackingSetting tracking_setting = 46; + // Output only. Campaign-level settings for tracking information. + TrackingSetting tracking_setting = 46 [(google.api.field_behavior) = OUTPUT_ONLY]; // Payment mode for the campaign. google.ads.googleads.v2.enums.PaymentModeEnum.PaymentMode payment_mode = 52; @@ -306,7 +336,9 @@ message Campaign { // standard, that is embedded into the campaign. oneof campaign_bidding_strategy { // Portfolio bidding strategy used by campaign. - google.protobuf.StringValue bidding_strategy = 23; + google.protobuf.StringValue bidding_strategy = 23 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/BiddingStrategy" + }]; // Commission is an automatic bidding strategy in which the advertiser pays // a certain portion of the conversion value. @@ -321,8 +353,8 @@ message Campaign { // impressions. google.ads.googleads.v2.common.ManualCpm manual_cpm = 25; - // A bidding strategy that pays a configurable amount per video view. - google.ads.googleads.v2.common.ManualCpv manual_cpv = 37; + // Output only. A bidding strategy that pays a configurable amount per video view. + google.ads.googleads.v2.common.ManualCpv manual_cpv = 37 [(google.api.field_behavior) = OUTPUT_ONLY]; // Standard Maximize Conversions bidding strategy that automatically // maximizes number of conversions given a daily budget. diff --git a/google/ads/googleads/v2/resources/campaign_audience_view.proto b/google/ads/googleads/v2/resources/campaign_audience_view.proto index 9950d5d9f..175c2abef 100644 --- a/google/ads/googleads/v2/resources/campaign_audience_view.proto +++ b/google/ads/googleads/v2/resources/campaign_audience_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -36,9 +37,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // aggregated by campaign and audience criterion. This view only includes // audiences attached at the campaign level. message CampaignAudienceView { - // The resource name of the campaign audience view. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignAudienceView" + pattern: "customers/{customer}/campaignAudienceViews/{campaign_audience_view}" + }; + + // Output only. The resource name of the campaign audience view. // Campaign audience view resource names have the form: // // `customers/{customer_id}/campaignAudienceViews/{campaign_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignAudienceView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/campaign_bid_modifier.proto b/google/ads/googleads/v2/resources/campaign_bid_modifier.proto index d12e8eda7..f0065c2a9 100644 --- a/google/ads/googleads/v2/resources/campaign_bid_modifier.proto +++ b/google/ads/googleads/v2/resources/campaign_bid_modifier.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/criteria.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -34,26 +35,41 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // Represents a bid-modifiable only criterion at the campaign level. message CampaignBidModifier { - // The resource name of the campaign bid modifier. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignBidModifier" + pattern: "customers/{customer}/campaignBidModifiers/{campaign_bid_modifier}" + }; + + // Immutable. The resource name of the campaign bid modifier. // Campaign bid modifier resource names have the form: // // `customers/{customer_id}/campaignBidModifiers/{campaign_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBidModifier" + } + ]; - // The campaign to which this criterion belongs. - google.protobuf.StringValue campaign = 2; + // Output only. The campaign to which this criterion belongs. + google.protobuf.StringValue campaign = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The ID of the criterion to bid modify. + // Output only. The ID of the criterion to bid modify. // // This field is ignored for mutates. - google.protobuf.Int64Value criterion_id = 3; + google.protobuf.Int64Value criterion_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The modifier for the bid when the criterion matches. google.protobuf.DoubleValue bid_modifier = 4; // The criterion of this campaign bid modifier. oneof criterion { - // Criterion for interaction type. Only supported for search campaigns. - google.ads.googleads.v2.common.InteractionTypeInfo interaction_type = 5; + // Immutable. Criterion for interaction type. Only supported for search campaigns. + google.ads.googleads.v2.common.InteractionTypeInfo interaction_type = 5 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v2/resources/campaign_budget.proto b/google/ads/googleads/v2/resources/campaign_budget.proto index 4a8725e75..e7e2d4130 100644 --- a/google/ads/googleads/v2/resources/campaign_budget.proto +++ b/google/ads/googleads/v2/resources/campaign_budget.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -21,6 +20,8 @@ import "google/ads/googleads/v2/enums/budget_delivery_method.proto"; import "google/ads/googleads/v2/enums/budget_period.proto"; import "google/ads/googleads/v2/enums/budget_status.proto"; import "google/ads/googleads/v2/enums/budget_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -37,19 +38,29 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A campaign budget. message CampaignBudget { - // The resource name of the campaign budget. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignBudget" + pattern: "customers/{customer}/campaignBudgets/{campaign_budget}" + }; + + // Immutable. The resource name of the campaign budget. // Campaign budget resource names have the form: // // `customers/{customer_id}/campaignBudgets/{budget_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBudget" + } + ]; - // The ID of the campaign budget. + // Output only. The ID of the campaign budget. // // A campaign budget is created using the CampaignBudgetService create // operation and is assigned a budget ID. A budget ID can be shared across // different campaigns; the system will then allocate the campaign budget // among different campaigns to get optimum results. - google.protobuf.Int64Value id = 3; + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the campaign budget. // @@ -72,8 +83,8 @@ message CampaignBudget { // currency unit. google.protobuf.Int64Value total_amount_micros = 10; - // The status of this campaign budget. This field is read-only. - google.ads.googleads.v2.enums.BudgetStatusEnum.BudgetStatus status = 6; + // Output only. The status of this campaign budget. This field is read-only. + google.ads.googleads.v2.enums.BudgetStatusEnum.BudgetStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // The delivery method that determines the rate at which the campaign budget // is spent. @@ -98,49 +109,49 @@ message CampaignBudget { // A shared campaign budget can never become non-shared. google.protobuf.BoolValue explicitly_shared = 8; - // The number of campaigns actively using the budget. + // Output only. The number of campaigns actively using the budget. // // This field is read-only. - google.protobuf.Int64Value reference_count = 9; + google.protobuf.Int64Value reference_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Indicates whether there is a recommended budget for this campaign budget. + // Output only. Indicates whether there is a recommended budget for this campaign budget. // // This field is read-only. - google.protobuf.BoolValue has_recommended_budget = 11; + google.protobuf.BoolValue has_recommended_budget = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The recommended budget amount. If no recommendation is available, this will + // Output only. The recommended budget amount. If no recommendation is available, this will // be set to the budget amount. // Amount is specified in micros, where one million is equivalent to one // currency unit. // // This field is read-only. - google.protobuf.Int64Value recommended_budget_amount_micros = 12; + google.protobuf.Int64Value recommended_budget_amount_micros = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Period over which to spend the budget. Defaults to DAILY if not specified. - google.ads.googleads.v2.enums.BudgetPeriodEnum.BudgetPeriod period = 13; + // Immutable. Period over which to spend the budget. Defaults to DAILY if not specified. + google.ads.googleads.v2.enums.BudgetPeriodEnum.BudgetPeriod period = 13 [(google.api.field_behavior) = IMMUTABLE]; - // The estimated change in weekly clicks if the recommended budget is applied. + // Output only. The estimated change in weekly clicks if the recommended budget is applied. // // This field is read-only. - google.protobuf.Int64Value recommended_budget_estimated_change_weekly_clicks = 14; + google.protobuf.Int64Value recommended_budget_estimated_change_weekly_clicks = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The estimated change in weekly cost in micros if the recommended budget is + // Output only. The estimated change in weekly cost in micros if the recommended budget is // applied. One million is equivalent to one currency unit. // // This field is read-only. - google.protobuf.Int64Value recommended_budget_estimated_change_weekly_cost_micros = 15; + google.protobuf.Int64Value recommended_budget_estimated_change_weekly_cost_micros = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The estimated change in weekly interactions if the recommended budget is + // Output only. The estimated change in weekly interactions if the recommended budget is // applied. // // This field is read-only. - google.protobuf.Int64Value recommended_budget_estimated_change_weekly_interactions = 16; + google.protobuf.Int64Value recommended_budget_estimated_change_weekly_interactions = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The estimated change in weekly views if the recommended budget is applied. + // Output only. The estimated change in weekly views if the recommended budget is applied. // // This field is read-only. - google.protobuf.Int64Value recommended_budget_estimated_change_weekly_views = 17; + google.protobuf.Int64Value recommended_budget_estimated_change_weekly_views = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The type of the campaign budget. - google.ads.googleads.v2.enums.BudgetTypeEnum.BudgetType type = 18; + // Immutable. The type of the campaign budget. + google.ads.googleads.v2.enums.BudgetTypeEnum.BudgetType type = 18 [(google.api.field_behavior) = IMMUTABLE]; } diff --git a/google/ads/googleads/v2/resources/campaign_criterion.proto b/google/ads/googleads/v2/resources/campaign_criterion.proto index f1f34ea4e..83ac21881 100644 --- a/google/ads/googleads/v2/resources/campaign_criterion.proto +++ b/google/ads/googleads/v2/resources/campaign_criterion.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/criteria.proto"; import "google/ads/googleads/v2/enums/campaign_criterion_status.proto"; import "google/ads/googleads/v2/enums/criterion_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -36,30 +37,45 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A campaign criterion. message CampaignCriterion { - // The resource name of the campaign criterion. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignCriterion" + pattern: "customers/{customer}/campaignCriteria/{campaign_criterion}" + }; + + // Immutable. The resource name of the campaign criterion. // Campaign criterion resource names have the form: // // `customers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}` - string resource_name = 1; - - // The campaign to which the criterion belongs. - google.protobuf.StringValue campaign = 4; - - // The ID of the criterion. + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterion" + } + ]; + + // Immutable. The campaign to which the criterion belongs. + google.protobuf.StringValue campaign = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Output only. The ID of the criterion. // // This field is ignored during mutate. - google.protobuf.Int64Value criterion_id = 5; + google.protobuf.Int64Value criterion_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // The modifier for the bids when the criterion matches. The modifier must be // in the range: 0.1 - 10.0. Most targetable criteria types support modifiers. // Use 0 to opt out of a Device type. google.protobuf.FloatValue bid_modifier = 14; - // Whether to target (`false`) or exclude (`true`) the criterion. - google.protobuf.BoolValue negative = 7; + // Immutable. Whether to target (`false`) or exclude (`true`) the criterion. + google.protobuf.BoolValue negative = 7 [(google.api.field_behavior) = IMMUTABLE]; - // The type of the criterion. - google.ads.googleads.v2.enums.CriterionTypeEnum.CriterionType type = 6; + // Output only. The type of the criterion. + google.ads.googleads.v2.enums.CriterionTypeEnum.CriterionType type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // The status of the criterion. google.ads.googleads.v2.enums.CampaignCriterionStatusEnum.CampaignCriterionStatus status = 35; @@ -68,82 +84,85 @@ message CampaignCriterion { // // Exactly one must be set. oneof criterion { - // Keyword. - google.ads.googleads.v2.common.KeywordInfo keyword = 8; + // Immutable. Keyword. + google.ads.googleads.v2.common.KeywordInfo keyword = 8 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Placement. + google.ads.googleads.v2.common.PlacementInfo placement = 9 [(google.api.field_behavior) = IMMUTABLE]; - // Placement. - google.ads.googleads.v2.common.PlacementInfo placement = 9; + // Immutable. Mobile app category. + google.ads.googleads.v2.common.MobileAppCategoryInfo mobile_app_category = 10 [(google.api.field_behavior) = IMMUTABLE]; - // Mobile app category. - google.ads.googleads.v2.common.MobileAppCategoryInfo mobile_app_category = 10; + // Immutable. Mobile application. + google.ads.googleads.v2.common.MobileApplicationInfo mobile_application = 11 [(google.api.field_behavior) = IMMUTABLE]; - // Mobile application. - google.ads.googleads.v2.common.MobileApplicationInfo mobile_application = 11; + // Immutable. Location. + google.ads.googleads.v2.common.LocationInfo location = 12 [(google.api.field_behavior) = IMMUTABLE]; - // Location. - google.ads.googleads.v2.common.LocationInfo location = 12; + // Immutable. Device. + google.ads.googleads.v2.common.DeviceInfo device = 13 [(google.api.field_behavior) = IMMUTABLE]; - // Device. - google.ads.googleads.v2.common.DeviceInfo device = 13; + // Immutable. Ad Schedule. + google.ads.googleads.v2.common.AdScheduleInfo ad_schedule = 15 [(google.api.field_behavior) = IMMUTABLE]; - // Ad Schedule. - google.ads.googleads.v2.common.AdScheduleInfo ad_schedule = 15; + // Immutable. Age range. + google.ads.googleads.v2.common.AgeRangeInfo age_range = 16 [(google.api.field_behavior) = IMMUTABLE]; - // Age range. - google.ads.googleads.v2.common.AgeRangeInfo age_range = 16; + // Immutable. Gender. + google.ads.googleads.v2.common.GenderInfo gender = 17 [(google.api.field_behavior) = IMMUTABLE]; - // Gender. - google.ads.googleads.v2.common.GenderInfo gender = 17; + // Immutable. Income range. + google.ads.googleads.v2.common.IncomeRangeInfo income_range = 18 [(google.api.field_behavior) = IMMUTABLE]; - // Income range. - google.ads.googleads.v2.common.IncomeRangeInfo income_range = 18; + // Immutable. Parental status. + google.ads.googleads.v2.common.ParentalStatusInfo parental_status = 19 [(google.api.field_behavior) = IMMUTABLE]; - // Parental status. - google.ads.googleads.v2.common.ParentalStatusInfo parental_status = 19; + // Immutable. User List. + google.ads.googleads.v2.common.UserListInfo user_list = 22 [(google.api.field_behavior) = IMMUTABLE]; - // User List. - google.ads.googleads.v2.common.UserListInfo user_list = 22; + // Immutable. YouTube Video. + google.ads.googleads.v2.common.YouTubeVideoInfo youtube_video = 20 [(google.api.field_behavior) = IMMUTABLE]; - // YouTube Video. - google.ads.googleads.v2.common.YouTubeVideoInfo youtube_video = 20; + // Immutable. YouTube Channel. + google.ads.googleads.v2.common.YouTubeChannelInfo youtube_channel = 21 [(google.api.field_behavior) = IMMUTABLE]; - // YouTube Channel. - google.ads.googleads.v2.common.YouTubeChannelInfo youtube_channel = 21; + // Immutable. Proximity. + google.ads.googleads.v2.common.ProximityInfo proximity = 23 [(google.api.field_behavior) = IMMUTABLE]; - // Proximity. - google.ads.googleads.v2.common.ProximityInfo proximity = 23; + // Immutable. Topic. + google.ads.googleads.v2.common.TopicInfo topic = 24 [(google.api.field_behavior) = IMMUTABLE]; - // Topic. - google.ads.googleads.v2.common.TopicInfo topic = 24; + // Immutable. Listing scope. + google.ads.googleads.v2.common.ListingScopeInfo listing_scope = 25 [(google.api.field_behavior) = IMMUTABLE]; - // Listing scope. - google.ads.googleads.v2.common.ListingScopeInfo listing_scope = 25; + // Immutable. Language. + google.ads.googleads.v2.common.LanguageInfo language = 26 [(google.api.field_behavior) = IMMUTABLE]; - // Language. - google.ads.googleads.v2.common.LanguageInfo language = 26; + // Immutable. IpBlock. + google.ads.googleads.v2.common.IpBlockInfo ip_block = 27 [(google.api.field_behavior) = IMMUTABLE]; - // IpBlock. - google.ads.googleads.v2.common.IpBlockInfo ip_block = 27; + // Immutable. ContentLabel. + google.ads.googleads.v2.common.ContentLabelInfo content_label = 28 [(google.api.field_behavior) = IMMUTABLE]; - // ContentLabel. - google.ads.googleads.v2.common.ContentLabelInfo content_label = 28; + // Immutable. Carrier. + google.ads.googleads.v2.common.CarrierInfo carrier = 29 [(google.api.field_behavior) = IMMUTABLE]; - // Carrier. - google.ads.googleads.v2.common.CarrierInfo carrier = 29; + // Immutable. User Interest. + google.ads.googleads.v2.common.UserInterestInfo user_interest = 30 [(google.api.field_behavior) = IMMUTABLE]; - // User Interest. - google.ads.googleads.v2.common.UserInterestInfo user_interest = 30; + // Immutable. Webpage. + google.ads.googleads.v2.common.WebpageInfo webpage = 31 [(google.api.field_behavior) = IMMUTABLE]; - // Webpage. - google.ads.googleads.v2.common.WebpageInfo webpage = 31; + // Immutable. Operating system version. + google.ads.googleads.v2.common.OperatingSystemVersionInfo operating_system_version = 32 [(google.api.field_behavior) = IMMUTABLE]; - // Operating system version. - google.ads.googleads.v2.common.OperatingSystemVersionInfo operating_system_version = 32; + // Immutable. Mobile Device. + google.ads.googleads.v2.common.MobileDeviceInfo mobile_device = 33 [(google.api.field_behavior) = IMMUTABLE]; - // Mobile Device. - google.ads.googleads.v2.common.MobileDeviceInfo mobile_device = 33; + // Immutable. Location Group + google.ads.googleads.v2.common.LocationGroupInfo location_group = 34 [(google.api.field_behavior) = IMMUTABLE]; - // Location Group - google.ads.googleads.v2.common.LocationGroupInfo location_group = 34; + // Immutable. Custom Affinity. + google.ads.googleads.v2.common.CustomAffinityInfo custom_affinity = 36 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v2/resources/campaign_criterion_simulation.proto b/google/ads/googleads/v2/resources/campaign_criterion_simulation.proto index f3cdcc3e5..293913297 100644 --- a/google/ads/googleads/v2/resources/campaign_criterion_simulation.proto +++ b/google/ads/googleads/v2/resources/campaign_criterion_simulation.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/simulation.proto"; import "google/ads/googleads/v2/enums/simulation_modification_method.proto"; import "google/ads/googleads/v2/enums/simulation_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -38,37 +39,47 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // channel type, criterion ids, simulation type and simulation modification // method is detailed below respectively. // -// SEARCH 30000,30001,30002 BID_MODIFIER UNIFORM -// SHOPPING 30000,30001,30002 BID_MODIFIER UNIFORM -// DISPLAY 30001 BID_MODIFIER UNIFORM +// 1. SEARCH - 30000,30001,30002 - BID_MODIFIER - UNIFORM +// 2. SHOPPING - 30000,30001,30002 - BID_MODIFIER - UNIFORM +// 3. DISPLAY - 30001 - BID_MODIFIER - UNIFORM message CampaignCriterionSimulation { - // The resource name of the campaign criterion simulation. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignCriterionSimulation" + pattern: "customers/{customer}/campaignCriterionSimulations/{campaign_criterion_simulation}" + }; + + // Output only. The resource name of the campaign criterion simulation. // Campaign criterion simulation resource names have the form: // // `customers/{customer_id}/campaignCriterionSimulations/{campaign_id}~{criterion_id}~{type}~{modification_method}~{start_date}~{end_date}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterionSimulation" + } + ]; - // Campaign ID of the simulation. - google.protobuf.Int64Value campaign_id = 2; + // Output only. Campaign ID of the simulation. + google.protobuf.Int64Value campaign_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Criterion ID of the simulation. - google.protobuf.Int64Value criterion_id = 3; + // Output only. Criterion ID of the simulation. + google.protobuf.Int64Value criterion_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The field that the simulation modifies. - google.ads.googleads.v2.enums.SimulationTypeEnum.SimulationType type = 4; + // Output only. The field that the simulation modifies. + google.ads.googleads.v2.enums.SimulationTypeEnum.SimulationType type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // How the simulation modifies the field. - google.ads.googleads.v2.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 5; + // Output only. How the simulation modifies the field. + google.ads.googleads.v2.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // First day on which the simulation is based, in YYYY-MM-DD format. - google.protobuf.StringValue start_date = 6; + // Output only. First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Last day on which the simulation is based, in YYYY-MM-DD format. - google.protobuf.StringValue end_date = 7; + // Output only. Last day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue end_date = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // List of simulation points. oneof point_list { - // Simulation points if the simulation type is BID_MODIFIER. - google.ads.googleads.v2.common.BidModifierSimulationPointList bid_modifier_point_list = 8; + // Output only. Simulation points if the simulation type is BID_MODIFIER. + google.ads.googleads.v2.common.BidModifierSimulationPointList bid_modifier_point_list = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v2/resources/campaign_draft.proto b/google/ads/googleads/v2/resources/campaign_draft.proto index f6b7f1de0..673acb14f 100644 --- a/google/ads/googleads/v2/resources/campaign_draft.proto +++ b/google/ads/googleads/v2/resources/campaign_draft.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/campaign_draft_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -34,19 +35,34 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A campaign draft. message CampaignDraft { - // The resource name of the campaign draft. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignDraft" + pattern: "customers/{customer}/campaignDrafts/{campaign_draft}" + }; + + // Immutable. The resource name of the campaign draft. // Campaign draft resource names have the form: // // `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignDraft" + } + ]; - // The ID of the draft. + // Output only. The ID of the draft. // // This field is read-only. - google.protobuf.Int64Value draft_id = 2; + google.protobuf.Int64Value draft_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The base campaign to which the draft belongs. - google.protobuf.StringValue base_campaign = 3; + // Immutable. The base campaign to which the draft belongs. + google.protobuf.StringValue base_campaign = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; // The name of the campaign draft. // @@ -57,22 +73,27 @@ message CampaignDraft { // (code point 0xA) or carriage return (code point 0xD) characters. google.protobuf.StringValue name = 4; - // Resource name of the Campaign that results from overlaying the draft + // Output only. Resource name of the Campaign that results from overlaying the draft // changes onto the base campaign. // // This field is read-only. - google.protobuf.StringValue draft_campaign = 5; + google.protobuf.StringValue draft_campaign = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The status of the campaign draft. This field is read-only. + // Output only. The status of the campaign draft. This field is read-only. // // When a new campaign draft is added, the status defaults to PROPOSED. - google.ads.googleads.v2.enums.CampaignDraftStatusEnum.CampaignDraftStatus status = 6; + google.ads.googleads.v2.enums.CampaignDraftStatusEnum.CampaignDraftStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether there is an experiment based on this draft currently serving. - google.protobuf.BoolValue has_experiment_running = 7; + // Output only. Whether there is an experiment based on this draft currently serving. + google.protobuf.BoolValue has_experiment_running = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource name of the long-running operation that can be used to poll + // Output only. The resource name of the long-running operation that can be used to poll // for completion of draft promotion. This is only set if the draft promotion // is in progress or finished. - google.protobuf.StringValue long_running_operation = 8; + google.protobuf.StringValue long_running_operation = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/campaign_experiment.proto b/google/ads/googleads/v2/resources/campaign_experiment.proto index ecf55d8a9..86f8ade12 100644 --- a/google/ads/googleads/v2/resources/campaign_experiment.proto +++ b/google/ads/googleads/v2/resources/campaign_experiment.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/campaign_experiment_status.proto"; import "google/ads/googleads/v2/enums/campaign_experiment_traffic_split_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -36,19 +37,34 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // An A/B experiment that compares the performance of the base campaign // (the control) and a variation of that campaign (the experiment). message CampaignExperiment { - // The resource name of the campaign experiment. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignExperiment" + pattern: "customers/{customer}/campaignExperiments/{campaign_experiment}" + }; + + // Immutable. The resource name of the campaign experiment. // Campaign experiment resource names have the form: // // `customers/{customer_id}/campaignExperiments/{campaign_experiment_id}` - string resource_name = 1; - - // The ID of the campaign experiment. + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExperiment" + } + ]; + + // Output only. The ID of the campaign experiment. // // This field is read-only. - google.protobuf.Int64Value id = 2; + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The campaign draft with staged changes to the base campaign. - google.protobuf.StringValue campaign_draft = 3; + // Immutable. The campaign draft with staged changes to the base campaign. + google.protobuf.StringValue campaign_draft = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignDraft" + } + ]; // The name of the campaign experiment. // @@ -63,24 +79,29 @@ message CampaignExperiment { // The description of the experiment. google.protobuf.StringValue description = 5; - // Share of traffic directed to experiment as a percent (must be between 1 and + // Immutable. Share of traffic directed to experiment as a percent (must be between 1 and // 99 inclusive. Base campaign receives the remainder of the traffic // (100 - traffic_split_percent). Required for create. - google.protobuf.Int64Value traffic_split_percent = 6; + google.protobuf.Int64Value traffic_split_percent = 6 [(google.api.field_behavior) = IMMUTABLE]; - // Determines the behavior of the traffic split. - google.ads.googleads.v2.enums.CampaignExperimentTrafficSplitTypeEnum.CampaignExperimentTrafficSplitType traffic_split_type = 7; + // Immutable. Determines the behavior of the traffic split. + google.ads.googleads.v2.enums.CampaignExperimentTrafficSplitTypeEnum.CampaignExperimentTrafficSplitType traffic_split_type = 7 [(google.api.field_behavior) = IMMUTABLE]; - // The experiment campaign, as opposed to the base campaign. - google.protobuf.StringValue experiment_campaign = 8; + // Output only. The experiment campaign, as opposed to the base campaign. + google.protobuf.StringValue experiment_campaign = 8 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The status of the campaign experiment. This field is read-only. - google.ads.googleads.v2.enums.CampaignExperimentStatusEnum.CampaignExperimentStatus status = 9; + // Output only. The status of the campaign experiment. This field is read-only. + google.ads.googleads.v2.enums.CampaignExperimentStatusEnum.CampaignExperimentStatus status = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource name of the long-running operation that can be used to poll + // Output only. The resource name of the long-running operation that can be used to poll // for completion of experiment create or promote. The most recent long // running operation is returned. - google.protobuf.StringValue long_running_operation = 10; + google.protobuf.StringValue long_running_operation = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Date when the campaign experiment starts. By default, the experiment starts // now or on the campaign's start date, whichever is later. If this field is diff --git a/google/ads/googleads/v2/resources/campaign_extension_setting.proto b/google/ads/googleads/v2/resources/campaign_extension_setting.proto index c497dffc1..233d04b17 100644 --- a/google/ads/googleads/v2/resources/campaign_extension_setting.proto +++ b/google/ads/googleads/v2/resources/campaign_extension_setting.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/extension_setting_device.proto"; import "google/ads/googleads/v2/enums/extension_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,27 +36,44 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A campaign extension setting. message CampaignExtensionSetting { - // The resource name of the campaign extension setting. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignExtensionSetting" + pattern: "customers/{customer}/campaignExtensionSettings/{campaign_extension_setting}" + }; + + // Immutable. The resource name of the campaign extension setting. // CampaignExtensionSetting resource names have the form: // // `customers/{customer_id}/campaignExtensionSettings/{campaign_id}~{extension_type}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExtensionSetting" + } + ]; - // The extension type of the customer extension setting. - google.ads.googleads.v2.enums.ExtensionTypeEnum.ExtensionType extension_type = 2; + // Immutable. The extension type of the customer extension setting. + google.ads.googleads.v2.enums.ExtensionTypeEnum.ExtensionType extension_type = 2 [(google.api.field_behavior) = IMMUTABLE]; - // The resource name of the campaign. The linked extension feed items will + // Immutable. The resource name of the campaign. The linked extension feed items will // serve under this campaign. // Campaign resource names have the form: // // `customers/{customer_id}/campaigns/{campaign_id}` - google.protobuf.StringValue campaign = 3; + google.protobuf.StringValue campaign = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; // The resource names of the extension feed items to serve under the campaign. // ExtensionFeedItem resource names have the form: // // `customers/{customer_id}/extensionFeedItems/{feed_item_id}` - repeated google.protobuf.StringValue extension_feed_items = 4; + repeated google.protobuf.StringValue extension_feed_items = 4 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + }]; // The device for which the extensions will serve. Optional. google.ads.googleads.v2.enums.ExtensionSettingDeviceEnum.ExtensionSettingDevice device = 5; diff --git a/google/ads/googleads/v2/resources/campaign_feed.proto b/google/ads/googleads/v2/resources/campaign_feed.proto index d23594519..0f2d18c31 100644 --- a/google/ads/googleads/v2/resources/campaign_feed.proto +++ b/google/ads/googleads/v2/resources/campaign_feed.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/matching_function.proto"; import "google/ads/googleads/v2/enums/feed_link_status.proto"; import "google/ads/googleads/v2/enums/placeholder_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -36,17 +37,37 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A campaign feed. message CampaignFeed { - // The resource name of the campaign feed. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignFeed" + pattern: "customers/{customer}/campaignFeeds/{campaign_feed}" + }; + + // Immutable. The resource name of the campaign feed. // Campaign feed resource names have the form: // // `customers/{customer_id}/campaignFeeds/{campaign_id}~{feed_id} - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignFeed" + } + ]; - // The feed to which the CampaignFeed belongs. - google.protobuf.StringValue feed = 2; + // Immutable. The feed to which the CampaignFeed belongs. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; - // The campaign to which the CampaignFeed belongs. - google.protobuf.StringValue campaign = 3; + // Immutable. The campaign to which the CampaignFeed belongs. + google.protobuf.StringValue campaign = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; // Indicates which placeholder types the feed may populate under the connected // campaign. Required. @@ -57,7 +78,7 @@ message CampaignFeed { // Required. google.ads.googleads.v2.common.MatchingFunction matching_function = 5; - // Status of the campaign feed. + // Output only. Status of the campaign feed. // This field is read-only. - google.ads.googleads.v2.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6; + google.ads.googleads.v2.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/campaign_label.proto b/google/ads/googleads/v2/resources/campaign_label.proto index f3b320e47..0470ab466 100644 --- a/google/ads/googleads/v2/resources/campaign_label.proto +++ b/google/ads/googleads/v2/resources/campaign_label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -33,14 +34,34 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // Represents a relationship between a campaign and a label. message CampaignLabel { - // Name of the resource. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignLabel" + pattern: "customers/{customer}/campaignLabels/{campaign_label}" + }; + + // Immutable. Name of the resource. // Campaign label resource names have the form: // `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignLabel" + } + ]; - // The campaign to which the label is attached. - google.protobuf.StringValue campaign = 2; + // Immutable. The campaign to which the label is attached. + google.protobuf.StringValue campaign = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The label assigned to the campaign. - google.protobuf.StringValue label = 3; + // Immutable. The label assigned to the campaign. + google.protobuf.StringValue label = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; } diff --git a/google/ads/googleads/v2/resources/campaign_shared_set.proto b/google/ads/googleads/v2/resources/campaign_shared_set.proto index e1e0ece8e..51e88b0bf 100644 --- a/google/ads/googleads/v2/resources/campaign_shared_set.proto +++ b/google/ads/googleads/v2/resources/campaign_shared_set.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/campaign_shared_set_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,23 +36,43 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // CampaignSharedSets are used for managing the shared sets associated with a // campaign. message CampaignSharedSet { - // The resource name of the campaign shared set. + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignSharedSet" + pattern: "customers/{customer}/campaignSharedSets/{campaign_shared_set}" + }; + + // Immutable. The resource name of the campaign shared set. // Campaign shared set resource names have the form: // // `customers/{customer_id}/campaignSharedSets/{campaign_id}~{shared_set_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignSharedSet" + } + ]; - // The campaign to which the campaign shared set belongs. - google.protobuf.StringValue campaign = 3; + // Immutable. The campaign to which the campaign shared set belongs. + google.protobuf.StringValue campaign = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The shared set associated with the campaign. This may be a negative keyword + // Immutable. The shared set associated with the campaign. This may be a negative keyword // shared set of another customer. This customer should be a manager of the // other customer, otherwise the campaign shared set will exist but have no // serving effect. Only negative keyword shared sets can be associated with // Shopping campaigns. Only negative placement shared sets can be associated // with Display mobile app campaigns. - google.protobuf.StringValue shared_set = 4; + google.protobuf.StringValue shared_set = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedSet" + } + ]; - // The status of this campaign shared set. Read only. - google.ads.googleads.v2.enums.CampaignSharedSetStatusEnum.CampaignSharedSetStatus status = 2; + // Output only. The status of this campaign shared set. Read only. + google.ads.googleads.v2.enums.CampaignSharedSetStatusEnum.CampaignSharedSetStatus status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/carrier_constant.proto b/google/ads/googleads/v2/resources/carrier_constant.proto index 3ffa24d99..44b0b6fc1 100644 --- a/google/ads/googleads/v2/resources/carrier_constant.proto +++ b/google/ads/googleads/v2/resources/carrier_constant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -33,19 +34,29 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A carrier criterion that can be used in campaign targeting. message CarrierConstant { - // The resource name of the carrier criterion. + option (google.api.resource) = { + type: "googleads.googleapis.com/CarrierConstant" + pattern: "carrierConstants/{carrier_constant}" + }; + + // Output only. The resource name of the carrier criterion. // Carrier criterion resource names have the form: // // `carrierConstants/{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CarrierConstant" + } + ]; - // The ID of the carrier criterion. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the carrier criterion. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The full name of the carrier in English. - google.protobuf.StringValue name = 3; + // Output only. The full name of the carrier in English. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The country code of the country where the carrier is located, e.g., "AR", + // Output only. The country code of the country where the carrier is located, e.g., "AR", // "FR", etc. - google.protobuf.StringValue country_code = 4; + google.protobuf.StringValue country_code = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/change_status.proto b/google/ads/googleads/v2/resources/change_status.proto index 626b16ee1..c0f65bf01 100644 --- a/google/ads/googleads/v2/resources/change_status.proto +++ b/google/ads/googleads/v2/resources/change_status.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/change_status_operation.proto"; import "google/ads/googleads/v2/enums/change_status_resource_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,50 +36,110 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // Describes the status of returned resource. message ChangeStatus { - // The resource name of the change status. + option (google.api.resource) = { + type: "googleads.googleapis.com/ChangeStatus" + pattern: "customers/{customer}/changeStatus/{change_status}" + }; + + // Output only. The resource name of the change status. // Change status resource names have the form: // // `customers/{customer_id}/changeStatus/{change_status_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ChangeStatus" + } + ]; - // Time at which the most recent change has occurred on this resource. - google.protobuf.StringValue last_change_date_time = 3; + // Output only. Time at which the most recent change has occurred on this resource. + google.protobuf.StringValue last_change_date_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Represents the type of the changed resource. This dictates what fields + // Output only. Represents the type of the changed resource. This dictates what fields // will be set. For example, for AD_GROUP, campaign and ad_group fields will // be set. - google.ads.googleads.v2.enums.ChangeStatusResourceTypeEnum.ChangeStatusResourceType resource_type = 4; - - // The Campaign affected by this change. - google.protobuf.StringValue campaign = 5; - - // The AdGroup affected by this change. - google.protobuf.StringValue ad_group = 6; - - // Represents the status of the changed resource. - google.ads.googleads.v2.enums.ChangeStatusOperationEnum.ChangeStatusOperation resource_status = 8; - - // The AdGroupAd affected by this change. - google.protobuf.StringValue ad_group_ad = 9; - - // The AdGroupCriterion affected by this change. - google.protobuf.StringValue ad_group_criterion = 10; - - // The CampaignCriterion affected by this change. - google.protobuf.StringValue campaign_criterion = 11; - - // The Feed affected by this change. - google.protobuf.StringValue feed = 12; - - // The FeedItem affected by this change. - google.protobuf.StringValue feed_item = 13; - - // The AdGroupFeed affected by this change. - google.protobuf.StringValue ad_group_feed = 14; - - // The CampaignFeed affected by this change. - google.protobuf.StringValue campaign_feed = 15; - - // The AdGroupBidModifier affected by this change. - google.protobuf.StringValue ad_group_bid_modifier = 16; + google.ads.googleads.v2.enums.ChangeStatusResourceTypeEnum.ChangeStatusResourceType resource_type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Campaign affected by this change. + google.protobuf.StringValue campaign = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Output only. The AdGroup affected by this change. + google.protobuf.StringValue ad_group = 6 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Output only. Represents the status of the changed resource. + google.ads.googleads.v2.enums.ChangeStatusOperationEnum.ChangeStatusOperation resource_status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The AdGroupAd affected by this change. + google.protobuf.StringValue ad_group_ad = 9 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; + + // Output only. The AdGroupCriterion affected by this change. + google.protobuf.StringValue ad_group_criterion = 10 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; + + // Output only. The CampaignCriterion affected by this change. + google.protobuf.StringValue campaign_criterion = 11 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterion" + } + ]; + + // Output only. The Feed affected by this change. + google.protobuf.StringValue feed = 12 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + + // Output only. The FeedItem affected by this change. + google.protobuf.StringValue feed_item = 13 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItem" + } + ]; + + // Output only. The AdGroupFeed affected by this change. + google.protobuf.StringValue ad_group_feed = 14 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupFeed" + } + ]; + + // Output only. The CampaignFeed affected by this change. + google.protobuf.StringValue campaign_feed = 15 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignFeed" + } + ]; + + // Output only. The AdGroupBidModifier affected by this change. + google.protobuf.StringValue ad_group_bid_modifier = 16 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupBidModifier" + } + ]; } diff --git a/google/ads/googleads/v2/resources/click_view.proto b/google/ads/googleads/v2/resources/click_view.proto index ff2c50c13..ee9a6ed45 100644 --- a/google/ads/googleads/v2/resources/click_view.proto +++ b/google/ads/googleads/v2/resources/click_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/click_location.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,27 +36,45 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A click view with metrics aggregated at each click level, including both // valid and invalid clicks. For non-Search campaigns, metrics.clicks // represents the number of valid and invalid interactions. +// Queries including ClickView must have a filter limiting the results to one +// day and can be requested for dates back to 90 days before the time of the +// request. message ClickView { - // The resource name of the click view. + option (google.api.resource) = { + type: "googleads.googleapis.com/ClickView" + pattern: "customers/{customer}/clickViews/{click_view}" + }; + + // Output only. The resource name of the click view. // Click view resource names have the form: // // `customers/{customer_id}/clickViews/{date (yyyy-MM-dd)}~{gclid}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ClickView" + } + ]; - // The Google Click ID. - google.protobuf.StringValue gclid = 2; + // Output only. The Google Click ID. + google.protobuf.StringValue gclid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The location criteria matching the area of interest associated with the + // Output only. The location criteria matching the area of interest associated with the // impression. - google.ads.googleads.v2.common.ClickLocation area_of_interest = 3; + google.ads.googleads.v2.common.ClickLocation area_of_interest = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The location criteria matching the location of presence associated with the + // Output only. The location criteria matching the location of presence associated with the // impression. - google.ads.googleads.v2.common.ClickLocation location_of_presence = 4; + google.ads.googleads.v2.common.ClickLocation location_of_presence = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Page number in search results where the ad was shown. - google.protobuf.Int64Value page_number = 5; + // Output only. Page number in search results where the ad was shown. + google.protobuf.Int64Value page_number = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The associated ad. - google.protobuf.StringValue ad_group_ad = 7; + // Output only. The associated ad. + google.protobuf.StringValue ad_group_ad = 7 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; } diff --git a/google/ads/googleads/v2/resources/conversion_action.proto b/google/ads/googleads/v2/resources/conversion_action.proto index 89d6e59fb..ab0093dae 100644 --- a/google/ads/googleads/v2/resources/conversion_action.proto +++ b/google/ads/googleads/v2/resources/conversion_action.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -24,6 +23,8 @@ import "google/ads/googleads/v2/enums/conversion_action_counting_type.proto"; import "google/ads/googleads/v2/enums/conversion_action_status.proto"; import "google/ads/googleads/v2/enums/conversion_action_type.proto"; import "google/ads/googleads/v2/enums/data_driven_model_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -40,14 +41,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A conversion action. message ConversionAction { + option (google.api.resource) = { + type: "googleads.googleapis.com/ConversionAction" + pattern: "customers/{customer}/conversionActions/{conversion_action}" + }; + // Settings related to this conversion action's attribution model. message AttributionModelSettings { // The attribution model type of this conversion action. google.ads.googleads.v2.enums.AttributionModelEnum.AttributionModel attribution_model = 1; - // The status of the data-driven attribution model for the conversion + // Output only. The status of the data-driven attribution model for the conversion // action. - google.ads.googleads.v2.enums.DataDrivenModelStatusEnum.DataDrivenModelStatus data_driven_model_status = 2; + google.ads.googleads.v2.enums.DataDrivenModelStatusEnum.DataDrivenModelStatus data_driven_model_status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Settings related to the value for conversion events associated with this @@ -69,14 +75,19 @@ message ConversionAction { google.protobuf.BoolValue always_use_default_value = 3; } - // The resource name of the conversion action. + // Immutable. The resource name of the conversion action. // Conversion action resource names have the form: // // `customers/{customer_id}/conversionActions/{conversion_action_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ConversionAction" + } + ]; - // The ID of the conversion action. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the conversion action. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the conversion action. // @@ -87,15 +98,15 @@ message ConversionAction { // The status of this conversion action for conversion event accrual. google.ads.googleads.v2.enums.ConversionActionStatusEnum.ConversionActionStatus status = 4; - // The type of this conversion action. - google.ads.googleads.v2.enums.ConversionActionTypeEnum.ConversionActionType type = 5; + // Immutable. The type of this conversion action. + google.ads.googleads.v2.enums.ConversionActionTypeEnum.ConversionActionType type = 5 [(google.api.field_behavior) = IMMUTABLE]; // The category of conversions reported for this conversion action. google.ads.googleads.v2.enums.ConversionActionCategoryEnum.ConversionActionCategory category = 6; - // The resource name of the conversion action owner customer, or null if this + // Output only. The resource name of the conversion action owner customer, or null if this // is a system-defined conversion action. - google.protobuf.StringValue owner_customer = 7; + google.protobuf.StringValue owner_customer = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Whether this conversion action should be included in the "conversions" // metric. @@ -119,8 +130,8 @@ message ConversionAction { // Settings related to this conversion action's attribution model. AttributionModelSettings attribution_model_settings = 13; - // The snippets used for tracking conversions. - repeated google.ads.googleads.v2.common.TagSnippet tag_snippets = 14; + // Output only. The snippets used for tracking conversions. + repeated google.ads.googleads.v2.common.TagSnippet tag_snippets = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; // The phone call duration in seconds after which a conversion should be // reported for this conversion action. diff --git a/google/ads/googleads/v2/resources/custom_interest.proto b/google/ads/googleads/v2/resources/custom_interest.proto index 9bd79b227..7c0fbba50 100644 --- a/google/ads/googleads/v2/resources/custom_interest.proto +++ b/google/ads/googleads/v2/resources/custom_interest.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/custom_interest_member_type.proto"; import "google/ads/googleads/v2/enums/custom_interest_status.proto"; import "google/ads/googleads/v2/enums/custom_interest_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -36,14 +37,24 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A custom interest. This is a list of users by interest. message CustomInterest { - // The resource name of the custom interest. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomInterest" + pattern: "customers/{customer}/customInterests/{custom_interest}" + }; + + // Immutable. The resource name of the custom interest. // Custom interest resource names have the form: // // `customers/{customer_id}/customInterests/{custom_interest_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomInterest" + } + ]; - // Id of the custom interest. - google.protobuf.Int64Value id = 2; + // Output only. Id of the custom interest. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Status of this custom interest. Indicates whether the custom interest is // enabled or removed. diff --git a/google/ads/googleads/v2/resources/customer.proto b/google/ads/googleads/v2/resources/customer.proto index 6322bb9f1..b0112db16 100644 --- a/google/ads/googleads/v2/resources/customer.proto +++ b/google/ads/googleads/v2/resources/customer.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/customer_pay_per_conversion_eligibility_failure_reason.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -34,25 +35,35 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A customer. message Customer { - // The resource name of the customer. + option (google.api.resource) = { + type: "googleads.googleapis.com/Customer" + pattern: "customers/{customer}" + }; + + // Immutable. The resource name of the customer. // Customer resource names have the form: // // `customers/{customer_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Customer" + } + ]; - // The ID of the customer. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the customer. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional, non-unique descriptive name of the customer. google.protobuf.StringValue descriptive_name = 4; - // The currency in which the account operates. + // Immutable. The currency in which the account operates. // A subset of the currency codes from the ISO 4217 standard is // supported. - google.protobuf.StringValue currency_code = 5; + google.protobuf.StringValue currency_code = 5 [(google.api.field_behavior) = IMMUTABLE]; - // The local timezone ID of the customer. - google.protobuf.StringValue time_zone = 6; + // Immutable. The local timezone ID of the customer. + google.protobuf.StringValue time_zone = 6 [(google.api.field_behavior) = IMMUTABLE]; // The URL template for constructing a tracking URL out of parameters. google.protobuf.StringValue tracking_url_template = 7; @@ -63,29 +74,29 @@ message Customer { // Whether auto-tagging is enabled for the customer. google.protobuf.BoolValue auto_tagging_enabled = 8; - // Whether the Customer has a Partners program badge. If the Customer is not + // Output only. Whether the Customer has a Partners program badge. If the Customer is not // associated with the Partners program, this will be false. For more // information, see https://support.google.com/partners/answer/3125774. - google.protobuf.BoolValue has_partners_badge = 9; + google.protobuf.BoolValue has_partners_badge = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the customer is a manager. - google.protobuf.BoolValue manager = 12; + // Output only. Whether the customer is a manager. + google.protobuf.BoolValue manager = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the customer is a test account. - google.protobuf.BoolValue test_account = 13; + // Output only. Whether the customer is a test account. + google.protobuf.BoolValue test_account = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Call reporting setting for a customer. CallReportingSetting call_reporting_setting = 10; - // Conversion tracking setting for a customer. - ConversionTrackingSetting conversion_tracking_setting = 14; + // Output only. Conversion tracking setting for a customer. + ConversionTrackingSetting conversion_tracking_setting = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Remarketing setting for a customer. - RemarketingSetting remarketing_setting = 15; + // Output only. Remarketing setting for a customer. + RemarketingSetting remarketing_setting = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Reasons why the customer is not eligible to use PaymentMode.CONVERSIONS. If + // Output only. Reasons why the customer is not eligible to use PaymentMode.CONVERSIONS. If // the list is empty, the customer is eligible. This field is read-only. - repeated google.ads.googleads.v2.enums.CustomerPayPerConversionEligibilityFailureReasonEnum.CustomerPayPerConversionEligibilityFailureReason pay_per_conversion_eligibility_failure_reasons = 16; + repeated google.ads.googleads.v2.enums.CustomerPayPerConversionEligibilityFailureReasonEnum.CustomerPayPerConversionEligibilityFailureReason pay_per_conversion_eligibility_failure_reasons = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Call reporting setting for a customer. @@ -100,26 +111,28 @@ message CallReportingSetting { // Customer-level call conversion action to attribute a call conversion to. // If not set a default conversion action is used. Only in effect when // call_conversion_reporting_enabled is set to true. - google.protobuf.StringValue call_conversion_action = 9; + google.protobuf.StringValue call_conversion_action = 9 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ConversionAction" + }]; } // A collection of customer-wide settings related to Google Ads Conversion // Tracking. message ConversionTrackingSetting { - // The conversion tracking id used for this account. This id is automatically + // Output only. The conversion tracking id used for this account. This id is automatically // assigned after any conversion tracking feature is used. If the customer // doesn't use conversion tracking, this is 0. This field is read-only. - google.protobuf.Int64Value conversion_tracking_id = 1; + google.protobuf.Int64Value conversion_tracking_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The conversion tracking id of the customer's manager. This is set when the + // Output only. The conversion tracking id of the customer's manager. This is set when the // customer is opted into cross account conversion tracking, and it overrides // conversion_tracking_id. This field can only be managed through the Google // Ads UI. This field is read-only. - google.protobuf.Int64Value cross_account_conversion_tracking_id = 2; + google.protobuf.Int64Value cross_account_conversion_tracking_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Remarketing setting for a customer. message RemarketingSetting { - // The Google global site tag. - google.protobuf.StringValue google_global_site_tag = 1; + // Output only. The Google global site tag. + google.protobuf.StringValue google_global_site_tag = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/customer_client.proto b/google/ads/googleads/v2/resources/customer_client.proto index 90b7c049b..9da1049fd 100644 --- a/google/ads/googleads/v2/resources/customer_client.proto +++ b/google/ads/googleads/v2/resources/customer_client.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,21 +36,50 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // exist for manager customers. All direct and indirect client customers are // included, as well as the manager itself. message CustomerClient { - // The resource name of the customer client. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerClient" + pattern: "customers/{customer}/customerClients/{customer_client}" + }; + + // Output only. The resource name of the customer client. // CustomerClient resource names have the form: // `customers/{customer_id}/customerClients/{client_customer_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerClient" + } + ]; - // The resource name of the client-customer which is linked to + // Output only. The resource name of the client-customer which is linked to // the given customer. Read only. - google.protobuf.StringValue client_customer = 3; + google.protobuf.StringValue client_customer = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Specifies whether this is a + // Output only. Specifies whether this is a // [hidden account](https://support.google.com/google-ads/answer/7519830). // Read only. - google.protobuf.BoolValue hidden = 4; + google.protobuf.BoolValue hidden = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Distance between given customer and client. For self link, the level value + // Output only. Distance between given customer and client. For self link, the level value // will be 0. Read only. - google.protobuf.Int64Value level = 5; + google.protobuf.Int64Value level = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Common Locale Data Repository (CLDR) string representation of the + // time zone of the client, e.g. America/Los_Angeles. Read only. + google.protobuf.StringValue time_zone = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies if the client is a test account. Read only. + google.protobuf.BoolValue test_account = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies if the client is a manager. Read only. + google.protobuf.BoolValue manager = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Descriptive name for the client. Read only. + google.protobuf.StringValue descriptive_name = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Currency code (e.g. 'USD', 'EUR') for the client. Read only. + google.protobuf.StringValue currency_code = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the client customer. Read only. + google.protobuf.Int64Value id = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/customer_client_link.proto b/google/ads/googleads/v2/resources/customer_client_link.proto index a346f8451..8a4fdeb2f 100644 --- a/google/ads/googleads/v2/resources/customer_client_link.proto +++ b/google/ads/googleads/v2/resources/customer_client_link.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/manager_link_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -34,16 +35,26 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // Represents customer client link relationship. message CustomerClientLink { - // Name of the resource. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerClientLink" + pattern: "customers/{customer}/customerClientLinks/{customer_client_link}" + }; + + // Immutable. Name of the resource. // CustomerClientLink resource names have the form: // `customers/{customer_id}/customerClientLinks/{client_customer_id}~{manager_link_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerClientLink" + } + ]; - // The client customer linked to this customer. - google.protobuf.StringValue client_customer = 3; + // Immutable. The client customer linked to this customer. + google.protobuf.StringValue client_customer = 3 [(google.api.field_behavior) = IMMUTABLE]; - // This is uniquely identifies a customer client link. Read only. - google.protobuf.Int64Value manager_link_id = 4; + // Output only. This is uniquely identifies a customer client link. Read only. + google.protobuf.Int64Value manager_link_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // This is the status of the link between client and manager. google.ads.googleads.v2.enums.ManagerLinkStatusEnum.ManagerLinkStatus status = 5; diff --git a/google/ads/googleads/v2/resources/customer_extension_setting.proto b/google/ads/googleads/v2/resources/customer_extension_setting.proto index a877779af..e2e9fba83 100644 --- a/google/ads/googleads/v2/resources/customer_extension_setting.proto +++ b/google/ads/googleads/v2/resources/customer_extension_setting.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/extension_setting_device.proto"; import "google/ads/googleads/v2/enums/extension_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,20 +36,32 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A customer extension setting. message CustomerExtensionSetting { - // The resource name of the customer extension setting. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerExtensionSetting" + pattern: "customers/{customer}/customerExtensionSettings/{customer_extension_setting}" + }; + + // Immutable. The resource name of the customer extension setting. // CustomerExtensionSetting resource names have the form: // // `customers/{customer_id}/customerExtensionSettings/{extension_type}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerExtensionSetting" + } + ]; - // The extension type of the customer extension setting. - google.ads.googleads.v2.enums.ExtensionTypeEnum.ExtensionType extension_type = 2; + // Immutable. The extension type of the customer extension setting. + google.ads.googleads.v2.enums.ExtensionTypeEnum.ExtensionType extension_type = 2 [(google.api.field_behavior) = IMMUTABLE]; // The resource names of the extension feed items to serve under the customer. // ExtensionFeedItem resource names have the form: // // `customers/{customer_id}/extensionFeedItems/{feed_item_id}` - repeated google.protobuf.StringValue extension_feed_items = 3; + repeated google.protobuf.StringValue extension_feed_items = 3 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + }]; // The device for which the extensions will serve. Optional. google.ads.googleads.v2.enums.ExtensionSettingDeviceEnum.ExtensionSettingDevice device = 4; diff --git a/google/ads/googleads/v2/resources/customer_feed.proto b/google/ads/googleads/v2/resources/customer_feed.proto index e17dc363e..1abdc9ab4 100644 --- a/google/ads/googleads/v2/resources/customer_feed.proto +++ b/google/ads/googleads/v2/resources/customer_feed.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/matching_function.proto"; import "google/ads/googleads/v2/enums/feed_link_status.proto"; import "google/ads/googleads/v2/enums/placeholder_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -36,14 +37,29 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A customer feed. message CustomerFeed { - // The resource name of the customer feed. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerFeed" + pattern: "customers/{customer}/customerFeeds/{customer_feed}" + }; + + // Immutable. The resource name of the customer feed. // Customer feed resource names have the form: // // `customers/{customer_id}/customerFeeds/{feed_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerFeed" + } + ]; - // The feed being linked to the customer. - google.protobuf.StringValue feed = 2; + // Immutable. The feed being linked to the customer. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; // Indicates which placeholder types the feed may populate under the connected // customer. Required. @@ -54,7 +70,7 @@ message CustomerFeed { // Required. google.ads.googleads.v2.common.MatchingFunction matching_function = 4; - // Status of the customer feed. + // Output only. Status of the customer feed. // This field is read-only. - google.ads.googleads.v2.enums.FeedLinkStatusEnum.FeedLinkStatus status = 5; + google.ads.googleads.v2.enums.FeedLinkStatusEnum.FeedLinkStatus status = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/customer_label.proto b/google/ads/googleads/v2/resources/customer_label.proto index c67989a6e..640b36823 100644 --- a/google/ads/googleads/v2/resources/customer_label.proto +++ b/google/ads/googleads/v2/resources/customer_label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,18 +36,28 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // not have access to all the labels attached to it. Additional CustomerLabels // may be returned by increasing permissions with login-customer-id. message CustomerLabel { - // Name of the resource. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerLabel" + pattern: "customers/{customer}/customerLabels/{customer_label}" + }; + + // Immutable. Name of the resource. // Customer label resource names have the form: // `customers/{customer_id}/customerLabels/{label_id}` - string resource_name = 1; - - // The resource name of the customer to which the label is attached. + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerLabel" + } + ]; + + // Output only. The resource name of the customer to which the label is attached. // Read only. - google.protobuf.StringValue customer = 2; + google.protobuf.StringValue customer = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource name of the label assigned to the customer. + // Output only. The resource name of the label assigned to the customer. // // Note: the Customer ID portion of the label resource name is not // validated when creating a new CustomerLabel. - google.protobuf.StringValue label = 3; + google.protobuf.StringValue label = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/customer_manager_link.proto b/google/ads/googleads/v2/resources/customer_manager_link.proto index 09f46a832..5485407cc 100644 --- a/google/ads/googleads/v2/resources/customer_manager_link.proto +++ b/google/ads/googleads/v2/resources/customer_manager_link.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/manager_link_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -34,16 +35,26 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // Represents customer-manager link relationship. message CustomerManagerLink { - // Name of the resource. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerManagerLink" + pattern: "customers/{customer}/customerManagerLinks/{customer_manager_link}" + }; + + // Immutable. Name of the resource. // CustomerManagerLink resource names have the form: // `customers/{customer_id}/customerManagerLinks/{manager_customer_id}~{manager_link_id}` - string resource_name = 1; - - // The manager customer linked to the customer. - google.protobuf.StringValue manager_customer = 3; - - // ID of the customer-manager link. This field is read only. - google.protobuf.Int64Value manager_link_id = 4; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerManagerLink" + } + ]; + + // Output only. The manager customer linked to the customer. + google.protobuf.StringValue manager_customer = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the customer-manager link. This field is read only. + google.protobuf.Int64Value manager_link_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Status of the link between the customer and the manager. google.ads.googleads.v2.enums.ManagerLinkStatusEnum.ManagerLinkStatus status = 5; diff --git a/google/ads/googleads/v2/resources/customer_negative_criterion.proto b/google/ads/googleads/v2/resources/customer_negative_criterion.proto index 230c82b8d..f8f13997d 100644 --- a/google/ads/googleads/v2/resources/customer_negative_criterion.proto +++ b/google/ads/googleads/v2/resources/customer_negative_criterion.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/criteria.proto"; import "google/ads/googleads/v2/enums/criterion_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,38 +36,48 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A negative criterion for exclusions at the customer level. message CustomerNegativeCriterion { - // The resource name of the customer negative criterion. + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerNegativeCriterion" + pattern: "customers/{customer}/customerNegativeCriteria/{customer_negative_criterion}" + }; + + // Immutable. The resource name of the customer negative criterion. // Customer negative criterion resource names have the form: // // `customers/{customer_id}/customerNegativeCriteria/{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerNegativeCriterion" + } + ]; - // The ID of the criterion. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the criterion. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The type of the criterion. - google.ads.googleads.v2.enums.CriterionTypeEnum.CriterionType type = 3; + // Output only. The type of the criterion. + google.ads.googleads.v2.enums.CriterionTypeEnum.CriterionType type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The customer negative criterion. // // Exactly one must be set. oneof criterion { - // ContentLabel. - google.ads.googleads.v2.common.ContentLabelInfo content_label = 4; + // Immutable. ContentLabel. + google.ads.googleads.v2.common.ContentLabelInfo content_label = 4 [(google.api.field_behavior) = IMMUTABLE]; - // MobileApplication. - google.ads.googleads.v2.common.MobileApplicationInfo mobile_application = 5; + // Immutable. MobileApplication. + google.ads.googleads.v2.common.MobileApplicationInfo mobile_application = 5 [(google.api.field_behavior) = IMMUTABLE]; - // MobileAppCategory. - google.ads.googleads.v2.common.MobileAppCategoryInfo mobile_app_category = 6; + // Immutable. MobileAppCategory. + google.ads.googleads.v2.common.MobileAppCategoryInfo mobile_app_category = 6 [(google.api.field_behavior) = IMMUTABLE]; - // Placement. - google.ads.googleads.v2.common.PlacementInfo placement = 7; + // Immutable. Placement. + google.ads.googleads.v2.common.PlacementInfo placement = 7 [(google.api.field_behavior) = IMMUTABLE]; - // YouTube Video. - google.ads.googleads.v2.common.YouTubeVideoInfo youtube_video = 8; + // Immutable. YouTube Video. + google.ads.googleads.v2.common.YouTubeVideoInfo youtube_video = 8 [(google.api.field_behavior) = IMMUTABLE]; - // YouTube Channel. - google.ads.googleads.v2.common.YouTubeChannelInfo youtube_channel = 9; + // Immutable. YouTube Channel. + google.ads.googleads.v2.common.YouTubeChannelInfo youtube_channel = 9 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v2/resources/detail_placement_view.proto b/google/ads/googleads/v2/resources/detail_placement_view.proto index 5568cac9e..c276b3051 100644 --- a/google/ads/googleads/v2/resources/detail_placement_view.proto +++ b/google/ads/googleads/v2/resources/detail_placement_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/placement_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -34,28 +35,38 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A view with metrics aggregated by ad group and URL or YouTube video. message DetailPlacementView { - // The resource name of the detail placement view. + option (google.api.resource) = { + type: "googleads.googleapis.com/DetailPlacementView" + pattern: "customers/{customer}/detailPlacementViews/{detail_placement_view}" + }; + + // Output only. The resource name of the detail placement view. // Detail placement view resource names have the form: // // `customers/{customer_id}/detailPlacementViews/{ad_group_id}~{base64_placement}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DetailPlacementView" + } + ]; - // The automatic placement string at detail level, e. g. website URL, mobile + // Output only. The automatic placement string at detail level, e. g. website URL, mobile // application ID, or a YouTube video ID. - google.protobuf.StringValue placement = 2; + google.protobuf.StringValue placement = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The display name is URL name for websites, YouTube video name for YouTube + // Output only. The display name is URL name for websites, YouTube video name for YouTube // videos, and translated mobile app name for mobile apps. - google.protobuf.StringValue display_name = 3; + google.protobuf.StringValue display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // URL of the group placement, e.g. domain, link to the mobile application in + // Output only. URL of the group placement, e.g. domain, link to the mobile application in // app store, or a YouTube channel URL. - google.protobuf.StringValue group_placement_target_url = 4; + google.protobuf.StringValue group_placement_target_url = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // URL of the placement, e.g. website, link to the mobile application in app + // Output only. URL of the placement, e.g. website, link to the mobile application in app // store, or a YouTube video URL. - google.protobuf.StringValue target_url = 5; + google.protobuf.StringValue target_url = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Type of the placement, e.g. Website, YouTube Video, and Mobile Application. - google.ads.googleads.v2.enums.PlacementTypeEnum.PlacementType placement_type = 6; + // Output only. Type of the placement, e.g. Website, YouTube Video, and Mobile Application. + google.ads.googleads.v2.enums.PlacementTypeEnum.PlacementType placement_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/display_keyword_view.proto b/google/ads/googleads/v2/resources/display_keyword_view.proto index e5f8ab942..2f600abc8 100644 --- a/google/ads/googleads/v2/resources/display_keyword_view.proto +++ b/google/ads/googleads/v2/resources/display_keyword_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A display keyword view. message DisplayKeywordView { - // The resource name of the display keyword view. + option (google.api.resource) = { + type: "googleads.googleapis.com/DisplayKeywordView" + pattern: "customers/{customer}/displayKeywordViews/{display_keyword_view}" + }; + + // Output only. The resource name of the display keyword view. // Display Keyword view resource names have the form: // // `customers/{customer_id}/displayKeywordViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DisplayKeywordView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/distance_view.proto b/google/ads/googleads/v2/resources/distance_view.proto index 3074a0d8a..044d10efa 100644 --- a/google/ads/googleads/v2/resources/distance_view.proto +++ b/google/ads/googleads/v2/resources/distance_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/distance_bucket.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -32,21 +33,31 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // Proto file describing the DistanceView resource. -// A distance view with metrics aggregated by the user’s distance from an -// advertiser’s location extensions. Each DistanceBucket includes all +// A distance view with metrics aggregated by the user's distance from an +// advertiser's location extensions. Each DistanceBucket includes all // impressions that fall within its distance and a single impression will -// contribute to the metrics for all DistanceBuckets that include the user’s +// contribute to the metrics for all DistanceBuckets that include the user's // distance. message DistanceView { - // The resource name of the distance view. + option (google.api.resource) = { + type: "googleads.googleapis.com/DistanceView" + pattern: "customers/{customer}/distanceViews/{distance_view}" + }; + + // Output only. The resource name of the distance view. // Distance view resource names have the form: // // `customers/{customer_id}/distanceViews/1~{distance_bucket}` - string resource_name = 1; - - // Grouping of user distance from location extensions. - google.ads.googleads.v2.enums.DistanceBucketEnum.DistanceBucket distance_bucket = 2; - - // True if the DistanceBucket is using the metric system, false otherwise. - google.protobuf.BoolValue metric_system = 3; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DistanceView" + } + ]; + + // Output only. Grouping of user distance from location extensions. + google.ads.googleads.v2.enums.DistanceBucketEnum.DistanceBucket distance_bucket = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. True if the DistanceBucket is using the metric system, false otherwise. + google.protobuf.BoolValue metric_system = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/domain_category.proto b/google/ads/googleads/v2/resources/domain_category.proto index 3b79b4b43..a9b563e9a 100644 --- a/google/ads/googleads/v2/resources/domain_category.proto +++ b/google/ads/googleads/v2/resources/domain_category.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -36,40 +37,55 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // the domain. The categories can be targeted using WebpageConditionInfo. // See: https://support.google.com/google-ads/answer/2471185 message DomainCategory { - // The resource name of the domain category. + option (google.api.resource) = { + type: "googleads.googleapis.com/DomainCategory" + pattern: "customers/{customer}/domainCategories/{domain_category}" + }; + + // Output only. The resource name of the domain category. // Domain category resource names have the form: // // `customers/{customer_id}/domainCategories/{campaign_id}~{category_base64}~{language_code}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DomainCategory" + } + ]; - // The campaign this category is recommended for. - google.protobuf.StringValue campaign = 2; + // Output only. The campaign this category is recommended for. + google.protobuf.StringValue campaign = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // Recommended category for the website domain. e.g. if you have a website + // Output only. Recommended category for the website domain. e.g. if you have a website // about electronics, the categories could be "cameras", "televisions", etc. - google.protobuf.StringValue category = 3; + google.protobuf.StringValue category = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The language code specifying the language of the website. e.g. "en" for + // Output only. The language code specifying the language of the website. e.g. "en" for // English. The language can be specified in the DynamicSearchAdsSetting // required for dynamic search ads. This is the language of the pages from // your website that you want Google Ads to find, create ads for, // and match searches with. - google.protobuf.StringValue language_code = 4; + google.protobuf.StringValue language_code = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The domain for the website. The domain can be specified in the + // Output only. The domain for the website. The domain can be specified in the // DynamicSearchAdsSetting required for dynamic search ads. - google.protobuf.StringValue domain = 5; + google.protobuf.StringValue domain = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Fraction of pages on your site that this category matches. - google.protobuf.DoubleValue coverage_fraction = 6; + // Output only. Fraction of pages on your site that this category matches. + google.protobuf.DoubleValue coverage_fraction = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The position of this category in the set of categories. Lower numbers + // Output only. The position of this category in the set of categories. Lower numbers // indicate a better match for the domain. null indicates not recommended. - google.protobuf.Int64Value category_rank = 7; + google.protobuf.Int64Value category_rank = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Indicates whether this category has sub-categories. - google.protobuf.BoolValue has_children = 8; + // Output only. Indicates whether this category has sub-categories. + google.protobuf.BoolValue has_children = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The recommended cost per click for the category. - google.protobuf.Int64Value recommended_cpc_bid_micros = 9; + // Output only. The recommended cost per click for the category. + google.protobuf.Int64Value recommended_cpc_bid_micros = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/dynamic_search_ads_search_term_view.proto b/google/ads/googleads/v2/resources/dynamic_search_ads_search_term_view.proto index 222ba1f4f..402e883dc 100644 --- a/google/ads/googleads/v2/resources/dynamic_search_ads_search_term_view.proto +++ b/google/ads/googleads/v2/resources/dynamic_search_ads_search_term_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -33,29 +34,39 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A dynamic search ads search term view. message DynamicSearchAdsSearchTermView { - // The resource name of the dynamic search ads search term view. + option (google.api.resource) = { + type: "googleads.googleapis.com/DynamicSearchAdsSearchTermView" + pattern: "customers/{customer}/dynamicSearchAdsSearchTermViews/{dynamic_search_ads_search_term_view}" + }; + + // Output only. The resource name of the dynamic search ads search term view. // Dynamic search ads search term view resource names have the form: // // `customers/{customer_id}/dynamicSearchAdsSearchTermViews/{ad_group_id}~{search_term_fp}~{headline_fp}~{landing_page_fp}~{page_url_fp}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DynamicSearchAdsSearchTermView" + } + ]; - // Search term + // Output only. Search term // // This field is read-only. - google.protobuf.StringValue search_term = 2; + google.protobuf.StringValue search_term = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The dynamically generated headline of the Dynamic Search Ad. + // Output only. The dynamically generated headline of the Dynamic Search Ad. // // This field is read-only. - google.protobuf.StringValue headline = 3; + google.protobuf.StringValue headline = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The dynamically selected landing page URL of the impression. + // Output only. The dynamically selected landing page URL of the impression. // // This field is read-only. - google.protobuf.StringValue landing_page = 4; + google.protobuf.StringValue landing_page = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The URL of page feed item served for the impression. + // Output only. The URL of page feed item served for the impression. // // This field is read-only. - google.protobuf.StringValue page_url = 5; + google.protobuf.StringValue page_url = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/expanded_landing_page_view.proto b/google/ads/googleads/v2/resources/expanded_landing_page_view.proto index c99db6001..0e05b2f7d 100644 --- a/google/ads/googleads/v2/resources/expanded_landing_page_view.proto +++ b/google/ads/googleads/v2/resources/expanded_landing_page_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -34,12 +35,22 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A landing page view with metrics aggregated at the expanded final URL // level. message ExpandedLandingPageView { - // The resource name of the expanded landing page view. + option (google.api.resource) = { + type: "googleads.googleapis.com/ExpandedLandingPageView" + pattern: "customers/{customer}/expandedLandingPageViews/{expanded_landing_page_view}" + }; + + // Output only. The resource name of the expanded landing page view. // Expanded landing page view resource names have the form: // // `customers/{customer_id}/expandedLandingPageViews/{expanded_final_url_fingerprint}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ExpandedLandingPageView" + } + ]; - // The final URL that clicks are directed to. - google.protobuf.StringValue expanded_final_url = 2; + // Output only. The final URL that clicks are directed to. + google.protobuf.StringValue expanded_final_url = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/extension_feed_item.proto b/google/ads/googleads/v2/resources/extension_feed_item.proto index 5956ea87b..52f36ab6f 100644 --- a/google/ads/googleads/v2/resources/extension_feed_item.proto +++ b/google/ads/googleads/v2/resources/extension_feed_item.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -22,6 +21,8 @@ import "google/ads/googleads/v2/common/extensions.proto"; import "google/ads/googleads/v2/enums/extension_type.proto"; import "google/ads/googleads/v2/enums/feed_item_status.proto"; import "google/ads/googleads/v2/enums/feed_item_target_device.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -38,15 +39,28 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // An extension feed item. message ExtensionFeedItem { - // The resource name of the extension feed item. + option (google.api.resource) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + pattern: "customers/{customer}/extensionFeedItems/{extension_feed_item}" + }; + + // Immutable. The resource name of the extension feed item. // Extension feed item resource names have the form: // // `customers/{customer_id}/extensionFeedItems/{feed_item_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + } + ]; - // The extension type of the extension feed item. + // Output only. The ID of this feed item. Read-only. + google.protobuf.Int64Value id = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The extension type of the extension feed item. // This field is read-only. - google.ads.googleads.v2.enums.ExtensionTypeEnum.ExtensionType extension_type = 13; + google.ads.googleads.v2.enums.ExtensionTypeEnum.ExtensionType extension_type = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Start time in which this feed item is effective and can begin serving. The // time is in the customer's time zone. @@ -69,14 +83,16 @@ message ExtensionFeedItem { google.ads.googleads.v2.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 17; // The targeted geo target constant. - google.protobuf.StringValue targeted_geo_target_constant = 20; + google.protobuf.StringValue targeted_geo_target_constant = 20 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + }]; // The targeted keyword. google.ads.googleads.v2.common.KeywordInfo targeted_keyword = 22; - // Status of the feed item. + // Output only. Status of the feed item. // This field is read-only. - google.ads.googleads.v2.enums.FeedItemStatusEnum.FeedItemStatus status = 4; + google.ads.googleads.v2.enums.FeedItemStatusEnum.FeedItemStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Extension type. oneof extension { @@ -104,23 +120,30 @@ message ExtensionFeedItem { // Promotion extension. google.ads.googleads.v2.common.PromotionFeedItem promotion_feed_item = 12; - // Location extension. Locations are synced from a GMB account into a feed. + // Output only. Location extension. Locations are synced from a GMB account into a feed. // This field is read-only. - google.ads.googleads.v2.common.LocationFeedItem location_feed_item = 14; + google.ads.googleads.v2.common.LocationFeedItem location_feed_item = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Affiliate location extension. Feed locations are populated by Google Ads + // Output only. Affiliate location extension. Feed locations are populated by Google Ads // based on a chain ID. // This field is read-only. - google.ads.googleads.v2.common.AffiliateLocationFeedItem affiliate_location_feed_item = 15; + google.ads.googleads.v2.common.AffiliateLocationFeedItem affiliate_location_feed_item = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Hotel Callout extension. + google.ads.googleads.v2.common.HotelCalloutFeedItem hotel_callout_feed_item = 23; } // Targeting at either the campaign or ad group level. Feed items that target // a campaign or ad group will only serve with that resource. oneof serving_resource_targeting { // The targeted campaign. - google.protobuf.StringValue targeted_campaign = 18; + google.protobuf.StringValue targeted_campaign = 18 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + }]; // The targeted ad group. - google.protobuf.StringValue targeted_ad_group = 19; + google.protobuf.StringValue targeted_ad_group = 19 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + }]; } } diff --git a/google/ads/googleads/v2/resources/feed.proto b/google/ads/googleads/v2/resources/feed.proto index 1760048d3..bc1a002e4 100644 --- a/google/ads/googleads/v2/resources/feed.proto +++ b/google/ads/googleads/v2/resources/feed.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -21,6 +20,8 @@ import "google/ads/googleads/v2/enums/affiliate_location_feed_relationship_type. import "google/ads/googleads/v2/enums/feed_attribute_type.proto"; import "google/ads/googleads/v2/enums/feed_origin.proto"; import "google/ads/googleads/v2/enums/feed_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -37,6 +38,11 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A feed. message Feed { + option (google.api.resource) = { + type: "googleads.googleapis.com/Feed" + pattern: "customers/{customer}/feeds/{feed}" + }; + // Data used to configure a location feed populated from Google My Business // Locations. message PlacesLocationFeedData { @@ -52,10 +58,10 @@ message Feed { google.protobuf.StringValue http_authorization_header = 3; } - // Required authentication token (from OAuth API) for the email. + // Immutable. Required authentication token (from OAuth API) for the email. // This field can only be specified in a create request. All its subfields // are not selectable. - OAuthInfo oauth_info = 1; + OAuthInfo oauth_info = 1 [(google.api.field_behavior) = IMMUTABLE]; // Email address of a Google My Business account or email address of a // manager of the Google My Business account. Required. @@ -96,20 +102,27 @@ message Feed { google.ads.googleads.v2.enums.AffiliateLocationFeedRelationshipTypeEnum.AffiliateLocationFeedRelationshipType relationship_type = 2; } - // The resource name of the feed. + // Immutable. The resource name of the feed. // Feed resource names have the form: // // `customers/{customer_id}/feeds/{feed_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; - // The ID of the feed. + // Output only. The ID of the feed. // This field is read-only. - google.protobuf.Int64Value id = 2; + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Name of the feed. Required. - google.protobuf.StringValue name = 3; + // Immutable. Name of the feed. Required. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = IMMUTABLE]; - // The Feed's attributes. Required on CREATE. + // The Feed's attributes. Required on CREATE, unless + // system_feed_generation_data is provided, in which case Google Ads will + // update the feed with the correct attributes. // Disallowed on UPDATE. Use attribute_operations to add new attributes. repeated FeedAttribute attributes = 4; @@ -117,12 +130,12 @@ message Feed { // be added, not removed. repeated FeedAttributeOperation attribute_operations = 9; - // Specifies who manages the FeedAttributes for the Feed. - google.ads.googleads.v2.enums.FeedOriginEnum.FeedOrigin origin = 5; + // Immutable. Specifies who manages the FeedAttributes for the Feed. + google.ads.googleads.v2.enums.FeedOriginEnum.FeedOrigin origin = 5 [(google.api.field_behavior) = IMMUTABLE]; - // Status of the feed. + // Output only. Status of the feed. // This field is read-only. - google.ads.googleads.v2.enums.FeedStatusEnum.FeedStatus status = 8; + google.ads.googleads.v2.enums.FeedStatusEnum.FeedStatus status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // The system data for the Feed. This data specifies information for // generating the feed items of the system generated feed. @@ -172,9 +185,9 @@ message FeedAttributeOperation { ADD = 2; } - // Type of list operation to perform. - Operator operator = 1; + // Output only. Type of list operation to perform. + Operator operator = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The feed attribute being added to the list. - FeedAttribute value = 2; + // Output only. The feed attribute being added to the list. + FeedAttribute value = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/feed_item.proto b/google/ads/googleads/v2/resources/feed_item.proto index 1ba2df744..ebc1e9f88 100644 --- a/google/ads/googleads/v2/resources/feed_item.proto +++ b/google/ads/googleads/v2/resources/feed_item.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -29,6 +28,8 @@ import "google/ads/googleads/v2/enums/placeholder_type.proto"; import "google/ads/googleads/v2/enums/policy_approval_status.proto"; import "google/ads/googleads/v2/enums/policy_review_status.proto"; import "google/ads/googleads/v2/errors/feed_item_validation_error.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -45,17 +46,32 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A feed item. message FeedItem { - // The resource name of the feed item. + option (google.api.resource) = { + type: "googleads.googleapis.com/FeedItem" + pattern: "customers/{customer}/feedItems/{feed_item}" + }; + + // Immutable. The resource name of the feed item. // Feed item resource names have the form: // // `customers/{customer_id}/feedItems/{feed_id}~{feed_item_id}` - string resource_name = 1; - - // The feed to which this feed item belongs. - google.protobuf.StringValue feed = 2; - - // The ID of this feed item. - google.protobuf.Int64Value id = 3; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItem" + } + ]; + + // Immutable. The feed to which this feed item belongs. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + + // Output only. The ID of this feed item. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Start time in which this feed item is effective and can begin serving. The // time is in the customer's time zone. @@ -80,17 +96,17 @@ message FeedItem { // `tracking_url_template`, `final_urls`, or `mobile_final_urls`. repeated google.ads.googleads.v2.common.CustomParameter url_custom_parameters = 8; - // Status of the feed item. + // Output only. Status of the feed item. // This field is read-only. - google.ads.googleads.v2.enums.FeedItemStatusEnum.FeedItemStatus status = 9; + google.ads.googleads.v2.enums.FeedItemStatusEnum.FeedItemStatus status = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // List of info about a feed item's validation and approval state for active + // Output only. List of info about a feed item's validation and approval state for active // feed mappings. There will be an entry in the list for each type of feed // mapping associated with the feed, e.g. a feed with a sitelink and a call // feed mapping would cause every feed item associated with that feed to have // an entry in this list for both sitelink and call. // This field is read-only. - repeated FeedItemPlaceholderPolicyInfo policy_infos = 10; + repeated FeedItemPlaceholderPolicyInfo policy_infos = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A feed item attribute value. @@ -109,8 +125,8 @@ message FeedItemAttributeValue { // String value. Should be set if feed_attribute_id refers to a feed attribute // of type STRING, URL or DATE_TIME. // For STRING the maximum length is 1500 characters. For URL the maximum - // length is 2076 characters. For DATE_TIME the format of the string must - // be the same as start and end time for the feed item. + // length is 2076 characters. For DATE_TIME the string must be in the format + // "YYYYMMDD HHMMSS". google.protobuf.StringValue string_value = 4; // Double value. Should be set if feed_attribute_id refers to a feed attribute @@ -148,52 +164,52 @@ message FeedItemAttributeValue { // Policy, validation, and quality approval info for a feed item for the // specified placeholder type. message FeedItemPlaceholderPolicyInfo { - // The placeholder type. - google.ads.googleads.v2.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type_enum = 10; + // Output only. The placeholder type. + google.ads.googleads.v2.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type_enum = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The FeedMapping that contains the placeholder type. - google.protobuf.StringValue feed_mapping_resource_name = 2; + // Output only. The FeedMapping that contains the placeholder type. + google.protobuf.StringValue feed_mapping_resource_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Where the placeholder type is in the review process. - google.ads.googleads.v2.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 3; + // Output only. Where the placeholder type is in the review process. + google.ads.googleads.v2.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The overall approval status of the placeholder type, calculated based on + // Output only. The overall approval status of the placeholder type, calculated based on // the status of its individual policy topic entries. - google.ads.googleads.v2.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 4; + google.ads.googleads.v2.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The list of policy findings for the placeholder type. - repeated google.ads.googleads.v2.common.PolicyTopicEntry policy_topic_entries = 5; + // Output only. The list of policy findings for the placeholder type. + repeated google.ads.googleads.v2.common.PolicyTopicEntry policy_topic_entries = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The validation status of the palceholder type. - google.ads.googleads.v2.enums.FeedItemValidationStatusEnum.FeedItemValidationStatus validation_status = 6; + // Output only. The validation status of the palceholder type. + google.ads.googleads.v2.enums.FeedItemValidationStatusEnum.FeedItemValidationStatus validation_status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // List of placeholder type validation errors. - repeated FeedItemValidationError validation_errors = 7; + // Output only. List of placeholder type validation errors. + repeated FeedItemValidationError validation_errors = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Placeholder type quality evaluation approval status. - google.ads.googleads.v2.enums.FeedItemQualityApprovalStatusEnum.FeedItemQualityApprovalStatus quality_approval_status = 8; + // Output only. Placeholder type quality evaluation approval status. + google.ads.googleads.v2.enums.FeedItemQualityApprovalStatusEnum.FeedItemQualityApprovalStatus quality_approval_status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // List of placeholder type quality evaluation disapproval reasons. - repeated google.ads.googleads.v2.enums.FeedItemQualityDisapprovalReasonEnum.FeedItemQualityDisapprovalReason quality_disapproval_reasons = 9; + // Output only. List of placeholder type quality evaluation disapproval reasons. + repeated google.ads.googleads.v2.enums.FeedItemQualityDisapprovalReasonEnum.FeedItemQualityDisapprovalReason quality_disapproval_reasons = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Stores a validation error and the set of offending feed attributes which // together are responsible for causing a feed item validation error. message FeedItemValidationError { - // Error code indicating what validation error was triggered. The description + // Output only. Error code indicating what validation error was triggered. The description // of the error can be found in the 'description' field. - google.ads.googleads.v2.errors.FeedItemValidationErrorEnum.FeedItemValidationError validation_error = 1; + google.ads.googleads.v2.errors.FeedItemValidationErrorEnum.FeedItemValidationError validation_error = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The description of the validation error. - google.protobuf.StringValue description = 2; + // Output only. The description of the validation error. + google.protobuf.StringValue description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Set of feed attributes in the feed item flagged during validation. If + // Output only. Set of feed attributes in the feed item flagged during validation. If // empty, no specific feed attributes can be associated with the error // (e.g. error across the entire feed item). - repeated google.protobuf.Int64Value feed_attribute_ids = 3; + repeated google.protobuf.Int64Value feed_attribute_ids = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Any extra information related to this error which is not captured by + // Output only. Any extra information related to this error which is not captured by // validation_error and feed_attribute_id (e.g. placeholder field IDs when // feed_attribute_id is not mapped). Note that extra_info is not localized. - google.protobuf.StringValue extra_info = 5; + google.protobuf.StringValue extra_info = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/feed_item_target.proto b/google/ads/googleads/v2/resources/feed_item_target.proto index 7d15e0a68..0ea35810f 100644 --- a/google/ads/googleads/v2/resources/feed_item_target.proto +++ b/google/ads/googleads/v2/resources/feed_item_target.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/criteria.proto"; import "google/ads/googleads/v2/enums/feed_item_target_device.proto"; import "google/ads/googleads/v2/enums/feed_item_target_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -36,38 +37,68 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A feed item target. message FeedItemTarget { - // The resource name of the feed item target. + option (google.api.resource) = { + type: "googleads.googleapis.com/FeedItemTarget" + pattern: "customers/{customer}/feedItemTargets/{feed_item_target}" + }; + + // Immutable. The resource name of the feed item target. // Feed item target resource names have the form: // `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItemTarget" + } + ]; - // The feed item to which this feed item target belongs. - google.protobuf.StringValue feed_item = 2; + // Immutable. The feed item to which this feed item target belongs. + google.protobuf.StringValue feed_item = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItem" + } + ]; - // The target type of this feed item target. This field is read-only. - google.ads.googleads.v2.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3; + // Output only. The target type of this feed item target. This field is read-only. + google.ads.googleads.v2.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The ID of the targeted resource. This field is read-only. - google.protobuf.Int64Value feed_item_target_id = 6; + // Output only. The ID of the targeted resource. This field is read-only. + google.protobuf.Int64Value feed_item_target_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // The targeted resource. oneof target { - // The targeted campaign. - google.protobuf.StringValue campaign = 4; + // Immutable. The targeted campaign. + google.protobuf.StringValue campaign = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The targeted ad group. - google.protobuf.StringValue ad_group = 5; + // Immutable. The targeted ad group. + google.protobuf.StringValue ad_group = 5 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; - // The targeted keyword. - google.ads.googleads.v2.common.KeywordInfo keyword = 7; + // Immutable. The targeted keyword. + google.ads.googleads.v2.common.KeywordInfo keyword = 7 [(google.api.field_behavior) = IMMUTABLE]; - // The targeted geo target constant resource name. - google.protobuf.StringValue geo_target_constant = 8; + // Immutable. The targeted geo target constant resource name. + google.protobuf.StringValue geo_target_constant = 8 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + } + ]; - // The targeted device. - google.ads.googleads.v2.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9; + // Immutable. The targeted device. + google.ads.googleads.v2.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(google.api.field_behavior) = IMMUTABLE]; - // The targeted schedule. - google.ads.googleads.v2.common.AdScheduleInfo ad_schedule = 10; + // Immutable. The targeted schedule. + google.ads.googleads.v2.common.AdScheduleInfo ad_schedule = 10 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v2/resources/feed_mapping.proto b/google/ads/googleads/v2/resources/feed_mapping.proto index 5d7a601f0..e5ede0986 100644 --- a/google/ads/googleads/v2/resources/feed_mapping.proto +++ b/google/ads/googleads/v2/resources/feed_mapping.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -41,6 +40,8 @@ import "google/ads/googleads/v2/enums/real_estate_placeholder_field.proto"; import "google/ads/googleads/v2/enums/sitelink_placeholder_field.proto"; import "google/ads/googleads/v2/enums/structured_snippet_placeholder_field.proto"; import "google/ads/googleads/v2/enums/travel_placeholder_field.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -57,114 +58,129 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A feed mapping. message FeedMapping { - // The resource name of the feed mapping. + option (google.api.resource) = { + type: "googleads.googleapis.com/FeedMapping" + pattern: "customers/{customer}/feedMappings/{feed_mapping}" + }; + + // Immutable. The resource name of the feed mapping. // Feed mapping resource names have the form: // // `customers/{customer_id}/feedMappings/{feed_id}~{feed_mapping_id}` - string resource_name = 1; - - // The feed of this feed mapping. - google.protobuf.StringValue feed = 2; - - // Feed attributes to field mappings. These mappings are a one-to-many + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedMapping" + } + ]; + + // Immutable. The feed of this feed mapping. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + + // Immutable. Feed attributes to field mappings. These mappings are a one-to-many // relationship meaning that 1 feed attribute can be used to populate // multiple placeholder fields, but 1 placeholder field can only draw // data from 1 feed attribute. Ad Customizer is an exception, 1 placeholder // field can be mapped to multiple feed attributes. Required. - repeated AttributeFieldMapping attribute_field_mappings = 5; + repeated AttributeFieldMapping attribute_field_mappings = 5 [(google.api.field_behavior) = IMMUTABLE]; - // Status of the feed mapping. + // Output only. Status of the feed mapping. // This field is read-only. - google.ads.googleads.v2.enums.FeedMappingStatusEnum.FeedMappingStatus status = 6; + google.ads.googleads.v2.enums.FeedMappingStatusEnum.FeedMappingStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Feed mapping target. Can be either a placeholder or a criterion. For a // given feed, the active FeedMappings must have unique targets. Required. oneof target { - // The placeholder type of this mapping (i.e., if the mapping maps feed + // Immutable. The placeholder type of this mapping (i.e., if the mapping maps feed // attributes to placeholder fields). - google.ads.googleads.v2.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 3; + google.ads.googleads.v2.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 3 [(google.api.field_behavior) = IMMUTABLE]; - // The criterion type of this mapping (i.e., if the mapping maps feed + // Immutable. The criterion type of this mapping (i.e., if the mapping maps feed // attributes to criterion fields). - google.ads.googleads.v2.enums.FeedMappingCriterionTypeEnum.FeedMappingCriterionType criterion_type = 4; + google.ads.googleads.v2.enums.FeedMappingCriterionTypeEnum.FeedMappingCriterionType criterion_type = 4 [(google.api.field_behavior) = IMMUTABLE]; } } // Maps from feed attribute id to a placeholder or criterion field id. message AttributeFieldMapping { - // Feed attribute from which to map. - google.protobuf.Int64Value feed_attribute_id = 1; + // Immutable. Feed attribute from which to map. + google.protobuf.Int64Value feed_attribute_id = 1 [(google.api.field_behavior) = IMMUTABLE]; - // The placeholder field ID. If a placeholder field enum is not published in + // Output only. The placeholder field ID. If a placeholder field enum is not published in // the current API version, then this field will be populated and the field // oneof will be empty. // This field is read-only. - google.protobuf.Int64Value field_id = 2; + google.protobuf.Int64Value field_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Placeholder or criterion field to be populated using data from // the above feed attribute. Required. oneof field { - // Sitelink Placeholder Fields. - google.ads.googleads.v2.enums.SitelinkPlaceholderFieldEnum.SitelinkPlaceholderField sitelink_field = 3; + // Immutable. Sitelink Placeholder Fields. + google.ads.googleads.v2.enums.SitelinkPlaceholderFieldEnum.SitelinkPlaceholderField sitelink_field = 3 [(google.api.field_behavior) = IMMUTABLE]; - // Call Placeholder Fields. - google.ads.googleads.v2.enums.CallPlaceholderFieldEnum.CallPlaceholderField call_field = 4; + // Immutable. Call Placeholder Fields. + google.ads.googleads.v2.enums.CallPlaceholderFieldEnum.CallPlaceholderField call_field = 4 [(google.api.field_behavior) = IMMUTABLE]; - // App Placeholder Fields. - google.ads.googleads.v2.enums.AppPlaceholderFieldEnum.AppPlaceholderField app_field = 5; + // Immutable. App Placeholder Fields. + google.ads.googleads.v2.enums.AppPlaceholderFieldEnum.AppPlaceholderField app_field = 5 [(google.api.field_behavior) = IMMUTABLE]; - // Location Placeholder Fields. This field is read-only. - google.ads.googleads.v2.enums.LocationPlaceholderFieldEnum.LocationPlaceholderField location_field = 6; + // Output only. Location Placeholder Fields. This field is read-only. + google.ads.googleads.v2.enums.LocationPlaceholderFieldEnum.LocationPlaceholderField location_field = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Affiliate Location Placeholder Fields. This field is read-only. - google.ads.googleads.v2.enums.AffiliateLocationPlaceholderFieldEnum.AffiliateLocationPlaceholderField affiliate_location_field = 7; + // Output only. Affiliate Location Placeholder Fields. This field is read-only. + google.ads.googleads.v2.enums.AffiliateLocationPlaceholderFieldEnum.AffiliateLocationPlaceholderField affiliate_location_field = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Callout Placeholder Fields. - google.ads.googleads.v2.enums.CalloutPlaceholderFieldEnum.CalloutPlaceholderField callout_field = 8; + // Immutable. Callout Placeholder Fields. + google.ads.googleads.v2.enums.CalloutPlaceholderFieldEnum.CalloutPlaceholderField callout_field = 8 [(google.api.field_behavior) = IMMUTABLE]; - // Structured Snippet Placeholder Fields. - google.ads.googleads.v2.enums.StructuredSnippetPlaceholderFieldEnum.StructuredSnippetPlaceholderField structured_snippet_field = 9; + // Immutable. Structured Snippet Placeholder Fields. + google.ads.googleads.v2.enums.StructuredSnippetPlaceholderFieldEnum.StructuredSnippetPlaceholderField structured_snippet_field = 9 [(google.api.field_behavior) = IMMUTABLE]; - // Message Placeholder Fields. - google.ads.googleads.v2.enums.MessagePlaceholderFieldEnum.MessagePlaceholderField message_field = 10; + // Immutable. Message Placeholder Fields. + google.ads.googleads.v2.enums.MessagePlaceholderFieldEnum.MessagePlaceholderField message_field = 10 [(google.api.field_behavior) = IMMUTABLE]; - // Price Placeholder Fields. - google.ads.googleads.v2.enums.PricePlaceholderFieldEnum.PricePlaceholderField price_field = 11; + // Immutable. Price Placeholder Fields. + google.ads.googleads.v2.enums.PricePlaceholderFieldEnum.PricePlaceholderField price_field = 11 [(google.api.field_behavior) = IMMUTABLE]; - // Promotion Placeholder Fields. - google.ads.googleads.v2.enums.PromotionPlaceholderFieldEnum.PromotionPlaceholderField promotion_field = 12; + // Immutable. Promotion Placeholder Fields. + google.ads.googleads.v2.enums.PromotionPlaceholderFieldEnum.PromotionPlaceholderField promotion_field = 12 [(google.api.field_behavior) = IMMUTABLE]; - // Ad Customizer Placeholder Fields - google.ads.googleads.v2.enums.AdCustomizerPlaceholderFieldEnum.AdCustomizerPlaceholderField ad_customizer_field = 13; + // Immutable. Ad Customizer Placeholder Fields + google.ads.googleads.v2.enums.AdCustomizerPlaceholderFieldEnum.AdCustomizerPlaceholderField ad_customizer_field = 13 [(google.api.field_behavior) = IMMUTABLE]; - // Dynamic Search Ad Page Feed Fields. - google.ads.googleads.v2.enums.DsaPageFeedCriterionFieldEnum.DsaPageFeedCriterionField dsa_page_feed_field = 14; + // Immutable. Dynamic Search Ad Page Feed Fields. + google.ads.googleads.v2.enums.DsaPageFeedCriterionFieldEnum.DsaPageFeedCriterionField dsa_page_feed_field = 14 [(google.api.field_behavior) = IMMUTABLE]; - // Location Target Fields. - google.ads.googleads.v2.enums.LocationExtensionTargetingCriterionFieldEnum.LocationExtensionTargetingCriterionField location_extension_targeting_field = 15; + // Immutable. Location Target Fields. + google.ads.googleads.v2.enums.LocationExtensionTargetingCriterionFieldEnum.LocationExtensionTargetingCriterionField location_extension_targeting_field = 15 [(google.api.field_behavior) = IMMUTABLE]; - // Education Placeholder Fields - google.ads.googleads.v2.enums.EducationPlaceholderFieldEnum.EducationPlaceholderField education_field = 16; + // Immutable. Education Placeholder Fields + google.ads.googleads.v2.enums.EducationPlaceholderFieldEnum.EducationPlaceholderField education_field = 16 [(google.api.field_behavior) = IMMUTABLE]; - // Flight Placeholder Fields - google.ads.googleads.v2.enums.FlightPlaceholderFieldEnum.FlightPlaceholderField flight_field = 17; + // Immutable. Flight Placeholder Fields + google.ads.googleads.v2.enums.FlightPlaceholderFieldEnum.FlightPlaceholderField flight_field = 17 [(google.api.field_behavior) = IMMUTABLE]; - // Custom Placeholder Fields - google.ads.googleads.v2.enums.CustomPlaceholderFieldEnum.CustomPlaceholderField custom_field = 18; + // Immutable. Custom Placeholder Fields + google.ads.googleads.v2.enums.CustomPlaceholderFieldEnum.CustomPlaceholderField custom_field = 18 [(google.api.field_behavior) = IMMUTABLE]; - // Hotel Placeholder Fields - google.ads.googleads.v2.enums.HotelPlaceholderFieldEnum.HotelPlaceholderField hotel_field = 19; + // Immutable. Hotel Placeholder Fields + google.ads.googleads.v2.enums.HotelPlaceholderFieldEnum.HotelPlaceholderField hotel_field = 19 [(google.api.field_behavior) = IMMUTABLE]; - // Real Estate Placeholder Fields - google.ads.googleads.v2.enums.RealEstatePlaceholderFieldEnum.RealEstatePlaceholderField real_estate_field = 20; + // Immutable. Real Estate Placeholder Fields + google.ads.googleads.v2.enums.RealEstatePlaceholderFieldEnum.RealEstatePlaceholderField real_estate_field = 20 [(google.api.field_behavior) = IMMUTABLE]; - // Travel Placeholder Fields - google.ads.googleads.v2.enums.TravelPlaceholderFieldEnum.TravelPlaceholderField travel_field = 21; + // Immutable. Travel Placeholder Fields + google.ads.googleads.v2.enums.TravelPlaceholderFieldEnum.TravelPlaceholderField travel_field = 21 [(google.api.field_behavior) = IMMUTABLE]; - // Local Placeholder Fields - google.ads.googleads.v2.enums.LocalPlaceholderFieldEnum.LocalPlaceholderField local_field = 22; + // Immutable. Local Placeholder Fields + google.ads.googleads.v2.enums.LocalPlaceholderFieldEnum.LocalPlaceholderField local_field = 22 [(google.api.field_behavior) = IMMUTABLE]; - // Job Placeholder Fields - google.ads.googleads.v2.enums.JobPlaceholderFieldEnum.JobPlaceholderField job_field = 23; + // Immutable. Job Placeholder Fields + google.ads.googleads.v2.enums.JobPlaceholderFieldEnum.JobPlaceholderField job_field = 23 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v2/resources/feed_placeholder_view.proto b/google/ads/googleads/v2/resources/feed_placeholder_view.proto index a3f6f0e33..ffbcfefe0 100644 --- a/google/ads/googleads/v2/resources/feed_placeholder_view.proto +++ b/google/ads/googleads/v2/resources/feed_placeholder_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/placeholder_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -33,12 +34,22 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A feed placeholder view. message FeedPlaceholderView { - // The resource name of the feed placeholder view. + option (google.api.resource) = { + type: "googleads.googleapis.com/FeedPlaceholderView" + pattern: "customers/{customer}/feedPlaceholderViews/{feed_placeholder_view}" + }; + + // Output only. The resource name of the feed placeholder view. // Feed placeholder view resource names have the form: // // `customers/{customer_id}/feedPlaceholderViews/{placeholder_type}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedPlaceholderView" + } + ]; - // The placeholder type of the feed placeholder view. - google.ads.googleads.v2.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 2; + // Output only. The placeholder type of the feed placeholder view. + google.ads.googleads.v2.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/gender_view.proto b/google/ads/googleads/v2/resources/gender_view.proto index 77d0631aa..2cba7b8a4 100644 --- a/google/ads/googleads/v2/resources/gender_view.proto +++ b/google/ads/googleads/v2/resources/gender_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A gender view. message GenderView { - // The resource name of the gender view. + option (google.api.resource) = { + type: "googleads.googleapis.com/GenderView" + pattern: "customers/{customer}/genderViews/{gender_view}" + }; + + // Output only. The resource name of the gender view. // Gender view resource names have the form: // // `customers/{customer_id}/genderViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GenderView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/geo_target_constant.proto b/google/ads/googleads/v2/resources/geo_target_constant.proto index 1cbe1d1d2..533880044 100644 --- a/google/ads/googleads/v2/resources/geo_target_constant.proto +++ b/google/ads/googleads/v2/resources/geo_target_constant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/geo_target_constant_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -34,28 +35,38 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A geo target constant. message GeoTargetConstant { - // The resource name of the geo target constant. + option (google.api.resource) = { + type: "googleads.googleapis.com/GeoTargetConstant" + pattern: "geoTargetConstants/{geo_target_constant}" + }; + + // Output only. The resource name of the geo target constant. // Geo target constant resource names have the form: // // `geoTargetConstants/{geo_target_constant_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + } + ]; - // The ID of the geo target constant. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the geo target constant. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Geo target constant English name. - google.protobuf.StringValue name = 4; + // Output only. Geo target constant English name. + google.protobuf.StringValue name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The ISO-3166-1 alpha-2 country code that is associated with the target. - google.protobuf.StringValue country_code = 5; + // Output only. The ISO-3166-1 alpha-2 country code that is associated with the target. + google.protobuf.StringValue country_code = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Geo target constant target type. - google.protobuf.StringValue target_type = 6; + // Output only. Geo target constant target type. + google.protobuf.StringValue target_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Geo target constant status. - google.ads.googleads.v2.enums.GeoTargetConstantStatusEnum.GeoTargetConstantStatus status = 7; + // Output only. Geo target constant status. + google.ads.googleads.v2.enums.GeoTargetConstantStatusEnum.GeoTargetConstantStatus status = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The fully qualified English name, consisting of the target's name and that + // Output only. The fully qualified English name, consisting of the target's name and that // of its parent and country. - google.protobuf.StringValue canonical_name = 8; + google.protobuf.StringValue canonical_name = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/geographic_view.proto b/google/ads/googleads/v2/resources/geographic_view.proto index 85159e6f1..dd7d5f917 100644 --- a/google/ads/googleads/v2/resources/geographic_view.proto +++ b/google/ads/googleads/v2/resources/geographic_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/geo_targeting_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -39,15 +40,25 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // the user or an area of interest. If other segment fields are used, you may // get more than one row per country. message GeographicView { - // The resource name of the geographic view. + option (google.api.resource) = { + type: "googleads.googleapis.com/GeographicView" + pattern: "customers/{customer}/geographicViews/{geographic_view}" + }; + + // Output only. The resource name of the geographic view. // Geographic view resource names have the form: // // `customers/{customer_id}/geographicViews/{country_criterion_id}~{location_type}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeographicView" + } + ]; - // Type of the geo targeting of the campaign. - google.ads.googleads.v2.enums.GeoTargetingTypeEnum.GeoTargetingType location_type = 3; + // Output only. Type of the geo targeting of the campaign. + google.ads.googleads.v2.enums.GeoTargetingTypeEnum.GeoTargetingType location_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Criterion Id for the country. - google.protobuf.Int64Value country_criterion_id = 4; + // Output only. Criterion Id for the country. + google.protobuf.Int64Value country_criterion_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/google_ads_field.proto b/google/ads/googleads/v2/resources/google_ads_field.proto index ecdbc0e0a..a2fc17ecf 100644 --- a/google/ads/googleads/v2/resources/google_ads_field.proto +++ b/google/ads/googleads/v2/resources/google_ads_field.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/google_ads_field_category.proto"; import "google/ads/googleads/v2/enums/google_ads_field_data_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,51 +36,61 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A field or resource (artifact) used by GoogleAdsService. message GoogleAdsField { - // The resource name of the artifact. + option (google.api.resource) = { + type: "googleads.googleapis.com/GoogleAdsField" + pattern: "googleAdsFields/{google_ads_field}" + }; + + // Output only. The resource name of the artifact. // Artifact resource names have the form: // // `googleAdsFields/{name}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GoogleAdsField" + } + ]; - // The name of the artifact. - google.protobuf.StringValue name = 2; + // Output only. The name of the artifact. + google.protobuf.StringValue name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The category of the artifact. - google.ads.googleads.v2.enums.GoogleAdsFieldCategoryEnum.GoogleAdsFieldCategory category = 3; + // Output only. The category of the artifact. + google.ads.googleads.v2.enums.GoogleAdsFieldCategoryEnum.GoogleAdsFieldCategory category = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the artifact can be used in a SELECT clause in search + // Output only. Whether the artifact can be used in a SELECT clause in search // queries. - google.protobuf.BoolValue selectable = 4; + google.protobuf.BoolValue selectable = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the artifact can be used in a WHERE clause in search + // Output only. Whether the artifact can be used in a WHERE clause in search // queries. - google.protobuf.BoolValue filterable = 5; + google.protobuf.BoolValue filterable = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the artifact can be used in a ORDER BY clause in search + // Output only. Whether the artifact can be used in a ORDER BY clause in search // queries. - google.protobuf.BoolValue sortable = 6; + google.protobuf.BoolValue sortable = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The names of all resources, segments, and metrics that are selectable with + // Output only. The names of all resources, segments, and metrics that are selectable with // the described artifact. - repeated google.protobuf.StringValue selectable_with = 7; + repeated google.protobuf.StringValue selectable_with = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The names of all resources that are selectable with the described + // Output only. The names of all resources that are selectable with the described // artifact. Fields from these resources do not segment metrics when included // in search queries. // // This field is only set for artifacts whose category is RESOURCE. - repeated google.protobuf.StringValue attribute_resources = 8; + repeated google.protobuf.StringValue attribute_resources = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // At and beyond version V1 this field lists the names of all metrics that are + // Output only. At and beyond version V1 this field lists the names of all metrics that are // selectable with the described artifact when it is used in the FROM clause. // It is only set for artifacts whose category is RESOURCE. // // Before version V1 this field lists the names of all metrics that are // selectable with the described artifact. It is only set for artifacts whose // category is either RESOURCE or SEGMENT - repeated google.protobuf.StringValue metrics = 9; + repeated google.protobuf.StringValue metrics = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // At and beyond version V1 this field lists the names of all artifacts, + // Output only. At and beyond version V1 this field lists the names of all artifacts, // whether a segment or another resource, that segment metrics when included // in search queries and when the described artifact is used in the FROM // clause. It is only set for artifacts whose category is RESOURCE. @@ -88,20 +99,20 @@ message GoogleAdsField { // segment or another resource, that segment metrics when included in search // queries. It is only set for artifacts of category RESOURCE, SEGMENT or // METRIC. - repeated google.protobuf.StringValue segments = 10; + repeated google.protobuf.StringValue segments = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Values the artifact can assume if it is a field of type ENUM. + // Output only. Values the artifact can assume if it is a field of type ENUM. // // This field is only set for artifacts of category SEGMENT or ATTRIBUTE. - repeated google.protobuf.StringValue enum_values = 11; + repeated google.protobuf.StringValue enum_values = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - // This field determines the operators that can be used with the artifact + // Output only. This field determines the operators that can be used with the artifact // in WHERE clauses. - google.ads.googleads.v2.enums.GoogleAdsFieldDataTypeEnum.GoogleAdsFieldDataType data_type = 12; + google.ads.googleads.v2.enums.GoogleAdsFieldDataTypeEnum.GoogleAdsFieldDataType data_type = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The URL of proto describing the artifact's data type. - google.protobuf.StringValue type_url = 13; + // Output only. The URL of proto describing the artifact's data type. + google.protobuf.StringValue type_url = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the field artifact is repeated. - google.protobuf.BoolValue is_repeated = 14; + // Output only. Whether the field artifact is repeated. + google.protobuf.BoolValue is_repeated = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/group_placement_view.proto b/google/ads/googleads/v2/resources/group_placement_view.proto index 9f22e1770..fa2147ed6 100644 --- a/google/ads/googleads/v2/resources/group_placement_view.proto +++ b/google/ads/googleads/v2/resources/group_placement_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/placement_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -34,23 +35,33 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A group placement view. message GroupPlacementView { - // The resource name of the group placement view. + option (google.api.resource) = { + type: "googleads.googleapis.com/GroupPlacementView" + pattern: "customers/{customer}/groupPlacementViews/{group_placement_view}" + }; + + // Output only. The resource name of the group placement view. // Group placement view resource names have the form: // // `customers/{customer_id}/groupPlacementViews/{ad_group_id}~{base64_placement}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GroupPlacementView" + } + ]; - // The automatic placement string at group level, e. g. web domain, mobile + // Output only. The automatic placement string at group level, e. g. web domain, mobile // app ID, or a YouTube channel ID. - google.protobuf.StringValue placement = 2; + google.protobuf.StringValue placement = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Domain name for websites and YouTube channel name for YouTube channels. - google.protobuf.StringValue display_name = 3; + // Output only. Domain name for websites and YouTube channel name for YouTube channels. + google.protobuf.StringValue display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // URL of the group placement, e.g. domain, link to the mobile application in + // Output only. URL of the group placement, e.g. domain, link to the mobile application in // app store, or a YouTube channel URL. - google.protobuf.StringValue target_url = 4; + google.protobuf.StringValue target_url = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Type of the placement, e.g. Website, YouTube Channel, Mobile Application. - google.ads.googleads.v2.enums.PlacementTypeEnum.PlacementType placement_type = 5; + // Output only. Type of the placement, e.g. Website, YouTube Channel, Mobile Application. + google.ads.googleads.v2.enums.PlacementTypeEnum.PlacementType placement_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/hotel_group_view.proto b/google/ads/googleads/v2/resources/hotel_group_view.proto index bcdec2814..e26861fe9 100644 --- a/google/ads/googleads/v2/resources/hotel_group_view.proto +++ b/google/ads/googleads/v2/resources/hotel_group_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A hotel group view. message HotelGroupView { - // The resource name of the hotel group view. + option (google.api.resource) = { + type: "googleads.googleapis.com/HotelGroupView" + pattern: "customers/{customer}/hotelGroupViews/{hotel_group_view}" + }; + + // Output only. The resource name of the hotel group view. // Hotel Group view resource names have the form: // // `customers/{customer_id}/hotelGroupViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/HotelGroupView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/hotel_performance_view.proto b/google/ads/googleads/v2/resources/hotel_performance_view.proto index bc2546414..1b5c32b78 100644 --- a/google/ads/googleads/v2/resources/hotel_performance_view.proto +++ b/google/ads/googleads/v2/resources/hotel_performance_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A hotel performance view. message HotelPerformanceView { - // The resource name of the hotel performance view. + option (google.api.resource) = { + type: "googleads.googleapis.com/HotelPerformanceView" + pattern: "customers/{customer}/hotelPerformanceView" + }; + + // Output only. The resource name of the hotel performance view. // Hotel performance view resource names have the form: // // `customers/{customer_id}/hotelPerformanceView` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/HotelPerformanceView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/invoice.proto b/google/ads/googleads/v2/resources/invoice.proto new file mode 100644 index 000000000..40ad89bd6 --- /dev/null +++ b/google/ads/googleads/v2/resources/invoice.proto @@ -0,0 +1,184 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/common/dates.proto"; +import "google/ads/googleads/v2/enums/invoice_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "InvoiceProto"; +option java_package = "com.google.ads.googleads.v2.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; + +// Proto file describing the Invoice resource. + +// An invoice. All invoice information is snapshotted to match the PDF invoice. +// For invoices older than the launch of InvoiceService, the snapshotted +// information may not match the PDF invoice. +message Invoice { + option (google.api.resource) = { + type: "googleads.googleapis.com/Invoice" + pattern: "customers/{customer}/invoices/{invoice}" + }; + + // Represents a summarized account budget billable cost. + message AccountBudgetSummary { + // Output only. The resource name of the customer associated with this account budget. + // This contains the customer ID, which appears on the invoice PDF as + // "Account ID". + // Customer resource names have the form: + // + // `customers/{customer_id}` + google.protobuf.StringValue customer = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The descriptive name of the account budget’s customer. It appears on the + // invoice PDF as "Account". + google.protobuf.StringValue customer_descriptive_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the account budget associated with this summarized + // billable cost. + // AccountBudget resource names have the form: + // + // `customers/{customer_id}/accountBudgets/{account_budget_id}` + google.protobuf.StringValue account_budget = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the account budget. It appears on the invoice PDF as "Account + // budget". + google.protobuf.StringValue account_budget_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The purchase order number of the account budget. It appears on the + // invoice PDF as "Purchase order". + google.protobuf.StringValue purchase_order_number = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The pretax subtotal amount attributable to this budget during the service + // period, in micros. + google.protobuf.Int64Value subtotal_amount_micros = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The tax amount attributable to this budget during the service period, in + // micros. + google.protobuf.Int64Value tax_amount_micros = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total amount attributable to this budget during the service period, + // in micros. This equals the sum of the account budget subtotal amount and + // the account budget tax amount. + google.protobuf.Int64Value total_amount_micros = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The billable activity date range of the account budget, within the + // service date range of this invoice. The end date is inclusive. This can + // be different from the account budget's start and end time. + google.ads.googleads.v2.common.DateRange billable_activity_date_range = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The resource name of the invoice. Multiple customers can share a given + // invoice, so multiple resource names may point to the same invoice. + // Invoice resource names have the form: + // + // `customers/{customer_id}/invoices/{invoice_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Invoice" + } + ]; + + // Output only. The ID of the invoice. It appears on the invoice PDF as "Invoice number". + google.protobuf.StringValue id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of invoice. + google.ads.googleads.v2.enums.InvoiceTypeEnum.InvoiceType type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of this invoice’s billing setup. + // + // `customers/{customer_id}/billingSetups/{billing_setup_id}` + google.protobuf.StringValue billing_setup = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A 16 digit ID used to identify the payments account associated with the + // billing setup, e.g. "1234-5678-9012-3456". It appears on the invoice PDF as + // "Billing Account Number". + google.protobuf.StringValue payments_account_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A 12 digit ID used to identify the payments profile associated with the + // billing setup, e.g. "1234-5678-9012". It appears on the invoice PDF as + // "Billing ID". + google.protobuf.StringValue payments_profile_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The issue date in yyyy-mm-dd format. It appears on the invoice PDF as + // either "Issue date" or "Invoice date". + google.protobuf.StringValue issue_date = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The due date in yyyy-mm-dd format. + google.protobuf.StringValue due_date = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The service period date range of this invoice. The end date is inclusive. + google.ads.googleads.v2.common.DateRange service_date_range = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The currency code. All costs are returned in this currency. A subset of the + // currency codes derived from the ISO 4217 standard is supported. + google.protobuf.StringValue currency_code = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total amount of invoice level adjustments. These adjustments are made + // on the invoice, not on a specific account budget. + google.protobuf.Int64Value invoice_level_adjustments_micros = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The pretax subtotal amount, in micros. This equals the sum of the + // AccountBudgetSummary subtotal amounts, plus the invoice level adjustments. + google.protobuf.Int64Value subtotal_amount_micros = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The sum of all taxes on the invoice, in micros. This equals the sum of the + // AccountBudgetSummary tax amounts, plus taxes not associated with a specific + // account budget. + google.protobuf.Int64Value tax_amount_micros = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total amount, in micros. This equals the sum of the invoice subtotal + // amount and the invoice tax amount. + google.protobuf.Int64Value total_amount_micros = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the original invoice corrected, wrote off, or canceled + // by this invoice, if applicable. If `corrected_invoice` is set, + // `replaced_invoices` will not be set. + // + // Invoice resource names have the form: + // + // `customers/{customer_id}/invoices/{invoice_id}` + google.protobuf.StringValue corrected_invoice = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the original invoice(s) being rebilled or replaced by + // this invoice, if applicable. There might be multiple replaced invoices due + // to invoice consolidation. The replaced invoices may not belong to the same + // payments account. If `replaced_invoices` is set, `corrected_invoice` will + // not be set. + // Invoice resource names have the form: + // + // `customers/{customer_id}/invoices/{invoice_id}` + repeated google.protobuf.StringValue replaced_invoices = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The URL to a PDF copy of the invoice. Users need to pass in their OAuth + // token to request the PDF with this URL. + google.protobuf.StringValue pdf_url = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The list of summarized account budget information associated with this + // invoice. + repeated AccountBudgetSummary account_budget_summaries = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v2/resources/keyword_plan.proto b/google/ads/googleads/v2/resources/keyword_plan.proto index 653dde2cf..51da46e11 100644 --- a/google/ads/googleads/v2/resources/keyword_plan.proto +++ b/google/ads/googleads/v2/resources/keyword_plan.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/dates.proto"; import "google/ads/googleads/v2/enums/keyword_plan_forecast_interval.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -37,14 +38,24 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // Max number of saved keyword plans: 10000. // It's possible to remove plans if limit is reached. message KeywordPlan { - // The resource name of the Keyword Planner plan. + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlan" + pattern: "customers/{customer}/keywordPlans/{keyword_plan}" + }; + + // Immutable. The resource name of the Keyword Planner plan. // KeywordPlan resource names have the form: // // `customers/{customer_id}/keywordPlans/{kp_plan_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlan" + } + ]; - // The ID of the keyword plan. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the keyword plan. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the keyword plan. // diff --git a/google/ads/googleads/v2/resources/keyword_plan_ad_group.proto b/google/ads/googleads/v2/resources/keyword_plan_ad_group.proto index fe47479c4..abb48acc4 100644 --- a/google/ads/googleads/v2/resources/keyword_plan_ad_group.proto +++ b/google/ads/googleads/v2/resources/keyword_plan_ad_group.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -34,17 +35,29 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A Keyword Planner ad group. // Max number of keyword plan ad groups per plan: 200. message KeywordPlanAdGroup { - // The resource name of the Keyword Planner ad group. + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlanAdGroup" + pattern: "customers/{customer}/keywordPlanAdGroups/{keyword_plan_ad_group}" + }; + + // Immutable. The resource name of the Keyword Planner ad group. // KeywordPlanAdGroup resource names have the form: // // `customers/{customer_id}/keywordPlanAdGroups/{kp_ad_group_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanAdGroup" + } + ]; // The keyword plan campaign to which this ad group belongs. - google.protobuf.StringValue keyword_plan_campaign = 2; + google.protobuf.StringValue keyword_plan_campaign = 2 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + }]; - // The ID of the keyword plan ad group. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the keyword plan ad group. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the keyword plan ad group. // diff --git a/google/ads/googleads/v2/resources/keyword_plan_campaign.proto b/google/ads/googleads/v2/resources/keyword_plan_campaign.proto index 5bdb79465..47c0f4e57 100644 --- a/google/ads/googleads/v2/resources/keyword_plan_campaign.proto +++ b/google/ads/googleads/v2/resources/keyword_plan_campaign.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/keyword_plan_network.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,17 +36,29 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A Keyword Plan campaign. // Max number of keyword plan campaigns per plan allowed: 1. message KeywordPlanCampaign { - // The resource name of the Keyword Plan campaign. + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + pattern: "customers/{customer}/keywordPlanCampaigns/{keyword_plan_campaign}" + }; + + // Immutable. The resource name of the Keyword Plan campaign. // KeywordPlanCampaign resource names have the form: // // `customers/{customer_id}/keywordPlanCampaigns/{kp_campaign_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + } + ]; // The keyword plan this campaign belongs to. - google.protobuf.StringValue keyword_plan = 2; + google.protobuf.StringValue keyword_plan = 2 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlan" + }]; - // The ID of the Keyword Plan campaign. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the Keyword Plan campaign. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the Keyword Plan campaign. // @@ -55,7 +68,9 @@ message KeywordPlanCampaign { // The languages targeted for the Keyword Plan campaign. // Max allowed: 1. - repeated google.protobuf.StringValue language_constants = 5; + repeated google.protobuf.StringValue language_constants = 5 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/LanguageConstant" + }]; // Targeting network. // @@ -79,5 +94,7 @@ message KeywordPlanCampaign { // Next ID: 3 message KeywordPlanGeoTarget { // Required. The resource name of the geo target. - google.protobuf.StringValue geo_target_constant = 1; + google.protobuf.StringValue geo_target_constant = 1 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + }]; } diff --git a/google/ads/googleads/v2/resources/keyword_plan_keyword.proto b/google/ads/googleads/v2/resources/keyword_plan_keyword.proto index f4ecf0ee1..16a0858a6 100644 --- a/google/ads/googleads/v2/resources/keyword_plan_keyword.proto +++ b/google/ads/googleads/v2/resources/keyword_plan_keyword.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/keyword_match_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,17 +36,29 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A Keyword Plan ad group keyword. // Max number of keyword plan keywords per plan: 2500. message KeywordPlanKeyword { - // The resource name of the Keyword Plan ad group keyword. + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlanKeyword" + pattern: "customers/{customer}/keywordPlanKeywords/{keyword_plan_keyword}" + }; + + // Immutable. The resource name of the Keyword Plan ad group keyword. // KeywordPlanKeyword resource names have the form: // // `customers/{customer_id}/keywordPlanKeywords/{kp_ad_group_keyword_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanKeyword" + } + ]; // The Keyword Plan ad group to which this keyword belongs. - google.protobuf.StringValue keyword_plan_ad_group = 2; + google.protobuf.StringValue keyword_plan_ad_group = 2 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanAdGroup" + }]; - // The ID of the Keyword Plan keyword. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the Keyword Plan keyword. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The keyword text. google.protobuf.StringValue text = 4; diff --git a/google/ads/googleads/v2/resources/keyword_plan_negative_keyword.proto b/google/ads/googleads/v2/resources/keyword_plan_negative_keyword.proto index d45bb3bcc..be7955615 100644 --- a/google/ads/googleads/v2/resources/keyword_plan_negative_keyword.proto +++ b/google/ads/googleads/v2/resources/keyword_plan_negative_keyword.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/keyword_match_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,17 +36,29 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A Keyword Plan negative keyword. // Max number of keyword plan negative keywords per plan: 1000. message KeywordPlanNegativeKeyword { - // The resource name of the Keyword Plan negative keyword. + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlanNegativeKeyword" + pattern: "customers/{customer}/keywordPlanNegativeKeywords/{keyword_plan_negative_keyword}" + }; + + // Immutable. The resource name of the Keyword Plan negative keyword. // KeywordPlanNegativeKeyword resource names have the form: // // `customers/{customer_id}/keywordPlanNegativeKeywords/{kp_negative_keyword_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanNegativeKeyword" + } + ]; // The Keyword Plan campaign to which this negative keyword belongs. - google.protobuf.StringValue keyword_plan_campaign = 2; + google.protobuf.StringValue keyword_plan_campaign = 2 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + }]; - // The ID of the Keyword Plan negative keyword. - google.protobuf.Int64Value id = 3; + // Output only. The ID of the Keyword Plan negative keyword. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The keyword text. google.protobuf.StringValue text = 4; diff --git a/google/ads/googleads/v2/resources/keyword_view.proto b/google/ads/googleads/v2/resources/keyword_view.proto index 9e8c2843b..b8e44b9da 100644 --- a/google/ads/googleads/v2/resources/keyword_view.proto +++ b/google/ads/googleads/v2/resources/keyword_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A keyword view. message KeywordView { - // The resource name of the keyword view. + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordView" + pattern: "customers/{customer}/keywordViews/{keyword_view}" + }; + + // Output only. The resource name of the keyword view. // Keyword view resource names have the form: // // `customers/{customer_id}/keywordViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/label.proto b/google/ads/googleads/v2/resources/label.proto index c105e8631..b5782ac64 100644 --- a/google/ads/googleads/v2/resources/label.proto +++ b/google/ads/googleads/v2/resources/label.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/text_label.proto"; import "google/ads/googleads/v2/enums/label_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -33,13 +34,23 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A label. message Label { - // Name of the resource. + option (google.api.resource) = { + type: "googleads.googleapis.com/Label" + pattern: "customers/{customer}/labels/{label}" + }; + + // Immutable. Name of the resource. // Label resource names have the form: // `customers/{customer_id}/labels/{label_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; - // Id of the label. Read only. - google.protobuf.Int64Value id = 2; + // Output only. Id of the label. Read only. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the label. // @@ -48,8 +59,8 @@ message Label { // The length of this string should be between 1 and 80, inclusive. google.protobuf.StringValue name = 3; - // Status of the label. Read only. - google.ads.googleads.v2.enums.LabelStatusEnum.LabelStatus status = 4; + // Output only. Status of the label. Read only. + google.ads.googleads.v2.enums.LabelStatusEnum.LabelStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // A type of label displaying text on a colored background. google.ads.googleads.v2.common.TextLabel text_label = 5; diff --git a/google/ads/googleads/v2/resources/landing_page_view.proto b/google/ads/googleads/v2/resources/landing_page_view.proto index 702997e57..59117a823 100644 --- a/google/ads/googleads/v2/resources/landing_page_view.proto +++ b/google/ads/googleads/v2/resources/landing_page_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -34,12 +35,22 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A landing page view with metrics aggregated at the unexpanded final URL // level. message LandingPageView { - // The resource name of the landing page view. + option (google.api.resource) = { + type: "googleads.googleapis.com/LandingPageView" + pattern: "customers/{customer}/landingPageViews/{landing_page_view}" + }; + + // Output only. The resource name of the landing page view. // Landing page view resource names have the form: // // `customers/{customer_id}/landingPageViews/{unexpanded_final_url_fingerprint}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LandingPageView" + } + ]; - // The advertiser-specified final URL. - google.protobuf.StringValue unexpanded_final_url = 2; + // Output only. The advertiser-specified final URL. + google.protobuf.StringValue unexpanded_final_url = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/language_constant.proto b/google/ads/googleads/v2/resources/language_constant.proto index 6b5f92a1c..6444fa45c 100644 --- a/google/ads/googleads/v2/resources/language_constant.proto +++ b/google/ads/googleads/v2/resources/language_constant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -33,22 +34,32 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A language. message LanguageConstant { - // The resource name of the language constant. + option (google.api.resource) = { + type: "googleads.googleapis.com/LanguageConstant" + pattern: "languageConstants/{language_constant}" + }; + + // Output only. The resource name of the language constant. // Language constant resource names have the form: // // `languageConstants/{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LanguageConstant" + } + ]; - // The ID of the language constant. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the language constant. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The language code, e.g. "en_US", "en_AU", "es", "fr", etc. - google.protobuf.StringValue code = 3; + // Output only. The language code, e.g. "en_US", "en_AU", "es", "fr", etc. + google.protobuf.StringValue code = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The full name of the language in English, e.g., "English (US)", "Spanish", + // Output only. The full name of the language in English, e.g., "English (US)", "Spanish", // etc. - google.protobuf.StringValue name = 4; + google.protobuf.StringValue name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the language is targetable. - google.protobuf.BoolValue targetable = 5; + // Output only. Whether the language is targetable. + google.protobuf.BoolValue targetable = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/location_view.proto b/google/ads/googleads/v2/resources/location_view.proto index 56bf76fa7..65c8e1126 100644 --- a/google/ads/googleads/v2/resources/location_view.proto +++ b/google/ads/googleads/v2/resources/location_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -33,9 +34,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A location view summarizes the performance of campaigns by // Location criteria. message LocationView { - // The resource name of the location view. + option (google.api.resource) = { + type: "googleads.googleapis.com/LocationView" + pattern: "customers/{customer}/locationViews/{location_view}" + }; + + // Output only. The resource name of the location view. // Location view resource names have the form: // // `customers/{customer_id}/locationViews/{campaign_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LocationView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/managed_placement_view.proto b/google/ads/googleads/v2/resources/managed_placement_view.proto index b28b8326c..d3e4bda08 100644 --- a/google/ads/googleads/v2/resources/managed_placement_view.proto +++ b/google/ads/googleads/v2/resources/managed_placement_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A managed placement view. message ManagedPlacementView { - // The resource name of the Managed Placement view. + option (google.api.resource) = { + type: "googleads.googleapis.com/ManagedPlacementView" + pattern: "customers/{customer}/managedPlacementViews/{managed_placement_view}" + }; + + // Output only. The resource name of the Managed Placement view. // Managed placement view resource names have the form: // // `customers/{customer_id}/managedPlacementViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ManagedPlacementView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/media_file.proto b/google/ads/googleads/v2/resources/media_file.proto index 476923b5c..215cdce0c 100644 --- a/google/ads/googleads/v2/resources/media_file.proto +++ b/google/ads/googleads/v2/resources/media_file.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/media_type.proto"; import "google/ads/googleads/v2/enums/mime_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,80 +36,90 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A media file. message MediaFile { - // The resource name of the media file. + option (google.api.resource) = { + type: "googleads.googleapis.com/MediaFile" + pattern: "customers/{customer}/mediaFiles/{media_file}" + }; + + // Immutable. The resource name of the media file. // Media file resource names have the form: // // `customers/{customer_id}/mediaFiles/{media_file_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MediaFile" + } + ]; - // The ID of the media file. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the media file. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Type of the media file. - google.ads.googleads.v2.enums.MediaTypeEnum.MediaType type = 5; + // Immutable. Type of the media file. + google.ads.googleads.v2.enums.MediaTypeEnum.MediaType type = 5 [(google.api.field_behavior) = IMMUTABLE]; - // The mime type of the media file. - google.ads.googleads.v2.enums.MimeTypeEnum.MimeType mime_type = 6; + // Output only. The mime type of the media file. + google.ads.googleads.v2.enums.MimeTypeEnum.MimeType mime_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The URL of where the original media file was downloaded from (or a file + // Immutable. The URL of where the original media file was downloaded from (or a file // name). Only used for media of type AUDIO and IMAGE. - google.protobuf.StringValue source_url = 7; + google.protobuf.StringValue source_url = 7 [(google.api.field_behavior) = IMMUTABLE]; - // The name of the media file. The name can be used by clients to help + // Immutable. The name of the media file. The name can be used by clients to help // identify previously uploaded media. - google.protobuf.StringValue name = 8; + google.protobuf.StringValue name = 8 [(google.api.field_behavior) = IMMUTABLE]; - // The size of the media file in bytes. - google.protobuf.Int64Value file_size = 9; + // Output only. The size of the media file in bytes. + google.protobuf.Int64Value file_size = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // The specific type of the media file. oneof mediatype { - // Encapsulates an Image. - MediaImage image = 3; + // Immutable. Encapsulates an Image. + MediaImage image = 3 [(google.api.field_behavior) = IMMUTABLE]; - // A ZIP archive media the content of which contains HTML5 assets. - MediaBundle media_bundle = 4; + // Immutable. A ZIP archive media the content of which contains HTML5 assets. + MediaBundle media_bundle = 4 [(google.api.field_behavior) = IMMUTABLE]; - // Encapsulates an Audio. - MediaAudio audio = 10; + // Output only. Encapsulates an Audio. + MediaAudio audio = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Encapsulates a Video. - MediaVideo video = 11; + // Immutable. Encapsulates a Video. + MediaVideo video = 11 [(google.api.field_behavior) = IMMUTABLE]; } } // Encapsulates an Image. message MediaImage { - // Raw image data. - google.protobuf.BytesValue data = 1; + // Immutable. Raw image data. + google.protobuf.BytesValue data = 1 [(google.api.field_behavior) = IMMUTABLE]; } // Represents a ZIP archive media the content of which contains HTML5 assets. message MediaBundle { - // Raw zipped data. - google.protobuf.BytesValue data = 1; + // Immutable. Raw zipped data. + google.protobuf.BytesValue data = 1 [(google.api.field_behavior) = IMMUTABLE]; } // Encapsulates an Audio. message MediaAudio { - // The duration of the Audio in milliseconds. - google.protobuf.Int64Value ad_duration_millis = 1; + // Output only. The duration of the Audio in milliseconds. + google.protobuf.Int64Value ad_duration_millis = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Encapsulates a Video. message MediaVideo { - // The duration of the Video in milliseconds. - google.protobuf.Int64Value ad_duration_millis = 1; + // Output only. The duration of the Video in milliseconds. + google.protobuf.Int64Value ad_duration_millis = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The YouTube video ID (as seen in YouTube URLs). - google.protobuf.StringValue youtube_video_id = 2; + // Immutable. The YouTube video ID (as seen in YouTube URLs). + google.protobuf.StringValue youtube_video_id = 2 [(google.api.field_behavior) = IMMUTABLE]; - // The Advertising Digital Identification code for this video, as defined by + // Output only. The Advertising Digital Identification code for this video, as defined by // the American Association of Advertising Agencies, used mainly for // television commercials. - google.protobuf.StringValue advertising_id_code = 3; + google.protobuf.StringValue advertising_id_code = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The Industry Standard Commercial Identifier code for this video, used + // Output only. The Industry Standard Commercial Identifier code for this video, used // mainly for television commercials. - google.protobuf.StringValue isci_code = 4; + google.protobuf.StringValue isci_code = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/merchant_center_link.proto b/google/ads/googleads/v2/resources/merchant_center_link.proto index f94b6196c..49f61d3ea 100644 --- a/google/ads/googleads/v2/resources/merchant_center_link.proto +++ b/google/ads/googleads/v2/resources/merchant_center_link.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/merchant_center_link_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,19 +36,29 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A data sharing connection, proposed or in use, // between a Google Ads Customer and a Merchant Center account. message MerchantCenterLink { - // The resource name of the merchant center link. + option (google.api.resource) = { + type: "googleads.googleapis.com/MerchantCenterLink" + pattern: "customers/{customer}/merchantCenterLinks/{merchant_center_link}" + }; + + // Immutable. The resource name of the merchant center link. // Merchant center link resource names have the form: // // `customers/{customer_id}/merchantCenterLinks/{merchant_center_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MerchantCenterLink" + } + ]; - // The ID of the Merchant Center account. + // Output only. The ID of the Merchant Center account. // This field is readonly. - google.protobuf.Int64Value id = 3; + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name of the Merchant Center account. + // Output only. The name of the Merchant Center account. // This field is readonly. - google.protobuf.StringValue merchant_center_account_name = 4; + google.protobuf.StringValue merchant_center_account_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // The status of the link. google.ads.googleads.v2.enums.MerchantCenterLinkStatusEnum.MerchantCenterLinkStatus status = 5; diff --git a/google/ads/googleads/v2/resources/mobile_app_category_constant.proto b/google/ads/googleads/v2/resources/mobile_app_category_constant.proto index b33e32a9d..c9f15eb8b 100644 --- a/google/ads/googleads/v2/resources/mobile_app_category_constant.proto +++ b/google/ads/googleads/v2/resources/mobile_app_category_constant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -33,15 +34,25 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A mobile application category constant. message MobileAppCategoryConstant { - // The resource name of the mobile app category constant. + option (google.api.resource) = { + type: "googleads.googleapis.com/MobileAppCategoryConstant" + pattern: "mobileAppCategoryConstants/{mobile_app_category_constant}" + }; + + // Output only. The resource name of the mobile app category constant. // Mobile app category constant resource names have the form: // // `mobileAppCategoryConstants/{mobile_app_category_id}` - string resource_name = 1; - - // The ID of the mobile app category constant. - google.protobuf.Int32Value id = 2; - - // Mobile app category name. - google.protobuf.StringValue name = 3; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MobileAppCategoryConstant" + } + ]; + + // Output only. The ID of the mobile app category constant. + google.protobuf.Int32Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Mobile app category name. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/mobile_device_constant.proto b/google/ads/googleads/v2/resources/mobile_device_constant.proto index 5050f4d78..4c83d2341 100644 --- a/google/ads/googleads/v2/resources/mobile_device_constant.proto +++ b/google/ads/googleads/v2/resources/mobile_device_constant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/mobile_device_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -34,24 +35,34 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A mobile device constant. message MobileDeviceConstant { - // The resource name of the mobile device constant. + option (google.api.resource) = { + type: "googleads.googleapis.com/MobileDeviceConstant" + pattern: "mobileDeviceConstants/{mobile_device_constant}" + }; + + // Output only. The resource name of the mobile device constant. // Mobile device constant resource names have the form: // // `mobileDeviceConstants/{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MobileDeviceConstant" + } + ]; - // The ID of the mobile device constant. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the mobile device constant. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name of the mobile device. - google.protobuf.StringValue name = 3; + // Output only. The name of the mobile device. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The manufacturer of the mobile device. - google.protobuf.StringValue manufacturer_name = 4; + // Output only. The manufacturer of the mobile device. + google.protobuf.StringValue manufacturer_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The operating system of the mobile device. - google.protobuf.StringValue operating_system_name = 5; + // Output only. The operating system of the mobile device. + google.protobuf.StringValue operating_system_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The type of mobile device. - google.ads.googleads.v2.enums.MobileDeviceTypeEnum.MobileDeviceType type = 6; + // Output only. The type of mobile device. + google.ads.googleads.v2.enums.MobileDeviceTypeEnum.MobileDeviceType type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/mutate_job.proto b/google/ads/googleads/v2/resources/mutate_job.proto index abb48467a..7546dd618 100644 --- a/google/ads/googleads/v2/resources/mutate_job.proto +++ b/google/ads/googleads/v2/resources/mutate_job.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/mutate_job_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -33,52 +34,62 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // Proto file describing the mutate job resource. // A list of mutates being processed asynchronously. The mutates are uploaded -// by the user. The mutates themselves aren’t readable and the results of the +// by the user. The mutates themselves aren't readable and the results of the // job can only be read using MutateJobService.ListMutateJobResults. message MutateJob { + option (google.api.resource) = { + type: "googleads.googleapis.com/MutateJob" + pattern: "customers/{customer}/mutateJobs/{mutate_job}" + }; + // Additional information about the mutate job. This message is also used as // metadata returned in mutate job Long Running Operations. message MutateJobMetadata { - // The time when this mutate job was created. + // Output only. The time when this mutate job was created. // Formatted as yyyy-mm-dd hh:mm:ss. Example: "2018-03-05 09:15:00" - google.protobuf.StringValue creation_date_time = 1; + google.protobuf.StringValue creation_date_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The time when this mutate job was completed. + // Output only. The time when this mutate job was completed. // Formatted as yyyy-MM-dd HH:mm:ss. Example: "2018-03-05 09:16:00" - google.protobuf.StringValue completion_date_time = 2; + google.protobuf.StringValue completion_date_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The fraction (between 0.0 and 1.0) of mutates that have been processed. + // Output only. The fraction (between 0.0 and 1.0) of mutates that have been processed. // This is empty if the job hasn't started running yet. - google.protobuf.DoubleValue estimated_completion_ratio = 3; + google.protobuf.DoubleValue estimated_completion_ratio = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number of mutate operations in the mutate job. - google.protobuf.Int64Value operation_count = 4; + // Output only. The number of mutate operations in the mutate job. + google.protobuf.Int64Value operation_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number of mutate operations executed by the mutate job. + // Output only. The number of mutate operations executed by the mutate job. // Present only if the job has started running. - google.protobuf.Int64Value executed_operation_count = 5; + google.protobuf.Int64Value executed_operation_count = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // The resource name of the mutate job. + // Immutable. The resource name of the mutate job. // Mutate job resource names have the form: // // `customers/{customer_id}/mutateJobs/{mutate_job_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; - // ID of this mutate job. - google.protobuf.Int64Value id = 2; + // Output only. ID of this mutate job. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The next sequence token to use when adding operations. Only set when the + // Output only. The next sequence token to use when adding operations. Only set when the // mutate job status is PENDING. - google.protobuf.StringValue next_add_sequence_token = 3; + google.protobuf.StringValue next_add_sequence_token = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Contains additional information about this mutate job. - MutateJobMetadata metadata = 4; + // Output only. Contains additional information about this mutate job. + MutateJobMetadata metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Status of this mutate job. - google.ads.googleads.v2.enums.MutateJobStatusEnum.MutateJobStatus status = 5; + // Output only. Status of this mutate job. + google.ads.googleads.v2.enums.MutateJobStatusEnum.MutateJobStatus status = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource name of the long-running operation that can be used to poll + // Output only. The resource name of the long-running operation that can be used to poll // for completion. Only set when the mutate job status is RUNNING or DONE. - google.protobuf.StringValue long_running_operation = 6; + google.protobuf.StringValue long_running_operation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/operating_system_version_constant.proto b/google/ads/googleads/v2/resources/operating_system_version_constant.proto index ef484b58a..1c8e49483 100644 --- a/google/ads/googleads/v2/resources/operating_system_version_constant.proto +++ b/google/ads/googleads/v2/resources/operating_system_version_constant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/operating_system_version_operator_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -36,25 +37,35 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // `operator_type`. List of available mobile platforms at // https://developers.google.com/adwords/api/docs/appendix/codes-formats#mobile-platforms message OperatingSystemVersionConstant { - // The resource name of the operating system version constant. + option (google.api.resource) = { + type: "googleads.googleapis.com/OperatingSystemVersionConstant" + pattern: "operatingSystemVersionConstants/{operating_system_version_constant}" + }; + + // Output only. The resource name of the operating system version constant. // Operating system version constant resource names have the form: // // `operatingSystemVersionConstants/{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/OperatingSystemVersionConstant" + } + ]; - // The ID of the operating system version. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the operating system version. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Name of the operating system. - google.protobuf.StringValue name = 3; + // Output only. Name of the operating system. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The OS Major Version number. - google.protobuf.Int32Value os_major_version = 4; + // Output only. The OS Major Version number. + google.protobuf.Int32Value os_major_version = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The OS Minor Version number. - google.protobuf.Int32Value os_minor_version = 5; + // Output only. The OS Minor Version number. + google.protobuf.Int32Value os_minor_version = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Determines whether this constant represents a single version or a range of + // Output only. Determines whether this constant represents a single version or a range of // versions. - google.ads.googleads.v2.enums.OperatingSystemVersionOperatorTypeEnum.OperatingSystemVersionOperatorType operator_type = 6; + google.ads.googleads.v2.enums.OperatingSystemVersionOperatorTypeEnum.OperatingSystemVersionOperatorType operator_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/paid_organic_search_term_view.proto b/google/ads/googleads/v2/resources/paid_organic_search_term_view.proto index 4569dc206..2b24d6d1e 100644 --- a/google/ads/googleads/v2/resources/paid_organic_search_term_view.proto +++ b/google/ads/googleads/v2/resources/paid_organic_search_term_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -34,13 +35,23 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A paid organic search term view providing a view of search stats across // ads and organic listings aggregated by search term at the ad group level. message PaidOrganicSearchTermView { - // The resource name of the search term view. + option (google.api.resource) = { + type: "googleads.googleapis.com/PaidOrganicSearchTermView" + pattern: "customers/{customer}/paidOrganicSearchTermViews/{paid_organic_search_term_view}" + }; + + // Output only. The resource name of the search term view. // Search term view resource names have the form: // // `customers/{customer_id}/paidOrganicSearchTermViews/{campaign_id}~ // {ad_group_id}~{URL-base64 search term}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/PaidOrganicSearchTermView" + } + ]; - // The search term. - google.protobuf.StringValue search_term = 2; + // Output only. The search term. + google.protobuf.StringValue search_term = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/parental_status_view.proto b/google/ads/googleads/v2/resources/parental_status_view.proto index a189d18a9..7f4d36bc2 100644 --- a/google/ads/googleads/v2/resources/parental_status_view.proto +++ b/google/ads/googleads/v2/resources/parental_status_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A parental status view. message ParentalStatusView { - // The resource name of the parental status view. + option (google.api.resource) = { + type: "googleads.googleapis.com/ParentalStatusView" + pattern: "customers/{customer}/parentalStatusViews/{parental_status_view}" + }; + + // Output only. The resource name of the parental status view. // Parental Status view resource names have the form: // // `customers/{customer_id}/parentalStatusViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ParentalStatusView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/payments_account.proto b/google/ads/googleads/v2/resources/payments_account.proto index ecabea6ef..96e7c1396 100644 --- a/google/ads/googleads/v2/resources/payments_account.proto +++ b/google/ads/googleads/v2/resources/payments_account.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -31,30 +32,40 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // Proto file describing the PaymentsAccount resource. -// A Payments account, which can be used to set up billing for an Ads customer. +// A payments account, which can be used to set up billing for an Ads customer. message PaymentsAccount { - // The resource name of the Payments account. + option (google.api.resource) = { + type: "googleads.googleapis.com/PaymentsAccount" + pattern: "customers/{customer}/paymentsAccounts/{payments_account}" + }; + + // Output only. The resource name of the payments account. // PaymentsAccount resource names have the form: // // `customers/{customer_id}/paymentsAccounts/{payments_account_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/PaymentsAccount" + } + ]; - // A 16 digit ID used to identify a Payments account. - google.protobuf.StringValue payments_account_id = 2; + // Output only. A 16 digit ID used to identify a payments account. + google.protobuf.StringValue payments_account_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name of the Payments account. - google.protobuf.StringValue name = 3; + // Output only. The name of the payments account. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The currency code of the Payments account. + // Output only. The currency code of the payments account. // A subset of the currency codes derived from the ISO 4217 standard is // supported. - google.protobuf.StringValue currency_code = 4; + google.protobuf.StringValue currency_code = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A 12 digit ID used to identify the Payments profile associated with the - // Payments account. - google.protobuf.StringValue payments_profile_id = 5; + // Output only. A 12 digit ID used to identify the payments profile associated with the + // payments account. + google.protobuf.StringValue payments_profile_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A secondary Payments profile ID present in uncommon situations, e.g. + // Output only. A secondary payments profile ID present in uncommon situations, e.g. // when a sequential liability agreement has been arranged. - google.protobuf.StringValue secondary_payments_profile_id = 6; + google.protobuf.StringValue secondary_payments_profile_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/product_bidding_category_constant.proto b/google/ads/googleads/v2/resources/product_bidding_category_constant.proto index 3cdc323a5..06a261897 100644 --- a/google/ads/googleads/v2/resources/product_bidding_category_constant.proto +++ b/google/ads/googleads/v2/resources/product_bidding_category_constant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/product_bidding_category_level.proto"; import "google/ads/googleads/v2/enums/product_bidding_category_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,34 +36,49 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A Product Bidding Category. message ProductBiddingCategoryConstant { - // The resource name of the product bidding category. + option (google.api.resource) = { + type: "googleads.googleapis.com/ProductBiddingCategoryConstant" + pattern: "productBiddingCategoryConstants/{product_bidding_category_constant}" + }; + + // Output only. The resource name of the product bidding category. // Product bidding category resource names have the form: // // `productBiddingCategoryConstants/{country_code}~{level}~{id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ProductBiddingCategoryConstant" + } + ]; - // ID of the product bidding category. + // Output only. ID of the product bidding category. // // This ID is equivalent to the google_product_category ID as described in // this article: https://support.google.com/merchants/answer/6324436. - google.protobuf.Int64Value id = 2; + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Two-letter upper-case country code of the product bidding category. - google.protobuf.StringValue country_code = 3; + // Output only. Two-letter upper-case country code of the product bidding category. + google.protobuf.StringValue country_code = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Resource name of the parent product bidding category. - google.protobuf.StringValue product_bidding_category_constant_parent = 4; + // Output only. Resource name of the parent product bidding category. + google.protobuf.StringValue product_bidding_category_constant_parent = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ProductBiddingCategoryConstant" + } + ]; - // Level of the product bidding category. - google.ads.googleads.v2.enums.ProductBiddingCategoryLevelEnum.ProductBiddingCategoryLevel level = 5; + // Output only. Level of the product bidding category. + google.ads.googleads.v2.enums.ProductBiddingCategoryLevelEnum.ProductBiddingCategoryLevel level = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Status of the product bidding category. - google.ads.googleads.v2.enums.ProductBiddingCategoryStatusEnum.ProductBiddingCategoryStatus status = 6; + // Output only. Status of the product bidding category. + google.ads.googleads.v2.enums.ProductBiddingCategoryStatusEnum.ProductBiddingCategoryStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Language code of the product bidding category. - google.protobuf.StringValue language_code = 7; + // Output only. Language code of the product bidding category. + google.protobuf.StringValue language_code = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Display value of the product bidding category localized according to + // Output only. Display value of the product bidding category localized according to // language_code. - google.protobuf.StringValue localized_name = 8; + google.protobuf.StringValue localized_name = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/product_group_view.proto b/google/ads/googleads/v2/resources/product_group_view.proto index d9965d327..9d02f20ab 100644 --- a/google/ads/googleads/v2/resources/product_group_view.proto +++ b/google/ads/googleads/v2/resources/product_group_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A product group view. message ProductGroupView { - // The resource name of the product group view. + option (google.api.resource) = { + type: "googleads.googleapis.com/ProductGroupView" + pattern: "customers/{customer}/productGroupViews/{product_group_view}" + }; + + // Output only. The resource name of the product group view. // Product group view resource names have the form: // // `customers/{customer_id}/productGroupViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ProductGroupView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/recommendation.proto b/google/ads/googleads/v2/resources/recommendation.proto index 55f7b56b3..bebd708b1 100644 --- a/google/ads/googleads/v2/resources/recommendation.proto +++ b/google/ads/googleads/v2/resources/recommendation.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -23,6 +22,8 @@ import "google/ads/googleads/v2/enums/keyword_match_type.proto"; import "google/ads/googleads/v2/enums/recommendation_type.proto"; import "google/ads/googleads/v2/enums/target_cpa_opt_in_recommendation_goal.proto"; import "google/ads/googleads/v2/resources/ad.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -39,128 +40,155 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A recommendation. message Recommendation { + option (google.api.resource) = { + type: "googleads.googleapis.com/Recommendation" + pattern: "customers/{customer}/recommendations/{recommendation}" + }; + // The impact of making the change as described in the recommendation. // Some types of recommendations may not have impact information. message RecommendationImpact { - // Base metrics at the time the recommendation was generated. - RecommendationMetrics base_metrics = 1; + // Output only. Base metrics at the time the recommendation was generated. + RecommendationMetrics base_metrics = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Estimated metrics if the recommendation is applied. - RecommendationMetrics potential_metrics = 2; + // Output only. Estimated metrics if the recommendation is applied. + RecommendationMetrics potential_metrics = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Weekly account performance metrics. For some recommendation types, these // are averaged over the past 90-day period and hence can be fractional. message RecommendationMetrics { - // Number of ad impressions. - google.protobuf.DoubleValue impressions = 1; + // Output only. Number of ad impressions. + google.protobuf.DoubleValue impressions = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Number of ad clicks. - google.protobuf.DoubleValue clicks = 2; + // Output only. Number of ad clicks. + google.protobuf.DoubleValue clicks = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Cost (in micros) for advertising, in the local currency for the account. - google.protobuf.Int64Value cost_micros = 3; + // Output only. Cost (in micros) for advertising, in the local currency for the account. + google.protobuf.Int64Value cost_micros = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Number of conversions. - google.protobuf.DoubleValue conversions = 4; + // Output only. Number of conversions. + google.protobuf.DoubleValue conversions = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Number of video views for a video ad campaign. - google.protobuf.DoubleValue video_views = 5; + // Output only. Number of video views for a video ad campaign. + google.protobuf.DoubleValue video_views = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The budget recommendation for budget constrained campaigns. message CampaignBudgetRecommendation { // The impact estimates for a given budget amount. message CampaignBudgetRecommendationOption { - // The budget amount for this option. - google.protobuf.Int64Value budget_amount_micros = 1; + // Output only. The budget amount for this option. + google.protobuf.Int64Value budget_amount_micros = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The impact estimate if budget is changed to amount specified in this + // Output only. The impact estimate if budget is changed to amount specified in this // option. - RecommendationImpact impact = 2; + RecommendationImpact impact = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // The current budget amount in micros. - google.protobuf.Int64Value current_budget_amount_micros = 1; + // Output only. The current budget amount in micros. + google.protobuf.Int64Value current_budget_amount_micros = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The recommended budget amount in micros. - google.protobuf.Int64Value recommended_budget_amount_micros = 2; + // Output only. The recommended budget amount in micros. + google.protobuf.Int64Value recommended_budget_amount_micros = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The budget amounts and associated impact estimates for some values of + // Output only. The budget amounts and associated impact estimates for some values of // possible budget amounts. - repeated CampaignBudgetRecommendationOption budget_options = 3; + repeated CampaignBudgetRecommendationOption budget_options = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The keyword recommendation. message KeywordRecommendation { - // The recommended keyword. - google.ads.googleads.v2.common.KeywordInfo keyword = 1; - - // The recommended CPC (cost-per-click) bid. - google.protobuf.Int64Value recommended_cpc_bid_micros = 2; - } - - // The Optimize Ad Rotation recommendation. - message OptimizeAdRotationRecommendation { + // Output only. The recommended keyword. + google.ads.googleads.v2.common.KeywordInfo keyword = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The recommended CPC (cost-per-click) bid. + google.protobuf.Int64Value recommended_cpc_bid_micros = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The move unused budget recommendation. message MoveUnusedBudgetRecommendation { - // The excess budget's resource_name. - google.protobuf.StringValue excess_campaign_budget = 1; + // Output only. The excess budget's resource_name. + google.protobuf.StringValue excess_campaign_budget = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The recommendation for the constrained budget to increase. - CampaignBudgetRecommendation budget_recommendation = 2; + // Output only. The recommendation for the constrained budget to increase. + CampaignBudgetRecommendation budget_recommendation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The text ad recommendation. message TextAdRecommendation { - // Recommended ad. - Ad ad = 1; + // Output only. Recommended ad. + Ad ad = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Creation date of the recommended ad. + // Output only. Creation date of the recommended ad. // YYYY-MM-DD format, e.g., 2018-04-17. - google.protobuf.StringValue creation_date = 2; + google.protobuf.StringValue creation_date = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Date, if present, is the earliest when the recommendation will be auto + // Output only. Date, if present, is the earliest when the recommendation will be auto // applied. // YYYY-MM-DD format, e.g., 2018-04-17. - google.protobuf.StringValue auto_apply_date = 3; + google.protobuf.StringValue auto_apply_date = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The Search Partners Opt-In recommendation. + message SearchPartnersOptInRecommendation { + + } + + // The Maximize Clicks opt-in recommendation. + message MaximizeClicksOptInRecommendation { + // Output only. The recommended new budget amount. + // Only set if the current budget is too high. + google.protobuf.Int64Value recommended_budget_amount_micros = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The Call extension recommendation. + message CallExtensionRecommendation { + // Output only. Call extensions recommended to be added. + repeated google.ads.googleads.v2.common.CallFeedItem recommended_extensions = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The Target CPA opt-in recommendation. message TargetCpaOptInRecommendation { // The Target CPA opt-in option with impact estimate. message TargetCpaOptInRecommendationOption { - // The goal achieved by this option. - google.ads.googleads.v2.enums.TargetCpaOptInRecommendationGoalEnum.TargetCpaOptInRecommendationGoal goal = 1; + // Output only. The goal achieved by this option. + google.ads.googleads.v2.enums.TargetCpaOptInRecommendationGoalEnum.TargetCpaOptInRecommendationGoal goal = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Average CPA target. - google.protobuf.Int64Value target_cpa_micros = 2; + // Output only. Average CPA target. + google.protobuf.Int64Value target_cpa_micros = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The minimum campaign budget, in local currency for the account, + // Output only. The minimum campaign budget, in local currency for the account, // required to achieve the target CPA. // Amount is specified in micros, where one million is equivalent to one // currency unit. - google.protobuf.Int64Value required_campaign_budget_amount_micros = 3; + google.protobuf.Int64Value required_campaign_budget_amount_micros = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The impact estimate if this option is selected. - RecommendationImpact impact = 4; + // Output only. The impact estimate if this option is selected. + RecommendationImpact impact = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // The available goals and corresponding options for Target CPA strategy. - repeated TargetCpaOptInRecommendationOption options = 1; + // Output only. The available goals and corresponding options for Target CPA strategy. + repeated TargetCpaOptInRecommendationOption options = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The recommended average CPA target. See required budget amount and impact + // Output only. The recommended average CPA target. See required budget amount and impact // of using this recommendation in options list. - google.protobuf.Int64Value recommended_target_cpa_micros = 2; + google.protobuf.Int64Value recommended_target_cpa_micros = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The keyword match type recommendation. + message KeywordMatchTypeRecommendation { + // Output only. The existing keyword where the match type should be more broad. + google.ads.googleads.v2.common.KeywordInfo keyword = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The recommended new match type. + google.ads.googleads.v2.enums.KeywordMatchTypeEnum.KeywordMatchType recommended_match_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The Maximize Conversions Opt-In recommendation. message MaximizeConversionsOptInRecommendation { - // The recommended new budget amount. - google.protobuf.Int64Value recommended_budget_amount_micros = 1; + // Output only. The recommended new budget amount. + google.protobuf.Int64Value recommended_budget_amount_micros = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The Enhanced Cost-Per-Click Opt-In recommendation. @@ -168,65 +196,53 @@ message Recommendation { } - // The Callout extension recommendation. - message CalloutExtensionRecommendation { - // Callout extensions recommended to be added. - repeated google.ads.googleads.v2.common.CalloutFeedItem recommended_extensions = 1; - } - - // The keyword match type recommendation. - message KeywordMatchTypeRecommendation { - // The existing keyword where the match type should be more broad. - google.ads.googleads.v2.common.KeywordInfo keyword = 1; - - // The recommended new match type. - google.ads.googleads.v2.enums.KeywordMatchTypeEnum.KeywordMatchType recommended_match_type = 2; - } - - // The Search Partners Opt-In recommendation. - message SearchPartnersOptInRecommendation { + // The Optimize Ad Rotation recommendation. + message OptimizeAdRotationRecommendation { } - // The Maximize Clicks opt-in recommendation. - message MaximizeClicksOptInRecommendation { - // The recommended new budget amount. - // Only set if the current budget is too high. - google.protobuf.Int64Value recommended_budget_amount_micros = 1; + // The Callout extension recommendation. + message CalloutExtensionRecommendation { + // Output only. Callout extensions recommended to be added. + repeated google.ads.googleads.v2.common.CalloutFeedItem recommended_extensions = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The Sitelink extension recommendation. message SitelinkExtensionRecommendation { - // Sitelink extensions recommended to be added. - repeated google.ads.googleads.v2.common.SitelinkFeedItem recommended_extensions = 1; + // Output only. Sitelink extensions recommended to be added. + repeated google.ads.googleads.v2.common.SitelinkFeedItem recommended_extensions = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // The Call extension recommendation. - message CallExtensionRecommendation { - // Call extensions recommended to be added. - repeated google.ads.googleads.v2.common.CallFeedItem recommended_extensions = 1; - } - - // The resource name of the recommendation. + // Immutable. The resource name of the recommendation. // // `customers/{customer_id}/recommendations/{recommendation_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Recommendation" + } + ]; - // The type of recommendation. - google.ads.googleads.v2.enums.RecommendationTypeEnum.RecommendationType type = 2; + // Output only. The type of recommendation. + google.ads.googleads.v2.enums.RecommendationTypeEnum.RecommendationType type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The impact on account performance as a result of applying the + // Output only. The impact on account performance as a result of applying the // recommendation. - RecommendationImpact impact = 3; + RecommendationImpact impact = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The budget targeted by this recommendation. This will be set only when + // Output only. The budget targeted by this recommendation. This will be set only when // the recommendation affects a single campaign budget. // // This field will be set for the following recommendation types: // CAMPAIGN_BUDGET, MOVE_UNUSED_BUDGET - google.protobuf.StringValue campaign_budget = 5; + google.protobuf.StringValue campaign_budget = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBudget" + } + ]; - // The campaign targeted by this recommendation. This will be set only when + // Output only. The campaign targeted by this recommendation. This will be set only when // the recommendation affects a single campaign. // // This field will be set for the following recommendation types: @@ -234,60 +250,70 @@ message Recommendation { // KEYWORD_MATCH_TYPE, MAXIMIZE_CLICKS_OPT_IN, MAXIMIZE_CONVERSIONS_OPT_IN, // OPTIMIZE_AD_ROTATION, SEARCH_PARTNERS_OPT_IN, SITELINK_EXTENSION, // TARGET_CPA_OPT_IN, TEXT_AD - google.protobuf.StringValue campaign = 6; + google.protobuf.StringValue campaign = 6 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; - // The ad group targeted by this recommendation. This will be set only when + // Output only. The ad group targeted by this recommendation. This will be set only when // the recommendation affects a single ad group. // // This field will be set for the following recommendation types: // KEYWORD, OPTIMIZE_AD_ROTATION, TEXT_AD - google.protobuf.StringValue ad_group = 7; + google.protobuf.StringValue ad_group = 7 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; - // Whether the recommendation is dismissed or not. - google.protobuf.BoolValue dismissed = 13; + // Output only. Whether the recommendation is dismissed or not. + google.protobuf.BoolValue dismissed = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // The details of recommendation. oneof recommendation { - // The campaign budget recommendation. - CampaignBudgetRecommendation campaign_budget_recommendation = 4; + // Output only. The campaign budget recommendation. + CampaignBudgetRecommendation campaign_budget_recommendation = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The keyword recommendation. - KeywordRecommendation keyword_recommendation = 8; + // Output only. The keyword recommendation. + KeywordRecommendation keyword_recommendation = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Add expanded text ad recommendation. - TextAdRecommendation text_ad_recommendation = 9; + // Output only. Add expanded text ad recommendation. + TextAdRecommendation text_ad_recommendation = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The TargetCPA opt-in recommendation. - TargetCpaOptInRecommendation target_cpa_opt_in_recommendation = 10; + // Output only. The TargetCPA opt-in recommendation. + TargetCpaOptInRecommendation target_cpa_opt_in_recommendation = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The MaximizeConversions Opt-In recommendation. - MaximizeConversionsOptInRecommendation maximize_conversions_opt_in_recommendation = 11; + // Output only. The MaximizeConversions Opt-In recommendation. + MaximizeConversionsOptInRecommendation maximize_conversions_opt_in_recommendation = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The Enhanced Cost-Per-Click Opt-In recommendation. - EnhancedCpcOptInRecommendation enhanced_cpc_opt_in_recommendation = 12; + // Output only. The Enhanced Cost-Per-Click Opt-In recommendation. + EnhancedCpcOptInRecommendation enhanced_cpc_opt_in_recommendation = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The Search Partners Opt-In recommendation. - SearchPartnersOptInRecommendation search_partners_opt_in_recommendation = 14; + // Output only. The Search Partners Opt-In recommendation. + SearchPartnersOptInRecommendation search_partners_opt_in_recommendation = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The MaximizeClicks Opt-In recommendation. - MaximizeClicksOptInRecommendation maximize_clicks_opt_in_recommendation = 15; + // Output only. The MaximizeClicks Opt-In recommendation. + MaximizeClicksOptInRecommendation maximize_clicks_opt_in_recommendation = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The Optimize Ad Rotation recommendation. - OptimizeAdRotationRecommendation optimize_ad_rotation_recommendation = 16; + // Output only. The Optimize Ad Rotation recommendation. + OptimizeAdRotationRecommendation optimize_ad_rotation_recommendation = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The Callout extension recommendation. - CalloutExtensionRecommendation callout_extension_recommendation = 17; + // Output only. The Callout extension recommendation. + CalloutExtensionRecommendation callout_extension_recommendation = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The Sitelink extension recommendation. - SitelinkExtensionRecommendation sitelink_extension_recommendation = 18; + // Output only. The Sitelink extension recommendation. + SitelinkExtensionRecommendation sitelink_extension_recommendation = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The Call extension recommendation. - CallExtensionRecommendation call_extension_recommendation = 19; + // Output only. The Call extension recommendation. + CallExtensionRecommendation call_extension_recommendation = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The keyword match type recommendation. - KeywordMatchTypeRecommendation keyword_match_type_recommendation = 20; + // Output only. The keyword match type recommendation. + KeywordMatchTypeRecommendation keyword_match_type_recommendation = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The move unused budget recommendation. - MoveUnusedBudgetRecommendation move_unused_budget_recommendation = 21; + // Output only. The move unused budget recommendation. + MoveUnusedBudgetRecommendation move_unused_budget_recommendation = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/google/ads/googleads/v2/resources/remarketing_action.proto b/google/ads/googleads/v2/resources/remarketing_action.proto index b5f30a8db..f055fecee 100644 --- a/google/ads/googleads/v2/resources/remarketing_action.proto +++ b/google/ads/googleads/v2/resources/remarketing_action.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/tag_snippet.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -36,14 +37,24 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // product id and the type of page people visited (product page, shopping cart // page, purchase page, general site visit) on an advertiser's website. message RemarketingAction { - // The resource name of the remarketing action. + option (google.api.resource) = { + type: "googleads.googleapis.com/RemarketingAction" + pattern: "customers/{customer}/remarketingActions/{remarketing_action}" + }; + + // Immutable. The resource name of the remarketing action. // Remarketing action resource names have the form: // // `customers/{customer_id}/remarketingActions/{remarketing_action_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/RemarketingAction" + } + ]; - // Id of the remarketing action. - google.protobuf.Int64Value id = 2; + // Output only. Id of the remarketing action. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // The name of the remarketing action. // @@ -51,6 +62,6 @@ message RemarketingAction { // remarketing actions. google.protobuf.StringValue name = 3; - // The snippets used for tracking remarketing actions. - repeated google.ads.googleads.v2.common.TagSnippet tag_snippets = 4; + // Output only. The snippets used for tracking remarketing actions. + repeated google.ads.googleads.v2.common.TagSnippet tag_snippets = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/search_term_view.proto b/google/ads/googleads/v2/resources/search_term_view.proto index bbeb1f97e..0ffc45dc6 100644 --- a/google/ads/googleads/v2/resources/search_term_view.proto +++ b/google/ads/googleads/v2/resources/search_term_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/search_term_targeting_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,19 +36,34 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A search term view with metrics aggregated by search term at the ad group // level. message SearchTermView { - // The resource name of the search term view. + option (google.api.resource) = { + type: "googleads.googleapis.com/SearchTermView" + pattern: "customers/{customer}/searchTermViews/{search_term_view}" + }; + + // Output only. The resource name of the search term view. // Search term view resource names have the form: // // `customers/{customer_id}/searchTermViews/{campaign_id}~{ad_group_id}~{URL-base64_search_term}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SearchTermView" + } + ]; - // The search term. - google.protobuf.StringValue search_term = 2; + // Output only. The search term. + google.protobuf.StringValue search_term = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The ad group the search term served in. - google.protobuf.StringValue ad_group = 3; + // Output only. The ad group the search term served in. + google.protobuf.StringValue ad_group = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; - // Indicates whether the search term is currently one of your + // Output only. Indicates whether the search term is currently one of your // targeted or excluded keywords. - google.ads.googleads.v2.enums.SearchTermTargetingStatusEnum.SearchTermTargetingStatus status = 4; + google.ads.googleads.v2.enums.SearchTermTargetingStatusEnum.SearchTermTargetingStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/shared_criterion.proto b/google/ads/googleads/v2/resources/shared_criterion.proto index 954d48bbd..bdcac8039 100644 --- a/google/ads/googleads/v2/resources/shared_criterion.proto +++ b/google/ads/googleads/v2/resources/shared_criterion.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/criteria.proto"; import "google/ads/googleads/v2/enums/criterion_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,43 +36,58 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A criterion belonging to a shared set. message SharedCriterion { - // The resource name of the shared criterion. + option (google.api.resource) = { + type: "googleads.googleapis.com/SharedCriterion" + pattern: "customers/{customer}/sharedCriteria/{shared_criterion}" + }; + + // Immutable. The resource name of the shared criterion. // Shared set resource names have the form: // // `customers/{customer_id}/sharedCriteria/{shared_set_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedCriterion" + } + ]; - // The shared set to which the shared criterion belongs. - google.protobuf.StringValue shared_set = 2; + // Immutable. The shared set to which the shared criterion belongs. + google.protobuf.StringValue shared_set = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedSet" + } + ]; - // The ID of the criterion. + // Output only. The ID of the criterion. // // This field is ignored for mutates. - google.protobuf.Int64Value criterion_id = 26; + google.protobuf.Int64Value criterion_id = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The type of the criterion. - google.ads.googleads.v2.enums.CriterionTypeEnum.CriterionType type = 4; + // Output only. The type of the criterion. + google.ads.googleads.v2.enums.CriterionTypeEnum.CriterionType type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // The criterion. // // Exactly one must be set. oneof criterion { - // Keyword. - google.ads.googleads.v2.common.KeywordInfo keyword = 3; + // Immutable. Keyword. + google.ads.googleads.v2.common.KeywordInfo keyword = 3 [(google.api.field_behavior) = IMMUTABLE]; - // YouTube Video. - google.ads.googleads.v2.common.YouTubeVideoInfo youtube_video = 5; + // Immutable. YouTube Video. + google.ads.googleads.v2.common.YouTubeVideoInfo youtube_video = 5 [(google.api.field_behavior) = IMMUTABLE]; - // YouTube Channel. - google.ads.googleads.v2.common.YouTubeChannelInfo youtube_channel = 6; + // Immutable. YouTube Channel. + google.ads.googleads.v2.common.YouTubeChannelInfo youtube_channel = 6 [(google.api.field_behavior) = IMMUTABLE]; - // Placement. - google.ads.googleads.v2.common.PlacementInfo placement = 7; + // Immutable. Placement. + google.ads.googleads.v2.common.PlacementInfo placement = 7 [(google.api.field_behavior) = IMMUTABLE]; - // Mobile App Category. - google.ads.googleads.v2.common.MobileAppCategoryInfo mobile_app_category = 8; + // Immutable. Mobile App Category. + google.ads.googleads.v2.common.MobileAppCategoryInfo mobile_app_category = 8 [(google.api.field_behavior) = IMMUTABLE]; - // Mobile application. - google.ads.googleads.v2.common.MobileApplicationInfo mobile_application = 9; + // Immutable. Mobile application. + google.ads.googleads.v2.common.MobileApplicationInfo mobile_application = 9 [(google.api.field_behavior) = IMMUTABLE]; } } diff --git a/google/ads/googleads/v2/resources/shared_set.proto b/google/ads/googleads/v2/resources/shared_set.proto index 027cbcfba..b7a8edc26 100644 --- a/google/ads/googleads/v2/resources/shared_set.proto +++ b/google/ads/googleads/v2/resources/shared_set.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/enums/shared_set_status.proto"; import "google/ads/googleads/v2/enums/shared_set_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -36,18 +37,28 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // SharedSets are used for sharing criterion exclusions across multiple // campaigns. message SharedSet { - // The resource name of the shared set. + option (google.api.resource) = { + type: "googleads.googleapis.com/SharedSet" + pattern: "customers/{customer}/sharedSets/{shared_set}" + }; + + // Immutable. The resource name of the shared set. // Shared set resource names have the form: // // `customers/{customer_id}/sharedSets/{shared_set_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedSet" + } + ]; - // The ID of this shared set. Read only. - google.protobuf.Int64Value id = 2; + // Output only. The ID of this shared set. Read only. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The type of this shared set: each shared set holds only a single kind + // Immutable. The type of this shared set: each shared set holds only a single kind // of resource. Required. Immutable. - google.ads.googleads.v2.enums.SharedSetTypeEnum.SharedSetType type = 3; + google.ads.googleads.v2.enums.SharedSetTypeEnum.SharedSetType type = 3 [(google.api.field_behavior) = IMMUTABLE]; // The name of this shared set. Required. // Shared Sets must have names that are unique among active shared sets of @@ -56,12 +67,12 @@ message SharedSet { // inclusive. google.protobuf.StringValue name = 4; - // The status of this shared set. Read only. - google.ads.googleads.v2.enums.SharedSetStatusEnum.SharedSetStatus status = 5; + // Output only. The status of this shared set. Read only. + google.ads.googleads.v2.enums.SharedSetStatusEnum.SharedSetStatus status = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number of shared criteria within this shared set. Read only. - google.protobuf.Int64Value member_count = 6; + // Output only. The number of shared criteria within this shared set. Read only. + google.protobuf.Int64Value member_count = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number of campaigns associated with this shared set. Read only. - google.protobuf.Int64Value reference_count = 7; + // Output only. The number of campaigns associated with this shared set. Read only. + google.protobuf.Int64Value reference_count = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/shopping_performance_view.proto b/google/ads/googleads/v2/resources/shopping_performance_view.proto index ed5744580..314418264 100644 --- a/google/ads/googleads/v2/resources/shopping_performance_view.proto +++ b/google/ads/googleads/v2/resources/shopping_performance_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -37,8 +38,18 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // the state of each dimension as of the date and time when the corresponding // event was recorded. message ShoppingPerformanceView { - // The resource name of the Shopping performance view. + option (google.api.resource) = { + type: "googleads.googleapis.com/ShoppingPerformanceView" + pattern: "customers/{customer}/shoppingPerformanceView" + }; + + // Output only. The resource name of the Shopping performance view. // Shopping performance view resource names have the form: // `customers/{customer_id}/shoppingPerformanceView` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ShoppingPerformanceView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/topic_constant.proto b/google/ads/googleads/v2/resources/topic_constant.proto index d0ba4a459..fcfc5c4aa 100644 --- a/google/ads/googleads/v2/resources/topic_constant.proto +++ b/google/ads/googleads/v2/resources/topic_constant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,22 +36,37 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // based on the category into which the placement falls (for example, // "Pets & Animals/Pets/Dogs"). message TopicConstant { - // The resource name of the topic constant. + option (google.api.resource) = { + type: "googleads.googleapis.com/TopicConstant" + pattern: "topicConstants/{topic_constant}" + }; + + // Output only. The resource name of the topic constant. // topic constant resource names have the form: // // `topicConstants/{topic_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/TopicConstant" + } + ]; - // The ID of the topic. - google.protobuf.Int64Value id = 2; + // Output only. The ID of the topic. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Resource name of parent of the topic constant. - google.protobuf.StringValue topic_constant_parent = 3; + // Output only. Resource name of parent of the topic constant. + google.protobuf.StringValue topic_constant_parent = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/TopicConstant" + } + ]; - // The category to target or exclude. Each subsequent element in the array + // Output only. The category to target or exclude. Each subsequent element in the array // describes a more specific sub-category. For example, // {"Pets & Animals", "Pets", "Dogs"} represents the // "Pets & Animals/Pets/Dogs" category. List of available topic categories at // https://developers.google.com/adwords/api/docs/appendix/verticals - repeated google.protobuf.StringValue path = 4; + repeated google.protobuf.StringValue path = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/topic_view.proto b/google/ads/googleads/v2/resources/topic_view.proto index 747500139..73a0aaedc 100644 --- a/google/ads/googleads/v2/resources/topic_view.proto +++ b/google/ads/googleads/v2/resources/topic_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Resources"; @@ -32,9 +33,19 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A topic view. message TopicView { - // The resource name of the topic view. + option (google.api.resource) = { + type: "googleads.googleapis.com/TopicView" + pattern: "customers/{customer}/topicViews/{topic_view}" + }; + + // Output only. The resource name of the topic view. // Topic view resource names have the form: // // `customers/{customer_id}/topicViews/{ad_group_id}~{criterion_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/TopicView" + } + ]; } diff --git a/google/ads/googleads/v2/resources/user_interest.proto b/google/ads/googleads/v2/resources/user_interest.proto index c956e28a0..a393cf70c 100644 --- a/google/ads/googleads/v2/resources/user_interest.proto +++ b/google/ads/googleads/v2/resources/user_interest.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.ads.googleads.v2.resources; import "google/ads/googleads/v2/common/criterion_category_availability.proto"; import "google/ads/googleads/v2/enums/user_interest_taxonomy_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -35,27 +36,42 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A user interest: a particular interest-based vertical to be targeted. message UserInterest { - // The resource name of the user interest. + option (google.api.resource) = { + type: "googleads.googleapis.com/UserInterest" + pattern: "customers/{customer}/userInterests/{user_interest}" + }; + + // Output only. The resource name of the user interest. // User interest resource names have the form: // // `customers/{customer_id}/userInterests/{user_interest_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserInterest" + } + ]; - // Taxonomy type of the user interest. - google.ads.googleads.v2.enums.UserInterestTaxonomyTypeEnum.UserInterestTaxonomyType taxonomy_type = 2; + // Output only. Taxonomy type of the user interest. + google.ads.googleads.v2.enums.UserInterestTaxonomyTypeEnum.UserInterestTaxonomyType taxonomy_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The ID of the user interest. - google.protobuf.Int64Value user_interest_id = 3; + // Output only. The ID of the user interest. + google.protobuf.Int64Value user_interest_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The name of the user interest. - google.protobuf.StringValue name = 4; + // Output only. The name of the user interest. + google.protobuf.StringValue name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The parent of the user interest. - google.protobuf.StringValue user_interest_parent = 5; + // Output only. The parent of the user interest. + google.protobuf.StringValue user_interest_parent = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserInterest" + } + ]; - // True if the user interest is launched to all channels and locales. - google.protobuf.BoolValue launched_to_all = 6; + // Output only. True if the user interest is launched to all channels and locales. + google.protobuf.BoolValue launched_to_all = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Availability information of the user interest. - repeated google.ads.googleads.v2.common.CriterionCategoryAvailability availabilities = 7; + // Output only. Availability information of the user interest. + repeated google.ads.googleads.v2.common.CriterionCategoryAvailability availabilities = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/user_list.proto b/google/ads/googleads/v2/resources/user_list.proto index 9157e4269..35d15acdb 100644 --- a/google/ads/googleads/v2/resources/user_list.proto +++ b/google/ads/googleads/v2/resources/user_list.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -24,6 +23,8 @@ import "google/ads/googleads/v2/enums/user_list_closing_reason.proto"; import "google/ads/googleads/v2/enums/user_list_membership_status.proto"; import "google/ads/googleads/v2/enums/user_list_size_range.proto"; import "google/ads/googleads/v2/enums/user_list_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -40,21 +41,31 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A user list. This is a list of users a customer may target. message UserList { - // The resource name of the user list. + option (google.api.resource) = { + type: "googleads.googleapis.com/UserList" + pattern: "customers/{customer}/userLists/{user_list}" + }; + + // Immutable. The resource name of the user list. // User list resource names have the form: // // `customers/{customer_id}/userLists/{user_list_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserList" + } + ]; - // Id of the user list. - google.protobuf.Int64Value id = 2; + // Output only. Id of the user list. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A flag that indicates if a user may edit a list. Depends on the list + // Output only. A flag that indicates if a user may edit a list. Depends on the list // ownership and list type. For example, external remarketing user lists are // not editable. // // This field is read-only. - google.protobuf.BoolValue read_only = 3; + google.protobuf.BoolValue read_only = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Name of this user list. Depending on its access_reason, the user list name // may not be unique (e.g. if access_reason=SHARED) @@ -80,45 +91,45 @@ message UserList { // It'll be ignored for logical_user_list. google.protobuf.Int64Value membership_life_span = 8; - // Estimated number of users in this user list, on the Google Display Network. + // Output only. Estimated number of users in this user list, on the Google Display Network. // This value is null if the number of users has not yet been determined. // // This field is read-only. - google.protobuf.Int64Value size_for_display = 9; + google.protobuf.Int64Value size_for_display = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Size range in terms of number of users of the UserList, on the Google + // Output only. Size range in terms of number of users of the UserList, on the Google // Display Network. // // This field is read-only. - google.ads.googleads.v2.enums.UserListSizeRangeEnum.UserListSizeRange size_range_for_display = 10; + google.ads.googleads.v2.enums.UserListSizeRangeEnum.UserListSizeRange size_range_for_display = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Estimated number of users in this user list in the google.com domain. + // Output only. Estimated number of users in this user list in the google.com domain. // These are the users available for targeting in Search campaigns. // This value is null if the number of users has not yet been determined. // // This field is read-only. - google.protobuf.Int64Value size_for_search = 11; + google.protobuf.Int64Value size_for_search = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Size range in terms of number of users of the UserList, for Search ads. + // Output only. Size range in terms of number of users of the UserList, for Search ads. // // This field is read-only. - google.ads.googleads.v2.enums.UserListSizeRangeEnum.UserListSizeRange size_range_for_search = 12; + google.ads.googleads.v2.enums.UserListSizeRangeEnum.UserListSizeRange size_range_for_search = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Type of this list. + // Output only. Type of this list. // // This field is read-only. - google.ads.googleads.v2.enums.UserListTypeEnum.UserListType type = 13; + google.ads.googleads.v2.enums.UserListTypeEnum.UserListType type = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Indicating the reason why this user list membership status is closed. It is // only populated on lists that were automatically closed due to inactivity, // and will be cleared once the list membership status becomes open. google.ads.googleads.v2.enums.UserListClosingReasonEnum.UserListClosingReason closing_reason = 14; - // Indicates the reason this account has been granted access to the list. + // Output only. Indicates the reason this account has been granted access to the list. // The reason can be SHARED, OWNED, LICENSED or SUBSCRIBED. // // This field is read-only. - google.ads.googleads.v2.enums.AccessReasonEnum.AccessReason access_reason = 15; + google.ads.googleads.v2.enums.AccessReasonEnum.AccessReason access_reason = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; // Indicates if this share is still enabled. When a UserList is shared with // the user this field is set to ENABLED. Later the userList owner can decide @@ -129,10 +140,10 @@ message UserList { // Indicates if this user list is eligible for Google Search Network. google.protobuf.BoolValue eligible_for_search = 17; - // Indicates this user list is eligible for Google Display Network. + // Output only. Indicates this user list is eligible for Google Display Network. // // This field is read-only. - google.protobuf.BoolValue eligible_for_display = 18; + google.protobuf.BoolValue eligible_for_display = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; // The user list. // @@ -141,9 +152,9 @@ message UserList { // User list of CRM users provided by the advertiser. google.ads.googleads.v2.common.CrmBasedUserListInfo crm_based_user_list = 19; - // User list which are similar to users from another UserList. + // Output only. User list which are similar to users from another UserList. // These lists are readonly and automatically created by google. - google.ads.googleads.v2.common.SimilarUserListInfo similar_user_list = 20; + google.ads.googleads.v2.common.SimilarUserListInfo similar_user_list = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; // User list generated by a rule. google.ads.googleads.v2.common.RuleBasedUserListInfo rule_based_user_list = 21; diff --git a/google/ads/googleads/v2/resources/user_location_view.proto b/google/ads/googleads/v2/resources/user_location_view.proto index a99de5e59..759835cab 100644 --- a/google/ads/googleads/v2/resources/user_location_view.proto +++ b/google/ads/googleads/v2/resources/user_location_view.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -38,15 +39,25 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // the user by targeted or not targeted location. If other segment fields are // used, you may get more than one row per country. message UserLocationView { - // The resource name of the user location view. + option (google.api.resource) = { + type: "googleads.googleapis.com/UserLocationView" + pattern: "customers/{customer}/userLocationViews/{user_location_view}" + }; + + // Output only. The resource name of the user location view. // UserLocation view resource names have the form: // // `customers/{customer_id}/userLocationViews/{country_criterion_id}~{targeting_location}` - string resource_name = 1; - - // Criterion Id for the country. - google.protobuf.Int64Value country_criterion_id = 2; - - // Indicates whether location was targeted or not. - google.protobuf.BoolValue targeting_location = 3; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserLocationView" + } + ]; + + // Output only. Criterion Id for the country. + google.protobuf.Int64Value country_criterion_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether location was targeted or not. + google.protobuf.BoolValue targeting_location = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/resources/video.proto b/google/ads/googleads/v2/resources/video.proto index de05bc4c3..d2f838fdb 100644 --- a/google/ads/googleads/v2/resources/video.proto +++ b/google/ads/googleads/v2/resources/video.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.resources; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; @@ -33,21 +34,31 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Resources"; // A video. message Video { - // The resource name of the video. + option (google.api.resource) = { + type: "googleads.googleapis.com/Video" + pattern: "customers/{customer}/videos/{video}" + }; + + // Output only. The resource name of the video. // Video resource names have the form: // // `customers/{customer_id}/videos/{video_id}` - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Video" + } + ]; - // The ID of the video. - google.protobuf.StringValue id = 2; + // Output only. The ID of the video. + google.protobuf.StringValue id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The owner channel id of the video. - google.protobuf.StringValue channel_id = 3; + // Output only. The owner channel id of the video. + google.protobuf.StringValue channel_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The duration of the video in milliseconds. - google.protobuf.Int64Value duration_millis = 4; + // Output only. The duration of the video in milliseconds. + google.protobuf.Int64Value duration_millis = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The title of the video. - google.protobuf.StringValue title = 5; + // Output only. The title of the video. + google.protobuf.StringValue title = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/ads/googleads/v2/services/account_budget_proposal_service.proto b/google/ads/googleads/v2/services/account_budget_proposal_service.proto index 5b47c06d6..40cc7c9b8 100644 --- a/google/ads/googleads/v2/services/account_budget_proposal_service.proto +++ b/google/ads/googleads/v2/services/account_budget_proposal_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/account_budget_proposal.proto"; import "google/api/annotations.proto"; -import "google/protobuf/field_mask.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -55,6 +56,7 @@ service AccountBudgetProposalService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/accountBudgetProposals/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes account budget proposals. Operation statuses @@ -64,24 +66,30 @@ service AccountBudgetProposalService { post: "/v2/customers/{customer_id=*}/accountBudgetProposals:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operation"; } } // Request message for // [AccountBudgetProposalService.GetAccountBudgetProposal][google.ads.googleads.v2.services.AccountBudgetProposalService.GetAccountBudgetProposal]. message GetAccountBudgetProposalRequest { - // The resource name of the account-level budget proposal to fetch. - string resource_name = 1; + // Required. The resource name of the account-level budget proposal to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudgetProposal" + } + ]; } // Request message for // [AccountBudgetProposalService.MutateAccountBudgetProposal][google.ads.googleads.v2.services.AccountBudgetProposalService.MutateAccountBudgetProposal]. message MutateAccountBudgetProposalRequest { - // The ID of the customer. - string customer_id = 1; + // Required. The ID of the customer. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The operation to perform on an individual account-level budget proposal. - AccountBudgetProposalOperation operation = 2; + // Required. The operation to perform on an individual account-level budget proposal. + AccountBudgetProposalOperation operation = 2 [(google.api.field_behavior) = REQUIRED]; // If true, the request is validated but not executed. Only errors are // returned, not results. diff --git a/google/ads/googleads/v2/services/account_budget_service.proto b/google/ads/googleads/v2/services/account_budget_service.proto index f793c5129..8aaa8663a 100644 --- a/google/ads/googleads/v2/services/account_budget_service.proto +++ b/google/ads/googleads/v2/services/account_budget_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/account_budget.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,12 +44,18 @@ service AccountBudgetService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/accountBudgets/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [AccountBudgetService.GetAccountBudget][google.ads.googleads.v2.services.AccountBudgetService.GetAccountBudget]. message GetAccountBudgetRequest { - // The resource name of the account-level budget to fetch. - string resource_name = 1; + // Required. The resource name of the account-level budget to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudget" + } + ]; } diff --git a/google/ads/googleads/v2/services/ad_group_ad_asset_view_service.proto b/google/ads/googleads/v2/services/ad_group_ad_asset_view_service.proto index 1ddcf83df..93a0cb758 100644 --- a/google/ads/googleads/v2/services/ad_group_ad_asset_view_service.proto +++ b/google/ads/googleads/v2/services/ad_group_ad_asset_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/ad_group_ad_asset_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service AdGroupAdAssetViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adGroupAdAssetViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [AdGroupAdAssetViewService.GetAdGroupAdAssetView][google.ads.googleads.v2.services.AdGroupAdAssetViewService.GetAdGroupAdAssetView]. message GetAdGroupAdAssetViewRequest { - // The resource name of the ad group ad asset view to fetch. - string resource_name = 1; + // Required. The resource name of the ad group ad asset view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAdAssetView" + } + ]; } diff --git a/google/ads/googleads/v2/services/ad_group_ad_label_service.proto b/google/ads/googleads/v2/services/ad_group_ad_label_service.proto index 044f7bb12..b1bbad731 100644 --- a/google/ads/googleads/v2/services/ad_group_ad_label_service.proto +++ b/google/ads/googleads/v2/services/ad_group_ad_label_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/ad_group_ad_label.proto"; import "google/api/annotations.proto"; -import "google/rpc/status.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -42,6 +43,7 @@ service AdGroupAdLabelService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adGroupAdLabels/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates and removes ad group ad labels. @@ -51,22 +53,28 @@ service AdGroupAdLabelService { post: "/v2/customers/{customer_id=*}/adGroupAdLabels:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [AdGroupAdLabelService.GetAdGroupAdLabel][google.ads.googleads.v2.services.AdGroupAdLabelService.GetAdGroupAdLabel]. message GetAdGroupAdLabelRequest { - // The resource name of the ad group ad label to fetch. - string resource_name = 1; + // Required. The resource name of the ad group ad label to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAdLabel" + } + ]; } // Request message for [AdGroupAdLabelService.MutateAdGroupAdLabels][google.ads.googleads.v2.services.AdGroupAdLabelService.MutateAdGroupAdLabels]. message MutateAdGroupAdLabelsRequest { - // ID of the customer whose ad group ad labels are being modified. - string customer_id = 1; + // Required. ID of the customer whose ad group ad labels are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on ad group ad labels. - repeated AdGroupAdLabelOperation operations = 2; + // Required. The list of operations to perform on ad group ad labels. + repeated AdGroupAdLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/ad_group_ad_service.proto b/google/ads/googleads/v2/services/ad_group_ad_service.proto index 852de5c5e..566ddc0ca 100644 --- a/google/ads/googleads/v2/services/ad_group_ad_service.proto +++ b/google/ads/googleads/v2/services/ad_group_ad_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,9 +19,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/common/policy.proto"; import "google/ads/googleads/v2/resources/ad_group_ad.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -44,6 +45,7 @@ service AdGroupAdService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adGroupAds/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes ads. Operation statuses are returned. @@ -52,22 +54,28 @@ service AdGroupAdService { post: "/v2/customers/{customer_id=*}/adGroupAds:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [AdGroupAdService.GetAdGroupAd][google.ads.googleads.v2.services.AdGroupAdService.GetAdGroupAd]. message GetAdGroupAdRequest { - // The resource name of the ad to fetch. - string resource_name = 1; + // Required. The resource name of the ad to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; } // Request message for [AdGroupAdService.MutateAdGroupAds][google.ads.googleads.v2.services.AdGroupAdService.MutateAdGroupAds]. message MutateAdGroupAdsRequest { - // The ID of the customer whose ads are being modified. - string customer_id = 1; + // Required. The ID of the customer whose ads are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual ads. - repeated AdGroupAdOperation operations = 2; + // Required. The list of operations to perform on individual ads. + repeated AdGroupAdOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/ad_group_audience_view_service.proto b/google/ads/googleads/v2/services/ad_group_audience_view_service.proto index d07da3d9e..6cfe6a63a 100644 --- a/google/ads/googleads/v2/services/ad_group_audience_view_service.proto +++ b/google/ads/googleads/v2/services/ad_group_audience_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/ad_group_audience_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service AdGroupAudienceViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adGroupAudienceViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [AdGroupAudienceViewService.GetAdGoupAudienceView][]. message GetAdGroupAudienceViewRequest { - // The resource name of the ad group audience view to fetch. - string resource_name = 1; + // Required. The resource name of the ad group audience view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAudienceView" + } + ]; } diff --git a/google/ads/googleads/v2/services/ad_group_bid_modifier_service.proto b/google/ads/googleads/v2/services/ad_group_bid_modifier_service.proto index 9a7327d59..9f58476e7 100644 --- a/google/ads/googleads/v2/services/ad_group_bid_modifier_service.proto +++ b/google/ads/googleads/v2/services/ad_group_bid_modifier_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/ad_group_bid_modifier.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service AdGroupBidModifierService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adGroupBidModifiers/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes ad group bid modifiers. @@ -52,22 +54,28 @@ service AdGroupBidModifierService { post: "/v2/customers/{customer_id=*}/adGroupBidModifiers:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [AdGroupBidModifierService.GetAdGroupBidModifier][google.ads.googleads.v2.services.AdGroupBidModifierService.GetAdGroupBidModifier]. message GetAdGroupBidModifierRequest { - // The resource name of the ad group bid modifier to fetch. - string resource_name = 1; + // Required. The resource name of the ad group bid modifier to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupBidModifier" + } + ]; } // Request message for [AdGroupBidModifierService.MutateAdGroupBidModifiers][google.ads.googleads.v2.services.AdGroupBidModifierService.MutateAdGroupBidModifiers]. message MutateAdGroupBidModifiersRequest { - // ID of the customer whose ad group bid modifiers are being modified. - string customer_id = 1; + // Required. ID of the customer whose ad group bid modifiers are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual ad group bid modifiers. - repeated AdGroupBidModifierOperation operations = 2; + // Required. The list of operations to perform on individual ad group bid modifiers. + repeated AdGroupBidModifierOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/ad_group_criterion_label_service.proto b/google/ads/googleads/v2/services/ad_group_criterion_label_service.proto index c64db682d..4c8b6e56d 100644 --- a/google/ads/googleads/v2/services/ad_group_criterion_label_service.proto +++ b/google/ads/googleads/v2/services/ad_group_criterion_label_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/ad_group_criterion_label.proto"; import "google/api/annotations.proto"; -import "google/rpc/status.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -42,6 +43,7 @@ service AdGroupCriterionLabelService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adGroupCriterionLabels/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates and removes ad group criterion labels. @@ -51,24 +53,30 @@ service AdGroupCriterionLabelService { post: "/v2/customers/{customer_id=*}/adGroupCriterionLabels:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for // [AdGroupCriterionLabelService.GetAdGroupCriterionLabel][google.ads.googleads.v2.services.AdGroupCriterionLabelService.GetAdGroupCriterionLabel]. message GetAdGroupCriterionLabelRequest { - // The resource name of the ad group criterion label to fetch. - string resource_name = 1; + // Required. The resource name of the ad group criterion label to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterionLabel" + } + ]; } // Request message for // [AdGroupCriterionLabelService.MutateAdGroupCriterionLabels][google.ads.googleads.v2.services.AdGroupCriterionLabelService.MutateAdGroupCriterionLabels]. message MutateAdGroupCriterionLabelsRequest { - // ID of the customer whose ad group criterion labels are being modified. - string customer_id = 1; + // Required. ID of the customer whose ad group criterion labels are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on ad group criterion labels. - repeated AdGroupCriterionLabelOperation operations = 2; + // Required. The list of operations to perform on ad group criterion labels. + repeated AdGroupCriterionLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/ad_group_criterion_service.proto b/google/ads/googleads/v2/services/ad_group_criterion_service.proto index bb0c2f887..48ca349d3 100644 --- a/google/ads/googleads/v2/services/ad_group_criterion_service.proto +++ b/google/ads/googleads/v2/services/ad_group_criterion_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,9 +19,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/common/policy.proto"; import "google/ads/googleads/v2/resources/ad_group_criterion.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -44,6 +45,7 @@ service AdGroupCriterionService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adGroupCriteria/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes criteria. Operation statuses are returned. @@ -52,22 +54,28 @@ service AdGroupCriterionService { post: "/v2/customers/{customer_id=*}/adGroupCriteria:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [AdGroupCriterionService.GetAdGroupCriterion][google.ads.googleads.v2.services.AdGroupCriterionService.GetAdGroupCriterion]. message GetAdGroupCriterionRequest { - // The resource name of the criterion to fetch. - string resource_name = 1; + // Required. The resource name of the criterion to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; } // Request message for [AdGroupCriterionService.MutateAdGroupCriteria][google.ads.googleads.v2.services.AdGroupCriterionService.MutateAdGroupCriteria]. message MutateAdGroupCriteriaRequest { - // ID of the customer whose criteria are being modified. - string customer_id = 1; + // Required. ID of the customer whose criteria are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual criteria. - repeated AdGroupCriterionOperation operations = 2; + // Required. The list of operations to perform on individual criteria. + repeated AdGroupCriterionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/ad_group_criterion_simulation_service.proto b/google/ads/googleads/v2/services/ad_group_criterion_simulation_service.proto index c407a2a51..08ec34b1b 100644 --- a/google/ads/googleads/v2/services/ad_group_criterion_simulation_service.proto +++ b/google/ads/googleads/v2/services/ad_group_criterion_simulation_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/ad_group_criterion_simulation.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,12 +42,18 @@ service AdGroupCriterionSimulationService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adGroupCriterionSimulations/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [AdGroupCriterionSimulationService.GetAdGroupCriterionSimulation][google.ads.googleads.v2.services.AdGroupCriterionSimulationService.GetAdGroupCriterionSimulation]. message GetAdGroupCriterionSimulationRequest { - // The resource name of the ad group criterion simulation to fetch. - string resource_name = 1; + // Required. The resource name of the ad group criterion simulation to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterionSimulation" + } + ]; } diff --git a/google/ads/googleads/v2/services/ad_group_extension_setting_service.proto b/google/ads/googleads/v2/services/ad_group_extension_setting_service.proto index 87f6b7e8f..c78b5b6a9 100644 --- a/google/ads/googleads/v2/services/ad_group_extension_setting_service.proto +++ b/google/ads/googleads/v2/services/ad_group_extension_setting_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/ad_group_extension_setting.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service AdGroupExtensionSettingService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adGroupExtensionSettings/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes ad group extension settings. Operation @@ -52,26 +54,32 @@ service AdGroupExtensionSettingService { post: "/v2/customers/{customer_id=*}/adGroupExtensionSettings:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for // [AdGroupExtensionSettingService.GetAdGroupExtensionSetting][google.ads.googleads.v2.services.AdGroupExtensionSettingService.GetAdGroupExtensionSetting]. message GetAdGroupExtensionSettingRequest { - // The resource name of the ad group extension setting to fetch. - string resource_name = 1; + // Required. The resource name of the ad group extension setting to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupExtensionSetting" + } + ]; } // Request message for // [AdGroupExtensionSettingService.MutateAdGroupExtensionSettings][google.ads.googleads.v2.services.AdGroupExtensionSettingService.MutateAdGroupExtensionSettings]. message MutateAdGroupExtensionSettingsRequest { - // The ID of the customer whose ad group extension settings are being + // Required. The ID of the customer whose ad group extension settings are being // modified. - string customer_id = 1; + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual ad group extension + // Required. The list of operations to perform on individual ad group extension // settings. - repeated AdGroupExtensionSettingOperation operations = 2; + repeated AdGroupExtensionSettingOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/ad_group_feed_service.proto b/google/ads/googleads/v2/services/ad_group_feed_service.proto index 15c07d433..4a57759e5 100644 --- a/google/ads/googleads/v2/services/ad_group_feed_service.proto +++ b/google/ads/googleads/v2/services/ad_group_feed_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/ad_group_feed.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service AdGroupFeedService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adGroupFeeds/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes ad group feeds. Operation statuses are @@ -52,22 +54,28 @@ service AdGroupFeedService { post: "/v2/customers/{customer_id=*}/adGroupFeeds:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [AdGroupFeedService.GetAdGroupFeed][google.ads.googleads.v2.services.AdGroupFeedService.GetAdGroupFeed]. message GetAdGroupFeedRequest { - // The resource name of the ad group feed to fetch. - string resource_name = 1; + // Required. The resource name of the ad group feed to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupFeed" + } + ]; } // Request message for [AdGroupFeedService.MutateAdGroupFeeds][google.ads.googleads.v2.services.AdGroupFeedService.MutateAdGroupFeeds]. message MutateAdGroupFeedsRequest { - // The ID of the customer whose ad group feeds are being modified. - string customer_id = 1; + // Required. The ID of the customer whose ad group feeds are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual ad group feeds. - repeated AdGroupFeedOperation operations = 2; + // Required. The list of operations to perform on individual ad group feeds. + repeated AdGroupFeedOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/ad_group_label_service.proto b/google/ads/googleads/v2/services/ad_group_label_service.proto index de6481451..80fda5aab 100644 --- a/google/ads/googleads/v2/services/ad_group_label_service.proto +++ b/google/ads/googleads/v2/services/ad_group_label_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/ad_group_label.proto"; import "google/api/annotations.proto"; -import "google/rpc/status.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -42,6 +43,7 @@ service AdGroupLabelService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adGroupLabels/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates and removes ad group labels. @@ -51,22 +53,28 @@ service AdGroupLabelService { post: "/v2/customers/{customer_id=*}/adGroupLabels:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [AdGroupLabelService.GetAdGroupLabel][google.ads.googleads.v2.services.AdGroupLabelService.GetAdGroupLabel]. message GetAdGroupLabelRequest { - // The resource name of the ad group label to fetch. - string resource_name = 1; + // Required. The resource name of the ad group label to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupLabel" + } + ]; } // Request message for [AdGroupLabelService.MutateAdGroupLabels][google.ads.googleads.v2.services.AdGroupLabelService.MutateAdGroupLabels]. message MutateAdGroupLabelsRequest { - // ID of the customer whose ad group labels are being modified. - string customer_id = 1; + // Required. ID of the customer whose ad group labels are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on ad group labels. - repeated AdGroupLabelOperation operations = 2; + // Required. The list of operations to perform on ad group labels. + repeated AdGroupLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/ad_group_service.proto b/google/ads/googleads/v2/services/ad_group_service.proto index 3d01e537d..c7d165615 100644 --- a/google/ads/googleads/v2/services/ad_group_service.proto +++ b/google/ads/googleads/v2/services/ad_group_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/ad_group.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service AdGroupService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adGroups/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes ad groups. Operation statuses are returned. @@ -51,22 +53,28 @@ service AdGroupService { post: "/v2/customers/{customer_id=*}/adGroups:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [AdGroupService.GetAdGroup][google.ads.googleads.v2.services.AdGroupService.GetAdGroup]. message GetAdGroupRequest { - // The resource name of the ad group to fetch. - string resource_name = 1; + // Required. The resource name of the ad group to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; } // Request message for [AdGroupService.MutateAdGroups][google.ads.googleads.v2.services.AdGroupService.MutateAdGroups]. message MutateAdGroupsRequest { - // The ID of the customer whose ad groups are being modified. - string customer_id = 1; + // Required. The ID of the customer whose ad groups are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual ad groups. - repeated AdGroupOperation operations = 2; + // Required. The list of operations to perform on individual ad groups. + repeated AdGroupOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/ad_group_simulation_service.proto b/google/ads/googleads/v2/services/ad_group_simulation_service.proto index cfebaab16..94fd27f7f 100644 --- a/google/ads/googleads/v2/services/ad_group_simulation_service.proto +++ b/google/ads/googleads/v2/services/ad_group_simulation_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/ad_group_simulation.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service AdGroupSimulationService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adGroupSimulations/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [AdGroupSimulationService.GetAdGroupSimulation][google.ads.googleads.v2.services.AdGroupSimulationService.GetAdGroupSimulation]. message GetAdGroupSimulationRequest { - // The resource name of the ad group simulation to fetch. - string resource_name = 1; + // Required. The resource name of the ad group simulation to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupSimulation" + } + ]; } diff --git a/google/ads/googleads/v2/services/ad_parameter_service.proto b/google/ads/googleads/v2/services/ad_parameter_service.proto index 2993711b9..e0caf586e 100644 --- a/google/ads/googleads/v2/services/ad_parameter_service.proto +++ b/google/ads/googleads/v2/services/ad_parameter_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/ad_parameter.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service AdParameterService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adParameters/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes ad parameters. Operation statuses are @@ -52,22 +54,28 @@ service AdParameterService { post: "/v2/customers/{customer_id=*}/adParameters:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [AdParameterService.GetAdParameter][google.ads.googleads.v2.services.AdParameterService.GetAdParameter] message GetAdParameterRequest { - // The resource name of the ad parameter to fetch. - string resource_name = 1; + // Required. The resource name of the ad parameter to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdParameter" + } + ]; } // Request message for [AdParameterService.MutateAdParameters][google.ads.googleads.v2.services.AdParameterService.MutateAdParameters] message MutateAdParametersRequest { - // The ID of the customer whose ad parameters are being modified. - string customer_id = 1; + // Required. The ID of the customer whose ad parameters are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual ad parameters. - repeated AdParameterOperation operations = 2; + // Required. The list of operations to perform on individual ad parameters. + repeated AdParameterOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/ad_schedule_view_service.proto b/google/ads/googleads/v2/services/ad_schedule_view_service.proto index 465f25a01..b9859096f 100644 --- a/google/ads/googleads/v2/services/ad_schedule_view_service.proto +++ b/google/ads/googleads/v2/services/ad_schedule_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/ad_schedule_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service AdScheduleViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/adScheduleViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [AdScheduleViewService.GetAdScheduleView][google.ads.googleads.v2.services.AdScheduleViewService.GetAdScheduleView]. message GetAdScheduleViewRequest { - // The resource name of the ad schedule view to fetch. - string resource_name = 1; + // Required. The resource name of the ad schedule view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdScheduleView" + } + ]; } diff --git a/google/ads/googleads/v2/services/ad_service.proto b/google/ads/googleads/v2/services/ad_service.proto index 9f764d7c7..d5bb1d2a4 100644 --- a/google/ads/googleads/v2/services/ad_service.proto +++ b/google/ads/googleads/v2/services/ad_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/ad.proto"; import "google/api/annotations.proto"; -import "google/protobuf/field_mask.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -42,6 +43,7 @@ service AdService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/ads/*}" }; + option (google.api.method_signature) = "resource_name"; } // Updates ads. Operation statuses are returned. @@ -50,22 +52,28 @@ service AdService { post: "/v2/customers/{customer_id=*}/ads:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [AdService.GetAd][google.ads.googleads.v2.services.AdService.GetAd]. message GetAdRequest { - // The resource name of the ad to fetch. - string resource_name = 1; + // Required. The resource name of the ad to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Ad" + } + ]; } // Request message for [AdService.MutateAds][google.ads.googleads.v2.services.AdService.MutateAds]. message MutateAdsRequest { - // The ID of the customer whose ads are being modified. - string customer_id = 1; + // Required. The ID of the customer whose ads are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual ads. - repeated AdOperation operations = 2; + // Required. The list of operations to perform on individual ads. + repeated AdOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; } // A single update operation on an ad. diff --git a/google/ads/googleads/v2/services/age_range_view_service.proto b/google/ads/googleads/v2/services/age_range_view_service.proto index 5db684b06..17c64935a 100644 --- a/google/ads/googleads/v2/services/age_range_view_service.proto +++ b/google/ads/googleads/v2/services/age_range_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/age_range_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service AgeRangeViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/ageRangeViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [AgeRangeViewService.GetAgeRangeView][google.ads.googleads.v2.services.AgeRangeViewService.GetAgeRangeView]. message GetAgeRangeViewRequest { - // The resource name of the age range view to fetch. - string resource_name = 1; + // Required. The resource name of the age range view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AgeRangeView" + } + ]; } diff --git a/google/ads/googleads/v2/services/asset_service.proto b/google/ads/googleads/v2/services/asset_service.proto index 394c52b2d..5ed9d0c1a 100644 --- a/google/ads/googleads/v2/services/asset_service.proto +++ b/google/ads/googleads/v2/services/asset_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/asset.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service AssetService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/assets/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates assets. Operation statuses are returned. @@ -51,27 +53,33 @@ service AssetService { post: "/v2/customers/{customer_id=*}/assets:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [AssetService.GetAsset][google.ads.googleads.v2.services.AssetService.GetAsset] message GetAssetRequest { - // The resource name of the asset to fetch. - string resource_name = 1; + // Required. The resource name of the asset to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Asset" + } + ]; } // Request message for [AssetService.MutateAssets][google.ads.googleads.v2.services.AssetService.MutateAssets] message MutateAssetsRequest { - // The ID of the customer whose assets are being modified. - string customer_id = 1; + // Required. The ID of the customer whose assets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual assets. - repeated AssetOperation operations = 2; + // Required. The list of operations to perform on individual assets. + repeated AssetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; } // A single operation to create an asset. Supported asset types are -// YoutubeVideoAsset, MediaBundleAsset and ImageAsset. TextAsset should be -// created with Ad inline. +// YoutubeVideoAsset, MediaBundleAsset, ImageAsset, and LeadFormAsset. TextAsset +// should be created with Ad inline. message AssetOperation { // The mutate operation. oneof operation { diff --git a/google/ads/googleads/v2/services/bidding_strategy_service.proto b/google/ads/googleads/v2/services/bidding_strategy_service.proto index 74af8c08d..df61d2278 100644 --- a/google/ads/googleads/v2/services/bidding_strategy_service.proto +++ b/google/ads/googleads/v2/services/bidding_strategy_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/bidding_strategy.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service BiddingStrategyService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/biddingStrategies/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes bidding strategies. Operation statuses are @@ -52,22 +54,28 @@ service BiddingStrategyService { post: "/v2/customers/{customer_id=*}/biddingStrategies:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [BiddingStrategyService.GetBiddingStrategy][google.ads.googleads.v2.services.BiddingStrategyService.GetBiddingStrategy]. message GetBiddingStrategyRequest { - // The resource name of the bidding strategy to fetch. - string resource_name = 1; + // Required. The resource name of the bidding strategy to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BiddingStrategy" + } + ]; } // Request message for [BiddingStrategyService.MutateBiddingStrategies][google.ads.googleads.v2.services.BiddingStrategyService.MutateBiddingStrategies]. message MutateBiddingStrategiesRequest { - // The ID of the customer whose bidding strategies are being modified. - string customer_id = 1; + // Required. The ID of the customer whose bidding strategies are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual bidding strategies. - repeated BiddingStrategyOperation operations = 2; + // Required. The list of operations to perform on individual bidding strategies. + repeated BiddingStrategyOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/billing_setup_service.proto b/google/ads/googleads/v2/services/billing_setup_service.proto index abec2596a..ea17bf1a0 100644 --- a/google/ads/googleads/v2/services/billing_setup_service.proto +++ b/google/ads/googleads/v2/services/billing_setup_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/billing_setup.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -34,8 +35,8 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Services"; // A service for designating the business entity responsible for accrued costs. // -// A billing setup is associated with a Payments account. Billing-related -// activity for all billing setups associated with a particular Payments account +// A billing setup is associated with a payments account. Billing-related +// activity for all billing setups associated with a particular payments account // will appear on a single invoice generated monthly. // // Mutates: @@ -49,6 +50,7 @@ service BillingSetupService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/billingSetups/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates a billing setup, or cancels an existing billing setup. @@ -57,23 +59,29 @@ service BillingSetupService { post: "/v2/customers/{customer_id=*}/billingSetups:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operation"; } } // Request message for // [BillingSetupService.GetBillingSetup][google.ads.googleads.v2.services.BillingSetupService.GetBillingSetup]. message GetBillingSetupRequest { - // The resource name of the billing setup to fetch. - string resource_name = 1; + // Required. The resource name of the billing setup to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BillingSetup" + } + ]; } // Request message for billing setup mutate operations. message MutateBillingSetupRequest { - // Id of the customer to apply the billing setup mutate operation to. - string customer_id = 1; + // Required. Id of the customer to apply the billing setup mutate operation to. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The operation to perform. - BillingSetupOperation operation = 2; + // Required. The operation to perform. + BillingSetupOperation operation = 2 [(google.api.field_behavior) = REQUIRED]; } // A single operation on a billing setup, which describes the cancellation of an diff --git a/google/ads/googleads/v2/services/campaign_audience_view_service.proto b/google/ads/googleads/v2/services/campaign_audience_view_service.proto index 410da40a2..073f5eff2 100644 --- a/google/ads/googleads/v2/services/campaign_audience_view_service.proto +++ b/google/ads/googleads/v2/services/campaign_audience_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/campaign_audience_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service CampaignAudienceViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/campaignAudienceViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [CampaignAudienceViewService.GetCampaignAudienceView][google.ads.googleads.v2.services.CampaignAudienceViewService.GetCampaignAudienceView]. message GetCampaignAudienceViewRequest { - // The resource name of the campaign audience view to fetch. - string resource_name = 1; + // Required. The resource name of the campaign audience view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignAudienceView" + } + ]; } diff --git a/google/ads/googleads/v2/services/campaign_bid_modifier_service.proto b/google/ads/googleads/v2/services/campaign_bid_modifier_service.proto index 3ed35d600..f8fc61b0e 100644 --- a/google/ads/googleads/v2/services/campaign_bid_modifier_service.proto +++ b/google/ads/googleads/v2/services/campaign_bid_modifier_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/campaign_bid_modifier.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service CampaignBidModifierService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/campaignBidModifiers/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes campaign bid modifiers. @@ -52,22 +54,28 @@ service CampaignBidModifierService { post: "/v2/customers/{customer_id=*}/campaignBidModifiers:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [CampaignBidModifierService.GetCampaignBidModifier][google.ads.googleads.v2.services.CampaignBidModifierService.GetCampaignBidModifier]. message GetCampaignBidModifierRequest { - // The resource name of the campaign bid modifier to fetch. - string resource_name = 1; + // Required. The resource name of the campaign bid modifier to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBidModifier" + } + ]; } // Request message for [CampaignBidModifierService.MutateCampaignBidModifier][]. message MutateCampaignBidModifiersRequest { - // ID of the customer whose campaign bid modifiers are being modified. - string customer_id = 1; + // Required. ID of the customer whose campaign bid modifiers are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaign bid modifiers. - repeated CampaignBidModifierOperation operations = 2; + // Required. The list of operations to perform on individual campaign bid modifiers. + repeated CampaignBidModifierOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/campaign_budget_service.proto b/google/ads/googleads/v2/services/campaign_budget_service.proto index a9171c897..ed7b9a66e 100644 --- a/google/ads/googleads/v2/services/campaign_budget_service.proto +++ b/google/ads/googleads/v2/services/campaign_budget_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/campaign_budget.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service CampaignBudgetService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/campaignBudgets/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes campaign budgets. Operation statuses are @@ -52,22 +54,28 @@ service CampaignBudgetService { post: "/v2/customers/{customer_id=*}/campaignBudgets:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [CampaignBudgetService.GetCampaignBudget][google.ads.googleads.v2.services.CampaignBudgetService.GetCampaignBudget]. message GetCampaignBudgetRequest { - // The resource name of the campaign budget to fetch. - string resource_name = 1; + // Required. The resource name of the campaign budget to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBudget" + } + ]; } // Request message for [CampaignBudgetService.MutateCampaignBudgets][google.ads.googleads.v2.services.CampaignBudgetService.MutateCampaignBudgets]. message MutateCampaignBudgetsRequest { - // The ID of the customer whose campaign budgets are being modified. - string customer_id = 1; + // Required. The ID of the customer whose campaign budgets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaign budgets. - repeated CampaignBudgetOperation operations = 2; + // Required. The list of operations to perform on individual campaign budgets. + repeated CampaignBudgetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/campaign_criterion_service.proto b/google/ads/googleads/v2/services/campaign_criterion_service.proto index ae4c60080..791bd33af 100644 --- a/google/ads/googleads/v2/services/campaign_criterion_service.proto +++ b/google/ads/googleads/v2/services/campaign_criterion_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/campaign_criterion.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service CampaignCriterionService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/campaignCriteria/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes criteria. Operation statuses are returned. @@ -51,22 +53,28 @@ service CampaignCriterionService { post: "/v2/customers/{customer_id=*}/campaignCriteria:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [CampaignCriterionService.GetCampaignCriterion][google.ads.googleads.v2.services.CampaignCriterionService.GetCampaignCriterion]. message GetCampaignCriterionRequest { - // The resource name of the criterion to fetch. - string resource_name = 1; + // Required. The resource name of the criterion to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterion" + } + ]; } // Request message for [CampaignCriterionService.MutateCampaignCriteria][google.ads.googleads.v2.services.CampaignCriterionService.MutateCampaignCriteria]. message MutateCampaignCriteriaRequest { - // The ID of the customer whose criteria are being modified. - string customer_id = 1; + // Required. The ID of the customer whose criteria are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual criteria. - repeated CampaignCriterionOperation operations = 2; + // Required. The list of operations to perform on individual criteria. + repeated CampaignCriterionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/campaign_criterion_simulation_service.proto b/google/ads/googleads/v2/services/campaign_criterion_simulation_service.proto index 2c7e8dd72..670092916 100644 --- a/google/ads/googleads/v2/services/campaign_criterion_simulation_service.proto +++ b/google/ads/googleads/v2/services/campaign_criterion_simulation_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/campaign_criterion_simulation.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,12 +42,18 @@ service CampaignCriterionSimulationService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/campaignCriterionSimulations/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [CampaignCriterionSimulationService.GetCampaignCriterionSimulation][google.ads.googleads.v2.services.CampaignCriterionSimulationService.GetCampaignCriterionSimulation]. message GetCampaignCriterionSimulationRequest { - // The resource name of the campaign criterion simulation to fetch. - string resource_name = 1; + // Required. The resource name of the campaign criterion simulation to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterionSimulation" + } + ]; } diff --git a/google/ads/googleads/v2/services/campaign_draft_service.proto b/google/ads/googleads/v2/services/campaign_draft_service.proto index bd0b6cb0d..ab44f78a9 100644 --- a/google/ads/googleads/v2/services/campaign_draft_service.proto +++ b/google/ads/googleads/v2/services/campaign_draft_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,10 +18,12 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/campaign_draft.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -44,6 +45,7 @@ service CampaignDraftService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/campaignDrafts/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes campaign drafts. Operation statuses are @@ -53,6 +55,7 @@ service CampaignDraftService { post: "/v2/customers/{customer_id=*}/campaignDrafts:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } // Promotes the changes in a draft back to the base campaign. @@ -69,6 +72,11 @@ service CampaignDraftService { post: "/v2/{campaign_draft=customers/*/campaignDrafts/*}:promote" body: "*" }; + option (google.api.method_signature) = "campaign_draft"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Empty" + }; } // Returns all errors that occurred during CampaignDraft promote. Throws an @@ -78,22 +86,28 @@ service CampaignDraftService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/campaignDrafts/*}:listAsyncErrors" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [CampaignDraftService.GetCampaignDraft][google.ads.googleads.v2.services.CampaignDraftService.GetCampaignDraft]. message GetCampaignDraftRequest { - // The resource name of the campaign draft to fetch. - string resource_name = 1; + // Required. The resource name of the campaign draft to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignDraft" + } + ]; } // Request message for [CampaignDraftService.MutateCampaignDrafts][google.ads.googleads.v2.services.CampaignDraftService.MutateCampaignDrafts]. message MutateCampaignDraftsRequest { - // The ID of the customer whose campaign drafts are being modified. - string customer_id = 1; + // Required. The ID of the customer whose campaign drafts are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaign drafts. - repeated CampaignDraftOperation operations = 2; + // Required. The list of operations to perform on individual campaign drafts. + repeated CampaignDraftOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -108,8 +122,8 @@ message MutateCampaignDraftsRequest { // Request message for [CampaignDraftService.PromoteCampaignDraft][google.ads.googleads.v2.services.CampaignDraftService.PromoteCampaignDraft]. message PromoteCampaignDraftRequest { - // The resource name of the campaign draft to promote. - string campaign_draft = 1; + // Required. The resource name of the campaign draft to promote. + string campaign_draft = 1 [(google.api.field_behavior) = REQUIRED]; } // A single operation (create, update, remove) on a campaign draft. @@ -155,8 +169,13 @@ message MutateCampaignDraftResult { // Request message for [CampaignDraftService.ListCampaignDraftAsyncErrors][google.ads.googleads.v2.services.CampaignDraftService.ListCampaignDraftAsyncErrors]. message ListCampaignDraftAsyncErrorsRequest { - // The name of the campaign draft from which to retrieve the async errors. - string resource_name = 1; + // Required. The name of the campaign draft from which to retrieve the async errors. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignDraft" + } + ]; // Token of the page to retrieve. If not specified, the first // page of results will be returned. Use the value obtained from diff --git a/google/ads/googleads/v2/services/campaign_experiment_service.proto b/google/ads/googleads/v2/services/campaign_experiment_service.proto index 8707bece2..c6e9eede2 100644 --- a/google/ads/googleads/v2/services/campaign_experiment_service.proto +++ b/google/ads/googleads/v2/services/campaign_experiment_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,11 +18,13 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/campaign_experiment.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -54,6 +55,7 @@ service CampaignExperimentService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/campaignExperiments/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates a campaign experiment based on a campaign draft. The draft campaign @@ -71,6 +73,11 @@ service CampaignExperimentService { post: "/v2/customers/{customer_id=*}/campaignExperiments:create" body: "*" }; + option (google.api.method_signature) = "customer_id,campaign_experiment"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.ads.googleads.v2.services.CreateCampaignExperimentMetadata" + }; } // Updates campaign experiments. Operation statuses are returned. @@ -79,6 +86,7 @@ service CampaignExperimentService { post: "/v2/customers/{customer_id=*}/campaignExperiments:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } // Graduates a campaign experiment to a full campaign. The base and experiment @@ -88,6 +96,7 @@ service CampaignExperimentService { post: "/v2/{campaign_experiment=customers/*/campaignExperiments/*}:graduate" body: "*" }; + option (google.api.method_signature) = "campaign_experiment,campaign_budget"; } // Promotes the changes in a experiment campaign back to the base campaign. @@ -101,6 +110,11 @@ service CampaignExperimentService { post: "/v2/{campaign_experiment=customers/*/campaignExperiments/*}:promote" body: "*" }; + option (google.api.method_signature) = "campaign_experiment"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Empty" + }; } // Immediately ends a campaign experiment, changing the experiment's scheduled @@ -111,6 +125,7 @@ service CampaignExperimentService { post: "/v2/{campaign_experiment=customers/*/campaignExperiments/*}:end" body: "*" }; + option (google.api.method_signature) = "campaign_experiment"; } // Returns all errors that occurred during CampaignExperiment create or @@ -120,22 +135,28 @@ service CampaignExperimentService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/campaignExperiments/*}:listAsyncErrors" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [CampaignExperimentService.GetCampaignExperiment][google.ads.googleads.v2.services.CampaignExperimentService.GetCampaignExperiment]. message GetCampaignExperimentRequest { - // The resource name of the campaign experiment to fetch. - string resource_name = 1; + // Required. The resource name of the campaign experiment to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExperiment" + } + ]; } // Request message for [CampaignExperimentService.MutateCampaignExperiments][google.ads.googleads.v2.services.CampaignExperimentService.MutateCampaignExperiments]. message MutateCampaignExperimentsRequest { - // The ID of the customer whose campaign experiments are being modified. - string customer_id = 1; + // Required. The ID of the customer whose campaign experiments are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaign experiments. - repeated CampaignExperimentOperation operations = 2; + // Required. The list of operations to perform on individual campaign experiments. + repeated CampaignExperimentOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -187,11 +208,11 @@ message MutateCampaignExperimentResult { // Request message for [CampaignExperimentService.CreateCampaignExperiment][google.ads.googleads.v2.services.CampaignExperimentService.CreateCampaignExperiment]. message CreateCampaignExperimentRequest { - // The ID of the customer whose campaign experiment is being created. - string customer_id = 1; + // Required. The ID of the customer whose campaign experiment is being created. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The campaign experiment to be created. - google.ads.googleads.v2.resources.CampaignExperiment campaign_experiment = 2; + // Required. The campaign experiment to be created. + google.ads.googleads.v2.resources.CampaignExperiment campaign_experiment = 2 [(google.api.field_behavior) = REQUIRED]; // If true, the request is validated but not executed. Only errors are // returned, not results. @@ -207,12 +228,12 @@ message CreateCampaignExperimentMetadata { // Request message for [CampaignExperimentService.GraduateCampaignExperiment][google.ads.googleads.v2.services.CampaignExperimentService.GraduateCampaignExperiment]. message GraduateCampaignExperimentRequest { - // The resource name of the campaign experiment to graduate. - string campaign_experiment = 1; + // Required. The resource name of the campaign experiment to graduate. + string campaign_experiment = 1 [(google.api.field_behavior) = REQUIRED]; - // Resource name of the budget to attach to the campaign graduated from the + // Required. Resource name of the budget to attach to the campaign graduated from the // experiment. - string campaign_budget = 2; + string campaign_budget = 2 [(google.api.field_behavior) = REQUIRED]; } // Response message for campaign experiment graduate. @@ -224,22 +245,27 @@ message GraduateCampaignExperimentResponse { // Request message for [CampaignExperimentService.PromoteCampaignExperiment][google.ads.googleads.v2.services.CampaignExperimentService.PromoteCampaignExperiment]. message PromoteCampaignExperimentRequest { - // The resource name of the campaign experiment to promote. - string campaign_experiment = 1; + // Required. The resource name of the campaign experiment to promote. + string campaign_experiment = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for [CampaignExperimentService.EndCampaignExperiment][google.ads.googleads.v2.services.CampaignExperimentService.EndCampaignExperiment]. message EndCampaignExperimentRequest { - // The resource name of the campaign experiment to end. - string campaign_experiment = 1; + // Required. The resource name of the campaign experiment to end. + string campaign_experiment = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [CampaignExperimentService.ListCampaignExperimentAsyncErrors][google.ads.googleads.v2.services.CampaignExperimentService.ListCampaignExperimentAsyncErrors]. message ListCampaignExperimentAsyncErrorsRequest { - // The name of the campaign experiment from which to retrieve the async + // Required. The name of the campaign experiment from which to retrieve the async // errors. - string resource_name = 1; + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExperiment" + } + ]; // Token of the page to retrieve. If not specified, the first // page of results will be returned. Use the value obtained from diff --git a/google/ads/googleads/v2/services/campaign_extension_setting_service.proto b/google/ads/googleads/v2/services/campaign_extension_setting_service.proto index 39f9221c2..04647610d 100644 --- a/google/ads/googleads/v2/services/campaign_extension_setting_service.proto +++ b/google/ads/googleads/v2/services/campaign_extension_setting_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/campaign_extension_setting.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service CampaignExtensionSettingService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/campaignExtensionSettings/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes campaign extension settings. Operation @@ -52,26 +54,32 @@ service CampaignExtensionSettingService { post: "/v2/customers/{customer_id=*}/campaignExtensionSettings:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for // [CampaignExtensionSettingService.GetCampaignExtensionSetting][google.ads.googleads.v2.services.CampaignExtensionSettingService.GetCampaignExtensionSetting]. message GetCampaignExtensionSettingRequest { - // The resource name of the campaign extension setting to fetch. - string resource_name = 1; + // Required. The resource name of the campaign extension setting to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExtensionSetting" + } + ]; } // Request message for // [CampaignExtensionSettingService.MutateCampaignExtensionSettings][google.ads.googleads.v2.services.CampaignExtensionSettingService.MutateCampaignExtensionSettings]. message MutateCampaignExtensionSettingsRequest { - // The ID of the customer whose campaign extension settings are being + // Required. The ID of the customer whose campaign extension settings are being // modified. - string customer_id = 1; + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaign extension + // Required. The list of operations to perform on individual campaign extension // settings. - repeated CampaignExtensionSettingOperation operations = 2; + repeated CampaignExtensionSettingOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/campaign_feed_service.proto b/google/ads/googleads/v2/services/campaign_feed_service.proto index 6cc483ea6..dbbc12822 100644 --- a/google/ads/googleads/v2/services/campaign_feed_service.proto +++ b/google/ads/googleads/v2/services/campaign_feed_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/campaign_feed.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service CampaignFeedService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/campaignFeeds/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes campaign feeds. Operation statuses are @@ -52,22 +54,28 @@ service CampaignFeedService { post: "/v2/customers/{customer_id=*}/campaignFeeds:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [CampaignFeedService.GetCampaignFeed][google.ads.googleads.v2.services.CampaignFeedService.GetCampaignFeed]. message GetCampaignFeedRequest { - // The resource name of the campaign feed to fetch. - string resource_name = 1; + // Required. The resource name of the campaign feed to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignFeed" + } + ]; } // Request message for [CampaignFeedService.MutateCampaignFeeds][google.ads.googleads.v2.services.CampaignFeedService.MutateCampaignFeeds]. message MutateCampaignFeedsRequest { - // The ID of the customer whose campaign feeds are being modified. - string customer_id = 1; + // Required. The ID of the customer whose campaign feeds are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaign feeds. - repeated CampaignFeedOperation operations = 2; + // Required. The list of operations to perform on individual campaign feeds. + repeated CampaignFeedOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/campaign_label_service.proto b/google/ads/googleads/v2/services/campaign_label_service.proto index b08184df8..e8f68ad81 100644 --- a/google/ads/googleads/v2/services/campaign_label_service.proto +++ b/google/ads/googleads/v2/services/campaign_label_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/campaign_label.proto"; import "google/api/annotations.proto"; -import "google/rpc/status.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -42,6 +43,7 @@ service CampaignLabelService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/campaignLabels/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates and removes campaign-label relationships. @@ -51,22 +53,28 @@ service CampaignLabelService { post: "/v2/customers/{customer_id=*}/campaignLabels:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [CampaignLabelService.GetCampaignLabel][google.ads.googleads.v2.services.CampaignLabelService.GetCampaignLabel]. message GetCampaignLabelRequest { - // The resource name of the campaign-label relationship to fetch. - string resource_name = 1; + // Required. The resource name of the campaign-label relationship to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignLabel" + } + ]; } // Request message for [CampaignLabelService.MutateCampaignLabels][google.ads.googleads.v2.services.CampaignLabelService.MutateCampaignLabels]. message MutateCampaignLabelsRequest { - // ID of the customer whose campaign-label relationships are being modified. - string customer_id = 1; + // Required. ID of the customer whose campaign-label relationships are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on campaign-label relationships. - repeated CampaignLabelOperation operations = 2; + // Required. The list of operations to perform on campaign-label relationships. + repeated CampaignLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/campaign_service.proto b/google/ads/googleads/v2/services/campaign_service.proto index d972fa6cd..77ba8364a 100644 --- a/google/ads/googleads/v2/services/campaign_service.proto +++ b/google/ads/googleads/v2/services/campaign_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/campaign.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service CampaignService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/campaigns/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes campaigns. Operation statuses are returned. @@ -51,22 +53,28 @@ service CampaignService { post: "/v2/customers/{customer_id=*}/campaigns:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [CampaignService.GetCampaign][google.ads.googleads.v2.services.CampaignService.GetCampaign]. message GetCampaignRequest { - // The resource name of the campaign to fetch. - string resource_name = 1; + // Required. The resource name of the campaign to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; } // Request message for [CampaignService.MutateCampaigns][google.ads.googleads.v2.services.CampaignService.MutateCampaigns]. message MutateCampaignsRequest { - // The ID of the customer whose campaigns are being modified. - string customer_id = 1; + // Required. The ID of the customer whose campaigns are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaigns. - repeated CampaignOperation operations = 2; + // Required. The list of operations to perform on individual campaigns. + repeated CampaignOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/campaign_shared_set_service.proto b/google/ads/googleads/v2/services/campaign_shared_set_service.proto index 9e358599c..778693aea 100644 --- a/google/ads/googleads/v2/services/campaign_shared_set_service.proto +++ b/google/ads/googleads/v2/services/campaign_shared_set_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/campaign_shared_set.proto"; import "google/api/annotations.proto"; -import "google/rpc/status.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -42,6 +43,7 @@ service CampaignSharedSetService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/campaignSharedSets/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or removes campaign shared sets. Operation statuses are returned. @@ -50,22 +52,28 @@ service CampaignSharedSetService { post: "/v2/customers/{customer_id=*}/campaignSharedSets:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [CampaignSharedSetService.GetCampaignSharedSet][google.ads.googleads.v2.services.CampaignSharedSetService.GetCampaignSharedSet]. message GetCampaignSharedSetRequest { - // The resource name of the campaign shared set to fetch. - string resource_name = 1; + // Required. The resource name of the campaign shared set to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignSharedSet" + } + ]; } // Request message for [CampaignSharedSetService.MutateCampaignSharedSets][google.ads.googleads.v2.services.CampaignSharedSetService.MutateCampaignSharedSets]. message MutateCampaignSharedSetsRequest { - // The ID of the customer whose campaign shared sets are being modified. - string customer_id = 1; + // Required. The ID of the customer whose campaign shared sets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual campaign shared sets. - repeated CampaignSharedSetOperation operations = 2; + // Required. The list of operations to perform on individual campaign shared sets. + repeated CampaignSharedSetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/carrier_constant_service.proto b/google/ads/googleads/v2/services/carrier_constant_service.proto index 20cc19c9a..e8592dc0f 100644 --- a/google/ads/googleads/v2/services/carrier_constant_service.proto +++ b/google/ads/googleads/v2/services/carrier_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/carrier_constant.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service CarrierConstantService { option (google.api.http) = { get: "/v2/{resource_name=carrierConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [CarrierConstantService.GetCarrierConstant][google.ads.googleads.v2.services.CarrierConstantService.GetCarrierConstant]. message GetCarrierConstantRequest { - // Resource name of the carrier constant to fetch. - string resource_name = 1; + // Required. Resource name of the carrier constant to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CarrierConstant" + } + ]; } diff --git a/google/ads/googleads/v2/services/change_status_service.proto b/google/ads/googleads/v2/services/change_status_service.proto index 29014b304..4402e16a3 100644 --- a/google/ads/googleads/v2/services/change_status_service.proto +++ b/google/ads/googleads/v2/services/change_status_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/change_status.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service ChangeStatusService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/changeStatus/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for '[ChangeStatusService.GetChangeStatus][google.ads.googleads.v2.services.ChangeStatusService.GetChangeStatus]'. message GetChangeStatusRequest { - // The resource name of the change status to fetch. - string resource_name = 1; + // Required. The resource name of the change status to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ChangeStatus" + } + ]; } diff --git a/google/ads/googleads/v2/services/click_view_service.proto b/google/ads/googleads/v2/services/click_view_service.proto index f6a68b142..fe002e75d 100644 --- a/google/ads/googleads/v2/services/click_view_service.proto +++ b/google/ads/googleads/v2/services/click_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/click_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service ClickViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/clickViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [ClickViewService.GetClickView][google.ads.googleads.v2.services.ClickViewService.GetClickView]. message GetClickViewRequest { - // The resource name of the click view to fetch. - string resource_name = 1; + // Required. The resource name of the click view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ClickView" + } + ]; } diff --git a/google/ads/googleads/v2/services/conversion_action_service.proto b/google/ads/googleads/v2/services/conversion_action_service.proto index d056d551d..571055485 100644 --- a/google/ads/googleads/v2/services/conversion_action_service.proto +++ b/google/ads/googleads/v2/services/conversion_action_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/conversion_action.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service ConversionActionService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/conversionActions/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates or removes conversion actions. Operation statuses are @@ -52,22 +54,28 @@ service ConversionActionService { post: "/v2/customers/{customer_id=*}/conversionActions:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [ConversionActionService.GetConversionAction][google.ads.googleads.v2.services.ConversionActionService.GetConversionAction]. message GetConversionActionRequest { - // The resource name of the conversion action to fetch. - string resource_name = 1; + // Required. The resource name of the conversion action to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ConversionAction" + } + ]; } // Request message for [ConversionActionService.MutateConversionActions][google.ads.googleads.v2.services.ConversionActionService.MutateConversionActions]. message MutateConversionActionsRequest { - // The ID of the customer whose conversion actions are being modified. - string customer_id = 1; + // Required. The ID of the customer whose conversion actions are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual conversion actions. - repeated ConversionActionOperation operations = 2; + // Required. The list of operations to perform on individual conversion actions. + repeated ConversionActionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/conversion_adjustment_upload_service.proto b/google/ads/googleads/v2/services/conversion_adjustment_upload_service.proto index 7b643cfad..96c65bf3f 100644 --- a/google/ads/googleads/v2/services/conversion_adjustment_upload_service.proto +++ b/google/ads/googleads/v2/services/conversion_adjustment_upload_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/enums/conversion_adjustment_type.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -42,17 +42,18 @@ service ConversionAdjustmentUploadService { post: "/v2/customers/{customer_id=*}:uploadConversionAdjustments" body: "*" }; + option (google.api.method_signature) = "customer_id,conversion_adjustments"; } } // Request message for // [ConversionAdjustmentUploadService.UploadConversionAdjustments][google.ads.googleads.v2.services.ConversionAdjustmentUploadService.UploadConversionAdjustments]. message UploadConversionAdjustmentsRequest { - // The ID of the customer performing the upload. - string customer_id = 1; + // Required. The ID of the customer performing the upload. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The conversion adjustments that are being uploaded. - repeated ConversionAdjustment conversion_adjustments = 2; + // Required. The conversion adjustments that are being uploaded. + repeated ConversionAdjustment conversion_adjustments = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried out diff --git a/google/ads/googleads/v2/services/conversion_upload_service.proto b/google/ads/googleads/v2/services/conversion_upload_service.proto index de70a7909..bd5ab39c6 100644 --- a/google/ads/googleads/v2/services/conversion_upload_service.proto +++ b/google/ads/googleads/v2/services/conversion_upload_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,16 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.ads.googleads.v2.services; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,6 +41,7 @@ service ConversionUploadService { post: "/v2/customers/{customer_id=*}:uploadClickConversions" body: "*" }; + option (google.api.method_signature) = "customer_id,conversions"; } // Processes the given call conversions. @@ -49,16 +50,17 @@ service ConversionUploadService { post: "/v2/customers/{customer_id=*}:uploadCallConversions" body: "*" }; + option (google.api.method_signature) = "customer_id,conversions"; } } // Request message for [ConversionUploadService.UploadClickConversions][google.ads.googleads.v2.services.ConversionUploadService.UploadClickConversions]. message UploadClickConversionsRequest { - // The ID of the customer performing the upload. - string customer_id = 1; + // Required. The ID of the customer performing the upload. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The conversions that are being uploaded. - repeated ClickConversion conversions = 2; + // Required. The conversions that are being uploaded. + repeated ClickConversion conversions = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -86,11 +88,11 @@ message UploadClickConversionsResponse { // Request message for [ConversionUploadService.UploadCallConversions][google.ads.googleads.v2.services.ConversionUploadService.UploadCallConversions]. message UploadCallConversionsRequest { - // The ID of the customer performing the upload. - string customer_id = 1; + // Required. The ID of the customer performing the upload. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The conversions that are being uploaded. - repeated CallConversion conversions = 2; + // Required. The conversions that are being uploaded. + repeated CallConversion conversions = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/custom_interest_service.proto b/google/ads/googleads/v2/services/custom_interest_service.proto index eef10f29f..11fa505b0 100644 --- a/google/ads/googleads/v2/services/custom_interest_service.proto +++ b/google/ads/googleads/v2/services/custom_interest_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/custom_interest.proto"; import "google/api/annotations.proto"; -import "google/protobuf/field_mask.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -42,6 +43,7 @@ service CustomInterestService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/customInterests/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or updates custom interests. Operation statuses are returned. @@ -50,22 +52,28 @@ service CustomInterestService { post: "/v2/customers/{customer_id=*}/customInterests:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [CustomInterestService.GetCustomInterest][google.ads.googleads.v2.services.CustomInterestService.GetCustomInterest]. message GetCustomInterestRequest { - // The resource name of the custom interest to fetch. - string resource_name = 1; + // Required. The resource name of the custom interest to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomInterest" + } + ]; } // Request message for [CustomInterestService.MutateCustomInterests][google.ads.googleads.v2.services.CustomInterestService.MutateCustomInterests]. message MutateCustomInterestsRequest { - // The ID of the customer whose custom interests are being modified. - string customer_id = 1; + // Required. The ID of the customer whose custom interests are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual custom interests. - repeated CustomInterestOperation operations = 2; + // Required. The list of operations to perform on individual custom interests. + repeated CustomInterestOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, the request is validated but not executed. Only errors are // returned, not results. diff --git a/google/ads/googleads/v2/services/customer_client_link_service.proto b/google/ads/googleads/v2/services/customer_client_link_service.proto index 747309999..198a48780 100644 --- a/google/ads/googleads/v2/services/customer_client_link_service.proto +++ b/google/ads/googleads/v2/services/customer_client_link_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/customer_client_link.proto"; import "google/api/annotations.proto"; -import "google/protobuf/field_mask.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -40,6 +41,7 @@ service CustomerClientLinkService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/customerClientLinks/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or updates a customer client link. Operation statuses are returned. @@ -48,22 +50,28 @@ service CustomerClientLinkService { post: "/v2/customers/{customer_id=*}/customerClientLinks:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operation"; } } // Request message for [CustomerClientLinkService.GetCustomerClientLink][google.ads.googleads.v2.services.CustomerClientLinkService.GetCustomerClientLink]. message GetCustomerClientLinkRequest { - // The resource name of the customer client link to fetch. - string resource_name = 1; + // Required. The resource name of the customer client link to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerClientLink" + } + ]; } // Request message for [CustomerClientLinkService.MutateCustomerClientLink][google.ads.googleads.v2.services.CustomerClientLinkService.MutateCustomerClientLink]. message MutateCustomerClientLinkRequest { - // The ID of the customer whose customer link are being modified. - string customer_id = 1; + // Required. The ID of the customer whose customer link are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The operation to perform on the individual CustomerClientLink. - CustomerClientLinkOperation operation = 2; + // Required. The operation to perform on the individual CustomerClientLink. + CustomerClientLinkOperation operation = 2 [(google.api.field_behavior) = REQUIRED]; } // A single operation (create, update) on a CustomerClientLink. diff --git a/google/ads/googleads/v2/services/customer_client_service.proto b/google/ads/googleads/v2/services/customer_client_service.proto index 495d8c118..99f60b2ed 100644 --- a/google/ads/googleads/v2/services/customer_client_service.proto +++ b/google/ads/googleads/v2/services/customer_client_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/customer_client.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service CustomerClientService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/customerClients/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [CustomerClientService.GetCustomerClient][google.ads.googleads.v2.services.CustomerClientService.GetCustomerClient]. message GetCustomerClientRequest { - // The resource name of the client to fetch. - string resource_name = 1; + // Required. The resource name of the client to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerClient" + } + ]; } diff --git a/google/ads/googleads/v2/services/customer_extension_setting_service.proto b/google/ads/googleads/v2/services/customer_extension_setting_service.proto index 7dce72c4a..bd08f5eb8 100644 --- a/google/ads/googleads/v2/services/customer_extension_setting_service.proto +++ b/google/ads/googleads/v2/services/customer_extension_setting_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/customer_extension_setting.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service CustomerExtensionSettingService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/customerExtensionSettings/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes customer extension settings. Operation @@ -52,26 +54,32 @@ service CustomerExtensionSettingService { post: "/v2/customers/{customer_id=*}/customerExtensionSettings:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for // [CustomerExtensionSettingService.GetCustomerExtensionSetting][google.ads.googleads.v2.services.CustomerExtensionSettingService.GetCustomerExtensionSetting]. message GetCustomerExtensionSettingRequest { - // The resource name of the customer extension setting to fetch. - string resource_name = 1; + // Required. The resource name of the customer extension setting to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerExtensionSetting" + } + ]; } // Request message for // [CustomerExtensionSettingService.MutateCustomerExtensionSettings][google.ads.googleads.v2.services.CustomerExtensionSettingService.MutateCustomerExtensionSettings]. message MutateCustomerExtensionSettingsRequest { - // The ID of the customer whose customer extension settings are being + // Required. The ID of the customer whose customer extension settings are being // modified. - string customer_id = 1; + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual customer extension + // Required. The list of operations to perform on individual customer extension // settings. - repeated CustomerExtensionSettingOperation operations = 2; + repeated CustomerExtensionSettingOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/customer_feed_service.proto b/google/ads/googleads/v2/services/customer_feed_service.proto index 5cfde1128..ee15cd526 100644 --- a/google/ads/googleads/v2/services/customer_feed_service.proto +++ b/google/ads/googleads/v2/services/customer_feed_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/customer_feed.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service CustomerFeedService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/customerFeeds/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes customer feeds. Operation statuses are @@ -52,22 +54,28 @@ service CustomerFeedService { post: "/v2/customers/{customer_id=*}/customerFeeds:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [CustomerFeedService.GetCustomerFeed][google.ads.googleads.v2.services.CustomerFeedService.GetCustomerFeed]. message GetCustomerFeedRequest { - // The resource name of the customer feed to fetch. - string resource_name = 1; + // Required. The resource name of the customer feed to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerFeed" + } + ]; } // Request message for [CustomerFeedService.MutateCustomerFeeds][google.ads.googleads.v2.services.CustomerFeedService.MutateCustomerFeeds]. message MutateCustomerFeedsRequest { - // The ID of the customer whose customer feeds are being modified. - string customer_id = 1; + // Required. The ID of the customer whose customer feeds are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual customer feeds. - repeated CustomerFeedOperation operations = 2; + // Required. The list of operations to perform on individual customer feeds. + repeated CustomerFeedOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/customer_label_service.proto b/google/ads/googleads/v2/services/customer_label_service.proto index 00f8cb254..e8424b664 100644 --- a/google/ads/googleads/v2/services/customer_label_service.proto +++ b/google/ads/googleads/v2/services/customer_label_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/customer_label.proto"; import "google/api/annotations.proto"; -import "google/rpc/status.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -42,6 +43,7 @@ service CustomerLabelService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/customerLabels/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates and removes customer-label relationships. @@ -51,22 +53,28 @@ service CustomerLabelService { post: "/v2/customers/{customer_id=*}/customerLabels:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [CustomerLabelService.GetCustomerLabel][google.ads.googleads.v2.services.CustomerLabelService.GetCustomerLabel]. message GetCustomerLabelRequest { - // The resource name of the customer-label relationship to fetch. - string resource_name = 1; + // Required. The resource name of the customer-label relationship to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerLabel" + } + ]; } // Request message for [CustomerLabelService.MutateCustomerLabels][google.ads.googleads.v2.services.CustomerLabelService.MutateCustomerLabels]. message MutateCustomerLabelsRequest { - // ID of the customer whose customer-label relationships are being modified. - string customer_id = 1; + // Required. ID of the customer whose customer-label relationships are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on customer-label relationships. - repeated CustomerLabelOperation operations = 2; + // Required. The list of operations to perform on customer-label relationships. + repeated CustomerLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/customer_manager_link_service.proto b/google/ads/googleads/v2/services/customer_manager_link_service.proto index b98cb3df1..6b89892fa 100644 --- a/google/ads/googleads/v2/services/customer_manager_link_service.proto +++ b/google/ads/googleads/v2/services/customer_manager_link_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/customer_manager_link.proto"; import "google/api/annotations.proto"; -import "google/protobuf/field_mask.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -40,6 +41,7 @@ service CustomerManagerLinkService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/customerManagerLinks/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or updates customer manager links. Operation statuses are returned. @@ -48,22 +50,28 @@ service CustomerManagerLinkService { post: "/v2/customers/{customer_id=*}/customerManagerLinks:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [CustomerManagerLinkService.GetCustomerManagerLink][google.ads.googleads.v2.services.CustomerManagerLinkService.GetCustomerManagerLink]. message GetCustomerManagerLinkRequest { - // The resource name of the CustomerManagerLink to fetch. - string resource_name = 1; + // Required. The resource name of the CustomerManagerLink to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerManagerLink" + } + ]; } // Request message for [CustomerManagerLinkService.MutateCustomerManagerLink][google.ads.googleads.v2.services.CustomerManagerLinkService.MutateCustomerManagerLink]. message MutateCustomerManagerLinkRequest { - // The ID of the customer whose customer manager links are being modified. - string customer_id = 1; + // Required. The ID of the customer whose customer manager links are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual customer manager links. - repeated CustomerManagerLinkOperation operations = 2; + // Required. The list of operations to perform on individual customer manager links. + repeated CustomerManagerLinkOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; } // Updates the status of a CustomerManagerLink. diff --git a/google/ads/googleads/v2/services/customer_negative_criterion_service.proto b/google/ads/googleads/v2/services/customer_negative_criterion_service.proto index bcd6d2a2d..bdb7aa50c 100644 --- a/google/ads/googleads/v2/services/customer_negative_criterion_service.proto +++ b/google/ads/googleads/v2/services/customer_negative_criterion_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/customer_negative_criterion.proto"; import "google/api/annotations.proto"; -import "google/rpc/status.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -42,6 +43,7 @@ service CustomerNegativeCriterionService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/customerNegativeCriteria/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or removes criteria. Operation statuses are returned. @@ -50,24 +52,30 @@ service CustomerNegativeCriterionService { post: "/v2/customers/{customer_id=*}/customerNegativeCriteria:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for // [CustomerNegativeCriterionService.GetCustomerNegativeCriterion][google.ads.googleads.v2.services.CustomerNegativeCriterionService.GetCustomerNegativeCriterion]. message GetCustomerNegativeCriterionRequest { - // The resource name of the criterion to fetch. - string resource_name = 1; + // Required. The resource name of the criterion to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerNegativeCriterion" + } + ]; } // Request message for // [CustomerNegativeCriterionService.MutateCustomerNegativeCriteria][google.ads.googleads.v2.services.CustomerNegativeCriterionService.MutateCustomerNegativeCriteria]. message MutateCustomerNegativeCriteriaRequest { - // The ID of the customer whose criteria are being modified. - string customer_id = 1; + // Required. The ID of the customer whose criteria are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual criteria. - repeated CustomerNegativeCriterionOperation operations = 2; + // Required. The list of operations to perform on individual criteria. + repeated CustomerNegativeCriterionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/customer_service.proto b/google/ads/googleads/v2/services/customer_service.proto index beba6c60e..260999b61 100644 --- a/google/ads/googleads/v2/services/customer_service.proto +++ b/google/ads/googleads/v2/services/customer_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,9 +19,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/enums/access_role.proto"; import "google/ads/googleads/v2/resources/customer.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/wrappers.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -44,6 +45,7 @@ service CustomerService { option (google.api.http) = { get: "/v2/{resource_name=customers/*}" }; + option (google.api.method_signature) = "resource_name"; } // Updates a customer. Operation statuses are returned. @@ -52,6 +54,7 @@ service CustomerService { post: "/v2/customers/{customer_id=*}:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operation"; } // Returns resource names of customers directly accessible by the @@ -68,22 +71,28 @@ service CustomerService { post: "/v2/customers/{customer_id=*}:createCustomerClient" body: "*" }; + option (google.api.method_signature) = "customer_id,customer_client"; } } // Request message for [CustomerService.GetCustomer][google.ads.googleads.v2.services.CustomerService.GetCustomer]. message GetCustomerRequest { - // The resource name of the customer to fetch. - string resource_name = 1; + // Required. The resource name of the customer to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Customer" + } + ]; } // Request message for [CustomerService.MutateCustomer][google.ads.googleads.v2.services.CustomerService.MutateCustomer]. message MutateCustomerRequest { - // The ID of the customer being modified. - string customer_id = 1; + // Required. The ID of the customer being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The operation to perform on the customer - CustomerOperation operation = 4; + // Required. The operation to perform on the customer + CustomerOperation operation = 4 [(google.api.field_behavior) = REQUIRED]; // If true, the request is validated but not executed. Only errors are // returned, not results. @@ -92,12 +101,12 @@ message MutateCustomerRequest { // Request message for [CustomerService.CreateCustomerClient][google.ads.googleads.v2.services.CustomerService.CreateCustomerClient]. message CreateCustomerClientRequest { - // The ID of the Manager under whom client customer is being created. - string customer_id = 1; + // Required. The ID of the Manager under whom client customer is being created. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The new client customer to create. The resource name on this customer + // Required. The new client customer to create. The resource name on this customer // will be ignored. - google.ads.googleads.v2.resources.Customer customer_client = 2; + google.ads.googleads.v2.resources.Customer customer_client = 2 [(google.api.field_behavior) = REQUIRED]; // Email address of the user who should be invited on the created client // customer. Accessible to whitelisted customers only. diff --git a/google/ads/googleads/v2/services/detail_placement_view_service.proto b/google/ads/googleads/v2/services/detail_placement_view_service.proto index 21847c11b..bfcb3a5f6 100644 --- a/google/ads/googleads/v2/services/detail_placement_view_service.proto +++ b/google/ads/googleads/v2/services/detail_placement_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/detail_placement_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service DetailPlacementViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/detailPlacementViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [DetailPlacementViewService.GetDetailPlacementView][google.ads.googleads.v2.services.DetailPlacementViewService.GetDetailPlacementView]. message GetDetailPlacementViewRequest { - // The resource name of the Detail Placement view to fetch. - string resource_name = 1; + // Required. The resource name of the Detail Placement view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DetailPlacementView" + } + ]; } diff --git a/google/ads/googleads/v2/services/display_keyword_view_service.proto b/google/ads/googleads/v2/services/display_keyword_view_service.proto index 22c82bf5f..98693bbf4 100644 --- a/google/ads/googleads/v2/services/display_keyword_view_service.proto +++ b/google/ads/googleads/v2/services/display_keyword_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/display_keyword_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service DisplayKeywordViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/displayKeywordViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [DisplayKeywordViewService.GetDisplayKeywordView][google.ads.googleads.v2.services.DisplayKeywordViewService.GetDisplayKeywordView]. message GetDisplayKeywordViewRequest { - // The resource name of the display keyword view to fetch. - string resource_name = 1; + // Required. The resource name of the display keyword view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DisplayKeywordView" + } + ]; } diff --git a/google/ads/googleads/v2/services/distance_view_service.proto b/google/ads/googleads/v2/services/distance_view_service.proto index 44ffaf91e..75440d2b4 100644 --- a/google/ads/googleads/v2/services/distance_view_service.proto +++ b/google/ads/googleads/v2/services/distance_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/distance_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service DistanceViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/distanceViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [DistanceViewService.GetDistanceView][google.ads.googleads.v2.services.DistanceViewService.GetDistanceView]. message GetDistanceViewRequest { - // The resource name of the distance view to fetch. - string resource_name = 1; + // Required. The resource name of the distance view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DistanceView" + } + ]; } diff --git a/google/ads/googleads/v2/services/domain_category_service.proto b/google/ads/googleads/v2/services/domain_category_service.proto index eba38c15d..2b6242da6 100644 --- a/google/ads/googleads/v2/services/domain_category_service.proto +++ b/google/ads/googleads/v2/services/domain_category_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/domain_category.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,12 +42,18 @@ service DomainCategoryService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/domainCategories/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [DomainCategoryService.GetDomainCategory][google.ads.googleads.v2.services.DomainCategoryService.GetDomainCategory]. message GetDomainCategoryRequest { - // Resource name of the domain category to fetch. - string resource_name = 1; + // Required. Resource name of the domain category to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DomainCategory" + } + ]; } diff --git a/google/ads/googleads/v2/services/dynamic_search_ads_search_term_view_service.proto b/google/ads/googleads/v2/services/dynamic_search_ads_search_term_view_service.proto index 922b7e705..3bb4dd6c1 100644 --- a/google/ads/googleads/v2/services/dynamic_search_ads_search_term_view_service.proto +++ b/google/ads/googleads/v2/services/dynamic_search_ads_search_term_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/dynamic_search_ads_search_term_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,12 +42,18 @@ service DynamicSearchAdsSearchTermViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/dynamicSearchAdsSearchTermViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [DynamicSearchAdsSearchTermViewService.GetDynamicSearchAdsSearchTermView][google.ads.googleads.v2.services.DynamicSearchAdsSearchTermViewService.GetDynamicSearchAdsSearchTermView]. message GetDynamicSearchAdsSearchTermViewRequest { - // The resource name of the dynamic search ads search term view to fetch. - string resource_name = 1; + // Required. The resource name of the dynamic search ads search term view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DynamicSearchAdsSearchTermView" + } + ]; } diff --git a/google/ads/googleads/v2/services/expanded_landing_page_view_service.proto b/google/ads/googleads/v2/services/expanded_landing_page_view_service.proto index 96cf5701d..d7b26b5a0 100644 --- a/google/ads/googleads/v2/services/expanded_landing_page_view_service.proto +++ b/google/ads/googleads/v2/services/expanded_landing_page_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/expanded_landing_page_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,12 +42,18 @@ service ExpandedLandingPageViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/expandedLandingPageViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [ExpandedLandingPageViewService.GetExpandedLandingPageView][google.ads.googleads.v2.services.ExpandedLandingPageViewService.GetExpandedLandingPageView]. message GetExpandedLandingPageViewRequest { - // The resource name of the expanded landing page view to fetch. - string resource_name = 1; + // Required. The resource name of the expanded landing page view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ExpandedLandingPageView" + } + ]; } diff --git a/google/ads/googleads/v2/services/extension_feed_item_service.proto b/google/ads/googleads/v2/services/extension_feed_item_service.proto index 5a5f65bf6..fa2ccb4f4 100644 --- a/google/ads/googleads/v2/services/extension_feed_item_service.proto +++ b/google/ads/googleads/v2/services/extension_feed_item_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/extension_feed_item.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service ExtensionFeedItemService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/extensionFeedItems/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes extension feed items. Operation @@ -52,23 +54,29 @@ service ExtensionFeedItemService { post: "/v2/customers/{customer_id=*}/extensionFeedItems:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [ExtensionFeedItemService.GetExtensionFeedItem][google.ads.googleads.v2.services.ExtensionFeedItemService.GetExtensionFeedItem]. message GetExtensionFeedItemRequest { - // The resource name of the extension feed item to fetch. - string resource_name = 1; + // Required. The resource name of the extension feed item to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + } + ]; } // Request message for [ExtensionFeedItemService.MutateExtensionFeedItems][google.ads.googleads.v2.services.ExtensionFeedItemService.MutateExtensionFeedItems]. message MutateExtensionFeedItemsRequest { - // The ID of the customer whose extension feed items are being + // Required. The ID of the customer whose extension feed items are being // modified. - string customer_id = 1; + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual extension feed items. - repeated ExtensionFeedItemOperation operations = 2; + // Required. The list of operations to perform on individual extension feed items. + repeated ExtensionFeedItemOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/feed_item_service.proto b/google/ads/googleads/v2/services/feed_item_service.proto index 3387c28f4..a91fb15f6 100644 --- a/google/ads/googleads/v2/services/feed_item_service.proto +++ b/google/ads/googleads/v2/services/feed_item_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/feed_item.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service FeedItemService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/feedItems/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes feed items. Operation statuses are @@ -52,22 +54,28 @@ service FeedItemService { post: "/v2/customers/{customer_id=*}/feedItems:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [FeedItemService.GetFeedItem][google.ads.googleads.v2.services.FeedItemService.GetFeedItem]. message GetFeedItemRequest { - // The resource name of the feed item to fetch. - string resource_name = 1; + // Required. The resource name of the feed item to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItem" + } + ]; } // Request message for [FeedItemService.MutateFeedItems][google.ads.googleads.v2.services.FeedItemService.MutateFeedItems]. message MutateFeedItemsRequest { - // The ID of the customer whose feed items are being modified. - string customer_id = 1; + // Required. The ID of the customer whose feed items are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual feed items. - repeated FeedItemOperation operations = 2; + // Required. The list of operations to perform on individual feed items. + repeated FeedItemOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/feed_item_target_service.proto b/google/ads/googleads/v2/services/feed_item_target_service.proto index 33a30f80a..b683d7f3c 100644 --- a/google/ads/googleads/v2/services/feed_item_target_service.proto +++ b/google/ads/googleads/v2/services/feed_item_target_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/feed_item_target.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,6 +42,7 @@ service FeedItemTargetService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/feedItemTargets/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or removes feed item targets. Operation statuses are returned. @@ -49,22 +51,28 @@ service FeedItemTargetService { post: "/v2/customers/{customer_id=*}/feedItemTargets:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [FeedItemTargetService.GetFeedItemTarget][google.ads.googleads.v2.services.FeedItemTargetService.GetFeedItemTarget]. message GetFeedItemTargetRequest { - // The resource name of the feed item targets to fetch. - string resource_name = 1; + // Required. The resource name of the feed item targets to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItemTarget" + } + ]; } // Request message for [FeedItemTargetService.MutateFeedItemTargets][google.ads.googleads.v2.services.FeedItemTargetService.MutateFeedItemTargets]. message MutateFeedItemTargetsRequest { - // The ID of the customer whose feed item targets are being modified. - string customer_id = 1; + // Required. The ID of the customer whose feed item targets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual feed item targets. - repeated FeedItemTargetOperation operations = 2; + // Required. The list of operations to perform on individual feed item targets. + repeated FeedItemTargetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; } // A single operation (create, remove) on an feed item target. diff --git a/google/ads/googleads/v2/services/feed_mapping_service.proto b/google/ads/googleads/v2/services/feed_mapping_service.proto index c27fc80a4..932599c46 100644 --- a/google/ads/googleads/v2/services/feed_mapping_service.proto +++ b/google/ads/googleads/v2/services/feed_mapping_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/feed_mapping.proto"; import "google/api/annotations.proto"; -import "google/rpc/status.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -42,6 +43,7 @@ service FeedMappingService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/feedMappings/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or removes feed mappings. Operation statuses are @@ -51,22 +53,28 @@ service FeedMappingService { post: "/v2/customers/{customer_id=*}/feedMappings:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [FeedMappingService.GetFeedMapping][google.ads.googleads.v2.services.FeedMappingService.GetFeedMapping]. message GetFeedMappingRequest { - // The resource name of the feed mapping to fetch. - string resource_name = 1; + // Required. The resource name of the feed mapping to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedMapping" + } + ]; } // Request message for [FeedMappingService.MutateFeedMappings][google.ads.googleads.v2.services.FeedMappingService.MutateFeedMappings]. message MutateFeedMappingsRequest { - // The ID of the customer whose feed mappings are being modified. - string customer_id = 1; + // Required. The ID of the customer whose feed mappings are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual feed mappings. - repeated FeedMappingOperation operations = 2; + // Required. The list of operations to perform on individual feed mappings. + repeated FeedMappingOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/feed_placeholder_view_service.proto b/google/ads/googleads/v2/services/feed_placeholder_view_service.proto index 03f7520b8..8dd0feaa1 100644 --- a/google/ads/googleads/v2/services/feed_placeholder_view_service.proto +++ b/google/ads/googleads/v2/services/feed_placeholder_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/feed_placeholder_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service FeedPlaceholderViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/feedPlaceholderViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [FeedPlaceholderViewService.GetFeedPlaceholderView][google.ads.googleads.v2.services.FeedPlaceholderViewService.GetFeedPlaceholderView]. message GetFeedPlaceholderViewRequest { - // The resource name of the feed placeholder view to fetch. - string resource_name = 1; + // Required. The resource name of the feed placeholder view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedPlaceholderView" + } + ]; } diff --git a/google/ads/googleads/v2/services/feed_service.proto b/google/ads/googleads/v2/services/feed_service.proto index e3f667b64..b3cb5c624 100644 --- a/google/ads/googleads/v2/services/feed_service.proto +++ b/google/ads/googleads/v2/services/feed_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/feed.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service FeedService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/feeds/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes feeds. Operation statuses are @@ -52,22 +54,28 @@ service FeedService { post: "/v2/customers/{customer_id=*}/feeds:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [FeedService.GetFeed][google.ads.googleads.v2.services.FeedService.GetFeed]. message GetFeedRequest { - // The resource name of the feed to fetch. - string resource_name = 1; + // Required. The resource name of the feed to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; } // Request message for [FeedService.MutateFeeds][google.ads.googleads.v2.services.FeedService.MutateFeeds]. message MutateFeedsRequest { - // The ID of the customer whose feeds are being modified. - string customer_id = 1; + // Required. The ID of the customer whose feeds are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual feeds. - repeated FeedOperation operations = 2; + // Required. The list of operations to perform on individual feeds. + repeated FeedOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/gender_view_service.proto b/google/ads/googleads/v2/services/gender_view_service.proto index 7804be7b2..9f1bd6da9 100644 --- a/google/ads/googleads/v2/services/gender_view_service.proto +++ b/google/ads/googleads/v2/services/gender_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/gender_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service GenderViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/genderViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [GenderViewService.GetGenderView][google.ads.googleads.v2.services.GenderViewService.GetGenderView]. message GetGenderViewRequest { - // The resource name of the gender view to fetch. - string resource_name = 1; + // Required. The resource name of the gender view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GenderView" + } + ]; } diff --git a/google/ads/googleads/v2/services/geo_target_constant_service.proto b/google/ads/googleads/v2/services/geo_target_constant_service.proto index 45e808446..c129f69b2 100644 --- a/google/ads/googleads/v2/services/geo_target_constant_service.proto +++ b/google/ads/googleads/v2/services/geo_target_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/geo_target_constant.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -42,6 +43,7 @@ service GeoTargetConstantService { option (google.api.http) = { get: "/v2/{resource_name=geoTargetConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } // Returns GeoTargetConstant suggestions by location name or by resource name. @@ -55,8 +57,13 @@ service GeoTargetConstantService { // Request message for [GeoTargetConstantService.GetGeoTargetConstant][google.ads.googleads.v2.services.GeoTargetConstantService.GetGeoTargetConstant]. message GetGeoTargetConstantRequest { - // The resource name of the geo target constant to fetch. - string resource_name = 1; + // Required. The resource name of the geo target constant to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + } + ]; } // Request message for diff --git a/google/ads/googleads/v2/services/geographic_view_service.proto b/google/ads/googleads/v2/services/geographic_view_service.proto index 424710aad..cd2ca0947 100644 --- a/google/ads/googleads/v2/services/geographic_view_service.proto +++ b/google/ads/googleads/v2/services/geographic_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/geographic_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service GeographicViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/geographicViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [GeographicViewService.GetGeographicView][google.ads.googleads.v2.services.GeographicViewService.GetGeographicView]. message GetGeographicViewRequest { - // The resource name of the geographic view to fetch. - string resource_name = 1; + // Required. The resource name of the geographic view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeographicView" + } + ]; } diff --git a/google/ads/googleads/v2/services/google_ads_field_service.proto b/google/ads/googleads/v2/services/google_ads_field_service.proto index 5eb683a25..66017383b 100644 --- a/google/ads/googleads/v2/services/google_ads_field_service.proto +++ b/google/ads/googleads/v2/services/google_ads_field_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/google_ads_field.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,6 +42,7 @@ service GoogleAdsFieldService { option (google.api.http) = { get: "/v2/{resource_name=googleAdsFields/*}" }; + option (google.api.method_signature) = "resource_name"; } // Returns all fields that match the search query. @@ -49,19 +51,25 @@ service GoogleAdsFieldService { post: "/v2/googleAdsFields:search" body: "*" }; + option (google.api.method_signature) = "query"; } } // Request message for [GoogleAdsFieldService.GetGoogleAdsField][google.ads.googleads.v2.services.GoogleAdsFieldService.GetGoogleAdsField]. message GetGoogleAdsFieldRequest { - // The resource name of the field to get. - string resource_name = 1; + // Required. The resource name of the field to get. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GoogleAdsField" + } + ]; } // Request message for [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v2.services.GoogleAdsFieldService.SearchGoogleAdsFields]. message SearchGoogleAdsFieldsRequest { - // The query string. - string query = 1; + // Required. The query string. + string query = 1 [(google.api.field_behavior) = REQUIRED]; // Token of the page to retrieve. If not specified, the first page of // results will be returned. Use the value obtained from `next_page_token` diff --git a/google/ads/googleads/v2/services/google_ads_service.proto b/google/ads/googleads/v2/services/google_ads_service.proto index df5197982..2ec47a0e1 100644 --- a/google/ads/googleads/v2/services/google_ads_service.proto +++ b/google/ads/googleads/v2/services/google_ads_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -155,9 +154,10 @@ import "google/ads/googleads/v2/services/shared_criterion_service.proto"; import "google/ads/googleads/v2/services/shared_set_service.proto"; import "google/ads/googleads/v2/services/user_list_service.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -180,6 +180,7 @@ service GoogleAdsService { post: "/v2/customers/{customer_id=*}/googleAds:search" body: "*" }; + option (google.api.method_signature) = "customer_id,query"; } // Creates, updates, or removes resources. This method supports atomic @@ -238,16 +239,17 @@ service GoogleAdsService { post: "/v2/customers/{customer_id=*}/googleAds:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,mutate_operations"; } } // Request message for [GoogleAdsService.Search][google.ads.googleads.v2.services.GoogleAdsService.Search]. message SearchGoogleAdsRequest { - // The ID of the customer being queried. - string customer_id = 1; + // Required. The ID of the customer being queried. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The query string. - string query = 2; + // Required. The query string. + string query = 2 [(google.api.field_behavior) = REQUIRED]; // Token of the page to retrieve. If not specified, the first // page of results will be returned. Use the value obtained from @@ -591,11 +593,11 @@ message GoogleAdsRow { // Request message for [GoogleAdsService.Mutate][google.ads.googleads.v2.services.GoogleAdsService.Mutate]. message MutateGoogleAdsRequest { - // The ID of the customer whose resources are being modified. - string customer_id = 1; + // Required. The ID of the customer whose resources are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual resources. - repeated MutateOperation mutate_operations = 2; + // Required. The list of operations to perform on individual resources. + repeated MutateOperation mutate_operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/group_placement_view_service.proto b/google/ads/googleads/v2/services/group_placement_view_service.proto index 6bdae84d9..bae213d8a 100644 --- a/google/ads/googleads/v2/services/group_placement_view_service.proto +++ b/google/ads/googleads/v2/services/group_placement_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/group_placement_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service GroupPlacementViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/groupPlacementViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [GroupPlacementViewService.GetGroupPlacementView][google.ads.googleads.v2.services.GroupPlacementViewService.GetGroupPlacementView]. message GetGroupPlacementViewRequest { - // The resource name of the Group Placement view to fetch. - string resource_name = 1; + // Required. The resource name of the Group Placement view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GroupPlacementView" + } + ]; } diff --git a/google/ads/googleads/v2/services/hotel_group_view_service.proto b/google/ads/googleads/v2/services/hotel_group_view_service.proto index 9a3ab0ddc..5e5c9a780 100644 --- a/google/ads/googleads/v2/services/hotel_group_view_service.proto +++ b/google/ads/googleads/v2/services/hotel_group_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/hotel_group_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service HotelGroupViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/hotelGroupViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [HotelGroupViewService.GetHotelGroupView][google.ads.googleads.v2.services.HotelGroupViewService.GetHotelGroupView]. message GetHotelGroupViewRequest { - // Resource name of the Hotel Group View to fetch. - string resource_name = 1; + // Required. Resource name of the Hotel Group View to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/HotelGroupView" + } + ]; } diff --git a/google/ads/googleads/v2/services/hotel_performance_view_service.proto b/google/ads/googleads/v2/services/hotel_performance_view_service.proto index ab54b8a98..2d79e92df 100644 --- a/google/ads/googleads/v2/services/hotel_performance_view_service.proto +++ b/google/ads/googleads/v2/services/hotel_performance_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/hotel_performance_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service HotelPerformanceViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/hotelPerformanceView}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [HotelPerformanceViewService.GetHotelPerformanceView][google.ads.googleads.v2.services.HotelPerformanceViewService.GetHotelPerformanceView]. message GetHotelPerformanceViewRequest { - // Resource name of the Hotel Performance View to fetch. - string resource_name = 1; + // Required. Resource name of the Hotel Performance View to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/HotelPerformanceView" + } + ]; } diff --git a/google/ads/googleads/v2/services/invoice_service.proto b/google/ads/googleads/v2/services/invoice_service.proto new file mode 100644 index 000000000..79e81d9a9 --- /dev/null +++ b/google/ads/googleads/v2/services/invoice_service.proto @@ -0,0 +1,72 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v2.services; + +import "google/ads/googleads/v2/enums/month_of_year.proto"; +import "google/ads/googleads/v2/resources/invoice.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; +option java_multiple_files = true; +option java_outer_classname = "InvoiceServiceProto"; +option java_package = "com.google.ads.googleads.v2.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V2::Services"; + +// Proto file describing the Invoice service. + +// A service to fetch invoices issued for a billing setup during a given month. +service InvoiceService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns all invoices associated with a billing setup, for a given month. + rpc ListInvoices(ListInvoicesRequest) returns (ListInvoicesResponse) { + option (google.api.http) = { + get: "/v2/customers/{customer_id=*}/invoices" + }; + option (google.api.method_signature) = "customer_id,billing_setup,issue_year,issue_month"; + } +} + +// Request message for fetching the invoices of a given billing setup that were +// issued during a given month. +message ListInvoicesRequest { + // Required. The ID of the customer to fetch invoices for. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The billing setup resource name of the requested invoices. + // + // `customers/{customer_id}/billingSetups/{billing_setup_id}` + string billing_setup = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The issue year to retrieve invoices, in yyyy format. Only + // invoices issued in 2019 or later can be retrieved. + string issue_year = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The issue month to retrieve invoices. + google.ads.googleads.v2.enums.MonthOfYearEnum.MonthOfYear issue_month = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for [InvoiceService.ListInvoices][google.ads.googleads.v2.services.InvoiceService.ListInvoices]. +message ListInvoicesResponse { + // The list of invoices that match the billing setup and time period. + repeated google.ads.googleads.v2.resources.Invoice invoices = 1; +} diff --git a/google/ads/googleads/v2/services/keyword_plan_ad_group_service.proto b/google/ads/googleads/v2/services/keyword_plan_ad_group_service.proto index f6ae5a9da..776c3acbb 100644 --- a/google/ads/googleads/v2/services/keyword_plan_ad_group_service.proto +++ b/google/ads/googleads/v2/services/keyword_plan_ad_group_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/keyword_plan_ad_group.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service KeywordPlanAdGroupService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/keywordPlanAdGroups/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes Keyword Plan ad groups. Operation statuses are @@ -52,22 +54,28 @@ service KeywordPlanAdGroupService { post: "/v2/customers/{customer_id=*}/keywordPlanAdGroups:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [KeywordPlanAdGroupService.GetKeywordPlanAdGroup][google.ads.googleads.v2.services.KeywordPlanAdGroupService.GetKeywordPlanAdGroup]. message GetKeywordPlanAdGroupRequest { - // The resource name of the Keyword Plan ad group to fetch. - string resource_name = 1; + // Required. The resource name of the Keyword Plan ad group to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanAdGroup" + } + ]; } // Request message for [KeywordPlanAdGroupService.MutateKeywordPlanAdGroups][google.ads.googleads.v2.services.KeywordPlanAdGroupService.MutateKeywordPlanAdGroups]. message MutateKeywordPlanAdGroupsRequest { - // The ID of the customer whose Keyword Plan ad groups are being modified. - string customer_id = 1; + // Required. The ID of the customer whose Keyword Plan ad groups are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual Keyword Plan ad groups. - repeated KeywordPlanAdGroupOperation operations = 2; + // Required. The list of operations to perform on individual Keyword Plan ad groups. + repeated KeywordPlanAdGroupOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/keyword_plan_campaign_service.proto b/google/ads/googleads/v2/services/keyword_plan_campaign_service.proto index 70ee20af9..8d66d8af1 100644 --- a/google/ads/googleads/v2/services/keyword_plan_campaign_service.proto +++ b/google/ads/googleads/v2/services/keyword_plan_campaign_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/keyword_plan_campaign.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service KeywordPlanCampaignService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/keywordPlanCampaigns/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes Keyword Plan campaigns. Operation statuses are @@ -52,23 +54,29 @@ service KeywordPlanCampaignService { post: "/v2/customers/{customer_id=*}/keywordPlanCampaigns:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [KeywordPlanCampaignService.GetKeywordPlanCampaign][google.ads.googleads.v2.services.KeywordPlanCampaignService.GetKeywordPlanCampaign]. message GetKeywordPlanCampaignRequest { - // The resource name of the Keyword Plan campaign to fetch. - string resource_name = 1; + // Required. The resource name of the Keyword Plan campaign to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + } + ]; } // Request message for // [KeywordPlanCampaignService.MutateKeywordPlanCampaigns][google.ads.googleads.v2.services.KeywordPlanCampaignService.MutateKeywordPlanCampaigns]. message MutateKeywordPlanCampaignsRequest { - // The ID of the customer whose Keyword Plan campaigns are being modified. - string customer_id = 1; + // Required. The ID of the customer whose Keyword Plan campaigns are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual Keyword Plan campaigns. - repeated KeywordPlanCampaignOperation operations = 2; + // Required. The list of operations to perform on individual Keyword Plan campaigns. + repeated KeywordPlanCampaignOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/keyword_plan_idea_service.proto b/google/ads/googleads/v2/services/keyword_plan_idea_service.proto index 1e656665a..4aeacd66a 100644 --- a/google/ads/googleads/v2/services/keyword_plan_idea_service.proto +++ b/google/ads/googleads/v2/services/keyword_plan_idea_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,7 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/common/keyword_plan_common.proto"; import "google/ads/googleads/v2/enums/keyword_plan_network.proto"; import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/wrappers.proto"; import "google/api/client.proto"; @@ -52,9 +52,9 @@ message GenerateKeywordIdeasRequest { // The ID of the customer with the recommendation. string customer_id = 1; - // The resource name of the language to target. + // Required. The resource name of the language to target. // Required - google.protobuf.StringValue language = 7; + google.protobuf.StringValue language = 7 [(google.api.field_behavior) = REQUIRED]; // The resource names of the location to target. // Max 10 diff --git a/google/ads/googleads/v2/services/keyword_plan_keyword_service.proto b/google/ads/googleads/v2/services/keyword_plan_keyword_service.proto index 1e9a1aad5..2b48362bf 100644 --- a/google/ads/googleads/v2/services/keyword_plan_keyword_service.proto +++ b/google/ads/googleads/v2/services/keyword_plan_keyword_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/keyword_plan_keyword.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service KeywordPlanKeywordService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/keywordPlanKeywords/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes Keyword Plan keywords. Operation statuses are @@ -52,22 +54,28 @@ service KeywordPlanKeywordService { post: "/v2/customers/{customer_id=*}/keywordPlanKeywords:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [KeywordPlanKeywordService.GetKeywordPlanKeyword][google.ads.googleads.v2.services.KeywordPlanKeywordService.GetKeywordPlanKeyword]. message GetKeywordPlanKeywordRequest { - // The resource name of the ad group keyword to fetch. - string resource_name = 1; + // Required. The resource name of the ad group keyword to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanKeyword" + } + ]; } // Request message for [KeywordPlanKeywordService.MutateKeywordPlanKeywords][google.ads.googleads.v2.services.KeywordPlanKeywordService.MutateKeywordPlanKeywords]. message MutateKeywordPlanKeywordsRequest { - // The ID of the customer whose Keyword Plan keywords are being modified. - string customer_id = 1; + // Required. The ID of the customer whose Keyword Plan keywords are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual Keyword Plan keywords. - repeated KeywordPlanKeywordOperation operations = 2; + // Required. The list of operations to perform on individual Keyword Plan keywords. + repeated KeywordPlanKeywordOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/keyword_plan_negative_keyword_service.proto b/google/ads/googleads/v2/services/keyword_plan_negative_keyword_service.proto index 197cae4d7..e61537419 100644 --- a/google/ads/googleads/v2/services/keyword_plan_negative_keyword_service.proto +++ b/google/ads/googleads/v2/services/keyword_plan_negative_keyword_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/keyword_plan_negative_keyword.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +44,7 @@ service KeywordPlanNegativeKeywordService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/keywordPlanNegativeKeywords/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes Keyword Plan negative keywords. Operation @@ -52,25 +54,31 @@ service KeywordPlanNegativeKeywordService { post: "/v2/customers/{customer_id=*}/keywordPlanNegativeKeywords:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for // [KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword][google.ads.googleads.v2.services.KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword]. message GetKeywordPlanNegativeKeywordRequest { - // The resource name of the plan to fetch. - string resource_name = 1; + // Required. The resource name of the plan to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanNegativeKeyword" + } + ]; } // Request message for // [KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords][google.ads.googleads.v2.services.KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords]. message MutateKeywordPlanNegativeKeywordsRequest { - // The ID of the customer whose negative keywords are being modified. - string customer_id = 1; + // Required. The ID of the customer whose negative keywords are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual Keyword Plan negative + // Required. The list of operations to perform on individual Keyword Plan negative // keywords. - repeated KeywordPlanNegativeKeywordOperation operations = 2; + repeated KeywordPlanNegativeKeywordOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/keyword_plan_service.proto b/google/ads/googleads/v2/services/keyword_plan_service.proto index 7d5095ab3..8aa95c9d0 100644 --- a/google/ads/googleads/v2/services/keyword_plan_service.proto +++ b/google/ads/googleads/v2/services/keyword_plan_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,10 +19,12 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/common/keyword_plan_common.proto"; import "google/ads/googleads/v2/resources/keyword_plan.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -45,6 +46,7 @@ service KeywordPlanService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/keywordPlans/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes keyword plans. Operation statuses are @@ -54,6 +56,7 @@ service KeywordPlanService { post: "/v2/customers/{customer_id=*}/keywordPlans:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } // Returns the requested Keyword Plan forecasts. @@ -62,6 +65,7 @@ service KeywordPlanService { post: "/v2/{keyword_plan=customers/*/keywordPlans/*}:generateForecastMetrics" body: "*" }; + option (google.api.method_signature) = "keyword_plan"; } // Returns the requested Keyword Plan historical metrics. @@ -70,22 +74,28 @@ service KeywordPlanService { post: "/v2/{keyword_plan=customers/*/keywordPlans/*}:generateHistoricalMetrics" body: "*" }; + option (google.api.method_signature) = "keyword_plan"; } } // Request message for [KeywordPlanService.GetKeywordPlan][google.ads.googleads.v2.services.KeywordPlanService.GetKeywordPlan]. message GetKeywordPlanRequest { - // The resource name of the plan to fetch. - string resource_name = 1; + // Required. The resource name of the plan to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlan" + } + ]; } // Request message for [KeywordPlanService.MutateKeywordPlans][google.ads.googleads.v2.services.KeywordPlanService.MutateKeywordPlans]. message MutateKeywordPlansRequest { - // The ID of the customer whose keyword plans are being modified. - string customer_id = 1; + // Required. The ID of the customer whose keyword plans are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual keyword plans. - repeated KeywordPlanOperation operations = 2; + // Required. The list of operations to perform on individual keyword plans. + repeated KeywordPlanOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried @@ -141,8 +151,8 @@ message MutateKeywordPlansResult { // Request message for [KeywordPlanService.GenerateForecastMetrics][google.ads.googleads.v2.services.KeywordPlanService.GenerateForecastMetrics]. message GenerateForecastMetricsRequest { - // The resource name of the keyword plan to be forecasted. - string keyword_plan = 1; + // Required. The resource name of the keyword plan to be forecasted. + string keyword_plan = 1 [(google.api.field_behavior) = REQUIRED]; } // Response message for [KeywordPlanService.GenerateForecastMetrics][google.ads.googleads.v2.services.KeywordPlanService.GenerateForecastMetrics]. @@ -211,9 +221,9 @@ message ForecastMetrics { // Request message for [KeywordPlanService.GenerateHistoricalMetrics][google.ads.googleads.v2.services.KeywordPlanService.GenerateHistoricalMetrics]. message GenerateHistoricalMetricsRequest { - // The resource name of the keyword plan of which historical metrics are + // Required. The resource name of the keyword plan of which historical metrics are // requested. - string keyword_plan = 1; + string keyword_plan = 1 [(google.api.field_behavior) = REQUIRED]; } // Response message for [KeywordPlanService.GenerateHistoricalMetrics][google.ads.googleads.v2.services.KeywordPlanService.GenerateHistoricalMetrics]. diff --git a/google/ads/googleads/v2/services/keyword_view_service.proto b/google/ads/googleads/v2/services/keyword_view_service.proto index 776c594eb..2cacfd0d5 100644 --- a/google/ads/googleads/v2/services/keyword_view_service.proto +++ b/google/ads/googleads/v2/services/keyword_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/keyword_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service KeywordViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/keywordViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [KeywordViewService.GetKeywordView][google.ads.googleads.v2.services.KeywordViewService.GetKeywordView]. message GetKeywordViewRequest { - // The resource name of the keyword view to fetch. - string resource_name = 1; + // Required. The resource name of the keyword view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordView" + } + ]; } diff --git a/google/ads/googleads/v2/services/label_service.proto b/google/ads/googleads/v2/services/label_service.proto index 06a682c40..f18d15a6b 100644 --- a/google/ads/googleads/v2/services/label_service.proto +++ b/google/ads/googleads/v2/services/label_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,10 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/label.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -42,6 +42,7 @@ service LabelService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/labels/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes labels. Operation statuses are returned. @@ -50,22 +51,28 @@ service LabelService { post: "/v2/customers/{customer_id=*}/labels:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [LabelService.GetLabel][google.ads.googleads.v2.services.LabelService.GetLabel]. message GetLabelRequest { - // The resource name of the label to fetch. - string resource_name = 1; + // Required. The resource name of the label to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; } // Request message for [LabelService.MutateLabels][google.ads.googleads.v2.services.LabelService.MutateLabels]. message MutateLabelsRequest { - // ID of the customer whose labels are being modified. - string customer_id = 1; + // Required. ID of the customer whose labels are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on labels. - repeated LabelOperation operations = 2; + // Required. The list of operations to perform on labels. + repeated LabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/landing_page_view_service.proto b/google/ads/googleads/v2/services/landing_page_view_service.proto index ef5e9f135..188298bf9 100644 --- a/google/ads/googleads/v2/services/landing_page_view_service.proto +++ b/google/ads/googleads/v2/services/landing_page_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/landing_page_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service LandingPageViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/landingPageViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [LandingPageViewService.GetLandingPageView][google.ads.googleads.v2.services.LandingPageViewService.GetLandingPageView]. message GetLandingPageViewRequest { - // The resource name of the landing page view to fetch. - string resource_name = 1; + // Required. The resource name of the landing page view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LandingPageView" + } + ]; } diff --git a/google/ads/googleads/v2/services/language_constant_service.proto b/google/ads/googleads/v2/services/language_constant_service.proto index b326a54ea..29b1ec922 100644 --- a/google/ads/googleads/v2/services/language_constant_service.proto +++ b/google/ads/googleads/v2/services/language_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/language_constant.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service LanguageConstantService { option (google.api.http) = { get: "/v2/{resource_name=languageConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [LanguageConstantService.GetLanguageConstant][google.ads.googleads.v2.services.LanguageConstantService.GetLanguageConstant]. message GetLanguageConstantRequest { - // Resource name of the language constant to fetch. - string resource_name = 1; + // Required. Resource name of the language constant to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LanguageConstant" + } + ]; } diff --git a/google/ads/googleads/v2/services/location_view_service.proto b/google/ads/googleads/v2/services/location_view_service.proto index 2e164c5c5..af2dd4fbd 100644 --- a/google/ads/googleads/v2/services/location_view_service.proto +++ b/google/ads/googleads/v2/services/location_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/location_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service LocationViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/locationViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [LocationViewService.GetLocationView][google.ads.googleads.v2.services.LocationViewService.GetLocationView]. message GetLocationViewRequest { - // The resource name of the location view to fetch. - string resource_name = 1; + // Required. The resource name of the location view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LocationView" + } + ]; } diff --git a/google/ads/googleads/v2/services/managed_placement_view_service.proto b/google/ads/googleads/v2/services/managed_placement_view_service.proto index 3575c8b4f..154bf7a16 100644 --- a/google/ads/googleads/v2/services/managed_placement_view_service.proto +++ b/google/ads/googleads/v2/services/managed_placement_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/managed_placement_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service ManagedPlacementViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/managedPlacementViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [ManagedPlacementViewService.GetManagedPlacementView][google.ads.googleads.v2.services.ManagedPlacementViewService.GetManagedPlacementView]. message GetManagedPlacementViewRequest { - // The resource name of the Managed Placement View to fetch. - string resource_name = 1; + // Required. The resource name of the Managed Placement View to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ManagedPlacementView" + } + ]; } diff --git a/google/ads/googleads/v2/services/media_file_service.proto b/google/ads/googleads/v2/services/media_file_service.proto index 3e9f42651..86e0b3d07 100644 --- a/google/ads/googleads/v2/services/media_file_service.proto +++ b/google/ads/googleads/v2/services/media_file_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/media_file.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; -import "google/rpc/status.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +43,7 @@ service MediaFileService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/mediaFiles/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates media files. Operation statuses are returned. @@ -51,22 +52,28 @@ service MediaFileService { post: "/v2/customers/{customer_id=*}/mediaFiles:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [MediaFileService.GetMediaFile][google.ads.googleads.v2.services.MediaFileService.GetMediaFile] message GetMediaFileRequest { - // The resource name of the media file to fetch. - string resource_name = 1; + // Required. The resource name of the media file to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MediaFile" + } + ]; } // Request message for [MediaFileService.MutateMediaFiles][google.ads.googleads.v2.services.MediaFileService.MutateMediaFiles] message MutateMediaFilesRequest { - // The ID of the customer whose media files are being modified. - string customer_id = 1; + // Required. The ID of the customer whose media files are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual media file. - repeated MediaFileOperation operations = 2; + // Required. The list of operations to perform on individual media file. + repeated MediaFileOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/merchant_center_link_service.proto b/google/ads/googleads/v2/services/merchant_center_link_service.proto index 28e9b41a0..5f27e4267 100644 --- a/google/ads/googleads/v2/services/merchant_center_link_service.proto +++ b/google/ads/googleads/v2/services/merchant_center_link_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,8 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/merchant_center_link.proto"; import "google/api/annotations.proto"; -import "google/protobuf/field_mask.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -38,11 +39,12 @@ option ruby_package = "Google::Ads::GoogleAds::V2::Services"; service MerchantCenterLinkService { option (google.api.default_host) = "googleads.googleapis.com"; - // Returns Merchant Center links available tor this customer. + // Returns Merchant Center links available for this customer. rpc ListMerchantCenterLinks(ListMerchantCenterLinksRequest) returns (ListMerchantCenterLinksResponse) { option (google.api.http) = { get: "/v2/customers/{customer_id=*}/merchantCenterLinks" }; + option (google.api.method_signature) = "customer_id"; } // Returns the Merchant Center link in full detail. @@ -50,6 +52,7 @@ service MerchantCenterLinkService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/merchantCenterLinks/*}" }; + option (google.api.method_signature) = "resource_name"; } // Updates status or removes a Merchant Center link. @@ -58,14 +61,15 @@ service MerchantCenterLinkService { post: "/v2/customers/{customer_id=*}/merchantCenterLinks:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operation"; } } // Request message for [MerchantCenterLinkService.ListMerchantCenterLinks][google.ads.googleads.v2.services.MerchantCenterLinkService.ListMerchantCenterLinks]. message ListMerchantCenterLinksRequest { - // The ID of the customer onto which to apply the Merchant Center link list + // Required. The ID of the customer onto which to apply the Merchant Center link list // operation. - string customer_id = 1; + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; } // Response message for [MerchantCenterLinkService.ListMerchantCenterLinks][google.ads.googleads.v2.services.MerchantCenterLinkService.ListMerchantCenterLinks]. @@ -76,17 +80,22 @@ message ListMerchantCenterLinksResponse { // Request message for [MerchantCenterLinkService.GetMerchantCenterLink][google.ads.googleads.v2.services.MerchantCenterLinkService.GetMerchantCenterLink]. message GetMerchantCenterLinkRequest { - // Resource name of the Merchant Center link. - string resource_name = 1; + // Required. Resource name of the Merchant Center link. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MerchantCenterLink" + } + ]; } // Request message for [MerchantCenterLinkService.MutateMerchantCenterLink][google.ads.googleads.v2.services.MerchantCenterLinkService.MutateMerchantCenterLink]. message MutateMerchantCenterLinkRequest { - // The ID of the customer being modified. - string customer_id = 1; + // Required. The ID of the customer being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The operation to perform on the link - MerchantCenterLinkOperation operation = 2; + // Required. The operation to perform on the link + MerchantCenterLinkOperation operation = 2 [(google.api.field_behavior) = REQUIRED]; } // A single update on a Merchant Center link. diff --git a/google/ads/googleads/v2/services/mobile_app_category_constant_service.proto b/google/ads/googleads/v2/services/mobile_app_category_constant_service.proto index 180c99f9e..5a45e35db 100644 --- a/google/ads/googleads/v2/services/mobile_app_category_constant_service.proto +++ b/google/ads/googleads/v2/services/mobile_app_category_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/mobile_app_category_constant.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -39,12 +40,18 @@ service MobileAppCategoryConstantService { option (google.api.http) = { get: "/v2/{resource_name=mobileAppCategoryConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [MobileAppCategoryConstantService.GetMobileAppCategoryConstant][google.ads.googleads.v2.services.MobileAppCategoryConstantService.GetMobileAppCategoryConstant]. message GetMobileAppCategoryConstantRequest { - // Resource name of the mobile app category constant to fetch. - string resource_name = 1; + // Required. Resource name of the mobile app category constant to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MobileAppCategoryConstant" + } + ]; } diff --git a/google/ads/googleads/v2/services/mobile_device_constant_service.proto b/google/ads/googleads/v2/services/mobile_device_constant_service.proto index 9a7427920..6bc26b4b1 100644 --- a/google/ads/googleads/v2/services/mobile_device_constant_service.proto +++ b/google/ads/googleads/v2/services/mobile_device_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/mobile_device_constant.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service MobileDeviceConstantService { option (google.api.http) = { get: "/v2/{resource_name=mobileDeviceConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [MobileDeviceConstantService.GetMobileDeviceConstant][google.ads.googleads.v2.services.MobileDeviceConstantService.GetMobileDeviceConstant]. message GetMobileDeviceConstantRequest { - // Resource name of the mobile device to fetch. - string resource_name = 1; + // Required. Resource name of the mobile device to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MobileDeviceConstant" + } + ]; } diff --git a/google/ads/googleads/v2/services/mutate_job_service.proto b/google/ads/googleads/v2/services/mutate_job_service.proto index e6c72cee8..7eb9b710c 100644 --- a/google/ads/googleads/v2/services/mutate_job_service.proto +++ b/google/ads/googleads/v2/services/mutate_job_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,9 +19,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/mutate_job.proto"; import "google/ads/googleads/v2/services/google_ads_service.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -45,6 +46,7 @@ service MutateJobService { post: "/v2/customers/{customer_id=*}/mutateJobs:create" body: "*" }; + option (google.api.method_signature) = "customer_id"; } // Returns the mutate job. @@ -52,6 +54,7 @@ service MutateJobService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/mutateJobs/*}" }; + option (google.api.method_signature) = "resource_name"; } // Returns the results of the mutate job. The job must be done. @@ -60,6 +63,7 @@ service MutateJobService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/mutateJobs/*}:listResults" }; + option (google.api.method_signature) = "resource_name"; } // Runs the mutate job. @@ -72,6 +76,11 @@ service MutateJobService { post: "/v2/{resource_name=customers/*/mutateJobs/*}:run" body: "*" }; + option (google.api.method_signature) = "resource_name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.ads.googleads.v2.resources.MutateJob.MutateJobMetadata" + }; } // Add operations to the mutate job. @@ -80,13 +89,15 @@ service MutateJobService { post: "/v2/{resource_name=customers/*/mutateJobs/*}:addOperations" body: "*" }; + option (google.api.method_signature) = "resource_name,sequence_token,mutate_operations"; + option (google.api.method_signature) = "resource_name,mutate_operations"; } } // Request message for [MutateJobService.CreateMutateJobRequest][] message CreateMutateJobRequest { - // The ID of the customer for which to create a mutate job. - string customer_id = 1; + // Required. The ID of the customer for which to create a mutate job. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; } // Response message for [MutateJobService.CreateMutateJobResponse][] @@ -97,20 +108,35 @@ message CreateMutateJobResponse { // Request message for [MutateJobService.GetMutateJob][google.ads.googleads.v2.services.MutateJobService.GetMutateJob] message GetMutateJobRequest { - // The resource name of the MutateJob to get. - string resource_name = 1; + // Required. The resource name of the MutateJob to get. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; } // Request message for [MutateJobService.RunMutateJob][google.ads.googleads.v2.services.MutateJobService.RunMutateJob] message RunMutateJobRequest { - // The resource name of the MutateJob to run. - string resource_name = 1; + // Required. The resource name of the MutateJob to run. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; } // Request message for [MutateJobService.AddMutateJobOperations][google.ads.googleads.v2.services.MutateJobService.AddMutateJobOperations] message AddMutateJobOperationsRequest { - // The resource name of the MutateJob. - string resource_name = 1; + // Required. The resource name of the MutateJob. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; // A token used to enforce sequencing. // @@ -120,7 +146,7 @@ message AddMutateJobOperationsRequest { // response. string sequence_token = 2; - // The list of mutates being added. + // Required. The list of mutates being added. // // Operations can use negative integers as temp ids to signify dependencies // between entities created in this MutateJob. For example, a customer with @@ -129,7 +155,7 @@ message AddMutateJobOperationsRequest { // explicitly set to "customers/1234/campaigns/-1", and creating an ad group // in the second operation with the campaign field also set to // "customers/1234/campaigns/-1". - repeated MutateOperation mutate_operations = 3; + repeated MutateOperation mutate_operations = 3 [(google.api.field_behavior) = REQUIRED]; } // Response message for [MutateJobService.AddMutateJobOperations][google.ads.googleads.v2.services.MutateJobService.AddMutateJobOperations] @@ -145,8 +171,13 @@ message AddMutateJobOperationsResponse { // Request message for [MutateJobService.ListMutateJobResults][google.ads.googleads.v2.services.MutateJobService.ListMutateJobResults]. message ListMutateJobResultsRequest { - // The resource name of the MutateJob whose results are being listed. - string resource_name = 1; + // Required. The resource name of the MutateJob whose results are being listed. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; // Token of the page to retrieve. If not specified, the first // page of results will be returned. Use the value obtained from diff --git a/google/ads/googleads/v2/services/operating_system_version_constant_service.proto b/google/ads/googleads/v2/services/operating_system_version_constant_service.proto index 349ab351b..a620e4d9e 100644 --- a/google/ads/googleads/v2/services/operating_system_version_constant_service.proto +++ b/google/ads/googleads/v2/services/operating_system_version_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/operating_system_version_constant.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,12 +42,18 @@ service OperatingSystemVersionConstantService { option (google.api.http) = { get: "/v2/{resource_name=operatingSystemVersionConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [OperatingSystemVersionConstantService.GetOperatingSystemVersionConstant][google.ads.googleads.v2.services.OperatingSystemVersionConstantService.GetOperatingSystemVersionConstant]. message GetOperatingSystemVersionConstantRequest { - // Resource name of the OS version to fetch. - string resource_name = 1; + // Required. Resource name of the OS version to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/OperatingSystemVersionConstant" + } + ]; } diff --git a/google/ads/googleads/v2/services/paid_organic_search_term_view_service.proto b/google/ads/googleads/v2/services/paid_organic_search_term_view_service.proto index 586f9fd42..76412b023 100644 --- a/google/ads/googleads/v2/services/paid_organic_search_term_view_service.proto +++ b/google/ads/googleads/v2/services/paid_organic_search_term_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/paid_organic_search_term_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,12 +42,18 @@ service PaidOrganicSearchTermViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/paidOrganicSearchTermViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [PaidOrganicSearchTermViewService.GetPaidOrganicSearchTermView][google.ads.googleads.v2.services.PaidOrganicSearchTermViewService.GetPaidOrganicSearchTermView]. message GetPaidOrganicSearchTermViewRequest { - // The resource name of the paid organic search term view to fetch. - string resource_name = 1; + // Required. The resource name of the paid organic search term view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/PaidOrganicSearchTermView" + } + ]; } diff --git a/google/ads/googleads/v2/services/parental_status_view_service.proto b/google/ads/googleads/v2/services/parental_status_view_service.proto index 2ae50b215..cc07c2c0e 100644 --- a/google/ads/googleads/v2/services/parental_status_view_service.proto +++ b/google/ads/googleads/v2/services/parental_status_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/parental_status_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service ParentalStatusViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/parentalStatusViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [ParentalStatusViewService.GetParentalStatusView][google.ads.googleads.v2.services.ParentalStatusViewService.GetParentalStatusView]. message GetParentalStatusViewRequest { - // The resource name of the parental status view to fetch. - string resource_name = 1; + // Required. The resource name of the parental status view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ParentalStatusView" + } + ]; } diff --git a/google/ads/googleads/v2/services/payments_account_service.proto b/google/ads/googleads/v2/services/payments_account_service.proto index 5c3073c02..74a406179 100644 --- a/google/ads/googleads/v2/services/payments_account_service.proto +++ b/google/ads/googleads/v2/services/payments_account_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,7 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/payments_account.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -30,31 +30,32 @@ option objc_class_prefix = "GAA"; option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Services"; option ruby_package = "Google::Ads::GoogleAds::V2::Services"; -// Proto file describing the Payments account service. +// Proto file describing the payments account service. -// Service to provide Payments accounts that can be used to set up consolidated +// Service to provide payments accounts that can be used to set up consolidated // billing. service PaymentsAccountService { option (google.api.default_host) = "googleads.googleapis.com"; - // Returns all Payments accounts associated with all managers + // Returns all payments accounts associated with all managers // between the login customer ID and specified serving customer in the // hierarchy, inclusive. rpc ListPaymentsAccounts(ListPaymentsAccountsRequest) returns (ListPaymentsAccountsResponse) { option (google.api.http) = { get: "/v2/customers/{customer_id=*}/paymentsAccounts" }; + option (google.api.method_signature) = "customer_id"; } } -// Request message for fetching all accessible Payments accounts. +// Request message for fetching all accessible payments accounts. message ListPaymentsAccountsRequest { - // The ID of the customer to apply the PaymentsAccount list operation to. - string customer_id = 1; + // Required. The ID of the customer to apply the PaymentsAccount list operation to. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; } // Response message for [PaymentsAccountService.ListPaymentsAccounts][google.ads.googleads.v2.services.PaymentsAccountService.ListPaymentsAccounts]. message ListPaymentsAccountsResponse { - // The list of accessible Payments accounts. + // The list of accessible payments accounts. repeated google.ads.googleads.v2.resources.PaymentsAccount payments_accounts = 1; } diff --git a/google/ads/googleads/v2/services/product_bidding_category_constant_service.proto b/google/ads/googleads/v2/services/product_bidding_category_constant_service.proto index 7f32d21b7..b65b849ea 100644 --- a/google/ads/googleads/v2/services/product_bidding_category_constant_service.proto +++ b/google/ads/googleads/v2/services/product_bidding_category_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/product_bidding_category_constant.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,12 +42,18 @@ service ProductBiddingCategoryConstantService { option (google.api.http) = { get: "/v2/{resource_name=productBiddingCategoryConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [ProductBiddingCategoryService.GetProductBiddingCategory][]. message GetProductBiddingCategoryConstantRequest { - // Resource name of the Product Bidding Category to fetch. - string resource_name = 1; + // Required. Resource name of the Product Bidding Category to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ProductBiddingCategoryConstant" + } + ]; } diff --git a/google/ads/googleads/v2/services/product_group_view_service.proto b/google/ads/googleads/v2/services/product_group_view_service.proto index 08f7a1d46..98f683bc1 100644 --- a/google/ads/googleads/v2/services/product_group_view_service.proto +++ b/google/ads/googleads/v2/services/product_group_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/product_group_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service ProductGroupViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/productGroupViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [ProductGroupViewService.GetProductGroupView][google.ads.googleads.v2.services.ProductGroupViewService.GetProductGroupView]. message GetProductGroupViewRequest { - // The resource name of the product group view to fetch. - string resource_name = 1; + // Required. The resource name of the product group view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ProductGroupView" + } + ]; } diff --git a/google/ads/googleads/v2/services/reach_plan_service.proto b/google/ads/googleads/v2/services/reach_plan_service.proto new file mode 100644 index 000000000..dd023380f --- /dev/null +++ b/google/ads/googleads/v2/services/reach_plan_service.proto @@ -0,0 +1,357 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v2.services; + +import "google/ads/googleads/v2/common/criteria.proto"; +import "google/ads/googleads/v2/enums/reach_plan_ad_length.proto"; +import "google/ads/googleads/v2/enums/reach_plan_age_range.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ReachPlanServiceProto"; +option java_package = "com.google.ads.googleads.v2.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V2::Services"; + +// Proto file describing the reach plan service. + +// Reach Plan Service gives users information about audience size that can +// be reached through advertisement on YouTube. In particular, +// GenerateReachForecast provides estimated number of people of specified +// demographics that can be reached by an ad in a given market by a campaign of +// certain duration with a defined budget. +service ReachPlanService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the list of plannable locations (for example, countries & DMAs). + rpc ListPlannableLocations(ListPlannableLocationsRequest) returns (ListPlannableLocationsResponse) { + option (google.api.http) = { + post: "/v2:listPlannableLocations" + body: "*" + }; + } + + // Returns the list of per-location plannable YouTube ad formats with allowed + // targeting. + rpc ListPlannableProducts(ListPlannableProductsRequest) returns (ListPlannableProductsResponse) { + option (google.api.http) = { + post: "/v2:listPlannableProducts" + body: "*" + }; + option (google.api.method_signature) = "plannable_location_id"; + } + + // Generates a product mix ideas given a set of preferences. This method + // helps the advertiser to obtain a good mix of ad formats and budget + // allocations based on its preferences. + rpc GenerateProductMixIdeas(GenerateProductMixIdeasRequest) returns (GenerateProductMixIdeasResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}:generateProductMixIdeas" + body: "*" + }; + option (google.api.method_signature) = "customer_id,plannable_location_id,currency_code,budget_micros"; + } + + // Generates a reach forecast for a given targeting / product mix. + rpc GenerateReachForecast(GenerateReachForecastRequest) returns (GenerateReachForecastResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}:generateReachForecast" + body: "*" + }; + option (google.api.method_signature) = "customer_id,campaign_duration,planned_products"; + } +} + +// Request message for [ReachForecastService.ListPlannableLocations][] +message ListPlannableLocationsRequest { + +} + +// The list of plannable locations. +message ListPlannableLocationsResponse { + // The list of locations available for planning (Countries, DMAs, + // sub-countries). + // For locations like Countries, DMAs see + // https://developers.google.com/adwords/api/docs/appendix/geotargeting for + // more information. + repeated PlannableLocation plannable_locations = 1; +} + +// A plannable location: a country, a DMA, a metro region, a tv region, +// a province. +message PlannableLocation { + // The location identifier. + google.protobuf.StringValue id = 1; + + // The unique location name in english. + google.protobuf.StringValue name = 2; + + // The parent country code, not present if location is a country. + // If present will always be a criterion id: additional information, such as + // country name are returned both via ListPlannableLocations or directly by + // accessing GeoTargetConstantService with the criterion id. + google.protobuf.Int64Value parent_country_id = 3; +} + +// Request to list available products in a given location. +message ListPlannableProductsRequest { + // Required. The ID of the selected location for planning. To list the available + // plannable location ids use ListPlannableLocations. + google.protobuf.StringValue plannable_location_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// A response with all available products. +message ListPlannableProductsResponse { + // The list of products available for planning and related targeting metadata. + repeated ProductMetadata product_metadata = 1; +} + +// The metadata associated with an available plannable product. +message ProductMetadata { + // The code associated with the ad product. E.g. Trueview, Bumper + // To list the available plannable product codes use ListPlannableProducts. + google.protobuf.StringValue plannable_product_code = 1; + + // The allowed plannable targeting for this product. + PlannableTargeting plannable_targeting = 2; +} + +// The targeting for which traffic metrics will be reported. +message PlannableTargeting { + // Allowed plannable age ranges for the product for which metrics will be + // reported. Actual targeting is computed by mapping this age range onto + // standard Google common.AgeRangeInfo values. + repeated google.ads.googleads.v2.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1; + + // Targetable genders for the ad product. + repeated google.ads.googleads.v2.common.GenderInfo genders = 2; + + // Targetable devices for the ad product. + repeated google.ads.googleads.v2.common.DeviceInfo devices = 3; +} + +// Request message for [ReachForecastService.GenerateProductMixIdeas][]. +message GenerateProductMixIdeasRequest { + // Required. The ID of the customer. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID of the location, this is one of the ids returned by + // ListPlannableLocations. + google.protobuf.StringValue plannable_location_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Currency code. + // Three-character ISO 4217 currency code. + google.protobuf.StringValue currency_code = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Total budget. + // Amount in micros. One million is equivalent to one unit. + google.protobuf.Int64Value budget_micros = 4 [(google.api.field_behavior) = REQUIRED]; + + // The preferences of the suggested product mix. + // An unset preference is interpreted as all possible values are allowed, + // unless explicitly specified. + Preferences preferences = 5; +} + +// Set of preferences about the planned mix. +message Preferences { + // True if ad skippable. + // If not set, default is any value. + google.protobuf.BoolValue is_skippable = 1; + + // True if ad start with sound. + // If not set, default is any value. + google.protobuf.BoolValue starts_with_sound = 2; + + // The length of the ad. + // If not set, default is any value. + google.ads.googleads.v2.enums.ReachPlanAdLengthEnum.ReachPlanAdLength ad_length = 3; + + // True if ad will only show on the top content. + // If not set, default is false. + google.protobuf.BoolValue top_content_only = 4; + + // True if the price guaranteed. The cost of serving the ad is agreed upfront + // and not subject to an auction. + // If not set, default is any value. + google.protobuf.BoolValue has_guaranteed_price = 5; +} + +// The suggested product mix. +message GenerateProductMixIdeasResponse { + // A list of products (ad formats) and the associated budget allocation idea. + repeated ProductAllocation product_allocation = 1; +} + +// An allocation of a part of the budget on a given product. +message ProductAllocation { + // Selected product for planning. The product codes returned are within the + // set of the ones returned by ListPlannableProducts when using the same + // location id. + google.protobuf.StringValue plannable_product_code = 1; + + // The value to be allocated for the suggested product in requested currency. + // Amount in micros. One million is equivalent to one unit. + google.protobuf.Int64Value budget_micros = 2; +} + +// Request message for [ReachPlanService.GenerateReachForecast][google.ads.googleads.v2.services.ReachPlanService.GenerateReachForecast]. +message GenerateReachForecastRequest { + // Required. The ID of the customer. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The currency code. + // Three-character ISO 4217 currency code. + google.protobuf.StringValue currency_code = 2; + + // Required. Campaign duration. + CampaignDuration campaign_duration = 3 [(google.api.field_behavior) = REQUIRED]; + + // Desired cookie frequency cap that will be applied to each planned product. + // This is equivalent to the frequency cap exposed in Google Ads when creating + // a campaign, it represents the maximum number of times an ad can be shown to + // the same user. + // If not specified no cap is applied. + google.protobuf.Int32Value cookie_frequency_cap = 4; + + // Desired minimum effective frequency (the number of times a person was + // exposed to the ad) for the reported reach metrics [1-10]. + // This won't affect the targeting, but just the reporting. + // If not specified, a default of 1 is applied. + google.protobuf.Int32Value min_effective_frequency = 5; + + // The targeting to be applied to all products selected in the product mix. + // + // This is planned targeting: execution details might vary based on the + // advertising product, please consult an implementation specialist. + // + // If no targeting dimensions are specified, then campaigns will target + // everywhere and everyone. + // + // See specific metrics for details on how targeting affects them. + // + // In some cases, targeting may be overridden using the + // PlannedProduct.advanced_product_targeting field. + Targeting targeting = 6; + + // Required. The product to be planned. + repeated PlannedProduct planned_products = 7 [(google.api.field_behavior) = REQUIRED]; +} + +// The targeting for which traffic metrics will be reported. +message Targeting { + // Required. The ID of the selected location. + // Plannable locations ID can be obtained from ListPlannableLocations. + google.protobuf.StringValue plannable_location_id = 1; + + // Required + // Selected age range to be planned on. + google.ads.googleads.v2.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_range = 2; + + // Targetable genders for the ad product. + repeated google.ads.googleads.v2.common.GenderInfo genders = 3; + + // Targetable devices for the ad product. + repeated google.ads.googleads.v2.common.DeviceInfo devices = 4; +} + +// The duration of a planned campaign. +message CampaignDuration { + // The duration value in days. + google.protobuf.Int32Value duration_in_days = 1; +} + +// A product being planned for reach. +message PlannedProduct { + // Required. Selected product for planning. + // Plannable products codes can be obtained from ListPlannableProducts. + google.protobuf.StringValue plannable_product_code = 1; + + // Required. Maximum budget allocation in micros for the selected product. + // The value is specified in the selected planning currency_code. + // E.g. 1 000 000$ = 1 000 000 000 000 micros. + google.protobuf.Int64Value budget_micros = 2; +} + +// Response message containing the generated reach curve. +message GenerateReachForecastResponse { + // Reference on target audiences for this curve. + OnTargetAudienceMetrics on_target_audience_metrics = 1; + + // The generated reach curve for the planned product mix. + ReachCurve reach_curve = 2; +} + +// The reach curve for the planned products. +message ReachCurve { + // All points on the reach curve. + repeated ReachForecast reach_forecasts = 1; +} + +// A point on reach curve. +message ReachForecast { + // The cost in micros. + google.protobuf.Int64Value cost_micros = 1; + + // Forecasted traffic metrics for this point. + Forecast forecast = 2; + + // The forecasted allocation. This differs from the input allocation if one + // or more product cannot fulfill the budget because of limited inventory. + repeated ProductAllocation forecasted_product_allocations = 3; +} + +// Forecasted traffic metrics for the planned products and targeting. +message Forecast { + // Number of unique people reached at least + // GenerateReachForecastRequest.min_effective_frequency times that exactly + // matches the Targeting. + google.protobuf.Int64Value on_target_reach = 1; + + // Total number of unique people reached at least + // GenerateReachForecastRequest.min_effective_frequency times. This includes + // people that may fall outside the specified Targeting. + google.protobuf.Int64Value total_reach = 2; + + // Number of ad impressions that exactly matches the Targeting. + google.protobuf.Int64Value on_target_impressions = 3; + + // Total number of ad impressions. This includes impressions that may fall + // outside the specified Targeting, due to insufficent information on + // signed-in users. + google.protobuf.Int64Value total_impressions = 4; +} + +// Audience metrics for the planned products. +// These metrics consider the following targeting dimensions: +// +// - Location +// - PlannableAgeRange +// - Gender +message OnTargetAudienceMetrics { + // Reference audience size matching the considered targeting for YouTube. + google.protobuf.Int64Value youtube_audience_size = 1; + + // Reference audience size matching the considered targeting for Census. + google.protobuf.Int64Value census_audience_size = 2; +} diff --git a/google/ads/googleads/v2/services/recommendation_service.proto b/google/ads/googleads/v2/services/recommendation_service.proto index 92d6ad11e..9b3d542d6 100644 --- a/google/ads/googleads/v2/services/recommendation_service.proto +++ b/google/ads/googleads/v2/services/recommendation_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -22,9 +21,11 @@ import "google/ads/googleads/v2/enums/keyword_match_type.proto"; import "google/ads/googleads/v2/resources/ad.proto"; import "google/ads/googleads/v2/resources/recommendation.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -46,6 +47,7 @@ service RecommendationService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/recommendations/*}" }; + option (google.api.method_signature) = "resource_name"; } // Applies given recommendations with corresponding apply parameters. @@ -54,6 +56,7 @@ service RecommendationService { post: "/v2/customers/{customer_id=*}/recommendations:apply" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } // Dismisses given recommendations. @@ -62,24 +65,30 @@ service RecommendationService { post: "/v2/customers/{customer_id=*}/recommendations:dismiss" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [RecommendationService.GetRecommendation][google.ads.googleads.v2.services.RecommendationService.GetRecommendation]. message GetRecommendationRequest { - // The resource name of the recommendation to fetch. - string resource_name = 1; + // Required. The resource name of the recommendation to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Recommendation" + } + ]; } // Request message for [RecommendationService.ApplyRecommendation][google.ads.googleads.v2.services.RecommendationService.ApplyRecommendation]. message ApplyRecommendationRequest { - // The ID of the customer with the recommendation. - string customer_id = 1; + // Required. The ID of the customer with the recommendation. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to apply recommendations. + // Required. The list of operations to apply recommendations. // If partial_failure=false all recommendations should be of the same type // There is a limit of 100 operations per request. - repeated ApplyRecommendationOperation operations = 2; + repeated ApplyRecommendationOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, operations will be carried @@ -212,13 +221,13 @@ message DismissRecommendationRequest { string resource_name = 1; } - // The ID of the customer with the recommendation. - string customer_id = 1; + // Required. The ID of the customer with the recommendation. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to dismiss recommendations. + // Required. The list of operations to dismiss recommendations. // If partial_failure=false all recommendations should be of the same type // There is a limit of 100 operations per request. - repeated DismissRecommendationOperation operations = 3; + repeated DismissRecommendationOperation operations = 3 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, operations will be carried in a diff --git a/google/ads/googleads/v2/services/remarketing_action_service.proto b/google/ads/googleads/v2/services/remarketing_action_service.proto index 68379b370..f6a73df2e 100644 --- a/google/ads/googleads/v2/services/remarketing_action_service.proto +++ b/google/ads/googleads/v2/services/remarketing_action_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,10 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/remarketing_action.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -44,6 +44,7 @@ service RemarketingActionService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/remarketingActions/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or updates remarketing actions. Operation statuses are returned. @@ -52,22 +53,28 @@ service RemarketingActionService { post: "/v2/customers/{customer_id=*}/remarketingActions:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [RemarketingActionService.GetRemarketingAction][google.ads.googleads.v2.services.RemarketingActionService.GetRemarketingAction]. message GetRemarketingActionRequest { - // The resource name of the remarketing action to fetch. - string resource_name = 1; + // Required. The resource name of the remarketing action to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/RemarketingAction" + } + ]; } // Request message for [RemarketingActionService.MutateRemarketingActions][google.ads.googleads.v2.services.RemarketingActionService.MutateRemarketingActions]. message MutateRemarketingActionsRequest { - // The ID of the customer whose remarketing actions are being modified. - string customer_id = 1; + // Required. The ID of the customer whose remarketing actions are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual remarketing actions. - repeated RemarketingActionOperation operations = 2; + // Required. The list of operations to perform on individual remarketing actions. + repeated RemarketingActionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/search_term_view_service.proto b/google/ads/googleads/v2/services/search_term_view_service.proto index f319ca179..e73992568 100644 --- a/google/ads/googleads/v2/services/search_term_view_service.proto +++ b/google/ads/googleads/v2/services/search_term_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/search_term_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service SearchTermViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/searchTermViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [SearchTermViewService.GetSearchTermView][google.ads.googleads.v2.services.SearchTermViewService.GetSearchTermView]. message GetSearchTermViewRequest { - // The resource name of the search term view to fetch. - string resource_name = 1; + // Required. The resource name of the search term view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SearchTermView" + } + ]; } diff --git a/google/ads/googleads/v2/services/shared_criterion_service.proto b/google/ads/googleads/v2/services/shared_criterion_service.proto index 6d4703c1a..9fc60251c 100644 --- a/google/ads/googleads/v2/services/shared_criterion_service.proto +++ b/google/ads/googleads/v2/services/shared_criterion_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,9 +18,10 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/shared_criterion.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; -import "google/rpc/status.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -43,6 +43,7 @@ service SharedCriterionService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/sharedCriteria/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or removes shared criteria. Operation statuses are returned. @@ -51,22 +52,28 @@ service SharedCriterionService { post: "/v2/customers/{customer_id=*}/sharedCriteria:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [SharedCriterionService.GetSharedCriterion][google.ads.googleads.v2.services.SharedCriterionService.GetSharedCriterion]. message GetSharedCriterionRequest { - // The resource name of the shared criterion to fetch. - string resource_name = 1; + // Required. The resource name of the shared criterion to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedCriterion" + } + ]; } // Request message for [SharedCriterionService.MutateSharedCriteria][google.ads.googleads.v2.services.SharedCriterionService.MutateSharedCriteria]. message MutateSharedCriteriaRequest { - // The ID of the customer whose shared criteria are being modified. - string customer_id = 1; + // Required. The ID of the customer whose shared criteria are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual shared criteria. - repeated SharedCriterionOperation operations = 2; + // Required. The list of operations to perform on individual shared criteria. + repeated SharedCriterionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/shared_set_service.proto b/google/ads/googleads/v2/services/shared_set_service.proto index c0890b608..9cf555dba 100644 --- a/google/ads/googleads/v2/services/shared_set_service.proto +++ b/google/ads/googleads/v2/services/shared_set_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,10 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/shared_set.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -44,6 +44,7 @@ service SharedSetService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/sharedSets/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates, updates, or removes shared sets. Operation statuses are returned. @@ -52,22 +53,28 @@ service SharedSetService { post: "/v2/customers/{customer_id=*}/sharedSets:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [SharedSetService.GetSharedSet][google.ads.googleads.v2.services.SharedSetService.GetSharedSet]. message GetSharedSetRequest { - // The resource name of the shared set to fetch. - string resource_name = 1; + // Required. The resource name of the shared set to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedSet" + } + ]; } // Request message for [SharedSetService.MutateSharedSets][google.ads.googleads.v2.services.SharedSetService.MutateSharedSets]. message MutateSharedSetsRequest { - // The ID of the customer whose shared sets are being modified. - string customer_id = 1; + // Required. The ID of the customer whose shared sets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual shared sets. - repeated SharedSetOperation operations = 2; + // Required. The list of operations to perform on individual shared sets. + repeated SharedSetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/shopping_performance_view_service.proto b/google/ads/googleads/v2/services/shopping_performance_view_service.proto index 4f36ba392..9b4deff19 100644 --- a/google/ads/googleads/v2/services/shopping_performance_view_service.proto +++ b/google/ads/googleads/v2/services/shopping_performance_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/shopping_performance_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,12 +42,18 @@ service ShoppingPerformanceViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/shoppingPerformanceView}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for // [ShoppingPerformanceViewService.GetShoppingPerformanceView][google.ads.googleads.v2.services.ShoppingPerformanceViewService.GetShoppingPerformanceView]. message GetShoppingPerformanceViewRequest { - // The resource name of the Shopping performance view to fetch. - string resource_name = 1; + // Required. The resource name of the Shopping performance view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ShoppingPerformanceView" + } + ]; } diff --git a/google/ads/googleads/v2/services/topic_constant_service.proto b/google/ads/googleads/v2/services/topic_constant_service.proto index dc08e3a1d..96da1963f 100644 --- a/google/ads/googleads/v2/services/topic_constant_service.proto +++ b/google/ads/googleads/v2/services/topic_constant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/topic_constant.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service TopicConstantService { option (google.api.http) = { get: "/v2/{resource_name=topicConstants/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [TopicConstantService.GetTopicConstant][google.ads.googleads.v2.services.TopicConstantService.GetTopicConstant]. message GetTopicConstantRequest { - // Resource name of the Topic to fetch. - string resource_name = 1; + // Required. Resource name of the Topic to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/TopicConstant" + } + ]; } diff --git a/google/ads/googleads/v2/services/topic_view_service.proto b/google/ads/googleads/v2/services/topic_view_service.proto index 4692ef933..f4a3ac7f1 100644 --- a/google/ads/googleads/v2/services/topic_view_service.proto +++ b/google/ads/googleads/v2/services/topic_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/topic_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service TopicViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/topicViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [TopicViewService.GetTopicView][google.ads.googleads.v2.services.TopicViewService.GetTopicView]. message GetTopicViewRequest { - // The resource name of the topic view to fetch. - string resource_name = 1; + // Required. The resource name of the topic view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/TopicView" + } + ]; } diff --git a/google/ads/googleads/v2/services/user_interest_service.proto b/google/ads/googleads/v2/services/user_interest_service.proto index df98d0a5c..c1f351121 100644 --- a/google/ads/googleads/v2/services/user_interest_service.proto +++ b/google/ads/googleads/v2/services/user_interest_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/user_interest.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service UserInterestService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/userInterests/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [UserInterestService.GetUserInterest][google.ads.googleads.v2.services.UserInterestService.GetUserInterest]. message GetUserInterestRequest { - // Resource name of the UserInterest to fetch. - string resource_name = 1; + // Required. Resource name of the UserInterest to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserInterest" + } + ]; } diff --git a/google/ads/googleads/v2/services/user_list_service.proto b/google/ads/googleads/v2/services/user_list_service.proto index a5e268f3e..beb18e600 100644 --- a/google/ads/googleads/v2/services/user_list_service.proto +++ b/google/ads/googleads/v2/services/user_list_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,10 +18,11 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/user_list.proto"; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -44,6 +44,7 @@ service UserListService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/userLists/*}" }; + option (google.api.method_signature) = "resource_name"; } // Creates or updates user lists. Operation statuses are returned. @@ -52,22 +53,28 @@ service UserListService { post: "/v2/customers/{customer_id=*}/userLists:mutate" body: "*" }; + option (google.api.method_signature) = "customer_id,operations"; } } // Request message for [UserListService.GetUserList][google.ads.googleads.v2.services.UserListService.GetUserList]. message GetUserListRequest { - // The resource name of the user list to fetch. - string resource_name = 1; + // Required. The resource name of the user list to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserList" + } + ]; } // Request message for [UserListService.MutateUserLists][google.ads.googleads.v2.services.UserListService.MutateUserLists]. message MutateUserListsRequest { - // The ID of the customer whose user lists are being modified. - string customer_id = 1; + // Required. The ID of the customer whose user lists are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of operations to perform on individual user lists. - repeated UserListOperation operations = 2; + // Required. The list of operations to perform on individual user lists. + repeated UserListOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; // If true, successful operations will be carried out and invalid // operations will return errors. If false, all operations will be carried diff --git a/google/ads/googleads/v2/services/user_location_view_service.proto b/google/ads/googleads/v2/services/user_location_view_service.proto index 43494edf0..a9eac2a0b 100644 --- a/google/ads/googleads/v2/services/user_location_view_service.proto +++ b/google/ads/googleads/v2/services/user_location_view_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/user_location_view.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service UserLocationViewService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/userLocationViews/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [UserLocationViewService.GetUserLocationView][google.ads.googleads.v2.services.UserLocationViewService.GetUserLocationView]. message GetUserLocationViewRequest { - // The resource name of the user location view to fetch. - string resource_name = 1; + // Required. The resource name of the user location view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserLocationView" + } + ]; } diff --git a/google/ads/googleads/v2/services/video_service.proto b/google/ads/googleads/v2/services/video_service.proto index 7acb6fbe6..dbb5b2995 100644 --- a/google/ads/googleads/v2/services/video_service.proto +++ b/google/ads/googleads/v2/services/video_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.ads.googleads.v2.services; import "google/ads/googleads/v2/resources/video.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.GoogleAds.V2.Services"; option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/services;services"; @@ -41,11 +42,17 @@ service VideoService { option (google.api.http) = { get: "/v2/{resource_name=customers/*/videos/*}" }; + option (google.api.method_signature) = "resource_name"; } } // Request message for [VideoService.GetVideo][google.ads.googleads.v2.services.VideoService.GetVideo]. message GetVideoRequest { - // The resource name of the video to fetch. - string resource_name = 1; + // Required. The resource name of the video to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Video" + } + ]; } diff --git a/google/ads/googleads/v3/common/ad_asset.proto b/google/ads/googleads/v3/common/ad_asset.proto new file mode 100644 index 000000000..d78ea8426 --- /dev/null +++ b/google/ads/googleads/v3/common/ad_asset.proto @@ -0,0 +1,62 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/enums/served_asset_field_type.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "AdAssetProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing assets used inside an ad. + +// A text asset used inside an ad. +message AdTextAsset { + // Asset text. + google.protobuf.StringValue text = 1; + + // The pinned field of the asset. This restricts the asset to only serve + // within this field. Multiple assets can be pinned to the same field. An + // asset that is unpinned or pinned to a different field will not serve in a + // field where some other asset has been pinned. + google.ads.googleads.v3.enums.ServedAssetFieldTypeEnum.ServedAssetFieldType pinned_field = 2; +} + +// An image asset used inside an ad. +message AdImageAsset { + // The Asset resource name of this image. + google.protobuf.StringValue asset = 1; +} + +// A video asset used inside an ad. +message AdVideoAsset { + // The Asset resource name of this video. + google.protobuf.StringValue asset = 1; +} + +// A media bundle asset used inside an ad. +message AdMediaBundleAsset { + // The Asset resource name of this media bundle. + google.protobuf.StringValue asset = 1; +} diff --git a/google/ads/googleads/v3/common/ad_type_infos.proto b/google/ads/googleads/v3/common/ad_type_infos.proto new file mode 100644 index 000000000..e4bc2aac9 --- /dev/null +++ b/google/ads/googleads/v3/common/ad_type_infos.proto @@ -0,0 +1,597 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/common/ad_asset.proto"; +import "google/ads/googleads/v3/enums/call_conversion_reporting_state.proto"; +import "google/ads/googleads/v3/enums/display_ad_format_setting.proto"; +import "google/ads/googleads/v3/enums/display_upload_product_type.proto"; +import "google/ads/googleads/v3/enums/legacy_app_install_ad_app_store.proto"; +import "google/ads/googleads/v3/enums/mime_type.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "AdTypeInfosProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file containing info messages for specific ad types. + +// A text ad. +message TextAdInfo { + // The headline of the ad. + google.protobuf.StringValue headline = 1; + + // The first line of the ad's description. + google.protobuf.StringValue description1 = 2; + + // The second line of the ad's description. + google.protobuf.StringValue description2 = 3; +} + +// An expanded text ad. +message ExpandedTextAdInfo { + // The first part of the ad's headline. + google.protobuf.StringValue headline_part1 = 1; + + // The second part of the ad's headline. + google.protobuf.StringValue headline_part2 = 2; + + // The third part of the ad's headline. + google.protobuf.StringValue headline_part3 = 6; + + // The description of the ad. + google.protobuf.StringValue description = 3; + + // The second description of the ad. + google.protobuf.StringValue description2 = 7; + + // The text that can appear alongside the ad's displayed URL. + google.protobuf.StringValue path1 = 4; + + // Additional text that can appear alongside the ad's displayed URL. + google.protobuf.StringValue path2 = 5; +} + +// A call-only ad. +message CallOnlyAdInfo { + // The country code in the ad. + google.protobuf.StringValue country_code = 1; + + // The phone number in the ad. + google.protobuf.StringValue phone_number = 2; + + // The business name in the ad. + google.protobuf.StringValue business_name = 3; + + // First headline in the ad. + google.protobuf.StringValue headline1 = 11; + + // Second headline in the ad. + google.protobuf.StringValue headline2 = 12; + + // The first line of the ad's description. + google.protobuf.StringValue description1 = 4; + + // The second line of the ad's description. + google.protobuf.StringValue description2 = 5; + + // Whether to enable call tracking for the creative. Enabling call + // tracking also enables call conversions. + google.protobuf.BoolValue call_tracked = 6; + + // Whether to disable call conversion for the creative. + // If set to `true`, disables call conversions even when `call_tracked` is + // `true`. + // If `call_tracked` is `false`, this field is ignored. + google.protobuf.BoolValue disable_call_conversion = 7; + + // The URL to be used for phone number verification. + google.protobuf.StringValue phone_number_verification_url = 8; + + // The conversion action to attribute a call conversion to. If not set a + // default conversion action is used. This field only has effect if + // call_tracked is set to true. Otherwise this field is ignored. + google.protobuf.StringValue conversion_action = 9; + + // The call conversion behavior of this call only ad. It can use its own call + // conversion setting, inherit the account level setting, or be disabled. + google.ads.googleads.v3.enums.CallConversionReportingStateEnum.CallConversionReportingState conversion_reporting_state = 10; +} + +// An expanded dynamic search ad. +message ExpandedDynamicSearchAdInfo { + // The description of the ad. + google.protobuf.StringValue description = 1; + + // The second description of the ad. + google.protobuf.StringValue description2 = 2; +} + +// A hotel ad. +message HotelAdInfo { + +} + +// A Smart Shopping ad. +message ShoppingSmartAdInfo { + +} + +// A standard Shopping ad. +message ShoppingProductAdInfo { + +} + +// A Shopping Comparison Listing ad. +message ShoppingComparisonListingAdInfo { + // Headline of the ad. This field is required. Allowed length is between 25 + // and 45 characters. + google.protobuf.StringValue headline = 1; +} + +// A Gmail ad. +message GmailAdInfo { + // The Gmail teaser. + GmailTeaser teaser = 1; + + // The MediaFile resource name of the header image. Valid image types are GIF, + // JPEG and PNG. The minimum size is 300x100 pixels and the aspect ratio must + // be between 3:1 and 5:1 (+-1%). + google.protobuf.StringValue header_image = 2; + + // The MediaFile resource name of the marketing image. Valid image types are + // GIF, JPEG and PNG. The image must either be landscape with a minimum size + // of 600x314 pixels and aspect ratio of 600:314 (+-1%) or square with a + // minimum size of 300x300 pixels and aspect ratio of 1:1 (+-1%) + google.protobuf.StringValue marketing_image = 3; + + // Headline of the marketing image. + google.protobuf.StringValue marketing_image_headline = 4; + + // Description of the marketing image. + google.protobuf.StringValue marketing_image_description = 5; + + // Display-call-to-action of the marketing image. + DisplayCallToAction marketing_image_display_call_to_action = 6; + + // Product images. Up to 15 images are supported. + repeated ProductImage product_images = 7; + + // Product videos. Up to 7 videos are supported. At least one product video + // or a marketing image must be specified. + repeated ProductVideo product_videos = 8; +} + +// Gmail teaser data. The teaser is a small header that acts as an invitation +// to view the rest of the ad (the body). +message GmailTeaser { + // Headline of the teaser. + google.protobuf.StringValue headline = 1; + + // Description of the teaser. + google.protobuf.StringValue description = 2; + + // Business name of the advertiser. + google.protobuf.StringValue business_name = 3; + + // The MediaFile resource name of the logo image. Valid image types are GIF, + // JPEG and PNG. The minimum size is 144x144 pixels and the aspect ratio must + // be 1:1 (+-1%). + google.protobuf.StringValue logo_image = 4; +} + +// Data for display call to action. The call to action is a piece of the ad +// that prompts the user to do something. Like clicking a link or making a phone +// call. +message DisplayCallToAction { + // Text for the display-call-to-action. + google.protobuf.StringValue text = 1; + + // Text color for the display-call-to-action in hexadecimal, e.g. #ffffff for + // white. + google.protobuf.StringValue text_color = 2; + + // Identifies the url collection in the ad.url_collections field. If not set + // the url defaults to final_url. + google.protobuf.StringValue url_collection_id = 3; +} + +// Product image specific data. +message ProductImage { + // The MediaFile resource name of the product image. Valid image types are + // GIF, JPEG and PNG. The minimum size is 300x300 pixels and the aspect ratio + // must be 1:1 (+-1%). + google.protobuf.StringValue product_image = 1; + + // Description of the product. + google.protobuf.StringValue description = 2; + + // Display-call-to-action of the product image. + DisplayCallToAction display_call_to_action = 3; +} + +// Product video specific data. +message ProductVideo { + // The MediaFile resource name of a video which must be hosted on YouTube. + google.protobuf.StringValue product_video = 1; +} + +// An image ad. +message ImageAdInfo { + // Width in pixels of the full size image. + google.protobuf.Int64Value pixel_width = 4; + + // Height in pixels of the full size image. + google.protobuf.Int64Value pixel_height = 5; + + // URL of the full size image. + google.protobuf.StringValue image_url = 6; + + // Width in pixels of the preview size image. + google.protobuf.Int64Value preview_pixel_width = 7; + + // Height in pixels of the preview size image. + google.protobuf.Int64Value preview_pixel_height = 8; + + // URL of the preview size image. + google.protobuf.StringValue preview_image_url = 9; + + // The mime type of the image. + google.ads.googleads.v3.enums.MimeTypeEnum.MimeType mime_type = 10; + + // The name of the image. If the image was created from a MediaFile, this is + // the MediaFile's name. If the image was created from bytes, this is empty. + google.protobuf.StringValue name = 11; + + // The image to create the ImageAd from. This can be specified in one of + // two ways. + // 1. An existing MediaFile resource. + // 2. The raw image data as bytes. + oneof image { + // The MediaFile resource to use for the image. + google.protobuf.StringValue media_file = 1; + + // Raw image data as bytes. + google.protobuf.BytesValue data = 2; + + // An ad ID to copy the image from. + google.protobuf.Int64Value ad_id_to_copy_image_from = 3; + } +} + +// Representation of video bumper in-stream ad format (very short in-stream +// non-skippable video ad). +message VideoBumperInStreamAdInfo { + // The MediaFile resource name of the companion banner used with the ad. + google.protobuf.StringValue companion_banner = 1; +} + +// Representation of video non-skippable in-stream ad format (15 second +// in-stream non-skippable video ad). +message VideoNonSkippableInStreamAdInfo { + // The MediaFile resource name of the companion banner used with the ad. + google.protobuf.StringValue companion_banner = 1; +} + +// Representation of video TrueView in-stream ad format (ad shown during video +// playback, often at beginning, which displays a skip button a few seconds into +// the video). +message VideoTrueViewInStreamAdInfo { + // Label on the CTA (call-to-action) button taking the user to the video ad's + // final URL. + // Required for TrueView for action campaigns, optional otherwise. + google.protobuf.StringValue action_button_label = 1; + + // Additional text displayed with the CTA (call-to-action) button to give + // context and encourage clicking on the button. + google.protobuf.StringValue action_headline = 2; + + // The MediaFile resource name of the companion banner used with the ad. + google.protobuf.StringValue companion_banner = 3; +} + +// Representation of video out-stream ad format (ad shown alongside a feed +// with automatic playback, without sound). +message VideoOutstreamAdInfo { + // The headline of the ad. + google.protobuf.StringValue headline = 1; + + // The description line. + google.protobuf.StringValue description = 2; +} + +// Representation of video TrueView discovery ad format. +message VideoTrueViewDiscoveryAdInfo { + // The headline of the ad. + google.protobuf.StringValue headline = 1; + + // First text line for a TrueView video discovery ad. + google.protobuf.StringValue description1 = 2; + + // Second text line for a TrueView video discovery ad. + google.protobuf.StringValue description2 = 3; +} + +// A video ad. +message VideoAdInfo { + // The MediaFile resource to use for the video. + google.protobuf.StringValue media_file = 1; + + // Format-specific schema for the different video formats. + oneof format { + // Video TrueView in-stream ad format. + VideoTrueViewInStreamAdInfo in_stream = 2; + + // Video bumper in-stream ad format. + VideoBumperInStreamAdInfo bumper = 3; + + // Video out-stream ad format. + VideoOutstreamAdInfo out_stream = 4; + + // Video non-skippable in-stream ad format. + VideoNonSkippableInStreamAdInfo non_skippable = 5; + + // Video TrueView discovery ad format. + VideoTrueViewDiscoveryAdInfo discovery = 6; + } +} + +// A responsive search ad. +// +// Responsive search ads let you create an ad that adapts to show more text, and +// more relevant messages, to your customers. Enter multiple headlines and +// descriptions when creating a responsive search ad, and over time, Google Ads +// will automatically test different combinations and learn which combinations +// perform best. By adapting your ad's content to more closely match potential +// customers' search terms, responsive search ads may improve your campaign's +// performance. +// +// More information at https://support.google.com/google-ads/answer/7684791 +message ResponsiveSearchAdInfo { + // List of text assets for headlines. When the ad serves the headlines will + // be selected from this list. + repeated AdTextAsset headlines = 1; + + // List of text assets for descriptions. When the ad serves the descriptions + // will be selected from this list. + repeated AdTextAsset descriptions = 2; + + // First part of text that may appear appended to the url displayed in the ad. + google.protobuf.StringValue path1 = 3; + + // Second part of text that may appear appended to the url displayed in the + // ad. This field can only be set when path1 is also set. + google.protobuf.StringValue path2 = 4; +} + +// A legacy responsive display ad. Ads of this type are labeled 'Responsive ads' +// in the Google Ads UI. +message LegacyResponsiveDisplayAdInfo { + // The short version of the ad's headline. + google.protobuf.StringValue short_headline = 1; + + // The long version of the ad's headline. + google.protobuf.StringValue long_headline = 2; + + // The description of the ad. + google.protobuf.StringValue description = 3; + + // The business name in the ad. + google.protobuf.StringValue business_name = 4; + + // Advertiser's consent to allow flexible color. When true, the ad may be + // served with different color if necessary. When false, the ad will be served + // with the specified colors or a neutral color. + // The default value is true. + // Must be true if main_color and accent_color are not set. + google.protobuf.BoolValue allow_flexible_color = 5; + + // The accent color of the ad in hexadecimal, e.g. #ffffff for white. + // If one of main_color and accent_color is set, the other is required as + // well. + google.protobuf.StringValue accent_color = 6; + + // The main color of the ad in hexadecimal, e.g. #ffffff for white. + // If one of main_color and accent_color is set, the other is required as + // well. + google.protobuf.StringValue main_color = 7; + + // The call-to-action text for the ad. + google.protobuf.StringValue call_to_action_text = 8; + + // The MediaFile resource name of the logo image used in the ad. + google.protobuf.StringValue logo_image = 9; + + // The MediaFile resource name of the square logo image used in the ad. + google.protobuf.StringValue square_logo_image = 10; + + // The MediaFile resource name of the marketing image used in the ad. + google.protobuf.StringValue marketing_image = 11; + + // The MediaFile resource name of the square marketing image used in the ad. + google.protobuf.StringValue square_marketing_image = 12; + + // Specifies which format the ad will be served in. Default is ALL_FORMATS. + google.ads.googleads.v3.enums.DisplayAdFormatSettingEnum.DisplayAdFormatSetting format_setting = 13; + + // Prefix before price. E.g. 'as low as'. + google.protobuf.StringValue price_prefix = 14; + + // Promotion text used for dyanmic formats of responsive ads. For example + // 'Free two-day shipping'. + google.protobuf.StringValue promo_text = 15; +} + +// An app ad. +message AppAdInfo { + // An optional text asset that, if specified, must always be displayed when + // the ad is served. + AdTextAsset mandatory_ad_text = 1; + + // List of text assets for headlines. When the ad serves the headlines will + // be selected from this list. + repeated AdTextAsset headlines = 2; + + // List of text assets for descriptions. When the ad serves the descriptions + // will be selected from this list. + repeated AdTextAsset descriptions = 3; + + // List of image assets that may be displayed with the ad. + repeated AdImageAsset images = 4; + + // List of YouTube video assets that may be displayed with the ad. + repeated AdVideoAsset youtube_videos = 5; + + // List of media bundle assets that may be used with the ad. + repeated AdMediaBundleAsset html5_media_bundles = 6; +} + +// App engagement ads allow you to write text encouraging a specific action in +// the app, like checking in, making a purchase, or booking a flight. +// They allow you to send users to a specific part of your app where they can +// find what they're looking for easier and faster. +message AppEngagementAdInfo { + // List of text assets for headlines. When the ad serves the headlines will + // be selected from this list. + repeated AdTextAsset headlines = 1; + + // List of text assets for descriptions. When the ad serves the descriptions + // will be selected from this list. + repeated AdTextAsset descriptions = 2; + + // List of image assets that may be displayed with the ad. + repeated AdImageAsset images = 3; + + // List of video assets that may be displayed with the ad. + repeated AdVideoAsset videos = 4; +} + +// A legacy app install ad that only can be used by a few select customers. +message LegacyAppInstallAdInfo { + // The id of the mobile app. + google.protobuf.StringValue app_id = 1; + + // The app store the mobile app is available in. + google.ads.googleads.v3.enums.LegacyAppInstallAdAppStoreEnum.LegacyAppInstallAdAppStore app_store = 2; + + // The headline of the ad. + google.protobuf.StringValue headline = 3; + + // The first description line of the ad. + google.protobuf.StringValue description1 = 4; + + // The second description line of the ad. + google.protobuf.StringValue description2 = 5; +} + +// A responsive display ad. +message ResponsiveDisplayAdInfo { + // Marketing images to be used in the ad. Valid image types are GIF, + // JPEG, and PNG. The minimum size is 600x314 and the aspect ratio must + // be 1.91:1 (+-1%). At least one marketing_image is required. Combined with + // square_marketing_images the maximum is 15. + repeated AdImageAsset marketing_images = 1; + + // Square marketing images to be used in the ad. Valid image types are GIF, + // JPEG, and PNG. The minimum size is 300x300 and the aspect ratio must + // be 1:1 (+-1%). At least one square marketing_image is required. Combined + // with marketing_images the maximum is 15. + repeated AdImageAsset square_marketing_images = 2; + + // Logo images to be used in the ad. Valid image types are GIF, + // JPEG, and PNG. The minimum size is 512x128 and the aspect ratio must + // be 4:1 (+-1%). Combined with square_logo_images the maximum is 5. + repeated AdImageAsset logo_images = 3; + + // Square logo images to be used in the ad. Valid image types are GIF, + // JPEG, and PNG. The minimum size is 128x128 and the aspect ratio must + // be 1:1 (+-1%). Combined with square_logo_images the maximum is 5. + repeated AdImageAsset square_logo_images = 4; + + // Short format headlines for the ad. The maximum length is 30 characters. + // At least 1 and max 5 headlines can be specified. + repeated AdTextAsset headlines = 5; + + // A required long format headline. The maximum length is 90 characters. + AdTextAsset long_headline = 6; + + // Descriptive texts for the ad. The maximum length is 90 characters. At + // least 1 and max 5 headlines can be specified. + repeated AdTextAsset descriptions = 7; + + // Optional YouTube videos for the ad. A maximum of 5 videos can be specified. + repeated AdVideoAsset youtube_videos = 8; + + // The advertiser/brand name. Maximum display width is 25. + google.protobuf.StringValue business_name = 9; + + // The main color of the ad in hexadecimal, e.g. #ffffff for white. + // If one of main_color and accent_color is set, the other is required as + // well. + google.protobuf.StringValue main_color = 10; + + // The accent color of the ad in hexadecimal, e.g. #ffffff for white. + // If one of main_color and accent_color is set, the other is required as + // well. + google.protobuf.StringValue accent_color = 11; + + // Advertiser's consent to allow flexible color. When true, the ad may be + // served with different color if necessary. When false, the ad will be served + // with the specified colors or a neutral color. + // The default value is true. + // Must be true if main_color and accent_color are not set. + google.protobuf.BoolValue allow_flexible_color = 12; + + // The call-to-action text for the ad. Maximum display width is 30. + google.protobuf.StringValue call_to_action_text = 13; + + // Prefix before price. E.g. 'as low as'. + google.protobuf.StringValue price_prefix = 14; + + // Promotion text used for dyanmic formats of responsive ads. For example + // 'Free two-day shipping'. + google.protobuf.StringValue promo_text = 15; + + // Specifies which format the ad will be served in. Default is ALL_FORMATS. + google.ads.googleads.v3.enums.DisplayAdFormatSettingEnum.DisplayAdFormatSetting format_setting = 16; +} + +// A generic type of display ad. The exact ad format is controlled by the +// display_upload_product_type field, which determines what kinds of data +// need to be included with the ad. +message DisplayUploadAdInfo { + // The product type of this ad. See comments on the enum for details. + google.ads.googleads.v3.enums.DisplayUploadProductTypeEnum.DisplayUploadProductType display_upload_product_type = 1; + + // The asset data that makes up the ad. + oneof media_asset { + // A media bundle asset to be used in the ad. For information about the + // media bundle for HTML5_UPLOAD_AD see + // https://support.google.com/google-ads/answer/1722096 + // Media bundles that are part of dynamic product types use a special format + // that needs to be created through the Google Web Designer. See + // https://support.google.com/webdesigner/answer/7543898 for more + // information. + AdMediaBundleAsset media_bundle = 2; + } +} diff --git a/google/ads/googleads/v3/common/asset_types.proto b/google/ads/googleads/v3/common/asset_types.proto new file mode 100644 index 000000000..eb33d4777 --- /dev/null +++ b/google/ads/googleads/v3/common/asset_types.proto @@ -0,0 +1,81 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/enums/mime_type.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "AssetTypesProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file containing info messages for specific asset types. + +// A YouTube asset. +message YoutubeVideoAsset { + // YouTube video id. This is the 11 character string value used in the + // YouTube video URL. + google.protobuf.StringValue youtube_video_id = 1; +} + +// A MediaBundle asset. +message MediaBundleAsset { + // Media bundle (ZIP file) asset data. The format of the uploaded ZIP file + // depends on the ad field where it will be used. For more information on the + // format, see the documentation of the ad field where you plan on using the + // MediaBundleAsset. This field is mutate only. + google.protobuf.BytesValue data = 1; +} + +// An Image asset. +message ImageAsset { + // The raw bytes data of an image. This field is mutate only. + google.protobuf.BytesValue data = 1; + + // File size of the image asset in bytes. + google.protobuf.Int64Value file_size = 2; + + // MIME type of the image asset. + google.ads.googleads.v3.enums.MimeTypeEnum.MimeType mime_type = 3; + + // Metadata for this image at its original size. + ImageDimension full_size = 4; +} + +// Metadata for an image at a certain size, either original or resized. +message ImageDimension { + // Height of the image. + google.protobuf.Int64Value height_pixels = 1; + + // Width of the image. + google.protobuf.Int64Value width_pixels = 2; + + // A URL that returns the image with this height and width. + google.protobuf.StringValue url = 3; +} + +// A Text asset. +message TextAsset { + // Text content of the text asset. + google.protobuf.StringValue text = 1; +} diff --git a/google/ads/googleads/v3/common/bidding.proto b/google/ads/googleads/v3/common/bidding.proto new file mode 100644 index 000000000..cded37b4f --- /dev/null +++ b/google/ads/googleads/v3/common/bidding.proto @@ -0,0 +1,169 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/enums/target_impression_share_location.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "BiddingProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing bidding schemes. + +// Commission is an automatic bidding strategy in which the advertiser pays a +// certain portion of the conversion value. +message Commission { + // Commission rate defines the portion of the conversion value that the + // advertiser will be billed. A commission rate of x should be passed into + // this field as (x * 1,000,000). For example, 106,000 represents a commission + // rate of 0.106 (10.6%). + google.protobuf.Int64Value commission_rate_micros = 1; +} + +// An automated bidding strategy that raises bids for clicks +// that seem more likely to lead to a conversion and lowers +// them for clicks where they seem less likely. +message EnhancedCpc { + +} + +// Manual click-based bidding where user pays per click. +message ManualCpc { + // Whether bids are to be enhanced based on conversion optimizer data. + google.protobuf.BoolValue enhanced_cpc_enabled = 1; +} + +// Manual impression-based bidding where user pays per thousand impressions. +message ManualCpm { + +} + +// View based bidding where user pays per video view. +message ManualCpv { + +} + +// An automated bidding strategy that sets bids to help get the most conversions +// for your campaign while spending your budget. +message MaximizeConversions { + +} + +// An automated bidding strategy which tries to maximize conversion value +// given a daily budget. +message MaximizeConversionValue { + // The target return on ad spend (ROAS) option. If set, the bid strategy will + // maximize revenue while averaging the target return on ad spend. If the + // target ROAS is high, the bid strategy may not be able to spend the full + // budget. If the target ROAS is not set, the bid strategy will aim to + // achieve the highest possible ROAS for the budget. + google.protobuf.DoubleValue target_roas = 1; +} + +// An automated bid strategy that sets bids to help get as many conversions as +// possible at the target cost-per-acquisition (CPA) you set. +message TargetCpa { + // Average CPA target. + // This target should be greater than or equal to minimum billable unit based + // on the currency for the account. + google.protobuf.Int64Value target_cpa_micros = 1; + + // Maximum bid limit that can be set by the bid strategy. + // The limit applies to all keywords managed by the strategy. + google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + + // Minimum bid limit that can be set by the bid strategy. + // The limit applies to all keywords managed by the strategy. + google.protobuf.Int64Value cpc_bid_floor_micros = 3; +} + +// Target CPM (cost per thousand impressions) is an automated bidding strategy +// that sets bids to optimize performance given the target CPM you set. +message TargetCpm { + +} + +// An automated bidding strategy that sets bids so that a certain percentage of +// search ads are shown at the top of the first page (or other targeted +// location). +// next tag = 4 +message TargetImpressionShare { + // The targeted location on the search results page. + google.ads.googleads.v3.enums.TargetImpressionShareLocationEnum.TargetImpressionShareLocation location = 1; + + // The desired fraction of ads to be shown in the targeted location in micros. + // E.g. 1% equals 10,000. + google.protobuf.Int64Value location_fraction_micros = 2; + + // The highest CPC bid the automated bidding system is permitted to specify. + // This is a required field entered by the advertiser that sets the ceiling + // and specified in local micros. + google.protobuf.Int64Value cpc_bid_ceiling_micros = 3; +} + +// An automated bidding strategy that helps you maximize revenue while +// averaging a specific target return on ad spend (ROAS). +message TargetRoas { + // Required. The desired revenue (based on conversion data) per unit of spend. + // Value must be between 0.01 and 1000.0, inclusive. + google.protobuf.DoubleValue target_roas = 1; + + // Maximum bid limit that can be set by the bid strategy. + // The limit applies to all keywords managed by the strategy. + google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + + // Minimum bid limit that can be set by the bid strategy. + // The limit applies to all keywords managed by the strategy. + google.protobuf.Int64Value cpc_bid_floor_micros = 3; +} + +// An automated bid strategy that sets your bids to help get as many clicks +// as possible within your budget. +message TargetSpend { + // The spend target under which to maximize clicks. + // A TargetSpend bidder will attempt to spend the smaller of this value + // or the natural throttling spend amount. + // If not specified, the budget is used as the spend target. + google.protobuf.Int64Value target_spend_micros = 1; + + // Maximum bid limit that can be set by the bid strategy. + // The limit applies to all keywords managed by the strategy. + google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; +} + +// A bidding strategy where bids are a fraction of the advertised price for +// some good or service. +message PercentCpc { + // Maximum bid limit that can be set by the bid strategy. This is + // an optional field entered by the advertiser and specified in local micros. + // Note: A zero value is interpreted in the same way as having bid_ceiling + // undefined. + google.protobuf.Int64Value cpc_bid_ceiling_micros = 1; + + // Adjusts the bid for each auction upward or downward, depending on the + // likelihood of a conversion. Individual bids may exceed + // cpc_bid_ceiling_micros, but the average bid amount for a campaign should + // not. + google.protobuf.BoolValue enhanced_cpc_enabled = 2; +} diff --git a/google/ads/googleads/v3/common/click_location.proto b/google/ads/googleads/v3/common/click_location.proto new file mode 100644 index 000000000..21069c2a4 --- /dev/null +++ b/google/ads/googleads/v3/common/click_location.proto @@ -0,0 +1,49 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "ClickLocationProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing a ClickLocation. + +// Location criteria associated with a click. +message ClickLocation { + // The city location criterion associated with the impression. + google.protobuf.StringValue city = 1; + + // The country location criterion associated with the impression. + google.protobuf.StringValue country = 2; + + // The metro location criterion associated with the impression. + google.protobuf.StringValue metro = 3; + + // The most specific location criterion associated with the impression. + google.protobuf.StringValue most_specific = 4; + + // The region location criterion associated with the impression. + google.protobuf.StringValue region = 5; +} diff --git a/google/ads/googleads/v3/common/criteria.proto b/google/ads/googleads/v3/common/criteria.proto new file mode 100644 index 000000000..9442c75ff --- /dev/null +++ b/google/ads/googleads/v3/common/criteria.proto @@ -0,0 +1,593 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/enums/age_range_type.proto"; +import "google/ads/googleads/v3/enums/app_payment_model_type.proto"; +import "google/ads/googleads/v3/enums/content_label_type.proto"; +import "google/ads/googleads/v3/enums/day_of_week.proto"; +import "google/ads/googleads/v3/enums/device.proto"; +import "google/ads/googleads/v3/enums/gender_type.proto"; +import "google/ads/googleads/v3/enums/hotel_date_selection_type.proto"; +import "google/ads/googleads/v3/enums/income_range_type.proto"; +import "google/ads/googleads/v3/enums/interaction_type.proto"; +import "google/ads/googleads/v3/enums/keyword_match_type.proto"; +import "google/ads/googleads/v3/enums/listing_group_type.proto"; +import "google/ads/googleads/v3/enums/location_group_radius_units.proto"; +import "google/ads/googleads/v3/enums/minute_of_hour.proto"; +import "google/ads/googleads/v3/enums/parental_status_type.proto"; +import "google/ads/googleads/v3/enums/preferred_content_type.proto"; +import "google/ads/googleads/v3/enums/product_bidding_category_level.proto"; +import "google/ads/googleads/v3/enums/product_channel.proto"; +import "google/ads/googleads/v3/enums/product_channel_exclusivity.proto"; +import "google/ads/googleads/v3/enums/product_condition.proto"; +import "google/ads/googleads/v3/enums/product_custom_attribute_index.proto"; +import "google/ads/googleads/v3/enums/product_type_level.proto"; +import "google/ads/googleads/v3/enums/proximity_radius_units.proto"; +import "google/ads/googleads/v3/enums/webpage_condition_operand.proto"; +import "google/ads/googleads/v3/enums/webpage_condition_operator.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "CriteriaProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing criteria types. + +// A keyword criterion. +message KeywordInfo { + // The text of the keyword (at most 80 characters and 10 words). + google.protobuf.StringValue text = 1; + + // The match type of the keyword. + google.ads.googleads.v3.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 2; +} + +// A placement criterion. This can be used to modify bids for sites when +// targeting the content network. +message PlacementInfo { + // URL of the placement. + // + // For example, "http://www.domain.com". + google.protobuf.StringValue url = 1; +} + +// A mobile app category criterion. +message MobileAppCategoryInfo { + // The mobile app category constant resource name. + google.protobuf.StringValue mobile_app_category_constant = 1; +} + +// A mobile application criterion. +message MobileApplicationInfo { + // A string that uniquely identifies a mobile application to Google Ads API. + // The format of this string is "{platform}-{platform_native_id}", where + // platform is "1" for iOS apps and "2" for Android apps, and where + // platform_native_id is the mobile application identifier native to the + // corresponding platform. + // For iOS, this native identifier is the 9 digit string that appears at the + // end of an App Store URL (e.g., "476943146" for "Flood-It! 2" whose App + // Store link is "http://itunes.apple.com/us/app/flood-it!-2/id476943146"). + // For Android, this native identifier is the application's package name + // (e.g., "com.labpixies.colordrips" for "Color Drips" given Google Play link + // "https://play.google.com/store/apps/details?id=com.labpixies.colordrips"). + // A well formed app id for Google Ads API would thus be "1-476943146" for iOS + // and "2-com.labpixies.colordrips" for Android. + // This field is required and must be set in CREATE operations. + google.protobuf.StringValue app_id = 2; + + // Name of this mobile application. + google.protobuf.StringValue name = 3; +} + +// A location criterion. +message LocationInfo { + // The geo target constant resource name. + google.protobuf.StringValue geo_target_constant = 1; +} + +// A device criterion. +message DeviceInfo { + // Type of the device. + google.ads.googleads.v3.enums.DeviceEnum.Device type = 1; +} + +// A preferred content criterion. +message PreferredContentInfo { + // Type of the preferred content. + google.ads.googleads.v3.enums.PreferredContentTypeEnum.PreferredContentType type = 2; +} + +// A listing group criterion. +message ListingGroupInfo { + // Type of the listing group. + google.ads.googleads.v3.enums.ListingGroupTypeEnum.ListingGroupType type = 1; + + // Dimension value with which this listing group is refining its parent. + // Undefined for the root group. + ListingDimensionInfo case_value = 2; + + // Resource name of ad group criterion which is the parent listing group + // subdivision. Null for the root group. + google.protobuf.StringValue parent_ad_group_criterion = 3; +} + +// A listing scope criterion. +message ListingScopeInfo { + // Scope of the campaign criterion. + repeated ListingDimensionInfo dimensions = 2; +} + +// Listing dimensions for listing group criterion. +message ListingDimensionInfo { + // Dimension of one of the types below is always present. + oneof dimension { + // Advertiser-specific hotel ID. + HotelIdInfo hotel_id = 2; + + // Class of the hotel as a number of stars 1 to 5. + HotelClassInfo hotel_class = 3; + + // Country or Region the hotel is located in. + HotelCountryRegionInfo hotel_country_region = 4; + + // State the hotel is located in. + HotelStateInfo hotel_state = 5; + + // City the hotel is located in. + HotelCityInfo hotel_city = 6; + + // Bidding category of a product offer. + ProductBiddingCategoryInfo product_bidding_category = 13; + + // Brand of a product offer. + ProductBrandInfo product_brand = 15; + + // Locality of a product offer. + ProductChannelInfo product_channel = 8; + + // Availability of a product offer. + ProductChannelExclusivityInfo product_channel_exclusivity = 9; + + // Condition of a product offer. + ProductConditionInfo product_condition = 10; + + // Custom attribute of a product offer. + ProductCustomAttributeInfo product_custom_attribute = 16; + + // Item id of a product offer. + ProductItemIdInfo product_item_id = 11; + + // Type of a product offer. + ProductTypeInfo product_type = 12; + + // Unknown dimension. Set when no other listing dimension is set. + UnknownListingDimensionInfo unknown_listing_dimension = 14; + } +} + +// Advertiser-specific hotel ID. +message HotelIdInfo { + // String value of the hotel ID. + google.protobuf.StringValue value = 1; +} + +// Class of the hotel as a number of stars 1 to 5. +message HotelClassInfo { + // Long value of the hotel class. + google.protobuf.Int64Value value = 1; +} + +// Country or Region the hotel is located in. +message HotelCountryRegionInfo { + // The Geo Target Constant resource name. + google.protobuf.StringValue country_region_criterion = 1; +} + +// State the hotel is located in. +message HotelStateInfo { + // The Geo Target Constant resource name. + google.protobuf.StringValue state_criterion = 1; +} + +// City the hotel is located in. +message HotelCityInfo { + // The Geo Target Constant resource name. + google.protobuf.StringValue city_criterion = 1; +} + +// Bidding category of a product offer. +message ProductBiddingCategoryInfo { + // ID of the product bidding category. + // + // This ID is equivalent to the google_product_category ID as described in + // this article: https://support.google.com/merchants/answer/6324436 + google.protobuf.Int64Value id = 1; + + // Two-letter upper-case country code of the product bidding category. It must + // match the campaign.shopping_setting.sales_country field. + google.protobuf.StringValue country_code = 2; + + // Level of the product bidding category. + google.ads.googleads.v3.enums.ProductBiddingCategoryLevelEnum.ProductBiddingCategoryLevel level = 3; +} + +// Brand of the product. +message ProductBrandInfo { + // String value of the product brand. + google.protobuf.StringValue value = 1; +} + +// Locality of a product offer. +message ProductChannelInfo { + // Value of the locality. + google.ads.googleads.v3.enums.ProductChannelEnum.ProductChannel channel = 1; +} + +// Availability of a product offer. +message ProductChannelExclusivityInfo { + // Value of the availability. + google.ads.googleads.v3.enums.ProductChannelExclusivityEnum.ProductChannelExclusivity channel_exclusivity = 1; +} + +// Condition of a product offer. +message ProductConditionInfo { + // Value of the condition. + google.ads.googleads.v3.enums.ProductConditionEnum.ProductCondition condition = 1; +} + +// Custom attribute of a product offer. +message ProductCustomAttributeInfo { + // String value of the product custom attribute. + google.protobuf.StringValue value = 1; + + // Indicates the index of the custom attribute. + google.ads.googleads.v3.enums.ProductCustomAttributeIndexEnum.ProductCustomAttributeIndex index = 2; +} + +// Item id of a product offer. +message ProductItemIdInfo { + // Value of the id. + google.protobuf.StringValue value = 1; +} + +// Type of a product offer. +message ProductTypeInfo { + // Value of the type. + google.protobuf.StringValue value = 1; + + // Level of the type. + google.ads.googleads.v3.enums.ProductTypeLevelEnum.ProductTypeLevel level = 2; +} + +// Unknown listing dimension. +message UnknownListingDimensionInfo { + +} + +// Criterion for hotel date selection (default dates vs. user selected). +message HotelDateSelectionTypeInfo { + // Type of the hotel date selection + google.ads.googleads.v3.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType type = 1; +} + +// Criterion for number of days prior to the stay the booking is being made. +message HotelAdvanceBookingWindowInfo { + // Low end of the number of days prior to the stay. + google.protobuf.Int64Value min_days = 1; + + // High end of the number of days prior to the stay. + google.protobuf.Int64Value max_days = 2; +} + +// Criterion for length of hotel stay in nights. +message HotelLengthOfStayInfo { + // Low end of the number of nights in the stay. + google.protobuf.Int64Value min_nights = 1; + + // High end of the number of nights in the stay. + google.protobuf.Int64Value max_nights = 2; +} + +// Criterion for day of the week the booking is for. +message HotelCheckInDayInfo { + // The day of the week. + google.ads.googleads.v3.enums.DayOfWeekEnum.DayOfWeek day_of_week = 1; +} + +// Criterion for Interaction Type. +message InteractionTypeInfo { + // The interaction type. + google.ads.googleads.v3.enums.InteractionTypeEnum.InteractionType type = 1; +} + +// Represents an AdSchedule criterion. +// +// AdSchedule is specified as the day of the week and a time interval +// within which ads will be shown. +// +// No more than six AdSchedules can be added for the same day. +message AdScheduleInfo { + // Minutes after the start hour at which this schedule starts. + // + // This field is required for CREATE operations and is prohibited on UPDATE + // operations. + google.ads.googleads.v3.enums.MinuteOfHourEnum.MinuteOfHour start_minute = 1; + + // Minutes after the end hour at which this schedule ends. The schedule is + // exclusive of the end minute. + // + // This field is required for CREATE operations and is prohibited on UPDATE + // operations. + google.ads.googleads.v3.enums.MinuteOfHourEnum.MinuteOfHour end_minute = 2; + + // Starting hour in 24 hour time. + // This field must be between 0 and 23, inclusive. + // + // This field is required for CREATE operations and is prohibited on UPDATE + // operations. + google.protobuf.Int32Value start_hour = 3; + + // Ending hour in 24 hour time; 24 signifies end of the day. + // This field must be between 0 and 24, inclusive. + // + // This field is required for CREATE operations and is prohibited on UPDATE + // operations. + google.protobuf.Int32Value end_hour = 4; + + // Day of the week the schedule applies to. + // + // This field is required for CREATE operations and is prohibited on UPDATE + // operations. + google.ads.googleads.v3.enums.DayOfWeekEnum.DayOfWeek day_of_week = 5; +} + +// An age range criterion. +message AgeRangeInfo { + // Type of the age range. + google.ads.googleads.v3.enums.AgeRangeTypeEnum.AgeRangeType type = 1; +} + +// A gender criterion. +message GenderInfo { + // Type of the gender. + google.ads.googleads.v3.enums.GenderTypeEnum.GenderType type = 1; +} + +// An income range criterion. +message IncomeRangeInfo { + // Type of the income range. + google.ads.googleads.v3.enums.IncomeRangeTypeEnum.IncomeRangeType type = 1; +} + +// A parental status criterion. +message ParentalStatusInfo { + // Type of the parental status. + google.ads.googleads.v3.enums.ParentalStatusTypeEnum.ParentalStatusType type = 1; +} + +// A YouTube Video criterion. +message YouTubeVideoInfo { + // YouTube video id as it appears on the YouTube watch page. + google.protobuf.StringValue video_id = 1; +} + +// A YouTube Channel criterion. +message YouTubeChannelInfo { + // The YouTube uploader channel id or the channel code of a YouTube channel. + google.protobuf.StringValue channel_id = 1; +} + +// A User List criterion. Represents a user list that is defined by the +// advertiser to be targeted. +message UserListInfo { + // The User List resource name. + google.protobuf.StringValue user_list = 1; +} + +// A Proximity criterion. The geo point and radius determine what geographical +// area is included. The address is a description of the geo point that does +// not affect ad serving. +// +// There are two ways to create a proximity. First, by setting an address +// and radius. The geo point will be automatically computed. Second, by +// setting a geo point and radius. The address is an optional label that won't +// be validated. +message ProximityInfo { + // Latitude and longitude. + GeoPointInfo geo_point = 1; + + // The radius of the proximity. + google.protobuf.DoubleValue radius = 2; + + // The unit of measurement of the radius. Default is KILOMETERS. + google.ads.googleads.v3.enums.ProximityRadiusUnitsEnum.ProximityRadiusUnits radius_units = 3; + + // Full address. + AddressInfo address = 4; +} + +// Geo point for proximity criterion. +message GeoPointInfo { + // Micro degrees for the longitude. + google.protobuf.Int32Value longitude_in_micro_degrees = 1; + + // Micro degrees for the latitude. + google.protobuf.Int32Value latitude_in_micro_degrees = 2; +} + +// Address for proximity criterion. +message AddressInfo { + // Postal code. + google.protobuf.StringValue postal_code = 1; + + // Province or state code. + google.protobuf.StringValue province_code = 2; + + // Country code. + google.protobuf.StringValue country_code = 3; + + // Province or state name. + google.protobuf.StringValue province_name = 4; + + // Street address line 1. + google.protobuf.StringValue street_address = 5; + + // Street address line 2. This field is write-only. It is only used for + // calculating the longitude and latitude of an address when geo_point is + // empty. + google.protobuf.StringValue street_address2 = 6; + + // Name of the city. + google.protobuf.StringValue city_name = 7; +} + +// A topic criterion. Use topics to target or exclude placements in the +// Google Display Network based on the category into which the placement falls +// (for example, "Pets & Animals/Pets/Dogs"). +message TopicInfo { + // The Topic Constant resource name. + google.protobuf.StringValue topic_constant = 1; + + // The category to target or exclude. Each subsequent element in the array + // describes a more specific sub-category. For example, + // "Pets & Animals", "Pets", "Dogs" represents the "Pets & Animals/Pets/Dogs" + // category. + repeated google.protobuf.StringValue path = 2; +} + +// A language criterion. +message LanguageInfo { + // The language constant resource name. + google.protobuf.StringValue language_constant = 1; +} + +// An IpBlock criterion used for IP exclusions. We allow: +// - IPv4 and IPv6 addresses +// - individual addresses (192.168.0.1) +// - masks for individual addresses (192.168.0.1/32) +// - masks for Class C networks (192.168.0.1/24) +message IpBlockInfo { + // The IP address of this IP block. + google.protobuf.StringValue ip_address = 1; +} + +// Content Label for category exclusion. +message ContentLabelInfo { + // Content label type, required for CREATE operations. + google.ads.googleads.v3.enums.ContentLabelTypeEnum.ContentLabelType type = 1; +} + +// Represents a Carrier Criterion. +message CarrierInfo { + // The Carrier constant resource name. + google.protobuf.StringValue carrier_constant = 1; +} + +// Represents a particular interest-based topic to be targeted. +message UserInterestInfo { + // The UserInterest resource name. + google.protobuf.StringValue user_interest_category = 1; +} + +// Represents a criterion for targeting webpages of an advertiser's website. +message WebpageInfo { + // The name of the criterion that is defined by this parameter. The name value + // will be used for identifying, sorting and filtering criteria with this type + // of parameters. + // + // This field is required for CREATE operations and is prohibited on UPDATE + // operations. + google.protobuf.StringValue criterion_name = 1; + + // Conditions, or logical expressions, for webpage targeting. The list of + // webpage targeting conditions are and-ed together when evaluated + // for targeting. + // + // This field is required for CREATE operations and is prohibited on UPDATE + // operations. + repeated WebpageConditionInfo conditions = 2; +} + +// Logical expression for targeting webpages of an advertiser's website. +message WebpageConditionInfo { + // Operand of webpage targeting condition. + google.ads.googleads.v3.enums.WebpageConditionOperandEnum.WebpageConditionOperand operand = 1; + + // Operator of webpage targeting condition. + google.ads.googleads.v3.enums.WebpageConditionOperatorEnum.WebpageConditionOperator operator = 2; + + // Argument of webpage targeting condition. + google.protobuf.StringValue argument = 3; +} + +// Represents an operating system version to be targeted. +message OperatingSystemVersionInfo { + // The operating system version constant resource name. + google.protobuf.StringValue operating_system_version_constant = 1; +} + +// An app payment model criterion. +message AppPaymentModelInfo { + // Type of the app payment model. + google.ads.googleads.v3.enums.AppPaymentModelTypeEnum.AppPaymentModelType type = 1; +} + +// A mobile device criterion. +message MobileDeviceInfo { + // The mobile device constant resource name. + google.protobuf.StringValue mobile_device_constant = 1; +} + +// A custom affinity criterion. +// A criterion of this type is only targetable. +message CustomAffinityInfo { + // The CustomInterest resource name. + google.protobuf.StringValue custom_affinity = 1; +} + +// A custom intent criterion. +// A criterion of this type is only targetable. +message CustomIntentInfo { + // The CustomInterest resource name. + google.protobuf.StringValue custom_intent = 1; +} + +// A radius around a list of locations specified via a feed. +message LocationGroupInfo { + // Feed specifying locations for targeting. + // This is required and must be set in CREATE operations. + google.protobuf.StringValue feed = 1; + + // Geo target constant(s) restricting the scope of the geographic area within + // the feed. Currently only one geo target constant is allowed. + repeated google.protobuf.StringValue geo_target_constants = 2; + + // Distance in units specifying the radius around targeted locations. + // This is required and must be set in CREATE operations. + google.protobuf.Int64Value radius = 3; + + // Unit of the radius, miles and meters supported currently. + // This is required and must be set in CREATE operations. + google.ads.googleads.v3.enums.LocationGroupRadiusUnitsEnum.LocationGroupRadiusUnits radius_units = 4; +} diff --git a/google/ads/googleads/v3/common/criterion_category_availability.proto b/google/ads/googleads/v3/common/criterion_category_availability.proto new file mode 100644 index 000000000..7770b5012 --- /dev/null +++ b/google/ads/googleads/v3/common/criterion_category_availability.proto @@ -0,0 +1,83 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/enums/advertising_channel_sub_type.proto"; +import "google/ads/googleads/v3/enums/advertising_channel_type.proto"; +import "google/ads/googleads/v3/enums/criterion_category_channel_availability_mode.proto"; +import "google/ads/googleads/v3/enums/criterion_category_locale_availability_mode.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "CriterionCategoryAvailabilityProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing criterion category availability information. + +// Information of category availability, per advertising channel. +message CriterionCategoryAvailability { + // Channel types and subtypes that are available to the category. + CriterionCategoryChannelAvailability channel = 1; + + // Locales that are available to the category for the channel. + repeated CriterionCategoryLocaleAvailability locale = 2; +} + +// Information of advertising channel type and subtypes a category is available +// in. +message CriterionCategoryChannelAvailability { + // Format of the channel availability. Can be ALL_CHANNELS (the rest of the + // fields will not be set), CHANNEL_TYPE (only advertising_channel_type type + // will be set, the category is available to all sub types under it) or + // CHANNEL_TYPE_AND_SUBTYPES (advertising_channel_type, + // advertising_channel_sub_type, and include_default_channel_sub_type will all + // be set). + google.ads.googleads.v3.enums.CriterionCategoryChannelAvailabilityModeEnum.CriterionCategoryChannelAvailabilityMode availability_mode = 1; + + // Channel type the category is available to. + google.ads.googleads.v3.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 2; + + // Channel subtypes under the channel type the category is available to. + repeated google.ads.googleads.v3.enums.AdvertisingChannelSubTypeEnum.AdvertisingChannelSubType advertising_channel_sub_type = 3; + + // Whether default channel sub type is included. For example, + // advertising_channel_type being DISPLAY and include_default_channel_sub_type + // being false means that the default display campaign where channel sub type + // is not set is not included in this availability configuration. + google.protobuf.BoolValue include_default_channel_sub_type = 4; +} + +// Information about which locales a category is available in. +message CriterionCategoryLocaleAvailability { + // Format of the locale availability. Can be LAUNCHED_TO_ALL (both country and + // language will be empty), COUNTRY (only country will be set), LANGUAGE (only + // language wil be set), COUNTRY_AND_LANGUAGE (both country and language will + // be set). + google.ads.googleads.v3.enums.CriterionCategoryLocaleAvailabilityModeEnum.CriterionCategoryLocaleAvailabilityMode availability_mode = 1; + + // Code of the country. + google.protobuf.StringValue country_code = 2; + + // Code of the language. + google.protobuf.StringValue language_code = 3; +} diff --git a/google/ads/googleads/v3/common/custom_parameter.proto b/google/ads/googleads/v3/common/custom_parameter.proto new file mode 100644 index 000000000..1710c1620 --- /dev/null +++ b/google/ads/googleads/v3/common/custom_parameter.proto @@ -0,0 +1,41 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "CustomParameterProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing CustomParameter and operation + +// A mapping that can be used by custom parameter tags in a +// `tracking_url_template`, `final_urls`, or `mobile_final_urls`. +message CustomParameter { + // The key matching the parameter tag name. + google.protobuf.StringValue key = 1; + + // The value to be substituted. + google.protobuf.StringValue value = 2; +} diff --git a/google/ads/googleads/v3/common/dates.proto b/google/ads/googleads/v3/common/dates.proto new file mode 100644 index 000000000..b1edbd0c7 --- /dev/null +++ b/google/ads/googleads/v3/common/dates.proto @@ -0,0 +1,40 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "DatesProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing date range message. + +// A date range. +message DateRange { + // The start date, in yyyy-mm-dd format. This date is inclusive. + google.protobuf.StringValue start_date = 1; + + // The end date, in yyyy-mm-dd format. This date is inclusive. + google.protobuf.StringValue end_date = 2; +} diff --git a/google/ads/googleads/v3/common/explorer_auto_optimizer_setting.proto b/google/ads/googleads/v3/common/explorer_auto_optimizer_setting.proto new file mode 100644 index 000000000..0506cf859 --- /dev/null +++ b/google/ads/googleads/v3/common/explorer_auto_optimizer_setting.proto @@ -0,0 +1,39 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "ExplorerAutoOptimizerSettingProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing ExplorerAutoOptimizerSetting + +// Settings for the Display Campaign Optimizer, initially named "Explorer". +// Learn more about +// [automatic targeting](https://support.google.com/google-ads/answer/190596). +message ExplorerAutoOptimizerSetting { + // Indicates whether the optimizer is turned on. + google.protobuf.BoolValue opt_in = 1; +} diff --git a/google/ads/googleads/v3/common/extensions.proto b/google/ads/googleads/v3/common/extensions.proto new file mode 100644 index 000000000..19026eaa2 --- /dev/null +++ b/google/ads/googleads/v3/common/extensions.proto @@ -0,0 +1,357 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/common/custom_parameter.proto"; +import "google/ads/googleads/v3/common/feed_common.proto"; +import "google/ads/googleads/v3/enums/app_store.proto"; +import "google/ads/googleads/v3/enums/call_conversion_reporting_state.proto"; +import "google/ads/googleads/v3/enums/price_extension_price_qualifier.proto"; +import "google/ads/googleads/v3/enums/price_extension_price_unit.proto"; +import "google/ads/googleads/v3/enums/price_extension_type.proto"; +import "google/ads/googleads/v3/enums/promotion_extension_discount_modifier.proto"; +import "google/ads/googleads/v3/enums/promotion_extension_occasion.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionsProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing extension types. + +// Represents an App extension. +message AppFeedItem { + // The visible text displayed when the link is rendered in an ad. + // This string must not be empty, and the length of this string should + // be between 1 and 25, inclusive. + google.protobuf.StringValue link_text = 1; + + // The store-specific ID for the target application. + // This string must not be empty. + google.protobuf.StringValue app_id = 2; + + // The application store that the target application belongs to. + // This field is required. + google.ads.googleads.v3.enums.AppStoreEnum.AppStore app_store = 3; + + // A list of possible final URLs after all cross domain redirects. + // This list must not be empty. + repeated google.protobuf.StringValue final_urls = 4; + + // A list of possible final mobile URLs after all cross domain redirects. + repeated google.protobuf.StringValue final_mobile_urls = 5; + + // URL template for constructing a tracking URL. Default value is "{lpurl}". + google.protobuf.StringValue tracking_url_template = 6; + + // A list of mappings to be used for substituting URL custom parameter tags in + // the tracking_url_template, final_urls, and/or final_mobile_urls. + repeated CustomParameter url_custom_parameters = 7; + + // URL template for appending params to landing page URLs served with parallel + // tracking. + google.protobuf.StringValue final_url_suffix = 8; +} + +// Represents a Call extension. +message CallFeedItem { + // The advertiser's phone number to append to the ad. + // This string must not be empty. + google.protobuf.StringValue phone_number = 1; + + // Uppercase two-letter country code of the advertiser's phone number. + // This string must not be empty. + google.protobuf.StringValue country_code = 2; + + // Indicates whether call tracking is enabled. By default, call tracking is + // not enabled. + google.protobuf.BoolValue call_tracking_enabled = 3; + + // The conversion action to attribute a call conversion to. If not set a + // default conversion action is used. This field only has effect if + // call_tracking_enabled is set to true. Otherwise this field is ignored. + google.protobuf.StringValue call_conversion_action = 4; + + // If true, disable call conversion tracking. call_conversion_action should + // not be set if this is true. Optional. + google.protobuf.BoolValue call_conversion_tracking_disabled = 5; + + // Enum value that indicates whether this call extension uses its own call + // conversion setting (or just have call conversion disabled), or following + // the account level setting. + google.ads.googleads.v3.enums.CallConversionReportingStateEnum.CallConversionReportingState call_conversion_reporting_state = 6; +} + +// Represents a callout extension. +message CalloutFeedItem { + // The callout text. + // The length of this string should be between 1 and 25, inclusive. + google.protobuf.StringValue callout_text = 1; +} + +// Represents a location extension. +message LocationFeedItem { + // The name of the business. + google.protobuf.StringValue business_name = 1; + + // Line 1 of the business address. + google.protobuf.StringValue address_line_1 = 2; + + // Line 2 of the business address. + google.protobuf.StringValue address_line_2 = 3; + + // City of the business address. + google.protobuf.StringValue city = 4; + + // Province of the business address. + google.protobuf.StringValue province = 5; + + // Postal code of the business address. + google.protobuf.StringValue postal_code = 6; + + // Country code of the business address. + google.protobuf.StringValue country_code = 7; + + // Phone number of the business. + google.protobuf.StringValue phone_number = 8; +} + +// Represents an affiliate location extension. +message AffiliateLocationFeedItem { + // The name of the business. + google.protobuf.StringValue business_name = 1; + + // Line 1 of the business address. + google.protobuf.StringValue address_line_1 = 2; + + // Line 2 of the business address. + google.protobuf.StringValue address_line_2 = 3; + + // City of the business address. + google.protobuf.StringValue city = 4; + + // Province of the business address. + google.protobuf.StringValue province = 5; + + // Postal code of the business address. + google.protobuf.StringValue postal_code = 6; + + // Country code of the business address. + google.protobuf.StringValue country_code = 7; + + // Phone number of the business. + google.protobuf.StringValue phone_number = 8; + + // Id of the retail chain that is advertised as a seller of your product. + google.protobuf.Int64Value chain_id = 9; + + // Name of chain. + google.protobuf.StringValue chain_name = 10; +} + +// An extension that users can click on to send a text message to the +// advertiser. +message TextMessageFeedItem { + // The business name to prepend to the message text. + // This field is required. + google.protobuf.StringValue business_name = 1; + + // Uppercase two-letter country code of the advertiser's phone number. + // This field is required. + google.protobuf.StringValue country_code = 2; + + // The advertiser's phone number the message will be sent to. Required. + google.protobuf.StringValue phone_number = 3; + + // The text to show in the ad. + // This field is required. + google.protobuf.StringValue text = 4; + + // The message text populated in the messaging app. + google.protobuf.StringValue extension_text = 5; +} + +// Represents a Price extension. +message PriceFeedItem { + // Price extension type of this extension. + google.ads.googleads.v3.enums.PriceExtensionTypeEnum.PriceExtensionType type = 1; + + // Price qualifier for all offers of this price extension. + google.ads.googleads.v3.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier price_qualifier = 2; + + // Tracking URL template for all offers of this price extension. + google.protobuf.StringValue tracking_url_template = 3; + + // The code of the language used for this price extension. + google.protobuf.StringValue language_code = 4; + + // The price offerings in this price extension. + repeated PriceOffer price_offerings = 5; + + // URL template for appending params to landing page URLs served with parallel + // tracking. + google.protobuf.StringValue final_url_suffix = 6; +} + +// Represents one price offer in a price extension. +message PriceOffer { + // Header text of this offer. + google.protobuf.StringValue header = 1; + + // Description text of this offer. + google.protobuf.StringValue description = 2; + + // Price value of this offer. + Money price = 3; + + // Price unit for this offer. + google.ads.googleads.v3.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4; + + // A list of possible final URLs after all cross domain redirects. + repeated google.protobuf.StringValue final_urls = 5; + + // A list of possible final mobile URLs after all cross domain redirects. + repeated google.protobuf.StringValue final_mobile_urls = 6; +} + +// Represents a Promotion extension. +message PromotionFeedItem { + // A freeform description of what the promotion is targeting. + // This field is required. + google.protobuf.StringValue promotion_target = 1; + + // Enum that modifies the qualification of the discount. + google.ads.googleads.v3.enums.PromotionExtensionDiscountModifierEnum.PromotionExtensionDiscountModifier discount_modifier = 2; + + // Start date of when the promotion is eligible to be redeemed. + google.protobuf.StringValue promotion_start_date = 7; + + // End date of when the promotion is eligible to be redeemed. + google.protobuf.StringValue promotion_end_date = 8; + + // The occasion the promotion was intended for. + // If an occasion is set, the redemption window will need to fall within + // the date range associated with the occasion. + google.ads.googleads.v3.enums.PromotionExtensionOccasionEnum.PromotionExtensionOccasion occasion = 9; + + // A list of possible final URLs after all cross domain redirects. + // This field is required. + repeated google.protobuf.StringValue final_urls = 10; + + // A list of possible final mobile URLs after all cross domain redirects. + repeated google.protobuf.StringValue final_mobile_urls = 11; + + // URL template for constructing a tracking URL. + google.protobuf.StringValue tracking_url_template = 12; + + // A list of mappings to be used for substituting URL custom parameter tags in + // the tracking_url_template, final_urls, and/or final_mobile_urls. + repeated CustomParameter url_custom_parameters = 13; + + // URL template for appending params to landing page URLs served with parallel + // tracking. + google.protobuf.StringValue final_url_suffix = 14; + + // The language of the promotion. + // Represented as BCP 47 language tag. + google.protobuf.StringValue language_code = 15; + + // Discount type, can be percentage off or amount off. + oneof discount_type { + // Percentage off discount in the promotion in micros. + // One million is equivalent to one percent. + // Either this or money_off_amount is required. + google.protobuf.Int64Value percent_off = 3; + + // Money amount off for discount in the promotion. + // Either this or percent_off is required. + Money money_amount_off = 4; + } + + // Promotion trigger. Can be by promotion code or promo by eligible order + // amount. + oneof promotion_trigger { + // A code the user should use in order to be eligible for the promotion. + google.protobuf.StringValue promotion_code = 5; + + // The amount the total order needs to be for the user to be eligible for + // the promotion. + Money orders_over_amount = 6; + } +} + +// Represents a structured snippet extension. +message StructuredSnippetFeedItem { + // The header of the snippet. + // This string must not be empty. + google.protobuf.StringValue header = 1; + + // The values in the snippet. + // The maximum size of this collection is 10. + repeated google.protobuf.StringValue values = 2; +} + +// Represents a sitelink extension. +message SitelinkFeedItem { + // URL display text for the sitelink. + // The length of this string should be between 1 and 25, inclusive. + google.protobuf.StringValue link_text = 1; + + // First line of the description for the sitelink. + // If this value is set, line2 must also be set. + // The length of this string should be between 0 and 35, inclusive. + google.protobuf.StringValue line1 = 2; + + // Second line of the description for the sitelink. + // If this value is set, line1 must also be set. + // The length of this string should be between 0 and 35, inclusive. + google.protobuf.StringValue line2 = 3; + + // A list of possible final URLs after all cross domain redirects. + repeated google.protobuf.StringValue final_urls = 4; + + // A list of possible final mobile URLs after all cross domain redirects. + repeated google.protobuf.StringValue final_mobile_urls = 5; + + // URL template for constructing a tracking URL. + google.protobuf.StringValue tracking_url_template = 6; + + // A list of mappings to be used for substituting URL custom parameter tags in + // the tracking_url_template, final_urls, and/or final_mobile_urls. + repeated CustomParameter url_custom_parameters = 7; + + // Final URL suffix to be appended to landing page URLs served with + // parallel tracking. + google.protobuf.StringValue final_url_suffix = 8; +} + +// Represents a hotel callout extension. +message HotelCalloutFeedItem { + // The callout text. + // The length of this string should be between 1 and 25, inclusive. + google.protobuf.StringValue text = 1; + + // The language of the hotel callout text. + // IETF BCP 47 compliant language code. + google.protobuf.StringValue language_code = 2; +} diff --git a/google/ads/googleads/v3/common/feed_common.proto b/google/ads/googleads/v3/common/feed_common.proto new file mode 100644 index 000000000..d41803a2a --- /dev/null +++ b/google/ads/googleads/v3/common/feed_common.proto @@ -0,0 +1,40 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "FeedCommonProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing common feed proto messages. + +// Represents a price in a particular currency. +message Money { + // Three-character ISO 4217 currency code. + google.protobuf.StringValue currency_code = 1; + + // Amount in micros. One million is equivalent to one unit. + google.protobuf.Int64Value amount_micros = 2; +} diff --git a/google/ads/googleads/v3/common/final_app_url.proto b/google/ads/googleads/v3/common/final_app_url.proto new file mode 100644 index 000000000..1b362dd5e --- /dev/null +++ b/google/ads/googleads/v3/common/final_app_url.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/enums/app_url_operating_system_type.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "FinalAppUrlProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file FinalAppUrl type. + +// A URL for deep linking into an app for the given operating system. +message FinalAppUrl { + // The operating system targeted by this URL. Required. + google.ads.googleads.v3.enums.AppUrlOperatingSystemTypeEnum.AppUrlOperatingSystemType os_type = 1; + + // The app deep link URL. Deep links specify a location in an app that + // corresponds to the content you'd like to show, and should be of the form + // {scheme}://{host_path} + // The scheme identifies which app to open. For your app, you can use a custom + // scheme that starts with the app's name. The host and path specify the + // unique location in the app where your content exists. + // Example: "exampleapp://productid_1234". Required. + google.protobuf.StringValue url = 2; +} diff --git a/google/ads/googleads/v3/common/frequency_cap.proto b/google/ads/googleads/v3/common/frequency_cap.proto new file mode 100644 index 000000000..ee3bb8445 --- /dev/null +++ b/google/ads/googleads/v3/common/frequency_cap.proto @@ -0,0 +1,62 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/enums/frequency_cap_event_type.proto"; +import "google/ads/googleads/v3/enums/frequency_cap_level.proto"; +import "google/ads/googleads/v3/enums/frequency_cap_time_unit.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "FrequencyCapProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing frequency caps. + +// A rule specifying the maximum number of times an ad (or some set of ads) can +// be shown to a user over a particular time period. +message FrequencyCapEntry { + // The key of a particular frequency cap. There can be no more + // than one frequency cap with the same key. + FrequencyCapKey key = 1; + + // Maximum number of events allowed during the time range by this cap. + google.protobuf.Int32Value cap = 2; +} + +// A group of fields used as keys for a frequency cap. +// There can be no more than one frequency cap with the same key. +message FrequencyCapKey { + // The level on which the cap is to be applied (e.g. ad group ad, ad group). + // The cap is applied to all the entities of this level. + google.ads.googleads.v3.enums.FrequencyCapLevelEnum.FrequencyCapLevel level = 1; + + // The type of event that the cap applies to (e.g. impression). + google.ads.googleads.v3.enums.FrequencyCapEventTypeEnum.FrequencyCapEventType event_type = 3; + + // Unit of time the cap is defined at (e.g. day, week). + google.ads.googleads.v3.enums.FrequencyCapTimeUnitEnum.FrequencyCapTimeUnit time_unit = 2; + + // Number of time units the cap lasts. + google.protobuf.Int32Value time_length = 4; +} diff --git a/google/ads/googleads/v3/common/keyword_plan_common.proto b/google/ads/googleads/v3/common/keyword_plan_common.proto new file mode 100644 index 000000000..dc0ca81cb --- /dev/null +++ b/google/ads/googleads/v3/common/keyword_plan_common.proto @@ -0,0 +1,45 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/enums/keyword_plan_competition_level.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanCommonProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing Keyword Planner messages. + +// Historical metrics specific to the targeting options selected. +// Targeting options include geographies, network, etc. +// Refer to https://support.google.com/google-ads/answer/3022575 for more +// details. +message KeywordPlanHistoricalMetrics { + // Approximate number of monthly searches on this query averaged + // for the past 12 months. + google.protobuf.Int64Value avg_monthly_searches = 1; + + // The competition level for the query. + google.ads.googleads.v3.enums.KeywordPlanCompetitionLevelEnum.KeywordPlanCompetitionLevel competition = 2; +} diff --git a/google/ads/googleads/v3/common/matching_function.proto b/google/ads/googleads/v3/common/matching_function.proto new file mode 100644 index 000000000..ab3b5165b --- /dev/null +++ b/google/ads/googleads/v3/common/matching_function.proto @@ -0,0 +1,127 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/enums/matching_function_context_type.proto"; +import "google/ads/googleads/v3/enums/matching_function_operator.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "MatchingFunctionProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing a matching function. + +// Matching function associated with a +// CustomerFeed, CampaignFeed, or AdGroupFeed. The matching function is used +// to filter the set of feed items selected. +message MatchingFunction { + // String representation of the Function. + // + // Examples: + // + // 1. IDENTITY(true) or IDENTITY(false). All or no feed items served. + // 2. EQUALS(CONTEXT.DEVICE,"Mobile") + // 3. IN(FEED_ITEM_ID,{1000001,1000002,1000003}) + // 4. CONTAINS_ANY(FeedAttribute[12345678,0],{"Mars cruise","Venus cruise"}) + // 5. AND(IN(FEED_ITEM_ID,{10001,10002}),EQUALS(CONTEXT.DEVICE,"Mobile")) + // + // For more details, visit + // https://developers.google.com/adwords/api/docs/guides/feed-matching-functions + // + // Note that because multiple strings may represent the same underlying + // function (whitespace and single versus double quotation marks, for + // example), the value returned may not be identical to the string sent in a + // mutate request. + google.protobuf.StringValue function_string = 1; + + // Operator for a function. + google.ads.googleads.v3.enums.MatchingFunctionOperatorEnum.MatchingFunctionOperator operator = 4; + + // The operands on the left hand side of the equation. This is also the + // operand to be used for single operand expressions such as NOT. + repeated Operand left_operands = 2; + + // The operands on the right hand side of the equation. + repeated Operand right_operands = 3; +} + +// An operand in a matching function. +message Operand { + // A constant operand in a matching function. + message ConstantOperand { + // Constant operand values. Required. + oneof constant_operand_value { + // String value of the operand if it is a string type. + google.protobuf.StringValue string_value = 1; + + // Int64 value of the operand if it is a int64 type. + google.protobuf.Int64Value long_value = 2; + + // Boolean value of the operand if it is a boolean type. + google.protobuf.BoolValue boolean_value = 3; + + // Double value of the operand if it is a double type. + google.protobuf.DoubleValue double_value = 4; + } + } + + // A feed attribute operand in a matching function. + // Used to represent a feed attribute in feed. + message FeedAttributeOperand { + // The associated feed. Required. + google.protobuf.Int64Value feed_id = 1; + + // Id of the referenced feed attribute. Required. + google.protobuf.Int64Value feed_attribute_id = 2; + } + + // A function operand in a matching function. + // Used to represent nested functions. + message FunctionOperand { + // The matching function held in this operand. + MatchingFunction matching_function = 1; + } + + // An operand in a function referring to a value in the request context. + message RequestContextOperand { + // Type of value to be referred in the request context. + google.ads.googleads.v3.enums.MatchingFunctionContextTypeEnum.MatchingFunctionContextType context_type = 1; + } + + // Different operands that can be used in a matching function. Required. + oneof function_argument_operand { + // A constant operand in a matching function. + ConstantOperand constant_operand = 1; + + // This operand specifies a feed attribute in feed. + FeedAttributeOperand feed_attribute_operand = 2; + + // A function operand in a matching function. + // Used to represent nested functions. + FunctionOperand function_operand = 3; + + // An operand in a function referring to a value in the request context. + RequestContextOperand request_context_operand = 4; + } +} diff --git a/google/ads/googleads/v3/common/metrics.proto b/google/ads/googleads/v3/common/metrics.proto new file mode 100644 index 000000000..248f6cdd4 --- /dev/null +++ b/google/ads/googleads/v3/common/metrics.proto @@ -0,0 +1,533 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/enums/interaction_event_type.proto"; +import "google/ads/googleads/v3/enums/quality_score_bucket.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "MetricsProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing metrics. + +// Metrics data. +message Metrics { + // The percent of your ad impressions that are shown as the very first ad + // above the organic search results. + google.protobuf.DoubleValue absolute_top_impression_percentage = 95; + + // Average cost of viewable impressions (`active_view_impressions`). + google.protobuf.DoubleValue active_view_cpm = 1; + + // Active view measurable clicks divided by active view viewable impressions. + // This metric is reported only for display network. + google.protobuf.DoubleValue active_view_ctr = 79; + + // A measurement of how often your ad has become viewable on a Display + // Network site. + google.protobuf.Int64Value active_view_impressions = 2; + + // The ratio of impressions that could be measured by Active View over the + // number of served impressions. + google.protobuf.DoubleValue active_view_measurability = 96; + + // The cost of the impressions you received that were measurable by Active + // View. + google.protobuf.Int64Value active_view_measurable_cost_micros = 3; + + // The number of times your ads are appearing on placements in positions + // where they can be seen. + google.protobuf.Int64Value active_view_measurable_impressions = 4; + + // The percentage of time when your ad appeared on an Active View enabled site + // (measurable impressions) and was viewable (viewable impressions). + google.protobuf.DoubleValue active_view_viewability = 97; + + // All conversions from interactions (as oppose to view through conversions) + // divided by the number of ad interactions. + google.protobuf.DoubleValue all_conversions_from_interactions_rate = 65; + + // The total value of all conversions. + google.protobuf.DoubleValue all_conversions_value = 66; + + // The total number of conversions. This only includes conversion actions + // which include_in_conversions_metric attribute is set to true. + google.protobuf.DoubleValue all_conversions = 7; + + // The value of all conversions divided by the total cost of ad interactions + // (such as clicks for text ads or views for video ads). + google.protobuf.DoubleValue all_conversions_value_per_cost = 62; + + // The number of times people clicked the "Call" button to call a store during + // or after clicking an ad. This number doesn't include whether or not calls + // were connected, or the duration of any calls. + // This metric applies to feed items only. + google.protobuf.DoubleValue all_conversions_from_click_to_call = 118; + + // The number of times people clicked a "Get directions" button to navigate to + // a store after clicking an ad. + // This metric applies to feed items only. + google.protobuf.DoubleValue all_conversions_from_directions = 119; + + // The value of all conversions from interactions divided by the total number + // of interactions. + google.protobuf.DoubleValue all_conversions_from_interactions_value_per_interaction = 67; + + // The number of times people clicked a link to view a store's menu after + // clicking an ad. + // This metric applies to feed items only. + google.protobuf.DoubleValue all_conversions_from_menu = 120; + + // The number of times people placed an order at a store after clicking an ad. + // This metric applies to feed items only. + google.protobuf.DoubleValue all_conversions_from_order = 121; + + // The number of other conversions (for example, posting a review or saving a + // location for a store) that occurred after people clicked an ad. + // This metric applies to feed items only. + google.protobuf.DoubleValue all_conversions_from_other_engagement = 122; + + // Estimated number of times people visited a store after clicking an ad. + // This metric applies to feed items only. + google.protobuf.DoubleValue all_conversions_from_store_visit = 123; + + // The number of times that people were taken to a store's URL after clicking + // an ad. + // This metric applies to feed items only. + google.protobuf.DoubleValue all_conversions_from_store_website = 124; + + // The average amount you pay per interaction. This amount is the total cost + // of your ads divided by the total number of interactions. + google.protobuf.DoubleValue average_cost = 8; + + // The total cost of all clicks divided by the total number of clicks + // received. + google.protobuf.DoubleValue average_cpc = 9; + + // The average amount that you've been charged for an ad engagement. This + // amount is the total cost of all ad engagements divided by the total number + // of ad engagements. + google.protobuf.DoubleValue average_cpe = 98; + + // Average cost-per-thousand impressions (CPM). + google.protobuf.DoubleValue average_cpm = 10; + + // The average amount you pay each time someone views your ad. + // The average CPV is defined by the total cost of all ad views divided by + // the number of views. + google.protobuf.DoubleValue average_cpv = 11; + + // Average number of pages viewed per session. + google.protobuf.DoubleValue average_page_views = 99; + + // Total duration of all sessions (in seconds) / number of sessions. Imported + // from Google Analytics. + google.protobuf.DoubleValue average_time_on_site = 84; + + // An indication of how other advertisers are bidding on similar products. + google.protobuf.DoubleValue benchmark_average_max_cpc = 14; + + // An indication on how other advertisers' Shopping ads for similar products + // are performing based on how often people who see their ad click on it. + google.protobuf.DoubleValue benchmark_ctr = 77; + + // Percentage of clicks where the user only visited a single page on your + // site. Imported from Google Analytics. + google.protobuf.DoubleValue bounce_rate = 15; + + // The number of clicks. + google.protobuf.Int64Value clicks = 19; + + // The number of times your ad or your site's listing in the unpaid + // results was clicked. See the help page at + // https://support.google.com/google-ads/answer/3097241 for details. + google.protobuf.Int64Value combined_clicks = 115; + + // The number of times your ad or your site's listing in the unpaid + // results was clicked (combined_clicks) divided by combined_queries. See the + // help page at https://support.google.com/google-ads/answer/3097241 for + // details. + google.protobuf.DoubleValue combined_clicks_per_query = 116; + + // The number of searches that returned pages from your site in the unpaid + // results or showed one of your text ads. See the help page at + // https://support.google.com/google-ads/answer/3097241 for details. + google.protobuf.Int64Value combined_queries = 117; + + // The estimated percent of times that your ad was eligible to show + // on the Display Network but didn't because your budget was too low. + // Note: Content budget lost impression share is reported in the range of 0 + // to 0.9. Any value above 0.9 is reported as 0.9001. + google.protobuf.DoubleValue content_budget_lost_impression_share = 20; + + // The impressions you've received on the Display Network divided + // by the estimated number of impressions you were eligible to receive. + // Note: Content impression share is reported in the range of 0.1 to 1. Any + // value below 0.1 is reported as 0.0999. + google.protobuf.DoubleValue content_impression_share = 21; + + // The last date/time a conversion tag for this conversion action successfully + // fired and was seen by Google Ads. This firing event may not have been the + // result of an attributable conversion (e.g. because the tag was fired from a + // browser that did not previously click an ad from an appropriate + // advertiser). The date/time is in the customer's time zone. + google.protobuf.StringValue conversion_last_received_request_date_time = 73; + + // The date of the most recent conversion for this conversion action. The date + // is in the customer's time zone. + google.protobuf.StringValue conversion_last_conversion_date = 74; + + // The estimated percentage of impressions on the Display Network + // that your ads didn't receive due to poor Ad Rank. + // Note: Content rank lost impression share is reported in the range of 0 + // to 0.9. Any value above 0.9 is reported as 0.9001. + google.protobuf.DoubleValue content_rank_lost_impression_share = 22; + + // Conversions from interactions divided by the number of ad interactions + // (such as clicks for text ads or views for video ads). This only includes + // conversion actions which include_in_conversions_metric attribute is set to + // true. + google.protobuf.DoubleValue conversions_from_interactions_rate = 69; + + // The total value of conversions. This only includes conversion actions which + // include_in_conversions_metric attribute is set to true. + google.protobuf.DoubleValue conversions_value = 70; + + // The value of conversions divided by the cost of ad interactions. This only + // includes conversion actions which include_in_conversions_metric attribute + // is set to true. + google.protobuf.DoubleValue conversions_value_per_cost = 71; + + // The value of conversions from interactions divided by the number of ad + // interactions. This only includes conversion actions which + // include_in_conversions_metric attribute is set to true. + google.protobuf.DoubleValue conversions_from_interactions_value_per_interaction = 72; + + // The number of conversions. This only includes conversion actions which + // include_in_conversions_metric attribute is set to true. + google.protobuf.DoubleValue conversions = 25; + + // The sum of your cost-per-click (CPC) and cost-per-thousand impressions + // (CPM) costs during this period. + google.protobuf.Int64Value cost_micros = 26; + + // The cost of ad interactions divided by all conversions. + google.protobuf.DoubleValue cost_per_all_conversions = 68; + + // The cost of ad interactions divided by conversions. This only includes + // conversion actions which include_in_conversions_metric attribute is set to + // true. + google.protobuf.DoubleValue cost_per_conversion = 28; + + // The cost of ad interactions divided by current model attributed + // conversions. This only includes conversion actions which + // include_in_conversions_metric attribute is set to true. + google.protobuf.DoubleValue cost_per_current_model_attributed_conversion = 106; + + // Conversions from when a customer clicks on a Google Ads ad on one device, + // then converts on a different device or browser. + // Cross-device conversions are already included in all_conversions. + google.protobuf.DoubleValue cross_device_conversions = 29; + + // The number of clicks your ad receives (Clicks) divided by the number + // of times your ad is shown (Impressions). + google.protobuf.DoubleValue ctr = 30; + + // Shows how your historic conversions data would look under the attribution + // model you've currently selected. This only includes conversion actions + // which include_in_conversions_metric attribute is set to true. + google.protobuf.DoubleValue current_model_attributed_conversions = 101; + + // Current model attributed conversions from interactions divided by the + // number of ad interactions (such as clicks for text ads or views for video + // ads). This only includes conversion actions which + // include_in_conversions_metric attribute is set to true. + google.protobuf.DoubleValue current_model_attributed_conversions_from_interactions_rate = 102; + + // The value of current model attributed conversions from interactions divided + // by the number of ad interactions. This only includes conversion actions + // which include_in_conversions_metric attribute is set to true. + google.protobuf.DoubleValue current_model_attributed_conversions_from_interactions_value_per_interaction = 103; + + // The total value of current model attributed conversions. This only includes + // conversion actions which include_in_conversions_metric attribute is set to + // true. + google.protobuf.DoubleValue current_model_attributed_conversions_value = 104; + + // The value of current model attributed conversions divided by the cost of ad + // interactions. This only includes conversion actions which + // include_in_conversions_metric attribute is set to true. + google.protobuf.DoubleValue current_model_attributed_conversions_value_per_cost = 105; + + // How often people engage with your ad after it's shown to them. This is the + // number of ad expansions divided by the number of times your ad is shown. + google.protobuf.DoubleValue engagement_rate = 31; + + // The number of engagements. + // An engagement occurs when a viewer expands your Lightbox ad. Also, in the + // future, other ad types may support engagement metrics. + google.protobuf.Int64Value engagements = 32; + + // Average lead value based on clicks. + google.protobuf.DoubleValue hotel_average_lead_value_micros = 75; + + // The average price difference between the price offered by reporting hotel + // advertiser and the cheapest price offered by the competing advertiser. + google.protobuf.DoubleValue hotel_price_difference_percentage = 129; + + // The creative historical quality score. + google.ads.googleads.v3.enums.QualityScoreBucketEnum.QualityScoreBucket historical_creative_quality_score = 80; + + // The quality of historical landing page experience. + google.ads.googleads.v3.enums.QualityScoreBucketEnum.QualityScoreBucket historical_landing_page_quality_score = 81; + + // The historical quality score. + google.protobuf.Int64Value historical_quality_score = 82; + + // The historical search predicted click through rate (CTR). + google.ads.googleads.v3.enums.QualityScoreBucketEnum.QualityScoreBucket historical_search_predicted_ctr = 83; + + // The number of times the ad was forwarded to someone else as a message. + google.protobuf.Int64Value gmail_forwards = 85; + + // The number of times someone has saved your Gmail ad to their inbox as a + // message. + google.protobuf.Int64Value gmail_saves = 86; + + // The number of clicks to the landing page on the expanded state of Gmail + // ads. + google.protobuf.Int64Value gmail_secondary_clicks = 87; + + // The number of times a store's location-based ad was shown. + // This metric applies to feed items only. + google.protobuf.Int64Value impressions_from_store_reach = 125; + + // Count of how often your ad has appeared on a search results page or + // website on the Google Network. + google.protobuf.Int64Value impressions = 37; + + // How often people interact with your ad after it is shown to them. + // This is the number of interactions divided by the number of times your ad + // is shown. + google.protobuf.DoubleValue interaction_rate = 38; + + // The number of interactions. + // An interaction is the main user action associated with an ad format-clicks + // for text and shopping ads, views for video ads, and so on. + google.protobuf.Int64Value interactions = 39; + + // The types of payable and free interactions. + repeated google.ads.googleads.v3.enums.InteractionEventTypeEnum.InteractionEventType interaction_event_types = 100; + + // The percentage of clicks filtered out of your total number of clicks + // (filtered + non-filtered clicks) during the reporting period. + google.protobuf.DoubleValue invalid_click_rate = 40; + + // Number of clicks Google considers illegitimate and doesn't charge you for. + google.protobuf.Int64Value invalid_clicks = 41; + + // Number of message chats initiated for Click To Message impressions that + // were message tracking eligible. + google.protobuf.Int64Value message_chats = 126; + + // Number of Click To Message impressions that were message tracking eligible. + google.protobuf.Int64Value message_impressions = 127; + + // Number of message chats initiated (message_chats) divided by the number + // of message impressions (message_impressions). + // Rate at which a user initiates a message chat from an ad impression with + // a messaging option and message tracking enabled. + // Note that this rate can be more than 1.0 for a given message impression. + google.protobuf.DoubleValue message_chat_rate = 128; + + // The percentage of mobile clicks that go to a mobile-friendly page. + google.protobuf.DoubleValue mobile_friendly_clicks_percentage = 109; + + // The number of times someone clicked your site's listing in the unpaid + // results for a particular query. See the help page at + // https://support.google.com/google-ads/answer/3097241 for details. + google.protobuf.Int64Value organic_clicks = 110; + + // The number of times someone clicked your site's listing in the unpaid + // results (organic_clicks) divided by the total number of searches that + // returned pages from your site (organic_queries). See the help page at + // https://support.google.com/google-ads/answer/3097241 for details. + google.protobuf.DoubleValue organic_clicks_per_query = 111; + + // The number of listings for your site in the unpaid search results. See the + // help page at https://support.google.com/google-ads/answer/3097241 for + // details. + google.protobuf.Int64Value organic_impressions = 112; + + // The number of times a page from your site was listed in the unpaid search + // results (organic_impressions) divided by the number of searches returning + // your site's listing in the unpaid results (organic_queries). See the help + // page at https://support.google.com/google-ads/answer/3097241 for details. + google.protobuf.DoubleValue organic_impressions_per_query = 113; + + // The total number of searches that returned your site's listing in the + // unpaid results. See the help page at + // https://support.google.com/google-ads/answer/3097241 for details. + google.protobuf.Int64Value organic_queries = 114; + + // Percentage of first-time sessions (from people who had never visited your + // site before). Imported from Google Analytics. + google.protobuf.DoubleValue percent_new_visitors = 42; + + // Number of offline phone calls. + google.protobuf.Int64Value phone_calls = 43; + + // Number of offline phone impressions. + google.protobuf.Int64Value phone_impressions = 44; + + // Number of phone calls received (phone_calls) divided by the number of + // times your phone number is shown (phone_impressions). + google.protobuf.DoubleValue phone_through_rate = 45; + + // Your clickthrough rate (Ctr) divided by the average clickthrough rate of + // all advertisers on the websites that show your ads. Measures how your ads + // perform on Display Network sites compared to other ads on the same sites. + google.protobuf.DoubleValue relative_ctr = 46; + + // The percentage of the customer's Shopping or Search ad impressions that are + // shown in the most prominent Shopping position. See + // https://support.google.com/google-ads/answer/7501826 + // for details. Any value below 0.1 is reported as 0.0999. + google.protobuf.DoubleValue search_absolute_top_impression_share = 78; + + // The number estimating how often your ad wasn't the very first ad above the + // organic search results due to a low budget. Note: Search + // budget lost absolute top impression share is reported in the range of 0 to + // 0.9. Any value above 0.9 is reported as 0.9001. + google.protobuf.DoubleValue search_budget_lost_absolute_top_impression_share = 88; + + // The estimated percent of times that your ad was eligible to show on the + // Search Network but didn't because your budget was too low. Note: Search + // budget lost impression share is reported in the range of 0 to 0.9. Any + // value above 0.9 is reported as 0.9001. + google.protobuf.DoubleValue search_budget_lost_impression_share = 47; + + // The number estimating how often your ad didn't show anywhere above the + // organic search results due to a low budget. Note: Search + // budget lost top impression share is reported in the range of 0 to 0.9. Any + // value above 0.9 is reported as 0.9001. + google.protobuf.DoubleValue search_budget_lost_top_impression_share = 89; + + // The number of clicks you've received on the Search Network + // divided by the estimated number of clicks you were eligible to receive. + // Note: Search click share is reported in the range of 0.1 to 1. Any value + // below 0.1 is reported as 0.0999. + google.protobuf.DoubleValue search_click_share = 48; + + // The impressions you've received divided by the estimated number of + // impressions you were eligible to receive on the Search Network for search + // terms that matched your keywords exactly (or were close variants of your + // keyword), regardless of your keyword match types. Note: Search exact match + // impression share is reported in the range of 0.1 to 1. Any value below 0.1 + // is reported as 0.0999. + google.protobuf.DoubleValue search_exact_match_impression_share = 49; + + // The impressions you've received on the Search Network divided + // by the estimated number of impressions you were eligible to receive. + // Note: Search impression share is reported in the range of 0.1 to 1. Any + // value below 0.1 is reported as 0.0999. + google.protobuf.DoubleValue search_impression_share = 50; + + // The number estimating how often your ad wasn't the very first ad above the + // organic search results due to poor Ad Rank. + // Note: Search rank lost absolute top impression share is reported in the + // range of 0 to 0.9. Any value above 0.9 is reported as 0.9001. + google.protobuf.DoubleValue search_rank_lost_absolute_top_impression_share = 90; + + // The estimated percentage of impressions on the Search Network + // that your ads didn't receive due to poor Ad Rank. + // Note: Search rank lost impression share is reported in the range of 0 to + // 0.9. Any value above 0.9 is reported as 0.9001. + google.protobuf.DoubleValue search_rank_lost_impression_share = 51; + + // The number estimating how often your ad didn't show anywhere above the + // organic search results due to poor Ad Rank. + // Note: Search rank lost top impression share is reported in the range of 0 + // to 0.9. Any value above 0.9 is reported as 0.9001. + google.protobuf.DoubleValue search_rank_lost_top_impression_share = 91; + + // The impressions you've received in the top location (anywhere above the + // organic search results) compared to the estimated number of impressions you + // were eligible to receive in the top location. + // Note: Search top impression share is reported in the range of 0.1 to 1. Any + // value below 0.1 is reported as 0.0999. + google.protobuf.DoubleValue search_top_impression_share = 92; + + // A measure of how quickly your page loads after clicks on your mobile ads. + // The score is a range from 1 to 10, 10 being the fastest. + google.protobuf.Int64Value speed_score = 107; + + // The percent of your ad impressions that are shown anywhere above the + // organic search results. + google.protobuf.DoubleValue top_impression_percentage = 93; + + // The percentage of ad clicks to Accelerated Mobile Pages (AMP) landing pages + // that reach a valid AMP page. + google.protobuf.DoubleValue valid_accelerated_mobile_pages_clicks_percentage = 108; + + // The value of all conversions divided by the number of all conversions. + google.protobuf.DoubleValue value_per_all_conversions = 52; + + // The value of conversions divided by the number of conversions. This only + // includes conversion actions which include_in_conversions_metric attribute + // is set to true. + google.protobuf.DoubleValue value_per_conversion = 53; + + // The value of current model attributed conversions divided by the number of + // the conversions. This only includes conversion actions which + // include_in_conversions_metric attribute is set to true. + google.protobuf.DoubleValue value_per_current_model_attributed_conversion = 94; + + // Percentage of impressions where the viewer watched all of your video. + google.protobuf.DoubleValue video_quartile_100_rate = 54; + + // Percentage of impressions where the viewer watched 25% of your video. + google.protobuf.DoubleValue video_quartile_25_rate = 55; + + // Percentage of impressions where the viewer watched 50% of your video. + google.protobuf.DoubleValue video_quartile_50_rate = 56; + + // Percentage of impressions where the viewer watched 75% of your video. + google.protobuf.DoubleValue video_quartile_75_rate = 57; + + // The number of views your TrueView video ad receives divided by its number + // of impressions, including thumbnail impressions for TrueView in-display + // ads. + google.protobuf.DoubleValue video_view_rate = 58; + + // The number of times your video ads were viewed. + google.protobuf.Int64Value video_views = 59; + + // The total number of view-through conversions. + // These happen when a customer sees an image or rich media ad, then later + // completes a conversion on your site without interacting with (e.g., + // clicking on) another ad. + google.protobuf.Int64Value view_through_conversions = 60; +} diff --git a/google/ads/googleads/v3/common/offline_user_data.proto b/google/ads/googleads/v3/common/offline_user_data.proto new file mode 100644 index 000000000..2f6b515b8 --- /dev/null +++ b/google/ads/googleads/v3/common/offline_user_data.proto @@ -0,0 +1,191 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "OfflineUserDataProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing offline user data. + +// Address identifier of offline data. +message OfflineUserAddressInfo { + // First name of the user, which is hashed as SHA-256 after normalized + // (Lowercase all characters; Remove any extra spaces before, after, and in + // between). + google.protobuf.StringValue hashed_first_name = 1; + + // Last name of the user, which is hashed as SHA-256 after normalized (lower + // case only and no punctuation). + google.protobuf.StringValue hashed_last_name = 2; + + // City of the address. Only accepted for Store Sales Direct data. + google.protobuf.StringValue city = 3; + + // State code of the address. Only accepted for Store Sales Direct data. + google.protobuf.StringValue state = 4; + + // 2-letter country code in ISO-3166-1 alpha-2 of the user's address. + google.protobuf.StringValue country_code = 5; + + // Postal code of the user's address. + google.protobuf.StringValue postal_code = 6; +} + +// Hashed user identifying information. +message UserIdentifier { + // Exactly one must be specified. + oneof identifier { + // Hashed email address using SHA-256 hash function after normalization. + google.protobuf.StringValue hashed_email = 1; + + // Hashed phone number using SHA-256 hash function after normalization + // (E164 standard). + google.protobuf.StringValue hashed_phone_number = 2; + + // Mobile device ID (advertising ID/IDFA). + google.protobuf.StringValue mobile_id = 3; + + // Advertiser-assigned user ID for Customer Match upload, or + // third-party-assigned user ID for SSD. + google.protobuf.StringValue third_party_user_id = 4; + + // Address information. + OfflineUserAddressInfo address_info = 5; + } +} + +// Attribute of the store sales transaction. +message TransactionAttribute { + // Timestamp when transaction occurred. Required. + // The format is "YYYY-MM-DD HH:MM:SS". + // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30" + google.protobuf.StringValue transaction_date_time = 1; + + // Transaction amount in micros. Required. + google.protobuf.DoubleValue transaction_amount_micros = 2; + + // Transaction currency code. ISO 4217 three-letter code is used. Required. + google.protobuf.StringValue currency_code = 3; + + // The resource name of conversion action to report conversions to. + // Required. + google.protobuf.StringValue conversion_action = 4; + + // Transaction order id. + // Accessible to whitelisted customers only. + google.protobuf.StringValue order_id = 5; + + // Store attributes of the transaction. + // Accessible to whitelisted customers only. + StoreAttribute store_attribute = 6; + + // Value of the custom variable for each transaction. + // Accessible to whitelisted customers only. + google.protobuf.StringValue custom_value = 7; +} + +// Store attributes of the transaction. +message StoreAttribute { + // Store code from + // https://support.google.com/business/answer/3370250#storecode + google.protobuf.StringValue store_code = 1; +} + +// User data holding user identifiers and attributes. +message UserData { + // User identification info. Required. + repeated UserIdentifier user_identifiers = 1; + + // Additional transactions/attributes associated with the user. + // Required when updating store sales data. + TransactionAttribute transaction_attribute = 2; +} + +// Metadata for customer match user list. +message CustomerMatchUserListMetadata { + // The resource name of remarketing list to update data. + // Required for job of CUSTOMER_MATCH_USER_LIST type. + google.protobuf.StringValue user_list = 1; +} + +// Metadata for Store Sales Direct. +message StoreSalesMetadata { + // This is the fraction of all transactions that are identifiable (i.e., + // associated with any form of customer information). + // Required. + // The fraction needs to be between 0 and 1 (excluding 0). + google.protobuf.DoubleValue loyalty_fraction = 1; + + // This is the ratio of sales being uploaded compared to the overall sales + // that can be associated with a customer. Required. + // The fraction needs to be between 0 and 1 (excluding 0). For example, if you + // upload half the sales that you are able to associate with a customer, this + // would be 0.5. + google.protobuf.DoubleValue transaction_upload_fraction = 2; + + // Name of the store sales custom variable key. A predefined key that + // can be applied to the transaction and then later used for custom + // segementation in reporting. + // Accessible to whitelisted customers only. + google.protobuf.StringValue custom_key = 4; + + // Metadata for a third party Store Sales upload. + StoreSalesThirdPartyMetadata third_party_metadata = 3; +} + +// Metadata for a third party Store Sales. +// This is a whitelisted only product. Please contact your Google business +// development representative for details on the upload configuration. +message StoreSalesThirdPartyMetadata { + // Time the advertiser uploaded the data to the partner. Required. + // The format is "YYYY-MM-DD HH:MM:SS". + // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30" + google.protobuf.StringValue advertiser_upload_date_time = 1; + + // The fraction of transactions that are valid. Invalid transactions may + // include invalid formats or values. + // Required. + // The fraction needs to be between 0 and 1 (excluding 0). + google.protobuf.DoubleValue valid_transaction_fraction = 2; + + // The fraction of valid transactions that are matched to a third party + // assigned user ID on the partner side. + // Required. + // The fraction needs to be between 0 and 1 (excluding 0). + google.protobuf.DoubleValue partner_match_fraction = 3; + + // The fraction of valid transactions that are uploaded by the partner to + // Google. + // Required. + // The fraction needs to be between 0 and 1 (excluding 0). + google.protobuf.DoubleValue partner_upload_fraction = 4; + + // Version of partner IDs to be used for uploads. Required. + google.protobuf.StringValue bridge_map_version_id = 5; + + // ID of the third party partner updating the transaction feed. + google.protobuf.Int64Value partner_id = 6; +} diff --git a/google/ads/googleads/v3/common/policy.proto b/google/ads/googleads/v3/common/policy.proto new file mode 100644 index 000000000..7372bc069 --- /dev/null +++ b/google/ads/googleads/v3/common/policy.proto @@ -0,0 +1,223 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/enums/policy_topic_entry_type.proto"; +import "google/ads/googleads/v3/enums/policy_topic_evidence_destination_mismatch_url_type.proto"; +import "google/ads/googleads/v3/enums/policy_topic_evidence_destination_not_working_device.proto"; +import "google/ads/googleads/v3/enums/policy_topic_evidence_destination_not_working_dns_error_type.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "PolicyProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing policy information. + +// Key of the violation. The key is used for referring to a violation +// when filing an exemption request. +message PolicyViolationKey { + // Unique ID of the violated policy. + google.protobuf.StringValue policy_name = 1; + + // The text that violates the policy if specified. + // Otherwise, refers to the policy in general + // (e.g., when requesting to be exempt from the whole policy). + // If not specified for criterion exemptions, the whole policy is implied. + // Must be specified for ad exemptions. + google.protobuf.StringValue violating_text = 2; +} + +// Parameter for controlling how policy exemption is done. Ignorable policy +// topics are only usable with expanded text ads and responsive search ads. All +// other ad types must use policy violation keys. +message PolicyValidationParameter { + // The list of policy topics that should not cause a PolicyFindingError to + // be reported. This field is currently only compatible with Enhanced Text Ad. + // It corresponds to the PolicyTopicEntry.topic field. + // + // Resources violating these policies will be saved, but will not be eligible + // to serve. They may begin serving at a later time due to a change in + // policies, re-review of the resource, or a change in advertiser + // certificates. + repeated google.protobuf.StringValue ignorable_policy_topics = 1; + + // The list of policy violation keys that should not cause a + // PolicyViolationError to be reported. Not all policy violations are + // exemptable, please refer to the is_exemptible field in the returned + // PolicyViolationError. + // + // Resources violating these polices will be saved, but will not be eligible + // to serve. They may begin serving at a later time due to a change in + // policies, re-review of the resource, or a change in advertiser + // certificates. + repeated PolicyViolationKey exempt_policy_violation_keys = 2; +} + +// Policy finding attached to a resource (e.g. alcohol policy associated with +// a site that sells alcohol). +// +// Each PolicyTopicEntry has a topic that indicates the specific ads policy +// the entry is about and a type to indicate the effect that the entry will have +// on serving. It may optionally have one or more evidences that indicate the +// reason for the finding. It may also optionally have one or more constraints +// that provide details about how serving may be restricted. +message PolicyTopicEntry { + // Policy topic this finding refers to. For example, "ALCOHOL", + // "TRADEMARKS_IN_AD_TEXT", or "DESTINATION_NOT_WORKING". The set of possible + // policy topics is not fixed for a particular API version and may change + // at any time. + google.protobuf.StringValue topic = 1; + + // Describes the negative or positive effect this policy will have on serving. + google.ads.googleads.v3.enums.PolicyTopicEntryTypeEnum.PolicyTopicEntryType type = 2; + + // Additional information that explains policy finding + // (e.g. the brand name for a trademark finding). + repeated PolicyTopicEvidence evidences = 3; + + // Indicates how serving of this resource may be affected (e.g. not serving + // in a country). + repeated PolicyTopicConstraint constraints = 4; +} + +// Additional information that explains a policy finding. +message PolicyTopicEvidence { + // A list of fragments of text that violated a policy. + message TextList { + // The fragments of text from the resource that caused the policy finding. + repeated google.protobuf.StringValue texts = 1; + } + + // A list of websites that caused a policy finding. Used for + // ONE_WEBSITE_PER_AD_GROUP policy topic, for example. In case there are more + // than five websites, only the top five (those that appear in resources the + // most) will be listed here. + message WebsiteList { + // Websites that caused the policy finding. + repeated google.protobuf.StringValue websites = 1; + } + + // A list of strings found in a destination page that caused a policy + // finding. + message DestinationTextList { + // List of text found in the resource's destination page. + repeated google.protobuf.StringValue destination_texts = 1; + } + + // Evidence of mismatches between the URLs of a resource. + message DestinationMismatch { + // The set of URLs that did not match each other. + repeated google.ads.googleads.v3.enums.PolicyTopicEvidenceDestinationMismatchUrlTypeEnum.PolicyTopicEvidenceDestinationMismatchUrlType url_types = 1; + } + + // Evidence details when the destination is returning an HTTP error + // code or isn't functional in all locations for commonly used devices. + message DestinationNotWorking { + // The full URL that didn't work. + google.protobuf.StringValue expanded_url = 3; + + // The type of device that failed to load the URL. + google.ads.googleads.v3.enums.PolicyTopicEvidenceDestinationNotWorkingDeviceEnum.PolicyTopicEvidenceDestinationNotWorkingDevice device = 4; + + // The time the URL was last checked. + // The format is "YYYY-MM-DD HH:MM:SS". + // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30" + google.protobuf.StringValue last_checked_date_time = 5; + + // Indicates the reason of the DESTINATION_NOT_WORKING policy finding. + oneof reason { + // The type of DNS error. + google.ads.googleads.v3.enums.PolicyTopicEvidenceDestinationNotWorkingDnsErrorTypeEnum.PolicyTopicEvidenceDestinationNotWorkingDnsErrorType dns_error_type = 1; + + // The HTTP error code. + google.protobuf.Int64Value http_error_code = 2; + } + } + + // Specific evidence information depending on the evidence type. + oneof value { + // List of websites linked with this resource. + WebsiteList website_list = 3; + + // List of evidence found in the text of a resource. + TextList text_list = 4; + + // The language the resource was detected to be written in. + // This is an IETF language tag such as "en-US". + google.protobuf.StringValue language_code = 5; + + // The text in the destination of the resource that is causing a policy + // finding. + DestinationTextList destination_text_list = 6; + + // Mismatch between the destinations of a resource's URLs. + DestinationMismatch destination_mismatch = 7; + + // Details when the destination is returning an HTTP error code or isn't + // functional in all locations for commonly used devices. + DestinationNotWorking destination_not_working = 8; + } +} + +// Describes the effect on serving that a policy topic entry will have. +message PolicyTopicConstraint { + // A list of countries where a resource's serving is constrained. + message CountryConstraintList { + // Total number of countries targeted by the resource. + google.protobuf.Int32Value total_targeted_countries = 1; + + // Countries in which serving is restricted. + repeated CountryConstraint countries = 2; + } + + // Indicates that a policy topic was constrained due to disapproval of the + // website for reseller purposes. + message ResellerConstraint { + + } + + // Indicates that a resource's ability to serve in a particular country is + // constrained. + message CountryConstraint { + // Geo target constant resource name of the country in which serving is + // constrained. + google.protobuf.StringValue country_criterion = 1; + } + + // Specific information about the constraint. + oneof value { + // Countries where the resource cannot serve. + CountryConstraintList country_constraint_list = 1; + + // Reseller constraint. + ResellerConstraint reseller_constraint = 2; + + // Countries where a certificate is required for serving. + CountryConstraintList certificate_missing_in_country_list = 3; + + // Countries where the resource's domain is not covered by the + // certificates associated with it. + CountryConstraintList certificate_domain_mismatch_in_country_list = 4; + } +} diff --git a/google/ads/googleads/v3/common/real_time_bidding_setting.proto b/google/ads/googleads/v3/common/real_time_bidding_setting.proto new file mode 100644 index 000000000..5f62fc0ab --- /dev/null +++ b/google/ads/googleads/v3/common/real_time_bidding_setting.proto @@ -0,0 +1,38 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "RealTimeBiddingSettingProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing RealTimeBiddingSetting + +// Settings for Real-Time Bidding, a feature only available for campaigns +// targeting the Ad Exchange network. +message RealTimeBiddingSetting { + // Whether the campaign is opted in to real-time bidding. + google.protobuf.BoolValue opt_in = 1; +} diff --git a/google/ads/googleads/v3/common/segments.proto b/google/ads/googleads/v3/common/segments.proto new file mode 100644 index 000000000..40869fb3d --- /dev/null +++ b/google/ads/googleads/v3/common/segments.proto @@ -0,0 +1,313 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/common/criteria.proto"; +import "google/ads/googleads/v3/enums/ad_network_type.proto"; +import "google/ads/googleads/v3/enums/click_type.proto"; +import "google/ads/googleads/v3/enums/conversion_action_category.proto"; +import "google/ads/googleads/v3/enums/conversion_attribution_event_type.proto"; +import "google/ads/googleads/v3/enums/conversion_lag_bucket.proto"; +import "google/ads/googleads/v3/enums/conversion_or_adjustment_lag_bucket.proto"; +import "google/ads/googleads/v3/enums/day_of_week.proto"; +import "google/ads/googleads/v3/enums/device.proto"; +import "google/ads/googleads/v3/enums/external_conversion_source.proto"; +import "google/ads/googleads/v3/enums/hotel_date_selection_type.proto"; +import "google/ads/googleads/v3/enums/hotel_price_bucket.proto"; +import "google/ads/googleads/v3/enums/hotel_rate_type.proto"; +import "google/ads/googleads/v3/enums/month_of_year.proto"; +import "google/ads/googleads/v3/enums/placeholder_type.proto"; +import "google/ads/googleads/v3/enums/product_channel.proto"; +import "google/ads/googleads/v3/enums/product_channel_exclusivity.proto"; +import "google/ads/googleads/v3/enums/product_condition.proto"; +import "google/ads/googleads/v3/enums/search_engine_results_page_type.proto"; +import "google/ads/googleads/v3/enums/search_term_match_type.proto"; +import "google/ads/googleads/v3/enums/slot.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "SegmentsProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing segment only fields. + +// Segment only fields. +message Segments { + // Ad network type. + google.ads.googleads.v3.enums.AdNetworkTypeEnum.AdNetworkType ad_network_type = 3; + + // Click type. + google.ads.googleads.v3.enums.ClickTypeEnum.ClickType click_type = 26; + + // Resource name of the conversion action. + google.protobuf.StringValue conversion_action = 52; + + // Conversion action category. + google.ads.googleads.v3.enums.ConversionActionCategoryEnum.ConversionActionCategory conversion_action_category = 53; + + // Conversion action name. + google.protobuf.StringValue conversion_action_name = 54; + + // This segments your conversion columns by the original conversion and + // conversion value vs. the delta if conversions were adjusted. False row has + // the data as originally stated; While true row has the delta between data + // now and the data as originally stated. Summing the two together results + // post-adjustment data. + google.protobuf.BoolValue conversion_adjustment = 27; + + // Conversion attribution event type. + google.ads.googleads.v3.enums.ConversionAttributionEventTypeEnum.ConversionAttributionEventType conversion_attribution_event_type = 2; + + // An enum value representing the number of days between the impression and + // the conversion. + google.ads.googleads.v3.enums.ConversionLagBucketEnum.ConversionLagBucket conversion_lag_bucket = 50; + + // An enum value representing the number of days between the impression and + // the conversion or between the impression and adjustments to the conversion. + google.ads.googleads.v3.enums.ConversionOrAdjustmentLagBucketEnum.ConversionOrAdjustmentLagBucket conversion_or_adjustment_lag_bucket = 51; + + // Date to which metrics apply. + // yyyy-MM-dd format, e.g., 2018-04-17. + google.protobuf.StringValue date = 4; + + // Day of the week, e.g., MONDAY. + google.ads.googleads.v3.enums.DayOfWeekEnum.DayOfWeek day_of_week = 5; + + // Device to which metrics apply. + google.ads.googleads.v3.enums.DeviceEnum.Device device = 1; + + // External conversion source. + google.ads.googleads.v3.enums.ExternalConversionSourceEnum.ExternalConversionSource external_conversion_source = 55; + + // Resource name of the geo target constant that represents an airport. + google.protobuf.StringValue geo_target_airport = 65; + + // Resource name of the geo target constant that represents a canton. + google.protobuf.StringValue geo_target_canton = 76; + + // Resource name of the geo target constant that represents a city. + google.protobuf.StringValue geo_target_city = 62; + + // Resource name of the geo target constant that represents a country. + google.protobuf.StringValue geo_target_country = 77; + + // Resource name of the geo target constant that represents a county. + google.protobuf.StringValue geo_target_county = 68; + + // Resource name of the geo target constant that represents a district. + google.protobuf.StringValue geo_target_district = 69; + + // Resource name of the geo target constant that represents a metro. + google.protobuf.StringValue geo_target_metro = 63; + + // Resource name of the geo target constant that represents the most + // specific location. + google.protobuf.StringValue geo_target_most_specific_location = 72; + + // Resource name of the geo target constant that represents a postal code. + google.protobuf.StringValue geo_target_postal_code = 71; + + // Resource name of the geo target constant that represents a province. + google.protobuf.StringValue geo_target_province = 75; + + // Resource name of the geo target constant that represents a region. + google.protobuf.StringValue geo_target_region = 64; + + // Resource name of the geo target constant that represents a state. + google.protobuf.StringValue geo_target_state = 67; + + // Hotel booking window in days. + google.protobuf.Int64Value hotel_booking_window_days = 6; + + // Hotel center ID. + google.protobuf.Int64Value hotel_center_id = 7; + + // Hotel check-in date. Formatted as yyyy-MM-dd. + google.protobuf.StringValue hotel_check_in_date = 8; + + // Hotel check-in day of week. + google.ads.googleads.v3.enums.DayOfWeekEnum.DayOfWeek hotel_check_in_day_of_week = 9; + + // Hotel city. + google.protobuf.StringValue hotel_city = 10; + + // Hotel class. + google.protobuf.Int32Value hotel_class = 11; + + // Hotel country. + google.protobuf.StringValue hotel_country = 12; + + // Hotel date selection type. + google.ads.googleads.v3.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType hotel_date_selection_type = 13; + + // Hotel length of stay. + google.protobuf.Int32Value hotel_length_of_stay = 14; + + // Hotel rate rule ID. + google.protobuf.StringValue hotel_rate_rule_id = 73; + + // Hotel rate type. + google.ads.googleads.v3.enums.HotelRateTypeEnum.HotelRateType hotel_rate_type = 74; + + // Hotel price bucket. + google.ads.googleads.v3.enums.HotelPriceBucketEnum.HotelPriceBucket hotel_price_bucket = 78; + + // Hotel state. + google.protobuf.StringValue hotel_state = 15; + + // Hour of day as a number between 0 and 23, inclusive. + google.protobuf.Int32Value hour = 16; + + // Only used with feed item metrics. + // Indicates whether the interaction metrics occurred on the feed item itself + // or a different extension or ad unit. + google.protobuf.BoolValue interaction_on_this_extension = 49; + + // Keyword criterion. + Keyword keyword = 61; + + // Month as represented by the date of the first day of a month. Formatted as + // yyyy-MM-dd. + google.protobuf.StringValue month = 17; + + // Month of the year, e.g., January. + google.ads.googleads.v3.enums.MonthOfYearEnum.MonthOfYear month_of_year = 18; + + // Partner hotel ID. + google.protobuf.StringValue partner_hotel_id = 19; + + // Placeholder type. This is only used with feed item metrics. + google.ads.googleads.v3.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 20; + + // Aggregator ID of the product. + google.protobuf.UInt64Value product_aggregator_id = 28; + + // Bidding category (level 1) of the product. + google.protobuf.StringValue product_bidding_category_level1 = 56; + + // Bidding category (level 2) of the product. + google.protobuf.StringValue product_bidding_category_level2 = 57; + + // Bidding category (level 3) of the product. + google.protobuf.StringValue product_bidding_category_level3 = 58; + + // Bidding category (level 4) of the product. + google.protobuf.StringValue product_bidding_category_level4 = 59; + + // Bidding category (level 5) of the product. + google.protobuf.StringValue product_bidding_category_level5 = 60; + + // Brand of the product. + google.protobuf.StringValue product_brand = 29; + + // Channel of the product. + google.ads.googleads.v3.enums.ProductChannelEnum.ProductChannel product_channel = 30; + + // Channel exclusivity of the product. + google.ads.googleads.v3.enums.ProductChannelExclusivityEnum.ProductChannelExclusivity product_channel_exclusivity = 31; + + // Condition of the product. + google.ads.googleads.v3.enums.ProductConditionEnum.ProductCondition product_condition = 32; + + // Resource name of the geo target constant for the country of sale of the + // product. + google.protobuf.StringValue product_country = 33; + + // Custom attribute 0 of the product. + google.protobuf.StringValue product_custom_attribute0 = 34; + + // Custom attribute 1 of the product. + google.protobuf.StringValue product_custom_attribute1 = 35; + + // Custom attribute 2 of the product. + google.protobuf.StringValue product_custom_attribute2 = 36; + + // Custom attribute 3 of the product. + google.protobuf.StringValue product_custom_attribute3 = 37; + + // Custom attribute 4 of the product. + google.protobuf.StringValue product_custom_attribute4 = 38; + + // Item ID of the product. + google.protobuf.StringValue product_item_id = 39; + + // Resource name of the language constant for the language of the product. + google.protobuf.StringValue product_language = 40; + + // Merchant ID of the product. + google.protobuf.UInt64Value product_merchant_id = 41; + + // Store ID of the product. + google.protobuf.StringValue product_store_id = 42; + + // Title of the product. + google.protobuf.StringValue product_title = 43; + + // Type (level 1) of the product. + google.protobuf.StringValue product_type_l1 = 44; + + // Type (level 2) of the product. + google.protobuf.StringValue product_type_l2 = 45; + + // Type (level 3) of the product. + google.protobuf.StringValue product_type_l3 = 46; + + // Type (level 4) of the product. + google.protobuf.StringValue product_type_l4 = 47; + + // Type (level 5) of the product. + google.protobuf.StringValue product_type_l5 = 48; + + // Quarter as represented by the date of the first day of a quarter. + // Uses the calendar year for quarters, e.g., the second quarter of 2018 + // starts on 2018-04-01. Formatted as yyyy-MM-dd. + google.protobuf.StringValue quarter = 21; + + // Type of the search engine results page. + google.ads.googleads.v3.enums.SearchEngineResultsPageTypeEnum.SearchEngineResultsPageType search_engine_results_page_type = 70; + + // Match type of the keyword that triggered the ad, including variants. + google.ads.googleads.v3.enums.SearchTermMatchTypeEnum.SearchTermMatchType search_term_match_type = 22; + + // Position of the ad. + google.ads.googleads.v3.enums.SlotEnum.Slot slot = 23; + + // Resource name of the ad group criterion that represents webpage criterion. + google.protobuf.StringValue webpage = 66; + + // Week as defined as Monday through Sunday, and represented by the date of + // Monday. Formatted as yyyy-MM-dd. + google.protobuf.StringValue week = 24; + + // Year, formatted as yyyy. + google.protobuf.Int32Value year = 25; +} + +// A Keyword criterion segment. +message Keyword { + // The AdGroupCriterion resource name. + google.protobuf.StringValue ad_group_criterion = 1; + + // Keyword info. + KeywordInfo info = 2; +} diff --git a/google/ads/googleads/v3/common/simulation.proto b/google/ads/googleads/v3/common/simulation.proto new file mode 100644 index 000000000..4987e6aa5 --- /dev/null +++ b/google/ads/googleads/v3/common/simulation.proto @@ -0,0 +1,172 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "SimulationProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing simulation points. + +// A container for simulation points for simulations of type BID_MODIFIER. +message BidModifierSimulationPointList { + // Projected metrics for a series of bid modifier amounts. + repeated BidModifierSimulationPoint points = 1; +} + +// A container for simulation points for simulations of type CPC_BID. +message CpcBidSimulationPointList { + // Projected metrics for a series of CPC bid amounts. + repeated CpcBidSimulationPoint points = 1; +} + +// A container for simulation points for simulations of type CPV_BID. +message CpvBidSimulationPointList { + // Projected metrics for a series of CPV bid amounts. + repeated CpvBidSimulationPoint points = 1; +} + +// A container for simulation points for simulations of type TARGET_CPA. +message TargetCpaSimulationPointList { + // Projected metrics for a series of target CPA amounts. + repeated TargetCpaSimulationPoint points = 1; +} + +// Projected metrics for a specific bid modifier amount. +message BidModifierSimulationPoint { + // The simulated bid modifier upon which projected metrics are based. + google.protobuf.DoubleValue bid_modifier = 1; + + // Projected number of biddable conversions. + // Only search advertising channel type supports this field. + google.protobuf.DoubleValue biddable_conversions = 2; + + // Projected total value of biddable conversions. + // Only search advertising channel type supports this field. + google.protobuf.DoubleValue biddable_conversions_value = 3; + + // Projected number of clicks. + google.protobuf.Int64Value clicks = 4; + + // Projected cost in micros. + google.protobuf.Int64Value cost_micros = 5; + + // Projected number of impressions. + google.protobuf.Int64Value impressions = 6; + + // Projected number of top slot impressions. + // Only search advertising channel type supports this field. + google.protobuf.Int64Value top_slot_impressions = 7; + + // Projected number of biddable conversions for the parent resource. + // Only search advertising channel type supports this field. + google.protobuf.DoubleValue parent_biddable_conversions = 8; + + // Projected total value of biddable conversions for the parent resource. + // Only search advertising channel type supports this field. + google.protobuf.DoubleValue parent_biddable_conversions_value = 9; + + // Projected number of clicks for the parent resource. + google.protobuf.Int64Value parent_clicks = 10; + + // Projected cost in micros for the parent resource. + google.protobuf.Int64Value parent_cost_micros = 11; + + // Projected number of impressions for the parent resource. + google.protobuf.Int64Value parent_impressions = 12; + + // Projected number of top slot impressions for the parent resource. + // Only search advertising channel type supports this field. + google.protobuf.Int64Value parent_top_slot_impressions = 13; + + // Projected minimum daily budget that must be available to the parent + // resource to realize this simulation. + google.protobuf.Int64Value parent_required_budget_micros = 14; +} + +// Projected metrics for a specific CPC bid amount. +message CpcBidSimulationPoint { + // The simulated CPC bid upon which projected metrics are based. + google.protobuf.Int64Value cpc_bid_micros = 1; + + // Projected number of biddable conversions. + google.protobuf.DoubleValue biddable_conversions = 2; + + // Projected total value of biddable conversions. + google.protobuf.DoubleValue biddable_conversions_value = 3; + + // Projected number of clicks. + google.protobuf.Int64Value clicks = 4; + + // Projected cost in micros. + google.protobuf.Int64Value cost_micros = 5; + + // Projected number of impressions. + google.protobuf.Int64Value impressions = 6; + + // Projected number of top slot impressions. + // Only search advertising channel type supports this field. + google.protobuf.Int64Value top_slot_impressions = 7; +} + +// Projected metrics for a specific CPV bid amount. +message CpvBidSimulationPoint { + // The simulated CPV bid upon which projected metrics are based. + google.protobuf.Int64Value cpv_bid_micros = 1; + + // Projected cost in micros. + google.protobuf.Int64Value cost_micros = 2; + + // Projected number of impressions. + google.protobuf.Int64Value impressions = 3; + + // Projected number of views. + google.protobuf.Int64Value views = 4; +} + +// Projected metrics for a specific target CPA amount. +message TargetCpaSimulationPoint { + // The simulated target CPA upon which projected metrics are based. + google.protobuf.Int64Value target_cpa_micros = 1; + + // Projected number of biddable conversions. + google.protobuf.DoubleValue biddable_conversions = 2; + + // Projected total value of biddable conversions. + google.protobuf.DoubleValue biddable_conversions_value = 3; + + // Projected number of clicks. + google.protobuf.Int64Value clicks = 4; + + // Projected cost in micros. + google.protobuf.Int64Value cost_micros = 5; + + // Projected number of impressions. + google.protobuf.Int64Value impressions = 6; + + // Projected number of top slot impressions. + // Only search advertising channel type supports this field. + google.protobuf.Int64Value top_slot_impressions = 7; +} diff --git a/google/ads/googleads/v3/common/tag_snippet.proto b/google/ads/googleads/v3/common/tag_snippet.proto new file mode 100644 index 000000000..51e1a3a43 --- /dev/null +++ b/google/ads/googleads/v3/common/tag_snippet.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/enums/tracking_code_page_format.proto"; +import "google/ads/googleads/v3/enums/tracking_code_type.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "TagSnippetProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing TagSnippet + +// The site tag and event snippet pair for a TrackingCodeType. +message TagSnippet { + // The type of the generated tag snippets for tracking conversions. + google.ads.googleads.v3.enums.TrackingCodeTypeEnum.TrackingCodeType type = 1; + + // The format of the web page where the tracking tag and snippet will be + // installed, e.g. HTML. + google.ads.googleads.v3.enums.TrackingCodePageFormatEnum.TrackingCodePageFormat page_format = 2; + + // The site tag that adds visitors to your basic remarketing lists and sets + // new cookies on your domain. + google.protobuf.StringValue global_site_tag = 3; + + // The event snippet that works with the site tag to track actions that + // should be counted as conversions. + google.protobuf.StringValue event_snippet = 4; +} diff --git a/google/ads/googleads/v3/common/targeting_setting.proto b/google/ads/googleads/v3/common/targeting_setting.proto new file mode 100644 index 000000000..d2df8dd2b --- /dev/null +++ b/google/ads/googleads/v3/common/targeting_setting.proto @@ -0,0 +1,86 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/enums/targeting_dimension.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "TargetingSettingProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing TargetingSetting + +// Settings for the targeting-related features, at the campaign and ad group +// levels. For more details about the targeting setting, visit +// https://support.google.com/google-ads/answer/7365594 +message TargetingSetting { + // The per-targeting-dimension setting to restrict the reach of your campaign + // or ad group. + repeated TargetRestriction target_restrictions = 1; + + // The list of operations changing the target restrictions. + // + // Adding a target restriction with a targeting dimension that already exists + // causes the existing target restriction to be replaced with the new value. + repeated TargetRestrictionOperation target_restriction_operations = 2; +} + +// The list of per-targeting-dimension targeting settings. +message TargetRestriction { + // The targeting dimension that these settings apply to. + google.ads.googleads.v3.enums.TargetingDimensionEnum.TargetingDimension targeting_dimension = 1; + + // Indicates whether to restrict your ads to show only for the criteria you + // have selected for this targeting_dimension, or to target all values for + // this targeting_dimension and show ads based on your targeting in other + // TargetingDimensions. A value of `true` means that these criteria will only + // apply bid modifiers, and not affect targeting. A value of `false` means + // that these criteria will restrict targeting as well as applying bid + // modifiers. + google.protobuf.BoolValue bid_only = 2; +} + +// Operation to be performed on a target restriction list in a mutate. +message TargetRestrictionOperation { + // The operator. + enum Operator { + // Unspecified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Add the restriction to the existing restrictions. + ADD = 2; + + // Remove the restriction from the existing restrictions. + REMOVE = 3; + } + + // Type of list operation to perform. + Operator operator = 1; + + // The target restriction being added to or removed from the list. + TargetRestriction value = 2; +} diff --git a/google/ads/googleads/v3/common/text_label.proto b/google/ads/googleads/v3/common/text_label.proto new file mode 100644 index 000000000..448b7247e --- /dev/null +++ b/google/ads/googleads/v3/common/text_label.proto @@ -0,0 +1,41 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "TextLabelProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// A type of label displaying text on a colored background. +message TextLabel { + // Background color of the label in RGB format. This string must match the + // regular expression '^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$'. + // Note: The background color may not be visible for manager accounts. + google.protobuf.StringValue background_color = 1; + + // A short description of the label. The length must be no more than 200 + // characters. + google.protobuf.StringValue description = 2; +} diff --git a/google/ads/googleads/v3/common/url_collection.proto b/google/ads/googleads/v3/common/url_collection.proto new file mode 100644 index 000000000..85b90bd61 --- /dev/null +++ b/google/ads/googleads/v3/common/url_collection.proto @@ -0,0 +1,46 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "UrlCollectionProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file UrlCollection type. + +// Collection of urls that is tagged with a unique identifier. +message UrlCollection { + // Unique identifier for this UrlCollection instance. + google.protobuf.StringValue url_collection_id = 1; + + // A list of possible final URLs. + repeated google.protobuf.StringValue final_urls = 2; + + // A list of possible final mobile URLs. + repeated google.protobuf.StringValue final_mobile_urls = 3; + + // URL template for constructing a tracking URL. + google.protobuf.StringValue tracking_url_template = 4; +} diff --git a/google/ads/googleads/v3/common/user_lists.proto b/google/ads/googleads/v3/common/user_lists.proto new file mode 100644 index 000000000..e311f6b05 --- /dev/null +++ b/google/ads/googleads/v3/common/user_lists.proto @@ -0,0 +1,292 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/ads/googleads/v3/enums/customer_match_upload_key_type.proto"; +import "google/ads/googleads/v3/enums/user_list_combined_rule_operator.proto"; +import "google/ads/googleads/v3/enums/user_list_crm_data_source_type.proto"; +import "google/ads/googleads/v3/enums/user_list_date_rule_item_operator.proto"; +import "google/ads/googleads/v3/enums/user_list_logical_rule_operator.proto"; +import "google/ads/googleads/v3/enums/user_list_number_rule_item_operator.proto"; +import "google/ads/googleads/v3/enums/user_list_prepopulation_status.proto"; +import "google/ads/googleads/v3/enums/user_list_rule_type.proto"; +import "google/ads/googleads/v3/enums/user_list_string_rule_item_operator.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "UserListsProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing user list types. + +// SimilarUserList is a list of users which are similar to users from another +// UserList. These lists are read-only and automatically created by Google. +message SimilarUserListInfo { + // Seed UserList from which this list is derived. + google.protobuf.StringValue seed_user_list = 1; +} + +// UserList of CRM users provided by the advertiser. +message CrmBasedUserListInfo { + // A string that uniquely identifies a mobile application from which the data + // was collected to the Google Ads API. + // For iOS, the ID string is the 9 digit string that appears at the end of an + // App Store URL (e.g., "476943146" for "Flood-It! 2" whose App Store link is + // http://itunes.apple.com/us/app/flood-it!-2/id476943146). + // For Android, the ID string is the application's package name + // (e.g., "com.labpixies.colordrips" for "Color Drips" given Google Play link + // https://play.google.com/store/apps/details?id=com.labpixies.colordrips). + // Required when creating CrmBasedUserList for uploading mobile advertising + // IDs. + google.protobuf.StringValue app_id = 1; + + // Matching key type of the list. + // Mixed data types are not allowed on the same list. + // This field is required for an ADD operation. + google.ads.googleads.v3.enums.CustomerMatchUploadKeyTypeEnum.CustomerMatchUploadKeyType upload_key_type = 2; + + // Data source of the list. Default value is FIRST_PARTY. + // Only whitelisted customers can create third-party sourced CRM lists. + google.ads.googleads.v3.enums.UserListCrmDataSourceTypeEnum.UserListCrmDataSourceType data_source_type = 3; +} + +// A client defined rule based on custom parameters sent by web sites or +// uploaded by the advertiser. +message UserListRuleInfo { + // Rule type is used to determine how to group rule items. + // + // The default is OR of ANDs (disjunctive normal form). + // That is, rule items will be ANDed together within rule item groups and the + // groups themselves will be ORed together. + // + // Currently AND of ORs (conjunctive normal form) is only supported for + // ExpressionRuleUserList. + google.ads.googleads.v3.enums.UserListRuleTypeEnum.UserListRuleType rule_type = 1; + + // List of rule item groups that defines this rule. + // Rule item groups are grouped together based on rule_type. + repeated UserListRuleItemGroupInfo rule_item_groups = 2; +} + +// A group of rule items. +message UserListRuleItemGroupInfo { + // Rule items that will be grouped together based on rule_type. + repeated UserListRuleItemInfo rule_items = 1; +} + +// An atomic rule item. +message UserListRuleItemInfo { + // Rule variable name. It should match the corresponding key name fired + // by the pixel. + // A name must begin with US-ascii letters or underscore or UTF8 code that is + // greater than 127 and consist of US-ascii letters or digits or underscore or + // UTF8 code that is greater than 127. + // For websites, there are two built-in variable URL (name = 'url__') and + // referrer URL (name = 'ref_url__'). + // This field must be populated when creating a new rule item. + google.protobuf.StringValue name = 1; + + // An atomic rule item. + oneof rule_item { + // An atomic rule item composed of a number operation. + UserListNumberRuleItemInfo number_rule_item = 2; + + // An atomic rule item composed of a string operation. + UserListStringRuleItemInfo string_rule_item = 3; + + // An atomic rule item composed of a date operation. + UserListDateRuleItemInfo date_rule_item = 4; + } +} + +// A rule item composed of a date operation. +message UserListDateRuleItemInfo { + // Date comparison operator. + // This field is required and must be populated when creating new date + // rule item. + google.ads.googleads.v3.enums.UserListDateRuleItemOperatorEnum.UserListDateRuleItemOperator operator = 1; + + // String representing date value to be compared with the rule variable. + // Supported date format is YYYY-MM-DD. + // Times are reported in the customer's time zone. + google.protobuf.StringValue value = 2; + + // The relative date value of the right hand side denoted by number of days + // offset from now. The value field will override this field when both are + // present. + google.protobuf.Int64Value offset_in_days = 3; +} + +// A rule item composed of a number operation. +message UserListNumberRuleItemInfo { + // Number comparison operator. + // This field is required and must be populated when creating a new number + // rule item. + google.ads.googleads.v3.enums.UserListNumberRuleItemOperatorEnum.UserListNumberRuleItemOperator operator = 1; + + // Number value to be compared with the variable. + // This field is required and must be populated when creating a new number + // rule item. + google.protobuf.DoubleValue value = 2; +} + +// A rule item composed of a string operation. +message UserListStringRuleItemInfo { + // String comparison operator. + // This field is required and must be populated when creating a new string + // rule item. + google.ads.googleads.v3.enums.UserListStringRuleItemOperatorEnum.UserListStringRuleItemOperator operator = 1; + + // The right hand side of the string rule item. For URLs or referrer URLs, + // the value can not contain illegal URL chars such as newlines, quotes, + // tabs, or parentheses. This field is required and must be populated when + // creating a new string rule item. + google.protobuf.StringValue value = 2; +} + +// User lists defined by combining two rules, left operand and right operand. +// There are two operators: AND where left operand and right operand have to be +// true; AND_NOT where left operand is true but right operand is false. +message CombinedRuleUserListInfo { + // Left operand of the combined rule. + // This field is required and must be populated when creating new combined + // rule based user list. + UserListRuleInfo left_operand = 1; + + // Right operand of the combined rule. + // This field is required and must be populated when creating new combined + // rule based user list. + UserListRuleInfo right_operand = 2; + + // Operator to connect the two operands. + // + // Required for creating a combined rule user list. + google.ads.googleads.v3.enums.UserListCombinedRuleOperatorEnum.UserListCombinedRuleOperator rule_operator = 3; +} + +// Visitors of a page during specific dates. +message DateSpecificRuleUserListInfo { + // Boolean rule that defines visitor of a page. + // + // Required for creating a date specific rule user list. + UserListRuleInfo rule = 1; + + // Start date of users visit. If set to 2000-01-01, then the list includes all + // users before end_date. The date's format should be YYYY-MM-DD. + // + // Required for creating a data specific rule user list. + google.protobuf.StringValue start_date = 2; + + // End date of users visit. If set to 2037-12-30, then the list includes all + // users after start_date. The date's format should be YYYY-MM-DD. + // + // Required for creating a data specific rule user list. + google.protobuf.StringValue end_date = 3; +} + +// Visitors of a page. The page visit is defined by one boolean rule expression. +message ExpressionRuleUserListInfo { + // Boolean rule that defines this user list. The rule consists of a list of + // rule item groups and each rule item group consists of a list of rule items. + // All the rule item groups are ORed or ANDed together for evaluation based on + // rule.rule_type. + // + // Required for creating an expression rule user list. + UserListRuleInfo rule = 1; +} + +// Representation of a userlist that is generated by a rule. +message RuleBasedUserListInfo { + // The status of pre-population. The field is default to NONE if not set which + // means the previous users will not be considered. If set to REQUESTED, past + // site visitors or app users who match the list definition will be included + // in the list (works on the Display Network only). This will only + // add past users from within the last 30 days, depending on the + // list's membership duration and the date when the remarketing tag is added. + // The status will be updated to FINISHED once request is processed, or FAILED + // if the request fails. + google.ads.googleads.v3.enums.UserListPrepopulationStatusEnum.UserListPrepopulationStatus prepopulation_status = 1; + + // Subtypes of rule based user lists. + oneof rule_based_user_list { + // User lists defined by combining two rules. + // There are two operators: AND, where the left and right operands have to + // be true; AND_NOT where left operand is true but right operand is false. + CombinedRuleUserListInfo combined_rule_user_list = 2; + + // Visitors of a page during specific dates. The visiting periods are + // defined as follows: + // Between start_date (inclusive) and end_date (inclusive); + // Before end_date (exclusive) with start_date = 2000-01-01; + // After start_date (exclusive) with end_date = 2037-12-30. + DateSpecificRuleUserListInfo date_specific_rule_user_list = 3; + + // Visitors of a page. The page visit is defined by one boolean rule + // expression. + ExpressionRuleUserListInfo expression_rule_user_list = 4; + } +} + +// Represents a user list that is a custom combination of user lists. +message LogicalUserListInfo { + // Logical list rules that define this user list. The rules are defined as a + // logical operator (ALL/ANY/NONE) and a list of user lists. All the rules are + // ANDed when they are evaluated. + // + // Required for creating a logical user list. + repeated UserListLogicalRuleInfo rules = 1; +} + +// A user list logical rule. A rule has a logical operator (and/or/not) and a +// list of user lists as operands. +message UserListLogicalRuleInfo { + // The logical operator of the rule. + google.ads.googleads.v3.enums.UserListLogicalRuleOperatorEnum.UserListLogicalRuleOperator operator = 1; + + // The list of operands of the rule. + repeated LogicalUserListOperandInfo rule_operands = 2; +} + +// Operand of logical user list that consists of a user list. +message LogicalUserListOperandInfo { + // Resource name of a user list as an operand. + google.protobuf.StringValue user_list = 1; +} + +// User list targeting as a collection of conversions or remarketing actions. +message BasicUserListInfo { + // Actions associated with this user list. + repeated UserListActionInfo actions = 1; +} + +// Represents an action type used for building remarketing user lists. +message UserListActionInfo { + // Subtypes of user list action. + oneof user_list_action { + // A conversion action that's not generated from remarketing. + google.protobuf.StringValue conversion_action = 1; + + // A remarketing action. + google.protobuf.StringValue remarketing_action = 2; + } +} diff --git a/google/ads/googleads/v3/common/value.proto b/google/ads/googleads/v3/common/value.proto new file mode 100644 index 000000000..be5792e25 --- /dev/null +++ b/google/ads/googleads/v3/common/value.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.common; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common"; +option java_multiple_files = true; +option java_outer_classname = "ValueProto"; +option java_package = "com.google.ads.googleads.v3.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V3::Common"; + +// Proto file describing value types + +// A generic data container. +message Value { + // A value. + oneof value { + // A boolean. + bool boolean_value = 1; + + // An int64. + int64 int64_value = 2; + + // A float. + float float_value = 3; + + // A double. + double double_value = 4; + + // A string. + string string_value = 5; + } +} diff --git a/google/ads/googleads/v3/enums/access_reason.proto b/google/ads/googleads/v3/enums/access_reason.proto new file mode 100644 index 000000000..8acee7121 --- /dev/null +++ b/google/ads/googleads/v3/enums/access_reason.proto @@ -0,0 +1,57 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AccessReasonProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Indicates the way the resource such as user list is related to a user. +message AccessReasonEnum { + // Enum describing possible access reasons. + enum AccessReason { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The resource is owned by the user. + OWNED = 2; + + // The resource is shared to the user. + SHARED = 3; + + // The resource is licensed to the user. + LICENSED = 4; + + // The user subscribed to the resource. + SUBSCRIBED = 5; + + // The resource is accessible to the user. + AFFILIATED = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/access_role.proto b/google/ads/googleads/v3/enums/access_role.proto new file mode 100644 index 000000000..4f1729241 --- /dev/null +++ b/google/ads/googleads/v3/enums/access_role.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AccessRoleProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Container for enum describing possible access role for user. +message AccessRoleEnum { + // Possible access role of a user. + enum AccessRole { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Owns its account and can control the addition of other users. + ADMIN = 2; + + // Can modify campaigns, but can't affect other users. + STANDARD = 3; + + // Can view campaigns and account changes, but cannot make edits. + READ_ONLY = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/account_budget_proposal_status.proto b/google/ads/googleads/v3/enums/account_budget_proposal_status.proto new file mode 100644 index 000000000..286be91df --- /dev/null +++ b/google/ads/googleads/v3/enums/account_budget_proposal_status.proto @@ -0,0 +1,63 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetProposalStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing AccountBudgetProposal statuses. + +// Message describing AccountBudgetProposal statuses. +message AccountBudgetProposalStatusEnum { + // The possible statuses of an AccountBudgetProposal. + enum AccountBudgetProposalStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The proposal is pending approval. + PENDING = 2; + + // The proposal has been approved but the corresponding billing setup + // has not. This can occur for proposals that set up the first budget + // when signing up for billing or when performing a change of bill-to + // operation. + APPROVED_HELD = 3; + + // The proposal has been approved. + APPROVED = 4; + + // The proposal has been cancelled by the user. + CANCELLED = 5; + + // The proposal has been rejected by the user, e.g. by rejecting an + // acceptance email. + REJECTED = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/account_budget_proposal_type.proto b/google/ads/googleads/v3/enums/account_budget_proposal_type.proto new file mode 100644 index 000000000..55f33d981 --- /dev/null +++ b/google/ads/googleads/v3/enums/account_budget_proposal_type.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetProposalTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing AccountBudgetProposal types. + +// Message describing AccountBudgetProposal types. +message AccountBudgetProposalTypeEnum { + // The possible types of an AccountBudgetProposal. + enum AccountBudgetProposalType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Identifies a request to create a new budget. + CREATE = 2; + + // Identifies a request to edit an existing budget. + UPDATE = 3; + + // Identifies a request to end a budget that has already started. + END = 4; + + // Identifies a request to remove a budget that hasn't started yet. + REMOVE = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/account_budget_status.proto b/google/ads/googleads/v3/enums/account_budget_status.proto new file mode 100644 index 000000000..f5035cc46 --- /dev/null +++ b/google/ads/googleads/v3/enums/account_budget_status.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing AccountBudget statuses. + +// Message describing AccountBudget statuses. +message AccountBudgetStatusEnum { + // The possible statuses of an AccountBudget. + enum AccountBudgetStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The account budget is pending approval. + PENDING = 2; + + // The account budget has been approved. + APPROVED = 3; + + // The account budget has been cancelled by the user. + CANCELLED = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/ad_customizer_placeholder_field.proto b/google/ads/googleads/v3/enums/ad_customizer_placeholder_field.proto new file mode 100644 index 000000000..5df0748f8 --- /dev/null +++ b/google/ads/googleads/v3/enums/ad_customizer_placeholder_field.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdCustomizerPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Ad Customizer placeholder fields. + +// Values for Ad Customizer placeholder fields. +message AdCustomizerPlaceholderFieldEnum { + // Possible values for Ad Customizers placeholder fields. + enum AdCustomizerPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: INT64. Integer value to be inserted. + INTEGER = 2; + + // Data Type: STRING. Price value to be inserted. + PRICE = 3; + + // Data Type: DATE_TIME. Date value to be inserted. + DATE = 4; + + // Data Type: STRING. String value to be inserted. + STRING = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/ad_group_ad_rotation_mode.proto b/google/ads/googleads/v3/enums/ad_group_ad_rotation_mode.proto new file mode 100644 index 000000000..d7a89d168 --- /dev/null +++ b/google/ads/googleads/v3/enums/ad_group_ad_rotation_mode.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdRotationModeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing ad group ad rotation mode. + +// Container for enum describing possible ad rotation modes of ads within an +// ad group. +message AdGroupAdRotationModeEnum { + // The possible ad rotation modes of an ad group. + enum AdGroupAdRotationMode { + // The ad rotation mode has not been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // Optimize ad group ads based on clicks or conversions. + OPTIMIZE = 2; + + // Rotate evenly forever. + ROTATE_FOREVER = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/ad_group_ad_status.proto b/google/ads/googleads/v3/enums/ad_group_ad_status.proto new file mode 100644 index 000000000..22ca2b0fd --- /dev/null +++ b/google/ads/googleads/v3/enums/ad_group_ad_status.proto @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing ad group status. + +// Container for enum describing possible statuses of an AdGroupAd. +message AdGroupAdStatusEnum { + // The possible statuses of an AdGroupAd. + enum AdGroupAdStatus { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // The ad group ad is enabled. + ENABLED = 2; + + // The ad group ad is paused. + PAUSED = 3; + + // The ad group ad is removed. + REMOVED = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/ad_group_criterion_approval_status.proto b/google/ads/googleads/v3/enums/ad_group_criterion_approval_status.proto new file mode 100644 index 000000000..e4e6bff64 --- /dev/null +++ b/google/ads/googleads/v3/enums/ad_group_criterion_approval_status.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionApprovalStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing approval status for the criterion. + +// Container for enum describing possible AdGroupCriterion approval statuses. +message AdGroupCriterionApprovalStatusEnum { + // Enumerates AdGroupCriterion approval statuses. + enum AdGroupCriterionApprovalStatus { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Approved. + APPROVED = 2; + + // Disapproved. + DISAPPROVED = 3; + + // Pending Review. + PENDING_REVIEW = 4; + + // Under review. + UNDER_REVIEW = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/ad_group_criterion_status.proto b/google/ads/googleads/v3/enums/ad_group_criterion_status.proto new file mode 100644 index 000000000..f281e6154 --- /dev/null +++ b/google/ads/googleads/v3/enums/ad_group_criterion_status.proto @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing AdGroupCriterion statuses. + +// Message describing AdGroupCriterion statuses. +message AdGroupCriterionStatusEnum { + // The possible statuses of an AdGroupCriterion. + enum AdGroupCriterionStatus { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // The ad group criterion is enabled. + ENABLED = 2; + + // The ad group criterion is paused. + PAUSED = 3; + + // The ad group criterion is removed. + REMOVED = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/ad_group_status.proto b/google/ads/googleads/v3/enums/ad_group_status.proto new file mode 100644 index 000000000..52079e3c5 --- /dev/null +++ b/google/ads/googleads/v3/enums/ad_group_status.proto @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing ad group status. + +// Container for enum describing possible statuses of an ad group. +message AdGroupStatusEnum { + // The possible statuses of an ad group. + enum AdGroupStatus { + // The status has not been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // The ad group is enabled. + ENABLED = 2; + + // The ad group is paused. + PAUSED = 3; + + // The ad group is removed. + REMOVED = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/ad_group_type.proto b/google/ads/googleads/v3/enums/ad_group_type.proto new file mode 100644 index 000000000..992996fd8 --- /dev/null +++ b/google/ads/googleads/v3/enums/ad_group_type.proto @@ -0,0 +1,90 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing ad group types. + +// Defines types of an ad group, specific to a particular campaign channel +// type. This type drives validations that restrict which entities can be +// added to the ad group. +message AdGroupTypeEnum { + // Enum listing the possible types of an ad group. + enum AdGroupType { + // The type has not been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // The default ad group type for Search campaigns. + SEARCH_STANDARD = 2; + + // The default ad group type for Display campaigns. + DISPLAY_STANDARD = 3; + + // The ad group type for Shopping campaigns serving standard product ads. + SHOPPING_PRODUCT_ADS = 4; + + // The default ad group type for Hotel campaigns. + HOTEL_ADS = 6; + + // The type for ad groups in Smart Shopping campaigns. + SHOPPING_SMART_ADS = 7; + + // Short unskippable in-stream video ads. + VIDEO_BUMPER = 8; + + // TrueView (skippable) in-stream video ads. + VIDEO_TRUE_VIEW_IN_STREAM = 9; + + // TrueView in-display video ads. + VIDEO_TRUE_VIEW_IN_DISPLAY = 10; + + // Unskippable in-stream video ads. + VIDEO_NON_SKIPPABLE_IN_STREAM = 11; + + // Outstream video ads. + VIDEO_OUTSTREAM = 12; + + // Ad group type for Dynamic Search Ads ad groups. + SEARCH_DYNAMIC_ADS = 13; + + // The type for ad groups in Shopping Comparison Listing campaigns. + SHOPPING_COMPARISON_LISTING_ADS = 14; + + // The ad group type for Promoted Hotel ad groups. + PROMOTED_HOTEL_ADS = 15; + + // Video responsive ad groups. + VIDEO_RESPONSIVE = 16; + } + + +} diff --git a/google/ads/googleads/v3/enums/ad_network_type.proto b/google/ads/googleads/v3/enums/ad_network_type.proto new file mode 100644 index 000000000..022f8c100 --- /dev/null +++ b/google/ads/googleads/v3/enums/ad_network_type.proto @@ -0,0 +1,62 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdNetworkTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing ad network types. + +// Container for enumeration of Google Ads network types. +message AdNetworkTypeEnum { + // Enumerates Google Ads network types. + enum AdNetworkType { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Google search. + SEARCH = 2; + + // Search partners. + SEARCH_PARTNERS = 3; + + // Display Network. + CONTENT = 4; + + // YouTube Search. + YOUTUBE_SEARCH = 5; + + // YouTube Videos + YOUTUBE_WATCH = 6; + + // Cross-network. + MIXED = 7; + } + + +} diff --git a/google/ads/googleads/v3/enums/ad_serving_optimization_status.proto b/google/ads/googleads/v3/enums/ad_serving_optimization_status.proto new file mode 100644 index 000000000..9148ce069 --- /dev/null +++ b/google/ads/googleads/v3/enums/ad_serving_optimization_status.proto @@ -0,0 +1,64 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdServingOptimizationStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing ad serving statuses. + +// Possible ad serving statuses of a campaign. +message AdServingOptimizationStatusEnum { + // Enum describing possible serving statuses. + enum AdServingOptimizationStatus { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // Ad serving is optimized based on CTR for the campaign. + OPTIMIZE = 2; + + // Ad serving is optimized based on CTR * Conversion for the campaign. If + // the campaign is not in the conversion optimizer bidding strategy, it will + // default to OPTIMIZED. + CONVERSION_OPTIMIZE = 3; + + // Ads are rotated evenly for 90 days, then optimized for clicks. + ROTATE = 4; + + // Show lower performing ads more evenly with higher performing ads, and do + // not optimize. + ROTATE_INDEFINITELY = 5; + + // Ad serving optimization status is not available. + UNAVAILABLE = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/ad_strength.proto b/google/ads/googleads/v3/enums/ad_strength.proto new file mode 100644 index 000000000..7e51ee150 --- /dev/null +++ b/google/ads/googleads/v3/enums/ad_strength.proto @@ -0,0 +1,62 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdStrengthProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing ad strengths. + +// Container for enum describing possible ad strengths. +message AdStrengthEnum { + // Enum listing the possible ad strengths. + enum AdStrength { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The ad strength is currently pending. + PENDING = 2; + + // No ads could be generated. + NO_ADS = 3; + + // Poor strength. + POOR = 4; + + // Average strength. + AVERAGE = 5; + + // Good strength. + GOOD = 6; + + // Excellent strength. + EXCELLENT = 7; + } + + +} diff --git a/google/ads/googleads/v3/enums/ad_type.proto b/google/ads/googleads/v3/enums/ad_type.proto new file mode 100644 index 000000000..184161826 --- /dev/null +++ b/google/ads/googleads/v3/enums/ad_type.proto @@ -0,0 +1,107 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing the ad type. + +// Container for enum describing possible types of an ad. +message AdTypeEnum { + // The possible types of an ad. + enum AdType { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // The ad is a text ad. + TEXT_AD = 2; + + // The ad is an expanded text ad. + EXPANDED_TEXT_AD = 3; + + // The ad is a call only ad. + CALL_ONLY_AD = 6; + + // The ad is an expanded dynamic search ad. + EXPANDED_DYNAMIC_SEARCH_AD = 7; + + // The ad is a hotel ad. + HOTEL_AD = 8; + + // The ad is a Smart Shopping ad. + SHOPPING_SMART_AD = 9; + + // The ad is a standard Shopping ad. + SHOPPING_PRODUCT_AD = 10; + + // The ad is a video ad. + VIDEO_AD = 12; + + // This ad is a Gmail ad. + GMAIL_AD = 13; + + // This ad is an Image ad. + IMAGE_AD = 14; + + // The ad is a responsive search ad. + RESPONSIVE_SEARCH_AD = 15; + + // The ad is a legacy responsive display ad. + LEGACY_RESPONSIVE_DISPLAY_AD = 16; + + // The ad is an app ad. + APP_AD = 17; + + // The ad is a legacy app install ad. + LEGACY_APP_INSTALL_AD = 18; + + // The ad is a responsive display ad. + RESPONSIVE_DISPLAY_AD = 19; + + // The ad is a display upload ad with the HTML5_UPLOAD_AD product type. + HTML5_UPLOAD_AD = 21; + + // The ad is a display upload ad with one of the DYNAMIC_HTML5_* product + // types. + DYNAMIC_HTML5_AD = 22; + + // The ad is an app engagement ad. + APP_ENGAGEMENT_AD = 23; + + // The ad is a Shopping Comparison Listing ad. + SHOPPING_COMPARISON_LISTING_AD = 24; + + // Video responsive ad. + VIDEO_RESPONSIVE_AD = 30; + } + + +} diff --git a/google/ads/googleads/v3/enums/advertising_channel_sub_type.proto b/google/ads/googleads/v3/enums/advertising_channel_sub_type.proto new file mode 100644 index 000000000..9ea36496f --- /dev/null +++ b/google/ads/googleads/v3/enums/advertising_channel_sub_type.proto @@ -0,0 +1,87 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdvertisingChannelSubTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing advertising channel subtypes. + +// An immutable specialization of an Advertising Channel. +message AdvertisingChannelSubTypeEnum { + // Enum describing the different channel subtypes. + enum AdvertisingChannelSubType { + // Not specified. + UNSPECIFIED = 0; + + // Used as a return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Mobile app campaigns for Search. + SEARCH_MOBILE_APP = 2; + + // Mobile app campaigns for Display. + DISPLAY_MOBILE_APP = 3; + + // AdWords express campaigns for search. + SEARCH_EXPRESS = 4; + + // AdWords Express campaigns for display. + DISPLAY_EXPRESS = 5; + + // Smart Shopping campaigns. + SHOPPING_SMART_ADS = 6; + + // Gmail Ad campaigns. + DISPLAY_GMAIL_AD = 7; + + // Smart display campaigns. + DISPLAY_SMART_CAMPAIGN = 8; + + // Video Outstream campaigns. + VIDEO_OUTSTREAM = 9; + + // Video TrueView for Action campaigns. + VIDEO_ACTION = 10; + + // Video campaigns with non-skippable video ads. + VIDEO_NON_SKIPPABLE = 11; + + // App Campaign that allows you to easily promote your Android or iOS app + // across Google's top properties including Search, Play, YouTube, and the + // Google Display Network. + APP_CAMPAIGN = 12; + + // App Campaign for engagement, focused on driving re-engagement with the + // app across several of Google’s top properties including Search, YouTube, + // and the Google Display Network. + APP_CAMPAIGN_FOR_ENGAGEMENT = 13; + + // Shopping Comparison Listing campaigns. + SHOPPING_COMPARISON_LISTING_ADS = 15; + } + + +} diff --git a/google/ads/googleads/v3/enums/advertising_channel_type.proto b/google/ads/googleads/v3/enums/advertising_channel_type.proto new file mode 100644 index 000000000..9827e4b8b --- /dev/null +++ b/google/ads/googleads/v3/enums/advertising_channel_type.proto @@ -0,0 +1,64 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdvertisingChannelTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing advertising channel types + +// The channel type a campaign may target to serve on. +message AdvertisingChannelTypeEnum { + // Enum describing the various advertising channel types. + enum AdvertisingChannelType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Search Network. Includes display bundled, and Search+ campaigns. + SEARCH = 2; + + // Google Display Network only. + DISPLAY = 3; + + // Shopping campaigns serve on the shopping property + // and on google.com search results. + SHOPPING = 4; + + // Hotel Ads campaigns. + HOTEL = 5; + + // Video campaigns. + VIDEO = 6; + + // App Campaigns, and App Campaigns for Engagement, that run + // across multiple channels. + MULTI_CHANNEL = 7; + } + + +} diff --git a/google/ads/googleads/v3/enums/affiliate_location_feed_relationship_type.proto b/google/ads/googleads/v3/enums/affiliate_location_feed_relationship_type.proto new file mode 100644 index 000000000..985eac98e --- /dev/null +++ b/google/ads/googleads/v3/enums/affiliate_location_feed_relationship_type.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AffiliateLocationFeedRelationshipTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing relation type for affiliate location feeds. + +// Container for enum describing possible values for a relationship type for +// an affiliate location feed. +message AffiliateLocationFeedRelationshipTypeEnum { + // Possible values for a relationship type for an affiliate location feed. + enum AffiliateLocationFeedRelationshipType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // General retailer relationship. + GENERAL_RETAILER = 2; + } + + +} diff --git a/google/ads/googleads/v3/enums/affiliate_location_placeholder_field.proto b/google/ads/googleads/v3/enums/affiliate_location_placeholder_field.proto new file mode 100644 index 000000000..6aa7e5d21 --- /dev/null +++ b/google/ads/googleads/v3/enums/affiliate_location_placeholder_field.proto @@ -0,0 +1,77 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AffiliateLocationPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Affiliate Location placeholder fields. + +// Values for Affiliate Location placeholder fields. +message AffiliateLocationPlaceholderFieldEnum { + // Possible values for Affiliate Location placeholder fields. + enum AffiliateLocationPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. The name of the business. + BUSINESS_NAME = 2; + + // Data Type: STRING. Line 1 of the business address. + ADDRESS_LINE_1 = 3; + + // Data Type: STRING. Line 2 of the business address. + ADDRESS_LINE_2 = 4; + + // Data Type: STRING. City of the business address. + CITY = 5; + + // Data Type: STRING. Province of the business address. + PROVINCE = 6; + + // Data Type: STRING. Postal code of the business address. + POSTAL_CODE = 7; + + // Data Type: STRING. Country code of the business address. + COUNTRY_CODE = 8; + + // Data Type: STRING. Phone number of the business. + PHONE_NUMBER = 9; + + // Data Type: STRING. Language code of the business. + LANGUAGE_CODE = 10; + + // Data Type: INT64. ID of the chain. + CHAIN_ID = 11; + + // Data Type: STRING. Name of the chain. + CHAIN_NAME = 12; + } + + +} diff --git a/google/ads/googleads/v3/enums/age_range_type.proto b/google/ads/googleads/v3/enums/age_range_type.proto new file mode 100644 index 000000000..28f172bcd --- /dev/null +++ b/google/ads/googleads/v3/enums/age_range_type.proto @@ -0,0 +1,65 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AgeRangeTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing age range types. + +// Container for enum describing the type of demographic age ranges. +message AgeRangeTypeEnum { + // The type of demographic age ranges (e.g. between 18 and 24 years old). + enum AgeRangeType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Between 18 and 24 years old. + AGE_RANGE_18_24 = 503001; + + // Between 25 and 34 years old. + AGE_RANGE_25_34 = 503002; + + // Between 35 and 44 years old. + AGE_RANGE_35_44 = 503003; + + // Between 45 and 54 years old. + AGE_RANGE_45_54 = 503004; + + // Between 55 and 64 years old. + AGE_RANGE_55_64 = 503005; + + // 65 years old and beyond. + AGE_RANGE_65_UP = 503006; + + // Undetermined age range. + AGE_RANGE_UNDETERMINED = 503999; + } + + +} diff --git a/google/ads/googleads/v3/enums/app_campaign_app_store.proto b/google/ads/googleads/v3/enums/app_campaign_app_store.proto new file mode 100644 index 000000000..30d8032d4 --- /dev/null +++ b/google/ads/googleads/v3/enums/app_campaign_app_store.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AppCampaignAppStoreProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing App Campaign app store. + +// The application store that distributes mobile applications. +message AppCampaignAppStoreEnum { + // Enum describing app campaign app store. + enum AppCampaignAppStore { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Apple app store. + APPLE_APP_STORE = 2; + + // Google play. + GOOGLE_APP_STORE = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/app_campaign_bidding_strategy_goal_type.proto b/google/ads/googleads/v3/enums/app_campaign_bidding_strategy_goal_type.proto new file mode 100644 index 000000000..26d3460ce --- /dev/null +++ b/google/ads/googleads/v3/enums/app_campaign_bidding_strategy_goal_type.proto @@ -0,0 +1,64 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AppCampaignBiddingStrategyGoalTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing App Campaign bidding strategy goal types. + +// Container for enum describing goal towards which the bidding strategy of an +// app campaign should optimize for. +message AppCampaignBiddingStrategyGoalTypeEnum { + // Goal type of App campaign BiddingStrategy. + enum AppCampaignBiddingStrategyGoalType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Aim to maximize the number of app installs. The cpa bid is the + // target cost per install. + OPTIMIZE_INSTALLS_TARGET_INSTALL_COST = 2; + + // Aim to maximize the long term number of selected in-app conversions from + // app installs. The cpa bid is the target cost per install. + OPTIMIZE_IN_APP_CONVERSIONS_TARGET_INSTALL_COST = 3; + + // Aim to maximize the long term number of selected in-app conversions from + // app installs. The cpa bid is the target cost per in-app conversion. Note + // that the actual cpa may seem higher than the target cpa at first, since + // the long term conversions haven’t happened yet. + OPTIMIZE_IN_APP_CONVERSIONS_TARGET_CONVERSION_COST = 4; + + // Aim to maximize all conversions' value, i.e. install + selected in-app + // conversions while achieving or exceeding target return on advertising + // spend. + OPTIMIZE_RETURN_ON_ADVERTISING_SPEND = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/app_payment_model_type.proto b/google/ads/googleads/v3/enums/app_payment_model_type.proto new file mode 100644 index 000000000..1147e363f --- /dev/null +++ b/google/ads/googleads/v3/enums/app_payment_model_type.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AppPaymentModelTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing criteria types. + +// Represents a criterion for targeting paid apps. +message AppPaymentModelTypeEnum { + // Enum describing possible app payment models. + enum AppPaymentModelType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Represents paid-for apps. + PAID = 30; + } + + +} diff --git a/google/ads/googleads/v3/enums/app_placeholder_field.proto b/google/ads/googleads/v3/enums/app_placeholder_field.proto new file mode 100644 index 000000000..52db714fa --- /dev/null +++ b/google/ads/googleads/v3/enums/app_placeholder_field.proto @@ -0,0 +1,75 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AppPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing App placeholder fields. + +// Values for App placeholder fields. +message AppPlaceholderFieldEnum { + // Possible values for App placeholder fields. + enum AppPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: INT64. The application store that the target application + // belongs to. Valid values are: 1 = Apple iTunes Store; 2 = Google Play + // Store. + STORE = 2; + + // Data Type: STRING. The store-specific ID for the target application. + ID = 3; + + // Data Type: STRING. The visible text displayed when the link is rendered + // in an ad. + LINK_TEXT = 4; + + // Data Type: STRING. The destination URL of the in-app link. + URL = 5; + + // Data Type: URL_LIST. Final URLs for the in-app link when using Upgraded + // URLs. + FINAL_URLS = 6; + + // Data Type: URL_LIST. Final Mobile URLs for the in-app link when using + // Upgraded URLs. + FINAL_MOBILE_URLS = 7; + + // Data Type: URL. Tracking template for the in-app link when using Upgraded + // URLs. + TRACKING_URL = 8; + + // Data Type: STRING. Final URL suffix for the in-app link when using + // parallel tracking. + FINAL_URL_SUFFIX = 9; + } + + +} diff --git a/google/ads/googleads/v3/enums/app_store.proto b/google/ads/googleads/v3/enums/app_store.proto new file mode 100644 index 000000000..80bad8036 --- /dev/null +++ b/google/ads/googleads/v3/enums/app_store.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AppStoreProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing app store types for an app extension. + +// Container for enum describing app store type in an app extension. +message AppStoreEnum { + // App store type in an app extension. + enum AppStore { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Apple iTunes. + APPLE_ITUNES = 2; + + // Google Play. + GOOGLE_PLAY = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/app_url_operating_system_type.proto b/google/ads/googleads/v3/enums/app_url_operating_system_type.proto new file mode 100644 index 000000000..b90d04c26 --- /dev/null +++ b/google/ads/googleads/v3/enums/app_url_operating_system_type.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AppUrlOperatingSystemTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing operating system for a deeplink app URL. + +// The possible OS types for a deeplink AppUrl. +message AppUrlOperatingSystemTypeEnum { + // Operating System + enum AppUrlOperatingSystemType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The Apple IOS operating system. + IOS = 2; + + // The Android operating system. + ANDROID = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/asset_field_type.proto b/google/ads/googleads/v3/enums/asset_field_type.proto new file mode 100644 index 000000000..27d756de4 --- /dev/null +++ b/google/ads/googleads/v3/enums/asset_field_type.proto @@ -0,0 +1,62 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AssetFieldTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing asset type. + +// Container for enum describing the possible placements of an asset. +message AssetFieldTypeEnum { + // Enum describing the possible placements of an asset. + enum AssetFieldType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The asset is linked for use as a headline. + HEADLINE = 2; + + // The asset is linked for use as a description. + DESCRIPTION = 3; + + // The asset is linked for use as mandatory ad text. + MANDATORY_AD_TEXT = 4; + + // The asset is linked for use as a marketing image. + MARKETING_IMAGE = 5; + + // The asset is linked for use as a media bundle. + MEDIA_BUNDLE = 6; + + // The asset is linked for use as a YouTube video. + YOUTUBE_VIDEO = 7; + } + + +} diff --git a/google/ads/googleads/v3/enums/asset_performance_label.proto b/google/ads/googleads/v3/enums/asset_performance_label.proto new file mode 100644 index 000000000..bce7adf99 --- /dev/null +++ b/google/ads/googleads/v3/enums/asset_performance_label.proto @@ -0,0 +1,62 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AssetPerformanceLabelProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing the performance label of an asset. + +// Container for enum describing the performance label of an asset. +message AssetPerformanceLabelEnum { + // Enum describing the possible performance labels of an asset, usually + // computed in the context of a linkage. + enum AssetPerformanceLabel { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // This asset does not yet have any performance informantion. This may be + // because it is still under review. + PENDING = 2; + + // The asset has started getting impressions but the stats are not + // statistically significant enough to get an asset performance label. + LEARNING = 3; + + // Worst performing assets. + LOW = 4; + + // Good performing assets. + GOOD = 5; + + // Best performing assets. + BEST = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/asset_type.proto b/google/ads/googleads/v3/enums/asset_type.proto new file mode 100644 index 000000000..430606ac8 --- /dev/null +++ b/google/ads/googleads/v3/enums/asset_type.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AssetTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing asset type. + +// Container for enum describing the types of asset. +message AssetTypeEnum { + // Enum describing possible types of asset. + enum AssetType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // YouTube video asset. + YOUTUBE_VIDEO = 2; + + // Media bundle asset. + MEDIA_BUNDLE = 3; + + // Image asset. + IMAGE = 4; + + // Text asset. + TEXT = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/attribution_model.proto b/google/ads/googleads/v3/enums/attribution_model.proto new file mode 100644 index 000000000..0d162687c --- /dev/null +++ b/google/ads/googleads/v3/enums/attribution_model.proto @@ -0,0 +1,72 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AttributionModelProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Container for enum representing the attribution model that describes how to +// distribute credit for a particular conversion across potentially many prior +// interactions. +message AttributionModelEnum { + // The attribution model that describes how to distribute credit for a + // particular conversion across potentially many prior interactions. + enum AttributionModel { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Uses external attribution. + EXTERNAL = 100; + + // Attributes all credit for a conversion to its last click. + GOOGLE_ADS_LAST_CLICK = 101; + + // Attributes all credit for a conversion to its first click using Google + // Search attribution. + GOOGLE_SEARCH_ATTRIBUTION_FIRST_CLICK = 102; + + // Attributes credit for a conversion equally across all of its clicks using + // Google Search attribution. + GOOGLE_SEARCH_ATTRIBUTION_LINEAR = 103; + + // Attributes exponentially more credit for a conversion to its more recent + // clicks using Google Search attribution (half-life is 1 week). + GOOGLE_SEARCH_ATTRIBUTION_TIME_DECAY = 104; + + // Attributes 40% of the credit for a conversion to its first and last + // clicks. Remaining 20% is evenly distributed across all other clicks. This + // uses Google Search attribution. + GOOGLE_SEARCH_ATTRIBUTION_POSITION_BASED = 105; + + // Flexible model that uses machine learning to determine the appropriate + // distribution of credit among clicks using Google Search attribution. + GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN = 106; + } + + +} diff --git a/google/ads/googleads/v3/enums/bid_modifier_source.proto b/google/ads/googleads/v3/enums/bid_modifier_source.proto new file mode 100644 index 000000000..08627b4a8 --- /dev/null +++ b/google/ads/googleads/v3/enums/bid_modifier_source.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BidModifierSourceProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing bid modifier source. + +// Container for enum describing possible bid modifier sources. +message BidModifierSourceEnum { + // Enum describing possible bid modifier sources. + enum BidModifierSource { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The bid modifier is specified at the campaign level, on the campaign + // level criterion. + CAMPAIGN = 2; + + // The bid modifier is specified (overridden) at the ad group level. + AD_GROUP = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/bidding_source.proto b/google/ads/googleads/v3/enums/bidding_source.proto new file mode 100644 index 000000000..813926db0 --- /dev/null +++ b/google/ads/googleads/v3/enums/bidding_source.proto @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BiddingSourceProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing bidding sources. + +// Container for enum describing possible bidding sources. +message BiddingSourceEnum { + // Indicates where a bid or target is defined. For example, an ad group + // criterion may define a cpc bid directly, or it can inherit its cpc bid from + // the ad group. + enum BiddingSource { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Effective bid or target is inherited from campaign bidding strategy. + CAMPAIGN_BIDDING_STRATEGY = 5; + + // The bid or target is defined on the ad group. + AD_GROUP = 6; + + // The bid or target is defined on the ad group criterion. + AD_GROUP_CRITERION = 7; + } + + +} diff --git a/google/ads/googleads/v3/enums/bidding_strategy_status.proto b/google/ads/googleads/v3/enums/bidding_strategy_status.proto new file mode 100644 index 000000000..87c8bdcd1 --- /dev/null +++ b/google/ads/googleads/v3/enums/bidding_strategy_status.proto @@ -0,0 +1,52 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BiddingStrategyStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing BiddingStrategy statuses. + +// Message describing BiddingStrategy statuses. +message BiddingStrategyStatusEnum { + // The possible statuses of a BiddingStrategy. + enum BiddingStrategyStatus { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // The bidding strategy is enabled. + ENABLED = 2; + + // The bidding strategy is removed. + REMOVED = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/bidding_strategy_type.proto b/google/ads/googleads/v3/enums/bidding_strategy_type.proto new file mode 100644 index 000000000..192121556 --- /dev/null +++ b/google/ads/googleads/v3/enums/bidding_strategy_type.proto @@ -0,0 +1,110 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BiddingStrategyTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing bidding schemes. + +// Container for enum describing possible bidding strategy types. +message BiddingStrategyTypeEnum { + // Enum describing possible bidding strategy types. + enum BiddingStrategyType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Commission is an automatic bidding strategy in which the advertiser pays + // a certain portion of the conversion value. + COMMISSION = 16; + + // Enhanced CPC is a bidding strategy that raises bids for clicks + // that seem more likely to lead to a conversion and lowers + // them for clicks where they seem less likely. + ENHANCED_CPC = 2; + + // Manual click based bidding where user pays per click. + MANUAL_CPC = 3; + + // Manual impression based bidding + // where user pays per thousand impressions. + MANUAL_CPM = 4; + + // A bidding strategy that pays a configurable amount per video view. + MANUAL_CPV = 13; + + // A bidding strategy that automatically maximizes number of conversions + // given a daily budget. + MAXIMIZE_CONVERSIONS = 10; + + // An automated bidding strategy that automatically sets bids to maximize + // revenue while spending your budget. + MAXIMIZE_CONVERSION_VALUE = 11; + + // Page-One Promoted bidding scheme, which sets max cpc bids to + // target impressions on page one or page one promoted slots on google.com. + // This enum value is deprecated. + PAGE_ONE_PROMOTED = 5; + + // Percent Cpc is bidding strategy where bids are a fraction of the + // advertised price for some good or service. + PERCENT_CPC = 12; + + // Target CPA is an automated bid strategy that sets bids + // to help get as many conversions as possible + // at the target cost-per-acquisition (CPA) you set. + TARGET_CPA = 6; + + // Target CPM is an automated bid strategy that sets bids to help get + // as many impressions as possible at the target cost per one thousand + // impressions (CPM) you set. + TARGET_CPM = 14; + + // An automated bidding strategy that sets bids so that a certain percentage + // of search ads are shown at the top of the first page (or other targeted + // location). + TARGET_IMPRESSION_SHARE = 15; + + // Target Outrank Share is an automated bidding strategy that sets bids + // based on the target fraction of auctions where the advertiser + // should outrank a specific competitor. + // This enum value is deprecated. + TARGET_OUTRANK_SHARE = 7; + + // Target ROAS is an automated bidding strategy + // that helps you maximize revenue while averaging + // a specific target Return On Average Spend (ROAS). + TARGET_ROAS = 8; + + // Target Spend is an automated bid strategy that sets your bids + // to help get as many clicks as possible within your budget. + TARGET_SPEND = 9; + } + + +} diff --git a/google/ads/googleads/v3/enums/billing_setup_status.proto b/google/ads/googleads/v3/enums/billing_setup_status.proto new file mode 100644 index 000000000..f2084bbca --- /dev/null +++ b/google/ads/googleads/v3/enums/billing_setup_status.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BillingSetupStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing BillingSetup statuses. + +// Message describing BillingSetup statuses. +message BillingSetupStatusEnum { + // The possible statuses of a BillingSetup. + enum BillingSetupStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The billing setup is pending approval. + PENDING = 2; + + // The billing setup has been approved but the corresponding first budget + // has not. This can only occur for billing setups configured for monthly + // invoicing. + APPROVED_HELD = 3; + + // The billing setup has been approved. + APPROVED = 4; + + // The billing setup was cancelled by the user prior to approval. + CANCELLED = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/brand_safety_suitability.proto b/google/ads/googleads/v3/enums/brand_safety_suitability.proto new file mode 100644 index 000000000..d083fc6d9 --- /dev/null +++ b/google/ads/googleads/v3/enums/brand_safety_suitability.proto @@ -0,0 +1,73 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BrandSafetySuitabilityProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing brand safety suitability settings. + +// Container for enum with 3-Tier brand safety suitability control. +message BrandSafetySuitabilityEnum { + // 3-Tier brand safety suitability control. + enum BrandSafetySuitability { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // This option lets you show ads across all inventory on YouTube and video + // partners that meet our standards for monetization. This option may be an + // appropriate choice for brands that want maximum access to the full + // breadth of videos eligible for ads, including, for example, videos that + // have strong profanity in the context of comedy or a documentary, or + // excessive violence as featured in video games. + EXPANDED_INVENTORY = 2; + + // This option lets you show ads across a wide range of content that's + // appropriate for most brands, such as popular music videos, documentaries, + // and movie trailers. The content you can show ads on is based on YouTube's + // advertiser-friendly content guidelines that take into account, for + // example, the strength or frequency of profanity, or the appropriateness + // of subject matter like sensitive events. Ads won't show, for example, on + // content with repeated strong profanity, strong sexual content, or graphic + // violence. + STANDARD_INVENTORY = 3; + + // This option lets you show ads on a reduced range of content that's + // appropriate for brands with particularly strict guidelines around + // inappropriate language and sexual suggestiveness; above and beyond what + // YouTube's advertiser-friendly content guidelines address. The videos + // accessible in this sensitive category meet heightened requirements, + // especially for inappropriate language and sexual suggestiveness. For + // example, your ads will be excluded from showing on some of YouTube's most + // popular music videos and other pop culture content across YouTube and + // Google video partners. + LIMITED_INVENTORY = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/budget_delivery_method.proto b/google/ads/googleads/v3/enums/budget_delivery_method.proto new file mode 100644 index 000000000..4fd6bee2e --- /dev/null +++ b/google/ads/googleads/v3/enums/budget_delivery_method.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BudgetDeliveryMethodProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Budget delivery methods. + +// Message describing Budget delivery methods. A delivery method determines the +// rate at which the Budget is spent. +message BudgetDeliveryMethodEnum { + // Possible delivery methods of a Budget. + enum BudgetDeliveryMethod { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The budget server will throttle serving evenly across + // the entire time period. + STANDARD = 2; + + // The budget server will not throttle serving, + // and ads will serve as fast as possible. + ACCELERATED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/budget_period.proto b/google/ads/googleads/v3/enums/budget_period.proto new file mode 100644 index 000000000..440d048ad --- /dev/null +++ b/google/ads/googleads/v3/enums/budget_period.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BudgetPeriodProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Budget delivery methods. + +// Message describing Budget period. +message BudgetPeriodEnum { + // Possible period of a Budget. + enum BudgetPeriod { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Daily budget. + DAILY = 2; + } + + +} diff --git a/google/ads/googleads/v3/enums/budget_status.proto b/google/ads/googleads/v3/enums/budget_status.proto new file mode 100644 index 000000000..c9a85146c --- /dev/null +++ b/google/ads/googleads/v3/enums/budget_status.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BudgetStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Budget statuses + +// Message describing a Budget status +message BudgetStatusEnum { + // Possible statuses of a Budget. + enum BudgetStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Budget is enabled. + ENABLED = 2; + + // Budget is removed. + REMOVED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/budget_type.proto b/google/ads/googleads/v3/enums/budget_type.proto new file mode 100644 index 000000000..8538fcc74 --- /dev/null +++ b/google/ads/googleads/v3/enums/budget_type.proto @@ -0,0 +1,66 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BudgetTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Budget types. + +// Describes Budget types. +message BudgetTypeEnum { + // Possible Budget types. + enum BudgetType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Budget type for standard Google Ads usage. + // Caps daily spend at two times the specified budget amount. + // Full details: https://support.google.com/google-ads/answer/6385083 + STANDARD = 2; + + // Budget type for Hotels Ads commission program. + // Full details: https://support.google.com/google-ads/answer/9243945 + // + // This type is only supported by campaigns with + // AdvertisingChannelType.HOTEL, BiddingStrategyType.COMMISSION and + // PaymentMode.CONVERSION_VALUE. + HOTEL_ADS_COMMISSION = 3; + + // Budget type with a fixed cost-per-acquisition (conversion). + // Full details: https://support.google.com/google-ads/answer/7528254 + // + // This type is only supported by campaigns with + // AdvertisingChannelType.DISPLAY (excluding + // AdvertisingChannelSubType.DISPLAY_GMAIL), + // BiddingStrategyType.TARGET_CPA and PaymentMode.CONVERSIONS. + FIXED_CPA = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/call_conversion_reporting_state.proto b/google/ads/googleads/v3/enums/call_conversion_reporting_state.proto new file mode 100644 index 000000000..1d1d0aba3 --- /dev/null +++ b/google/ads/googleads/v3/enums/call_conversion_reporting_state.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CallConversionReportingStateProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing call conversion reporting state. + +// Container for enum describing possible data types for call conversion +// reporting state. +message CallConversionReportingStateEnum { + // Possible data types for a call conversion action state. + enum CallConversionReportingState { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Call conversion action is disabled. + DISABLED = 2; + + // Call conversion action will use call conversion type set at the + // account level. + USE_ACCOUNT_LEVEL_CALL_CONVERSION_ACTION = 3; + + // Call conversion action will use call conversion type set at the resource + // (call only ads/call extensions) level. + USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/call_placeholder_field.proto b/google/ads/googleads/v3/enums/call_placeholder_field.proto new file mode 100644 index 000000000..58e024959 --- /dev/null +++ b/google/ads/googleads/v3/enums/call_placeholder_field.proto @@ -0,0 +1,66 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CallPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Call placeholder fields. + +// Values for Call placeholder fields. +message CallPlaceholderFieldEnum { + // Possible values for Call placeholder fields. + enum CallPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. The advertiser's phone number to append to the ad. + PHONE_NUMBER = 2; + + // Data Type: STRING. Uppercase two-letter country code of the advertiser's + // phone number. + COUNTRY_CODE = 3; + + // Data Type: BOOLEAN. Indicates whether call tracking is enabled. Default: + // true. + TRACKED = 4; + + // Data Type: INT64. The ID of an AdCallMetricsConversion object. This + // object contains the phoneCallDurationfield which is the minimum duration + // (in seconds) of a call to be considered a conversion. + CONVERSION_TYPE_ID = 5; + + // Data Type: STRING. Indicates whether this call extension uses its own + // call conversion setting or follows the account level setting. + // Valid values are: USE_ACCOUNT_LEVEL_CALL_CONVERSION_ACTION and + // USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION. + CONVERSION_REPORTING_STATE = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/callout_placeholder_field.proto b/google/ads/googleads/v3/enums/callout_placeholder_field.proto new file mode 100644 index 000000000..49f0cb55b --- /dev/null +++ b/google/ads/googleads/v3/enums/callout_placeholder_field.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CalloutPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Callout placeholder fields. + +// Values for Callout placeholder fields. +message CalloutPlaceholderFieldEnum { + // Possible values for Callout placeholder fields. + enum CalloutPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. Callout text. + CALLOUT_TEXT = 2; + } + + +} diff --git a/google/ads/googleads/v3/enums/campaign_criterion_status.proto b/google/ads/googleads/v3/enums/campaign_criterion_status.proto new file mode 100644 index 000000000..8539b12f8 --- /dev/null +++ b/google/ads/googleads/v3/enums/campaign_criterion_status.proto @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignCriterionStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing CampaignCriterion statuses. + +// Message describing CampaignCriterion statuses. +message CampaignCriterionStatusEnum { + // The possible statuses of a CampaignCriterion. + enum CampaignCriterionStatus { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // The campaign criterion is enabled. + ENABLED = 2; + + // The campaign criterion is paused. + PAUSED = 3; + + // The campaign criterion is removed. + REMOVED = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/campaign_draft_status.proto b/google/ads/googleads/v3/enums/campaign_draft_status.proto new file mode 100644 index 000000000..378068b37 --- /dev/null +++ b/google/ads/googleads/v3/enums/campaign_draft_status.proto @@ -0,0 +1,65 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignDraftStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing campaign draft status. + +// Container for enum describing possible statuses of a campaign draft. +message CampaignDraftStatusEnum { + // Possible statuses of a campaign draft. + enum CampaignDraftStatus { + // The status has not been specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Initial state of the draft, the advertiser can start adding changes with + // no effect on serving. + PROPOSED = 2; + + // The campaign draft is removed. + REMOVED = 3; + + // Advertiser requested to promote draft's changes back into the original + // campaign. Advertiser can poll the long running operation returned by + // the promote action to see the status of the promotion. + PROMOTING = 5; + + // The process to merge changes in the draft back to the original campaign + // has completed successfully. + PROMOTED = 4; + + // The promotion failed after it was partially applied. Promote cannot be + // attempted again safely, so the issue must be corrected in the original + // campaign. + PROMOTE_FAILED = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/campaign_experiment_status.proto b/google/ads/googleads/v3/enums/campaign_experiment_status.proto new file mode 100644 index 000000000..6d21682bd --- /dev/null +++ b/google/ads/googleads/v3/enums/campaign_experiment_status.proto @@ -0,0 +1,77 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExperimentStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing campaign experiment status. + +// Container for enum describing possible statuses of a campaign experiment. +message CampaignExperimentStatusEnum { + // Possible statuses of a campaign experiment. + enum CampaignExperimentStatus { + // The status has not been specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The experiment campaign is being initialized. + INITIALIZING = 2; + + // Initialization of the experiment campaign failed. + INITIALIZATION_FAILED = 8; + + // The experiment campaign is fully initialized. The experiment is currently + // running, scheduled to run in the future or has ended based on its + // end date. An experiment with the status INITIALIZING will be updated to + // ENABLED when it is fully created. + ENABLED = 3; + + // The experiment campaign was graduated to a stand-alone + // campaign, existing independently of the experiment. + GRADUATED = 4; + + // The experiment is removed. + REMOVED = 5; + + // The experiment's changes are being applied to the original campaign. + // The long running operation returned by the promote method can be polled + // to see the status of the promotion. + PROMOTING = 6; + + // Promote of the experiment campaign failed. + PROMOTION_FAILED = 9; + + // The changes of the experiment are promoted to their original campaign. + PROMOTED = 7; + + // The experiment was ended manually. It did not end based on its end date. + ENDED_MANUALLY = 10; + } + + +} diff --git a/google/ads/googleads/v3/enums/campaign_experiment_traffic_split_type.proto b/google/ads/googleads/v3/enums/campaign_experiment_traffic_split_type.proto new file mode 100644 index 000000000..a4514903e --- /dev/null +++ b/google/ads/googleads/v3/enums/campaign_experiment_traffic_split_type.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExperimentTrafficSplitTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing campaign experiment traffic split type. + +// Container for enum describing campaign experiment traffic split type. +message CampaignExperimentTrafficSplitTypeEnum { + // Enum of strategies for splitting traffic between base and experiment + // campaigns in campaign experiment. + enum CampaignExperimentTrafficSplitType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Traffic is randomly assigned to the base or experiment arm for each + // query, independent of previous assignments for the same user. + RANDOM_QUERY = 2; + + // Traffic is split using cookies to keep users in the same arm (base or + // experiment) of the experiment. + COOKIE = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/campaign_experiment_type.proto b/google/ads/googleads/v3/enums/campaign_experiment_type.proto new file mode 100644 index 000000000..7d5ea246e --- /dev/null +++ b/google/ads/googleads/v3/enums/campaign_experiment_type.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExperimentTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing campaign experiment type. + +// Container for enum describing campaign experiment type. +message CampaignExperimentTypeEnum { + // Indicates if this campaign is a normal campaign, + // a draft campaign, or an experiment campaign. + enum CampaignExperimentType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // This is a regular campaign. + BASE = 2; + + // This is a draft version of a campaign. + // It has some modifications from a base campaign, + // but it does not serve or accrue metrics. + DRAFT = 3; + + // This is an experiment version of a campaign. + // It has some modifications from a base campaign, + // and a percentage of traffic is being diverted + // from the BASE campaign to this experiment campaign. + EXPERIMENT = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/campaign_serving_status.proto b/google/ads/googleads/v3/enums/campaign_serving_status.proto new file mode 100644 index 000000000..59f20a92f --- /dev/null +++ b/google/ads/googleads/v3/enums/campaign_serving_status.proto @@ -0,0 +1,61 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignServingStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Campaign serving statuses. + +// Message describing Campaign serving statuses. +message CampaignServingStatusEnum { + // Possible serving statuses of a campaign. + enum CampaignServingStatus { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // Serving. + SERVING = 2; + + // None. + NONE = 3; + + // Ended. + ENDED = 4; + + // Pending. + PENDING = 5; + + // Suspended. + SUSPENDED = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/campaign_shared_set_status.proto b/google/ads/googleads/v3/enums/campaign_shared_set_status.proto new file mode 100644 index 000000000..348326d3c --- /dev/null +++ b/google/ads/googleads/v3/enums/campaign_shared_set_status.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignSharedSetStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing campaign shared set statuses. + +// Container for enum describing types of campaign shared set statuses. +message CampaignSharedSetStatusEnum { + // Enum listing the possible campaign shared set statuses. + enum CampaignSharedSetStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The campaign shared set is enabled. + ENABLED = 2; + + // The campaign shared set is removed and can no longer be used. + REMOVED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/campaign_status.proto b/google/ads/googleads/v3/enums/campaign_status.proto new file mode 100644 index 000000000..6cc32f61b --- /dev/null +++ b/google/ads/googleads/v3/enums/campaign_status.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing campaign status. + +// Container for enum describing possible statuses of a campaign. +message CampaignStatusEnum { + // Possible statuses of a campaign. + enum CampaignStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Campaign is currently serving ads depending on budget information. + ENABLED = 2; + + // Campaign has been paused by the user. + PAUSED = 3; + + // Campaign has been removed. + REMOVED = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/change_status_operation.proto b/google/ads/googleads/v3/enums/change_status_operation.proto new file mode 100644 index 000000000..7b5f4a53e --- /dev/null +++ b/google/ads/googleads/v3/enums/change_status_operation.proto @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ChangeStatusOperationProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing the change status operations. + +// Container for enum describing operations for the ChangeStatus resource. +message ChangeStatusOperationEnum { + // Status of the changed resource + enum ChangeStatusOperation { + // No value has been specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents an unclassified resource unknown + // in this version. + UNKNOWN = 1; + + // The resource was created. + ADDED = 2; + + // The resource was modified. + CHANGED = 3; + + // The resource was removed. + REMOVED = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/change_status_resource_type.proto b/google/ads/googleads/v3/enums/change_status_resource_type.proto new file mode 100644 index 000000000..b760d4d03 --- /dev/null +++ b/google/ads/googleads/v3/enums/change_status_resource_type.proto @@ -0,0 +1,76 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ChangeStatusResourceTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing the resource types the ChangeStatus resource supports. + +// Container for enum describing supported resource types for the ChangeStatus +// resource. +message ChangeStatusResourceTypeEnum { + // Enum listing the resource types support by the ChangeStatus resource. + enum ChangeStatusResourceType { + // No value has been specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents an unclassified resource unknown + // in this version. + UNKNOWN = 1; + + // An AdGroup resource change. + AD_GROUP = 3; + + // An AdGroupAd resource change. + AD_GROUP_AD = 4; + + // An AdGroupCriterion resource change. + AD_GROUP_CRITERION = 5; + + // A Campaign resource change. + CAMPAIGN = 6; + + // A CampaignCriterion resource change. + CAMPAIGN_CRITERION = 7; + + // A Feed resource change. + FEED = 9; + + // A FeedItem resource change. + FEED_ITEM = 10; + + // An AdGroupFeed resource change. + AD_GROUP_FEED = 11; + + // A CampaignFeed resource change. + CAMPAIGN_FEED = 12; + + // An AdGroupBidModifier resource change. + AD_GROUP_BID_MODIFIER = 13; + } + + +} diff --git a/google/ads/googleads/v3/enums/click_type.proto b/google/ads/googleads/v3/enums/click_type.proto new file mode 100644 index 000000000..e5dec52c2 --- /dev/null +++ b/google/ads/googleads/v3/enums/click_type.proto @@ -0,0 +1,203 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ClickTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing click types. + +// Container for enumeration of Google Ads click types. +message ClickTypeEnum { + // Enumerates Google Ads click types. + enum ClickType { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // App engagement ad deep link. + APP_DEEPLINK = 2; + + // Breadcrumbs. + BREADCRUMBS = 3; + + // Broadband Plan. + BROADBAND_PLAN = 4; + + // Manually dialed phone calls. + CALL_TRACKING = 5; + + // Phone calls. + CALLS = 6; + + // Click on engagement ad. + CLICK_ON_ENGAGEMENT_AD = 7; + + // Driving direction. + GET_DIRECTIONS = 8; + + // Get location details. + LOCATION_EXPANSION = 9; + + // Call. + LOCATION_FORMAT_CALL = 10; + + // Directions. + LOCATION_FORMAT_DIRECTIONS = 11; + + // Image(s). + LOCATION_FORMAT_IMAGE = 12; + + // Go to landing page. + LOCATION_FORMAT_LANDING_PAGE = 13; + + // Map. + LOCATION_FORMAT_MAP = 14; + + // Go to store info. + LOCATION_FORMAT_STORE_INFO = 15; + + // Text. + LOCATION_FORMAT_TEXT = 16; + + // Mobile phone calls. + MOBILE_CALL_TRACKING = 17; + + // Print offer. + OFFER_PRINTS = 18; + + // Other. + OTHER = 19; + + // Product plusbox offer. + PRODUCT_EXTENSION_CLICKS = 20; + + // Shopping - Product - Online. + PRODUCT_LISTING_AD_CLICKS = 21; + + // Sitelink. + SITELINKS = 22; + + // Show nearby locations. + STORE_LOCATOR = 23; + + // Headline. + URL_CLICKS = 25; + + // App store. + VIDEO_APP_STORE_CLICKS = 26; + + // Call-to-Action overlay. + VIDEO_CALL_TO_ACTION_CLICKS = 27; + + // Cards. + VIDEO_CARD_ACTION_HEADLINE_CLICKS = 28; + + // End cap. + VIDEO_END_CAP_CLICKS = 29; + + // Website. + VIDEO_WEBSITE_CLICKS = 30; + + // Visual Sitelinks. + VISUAL_SITELINKS = 31; + + // Wireless Plan. + WIRELESS_PLAN = 32; + + // Shopping - Product - Local. + PRODUCT_LISTING_AD_LOCAL = 33; + + // Shopping - Product - MultiChannel Local. + PRODUCT_LISTING_AD_MULTICHANNEL_LOCAL = 34; + + // Shopping - Product - MultiChannel Online. + PRODUCT_LISTING_AD_MULTICHANNEL_ONLINE = 35; + + // Shopping - Product - Coupon. + PRODUCT_LISTING_ADS_COUPON = 36; + + // Shopping - Product - Sell on Google. + PRODUCT_LISTING_AD_TRANSACTABLE = 37; + + // Shopping - Product - App engagement ad deep link. + PRODUCT_AD_APP_DEEPLINK = 38; + + // Shopping - Showcase - Category. + SHOWCASE_AD_CATEGORY_LINK = 39; + + // Shopping - Showcase - Local storefront. + SHOWCASE_AD_LOCAL_STOREFRONT_LINK = 40; + + // Shopping - Showcase - Online product. + SHOWCASE_AD_ONLINE_PRODUCT_LINK = 42; + + // Shopping - Showcase - Local product. + SHOWCASE_AD_LOCAL_PRODUCT_LINK = 43; + + // Promotion Extension. + PROMOTION_EXTENSION = 44; + + // Ad Headline. + SWIPEABLE_GALLERY_AD_HEADLINE = 45; + + // Swipes. + SWIPEABLE_GALLERY_AD_SWIPES = 46; + + // See More. + SWIPEABLE_GALLERY_AD_SEE_MORE = 47; + + // Sitelink 1. + SWIPEABLE_GALLERY_AD_SITELINK_ONE = 48; + + // Sitelink 2. + SWIPEABLE_GALLERY_AD_SITELINK_TWO = 49; + + // Sitelink 3. + SWIPEABLE_GALLERY_AD_SITELINK_THREE = 50; + + // Sitelink 4. + SWIPEABLE_GALLERY_AD_SITELINK_FOUR = 51; + + // Sitelink 5. + SWIPEABLE_GALLERY_AD_SITELINK_FIVE = 52; + + // Hotel price. + HOTEL_PRICE = 53; + + // Price Extension. + PRICE_EXTENSION = 54; + + // Book on Google hotel room selection. + HOTEL_BOOK_ON_GOOGLE_ROOM_SELECTION = 55; + + // Shopping - Comparison Listing. + SHOPPING_COMPARISON_LISTING = 56; + } + + +} diff --git a/google/ads/googleads/v3/enums/content_label_type.proto b/google/ads/googleads/v3/enums/content_label_type.proto new file mode 100644 index 000000000..53a122695 --- /dev/null +++ b/google/ads/googleads/v3/enums/content_label_type.proto @@ -0,0 +1,89 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ContentLabelTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing content label types. + +// Container for enum describing content label types in ContentLabel. +message ContentLabelTypeEnum { + // Enum listing the content label types supported by ContentLabel criterion. + enum ContentLabelType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Sexually suggestive content. + SEXUALLY_SUGGESTIVE = 2; + + // Below the fold placement. + BELOW_THE_FOLD = 3; + + // Parked domain. + PARKED_DOMAIN = 4; + + // Juvenile, gross & bizarre content. + JUVENILE = 6; + + // Profanity & rough language. + PROFANITY = 7; + + // Death & tragedy. + TRAGEDY = 8; + + // Video. + VIDEO = 9; + + // Content rating: G. + VIDEO_RATING_DV_G = 10; + + // Content rating: PG. + VIDEO_RATING_DV_PG = 11; + + // Content rating: T. + VIDEO_RATING_DV_T = 12; + + // Content rating: MA. + VIDEO_RATING_DV_MA = 13; + + // Content rating: not yet rated. + VIDEO_NOT_YET_RATED = 14; + + // Embedded video. + EMBEDDED_VIDEO = 15; + + // Live streaming video. + LIVE_STREAMING_VIDEO = 16; + + // Sensitive social issues. + SOCIAL_ISSUES = 17; + } + + +} diff --git a/google/ads/googleads/v3/enums/conversion_action_category.proto b/google/ads/googleads/v3/enums/conversion_action_category.proto new file mode 100644 index 000000000..ef4127e9c --- /dev/null +++ b/google/ads/googleads/v3/enums/conversion_action_category.proto @@ -0,0 +1,106 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionCategoryProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Container for enum describing the category of conversions that are associated +// with a ConversionAction. +message ConversionActionCategoryEnum { + // The category of conversions that are associated with a ConversionAction. + enum ConversionActionCategory { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Default category. + DEFAULT = 2; + + // User visiting a page. + PAGE_VIEW = 3; + + // Purchase, sales, or "order placed" event. + PURCHASE = 4; + + // Signup user action. + SIGNUP = 5; + + // Lead-generating action. + LEAD = 6; + + // Software download action (as for an app). + DOWNLOAD = 7; + + // The addition of items to a shopping cart or bag on an advertiser site. + ADD_TO_CART = 8; + + // When someone enters the checkout flow on an advertiser site. + BEGIN_CHECKOUT = 9; + + // The start of a paid subscription for a product or service. + SUBSCRIBE_PAID = 10; + + // A call to indicate interest in an advertiser's offering. + PHONE_CALL_LEAD = 11; + + // A lead conversion imported from an external source into Google Ads. + IMPORTED_LEAD = 12; + + // A submission of a form on an advertiser site indicating business + // interest. + SUBMIT_LEAD_FORM = 13; + + // A booking of an appointment with an advertiser's business. + BOOK_APPOINTMENT = 14; + + // A quote or price estimate request. + REQUEST_QUOTE = 15; + + // A search for an advertiser's business location with intention to visit. + GET_DIRECTIONS = 16; + + // A click to an advertiser's partner's site. + OUTBOUND_CLICK = 17; + + // A call, SMS, email, chat or other type of contact to an advertiser. + CONTACT = 18; + + // A website engagement event such as long site time or a Google Analytics + // (GA) Smart Goal. Intended to be used for GA, Firebase, GA Gold goal + // imports. + ENGAGEMENT = 19; + + // A visit to a physical store location. + STORE_VISIT = 20; + + // A sale occurring in a physical store. + STORE_SALE = 21; + } + + +} diff --git a/google/ads/googleads/v3/enums/conversion_action_counting_type.proto b/google/ads/googleads/v3/enums/conversion_action_counting_type.proto new file mode 100644 index 000000000..a2721fece --- /dev/null +++ b/google/ads/googleads/v3/enums/conversion_action_counting_type.proto @@ -0,0 +1,52 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionCountingTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing conversion action counting type. + +// Container for enum describing the conversion deduplication mode for +// conversion optimizer. +message ConversionActionCountingTypeEnum { + // Indicates how conversions for this action will be counted. For more + // information, see https://support.google.com/google-ads/answer/3438531. + enum ConversionActionCountingType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Count only one conversion per click. + ONE_PER_CLICK = 2; + + // Count all conversions per click. + MANY_PER_CLICK = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/conversion_action_status.proto b/google/ads/googleads/v3/enums/conversion_action_status.proto new file mode 100644 index 000000000..c30e95816 --- /dev/null +++ b/google/ads/googleads/v3/enums/conversion_action_status.proto @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing conversion action status. + +// Container for enum describing possible statuses of a conversion action. +message ConversionActionStatusEnum { + // Possible statuses of a conversion action. + enum ConversionActionStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Conversions will be recorded. + ENABLED = 2; + + // Conversions will not be recorded. + REMOVED = 3; + + // Conversions will not be recorded and the conversion action will not + // appear in the UI. + HIDDEN = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/conversion_action_type.proto b/google/ads/googleads/v3/enums/conversion_action_type.proto new file mode 100644 index 000000000..70878cb9a --- /dev/null +++ b/google/ads/googleads/v3/enums/conversion_action_type.proto @@ -0,0 +1,73 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing conversion action type. + +// Container for enum describing possible types of a conversion action. +message ConversionActionTypeEnum { + // Possible types of a conversion action. + enum ConversionActionType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Conversions that occur when a user clicks on an ad's call extension. + AD_CALL = 2; + + // Conversions that occur when a user on a mobile device clicks a phone + // number. + CLICK_TO_CALL = 3; + + // Conversions that occur when a user downloads a mobile app from the Google + // Play Store. + GOOGLE_PLAY_DOWNLOAD = 4; + + // Conversions that occur when a user makes a purchase in an app through + // Android billing. + GOOGLE_PLAY_IN_APP_PURCHASE = 5; + + // Call conversions that are tracked by the advertiser and uploaded. + UPLOAD_CALLS = 6; + + // Conversions that are tracked by the advertiser and uploaded with + // attributed clicks. + UPLOAD_CLICKS = 7; + + // Conversions that occur on a webpage. + WEBPAGE = 8; + + // Conversions that occur when a user calls a dynamically-generated phone + // number from an advertiser's website. + WEBSITE_CALL = 9; + } + + +} diff --git a/google/ads/googleads/v3/enums/conversion_adjustment_type.proto b/google/ads/googleads/v3/enums/conversion_adjustment_type.proto new file mode 100644 index 000000000..e225309e6 --- /dev/null +++ b/google/ads/googleads/v3/enums/conversion_adjustment_type.proto @@ -0,0 +1,52 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionAdjustmentTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing conversion adjustment type. + +// Container for enum describing conversion adjustment types. +message ConversionAdjustmentTypeEnum { + // The different actions advertisers can take to adjust the conversions that + // they already reported. Retractions negate a conversion. Restatements change + // the value of a conversion. + enum ConversionAdjustmentType { + // Not specified. + UNSPECIFIED = 0; + + // Represents value unknown in this version. + UNKNOWN = 1; + + // Negates a conversion so that its total value and count are both zero. + RETRACTION = 2; + + // Changes the value of a conversion. + RESTATEMENT = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/conversion_attribution_event_type.proto b/google/ads/googleads/v3/enums/conversion_attribution_event_type.proto new file mode 100644 index 000000000..fe02d9424 --- /dev/null +++ b/google/ads/googleads/v3/enums/conversion_attribution_event_type.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionAttributionEventTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Container for enum indicating the event type the conversion is attributed to. +message ConversionAttributionEventTypeEnum { + // The event type of conversions that are attributed to. + enum ConversionAttributionEventType { + // Not specified. + UNSPECIFIED = 0; + + // Represents value unknown in this version. + UNKNOWN = 1; + + // The conversion is attributed to an impression. + IMPRESSION = 2; + + // The conversion is attributed to an interaction. + INTERACTION = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/conversion_lag_bucket.proto b/google/ads/googleads/v3/enums/conversion_lag_bucket.proto new file mode 100644 index 000000000..2f446381e --- /dev/null +++ b/google/ads/googleads/v3/enums/conversion_lag_bucket.proto @@ -0,0 +1,117 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionLagBucketProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Container for enum representing the number of days between impression and +// conversion. +message ConversionLagBucketEnum { + // Enum representing the number of days between impression and conversion. + enum ConversionLagBucket { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Conversion lag bucket from 0 to 1 day. 0 day is included, 1 day is not. + LESS_THAN_ONE_DAY = 2; + + // Conversion lag bucket from 1 to 2 days. 1 day is included, 2 days is not. + ONE_TO_TWO_DAYS = 3; + + // Conversion lag bucket from 2 to 3 days. 2 days is included, + // 3 days is not. + TWO_TO_THREE_DAYS = 4; + + // Conversion lag bucket from 3 to 4 days. 3 days is included, + // 4 days is not. + THREE_TO_FOUR_DAYS = 5; + + // Conversion lag bucket from 4 to 5 days. 4 days is included, + // 5 days is not. + FOUR_TO_FIVE_DAYS = 6; + + // Conversion lag bucket from 5 to 6 days. 5 days is included, + // 6 days is not. + FIVE_TO_SIX_DAYS = 7; + + // Conversion lag bucket from 6 to 7 days. 6 days is included, + // 7 days is not. + SIX_TO_SEVEN_DAYS = 8; + + // Conversion lag bucket from 7 to 8 days. 7 days is included, + // 8 days is not. + SEVEN_TO_EIGHT_DAYS = 9; + + // Conversion lag bucket from 8 to 9 days. 8 days is included, + // 9 days is not. + EIGHT_TO_NINE_DAYS = 10; + + // Conversion lag bucket from 9 to 10 days. 9 days is included, + // 10 days is not. + NINE_TO_TEN_DAYS = 11; + + // Conversion lag bucket from 10 to 11 days. 10 days is included, + // 11 days is not. + TEN_TO_ELEVEN_DAYS = 12; + + // Conversion lag bucket from 11 to 12 days. 11 days is included, + // 12 days is not. + ELEVEN_TO_TWELVE_DAYS = 13; + + // Conversion lag bucket from 12 to 13 days. 12 days is included, + // 13 days is not. + TWELVE_TO_THIRTEEN_DAYS = 14; + + // Conversion lag bucket from 13 to 14 days. 13 days is included, + // 14 days is not. + THIRTEEN_TO_FOURTEEN_DAYS = 15; + + // Conversion lag bucket from 14 to 21 days. 14 days is included, + // 21 days is not. + FOURTEEN_TO_TWENTY_ONE_DAYS = 16; + + // Conversion lag bucket from 21 to 30 days. 21 days is included, + // 30 days is not. + TWENTY_ONE_TO_THIRTY_DAYS = 17; + + // Conversion lag bucket from 30 to 45 days. 30 days is included, + // 45 days is not. + THIRTY_TO_FORTY_FIVE_DAYS = 18; + + // Conversion lag bucket from 45 to 60 days. 45 days is included, + // 60 days is not. + FORTY_FIVE_TO_SIXTY_DAYS = 19; + + // Conversion lag bucket from 60 to 90 days. 60 days is included, + // 90 days is not. + SIXTY_TO_NINETY_DAYS = 20; + } + + +} diff --git a/google/ads/googleads/v3/enums/conversion_or_adjustment_lag_bucket.proto b/google/ads/googleads/v3/enums/conversion_or_adjustment_lag_bucket.proto new file mode 100644 index 000000000..48d49728f --- /dev/null +++ b/google/ads/googleads/v3/enums/conversion_or_adjustment_lag_bucket.proto @@ -0,0 +1,206 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionOrAdjustmentLagBucketProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Container for enum representing the number of days between the impression and +// the conversion or between the impression and adjustments to the conversion. +message ConversionOrAdjustmentLagBucketEnum { + // Enum representing the number of days between the impression and the + // conversion or between the impression and adjustments to the conversion. + enum ConversionOrAdjustmentLagBucket { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Conversion lag bucket from 0 to 1 day. 0 day is included, 1 day is not. + CONVERSION_LESS_THAN_ONE_DAY = 2; + + // Conversion lag bucket from 1 to 2 days. 1 day is included, 2 days is not. + CONVERSION_ONE_TO_TWO_DAYS = 3; + + // Conversion lag bucket from 2 to 3 days. 2 days is included, + // 3 days is not. + CONVERSION_TWO_TO_THREE_DAYS = 4; + + // Conversion lag bucket from 3 to 4 days. 3 days is included, + // 4 days is not. + CONVERSION_THREE_TO_FOUR_DAYS = 5; + + // Conversion lag bucket from 4 to 5 days. 4 days is included, + // 5 days is not. + CONVERSION_FOUR_TO_FIVE_DAYS = 6; + + // Conversion lag bucket from 5 to 6 days. 5 days is included, + // 6 days is not. + CONVERSION_FIVE_TO_SIX_DAYS = 7; + + // Conversion lag bucket from 6 to 7 days. 6 days is included, + // 7 days is not. + CONVERSION_SIX_TO_SEVEN_DAYS = 8; + + // Conversion lag bucket from 7 to 8 days. 7 days is included, + // 8 days is not. + CONVERSION_SEVEN_TO_EIGHT_DAYS = 9; + + // Conversion lag bucket from 8 to 9 days. 8 days is included, + // 9 days is not. + CONVERSION_EIGHT_TO_NINE_DAYS = 10; + + // Conversion lag bucket from 9 to 10 days. 9 days is included, + // 10 days is not. + CONVERSION_NINE_TO_TEN_DAYS = 11; + + // Conversion lag bucket from 10 to 11 days. 10 days is included, + // 11 days is not. + CONVERSION_TEN_TO_ELEVEN_DAYS = 12; + + // Conversion lag bucket from 11 to 12 days. 11 days is included, + // 12 days is not. + CONVERSION_ELEVEN_TO_TWELVE_DAYS = 13; + + // Conversion lag bucket from 12 to 13 days. 12 days is included, + // 13 days is not. + CONVERSION_TWELVE_TO_THIRTEEN_DAYS = 14; + + // Conversion lag bucket from 13 to 14 days. 13 days is included, + // 14 days is not. + CONVERSION_THIRTEEN_TO_FOURTEEN_DAYS = 15; + + // Conversion lag bucket from 14 to 21 days. 14 days is included, + // 21 days is not. + CONVERSION_FOURTEEN_TO_TWENTY_ONE_DAYS = 16; + + // Conversion lag bucket from 21 to 30 days. 21 days is included, + // 30 days is not. + CONVERSION_TWENTY_ONE_TO_THIRTY_DAYS = 17; + + // Conversion lag bucket from 30 to 45 days. 30 days is included, + // 45 days is not. + CONVERSION_THIRTY_TO_FORTY_FIVE_DAYS = 18; + + // Conversion lag bucket from 45 to 60 days. 45 days is included, + // 60 days is not. + CONVERSION_FORTY_FIVE_TO_SIXTY_DAYS = 19; + + // Conversion lag bucket from 60 to 90 days. 60 days is included, + // 90 days is not. + CONVERSION_SIXTY_TO_NINETY_DAYS = 20; + + // Conversion adjustment lag bucket from 0 to 1 day. 0 day is included, + // 1 day is not. + ADJUSTMENT_LESS_THAN_ONE_DAY = 21; + + // Conversion adjustment lag bucket from 1 to 2 days. 1 day is included, + // 2 days is not. + ADJUSTMENT_ONE_TO_TWO_DAYS = 22; + + // Conversion adjustment lag bucket from 2 to 3 days. 2 days is included, + // 3 days is not. + ADJUSTMENT_TWO_TO_THREE_DAYS = 23; + + // Conversion adjustment lag bucket from 3 to 4 days. 3 days is included, + // 4 days is not. + ADJUSTMENT_THREE_TO_FOUR_DAYS = 24; + + // Conversion adjustment lag bucket from 4 to 5 days. 4 days is included, + // 5 days is not. + ADJUSTMENT_FOUR_TO_FIVE_DAYS = 25; + + // Conversion adjustment lag bucket from 5 to 6 days. 5 days is included, + // 6 days is not. + ADJUSTMENT_FIVE_TO_SIX_DAYS = 26; + + // Conversion adjustment lag bucket from 6 to 7 days. 6 days is included, + // 7 days is not. + ADJUSTMENT_SIX_TO_SEVEN_DAYS = 27; + + // Conversion adjustment lag bucket from 7 to 8 days. 7 days is included, + // 8 days is not. + ADJUSTMENT_SEVEN_TO_EIGHT_DAYS = 28; + + // Conversion adjustment lag bucket from 8 to 9 days. 8 days is included, + // 9 days is not. + ADJUSTMENT_EIGHT_TO_NINE_DAYS = 29; + + // Conversion adjustment lag bucket from 9 to 10 days. 9 days is included, + // 10 days is not. + ADJUSTMENT_NINE_TO_TEN_DAYS = 30; + + // Conversion adjustment lag bucket from 10 to 11 days. 10 days is included, + // 11 days is not. + ADJUSTMENT_TEN_TO_ELEVEN_DAYS = 31; + + // Conversion adjustment lag bucket from 11 to 12 days. 11 days is included, + // 12 days is not. + ADJUSTMENT_ELEVEN_TO_TWELVE_DAYS = 32; + + // Conversion adjustment lag bucket from 12 to 13 days. 12 days is included, + // 13 days is not. + ADJUSTMENT_TWELVE_TO_THIRTEEN_DAYS = 33; + + // Conversion adjustment lag bucket from 13 to 14 days. 13 days is included, + // 14 days is not. + ADJUSTMENT_THIRTEEN_TO_FOURTEEN_DAYS = 34; + + // Conversion adjustment lag bucket from 14 to 21 days. 14 days is included, + // 21 days is not. + ADJUSTMENT_FOURTEEN_TO_TWENTY_ONE_DAYS = 35; + + // Conversion adjustment lag bucket from 21 to 30 days. 21 days is included, + // 30 days is not. + ADJUSTMENT_TWENTY_ONE_TO_THIRTY_DAYS = 36; + + // Conversion adjustment lag bucket from 30 to 45 days. 30 days is included, + // 45 days is not. + ADJUSTMENT_THIRTY_TO_FORTY_FIVE_DAYS = 37; + + // Conversion adjustment lag bucket from 45 to 60 days. 45 days is included, + // 60 days is not. + ADJUSTMENT_FORTY_FIVE_TO_SIXTY_DAYS = 38; + + // Conversion adjustment lag bucket from 60 to 90 days. 60 days is included, + // 90 days is not. + ADJUSTMENT_SIXTY_TO_NINETY_DAYS = 39; + + // Conversion adjustment lag bucket from 90 to 145 days. 90 days is + // included, 145 days is not. + ADJUSTMENT_NINETY_TO_ONE_HUNDRED_AND_FORTY_FIVE_DAYS = 40; + + // Conversion lag bucket UNKNOWN. This is for dates before conversion lag + // bucket was available in Google Ads. + CONVERSION_UNKNOWN = 41; + + // Conversion adjustment lag bucket UNKNOWN. This is for dates before + // conversion adjustment lag bucket was available in Google Ads. + ADJUSTMENT_UNKNOWN = 42; + } + + +} diff --git a/google/ads/googleads/v3/enums/criterion_category_channel_availability_mode.proto b/google/ads/googleads/v3/enums/criterion_category_channel_availability_mode.proto new file mode 100644 index 000000000..ce04a6b09 --- /dev/null +++ b/google/ads/googleads/v3/enums/criterion_category_channel_availability_mode.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CriterionCategoryChannelAvailabilityModeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing the criterion category channel availability mode. + +// Describes channel availability mode for a criterion availability - whether +// the availability is meant to include all advertising channels, or a +// particular channel with all its channel subtypes, or a channel with a certain +// subset of channel subtypes. +message CriterionCategoryChannelAvailabilityModeEnum { + // Enum containing the possible CriterionCategoryChannelAvailabilityMode. + enum CriterionCategoryChannelAvailabilityMode { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The category is available to campaigns of all channel types and subtypes. + ALL_CHANNELS = 2; + + // The category is available to campaigns of a specific channel type, + // including all subtypes under it. + CHANNEL_TYPE_AND_ALL_SUBTYPES = 3; + + // The category is available to campaigns of a specific channel type and + // subtype(s). + CHANNEL_TYPE_AND_SUBSET_SUBTYPES = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/criterion_category_locale_availability_mode.proto b/google/ads/googleads/v3/enums/criterion_category_locale_availability_mode.proto new file mode 100644 index 000000000..6d8691516 --- /dev/null +++ b/google/ads/googleads/v3/enums/criterion_category_locale_availability_mode.proto @@ -0,0 +1,61 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CriterionCategoryLocaleAvailabilityModeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing the criterion category locale availability mode. + +// Describes locale availability mode for a criterion availability - whether +// it's available globally, or a particular country with all languages, or a +// particular language with all countries, or a country-language pair. +message CriterionCategoryLocaleAvailabilityModeEnum { + // Enum containing the possible CriterionCategoryLocaleAvailabilityMode. + enum CriterionCategoryLocaleAvailabilityMode { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The category is available to campaigns of all locales. + ALL_LOCALES = 2; + + // The category is available to campaigns within a list of countries, + // regardless of language. + COUNTRY_AND_ALL_LANGUAGES = 3; + + // The category is available to campaigns within a list of languages, + // regardless of country. + LANGUAGE_AND_ALL_COUNTRIES = 4; + + // The category is available to campaigns within a list of country, language + // pairs. + COUNTRY_AND_LANGUAGE = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/criterion_system_serving_status.proto b/google/ads/googleads/v3/enums/criterion_system_serving_status.proto new file mode 100644 index 000000000..e6b30ec14 --- /dev/null +++ b/google/ads/googleads/v3/enums/criterion_system_serving_status.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CriterionSystemServingStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing approval status for the criterion. + +// Container for enum describing possible criterion system serving statuses. +message CriterionSystemServingStatusEnum { + // Enumerates criterion system serving statuses. + enum CriterionSystemServingStatus { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Eligible. + ELIGIBLE = 2; + + // Low search volume. + RARELY_SERVED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/criterion_type.proto b/google/ads/googleads/v3/enums/criterion_type.proto new file mode 100644 index 000000000..2ce579917 --- /dev/null +++ b/google/ads/googleads/v3/enums/criterion_type.proto @@ -0,0 +1,134 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CriterionTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing criteria types. + +// The possible types of a criterion. +message CriterionTypeEnum { + // Enum describing possible criterion types. + enum CriterionType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Keyword. e.g. 'mars cruise'. + KEYWORD = 2; + + // Placement, aka Website. e.g. 'www.flowers4sale.com' + PLACEMENT = 3; + + // Mobile application categories to target. + MOBILE_APP_CATEGORY = 4; + + // Mobile applications to target. + MOBILE_APPLICATION = 5; + + // Devices to target. + DEVICE = 6; + + // Locations to target. + LOCATION = 7; + + // Listing groups to target. + LISTING_GROUP = 8; + + // Ad Schedule. + AD_SCHEDULE = 9; + + // Age range. + AGE_RANGE = 10; + + // Gender. + GENDER = 11; + + // Income Range. + INCOME_RANGE = 12; + + // Parental status. + PARENTAL_STATUS = 13; + + // YouTube Video. + YOUTUBE_VIDEO = 14; + + // YouTube Channel. + YOUTUBE_CHANNEL = 15; + + // User list. + USER_LIST = 16; + + // Proximity. + PROXIMITY = 17; + + // A topic target on the display network (e.g. "Pets & Animals"). + TOPIC = 18; + + // Listing scope to target. + LISTING_SCOPE = 19; + + // Language. + LANGUAGE = 20; + + // IpBlock. + IP_BLOCK = 21; + + // Content Label for category exclusion. + CONTENT_LABEL = 22; + + // Carrier. + CARRIER = 23; + + // A category the user is interested in. + USER_INTEREST = 24; + + // Webpage criterion for dynamic search ads. + WEBPAGE = 25; + + // Operating system version. + OPERATING_SYSTEM_VERSION = 26; + + // App payment model. + APP_PAYMENT_MODEL = 27; + + // Mobile device. + MOBILE_DEVICE = 28; + + // Custom affinity. + CUSTOM_AFFINITY = 29; + + // Custom intent. + CUSTOM_INTENT = 30; + + // Location group. + LOCATION_GROUP = 31; + } + + +} diff --git a/google/ads/googleads/v3/enums/custom_interest_member_type.proto b/google/ads/googleads/v3/enums/custom_interest_member_type.proto new file mode 100644 index 000000000..cd05e545c --- /dev/null +++ b/google/ads/googleads/v3/enums/custom_interest_member_type.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CustomInterestMemberTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing custom interest member type. + +// The types of custom interest member, either KEYWORD or URL. +message CustomInterestMemberTypeEnum { + // Enum containing possible custom interest member types. + enum CustomInterestMemberType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Custom interest member type KEYWORD. + KEYWORD = 2; + + // Custom interest member type URL. + URL = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/custom_interest_status.proto b/google/ads/googleads/v3/enums/custom_interest_status.proto new file mode 100644 index 000000000..24dc1c141 --- /dev/null +++ b/google/ads/googleads/v3/enums/custom_interest_status.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CustomInterestStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing custom interest status. + +// The status of custom interest. +message CustomInterestStatusEnum { + // Enum containing possible custom interest types. + enum CustomInterestStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Enabled status - custom interest is enabled and can be targeted to. + ENABLED = 2; + + // Removed status - custom interest is removed and cannot be used for + // targeting. + REMOVED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/custom_interest_type.proto b/google/ads/googleads/v3/enums/custom_interest_type.proto new file mode 100644 index 000000000..35ea338fd --- /dev/null +++ b/google/ads/googleads/v3/enums/custom_interest_type.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CustomInterestTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing custom interest type. + +// The types of custom interest. +message CustomInterestTypeEnum { + // Enum containing possible custom interest types. + enum CustomInterestType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Allows brand advertisers to define custom affinity audience lists. + CUSTOM_AFFINITY = 2; + + // Allows advertisers to define custom intent audience lists. + CUSTOM_INTENT = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/custom_placeholder_field.proto b/google/ads/googleads/v3/enums/custom_placeholder_field.proto new file mode 100644 index 000000000..e3152c21f --- /dev/null +++ b/google/ads/googleads/v3/enums/custom_placeholder_field.proto @@ -0,0 +1,129 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CustomPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Custom placeholder fields. + +// Values for Custom placeholder fields. +// For more information about dynamic remarketing feeds, see +// https://support.google.com/google-ads/answer/6053288. +message CustomPlaceholderFieldEnum { + // Possible values for Custom placeholder fields. + enum CustomPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. Required. Combination ID and ID2 must be unique per + // offer. + ID = 2; + + // Data Type: STRING. Combination ID and ID2 must be unique per offer. + ID2 = 3; + + // Data Type: STRING. Required. Main headline with product name to be shown + // in dynamic ad. + ITEM_TITLE = 4; + + // Data Type: STRING. Optional text to be shown in the image ad. + ITEM_SUBTITLE = 5; + + // Data Type: STRING. Optional description of the product to be shown in the + // ad. + ITEM_DESCRIPTION = 6; + + // Data Type: STRING. Full address of your offer or service, including + // postal code. This will be used to identify the closest product to the + // user when there are multiple offers in the feed that are relevant to the + // user. + ITEM_ADDRESS = 7; + + // Data Type: STRING. Price to be shown in the ad. + // Example: "100.00 USD" + PRICE = 8; + + // Data Type: STRING. Formatted price to be shown in the ad. + // Example: "Starting at $100.00 USD", "$80 - $100" + FORMATTED_PRICE = 9; + + // Data Type: STRING. Sale price to be shown in the ad. + // Example: "80.00 USD" + SALE_PRICE = 10; + + // Data Type: STRING. Formatted sale price to be shown in the ad. + // Example: "On sale for $80.00", "$60 - $80" + FORMATTED_SALE_PRICE = 11; + + // Data Type: URL. Image to be displayed in the ad. Highly recommended for + // image ads. + IMAGE_URL = 12; + + // Data Type: STRING. Used as a recommendation engine signal to serve items + // in the same category. + ITEM_CATEGORY = 13; + + // Data Type: URL_LIST. Final URLs for the ad when using Upgraded + // URLs. User will be redirected to these URLs when they click on an ad, or + // when they click on a specific product for ads that have multiple + // products. + FINAL_URLS = 14; + + // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded + // URLs. + FINAL_MOBILE_URLS = 15; + + // Data Type: URL. Tracking template for the ad when using Upgraded URLs. + TRACKING_URL = 16; + + // Data Type: STRING_LIST. Keywords used for product retrieval. + CONTEXTUAL_KEYWORDS = 17; + + // Data Type: STRING. Android app link. Must be formatted as: + // android-app://{package_id}/{scheme}/{host_path}. + // The components are defined as follows: + // package_id: app ID as specified in Google Play. + // scheme: the scheme to pass to the application. Can be HTTP, or a custom + // scheme. + // host_path: identifies the specific content within your application. + ANDROID_APP_LINK = 18; + + // Data Type: STRING_LIST. List of recommended IDs to show together with + // this item. + SIMILAR_IDS = 19; + + // Data Type: STRING. iOS app link. + IOS_APP_LINK = 20; + + // Data Type: INT64. iOS app store ID. + IOS_APP_STORE_ID = 21; + } + + +} diff --git a/google/ads/googleads/v3/enums/customer_match_upload_key_type.proto b/google/ads/googleads/v3/enums/customer_match_upload_key_type.proto new file mode 100644 index 000000000..ae40149f8 --- /dev/null +++ b/google/ads/googleads/v3/enums/customer_match_upload_key_type.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CustomerMatchUploadKeyTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Indicates what type of data are the user list's members matched from. +message CustomerMatchUploadKeyTypeEnum { + // Enum describing possible customer match upload key types. + enum CustomerMatchUploadKeyType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Members are matched from customer info such as email address, phone + // number or physical address. + CONTACT_INFO = 2; + + // Members are matched from a user id generated and assigned by the + // advertiser. + CRM_ID = 3; + + // Members are matched from mobile advertising ids. + MOBILE_ADVERTISING_ID = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/customer_pay_per_conversion_eligibility_failure_reason.proto b/google/ads/googleads/v3/enums/customer_pay_per_conversion_eligibility_failure_reason.proto new file mode 100644 index 000000000..7d3b11c40 --- /dev/null +++ b/google/ads/googleads/v3/enums/customer_pay_per_conversion_eligibility_failure_reason.proto @@ -0,0 +1,68 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CustomerPayPerConversionEligibilityFailureReasonProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing pay per conversion eligibility failure reasons. + +// Container for enum describing reasons why a customer is not eligible to use +// PaymentMode.CONVERSIONS. +message CustomerPayPerConversionEligibilityFailureReasonEnum { + // Enum describing possible reasons a customer is not eligible to use + // PaymentMode.CONVERSIONS. + enum CustomerPayPerConversionEligibilityFailureReason { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Customer does not have enough conversions. + NOT_ENOUGH_CONVERSIONS = 2; + + // Customer's conversion lag is too high. + CONVERSION_LAG_TOO_HIGH = 3; + + // Customer uses shared budgets. + HAS_CAMPAIGN_WITH_SHARED_BUDGET = 4; + + // Customer has conversions with ConversionActionType.UPLOAD_CLICKS. + HAS_UPLOAD_CLICKS_CONVERSION = 5; + + // Customer's average daily spend is too high. + AVERAGE_DAILY_SPEND_TOO_HIGH = 6; + + // Customer's eligibility has not yet been calculated by the Google Ads + // backend. Check back soon. + ANALYSIS_NOT_COMPLETE = 7; + + // Customer is not eligible due to other reasons. + OTHER = 8; + } + + +} diff --git a/google/ads/googleads/v3/enums/data_driven_model_status.proto b/google/ads/googleads/v3/enums/data_driven_model_status.proto new file mode 100644 index 000000000..4ce19402c --- /dev/null +++ b/google/ads/googleads/v3/enums/data_driven_model_status.proto @@ -0,0 +1,62 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "DataDrivenModelStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing data-driven model status. + +// Container for enum indicating data driven model status. +message DataDrivenModelStatusEnum { + // Enumerates data driven model statuses. + enum DataDrivenModelStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The data driven model is available. + AVAILABLE = 2; + + // The data driven model is stale. It hasn't been updated for at least 7 + // days. It is still being used, but will become expired if it does not get + // updated for 30 days. + STALE = 3; + + // The data driven model expired. It hasn't been updated for at least 30 + // days and cannot be used. Most commonly this is because there hasn't been + // the required number of events in a recent 30-day period. + EXPIRED = 4; + + // The data driven model has never been generated. Most commonly this is + // because there has never been the required number of events in any 30-day + // period. + NEVER_GENERATED = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/day_of_week.proto b/google/ads/googleads/v3/enums/day_of_week.proto new file mode 100644 index 000000000..e10fca7d4 --- /dev/null +++ b/google/ads/googleads/v3/enums/day_of_week.proto @@ -0,0 +1,65 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "DayOfWeekProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing days of week. + +// Container for enumeration of days of the week, e.g., "Monday". +message DayOfWeekEnum { + // Enumerates days of the week, e.g., "Monday". + enum DayOfWeek { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Monday. + MONDAY = 2; + + // Tuesday. + TUESDAY = 3; + + // Wednesday. + WEDNESDAY = 4; + + // Thursday. + THURSDAY = 5; + + // Friday. + FRIDAY = 6; + + // Saturday. + SATURDAY = 7; + + // Sunday. + SUNDAY = 8; + } + + +} diff --git a/google/ads/googleads/v3/enums/device.proto b/google/ads/googleads/v3/enums/device.proto new file mode 100644 index 000000000..547a06aae --- /dev/null +++ b/google/ads/googleads/v3/enums/device.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "DeviceProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing devices. + +// Container for enumeration of Google Ads devices available for targeting. +message DeviceEnum { + // Enumerates Google Ads devices available for targeting. + enum Device { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Mobile devices with full browsers. + MOBILE = 2; + + // Tablets with full browsers. + TABLET = 3; + + // Computers. + DESKTOP = 4; + + // Smart TVs and game consoles. + CONNECTED_TV = 6; + + // Other device types. + OTHER = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/display_ad_format_setting.proto b/google/ads/googleads/v3/enums/display_ad_format_setting.proto new file mode 100644 index 000000000..47394a102 --- /dev/null +++ b/google/ads/googleads/v3/enums/display_ad_format_setting.proto @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "DisplayAdFormatSettingProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing display ad format settings. + +// Container for display ad format settings. +message DisplayAdFormatSettingEnum { + // Enumerates display ad format settings. + enum DisplayAdFormatSetting { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Text, image and native formats. + ALL_FORMATS = 2; + + // Text and image formats. + NON_NATIVE = 3; + + // Native format, i.e. the format rendering is controlled by the publisher + // and not by Google. + NATIVE = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/display_upload_product_type.proto b/google/ads/googleads/v3/enums/display_upload_product_type.proto new file mode 100644 index 000000000..2ed71ae4b --- /dev/null +++ b/google/ads/googleads/v3/enums/display_upload_product_type.proto @@ -0,0 +1,97 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "DisplayUploadProductTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing display upload product types. + +// Container for display upload product types. Product types that have the word +// "DYNAMIC" in them must be associated with a campaign that has a dynamic +// remarketing feed. See https://support.google.com/google-ads/answer/6053288 +// for more info about dynamic remarketing. Other product types are regarded +// as "static" and do not have this requirement. +message DisplayUploadProductTypeEnum { + // Enumerates display upload product types. + enum DisplayUploadProductType { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // HTML5 upload ad. This product type requires the upload_media_bundle + // field in DisplayUploadAdInfo to be set. + HTML5_UPLOAD_AD = 2; + + // Dynamic HTML5 education ad. This product type requires the + // upload_media_bundle field in DisplayUploadAdInfo to be set. Can only be + // used in an education campaign. + DYNAMIC_HTML5_EDUCATION_AD = 3; + + // Dynamic HTML5 flight ad. This product type requires the + // upload_media_bundle field in DisplayUploadAdInfo to be set. Can only be + // used in a flight campaign. + DYNAMIC_HTML5_FLIGHT_AD = 4; + + // Dynamic HTML5 hotel and rental ad. This product type requires the + // upload_media_bundle field in DisplayUploadAdInfo to be set. Can only be + // used in a hotel campaign. + DYNAMIC_HTML5_HOTEL_RENTAL_AD = 5; + + // Dynamic HTML5 job ad. This product type requires the + // upload_media_bundle field in DisplayUploadAdInfo to be set. Can only be + // used in a job campaign. + DYNAMIC_HTML5_JOB_AD = 6; + + // Dynamic HTML5 local ad. This product type requires the + // upload_media_bundle field in DisplayUploadAdInfo to be set. Can only be + // used in a local campaign. + DYNAMIC_HTML5_LOCAL_AD = 7; + + // Dynamic HTML5 real estate ad. This product type requires the + // upload_media_bundle field in DisplayUploadAdInfo to be set. Can only be + // used in a real estate campaign. + DYNAMIC_HTML5_REAL_ESTATE_AD = 8; + + // Dynamic HTML5 custom ad. This product type requires the + // upload_media_bundle field in DisplayUploadAdInfo to be set. Can only be + // used in a custom campaign. + DYNAMIC_HTML5_CUSTOM_AD = 9; + + // Dynamic HTML5 travel ad. This product type requires the + // upload_media_bundle field in DisplayUploadAdInfo to be set. Can only be + // used in a travel campaign. + DYNAMIC_HTML5_TRAVEL_AD = 10; + + // Dynamic HTML5 hotel ad. This product type requires the + // upload_media_bundle field in DisplayUploadAdInfo to be set. Can only be + // used in a hotel campaign. + DYNAMIC_HTML5_HOTEL_AD = 11; + } + + +} diff --git a/google/ads/googleads/v3/enums/distance_bucket.proto b/google/ads/googleads/v3/enums/distance_bucket.proto new file mode 100644 index 000000000..f598de3ba --- /dev/null +++ b/google/ads/googleads/v3/enums/distance_bucket.proto @@ -0,0 +1,127 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "DistanceBucketProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing distance buckets. + +// Container for distance buckets of a user’s distance from an advertiser’s +// location extension. +message DistanceBucketEnum { + // The distance bucket for a user’s distance from an advertiser’s location + // extension. + enum DistanceBucket { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // User was within 700m of the location. + WITHIN_700M = 2; + + // User was within 1KM of the location. + WITHIN_1KM = 3; + + // User was within 5KM of the location. + WITHIN_5KM = 4; + + // User was within 10KM of the location. + WITHIN_10KM = 5; + + // User was within 15KM of the location. + WITHIN_15KM = 6; + + // User was within 20KM of the location. + WITHIN_20KM = 7; + + // User was within 25KM of the location. + WITHIN_25KM = 8; + + // User was within 30KM of the location. + WITHIN_30KM = 9; + + // User was within 35KM of the location. + WITHIN_35KM = 10; + + // User was within 40KM of the location. + WITHIN_40KM = 11; + + // User was within 45KM of the location. + WITHIN_45KM = 12; + + // User was within 50KM of the location. + WITHIN_50KM = 13; + + // User was within 55KM of the location. + WITHIN_55KM = 14; + + // User was within 60KM of the location. + WITHIN_60KM = 15; + + // User was within 65KM of the location. + WITHIN_65KM = 16; + + // User was beyond 65KM of the location. + BEYOND_65KM = 17; + + // User was within 0.7 miles of the location. + WITHIN_0_7MILES = 18; + + // User was within 1 mile of the location. + WITHIN_1MILE = 19; + + // User was within 5 miles of the location. + WITHIN_5MILES = 20; + + // User was within 10 miles of the location. + WITHIN_10MILES = 21; + + // User was within 15 miles of the location. + WITHIN_15MILES = 22; + + // User was within 20 miles of the location. + WITHIN_20MILES = 23; + + // User was within 25 miles of the location. + WITHIN_25MILES = 24; + + // User was within 30 miles of the location. + WITHIN_30MILES = 25; + + // User was within 35 miles of the location. + WITHIN_35MILES = 26; + + // User was within 40 miles of the location. + WITHIN_40MILES = 27; + + // User was beyond 40 miles of the location. + BEYOND_40MILES = 28; + } + + +} diff --git a/google/ads/googleads/v3/enums/dsa_page_feed_criterion_field.proto b/google/ads/googleads/v3/enums/dsa_page_feed_criterion_field.proto new file mode 100644 index 000000000..ac4ddad9e --- /dev/null +++ b/google/ads/googleads/v3/enums/dsa_page_feed_criterion_field.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "DsaPageFeedCriterionFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Dynamic Search Ad Page Feed criterion fields. + +// Values for Dynamic Search Ad Page Feed criterion fields. +message DsaPageFeedCriterionFieldEnum { + // Possible values for Dynamic Search Ad Page Feed criterion fields. + enum DsaPageFeedCriterionField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: URL or URL_LIST. URL of the web page you want to target. + PAGE_URL = 2; + + // Data Type: STRING_LIST. The labels that will help you target ads within + // your page feed. + LABEL = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/education_placeholder_field.proto b/google/ads/googleads/v3/enums/education_placeholder_field.proto new file mode 100644 index 000000000..51912c931 --- /dev/null +++ b/google/ads/googleads/v3/enums/education_placeholder_field.proto @@ -0,0 +1,111 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "EducationPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Education placeholder fields. + +// Values for Education placeholder fields. +// For more information about dynamic remarketing feeds, see +// https://support.google.com/google-ads/answer/6053288. +message EducationPlaceholderFieldEnum { + // Possible values for Education placeholder fields. + enum EducationPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. Required. Combination of PROGRAM ID and LOCATION ID + // must be unique per offer. + PROGRAM_ID = 2; + + // Data Type: STRING. Combination of PROGRAM ID and LOCATION ID must be + // unique per offer. + LOCATION_ID = 3; + + // Data Type: STRING. Required. Main headline with program name to be shown + // in dynamic ad. + PROGRAM_NAME = 4; + + // Data Type: STRING. Area of study that can be shown in dynamic ad. + AREA_OF_STUDY = 5; + + // Data Type: STRING. Description of program that can be shown in dynamic + // ad. + PROGRAM_DESCRIPTION = 6; + + // Data Type: STRING. Name of school that can be shown in dynamic ad. + SCHOOL_NAME = 7; + + // Data Type: STRING. Complete school address, including postal code. + ADDRESS = 8; + + // Data Type: URL. Image to be displayed in ads. + THUMBNAIL_IMAGE_URL = 9; + + // Data Type: URL. Alternative hosted file of image to be used in the ad. + ALTERNATIVE_THUMBNAIL_IMAGE_URL = 10; + + // Data Type: URL_LIST. Required. Final URLs to be used in ad when using + // Upgraded URLs; the more specific the better (e.g. the individual URL of a + // specific program and its location). + FINAL_URLS = 11; + + // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded + // URLs. + FINAL_MOBILE_URLS = 12; + + // Data Type: URL. Tracking template for the ad when using Upgraded URLs. + TRACKING_URL = 13; + + // Data Type: STRING_LIST. Keywords used for product retrieval. + CONTEXTUAL_KEYWORDS = 14; + + // Data Type: STRING. Android app link. Must be formatted as: + // android-app://{package_id}/{scheme}/{host_path}. + // The components are defined as follows: + // package_id: app ID as specified in Google Play. + // scheme: the scheme to pass to the application. Can be HTTP, or a custom + // scheme. + // host_path: identifies the specific content within your application. + ANDROID_APP_LINK = 15; + + // Data Type: STRING_LIST. List of recommended program IDs to show together + // with this item. + SIMILAR_PROGRAM_IDS = 16; + + // Data Type: STRING. iOS app link. + IOS_APP_LINK = 17; + + // Data Type: INT64. iOS app store ID. + IOS_APP_STORE_ID = 18; + } + + +} diff --git a/google/ads/googleads/v3/enums/extension_setting_device.proto b/google/ads/googleads/v3/enums/extension_setting_device.proto new file mode 100644 index 000000000..4c0f27da3 --- /dev/null +++ b/google/ads/googleads/v3/enums/extension_setting_device.proto @@ -0,0 +1,52 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionSettingDeviceProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing extension setting device type. + +// Container for enum describing extension setting device types. +message ExtensionSettingDeviceEnum { + // Possbile device types for an extension setting. + enum ExtensionSettingDevice { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Mobile. The extensions in the extension setting will only serve on + // mobile devices. + MOBILE = 2; + + // Desktop. The extensions in the extension setting will only serve on + // desktop devices. + DESKTOP = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/extension_type.proto b/google/ads/googleads/v3/enums/extension_type.proto new file mode 100644 index 000000000..e864c4b5a --- /dev/null +++ b/google/ads/googleads/v3/enums/extension_type.proto @@ -0,0 +1,81 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing extension type. + +// Container for enum describing possible data types for an extension in an +// extension setting. +message ExtensionTypeEnum { + // Possible data types for an extension in an extension setting. + enum ExtensionType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // None. + NONE = 2; + + // App. + APP = 3; + + // Call. + CALL = 4; + + // Callout. + CALLOUT = 5; + + // Message. + MESSAGE = 6; + + // Price. + PRICE = 7; + + // Promotion. + PROMOTION = 8; + + // Sitelink. + SITELINK = 10; + + // Structured snippet. + STRUCTURED_SNIPPET = 11; + + // Location. + LOCATION = 12; + + // Affiliate location. + AFFILIATE_LOCATION = 13; + + // Hotel callout + HOTEL_CALLOUT = 15; + } + + +} diff --git a/google/ads/googleads/v3/enums/external_conversion_source.proto b/google/ads/googleads/v3/enums/external_conversion_source.proto new file mode 100644 index 000000000..2ce5c64eb --- /dev/null +++ b/google/ads/googleads/v3/enums/external_conversion_source.proto @@ -0,0 +1,130 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ExternalConversionSourceProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Container for enum describing the external conversion source that is +// associated with a ConversionAction. +message ExternalConversionSourceEnum { + // The external conversion source that is associated with a ConversionAction. + enum ExternalConversionSource { + // Not specified. + UNSPECIFIED = 0; + + // Represents value unknown in this version. + UNKNOWN = 1; + + // Conversion that occurs when a user navigates to a particular webpage + // after viewing an ad; Displayed in Google Ads UI as 'Website'. + WEBPAGE = 2; + + // Conversion that comes from linked Google Analytics goal or transaction; + // Displayed in Google Ads UI as 'Analytics'. + ANALYTICS = 3; + + // Website conversion that is uploaded through ConversionUploadService; + // Displayed in Google Ads UI as 'Import from clicks'. + UPLOAD = 4; + + // Conversion that occurs when a user clicks on a call extension directly on + // an ad; Displayed in Google Ads UI as 'Calls from ads'. + AD_CALL_METRICS = 5; + + // Conversion that occurs when a user calls a dynamically-generated phone + // number (by installed javascript) from an advertiser's website after + // clicking on an ad; Displayed in Google Ads UI as 'Calls from website'. + WEBSITE_CALL_METRICS = 6; + + // Conversion that occurs when a user visits an advertiser's retail store + // after clicking on a Google ad; + // Displayed in Google Ads UI as 'Store visits'. + STORE_VISITS = 7; + + // Conversion that occurs when a user takes an in-app action such as a + // purchase in an Android app; + // Displayed in Google Ads UI as 'Android in-app action'. + ANDROID_IN_APP = 8; + + // Conversion that occurs when a user takes an in-app action such as a + // purchase in an iOS app; + // Displayed in Google Ads UI as 'iOS in-app action'. + IOS_IN_APP = 9; + + // Conversion that occurs when a user opens an iOS app for the first time; + // Displayed in Google Ads UI as 'iOS app install (first open)'. + IOS_FIRST_OPEN = 10; + + // Legacy app conversions that do not have an AppPlatform provided; + // Displayed in Google Ads UI as 'Mobile app'. + APP_UNSPECIFIED = 11; + + // Conversion that occurs when a user opens an Android app for the first + // time; Displayed in Google Ads UI as 'Android app install (first open)'. + ANDROID_FIRST_OPEN = 12; + + // Call conversion that is uploaded through ConversionUploadService; + // Displayed in Google Ads UI as 'Import from calls'. + UPLOAD_CALLS = 13; + + // Conversion that comes from a linked Firebase event; + // Displayed in Google Ads UI as 'Firebase'. + FIREBASE = 14; + + // Conversion that occurs when a user clicks on a mobile phone number; + // Displayed in Google Ads UI as 'Phone number clicks'. + CLICK_TO_CALL = 15; + + // Conversion that comes from Salesforce; + // Displayed in Google Ads UI as 'Salesforce.com'. + SALESFORCE = 16; + + // Conversion that comes from in-store purchases recorded by CRM; + // Displayed in Google Ads UI as 'Store sales (data partner)'. + STORE_SALES_CRM = 17; + + // Conversion that comes from in-store purchases from payment network; + // Displayed in Google Ads UI as 'Store sales (payment network)'. + STORE_SALES_PAYMENT_NETWORK = 18; + + // Codeless Google Play conversion; + // Displayed in Google Ads UI as 'Google Play'. + GOOGLE_PLAY = 19; + + // Conversion that comes from a linked third-party app analytics event; + // Displayed in Google Ads UI as 'Third-party app analytics'. + THIRD_PARTY_APP_ANALYTICS = 20; + + // Conversion that is controlled by Google Attribution. + GOOGLE_ATTRIBUTION = 21; + + // Store Sales conversion based on first-party or third-party merchant data + // uploads. Displayed in Google Ads UI as 'Store sales (direct)'. + STORE_SALES_DIRECT = 22; + } + + +} diff --git a/google/ads/googleads/v3/enums/feed_attribute_type.proto b/google/ads/googleads/v3/enums/feed_attribute_type.proto new file mode 100644 index 000000000..5a8d414c1 --- /dev/null +++ b/google/ads/googleads/v3/enums/feed_attribute_type.proto @@ -0,0 +1,83 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedAttributeTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing feed attribute type. + +// Container for enum describing possible data types for a feed attribute. +message FeedAttributeTypeEnum { + // Possible data types for a feed attribute. + enum FeedAttributeType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Int64. + INT64 = 2; + + // Double. + DOUBLE = 3; + + // String. + STRING = 4; + + // Boolean. + BOOLEAN = 5; + + // Url. + URL = 6; + + // Datetime. + DATE_TIME = 7; + + // Int64 list. + INT64_LIST = 8; + + // Double (8 bytes) list. + DOUBLE_LIST = 9; + + // String list. + STRING_LIST = 10; + + // Boolean list. + BOOLEAN_LIST = 11; + + // Url list. + URL_LIST = 12; + + // Datetime list. + DATE_TIME_LIST = 13; + + // Price. + PRICE = 14; + } + + +} diff --git a/google/ads/googleads/v3/enums/feed_item_quality_approval_status.proto b/google/ads/googleads/v3/enums/feed_item_quality_approval_status.proto new file mode 100644 index 000000000..9e37b1b3d --- /dev/null +++ b/google/ads/googleads/v3/enums/feed_item_quality_approval_status.proto @@ -0,0 +1,52 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemQualityApprovalStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing feed item quality evaluation approval statuses. + +// Container for enum describing possible quality evaluation approval statuses +// of a feed item. +message FeedItemQualityApprovalStatusEnum { + // The possible quality evaluation approval statuses of a feed item. + enum FeedItemQualityApprovalStatus { + // No value has been specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Meets all quality expectations. + APPROVED = 2; + + // Does not meet some quality expectations. The specific reason is found in + // the quality_disapproval_reasons field. + DISAPPROVED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/feed_item_quality_disapproval_reason.proto b/google/ads/googleads/v3/enums/feed_item_quality_disapproval_reason.proto new file mode 100644 index 000000000..1bf0dc718 --- /dev/null +++ b/google/ads/googleads/v3/enums/feed_item_quality_disapproval_reason.proto @@ -0,0 +1,99 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemQualityDisapprovalReasonProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing feed item quality disapproval reasons. + +// Container for enum describing possible quality evaluation disapproval reasons +// of a feed item. +message FeedItemQualityDisapprovalReasonEnum { + // The possible quality evaluation disapproval reasons of a feed item. + enum FeedItemQualityDisapprovalReason { + // No value has been specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Price contains repetitive headers. + PRICE_TABLE_REPETITIVE_HEADERS = 2; + + // Price contains repetitive description. + PRICE_TABLE_REPETITIVE_DESCRIPTION = 3; + + // Price contains inconsistent items. + PRICE_TABLE_INCONSISTENT_ROWS = 4; + + // Price contains qualifiers in description. + PRICE_DESCRIPTION_HAS_PRICE_QUALIFIERS = 5; + + // Price contains an unsupported language. + PRICE_UNSUPPORTED_LANGUAGE = 6; + + // Price item header is not relevant to the price type. + PRICE_TABLE_ROW_HEADER_TABLE_TYPE_MISMATCH = 7; + + // Price item header has promotional text. + PRICE_TABLE_ROW_HEADER_HAS_PROMOTIONAL_TEXT = 8; + + // Price item description is not relevant to the item header. + PRICE_TABLE_ROW_DESCRIPTION_NOT_RELEVANT = 9; + + // Price item description contains promotional text. + PRICE_TABLE_ROW_DESCRIPTION_HAS_PROMOTIONAL_TEXT = 10; + + // Price item header and description are repetitive. + PRICE_TABLE_ROW_HEADER_DESCRIPTION_REPETITIVE = 11; + + // Price item is in a foreign language, nonsense, or can't be rated. + PRICE_TABLE_ROW_UNRATEABLE = 12; + + // Price item price is invalid or inaccurate. + PRICE_TABLE_ROW_PRICE_INVALID = 13; + + // Price item URL is invalid or irrelevant. + PRICE_TABLE_ROW_URL_INVALID = 14; + + // Price item header or description has price. + PRICE_HEADER_OR_DESCRIPTION_HAS_PRICE = 15; + + // Structured snippet values do not match the header. + STRUCTURED_SNIPPETS_HEADER_POLICY_VIOLATED = 16; + + // Structured snippet values are repeated. + STRUCTURED_SNIPPETS_REPEATED_VALUES = 17; + + // Structured snippet values violate editorial guidelines like punctuation. + STRUCTURED_SNIPPETS_EDITORIAL_GUIDELINES = 18; + + // Structured snippet contain promotional text. + STRUCTURED_SNIPPETS_HAS_PROMOTIONAL_TEXT = 19; + } + + +} diff --git a/google/ads/googleads/v3/enums/feed_item_status.proto b/google/ads/googleads/v3/enums/feed_item_status.proto new file mode 100644 index 000000000..33d8fe730 --- /dev/null +++ b/google/ads/googleads/v3/enums/feed_item_status.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing feed item status. + +// Container for enum describing possible statuses of a feed item. +message FeedItemStatusEnum { + // Possible statuses of a feed item. + enum FeedItemStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Feed item is enabled. + ENABLED = 2; + + // Feed item has been removed. + REMOVED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/feed_item_target_device.proto b/google/ads/googleads/v3/enums/feed_item_target_device.proto new file mode 100644 index 000000000..c750f6622 --- /dev/null +++ b/google/ads/googleads/v3/enums/feed_item_target_device.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemTargetDeviceProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing feed item target device type. + +// Container for enum describing possible data types for a feed item target +// device. +message FeedItemTargetDeviceEnum { + // Possible data types for a feed item target device. + enum FeedItemTargetDevice { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Mobile. + MOBILE = 2; + } + + +} diff --git a/google/ads/googleads/v3/enums/feed_item_target_status.proto b/google/ads/googleads/v3/enums/feed_item_target_status.proto new file mode 100644 index 000000000..45cc85fc2 --- /dev/null +++ b/google/ads/googleads/v3/enums/feed_item_target_status.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemTargetStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing feed item target status. + +// Container for enum describing possible statuses of a feed item target. +message FeedItemTargetStatusEnum { + // Possible statuses of a feed item target. + enum FeedItemTargetStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Feed item target is enabled. + ENABLED = 2; + + // Feed item target has been removed. + REMOVED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/feed_item_target_type.proto b/google/ads/googleads/v3/enums/feed_item_target_type.proto new file mode 100644 index 000000000..dd046c965 --- /dev/null +++ b/google/ads/googleads/v3/enums/feed_item_target_type.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemTargetTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing feed item target type status. + +// Container for enum describing possible types of a feed item target. +message FeedItemTargetTypeEnum { + // Possible type of a feed item target. + enum FeedItemTargetType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Feed item targets a campaign. + CAMPAIGN = 2; + + // Feed item targets an ad group. + AD_GROUP = 3; + + // Feed item targets a criterion. + CRITERION = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/feed_item_validation_status.proto b/google/ads/googleads/v3/enums/feed_item_validation_status.proto new file mode 100644 index 000000000..c083d14a6 --- /dev/null +++ b/google/ads/googleads/v3/enums/feed_item_validation_status.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemValidationStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing feed item validation statuses. + +// Container for enum describing possible validation statuses of a feed item. +message FeedItemValidationStatusEnum { + // The possible validation statuses of a feed item. + enum FeedItemValidationStatus { + // No value has been specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Validation pending. + PENDING = 2; + + // An error was found. + INVALID = 3; + + // Feed item is semantically well-formed. + VALID = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/feed_link_status.proto b/google/ads/googleads/v3/enums/feed_link_status.proto new file mode 100644 index 000000000..92253fbb2 --- /dev/null +++ b/google/ads/googleads/v3/enums/feed_link_status.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedLinkStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing status of a feed link. + +// Container for an enum describing possible statuses of a feed link. +message FeedLinkStatusEnum { + // Possible statuses of a feed link. + enum FeedLinkStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Feed link is enabled. + ENABLED = 2; + + // Feed link has been removed. + REMOVED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/feed_mapping_criterion_type.proto b/google/ads/googleads/v3/enums/feed_mapping_criterion_type.proto new file mode 100644 index 000000000..fc6510574 --- /dev/null +++ b/google/ads/googleads/v3/enums/feed_mapping_criterion_type.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedMappingCriterionTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing criterion types for feed mappings. + +// Container for enum describing possible criterion types for a feed mapping. +message FeedMappingCriterionTypeEnum { + // Possible placeholder types for a feed mapping. + enum FeedMappingCriterionType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Allows campaign targeting at locations within a location feed. + LOCATION_EXTENSION_TARGETING = 4; + + // Allows url targeting for your dynamic search ads within a page feed. + DSA_PAGE_FEED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/feed_mapping_status.proto b/google/ads/googleads/v3/enums/feed_mapping_status.proto new file mode 100644 index 000000000..06fb88c1b --- /dev/null +++ b/google/ads/googleads/v3/enums/feed_mapping_status.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedMappingStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing feed mapping status. + +// Container for enum describing possible statuses of a feed mapping. +message FeedMappingStatusEnum { + // Possible statuses of a feed mapping. + enum FeedMappingStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Feed mapping is enabled. + ENABLED = 2; + + // Feed mapping has been removed. + REMOVED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/feed_origin.proto b/google/ads/googleads/v3/enums/feed_origin.proto new file mode 100644 index 000000000..b8e3fd7a1 --- /dev/null +++ b/google/ads/googleads/v3/enums/feed_origin.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedOriginProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing feed origin. + +// Container for enum describing possible values for a feed origin. +message FeedOriginEnum { + // Possible values for a feed origin. + enum FeedOrigin { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The FeedAttributes for this Feed are managed by the + // user. Users can add FeedAttributes to this Feed. + USER = 2; + + // The FeedAttributes for an GOOGLE Feed are created by Google. A feed of + // this type is maintained by Google and will have the correct attributes + // for the placeholder type of the feed. + GOOGLE = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/feed_status.proto b/google/ads/googleads/v3/enums/feed_status.proto new file mode 100644 index 000000000..adb38a24c --- /dev/null +++ b/google/ads/googleads/v3/enums/feed_status.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing feed status. + +// Container for enum describing possible statuses of a feed. +message FeedStatusEnum { + // Possible statuses of a feed. + enum FeedStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Feed is enabled. + ENABLED = 2; + + // Feed has been removed. + REMOVED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/flight_placeholder_field.proto b/google/ads/googleads/v3/enums/flight_placeholder_field.proto new file mode 100644 index 000000000..2e2c822b1 --- /dev/null +++ b/google/ads/googleads/v3/enums/flight_placeholder_field.proto @@ -0,0 +1,118 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FlightsPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Flight placeholder fields. + +// Values for Flight placeholder fields. +// For more information about dynamic remarketing feeds, see +// https://support.google.com/google-ads/answer/6053288. +message FlightPlaceholderFieldEnum { + // Possible values for Flight placeholder fields. + enum FlightPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. Required. Destination id. Example: PAR, LON. + // For feed items that only have destination id, destination id must be a + // unique key. For feed items that have both destination id and origin id, + // then the combination must be a unique key. + DESTINATION_ID = 2; + + // Data Type: STRING. Origin id. Example: PAR, LON. + // Optional. Combination of destination id and origin id must be unique per + // offer. + ORIGIN_ID = 3; + + // Data Type: STRING. Required. Main headline with product name to be shown + // in dynamic ad. + FLIGHT_DESCRIPTION = 4; + + // Data Type: STRING. Shorter names are recommended. + ORIGIN_NAME = 5; + + // Data Type: STRING. Shorter names are recommended. + DESTINATION_NAME = 6; + + // Data Type: STRING. Price to be shown in the ad. + // Example: "100.00 USD" + FLIGHT_PRICE = 7; + + // Data Type: STRING. Formatted price to be shown in the ad. + // Example: "Starting at $100.00 USD", "$80 - $100" + FORMATTED_PRICE = 8; + + // Data Type: STRING. Sale price to be shown in the ad. + // Example: "80.00 USD" + FLIGHT_SALE_PRICE = 9; + + // Data Type: STRING. Formatted sale price to be shown in the ad. + // Example: "On sale for $80.00", "$60 - $80" + FORMATTED_SALE_PRICE = 10; + + // Data Type: URL. Image to be displayed in the ad. + IMAGE_URL = 11; + + // Data Type: URL_LIST. Required. Final URLs for the ad when using Upgraded + // URLs. User will be redirected to these URLs when they click on an ad, or + // when they click on a specific flight for ads that show multiple + // flights. + FINAL_URLS = 12; + + // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded + // URLs. + FINAL_MOBILE_URLS = 13; + + // Data Type: URL. Tracking template for the ad when using Upgraded URLs. + TRACKING_URL = 14; + + // Data Type: STRING. Android app link. Must be formatted as: + // android-app://{package_id}/{scheme}/{host_path}. + // The components are defined as follows: + // package_id: app ID as specified in Google Play. + // scheme: the scheme to pass to the application. Can be HTTP, or a custom + // scheme. + // host_path: identifies the specific content within your application. + ANDROID_APP_LINK = 15; + + // Data Type: STRING_LIST. List of recommended destination IDs to show + // together with this item. + SIMILAR_DESTINATION_IDS = 16; + + // Data Type: STRING. iOS app link. + IOS_APP_LINK = 17; + + // Data Type: INT64. iOS app store ID. + IOS_APP_STORE_ID = 18; + } + + +} diff --git a/google/ads/googleads/v3/enums/frequency_cap_event_type.proto b/google/ads/googleads/v3/enums/frequency_cap_event_type.proto new file mode 100644 index 000000000..53492e727 --- /dev/null +++ b/google/ads/googleads/v3/enums/frequency_cap_event_type.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FrequencyCapEventTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing frequency caps. + +// Container for enum describing the type of event that the cap applies to. +message FrequencyCapEventTypeEnum { + // The type of event that the cap applies to (e.g. impression). + enum FrequencyCapEventType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The cap applies on ad impressions. + IMPRESSION = 2; + + // The cap applies on video ad views. + VIDEO_VIEW = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/frequency_cap_level.proto b/google/ads/googleads/v3/enums/frequency_cap_level.proto new file mode 100644 index 000000000..497671d38 --- /dev/null +++ b/google/ads/googleads/v3/enums/frequency_cap_level.proto @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FrequencyCapLevelProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing frequency caps. + +// Container for enum describing the level on which the cap is to be applied. +message FrequencyCapLevelEnum { + // The level on which the cap is to be applied (e.g ad group ad, ad group). + // Cap is applied to all the resources of this level. + enum FrequencyCapLevel { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The cap is applied at the ad group ad level. + AD_GROUP_AD = 2; + + // The cap is applied at the ad group level. + AD_GROUP = 3; + + // The cap is applied at the campaign level. + CAMPAIGN = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/frequency_cap_time_unit.proto b/google/ads/googleads/v3/enums/frequency_cap_time_unit.proto new file mode 100644 index 000000000..70f105263 --- /dev/null +++ b/google/ads/googleads/v3/enums/frequency_cap_time_unit.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FrequencyCapTimeUnitProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing frequency caps. + +// Container for enum describing the unit of time the cap is defined at. +message FrequencyCapTimeUnitEnum { + // Unit of time the cap is defined at (e.g. day, week). + enum FrequencyCapTimeUnit { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The cap would define limit per one day. + DAY = 2; + + // The cap would define limit per one week. + WEEK = 3; + + // The cap would define limit per one month. + MONTH = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/gender_type.proto b/google/ads/googleads/v3/enums/gender_type.proto new file mode 100644 index 000000000..e29af5f44 --- /dev/null +++ b/google/ads/googleads/v3/enums/gender_type.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "GenderTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing gender types. + +// Container for enum describing the type of demographic genders. +message GenderTypeEnum { + // The type of demographic genders (e.g. female). + enum GenderType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Male. + MALE = 10; + + // Female. + FEMALE = 11; + + // Undetermined gender. + UNDETERMINED = 20; + } + + +} diff --git a/google/ads/googleads/v3/enums/geo_target_constant_status.proto b/google/ads/googleads/v3/enums/geo_target_constant_status.proto new file mode 100644 index 000000000..067121467 --- /dev/null +++ b/google/ads/googleads/v3/enums/geo_target_constant_status.proto @@ -0,0 +1,52 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "GeoTargetConstantStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing geo target constant statuses. + +// Container for describing the status of a geo target constant. +message GeoTargetConstantStatusEnum { + // The possible statuses of a geo target constant. + enum GeoTargetConstantStatus { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // The geo target constant is valid. + ENABLED = 2; + + // The geo target constant is obsolete and will be removed. + REMOVAL_PLANNED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/geo_targeting_restriction.proto b/google/ads/googleads/v3/enums/geo_targeting_restriction.proto new file mode 100644 index 000000000..dc5c15c0e --- /dev/null +++ b/google/ads/googleads/v3/enums/geo_targeting_restriction.proto @@ -0,0 +1,49 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "GeoTargetingRestrictionProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing GeoTargetingRestriction. + +// Message describing feed item geo targeting restriction. +message GeoTargetingRestrictionEnum { + // A restriction used to determine if the request context's + // geo should be matched. + enum GeoTargetingRestriction { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Indicates that request context should match the physical location of + // the user. + LOCATION_OF_PRESENCE = 2; + } + + +} diff --git a/google/ads/googleads/v3/enums/geo_targeting_type.proto b/google/ads/googleads/v3/enums/geo_targeting_type.proto new file mode 100644 index 000000000..a3a17b6ee --- /dev/null +++ b/google/ads/googleads/v3/enums/geo_targeting_type.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "GeoTargetingTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing geo targeting types. + +// Container for enum describing possible geo targeting types. +message GeoTargetingTypeEnum { + // The possible geo targeting types. + enum GeoTargetingType { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Location the user is interested in while making the query. + AREA_OF_INTEREST = 2; + + // Location of the user issuing the query. + LOCATION_OF_PRESENCE = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/google_ads_field_category.proto b/google/ads/googleads/v3/enums/google_ads_field_category.proto new file mode 100644 index 000000000..ab5880744 --- /dev/null +++ b/google/ads/googleads/v3/enums/google_ads_field_category.proto @@ -0,0 +1,61 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "GoogleAdsFieldCategoryProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing GoogleAdsField categories + +// Container for enum that determines if the described artifact is a resource +// or a field, and if it is a field, when it segments search queries. +message GoogleAdsFieldCategoryEnum { + // The category of the artifact. + enum GoogleAdsFieldCategory { + // Unspecified + UNSPECIFIED = 0; + + // Unknown + UNKNOWN = 1; + + // The described artifact is a resource. + RESOURCE = 2; + + // The described artifact is a field and is an attribute of a resource. + // Including a resource attribute field in a query may segment the query if + // the resource to which it is attributed segments the resource found in + // the FROM clause. + ATTRIBUTE = 3; + + // The described artifact is a field and always segments search queries. + SEGMENT = 5; + + // The described artifact is a field and is a metric. It never segments + // search queries. + METRIC = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/google_ads_field_data_type.proto b/google/ads/googleads/v3/enums/google_ads_field_data_type.proto new file mode 100644 index 000000000..43d4c7e1e --- /dev/null +++ b/google/ads/googleads/v3/enums/google_ads_field_data_type.proto @@ -0,0 +1,102 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "GoogleAdsFieldDataTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing GoogleAdsField data types + +// Container holding the various data types. +message GoogleAdsFieldDataTypeEnum { + // These are the various types a GoogleAdsService artifact may take on. + enum GoogleAdsFieldDataType { + // Unspecified + UNSPECIFIED = 0; + + // Unknown + UNKNOWN = 1; + + // Maps to google.protobuf.BoolValue + // + // Applicable operators: =, != + BOOLEAN = 2; + + // Maps to google.protobuf.StringValue. It can be compared using the set of + // operators specific to dates however. + // + // Applicable operators: =, <, >, <=, >=, BETWEEN, DURING, and IN + DATE = 3; + + // Maps to google.protobuf.DoubleValue + // + // Applicable operators: =, !=, <, >, IN, NOT IN + DOUBLE = 4; + + // Maps to an enum. It's specific definition can be found at type_url. + // + // Applicable operators: =, !=, IN, NOT IN + ENUM = 5; + + // Maps to google.protobuf.FloatValue + // + // Applicable operators: =, !=, <, >, IN, NOT IN + FLOAT = 6; + + // Maps to google.protobuf.Int32Value + // + // Applicable operators: =, !=, <, >, <=, >=, BETWEEN, IN, NOT IN + INT32 = 7; + + // Maps to google.protobuf.Int64Value + // + // Applicable operators: =, !=, <, >, <=, >=, BETWEEN, IN, NOT IN + INT64 = 8; + + // Maps to a protocol buffer message type. The data type's details can be + // found in type_url. + // + // No operators work with MESSAGE fields. + MESSAGE = 9; + + // Maps to google.protobuf.StringValue. Represents the resource name + // (unique id) of a resource or one of its foreign keys. + // + // No operators work with RESOURCE_NAME fields. + RESOURCE_NAME = 10; + + // Maps to google.protobuf.StringValue. + // + // Applicable operators: =, !=, LIKE, NOT LIKE, IN, NOT IN + STRING = 11; + + // Maps to google.protobuf.UInt64Value + // + // Applicable operators: =, !=, <, >, <=, >=, BETWEEN, IN, NOT IN + UINT64 = 12; + } + + +} diff --git a/google/ads/googleads/v3/enums/hotel_date_selection_type.proto b/google/ads/googleads/v3/enums/hotel_date_selection_type.proto new file mode 100644 index 000000000..d21e23706 --- /dev/null +++ b/google/ads/googleads/v3/enums/hotel_date_selection_type.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "HotelDateSelectionTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing hotel date selection types. + +// Container for enum describing possible hotel date selection types +message HotelDateSelectionTypeEnum { + // Enum describing possible hotel date selection types. + enum HotelDateSelectionType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Dates selected by default. + DEFAULT_SELECTION = 50; + + // Dates selected by the user. + USER_SELECTED = 51; + } + + +} diff --git a/google/ads/googleads/v3/enums/hotel_placeholder_field.proto b/google/ads/googleads/v3/enums/hotel_placeholder_field.proto new file mode 100644 index 000000000..776e5aa86 --- /dev/null +++ b/google/ads/googleads/v3/enums/hotel_placeholder_field.proto @@ -0,0 +1,124 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "HotelsPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Hotel placeholder fields. + +// Values for Hotel placeholder fields. +// For more information about dynamic remarketing feeds, see +// https://support.google.com/google-ads/answer/6053288. +message HotelPlaceholderFieldEnum { + // Possible values for Hotel placeholder fields. + enum HotelPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. Required. Unique ID. + PROPERTY_ID = 2; + + // Data Type: STRING. Required. Main headline with property name to be shown + // in dynamic ad. + PROPERTY_NAME = 3; + + // Data Type: STRING. Name of destination to be shown in dynamic ad. + DESTINATION_NAME = 4; + + // Data Type: STRING. Description of destination to be shown in dynamic ad. + DESCRIPTION = 5; + + // Data Type: STRING. Complete property address, including postal code. + ADDRESS = 6; + + // Data Type: STRING. Price to be shown in the ad. + // Example: "100.00 USD" + PRICE = 7; + + // Data Type: STRING. Formatted price to be shown in the ad. + // Example: "Starting at $100.00 USD", "$80 - $100" + FORMATTED_PRICE = 8; + + // Data Type: STRING. Sale price to be shown in the ad. + // Example: "80.00 USD" + SALE_PRICE = 9; + + // Data Type: STRING. Formatted sale price to be shown in the ad. + // Example: "On sale for $80.00", "$60 - $80" + FORMATTED_SALE_PRICE = 10; + + // Data Type: URL. Image to be displayed in the ad. + IMAGE_URL = 11; + + // Data Type: STRING. Category of property used to group like items together + // for recommendation engine. + CATEGORY = 12; + + // Data Type: INT64. Star rating (1 to 5) used to group like items + // together for recommendation engine. + STAR_RATING = 13; + + // Data Type: STRING_LIST. Keywords used for product retrieval. + CONTEXTUAL_KEYWORDS = 14; + + // Data Type: URL_LIST. Required. Final URLs for the ad when using Upgraded + // URLs. User will be redirected to these URLs when they click on an ad, or + // when they click on a specific flight for ads that show multiple + // flights. + FINAL_URLS = 15; + + // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded + // URLs. + FINAL_MOBILE_URLS = 16; + + // Data Type: URL. Tracking template for the ad when using Upgraded URLs. + TRACKING_URL = 17; + + // Data Type: STRING. Android app link. Must be formatted as: + // android-app://{package_id}/{scheme}/{host_path}. + // The components are defined as follows: + // package_id: app ID as specified in Google Play. + // scheme: the scheme to pass to the application. Can be HTTP, or a custom + // scheme. + // host_path: identifies the specific content within your application. + ANDROID_APP_LINK = 18; + + // Data Type: STRING_LIST. List of recommended property IDs to show together + // with this item. + SIMILAR_PROPERTY_IDS = 19; + + // Data Type: STRING. iOS app link. + IOS_APP_LINK = 20; + + // Data Type: INT64. iOS app store ID. + IOS_APP_STORE_ID = 21; + } + + +} diff --git a/google/ads/googleads/v3/enums/hotel_price_bucket.proto b/google/ads/googleads/v3/enums/hotel_price_bucket.proto new file mode 100644 index 000000000..ac9efcef9 --- /dev/null +++ b/google/ads/googleads/v3/enums/hotel_price_bucket.proto @@ -0,0 +1,52 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "HotelPriceBucketProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing hotel price buckets. + +// Container for enum describing hotel price bucket for a hotel itinerary. +message HotelPriceBucketEnum { + // Enum describing possible hotel price buckets. + enum HotelPriceBucket { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Tied for lowest price. Partner is within a small variance of the lowest + // price. + LOWEST_TIED = 3; + + // Not lowest price. Partner is not within a small variance of the lowest + // price. + NOT_LOWEST = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/hotel_rate_type.proto b/google/ads/googleads/v3/enums/hotel_rate_type.proto new file mode 100644 index 000000000..0611f8b3e --- /dev/null +++ b/google/ads/googleads/v3/enums/hotel_rate_type.proto @@ -0,0 +1,62 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "HotelRateTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing hotel rate types. + +// Container for enum describing possible hotel rate types. +message HotelRateTypeEnum { + // Enum describing possible hotel rate types. + enum HotelRateType { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Rate type information is unavailable. + UNAVAILABLE = 2; + + // Rates available to everyone. + PUBLIC_RATE = 3; + + // A membership program rate is available and satisfies basic requirements + // like having a public rate available. UI treatment will strikethrough the + // public rate and indicate that a discount is available to the user. For + // more on Qualified Rates, visit + // https://developers.google.com/hotels/hotel-ads/dev-guide/qualified-rates + QUALIFIED_RATE = 4; + + // Rates available to users that satisfy some eligibility criteria. e.g. + // all signed-in users, 20% of mobile users, all mobile users in Canada, + // etc. + PRIVATE_RATE = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/income_range_type.proto b/google/ads/googleads/v3/enums/income_range_type.proto new file mode 100644 index 000000000..e2bb50f0c --- /dev/null +++ b/google/ads/googleads/v3/enums/income_range_type.proto @@ -0,0 +1,65 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "IncomeRangeTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing income range types. + +// Container for enum describing the type of demographic income ranges. +message IncomeRangeTypeEnum { + // The type of demographic income ranges (e.g. between 0% to 50%). + enum IncomeRangeType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // 0%-50%. + INCOME_RANGE_0_50 = 510001; + + // 50% to 60%. + INCOME_RANGE_50_60 = 510002; + + // 60% to 70%. + INCOME_RANGE_60_70 = 510003; + + // 70% to 80%. + INCOME_RANGE_70_80 = 510004; + + // 80% to 90%. + INCOME_RANGE_80_90 = 510005; + + // Greater than 90%. + INCOME_RANGE_90_UP = 510006; + + // Undetermined income range. + INCOME_RANGE_UNDETERMINED = 510000; + } + + +} diff --git a/google/ads/googleads/v3/enums/interaction_event_type.proto b/google/ads/googleads/v3/enums/interaction_event_type.proto new file mode 100644 index 000000000..5c93c0a82 --- /dev/null +++ b/google/ads/googleads/v3/enums/interaction_event_type.proto @@ -0,0 +1,62 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "InteractionEventTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing types of payable and free interactions. + +// Container for enum describing types of payable and free interactions. +message InteractionEventTypeEnum { + // Enum describing possible types of payable and free interactions. + enum InteractionEventType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Click to site. In most cases, this interaction navigates to an external + // location, usually the advertiser's landing page. This is also the default + // InteractionEventType for click events. + CLICK = 2; + + // The user's expressed intent to engage with the ad in-place. + ENGAGEMENT = 3; + + // User viewed a video ad. + VIDEO_VIEW = 4; + + // The default InteractionEventType for ad conversion events. + // This is used when an ad conversion row does NOT indicate + // that the free interactions (i.e., the ad conversions) + // should be 'promoted' and reported as part of the core metrics. + // These are simply other (ad) conversions. + NONE = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/interaction_type.proto b/google/ads/googleads/v3/enums/interaction_type.proto new file mode 100644 index 000000000..b50f85ead --- /dev/null +++ b/google/ads/googleads/v3/enums/interaction_type.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "InteractionTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing interaction types. + +// Container for enum describing possible interaction types. +message InteractionTypeEnum { + // Enum describing possible interaction types. + enum InteractionType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Calls. + CALLS = 8000; + } + + +} diff --git a/google/ads/googleads/v3/enums/invoice_type.proto b/google/ads/googleads/v3/enums/invoice_type.proto new file mode 100644 index 000000000..0013adcfc --- /dev/null +++ b/google/ads/googleads/v3/enums/invoice_type.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "InvoiceTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing invoice types. + +// Container for enum describing the type of invoices. +message InvoiceTypeEnum { + // The possible type of invoices. + enum InvoiceType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // An invoice with a negative amount. The account receives a credit. + CREDIT_MEMO = 2; + + // An invoice with a positive amount. The account owes a balance. + INVOICE = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/job_placeholder_field.proto b/google/ads/googleads/v3/enums/job_placeholder_field.proto new file mode 100644 index 000000000..ac09c8933 --- /dev/null +++ b/google/ads/googleads/v3/enums/job_placeholder_field.proto @@ -0,0 +1,115 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "JobsPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Job placeholder fields. + +// Values for Job placeholder fields. +// For more information about dynamic remarketing feeds, see +// https://support.google.com/google-ads/answer/6053288. +message JobPlaceholderFieldEnum { + // Possible values for Job placeholder fields. + enum JobPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. Required. If only JOB_ID is specified, then it must be + // unique. If both JOB_ID and LOCATION_ID are specified, then the + // pair must be unique. + // ID) pair must be unique. + JOB_ID = 2; + + // Data Type: STRING. Combination of JOB_ID and LOCATION_ID must be unique + // per offer. + LOCATION_ID = 3; + + // Data Type: STRING. Required. Main headline with job title to be shown in + // dynamic ad. + TITLE = 4; + + // Data Type: STRING. Job subtitle to be shown in dynamic ad. + SUBTITLE = 5; + + // Data Type: STRING. Description of job to be shown in dynamic ad. + DESCRIPTION = 6; + + // Data Type: URL. Image to be displayed in the ad. Highly recommended for + // image ads. + IMAGE_URL = 7; + + // Data Type: STRING. Category of property used to group like items together + // for recommendation engine. + CATEGORY = 8; + + // Data Type: STRING_LIST. Keywords used for product retrieval. + CONTEXTUAL_KEYWORDS = 9; + + // Data Type: STRING. Complete property address, including postal code. + ADDRESS = 10; + + // Data Type: STRING. Salary or salary range of job to be shown in dynamic + // ad. + SALARY = 11; + + // Data Type: URL_LIST. Required. Final URLs to be used in ad when using + // Upgraded URLs; the more specific the better (e.g. the individual URL of a + // specific job and its location). + FINAL_URLS = 12; + + // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded + // URLs. + FINAL_MOBILE_URLS = 14; + + // Data Type: URL. Tracking template for the ad when using Upgraded URLs. + TRACKING_URL = 15; + + // Data Type: STRING. Android app link. Must be formatted as: + // android-app://{package_id}/{scheme}/{host_path}. + // The components are defined as follows: + // package_id: app ID as specified in Google Play. + // scheme: the scheme to pass to the application. Can be HTTP, or a custom + // scheme. + // host_path: identifies the specific content within your application. + ANDROID_APP_LINK = 16; + + // Data Type: STRING_LIST. List of recommended job IDs to show together with + // this item. + SIMILAR_JOB_IDS = 17; + + // Data Type: STRING. iOS app link. + IOS_APP_LINK = 18; + + // Data Type: INT64. iOS app store ID. + IOS_APP_STORE_ID = 19; + } + + +} diff --git a/google/ads/googleads/v3/enums/keyword_match_type.proto b/google/ads/googleads/v3/enums/keyword_match_type.proto new file mode 100644 index 000000000..73a60905b --- /dev/null +++ b/google/ads/googleads/v3/enums/keyword_match_type.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "KeywordMatchTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Keyword match types. + +// Message describing Keyword match types. +message KeywordMatchTypeEnum { + // Possible Keyword match types. + enum KeywordMatchType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Exact match. + EXACT = 2; + + // Phrase match. + PHRASE = 3; + + // Broad match. + BROAD = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/keyword_plan_competition_level.proto b/google/ads/googleads/v3/enums/keyword_plan_competition_level.proto new file mode 100644 index 000000000..324e313dc --- /dev/null +++ b/google/ads/googleads/v3/enums/keyword_plan_competition_level.proto @@ -0,0 +1,57 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanCompetitionLevelProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Keyword Planner competition levels. + +// Container for enumeration of keyword competition levels. The competition +// level indicates how competitive ad placement is for a keyword and +// is determined by the number of advertisers bidding on that keyword relative +// to all keywords across Google. The competition level can depend on the +// location and Search Network targeting options you've selected. +message KeywordPlanCompetitionLevelEnum { + // Competition level of a keyword. + enum KeywordPlanCompetitionLevel { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Low competition. The Competition Index range for this is [0, 33]. + LOW = 2; + + // Medium competition. The Competition Index range for this is [34, 66]. + MEDIUM = 3; + + // High competition. The Competition Index range for this is [67, 100]. + HIGH = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/keyword_plan_forecast_interval.proto b/google/ads/googleads/v3/enums/keyword_plan_forecast_interval.proto new file mode 100644 index 000000000..c92f37503 --- /dev/null +++ b/google/ads/googleads/v3/enums/keyword_plan_forecast_interval.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanForecastIntervalProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing keyword plan forecast intervals. + +// Container for enumeration of forecast intervals. +message KeywordPlanForecastIntervalEnum { + // Forecast intervals. + enum KeywordPlanForecastInterval { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // The next week date range for keyword plan. The next week is based + // on the default locale of the user's account and is mostly SUN-SAT or + // MON-SUN. + // This can be different from next-7 days. + NEXT_WEEK = 3; + + // The next month date range for keyword plan. + NEXT_MONTH = 4; + + // The next quarter date range for keyword plan. + NEXT_QUARTER = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/keyword_plan_network.proto b/google/ads/googleads/v3/enums/keyword_plan_network.proto new file mode 100644 index 000000000..a3b0505fb --- /dev/null +++ b/google/ads/googleads/v3/enums/keyword_plan_network.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanNetworkProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Keyword Planner forecastable network types. + +// Container for enumeration of keyword plan forecastable network types. +message KeywordPlanNetworkEnum { + // Enumerates keyword plan forecastable network types. + enum KeywordPlanNetwork { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Google Search. + GOOGLE_SEARCH = 2; + + // Google Search + Search partners. + GOOGLE_SEARCH_AND_PARTNERS = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/label_status.proto b/google/ads/googleads/v3/enums/label_status.proto new file mode 100644 index 000000000..8b869e64d --- /dev/null +++ b/google/ads/googleads/v3/enums/label_status.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "LabelStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Container for enum describing possible status of a label. +message LabelStatusEnum { + // Possible statuses of a label. + enum LabelStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Label is enabled. + ENABLED = 2; + + // Label is removed. + REMOVED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/legacy_app_install_ad_app_store.proto b/google/ads/googleads/v3/enums/legacy_app_install_ad_app_store.proto new file mode 100644 index 000000000..c1cb10a80 --- /dev/null +++ b/google/ads/googleads/v3/enums/legacy_app_install_ad_app_store.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "LegacyAppInstallAdAppStoreProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing app store types for a legacy app install ad. + +// Container for enum describing app store type in a legacy app install ad. +message LegacyAppInstallAdAppStoreEnum { + // App store type in a legacy app install ad. + enum LegacyAppInstallAdAppStore { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Apple iTunes. + APPLE_APP_STORE = 2; + + // Google Play. + GOOGLE_PLAY = 3; + + // Windows Store. + WINDOWS_STORE = 4; + + // Windows Phone Store. + WINDOWS_PHONE_STORE = 5; + + // The app is hosted in a Chinese app store. + CN_APP_STORE = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/listing_custom_attribute_index.proto b/google/ads/googleads/v3/enums/listing_custom_attribute_index.proto new file mode 100644 index 000000000..f997c65af --- /dev/null +++ b/google/ads/googleads/v3/enums/listing_custom_attribute_index.proto @@ -0,0 +1,60 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ListingCustomAttributeIndexProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing listing custom attributes. + +// Container for enum describing the index of the listing custom attribute. +message ListingCustomAttributeIndexEnum { + // The index of the listing custom attribute. + enum ListingCustomAttributeIndex { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // First listing custom attribute. + INDEX0 = 7; + + // Second listing custom attribute. + INDEX1 = 8; + + // Third listing custom attribute. + INDEX2 = 9; + + // Fourth listing custom attribute. + INDEX3 = 10; + + // Fifth listing custom attribute. + INDEX4 = 11; + } + + +} diff --git a/google/ads/googleads/v3/enums/listing_group_type.proto b/google/ads/googleads/v3/enums/listing_group_type.proto new file mode 100644 index 000000000..fe75d13c1 --- /dev/null +++ b/google/ads/googleads/v3/enums/listing_group_type.proto @@ -0,0 +1,52 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ListingGroupTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing listing groups. + +// Container for enum describing the type of the listing group. +message ListingGroupTypeEnum { + // The type of the listing group. + enum ListingGroupType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Subdivision of products along some listing dimension. These nodes + // are not used by serving to target listing entries, but is purely + // to define the structure of the tree. + SUBDIVISION = 2; + + // Listing group unit that defines a bid. + UNIT = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/local_placeholder_field.proto b/google/ads/googleads/v3/enums/local_placeholder_field.proto new file mode 100644 index 000000000..c6f67d9dc --- /dev/null +++ b/google/ads/googleads/v3/enums/local_placeholder_field.proto @@ -0,0 +1,119 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "LocalPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Local placeholder fields. + +// Values for Local placeholder fields. +// For more information about dynamic remarketing feeds, see +// https://support.google.com/google-ads/answer/6053288. +message LocalPlaceholderFieldEnum { + // Possible values for Local placeholder fields. + enum LocalPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. Required. Unique ID. + DEAL_ID = 2; + + // Data Type: STRING. Required. Main headline with local deal title to be + // shown in dynamic ad. + DEAL_NAME = 3; + + // Data Type: STRING. Local deal subtitle to be shown in dynamic ad. + SUBTITLE = 4; + + // Data Type: STRING. Description of local deal to be shown in dynamic ad. + DESCRIPTION = 5; + + // Data Type: STRING. Price to be shown in the ad. Highly recommended for + // dynamic ads. Example: "100.00 USD" + PRICE = 6; + + // Data Type: STRING. Formatted price to be shown in the ad. + // Example: "Starting at $100.00 USD", "$80 - $100" + FORMATTED_PRICE = 7; + + // Data Type: STRING. Sale price to be shown in the ad. + // Example: "80.00 USD" + SALE_PRICE = 8; + + // Data Type: STRING. Formatted sale price to be shown in the ad. + // Example: "On sale for $80.00", "$60 - $80" + FORMATTED_SALE_PRICE = 9; + + // Data Type: URL. Image to be displayed in the ad. + IMAGE_URL = 10; + + // Data Type: STRING. Complete property address, including postal code. + ADDRESS = 11; + + // Data Type: STRING. Category of local deal used to group like items + // together for recommendation engine. + CATEGORY = 12; + + // Data Type: STRING_LIST. Keywords used for product retrieval. + CONTEXTUAL_KEYWORDS = 13; + + // Data Type: URL_LIST. Required. Final URLs to be used in ad when using + // Upgraded URLs; the more specific the better (e.g. the individual URL of a + // specific local deal and its location). + FINAL_URLS = 14; + + // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded + // URLs. + FINAL_MOBILE_URLS = 15; + + // Data Type: URL. Tracking template for the ad when using Upgraded URLs. + TRACKING_URL = 16; + + // Data Type: STRING. Android app link. Must be formatted as: + // android-app://{package_id}/{scheme}/{host_path}. + // The components are defined as follows: + // package_id: app ID as specified in Google Play. + // scheme: the scheme to pass to the application. Can be HTTP, or a custom + // scheme. + // host_path: identifies the specific content within your application. + ANDROID_APP_LINK = 17; + + // Data Type: STRING_LIST. List of recommended local deal IDs to show + // together with this item. + SIMILAR_DEAL_IDS = 18; + + // Data Type: STRING. iOS app link. + IOS_APP_LINK = 19; + + // Data Type: INT64. iOS app store ID. + IOS_APP_STORE_ID = 20; + } + + +} diff --git a/google/ads/googleads/v3/enums/location_extension_targeting_criterion_field.proto b/google/ads/googleads/v3/enums/location_extension_targeting_criterion_field.proto new file mode 100644 index 000000000..99f4bc5e1 --- /dev/null +++ b/google/ads/googleads/v3/enums/location_extension_targeting_criterion_field.proto @@ -0,0 +1,62 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "LocationExtensionTargetingCriterionFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Location Extension Targeting criterion fields. + +// Values for Location Extension Targeting criterion fields. +message LocationExtensionTargetingCriterionFieldEnum { + // Possible values for Location Extension Targeting criterion fields. + enum LocationExtensionTargetingCriterionField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. Line 1 of the business address. + ADDRESS_LINE_1 = 2; + + // Data Type: STRING. Line 2 of the business address. + ADDRESS_LINE_2 = 3; + + // Data Type: STRING. City of the business address. + CITY = 4; + + // Data Type: STRING. Province of the business address. + PROVINCE = 5; + + // Data Type: STRING. Postal code of the business address. + POSTAL_CODE = 6; + + // Data Type: STRING. Country code of the business address. + COUNTRY_CODE = 7; + } + + +} diff --git a/google/ads/googleads/v3/enums/location_group_radius_units.proto b/google/ads/googleads/v3/enums/location_group_radius_units.proto new file mode 100644 index 000000000..7a5480e20 --- /dev/null +++ b/google/ads/googleads/v3/enums/location_group_radius_units.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "LocationGroupRadiusUnitsProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing location group radius units. + +// Container for enum describing unit of radius in location group. +message LocationGroupRadiusUnitsEnum { + // The unit of radius distance in location group (e.g. MILES) + enum LocationGroupRadiusUnits { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Meters + METERS = 2; + + // Miles + MILES = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/location_placeholder_field.proto b/google/ads/googleads/v3/enums/location_placeholder_field.proto new file mode 100644 index 000000000..c8f4b4a73 --- /dev/null +++ b/google/ads/googleads/v3/enums/location_placeholder_field.proto @@ -0,0 +1,68 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "LocationPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Location placeholder fields. + +// Values for Location placeholder fields. +message LocationPlaceholderFieldEnum { + // Possible values for Location placeholder fields. + enum LocationPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. The name of the business. + BUSINESS_NAME = 2; + + // Data Type: STRING. Line 1 of the business address. + ADDRESS_LINE_1 = 3; + + // Data Type: STRING. Line 2 of the business address. + ADDRESS_LINE_2 = 4; + + // Data Type: STRING. City of the business address. + CITY = 5; + + // Data Type: STRING. Province of the business address. + PROVINCE = 6; + + // Data Type: STRING. Postal code of the business address. + POSTAL_CODE = 7; + + // Data Type: STRING. Country code of the business address. + COUNTRY_CODE = 8; + + // Data Type: STRING. Phone number of the business. + PHONE_NUMBER = 9; + } + + +} diff --git a/google/ads/googleads/v3/enums/manager_link_status.proto b/google/ads/googleads/v3/enums/manager_link_status.proto new file mode 100644 index 000000000..5a5ea0776 --- /dev/null +++ b/google/ads/googleads/v3/enums/manager_link_status.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ManagerLinkStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Container for enum describing possible status of a manager and client link. +message ManagerLinkStatusEnum { + // Possible statuses of a link. + enum ManagerLinkStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Indicates current in-effect relationship + ACTIVE = 2; + + // Indicates terminated relationship + INACTIVE = 3; + + // Indicates relationship has been requested by manager, but the client + // hasn't accepted yet. + PENDING = 4; + + // Relationship was requested by the manager, but the client has refused. + REFUSED = 5; + + // Indicates relationship has been requested by manager, but manager + // canceled it. + CANCELED = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/matching_function_context_type.proto b/google/ads/googleads/v3/enums/matching_function_context_type.proto new file mode 100644 index 000000000..3d123233e --- /dev/null +++ b/google/ads/googleads/v3/enums/matching_function_context_type.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MatchingFunctionContextTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing matching function context types. + +// Container for context types for an operand in a matching function. +message MatchingFunctionContextTypeEnum { + // Possible context types for an operand in a matching function. + enum MatchingFunctionContextType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Feed item id in the request context. + FEED_ITEM_ID = 2; + + // The device being used (possible values are 'Desktop' or 'Mobile'). + DEVICE_NAME = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/matching_function_operator.proto b/google/ads/googleads/v3/enums/matching_function_operator.proto new file mode 100644 index 000000000..378a21be7 --- /dev/null +++ b/google/ads/googleads/v3/enums/matching_function_operator.proto @@ -0,0 +1,65 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MatchingFunctionOperatorProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing matching function operators. + +// Container for enum describing matching function operator. +message MatchingFunctionOperatorEnum { + // Possible operators in a matching function. + enum MatchingFunctionOperator { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The IN operator. + IN = 2; + + // The IDENTITY operator. + IDENTITY = 3; + + // The EQUALS operator + EQUALS = 4; + + // Operator that takes two or more operands that are of type + // FunctionOperand and checks that all the operands evaluate to true. + // For functions related to ad formats, all the operands must be in + // left_operands. + AND = 5; + + // Operator that returns true if the elements in left_operands contain any + // of the elements in right_operands. Otherwise, return false. The + // right_operands must contain at least 1 and no more than 3 + // ConstantOperands. + CONTAINS_ANY = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/media_type.proto b/google/ads/googleads/v3/enums/media_type.proto new file mode 100644 index 000000000..ce85a74e3 --- /dev/null +++ b/google/ads/googleads/v3/enums/media_type.proto @@ -0,0 +1,64 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MediaTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing media types. + +// Container for enum describing the types of media. +message MediaTypeEnum { + // The type of media. + enum MediaType { + // The media type has not been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // Static image, used for image ad. + IMAGE = 2; + + // Small image, used for map ad. + ICON = 3; + + // ZIP file, used in fields of template ads. + MEDIA_BUNDLE = 4; + + // Audio file. + AUDIO = 5; + + // Video file. + VIDEO = 6; + + // Animated image, such as animated GIF. + DYNAMIC_IMAGE = 7; + } + + +} diff --git a/google/ads/googleads/v3/enums/merchant_center_link_status.proto b/google/ads/googleads/v3/enums/merchant_center_link_status.proto new file mode 100644 index 000000000..f60f9b19f --- /dev/null +++ b/google/ads/googleads/v3/enums/merchant_center_link_status.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MerchantCenterLinkStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Merchant Center link statuses. + +// Container for enum describing possible statuses of a Google Merchant Center +// link. +message MerchantCenterLinkStatusEnum { + // Describes the possible statuses for a link between a Google Ads customer + // and a Google Merchant Center account. + enum MerchantCenterLinkStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The link is enabled. + ENABLED = 2; + + // The link has no effect. It was proposed by the Merchant Center Account + // owner and hasn't been confirmed by the customer. + PENDING = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/message_placeholder_field.proto b/google/ads/googleads/v3/enums/message_placeholder_field.proto new file mode 100644 index 000000000..57db0f293 --- /dev/null +++ b/google/ads/googleads/v3/enums/message_placeholder_field.proto @@ -0,0 +1,61 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MessagePlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Message placeholder fields. + +// Values for Message placeholder fields. +message MessagePlaceholderFieldEnum { + // Possible values for Message placeholder fields. + enum MessagePlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. The name of your business. + BUSINESS_NAME = 2; + + // Data Type: STRING. Country code of phone number. + COUNTRY_CODE = 3; + + // Data Type: STRING. A phone number that's capable of sending and receiving + // text messages. + PHONE_NUMBER = 4; + + // Data Type: STRING. The text that will go in your click-to-message ad. + MESSAGE_EXTENSION_TEXT = 5; + + // Data Type: STRING. The message text automatically shows in people's + // messaging apps when they tap to send you a message. + MESSAGE_TEXT = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/mime_type.proto b/google/ads/googleads/v3/enums/mime_type.proto new file mode 100644 index 000000000..7956c2535 --- /dev/null +++ b/google/ads/googleads/v3/enums/mime_type.proto @@ -0,0 +1,82 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MimeTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing mime types. + +// Container for enum describing the mime types. +message MimeTypeEnum { + // The mime type + enum MimeType { + // The mime type has not been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // MIME type of image/jpeg. + IMAGE_JPEG = 2; + + // MIME type of image/gif. + IMAGE_GIF = 3; + + // MIME type of image/png. + IMAGE_PNG = 4; + + // MIME type of application/x-shockwave-flash. + FLASH = 5; + + // MIME type of text/html. + TEXT_HTML = 6; + + // MIME type of application/pdf. + PDF = 7; + + // MIME type of application/msword. + MSWORD = 8; + + // MIME type of application/vnd.ms-excel. + MSEXCEL = 9; + + // MIME type of application/rtf. + RTF = 10; + + // MIME type of audio/wav. + AUDIO_WAV = 11; + + // MIME type of audio/mp3. + AUDIO_MP3 = 12; + + // MIME type of application/x-html5-ad-zip. + HTML5_AD_ZIP = 13; + } + + +} diff --git a/google/ads/googleads/v3/enums/minute_of_hour.proto b/google/ads/googleads/v3/enums/minute_of_hour.proto new file mode 100644 index 000000000..1545fe9e4 --- /dev/null +++ b/google/ads/googleads/v3/enums/minute_of_hour.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MinuteOfHourProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing days of week. + +// Container for enumeration of quarter-hours. +message MinuteOfHourEnum { + // Enumerates of quarter-hours. E.g. "FIFTEEN" + enum MinuteOfHour { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Zero minutes past the hour. + ZERO = 2; + + // Fifteen minutes past the hour. + FIFTEEN = 3; + + // Thirty minutes past the hour. + THIRTY = 4; + + // Forty-five minutes past the hour. + FORTY_FIVE = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/mobile_device_type.proto b/google/ads/googleads/v3/enums/mobile_device_type.proto new file mode 100644 index 000000000..8cdec0de8 --- /dev/null +++ b/google/ads/googleads/v3/enums/mobile_device_type.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MobileDeviceTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing mobile device types. + +// Container for enum describing the types of mobile device. +message MobileDeviceTypeEnum { + // The type of mobile device. + enum MobileDeviceType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Mobile phones. + MOBILE = 2; + + // Tablets. + TABLET = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/month_of_year.proto b/google/ads/googleads/v3/enums/month_of_year.proto new file mode 100644 index 000000000..ae6255fd1 --- /dev/null +++ b/google/ads/googleads/v3/enums/month_of_year.proto @@ -0,0 +1,80 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MonthOfYearProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing days of week. + +// Container for enumeration of months of the year, e.g., "January". +message MonthOfYearEnum { + // Enumerates months of the year, e.g., "January". + enum MonthOfYear { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // January. + JANUARY = 2; + + // February. + FEBRUARY = 3; + + // March. + MARCH = 4; + + // April. + APRIL = 5; + + // May. + MAY = 6; + + // June. + JUNE = 7; + + // July. + JULY = 8; + + // August. + AUGUST = 9; + + // September. + SEPTEMBER = 10; + + // October. + OCTOBER = 11; + + // November. + NOVEMBER = 12; + + // December. + DECEMBER = 13; + } + + +} diff --git a/google/ads/googleads/v3/enums/mutate_job_status.proto b/google/ads/googleads/v3/enums/mutate_job_status.proto new file mode 100644 index 000000000..840ffe8be --- /dev/null +++ b/google/ads/googleads/v3/enums/mutate_job_status.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MutateJobStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing mutate job statuses. + +// Container for enum describing possible mutate job statuses. +message MutateJobStatusEnum { + // The mutate job statuses. + enum MutateJobStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The job is not currently running. + PENDING = 2; + + // The job is running. + RUNNING = 3; + + // The job is done. + DONE = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/negative_geo_target_type.proto b/google/ads/googleads/v3/enums/negative_geo_target_type.proto new file mode 100644 index 000000000..7e19c16dc --- /dev/null +++ b/google/ads/googleads/v3/enums/negative_geo_target_type.proto @@ -0,0 +1,52 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "NegativeGeoTargetTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing negative geo target types. + +// Container for enum describing possible negative geo target types. +message NegativeGeoTargetTypeEnum { + // The possible negative geo target types. + enum NegativeGeoTargetType { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Specifies that a user is excluded from seeing the ad if they + // are in, or show interest in, advertiser's excluded locations. + PRESENCE_OR_INTEREST = 4; + + // Specifies that a user is excluded from seeing the ad if they + // are in advertiser's excluded locations. + PRESENCE = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/offline_user_data_job_failure_reason.proto b/google/ads/googleads/v3/enums/offline_user_data_job_failure_reason.proto new file mode 100644 index 000000000..c0dfad32d --- /dev/null +++ b/google/ads/googleads/v3/enums/offline_user_data_job_failure_reason.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "OfflineUserDataJobFailureReasonProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing offline user data job failure reasons. + +// Container for enum describing reasons why an offline user data job +// failed to be processed. +message OfflineUserDataJobFailureReasonEnum { + // The failure reason of an offline user data job. + enum OfflineUserDataJobFailureReason { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The matched transactions are insufficient. + INSUFFICIENT_MATCHED_TRANSACTIONS = 2; + + // The uploaded transactions are insufficient. + INSUFFICIENT_TRANSACTIONS = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/offline_user_data_job_status.proto b/google/ads/googleads/v3/enums/offline_user_data_job_status.proto new file mode 100644 index 000000000..b13b6eaed --- /dev/null +++ b/google/ads/googleads/v3/enums/offline_user_data_job_status.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "OfflineUserDataJobStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing offline user data job status. + +// Container for enum describing status of an offline user data job. +message OfflineUserDataJobStatusEnum { + // The status of an offline user data job. + enum OfflineUserDataJobStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The job has been successfully created and pending for uploading. + PENDING = 2; + + // Upload(s) have been accepted and data is being processed. + RUNNING = 3; + + // Uploaded data has been successfully processed. + SUCCESS = 4; + + // Uploaded data has failed to be processed. + FAILED = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/offline_user_data_job_type.proto b/google/ads/googleads/v3/enums/offline_user_data_job_type.proto new file mode 100644 index 000000000..c1983eb70 --- /dev/null +++ b/google/ads/googleads/v3/enums/offline_user_data_job_type.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "OfflineUserDataJobTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing offline user data job types. + +// Container for enum describing types of an offline user data job. +message OfflineUserDataJobTypeEnum { + // The type of an offline user data job. + enum OfflineUserDataJobType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Store Sales Direct data for self service. + STORE_SALES_UPLOAD_FIRST_PARTY = 2; + + // Store Sales Direct data for third party. + STORE_SALES_UPLOAD_THIRD_PARTY = 3; + + // Customer Match user list data. + CUSTOMER_MATCH_USER_LIST = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/operating_system_version_operator_type.proto b/google/ads/googleads/v3/enums/operating_system_version_operator_type.proto new file mode 100644 index 000000000..d1369b20a --- /dev/null +++ b/google/ads/googleads/v3/enums/operating_system_version_operator_type.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "OperatingSystemVersionOperatorTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing operating system version operator types. + +// Container for enum describing the type of OS operators. +message OperatingSystemVersionOperatorTypeEnum { + // The type of operating system version. + enum OperatingSystemVersionOperatorType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Equals to the specified version. + EQUALS_TO = 2; + + // Greater than or equals to the specified version. + GREATER_THAN_EQUALS_TO = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/page_one_promoted_strategy_goal.proto b/google/ads/googleads/v3/enums/page_one_promoted_strategy_goal.proto new file mode 100644 index 000000000..7b0ad9dc6 --- /dev/null +++ b/google/ads/googleads/v3/enums/page_one_promoted_strategy_goal.proto @@ -0,0 +1,30 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PageOnePromotedStrategyGoalProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing bidding schemes. diff --git a/google/ads/googleads/v3/enums/parental_status_type.proto b/google/ads/googleads/v3/enums/parental_status_type.proto new file mode 100644 index 000000000..ed4d12020 --- /dev/null +++ b/google/ads/googleads/v3/enums/parental_status_type.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ParentalStatusTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing parenal status types. + +// Container for enum describing the type of demographic parental statuses. +message ParentalStatusTypeEnum { + // The type of parental statuses (e.g. not a parent). + enum ParentalStatusType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Parent. + PARENT = 300; + + // Not a parent. + NOT_A_PARENT = 301; + + // Undetermined parental status. + UNDETERMINED = 302; + } + + +} diff --git a/google/ads/googleads/v3/enums/payment_mode.proto b/google/ads/googleads/v3/enums/payment_mode.proto new file mode 100644 index 000000000..29ab88f2a --- /dev/null +++ b/google/ads/googleads/v3/enums/payment_mode.proto @@ -0,0 +1,64 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PaymentModeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing payment modes. + +// Container for enum describing possible payment modes. +message PaymentModeEnum { + // Enum describing possible payment modes. + enum PaymentMode { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Pay per click. + CLICKS = 4; + + // Pay per conversion value. This mode is only supported by campaigns with + // AdvertisingChannelType.HOTEL, BiddingStrategyType.COMMISSION, and + // BudgetType.HOTEL_ADS_COMMISSION. + CONVERSION_VALUE = 5; + + // Pay per conversion. This mode is only supported by campaigns with + // AdvertisingChannelType.DISPLAY (excluding + // AdvertisingChannelSubType.DISPLAY_GMAIL), BiddingStrategyType.TARGET_CPA, + // and BudgetType.FIXED_CPA. The customer must also be eligible for this + // mode. See Customer.eligibility_failure_reasons for details. + CONVERSIONS = 6; + + // Pay per guest stay value. This mode is only supported by campaigns with + // AdvertisingChannelType.HOTEL, BiddingStrategyType.COMMISSION, and + // BudgetType.STANDARD. + GUEST_STAY = 7; + } + + +} diff --git a/google/ads/googleads/v3/enums/placeholder_type.proto b/google/ads/googleads/v3/enums/placeholder_type.proto new file mode 100644 index 000000000..cd0959a1b --- /dev/null +++ b/google/ads/googleads/v3/enums/placeholder_type.proto @@ -0,0 +1,121 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PlaceholderTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing feed placeholder types. + +// Container for enum describing possible placeholder types for a feed mapping. +message PlaceholderTypeEnum { + // Possible placeholder types for a feed mapping. + enum PlaceholderType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Lets you show links in your ad to pages from your website, including the + // main landing page. + SITELINK = 2; + + // Lets you attach a phone number to an ad, allowing customers to call + // directly from the ad. + CALL = 3; + + // Lets you provide users with a link that points to a mobile app in + // addition to a website. + APP = 4; + + // Lets you show locations of businesses from your Google My Business + // account in your ad. This helps people find your locations by showing your + // ads with your address, a map to your location, or the distance to your + // business. This extension type is useful to draw customers to your + // brick-and-mortar location. + LOCATION = 5; + + // If you sell your product through retail chains, affiliate location + // extensions let you show nearby stores that carry your products. + AFFILIATE_LOCATION = 6; + + // Lets you include additional text with your search ads that provide + // detailed information about your business, including products and services + // you offer. Callouts appear in ads at the top and bottom of Google search + // results. + CALLOUT = 7; + + // Lets you add more info to your ad, specific to some predefined categories + // such as types, brands, styles, etc. A minimum of 3 text (SNIPPETS) values + // are required. + STRUCTURED_SNIPPET = 8; + + // Allows users to see your ad, click an icon, and contact you directly by + // text message. With one tap on your ad, people can contact you to book an + // appointment, get a quote, ask for information, or request a service. + MESSAGE = 9; + + // Lets you display prices for a list of items along with your ads. A price + // feed is composed of three to eight price table rows. + PRICE = 10; + + // Allows you to highlight sales and other promotions that let users see how + // they can save by buying now. + PROMOTION = 11; + + // Lets you dynamically inject custom data into the title and description + // of your ads. + AD_CUSTOMIZER = 12; + + // Indicates that this feed is for education dynamic remarketing. + DYNAMIC_EDUCATION = 13; + + // Indicates that this feed is for flight dynamic remarketing. + DYNAMIC_FLIGHT = 14; + + // Indicates that this feed is for a custom dynamic remarketing type. Use + // this only if the other business types don't apply to your products or + // services. + DYNAMIC_CUSTOM = 15; + + // Indicates that this feed is for hotels and rentals dynamic remarketing. + DYNAMIC_HOTEL = 16; + + // Indicates that this feed is for real estate dynamic remarketing. + DYNAMIC_REAL_ESTATE = 17; + + // Indicates that this feed is for travel dynamic remarketing. + DYNAMIC_TRAVEL = 18; + + // Indicates that this feed is for local deals dynamic remarketing. + DYNAMIC_LOCAL = 19; + + // Indicates that this feed is for job dynamic remarketing. + DYNAMIC_JOB = 20; + } + + +} diff --git a/google/ads/googleads/v3/enums/placement_type.proto b/google/ads/googleads/v3/enums/placement_type.proto new file mode 100644 index 000000000..942397dc3 --- /dev/null +++ b/google/ads/googleads/v3/enums/placement_type.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PlacementTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing placement types. + +// Container for enum describing possible placement types. +message PlacementTypeEnum { + // Possible placement types for a feed mapping. + enum PlacementType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Websites(e.g. 'www.flowers4sale.com'). + WEBSITE = 2; + + // Mobile application categories(e.g. 'Games'). + MOBILE_APP_CATEGORY = 3; + + // mobile applications(e.g. 'mobileapp::2-com.whatsthewordanswers'). + MOBILE_APPLICATION = 4; + + // YouTube videos(e.g. 'youtube.com/video/wtLJPvx7-ys'). + YOUTUBE_VIDEO = 5; + + // YouTube channels(e.g. 'youtube.com::L8ZULXASCc1I_oaOT0NaOQ'). + YOUTUBE_CHANNEL = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/policy_approval_status.proto b/google/ads/googleads/v3/enums/policy_approval_status.proto new file mode 100644 index 000000000..9530d5268 --- /dev/null +++ b/google/ads/googleads/v3/enums/policy_approval_status.proto @@ -0,0 +1,61 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PolicyApprovalStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing policy approval statuses. + +// Container for enum describing possible policy approval statuses. +message PolicyApprovalStatusEnum { + // The possible policy approval statuses. When there are several approval + // statuses available the most severe one will be used. The order of severity + // is DISAPPROVED, AREA_OF_INTEREST_ONLY, APPROVED_LIMITED and APPROVED. + enum PolicyApprovalStatus { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // Will not serve. + DISAPPROVED = 2; + + // Serves with restrictions. + APPROVED_LIMITED = 3; + + // Serves without restrictions. + APPROVED = 4; + + // Will not serve in targeted countries, but may serve for users who are + // searching for information about the targeted countries. + AREA_OF_INTEREST_ONLY = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/policy_review_status.proto b/google/ads/googleads/v3/enums/policy_review_status.proto new file mode 100644 index 000000000..cdc9dde4c --- /dev/null +++ b/google/ads/googleads/v3/enums/policy_review_status.proto @@ -0,0 +1,60 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PolicyReviewStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing policy review statuses. + +// Container for enum describing possible policy review statuses. +message PolicyReviewStatusEnum { + // The possible policy review statuses. + enum PolicyReviewStatus { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // Currently under review. + REVIEW_IN_PROGRESS = 2; + + // Primary review complete. Other reviews may be continuing. + REVIEWED = 3; + + // The resource has been resubmitted for approval or its policy decision has + // been appealed. + UNDER_APPEAL = 4; + + // The resource is eligible and may be serving but could still undergo + // further review. + ELIGIBLE_MAY_SERVE = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/policy_topic_entry_type.proto b/google/ads/googleads/v3/enums/policy_topic_entry_type.proto new file mode 100644 index 000000000..087e18b9a --- /dev/null +++ b/google/ads/googleads/v3/enums/policy_topic_entry_type.proto @@ -0,0 +1,66 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PolicyTopicEntryTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing policy topic entry types. + +// Container for enum describing possible policy topic entry types. +message PolicyTopicEntryTypeEnum { + // The possible policy topic entry types. + enum PolicyTopicEntryType { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // The resource will not be served. + PROHIBITED = 2; + + // The resource will not be served under some circumstances. + LIMITED = 4; + + // The resource cannot serve at all because of the current targeting + // criteria. + FULLY_LIMITED = 8; + + // May be of interest, but does not limit how the resource is served. + DESCRIPTIVE = 5; + + // Could increase coverage beyond normal. + BROADENING = 6; + + // Constrained for all targeted countries, but may serve in other countries + // through area of interest. + AREA_OF_INTEREST_ONLY = 7; + } + + +} diff --git a/google/ads/googleads/v3/enums/policy_topic_evidence_destination_mismatch_url_type.proto b/google/ads/googleads/v3/enums/policy_topic_evidence_destination_mismatch_url_type.proto new file mode 100644 index 000000000..d9abcddc4 --- /dev/null +++ b/google/ads/googleads/v3/enums/policy_topic_evidence_destination_mismatch_url_type.proto @@ -0,0 +1,62 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PolicyTopicEvidenceDestinationMismatchUrlTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing policy topic evidence destination mismatch url types. + +// Container for enum describing possible policy topic evidence destination +// mismatch url types. +message PolicyTopicEvidenceDestinationMismatchUrlTypeEnum { + // The possible policy topic evidence destination mismatch url types. + enum PolicyTopicEvidenceDestinationMismatchUrlType { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // The display url. + DISPLAY_URL = 2; + + // The final url. + FINAL_URL = 3; + + // The final mobile url. + FINAL_MOBILE_URL = 4; + + // The tracking url template, with substituted desktop url. + TRACKING_URL = 5; + + // The tracking url template, with substituted mobile url. + MOBILE_TRACKING_URL = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/policy_topic_evidence_destination_not_working_device.proto b/google/ads/googleads/v3/enums/policy_topic_evidence_destination_not_working_device.proto new file mode 100644 index 000000000..bb77e67e2 --- /dev/null +++ b/google/ads/googleads/v3/enums/policy_topic_evidence_destination_not_working_device.proto @@ -0,0 +1,57 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PolicyTopicEvidenceDestinationNotWorkingDeviceProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing device of destination not working policy topic +// evidence. + +// Container for enum describing possible policy topic evidence destination not +// working devices. +message PolicyTopicEvidenceDestinationNotWorkingDeviceEnum { + // The possible policy topic evidence destination not working devices. + enum PolicyTopicEvidenceDestinationNotWorkingDevice { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // Landing page doesn't work on desktop device. + DESKTOP = 2; + + // Landing page doesn't work on Android device. + ANDROID = 3; + + // Landing page doesn't work on iOS device. + IOS = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/policy_topic_evidence_destination_not_working_dns_error_type.proto b/google/ads/googleads/v3/enums/policy_topic_evidence_destination_not_working_dns_error_type.proto new file mode 100644 index 000000000..5c33b35c2 --- /dev/null +++ b/google/ads/googleads/v3/enums/policy_topic_evidence_destination_not_working_dns_error_type.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PolicyTopicEvidenceDestinationNotWorkingDnsErrorTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing DNS error types of destination not working policy topic +// evidence. + +// Container for enum describing possible policy topic evidence destination not +// working DNS error types. +message PolicyTopicEvidenceDestinationNotWorkingDnsErrorTypeEnum { + // The possible policy topic evidence destination not working DNS error types. + enum PolicyTopicEvidenceDestinationNotWorkingDnsErrorType { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // Host name not found in DNS when fetching landing page. + HOSTNAME_NOT_FOUND = 2; + + // Google internal crawler issue when communicating with DNS. This error + // doesn't mean the landing page doesn't work. Google will recrawl the + // landing page. + GOOGLE_CRAWLER_DNS_ISSUE = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/positive_geo_target_type.proto b/google/ads/googleads/v3/enums/positive_geo_target_type.proto new file mode 100644 index 000000000..7dc400989 --- /dev/null +++ b/google/ads/googleads/v3/enums/positive_geo_target_type.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PositiveGeoTargetTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing positive geo target types. + +// Container for enum describing possible positive geo target types. +message PositiveGeoTargetTypeEnum { + // The possible positive geo target types. + enum PositiveGeoTargetType { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Specifies that an ad is triggered if the user is in, + // or shows interest in, advertiser's targeted locations. + PRESENCE_OR_INTEREST = 5; + + // Specifies that an ad is triggered if the user + // searches for advertiser's targeted locations. + SEARCH_INTEREST = 6; + + // Specifies that an ad is triggered if the user is in + // or regularly in advertiser's targeted locations. + PRESENCE = 7; + } + + +} diff --git a/google/ads/googleads/v3/enums/preferred_content_type.proto b/google/ads/googleads/v3/enums/preferred_content_type.proto new file mode 100644 index 000000000..4e40b2a75 --- /dev/null +++ b/google/ads/googleads/v3/enums/preferred_content_type.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PreferredContentTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing preferred content criterion type. + +// Container for enumeration of preferred content criterion type. +message PreferredContentTypeEnum { + // Enumerates preferred content criterion type. + enum PreferredContentType { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Represents top content on YouTube. + YOUTUBE_TOP_CONTENT = 400; + } + + +} diff --git a/google/ads/googleads/v3/enums/price_extension_price_qualifier.proto b/google/ads/googleads/v3/enums/price_extension_price_qualifier.proto new file mode 100644 index 000000000..36fb1d4e5 --- /dev/null +++ b/google/ads/googleads/v3/enums/price_extension_price_qualifier.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PriceExtensionPriceQualifierProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing price extension price qualifier type. + +// Container for enum describing a price extension price qualifier. +message PriceExtensionPriceQualifierEnum { + // Enums of price extension price qualifier. + enum PriceExtensionPriceQualifier { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // 'From' qualifier for the price. + FROM = 2; + + // 'Up to' qualifier for the price. + UP_TO = 3; + + // 'Average' qualifier for the price. + AVERAGE = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/price_extension_price_unit.proto b/google/ads/googleads/v3/enums/price_extension_price_unit.proto new file mode 100644 index 000000000..6d5d06ad1 --- /dev/null +++ b/google/ads/googleads/v3/enums/price_extension_price_unit.proto @@ -0,0 +1,62 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PriceExtensionPriceUnitProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing price extension price unit. + +// Container for enum describing price extension price unit. +message PriceExtensionPriceUnitEnum { + // Price extension price unit. + enum PriceExtensionPriceUnit { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Per hour. + PER_HOUR = 2; + + // Per day. + PER_DAY = 3; + + // Per week. + PER_WEEK = 4; + + // Per month. + PER_MONTH = 5; + + // Per year. + PER_YEAR = 6; + + // Per night. + PER_NIGHT = 7; + } + + +} diff --git a/google/ads/googleads/v3/enums/price_extension_type.proto b/google/ads/googleads/v3/enums/price_extension_type.proto new file mode 100644 index 000000000..c2bccdced --- /dev/null +++ b/google/ads/googleads/v3/enums/price_extension_type.proto @@ -0,0 +1,71 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PriceExtensionTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing price extension type. + +// Container for enum describing types for a price extension. +message PriceExtensionTypeEnum { + // Price extension type. + enum PriceExtensionType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The type for showing a list of brands. + BRANDS = 2; + + // The type for showing a list of events. + EVENTS = 3; + + // The type for showing locations relevant to your business. + LOCATIONS = 4; + + // The type for showing sub-regions or districts within a city or region. + NEIGHBORHOODS = 5; + + // The type for showing a collection of product categories. + PRODUCT_CATEGORIES = 6; + + // The type for showing a collection of related product tiers. + PRODUCT_TIERS = 7; + + // The type for showing a collection of services offered by your business. + SERVICES = 8; + + // The type for showing a collection of service categories. + SERVICE_CATEGORIES = 9; + + // The type for showing a collection of related service tiers. + SERVICE_TIERS = 10; + } + + +} diff --git a/google/ads/googleads/v3/enums/price_placeholder_field.proto b/google/ads/googleads/v3/enums/price_placeholder_field.proto new file mode 100644 index 000000000..15b3b82ef --- /dev/null +++ b/google/ads/googleads/v3/enums/price_placeholder_field.proto @@ -0,0 +1,240 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PricePlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Price placeholder fields. + +// Values for Price placeholder fields. +message PricePlaceholderFieldEnum { + // Possible values for Price placeholder fields. + enum PricePlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. The type of your price feed. Must match one of the + // predefined price feed type exactly. + TYPE = 2; + + // Data Type: STRING. The qualifier of each price. Must match one of the + // predefined price qualifiers exactly. + PRICE_QUALIFIER = 3; + + // Data Type: URL. Tracking template for the price feed when using Upgraded + // URLs. + TRACKING_TEMPLATE = 4; + + // Data Type: STRING. Language of the price feed. Must match one of the + // available available locale codes exactly. + LANGUAGE = 5; + + // Data Type: STRING. Final URL suffix for the price feed when using + // parallel tracking. + FINAL_URL_SUFFIX = 6; + + // Data Type: STRING. The header of item 1 of the table. + ITEM_1_HEADER = 100; + + // Data Type: STRING. The description of item 1 of the table. + ITEM_1_DESCRIPTION = 101; + + // Data Type: MONEY. The price (money with currency) of item 1 of the table, + // e.g., 30 USD. The currency must match one of the available currencies. + ITEM_1_PRICE = 102; + + // Data Type: STRING. The price unit of item 1 of the table. Must match one + // of the predefined price units. + ITEM_1_UNIT = 103; + + // Data Type: URL_LIST. The final URLs of item 1 of the table when using + // Upgraded URLs. + ITEM_1_FINAL_URLS = 104; + + // Data Type: URL_LIST. The final mobile URLs of item 1 of the table when + // using Upgraded URLs. + ITEM_1_FINAL_MOBILE_URLS = 105; + + // Data Type: STRING. The header of item 2 of the table. + ITEM_2_HEADER = 200; + + // Data Type: STRING. The description of item 2 of the table. + ITEM_2_DESCRIPTION = 201; + + // Data Type: MONEY. The price (money with currency) of item 2 of the table, + // e.g., 30 USD. The currency must match one of the available currencies. + ITEM_2_PRICE = 202; + + // Data Type: STRING. The price unit of item 2 of the table. Must match one + // of the predefined price units. + ITEM_2_UNIT = 203; + + // Data Type: URL_LIST. The final URLs of item 2 of the table when using + // Upgraded URLs. + ITEM_2_FINAL_URLS = 204; + + // Data Type: URL_LIST. The final mobile URLs of item 2 of the table when + // using Upgraded URLs. + ITEM_2_FINAL_MOBILE_URLS = 205; + + // Data Type: STRING. The header of item 3 of the table. + ITEM_3_HEADER = 300; + + // Data Type: STRING. The description of item 3 of the table. + ITEM_3_DESCRIPTION = 301; + + // Data Type: MONEY. The price (money with currency) of item 3 of the table, + // e.g., 30 USD. The currency must match one of the available currencies. + ITEM_3_PRICE = 302; + + // Data Type: STRING. The price unit of item 3 of the table. Must match one + // of the predefined price units. + ITEM_3_UNIT = 303; + + // Data Type: URL_LIST. The final URLs of item 3 of the table when using + // Upgraded URLs. + ITEM_3_FINAL_URLS = 304; + + // Data Type: URL_LIST. The final mobile URLs of item 3 of the table when + // using Upgraded URLs. + ITEM_3_FINAL_MOBILE_URLS = 305; + + // Data Type: STRING. The header of item 4 of the table. + ITEM_4_HEADER = 400; + + // Data Type: STRING. The description of item 4 of the table. + ITEM_4_DESCRIPTION = 401; + + // Data Type: MONEY. The price (money with currency) of item 4 of the table, + // e.g., 30 USD. The currency must match one of the available currencies. + ITEM_4_PRICE = 402; + + // Data Type: STRING. The price unit of item 4 of the table. Must match one + // of the predefined price units. + ITEM_4_UNIT = 403; + + // Data Type: URL_LIST. The final URLs of item 4 of the table when using + // Upgraded URLs. + ITEM_4_FINAL_URLS = 404; + + // Data Type: URL_LIST. The final mobile URLs of item 4 of the table when + // using Upgraded URLs. + ITEM_4_FINAL_MOBILE_URLS = 405; + + // Data Type: STRING. The header of item 5 of the table. + ITEM_5_HEADER = 500; + + // Data Type: STRING. The description of item 5 of the table. + ITEM_5_DESCRIPTION = 501; + + // Data Type: MONEY. The price (money with currency) of item 5 of the table, + // e.g., 30 USD. The currency must match one of the available currencies. + ITEM_5_PRICE = 502; + + // Data Type: STRING. The price unit of item 5 of the table. Must match one + // of the predefined price units. + ITEM_5_UNIT = 503; + + // Data Type: URL_LIST. The final URLs of item 5 of the table when using + // Upgraded URLs. + ITEM_5_FINAL_URLS = 504; + + // Data Type: URL_LIST. The final mobile URLs of item 5 of the table when + // using Upgraded URLs. + ITEM_5_FINAL_MOBILE_URLS = 505; + + // Data Type: STRING. The header of item 6 of the table. + ITEM_6_HEADER = 600; + + // Data Type: STRING. The description of item 6 of the table. + ITEM_6_DESCRIPTION = 601; + + // Data Type: MONEY. The price (money with currency) of item 6 of the table, + // e.g., 30 USD. The currency must match one of the available currencies. + ITEM_6_PRICE = 602; + + // Data Type: STRING. The price unit of item 6 of the table. Must match one + // of the predefined price units. + ITEM_6_UNIT = 603; + + // Data Type: URL_LIST. The final URLs of item 6 of the table when using + // Upgraded URLs. + ITEM_6_FINAL_URLS = 604; + + // Data Type: URL_LIST. The final mobile URLs of item 6 of the table when + // using Upgraded URLs. + ITEM_6_FINAL_MOBILE_URLS = 605; + + // Data Type: STRING. The header of item 7 of the table. + ITEM_7_HEADER = 700; + + // Data Type: STRING. The description of item 7 of the table. + ITEM_7_DESCRIPTION = 701; + + // Data Type: MONEY. The price (money with currency) of item 7 of the table, + // e.g., 30 USD. The currency must match one of the available currencies. + ITEM_7_PRICE = 702; + + // Data Type: STRING. The price unit of item 7 of the table. Must match one + // of the predefined price units. + ITEM_7_UNIT = 703; + + // Data Type: URL_LIST. The final URLs of item 7 of the table when using + // Upgraded URLs. + ITEM_7_FINAL_URLS = 704; + + // Data Type: URL_LIST. The final mobile URLs of item 7 of the table when + // using Upgraded URLs. + ITEM_7_FINAL_MOBILE_URLS = 705; + + // Data Type: STRING. The header of item 8 of the table. + ITEM_8_HEADER = 800; + + // Data Type: STRING. The description of item 8 of the table. + ITEM_8_DESCRIPTION = 801; + + // Data Type: MONEY. The price (money with currency) of item 8 of the table, + // e.g., 30 USD. The currency must match one of the available currencies. + ITEM_8_PRICE = 802; + + // Data Type: STRING. The price unit of item 8 of the table. Must match one + // of the predefined price units. + ITEM_8_UNIT = 803; + + // Data Type: URL_LIST. The final URLs of item 8 of the table when using + // Upgraded URLs. + ITEM_8_FINAL_URLS = 804; + + // Data Type: URL_LIST. The final mobile URLs of item 8 of the table when + // using Upgraded URLs. + ITEM_8_FINAL_MOBILE_URLS = 805; + } + + +} diff --git a/google/ads/googleads/v3/enums/product_bidding_category_level.proto b/google/ads/googleads/v3/enums/product_bidding_category_level.proto new file mode 100644 index 000000000..4c0b0c162 --- /dev/null +++ b/google/ads/googleads/v3/enums/product_bidding_category_level.proto @@ -0,0 +1,57 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProductBiddingCategoryLevelProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Level of a product bidding category. +message ProductBiddingCategoryLevelEnum { + // Enum describing the level of the product bidding category. + enum ProductBiddingCategoryLevel { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Level 1. + LEVEL1 = 2; + + // Level 2. + LEVEL2 = 3; + + // Level 3. + LEVEL3 = 4; + + // Level 4. + LEVEL4 = 5; + + // Level 5. + LEVEL5 = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/product_bidding_category_status.proto b/google/ads/googleads/v3/enums/product_bidding_category_status.proto new file mode 100644 index 000000000..d3627f143 --- /dev/null +++ b/google/ads/googleads/v3/enums/product_bidding_category_status.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProductBiddingCategoryStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing bidding schemes. + +// Status of the product bidding category. +message ProductBiddingCategoryStatusEnum { + // Enum describing the status of the product bidding category. + enum ProductBiddingCategoryStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The category is active and can be used for bidding. + ACTIVE = 2; + + // The category is obsolete. Used only for reporting purposes. + OBSOLETE = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/product_channel.proto b/google/ads/googleads/v3/enums/product_channel.proto new file mode 100644 index 000000000..b1265b5a8 --- /dev/null +++ b/google/ads/googleads/v3/enums/product_channel.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProductChannelProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing bidding schemes. + +// Locality of a product offer. +message ProductChannelEnum { + // Enum describing the locality of a product offer. + enum ProductChannel { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The item is sold online. + ONLINE = 2; + + // The item is sold in local stores. + LOCAL = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/product_channel_exclusivity.proto b/google/ads/googleads/v3/enums/product_channel_exclusivity.proto new file mode 100644 index 000000000..30b183fbb --- /dev/null +++ b/google/ads/googleads/v3/enums/product_channel_exclusivity.proto @@ -0,0 +1,52 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProductChannelExclusivityProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing bidding schemes. + +// Availability of a product offer. +message ProductChannelExclusivityEnum { + // Enum describing the availability of a product offer. + enum ProductChannelExclusivity { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The item is sold through one channel only, either local stores or online + // as indicated by its ProductChannel. + SINGLE_CHANNEL = 2; + + // The item is matched to its online or local stores counterpart, indicating + // it is available for purchase in both ShoppingProductChannels. + MULTI_CHANNEL = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/product_condition.proto b/google/ads/googleads/v3/enums/product_condition.proto new file mode 100644 index 000000000..c43d6031b --- /dev/null +++ b/google/ads/googleads/v3/enums/product_condition.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProductConditionProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing bidding schemes. + +// Condition of a product offer. +message ProductConditionEnum { + // Enum describing the condition of a product offer. + enum ProductCondition { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The product condition is new. + NEW = 3; + + // The product condition is refurbished. + REFURBISHED = 4; + + // The product condition is used. + USED = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/product_custom_attribute_index.proto b/google/ads/googleads/v3/enums/product_custom_attribute_index.proto new file mode 100644 index 000000000..f4c5981db --- /dev/null +++ b/google/ads/googleads/v3/enums/product_custom_attribute_index.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProductCustomAttributeIndexProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing product custom attributes. + +// Container for enum describing the index of the product custom attribute. +message ProductCustomAttributeIndexEnum { + // The index of the product custom attribute. + enum ProductCustomAttributeIndex { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // First product custom attribute. + INDEX0 = 7; + + // Second product custom attribute. + INDEX1 = 8; + + // Third product custom attribute. + INDEX2 = 9; + + // Fourth product custom attribute. + INDEX3 = 10; + + // Fifth product custom attribute. + INDEX4 = 11; + } + + +} diff --git a/google/ads/googleads/v3/enums/product_type_level.proto b/google/ads/googleads/v3/enums/product_type_level.proto new file mode 100644 index 000000000..4fc7b976b --- /dev/null +++ b/google/ads/googleads/v3/enums/product_type_level.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProductTypeLevelProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing bidding schemes. + +// Level of the type of a product offer. +message ProductTypeLevelEnum { + // Enum describing the level of the type of a product offer. + enum ProductTypeLevel { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Level 1. + LEVEL1 = 7; + + // Level 2. + LEVEL2 = 8; + + // Level 3. + LEVEL3 = 9; + + // Level 4. + LEVEL4 = 10; + + // Level 5. + LEVEL5 = 11; + } + + +} diff --git a/google/ads/googleads/v3/enums/promotion_extension_discount_modifier.proto b/google/ads/googleads/v3/enums/promotion_extension_discount_modifier.proto new file mode 100644 index 000000000..467ac2482 --- /dev/null +++ b/google/ads/googleads/v3/enums/promotion_extension_discount_modifier.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PromotionExtensionDiscountModifierProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing promotion extension discount modifier. + +// Container for enum describing possible a promotion extension +// discount modifier. +message PromotionExtensionDiscountModifierEnum { + // A promotion extension discount modifier. + enum PromotionExtensionDiscountModifier { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // 'Up to'. + UP_TO = 2; + } + + +} diff --git a/google/ads/googleads/v3/enums/promotion_extension_occasion.proto b/google/ads/googleads/v3/enums/promotion_extension_occasion.proto new file mode 100644 index 000000000..493667ea4 --- /dev/null +++ b/google/ads/googleads/v3/enums/promotion_extension_occasion.proto @@ -0,0 +1,157 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PromotionExtensionOccasionProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing promotion extension occasion. + +// Container for enum describing a promotion extension occasion. +// For more information about the occasions please check: +// https://support.google.com/google-ads/answer/7367521 +message PromotionExtensionOccasionEnum { + // A promotion extension occasion. + enum PromotionExtensionOccasion { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // New Year's. + NEW_YEARS = 2; + + // Chinese New Year. + CHINESE_NEW_YEAR = 3; + + // Valentine's Day. + VALENTINES_DAY = 4; + + // Easter. + EASTER = 5; + + // Mother's Day. + MOTHERS_DAY = 6; + + // Father's Day. + FATHERS_DAY = 7; + + // Labor Day. + LABOR_DAY = 8; + + // Back To School. + BACK_TO_SCHOOL = 9; + + // Halloween. + HALLOWEEN = 10; + + // Black Friday. + BLACK_FRIDAY = 11; + + // Cyber Monday. + CYBER_MONDAY = 12; + + // Christmas. + CHRISTMAS = 13; + + // Boxing Day. + BOXING_DAY = 14; + + // Independence Day in any country. + INDEPENDENCE_DAY = 15; + + // National Day in any country. + NATIONAL_DAY = 16; + + // End of any season. + END_OF_SEASON = 17; + + // Winter Sale. + WINTER_SALE = 18; + + // Summer sale. + SUMMER_SALE = 19; + + // Fall Sale. + FALL_SALE = 20; + + // Spring Sale. + SPRING_SALE = 21; + + // Ramadan. + RAMADAN = 22; + + // Eid al-Fitr. + EID_AL_FITR = 23; + + // Eid al-Adha. + EID_AL_ADHA = 24; + + // Singles Day. + SINGLES_DAY = 25; + + // Women's Day. + WOMENS_DAY = 26; + + // Holi. + HOLI = 27; + + // Parent's Day. + PARENTS_DAY = 28; + + // St. Nicholas Day. + ST_NICHOLAS_DAY = 29; + + // Carnival. + CARNIVAL = 30; + + // Epiphany, also known as Three Kings' Day. + EPIPHANY = 31; + + // Rosh Hashanah. + ROSH_HASHANAH = 32; + + // Passover. + PASSOVER = 33; + + // Hanukkah. + HANUKKAH = 34; + + // Diwali. + DIWALI = 35; + + // Navratri. + NAVRATRI = 36; + + // Available in Thai: Songkran. + SONGKRAN = 37; + + // Available in Japanese: Year-end Gift. + YEAR_END_GIFT = 38; + } + + +} diff --git a/google/ads/googleads/v3/enums/promotion_placeholder_field.proto b/google/ads/googleads/v3/enums/promotion_placeholder_field.proto new file mode 100644 index 000000000..9b6d74b95 --- /dev/null +++ b/google/ads/googleads/v3/enums/promotion_placeholder_field.proto @@ -0,0 +1,95 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PromotionPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Promotion placeholder fields. + +// Values for Promotion placeholder fields. +message PromotionPlaceholderFieldEnum { + // Possible values for Promotion placeholder fields. + enum PromotionPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. The text that appears on the ad when the extension is + // shown. + PROMOTION_TARGET = 2; + + // Data Type: STRING. Allows you to add "up to" phrase to the promotion, + // in case you have variable promotion rates. + DISCOUNT_MODIFIER = 3; + + // Data Type: INT64. Takes a value in micros, where 1 million micros + // represents 1%, and is shown as a percentage when rendered. + PERCENT_OFF = 4; + + // Data Type: MONEY. Requires a currency and an amount of money. + MONEY_AMOUNT_OFF = 5; + + // Data Type: STRING. A string that the user enters to get the discount. + PROMOTION_CODE = 6; + + // Data Type: MONEY. A minimum spend before the user qualifies for the + // promotion. + ORDERS_OVER_AMOUNT = 7; + + // Data Type: DATE. The start date of the promotion. + PROMOTION_START = 8; + + // Data Type: DATE. The end date of the promotion. + PROMOTION_END = 9; + + // Data Type: STRING. Describes the associated event for the promotion using + // one of the PromotionExtensionOccasion enum values, for example NEW_YEARS. + OCCASION = 10; + + // Data Type: URL_LIST. Final URLs to be used in the ad when using Upgraded + // URLs. + FINAL_URLS = 11; + + // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded + // URLs. + FINAL_MOBILE_URLS = 12; + + // Data Type: URL. Tracking template for the ad when using Upgraded URLs. + TRACKING_URL = 13; + + // Data Type: STRING. A string represented by a language code for the + // promotion. + LANGUAGE = 14; + + // Data Type: STRING. Final URL suffix for the ad when using parallel + // tracking. + FINAL_URL_SUFFIX = 15; + } + + +} diff --git a/google/ads/googleads/v3/enums/proximity_radius_units.proto b/google/ads/googleads/v3/enums/proximity_radius_units.proto new file mode 100644 index 000000000..986ca5579 --- /dev/null +++ b/google/ads/googleads/v3/enums/proximity_radius_units.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProximityRadiusUnitsProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing proximity radius units. + +// Container for enum describing unit of radius in proximity. +message ProximityRadiusUnitsEnum { + // The unit of radius distance in proximity (e.g. MILES) + enum ProximityRadiusUnits { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Miles + MILES = 2; + + // Kilometers + KILOMETERS = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/quality_score_bucket.proto b/google/ads/googleads/v3/enums/quality_score_bucket.proto new file mode 100644 index 000000000..3b9e9b6f1 --- /dev/null +++ b/google/ads/googleads/v3/enums/quality_score_bucket.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "QualityScoreBucketProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing quality score buckets. + +// The relative performance compared to other advertisers. +message QualityScoreBucketEnum { + // Enum listing the possible quality score buckets. + enum QualityScoreBucket { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Quality of the creative is below average. + BELOW_AVERAGE = 2; + + // Quality of the creative is average. + AVERAGE = 3; + + // Quality of the creative is above average. + ABOVE_AVERAGE = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/reach_plan_ad_length.proto b/google/ads/googleads/v3/enums/reach_plan_ad_length.proto new file mode 100644 index 000000000..230918343 --- /dev/null +++ b/google/ads/googleads/v3/enums/reach_plan_ad_length.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ReachPlanAdLengthProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing ad lengths of a plannable video ad. + +// Message describing length of a plannable video ad. +message ReachPlanAdLengthEnum { + // Possible ad length values. + enum ReachPlanAdLength { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // 6 seconds long ad. + SIX_SECONDS = 2; + + // 15 or 20 seconds long ad. + FIFTEEN_OR_TWENTY_SECONDS = 3; + + // More than 20 seconds long ad. + TWENTY_SECONDS_OR_MORE = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/reach_plan_age_range.proto b/google/ads/googleads/v3/enums/reach_plan_age_range.proto new file mode 100644 index 000000000..8bfa2fa8b --- /dev/null +++ b/google/ads/googleads/v3/enums/reach_plan_age_range.proto @@ -0,0 +1,122 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ReachPlanAgeRangeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing a plannable age range. + +// Message describing plannable age ranges. +message ReachPlanAgeRangeEnum { + // Possible plannable age range values. + enum ReachPlanAgeRange { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Between 18 and 24 years old. + AGE_RANGE_18_24 = 503001; + + // Between 18 and 34 years old. + AGE_RANGE_18_34 = 2; + + // Between 18 and 44 years old. + AGE_RANGE_18_44 = 3; + + // Between 18 and 49 years old. + AGE_RANGE_18_49 = 4; + + // Between 18 and 54 years old. + AGE_RANGE_18_54 = 5; + + // Between 18 and 64 years old. + AGE_RANGE_18_64 = 6; + + // Between 18 and 65+ years old. + AGE_RANGE_18_65_UP = 7; + + // Between 21 and 34 years old. + AGE_RANGE_21_34 = 8; + + // Between 25 and 34 years old. + AGE_RANGE_25_34 = 503002; + + // Between 25 and 44 years old. + AGE_RANGE_25_44 = 9; + + // Between 25 and 49 years old. + AGE_RANGE_25_49 = 10; + + // Between 25 and 54 years old. + AGE_RANGE_25_54 = 11; + + // Between 25 and 64 years old. + AGE_RANGE_25_64 = 12; + + // Between 25 and 65+ years old. + AGE_RANGE_25_65_UP = 13; + + // Between 35 and 44 years old. + AGE_RANGE_35_44 = 503003; + + // Between 35 and 49 years old. + AGE_RANGE_35_49 = 14; + + // Between 35 and 54 years old. + AGE_RANGE_35_54 = 15; + + // Between 35 and 64 years old. + AGE_RANGE_35_64 = 16; + + // Between 35 and 65+ years old. + AGE_RANGE_35_65_UP = 17; + + // Between 45 and 54 years old. + AGE_RANGE_45_54 = 503004; + + // Between 45 and 64 years old. + AGE_RANGE_45_64 = 18; + + // Between 45 and 65+ years old. + AGE_RANGE_45_65_UP = 19; + + // Between 50 and 65+ years old. + AGE_RANGE_50_65_UP = 20; + + // Between 55 and 64 years old. + AGE_RANGE_55_64 = 503005; + + // Between 55 and 65+ years old. + AGE_RANGE_55_65_UP = 21; + + // 65 years old and beyond. + AGE_RANGE_65_UP = 503006; + } + + +} diff --git a/google/ads/googleads/v3/enums/reach_plan_network.proto b/google/ads/googleads/v3/enums/reach_plan_network.proto new file mode 100644 index 000000000..5c3029e6c --- /dev/null +++ b/google/ads/googleads/v3/enums/reach_plan_network.proto @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ReachPlanNetworkProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing a plannable network. + +// Container for enum describing plannable networks. +message ReachPlanNetworkEnum { + // Possible plannable network values. + enum ReachPlanNetwork { + // Not specified. + UNSPECIFIED = 0; + + // Used as a return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // YouTube network. + YOUTUBE = 2; + + // Google Video Partners (GVP) network. + GOOGLE_VIDEO_PARTNERS = 3; + + // A combination of the YouTube network and the Google Video Partners + // network. + YOUTUBE_AND_GOOGLE_VIDEO_PARTNERS = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/real_estate_placeholder_field.proto b/google/ads/googleads/v3/enums/real_estate_placeholder_field.proto new file mode 100644 index 000000000..11e113eb6 --- /dev/null +++ b/google/ads/googleads/v3/enums/real_estate_placeholder_field.proto @@ -0,0 +1,115 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "RealEstatePlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Real Estate placeholder fields. + +// Values for Real Estate placeholder fields. +// For more information about dynamic remarketing feeds, see +// https://support.google.com/google-ads/answer/6053288. +message RealEstatePlaceholderFieldEnum { + // Possible values for Real Estate placeholder fields. + enum RealEstatePlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. Unique ID. + LISTING_ID = 2; + + // Data Type: STRING. Main headline with listing name to be shown in dynamic + // ad. + LISTING_NAME = 3; + + // Data Type: STRING. City name to be shown in dynamic ad. + CITY_NAME = 4; + + // Data Type: STRING. Description of listing to be shown in dynamic ad. + DESCRIPTION = 5; + + // Data Type: STRING. Complete listing address, including postal code. + ADDRESS = 6; + + // Data Type: STRING. Price to be shown in the ad. + // Example: "100.00 USD" + PRICE = 7; + + // Data Type: STRING. Formatted price to be shown in the ad. + // Example: "Starting at $100.00 USD", "$80 - $100" + FORMATTED_PRICE = 8; + + // Data Type: URL. Image to be displayed in the ad. + IMAGE_URL = 9; + + // Data Type: STRING. Type of property (house, condo, apartment, etc.) used + // to group like items together for recommendation engine. + PROPERTY_TYPE = 10; + + // Data Type: STRING. Type of listing (resale, rental, foreclosure, etc.) + // used to group like items together for recommendation engine. + LISTING_TYPE = 11; + + // Data Type: STRING_LIST. Keywords used for product retrieval. + CONTEXTUAL_KEYWORDS = 12; + + // Data Type: URL_LIST. Final URLs to be used in ad when using Upgraded + // URLs; the more specific the better (e.g. the individual URL of a specific + // listing and its location). + FINAL_URLS = 13; + + // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded + // URLs. + FINAL_MOBILE_URLS = 14; + + // Data Type: URL. Tracking template for the ad when using Upgraded URLs. + TRACKING_URL = 15; + + // Data Type: STRING. Android app link. Must be formatted as: + // android-app://{package_id}/{scheme}/{host_path}. + // The components are defined as follows: + // package_id: app ID as specified in Google Play. + // scheme: the scheme to pass to the application. Can be HTTP, or a custom + // scheme. + // host_path: identifies the specific content within your application. + ANDROID_APP_LINK = 16; + + // Data Type: STRING_LIST. List of recommended listing IDs to show together + // with this item. + SIMILAR_LISTING_IDS = 17; + + // Data Type: STRING. iOS app link. + IOS_APP_LINK = 18; + + // Data Type: INT64. iOS app store ID. + IOS_APP_STORE_ID = 19; + } + + +} diff --git a/google/ads/googleads/v3/enums/recommendation_type.proto b/google/ads/googleads/v3/enums/recommendation_type.proto new file mode 100644 index 000000000..398c307f1 --- /dev/null +++ b/google/ads/googleads/v3/enums/recommendation_type.proto @@ -0,0 +1,92 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "RecommendationTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Recommendation types. + +// Container for enum describing types of recommendations. +message RecommendationTypeEnum { + // Types of recommendations. + enum RecommendationType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Budget recommendation for budget constrained campaigns. + CAMPAIGN_BUDGET = 2; + + // Keyword recommendation. + KEYWORD = 3; + + // Recommendation to add a new text ad. + TEXT_AD = 4; + + // Recommendation to update a campaign to use a Target CPA bidding strategy. + TARGET_CPA_OPT_IN = 5; + + // Recommendation to update a campaign to use the Maximize Conversions + // bidding strategy. + MAXIMIZE_CONVERSIONS_OPT_IN = 6; + + // Recommendation to enable Enhanced Cost Per Click for a campaign. + ENHANCED_CPC_OPT_IN = 7; + + // Recommendation to start showing your campaign's ads on Google Search + // Partners Websites. + SEARCH_PARTNERS_OPT_IN = 8; + + // Recommendation to update a campaign to use a Maximize Clicks bidding + // strategy. + MAXIMIZE_CLICKS_OPT_IN = 9; + + // Recommendation to start using the "Optimize" ad rotation setting for the + // given ad group. + OPTIMIZE_AD_ROTATION = 10; + + // Recommendation to add callout extensions to a campaign. + CALLOUT_EXTENSION = 11; + + // Recommendation to add sitelink extensions to a campaign. + SITELINK_EXTENSION = 12; + + // Recommendation to add call extensions to a campaign. + CALL_EXTENSION = 13; + + // Recommendation to change an existing keyword from one match type to a + // broader match type. + KEYWORD_MATCH_TYPE = 14; + + // Recommendation to move unused budget from one budget to a constrained + // budget. + MOVE_UNUSED_BUDGET = 15; + } + + +} diff --git a/google/ads/googleads/v3/enums/search_engine_results_page_type.proto b/google/ads/googleads/v3/enums/search_engine_results_page_type.proto new file mode 100644 index 000000000..0858f0c80 --- /dev/null +++ b/google/ads/googleads/v3/enums/search_engine_results_page_type.proto @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SearchEngineResultsPageTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing search engine results page types. + +// The type of the search engine results page. +message SearchEngineResultsPageTypeEnum { + // The type of the search engine results page. + enum SearchEngineResultsPageType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Only ads were contained in the search engine results page. + ADS_ONLY = 2; + + // Only organic results were contained in the search engine results page. + ORGANIC_ONLY = 3; + + // Both ads and organic results were contained in the search engine results + // page. + ADS_AND_ORGANIC = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/search_term_match_type.proto b/google/ads/googleads/v3/enums/search_term_match_type.proto new file mode 100644 index 000000000..47981c4b0 --- /dev/null +++ b/google/ads/googleads/v3/enums/search_term_match_type.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SearchTermMatchTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing search term match types. + +// Container for enum describing match types for a keyword triggering an ad. +message SearchTermMatchTypeEnum { + // Possible match types for a keyword triggering an ad, including variants. + enum SearchTermMatchType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Broad match. + BROAD = 2; + + // Exact match. + EXACT = 3; + + // Phrase match. + PHRASE = 4; + + // Exact match (close variant). + NEAR_EXACT = 5; + + // Phrase match (close variant). + NEAR_PHRASE = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/search_term_targeting_status.proto b/google/ads/googleads/v3/enums/search_term_targeting_status.proto new file mode 100644 index 000000000..cff59dfcc --- /dev/null +++ b/google/ads/googleads/v3/enums/search_term_targeting_status.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SearchTermTargetingStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing search term targeting statuses. + +// Container for enum indicating whether a search term is one of your targeted +// or excluded keywords. +message SearchTermTargetingStatusEnum { + // Indicates whether the search term is one of your targeted or excluded + // keywords. + enum SearchTermTargetingStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Search term is added to targeted keywords. + ADDED = 2; + + // Search term matches a negative keyword. + EXCLUDED = 3; + + // Search term has been both added and excluded. + ADDED_EXCLUDED = 4; + + // Search term is neither targeted nor excluded. + NONE = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/served_asset_field_type.proto b/google/ads/googleads/v3/enums/served_asset_field_type.proto new file mode 100644 index 000000000..5b0fdecb3 --- /dev/null +++ b/google/ads/googleads/v3/enums/served_asset_field_type.proto @@ -0,0 +1,61 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ServedAssetFieldTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing policy review statuses. + +// Container for enum describing possible asset field types. +message ServedAssetFieldTypeEnum { + // The possible asset field types. + enum ServedAssetFieldType { + // No value has been specified. + UNSPECIFIED = 0; + + // The received value is not known in this version. + // + // This is a response-only value. + UNKNOWN = 1; + + // The asset is used in headline 1. + HEADLINE_1 = 2; + + // The asset is used in headline 2. + HEADLINE_2 = 3; + + // The asset is used in headline 3. + HEADLINE_3 = 4; + + // The asset is used in description 1. + DESCRIPTION_1 = 5; + + // The asset is used in description 2. + DESCRIPTION_2 = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/shared_set_status.proto b/google/ads/googleads/v3/enums/shared_set_status.proto new file mode 100644 index 000000000..5eba8cd19 --- /dev/null +++ b/google/ads/googleads/v3/enums/shared_set_status.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SharedSetStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing shared set statuses. + +// Container for enum describing types of shared set statuses. +message SharedSetStatusEnum { + // Enum listing the possible shared set statuses. + enum SharedSetStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The shared set is enabled. + ENABLED = 2; + + // The shared set is removed and can no longer be used. + REMOVED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/shared_set_type.proto b/google/ads/googleads/v3/enums/shared_set_type.proto new file mode 100644 index 000000000..cbcb1cc7c --- /dev/null +++ b/google/ads/googleads/v3/enums/shared_set_type.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SharedSetTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing shared set types. + +// Container for enum describing types of shared sets. +message SharedSetTypeEnum { + // Enum listing the possible shared set types. + enum SharedSetType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // A set of keywords that can be excluded from targeting. + NEGATIVE_KEYWORDS = 2; + + // A set of placements that can be excluded from targeting. + NEGATIVE_PLACEMENTS = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/simulation_modification_method.proto b/google/ads/googleads/v3/enums/simulation_modification_method.proto new file mode 100644 index 000000000..069f6a257 --- /dev/null +++ b/google/ads/googleads/v3/enums/simulation_modification_method.proto @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SimulationModificationMethodProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing simulation modification methods. + +// Container for enum describing the method by which a simulation modifies +// a field. +message SimulationModificationMethodEnum { + // Enum describing the method by which a simulation modifies a field. + enum SimulationModificationMethod { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The values in a simulation were applied to all children of a given + // resource uniformly. Overrides on child resources were not respected. + UNIFORM = 2; + + // The values in a simulation were applied to the given resource. + // Overrides on child resources were respected, and traffic estimates + // do not include these resources. + DEFAULT = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/simulation_type.proto b/google/ads/googleads/v3/enums/simulation_type.proto new file mode 100644 index 000000000..bdc9cf299 --- /dev/null +++ b/google/ads/googleads/v3/enums/simulation_type.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SimulationTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing simulation types. + +// Container for enum describing the field a simulation modifies. +message SimulationTypeEnum { + // Enum describing the field a simulation modifies. + enum SimulationType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The simulation is for a cpc bid. + CPC_BID = 2; + + // The simulation is for a cpv bid. + CPV_BID = 3; + + // The simulation is for a cpa target. + TARGET_CPA = 4; + + // The simulation is for a bid modifier. + BID_MODIFIER = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/sitelink_placeholder_field.proto b/google/ads/googleads/v3/enums/sitelink_placeholder_field.proto new file mode 100644 index 000000000..ccc367685 --- /dev/null +++ b/google/ads/googleads/v3/enums/sitelink_placeholder_field.proto @@ -0,0 +1,69 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SitelinkPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Sitelink placeholder fields. + +// Values for Sitelink placeholder fields. +message SitelinkPlaceholderFieldEnum { + // Possible values for Sitelink placeholder fields. + enum SitelinkPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. The link text for your sitelink. + TEXT = 2; + + // Data Type: STRING. First line of the sitelink description. + LINE_1 = 3; + + // Data Type: STRING. Second line of the sitelink description. + LINE_2 = 4; + + // Data Type: URL_LIST. Final URLs for the sitelink when using Upgraded + // URLs. + FINAL_URLS = 5; + + // Data Type: URL_LIST. Final Mobile URLs for the sitelink when using + // Upgraded URLs. + FINAL_MOBILE_URLS = 6; + + // Data Type: URL. Tracking template for the sitelink when using Upgraded + // URLs. + TRACKING_URL = 7; + + // Data Type: STRING. Final URL suffix for sitelink when using parallel + // tracking. + FINAL_URL_SUFFIX = 8; + } + + +} diff --git a/google/ads/googleads/v3/enums/slot.proto b/google/ads/googleads/v3/enums/slot.proto new file mode 100644 index 000000000..702ed1479 --- /dev/null +++ b/google/ads/googleads/v3/enums/slot.proto @@ -0,0 +1,65 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SlotProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing slots. + +// Container for enumeration of possible positions of the Ad. +message SlotEnum { + // Enumerates possible positions of the Ad. + enum Slot { + // Not specified. + UNSPECIFIED = 0; + + // The value is unknown in this version. + UNKNOWN = 1; + + // Google search: Side. + SEARCH_SIDE = 2; + + // Google search: Top. + SEARCH_TOP = 3; + + // Google search: Other. + SEARCH_OTHER = 4; + + // Google Display Network. + CONTENT = 5; + + // Search partners: Top. + SEARCH_PARTNER_TOP = 6; + + // Search partners: Other. + SEARCH_PARTNER_OTHER = 7; + + // Cross-network. + MIXED = 8; + } + + +} diff --git a/google/ads/googleads/v3/enums/spending_limit_type.proto b/google/ads/googleads/v3/enums/spending_limit_type.proto new file mode 100644 index 000000000..da6a155b2 --- /dev/null +++ b/google/ads/googleads/v3/enums/spending_limit_type.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SpendingLimitTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing SpendingLimit types. + +// Message describing spending limit types. +message SpendingLimitTypeEnum { + // The possible spending limit types used by certain resources as an + // alternative to absolute money values in micros. + enum SpendingLimitType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Infinite, indicates unlimited spending power. + INFINITE = 2; + } + + +} diff --git a/google/ads/googleads/v3/enums/structured_snippet_placeholder_field.proto b/google/ads/googleads/v3/enums/structured_snippet_placeholder_field.proto new file mode 100644 index 000000000..6f43aa196 --- /dev/null +++ b/google/ads/googleads/v3/enums/structured_snippet_placeholder_field.proto @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "StructuredSnippetPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Structured Snippet placeholder fields. + +// Values for Structured Snippet placeholder fields. +message StructuredSnippetPlaceholderFieldEnum { + // Possible values for Structured Snippet placeholder fields. + enum StructuredSnippetPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. The category of snippet of your products/services. + // Must match exactly one of the predefined structured snippets headers. + // For a list, visit + // https://developers.google.com/adwords/api/docs/appendix/structured-snippet-headers + HEADER = 2; + + // Data Type: STRING_LIST. Text values that describe your products/services. + // All text must be family safe. Special or non-ASCII characters are not + // permitted. A snippet can be at most 25 characters. + SNIPPETS = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/summary_row_setting.proto b/google/ads/googleads/v3/enums/summary_row_setting.proto new file mode 100644 index 000000000..010df227c --- /dev/null +++ b/google/ads/googleads/v3/enums/summary_row_setting.proto @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SummaryRowSettingProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing summary row setting. + +// Indicates summary row setting in request parameter. +message SummaryRowSettingEnum { + // Enum describing return summary row settings. + enum SummaryRowSetting { + // Not specified. + UNSPECIFIED = 0; + + // Represent unknown values of return summary row. + UNKNOWN = 1; + + // Do not return summary row. + NO_SUMMARY_ROW = 2; + + // Return summary row along with results. The summary row will be returned + // in the last batch alone (last batch will contain no results). + SUMMARY_ROW_WITH_RESULTS = 3; + + // Return summary row only and return no results. + SUMMARY_ROW_ONLY = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/system_managed_entity_source.proto b/google/ads/googleads/v3/enums/system_managed_entity_source.proto new file mode 100644 index 000000000..0d1ff47a8 --- /dev/null +++ b/google/ads/googleads/v3/enums/system_managed_entity_source.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SystemManagedEntitySourceProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing system managed entity sources. + +// Container for enum describing possible system managed entity sources. +message SystemManagedResourceSourceEnum { + // Enum listing the possible system managed entity sources. + enum SystemManagedResourceSource { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Generated ad variations experiment ad. + AD_VARIATIONS = 2; + } + + +} diff --git a/google/ads/googleads/v3/enums/target_cpa_opt_in_recommendation_goal.proto b/google/ads/googleads/v3/enums/target_cpa_opt_in_recommendation_goal.proto new file mode 100644 index 000000000..828460dbb --- /dev/null +++ b/google/ads/googleads/v3/enums/target_cpa_opt_in_recommendation_goal.proto @@ -0,0 +1,57 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "TargetCpaOptInRecommendationGoalProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing TargetCpaOptIn recommendation goals. + +// Container for enum describing goals for TargetCpaOptIn recommendation. +message TargetCpaOptInRecommendationGoalEnum { + // Goal of TargetCpaOptIn recommendation. + enum TargetCpaOptInRecommendationGoal { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Recommendation to set Target CPA to maintain the same cost. + SAME_COST = 2; + + // Recommendation to set Target CPA to maintain the same conversions. + SAME_CONVERSIONS = 3; + + // Recommendation to set Target CPA to maintain the same CPA. + SAME_CPA = 4; + + // Recommendation to set Target CPA to a value that is as close as possible + // to, yet lower than, the actual CPA (computed for past 28 days). + CLOSEST_CPA = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/target_impression_share_location.proto b/google/ads/googleads/v3/enums/target_impression_share_location.proto new file mode 100644 index 000000000..e26046e7b --- /dev/null +++ b/google/ads/googleads/v3/enums/target_impression_share_location.proto @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "TargetImpressionShareLocationProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing target impression share goal. + +// Container for enum describing where on the first search results page the +// automated bidding system should target impressions for the +// TargetImpressionShare bidding strategy. +message TargetImpressionShareLocationEnum { + // Enum describing possible goals. + enum TargetImpressionShareLocation { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Any location on the web page. + ANYWHERE_ON_PAGE = 2; + + // Top box of ads. + TOP_OF_PAGE = 3; + + // Top slot in the top box of ads. + ABSOLUTE_TOP_OF_PAGE = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/targeting_dimension.proto b/google/ads/googleads/v3/enums/targeting_dimension.proto new file mode 100644 index 000000000..3e31dc6fe --- /dev/null +++ b/google/ads/googleads/v3/enums/targeting_dimension.proto @@ -0,0 +1,74 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "TargetingDimensionProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing criteria types. + +// The dimensions that can be targeted. +message TargetingDimensionEnum { + // Enum describing possible targeting dimensions. + enum TargetingDimension { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Keyword criteria, e.g. 'mars cruise'. KEYWORD may be used as a custom bid + // dimension. Keywords are always a targeting dimension, so may not be set + // as a target "ALL" dimension with TargetRestriction. + KEYWORD = 2; + + // Audience criteria, which include user list, user interest, custom + // affinity, and custom in market. + AUDIENCE = 3; + + // Topic criteria for targeting categories of content, e.g. + // 'category::Animals>Pets' Used for Display and Video targeting. + TOPIC = 4; + + // Criteria for targeting gender. + GENDER = 5; + + // Criteria for targeting age ranges. + AGE_RANGE = 6; + + // Placement criteria, which include websites like 'www.flowers4sale.com', + // as well as mobile applications, mobile app categories, YouTube videos, + // and YouTube channels. + PLACEMENT = 7; + + // Criteria for parental status targeting. + PARENTAL_STATUS = 8; + + // Criteria for income range targeting. + INCOME_RANGE = 9; + } + + +} diff --git a/google/ads/googleads/v3/enums/time_type.proto b/google/ads/googleads/v3/enums/time_type.proto new file mode 100644 index 000000000..80925901c --- /dev/null +++ b/google/ads/googleads/v3/enums/time_type.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "TimeTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing TimeType types. + +// Message describing time types. +message TimeTypeEnum { + // The possible time types used by certain resources as an alternative to + // absolute timestamps. + enum TimeType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // As soon as possible. + NOW = 2; + + // An infinite point in the future. + FOREVER = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/tracking_code_page_format.proto b/google/ads/googleads/v3/enums/tracking_code_page_format.proto new file mode 100644 index 000000000..c621e93cc --- /dev/null +++ b/google/ads/googleads/v3/enums/tracking_code_page_format.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "TrackingCodePageFormatProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Container for enum describing the format of the web page where the tracking +// tag and snippet will be installed. +message TrackingCodePageFormatEnum { + // The format of the web page where the tracking tag and snippet will be + // installed. + enum TrackingCodePageFormat { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Standard HTML page format. + HTML = 2; + + // Google AMP page format. + AMP = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/tracking_code_type.proto b/google/ads/googleads/v3/enums/tracking_code_type.proto new file mode 100644 index 000000000..7d43ee0d2 --- /dev/null +++ b/google/ads/googleads/v3/enums/tracking_code_type.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "TrackingCodeTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Container for enum describing the type of the generated tag snippets for +// tracking conversions. +message TrackingCodeTypeEnum { + // The type of the generated tag snippets for tracking conversions. + enum TrackingCodeType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The snippet that is fired as a result of a website page loading. + WEBPAGE = 2; + + // The snippet contains a JavaScript function which fires the tag. This + // function is typically called from an onClick handler added to a link or + // button element on the page. + WEBPAGE_ONCLICK = 3; + + // For embedding on a mobile webpage. The snippet contains a JavaScript + // function which fires the tag. + CLICK_TO_CALL = 4; + + // The snippet that is used to replace the phone number on your website with + // a Google forwarding number for call tracking purposes. + WEBSITE_CALL = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/travel_placeholder_field.proto b/google/ads/googleads/v3/enums/travel_placeholder_field.proto new file mode 100644 index 000000000..ef9c67795 --- /dev/null +++ b/google/ads/googleads/v3/enums/travel_placeholder_field.proto @@ -0,0 +1,128 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "TravelPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing Travel placeholder fields. + +// Values for Travel placeholder fields. +// For more information about dynamic remarketing feeds, see +// https://support.google.com/google-ads/answer/6053288. +message TravelPlaceholderFieldEnum { + // Possible values for Travel placeholder fields. + enum TravelPlaceholderField { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Data Type: STRING. Required. Destination id. Example: PAR, LON. + // For feed items that only have destination id, destination id must be a + // unique key. For feed items that have both destination id and origin id, + // then the combination must be a unique key. + DESTINATION_ID = 2; + + // Data Type: STRING. Origin id. Example: PAR, LON. + // Combination of DESTINATION_ID and ORIGIN_ID must be + // unique per offer. + ORIGIN_ID = 3; + + // Data Type: STRING. Required. Main headline with name to be shown in + // dynamic ad. + TITLE = 4; + + // Data Type: STRING. The destination name. Shorter names are recommended. + DESTINATION_NAME = 5; + + // Data Type: STRING. Origin name. Shorter names are recommended. + ORIGIN_NAME = 6; + + // Data Type: STRING. Price to be shown in the ad. Highly recommended for + // dynamic ads. + // Example: "100.00 USD" + PRICE = 7; + + // Data Type: STRING. Formatted price to be shown in the ad. + // Example: "Starting at $100.00 USD", "$80 - $100" + FORMATTED_PRICE = 8; + + // Data Type: STRING. Sale price to be shown in the ad. + // Example: "80.00 USD" + SALE_PRICE = 9; + + // Data Type: STRING. Formatted sale price to be shown in the ad. + // Example: "On sale for $80.00", "$60 - $80" + FORMATTED_SALE_PRICE = 10; + + // Data Type: URL. Image to be displayed in the ad. + IMAGE_URL = 11; + + // Data Type: STRING. Category of travel offer used to group like items + // together for recommendation engine. + CATEGORY = 12; + + // Data Type: STRING_LIST. Keywords used for product retrieval. + CONTEXTUAL_KEYWORDS = 13; + + // Data Type: STRING. Address of travel offer, including postal code. + DESTINATION_ADDRESS = 14; + + // Data Type: URL_LIST. Required. Final URLs to be used in ad, when using + // Upgraded URLs; the more specific the better (e.g. the individual URL of a + // specific travel offer and its location). + FINAL_URL = 15; + + // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded + // URLs. + FINAL_MOBILE_URLS = 16; + + // Data Type: URL. Tracking template for the ad when using Upgraded URLs. + TRACKING_URL = 17; + + // Data Type: STRING. Android app link. Must be formatted as: + // android-app://{package_id}/{scheme}/{host_path}. + // The components are defined as follows: + // package_id: app ID as specified in Google Play. + // scheme: the scheme to pass to the application. Can be HTTP, or a custom + // scheme. + // host_path: identifies the specific content within your application. + ANDROID_APP_LINK = 18; + + // Data Type: STRING_LIST. List of recommended destination IDs to show + // together with this item. + SIMILAR_DESTINATION_IDS = 19; + + // Data Type: STRING. iOS app link. + IOS_APP_LINK = 20; + + // Data Type: INT64. iOS app store ID. + IOS_APP_STORE_ID = 21; + } + + +} diff --git a/google/ads/googleads/v3/enums/user_interest_taxonomy_type.proto b/google/ads/googleads/v3/enums/user_interest_taxonomy_type.proto new file mode 100644 index 000000000..a6c34892d --- /dev/null +++ b/google/ads/googleads/v3/enums/user_interest_taxonomy_type.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserInterestTaxonomyTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing the UserInterest taxonomy type + +// Message describing a UserInterestTaxonomyType. +message UserInterestTaxonomyTypeEnum { + // Enum containing the possible UserInterestTaxonomyTypes. + enum UserInterestTaxonomyType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The affinity for this user interest. + AFFINITY = 2; + + // The market for this user interest. + IN_MARKET = 3; + + // Users known to have installed applications in the specified categories. + MOBILE_APP_INSTALL_USER = 4; + + // The geographical location of the interest-based vertical. + VERTICAL_GEO = 5; + + // User interest criteria for new smart phone users. + NEW_SMART_PHONE_USER = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/user_list_access_status.proto b/google/ads/googleads/v3/enums/user_list_access_status.proto new file mode 100644 index 000000000..b7a7f5fb4 --- /dev/null +++ b/google/ads/googleads/v3/enums/user_list_access_status.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListAccessStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing user list access status. + +// Indicates if this client still has access to the list. +message UserListAccessStatusEnum { + // Enum containing possible user list access statuses. + enum UserListAccessStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The access is enabled. + ENABLED = 2; + + // The access is disabled. + DISABLED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/user_list_closing_reason.proto b/google/ads/googleads/v3/enums/user_list_closing_reason.proto new file mode 100644 index 000000000..b14300908 --- /dev/null +++ b/google/ads/googleads/v3/enums/user_list_closing_reason.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListClosingReasonProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing user list closing reason. + +// Indicates the reason why the userlist was closed. +// This enum is only used when a list is auto-closed by the system. +message UserListClosingReasonEnum { + // Enum describing possible user list closing reasons. + enum UserListClosingReason { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The userlist was closed because of not being used for over one year. + UNUSED = 2; + } + + +} diff --git a/google/ads/googleads/v3/enums/user_list_combined_rule_operator.proto b/google/ads/googleads/v3/enums/user_list_combined_rule_operator.proto new file mode 100644 index 000000000..6fdeb650b --- /dev/null +++ b/google/ads/googleads/v3/enums/user_list_combined_rule_operator.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListCombinedRuleOperatorProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Logical operator connecting two rules. +message UserListCombinedRuleOperatorEnum { + // Enum describing possible user list combined rule operators. + enum UserListCombinedRuleOperator { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // A AND B. + AND = 2; + + // A AND NOT B. + AND_NOT = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/user_list_crm_data_source_type.proto b/google/ads/googleads/v3/enums/user_list_crm_data_source_type.proto new file mode 100644 index 000000000..1a792b92e --- /dev/null +++ b/google/ads/googleads/v3/enums/user_list_crm_data_source_type.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListCrmDataSourceTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Indicates source of Crm upload data. +message UserListCrmDataSourceTypeEnum { + // Enum describing possible user list crm data source type. + enum UserListCrmDataSourceType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The uploaded data is first-party data. + FIRST_PARTY = 2; + + // The uploaded data is from a third-party credit bureau. + THIRD_PARTY_CREDIT_BUREAU = 3; + + // The uploaded data is from a third-party voter file. + THIRD_PARTY_VOTER_FILE = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/user_list_date_rule_item_operator.proto b/google/ads/googleads/v3/enums/user_list_date_rule_item_operator.proto new file mode 100644 index 000000000..af386825a --- /dev/null +++ b/google/ads/googleads/v3/enums/user_list_date_rule_item_operator.proto @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListDateRuleItemOperatorProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Supported rule operator for date type. +message UserListDateRuleItemOperatorEnum { + // Enum describing possible user list date rule item operators. + enum UserListDateRuleItemOperator { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Equals. + EQUALS = 2; + + // Not Equals. + NOT_EQUALS = 3; + + // Before. + BEFORE = 4; + + // After. + AFTER = 5; + } + + +} diff --git a/google/ads/googleads/v3/enums/user_list_logical_rule_operator.proto b/google/ads/googleads/v3/enums/user_list_logical_rule_operator.proto new file mode 100644 index 000000000..141b028d0 --- /dev/null +++ b/google/ads/googleads/v3/enums/user_list_logical_rule_operator.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListLogicalRuleOperatorProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// The logical operator of the rule. +message UserListLogicalRuleOperatorEnum { + // Enum describing possible user list logical rule operators. + enum UserListLogicalRuleOperator { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // And - all of the operands. + ALL = 2; + + // Or - at least one of the operands. + ANY = 3; + + // Not - none of the operands. + NONE = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/user_list_membership_status.proto b/google/ads/googleads/v3/enums/user_list_membership_status.proto new file mode 100644 index 000000000..a921ae29f --- /dev/null +++ b/google/ads/googleads/v3/enums/user_list_membership_status.proto @@ -0,0 +1,52 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListMembershipStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing user list membership status. + +// Membership status of this user list. Indicates whether a user list is open +// or active. Only open user lists can accumulate more users and can be used for +// targeting. +message UserListMembershipStatusEnum { + // Enum containing possible user list membership statuses. + enum UserListMembershipStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Open status - List is accruing members and can be targeted to. + OPEN = 2; + + // Closed status - No new members being added. Cannot be used for targeting. + CLOSED = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/user_list_number_rule_item_operator.proto b/google/ads/googleads/v3/enums/user_list_number_rule_item_operator.proto new file mode 100644 index 000000000..e3fe69adb --- /dev/null +++ b/google/ads/googleads/v3/enums/user_list_number_rule_item_operator.proto @@ -0,0 +1,60 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListNumberRuleItemOperatorProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Supported rule operator for number type. +message UserListNumberRuleItemOperatorEnum { + // Enum describing possible user list number rule item operators. + enum UserListNumberRuleItemOperator { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Greater than. + GREATER_THAN = 2; + + // Greater than or equal. + GREATER_THAN_OR_EQUAL = 3; + + // Equals. + EQUALS = 4; + + // Not equals. + NOT_EQUALS = 5; + + // Less than. + LESS_THAN = 6; + + // Less than or equal. + LESS_THAN_OR_EQUAL = 7; + } + + +} diff --git a/google/ads/googleads/v3/enums/user_list_prepopulation_status.proto b/google/ads/googleads/v3/enums/user_list_prepopulation_status.proto new file mode 100644 index 000000000..0aa56c010 --- /dev/null +++ b/google/ads/googleads/v3/enums/user_list_prepopulation_status.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListPrepopulationStatusProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Indicates status of prepopulation based on the rule. +message UserListPrepopulationStatusEnum { + // Enum describing possible user list prepopulation status. + enum UserListPrepopulationStatus { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Prepopoulation is being requested. + REQUESTED = 2; + + // Prepopulation is finished. + FINISHED = 3; + + // Prepopulation failed. + FAILED = 4; + } + + +} diff --git a/google/ads/googleads/v3/enums/user_list_rule_type.proto b/google/ads/googleads/v3/enums/user_list_rule_type.proto new file mode 100644 index 000000000..5b38251c4 --- /dev/null +++ b/google/ads/googleads/v3/enums/user_list_rule_type.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListRuleTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Rule based user list rule type. +message UserListRuleTypeEnum { + // Enum describing possible user list rule types. + enum UserListRuleType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Conjunctive normal form. + AND_OF_ORS = 2; + + // Disjunctive normal form. + OR_OF_ANDS = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/user_list_size_range.proto b/google/ads/googleads/v3/enums/user_list_size_range.proto new file mode 100644 index 000000000..d319d3e34 --- /dev/null +++ b/google/ads/googleads/v3/enums/user_list_size_range.proto @@ -0,0 +1,92 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListSizeRangeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing user list size range. + +// Size range in terms of number of users of a UserList. +message UserListSizeRangeEnum { + // Enum containing possible user list size ranges. + enum UserListSizeRange { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // User list has less than 500 users. + LESS_THAN_FIVE_HUNDRED = 2; + + // User list has number of users in range of 500 to 1000. + LESS_THAN_ONE_THOUSAND = 3; + + // User list has number of users in range of 1000 to 10000. + ONE_THOUSAND_TO_TEN_THOUSAND = 4; + + // User list has number of users in range of 10000 to 50000. + TEN_THOUSAND_TO_FIFTY_THOUSAND = 5; + + // User list has number of users in range of 50000 to 100000. + FIFTY_THOUSAND_TO_ONE_HUNDRED_THOUSAND = 6; + + // User list has number of users in range of 100000 to 300000. + ONE_HUNDRED_THOUSAND_TO_THREE_HUNDRED_THOUSAND = 7; + + // User list has number of users in range of 300000 to 500000. + THREE_HUNDRED_THOUSAND_TO_FIVE_HUNDRED_THOUSAND = 8; + + // User list has number of users in range of 500000 to 1 million. + FIVE_HUNDRED_THOUSAND_TO_ONE_MILLION = 9; + + // User list has number of users in range of 1 to 2 millions. + ONE_MILLION_TO_TWO_MILLION = 10; + + // User list has number of users in range of 2 to 3 millions. + TWO_MILLION_TO_THREE_MILLION = 11; + + // User list has number of users in range of 3 to 5 millions. + THREE_MILLION_TO_FIVE_MILLION = 12; + + // User list has number of users in range of 5 to 10 millions. + FIVE_MILLION_TO_TEN_MILLION = 13; + + // User list has number of users in range of 10 to 20 millions. + TEN_MILLION_TO_TWENTY_MILLION = 14; + + // User list has number of users in range of 20 to 30 millions. + TWENTY_MILLION_TO_THIRTY_MILLION = 15; + + // User list has number of users in range of 30 to 50 millions. + THIRTY_MILLION_TO_FIFTY_MILLION = 16; + + // User list has over 50 million users. + OVER_FIFTY_MILLION = 17; + } + + +} diff --git a/google/ads/googleads/v3/enums/user_list_string_rule_item_operator.proto b/google/ads/googleads/v3/enums/user_list_string_rule_item_operator.proto new file mode 100644 index 000000000..3ddd510c8 --- /dev/null +++ b/google/ads/googleads/v3/enums/user_list_string_rule_item_operator.proto @@ -0,0 +1,66 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListStringRuleItemOperatorProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Supported rule operator for string type. +message UserListStringRuleItemOperatorEnum { + // Enum describing possible user list string rule item operators. + enum UserListStringRuleItemOperator { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Contains. + CONTAINS = 2; + + // Equals. + EQUALS = 3; + + // Starts with. + STARTS_WITH = 4; + + // Ends with. + ENDS_WITH = 5; + + // Not equals. + NOT_EQUALS = 6; + + // Not contains. + NOT_CONTAINS = 7; + + // Not starts with. + NOT_STARTS_WITH = 8; + + // Not ends with. + NOT_ENDS_WITH = 9; + } + + +} diff --git a/google/ads/googleads/v3/enums/user_list_type.proto b/google/ads/googleads/v3/enums/user_list_type.proto new file mode 100644 index 000000000..91d2e8912 --- /dev/null +++ b/google/ads/googleads/v3/enums/user_list_type.proto @@ -0,0 +1,63 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListTypeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing user list type. + +// The user list types. +message UserListTypeEnum { + // Enum containing possible user list types. + enum UserListType { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // UserList represented as a collection of conversion types. + REMARKETING = 2; + + // UserList represented as a combination of other user lists/interests. + LOGICAL = 3; + + // UserList created in the Google Ad Manager platform. + EXTERNAL_REMARKETING = 4; + + // UserList associated with a rule. + RULE_BASED = 5; + + // UserList with users similar to users of another UserList. + SIMILAR = 6; + + // UserList of first-party CRM data provided by advertiser in the form of + // emails or other formats. + CRM_BASED = 7; + } + + +} diff --git a/google/ads/googleads/v3/enums/vanity_pharma_display_url_mode.proto b/google/ads/googleads/v3/enums/vanity_pharma_display_url_mode.proto new file mode 100644 index 000000000..e00f76ae6 --- /dev/null +++ b/google/ads/googleads/v3/enums/vanity_pharma_display_url_mode.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "VanityPharmaDisplayUrlModeProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing vanity pharma display url modes. + +// The display mode for vanity pharma URLs. +message VanityPharmaDisplayUrlModeEnum { + // Enum describing possible display modes for vanity pharma URLs. + enum VanityPharmaDisplayUrlMode { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Replace vanity pharma URL with manufacturer website url. + MANUFACTURER_WEBSITE_URL = 2; + + // Replace vanity pharma URL with description of the website. + WEBSITE_DESCRIPTION = 3; + } + + +} diff --git a/google/ads/googleads/v3/enums/vanity_pharma_text.proto b/google/ads/googleads/v3/enums/vanity_pharma_text.proto new file mode 100644 index 000000000..1a6cfa941 --- /dev/null +++ b/google/ads/googleads/v3/enums/vanity_pharma_text.proto @@ -0,0 +1,87 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "VanityPharmaTextProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing vanity pharma texts. + +// The text that will be displayed in display URL of the text ad when website +// description is the selected display mode for vanity pharma URLs. +message VanityPharmaTextEnum { + // Enum describing possible text. + enum VanityPharmaText { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Prescription treatment website with website content in English. + PRESCRIPTION_TREATMENT_WEBSITE_EN = 2; + + // Prescription treatment website with website content in Spanish + // (Sitio de tratamientos con receta). + PRESCRIPTION_TREATMENT_WEBSITE_ES = 3; + + // Prescription device website with website content in English. + PRESCRIPTION_DEVICE_WEBSITE_EN = 4; + + // Prescription device website with website content in Spanish (Sitio de + // dispositivos con receta). + PRESCRIPTION_DEVICE_WEBSITE_ES = 5; + + // Medical device website with website content in English. + MEDICAL_DEVICE_WEBSITE_EN = 6; + + // Medical device website with website content in Spanish (Sitio de + // dispositivos médicos). + MEDICAL_DEVICE_WEBSITE_ES = 7; + + // Preventative treatment website with website content in English. + PREVENTATIVE_TREATMENT_WEBSITE_EN = 8; + + // Preventative treatment website with website content in Spanish (Sitio de + // tratamientos preventivos). + PREVENTATIVE_TREATMENT_WEBSITE_ES = 9; + + // Prescription contraception website with website content in English. + PRESCRIPTION_CONTRACEPTION_WEBSITE_EN = 10; + + // Prescription contraception website with website content in Spanish (Sitio + // de anticonceptivos con receta). + PRESCRIPTION_CONTRACEPTION_WEBSITE_ES = 11; + + // Prescription vaccine website with website content in English. + PRESCRIPTION_VACCINE_WEBSITE_EN = 12; + + // Prescription vaccine website with website content in Spanish (Sitio de + // vacunas con receta). + PRESCRIPTION_VACCINE_WEBSITE_ES = 13; + } + + +} diff --git a/google/ads/googleads/v3/enums/webpage_condition_operand.proto b/google/ads/googleads/v3/enums/webpage_condition_operand.proto new file mode 100644 index 000000000..869f9e3d4 --- /dev/null +++ b/google/ads/googleads/v3/enums/webpage_condition_operand.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "WebpageConditionOperandProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing webpage condition operand. + +// Container for enum describing webpage condition operand in webpage criterion. +message WebpageConditionOperandEnum { + // The webpage condition operand in webpage criterion. + enum WebpageConditionOperand { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Operand denoting a webpage URL targeting condition. + URL = 2; + + // Operand denoting a webpage category targeting condition. + CATEGORY = 3; + + // Operand denoting a webpage title targeting condition. + PAGE_TITLE = 4; + + // Operand denoting a webpage content targeting condition. + PAGE_CONTENT = 5; + + // Operand denoting a webpage custom label targeting condition. + CUSTOM_LABEL = 6; + } + + +} diff --git a/google/ads/googleads/v3/enums/webpage_condition_operator.proto b/google/ads/googleads/v3/enums/webpage_condition_operator.proto new file mode 100644 index 000000000..8d37393b3 --- /dev/null +++ b/google/ads/googleads/v3/enums/webpage_condition_operator.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "WebpageConditionOperatorProto"; +option java_package = "com.google.ads.googleads.v3.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V3::Enums"; + +// Proto file describing webpage condition operator. + +// Container for enum describing webpage condition operator in webpage +// criterion. +message WebpageConditionOperatorEnum { + // The webpage condition operator in webpage criterion. + enum WebpageConditionOperator { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // The argument web condition is equal to the compared web condition. + EQUALS = 2; + + // The argument web condition is part of the compared web condition. + CONTAINS = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/access_invitation_error.proto b/google/ads/googleads/v3/errors/access_invitation_error.proto new file mode 100644 index 000000000..8d697dcef --- /dev/null +++ b/google/ads/googleads/v3/errors/access_invitation_error.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AccessInvitationErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing AccessInvitation errors. + +// Container for enum describing possible AccessInvitation errors. +message AccessInvitationErrorEnum { + // Enum describing possible AccessInvitation errors. + enum AccessInvitationError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The email address is invalid for sending an invitation. + INVALID_EMAIL_ADDRESS = 2; + + // Email address already has access to this customer. + EMAIL_ADDRESS_ALREADY_HAS_ACCESS = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/account_budget_proposal_error.proto b/google/ads/googleads/v3/errors/account_budget_proposal_error.proto new file mode 100644 index 000000000..9ecf85ff9 --- /dev/null +++ b/google/ads/googleads/v3/errors/account_budget_proposal_error.proto @@ -0,0 +1,118 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetProposalErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing account budget proposal errors. + +// Container for enum describing possible account budget proposal errors. +message AccountBudgetProposalErrorEnum { + // Enum describing possible account budget proposal errors. + enum AccountBudgetProposalError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The field mask must be empty for create/end/remove proposals. + FIELD_MASK_NOT_ALLOWED = 2; + + // The field cannot be set because of the proposal type. + IMMUTABLE_FIELD = 3; + + // The field is required because of the proposal type. + REQUIRED_FIELD_MISSING = 4; + + // Proposals that have been approved cannot be cancelled. + CANNOT_CANCEL_APPROVED_PROPOSAL = 5; + + // Budgets that haven't been approved cannot be removed. + CANNOT_REMOVE_UNAPPROVED_BUDGET = 6; + + // Budgets that are currently running cannot be removed. + CANNOT_REMOVE_RUNNING_BUDGET = 7; + + // Budgets that haven't been approved cannot be truncated. + CANNOT_END_UNAPPROVED_BUDGET = 8; + + // Only budgets that are currently running can be truncated. + CANNOT_END_INACTIVE_BUDGET = 9; + + // All budgets must have names. + BUDGET_NAME_REQUIRED = 10; + + // Expired budgets cannot be edited after a sufficient amount of time has + // passed. + CANNOT_UPDATE_OLD_BUDGET = 11; + + // It is not permissible a propose a new budget that ends in the past. + CANNOT_END_IN_PAST = 12; + + // An expired budget cannot be extended to overlap with the running budget. + CANNOT_EXTEND_END_TIME = 13; + + // A purchase order number is required. + PURCHASE_ORDER_NUMBER_REQUIRED = 14; + + // Budgets that have a pending update cannot be updated. + PENDING_UPDATE_PROPOSAL_EXISTS = 15; + + // Cannot propose more than one budget when the corresponding billing setup + // hasn't been approved. + MULTIPLE_BUDGETS_NOT_ALLOWED_FOR_UNAPPROVED_BILLING_SETUP = 16; + + // Cannot update the start time of a budget that has already started. + CANNOT_UPDATE_START_TIME_FOR_STARTED_BUDGET = 17; + + // Cannot update the spending limit of a budget with an amount lower than + // what has already been spent. + SPENDING_LIMIT_LOWER_THAN_ACCRUED_COST_NOT_ALLOWED = 18; + + // Cannot propose a budget update without actually changing any fields. + UPDATE_IS_NO_OP = 19; + + // The end time must come after the start time. + END_TIME_MUST_FOLLOW_START_TIME = 20; + + // The budget's date range must fall within the date range of its billing + // setup. + BUDGET_DATE_RANGE_INCOMPATIBLE_WITH_BILLING_SETUP = 21; + + // The user is not authorized to mutate budgets for the given billing setup. + NOT_AUTHORIZED = 22; + + // Mutates are not allowed for the given billing setup. + INVALID_BILLING_SETUP = 23; + + // Budget creation failed as it overlaps with an pending budget proposal + // or an approved budget. + OVERLAPS_EXISTING_BUDGET = 24; + } + + +} diff --git a/google/ads/googleads/v3/errors/ad_customizer_error.proto b/google/ads/googleads/v3/errors/ad_customizer_error.proto new file mode 100644 index 000000000..e46fa0183 --- /dev/null +++ b/google/ads/googleads/v3/errors/ad_customizer_error.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AdCustomizerErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing ad customizer errors. + +// Container for enum describing possible ad customizer errors. +message AdCustomizerErrorEnum { + // Enum describing possible ad customizer errors. + enum AdCustomizerError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Invalid date argument in countdown function. + COUNTDOWN_INVALID_DATE_FORMAT = 2; + + // Countdown end date is in the past. + COUNTDOWN_DATE_IN_PAST = 3; + + // Invalid locale string in countdown function. + COUNTDOWN_INVALID_LOCALE = 4; + + // Days-before argument to countdown function is not positive. + COUNTDOWN_INVALID_START_DAYS_BEFORE = 5; + + // A user list referenced in an IF function does not exist. + UNKNOWN_USER_LIST = 6; + } + + +} diff --git a/google/ads/googleads/v3/errors/ad_error.proto b/google/ads/googleads/v3/errors/ad_error.proto new file mode 100644 index 000000000..d191eaf82 --- /dev/null +++ b/google/ads/googleads/v3/errors/ad_error.proto @@ -0,0 +1,478 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AdErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing ad errors. + +// Container for enum describing possible ad errors. +message AdErrorEnum { + // Enum describing possible ad errors. + enum AdError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Ad customizers are not supported for ad type. + AD_CUSTOMIZERS_NOT_SUPPORTED_FOR_AD_TYPE = 2; + + // Estimating character sizes the string is too long. + APPROXIMATELY_TOO_LONG = 3; + + // Estimating character sizes the string is too short. + APPROXIMATELY_TOO_SHORT = 4; + + // There is a problem with the snippet. + BAD_SNIPPET = 5; + + // Cannot modify an ad. + CANNOT_MODIFY_AD = 6; + + // business name and url cannot be set at the same time + CANNOT_SET_BUSINESS_NAME_IF_URL_SET = 7; + + // The specified field is incompatible with this ad's type or settings. + CANNOT_SET_FIELD = 8; + + // Cannot set field when originAdId is set. + CANNOT_SET_FIELD_WITH_ORIGIN_AD_ID_SET = 9; + + // Cannot set field when an existing ad id is set for sharing. + CANNOT_SET_FIELD_WITH_AD_ID_SET_FOR_SHARING = 10; + + // Cannot set allowFlexibleColor false if no color is provided by user. + CANNOT_SET_ALLOW_FLEXIBLE_COLOR_FALSE = 11; + + // When user select native, no color control is allowed because we will + // always respect publisher color for native format serving. + CANNOT_SET_COLOR_CONTROL_WHEN_NATIVE_FORMAT_SETTING = 12; + + // Cannot specify a url for the ad type + CANNOT_SET_URL = 13; + + // Cannot specify a tracking or mobile url without also setting final urls + CANNOT_SET_WITHOUT_FINAL_URLS = 14; + + // Cannot specify a legacy url and a final url simultaneously + CANNOT_SET_WITH_FINAL_URLS = 15; + + // Cannot specify a urls in UrlData and in template fields simultaneously. + CANNOT_SET_WITH_URL_DATA = 17; + + // This operator cannot be used with a subclass of Ad. + CANNOT_USE_AD_SUBCLASS_FOR_OPERATOR = 18; + + // Customer is not approved for mobile ads. + CUSTOMER_NOT_APPROVED_MOBILEADS = 19; + + // Customer is not approved for 3PAS richmedia ads. + CUSTOMER_NOT_APPROVED_THIRDPARTY_ADS = 20; + + // Customer is not approved for 3PAS redirect richmedia (Ad Exchange) ads. + CUSTOMER_NOT_APPROVED_THIRDPARTY_REDIRECT_ADS = 21; + + // Not an eligible customer + CUSTOMER_NOT_ELIGIBLE = 22; + + // Customer is not eligible for updating beacon url + CUSTOMER_NOT_ELIGIBLE_FOR_UPDATING_BEACON_URL = 23; + + // There already exists an ad with the same dimensions in the union. + DIMENSION_ALREADY_IN_UNION = 24; + + // Ad's dimension must be set before setting union dimension. + DIMENSION_MUST_BE_SET = 25; + + // Ad's dimension must be included in the union dimensions. + DIMENSION_NOT_IN_UNION = 26; + + // Display Url cannot be specified (applies to Ad Exchange Ads) + DISPLAY_URL_CANNOT_BE_SPECIFIED = 27; + + // Telephone number contains invalid characters or invalid format. Please + // re-enter your number using digits (0-9), dashes (-), and parentheses + // only. + DOMESTIC_PHONE_NUMBER_FORMAT = 28; + + // Emergency telephone numbers are not allowed. Please enter a valid + // domestic phone number to connect customers to your business. + EMERGENCY_PHONE_NUMBER = 29; + + // A required field was not specified or is an empty string. + EMPTY_FIELD = 30; + + // A feed attribute referenced in an ad customizer tag is not in the ad + // customizer mapping for the feed. + FEED_ATTRIBUTE_MUST_HAVE_MAPPING_FOR_TYPE_ID = 31; + + // The ad customizer field mapping for the feed attribute does not match the + // expected field type. + FEED_ATTRIBUTE_MAPPING_TYPE_MISMATCH = 32; + + // The use of ad customizer tags in the ad text is disallowed. Details in + // trigger. + ILLEGAL_AD_CUSTOMIZER_TAG_USE = 33; + + // Tags of the form {PH_x}, where x is a number, are disallowed in ad text. + ILLEGAL_TAG_USE = 34; + + // The dimensions of the ad are specified or derived in multiple ways and + // are not consistent. + INCONSISTENT_DIMENSIONS = 35; + + // The status cannot differ among template ads of the same union. + INCONSISTENT_STATUS_IN_TEMPLATE_UNION = 36; + + // The length of the string is not valid. + INCORRECT_LENGTH = 37; + + // The ad is ineligible for upgrade. + INELIGIBLE_FOR_UPGRADE = 38; + + // User cannot create mobile ad for countries targeted in specified + // campaign. + INVALID_AD_ADDRESS_CAMPAIGN_TARGET = 39; + + // Invalid Ad type. A specific type of Ad is required. + INVALID_AD_TYPE = 40; + + // Headline, description or phone cannot be present when creating mobile + // image ad. + INVALID_ATTRIBUTES_FOR_MOBILE_IMAGE = 41; + + // Image cannot be present when creating mobile text ad. + INVALID_ATTRIBUTES_FOR_MOBILE_TEXT = 42; + + // Invalid call to action text. + INVALID_CALL_TO_ACTION_TEXT = 43; + + // Invalid character in URL. + INVALID_CHARACTER_FOR_URL = 44; + + // Creative's country code is not valid. + INVALID_COUNTRY_CODE = 45; + + // Invalid use of Expanded Dynamic Search Ads tags ({lpurl} etc.) + INVALID_EXPANDED_DYNAMIC_SEARCH_AD_TAG = 47; + + // An input error whose real reason was not properly mapped (should not + // happen). + INVALID_INPUT = 48; + + // An invalid markup language was entered. + INVALID_MARKUP_LANGUAGE = 49; + + // An invalid mobile carrier was entered. + INVALID_MOBILE_CARRIER = 50; + + // Specified mobile carriers target a country not targeted by the campaign. + INVALID_MOBILE_CARRIER_TARGET = 51; + + // Wrong number of elements for given element type + INVALID_NUMBER_OF_ELEMENTS = 52; + + // The format of the telephone number is incorrect. Please re-enter the + // number using the correct format. + INVALID_PHONE_NUMBER_FORMAT = 53; + + // The certified vendor format id is incorrect. + INVALID_RICH_MEDIA_CERTIFIED_VENDOR_FORMAT_ID = 54; + + // The template ad data contains validation errors. + INVALID_TEMPLATE_DATA = 55; + + // The template field doesn't have have the correct type. + INVALID_TEMPLATE_ELEMENT_FIELD_TYPE = 56; + + // Invalid template id. + INVALID_TEMPLATE_ID = 57; + + // After substituting replacement strings, the line is too wide. + LINE_TOO_WIDE = 58; + + // The feed referenced must have ad customizer mapping to be used in a + // customizer tag. + MISSING_AD_CUSTOMIZER_MAPPING = 59; + + // Missing address component in template element address field. + MISSING_ADDRESS_COMPONENT = 60; + + // An ad name must be entered. + MISSING_ADVERTISEMENT_NAME = 61; + + // Business name must be entered. + MISSING_BUSINESS_NAME = 62; + + // Description (line 2) must be entered. + MISSING_DESCRIPTION1 = 63; + + // Description (line 3) must be entered. + MISSING_DESCRIPTION2 = 64; + + // The destination url must contain at least one tag (e.g. {lpurl}) + MISSING_DESTINATION_URL_TAG = 65; + + // The tracking url template of ExpandedDynamicSearchAd must contain at + // least one tag. (e.g. {lpurl}) + MISSING_LANDING_PAGE_URL_TAG = 66; + + // A valid dimension must be specified for this ad. + MISSING_DIMENSION = 67; + + // A display URL must be entered. + MISSING_DISPLAY_URL = 68; + + // Headline must be entered. + MISSING_HEADLINE = 69; + + // A height must be entered. + MISSING_HEIGHT = 70; + + // An image must be entered. + MISSING_IMAGE = 71; + + // Marketing image or product videos are required. + MISSING_MARKETING_IMAGE_OR_PRODUCT_VIDEOS = 72; + + // The markup language in which your site is written must be entered. + MISSING_MARKUP_LANGUAGES = 73; + + // A mobile carrier must be entered. + MISSING_MOBILE_CARRIER = 74; + + // Phone number must be entered. + MISSING_PHONE = 75; + + // Missing required template fields + MISSING_REQUIRED_TEMPLATE_FIELDS = 76; + + // Missing a required field value + MISSING_TEMPLATE_FIELD_VALUE = 77; + + // The ad must have text. + MISSING_TEXT = 78; + + // A visible URL must be entered. + MISSING_VISIBLE_URL = 79; + + // A width must be entered. + MISSING_WIDTH = 80; + + // Only 1 feed can be used as the source of ad customizer substitutions in a + // single ad. + MULTIPLE_DISTINCT_FEEDS_UNSUPPORTED = 81; + + // TempAdUnionId must be use when adding template ads. + MUST_USE_TEMP_AD_UNION_ID_ON_ADD = 82; + + // The string has too many characters. + TOO_LONG = 83; + + // The string has too few characters. + TOO_SHORT = 84; + + // Ad union dimensions cannot change for saved ads. + UNION_DIMENSIONS_CANNOT_CHANGE = 85; + + // Address component is not {country, lat, lng}. + UNKNOWN_ADDRESS_COMPONENT = 86; + + // Unknown unique field name + UNKNOWN_FIELD_NAME = 87; + + // Unknown unique name (template element type specifier) + UNKNOWN_UNIQUE_NAME = 88; + + // Unsupported ad dimension + UNSUPPORTED_DIMENSIONS = 89; + + // URL starts with an invalid scheme. + URL_INVALID_SCHEME = 90; + + // URL ends with an invalid top-level domain name. + URL_INVALID_TOP_LEVEL_DOMAIN = 91; + + // URL contains illegal characters. + URL_MALFORMED = 92; + + // URL must contain a host name. + URL_NO_HOST = 93; + + // URL not equivalent during upgrade. + URL_NOT_EQUIVALENT = 94; + + // URL host name too long to be stored as visible URL (applies to Ad + // Exchange ads) + URL_HOST_NAME_TOO_LONG = 95; + + // URL must start with a scheme. + URL_NO_SCHEME = 96; + + // URL should end in a valid domain extension, such as .com or .net. + URL_NO_TOP_LEVEL_DOMAIN = 97; + + // URL must not end with a path. + URL_PATH_NOT_ALLOWED = 98; + + // URL must not specify a port. + URL_PORT_NOT_ALLOWED = 99; + + // URL must not contain a query. + URL_QUERY_NOT_ALLOWED = 100; + + // A url scheme is not allowed in front of tag in tracking url template + // (e.g. http://{lpurl}) + URL_SCHEME_BEFORE_EXPANDED_DYNAMIC_SEARCH_AD_TAG = 102; + + // The user does not have permissions to create a template ad for the given + // template. + USER_DOES_NOT_HAVE_ACCESS_TO_TEMPLATE = 103; + + // Expandable setting is inconsistent/wrong. For example, an AdX ad is + // invalid if it has a expandable vendor format but no expanding directions + // specified, or expanding directions is specified, but the vendor format is + // not expandable. + INCONSISTENT_EXPANDABLE_SETTINGS = 104; + + // Format is invalid + INVALID_FORMAT = 105; + + // The text of this field did not match a pattern of allowed values. + INVALID_FIELD_TEXT = 106; + + // Template element is mising + ELEMENT_NOT_PRESENT = 107; + + // Error occurred during image processing + IMAGE_ERROR = 108; + + // The value is not within the valid range + VALUE_NOT_IN_RANGE = 109; + + // Template element field is not present + FIELD_NOT_PRESENT = 110; + + // Address is incomplete + ADDRESS_NOT_COMPLETE = 111; + + // Invalid address + ADDRESS_INVALID = 112; + + // Error retrieving specified video + VIDEO_RETRIEVAL_ERROR = 113; + + // Error processing audio + AUDIO_ERROR = 114; + + // Display URL is incorrect for YouTube PYV ads + INVALID_YOUTUBE_DISPLAY_URL = 115; + + // Too many product Images in GmailAd + TOO_MANY_PRODUCT_IMAGES = 116; + + // Too many product Videos in GmailAd + TOO_MANY_PRODUCT_VIDEOS = 117; + + // The device preference is not compatible with the ad type + INCOMPATIBLE_AD_TYPE_AND_DEVICE_PREFERENCE = 118; + + // Call tracking is not supported for specified country. + CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 119; + + // Carrier specific short number is not allowed. + CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 120; + + // Specified phone number type is disallowed. + DISALLOWED_NUMBER_TYPE = 121; + + // Phone number not supported for country. + PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 122; + + // Phone number not supported with call tracking enabled for country. + PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY = 123; + + // Premium rate phone number is not allowed. + PREMIUM_RATE_NUMBER_NOT_ALLOWED = 124; + + // Vanity phone number is not allowed. + VANITY_PHONE_NUMBER_NOT_ALLOWED = 125; + + // Invalid call conversion type id. + INVALID_CALL_CONVERSION_TYPE_ID = 126; + + // Cannot disable call conversion and set conversion type id. + CANNOT_DISABLE_CALL_CONVERSION_AND_SET_CONVERSION_TYPE_ID = 127; + + // Cannot set path2 without path1. + CANNOT_SET_PATH2_WITHOUT_PATH1 = 128; + + // Missing domain name in campaign setting when adding expanded dynamic + // search ad. + MISSING_DYNAMIC_SEARCH_ADS_SETTING_DOMAIN_NAME = 129; + + // The associated ad is not compatible with restriction type. + INCOMPATIBLE_WITH_RESTRICTION_TYPE = 130; + + // Consent for call recording is required for creating/updating call only + // ads. Please see https://support.google.com/google-ads/answer/7412639. + CUSTOMER_CONSENT_FOR_CALL_RECORDING_REQUIRED = 131; + + // Either an image or a media bundle is required in a display upload ad. + MISSING_IMAGE_OR_MEDIA_BUNDLE = 132; + + // The display upload product type is not supported in this campaign. + PRODUCT_TYPE_NOT_SUPPORTED_IN_THIS_CAMPAIGN = 133; + + // The default value of an ad placeholder can not be the empty string. + PLACEHOLDER_CANNOT_HAVE_EMPTY_DEFAULT_VALUE = 134; + + // Ad placeholders with countdown functions must not have a default value. + PLACEHOLDER_COUNTDOWN_FUNCTION_CANNOT_HAVE_DEFAULT_VALUE = 135; + + // A previous ad placeholder that had a default value was found which means + // that all (non-countdown) placeholders must have a default value. This + // ad placeholder does not have a default value. + PLACEHOLDER_DEFAULT_VALUE_MISSING = 136; + + // A previous ad placeholder that did not have a default value was found + // which means that no placeholders may have a default value. This + // ad placeholder does have a default value. + UNEXPECTED_PLACEHOLDER_DEFAULT_VALUE = 137; + + // Two ad customizers may not be directly adjacent in an ad text. They must + // be separated by at least one character. + AD_CUSTOMIZERS_MAY_NOT_BE_ADJACENT = 138; + + // The ad is not associated with any enabled AdGroupAd, and cannot be + // updated. + UPDATING_AD_WITH_NO_ENABLED_ASSOCIATION = 139; + } + + +} diff --git a/google/ads/googleads/v3/errors/ad_group_ad_error.proto b/google/ads/googleads/v3/errors/ad_group_ad_error.proto new file mode 100644 index 000000000..99044c56f --- /dev/null +++ b/google/ads/googleads/v3/errors/ad_group_ad_error.proto @@ -0,0 +1,70 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing ad group ad errors. + +// Container for enum describing possible ad group ad errors. +message AdGroupAdErrorEnum { + // Enum describing possible ad group ad errors. + enum AdGroupAdError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // No link found between the adgroup ad and the label. + AD_GROUP_AD_LABEL_DOES_NOT_EXIST = 2; + + // The label has already been attached to the adgroup ad. + AD_GROUP_AD_LABEL_ALREADY_EXISTS = 3; + + // The specified ad was not found in the adgroup + AD_NOT_UNDER_ADGROUP = 4; + + // Removed ads may not be modified + CANNOT_OPERATE_ON_REMOVED_ADGROUPAD = 5; + + // An ad of this type is deprecated and cannot be created. Only deletions + // are permitted. + CANNOT_CREATE_DEPRECATED_ADS = 6; + + // Text ads are deprecated and cannot be created. Use expanded text ads + // instead. + CANNOT_CREATE_TEXT_ADS = 7; + + // A required field was not specified or is an empty string. + EMPTY_FIELD = 8; + + // An ad may only be modified once per call + RESOURCE_REFERENCED_IN_MULTIPLE_OPS = 9; + } + + +} diff --git a/google/ads/googleads/v3/errors/ad_group_bid_modifier_error.proto b/google/ads/googleads/v3/errors/ad_group_bid_modifier_error.proto new file mode 100644 index 000000000..aaba025f9 --- /dev/null +++ b/google/ads/googleads/v3/errors/ad_group_bid_modifier_error.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupBidModifierErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing ad group bid modifier errors. + +// Container for enum describing possible ad group bid modifier errors. +message AdGroupBidModifierErrorEnum { + // Enum describing possible ad group bid modifier errors. + enum AdGroupBidModifierError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The criterion ID does not support bid modification. + CRITERION_ID_NOT_SUPPORTED = 2; + + // Cannot override the bid modifier for the given criterion ID if the parent + // campaign is opted out of the same criterion. + CANNOT_OVERRIDE_OPTED_OUT_CAMPAIGN_CRITERION_BID_MODIFIER = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/ad_group_criterion_error.proto b/google/ads/googleads/v3/errors/ad_group_criterion_error.proto new file mode 100644 index 000000000..ad2a0c0f7 --- /dev/null +++ b/google/ads/googleads/v3/errors/ad_group_criterion_error.proto @@ -0,0 +1,165 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing ad group criterion errors. + +// Container for enum describing possible ad group criterion errors. +message AdGroupCriterionErrorEnum { + // Enum describing possible ad group criterion errors. + enum AdGroupCriterionError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // No link found between the AdGroupCriterion and the label. + AD_GROUP_CRITERION_LABEL_DOES_NOT_EXIST = 2; + + // The label has already been attached to the AdGroupCriterion. + AD_GROUP_CRITERION_LABEL_ALREADY_EXISTS = 3; + + // Negative AdGroupCriterion cannot have labels. + CANNOT_ADD_LABEL_TO_NEGATIVE_CRITERION = 4; + + // Too many operations for a single call. + TOO_MANY_OPERATIONS = 5; + + // Negative ad group criteria are not updateable. + CANT_UPDATE_NEGATIVE = 6; + + // Concrete type of criterion (keyword v.s. placement) is required for ADD + // and SET operations. + CONCRETE_TYPE_REQUIRED = 7; + + // Bid is incompatible with ad group's bidding settings. + BID_INCOMPATIBLE_WITH_ADGROUP = 8; + + // Cannot target and exclude the same criterion at once. + CANNOT_TARGET_AND_EXCLUDE = 9; + + // The URL of a placement is invalid. + ILLEGAL_URL = 10; + + // Keyword text was invalid. + INVALID_KEYWORD_TEXT = 11; + + // Destination URL was invalid. + INVALID_DESTINATION_URL = 12; + + // The destination url must contain at least one tag (e.g. {lpurl}) + MISSING_DESTINATION_URL_TAG = 13; + + // Keyword-level cpm bid is not supported + KEYWORD_LEVEL_BID_NOT_SUPPORTED_FOR_MANUALCPM = 14; + + // For example, cannot add a biddable ad group criterion that had been + // removed. + INVALID_USER_STATUS = 15; + + // Criteria type cannot be targeted for the ad group. Either the account is + // restricted to keywords only, the criteria type is incompatible with the + // campaign's bidding strategy, or the criteria type can only be applied to + // campaigns. + CANNOT_ADD_CRITERIA_TYPE = 16; + + // Criteria type cannot be excluded for the ad group. Refer to the + // documentation for a specific criterion to check if it is excludable. + CANNOT_EXCLUDE_CRITERIA_TYPE = 17; + + // Partial failure is not supported for shopping campaign mutate operations. + CAMPAIGN_TYPE_NOT_COMPATIBLE_WITH_PARTIAL_FAILURE = 27; + + // Operations in the mutate request changes too many shopping ad groups. + // Please split requests for multiple shopping ad groups across multiple + // requests. + OPERATIONS_FOR_TOO_MANY_SHOPPING_ADGROUPS = 28; + + // Not allowed to modify url fields of an ad group criterion if there are + // duplicate elements for that ad group criterion in the request. + CANNOT_MODIFY_URL_FIELDS_WITH_DUPLICATE_ELEMENTS = 29; + + // Cannot set url fields without also setting final urls. + CANNOT_SET_WITHOUT_FINAL_URLS = 30; + + // Cannot clear final urls if final mobile urls exist. + CANNOT_CLEAR_FINAL_URLS_IF_FINAL_MOBILE_URLS_EXIST = 31; + + // Cannot clear final urls if final app urls exist. + CANNOT_CLEAR_FINAL_URLS_IF_FINAL_APP_URLS_EXIST = 32; + + // Cannot clear final urls if tracking url template exists. + CANNOT_CLEAR_FINAL_URLS_IF_TRACKING_URL_TEMPLATE_EXISTS = 33; + + // Cannot clear final urls if url custom parameters exist. + CANNOT_CLEAR_FINAL_URLS_IF_URL_CUSTOM_PARAMETERS_EXIST = 34; + + // Cannot set both destination url and final urls. + CANNOT_SET_BOTH_DESTINATION_URL_AND_FINAL_URLS = 35; + + // Cannot set both destination url and tracking url template. + CANNOT_SET_BOTH_DESTINATION_URL_AND_TRACKING_URL_TEMPLATE = 36; + + // Final urls are not supported for this criterion type. + FINAL_URLS_NOT_SUPPORTED_FOR_CRITERION_TYPE = 37; + + // Final mobile urls are not supported for this criterion type. + FINAL_MOBILE_URLS_NOT_SUPPORTED_FOR_CRITERION_TYPE = 38; + + // Ad group is invalid due to the listing groups it contains. + INVALID_LISTING_GROUP_HIERARCHY = 39; + + // Listing group unit cannot have children. + LISTING_GROUP_UNIT_CANNOT_HAVE_CHILDREN = 40; + + // Subdivided listing groups must have an "others" case. + LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE = 41; + + // Dimension type of listing group must be the same as that of its siblings. + LISTING_GROUP_REQUIRES_SAME_DIMENSION_TYPE_AS_SIBLINGS = 42; + + // Listing group cannot be added to the ad group because it already exists. + LISTING_GROUP_ALREADY_EXISTS = 43; + + // Listing group referenced in the operation was not found in the ad group. + LISTING_GROUP_DOES_NOT_EXIST = 44; + + // Recursive removal failed because listing group subdivision is being + // created or modified in this request. + LISTING_GROUP_CANNOT_BE_REMOVED = 45; + + // Listing group type is not allowed for specified ad group criterion type. + INVALID_LISTING_GROUP_TYPE = 46; + + // Listing group in an ADD operation specifies a non temporary criterion id. + LISTING_GROUP_ADD_MAY_ONLY_USE_TEMP_ID = 47; + } + + +} diff --git a/google/ads/googleads/v3/errors/ad_group_error.proto b/google/ads/googleads/v3/errors/ad_group_error.proto new file mode 100644 index 000000000..5d9df034f --- /dev/null +++ b/google/ads/googleads/v3/errors/ad_group_error.proto @@ -0,0 +1,86 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing ad group errors. + +// Container for enum describing possible ad group errors. +message AdGroupErrorEnum { + // Enum describing possible ad group errors. + enum AdGroupError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // AdGroup with the same name already exists for the campaign. + DUPLICATE_ADGROUP_NAME = 2; + + // AdGroup name is not valid. + INVALID_ADGROUP_NAME = 3; + + // Advertiser is not allowed to target sites or set site bids that are not + // on the Google Search Network. + ADVERTISER_NOT_ON_CONTENT_NETWORK = 5; + + // Bid amount is too big. + BID_TOO_BIG = 6; + + // AdGroup bid does not match the campaign's bidding strategy. + BID_TYPE_AND_BIDDING_STRATEGY_MISMATCH = 7; + + // AdGroup name is required for Add. + MISSING_ADGROUP_NAME = 8; + + // No link found between the ad group and the label. + ADGROUP_LABEL_DOES_NOT_EXIST = 9; + + // The label has already been attached to the ad group. + ADGROUP_LABEL_ALREADY_EXISTS = 10; + + // The CriterionTypeGroup is not supported for the content bid dimension. + INVALID_CONTENT_BID_CRITERION_TYPE_GROUP = 11; + + // The ad group type is not compatible with the campaign channel type. + AD_GROUP_TYPE_NOT_VALID_FOR_ADVERTISING_CHANNEL_TYPE = 12; + + // The ad group type is not supported in the country of sale of the + // campaign. + ADGROUP_TYPE_NOT_SUPPORTED_FOR_CAMPAIGN_SALES_COUNTRY = 13; + + // Ad groups of AdGroupType.SEARCH_DYNAMIC_ADS can only be added to + // campaigns that have DynamicSearchAdsSetting attached. + CANNOT_ADD_ADGROUP_OF_TYPE_DSA_TO_CAMPAIGN_WITHOUT_DSA_SETTING = 14; + + // Promoted hotels ad groups are only available to whitelisted customers. + PROMOTED_HOTEL_AD_GROUPS_NOT_AVAILABLE_FOR_CUSTOMER = 15; + } + + +} diff --git a/google/ads/googleads/v3/errors/ad_group_feed_error.proto b/google/ads/googleads/v3/errors/ad_group_feed_error.proto new file mode 100644 index 000000000..e0d17955c --- /dev/null +++ b/google/ads/googleads/v3/errors/ad_group_feed_error.proto @@ -0,0 +1,67 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupFeedErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing ad group feed errors. + +// Container for enum describing possible ad group feed errors. +message AdGroupFeedErrorEnum { + // Enum describing possible ad group feed errors. + enum AdGroupFeedError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // An active feed already exists for this ad group and place holder type. + FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 2; + + // The specified feed is removed. + CANNOT_CREATE_FOR_REMOVED_FEED = 3; + + // The AdGroupFeed already exists. UPDATE operation should be used to modify + // the existing AdGroupFeed. + ADGROUP_FEED_ALREADY_EXISTS = 4; + + // Cannot operate on removed AdGroupFeed. + CANNOT_OPERATE_ON_REMOVED_ADGROUP_FEED = 5; + + // Invalid placeholder type. + INVALID_PLACEHOLDER_TYPE = 6; + + // Feed mapping for this placeholder type does not exist. + MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE = 7; + + // Location AdGroupFeeds cannot be created unless there is a location + // CustomerFeed for the specified feed. + NO_EXISTING_LOCATION_CUSTOMER_FEED = 8; + } + + +} diff --git a/google/ads/googleads/v3/errors/ad_parameter_error.proto b/google/ads/googleads/v3/errors/ad_parameter_error.proto new file mode 100644 index 000000000..e911181cd --- /dev/null +++ b/google/ads/googleads/v3/errors/ad_parameter_error.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AdParameterErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing ad parameter errors. + +// Container for enum describing possible ad parameter errors. +message AdParameterErrorEnum { + // Enum describing possible ad parameter errors. + enum AdParameterError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The ad group criterion must be a keyword criterion. + AD_GROUP_CRITERION_MUST_BE_KEYWORD = 2; + + // The insertion text is invalid. + INVALID_INSERTION_TEXT_FORMAT = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/ad_sharing_error.proto b/google/ads/googleads/v3/errors/ad_sharing_error.proto new file mode 100644 index 000000000..326a131eb --- /dev/null +++ b/google/ads/googleads/v3/errors/ad_sharing_error.proto @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AdSharingErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing ad sharing errors. + +// Container for enum describing possible ad sharing errors. +message AdSharingErrorEnum { + // Enum describing possible ad sharing errors. + enum AdSharingError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Error resulting in attempting to add an Ad to an AdGroup that already + // contains the Ad. + AD_GROUP_ALREADY_CONTAINS_AD = 2; + + // Ad is not compatible with the AdGroup it is being shared with. + INCOMPATIBLE_AD_UNDER_AD_GROUP = 3; + + // Cannot add AdGroupAd on inactive Ad. + CANNOT_SHARE_INACTIVE_AD = 4; + } + + +} diff --git a/google/ads/googleads/v3/errors/adx_error.proto b/google/ads/googleads/v3/errors/adx_error.proto new file mode 100644 index 000000000..598d6cf20 --- /dev/null +++ b/google/ads/googleads/v3/errors/adx_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AdxErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing adx errors. + +// Container for enum describing possible adx errors. +message AdxErrorEnum { + // Enum describing possible adx errors. + enum AdxError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Attempt to use non-AdX feature by AdX customer. + UNSUPPORTED_FEATURE = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/asset_error.proto b/google/ads/googleads/v3/errors/asset_error.proto new file mode 100644 index 000000000..e9b35aea0 --- /dev/null +++ b/google/ads/googleads/v3/errors/asset_error.proto @@ -0,0 +1,61 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AssetErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing asset errors. + +// Container for enum describing possible asset errors. +message AssetErrorEnum { + // Enum describing possible asset errors. + enum AssetError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The customer is not whitelisted for this asset type. + CUSTOMER_NOT_WHITELISTED_FOR_ASSET_TYPE = 2; + + // Assets are duplicated across operations. + DUPLICATE_ASSET = 3; + + // The asset name is duplicated, either across operations or with an + // existing asset. + DUPLICATE_ASSET_NAME = 4; + + // The Asset.asset_data oneof is empty. + ASSET_DATA_IS_MISSING = 5; + + // The asset has a name which is different from an existing duplicate that + // represents the same content. + CANNOT_MODIFY_ASSET_NAME = 6; + } + + +} diff --git a/google/ads/googleads/v3/errors/asset_link_error.proto b/google/ads/googleads/v3/errors/asset_link_error.proto new file mode 100644 index 000000000..42bc94c2c --- /dev/null +++ b/google/ads/googleads/v3/errors/asset_link_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AssetLinkErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing asset link errors. + +// Container for enum describing possible asset link errors. +message AssetLinkErrorEnum { + // Enum describing possible asset link errors. + enum AssetLinkError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Pinning is not supported for the given asset link field. + PINNING_UNSUPPORTED = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/authentication_error.proto b/google/ads/googleads/v3/errors/authentication_error.proto new file mode 100644 index 000000000..b2c889b4c --- /dev/null +++ b/google/ads/googleads/v3/errors/authentication_error.proto @@ -0,0 +1,103 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AuthenticationErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing authentication errors. + +// Container for enum describing possible authentication errors. +message AuthenticationErrorEnum { + // Enum describing possible authentication errors. + enum AuthenticationError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Authentication of the request failed. + AUTHENTICATION_ERROR = 2; + + // Client Customer Id is not a number. + CLIENT_CUSTOMER_ID_INVALID = 5; + + // No customer found for the provided customer id. + CUSTOMER_NOT_FOUND = 8; + + // Client's Google Account is deleted. + GOOGLE_ACCOUNT_DELETED = 9; + + // Google account login token in the cookie is invalid. + GOOGLE_ACCOUNT_COOKIE_INVALID = 10; + + // A problem occurred during Google account authentication. + GOOGLE_ACCOUNT_AUTHENTICATION_FAILED = 25; + + // The user in the google account login token does not match the UserId in + // the cookie. + GOOGLE_ACCOUNT_USER_AND_ADS_USER_MISMATCH = 12; + + // Login cookie is required for authentication. + LOGIN_COOKIE_REQUIRED = 13; + + // User in the cookie is not a valid Ads user. + NOT_ADS_USER = 14; + + // Oauth token in the header is not valid. + OAUTH_TOKEN_INVALID = 15; + + // Oauth token in the header has expired. + OAUTH_TOKEN_EXPIRED = 16; + + // Oauth token in the header has been disabled. + OAUTH_TOKEN_DISABLED = 17; + + // Oauth token in the header has been revoked. + OAUTH_TOKEN_REVOKED = 18; + + // Oauth token HTTP header is malformed. + OAUTH_TOKEN_HEADER_INVALID = 19; + + // Login cookie is not valid. + LOGIN_COOKIE_INVALID = 20; + + // User Id in the header is not a valid id. + USER_ID_INVALID = 22; + + // An account administrator changed this account's authentication settings. + // To access this Google Ads account, enable 2-Step Verification in your + // Google account at https://www.google.com/landing/2step. + TWO_STEP_VERIFICATION_NOT_ENROLLED = 23; + + // An account administrator changed this account's authentication settings. + // To access this Google Ads account, enable Advanced Protection in your + // Google account at https://landing.google.com/advancedprotection. + ADVANCED_PROTECTION_NOT_ENROLLED = 24; + } + + +} diff --git a/google/ads/googleads/v3/errors/authorization_error.proto b/google/ads/googleads/v3/errors/authorization_error.proto new file mode 100644 index 000000000..d070275de --- /dev/null +++ b/google/ads/googleads/v3/errors/authorization_error.proto @@ -0,0 +1,88 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "AuthorizationErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing authorization errors. + +// Container for enum describing possible authorization errors. +message AuthorizationErrorEnum { + // Enum describing possible authorization errors. + enum AuthorizationError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // User doesn't have permission to access customer. Note: If you're + // accessing a client customer, the manager's customer ID must be set in the + // `login-customer-id` header. Learn more at + // https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid + USER_PERMISSION_DENIED = 2; + + // The developer token is not whitelisted. + DEVELOPER_TOKEN_NOT_WHITELISTED = 3; + + // The developer token is not allowed with the project sent in the request. + DEVELOPER_TOKEN_PROHIBITED = 4; + + // The Google Cloud project sent in the request does not have permission to + // access the api. + PROJECT_DISABLED = 5; + + // Authorization of the client failed. + AUTHORIZATION_ERROR = 6; + + // The user does not have permission to perform this action + // (e.g., ADD, UPDATE, REMOVE) on the resource or call a method. + ACTION_NOT_PERMITTED = 7; + + // Signup not complete. + INCOMPLETE_SIGNUP = 8; + + // The customer can't be used because it isn't enabled. + CUSTOMER_NOT_ENABLED = 24; + + // The developer must sign the terms of service. They can be found here: + // ads.google.com/aw/apicenter + MISSING_TOS = 9; + + // The developer token is not approved. Non-approved developer tokens can + // only be used with test accounts. + DEVELOPER_TOKEN_NOT_APPROVED = 10; + + // The login customer specified does not have access to the account + // specified, so the request is invalid. + INVALID_LOGIN_CUSTOMER_ID_SERVING_CUSTOMER_ID_COMBINATION = 11; + + // The developer specified does not have access to the service. + SERVICE_ACCESS_DENIED = 12; + } + + +} diff --git a/google/ads/googleads/v3/errors/bidding_error.proto b/google/ads/googleads/v3/errors/bidding_error.proto new file mode 100644 index 000000000..6c718f42b --- /dev/null +++ b/google/ads/googleads/v3/errors/bidding_error.proto @@ -0,0 +1,121 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "BiddingErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing bidding errors. + +// Container for enum describing possible bidding errors. +message BiddingErrorEnum { + // Enum describing possible bidding errors. + enum BiddingError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Cannot transition to new bidding strategy. + BIDDING_STRATEGY_TRANSITION_NOT_ALLOWED = 2; + + // Cannot attach bidding strategy to campaign. + CANNOT_ATTACH_BIDDING_STRATEGY_TO_CAMPAIGN = 7; + + // Bidding strategy is not supported or cannot be used as anonymous. + INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE = 10; + + // The type does not match the named strategy's type. + INVALID_BIDDING_STRATEGY_TYPE = 14; + + // The bid is invalid. + INVALID_BID = 17; + + // Bidding strategy is not available for the account type. + BIDDING_STRATEGY_NOT_AVAILABLE_FOR_ACCOUNT_TYPE = 18; + + // Conversion tracking is not enabled for the campaign for VBB transition. + CONVERSION_TRACKING_NOT_ENABLED = 19; + + // Not enough conversions tracked for VBB transitions. + NOT_ENOUGH_CONVERSIONS = 20; + + // Campaign can not be created with given bidding strategy. It can be + // transitioned to the strategy, once eligible. + CANNOT_CREATE_CAMPAIGN_WITH_BIDDING_STRATEGY = 21; + + // Cannot target content network only as campaign uses Page One Promoted + // bidding strategy. + CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CAMPAIGN_LEVEL_POP_BIDDING_STRATEGY = 23; + + // Budget Optimizer and Target Spend bidding strategies are not supported + // for campaigns with AdSchedule targeting. + BIDDING_STRATEGY_NOT_SUPPORTED_WITH_AD_SCHEDULE = 24; + + // Pay per conversion is not available to all the customer, only few + // whitelisted customers can use this. + PAY_PER_CONVERSION_NOT_AVAILABLE_FOR_CUSTOMER = 25; + + // Pay per conversion is not allowed with Target CPA. + PAY_PER_CONVERSION_NOT_ALLOWED_WITH_TARGET_CPA = 26; + + // Cannot set bidding strategy to Manual CPM for search network only + // campaigns. + BIDDING_STRATEGY_NOT_ALLOWED_FOR_SEARCH_ONLY_CAMPAIGNS = 27; + + // The bidding strategy is not supported for use in drafts or experiments. + BIDDING_STRATEGY_NOT_SUPPORTED_IN_DRAFTS_OR_EXPERIMENTS = 28; + + // Bidding strategy type does not support product type ad group criterion. + BIDDING_STRATEGY_TYPE_DOES_NOT_SUPPORT_PRODUCT_TYPE_ADGROUP_CRITERION = 29; + + // Bid amount is too small. + BID_TOO_SMALL = 30; + + // Bid amount is too big. + BID_TOO_BIG = 31; + + // Bid has too many fractional digit precision. + BID_TOO_MANY_FRACTIONAL_DIGITS = 32; + + // Invalid domain name specified. + INVALID_DOMAIN_NAME = 33; + + // The field is not compatible with the payment mode. + NOT_COMPATIBLE_WITH_PAYMENT_MODE = 34; + + // The field is not compatible with the budget type. + NOT_COMPATIBLE_WITH_BUDGET_TYPE = 35; + + // The field is not compatible with the bidding strategy type. + NOT_COMPATIBLE_WITH_BIDDING_STRATEGY_TYPE = 36; + + // Bidding strategy type is incompatible with shared budget. + BIDDING_STRATEGY_TYPE_INCOMPATIBLE_WITH_SHARED_BUDGET = 37; + } + + +} diff --git a/google/ads/googleads/v3/errors/bidding_strategy_error.proto b/google/ads/googleads/v3/errors/bidding_strategy_error.proto new file mode 100644 index 000000000..1d5648047 --- /dev/null +++ b/google/ads/googleads/v3/errors/bidding_strategy_error.proto @@ -0,0 +1,61 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "BiddingStrategyErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing bidding strategy errors. + +// Container for enum describing possible bidding strategy errors. +message BiddingStrategyErrorEnum { + // Enum describing possible bidding strategy errors. + enum BiddingStrategyError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Each bidding strategy must have a unique name. + DUPLICATE_NAME = 2; + + // Bidding strategy type is immutable. + CANNOT_CHANGE_BIDDING_STRATEGY_TYPE = 3; + + // Only bidding strategies not linked to campaigns, adgroups or adgroup + // criteria can be removed. + CANNOT_REMOVE_ASSOCIATED_STRATEGY = 4; + + // The specified bidding strategy is not supported. + BIDDING_STRATEGY_NOT_SUPPORTED = 5; + + // The bidding strategy is incompatible with the campaign's bidding + // strategy goal type. + INCOMPATIBLE_BIDDING_STRATEGY_AND_BIDDING_STRATEGY_GOAL_TYPE = 6; + } + + +} diff --git a/google/ads/googleads/v3/errors/billing_setup_error.proto b/google/ads/googleads/v3/errors/billing_setup_error.proto new file mode 100644 index 000000000..a34c6f2d7 --- /dev/null +++ b/google/ads/googleads/v3/errors/billing_setup_error.proto @@ -0,0 +1,105 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "BillingSetupErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing billing setup errors. + +// Container for enum describing possible billing setup errors. +message BillingSetupErrorEnum { + // Enum describing possible billing setup errors. + enum BillingSetupError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Cannot specify both an existing payments account and a new payments + // account when setting up billing. + CANNOT_USE_EXISTING_AND_NEW_ACCOUNT = 2; + + // Cannot cancel an approved billing setup whose start time has passed. + CANNOT_REMOVE_STARTED_BILLING_SETUP = 3; + + // Cannot perform a Change of Bill-To (CBT) to the same payments account. + CANNOT_CHANGE_BILLING_TO_SAME_PAYMENTS_ACCOUNT = 4; + + // Billing setups can only be used by customers with ENABLED or DRAFT + // status. + BILLING_SETUP_NOT_PERMITTED_FOR_CUSTOMER_STATUS = 5; + + // Billing setups must either include a correctly formatted existing + // payments account id, or a non-empty new payments account name. + INVALID_PAYMENTS_ACCOUNT = 6; + + // Only billable and third-party customers can create billing setups. + BILLING_SETUP_NOT_PERMITTED_FOR_CUSTOMER_CATEGORY = 7; + + // Billing setup creations can only use NOW for start time type. + INVALID_START_TIME_TYPE = 8; + + // Billing setups can only be created for a third-party customer if they do + // not already have a setup. + THIRD_PARTY_ALREADY_HAS_BILLING = 9; + + // Billing setups cannot be created if there is already a pending billing in + // progress. + BILLING_SETUP_IN_PROGRESS = 10; + + // Billing setups can only be created by customers who have permission to + // setup billings. Users can contact a representative for help setting up + // permissions. + NO_SIGNUP_PERMISSION = 11; + + // Billing setups cannot be created if there is already a future-approved + // billing. + CHANGE_OF_BILL_TO_IN_PROGRESS = 12; + + // Requested payments profile not found. + PAYMENTS_PROFILE_NOT_FOUND = 13; + + // Requested payments account not found. + PAYMENTS_ACCOUNT_NOT_FOUND = 14; + + // Billing setup creation failed because the payments profile is ineligible. + PAYMENTS_PROFILE_INELIGIBLE = 15; + + // Billing setup creation failed because the payments account is ineligible. + PAYMENTS_ACCOUNT_INELIGIBLE = 16; + + // Billing setup creation failed because the payments profile needs internal + // approval. + CUSTOMER_NEEDS_INTERNAL_APPROVAL = 17; + + // Payments account has different currency code than the current customer + // and hence cannot be used to setup billing. + PAYMENTS_ACCOUNT_INELIGIBLE_CURRENCY_CODE_MISMATCH = 19; + } + + +} diff --git a/google/ads/googleads/v3/errors/campaign_budget_error.proto b/google/ads/googleads/v3/errors/campaign_budget_error.proto new file mode 100644 index 000000000..e13bd82b6 --- /dev/null +++ b/google/ads/googleads/v3/errors/campaign_budget_error.proto @@ -0,0 +1,97 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CampaignBudgetErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing campaign budget errors. + +// Container for enum describing possible campaign budget errors. +message CampaignBudgetErrorEnum { + // Enum describing possible campaign budget errors. + enum CampaignBudgetError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The campaign budget cannot be shared. + CAMPAIGN_BUDGET_CANNOT_BE_SHARED = 17; + + // The requested campaign budget no longer exists. + CAMPAIGN_BUDGET_REMOVED = 2; + + // The campaign budget is associated with at least one campaign, and so the + // campaign budget cannot be removed. + CAMPAIGN_BUDGET_IN_USE = 3; + + // Customer is not whitelisted for this campaign budget period. + CAMPAIGN_BUDGET_PERIOD_NOT_AVAILABLE = 4; + + // This field is not mutable on implicitly shared campaign budgets + CANNOT_MODIFY_FIELD_OF_IMPLICITLY_SHARED_CAMPAIGN_BUDGET = 6; + + // Cannot change explicitly shared campaign budgets back to implicitly + // shared ones. + CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_IMPLICITLY_SHARED = 7; + + // An implicit campaign budget without a name cannot be changed to + // explicitly shared campaign budget. + CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_EXPLICITLY_SHARED_WITHOUT_NAME = 8; + + // Cannot change an implicitly shared campaign budget to an explicitly + // shared one. + CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_EXPLICITLY_SHARED = 9; + + // Only explicitly shared campaign budgets can be used with multiple + // campaigns. + CANNOT_USE_IMPLICITLY_SHARED_CAMPAIGN_BUDGET_WITH_MULTIPLE_CAMPAIGNS = 10; + + // A campaign budget with this name already exists. + DUPLICATE_NAME = 11; + + // A money amount was not in the expected currency. + MONEY_AMOUNT_IN_WRONG_CURRENCY = 12; + + // A money amount was less than the minimum CPC for currency. + MONEY_AMOUNT_LESS_THAN_CURRENCY_MINIMUM_CPC = 13; + + // A money amount was greater than the maximum allowed. + MONEY_AMOUNT_TOO_LARGE = 14; + + // A money amount was negative. + NEGATIVE_MONEY_AMOUNT = 15; + + // A money amount was not a multiple of a minimum unit. + NON_MULTIPLE_OF_MINIMUM_CURRENCY_UNIT = 16; + + // Total budget amount must be unset when BudgetPeriod is DAILY. + TOTAL_BUDGET_AMOUNT_MUST_BE_UNSET_FOR_BUDGET_PERIOD_DAILY = 18; + } + + +} diff --git a/google/ads/googleads/v3/errors/campaign_criterion_error.proto b/google/ads/googleads/v3/errors/campaign_criterion_error.proto new file mode 100644 index 000000000..8ab8358aa --- /dev/null +++ b/google/ads/googleads/v3/errors/campaign_criterion_error.proto @@ -0,0 +1,81 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CampaignCriterionErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing campaign criterion errors. + +// Container for enum describing possible campaign criterion errors. +message CampaignCriterionErrorEnum { + // Enum describing possible campaign criterion errors. + enum CampaignCriterionError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Concrete type of criterion (keyword v.s. placement) is required for + // CREATE and UPDATE operations. + CONCRETE_TYPE_REQUIRED = 2; + + // Invalid placement URL. + INVALID_PLACEMENT_URL = 3; + + // Criteria type can not be excluded for the campaign by the customer. like + // AOL account type cannot target site type criteria + CANNOT_EXCLUDE_CRITERIA_TYPE = 4; + + // Cannot set the campaign criterion status for this criteria type. + CANNOT_SET_STATUS_FOR_CRITERIA_TYPE = 5; + + // Cannot set the campaign criterion status for an excluded criteria. + CANNOT_SET_STATUS_FOR_EXCLUDED_CRITERIA = 6; + + // Cannot target and exclude the same criterion. + CANNOT_TARGET_AND_EXCLUDE = 7; + + // The mutate contained too many operations. + TOO_MANY_OPERATIONS = 8; + + // This operator cannot be applied to a criterion of this type. + OPERATOR_NOT_SUPPORTED_FOR_CRITERION_TYPE = 9; + + // The Shopping campaign sales country is not supported for + // ProductSalesChannel targeting. + SHOPPING_CAMPAIGN_SALES_COUNTRY_NOT_SUPPORTED_FOR_SALES_CHANNEL = 10; + + // The existing field can't be updated with CREATE operation. It can be + // updated with UPDATE operation only. + CANNOT_ADD_EXISTING_FIELD = 11; + + // Negative criteria are immutable, so updates are not allowed. + CANNOT_UPDATE_NEGATIVE_CRITERION = 12; + } + + +} diff --git a/google/ads/googleads/v3/errors/campaign_draft_error.proto b/google/ads/googleads/v3/errors/campaign_draft_error.proto new file mode 100644 index 000000000..fcf940018 --- /dev/null +++ b/google/ads/googleads/v3/errors/campaign_draft_error.proto @@ -0,0 +1,79 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CampaignDraftErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing campaign draft errors. + +// Container for enum describing possible campaign draft errors. +message CampaignDraftErrorEnum { + // Enum describing possible campaign draft errors. + enum CampaignDraftError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // A draft with this name already exists for this campaign. + DUPLICATE_DRAFT_NAME = 2; + + // The draft is removed and cannot be transitioned to another status. + INVALID_STATUS_TRANSITION_FROM_REMOVED = 3; + + // The draft has been promoted and cannot be transitioned to the specified + // status. + INVALID_STATUS_TRANSITION_FROM_PROMOTED = 4; + + // The draft has failed to be promoted and cannot be transitioned to the + // specified status. + INVALID_STATUS_TRANSITION_FROM_PROMOTE_FAILED = 5; + + // This customer is not allowed to create drafts. + CUSTOMER_CANNOT_CREATE_DRAFT = 6; + + // This campaign is not allowed to create drafts. + CAMPAIGN_CANNOT_CREATE_DRAFT = 7; + + // This modification cannot be made on a draft. + INVALID_DRAFT_CHANGE = 8; + + // The draft cannot be transitioned to the specified status from its + // current status. + INVALID_STATUS_TRANSITION = 9; + + // The campaign has reached the maximum number of drafts that can be created + // for a campaign throughout its lifetime. No additional drafts can be + // created for this campaign. Removed drafts also count towards this limit. + MAX_NUMBER_OF_DRAFTS_PER_CAMPAIGN_REACHED = 10; + + // ListAsyncErrors was called without first promoting the draft. + LIST_ERRORS_FOR_PROMOTED_DRAFT_ONLY = 11; + } + + +} diff --git a/google/ads/googleads/v3/errors/campaign_error.proto b/google/ads/googleads/v3/errors/campaign_error.proto new file mode 100644 index 000000000..865e77ed1 --- /dev/null +++ b/google/ads/googleads/v3/errors/campaign_error.proto @@ -0,0 +1,179 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CampaignErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing campaign errors. + +// Container for enum describing possible campaign errors. +message CampaignErrorEnum { + // Enum describing possible campaign errors. + enum CampaignError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Cannot target content network. + CANNOT_TARGET_CONTENT_NETWORK = 3; + + // Cannot target search network. + CANNOT_TARGET_SEARCH_NETWORK = 4; + + // Cannot cover search network without google search network. + CANNOT_TARGET_SEARCH_NETWORK_WITHOUT_GOOGLE_SEARCH = 5; + + // Cannot target Google Search network for a CPM campaign. + CANNOT_TARGET_GOOGLE_SEARCH_FOR_CPM_CAMPAIGN = 6; + + // Must target at least one network. + CAMPAIGN_MUST_TARGET_AT_LEAST_ONE_NETWORK = 7; + + // Only some Google partners are allowed to target partner search network. + CANNOT_TARGET_PARTNER_SEARCH_NETWORK = 8; + + // Cannot target content network only as campaign has criteria-level bidding + // strategy. + CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CRITERIA_LEVEL_BIDDING_STRATEGY = 9; + + // Cannot modify the start or end date such that the campaign duration would + // not contain the durations of all runnable trials. + CAMPAIGN_DURATION_MUST_CONTAIN_ALL_RUNNABLE_TRIALS = 10; + + // Cannot modify dates, budget or campaign name of a trial campaign. + CANNOT_MODIFY_FOR_TRIAL_CAMPAIGN = 11; + + // Trying to modify the name of an active or paused campaign, where the name + // is already assigned to another active or paused campaign. + DUPLICATE_CAMPAIGN_NAME = 12; + + // Two fields are in conflicting modes. + INCOMPATIBLE_CAMPAIGN_FIELD = 13; + + // Campaign name cannot be used. + INVALID_CAMPAIGN_NAME = 14; + + // Given status is invalid. + INVALID_AD_SERVING_OPTIMIZATION_STATUS = 15; + + // Error in the campaign level tracking URL. + INVALID_TRACKING_URL = 16; + + // Cannot set both tracking URL template and tracking setting. A user has + // to clear legacy tracking setting in order to add tracking URL template. + CANNOT_SET_BOTH_TRACKING_URL_TEMPLATE_AND_TRACKING_SETTING = 17; + + // The maximum number of impressions for Frequency Cap should be an integer + // greater than 0. + MAX_IMPRESSIONS_NOT_IN_RANGE = 18; + + // Only the Day, Week and Month time units are supported. + TIME_UNIT_NOT_SUPPORTED = 19; + + // Operation not allowed on a campaign whose serving status has ended + INVALID_OPERATION_IF_SERVING_STATUS_HAS_ENDED = 20; + + // This budget is exclusively linked to a Campaign that is using experiments + // so it cannot be shared. + BUDGET_CANNOT_BE_SHARED = 21; + + // Campaigns using experiments cannot use a shared budget. + CAMPAIGN_CANNOT_USE_SHARED_BUDGET = 22; + + // A different budget cannot be assigned to a campaign when there are + // running or scheduled trials. + CANNOT_CHANGE_BUDGET_ON_CAMPAIGN_WITH_TRIALS = 23; + + // No link found between the campaign and the label. + CAMPAIGN_LABEL_DOES_NOT_EXIST = 24; + + // The label has already been attached to the campaign. + CAMPAIGN_LABEL_ALREADY_EXISTS = 25; + + // A ShoppingSetting was not found when creating a shopping campaign. + MISSING_SHOPPING_SETTING = 26; + + // The country in shopping setting is not an allowed country. + INVALID_SHOPPING_SALES_COUNTRY = 27; + + // The requested channel type is not available according to the customer's + // account setting. + ADVERTISING_CHANNEL_TYPE_NOT_AVAILABLE_FOR_ACCOUNT_TYPE = 31; + + // The AdvertisingChannelSubType is not a valid subtype of the primary + // channel type. + INVALID_ADVERTISING_CHANNEL_SUB_TYPE = 32; + + // At least one conversion must be selected. + AT_LEAST_ONE_CONVERSION_MUST_BE_SELECTED = 33; + + // Setting ad rotation mode for a campaign is not allowed. Ad rotation mode + // at campaign is deprecated. + CANNOT_SET_AD_ROTATION_MODE = 34; + + // Trying to change start date on a campaign that has started. + CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED = 35; + + // Trying to modify a date into the past. + CANNOT_SET_DATE_TO_PAST = 36; + + // Hotel center id in the hotel setting does not match any customer links. + MISSING_HOTEL_CUSTOMER_LINK = 37; + + // Hotel center id in the hotel setting must match an active customer link. + INVALID_HOTEL_CUSTOMER_LINK = 38; + + // Hotel setting was not found when creating a hotel ads campaign. + MISSING_HOTEL_SETTING = 39; + + // A Campaign cannot use shared campaign budgets and be part of a campaign + // group. + CANNOT_USE_SHARED_CAMPAIGN_BUDGET_WHILE_PART_OF_CAMPAIGN_GROUP = 40; + + // The app ID was not found. + APP_NOT_FOUND = 41; + + // Campaign.shopping_setting.enable_local is not supported for the specified + // campaign type. + SHOPPING_ENABLE_LOCAL_NOT_SUPPORTED_FOR_CAMPAIGN_TYPE = 42; + + // The merchant does not support the creation of campaigns for Shopping + // Comparison Listing Ads. + MERCHANT_NOT_ALLOWED_FOR_COMPARISON_LISTING_ADS = 43; + + // The App campaign for engagement cannot be created because there aren't + // enough installs. + INSUFFICIENT_APP_INSTALLS_COUNT = 44; + + // The App campaign for engagement cannot be created because the app is + // sensitive. + SENSITIVE_CATEGORY_APP = 45; + } + + +} diff --git a/google/ads/googleads/v3/errors/campaign_experiment_error.proto b/google/ads/googleads/v3/errors/campaign_experiment_error.proto new file mode 100644 index 000000000..4d55ef7c0 --- /dev/null +++ b/google/ads/googleads/v3/errors/campaign_experiment_error.proto @@ -0,0 +1,81 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExperimentErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing campaign experiment errors. + +// Container for enum describing possible campaign experiment errors. +message CampaignExperimentErrorEnum { + // Enum describing possible campaign experiment errors. + enum CampaignExperimentError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // An active campaign or experiment with this name already exists. + DUPLICATE_NAME = 2; + + // Experiment cannot be updated from the current state to the + // requested target state. For example, an experiment can only graduate + // if its status is ENABLED. + INVALID_TRANSITION = 3; + + // Cannot create an experiment from a campaign using an explicitly shared + // budget. + CANNOT_CREATE_EXPERIMENT_WITH_SHARED_BUDGET = 4; + + // Cannot create an experiment for a removed base campaign. + CANNOT_CREATE_EXPERIMENT_FOR_REMOVED_BASE_CAMPAIGN = 5; + + // Cannot create an experiment from a draft, which has a status other than + // proposed. + CANNOT_CREATE_EXPERIMENT_FOR_NON_PROPOSED_DRAFT = 6; + + // This customer is not allowed to create an experiment. + CUSTOMER_CANNOT_CREATE_EXPERIMENT = 7; + + // This campaign is not allowed to create an experiment. + CAMPAIGN_CANNOT_CREATE_EXPERIMENT = 8; + + // Trying to set an experiment duration which overlaps with another + // experiment. + EXPERIMENT_DURATIONS_MUST_NOT_OVERLAP = 9; + + // All non-removed experiments must start and end within their campaign's + // duration. + EXPERIMENT_DURATION_MUST_BE_WITHIN_CAMPAIGN_DURATION = 10; + + // The experiment cannot be modified because its status is in a terminal + // state, such as REMOVED. + CANNOT_MUTATE_EXPERIMENT_DUE_TO_STATUS = 11; + } + + +} diff --git a/google/ads/googleads/v3/errors/campaign_feed_error.proto b/google/ads/googleads/v3/errors/campaign_feed_error.proto new file mode 100644 index 000000000..5ab25af5f --- /dev/null +++ b/google/ads/googleads/v3/errors/campaign_feed_error.proto @@ -0,0 +1,67 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CampaignFeedErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing campaign feed errors. + +// Container for enum describing possible campaign feed errors. +message CampaignFeedErrorEnum { + // Enum describing possible campaign feed errors. + enum CampaignFeedError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // An active feed already exists for this campaign and placeholder type. + FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 2; + + // The specified feed is removed. + CANNOT_CREATE_FOR_REMOVED_FEED = 4; + + // The CampaignFeed already exists. UPDATE should be used to modify the + // existing CampaignFeed. + CANNOT_CREATE_ALREADY_EXISTING_CAMPAIGN_FEED = 5; + + // Cannot update removed campaign feed. + CANNOT_MODIFY_REMOVED_CAMPAIGN_FEED = 6; + + // Invalid placeholder type. + INVALID_PLACEHOLDER_TYPE = 7; + + // Feed mapping for this placeholder type does not exist. + MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE = 8; + + // Location CampaignFeeds cannot be created unless there is a location + // CustomerFeed for the specified feed. + NO_EXISTING_LOCATION_CUSTOMER_FEED = 9; + } + + +} diff --git a/google/ads/googleads/v3/errors/campaign_shared_set_error.proto b/google/ads/googleads/v3/errors/campaign_shared_set_error.proto new file mode 100644 index 000000000..b87cd000d --- /dev/null +++ b/google/ads/googleads/v3/errors/campaign_shared_set_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CampaignSharedSetErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing campaign shared set errors. + +// Container for enum describing possible campaign shared set errors. +message CampaignSharedSetErrorEnum { + // Enum describing possible campaign shared set errors. + enum CampaignSharedSetError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The shared set belongs to another customer and permission isn't granted. + SHARED_SET_ACCESS_DENIED = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/change_status_error.proto b/google/ads/googleads/v3/errors/change_status_error.proto new file mode 100644 index 000000000..e8ba8d936 --- /dev/null +++ b/google/ads/googleads/v3/errors/change_status_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ChangeStatusErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing change status errors. + +// Container for enum describing possible change status errors. +message ChangeStatusErrorEnum { + // Enum describing possible change status errors. + enum ChangeStatusError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The requested start date is too old. + START_DATE_TOO_OLD = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/collection_size_error.proto b/google/ads/googleads/v3/errors/collection_size_error.proto new file mode 100644 index 000000000..2af17e8d3 --- /dev/null +++ b/google/ads/googleads/v3/errors/collection_size_error.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CollectionSizeErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing collection size errors. + +// Container for enum describing possible collection size errors. +message CollectionSizeErrorEnum { + // Enum describing possible collection size errors. + enum CollectionSizeError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Too few. + TOO_FEW = 2; + + // Too many. + TOO_MANY = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/context_error.proto b/google/ads/googleads/v3/errors/context_error.proto new file mode 100644 index 000000000..c0c5e594a --- /dev/null +++ b/google/ads/googleads/v3/errors/context_error.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ContextErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing context errors. + +// Container for enum describing possible context errors. +message ContextErrorEnum { + // Enum describing possible context errors. + enum ContextError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The operation is not allowed for the given context. + OPERATION_NOT_PERMITTED_FOR_CONTEXT = 2; + + // The operation is not allowed for removed resources. + OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/conversion_action_error.proto b/google/ads/googleads/v3/errors/conversion_action_error.proto new file mode 100644 index 000000000..dbafaef0f --- /dev/null +++ b/google/ads/googleads/v3/errors/conversion_action_error.proto @@ -0,0 +1,75 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing conversion action errors. + +// Container for enum describing possible conversion action errors. +message ConversionActionErrorEnum { + // Enum describing possible conversion action errors. + enum ConversionActionError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The specified conversion action name already exists. + DUPLICATE_NAME = 2; + + // Another conversion action with the specified app id already exists. + DUPLICATE_APP_ID = 3; + + // Android first open action conflicts with Google play codeless download + // action tracking the same app. + TWO_CONVERSION_ACTIONS_BIDDING_ON_SAME_APP_DOWNLOAD = 4; + + // Android first open action conflicts with Google play codeless download + // action tracking the same app. + BIDDING_ON_SAME_APP_DOWNLOAD_AS_GLOBAL_ACTION = 5; + + // The attribution model cannot be set to DATA_DRIVEN because a data-driven + // model has never been generated. + DATA_DRIVEN_MODEL_WAS_NEVER_GENERATED = 6; + + // The attribution model cannot be set to DATA_DRIVEN because the + // data-driven model is expired. + DATA_DRIVEN_MODEL_EXPIRED = 7; + + // The attribution model cannot be set to DATA_DRIVEN because the + // data-driven model is stale. + DATA_DRIVEN_MODEL_STALE = 8; + + // The attribution model cannot be set to DATA_DRIVEN because the + // data-driven model is unavailable or the conversion action was newly + // added. + DATA_DRIVEN_MODEL_UNKNOWN = 9; + } + + +} diff --git a/google/ads/googleads/v3/errors/conversion_adjustment_upload_error.proto b/google/ads/googleads/v3/errors/conversion_adjustment_upload_error.proto new file mode 100644 index 000000000..ac6534f16 --- /dev/null +++ b/google/ads/googleads/v3/errors/conversion_adjustment_upload_error.proto @@ -0,0 +1,85 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ConversionAdjustmentUploadErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing conversion adjustment upload errors. + +// Container for enum describing possible conversion adjustment upload errors. +message ConversionAdjustmentUploadErrorEnum { + // Enum describing possible conversion adjustment upload errors. + enum ConversionAdjustmentUploadError { + // Not specified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The specified conversion action was created too recently. + // Please try the upload again after 4-6 hours have passed since the + // conversion action was created. + TOO_RECENT_CONVERSION_ACTION = 2; + + // No conversion action of a supported ConversionActionType that matches the + // provided information can be found for the customer. + INVALID_CONVERSION_ACTION = 3; + + // A retraction was already reported for this conversion. + CONVERSION_ALREADY_RETRACTED = 4; + + // A conversion for the supplied combination of conversion + // action and conversion identifier could not be found. + CONVERSION_NOT_FOUND = 5; + + // The specified conversion has already expired. Conversions expire after 55 + // days, after which adjustments cannot be reported against them. + CONVERSION_EXPIRED = 6; + + // The supplied adjustment date time precedes that of the original + // conversion. + ADJUSTMENT_PRECEDES_CONVERSION = 7; + + // A restatement with a more recent adjustment date time was already + // reported for this conversion. + MORE_RECENT_RESTATEMENT_FOUND = 8; + + // The conversion was created too recently. + TOO_RECENT_CONVERSION = 9; + + // Restatements cannot be reported for a conversion action that always uses + // the default value. + CANNOT_RESTATE_CONVERSION_ACTION_THAT_ALWAYS_USES_DEFAULT_CONVERSION_VALUE = 10; + + // The request contained more than 2000 adjustments. + TOO_MANY_ADJUSTMENTS_IN_REQUEST = 11; + + // The conversion has been adjusted too many times. + TOO_MANY_ADJUSTMENTS = 12; + } + + +} diff --git a/google/ads/googleads/v3/errors/conversion_upload_error.proto b/google/ads/googleads/v3/errors/conversion_upload_error.proto new file mode 100644 index 000000000..b852de862 --- /dev/null +++ b/google/ads/googleads/v3/errors/conversion_upload_error.proto @@ -0,0 +1,130 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ConversionUploadErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing conversion upload errors. + +// Container for enum describing possible conversion upload errors. +message ConversionUploadErrorEnum { + // Enum describing possible conversion upload errors. + enum ConversionUploadError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The request contained more than 2000 conversions. + TOO_MANY_CONVERSIONS_IN_REQUEST = 2; + + // The specified gclid could not be decoded. + UNPARSEABLE_GCLID = 3; + + // The specified conversion_date_time is before the event time + // associated with the given gclid. + CONVERSION_PRECEDES_GCLID = 4; + + // The click associated with the given gclid is either too old to be + // imported or occurred outside of the click through lookback window for the + // specified conversion action. + EXPIRED_GCLID = 5; + + // The click associated with the given gclid occurred too recently. Please + // try uploading again after 6 hours have passed since the click occurred. + TOO_RECENT_GCLID = 6; + + // The click associated with the given gclid could not be found in the + // system. This can happen if Google Click IDs are collected for non Google + // Ads clicks. + GCLID_NOT_FOUND = 7; + + // The click associated with the given gclid is owned by a customer + // account that the uploading customer does not manage. + UNAUTHORIZED_CUSTOMER = 8; + + // No upload eligible conversion action that matches the provided + // information can be found for the customer. + INVALID_CONVERSION_ACTION = 9; + + // The specified conversion action was created too recently. + // Please try the upload again after 4-6 hours have passed since the + // conversion action was created. + TOO_RECENT_CONVERSION_ACTION = 10; + + // The click associated with the given gclid does not contain conversion + // tracking information. + CONVERSION_TRACKING_NOT_ENABLED_AT_IMPRESSION_TIME = 11; + + // The specified conversion action does not use an external attribution + // model, but external_attribution_data was set. + EXTERNAL_ATTRIBUTION_DATA_SET_FOR_NON_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = 12; + + // The specified conversion action uses an external attribution model, but + // external_attribution_data or one of its contained fields was not set. + // Both external_attribution_credit and external_attribution_model must be + // set for externally attributed conversion actions. + EXTERNAL_ATTRIBUTION_DATA_NOT_SET_FOR_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = 13; + + // Order IDs are not supported for conversion actions which use an external + // attribution model. + ORDER_ID_NOT_PERMITTED_FOR_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = 14; + + // A conversion with the same order id and conversion action combination + // already exists in our system. + ORDER_ID_ALREADY_IN_USE = 15; + + // The request contained two or more conversions with the same order id and + // conversion action combination. + DUPLICATE_ORDER_ID = 16; + + // The call occurred too recently. Please try uploading again after 6 hours + // have passed since the call occurred. + TOO_RECENT_CALL = 17; + + // The click that initiated the call is too old for this conversion to be + // imported. + EXPIRED_CALL = 18; + + // The call or the click leading to the call was not found. + CALL_NOT_FOUND = 19; + + // The specified conversion_date_time is before the call_start_date_time. + CONVERSION_PRECEDES_CALL = 20; + + // The click associated with the call does not contain conversion tracking + // information. + CONVERSION_TRACKING_NOT_ENABLED_AT_CALL_TIME = 21; + + // The caller’s phone number cannot be parsed. It should be formatted either + // as E.164 "+16502531234", International "+64 3-331 6005" or US national + // number "6502531234". + UNPARSEABLE_CALLERS_PHONE_NUMBER = 22; + } + + +} diff --git a/google/ads/googleads/v3/errors/country_code_error.proto b/google/ads/googleads/v3/errors/country_code_error.proto new file mode 100644 index 000000000..688c56566 --- /dev/null +++ b/google/ads/googleads/v3/errors/country_code_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CountryCodeErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing country code errors. + +// Container for enum describing country code errors. +message CountryCodeErrorEnum { + // Enum describing country code errors. + enum CountryCodeError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The country code is invalid. + INVALID_COUNTRY_CODE = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/criterion_error.proto b/google/ads/googleads/v3/errors/criterion_error.proto new file mode 100644 index 000000000..86a0673cd --- /dev/null +++ b/google/ads/googleads/v3/errors/criterion_error.proto @@ -0,0 +1,390 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CriterionErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing criterion errors. + +// Container for enum describing possible criterion errors. +message CriterionErrorEnum { + // Enum describing possible criterion errors. + enum CriterionError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Concrete type of criterion is required for CREATE and UPDATE operations. + CONCRETE_TYPE_REQUIRED = 2; + + // The category requested for exclusion is invalid. + INVALID_EXCLUDED_CATEGORY = 3; + + // Invalid keyword criteria text. + INVALID_KEYWORD_TEXT = 4; + + // Keyword text should be less than 80 chars. + KEYWORD_TEXT_TOO_LONG = 5; + + // Keyword text has too many words. + KEYWORD_HAS_TOO_MANY_WORDS = 6; + + // Keyword text has invalid characters or symbols. + KEYWORD_HAS_INVALID_CHARS = 7; + + // Invalid placement URL. + INVALID_PLACEMENT_URL = 8; + + // Invalid user list criterion. + INVALID_USER_LIST = 9; + + // Invalid user interest criterion. + INVALID_USER_INTEREST = 10; + + // Placement URL has wrong format. + INVALID_FORMAT_FOR_PLACEMENT_URL = 11; + + // Placement URL is too long. + PLACEMENT_URL_IS_TOO_LONG = 12; + + // Indicates the URL contains an illegal character. + PLACEMENT_URL_HAS_ILLEGAL_CHAR = 13; + + // Indicates the URL contains multiple comma separated URLs. + PLACEMENT_URL_HAS_MULTIPLE_SITES_IN_LINE = 14; + + // Indicates the domain is blacklisted. + PLACEMENT_IS_NOT_AVAILABLE_FOR_TARGETING_OR_EXCLUSION = 15; + + // Invalid topic path. + INVALID_TOPIC_PATH = 16; + + // The YouTube Channel Id is invalid. + INVALID_YOUTUBE_CHANNEL_ID = 17; + + // The YouTube Video Id is invalid. + INVALID_YOUTUBE_VIDEO_ID = 18; + + // Indicates the placement is a YouTube vertical channel, which is no longer + // supported. + YOUTUBE_VERTICAL_CHANNEL_DEPRECATED = 19; + + // Indicates the placement is a YouTube demographic channel, which is no + // longer supported. + YOUTUBE_DEMOGRAPHIC_CHANNEL_DEPRECATED = 20; + + // YouTube urls are not supported in Placement criterion. Use YouTubeChannel + // and YouTubeVideo criterion instead. + YOUTUBE_URL_UNSUPPORTED = 21; + + // Criteria type can not be excluded by the customer, like AOL account type + // cannot target site type criteria. + CANNOT_EXCLUDE_CRITERIA_TYPE = 22; + + // Criteria type can not be targeted. + CANNOT_ADD_CRITERIA_TYPE = 23; + + // Product filter in the product criteria has invalid characters. Operand + // and the argument in the filter can not have "==" or "&+". + INVALID_PRODUCT_FILTER = 24; + + // Product filter in the product criteria is translated to a string as + // operand1==argument1&+operand2==argument2, maximum allowed length for the + // string is 255 chars. + PRODUCT_FILTER_TOO_LONG = 25; + + // Not allowed to exclude similar user list. + CANNOT_EXCLUDE_SIMILAR_USER_LIST = 26; + + // Not allowed to target a closed user list. + CANNOT_ADD_CLOSED_USER_LIST = 27; + + // Not allowed to add display only UserLists to search only campaigns. + CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_ONLY_CAMPAIGNS = 28; + + // Not allowed to add display only UserLists to search plus campaigns. + CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_CAMPAIGNS = 29; + + // Not allowed to add display only UserLists to shopping campaigns. + CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SHOPPING_CAMPAIGNS = 30; + + // Not allowed to add User interests to search only campaigns. + CANNOT_ADD_USER_INTERESTS_TO_SEARCH_CAMPAIGNS = 31; + + // Not allowed to set bids for this criterion type in search campaigns + CANNOT_SET_BIDS_ON_CRITERION_TYPE_IN_SEARCH_CAMPAIGNS = 32; + + // Final URLs, URL Templates and CustomParameters cannot be set for the + // criterion types of Gender, AgeRange, UserList, Placement, MobileApp, and + // MobileAppCategory in search campaigns and shopping campaigns. + CANNOT_ADD_URLS_TO_CRITERION_TYPE_FOR_CAMPAIGN_TYPE = 33; + + // Invalid custom affinity criterion. + INVALID_CUSTOM_AFFINITY = 96; + + // Invalid custom intent criterion. + INVALID_CUSTOM_INTENT = 97; + + // IP address is not valid. + INVALID_IP_ADDRESS = 34; + + // IP format is not valid. + INVALID_IP_FORMAT = 35; + + // Mobile application is not valid. + INVALID_MOBILE_APP = 36; + + // Mobile application category is not valid. + INVALID_MOBILE_APP_CATEGORY = 37; + + // The CriterionId does not exist or is of the incorrect type. + INVALID_CRITERION_ID = 38; + + // The Criterion is not allowed to be targeted. + CANNOT_TARGET_CRITERION = 39; + + // The criterion is not allowed to be targeted as it is deprecated. + CANNOT_TARGET_OBSOLETE_CRITERION = 40; + + // The CriterionId is not valid for the type. + CRITERION_ID_AND_TYPE_MISMATCH = 41; + + // Distance for the radius for the proximity criterion is invalid. + INVALID_PROXIMITY_RADIUS = 42; + + // Units for the distance for the radius for the proximity criterion is + // invalid. + INVALID_PROXIMITY_RADIUS_UNITS = 43; + + // Street address in the address is not valid. + INVALID_STREETADDRESS_LENGTH = 44; + + // City name in the address is not valid. + INVALID_CITYNAME_LENGTH = 45; + + // Region code in the address is not valid. + INVALID_REGIONCODE_LENGTH = 46; + + // Region name in the address is not valid. + INVALID_REGIONNAME_LENGTH = 47; + + // Postal code in the address is not valid. + INVALID_POSTALCODE_LENGTH = 48; + + // Country code in the address is not valid. + INVALID_COUNTRY_CODE = 49; + + // Latitude for the GeoPoint is not valid. + INVALID_LATITUDE = 50; + + // Longitude for the GeoPoint is not valid. + INVALID_LONGITUDE = 51; + + // The Proximity input is not valid. Both address and geoPoint cannot be + // null. + PROXIMITY_GEOPOINT_AND_ADDRESS_BOTH_CANNOT_BE_NULL = 52; + + // The Proximity address cannot be geocoded to a valid lat/long. + INVALID_PROXIMITY_ADDRESS = 53; + + // User domain name is not valid. + INVALID_USER_DOMAIN_NAME = 54; + + // Length of serialized criterion parameter exceeded size limit. + CRITERION_PARAMETER_TOO_LONG = 55; + + // Time interval in the AdSchedule overlaps with another AdSchedule. + AD_SCHEDULE_TIME_INTERVALS_OVERLAP = 56; + + // AdSchedule time interval cannot span multiple days. + AD_SCHEDULE_INTERVAL_CANNOT_SPAN_MULTIPLE_DAYS = 57; + + // AdSchedule time interval specified is invalid, endTime cannot be earlier + // than startTime. + AD_SCHEDULE_INVALID_TIME_INTERVAL = 58; + + // The number of AdSchedule entries in a day exceeds the limit. + AD_SCHEDULE_EXCEEDED_INTERVALS_PER_DAY_LIMIT = 59; + + // CriteriaId does not match the interval of the AdSchedule specified. + AD_SCHEDULE_CRITERION_ID_MISMATCHING_FIELDS = 60; + + // Cannot set bid modifier for this criterion type. + CANNOT_BID_MODIFY_CRITERION_TYPE = 61; + + // Cannot bid modify criterion, since it is opted out of the campaign. + CANNOT_BID_MODIFY_CRITERION_CAMPAIGN_OPTED_OUT = 62; + + // Cannot set bid modifier for a negative criterion. + CANNOT_BID_MODIFY_NEGATIVE_CRITERION = 63; + + // Bid Modifier already exists. Use SET operation to update. + BID_MODIFIER_ALREADY_EXISTS = 64; + + // Feed Id is not allowed in these Location Groups. + FEED_ID_NOT_ALLOWED = 65; + + // The account may not use the requested criteria type. For example, some + // accounts are restricted to keywords only. + ACCOUNT_INELIGIBLE_FOR_CRITERIA_TYPE = 66; + + // The requested criteria type cannot be used with campaign or ad group + // bidding strategy. + CRITERIA_TYPE_INVALID_FOR_BIDDING_STRATEGY = 67; + + // The Criterion is not allowed to be excluded. + CANNOT_EXCLUDE_CRITERION = 68; + + // The criterion is not allowed to be removed. For example, we cannot remove + // any of the device criterion. + CANNOT_REMOVE_CRITERION = 69; + + // The combined length of product dimension values of the product scope + // criterion is too long. + PRODUCT_SCOPE_TOO_LONG = 70; + + // Product scope contains too many dimensions. + PRODUCT_SCOPE_TOO_MANY_DIMENSIONS = 71; + + // The combined length of product dimension values of the product partition + // criterion is too long. + PRODUCT_PARTITION_TOO_LONG = 72; + + // Product partition contains too many dimensions. + PRODUCT_PARTITION_TOO_MANY_DIMENSIONS = 73; + + // The product dimension is invalid (e.g. dimension contains illegal value, + // dimension type is represented with wrong class, etc). Product dimension + // value can not contain "==" or "&+". + INVALID_PRODUCT_DIMENSION = 74; + + // Product dimension type is either invalid for campaigns of this type or + // cannot be used in the current context. BIDDING_CATEGORY_Lx and + // PRODUCT_TYPE_Lx product dimensions must be used in ascending order of + // their levels: L1, L2, L3, L4, L5... The levels must be specified + // sequentially and start from L1. Furthermore, an "others" product + // partition cannot be subdivided with a dimension of the same type but of a + // higher level ("others" BIDDING_CATEGORY_L3 can be subdivided with BRAND + // but not with BIDDING_CATEGORY_L4). + INVALID_PRODUCT_DIMENSION_TYPE = 75; + + // Bidding categories do not form a valid path in the Shopping bidding + // category taxonomy. + INVALID_PRODUCT_BIDDING_CATEGORY = 76; + + // ShoppingSetting must be added to the campaign before ProductScope + // criteria can be added. + MISSING_SHOPPING_SETTING = 77; + + // Matching function is invalid. + INVALID_MATCHING_FUNCTION = 78; + + // Filter parameters not allowed for location groups targeting. + LOCATION_FILTER_NOT_ALLOWED = 79; + + // Feed not found, or the feed is not an enabled location feed. + INVALID_FEED_FOR_LOCATION_FILTER = 98; + + // Given location filter parameter is invalid for location groups targeting. + LOCATION_FILTER_INVALID = 80; + + // Criteria type cannot be associated with a campaign and its ad group(s) + // simultaneously. + CANNOT_ATTACH_CRITERIA_AT_CAMPAIGN_AND_ADGROUP = 81; + + // Range represented by hotel length of stay's min nights and max nights + // overlaps with an existing criterion. + HOTEL_LENGTH_OF_STAY_OVERLAPS_WITH_EXISTING_CRITERION = 82; + + // Range represented by hotel advance booking window's min days and max days + // overlaps with an existing criterion. + HOTEL_ADVANCE_BOOKING_WINDOW_OVERLAPS_WITH_EXISTING_CRITERION = 83; + + // The field is not allowed to be set when the negative field is set to + // true, e.g. we don't allow bids in negative ad group or campaign criteria. + FIELD_INCOMPATIBLE_WITH_NEGATIVE_TARGETING = 84; + + // The combination of operand and operator in webpage condition is invalid. + INVALID_WEBPAGE_CONDITION = 85; + + // The URL of webpage condition is invalid. + INVALID_WEBPAGE_CONDITION_URL = 86; + + // The URL of webpage condition cannot be empty or contain white space. + WEBPAGE_CONDITION_URL_CANNOT_BE_EMPTY = 87; + + // The URL of webpage condition contains an unsupported protocol. + WEBPAGE_CONDITION_URL_UNSUPPORTED_PROTOCOL = 88; + + // The URL of webpage condition cannot be an IP address. + WEBPAGE_CONDITION_URL_CANNOT_BE_IP_ADDRESS = 89; + + // The domain of the URL is not consistent with the domain in campaign + // setting. + WEBPAGE_CONDITION_URL_DOMAIN_NOT_CONSISTENT_WITH_CAMPAIGN_SETTING = 90; + + // The URL of webpage condition cannot be a public suffix itself. + WEBPAGE_CONDITION_URL_CANNOT_BE_PUBLIC_SUFFIX = 91; + + // The URL of webpage condition has an invalid public suffix. + WEBPAGE_CONDITION_URL_INVALID_PUBLIC_SUFFIX = 92; + + // Value track parameter is not supported in webpage condition URL. + WEBPAGE_CONDITION_URL_VALUE_TRACK_VALUE_NOT_SUPPORTED = 93; + + // Only one URL-EQUALS webpage condition is allowed in a webpage + // criterion and it cannot be combined with other conditions. + WEBPAGE_CRITERION_URL_EQUALS_CAN_HAVE_ONLY_ONE_CONDITION = 94; + + // A webpage criterion cannot be added to a non-DSA ad group. + WEBPAGE_CRITERION_NOT_SUPPORTED_ON_NON_DSA_AD_GROUP = 95; + + // Cannot add positive user list criteria in Smart Display campaigns. + CANNOT_TARGET_USER_LIST_FOR_SMART_DISPLAY_CAMPAIGNS = 99; + + // Listing scope contains too many dimension types. + LISTING_SCOPE_TOO_MANY_DIMENSION_TYPES = 100; + + // Listing scope has too many IN operators. + LISTING_SCOPE_TOO_MANY_IN_OPERATORS = 101; + + // Listing scope contains IN operator on an unsupported dimension type. + LISTING_SCOPE_IN_OPERATOR_NOT_SUPPORTED = 102; + + // There are dimensions with duplicate dimension type. + DUPLICATE_LISTING_DIMENSION_TYPE = 103; + + // There are dimensions with duplicate dimension value. + DUPLICATE_LISTING_DIMENSION_VALUE = 104; + + // Listing group SUBDIVISION nodes cannot have bids. + CANNOT_SET_BIDS_ON_LISTING_GROUP_SUBDIVISION = 105; + } + + +} diff --git a/google/ads/googleads/v3/errors/currency_code_error.proto b/google/ads/googleads/v3/errors/currency_code_error.proto new file mode 100644 index 000000000..ab25f216f --- /dev/null +++ b/google/ads/googleads/v3/errors/currency_code_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CurrencyCodeErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing currency code errors. + +// Container for enum describing possible currency code errors. +message CurrencyCodeErrorEnum { + // Enum describing possible currency code errors. + enum CurrencyCodeError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The currency code is not supported. + UNSUPPORTED = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/custom_interest_error.proto b/google/ads/googleads/v3/errors/custom_interest_error.proto new file mode 100644 index 000000000..a2d9396af --- /dev/null +++ b/google/ads/googleads/v3/errors/custom_interest_error.proto @@ -0,0 +1,66 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CustomInterestErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing custom interest errors. + +// Container for enum describing possible custom interest errors. +message CustomInterestErrorEnum { + // Enum describing possible custom interest errors. + enum CustomInterestError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Duplicate custom interest name ignoring case. + NAME_ALREADY_USED = 2; + + // In the remove custom interest member operation, both member ID and + // pair [type, parameter] are not present. + CUSTOM_INTEREST_MEMBER_ID_AND_TYPE_PARAMETER_NOT_PRESENT_IN_REMOVE = 3; + + // The pair of [type, parameter] does not exist. + TYPE_AND_PARAMETER_NOT_FOUND = 4; + + // The pair of [type, parameter] already exists. + TYPE_AND_PARAMETER_ALREADY_EXISTED = 5; + + // Unsupported custom interest member type. + INVALID_CUSTOM_INTEREST_MEMBER_TYPE = 6; + + // Cannot remove a custom interest while it's still being targeted. + CANNOT_REMOVE_WHILE_IN_USE = 7; + + // Cannot mutate custom interest type. + CANNOT_CHANGE_TYPE = 8; + } + + +} diff --git a/google/ads/googleads/v3/errors/customer_client_link_error.proto b/google/ads/googleads/v3/errors/customer_client_link_error.proto new file mode 100644 index 000000000..19976aaff --- /dev/null +++ b/google/ads/googleads/v3/errors/customer_client_link_error.proto @@ -0,0 +1,68 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CustomerClientLinkErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing CustomerClientLink errors. + +// Container for enum describing possible CustomeClientLink errors. +message CustomerClientLinkErrorEnum { + // Enum describing possible CustomerClientLink errors. + enum CustomerClientLinkError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Trying to manage a client that already in being managed by customer. + CLIENT_ALREADY_INVITED_BY_THIS_MANAGER = 2; + + // Already managed by some other manager in the hierarchy. + CLIENT_ALREADY_MANAGED_IN_HIERARCHY = 3; + + // Attempt to create a cycle in the hierarchy. + CYCLIC_LINK_NOT_ALLOWED = 4; + + // Managed accounts has the maximum number of linked accounts. + CUSTOMER_HAS_TOO_MANY_ACCOUNTS = 5; + + // Invitor has the maximum pending invitations. + CLIENT_HAS_TOO_MANY_INVITATIONS = 6; + + // Attempt to change hidden status of a link that is not active. + CANNOT_HIDE_OR_UNHIDE_MANAGER_ACCOUNTS = 7; + + // Parent manager account has the maximum number of linked accounts. + CUSTOMER_HAS_TOO_MANY_ACCOUNTS_AT_MANAGER = 8; + + // Client has too many managers. + CLIENT_HAS_TOO_MANY_MANAGERS = 9; + } + + +} diff --git a/google/ads/googleads/v3/errors/customer_error.proto b/google/ads/googleads/v3/errors/customer_error.proto new file mode 100644 index 000000000..4c139b504 --- /dev/null +++ b/google/ads/googleads/v3/errors/customer_error.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CustomerErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Container for enum describing possible customer errors. +message CustomerErrorEnum { + // Set of errors that are related to requests dealing with Customer. + enum CustomerError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Customer status is not allowed to be changed from DRAFT and CLOSED. + // Currency code and at least one of country code and time zone needs to be + // set when status is changed to ENABLED. + STATUS_CHANGE_DISALLOWED = 2; + + // CustomerService cannot get a customer that has not been fully set up. + ACCOUNT_NOT_SET_UP = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/customer_feed_error.proto b/google/ads/googleads/v3/errors/customer_feed_error.proto new file mode 100644 index 000000000..18ddb4426 --- /dev/null +++ b/google/ads/googleads/v3/errors/customer_feed_error.proto @@ -0,0 +1,66 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CustomerFeedErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing customer feed errors. + +// Container for enum describing possible customer feed errors. +message CustomerFeedErrorEnum { + // Enum describing possible customer feed errors. + enum CustomerFeedError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // An active feed already exists for this customer and place holder type. + FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 2; + + // The specified feed is removed. + CANNOT_CREATE_FOR_REMOVED_FEED = 3; + + // The CustomerFeed already exists. Update should be used to modify the + // existing CustomerFeed. + CANNOT_CREATE_ALREADY_EXISTING_CUSTOMER_FEED = 4; + + // Cannot update removed customer feed. + CANNOT_MODIFY_REMOVED_CUSTOMER_FEED = 5; + + // Invalid placeholder type. + INVALID_PLACEHOLDER_TYPE = 6; + + // Feed mapping for this placeholder type does not exist. + MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE = 7; + + // Placeholder not allowed at the account level. + PLACEHOLDER_TYPE_NOT_ALLOWED_ON_CUSTOMER_FEED = 8; + } + + +} diff --git a/google/ads/googleads/v3/errors/customer_manager_link_error.proto b/google/ads/googleads/v3/errors/customer_manager_link_error.proto new file mode 100644 index 000000000..457d35d04 --- /dev/null +++ b/google/ads/googleads/v3/errors/customer_manager_link_error.proto @@ -0,0 +1,75 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "CustomerManagerLinkErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing CustomerManagerLink errors. + +// Container for enum describing possible CustomerManagerLink errors. +message CustomerManagerLinkErrorEnum { + // Enum describing possible CustomerManagerLink errors. + enum CustomerManagerLinkError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // No pending invitation. + NO_PENDING_INVITE = 2; + + // Attempt to operate on the same client more than once in the same call. + SAME_CLIENT_MORE_THAN_ONCE_PER_CALL = 3; + + // Manager account has the maximum number of linked accounts. + MANAGER_HAS_MAX_NUMBER_OF_LINKED_ACCOUNTS = 4; + + // If no active user on account it cannot be unlinked from its manager. + CANNOT_UNLINK_ACCOUNT_WITHOUT_ACTIVE_USER = 5; + + // Account should have at least one active owner on it before being + // unlinked. + CANNOT_REMOVE_LAST_CLIENT_ACCOUNT_OWNER = 6; + + // Only account owners may change their permission role. + CANNOT_CHANGE_ROLE_BY_NON_ACCOUNT_OWNER = 7; + + // When a client's link to its manager is not active, the link role cannot + // be changed. + CANNOT_CHANGE_ROLE_FOR_NON_ACTIVE_LINK_ACCOUNT = 8; + + // Attempt to link a child to a parent that contains or will contain + // duplicate children. + DUPLICATE_CHILD_FOUND = 9; + + // The authorized customer is a test account. It can add no more than the + // allowed number of accounts + TEST_ACCOUNT_LINKS_TOO_MANY_CHILD_ACCOUNTS = 10; + } + + +} diff --git a/google/ads/googleads/v3/errors/database_error.proto b/google/ads/googleads/v3/errors/database_error.proto new file mode 100644 index 000000000..c24eb1c1d --- /dev/null +++ b/google/ads/googleads/v3/errors/database_error.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "DatabaseErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing database errors. + +// Container for enum describing possible database errors. +message DatabaseErrorEnum { + // Enum describing possible database errors. + enum DatabaseError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Multiple requests were attempting to modify the same resource at once. + // Please retry the request. + CONCURRENT_MODIFICATION = 2; + + // The request conflicted with existing data. This error will usually be + // replaced with a more specific error if the request is retried. + DATA_CONSTRAINT_VIOLATION = 3; + + // The data written is too large. Please split the request into smaller + // requests. + REQUEST_TOO_LARGE = 4; + } + + +} diff --git a/google/ads/googleads/v3/errors/date_error.proto b/google/ads/googleads/v3/errors/date_error.proto new file mode 100644 index 000000000..18cea7025 --- /dev/null +++ b/google/ads/googleads/v3/errors/date_error.proto @@ -0,0 +1,74 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "DateErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing date errors. + +// Container for enum describing possible date errors. +message DateErrorEnum { + // Enum describing possible date errors. + enum DateError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Given field values do not correspond to a valid date. + INVALID_FIELD_VALUES_IN_DATE = 2; + + // Given field values do not correspond to a valid date time. + INVALID_FIELD_VALUES_IN_DATE_TIME = 3; + + // The string date's format should be yyyy-mm-dd. + INVALID_STRING_DATE = 4; + + // The string date time's format should be yyyy-mm-dd hh:mm:ss.ssssss. + INVALID_STRING_DATE_TIME_MICROS = 6; + + // The string date time's format should be yyyy-mm-dd hh:mm:ss. + INVALID_STRING_DATE_TIME_SECONDS = 11; + + // The string date time's format should be yyyy-mm-dd hh:mm:ss+|-hh:mm. + INVALID_STRING_DATE_TIME_SECONDS_WITH_OFFSET = 12; + + // Date is before allowed minimum. + EARLIER_THAN_MINIMUM_DATE = 7; + + // Date is after allowed maximum. + LATER_THAN_MAXIMUM_DATE = 8; + + // Date range bounds are not in order. + DATE_RANGE_MINIMUM_DATE_LATER_THAN_MAXIMUM_DATE = 9; + + // Both dates in range are null. + DATE_RANGE_MINIMUM_AND_MAXIMUM_DATES_BOTH_NULL = 10; + } + + +} diff --git a/google/ads/googleads/v3/errors/date_range_error.proto b/google/ads/googleads/v3/errors/date_range_error.proto new file mode 100644 index 000000000..b42babd3a --- /dev/null +++ b/google/ads/googleads/v3/errors/date_range_error.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "DateRangeErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing date range errors. + +// Container for enum describing possible date range errors. +message DateRangeErrorEnum { + // Enum describing possible date range errors. + enum DateRangeError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Invalid date. + INVALID_DATE = 2; + + // The start date was after the end date. + START_DATE_AFTER_END_DATE = 3; + + // Cannot set date to past time + CANNOT_SET_DATE_TO_PAST = 4; + + // A date was used that is past the system "last" date. + AFTER_MAXIMUM_ALLOWABLE_DATE = 5; + + // Trying to change start date on a resource that has started. + CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED = 6; + } + + +} diff --git a/google/ads/googleads/v3/errors/distinct_error.proto b/google/ads/googleads/v3/errors/distinct_error.proto new file mode 100644 index 000000000..ac5b32b2c --- /dev/null +++ b/google/ads/googleads/v3/errors/distinct_error.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "DistinctErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing distinct errors. + +// Container for enum describing possible distinct errors. +message DistinctErrorEnum { + // Enum describing possible distinct errors. + enum DistinctError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Duplicate element. + DUPLICATE_ELEMENT = 2; + + // Duplicate type. + DUPLICATE_TYPE = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/enum_error.proto b/google/ads/googleads/v3/errors/enum_error.proto new file mode 100644 index 000000000..5683037a5 --- /dev/null +++ b/google/ads/googleads/v3/errors/enum_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "EnumErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing enum errors. + +// Container for enum describing possible enum errors. +message EnumErrorEnum { + // Enum describing possible enum errors. + enum EnumError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The enum value is not permitted. + ENUM_VALUE_NOT_PERMITTED = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/errors.proto b/google/ads/googleads/v3/errors/errors.proto new file mode 100644 index 000000000..ba1379227 --- /dev/null +++ b/google/ads/googleads/v3/errors/errors.proto @@ -0,0 +1,565 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/ads/googleads/v3/common/policy.proto"; +import "google/ads/googleads/v3/common/value.proto"; +import "google/ads/googleads/v3/errors/access_invitation_error.proto"; +import "google/ads/googleads/v3/errors/account_budget_proposal_error.proto"; +import "google/ads/googleads/v3/errors/ad_customizer_error.proto"; +import "google/ads/googleads/v3/errors/ad_error.proto"; +import "google/ads/googleads/v3/errors/ad_group_ad_error.proto"; +import "google/ads/googleads/v3/errors/ad_group_bid_modifier_error.proto"; +import "google/ads/googleads/v3/errors/ad_group_criterion_error.proto"; +import "google/ads/googleads/v3/errors/ad_group_error.proto"; +import "google/ads/googleads/v3/errors/ad_group_feed_error.proto"; +import "google/ads/googleads/v3/errors/ad_parameter_error.proto"; +import "google/ads/googleads/v3/errors/ad_sharing_error.proto"; +import "google/ads/googleads/v3/errors/adx_error.proto"; +import "google/ads/googleads/v3/errors/asset_error.proto"; +import "google/ads/googleads/v3/errors/asset_link_error.proto"; +import "google/ads/googleads/v3/errors/authentication_error.proto"; +import "google/ads/googleads/v3/errors/authorization_error.proto"; +import "google/ads/googleads/v3/errors/bidding_error.proto"; +import "google/ads/googleads/v3/errors/bidding_strategy_error.proto"; +import "google/ads/googleads/v3/errors/billing_setup_error.proto"; +import "google/ads/googleads/v3/errors/campaign_budget_error.proto"; +import "google/ads/googleads/v3/errors/campaign_criterion_error.proto"; +import "google/ads/googleads/v3/errors/campaign_draft_error.proto"; +import "google/ads/googleads/v3/errors/campaign_error.proto"; +import "google/ads/googleads/v3/errors/campaign_experiment_error.proto"; +import "google/ads/googleads/v3/errors/campaign_feed_error.proto"; +import "google/ads/googleads/v3/errors/campaign_shared_set_error.proto"; +import "google/ads/googleads/v3/errors/change_status_error.proto"; +import "google/ads/googleads/v3/errors/collection_size_error.proto"; +import "google/ads/googleads/v3/errors/context_error.proto"; +import "google/ads/googleads/v3/errors/conversion_action_error.proto"; +import "google/ads/googleads/v3/errors/conversion_adjustment_upload_error.proto"; +import "google/ads/googleads/v3/errors/conversion_upload_error.proto"; +import "google/ads/googleads/v3/errors/country_code_error.proto"; +import "google/ads/googleads/v3/errors/criterion_error.proto"; +import "google/ads/googleads/v3/errors/currency_code_error.proto"; +import "google/ads/googleads/v3/errors/custom_interest_error.proto"; +import "google/ads/googleads/v3/errors/customer_client_link_error.proto"; +import "google/ads/googleads/v3/errors/customer_error.proto"; +import "google/ads/googleads/v3/errors/customer_feed_error.proto"; +import "google/ads/googleads/v3/errors/customer_manager_link_error.proto"; +import "google/ads/googleads/v3/errors/database_error.proto"; +import "google/ads/googleads/v3/errors/date_error.proto"; +import "google/ads/googleads/v3/errors/date_range_error.proto"; +import "google/ads/googleads/v3/errors/distinct_error.proto"; +import "google/ads/googleads/v3/errors/enum_error.proto"; +import "google/ads/googleads/v3/errors/extension_feed_item_error.proto"; +import "google/ads/googleads/v3/errors/extension_setting_error.proto"; +import "google/ads/googleads/v3/errors/feed_attribute_reference_error.proto"; +import "google/ads/googleads/v3/errors/feed_error.proto"; +import "google/ads/googleads/v3/errors/feed_item_error.proto"; +import "google/ads/googleads/v3/errors/feed_item_target_error.proto"; +import "google/ads/googleads/v3/errors/feed_item_validation_error.proto"; +import "google/ads/googleads/v3/errors/feed_mapping_error.proto"; +import "google/ads/googleads/v3/errors/field_error.proto"; +import "google/ads/googleads/v3/errors/field_mask_error.proto"; +import "google/ads/googleads/v3/errors/function_error.proto"; +import "google/ads/googleads/v3/errors/function_parsing_error.proto"; +import "google/ads/googleads/v3/errors/geo_target_constant_suggestion_error.proto"; +import "google/ads/googleads/v3/errors/header_error.proto"; +import "google/ads/googleads/v3/errors/id_error.proto"; +import "google/ads/googleads/v3/errors/image_error.proto"; +import "google/ads/googleads/v3/errors/internal_error.proto"; +import "google/ads/googleads/v3/errors/invoice_error.proto"; +import "google/ads/googleads/v3/errors/keyword_plan_ad_group_error.proto"; +import "google/ads/googleads/v3/errors/keyword_plan_campaign_error.proto"; +import "google/ads/googleads/v3/errors/keyword_plan_error.proto"; +import "google/ads/googleads/v3/errors/keyword_plan_idea_error.proto"; +import "google/ads/googleads/v3/errors/keyword_plan_keyword_error.proto"; +import "google/ads/googleads/v3/errors/keyword_plan_negative_keyword_error.proto"; +import "google/ads/googleads/v3/errors/label_error.proto"; +import "google/ads/googleads/v3/errors/language_code_error.proto"; +import "google/ads/googleads/v3/errors/list_operation_error.proto"; +import "google/ads/googleads/v3/errors/manager_link_error.proto"; +import "google/ads/googleads/v3/errors/media_bundle_error.proto"; +import "google/ads/googleads/v3/errors/media_file_error.proto"; +import "google/ads/googleads/v3/errors/media_upload_error.proto"; +import "google/ads/googleads/v3/errors/multiplier_error.proto"; +import "google/ads/googleads/v3/errors/mutate_error.proto"; +import "google/ads/googleads/v3/errors/mutate_job_error.proto"; +import "google/ads/googleads/v3/errors/new_resource_creation_error.proto"; +import "google/ads/googleads/v3/errors/not_empty_error.proto"; +import "google/ads/googleads/v3/errors/not_whitelisted_error.proto"; +import "google/ads/googleads/v3/errors/null_error.proto"; +import "google/ads/googleads/v3/errors/offline_user_data_job_error.proto"; +import "google/ads/googleads/v3/errors/operation_access_denied_error.proto"; +import "google/ads/googleads/v3/errors/operator_error.proto"; +import "google/ads/googleads/v3/errors/partial_failure_error.proto"; +import "google/ads/googleads/v3/errors/payments_account_error.proto"; +import "google/ads/googleads/v3/errors/policy_finding_error.proto"; +import "google/ads/googleads/v3/errors/policy_validation_parameter_error.proto"; +import "google/ads/googleads/v3/errors/policy_violation_error.proto"; +import "google/ads/googleads/v3/errors/query_error.proto"; +import "google/ads/googleads/v3/errors/quota_error.proto"; +import "google/ads/googleads/v3/errors/range_error.proto"; +import "google/ads/googleads/v3/errors/reach_plan_error.proto"; +import "google/ads/googleads/v3/errors/recommendation_error.proto"; +import "google/ads/googleads/v3/errors/region_code_error.proto"; +import "google/ads/googleads/v3/errors/request_error.proto"; +import "google/ads/googleads/v3/errors/resource_access_denied_error.proto"; +import "google/ads/googleads/v3/errors/resource_count_limit_exceeded_error.proto"; +import "google/ads/googleads/v3/errors/setting_error.proto"; +import "google/ads/googleads/v3/errors/shared_criterion_error.proto"; +import "google/ads/googleads/v3/errors/shared_set_error.proto"; +import "google/ads/googleads/v3/errors/size_limit_error.proto"; +import "google/ads/googleads/v3/errors/string_format_error.proto"; +import "google/ads/googleads/v3/errors/string_length_error.proto"; +import "google/ads/googleads/v3/errors/time_zone_error.proto"; +import "google/ads/googleads/v3/errors/url_field_error.proto"; +import "google/ads/googleads/v3/errors/user_data_error.proto"; +import "google/ads/googleads/v3/errors/user_list_error.proto"; +import "google/ads/googleads/v3/errors/youtube_video_registration_error.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ErrorsProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing the common error protos + +// Describes how a GoogleAds API call failed. It's returned inside +// google.rpc.Status.details when a call fails. +message GoogleAdsFailure { + // The list of errors that occurred. + repeated GoogleAdsError errors = 1; +} + +// GoogleAds-specific error. +message GoogleAdsError { + // An enum value that indicates which error occurred. + ErrorCode error_code = 1; + + // A human-readable description of the error. + string message = 2; + + // The value that triggered the error. + google.ads.googleads.v3.common.Value trigger = 3; + + // Describes the part of the request proto that caused the error. + ErrorLocation location = 4; + + // Additional error details, which are returned by certain error codes. Most + // error codes do not include details. + ErrorDetails details = 5; +} + +// The error reason represented by type and enum. +message ErrorCode { + // The list of error enums + oneof error_code { + // An error caused by the request + RequestErrorEnum.RequestError request_error = 1; + + // An error with a Bidding Strategy mutate. + BiddingStrategyErrorEnum.BiddingStrategyError bidding_strategy_error = 2; + + // An error with a URL field mutate. + UrlFieldErrorEnum.UrlFieldError url_field_error = 3; + + // An error with a list operation. + ListOperationErrorEnum.ListOperationError list_operation_error = 4; + + // An error with an AWQL query + QueryErrorEnum.QueryError query_error = 5; + + // An error with a mutate + MutateErrorEnum.MutateError mutate_error = 7; + + // An error with a field mask + FieldMaskErrorEnum.FieldMaskError field_mask_error = 8; + + // An error encountered when trying to authorize a user. + AuthorizationErrorEnum.AuthorizationError authorization_error = 9; + + // An unexpected server-side error. + InternalErrorEnum.InternalError internal_error = 10; + + // An error with the amonut of quota remaining. + QuotaErrorEnum.QuotaError quota_error = 11; + + // An error with an Ad Group Ad mutate. + AdErrorEnum.AdError ad_error = 12; + + // An error with an Ad Group mutate. + AdGroupErrorEnum.AdGroupError ad_group_error = 13; + + // An error with a Campaign Budget mutate. + CampaignBudgetErrorEnum.CampaignBudgetError campaign_budget_error = 14; + + // An error with a Campaign mutate. + CampaignErrorEnum.CampaignError campaign_error = 15; + + // Indicates failure to properly authenticate user. + AuthenticationErrorEnum.AuthenticationError authentication_error = 17; + + // Indicates failure to properly authenticate user. + AdGroupCriterionErrorEnum.AdGroupCriterionError ad_group_criterion_error = 18; + + // The reasons for the ad customizer error + AdCustomizerErrorEnum.AdCustomizerError ad_customizer_error = 19; + + // The reasons for the ad group ad error + AdGroupAdErrorEnum.AdGroupAdError ad_group_ad_error = 21; + + // The reasons for the ad sharing error + AdSharingErrorEnum.AdSharingError ad_sharing_error = 24; + + // The reasons for the adx error + AdxErrorEnum.AdxError adx_error = 25; + + // The reasons for the asset error + AssetErrorEnum.AssetError asset_error = 107; + + // The reasons for the bidding errors + BiddingErrorEnum.BiddingError bidding_error = 26; + + // The reasons for the campaign criterion error + CampaignCriterionErrorEnum.CampaignCriterionError campaign_criterion_error = 29; + + // The reasons for the collection size error + CollectionSizeErrorEnum.CollectionSizeError collection_size_error = 31; + + // The reasons for the country code error + CountryCodeErrorEnum.CountryCodeError country_code_error = 109; + + // The reasons for the criterion error + CriterionErrorEnum.CriterionError criterion_error = 32; + + // The reasons for the customer error + CustomerErrorEnum.CustomerError customer_error = 90; + + // The reasons for the date error + DateErrorEnum.DateError date_error = 33; + + // The reasons for the date range error + DateRangeErrorEnum.DateRangeError date_range_error = 34; + + // The reasons for the distinct error + DistinctErrorEnum.DistinctError distinct_error = 35; + + // The reasons for the feed attribute reference error + FeedAttributeReferenceErrorEnum.FeedAttributeReferenceError feed_attribute_reference_error = 36; + + // The reasons for the function error + FunctionErrorEnum.FunctionError function_error = 37; + + // The reasons for the function parsing error + FunctionParsingErrorEnum.FunctionParsingError function_parsing_error = 38; + + // The reasons for the id error + IdErrorEnum.IdError id_error = 39; + + // The reasons for the image error + ImageErrorEnum.ImageError image_error = 40; + + // The reasons for the language code error + LanguageCodeErrorEnum.LanguageCodeError language_code_error = 110; + + // The reasons for the media bundle error + MediaBundleErrorEnum.MediaBundleError media_bundle_error = 42; + + // The reasons for media uploading errors. + MediaUploadErrorEnum.MediaUploadError media_upload_error = 116; + + // The reasons for the media file error + MediaFileErrorEnum.MediaFileError media_file_error = 86; + + // The reasons for the multiplier error + MultiplierErrorEnum.MultiplierError multiplier_error = 44; + + // The reasons for the new resource creation error + NewResourceCreationErrorEnum.NewResourceCreationError new_resource_creation_error = 45; + + // The reasons for the not empty error + NotEmptyErrorEnum.NotEmptyError not_empty_error = 46; + + // The reasons for the null error + NullErrorEnum.NullError null_error = 47; + + // The reasons for the operator error + OperatorErrorEnum.OperatorError operator_error = 48; + + // The reasons for the range error + RangeErrorEnum.RangeError range_error = 49; + + // The reasons for error in applying a recommendation + RecommendationErrorEnum.RecommendationError recommendation_error = 58; + + // The reasons for the region code error + RegionCodeErrorEnum.RegionCodeError region_code_error = 51; + + // The reasons for the setting error + SettingErrorEnum.SettingError setting_error = 52; + + // The reasons for the string format error + StringFormatErrorEnum.StringFormatError string_format_error = 53; + + // The reasons for the string length error + StringLengthErrorEnum.StringLengthError string_length_error = 54; + + // The reasons for the operation access denied error + OperationAccessDeniedErrorEnum.OperationAccessDeniedError operation_access_denied_error = 55; + + // The reasons for the resource access denied error + ResourceAccessDeniedErrorEnum.ResourceAccessDeniedError resource_access_denied_error = 56; + + // The reasons for the resource count limit exceeded error + ResourceCountLimitExceededErrorEnum.ResourceCountLimitExceededError resource_count_limit_exceeded_error = 57; + + // The reasons for YouTube video registration errors. + YoutubeVideoRegistrationErrorEnum.YoutubeVideoRegistrationError youtube_video_registration_error = 117; + + // The reasons for the ad group bid modifier error + AdGroupBidModifierErrorEnum.AdGroupBidModifierError ad_group_bid_modifier_error = 59; + + // The reasons for the context error + ContextErrorEnum.ContextError context_error = 60; + + // The reasons for the field error + FieldErrorEnum.FieldError field_error = 61; + + // The reasons for the shared set error + SharedSetErrorEnum.SharedSetError shared_set_error = 62; + + // The reasons for the shared criterion error + SharedCriterionErrorEnum.SharedCriterionError shared_criterion_error = 63; + + // The reasons for the campaign shared set error + CampaignSharedSetErrorEnum.CampaignSharedSetError campaign_shared_set_error = 64; + + // The reasons for the conversion action error + ConversionActionErrorEnum.ConversionActionError conversion_action_error = 65; + + // The reasons for the conversion adjustment upload error + ConversionAdjustmentUploadErrorEnum.ConversionAdjustmentUploadError conversion_adjustment_upload_error = 115; + + // The reasons for the conversion upload error + ConversionUploadErrorEnum.ConversionUploadError conversion_upload_error = 111; + + // The reasons for the header error. + HeaderErrorEnum.HeaderError header_error = 66; + + // The reasons for the database error. + DatabaseErrorEnum.DatabaseError database_error = 67; + + // The reasons for the policy finding error. + PolicyFindingErrorEnum.PolicyFindingError policy_finding_error = 68; + + // The reason for enum error. + EnumErrorEnum.EnumError enum_error = 70; + + // The reason for keyword plan error. + KeywordPlanErrorEnum.KeywordPlanError keyword_plan_error = 71; + + // The reason for keyword plan campaign error. + KeywordPlanCampaignErrorEnum.KeywordPlanCampaignError keyword_plan_campaign_error = 72; + + // The reason for keyword plan negative keyword error. + KeywordPlanNegativeKeywordErrorEnum.KeywordPlanNegativeKeywordError keyword_plan_negative_keyword_error = 73; + + // The reason for keyword plan ad group error. + KeywordPlanAdGroupErrorEnum.KeywordPlanAdGroupError keyword_plan_ad_group_error = 74; + + // The reason for keyword plan keyword error. + KeywordPlanKeywordErrorEnum.KeywordPlanKeywordError keyword_plan_keyword_error = 75; + + // The reason for keyword idea error. + KeywordPlanIdeaErrorEnum.KeywordPlanIdeaError keyword_plan_idea_error = 76; + + // The reasons for account budget proposal errors. + AccountBudgetProposalErrorEnum.AccountBudgetProposalError account_budget_proposal_error = 77; + + // The reasons for the user list error + UserListErrorEnum.UserListError user_list_error = 78; + + // The reasons for the change status error + ChangeStatusErrorEnum.ChangeStatusError change_status_error = 79; + + // The reasons for the feed error + FeedErrorEnum.FeedError feed_error = 80; + + // The reasons for the geo target constant suggestion error. + GeoTargetConstantSuggestionErrorEnum.GeoTargetConstantSuggestionError geo_target_constant_suggestion_error = 81; + + // The reasons for the campaign draft error + CampaignDraftErrorEnum.CampaignDraftError campaign_draft_error = 82; + + // The reasons for the feed item error + FeedItemErrorEnum.FeedItemError feed_item_error = 83; + + // The reason for the label error. + LabelErrorEnum.LabelError label_error = 84; + + // The reasons for the billing setup error + BillingSetupErrorEnum.BillingSetupError billing_setup_error = 87; + + // The reasons for the customer client link error + CustomerClientLinkErrorEnum.CustomerClientLinkError customer_client_link_error = 88; + + // The reasons for the customer manager link error + CustomerManagerLinkErrorEnum.CustomerManagerLinkError customer_manager_link_error = 91; + + // The reasons for the feed mapping error + FeedMappingErrorEnum.FeedMappingError feed_mapping_error = 92; + + // The reasons for the customer feed error + CustomerFeedErrorEnum.CustomerFeedError customer_feed_error = 93; + + // The reasons for the ad group feed error + AdGroupFeedErrorEnum.AdGroupFeedError ad_group_feed_error = 94; + + // The reasons for the campaign feed error + CampaignFeedErrorEnum.CampaignFeedError campaign_feed_error = 96; + + // The reasons for the custom interest error + CustomInterestErrorEnum.CustomInterestError custom_interest_error = 97; + + // The reasons for the campaign experiment error + CampaignExperimentErrorEnum.CampaignExperimentError campaign_experiment_error = 98; + + // The reasons for the extension feed item error + ExtensionFeedItemErrorEnum.ExtensionFeedItemError extension_feed_item_error = 100; + + // The reasons for the ad parameter error + AdParameterErrorEnum.AdParameterError ad_parameter_error = 101; + + // The reasons for the feed item validation error + FeedItemValidationErrorEnum.FeedItemValidationError feed_item_validation_error = 102; + + // The reasons for the extension setting error + ExtensionSettingErrorEnum.ExtensionSettingError extension_setting_error = 103; + + // The reasons for the feed item target error + FeedItemTargetErrorEnum.FeedItemTargetError feed_item_target_error = 104; + + // The reasons for the policy violation error + PolicyViolationErrorEnum.PolicyViolationError policy_violation_error = 105; + + // The reasons for the mutate job error + MutateJobErrorEnum.MutateJobError mutate_job_error = 108; + + // The reasons for the mutate job error + PartialFailureErrorEnum.PartialFailureError partial_failure_error = 112; + + // The reasons for the policy validation parameter error + PolicyValidationParameterErrorEnum.PolicyValidationParameterError policy_validation_parameter_error = 114; + + // The reasons for the size limit error + SizeLimitErrorEnum.SizeLimitError size_limit_error = 118; + + // The reasons for the offline user data job error. + OfflineUserDataJobErrorEnum.OfflineUserDataJobError offline_user_data_job_error = 119; + + // The reasons for the not whitelisted error + NotWhitelistedErrorEnum.NotWhitelistedError not_whitelisted_error = 120; + + // The reasons for the manager link error + ManagerLinkErrorEnum.ManagerLinkError manager_link_error = 121; + + // The reasons for the currency code error + CurrencyCodeErrorEnum.CurrencyCodeError currency_code_error = 122; + + // The reasons for the access invitation error + AccessInvitationErrorEnum.AccessInvitationError access_invitation_error = 124; + + // The reasons for the reach plan error + ReachPlanErrorEnum.ReachPlanError reach_plan_error = 125; + + // The reasons for the invoice error + InvoiceErrorEnum.InvoiceError invoice_error = 126; + + // The reasons for errors in payments accounts service + PaymentsAccountErrorEnum.PaymentsAccountError payments_account_error = 127; + + // The reasons for the time zone error + TimeZoneErrorEnum.TimeZoneError time_zone_error = 128; + + // The reasons for the asset link error + AssetLinkErrorEnum.AssetLinkError asset_link_error = 129; + + // The reasons for the user data error. + UserDataErrorEnum.UserDataError user_data_error = 130; + } +} + +// Describes the part of the request proto that caused the error. +message ErrorLocation { + // A part of a field path. + message FieldPathElement { + // The name of a field or a oneof + string field_name = 1; + + // If field_name is a repeated field, this is the element that failed + google.protobuf.Int64Value index = 2; + } + + // A field path that indicates which field was invalid in the request. + repeated FieldPathElement field_path_elements = 2; +} + +// Additional error details. +message ErrorDetails { + // The error code that should have been returned, but wasn't. This is used + // when the error code is InternalError.ERROR_CODE_NOT_PUBLISHED. + string unpublished_error_code = 1; + + // Describes an ad policy violation. + PolicyViolationDetails policy_violation_details = 2; + + // Describes policy violation findings. + PolicyFindingDetails policy_finding_details = 3; +} + +// Error returned as part of a mutate response. +// This error indicates single policy violation by some text +// in one of the fields. +message PolicyViolationDetails { + // Human readable description of policy violation. + string external_policy_description = 2; + + // Unique identifier for this violation. + // If policy is exemptible, this key may be used to request exemption. + google.ads.googleads.v3.common.PolicyViolationKey key = 4; + + // Human readable name of the policy. + string external_policy_name = 5; + + // Whether user can file an exemption request for this violation. + bool is_exemptible = 6; +} + +// Error returned as part of a mutate response. +// This error indicates one or more policy findings in the fields of a +// resource. +message PolicyFindingDetails { + // The list of policy topics for the resource. Contains the PROHIBITED or + // FULLY_LIMITED policy topic entries that prevented the resource from being + // saved (among any other entries the resource may also have). + repeated google.ads.googleads.v3.common.PolicyTopicEntry policy_topic_entries = 1; +} diff --git a/google/ads/googleads/v3/errors/extension_feed_item_error.proto b/google/ads/googleads/v3/errors/extension_feed_item_error.proto new file mode 100644 index 000000000..c64a9437e --- /dev/null +++ b/google/ads/googleads/v3/errors/extension_feed_item_error.proto @@ -0,0 +1,194 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionFeedItemErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing extension feed item errors. + +// Container for enum describing possible extension feed item error. +message ExtensionFeedItemErrorEnum { + // Enum describing possible extension feed item errors. + enum ExtensionFeedItemError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Value is not within the accepted range. + VALUE_OUT_OF_RANGE = 2; + + // Url list is too long. + URL_LIST_TOO_LONG = 3; + + // Cannot have a geo targeting restriction without having geo targeting. + CANNOT_HAVE_RESTRICTION_ON_EMPTY_GEO_TARGETING = 4; + + // Cannot simultaneously set sitelink field with final urls. + CANNOT_SET_WITH_FINAL_URLS = 5; + + // Must set field with final urls. + CANNOT_SET_WITHOUT_FINAL_URLS = 6; + + // Phone number for a call extension is invalid. + INVALID_PHONE_NUMBER = 7; + + // Phone number for a call extension is not supported for the given country + // code. + PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 8; + + // A carrier specific number in short format is not allowed for call + // extensions. + CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 9; + + // Premium rate numbers are not allowed for call extensions. + PREMIUM_RATE_NUMBER_NOT_ALLOWED = 10; + + // Phone number type for a call extension is not allowed. + // For example, personal number is not allowed for a call extension in + // most regions. + DISALLOWED_NUMBER_TYPE = 11; + + // Phone number for a call extension does not meet domestic format + // requirements. + INVALID_DOMESTIC_PHONE_NUMBER_FORMAT = 12; + + // Vanity phone numbers (i.e. those including letters) are not allowed for + // call extensions. + VANITY_PHONE_NUMBER_NOT_ALLOWED = 13; + + // Call conversion action provided for a call extension is invalid. + INVALID_CALL_CONVERSION_ACTION = 14; + + // For a call extension, the customer is not whitelisted for call tracking. + CUSTOMER_NOT_WHITELISTED_FOR_CALLTRACKING = 15; + + // Call tracking is not supported for the given country for a call + // extension. + CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 16; + + // Customer hasn't consented for call recording, which is required for + // creating/updating call feed items. Please see + // https://support.google.com/google-ads/answer/7412639. + CUSTOMER_CONSENT_FOR_CALL_RECORDING_REQUIRED = 17; + + // App id provided for an app extension is invalid. + INVALID_APP_ID = 18; + + // Quotation marks present in the review text for a review extension. + QUOTES_IN_REVIEW_EXTENSION_SNIPPET = 19; + + // Hyphen character present in the review text for a review extension. + HYPHENS_IN_REVIEW_EXTENSION_SNIPPET = 20; + + // A blacklisted review source name or url was provided for a review + // extension. + REVIEW_EXTENSION_SOURCE_INELIGIBLE = 21; + + // Review source name should not be found in the review text. + SOURCE_NAME_IN_REVIEW_EXTENSION_TEXT = 22; + + // Inconsistent currency codes. + INCONSISTENT_CURRENCY_CODES = 23; + + // Price extension cannot have duplicated headers. + PRICE_EXTENSION_HAS_DUPLICATED_HEADERS = 24; + + // Price item cannot have duplicated header and description. + PRICE_ITEM_HAS_DUPLICATED_HEADER_AND_DESCRIPTION = 25; + + // Price extension has too few items. + PRICE_EXTENSION_HAS_TOO_FEW_ITEMS = 26; + + // Price extension has too many items. + PRICE_EXTENSION_HAS_TOO_MANY_ITEMS = 27; + + // The input value is not currently supported. + UNSUPPORTED_VALUE = 28; + + // The input value is not currently supported in the selected language of an + // extension. + UNSUPPORTED_VALUE_IN_SELECTED_LANGUAGE = 29; + + // Unknown or unsupported device preference. + INVALID_DEVICE_PREFERENCE = 30; + + // Invalid feed item schedule end time (i.e., endHour = 24 and endMinute != + // 0). + INVALID_SCHEDULE_END = 31; + + // Date time zone does not match the account's time zone. + DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE = 32; + + // Invalid structured snippet header. + INVALID_SNIPPETS_HEADER = 33; + + // Cannot operate on removed feed item. + CANNOT_OPERATE_ON_REMOVED_FEED_ITEM = 34; + + // Phone number not supported when call tracking enabled for country. + PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY = 35; + + // Cannot set call_conversion_action while call_conversion_tracking_enabled + // is set to true. + CONFLICTING_CALL_CONVERSION_SETTINGS = 36; + + // The type of the input extension feed item doesn't match the existing + // extension feed item. + EXTENSION_TYPE_MISMATCH = 37; + + // The oneof field extension i.e. subtype of extension feed item is + // required. + EXTENSION_SUBTYPE_REQUIRED = 38; + + // The referenced feed item is not mapped to a supported extension type. + EXTENSION_TYPE_UNSUPPORTED = 39; + + // Cannot operate on a Feed with more than one active FeedMapping. + CANNOT_OPERATE_ON_FEED_WITH_MULTIPLE_MAPPINGS = 40; + + // Cannot operate on a Feed that has key attributes. + CANNOT_OPERATE_ON_FEED_WITH_KEY_ATTRIBUTES = 41; + + // Input price is not in a valid format. + INVALID_PRICE_FORMAT = 42; + + // The promotion time is invalid. + PROMOTION_INVALID_TIME = 43; + + // This field has too many decimal places specified. + TOO_MANY_DECIMAL_PLACES_SPECIFIED = 44; + + // Concrete sub type of ExtensionFeedItem is required for this operation. + CONCRETE_EXTENSION_TYPE_REQUIRED = 45; + + // Feed item schedule end time must be after start time. + SCHEDULE_END_NOT_AFTER_START = 46; + } + + +} diff --git a/google/ads/googleads/v3/errors/extension_setting_error.proto b/google/ads/googleads/v3/errors/extension_setting_error.proto new file mode 100644 index 000000000..eefe3bcf5 --- /dev/null +++ b/google/ads/googleads/v3/errors/extension_setting_error.proto @@ -0,0 +1,257 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionSettingErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing extension setting validation errors. + +// Container for enum describing validation errors of extension settings. +message ExtensionSettingErrorEnum { + // Enum describing possible extension setting errors. + enum ExtensionSettingError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // A platform restriction was provided without input extensions or existing + // extensions. + EXTENSIONS_REQUIRED = 2; + + // The provided feed type does not correspond to the provided extensions. + FEED_TYPE_EXTENSION_TYPE_MISMATCH = 3; + + // The provided feed type cannot be used. + INVALID_FEED_TYPE = 4; + + // The provided feed type cannot be used at the customer level. + INVALID_FEED_TYPE_FOR_CUSTOMER_EXTENSION_SETTING = 5; + + // Cannot change a feed item field on a CREATE operation. + CANNOT_CHANGE_FEED_ITEM_ON_CREATE = 6; + + // Cannot update an extension that is not already in this setting. + CANNOT_UPDATE_NEWLY_CREATED_EXTENSION = 7; + + // There is no existing AdGroupExtensionSetting for this type. + NO_EXISTING_AD_GROUP_EXTENSION_SETTING_FOR_TYPE = 8; + + // There is no existing CampaignExtensionSetting for this type. + NO_EXISTING_CAMPAIGN_EXTENSION_SETTING_FOR_TYPE = 9; + + // There is no existing CustomerExtensionSetting for this type. + NO_EXISTING_CUSTOMER_EXTENSION_SETTING_FOR_TYPE = 10; + + // The AdGroupExtensionSetting already exists. UPDATE should be used to + // modify the existing AdGroupExtensionSetting. + AD_GROUP_EXTENSION_SETTING_ALREADY_EXISTS = 11; + + // The CampaignExtensionSetting already exists. UPDATE should be used to + // modify the existing CampaignExtensionSetting. + CAMPAIGN_EXTENSION_SETTING_ALREADY_EXISTS = 12; + + // The CustomerExtensionSetting already exists. UPDATE should be used to + // modify the existing CustomerExtensionSetting. + CUSTOMER_EXTENSION_SETTING_ALREADY_EXISTS = 13; + + // An active ad group feed already exists for this place holder type. + AD_GROUP_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 14; + + // An active campaign feed already exists for this place holder type. + CAMPAIGN_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 15; + + // An active customer feed already exists for this place holder type. + CUSTOMER_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 16; + + // Value is not within the accepted range. + VALUE_OUT_OF_RANGE = 17; + + // Cannot simultaneously set specified field with final urls. + CANNOT_SET_FIELD_WITH_FINAL_URLS = 18; + + // Must set field with final urls. + FINAL_URLS_NOT_SET = 19; + + // Phone number for a call extension is invalid. + INVALID_PHONE_NUMBER = 20; + + // Phone number for a call extension is not supported for the given country + // code. + PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 21; + + // A carrier specific number in short format is not allowed for call + // extensions. + CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 22; + + // Premium rate numbers are not allowed for call extensions. + PREMIUM_RATE_NUMBER_NOT_ALLOWED = 23; + + // Phone number type for a call extension is not allowed. + DISALLOWED_NUMBER_TYPE = 24; + + // Phone number for a call extension does not meet domestic format + // requirements. + INVALID_DOMESTIC_PHONE_NUMBER_FORMAT = 25; + + // Vanity phone numbers (i.e. those including letters) are not allowed for + // call extensions. + VANITY_PHONE_NUMBER_NOT_ALLOWED = 26; + + // Country code provided for a call extension is invalid. + INVALID_COUNTRY_CODE = 27; + + // Call conversion type id provided for a call extension is invalid. + INVALID_CALL_CONVERSION_TYPE_ID = 28; + + // For a call extension, the customer is not whitelisted for call tracking. + CUSTOMER_NOT_WHITELISTED_FOR_CALLTRACKING = 29; + + // Call tracking is not supported for the given country for a call + // extension. + CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 30; + + // App id provided for an app extension is invalid. + INVALID_APP_ID = 31; + + // Quotation marks present in the review text for a review extension. + QUOTES_IN_REVIEW_EXTENSION_SNIPPET = 32; + + // Hyphen character present in the review text for a review extension. + HYPHENS_IN_REVIEW_EXTENSION_SNIPPET = 33; + + // A blacklisted review source name or url was provided for a review + // extension. + REVIEW_EXTENSION_SOURCE_NOT_ELIGIBLE = 34; + + // Review source name should not be found in the review text. + SOURCE_NAME_IN_REVIEW_EXTENSION_TEXT = 35; + + // Field must be set. + MISSING_FIELD = 36; + + // Inconsistent currency codes. + INCONSISTENT_CURRENCY_CODES = 37; + + // Price extension cannot have duplicated headers. + PRICE_EXTENSION_HAS_DUPLICATED_HEADERS = 38; + + // Price item cannot have duplicated header and description. + PRICE_ITEM_HAS_DUPLICATED_HEADER_AND_DESCRIPTION = 39; + + // Price extension has too few items + PRICE_EXTENSION_HAS_TOO_FEW_ITEMS = 40; + + // Price extension has too many items + PRICE_EXTENSION_HAS_TOO_MANY_ITEMS = 41; + + // The input value is not currently supported. + UNSUPPORTED_VALUE = 42; + + // Unknown or unsupported device preference. + INVALID_DEVICE_PREFERENCE = 43; + + // Invalid feed item schedule end time (i.e., endHour = 24 and + // endMinute != 0). + INVALID_SCHEDULE_END = 45; + + // Date time zone does not match the account's time zone. + DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE = 47; + + // Overlapping feed item schedule times (e.g., 7-10AM and 8-11AM) are not + // allowed. + OVERLAPPING_SCHEDULES_NOT_ALLOWED = 48; + + // Feed item schedule end time must be after start time. + SCHEDULE_END_NOT_AFTER_START = 49; + + // There are too many feed item schedules per day. + TOO_MANY_SCHEDULES_PER_DAY = 50; + + // Cannot edit the same extension feed item more than once in the same + // request. + DUPLICATE_EXTENSION_FEED_ITEM_EDIT = 51; + + // Invalid structured snippet header. + INVALID_SNIPPETS_HEADER = 52; + + // Phone number with call tracking enabled is not supported for the + // specified country. + PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY = 53; + + // The targeted adgroup must belong to the targeted campaign. + CAMPAIGN_TARGETING_MISMATCH = 54; + + // The feed used by the ExtensionSetting is removed and cannot be operated + // on. Remove the ExtensionSetting to allow a new one to be created using + // an active feed. + CANNOT_OPERATE_ON_REMOVED_FEED = 55; + + // The ExtensionFeedItem type is required for this operation. + EXTENSION_TYPE_REQUIRED = 56; + + // The matching function that links the extension feed to the customer, + // campaign, or ad group is not compatible with the ExtensionSetting + // services. + INCOMPATIBLE_UNDERLYING_MATCHING_FUNCTION = 57; + + // Start date must be before end date. + START_DATE_AFTER_END_DATE = 58; + + // Input price is not in a valid format. + INVALID_PRICE_FORMAT = 59; + + // The promotion time is invalid. + PROMOTION_INVALID_TIME = 60; + + // Cannot set both percent discount and money discount fields. + PROMOTION_CANNOT_SET_PERCENT_DISCOUNT_AND_MONEY_DISCOUNT = 61; + + // Cannot set both promotion code and orders over amount fields. + PROMOTION_CANNOT_SET_PROMOTION_CODE_AND_ORDERS_OVER_AMOUNT = 62; + + // This field has too many decimal places specified. + TOO_MANY_DECIMAL_PLACES_SPECIFIED = 63; + + // The language code is not valid. + INVALID_LANGUAGE_CODE = 64; + + // The language is not supported. + UNSUPPORTED_LANGUAGE = 65; + + // Customer hasn't consented for call recording, which is required for + // adding/updating call extensions. Please see + // https://support.google.com/google-ads/answer/7412639. + CUSTOMER_CONSENT_FOR_CALL_RECORDING_REQUIRED = 66; + + // The UPDATE operation does not specify any fields other than the resource + // name in the update mask. + EXTENSION_SETTING_UPDATE_IS_A_NOOP = 67; + } + + +} diff --git a/google/ads/googleads/v3/errors/feed_attribute_reference_error.proto b/google/ads/googleads/v3/errors/feed_attribute_reference_error.proto new file mode 100644 index 000000000..84d32435f --- /dev/null +++ b/google/ads/googleads/v3/errors/feed_attribute_reference_error.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "FeedAttributeReferenceErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing feed attribute reference errors. + +// Container for enum describing possible feed attribute reference errors. +message FeedAttributeReferenceErrorEnum { + // Enum describing possible feed attribute reference errors. + enum FeedAttributeReferenceError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // A feed referenced by ID has been removed. + CANNOT_REFERENCE_REMOVED_FEED = 2; + + // There is no enabled feed with the given name. + INVALID_FEED_NAME = 3; + + // There is no feed attribute in an enabled feed with the given name. + INVALID_FEED_ATTRIBUTE_NAME = 4; + } + + +} diff --git a/google/ads/googleads/v3/errors/feed_error.proto b/google/ads/googleads/v3/errors/feed_error.proto new file mode 100644 index 000000000..0aa6ab86a --- /dev/null +++ b/google/ads/googleads/v3/errors/feed_error.proto @@ -0,0 +1,111 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "FeedErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing feed errors. + +// Container for enum describing possible feed errors. +message FeedErrorEnum { + // Enum describing possible feed errors. + enum FeedError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The names of the FeedAttributes must be unique. + ATTRIBUTE_NAMES_NOT_UNIQUE = 2; + + // The attribute list must be an exact copy of the existing list if the + // attribute ID's are present. + ATTRIBUTES_DO_NOT_MATCH_EXISTING_ATTRIBUTES = 3; + + // Cannot specify USER origin for a system generated feed. + CANNOT_SPECIFY_USER_ORIGIN_FOR_SYSTEM_FEED = 4; + + // Cannot specify GOOGLE origin for a non-system generated feed. + CANNOT_SPECIFY_GOOGLE_ORIGIN_FOR_NON_SYSTEM_FEED = 5; + + // Cannot specify feed attributes for system feed. + CANNOT_SPECIFY_FEED_ATTRIBUTES_FOR_SYSTEM_FEED = 6; + + // Cannot update FeedAttributes on feed with origin GOOGLE. + CANNOT_UPDATE_FEED_ATTRIBUTES_WITH_ORIGIN_GOOGLE = 7; + + // The given ID refers to a removed Feed. Removed Feeds are immutable. + FEED_REMOVED = 8; + + // The origin of the feed is not valid for the client. + INVALID_ORIGIN_VALUE = 9; + + // A user can only create and modify feeds with USER origin. + FEED_ORIGIN_IS_NOT_USER = 10; + + // Invalid auth token for the given email. + INVALID_AUTH_TOKEN_FOR_EMAIL = 11; + + // Invalid email specified. + INVALID_EMAIL = 12; + + // Feed name matches that of another active Feed. + DUPLICATE_FEED_NAME = 13; + + // Name of feed is not allowed. + INVALID_FEED_NAME = 14; + + // Missing OAuthInfo. + MISSING_OAUTH_INFO = 15; + + // New FeedAttributes must not affect the unique key. + NEW_ATTRIBUTE_CANNOT_BE_PART_OF_UNIQUE_KEY = 16; + + // Too many FeedAttributes for a Feed. + TOO_MANY_ATTRIBUTES = 17; + + // The business account is not valid. + INVALID_BUSINESS_ACCOUNT = 18; + + // Business account cannot access Google My Business account. + BUSINESS_ACCOUNT_CANNOT_ACCESS_LOCATION_ACCOUNT = 19; + + // Invalid chain ID provided for affiliate location feed. + INVALID_AFFILIATE_CHAIN_ID = 20; + + // There is already a feed with the given system feed generation data. + DUPLICATE_SYSTEM_FEED = 21; + + // An error occurred accessing GMB account. + GMB_ACCESS_ERROR = 22; + + // A customer cannot have both LOCATION and AFFILIATE_LOCATION feeds. + CANNOT_HAVE_LOCATION_AND_AFFILIATE_LOCATION_FEEDS = 23; + } + + +} diff --git a/google/ads/googleads/v3/errors/feed_item_error.proto b/google/ads/googleads/v3/errors/feed_item_error.proto new file mode 100644 index 000000000..465c3ce32 --- /dev/null +++ b/google/ads/googleads/v3/errors/feed_item_error.proto @@ -0,0 +1,71 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing feed item errors. + +// Container for enum describing possible feed item errors. +message FeedItemErrorEnum { + // Enum describing possible feed item errors. + enum FeedItemError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Cannot convert the feed attribute value from string to its real type. + CANNOT_CONVERT_ATTRIBUTE_VALUE_FROM_STRING = 2; + + // Cannot operate on removed feed item. + CANNOT_OPERATE_ON_REMOVED_FEED_ITEM = 3; + + // Date time zone does not match the account's time zone. + DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE = 4; + + // Feed item with the key attributes could not be found. + KEY_ATTRIBUTES_NOT_FOUND = 5; + + // Url feed attribute value is not valid. + INVALID_URL = 6; + + // Some key attributes are missing. + MISSING_KEY_ATTRIBUTES = 7; + + // Feed item has same key attributes as another feed item. + KEY_ATTRIBUTES_NOT_UNIQUE = 8; + + // Cannot modify key attributes on an existing feed item. + CANNOT_MODIFY_KEY_ATTRIBUTE_VALUE = 9; + + // The feed attribute value is too large. + SIZE_TOO_LARGE_FOR_MULTI_VALUE_ATTRIBUTE = 10; + } + + +} diff --git a/google/ads/googleads/v3/errors/feed_item_target_error.proto b/google/ads/googleads/v3/errors/feed_item_target_error.proto new file mode 100644 index 000000000..7f1d897af --- /dev/null +++ b/google/ads/googleads/v3/errors/feed_item_target_error.proto @@ -0,0 +1,70 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemTargetErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing feed item target errors. + +// Container for enum describing possible feed item target errors. +message FeedItemTargetErrorEnum { + // Enum describing possible feed item target errors. + enum FeedItemTargetError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // On CREATE, the FeedItemTarget must have a populated field in the oneof + // target. + MUST_SET_TARGET_ONEOF_ON_CREATE = 2; + + // The specified feed item target already exists, so it cannot be added. + FEED_ITEM_TARGET_ALREADY_EXISTS = 3; + + // The schedules for a given feed item cannot overlap. + FEED_ITEM_SCHEDULES_CANNOT_OVERLAP = 4; + + // Too many targets of a given type were added for a single feed item. + TARGET_LIMIT_EXCEEDED_FOR_GIVEN_TYPE = 5; + + // Too many AdSchedules are enabled for the feed item for the given day. + TOO_MANY_SCHEDULES_PER_DAY = 6; + + // A feed item may either have an enabled campaign target or an enabled ad + // group target. + CANNOT_HAVE_ENABLED_CAMPAIGN_AND_ENABLED_AD_GROUP_TARGETS = 7; + + // Duplicate ad schedules aren't allowed. + DUPLICATE_AD_SCHEDULE = 8; + + // Duplicate keywords aren't allowed. + DUPLICATE_KEYWORD = 9; + } + + +} diff --git a/google/ads/googleads/v3/errors/feed_item_validation_error.proto b/google/ads/googleads/v3/errors/feed_item_validation_error.proto new file mode 100644 index 000000000..334f41cff --- /dev/null +++ b/google/ads/googleads/v3/errors/feed_item_validation_error.proto @@ -0,0 +1,353 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemValidationErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing feed item validation errors. + +// Container for enum describing possible validation errors of a feed item. +message FeedItemValidationErrorEnum { + // The possible validation errors of a feed item. + enum FeedItemValidationError { + // No value has been specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // String is too short. + STRING_TOO_SHORT = 2; + + // String is too long. + STRING_TOO_LONG = 3; + + // Value is not provided. + VALUE_NOT_SPECIFIED = 4; + + // Phone number format is invalid for region. + INVALID_DOMESTIC_PHONE_NUMBER_FORMAT = 5; + + // String does not represent a phone number. + INVALID_PHONE_NUMBER = 6; + + // Phone number format is not compatible with country code. + PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 7; + + // Premium rate number is not allowed. + PREMIUM_RATE_NUMBER_NOT_ALLOWED = 8; + + // Phone number type is not allowed. + DISALLOWED_NUMBER_TYPE = 9; + + // Specified value is outside of the valid range. + VALUE_OUT_OF_RANGE = 10; + + // Call tracking is not supported in the selected country. + CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 11; + + // Customer is not whitelisted for call tracking. + CUSTOMER_NOT_WHITELISTED_FOR_CALLTRACKING = 12; + + // Country code is invalid. + INVALID_COUNTRY_CODE = 13; + + // The specified mobile app id is invalid. + INVALID_APP_ID = 14; + + // Some required field attributes are missing. + MISSING_ATTRIBUTES_FOR_FIELDS = 15; + + // Invalid email button type for email extension. + INVALID_TYPE_ID = 16; + + // Email address is invalid. + INVALID_EMAIL_ADDRESS = 17; + + // The HTTPS URL in email extension is invalid. + INVALID_HTTPS_URL = 18; + + // Delivery address is missing from email extension. + MISSING_DELIVERY_ADDRESS = 19; + + // FeedItem scheduling start date comes after end date. + START_DATE_AFTER_END_DATE = 20; + + // FeedItem scheduling start time is missing. + MISSING_FEED_ITEM_START_TIME = 21; + + // FeedItem scheduling end time is missing. + MISSING_FEED_ITEM_END_TIME = 22; + + // Cannot compute system attributes on a FeedItem that has no FeedItemId. + MISSING_FEED_ITEM_ID = 23; + + // Call extension vanity phone numbers are not supported. + VANITY_PHONE_NUMBER_NOT_ALLOWED = 24; + + // Invalid review text. + INVALID_REVIEW_EXTENSION_SNIPPET = 25; + + // Invalid format for numeric value in ad parameter. + INVALID_NUMBER_FORMAT = 26; + + // Invalid format for date value in ad parameter. + INVALID_DATE_FORMAT = 27; + + // Invalid format for price value in ad parameter. + INVALID_PRICE_FORMAT = 28; + + // Unrecognized type given for value in ad parameter. + UNKNOWN_PLACEHOLDER_FIELD = 29; + + // Enhanced sitelinks must have both description lines specified. + MISSING_ENHANCED_SITELINK_DESCRIPTION_LINE = 30; + + // Review source is ineligible. + REVIEW_EXTENSION_SOURCE_INELIGIBLE = 31; + + // Review text cannot contain hyphens or dashes. + HYPHENS_IN_REVIEW_EXTENSION_SNIPPET = 32; + + // Review text cannot contain double quote characters. + DOUBLE_QUOTES_IN_REVIEW_EXTENSION_SNIPPET = 33; + + // Review text cannot contain quote characters. + QUOTES_IN_REVIEW_EXTENSION_SNIPPET = 34; + + // Parameters are encoded in the wrong format. + INVALID_FORM_ENCODED_PARAMS = 35; + + // URL parameter name must contain only letters, numbers, underscores, and + // dashes. + INVALID_URL_PARAMETER_NAME = 36; + + // Cannot find address location. + NO_GEOCODING_RESULT = 37; + + // Review extension text has source name. + SOURCE_NAME_IN_REVIEW_EXTENSION_TEXT = 38; + + // Some phone numbers can be shorter than usual. Some of these short numbers + // are carrier-specific, and we disallow those in ad extensions because they + // will not be available to all users. + CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 39; + + // Triggered when a request references a placeholder field id that does not + // exist. + INVALID_PLACEHOLDER_FIELD_ID = 40; + + // URL contains invalid ValueTrack tags or format. + INVALID_URL_TAG = 41; + + // Provided list exceeds acceptable size. + LIST_TOO_LONG = 42; + + // Certain combinations of attributes aren't allowed to be specified in the + // same feed item. + INVALID_ATTRIBUTES_COMBINATION = 43; + + // An attribute has the same value repeatedly. + DUPLICATE_VALUES = 44; + + // Advertisers can link a conversion action with a phone number to indicate + // that sufficiently long calls forwarded to that phone number should be + // counted as conversions of the specified type. This is an error message + // indicating that the conversion action specified is invalid (e.g., the + // conversion action does not exist within the appropriate Google Ads + // account, or it is a type of conversion not appropriate to phone call + // conversions). + INVALID_CALL_CONVERSION_ACTION_ID = 45; + + // Tracking template requires final url to be set. + CANNOT_SET_WITHOUT_FINAL_URLS = 46; + + // An app id was provided that doesn't exist in the given app store. + APP_ID_DOESNT_EXIST_IN_APP_STORE = 47; + + // Invalid U2 final url. + INVALID_FINAL_URL = 48; + + // Invalid U2 tracking url. + INVALID_TRACKING_URL = 49; + + // Final URL should start from App download URL. + INVALID_FINAL_URL_FOR_APP_DOWNLOAD_URL = 50; + + // List provided is too short. + LIST_TOO_SHORT = 51; + + // User Action field has invalid value. + INVALID_USER_ACTION = 52; + + // Type field has invalid value. + INVALID_TYPE_NAME = 53; + + // Change status for event is invalid. + INVALID_EVENT_CHANGE_STATUS = 54; + + // The header of a structured snippets extension is not one of the valid + // headers. + INVALID_SNIPPETS_HEADER = 55; + + // Android app link is not formatted correctly + INVALID_ANDROID_APP_LINK = 56; + + // Phone number incompatible with call tracking for country. + NUMBER_TYPE_WITH_CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 57; + + // The input is identical to a reserved keyword + RESERVED_KEYWORD_OTHER = 58; + + // Each option label in the message extension must be unique. + DUPLICATE_OPTION_LABELS = 59; + + // Each option prefill in the message extension must be unique. + DUPLICATE_OPTION_PREFILLS = 60; + + // In message extensions, the number of optional labels and optional + // prefills must be the same. + UNEQUAL_LIST_LENGTHS = 61; + + // All currency codes in an ad extension must be the same. + INCONSISTENT_CURRENCY_CODES = 62; + + // Headers in price extension are not unique. + PRICE_EXTENSION_HAS_DUPLICATED_HEADERS = 63; + + // Header and description in an item are the same. + ITEM_HAS_DUPLICATED_HEADER_AND_DESCRIPTION = 64; + + // Price extension has too few items. + PRICE_EXTENSION_HAS_TOO_FEW_ITEMS = 65; + + // The given value is not supported. + UNSUPPORTED_VALUE = 66; + + // Invalid final mobile url. + INVALID_FINAL_MOBILE_URL = 67; + + // The given string value of Label contains invalid characters + INVALID_KEYWORDLESS_AD_RULE_LABEL = 68; + + // The given URL contains value track parameters. + VALUE_TRACK_PARAMETER_NOT_SUPPORTED = 69; + + // The given value is not supported in the selected language of an + // extension. + UNSUPPORTED_VALUE_IN_SELECTED_LANGUAGE = 70; + + // The iOS app link is not formatted correctly. + INVALID_IOS_APP_LINK = 71; + + // iOS app link or iOS app store id is missing. + MISSING_IOS_APP_LINK_OR_IOS_APP_STORE_ID = 72; + + // Promotion time is invalid. + PROMOTION_INVALID_TIME = 73; + + // Both the percent off and money amount off fields are set. + PROMOTION_CANNOT_SET_PERCENT_OFF_AND_MONEY_AMOUNT_OFF = 74; + + // Both the promotion code and orders over amount fields are set. + PROMOTION_CANNOT_SET_PROMOTION_CODE_AND_ORDERS_OVER_AMOUNT = 75; + + // Too many decimal places are specified. + TOO_MANY_DECIMAL_PLACES_SPECIFIED = 76; + + // Ad Customizers are present and not allowed. + AD_CUSTOMIZERS_NOT_ALLOWED = 77; + + // Language code is not valid. + INVALID_LANGUAGE_CODE = 78; + + // Language is not supported. + UNSUPPORTED_LANGUAGE = 79; + + // IF Function is present and not allowed. + IF_FUNCTION_NOT_ALLOWED = 80; + + // Final url suffix is not valid. + INVALID_FINAL_URL_SUFFIX = 81; + + // Final url suffix contains an invalid tag. + INVALID_TAG_IN_FINAL_URL_SUFFIX = 82; + + // Final url suffix is formatted incorrectly. + INVALID_FINAL_URL_SUFFIX_FORMAT = 83; + + // Consent for call recording, which is required for the use of call + // extensions, was not provided by the advertiser. Please see + // https://support.google.com/google-ads/answer/7412639. + CUSTOMER_CONSENT_FOR_CALL_RECORDING_REQUIRED = 84; + + // Multiple message delivery options are set. + ONLY_ONE_DELIVERY_OPTION_IS_ALLOWED = 85; + + // No message delivery option is set. + NO_DELIVERY_OPTION_IS_SET = 86; + + // String value of conversion reporting state field is not valid. + INVALID_CONVERSION_REPORTING_STATE = 87; + + // Image size is not right. + IMAGE_SIZE_WRONG = 88; + + // Email delivery is not supported in the country specified in the country + // code field. + EMAIL_DELIVERY_NOT_AVAILABLE_IN_COUNTRY = 89; + + // Auto reply is not supported in the country specified in the country code + // field. + AUTO_REPLY_NOT_AVAILABLE_IN_COUNTRY = 90; + + // Invalid value specified for latitude. + INVALID_LATITUDE_VALUE = 91; + + // Invalid value specified for longitude. + INVALID_LONGITUDE_VALUE = 92; + + // Too many label fields provided. + TOO_MANY_LABELS = 93; + + // Invalid image url. + INVALID_IMAGE_URL = 94; + + // Latitude value is missing. + MISSING_LATITUDE_VALUE = 95; + + // Longitude value is missing. + MISSING_LONGITUDE_VALUE = 96; + + // Unable to find address. + ADDRESS_NOT_FOUND = 97; + + // Cannot target provided address. + ADDRESS_NOT_TARGETABLE = 98; + } + + +} diff --git a/google/ads/googleads/v3/errors/feed_mapping_error.proto b/google/ads/googleads/v3/errors/feed_mapping_error.proto new file mode 100644 index 000000000..284be5e12 --- /dev/null +++ b/google/ads/googleads/v3/errors/feed_mapping_error.proto @@ -0,0 +1,100 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "FeedMappingErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing feed item errors. + +// Container for enum describing possible feed item errors. +message FeedMappingErrorEnum { + // Enum describing possible feed item errors. + enum FeedMappingError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The given placeholder field does not exist. + INVALID_PLACEHOLDER_FIELD = 2; + + // The given criterion field does not exist. + INVALID_CRITERION_FIELD = 3; + + // The given placeholder type does not exist. + INVALID_PLACEHOLDER_TYPE = 4; + + // The given criterion type does not exist. + INVALID_CRITERION_TYPE = 5; + + // A feed mapping must contain at least one attribute field mapping. + NO_ATTRIBUTE_FIELD_MAPPINGS = 7; + + // The type of the feed attribute referenced in the attribute field mapping + // must match the type of the placeholder field. + FEED_ATTRIBUTE_TYPE_MISMATCH = 8; + + // A feed mapping for a system generated feed cannot be operated on. + CANNOT_OPERATE_ON_MAPPINGS_FOR_SYSTEM_GENERATED_FEED = 9; + + // Only one feed mapping for a placeholder type is allowed per feed or + // customer (depending on the placeholder type). + MULTIPLE_MAPPINGS_FOR_PLACEHOLDER_TYPE = 10; + + // Only one feed mapping for a criterion type is allowed per customer. + MULTIPLE_MAPPINGS_FOR_CRITERION_TYPE = 11; + + // Only one feed attribute mapping for a placeholder field is allowed + // (depending on the placeholder type). + MULTIPLE_MAPPINGS_FOR_PLACEHOLDER_FIELD = 12; + + // Only one feed attribute mapping for a criterion field is allowed + // (depending on the criterion type). + MULTIPLE_MAPPINGS_FOR_CRITERION_FIELD = 13; + + // This feed mapping may not contain any explicit attribute field mappings. + UNEXPECTED_ATTRIBUTE_FIELD_MAPPINGS = 14; + + // Location placeholder feed mappings can only be created for Places feeds. + LOCATION_PLACEHOLDER_ONLY_FOR_PLACES_FEEDS = 15; + + // Mappings for typed feeds cannot be modified. + CANNOT_MODIFY_MAPPINGS_FOR_TYPED_FEED = 16; + + // The given placeholder type can only be mapped to system generated feeds. + INVALID_PLACEHOLDER_TYPE_FOR_NON_SYSTEM_GENERATED_FEED = 17; + + // The given placeholder type cannot be mapped to a system generated feed + // with the given type. + INVALID_PLACEHOLDER_TYPE_FOR_SYSTEM_GENERATED_FEED_TYPE = 18; + + // The "field" oneof was not set in an AttributeFieldMapping. + ATTRIBUTE_FIELD_MAPPING_MISSING_FIELD = 19; + } + + +} diff --git a/google/ads/googleads/v3/errors/field_error.proto b/google/ads/googleads/v3/errors/field_error.proto new file mode 100644 index 000000000..f601c070f --- /dev/null +++ b/google/ads/googleads/v3/errors/field_error.proto @@ -0,0 +1,65 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "FieldErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing field errors. + +// Container for enum describing possible field errors. +message FieldErrorEnum { + // Enum describing possible field errors. + enum FieldError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The required field was not present. + REQUIRED = 2; + + // The field attempted to be mutated is immutable. + IMMUTABLE_FIELD = 3; + + // The field's value is invalid. + INVALID_VALUE = 4; + + // The field cannot be set. + VALUE_MUST_BE_UNSET = 5; + + // The required repeated field was empty. + REQUIRED_NONEMPTY_LIST = 6; + + // The field cannot be cleared. + FIELD_CANNOT_BE_CLEARED = 7; + + // The field's value is on a blacklist for this field. + BLACKLISTED_VALUE = 8; + } + + +} diff --git a/google/ads/googleads/v3/errors/field_mask_error.proto b/google/ads/googleads/v3/errors/field_mask_error.proto new file mode 100644 index 000000000..6f2cdc597 --- /dev/null +++ b/google/ads/googleads/v3/errors/field_mask_error.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "FieldMaskErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing field mask errors. + +// Container for enum describing possible field mask errors. +message FieldMaskErrorEnum { + // Enum describing possible field mask errors. + enum FieldMaskError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The field mask must be provided for update operations. + FIELD_MASK_MISSING = 5; + + // The field mask must be empty for create and remove operations. + FIELD_MASK_NOT_ALLOWED = 4; + + // The field mask contained an invalid field. + FIELD_NOT_FOUND = 2; + + // The field mask updated a field with subfields. Fields with subfields may + // be cleared, but not updated. To fix this, the field mask should select + // all the subfields of the invalid field. + FIELD_HAS_SUBFIELDS = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/function_error.proto b/google/ads/googleads/v3/errors/function_error.proto new file mode 100644 index 000000000..118f0c071 --- /dev/null +++ b/google/ads/googleads/v3/errors/function_error.proto @@ -0,0 +1,93 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "FunctionErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing function errors. + +// Container for enum describing possible function errors. +message FunctionErrorEnum { + // Enum describing possible function errors. + enum FunctionError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The format of the function is not recognized as a supported function + // format. + INVALID_FUNCTION_FORMAT = 2; + + // Operand data types do not match. + DATA_TYPE_MISMATCH = 3; + + // The operands cannot be used together in a conjunction. + INVALID_CONJUNCTION_OPERANDS = 4; + + // Invalid numer of Operands. + INVALID_NUMBER_OF_OPERANDS = 5; + + // Operand Type not supported. + INVALID_OPERAND_TYPE = 6; + + // Operator not supported. + INVALID_OPERATOR = 7; + + // Request context type not supported. + INVALID_REQUEST_CONTEXT_TYPE = 8; + + // The matching function is not allowed for call placeholders + INVALID_FUNCTION_FOR_CALL_PLACEHOLDER = 9; + + // The matching function is not allowed for the specified placeholder + INVALID_FUNCTION_FOR_PLACEHOLDER = 10; + + // Invalid operand. + INVALID_OPERAND = 11; + + // Missing value for the constant operand. + MISSING_CONSTANT_OPERAND_VALUE = 12; + + // The value of the constant operand is invalid. + INVALID_CONSTANT_OPERAND_VALUE = 13; + + // Invalid function nesting. + INVALID_NESTING = 14; + + // The Feed ID was different from another Feed ID in the same function. + MULTIPLE_FEED_IDS_NOT_SUPPORTED = 15; + + // The matching function is invalid for use with a feed with a fixed schema. + INVALID_FUNCTION_FOR_FEED_WITH_FIXED_SCHEMA = 16; + + // Invalid attribute name. + INVALID_ATTRIBUTE_NAME = 17; + } + + +} diff --git a/google/ads/googleads/v3/errors/function_parsing_error.proto b/google/ads/googleads/v3/errors/function_parsing_error.proto new file mode 100644 index 000000000..a7c634f5b --- /dev/null +++ b/google/ads/googleads/v3/errors/function_parsing_error.proto @@ -0,0 +1,77 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "FunctionParsingErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing function parsing errors. + +// Container for enum describing possible function parsing errors. +message FunctionParsingErrorEnum { + // Enum describing possible function parsing errors. + enum FunctionParsingError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Unexpected end of function string. + NO_MORE_INPUT = 2; + + // Could not find an expected character. + EXPECTED_CHARACTER = 3; + + // Unexpected separator character. + UNEXPECTED_SEPARATOR = 4; + + // Unmatched left bracket or parenthesis. + UNMATCHED_LEFT_BRACKET = 5; + + // Unmatched right bracket or parenthesis. + UNMATCHED_RIGHT_BRACKET = 6; + + // Functions are nested too deeply. + TOO_MANY_NESTED_FUNCTIONS = 7; + + // Missing right-hand-side operand. + MISSING_RIGHT_HAND_OPERAND = 8; + + // Invalid operator/function name. + INVALID_OPERATOR_NAME = 9; + + // Feed attribute operand's argument is not an integer. + FEED_ATTRIBUTE_OPERAND_ARGUMENT_NOT_INTEGER = 10; + + // Missing function operands. + NO_OPERANDS = 11; + + // Function had too many operands. + TOO_MANY_OPERANDS = 12; + } + + +} diff --git a/google/ads/googleads/v3/errors/geo_target_constant_suggestion_error.proto b/google/ads/googleads/v3/errors/geo_target_constant_suggestion_error.proto new file mode 100644 index 000000000..039dd5f98 --- /dev/null +++ b/google/ads/googleads/v3/errors/geo_target_constant_suggestion_error.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "GeoTargetConstantSuggestionErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Container for enum describing possible geo target constant suggestion errors. +message GeoTargetConstantSuggestionErrorEnum { + // Enum describing possible geo target constant suggestion errors. + enum GeoTargetConstantSuggestionError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // A location name cannot be greater than 300 characters. + LOCATION_NAME_SIZE_LIMIT = 2; + + // At most 25 location names can be specified in a SuggestGeoTargetConstants + // method. + LOCATION_NAME_LIMIT = 3; + + // The country code is invalid. + INVALID_COUNTRY_CODE = 4; + + // Geo target constant resource names or location names must be provided in + // the request. + REQUEST_PARAMETERS_UNSET = 5; + } + + +} diff --git a/google/ads/googleads/v3/errors/header_error.proto b/google/ads/googleads/v3/errors/header_error.proto new file mode 100644 index 000000000..dfbbe4544 --- /dev/null +++ b/google/ads/googleads/v3/errors/header_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "HeaderErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing header errors. + +// Container for enum describing possible header errors. +message HeaderErrorEnum { + // Enum describing possible header errors. + enum HeaderError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The login customer id could not be validated. + INVALID_LOGIN_CUSTOMER_ID = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/id_error.proto b/google/ads/googleads/v3/errors/id_error.proto new file mode 100644 index 000000000..d37b0fa9c --- /dev/null +++ b/google/ads/googleads/v3/errors/id_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "IdErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing id errors. + +// Container for enum describing possible id errors. +message IdErrorEnum { + // Enum describing possible id errors. + enum IdError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Id not found + NOT_FOUND = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/image_error.proto b/google/ads/googleads/v3/errors/image_error.proto new file mode 100644 index 000000000..e226d6b2a --- /dev/null +++ b/google/ads/googleads/v3/errors/image_error.proto @@ -0,0 +1,161 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ImageErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing image errors. + +// Container for enum describing possible image errors. +message ImageErrorEnum { + // Enum describing possible image errors. + enum ImageError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The image is not valid. + INVALID_IMAGE = 2; + + // The image could not be stored. + STORAGE_ERROR = 3; + + // There was a problem with the request. + BAD_REQUEST = 4; + + // The image is not of legal dimensions. + UNEXPECTED_SIZE = 5; + + // Animated image are not permitted. + ANIMATED_NOT_ALLOWED = 6; + + // Animation is too long. + ANIMATION_TOO_LONG = 7; + + // There was an error on the server. + SERVER_ERROR = 8; + + // Image cannot be in CMYK color format. + CMYK_JPEG_NOT_ALLOWED = 9; + + // Flash images are not permitted. + FLASH_NOT_ALLOWED = 10; + + // Flash images must support clickTag. + FLASH_WITHOUT_CLICKTAG = 11; + + // A flash error has occurred after fixing the click tag. + FLASH_ERROR_AFTER_FIXING_CLICK_TAG = 12; + + // Unacceptable visual effects. + ANIMATED_VISUAL_EFFECT = 13; + + // There was a problem with the flash image. + FLASH_ERROR = 14; + + // Incorrect image layout. + LAYOUT_PROBLEM = 15; + + // There was a problem reading the image file. + PROBLEM_READING_IMAGE_FILE = 16; + + // There was an error storing the image. + ERROR_STORING_IMAGE = 17; + + // The aspect ratio of the image is not allowed. + ASPECT_RATIO_NOT_ALLOWED = 18; + + // Flash cannot have network objects. + FLASH_HAS_NETWORK_OBJECTS = 19; + + // Flash cannot have network methods. + FLASH_HAS_NETWORK_METHODS = 20; + + // Flash cannot have a Url. + FLASH_HAS_URL = 21; + + // Flash cannot use mouse tracking. + FLASH_HAS_MOUSE_TRACKING = 22; + + // Flash cannot have a random number. + FLASH_HAS_RANDOM_NUM = 23; + + // Ad click target cannot be '_self'. + FLASH_SELF_TARGETS = 24; + + // GetUrl method should only use '_blank'. + FLASH_BAD_GETURL_TARGET = 25; + + // Flash version is not supported. + FLASH_VERSION_NOT_SUPPORTED = 26; + + // Flash movies need to have hard coded click URL or clickTAG + FLASH_WITHOUT_HARD_CODED_CLICK_URL = 27; + + // Uploaded flash file is corrupted. + INVALID_FLASH_FILE = 28; + + // Uploaded flash file can be parsed, but the click tag can not be fixed + // properly. + FAILED_TO_FIX_CLICK_TAG_IN_FLASH = 29; + + // Flash movie accesses network resources + FLASH_ACCESSES_NETWORK_RESOURCES = 30; + + // Flash movie attempts to call external javascript code + FLASH_EXTERNAL_JS_CALL = 31; + + // Flash movie attempts to call flash system commands + FLASH_EXTERNAL_FS_CALL = 32; + + // Image file is too large. + FILE_TOO_LARGE = 33; + + // Image data is too large. + IMAGE_DATA_TOO_LARGE = 34; + + // Error while processing the image. + IMAGE_PROCESSING_ERROR = 35; + + // Image is too small. + IMAGE_TOO_SMALL = 36; + + // Input was invalid. + INVALID_INPUT = 37; + + // There was a problem reading the image file. + PROBLEM_READING_FILE = 38; + + // Image constraints are violated, but details like ASPECT_RATIO_NOT_ALLOWED + // can't be provided. This happens when asset spec contains more than one + // constraint and different criteria of different constraints are violated. + IMAGE_CONSTRAINTS_VIOLATED = 39; + } + + +} diff --git a/google/ads/googleads/v3/errors/internal_error.proto b/google/ads/googleads/v3/errors/internal_error.proto new file mode 100644 index 000000000..79b760108 --- /dev/null +++ b/google/ads/googleads/v3/errors/internal_error.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "InternalErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing internal errors. + +// Container for enum describing possible internal errors. +message InternalErrorEnum { + // Enum describing possible internal errors. + enum InternalError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Google Ads API encountered unexpected internal error. + INTERNAL_ERROR = 2; + + // The intended error code doesn't exist in specified API version. It will + // be released in a future API version. + ERROR_CODE_NOT_PUBLISHED = 3; + + // Google Ads API encountered an unexpected transient error. The user + // should retry their request in these cases. + TRANSIENT_ERROR = 4; + + // The request took longer than a deadline. + DEADLINE_EXCEEDED = 5; + } + + +} diff --git a/google/ads/googleads/v3/errors/invoice_error.proto b/google/ads/googleads/v3/errors/invoice_error.proto new file mode 100644 index 000000000..134843d47 --- /dev/null +++ b/google/ads/googleads/v3/errors/invoice_error.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "InvoiceErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing invoice errors. + +// Container for enum describing possible invoice errors. +message InvoiceErrorEnum { + // Enum describing possible invoice errors. + enum InvoiceError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Cannot request invoices issued before 2019-01-01. + YEAR_MONTH_TOO_OLD = 2; + + // Cannot request invoices for customer who doesn't receive invoices. + NOT_INVOICED_CUSTOMER = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/keyword_plan_ad_group_error.proto b/google/ads/googleads/v3/errors/keyword_plan_ad_group_error.proto new file mode 100644 index 000000000..b7989d04b --- /dev/null +++ b/google/ads/googleads/v3/errors/keyword_plan_ad_group_error.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanAdGroupErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing errors from applying a keyword plan ad group. + +// Container for enum describing possible errors from applying a keyword plan +// ad group. +message KeywordPlanAdGroupErrorEnum { + // Enum describing possible errors from applying a keyword plan ad group. + enum KeywordPlanAdGroupError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The keyword plan ad group name is missing, empty, longer than allowed + // limit or contains invalid chars. + INVALID_NAME = 2; + + // The keyword plan ad group name is duplicate to an existing keyword plan + // AdGroup name or other keyword plan AdGroup name in the request. + DUPLICATE_NAME = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/keyword_plan_campaign_error.proto b/google/ads/googleads/v3/errors/keyword_plan_campaign_error.proto new file mode 100644 index 000000000..4c7e9e0ec --- /dev/null +++ b/google/ads/googleads/v3/errors/keyword_plan_campaign_error.proto @@ -0,0 +1,62 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanCampaignErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing errors from applying a keyword plan campaign. + +// Container for enum describing possible errors from applying a keyword plan +// campaign. +message KeywordPlanCampaignErrorEnum { + // Enum describing possible errors from applying a keyword plan campaign. + enum KeywordPlanCampaignError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // A keyword plan campaign name is missing, empty, longer than allowed limit + // or contains invalid chars. + INVALID_NAME = 2; + + // A keyword plan campaign contains one or more untargetable languages. + INVALID_LANGUAGES = 3; + + // A keyword plan campaign contains one or more invalid geo targets. + INVALID_GEOS = 4; + + // The keyword plan campaign name is duplicate to an existing keyword plan + // campaign name or other keyword plan campaign name in the request. + DUPLICATE_NAME = 5; + + // The number of geo targets in the keyword plan campaign exceeds limits. + MAX_GEOS_EXCEEDED = 6; + } + + +} diff --git a/google/ads/googleads/v3/errors/keyword_plan_error.proto b/google/ads/googleads/v3/errors/keyword_plan_error.proto new file mode 100644 index 000000000..42c6ba91b --- /dev/null +++ b/google/ads/googleads/v3/errors/keyword_plan_error.proto @@ -0,0 +1,91 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing errors from applying keyword plan resources (keyword +// plan, keyword plan campaign, keyword plan ad group or keyword plan keyword) +// or KeywordPlanService RPC. + +// Container for enum describing possible errors from applying a keyword plan +// resource (keyword plan, keyword plan campaign, keyword plan ad group or +// keyword plan keyword) or KeywordPlanService RPC. +message KeywordPlanErrorEnum { + // Enum describing possible errors from applying a keyword plan. + enum KeywordPlanError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The plan's bid multiplier value is outside the valid range. + BID_MULTIPLIER_OUT_OF_RANGE = 2; + + // The plan's bid value is too high. + BID_TOO_HIGH = 3; + + // The plan's bid value is too low. + BID_TOO_LOW = 4; + + // The plan's cpc bid is not a multiple of the minimum billable unit. + BID_TOO_MANY_FRACTIONAL_DIGITS = 5; + + // The plan's daily budget value is too low. + DAILY_BUDGET_TOO_LOW = 6; + + // The plan's daily budget is not a multiple of the minimum billable unit. + DAILY_BUDGET_TOO_MANY_FRACTIONAL_DIGITS = 7; + + // The input has an invalid value. + INVALID_VALUE = 8; + + // The plan has no keyword. + KEYWORD_PLAN_HAS_NO_KEYWORDS = 9; + + // The plan is not enabled and API cannot provide mutation, forecast or + // stats. + KEYWORD_PLAN_NOT_ENABLED = 10; + + // The requested plan cannot be found for providing forecast or stats. + KEYWORD_PLAN_NOT_FOUND = 11; + + // The plan is missing a cpc bid. + MISSING_BID = 13; + + // The plan is missing required forecast_period field. + MISSING_FORECAST_PERIOD = 14; + + // The plan's forecast_period has invalid forecast date range. + INVALID_FORECAST_DATE_RANGE = 15; + + // The plan's name is invalid. + INVALID_NAME = 16; + } + + +} diff --git a/google/ads/googleads/v3/errors/keyword_plan_idea_error.proto b/google/ads/googleads/v3/errors/keyword_plan_idea_error.proto new file mode 100644 index 000000000..fd4eaf45e --- /dev/null +++ b/google/ads/googleads/v3/errors/keyword_plan_idea_error.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanIdeaErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing errors from KeywordPlanIdeaService. + +// Container for enum describing possible errors from KeywordPlanIdeaService. +message KeywordPlanIdeaErrorEnum { + // Enum describing possible errors from KeywordPlanIdeaService. + enum KeywordPlanIdeaError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Error when crawling the input URL. + URL_CRAWL_ERROR = 2; + + // The input has an invalid value. + INVALID_VALUE = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/keyword_plan_keyword_error.proto b/google/ads/googleads/v3/errors/keyword_plan_keyword_error.proto new file mode 100644 index 000000000..bada6547a --- /dev/null +++ b/google/ads/googleads/v3/errors/keyword_plan_keyword_error.proto @@ -0,0 +1,65 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanKeywordErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing errors from applying a keyword plan keyword or keyword +// plan negative keyword. + +// Container for enum describing possible errors from applying a keyword or a +// negative keyword from a keyword plan. +message KeywordPlanKeywordErrorEnum { + // Enum describing possible errors from applying a keyword plan keyword. + enum KeywordPlanKeywordError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // A keyword or negative keyword has invalid match type. + INVALID_KEYWORD_MATCH_TYPE = 2; + + // A keyword or negative keyword with same text and match type already + // exists. + DUPLICATE_KEYWORD = 3; + + // Keyword or negative keyword text exceeds the allowed limit. + KEYWORD_TEXT_TOO_LONG = 4; + + // Keyword or negative keyword text has invalid characters or symbols. + KEYWORD_HAS_INVALID_CHARS = 5; + + // Keyword or negative keyword text has too many words. + KEYWORD_HAS_TOO_MANY_WORDS = 6; + + // Keyword or negative keyword has invalid text. + INVALID_KEYWORD_TEXT = 7; + } + + +} diff --git a/google/ads/googleads/v3/errors/keyword_plan_negative_keyword_error.proto b/google/ads/googleads/v3/errors/keyword_plan_negative_keyword_error.proto new file mode 100644 index 000000000..36a4e5d88 --- /dev/null +++ b/google/ads/googleads/v3/errors/keyword_plan_negative_keyword_error.proto @@ -0,0 +1,46 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanNegativeKeywordErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing errors from applying a keyword plan negative keyword. + +// Container for enum describing possible errors from applying a keyword plan +// negative keyword. +message KeywordPlanNegativeKeywordErrorEnum { + // Enum describing possible errors from applying a keyword plan negative + // keyword. + enum KeywordPlanNegativeKeywordError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + } + + +} diff --git a/google/ads/googleads/v3/errors/label_error.proto b/google/ads/googleads/v3/errors/label_error.proto new file mode 100644 index 000000000..7b048b538 --- /dev/null +++ b/google/ads/googleads/v3/errors/label_error.proto @@ -0,0 +1,73 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "LabelErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing label errors. + +// Container for enum describing possible label errors. +message LabelErrorEnum { + // Enum describing possible label errors. + enum LabelError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // An inactive label cannot be applied. + CANNOT_APPLY_INACTIVE_LABEL = 2; + + // A label cannot be applied to a disabled ad group criterion. + CANNOT_APPLY_LABEL_TO_DISABLED_AD_GROUP_CRITERION = 3; + + // A label cannot be applied to a negative ad group criterion. + CANNOT_APPLY_LABEL_TO_NEGATIVE_AD_GROUP_CRITERION = 4; + + // Cannot apply more than 50 labels per resource. + EXCEEDED_LABEL_LIMIT_PER_TYPE = 5; + + // Labels from a manager account cannot be applied to campaign, ad group, + // ad group ad, or ad group criterion resources. + INVALID_RESOURCE_FOR_MANAGER_LABEL = 6; + + // Label names must be unique. + DUPLICATE_NAME = 7; + + // Label names cannot be empty. + INVALID_LABEL_NAME = 8; + + // Labels cannot be applied to a draft. + CANNOT_ATTACH_LABEL_TO_DRAFT = 9; + + // Labels not from a manager account cannot be applied to the customer + // resource. + CANNOT_ATTACH_NON_MANAGER_LABEL_TO_CUSTOMER = 10; + } + + +} diff --git a/google/ads/googleads/v3/errors/language_code_error.proto b/google/ads/googleads/v3/errors/language_code_error.proto new file mode 100644 index 000000000..c6bc8fd16 --- /dev/null +++ b/google/ads/googleads/v3/errors/language_code_error.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "LanguageCodeErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing language code errors. + +// Container for enum describing language code errors. +message LanguageCodeErrorEnum { + // Enum describing language code errors. + enum LanguageCodeError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The input language code is not recognized. + LANGUAGE_CODE_NOT_FOUND = 2; + + // The language is not allowed to use. + INVALID_LANGUAGE_CODE = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/list_operation_error.proto b/google/ads/googleads/v3/errors/list_operation_error.proto new file mode 100644 index 000000000..9407a0292 --- /dev/null +++ b/google/ads/googleads/v3/errors/list_operation_error.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ListOperationErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing list operation errors. + +// Container for enum describing possible list operation errors. +message ListOperationErrorEnum { + // Enum describing possible list operation errors. + enum ListOperationError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Field required in value is missing. + REQUIRED_FIELD_MISSING = 7; + + // Duplicate or identical value is sent in multiple list operations. + DUPLICATE_VALUES = 8; + } + + +} diff --git a/google/ads/googleads/v3/errors/manager_link_error.proto b/google/ads/googleads/v3/errors/manager_link_error.proto new file mode 100644 index 000000000..09ff2cd0e --- /dev/null +++ b/google/ads/googleads/v3/errors/manager_link_error.proto @@ -0,0 +1,97 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ManagerLinkErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing ManagerLink errors. + +// Container for enum describing possible ManagerLink errors. +message ManagerLinkErrorEnum { + // Enum describing possible ManagerLink errors. + enum ManagerLinkError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The manager and client have incompatible account types. + ACCOUNTS_NOT_COMPATIBLE_FOR_LINKING = 2; + + // Client is already linked to too many managers. + TOO_MANY_MANAGERS = 3; + + // Manager has too many pending invitations. + TOO_MANY_INVITES = 4; + + // Client is already invited by this manager. + ALREADY_INVITED_BY_THIS_MANAGER = 5; + + // The client is already managed by this manager. + ALREADY_MANAGED_BY_THIS_MANAGER = 6; + + // Client is already managed in hierarchy. + ALREADY_MANAGED_IN_HIERARCHY = 7; + + // Manger and sub-manager to be linked have duplicate client. + DUPLICATE_CHILD_FOUND = 8; + + // Client has no active user that can access the client account. + CLIENT_HAS_NO_ADMIN_USER = 9; + + // Adding this link would exceed the maximum hierarchy depth. + MAX_DEPTH_EXCEEDED = 10; + + // Adding this link will create a cycle. + CYCLE_NOT_ALLOWED = 11; + + // Manager account has the maximum number of linked clients. + TOO_MANY_ACCOUNTS = 12; + + // Parent manager account has the maximum number of linked clients. + TOO_MANY_ACCOUNTS_AT_MANAGER = 13; + + // The account is not authorized owner. + NON_OWNER_USER_CANNOT_MODIFY_LINK = 14; + + // Your manager account is suspended, and you are no longer allowed to link + // to clients. + SUSPENDED_ACCOUNT_CANNOT_ADD_CLIENTS = 15; + + // You are not allowed to move a client to a manager that is not under your + // current hierarchy. + CLIENT_OUTSIDE_TREE = 16; + + // The changed status for mutate link is invalid. + INVALID_STATUS_CHANGE = 17; + + // The change for mutate link is invalid. + INVALID_CHANGE = 18; + } + + +} diff --git a/google/ads/googleads/v3/errors/media_bundle_error.proto b/google/ads/googleads/v3/errors/media_bundle_error.proto new file mode 100644 index 000000000..400716509 --- /dev/null +++ b/google/ads/googleads/v3/errors/media_bundle_error.proto @@ -0,0 +1,110 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "MediaBundleErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing media bundle errors. + +// Container for enum describing possible media bundle errors. +message MediaBundleErrorEnum { + // Enum describing possible media bundle errors. + enum MediaBundleError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // There was a problem with the request. + BAD_REQUEST = 3; + + // HTML5 ads using DoubleClick Studio created ZIP files are not supported. + DOUBLECLICK_BUNDLE_NOT_ALLOWED = 4; + + // Cannot reference URL external to the media bundle. + EXTERNAL_URL_NOT_ALLOWED = 5; + + // Media bundle file is too large. + FILE_TOO_LARGE = 6; + + // ZIP file from Google Web Designer is not published. + GOOGLE_WEB_DESIGNER_ZIP_FILE_NOT_PUBLISHED = 7; + + // Input was invalid. + INVALID_INPUT = 8; + + // There was a problem with the media bundle. + INVALID_MEDIA_BUNDLE = 9; + + // There was a problem with one or more of the media bundle entries. + INVALID_MEDIA_BUNDLE_ENTRY = 10; + + // The media bundle contains a file with an unknown mime type + INVALID_MIME_TYPE = 11; + + // The media bundle contain an invalid asset path. + INVALID_PATH = 12; + + // HTML5 ad is trying to reference an asset not in .ZIP file + INVALID_URL_REFERENCE = 13; + + // Media data is too large. + MEDIA_DATA_TOO_LARGE = 14; + + // The media bundle contains no primary entry. + MISSING_PRIMARY_MEDIA_BUNDLE_ENTRY = 15; + + // There was an error on the server. + SERVER_ERROR = 16; + + // The image could not be stored. + STORAGE_ERROR = 17; + + // Media bundle created with the Swiffy tool is not allowed. + SWIFFY_BUNDLE_NOT_ALLOWED = 18; + + // The media bundle contains too many files. + TOO_MANY_FILES = 19; + + // The media bundle is not of legal dimensions. + UNEXPECTED_SIZE = 20; + + // Google Web Designer not created for "Google Ads" environment. + UNSUPPORTED_GOOGLE_WEB_DESIGNER_ENVIRONMENT = 21; + + // Unsupported HTML5 feature in HTML5 asset. + UNSUPPORTED_HTML5_FEATURE = 22; + + // URL in HTML5 entry is not ssl compliant. + URL_IN_MEDIA_BUNDLE_NOT_SSL_COMPLIANT = 23; + + // Custom exits not allowed in HTML5 entry. + CUSTOM_EXIT_NOT_ALLOWED = 24; + } + + +} diff --git a/google/ads/googleads/v3/errors/media_file_error.proto b/google/ads/googleads/v3/errors/media_file_error.proto new file mode 100644 index 000000000..1f6ec768b --- /dev/null +++ b/google/ads/googleads/v3/errors/media_file_error.proto @@ -0,0 +1,113 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "MediaFileErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing media file errors. + +// Container for enum describing possible media file errors. +message MediaFileErrorEnum { + // Enum describing possible media file errors. + enum MediaFileError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Cannot create a standard icon type. + CANNOT_CREATE_STANDARD_ICON = 2; + + // May only select Standard Icons alone. + CANNOT_SELECT_STANDARD_ICON_WITH_OTHER_TYPES = 3; + + // Image contains both a media file ID and data. + CANNOT_SPECIFY_MEDIA_FILE_ID_AND_DATA = 4; + + // A media file with given type and reference ID already exists. + DUPLICATE_MEDIA = 5; + + // A required field was not specified or is an empty string. + EMPTY_FIELD = 6; + + // A media file may only be modified once per call. + RESOURCE_REFERENCED_IN_MULTIPLE_OPS = 7; + + // Field is not supported for the media sub type. + FIELD_NOT_SUPPORTED_FOR_MEDIA_SUB_TYPE = 8; + + // The media file ID is invalid. + INVALID_MEDIA_FILE_ID = 9; + + // The media subtype is invalid. + INVALID_MEDIA_SUB_TYPE = 10; + + // The media file type is invalid. + INVALID_MEDIA_FILE_TYPE = 11; + + // The mimetype is invalid. + INVALID_MIME_TYPE = 12; + + // The media reference ID is invalid. + INVALID_REFERENCE_ID = 13; + + // The YouTube video ID is invalid. + INVALID_YOU_TUBE_ID = 14; + + // Media file has failed transcoding + MEDIA_FILE_FAILED_TRANSCODING = 15; + + // Media file has not been transcoded. + MEDIA_NOT_TRANSCODED = 16; + + // The media type does not match the actual media file's type. + MEDIA_TYPE_DOES_NOT_MATCH_MEDIA_FILE_TYPE = 17; + + // None of the fields have been specified. + NO_FIELDS_SPECIFIED = 18; + + // One of reference ID or media file ID must be specified. + NULL_REFERENCE_ID_AND_MEDIA_ID = 19; + + // The string has too many characters. + TOO_LONG = 20; + + // The specified type is not supported. + UNSUPPORTED_TYPE = 21; + + // YouTube is unavailable for requesting video data. + YOU_TUBE_SERVICE_UNAVAILABLE = 22; + + // The YouTube video has a non positive duration. + YOU_TUBE_VIDEO_HAS_NON_POSITIVE_DURATION = 23; + + // The YouTube video ID is syntactically valid but the video was not found. + YOU_TUBE_VIDEO_NOT_FOUND = 24; + } + + +} diff --git a/google/ads/googleads/v3/errors/media_upload_error.proto b/google/ads/googleads/v3/errors/media_upload_error.proto new file mode 100644 index 000000000..91e16ba95 --- /dev/null +++ b/google/ads/googleads/v3/errors/media_upload_error.proto @@ -0,0 +1,65 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "MediaUploadErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing media uploading errors. + +// Container for enum describing possible media uploading errors. +message MediaUploadErrorEnum { + // Enum describing possible media uploading errors. + enum MediaUploadError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The uploaded file is too big. + FILE_TOO_BIG = 2; + + // Image data is unparseable. + UNPARSEABLE_IMAGE = 3; + + // Animated images are not allowed. + ANIMATED_IMAGE_NOT_ALLOWED = 4; + + // The image or media bundle format is not allowed. + FORMAT_NOT_ALLOWED = 5; + + // Cannot reference URL external to the media bundle. + EXTERNAL_URL_NOT_ALLOWED = 6; + + // HTML5 ad is trying to reference an asset not in .ZIP file. + INVALID_URL_REFERENCE = 7; + + // The media bundle contains no primary entry. + MISSING_PRIMARY_MEDIA_BUNDLE_ENTRY = 8; + } + + +} diff --git a/google/ads/googleads/v3/errors/multiplier_error.proto b/google/ads/googleads/v3/errors/multiplier_error.proto new file mode 100644 index 000000000..e80463b10 --- /dev/null +++ b/google/ads/googleads/v3/errors/multiplier_error.proto @@ -0,0 +1,81 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "MultiplierErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing multiplier errors. + +// Container for enum describing possible multiplier errors. +message MultiplierErrorEnum { + // Enum describing possible multiplier errors. + enum MultiplierError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Multiplier value is too high + MULTIPLIER_TOO_HIGH = 2; + + // Multiplier value is too low + MULTIPLIER_TOO_LOW = 3; + + // Too many fractional digits + TOO_MANY_FRACTIONAL_DIGITS = 4; + + // A multiplier cannot be set for this bidding strategy + MULTIPLIER_NOT_ALLOWED_FOR_BIDDING_STRATEGY = 5; + + // A multiplier cannot be set when there is no base bid (e.g., content max + // cpc) + MULTIPLIER_NOT_ALLOWED_WHEN_BASE_BID_IS_MISSING = 6; + + // A bid multiplier must be specified + NO_MULTIPLIER_SPECIFIED = 7; + + // Multiplier causes bid to exceed daily budget + MULTIPLIER_CAUSES_BID_TO_EXCEED_DAILY_BUDGET = 8; + + // Multiplier causes bid to exceed monthly budget + MULTIPLIER_CAUSES_BID_TO_EXCEED_MONTHLY_BUDGET = 9; + + // Multiplier causes bid to exceed custom budget + MULTIPLIER_CAUSES_BID_TO_EXCEED_CUSTOM_BUDGET = 10; + + // Multiplier causes bid to exceed maximum allowed bid + MULTIPLIER_CAUSES_BID_TO_EXCEED_MAX_ALLOWED_BID = 11; + + // Multiplier causes bid to become less than the minimum bid allowed + BID_LESS_THAN_MIN_ALLOWED_BID_WITH_MULTIPLIER = 12; + + // Multiplier type (cpc vs. cpm) needs to match campaign's bidding strategy + MULTIPLIER_AND_BIDDING_STRATEGY_TYPE_MISMATCH = 13; + } + + +} diff --git a/google/ads/googleads/v3/errors/mutate_error.proto b/google/ads/googleads/v3/errors/mutate_error.proto new file mode 100644 index 000000000..e81ef5f30 --- /dev/null +++ b/google/ads/googleads/v3/errors/mutate_error.proto @@ -0,0 +1,69 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "MutateErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing mutate errors. + +// Container for enum describing possible mutate errors. +message MutateErrorEnum { + // Enum describing possible mutate errors. + enum MutateError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Requested resource was not found. + RESOURCE_NOT_FOUND = 3; + + // Cannot mutate the same resource twice in one request. + ID_EXISTS_IN_MULTIPLE_MUTATES = 7; + + // The field's contents don't match another field that represents the same + // data. + INCONSISTENT_FIELD_VALUES = 8; + + // Mutates are not allowed for the requested resource. + MUTATE_NOT_ALLOWED = 9; + + // The resource isn't in Google Ads. It belongs to another ads system. + RESOURCE_NOT_IN_GOOGLE_ADS = 10; + + // The resource being created already exists. + RESOURCE_ALREADY_EXISTS = 11; + + // This resource cannot be used with "validate_only". + RESOURCE_DOES_NOT_SUPPORT_VALIDATE_ONLY = 12; + + // Attempt to write to read-only fields. + RESOURCE_READ_ONLY = 13; + } + + +} diff --git a/google/ads/googleads/v3/errors/mutate_job_error.proto b/google/ads/googleads/v3/errors/mutate_job_error.proto new file mode 100644 index 000000000..e1fac000a --- /dev/null +++ b/google/ads/googleads/v3/errors/mutate_job_error.proto @@ -0,0 +1,60 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "MutateJobErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing mutate job errors. + +// Container for enum describing possible mutate job errors. +message MutateJobErrorEnum { + // Enum describing possible request errors. + enum MutateJobError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The mutate job cannot add more operations or run after it has started + // running. + CANNOT_MODIFY_JOB_AFTER_JOB_STARTS_RUNNING = 2; + + // The operations for an AddMutateJobOperations request were empty. + EMPTY_OPERATIONS = 3; + + // The sequence token for an AddMutateJobOperations request was invalid. + INVALID_SEQUENCE_TOKEN = 4; + + // Mutate Job Results can only be retrieved once the job is finished. + RESULTS_NOT_READY = 5; + + // The page size for ListMutateJobResults was invalid. + INVALID_PAGE_SIZE = 6; + } + + +} diff --git a/google/ads/googleads/v3/errors/new_resource_creation_error.proto b/google/ads/googleads/v3/errors/new_resource_creation_error.proto new file mode 100644 index 000000000..0b2b398ce --- /dev/null +++ b/google/ads/googleads/v3/errors/new_resource_creation_error.proto @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "NewResourceCreationErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing new resource creation errors. + +// Container for enum describing possible new resource creation errors. +message NewResourceCreationErrorEnum { + // Enum describing possible new resource creation errors. + enum NewResourceCreationError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Do not set the id field while creating new resources. + CANNOT_SET_ID_FOR_CREATE = 2; + + // Creating more than one resource with the same temp ID is not allowed. + DUPLICATE_TEMP_IDS = 3; + + // Parent resource with specified temp ID failed validation, so no + // validation will be done for this child resource. + TEMP_ID_RESOURCE_HAD_ERRORS = 4; + } + + +} diff --git a/google/ads/googleads/v3/errors/not_empty_error.proto b/google/ads/googleads/v3/errors/not_empty_error.proto new file mode 100644 index 000000000..ca04a45d5 --- /dev/null +++ b/google/ads/googleads/v3/errors/not_empty_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "NotEmptyErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing not empty errors. + +// Container for enum describing possible not empty errors. +message NotEmptyErrorEnum { + // Enum describing possible not empty errors. + enum NotEmptyError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Empty list. + EMPTY_LIST = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/not_whitelisted_error.proto b/google/ads/googleads/v3/errors/not_whitelisted_error.proto new file mode 100644 index 000000000..385715bb8 --- /dev/null +++ b/google/ads/googleads/v3/errors/not_whitelisted_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "NotWhitelistedErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing not whitelisted errors. + +// Container for enum describing possible not whitelisted errors. +message NotWhitelistedErrorEnum { + // Enum describing possible not whitelisted errors. + enum NotWhitelistedError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Customer is not whitelisted for accessing this feature. + CUSTOMER_NOT_WHITELISTED_FOR_THIS_FEATURE = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/null_error.proto b/google/ads/googleads/v3/errors/null_error.proto new file mode 100644 index 000000000..eb35b2484 --- /dev/null +++ b/google/ads/googleads/v3/errors/null_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "NullErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing null errors. + +// Container for enum describing possible null errors. +message NullErrorEnum { + // Enum describing possible null errors. + enum NullError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Specified list/container must not contain any null elements + NULL_CONTENT = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/offline_user_data_job_error.proto b/google/ads/googleads/v3/errors/offline_user_data_job_error.proto new file mode 100644 index 000000000..5e53058b6 --- /dev/null +++ b/google/ads/googleads/v3/errors/offline_user_data_job_error.proto @@ -0,0 +1,117 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "OfflineUserDataJobErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing offline user data job errors. + +// Container for enum describing possible offline user data job errors. +message OfflineUserDataJobErrorEnum { + // Enum describing possible request errors. + enum OfflineUserDataJobError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The user list ID provided for the job is invalid. + INVALID_USER_LIST_ID = 3; + + // Type of the user list is not applicable for the job. + INVALID_USER_LIST_TYPE = 4; + + // Customer is not whitelisted for using user ID in upload data. + NOT_WHITELISTED_FOR_USER_ID = 5; + + // Upload data is not compatible with the upload key type of the associated + // user list. + INCOMPATIBLE_UPLOAD_KEY_TYPE = 6; + + // The user identifier is missing valid data. + MISSING_USER_IDENTIFIER = 7; + + // The mobile ID is malformed. + INVALID_MOBILE_ID_FORMAT = 8; + + // Request is exceeding the maximum number of user identifiers allowed. + TOO_MANY_USER_IDENTIFIERS = 9; + + // Customer is not whitelisted for store sales direct data. + NOT_WHITELISTED_FOR_STORE_SALES_DIRECT = 10; + + // The partner ID in store sales direct metadata is invalid. + INVALID_PARTNER_ID = 11; + + // The data in user identifier should not be encoded. + INVALID_ENCODING = 12; + + // The country code is invalid. + INVALID_COUNTRY_CODE = 13; + + // Incompatible user identifier when using third_party_user_id for store + // sales direct first party data or not using third_party_user_id for store + // sales third party data. + INCOMPATIBLE_USER_IDENTIFIER = 14; + + // A transaction time in the future is not allowed. + FUTURE_TRANSACTION_TIME = 15; + + // The conversion_action specified in transaction_attributes is used to + // report conversions to a conversion action configured in Google Ads. This + // error indicates there is no such conversion action in the account. + INVALID_CONVERSION_ACTION = 16; + + // Mobile ID is not supported for store sales direct data. + MOBILE_ID_NOT_SUPPORTED = 17; + + // When a remove-all operation is provided, it has to be the first operation + // of the operation list. + INVALID_OPERATION_ORDER = 18; + + // Mixing creation and removal of offline data in the same job is not + // allowed. + CONFLICTING_OPERATION = 19; + + // The external update ID already exists. + EXTERNAL_UPDATE_ID_ALREADY_EXISTS = 21; + + // Once the upload job is started, new operations cannot be added. + JOB_ALREADY_STARTED = 22; + + // Remove operation is not allowed for store sales direct updates. + REMOVE_NOT_SUPPORTED = 23; + + // Remove-all is not supported for store sales direct updates. + REMOVE_ALL_NOT_SUPPORTED = 24; + + // The SHA256 encoded value is malformed. + INVALID_SHA256_FORMAT = 25; + } + + +} diff --git a/google/ads/googleads/v3/errors/operation_access_denied_error.proto b/google/ads/googleads/v3/errors/operation_access_denied_error.proto new file mode 100644 index 000000000..a53e5397b --- /dev/null +++ b/google/ads/googleads/v3/errors/operation_access_denied_error.proto @@ -0,0 +1,74 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "OperationAccessDeniedErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing operation access denied errors. + +// Container for enum describing possible operation access denied errors. +message OperationAccessDeniedErrorEnum { + // Enum describing possible operation access denied errors. + enum OperationAccessDeniedError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Unauthorized invocation of a service's method (get, mutate, etc.) + ACTION_NOT_PERMITTED = 2; + + // Unauthorized CREATE operation in invoking a service's mutate method. + CREATE_OPERATION_NOT_PERMITTED = 3; + + // Unauthorized REMOVE operation in invoking a service's mutate method. + REMOVE_OPERATION_NOT_PERMITTED = 4; + + // Unauthorized UPDATE operation in invoking a service's mutate method. + UPDATE_OPERATION_NOT_PERMITTED = 5; + + // A mutate action is not allowed on this campaign, from this client. + MUTATE_ACTION_NOT_PERMITTED_FOR_CLIENT = 6; + + // This operation is not permitted on this campaign type + OPERATION_NOT_PERMITTED_FOR_CAMPAIGN_TYPE = 7; + + // A CREATE operation may not set status to REMOVED. + CREATE_AS_REMOVED_NOT_PERMITTED = 8; + + // This operation is not allowed because the campaign or adgroup is removed. + OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE = 9; + + // This operation is not permitted on this ad group type. + OPERATION_NOT_PERMITTED_FOR_AD_GROUP_TYPE = 10; + + // The mutate is not allowed for this customer. + MUTATE_NOT_PERMITTED_FOR_CUSTOMER = 11; + } + + +} diff --git a/google/ads/googleads/v3/errors/operator_error.proto b/google/ads/googleads/v3/errors/operator_error.proto new file mode 100644 index 000000000..76e157ee1 --- /dev/null +++ b/google/ads/googleads/v3/errors/operator_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "OperatorErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing operator errors. + +// Container for enum describing possible operator errors. +message OperatorErrorEnum { + // Enum describing possible operator errors. + enum OperatorError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Operator not supported. + OPERATOR_NOT_SUPPORTED = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/partial_failure_error.proto b/google/ads/googleads/v3/errors/partial_failure_error.proto new file mode 100644 index 000000000..6fabcec85 --- /dev/null +++ b/google/ads/googleads/v3/errors/partial_failure_error.proto @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "PartialFailureErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing partial failure errors. + +// Container for enum describing possible partial failure errors. +message PartialFailureErrorEnum { + // Enum describing possible partial failure errors. + enum PartialFailureError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The partial failure field was false in the request. + // This method requires this field be set to true. + PARTIAL_FAILURE_MODE_REQUIRED = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/payments_account_error.proto b/google/ads/googleads/v3/errors/payments_account_error.proto new file mode 100644 index 000000000..9f8dc527b --- /dev/null +++ b/google/ads/googleads/v3/errors/payments_account_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "PaymentsAccountErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing payments account service errors. + +// Container for enum describing possible errors in payments account service. +message PaymentsAccountErrorEnum { + // Enum describing possible errors in payments account service. + enum PaymentsAccountError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Manager customers are not supported for payments account service. + NOT_SUPPORTED_FOR_MANAGER_CUSTOMER = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/policy_finding_error.proto b/google/ads/googleads/v3/errors/policy_finding_error.proto new file mode 100644 index 000000000..eb5f508d2 --- /dev/null +++ b/google/ads/googleads/v3/errors/policy_finding_error.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "PolicyFindingErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing policy finding errors. + +// Container for enum describing possible policy finding errors. +message PolicyFindingErrorEnum { + // Enum describing possible policy finding errors. + enum PolicyFindingError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The resource has been disapproved since the policy summary includes + // policy topics of type PROHIBITED. + POLICY_FINDING = 2; + + // The given policy topic does not exist. + POLICY_TOPIC_NOT_FOUND = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/policy_validation_parameter_error.proto b/google/ads/googleads/v3/errors/policy_validation_parameter_error.proto new file mode 100644 index 000000000..0c61af74f --- /dev/null +++ b/google/ads/googleads/v3/errors/policy_validation_parameter_error.proto @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "PolicyValidationParameterErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing policy validation parameter errors. + +// Container for enum describing possible policy validation parameter errors. +message PolicyValidationParameterErrorEnum { + // Enum describing possible policy validation parameter errors. + enum PolicyValidationParameterError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Ignorable policy topics are not supported for the ad type. + UNSUPPORTED_AD_TYPE_FOR_IGNORABLE_POLICY_TOPICS = 2; + + // Exempt policy violation keys are not supported for the ad type. + UNSUPPORTED_AD_TYPE_FOR_EXEMPT_POLICY_VIOLATION_KEYS = 3; + + // Cannot set ignorable policy topics and exempt policy violation keys in + // the same policy violation parameter. + CANNOT_SET_BOTH_IGNORABLE_POLICY_TOPICS_AND_EXEMPT_POLICY_VIOLATION_KEYS = 4; + } + + +} diff --git a/google/ads/googleads/v3/errors/policy_violation_error.proto b/google/ads/googleads/v3/errors/policy_violation_error.proto new file mode 100644 index 000000000..f38ab67ba --- /dev/null +++ b/google/ads/googleads/v3/errors/policy_violation_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "PolicyViolationErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing policy violation errors. + +// Container for enum describing possible policy violation errors. +message PolicyViolationErrorEnum { + // Enum describing possible policy violation errors. + enum PolicyViolationError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // A policy was violated. See PolicyViolationDetails for more detail. + POLICY_ERROR = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/query_error.proto b/google/ads/googleads/v3/errors/query_error.proto new file mode 100644 index 000000000..c7c176e77 --- /dev/null +++ b/google/ads/googleads/v3/errors/query_error.proto @@ -0,0 +1,218 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "QueryErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing query errors. + +// Container for enum describing possible query errors. +message QueryErrorEnum { + // Enum describing possible query errors. + enum QueryError { + // Name unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Returned if all other query error reasons are not applicable. + QUERY_ERROR = 50; + + // A condition used in the query references an invalid enum constant. + BAD_ENUM_CONSTANT = 18; + + // Query contains an invalid escape sequence. + BAD_ESCAPE_SEQUENCE = 7; + + // Field name is invalid. + BAD_FIELD_NAME = 12; + + // Limit value is invalid (i.e. not a number) + BAD_LIMIT_VALUE = 15; + + // Encountered number can not be parsed. + BAD_NUMBER = 5; + + // Invalid operator encountered. + BAD_OPERATOR = 3; + + // Parameter unknown or not supported. + BAD_PARAMETER_NAME = 61; + + // Parameter have invalid value. + BAD_PARAMETER_VALUE = 62; + + // Invalid resource type was specified in the FROM clause. + BAD_RESOURCE_TYPE_IN_FROM_CLAUSE = 45; + + // Non-ASCII symbol encountered outside of strings. + BAD_SYMBOL = 2; + + // Value is invalid. + BAD_VALUE = 4; + + // Date filters fail to restrict date to a range smaller than 31 days. + // Applicable if the query is segmented by date. + DATE_RANGE_TOO_WIDE = 36; + + // Filters on date/week/month/quarter have a start date after + // end date. + DATE_RANGE_TOO_NARROW = 60; + + // Expected AND between values with BETWEEN operator. + EXPECTED_AND = 30; + + // Expecting ORDER BY to have BY. + EXPECTED_BY = 14; + + // There was no dimension field selected. + EXPECTED_DIMENSION_FIELD_IN_SELECT_CLAUSE = 37; + + // Missing filters on date related fields. + EXPECTED_FILTERS_ON_DATE_RANGE = 55; + + // Missing FROM clause. + EXPECTED_FROM = 44; + + // The operator used in the conditions requires the value to be a list. + EXPECTED_LIST = 41; + + // Fields used in WHERE or ORDER BY clauses are missing from the SELECT + // clause. + EXPECTED_REFERENCED_FIELD_IN_SELECT_CLAUSE = 16; + + // SELECT is missing at the beginning of query. + EXPECTED_SELECT = 13; + + // A list was passed as a value to a condition whose operator expects a + // single value. + EXPECTED_SINGLE_VALUE = 42; + + // Missing one or both values with BETWEEN operator. + EXPECTED_VALUE_WITH_BETWEEN_OPERATOR = 29; + + // Invalid date format. Expected 'YYYY-MM-DD'. + INVALID_DATE_FORMAT = 38; + + // Value passed was not a string when it should have been. I.e., it was a + // number or unquoted literal. + INVALID_STRING_VALUE = 57; + + // A String value passed to the BETWEEN operator does not parse as a date. + INVALID_VALUE_WITH_BETWEEN_OPERATOR = 26; + + // The value passed to the DURING operator is not a Date range literal + INVALID_VALUE_WITH_DURING_OPERATOR = 22; + + // A non-string value was passed to the LIKE operator. + INVALID_VALUE_WITH_LIKE_OPERATOR = 56; + + // An operator was provided that is inapplicable to the field being + // filtered. + OPERATOR_FIELD_MISMATCH = 35; + + // A Condition was found with an empty list. + PROHIBITED_EMPTY_LIST_IN_CONDITION = 28; + + // A condition used in the query references an unsupported enum constant. + PROHIBITED_ENUM_CONSTANT = 54; + + // Fields that are not allowed to be selected together were included in + // the SELECT clause. + PROHIBITED_FIELD_COMBINATION_IN_SELECT_CLAUSE = 31; + + // A field that is not orderable was included in the ORDER BY clause. + PROHIBITED_FIELD_IN_ORDER_BY_CLAUSE = 40; + + // A field that is not selectable was included in the SELECT clause. + PROHIBITED_FIELD_IN_SELECT_CLAUSE = 23; + + // A field that is not filterable was included in the WHERE clause. + PROHIBITED_FIELD_IN_WHERE_CLAUSE = 24; + + // Resource type specified in the FROM clause is not supported by this + // service. + PROHIBITED_RESOURCE_TYPE_IN_FROM_CLAUSE = 43; + + // A field that comes from an incompatible resource was included in the + // SELECT clause. + PROHIBITED_RESOURCE_TYPE_IN_SELECT_CLAUSE = 48; + + // A field that comes from an incompatible resource was included in the + // WHERE clause. + PROHIBITED_RESOURCE_TYPE_IN_WHERE_CLAUSE = 58; + + // A metric incompatible with the main resource or other selected + // segmenting resources was included in the SELECT or WHERE clause. + PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE = 49; + + // A segment incompatible with the main resource or other selected + // segmenting resources was included in the SELECT or WHERE clause. + PROHIBITED_SEGMENT_IN_SELECT_OR_WHERE_CLAUSE = 51; + + // A segment in the SELECT clause is incompatible with a metric in the + // SELECT or WHERE clause. + PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE = 53; + + // The value passed to the limit clause is too low. + LIMIT_VALUE_TOO_LOW = 25; + + // Query has a string containing a newline character. + PROHIBITED_NEWLINE_IN_STRING = 8; + + // List contains values of different types. + PROHIBITED_VALUE_COMBINATION_IN_LIST = 10; + + // The values passed to the BETWEEN operator are not of the same type. + PROHIBITED_VALUE_COMBINATION_WITH_BETWEEN_OPERATOR = 21; + + // Query contains unterminated string. + STRING_NOT_TERMINATED = 6; + + // Too many segments are specified in SELECT clause. + TOO_MANY_SEGMENTS = 34; + + // Query is incomplete and cannot be parsed. + UNEXPECTED_END_OF_QUERY = 9; + + // FROM clause cannot be specified in this query. + UNEXPECTED_FROM_CLAUSE = 47; + + // Query contains one or more unrecognized fields. + UNRECOGNIZED_FIELD = 32; + + // Query has an unexpected extra part. + UNEXPECTED_INPUT = 11; + + // Metrics cannot be requested for a manager account. To retrieve metrics, + // issue separate requests against each client account under the manager + // account. + REQUESTED_METRICS_FOR_MANAGER = 59; + } + + +} diff --git a/google/ads/googleads/v3/errors/quota_error.proto b/google/ads/googleads/v3/errors/quota_error.proto new file mode 100644 index 000000000..a0c6e9069 --- /dev/null +++ b/google/ads/googleads/v3/errors/quota_error.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "QuotaErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing quota errors. + +// Container for enum describing possible quota errors. +message QuotaErrorEnum { + // Enum describing possible quota errors. + enum QuotaError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Too many requests. + RESOURCE_EXHAUSTED = 2; + + // Access is prohibited. + ACCESS_PROHIBITED = 3; + + // Too many requests in a short amount of time. + RESOURCE_TEMPORARILY_EXHAUSTED = 4; + } + + +} diff --git a/google/ads/googleads/v3/errors/range_error.proto b/google/ads/googleads/v3/errors/range_error.proto new file mode 100644 index 000000000..f7ae95680 --- /dev/null +++ b/google/ads/googleads/v3/errors/range_error.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "RangeErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing range errors. + +// Container for enum describing possible range errors. +message RangeErrorEnum { + // Enum describing possible range errors. + enum RangeError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Too low. + TOO_LOW = 2; + + // Too high. + TOO_HIGH = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/reach_plan_error.proto b/google/ads/googleads/v3/errors/reach_plan_error.proto new file mode 100644 index 000000000..8f22c40f1 --- /dev/null +++ b/google/ads/googleads/v3/errors/reach_plan_error.proto @@ -0,0 +1,45 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ReachPlanErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing errors generated from ReachPlanService. + +// Container for enum describing possible errors returned from +// the ReachPlanService. +message ReachPlanErrorEnum { + // Enum describing possible errors from ReachPlanService. + enum ReachPlanError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + } + + +} diff --git a/google/ads/googleads/v3/errors/recommendation_error.proto b/google/ads/googleads/v3/errors/recommendation_error.proto new file mode 100644 index 000000000..5dd203ba1 --- /dev/null +++ b/google/ads/googleads/v3/errors/recommendation_error.proto @@ -0,0 +1,90 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "RecommendationErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing errors from applying a recommendation. + +// Container for enum describing possible errors from applying a recommendation. +message RecommendationErrorEnum { + // Enum describing possible errors from applying a recommendation. + enum RecommendationError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The specified budget amount is too low e.g. lower than minimum currency + // unit or lower than ad group minimum cost-per-click. + BUDGET_AMOUNT_TOO_SMALL = 2; + + // The specified budget amount is too large. + BUDGET_AMOUNT_TOO_LARGE = 3; + + // The specified budget amount is not a valid amount. e.g. not a multiple + // of minimum currency unit. + INVALID_BUDGET_AMOUNT = 4; + + // The specified keyword or ad violates ad policy. + POLICY_ERROR = 5; + + // The specified bid amount is not valid. e.g. too many fractional digits, + // or negative amount. + INVALID_BID_AMOUNT = 6; + + // The number of keywords in ad group have reached the maximum allowed. + ADGROUP_KEYWORD_LIMIT = 7; + + // The recommendation requested to apply has already been applied. + RECOMMENDATION_ALREADY_APPLIED = 8; + + // The recommendation requested to apply has been invalidated. + RECOMMENDATION_INVALIDATED = 9; + + // The number of operations in a single request exceeds the maximum allowed. + TOO_MANY_OPERATIONS = 10; + + // There are no operations in the request. + NO_OPERATIONS = 11; + + // Operations with multiple recommendation types are not supported when + // partial failure mode is not enabled. + DIFFERENT_TYPES_NOT_SUPPORTED = 12; + + // Request contains multiple operations with the same resource_name. + DUPLICATE_RESOURCE_NAME = 13; + + // The recommendation requested to dismiss has already been dismissed. + RECOMMENDATION_ALREADY_DISMISSED = 14; + + // The recommendation apply request was malformed and invalid. + INVALID_APPLY_REQUEST = 15; + } + + +} diff --git a/google/ads/googleads/v3/errors/region_code_error.proto b/google/ads/googleads/v3/errors/region_code_error.proto new file mode 100644 index 000000000..c6d11856f --- /dev/null +++ b/google/ads/googleads/v3/errors/region_code_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "RegionCodeErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing region code errors. + +// Container for enum describing possible region code errors. +message RegionCodeErrorEnum { + // Enum describing possible region code errors. + enum RegionCodeError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Invalid region code. + INVALID_REGION_CODE = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/request_error.proto b/google/ads/googleads/v3/errors/request_error.proto new file mode 100644 index 000000000..9df0d207a --- /dev/null +++ b/google/ads/googleads/v3/errors/request_error.proto @@ -0,0 +1,116 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "RequestErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing request errors. + +// Container for enum describing possible request errors. +message RequestErrorEnum { + // Enum describing possible request errors. + enum RequestError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Resource name is required for this request. + RESOURCE_NAME_MISSING = 3; + + // Resource name provided is malformed. + RESOURCE_NAME_MALFORMED = 4; + + // Resource name provided is malformed. + BAD_RESOURCE_ID = 17; + + // Customer ID is invalid. + INVALID_CUSTOMER_ID = 16; + + // Mutate operation should have either create, update, or remove specified. + OPERATION_REQUIRED = 5; + + // Requested resource not found. + RESOURCE_NOT_FOUND = 6; + + // Next page token specified in user request is invalid. + INVALID_PAGE_TOKEN = 7; + + // Next page token specified in user request has expired. + EXPIRED_PAGE_TOKEN = 8; + + // Page size specified in user request is invalid. + INVALID_PAGE_SIZE = 22; + + // Required field is missing. + REQUIRED_FIELD_MISSING = 9; + + // The field cannot be modified because it's immutable. It's also possible + // that the field can be modified using 'create' operation but not 'update'. + IMMUTABLE_FIELD = 11; + + // Received too many entries in request. + TOO_MANY_MUTATE_OPERATIONS = 13; + + // Request cannot be executed by a manager account. + CANNOT_BE_EXECUTED_BY_MANAGER_ACCOUNT = 14; + + // Mutate request was attempting to modify a readonly field. + // For instance, Budget fields can be requested for Ad Group, + // but are read-only for adGroups:mutate. + CANNOT_MODIFY_FOREIGN_FIELD = 15; + + // Enum value is not permitted. + INVALID_ENUM_VALUE = 18; + + // The developer-token parameter is required for all requests. + DEVELOPER_TOKEN_PARAMETER_MISSING = 19; + + // The login-customer-id parameter is required for this request. + LOGIN_CUSTOMER_ID_PARAMETER_MISSING = 20; + + // page_token is set in the validate only request + VALIDATE_ONLY_REQUEST_HAS_PAGE_TOKEN = 21; + + // return_summary_row cannot be enabled if request did not select any + // metrics field. + CANNOT_RETURN_SUMMARY_ROW_FOR_REQUEST_WITHOUT_METRICS = 29; + + // return_summary_row should not be enabled for validate only requests. + CANNOT_RETURN_SUMMARY_ROW_FOR_VALIDATE_ONLY_REQUESTS = 30; + + // return_summary_row parameter value should be the same between requests + // with page_token field set and their original request. + INCONSISTENT_RETURN_SUMMARY_ROW_VALUE = 31; + + // The total results count cannot be returned if it was not requested in the + // original request. + TOTAL_RESULTS_COUNT_NOT_ORIGINALLY_REQUESTED = 32; + } + + +} diff --git a/google/ads/googleads/v3/errors/resource_access_denied_error.proto b/google/ads/googleads/v3/errors/resource_access_denied_error.proto new file mode 100644 index 000000000..9ec2aed30 --- /dev/null +++ b/google/ads/googleads/v3/errors/resource_access_denied_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ResourceAccessDeniedErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing resource access denied errors. + +// Container for enum describing possible resource access denied errors. +message ResourceAccessDeniedErrorEnum { + // Enum describing possible resource access denied errors. + enum ResourceAccessDeniedError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // User did not have write access. + WRITE_ACCESS_DENIED = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/resource_count_limit_exceeded_error.proto b/google/ads/googleads/v3/errors/resource_count_limit_exceeded_error.proto new file mode 100644 index 000000000..de749c727 --- /dev/null +++ b/google/ads/googleads/v3/errors/resource_count_limit_exceeded_error.proto @@ -0,0 +1,93 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ResourceCountLimitExceededErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing resource count limit exceeded errors. + +// Container for enum describing possible resource count limit exceeded errors. +message ResourceCountLimitExceededErrorEnum { + // Enum describing possible resource count limit exceeded errors. + enum ResourceCountLimitExceededError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Indicates that this request would exceed the number of allowed resources + // for the Google Ads account. The exact resource type and limit being + // checked can be inferred from accountLimitType. + ACCOUNT_LIMIT = 2; + + // Indicates that this request would exceed the number of allowed resources + // in a Campaign. The exact resource type and limit being checked can be + // inferred from accountLimitType, and the numeric id of the + // Campaign involved is given by enclosingId. + CAMPAIGN_LIMIT = 3; + + // Indicates that this request would exceed the number of allowed resources + // in an ad group. The exact resource type and limit being checked can be + // inferred from accountLimitType, and the numeric id of the + // ad group involved is given by enclosingId. + ADGROUP_LIMIT = 4; + + // Indicates that this request would exceed the number of allowed resources + // in an ad group ad. The exact resource type and limit being checked can + // be inferred from accountLimitType, and the enclosingId + // contains the ad group id followed by the ad id, separated by a single + // comma (,). + AD_GROUP_AD_LIMIT = 5; + + // Indicates that this request would exceed the number of allowed resources + // in an ad group criterion. The exact resource type and limit being checked + // can be inferred from accountLimitType, and the + // enclosingId contains the ad group id followed by the + // criterion id, separated by a single comma (,). + AD_GROUP_CRITERION_LIMIT = 6; + + // Indicates that this request would exceed the number of allowed resources + // in this shared set. The exact resource type and limit being checked can + // be inferred from accountLimitType, and the numeric id of the + // shared set involved is given by enclosingId. + SHARED_SET_LIMIT = 7; + + // Exceeds a limit related to a matching function. + MATCHING_FUNCTION_LIMIT = 8; + + // The response for this request would exceed the maximum number of rows + // that can be returned. + RESPONSE_ROW_LIMIT_EXCEEDED = 9; + + // This request would exceed a limit on the number of allowed resources. + // The details of which type of limit was exceeded will eventually be + // returned in ErrorDetails. + RESOURCE_LIMIT = 10; + } + + +} diff --git a/google/ads/googleads/v3/errors/setting_error.proto b/google/ads/googleads/v3/errors/setting_error.proto new file mode 100644 index 000000000..b3fb0e035 --- /dev/null +++ b/google/ads/googleads/v3/errors/setting_error.proto @@ -0,0 +1,82 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "SettingErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing setting errors. + +// Container for enum describing possible setting errors. +message SettingErrorEnum { + // Enum describing possible setting errors. + enum SettingError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The campaign setting is not available for this Google Ads account. + SETTING_TYPE_IS_NOT_AVAILABLE = 3; + + // The setting is not compatible with the campaign. + SETTING_TYPE_IS_NOT_COMPATIBLE_WITH_CAMPAIGN = 4; + + // The supplied TargetingSetting contains an invalid CriterionTypeGroup. See + // CriterionTypeGroup documentation for CriterionTypeGroups allowed + // in Campaign or AdGroup TargetingSettings. + TARGETING_SETTING_CONTAINS_INVALID_CRITERION_TYPE_GROUP = 5; + + // TargetingSetting must not explicitly + // set any of the Demographic CriterionTypeGroups (AGE_RANGE, GENDER, + // PARENT, INCOME_RANGE) to false (it's okay to not set them at all, in + // which case the system will set them to true automatically). + TARGETING_SETTING_DEMOGRAPHIC_CRITERION_TYPE_GROUPS_MUST_BE_SET_TO_TARGET_ALL = 6; + + // TargetingSetting cannot change any of + // the Demographic CriterionTypeGroups (AGE_RANGE, GENDER, PARENT, + // INCOME_RANGE) from true to false. + TARGETING_SETTING_CANNOT_CHANGE_TARGET_ALL_TO_FALSE_FOR_DEMOGRAPHIC_CRITERION_TYPE_GROUP = 7; + + // At least one feed id should be present. + DYNAMIC_SEARCH_ADS_SETTING_AT_LEAST_ONE_FEED_ID_MUST_BE_PRESENT = 8; + + // The supplied DynamicSearchAdsSetting contains an invalid domain name. + DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_DOMAIN_NAME = 9; + + // The supplied DynamicSearchAdsSetting contains a subdomain name. + DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_SUBDOMAIN_NAME = 10; + + // The supplied DynamicSearchAdsSetting contains an invalid language code. + DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_LANGUAGE_CODE = 11; + + // TargetingSettings in search campaigns should not have + // CriterionTypeGroup.PLACEMENT set to targetAll. + TARGET_ALL_IS_NOT_ALLOWED_FOR_PLACEMENT_IN_SEARCH_CAMPAIGN = 12; + } + + +} diff --git a/google/ads/googleads/v3/errors/shared_criterion_error.proto b/google/ads/googleads/v3/errors/shared_criterion_error.proto new file mode 100644 index 000000000..9a3600030 --- /dev/null +++ b/google/ads/googleads/v3/errors/shared_criterion_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "SharedCriterionErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing shared criterion errors. + +// Container for enum describing possible shared criterion errors. +message SharedCriterionErrorEnum { + // Enum describing possible shared criterion errors. + enum SharedCriterionError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The criterion is not appropriate for the shared set type. + CRITERION_TYPE_NOT_ALLOWED_FOR_SHARED_SET_TYPE = 2; + } + + +} diff --git a/google/ads/googleads/v3/errors/shared_set_error.proto b/google/ads/googleads/v3/errors/shared_set_error.proto new file mode 100644 index 000000000..b4627fca7 --- /dev/null +++ b/google/ads/googleads/v3/errors/shared_set_error.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "SharedSetErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing shared set errors. + +// Container for enum describing possible shared set errors. +message SharedSetErrorEnum { + // Enum describing possible shared set errors. + enum SharedSetError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The customer cannot create this type of shared set. + CUSTOMER_CANNOT_CREATE_SHARED_SET_OF_THIS_TYPE = 2; + + // A shared set with this name already exists. + DUPLICATE_NAME = 3; + + // Removed shared sets cannot be mutated. + SHARED_SET_REMOVED = 4; + + // The shared set cannot be removed because it is in use. + SHARED_SET_IN_USE = 5; + } + + +} diff --git a/google/ads/googleads/v3/errors/size_limit_error.proto b/google/ads/googleads/v3/errors/size_limit_error.proto new file mode 100644 index 000000000..d935fc573 --- /dev/null +++ b/google/ads/googleads/v3/errors/size_limit_error.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "SizeLimitErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing size limit errors. + +// Container for enum describing possible size limit errors. +message SizeLimitErrorEnum { + // Enum describing possible size limit errors. + enum SizeLimitError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The number of entries in the request exceeds the system limit. + REQUEST_SIZE_LIMIT_EXCEEDED = 2; + + // The number of entries in the response exceeds the system limit. + RESPONSE_SIZE_LIMIT_EXCEEDED = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/string_format_error.proto b/google/ads/googleads/v3/errors/string_format_error.proto new file mode 100644 index 000000000..8381603e0 --- /dev/null +++ b/google/ads/googleads/v3/errors/string_format_error.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "StringFormatErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing string format errors. + +// Container for enum describing possible string format errors. +message StringFormatErrorEnum { + // Enum describing possible string format errors. + enum StringFormatError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The input string value contains disallowed characters. + ILLEGAL_CHARS = 2; + + // The input string value is invalid for the associated field. + INVALID_FORMAT = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/string_length_error.proto b/google/ads/googleads/v3/errors/string_length_error.proto new file mode 100644 index 000000000..e178d2f6a --- /dev/null +++ b/google/ads/googleads/v3/errors/string_length_error.proto @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "StringLengthErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing string length errors. + +// Container for enum describing possible string length errors. +message StringLengthErrorEnum { + // Enum describing possible string length errors. + enum StringLengthError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The specified field should have a least one non-whitespace character in + // it. + EMPTY = 4; + + // Too short. + TOO_SHORT = 2; + + // Too long. + TOO_LONG = 3; + } + + +} diff --git a/google/ads/googleads/v3/errors/time_zone_error.proto b/google/ads/googleads/v3/errors/time_zone_error.proto new file mode 100644 index 000000000..ea82b4c6b --- /dev/null +++ b/google/ads/googleads/v3/errors/time_zone_error.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "TimeZoneErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing time zone errors. + +// Container for enum describing possible time zone errors. +message TimeZoneErrorEnum { + // Enum describing possible currency code errors. + enum TimeZoneError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Time zone is not valid. + INVALID_TIME_ZONE = 5; + } + + +} diff --git a/google/ads/googleads/v3/errors/url_field_error.proto b/google/ads/googleads/v3/errors/url_field_error.proto new file mode 100644 index 000000000..17678be03 --- /dev/null +++ b/google/ads/googleads/v3/errors/url_field_error.proto @@ -0,0 +1,215 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "UrlFieldErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing url field errors. + +// Container for enum describing possible url field errors. +message UrlFieldErrorEnum { + // Enum describing possible url field errors. + enum UrlFieldError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // The tracking url template is invalid. + INVALID_TRACKING_URL_TEMPLATE = 2; + + // The tracking url template contains invalid tag. + INVALID_TAG_IN_TRACKING_URL_TEMPLATE = 3; + + // The tracking url template must contain at least one tag (e.g. {lpurl}), + // This applies only to tracking url template associated with website ads or + // product ads. + MISSING_TRACKING_URL_TEMPLATE_TAG = 4; + + // The tracking url template must start with a valid protocol (or lpurl + // tag). + MISSING_PROTOCOL_IN_TRACKING_URL_TEMPLATE = 5; + + // The tracking url template starts with an invalid protocol. + INVALID_PROTOCOL_IN_TRACKING_URL_TEMPLATE = 6; + + // The tracking url template contains illegal characters. + MALFORMED_TRACKING_URL_TEMPLATE = 7; + + // The tracking url template must contain a host name (or lpurl tag). + MISSING_HOST_IN_TRACKING_URL_TEMPLATE = 8; + + // The tracking url template has an invalid or missing top level domain + // extension. + INVALID_TLD_IN_TRACKING_URL_TEMPLATE = 9; + + // The tracking url template contains nested occurrences of the same + // conditional tag (i.e. {ifmobile:{ifmobile:x}}). + REDUNDANT_NESTED_TRACKING_URL_TEMPLATE_TAG = 10; + + // The final url is invalid. + INVALID_FINAL_URL = 11; + + // The final url contains invalid tag. + INVALID_TAG_IN_FINAL_URL = 12; + + // The final url contains nested occurrences of the same conditional tag + // (i.e. {ifmobile:{ifmobile:x}}). + REDUNDANT_NESTED_FINAL_URL_TAG = 13; + + // The final url must start with a valid protocol. + MISSING_PROTOCOL_IN_FINAL_URL = 14; + + // The final url starts with an invalid protocol. + INVALID_PROTOCOL_IN_FINAL_URL = 15; + + // The final url contains illegal characters. + MALFORMED_FINAL_URL = 16; + + // The final url must contain a host name. + MISSING_HOST_IN_FINAL_URL = 17; + + // The tracking url template has an invalid or missing top level domain + // extension. + INVALID_TLD_IN_FINAL_URL = 18; + + // The final mobile url is invalid. + INVALID_FINAL_MOBILE_URL = 19; + + // The final mobile url contains invalid tag. + INVALID_TAG_IN_FINAL_MOBILE_URL = 20; + + // The final mobile url contains nested occurrences of the same conditional + // tag (i.e. {ifmobile:{ifmobile:x}}). + REDUNDANT_NESTED_FINAL_MOBILE_URL_TAG = 21; + + // The final mobile url must start with a valid protocol. + MISSING_PROTOCOL_IN_FINAL_MOBILE_URL = 22; + + // The final mobile url starts with an invalid protocol. + INVALID_PROTOCOL_IN_FINAL_MOBILE_URL = 23; + + // The final mobile url contains illegal characters. + MALFORMED_FINAL_MOBILE_URL = 24; + + // The final mobile url must contain a host name. + MISSING_HOST_IN_FINAL_MOBILE_URL = 25; + + // The tracking url template has an invalid or missing top level domain + // extension. + INVALID_TLD_IN_FINAL_MOBILE_URL = 26; + + // The final app url is invalid. + INVALID_FINAL_APP_URL = 27; + + // The final app url contains invalid tag. + INVALID_TAG_IN_FINAL_APP_URL = 28; + + // The final app url contains nested occurrences of the same conditional tag + // (i.e. {ifmobile:{ifmobile:x}}). + REDUNDANT_NESTED_FINAL_APP_URL_TAG = 29; + + // More than one app url found for the same OS type. + MULTIPLE_APP_URLS_FOR_OSTYPE = 30; + + // The OS type given for an app url is not valid. + INVALID_OSTYPE = 31; + + // The protocol given for an app url is not valid. (E.g. "android-app://") + INVALID_PROTOCOL_FOR_APP_URL = 32; + + // The package id (app id) given for an app url is not valid. + INVALID_PACKAGE_ID_FOR_APP_URL = 33; + + // The number of url custom parameters for an resource exceeds the maximum + // limit allowed. + URL_CUSTOM_PARAMETERS_COUNT_EXCEEDS_LIMIT = 34; + + // An invalid character appears in the parameter key. + INVALID_CHARACTERS_IN_URL_CUSTOM_PARAMETER_KEY = 39; + + // An invalid character appears in the parameter value. + INVALID_CHARACTERS_IN_URL_CUSTOM_PARAMETER_VALUE = 40; + + // The url custom parameter value fails url tag validation. + INVALID_TAG_IN_URL_CUSTOM_PARAMETER_VALUE = 41; + + // The custom parameter contains nested occurrences of the same conditional + // tag (i.e. {ifmobile:{ifmobile:x}}). + REDUNDANT_NESTED_URL_CUSTOM_PARAMETER_TAG = 42; + + // The protocol (http:// or https://) is missing. + MISSING_PROTOCOL = 43; + + // Unsupported protocol in URL. Only http and https are supported. + INVALID_PROTOCOL = 52; + + // The url is invalid. + INVALID_URL = 44; + + // Destination Url is deprecated. + DESTINATION_URL_DEPRECATED = 45; + + // The url contains invalid tag. + INVALID_TAG_IN_URL = 46; + + // The url must contain at least one tag (e.g. {lpurl}), This applies only + // to urls associated with website ads or product ads. + MISSING_URL_TAG = 47; + + // Duplicate url id. + DUPLICATE_URL_ID = 48; + + // Invalid url id. + INVALID_URL_ID = 49; + + // The final url suffix cannot begin with '?' or '&' characters and must be + // a valid query string. + FINAL_URL_SUFFIX_MALFORMED = 50; + + // The final url suffix cannot contain {lpurl} related or {ignore} tags. + INVALID_TAG_IN_FINAL_URL_SUFFIX = 51; + + // The top level domain is invalid, e.g, not a public top level domain + // listed in publicsuffix.org. + INVALID_TOP_LEVEL_DOMAIN = 53; + + // Malformed top level domain in URL. + MALFORMED_TOP_LEVEL_DOMAIN = 54; + + // Malformed URL. + MALFORMED_URL = 55; + + // No host found in URL. + MISSING_HOST = 56; + + // Custom parameter value cannot be null. + NULL_CUSTOM_PARAMETER_VALUE = 57; + } + + +} diff --git a/google/ads/googleads/v3/errors/user_data_error.proto b/google/ads/googleads/v3/errors/user_data_error.proto new file mode 100644 index 000000000..2cb91ea94 --- /dev/null +++ b/google/ads/googleads/v3/errors/user_data_error.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "UserDataErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing user data errors. + +// Container for enum describing possible user data errors. +message UserDataErrorEnum { + // Enum describing possible request errors. + enum UserDataError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Customer is not allowed to perform operations related to Customer Match. + OPERATIONS_FOR_CUSTOMER_MATCH_NOT_ALLOWED = 2; + + // Maximum number of user identifiers allowed for each mutate is 100. + TOO_MANY_USER_IDENTIFIERS = 3; + + // Current user list is not applicable for the given customer. + USER_LIST_NOT_APPLICABLE = 4; + } + + +} diff --git a/google/ads/googleads/v3/errors/user_list_error.proto b/google/ads/googleads/v3/errors/user_list_error.proto new file mode 100644 index 000000000..86ac4e54a --- /dev/null +++ b/google/ads/googleads/v3/errors/user_list_error.proto @@ -0,0 +1,129 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "UserListErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing user list errors. + +// Container for enum describing possible user list errors. +message UserListErrorEnum { + // Enum describing possible user list errors. + enum UserListError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Creating and updating external remarketing user lists is not supported. + EXTERNAL_REMARKETING_USER_LIST_MUTATE_NOT_SUPPORTED = 2; + + // Concrete type of user list is required. + CONCRETE_TYPE_REQUIRED = 3; + + // Creating/updating user list conversion types requires specifying the + // conversion type Id. + CONVERSION_TYPE_ID_REQUIRED = 4; + + // Remarketing user list cannot have duplicate conversion types. + DUPLICATE_CONVERSION_TYPES = 5; + + // Conversion type is invalid/unknown. + INVALID_CONVERSION_TYPE = 6; + + // User list description is empty or invalid. + INVALID_DESCRIPTION = 7; + + // User list name is empty or invalid. + INVALID_NAME = 8; + + // Type of the UserList does not match. + INVALID_TYPE = 9; + + // Embedded logical user lists are not allowed. + CAN_NOT_ADD_LOGICAL_LIST_AS_LOGICAL_LIST_OPERAND = 10; + + // User list rule operand is invalid. + INVALID_USER_LIST_LOGICAL_RULE_OPERAND = 11; + + // Name is already being used for another user list for the account. + NAME_ALREADY_USED = 12; + + // Name is required when creating a new conversion type. + NEW_CONVERSION_TYPE_NAME_REQUIRED = 13; + + // The given conversion type name has been used. + CONVERSION_TYPE_NAME_ALREADY_USED = 14; + + // Only an owner account may edit a user list. + OWNERSHIP_REQUIRED_FOR_SET = 15; + + // Creating user list without setting type in oneof user_list field, or + // creating/updating read-only user list types is not allowed. + USER_LIST_MUTATE_NOT_SUPPORTED = 16; + + // Rule is invalid. + INVALID_RULE = 17; + + // The specified date range is empty. + INVALID_DATE_RANGE = 27; + + // A UserList which is privacy sensitive or legal rejected cannot be mutated + // by external users. + CAN_NOT_MUTATE_SENSITIVE_USERLIST = 28; + + // Maximum number of rulebased user lists a customer can have. + MAX_NUM_RULEBASED_USERLISTS = 29; + + // BasicUserList's billable record field cannot be modified once it is set. + CANNOT_MODIFY_BILLABLE_RECORD_COUNT = 30; + + // crm_based_user_list.app_id field must be set when upload_key_type is + // MOBILE_ADVERTISING_ID. + APP_ID_NOT_SET = 31; + + // Name of the user list is reserved for system generated lists and cannot + // be used. + USERLIST_NAME_IS_RESERVED_FOR_SYSTEM_LIST = 32; + + // Advertiser needs to be whitelisted to use remarketing lists created from + // advertiser uploaded data (e.g., Customer Match lists). + ADVERTISER_NOT_WHITELISTED_FOR_USING_UPLOADED_DATA = 33; + + // The provided rule_type is not supported for the user list. + RULE_TYPE_IS_NOT_SUPPORTED = 34; + + // Similar user list cannot be used as a logical user list operand. + CAN_NOT_ADD_A_SIMILAR_USERLIST_AS_LOGICAL_LIST_OPERAND = 35; + + // Logical user list should not have a mix of CRM based user list and other + // types of lists in its rules. + CAN_NOT_MIX_CRM_BASED_IN_LOGICAL_LIST_WITH_OTHER_LISTS = 36; + } + + +} diff --git a/google/ads/googleads/v3/errors/youtube_video_registration_error.proto b/google/ads/googleads/v3/errors/youtube_video_registration_error.proto new file mode 100644 index 000000000..1e189778e --- /dev/null +++ b/google/ads/googleads/v3/errors/youtube_video_registration_error.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.errors; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "YoutubeVideoRegistrationErrorProto"; +option java_package = "com.google.ads.googleads.v3.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V3::Errors"; + +// Proto file describing YouTube video registration errors. + +// Container for enum describing YouTube video registration errors. +message YoutubeVideoRegistrationErrorEnum { + // Enum describing YouTube video registration errors. + enum YoutubeVideoRegistrationError { + // Enum unspecified. + UNSPECIFIED = 0; + + // The received error code is not known in this version. + UNKNOWN = 1; + + // Video to be registered wasn't found. + VIDEO_NOT_FOUND = 2; + + // Video to be registered is not accessible (e.g. private). + VIDEO_NOT_ACCESSIBLE = 3; + + // Video to be registered is not eligible (e.g. mature content). + VIDEO_NOT_ELIGIBLE = 4; + } + + +} diff --git a/google/ads/googleads/v3/googleads_gapic.yaml b/google/ads/googleads/v3/googleads_gapic.yaml new file mode 100644 index 000000000..f8a3ee9f9 --- /dev/null +++ b/google/ads/googleads/v3/googleads_gapic.yaml @@ -0,0 +1,26 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + csharp: + package_name: Google.Ads.GoogleAds.V3.Services + go: + package_name: google.golang.org/google/ads/googleads/v3/services + java: + package_name: com.google.ads.googleads.v3.services + nodejs: + package_name: v3.services + php: + package_name: Google\Ads\Googleads\V3\Services + python: + package_name: google.ads.googleads_v3.gapic.services + ruby: + package_name: Google::Ads::Googleads::V3::Services +interfaces: +- name: google.ads.googleads.v3.services.OfflineUserDataJobService + methods: + - name: RunOfflineUserDataJob + long_running: + initial_poll_delay_millis: 300000 + max_poll_delay_millis: 3600000 + poll_delay_multiplier: 1.25 + total_poll_timeout_millis: 43200000 diff --git a/google/ads/googleads/v3/googleads_grpc_service_config.json b/google/ads/googleads/v3/googleads_grpc_service_config.json new file mode 100644 index 000000000..21058f828 --- /dev/null +++ b/google/ads/googleads/v3/googleads_grpc_service_config.json @@ -0,0 +1,127 @@ +{ + "methodConfig": [ + { + "name": [ + { "service": "google.ads.googleads.v3.services.AccountBudgetProposalService" }, + { "service": "google.ads.googleads.v3.services.AccountBudgetService" }, + { "service": "google.ads.googleads.v3.services.AdGroupAdAssetViewService" }, + { "service": "google.ads.googleads.v3.services.AdGroupAdLabelService" }, + { "service": "google.ads.googleads.v3.services.AdGroupAdService" }, + { "service": "google.ads.googleads.v3.services.AdGroupAudienceViewService" }, + { "service": "google.ads.googleads.v3.services.AdGroupBidModifierService" }, + { "service": "google.ads.googleads.v3.services.AdGroupCriterionLabelService" }, + { "service": "google.ads.googleads.v3.services.AdGroupCriterionService" }, + { "service": "google.ads.googleads.v3.services.AdGroupCriterionSimulationService" }, + { "service": "google.ads.googleads.v3.services.AdGroupExtensionSettingService" }, + { "service": "google.ads.googleads.v3.services.AdGroupFeedService" }, + { "service": "google.ads.googleads.v3.services.AdGroupLabelService" }, + { "service": "google.ads.googleads.v3.services.AdGroupService" }, + { "service": "google.ads.googleads.v3.services.AdGroupSimulationService" }, + { "service": "google.ads.googleads.v3.services.AdParameterService" }, + { "service": "google.ads.googleads.v3.services.AdScheduleViewService" }, + { "service": "google.ads.googleads.v3.services.AdService" }, + { "service": "google.ads.googleads.v3.services.AgeRangeViewService" }, + { "service": "google.ads.googleads.v3.services.AssetService" }, + { "service": "google.ads.googleads.v3.services.BiddingStrategyService" }, + { "service": "google.ads.googleads.v3.services.BillingSetupService" }, + { "service": "google.ads.googleads.v3.services.CampaignAudienceViewService" }, + { "service": "google.ads.googleads.v3.services.CampaignBidModifierService" }, + { "service": "google.ads.googleads.v3.services.CampaignBudgetService" }, + { "service": "google.ads.googleads.v3.services.CampaignCriterionService" }, + { "service": "google.ads.googleads.v3.services.CampaignCriterionSimulationService" }, + { "service": "google.ads.googleads.v3.services.CampaignDraftService" }, + { "service": "google.ads.googleads.v3.services.CampaignExperimentService" }, + { "service": "google.ads.googleads.v3.services.CampaignExtensionSettingService" }, + { "service": "google.ads.googleads.v3.services.CampaignFeedService" }, + { "service": "google.ads.googleads.v3.services.CampaignLabelService" }, + { "service": "google.ads.googleads.v3.services.CampaignService" }, + { "service": "google.ads.googleads.v3.services.CampaignSharedSetService" }, + { "service": "google.ads.googleads.v3.services.CarrierConstantService" }, + { "service": "google.ads.googleads.v3.services.ChangeStatusService" }, + { "service": "google.ads.googleads.v3.services.ClickViewService" }, + { "service": "google.ads.googleads.v3.services.ConversionActionService" }, + { "service": "google.ads.googleads.v3.services.ConversionAdjustmentUploadService" }, + { "service": "google.ads.googleads.v3.services.ConversionUploadService" }, + { "service": "google.ads.googleads.v3.services.CurrencyConstantService" }, + { "service": "google.ads.googleads.v3.services.CustomInterestService" }, + { "service": "google.ads.googleads.v3.services.CustomerClientLinkService" }, + { "service": "google.ads.googleads.v3.services.CustomerClientService" }, + { "service": "google.ads.googleads.v3.services.CustomerExtensionSettingService" }, + { "service": "google.ads.googleads.v3.services.CustomerFeedService" }, + { "service": "google.ads.googleads.v3.services.CustomerLabelService" }, + { "service": "google.ads.googleads.v3.services.CustomerManagerLinkService" }, + { "service": "google.ads.googleads.v3.services.CustomerNegativeCriterionService" }, + { "service": "google.ads.googleads.v3.services.CustomerService" }, + { "service": "google.ads.googleads.v3.services.DetailPlacementViewService" }, + { "service": "google.ads.googleads.v3.services.DisplayKeywordViewService" }, + { "service": "google.ads.googleads.v3.services.DistanceViewService" }, + { "service": "google.ads.googleads.v3.services.DomainCategoryService" }, + { "service": "google.ads.googleads.v3.services.DynamicSearchAdsSearchTermViewService" }, + { "service": "google.ads.googleads.v3.services.ExpandedLandingPageViewService" }, + { "service": "google.ads.googleads.v3.services.ExtensionFeedItemService" }, + { "service": "google.ads.googleads.v3.services.FeedItemService" }, + { "service": "google.ads.googleads.v3.services.FeedItemTargetService" }, + { "service": "google.ads.googleads.v3.services.FeedMappingService" }, + { "service": "google.ads.googleads.v3.services.FeedPlaceholderViewService" }, + { "service": "google.ads.googleads.v3.services.FeedService" }, + { "service": "google.ads.googleads.v3.services.GenderViewService" }, + { "service": "google.ads.googleads.v3.services.GeoTargetConstantService" }, + { "service": "google.ads.googleads.v3.services.GeographicViewService" }, + { "service": "google.ads.googleads.v3.services.GoogleAdsFieldService" }, + { "service": "google.ads.googleads.v3.services.GoogleAdsService" }, + { "service": "google.ads.googleads.v3.services.GroupPlacementViewService" }, + { "service": "google.ads.googleads.v3.services.HotelGroupViewService" }, + { "service": "google.ads.googleads.v3.services.HotelPerformanceViewService" }, + { "service": "google.ads.googleads.v3.services.InvoiceService" }, + { "service": "google.ads.googleads.v3.services.KeywordPlanAdGroupService" }, + { "service": "google.ads.googleads.v3.services.KeywordPlanCampaignService" }, + { "service": "google.ads.googleads.v3.services.KeywordPlanIdeaService" }, + { "service": "google.ads.googleads.v3.services.KeywordPlanKeywordService" }, + { "service": "google.ads.googleads.v3.services.KeywordPlanNegativeKeywordService" }, + { "service": "google.ads.googleads.v3.services.KeywordPlanService" }, + { "service": "google.ads.googleads.v3.services.KeywordViewService" }, + { "service": "google.ads.googleads.v3.services.LabelService" }, + { "service": "google.ads.googleads.v3.services.LandingPageViewService" }, + { "service": "google.ads.googleads.v3.services.LanguageConstantService" }, + { "service": "google.ads.googleads.v3.services.LocationViewService" }, + { "service": "google.ads.googleads.v3.services.ManagedPlacementViewService" }, + { "service": "google.ads.googleads.v3.services.MediaFileService" }, + { "service": "google.ads.googleads.v3.services.MerchantCenterLinkService" }, + { "service": "google.ads.googleads.v3.services.MobileAppCategoryConstantService" }, + { "service": "google.ads.googleads.v3.services.MobileDeviceConstantService" }, + { "service": "google.ads.googleads.v3.services.MutateJobService" }, + { "service": "google.ads.googleads.v3.services.OfflineUserDataJobService" }, + { "service": "google.ads.googleads.v3.services.OperatingSystemVersionConstantService" }, + { "service": "google.ads.googleads.v3.services.PaidOrganicSearchTermViewService" }, + { "service": "google.ads.googleads.v3.services.ParentalStatusViewService" }, + { "service": "google.ads.googleads.v3.services.PaymentsAccountService" }, + { "service": "google.ads.googleads.v3.services.ProductBiddingCategoryConstantService" }, + { "service": "google.ads.googleads.v3.services.ProductGroupViewService" }, + { "service": "google.ads.googleads.v3.services.ReachPlanService" }, + { "service": "google.ads.googleads.v3.services.RecommendationService" }, + { "service": "google.ads.googleads.v3.services.RemarketingActionService" }, + { "service": "google.ads.googleads.v3.services.SearchTermViewService" }, + { "service": "google.ads.googleads.v3.services.SharedCriterionService" }, + { "service": "google.ads.googleads.v3.services.SharedSetService" }, + { "service": "google.ads.googleads.v3.services.ShoppingPerformanceViewService" }, + { "service": "google.ads.googleads.v3.services.TopicConstantService" }, + { "service": "google.ads.googleads.v3.services.TopicViewService" }, + { "service": "google.ads.googleads.v3.services.UserDataService" }, + { "service": "google.ads.googleads.v3.services.UserInterestService" }, + { "service": "google.ads.googleads.v3.services.UserListService" }, + { "service": "google.ads.googleads.v3.services.UserLocationViewService" }, + { "service": "google.ads.googleads.v3.services.VideoService" } + ], + "timeout": "3600s", + "retryPolicy": { + "initialBackoff": "5s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/ads/googleads/v3/googleads_v3.yaml b/google/ads/googleads/v3/googleads_v3.yaml new file mode 100644 index 000000000..33c6b94cd --- /dev/null +++ b/google/ads/googleads/v3/googleads_v3.yaml @@ -0,0 +1,458 @@ +type: google.api.Service +config_version: 3 +name: googleads.googleapis.com +title: Google Ads API + +apis: +- name: google.ads.googleads.v3.services.AccountBudgetProposalService +- name: google.ads.googleads.v3.services.AccountBudgetService +- name: google.ads.googleads.v3.services.AdGroupAdAssetViewService +- name: google.ads.googleads.v3.services.AdGroupAdLabelService +- name: google.ads.googleads.v3.services.AdGroupAdService +- name: google.ads.googleads.v3.services.AdGroupAudienceViewService +- name: google.ads.googleads.v3.services.AdGroupBidModifierService +- name: google.ads.googleads.v3.services.AdGroupCriterionLabelService +- name: google.ads.googleads.v3.services.AdGroupCriterionService +- name: google.ads.googleads.v3.services.AdGroupCriterionSimulationService +- name: google.ads.googleads.v3.services.AdGroupExtensionSettingService +- name: google.ads.googleads.v3.services.AdGroupFeedService +- name: google.ads.googleads.v3.services.AdGroupLabelService +- name: google.ads.googleads.v3.services.AdGroupService +- name: google.ads.googleads.v3.services.AdGroupSimulationService +- name: google.ads.googleads.v3.services.AdParameterService +- name: google.ads.googleads.v3.services.AdScheduleViewService +- name: google.ads.googleads.v3.services.AdService +- name: google.ads.googleads.v3.services.AgeRangeViewService +- name: google.ads.googleads.v3.services.AssetService +- name: google.ads.googleads.v3.services.BiddingStrategyService +- name: google.ads.googleads.v3.services.BillingSetupService +- name: google.ads.googleads.v3.services.CampaignAudienceViewService +- name: google.ads.googleads.v3.services.CampaignBidModifierService +- name: google.ads.googleads.v3.services.CampaignBudgetService +- name: google.ads.googleads.v3.services.CampaignCriterionService +- name: google.ads.googleads.v3.services.CampaignCriterionSimulationService +- name: google.ads.googleads.v3.services.CampaignDraftService +- name: google.ads.googleads.v3.services.CampaignExperimentService +- name: google.ads.googleads.v3.services.CampaignExtensionSettingService +- name: google.ads.googleads.v3.services.CampaignFeedService +- name: google.ads.googleads.v3.services.CampaignLabelService +- name: google.ads.googleads.v3.services.CampaignService +- name: google.ads.googleads.v3.services.CampaignSharedSetService +- name: google.ads.googleads.v3.services.CarrierConstantService +- name: google.ads.googleads.v3.services.ChangeStatusService +- name: google.ads.googleads.v3.services.ClickViewService +- name: google.ads.googleads.v3.services.ConversionActionService +- name: google.ads.googleads.v3.services.ConversionAdjustmentUploadService +- name: google.ads.googleads.v3.services.ConversionUploadService +- name: google.ads.googleads.v3.services.CurrencyConstantService +- name: google.ads.googleads.v3.services.CustomInterestService +- name: google.ads.googleads.v3.services.CustomerClientLinkService +- name: google.ads.googleads.v3.services.CustomerClientService +- name: google.ads.googleads.v3.services.CustomerExtensionSettingService +- name: google.ads.googleads.v3.services.CustomerFeedService +- name: google.ads.googleads.v3.services.CustomerLabelService +- name: google.ads.googleads.v3.services.CustomerManagerLinkService +- name: google.ads.googleads.v3.services.CustomerNegativeCriterionService +- name: google.ads.googleads.v3.services.CustomerService +- name: google.ads.googleads.v3.services.DetailPlacementViewService +- name: google.ads.googleads.v3.services.DisplayKeywordViewService +- name: google.ads.googleads.v3.services.DistanceViewService +- name: google.ads.googleads.v3.services.DomainCategoryService +- name: google.ads.googleads.v3.services.DynamicSearchAdsSearchTermViewService +- name: google.ads.googleads.v3.services.ExpandedLandingPageViewService +- name: google.ads.googleads.v3.services.ExtensionFeedItemService +- name: google.ads.googleads.v3.services.FeedItemService +- name: google.ads.googleads.v3.services.FeedItemTargetService +- name: google.ads.googleads.v3.services.FeedMappingService +- name: google.ads.googleads.v3.services.FeedPlaceholderViewService +- name: google.ads.googleads.v3.services.FeedService +- name: google.ads.googleads.v3.services.GenderViewService +- name: google.ads.googleads.v3.services.GeoTargetConstantService +- name: google.ads.googleads.v3.services.GeographicViewService +- name: google.ads.googleads.v3.services.GoogleAdsFieldService +- name: google.ads.googleads.v3.services.GoogleAdsService +- name: google.ads.googleads.v3.services.GroupPlacementViewService +- name: google.ads.googleads.v3.services.HotelGroupViewService +- name: google.ads.googleads.v3.services.HotelPerformanceViewService +- name: google.ads.googleads.v3.services.InvoiceService +- name: google.ads.googleads.v3.services.KeywordPlanAdGroupService +- name: google.ads.googleads.v3.services.KeywordPlanCampaignService +- name: google.ads.googleads.v3.services.KeywordPlanIdeaService +- name: google.ads.googleads.v3.services.KeywordPlanKeywordService +- name: google.ads.googleads.v3.services.KeywordPlanNegativeKeywordService +- name: google.ads.googleads.v3.services.KeywordPlanService +- name: google.ads.googleads.v3.services.KeywordViewService +- name: google.ads.googleads.v3.services.LabelService +- name: google.ads.googleads.v3.services.LandingPageViewService +- name: google.ads.googleads.v3.services.LanguageConstantService +- name: google.ads.googleads.v3.services.LocationViewService +- name: google.ads.googleads.v3.services.ManagedPlacementViewService +- name: google.ads.googleads.v3.services.MediaFileService +- name: google.ads.googleads.v3.services.MerchantCenterLinkService +- name: google.ads.googleads.v3.services.MobileAppCategoryConstantService +- name: google.ads.googleads.v3.services.MobileDeviceConstantService +- name: google.ads.googleads.v3.services.MutateJobService +- name: google.ads.googleads.v3.services.OfflineUserDataJobService +- name: google.ads.googleads.v3.services.OperatingSystemVersionConstantService +- name: google.ads.googleads.v3.services.PaidOrganicSearchTermViewService +- name: google.ads.googleads.v3.services.ParentalStatusViewService +- name: google.ads.googleads.v3.services.PaymentsAccountService +- name: google.ads.googleads.v3.services.ProductBiddingCategoryConstantService +- name: google.ads.googleads.v3.services.ProductGroupViewService +- name: google.ads.googleads.v3.services.ReachPlanService +- name: google.ads.googleads.v3.services.RecommendationService +- name: google.ads.googleads.v3.services.RemarketingActionService +- name: google.ads.googleads.v3.services.SearchTermViewService +- name: google.ads.googleads.v3.services.SharedCriterionService +- name: google.ads.googleads.v3.services.SharedSetService +- name: google.ads.googleads.v3.services.ShoppingPerformanceViewService +- name: google.ads.googleads.v3.services.TopicConstantService +- name: google.ads.googleads.v3.services.TopicViewService +- name: google.ads.googleads.v3.services.UserDataService +- name: google.ads.googleads.v3.services.UserInterestService +- name: google.ads.googleads.v3.services.UserListService +- name: google.ads.googleads.v3.services.UserLocationViewService +- name: google.ads.googleads.v3.services.VideoService + +types: +- name: google.ads.googleads.v3.errors.GoogleAdsFailure +- name: google.ads.googleads.v3.resources.MutateJob.MutateJobMetadata +- name: google.ads.googleads.v3.services.CreateCampaignExperimentMetadata + +documentation: + summary: |- + Manage your AdWords accounts, campaigns, and reports with this REST-based + API. + overview: |- + # This warning always fires when the last path segment of packages is not + + # the version + +backend: + rules: + - selector: google.ads.googleads.v3.services.AccountBudgetProposalService.GetAccountBudgetProposal + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AccountBudgetProposalService.MutateAccountBudgetProposal + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AccountBudgetService.GetAccountBudget + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupAdAssetViewService.GetAdGroupAdAssetView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupAdLabelService.GetAdGroupAdLabel + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupAdLabelService.MutateAdGroupAdLabels + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupAdService.GetAdGroupAd + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupAdService.MutateAdGroupAds + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupAudienceViewService.GetAdGroupAudienceView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupBidModifierService.GetAdGroupBidModifier + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupBidModifierService.MutateAdGroupBidModifiers + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupCriterionLabelService.GetAdGroupCriterionLabel + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupCriterionLabelService.MutateAdGroupCriterionLabels + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupCriterionService.GetAdGroupCriterion + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupCriterionService.MutateAdGroupCriteria + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupCriterionSimulationService.GetAdGroupCriterionSimulation + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupExtensionSettingService.GetAdGroupExtensionSetting + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupExtensionSettingService.MutateAdGroupExtensionSettings + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupFeedService.GetAdGroupFeed + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupFeedService.MutateAdGroupFeeds + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupLabelService.GetAdGroupLabel + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupLabelService.MutateAdGroupLabels + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupService.GetAdGroup + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupService.MutateAdGroups + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdGroupSimulationService.GetAdGroupSimulation + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdParameterService.GetAdParameter + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdParameterService.MutateAdParameters + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdScheduleViewService.GetAdScheduleView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdService.GetAd + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AdService.MutateAds + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AgeRangeViewService.GetAgeRangeView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AssetService.GetAsset + deadline: 60.0 + - selector: google.ads.googleads.v3.services.AssetService.MutateAssets + deadline: 60.0 + - selector: google.ads.googleads.v3.services.BiddingStrategyService.GetBiddingStrategy + deadline: 60.0 + - selector: google.ads.googleads.v3.services.BiddingStrategyService.MutateBiddingStrategies + deadline: 60.0 + - selector: google.ads.googleads.v3.services.BillingSetupService.GetBillingSetup + deadline: 60.0 + - selector: google.ads.googleads.v3.services.BillingSetupService.MutateBillingSetup + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignAudienceViewService.GetCampaignAudienceView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignBidModifierService.GetCampaignBidModifier + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignBidModifierService.MutateCampaignBidModifiers + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignBudgetService.GetCampaignBudget + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignBudgetService.MutateCampaignBudgets + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignCriterionService.GetCampaignCriterion + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignCriterionService.MutateCampaignCriteria + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignCriterionSimulationService.GetCampaignCriterionSimulation + deadline: 60.0 + - selector: 'google.ads.googleads.v3.services.CampaignDraftService.*' + deadline: 60.0 + - selector: 'google.ads.googleads.v3.services.CampaignExperimentService.*' + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignExtensionSettingService.GetCampaignExtensionSetting + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignExtensionSettingService.MutateCampaignExtensionSettings + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignFeedService.GetCampaignFeed + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignFeedService.MutateCampaignFeeds + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignLabelService.GetCampaignLabel + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignLabelService.MutateCampaignLabels + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignService.GetCampaign + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignService.MutateCampaigns + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignSharedSetService.GetCampaignSharedSet + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CampaignSharedSetService.MutateCampaignSharedSets + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CarrierConstantService.GetCarrierConstant + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ChangeStatusService.GetChangeStatus + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ClickViewService.GetClickView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ConversionActionService.GetConversionAction + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ConversionActionService.MutateConversionActions + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ConversionAdjustmentUploadService.UploadConversionAdjustments + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ConversionUploadService.UploadCallConversions + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ConversionUploadService.UploadClickConversions + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CurrencyConstantService.GetCurrencyConstant + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CustomInterestService.GetCustomInterest + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CustomInterestService.MutateCustomInterests + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CustomerClientLinkService.GetCustomerClientLink + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CustomerClientLinkService.MutateCustomerClientLink + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CustomerClientService.GetCustomerClient + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CustomerExtensionSettingService.GetCustomerExtensionSetting + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CustomerExtensionSettingService.MutateCustomerExtensionSettings + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CustomerFeedService.GetCustomerFeed + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CustomerFeedService.MutateCustomerFeeds + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CustomerLabelService.GetCustomerLabel + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CustomerLabelService.MutateCustomerLabels + deadline: 60.0 + - selector: 'google.ads.googleads.v3.services.CustomerManagerLinkService.*' + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CustomerNegativeCriterionService.GetCustomerNegativeCriterion + deadline: 60.0 + - selector: google.ads.googleads.v3.services.CustomerNegativeCriterionService.MutateCustomerNegativeCriteria + deadline: 60.0 + - selector: 'google.ads.googleads.v3.services.CustomerService.*' + deadline: 60.0 + - selector: google.ads.googleads.v3.services.DetailPlacementViewService.GetDetailPlacementView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.DisplayKeywordViewService.GetDisplayKeywordView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.DistanceViewService.GetDistanceView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.DomainCategoryService.GetDomainCategory + deadline: 60.0 + - selector: google.ads.googleads.v3.services.DynamicSearchAdsSearchTermViewService.GetDynamicSearchAdsSearchTermView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ExpandedLandingPageViewService.GetExpandedLandingPageView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ExtensionFeedItemService.GetExtensionFeedItem + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ExtensionFeedItemService.MutateExtensionFeedItems + deadline: 60.0 + - selector: google.ads.googleads.v3.services.FeedItemService.GetFeedItem + deadline: 60.0 + - selector: google.ads.googleads.v3.services.FeedItemService.MutateFeedItems + deadline: 60.0 + - selector: google.ads.googleads.v3.services.FeedItemTargetService.GetFeedItemTarget + deadline: 60.0 + - selector: google.ads.googleads.v3.services.FeedItemTargetService.MutateFeedItemTargets + deadline: 60.0 + - selector: google.ads.googleads.v3.services.FeedMappingService.GetFeedMapping + deadline: 60.0 + - selector: google.ads.googleads.v3.services.FeedMappingService.MutateFeedMappings + deadline: 60.0 + - selector: google.ads.googleads.v3.services.FeedPlaceholderViewService.GetFeedPlaceholderView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.FeedService.GetFeed + deadline: 60.0 + - selector: google.ads.googleads.v3.services.FeedService.MutateFeeds + deadline: 60.0 + - selector: google.ads.googleads.v3.services.GenderViewService.GetGenderView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.GeoTargetConstantService.GetGeoTargetConstant + deadline: 60.0 + - selector: google.ads.googleads.v3.services.GeoTargetConstantService.SuggestGeoTargetConstants + deadline: 60.0 + - selector: google.ads.googleads.v3.services.GeographicViewService.GetGeographicView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.GoogleAdsFieldService.GetGoogleAdsField + deadline: 600.0 + - selector: google.ads.googleads.v3.services.GoogleAdsFieldService.SearchGoogleAdsFields + deadline: 600.0 + - selector: google.ads.googleads.v3.services.GoogleAdsService.Mutate + deadline: 600.0 + - selector: google.ads.googleads.v3.services.GoogleAdsService.Search + deadline: 3600.0 + - selector: google.ads.googleads.v3.services.GoogleAdsService.SearchStream + deadline: 3600.0 + - selector: google.ads.googleads.v3.services.GroupPlacementViewService.GetGroupPlacementView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.HotelGroupViewService.GetHotelGroupView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.HotelPerformanceViewService.GetHotelPerformanceView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.InvoiceService.ListInvoices + deadline: 60.0 + - selector: google.ads.googleads.v3.services.KeywordPlanAdGroupService.GetKeywordPlanAdGroup + deadline: 60.0 + - selector: google.ads.googleads.v3.services.KeywordPlanAdGroupService.MutateKeywordPlanAdGroups + deadline: 60.0 + - selector: google.ads.googleads.v3.services.KeywordPlanCampaignService.GetKeywordPlanCampaign + deadline: 60.0 + - selector: google.ads.googleads.v3.services.KeywordPlanCampaignService.MutateKeywordPlanCampaigns + deadline: 60.0 + - selector: google.ads.googleads.v3.services.KeywordPlanIdeaService.GenerateKeywordIdeas + deadline: 600.0 + - selector: google.ads.googleads.v3.services.KeywordPlanKeywordService.GetKeywordPlanKeyword + deadline: 60.0 + - selector: google.ads.googleads.v3.services.KeywordPlanKeywordService.MutateKeywordPlanKeywords + deadline: 60.0 + - selector: google.ads.googleads.v3.services.KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword + deadline: 60.0 + - selector: google.ads.googleads.v3.services.KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords + deadline: 60.0 + - selector: google.ads.googleads.v3.services.KeywordPlanService.GenerateForecastMetrics + deadline: 600.0 + - selector: google.ads.googleads.v3.services.KeywordPlanService.GenerateHistoricalMetrics + deadline: 600.0 + - selector: google.ads.googleads.v3.services.KeywordPlanService.GetKeywordPlan + deadline: 60.0 + - selector: google.ads.googleads.v3.services.KeywordPlanService.MutateKeywordPlans + deadline: 60.0 + - selector: google.ads.googleads.v3.services.KeywordViewService.GetKeywordView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.LabelService.GetLabel + deadline: 60.0 + - selector: google.ads.googleads.v3.services.LabelService.MutateLabels + deadline: 60.0 + - selector: google.ads.googleads.v3.services.LandingPageViewService.GetLandingPageView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.LanguageConstantService.GetLanguageConstant + deadline: 60.0 + - selector: google.ads.googleads.v3.services.LocationViewService.GetLocationView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ManagedPlacementViewService.GetManagedPlacementView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.MediaFileService.GetMediaFile + deadline: 60.0 + - selector: google.ads.googleads.v3.services.MediaFileService.MutateMediaFiles + deadline: 60.0 + - selector: 'google.ads.googleads.v3.services.MerchantCenterLinkService.*' + deadline: 60.0 + - selector: google.ads.googleads.v3.services.MobileAppCategoryConstantService.GetMobileAppCategoryConstant + deadline: 60.0 + - selector: google.ads.googleads.v3.services.MobileDeviceConstantService.GetMobileDeviceConstant + deadline: 60.0 + - selector: 'google.ads.googleads.v3.services.MutateJobService.*' + deadline: 60.0 + - selector: 'google.ads.googleads.v3.services.OfflineUserDataJobService.*' + deadline: 600.0 + - selector: google.ads.googleads.v3.services.OperatingSystemVersionConstantService.GetOperatingSystemVersionConstant + deadline: 60.0 + - selector: google.ads.googleads.v3.services.PaidOrganicSearchTermViewService.GetPaidOrganicSearchTermView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ParentalStatusViewService.GetParentalStatusView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.PaymentsAccountService.ListPaymentsAccounts + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ProductBiddingCategoryConstantService.GetProductBiddingCategoryConstant + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ProductGroupViewService.GetProductGroupView + deadline: 60.0 + - selector: 'google.ads.googleads.v3.services.ReachPlanService.*' + deadline: 600.0 + - selector: 'google.ads.googleads.v3.services.RecommendationService.*' + deadline: 600.0 + - selector: google.ads.googleads.v3.services.RemarketingActionService.GetRemarketingAction + deadline: 60.0 + - selector: google.ads.googleads.v3.services.RemarketingActionService.MutateRemarketingActions + deadline: 60.0 + - selector: google.ads.googleads.v3.services.SearchTermViewService.GetSearchTermView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.SharedCriterionService.GetSharedCriterion + deadline: 60.0 + - selector: google.ads.googleads.v3.services.SharedCriterionService.MutateSharedCriteria + deadline: 60.0 + - selector: google.ads.googleads.v3.services.SharedSetService.GetSharedSet + deadline: 60.0 + - selector: google.ads.googleads.v3.services.SharedSetService.MutateSharedSets + deadline: 60.0 + - selector: google.ads.googleads.v3.services.ShoppingPerformanceViewService.GetShoppingPerformanceView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.TopicConstantService.GetTopicConstant + deadline: 60.0 + - selector: google.ads.googleads.v3.services.TopicViewService.GetTopicView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.UserDataService.UploadUserData + deadline: 600.0 + - selector: google.ads.googleads.v3.services.UserInterestService.GetUserInterest + deadline: 60.0 + - selector: google.ads.googleads.v3.services.UserListService.GetUserList + deadline: 60.0 + - selector: google.ads.googleads.v3.services.UserListService.MutateUserLists + deadline: 60.0 + - selector: google.ads.googleads.v3.services.UserLocationViewService.GetUserLocationView + deadline: 60.0 + - selector: google.ads.googleads.v3.services.VideoService.GetVideo + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 diff --git a/google/ads/googleads/v3/resources/account_budget.proto b/google/ads/googleads/v3/resources/account_budget.proto new file mode 100644 index 000000000..1b12d891e --- /dev/null +++ b/google/ads/googleads/v3/resources/account_budget.proto @@ -0,0 +1,253 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/account_budget_proposal_type.proto"; +import "google/ads/googleads/v3/enums/account_budget_status.proto"; +import "google/ads/googleads/v3/enums/spending_limit_type.proto"; +import "google/ads/googleads/v3/enums/time_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the AccountBudget resource. + +// An account-level budget. It contains information about the budget itself, +// as well as the most recently approved changes to the budget and proposed +// changes that are pending approval. The proposed changes that are pending +// approval, if any, are found in 'pending_proposal'. Effective details about +// the budget are found in fields prefixed 'approved_', 'adjusted_' and those +// without a prefix. Since some effective details may differ from what the user +// had originally requested (e.g. spending limit), these differences are +// juxtaposed via 'proposed_', 'approved_', and possibly 'adjusted_' fields. +// +// This resource is mutated using AccountBudgetProposal and cannot be mutated +// directly. A budget may have at most one pending proposal at any given time. +// It is read through pending_proposal. +// +// Once approved, a budget may be subject to adjustments, such as credit +// adjustments. Adjustments create differences between the 'approved' and +// 'adjusted' fields, which would otherwise be identical. +message AccountBudget { + option (google.api.resource) = { + type: "googleads.googleapis.com/AccountBudget" + pattern: "customers/{customer}/accountBudgets/{account_budget}" + }; + + // A pending proposal associated with the enclosing account-level budget, + // if applicable. + message PendingAccountBudgetProposal { + // Output only. The resource name of the proposal. + // AccountBudgetProposal resource names have the form: + // + // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}` + google.protobuf.StringValue account_budget_proposal = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudgetProposal" + } + ]; + + // Output only. The type of this proposal, e.g. END to end the budget associated + // with this proposal. + google.ads.googleads.v3.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name to assign to the account-level budget. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The start time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue start_date_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A purchase order number is a value that helps users reference this budget + // in their monthly invoices. + google.protobuf.StringValue purchase_order_number = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Notes associated with this budget. + google.protobuf.StringValue notes = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when this account-level budget proposal was created. + // Formatted as yyyy-MM-dd HH:mm:ss. + google.protobuf.StringValue creation_date_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The end time of the account-level budget. + oneof end_time { + // Output only. The end time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue end_date_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v3.enums.TimeTypeEnum.TimeType end_time_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The spending limit. + oneof spending_limit { + // Output only. The spending limit in micros. One million is equivalent to + // one unit. + google.protobuf.Int64Value spending_limit_micros = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v3.enums.SpendingLimitTypeEnum.SpendingLimitType spending_limit_type = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + } + + // Output only. The resource name of the account-level budget. + // AccountBudget resource names have the form: + // + // `customers/{customer_id}/accountBudgets/{account_budget_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudget" + } + ]; + + // Output only. The ID of the account-level budget. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the billing setup associated with this account-level + // budget. BillingSetup resource names have the form: + // + // `customers/{customer_id}/billingSetups/{billing_setup_id}` + google.protobuf.StringValue billing_setup = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BillingSetup" + } + ]; + + // Output only. The status of this account-level budget. + google.ads.googleads.v3.enums.AccountBudgetStatusEnum.AccountBudgetStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the account-level budget. + google.protobuf.StringValue name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The proposed start time of the account-level budget in + // yyyy-MM-dd HH:mm:ss format. If a start time type of NOW was proposed, + // this is the time of request. + google.protobuf.StringValue proposed_start_date_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The approved start time of the account-level budget in yyyy-MM-dd HH:mm:ss + // format. + // + // For example, if a new budget is approved after the proposed start time, + // the approved start time is the time of approval. + google.protobuf.StringValue approved_start_date_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total adjustments amount. + // + // An example of an adjustment is courtesy credits. + google.protobuf.Int64Value total_adjustments_micros = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The value of Ads that have been served, in micros. + // + // This includes overdelivery costs, in which case a credit might be + // automatically applied to the budget (see total_adjustments_micros). + google.protobuf.Int64Value amount_served_micros = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A purchase order number is a value that helps users reference this budget + // in their monthly invoices. + google.protobuf.StringValue purchase_order_number = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Notes associated with the budget. + google.protobuf.StringValue notes = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The pending proposal to modify this budget, if applicable. + PendingAccountBudgetProposal pending_proposal = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The proposed end time of the account-level budget. + oneof proposed_end_time { + // Output only. The proposed end time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue proposed_end_date_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The proposed end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v3.enums.TimeTypeEnum.TimeType proposed_end_time_type = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The approved end time of the account-level budget. + // + // For example, if a budget's end time is updated and the proposal is approved + // after the proposed end time, the approved end time is the time of approval. + oneof approved_end_time { + // Output only. The approved end time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue approved_end_date_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The approved end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v3.enums.TimeTypeEnum.TimeType approved_end_time_type = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The proposed spending limit. + oneof proposed_spending_limit { + // Output only. The proposed spending limit in micros. One million is equivalent to + // one unit. + google.protobuf.Int64Value proposed_spending_limit_micros = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The proposed spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v3.enums.SpendingLimitTypeEnum.SpendingLimitType proposed_spending_limit_type = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The approved spending limit. + // + // For example, if the amount already spent by the account exceeds the + // proposed spending limit at the time the proposal is approved, the approved + // spending limit is set to the amount already spent. + oneof approved_spending_limit { + // Output only. The approved spending limit in micros. One million is equivalent to + // one unit. This will only be populated if the proposed spending limit + // is finite, and will always be greater than or equal to the + // proposed spending limit. + google.protobuf.Int64Value approved_spending_limit_micros = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The approved spending limit as a well-defined type, e.g. INFINITE. This + // will only be populated if the approved spending limit is INFINITE. + google.ads.googleads.v3.enums.SpendingLimitTypeEnum.SpendingLimitType approved_spending_limit_type = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The spending limit after adjustments have been applied. Adjustments are + // stored in total_adjustments_micros. + // + // This value has the final say on how much the account is allowed to spend. + oneof adjusted_spending_limit { + // Output only. The adjusted spending limit in micros. One million is equivalent to + // one unit. + // + // If the approved spending limit is finite, the adjusted + // spending limit may vary depending on the types of adjustments applied + // to this budget, if applicable. + // + // The different kinds of adjustments are described here: + // https://support.google.com/google-ads/answer/1704323 + // + // For example, a debit adjustment reduces how much the account is + // allowed to spend. + google.protobuf.Int64Value adjusted_spending_limit_micros = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The adjusted spending limit as a well-defined type, e.g. INFINITE. + // This will only be populated if the adjusted spending limit is INFINITE, + // which is guaranteed to be true if the approved spending limit is + // INFINITE. + google.ads.googleads.v3.enums.SpendingLimitTypeEnum.SpendingLimitType adjusted_spending_limit_type = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} diff --git a/google/ads/googleads/v3/resources/account_budget_proposal.proto b/google/ads/googleads/v3/resources/account_budget_proposal.proto new file mode 100644 index 000000000..5c0c635d4 --- /dev/null +++ b/google/ads/googleads/v3/resources/account_budget_proposal.proto @@ -0,0 +1,161 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/account_budget_proposal_status.proto"; +import "google/ads/googleads/v3/enums/account_budget_proposal_type.proto"; +import "google/ads/googleads/v3/enums/spending_limit_type.proto"; +import "google/ads/googleads/v3/enums/time_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetProposalProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the AccountBudgetProposal resource. + +// An account-level budget proposal. +// +// All fields prefixed with 'proposed' may not necessarily be applied directly. +// For example, proposed spending limits may be adjusted before their +// application. This is true if the 'proposed' field has an 'approved' +// counterpart, e.g. spending limits. +// +// Please note that the proposal type (proposal_type) changes which fields are +// required and which must remain empty. +message AccountBudgetProposal { + option (google.api.resource) = { + type: "googleads.googleapis.com/AccountBudgetProposal" + pattern: "customers/{customer}/accountBudgetProposals/{account_budget_proposal}" + }; + + // Immutable. The resource name of the proposal. + // AccountBudgetProposal resource names have the form: + // + // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudgetProposal" + } + ]; + + // Output only. The ID of the proposal. + google.protobuf.Int64Value id = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The resource name of the billing setup associated with this proposal. + google.protobuf.StringValue billing_setup = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BillingSetup" + } + ]; + + // Immutable. The resource name of the account-level budget associated with this + // proposal. + google.protobuf.StringValue account_budget = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudget" + } + ]; + + // Immutable. The type of this proposal, e.g. END to end the budget associated with this + // proposal. + google.ads.googleads.v3.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The status of this proposal. + // When a new proposal is created, the status defaults to PENDING. + google.ads.googleads.v3.enums.AccountBudgetProposalStatusEnum.AccountBudgetProposalStatus status = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The name to assign to the account-level budget. + google.protobuf.StringValue proposed_name = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The approved start date time in yyyy-mm-dd hh:mm:ss format. + google.protobuf.StringValue approved_start_date_time = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. A purchase order number is a value that enables the user to help them + // reference this budget in their monthly invoices. + google.protobuf.StringValue proposed_purchase_order_number = 12 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Notes associated with this budget. + google.protobuf.StringValue proposed_notes = 13 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The date time when this account-level budget proposal was created, which is + // not the same as its approval date time, if applicable. + google.protobuf.StringValue creation_date_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The date time when this account-level budget was approved, if applicable. + google.protobuf.StringValue approval_date_time = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The proposed start date time of the account-level budget, which cannot be + // in the past. + oneof proposed_start_time { + // Immutable. The proposed start date time in yyyy-mm-dd hh:mm:ss format. + google.protobuf.StringValue proposed_start_date_time = 18 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The proposed start date time as a well-defined type, e.g. NOW. + google.ads.googleads.v3.enums.TimeTypeEnum.TimeType proposed_start_time_type = 7 [(google.api.field_behavior) = IMMUTABLE]; + } + + // The proposed end date time of the account-level budget, which cannot be in + // the past. + oneof proposed_end_time { + // Immutable. The proposed end date time in yyyy-mm-dd hh:mm:ss format. + google.protobuf.StringValue proposed_end_date_time = 19 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The proposed end date time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v3.enums.TimeTypeEnum.TimeType proposed_end_time_type = 9 [(google.api.field_behavior) = IMMUTABLE]; + } + + // The approved end date time of the account-level budget. + oneof approved_end_time { + // Output only. The approved end date time in yyyy-mm-dd hh:mm:ss format. + google.protobuf.StringValue approved_end_date_time = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The approved end date time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v3.enums.TimeTypeEnum.TimeType approved_end_time_type = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The proposed spending limit. + oneof proposed_spending_limit { + // Immutable. The proposed spending limit in micros. One million is equivalent to + // one unit. + google.protobuf.Int64Value proposed_spending_limit_micros = 10 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The proposed spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v3.enums.SpendingLimitTypeEnum.SpendingLimitType proposed_spending_limit_type = 11 [(google.api.field_behavior) = IMMUTABLE]; + } + + // The approved spending limit. + oneof approved_spending_limit { + // Output only. The approved spending limit in micros. One million is equivalent to + // one unit. + google.protobuf.Int64Value approved_spending_limit_micros = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The approved spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v3.enums.SpendingLimitTypeEnum.SpendingLimitType approved_spending_limit_type = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} diff --git a/google/ads/googleads/v3/resources/ad.proto b/google/ads/googleads/v3/resources/ad.proto new file mode 100644 index 000000000..68138fd72 --- /dev/null +++ b/google/ads/googleads/v3/resources/ad.proto @@ -0,0 +1,178 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/ad_type_infos.proto"; +import "google/ads/googleads/v3/common/custom_parameter.proto"; +import "google/ads/googleads/v3/common/final_app_url.proto"; +import "google/ads/googleads/v3/common/url_collection.proto"; +import "google/ads/googleads/v3/enums/ad_type.proto"; +import "google/ads/googleads/v3/enums/device.proto"; +import "google/ads/googleads/v3/enums/system_managed_entity_source.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ad type. + +// An ad. +message Ad { + option (google.api.resource) = { + type: "googleads.googleapis.com/Ad" + pattern: "customers/{customer}/ads/{ad}" + }; + + // Immutable. The resource name of the ad. + // Ad resource names have the form: + // + // `customers/{customer_id}/ads/{ad_id}` + string resource_name = 37 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Ad" + } + ]; + + // Output only. The ID of the ad. + google.protobuf.Int64Value id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The list of possible final URLs after all cross-domain redirects for the + // ad. + repeated google.protobuf.StringValue final_urls = 2; + + // A list of final app URLs that will be used on mobile if the user has the + // specific app installed. + repeated google.ads.googleads.v3.common.FinalAppUrl final_app_urls = 35; + + // The list of possible final mobile URLs after all cross-domain redirects + // for the ad. + repeated google.protobuf.StringValue final_mobile_urls = 16; + + // The URL template for constructing a tracking URL. + google.protobuf.StringValue tracking_url_template = 12; + + // The suffix to use when constructing a final URL. + google.protobuf.StringValue final_url_suffix = 38; + + // The list of mappings that can be used to substitute custom parameter tags + // in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + // For mutates, please use url custom parameter operations. + repeated google.ads.googleads.v3.common.CustomParameter url_custom_parameters = 10; + + // The URL that appears in the ad description for some ad formats. + google.protobuf.StringValue display_url = 4; + + // Output only. The type of ad. + google.ads.googleads.v3.enums.AdTypeEnum.AdType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates if this ad was automatically added by Google Ads and not by a + // user. For example, this could happen when ads are automatically created as + // suggestions for new ads based on knowledge of how existing ads are + // performing. + google.protobuf.BoolValue added_by_google_ads = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The device preference for the ad. You can only specify a preference for + // mobile devices. When this preference is set the ad will be preferred over + // other ads when being displayed on a mobile device. The ad can still be + // displayed on other device types, e.g. if no other ads are available. + // If unspecified (no device preference), all devices are targeted. + // This is only supported by some ad types. + google.ads.googleads.v3.enums.DeviceEnum.Device device_preference = 20; + + // Additional URLs for the ad that are tagged with a unique identifier that + // can be referenced from other fields in the ad. + repeated google.ads.googleads.v3.common.UrlCollection url_collections = 26; + + // Immutable. The name of the ad. This is only used to be able to identify the ad. It + // does not need to be unique and does not affect the served ad. + google.protobuf.StringValue name = 23 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. If this ad is system managed, then this field will indicate the source. + // This field is read-only. + google.ads.googleads.v3.enums.SystemManagedResourceSourceEnum.SystemManagedResourceSource system_managed_resource_source = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Details pertinent to the ad type. Exactly one value must be set. + oneof ad_data { + // Details pertaining to a text ad. + google.ads.googleads.v3.common.TextAdInfo text_ad = 6; + + // Details pertaining to an expanded text ad. + google.ads.googleads.v3.common.ExpandedTextAdInfo expanded_text_ad = 7; + + // Details pertaining to a call-only ad. + google.ads.googleads.v3.common.CallOnlyAdInfo call_only_ad = 13; + + // Details pertaining to an Expanded Dynamic Search Ad. + // This type of ad has its headline, final URLs, and display URL + // auto-generated at serving time according to domain name specific + // information provided by `dynamic_search_ads_setting` linked at the + // campaign level. + google.ads.googleads.v3.common.ExpandedDynamicSearchAdInfo expanded_dynamic_search_ad = 14; + + // Details pertaining to a hotel ad. + google.ads.googleads.v3.common.HotelAdInfo hotel_ad = 15; + + // Details pertaining to a Smart Shopping ad. + google.ads.googleads.v3.common.ShoppingSmartAdInfo shopping_smart_ad = 17; + + // Details pertaining to a Shopping product ad. + google.ads.googleads.v3.common.ShoppingProductAdInfo shopping_product_ad = 18; + + // Details pertaining to a Gmail ad. + google.ads.googleads.v3.common.GmailAdInfo gmail_ad = 21; + + // Details pertaining to an Image ad. + google.ads.googleads.v3.common.ImageAdInfo image_ad = 22; + + // Details pertaining to a Video ad. + google.ads.googleads.v3.common.VideoAdInfo video_ad = 24; + + // Details pertaining to a responsive search ad. + google.ads.googleads.v3.common.ResponsiveSearchAdInfo responsive_search_ad = 25; + + // Details pertaining to a legacy responsive display ad. + google.ads.googleads.v3.common.LegacyResponsiveDisplayAdInfo legacy_responsive_display_ad = 28; + + // Details pertaining to an app ad. + google.ads.googleads.v3.common.AppAdInfo app_ad = 29; + + // Immutable. Details pertaining to a legacy app install ad. + google.ads.googleads.v3.common.LegacyAppInstallAdInfo legacy_app_install_ad = 30 [(google.api.field_behavior) = IMMUTABLE]; + + // Details pertaining to a responsive display ad. + google.ads.googleads.v3.common.ResponsiveDisplayAdInfo responsive_display_ad = 31; + + // Details pertaining to a display upload ad. + google.ads.googleads.v3.common.DisplayUploadAdInfo display_upload_ad = 33; + + // Details pertaining to an app engagement ad. + google.ads.googleads.v3.common.AppEngagementAdInfo app_engagement_ad = 34; + + // Details pertaining to a Shopping Comparison Listing ad. + google.ads.googleads.v3.common.ShoppingComparisonListingAdInfo shopping_comparison_listing_ad = 36; + } +} diff --git a/google/ads/googleads/v3/resources/ad_group.proto b/google/ads/googleads/v3/resources/ad_group.proto new file mode 100644 index 000000000..271f2954f --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_group.proto @@ -0,0 +1,177 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/custom_parameter.proto"; +import "google/ads/googleads/v3/common/explorer_auto_optimizer_setting.proto"; +import "google/ads/googleads/v3/common/targeting_setting.proto"; +import "google/ads/googleads/v3/enums/ad_group_ad_rotation_mode.proto"; +import "google/ads/googleads/v3/enums/ad_group_status.proto"; +import "google/ads/googleads/v3/enums/ad_group_type.proto"; +import "google/ads/googleads/v3/enums/bidding_source.proto"; +import "google/ads/googleads/v3/enums/targeting_dimension.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ad group resource. + +// An ad group. +message AdGroup { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroup" + pattern: "customers/{customer}/adGroups/{ad_group}" + }; + + // Immutable. The resource name of the ad group. + // Ad group resource names have the form: + // + // `customers/{customer_id}/adGroups/{ad_group_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Output only. The ID of the ad group. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The name of the ad group. + // + // This field is required and should not be empty when creating new ad + // groups. + // + // It must contain fewer than 255 UTF-8 full-width characters. + // + // It must not contain any null (code point 0x0), NL line feed + // (code point 0xA) or carriage return (code point 0xD) characters. + google.protobuf.StringValue name = 4; + + // The status of the ad group. + google.ads.googleads.v3.enums.AdGroupStatusEnum.AdGroupStatus status = 5; + + // Immutable. The type of the ad group. + google.ads.googleads.v3.enums.AdGroupTypeEnum.AdGroupType type = 12 [(google.api.field_behavior) = IMMUTABLE]; + + // The ad rotation mode of the ad group. + google.ads.googleads.v3.enums.AdGroupAdRotationModeEnum.AdGroupAdRotationMode ad_rotation_mode = 22; + + // Output only. For draft or experiment ad groups, this field is the resource name of the + // base ad group from which this ad group was created. If a draft or + // experiment ad group does not have a base ad group, then this field is null. + // + // For base ad groups, this field equals the ad group resource name. + // + // This field is read-only. + google.protobuf.StringValue base_ad_group = 18 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // The URL template for constructing a tracking URL. + google.protobuf.StringValue tracking_url_template = 13; + + // The list of mappings used to substitute custom parameter tags in a + // `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + repeated google.ads.googleads.v3.common.CustomParameter url_custom_parameters = 6; + + // Immutable. The campaign to which the ad group belongs. + google.protobuf.StringValue campaign = 10 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // The maximum CPC (cost-per-click) bid. + google.protobuf.Int64Value cpc_bid_micros = 14; + + // The maximum CPM (cost-per-thousand viewable impressions) bid. + google.protobuf.Int64Value cpm_bid_micros = 15; + + // The target CPA (cost-per-acquisition). + google.protobuf.Int64Value target_cpa_micros = 27; + + // Output only. The CPV (cost-per-view) bid. + google.protobuf.Int64Value cpv_bid_micros = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Average amount in micros that the advertiser is willing to pay for every + // thousand times the ad is shown. + google.protobuf.Int64Value target_cpm_micros = 26; + + // The target ROAS (return-on-ad-spend) override. If the ad group's campaign + // bidding strategy is a standard Target ROAS strategy, then this field + // overrides the target ROAS specified in the campaign's bidding strategy. + // Otherwise, this value is ignored. + google.protobuf.DoubleValue target_roas = 30; + + // The percent cpc bid amount, expressed as a fraction of the advertised price + // for some good or service. The valid range for the fraction is [0,1) and the + // value stored here is 1,000,000 * [fraction]. + google.protobuf.Int64Value percent_cpc_bid_micros = 20; + + // Settings for the Display Campaign Optimizer, initially termed "Explorer". + google.ads.googleads.v3.common.ExplorerAutoOptimizerSetting explorer_auto_optimizer_setting = 21; + + // Allows advertisers to specify a targeting dimension on which to place + // absolute bids. This is only applicable for campaigns that target only the + // display network and not search. + google.ads.googleads.v3.enums.TargetingDimensionEnum.TargetingDimension display_custom_bid_dimension = 23; + + // URL template for appending params to Final URL. + google.protobuf.StringValue final_url_suffix = 24; + + // Setting for targeting related features. + google.ads.googleads.v3.common.TargetingSetting targeting_setting = 25; + + // Output only. The effective target CPA (cost-per-acquisition). + // This field is read-only. + google.protobuf.Int64Value effective_target_cpa_micros = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Source of the effective target CPA. + // This field is read-only. + google.ads.googleads.v3.enums.BiddingSourceEnum.BiddingSource effective_target_cpa_source = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The effective target ROAS (return-on-ad-spend). + // This field is read-only. + google.protobuf.DoubleValue effective_target_roas = 31 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Source of the effective target ROAS. + // This field is read-only. + google.ads.googleads.v3.enums.BiddingSourceEnum.BiddingSource effective_target_roas_source = 32 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource names of labels attached to this ad group. + repeated google.protobuf.StringValue labels = 33 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupLabel" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/ad_group_ad.proto b/google/ads/googleads/v3/resources/ad_group_ad.proto new file mode 100644 index 000000000..3210f075e --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_group_ad.proto @@ -0,0 +1,91 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/policy.proto"; +import "google/ads/googleads/v3/enums/ad_group_ad_status.proto"; +import "google/ads/googleads/v3/enums/ad_strength.proto"; +import "google/ads/googleads/v3/enums/policy_approval_status.proto"; +import "google/ads/googleads/v3/enums/policy_review_status.proto"; +import "google/ads/googleads/v3/resources/ad.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ad group ad resource. + +// An ad group ad. +message AdGroupAd { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupAd" + pattern: "customers/{customer}/adGroupAds/{ad_group_ad}" + }; + + // Immutable. The resource name of the ad. + // Ad group ad resource names have the form: + // + // `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; + + // The status of the ad. + google.ads.googleads.v3.enums.AdGroupAdStatusEnum.AdGroupAdStatus status = 3; + + // Immutable. The ad group to which the ad belongs. + google.protobuf.StringValue ad_group = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Immutable. The ad. + Ad ad = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Policy information for the ad. + AdGroupAdPolicySummary policy_summary = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Overall ad strength for this ad group ad. + google.ads.googleads.v3.enums.AdStrengthEnum.AdStrength ad_strength = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains policy information for an ad. +message AdGroupAdPolicySummary { + // Output only. The list of policy findings for this ad. + repeated google.ads.googleads.v3.common.PolicyTopicEntry policy_topic_entries = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Where in the review process this ad is. + google.ads.googleads.v3.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The overall approval status of this ad, calculated based on the status of + // its individual policy topic entries. + google.ads.googleads.v3.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/ad_group_ad_asset_view.proto b/google/ads/googleads/v3/resources/ad_group_ad_asset_view.proto new file mode 100644 index 000000000..624228af4 --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_group_ad_asset_view.proto @@ -0,0 +1,95 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/policy.proto"; +import "google/ads/googleads/v3/enums/asset_field_type.proto"; +import "google/ads/googleads/v3/enums/asset_performance_label.proto"; +import "google/ads/googleads/v3/enums/policy_approval_status.proto"; +import "google/ads/googleads/v3/enums/policy_review_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdAssetViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ad group ad asset view resource. + +// A link between an AdGroupAd and an Asset. +message AdGroupAdAssetView { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupAdAssetView" + pattern: "customers/{customer}/adGroupAdAssets/{ad_group_ad_asset_view}" + }; + + // Output only. The resource name of the ad group ad asset view. + // Ad group ad asset view resource names have the form: + // + // `customers/{customer_id}/adGroupAdAssets/{AdGroupAdAsset.ad_group_id}~{AdGroupAdAsset.ad.ad_id}~{AdGroupAdAsset.asset_id}~{AdGroupAdAsset.asset_field_type}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAdAssetView" + } + ]; + + // Output only. The ad group ad to which the asset is linked. + google.protobuf.StringValue ad_group_ad = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; + + // Output only. The asset which is linked to the ad group ad. + google.protobuf.StringValue asset = 6 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Asset" + } + ]; + + // Output only. Role that the asset takes in the ad. + google.ads.googleads.v3.enums.AssetFieldTypeEnum.AssetFieldType field_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Policy information for the ad group ad asset. + AdGroupAdAssetPolicySummary policy_summary = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Performance of an asset linkage. + google.ads.googleads.v3.enums.AssetPerformanceLabelEnum.AssetPerformanceLabel performance_label = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains policy information for an ad group ad asset. +message AdGroupAdAssetPolicySummary { + // Output only. The list of policy findings for the ad group ad asset. + repeated google.ads.googleads.v3.common.PolicyTopicEntry policy_topic_entries = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Where in the review process this ad group ad asset is. + google.ads.googleads.v3.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The overall approval status of this ad group ad asset, calculated based on + // the status of its individual policy topic entries. + google.ads.googleads.v3.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/ad_group_ad_label.proto b/google/ads/googleads/v3/resources/ad_group_ad_label.proto new file mode 100644 index 000000000..21e1f6719 --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_group_ad_label.proto @@ -0,0 +1,67 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdLabelProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ad group ad label resource. + +// A relationship between an ad group ad and a label. +message AdGroupAdLabel { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupAdLabel" + pattern: "customers/{customer}/adGroupAdLabels/{ad_group_ad_label}" + }; + + // Immutable. The resource name of the ad group ad label. + // Ad group ad label resource names have the form: + // `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAdLabel" + } + ]; + + // Immutable. The ad group ad to which the label is attached. + google.protobuf.StringValue ad_group_ad = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; + + // Immutable. The label assigned to the ad group ad. + google.protobuf.StringValue label = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/ad_group_audience_view.proto b/google/ads/googleads/v3/resources/ad_group_audience_view.proto new file mode 100644 index 000000000..db25b8126 --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_group_audience_view.proto @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAudienceViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ad group audience view resource. + +// An ad group audience view. +// Includes performance data from interests and remarketing lists for Display +// Network and YouTube Network ads, and remarketing lists for search ads (RLSA), +// aggregated at the audience level. +message AdGroupAudienceView { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupAudienceView" + pattern: "customers/{customer}/adGroupAudienceViews/{ad_group_audience_view}" + }; + + // Output only. The resource name of the ad group audience view. + // Ad group audience view resource names have the form: + // + // `customers/{customer_id}/adGroupAudienceViews/{ad_group_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAudienceView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/ad_group_bid_modifier.proto b/google/ads/googleads/v3/resources/ad_group_bid_modifier.proto new file mode 100644 index 000000000..0590f64f4 --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_group_bid_modifier.proto @@ -0,0 +1,108 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/criteria.proto"; +import "google/ads/googleads/v3/enums/bid_modifier_source.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupBidModifierProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ad group bid modifier resource. + +// Represents an ad group bid modifier. +message AdGroupBidModifier { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupBidModifier" + pattern: "customers/{customer}/adGroupBidModifiers/{ad_group_bid_modifier}" + }; + + // Immutable. The resource name of the ad group bid modifier. + // Ad group bid modifier resource names have the form: + // + // `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupBidModifier" + } + ]; + + // Immutable. The ad group to which this criterion belongs. + google.protobuf.StringValue ad_group = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Output only. The ID of the criterion to bid modify. + // + // This field is ignored for mutates. + google.protobuf.Int64Value criterion_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The modifier for the bid when the criterion matches. The modifier must be + // in the range: 0.1 - 10.0. The range is 1.0 - 6.0 for PreferredContent. + // Use 0 to opt out of a Device type. + google.protobuf.DoubleValue bid_modifier = 4; + + // Output only. The base ad group from which this draft/trial adgroup bid modifier was + // created. If ad_group is a base ad group then this field will be equal to + // ad_group. If the ad group was created in the draft or trial and has no + // corresponding base ad group, then this field will be null. + // This field is readonly. + google.protobuf.StringValue base_ad_group = 9 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Output only. Bid modifier source. + google.ads.googleads.v3.enums.BidModifierSourceEnum.BidModifierSource bid_modifier_source = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The criterion of this ad group bid modifier. + oneof criterion { + // Immutable. Criterion for hotel date selection (default dates vs. user selected). + google.ads.googleads.v3.common.HotelDateSelectionTypeInfo hotel_date_selection_type = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Criterion for number of days prior to the stay the booking is being made. + google.ads.googleads.v3.common.HotelAdvanceBookingWindowInfo hotel_advance_booking_window = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Criterion for length of hotel stay in nights. + google.ads.googleads.v3.common.HotelLengthOfStayInfo hotel_length_of_stay = 7 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Criterion for day of the week the booking is for. + google.ads.googleads.v3.common.HotelCheckInDayInfo hotel_check_in_day = 8 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. A device criterion. + google.ads.googleads.v3.common.DeviceInfo device = 11 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. A preferred content criterion. + google.ads.googleads.v3.common.PreferredContentInfo preferred_content = 12 [(google.api.field_behavior) = IMMUTABLE]; + } +} diff --git a/google/ads/googleads/v3/resources/ad_group_criterion.proto b/google/ads/googleads/v3/resources/ad_group_criterion.proto new file mode 100644 index 000000000..c992cf2d9 --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_group_criterion.proto @@ -0,0 +1,256 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/criteria.proto"; +import "google/ads/googleads/v3/common/custom_parameter.proto"; +import "google/ads/googleads/v3/enums/ad_group_criterion_approval_status.proto"; +import "google/ads/googleads/v3/enums/ad_group_criterion_status.proto"; +import "google/ads/googleads/v3/enums/bidding_source.proto"; +import "google/ads/googleads/v3/enums/criterion_system_serving_status.proto"; +import "google/ads/googleads/v3/enums/criterion_type.proto"; +import "google/ads/googleads/v3/enums/quality_score_bucket.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ad group criterion resource. + +// An ad group criterion. +message AdGroupCriterion { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupCriterion" + pattern: "customers/{customer}/adGroupCriteria/{ad_group_criterion}" + }; + + // A container for ad group criterion quality information. + message QualityInfo { + // Output only. The quality score. + // + // This field may not be populated if Google does not have enough + // information to determine a value. + google.protobuf.Int32Value quality_score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The performance of the ad compared to other advertisers. + google.ads.googleads.v3.enums.QualityScoreBucketEnum.QualityScoreBucket creative_quality_score = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The quality score of the landing page. + google.ads.googleads.v3.enums.QualityScoreBucketEnum.QualityScoreBucket post_click_quality_score = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The click-through rate compared to that of other advertisers. + google.ads.googleads.v3.enums.QualityScoreBucketEnum.QualityScoreBucket search_predicted_ctr = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Estimates for criterion bids at various positions. + message PositionEstimates { + // Output only. The estimate of the CPC bid required for ad to be shown on first + // page of search results. + google.protobuf.Int64Value first_page_cpc_micros = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The estimate of the CPC bid required for ad to be displayed in first + // position, at the top of the first page of search results. + google.protobuf.Int64Value first_position_cpc_micros = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The estimate of the CPC bid required for ad to be displayed at the top + // of the first page of search results. + google.protobuf.Int64Value top_of_page_cpc_micros = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Estimate of how many clicks per week you might get by changing your + // keyword bid to the value in first_position_cpc_micros. + google.protobuf.Int64Value estimated_add_clicks_at_first_position_cpc = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Estimate of how your cost per week might change when changing your + // keyword bid to the value in first_position_cpc_micros. + google.protobuf.Int64Value estimated_add_cost_at_first_position_cpc = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Immutable. The resource name of the ad group criterion. + // Ad group criterion resource names have the form: + // + // `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; + + // Output only. The ID of the criterion. + // + // This field is ignored for mutates. + google.protobuf.Int64Value criterion_id = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The status of the criterion. + google.ads.googleads.v3.enums.AdGroupCriterionStatusEnum.AdGroupCriterionStatus status = 3; + + // Output only. Information regarding the quality of the criterion. + QualityInfo quality_info = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The ad group to which the criterion belongs. + google.protobuf.StringValue ad_group = 5 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Output only. The type of the criterion. + google.ads.googleads.v3.enums.CriterionTypeEnum.CriterionType type = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Whether to target (`false`) or exclude (`true`) the criterion. + // + // This field is immutable. To switch a criterion from positive to negative, + // remove then re-add it. + google.protobuf.BoolValue negative = 31 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Serving status of the criterion. + google.ads.googleads.v3.enums.CriterionSystemServingStatusEnum.CriterionSystemServingStatus system_serving_status = 52 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Approval status of the criterion. + google.ads.googleads.v3.enums.AdGroupCriterionApprovalStatusEnum.AdGroupCriterionApprovalStatus approval_status = 53 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The modifier for the bid when the criterion matches. The modifier must be + // in the range: 0.1 - 10.0. Most targetable criteria types support modifiers. + google.protobuf.DoubleValue bid_modifier = 44; + + // The CPC (cost-per-click) bid. + google.protobuf.Int64Value cpc_bid_micros = 16; + + // The CPM (cost-per-thousand viewable impressions) bid. + google.protobuf.Int64Value cpm_bid_micros = 17; + + // The CPV (cost-per-view) bid. + google.protobuf.Int64Value cpv_bid_micros = 24; + + // The CPC bid amount, expressed as a fraction of the advertised price + // for some good or service. The valid range for the fraction is [0,1) and the + // value stored here is 1,000,000 * [fraction]. + google.protobuf.Int64Value percent_cpc_bid_micros = 33; + + // Output only. The effective CPC (cost-per-click) bid. + google.protobuf.Int64Value effective_cpc_bid_micros = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The effective CPM (cost-per-thousand viewable impressions) bid. + google.protobuf.Int64Value effective_cpm_bid_micros = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The effective CPV (cost-per-view) bid. + google.protobuf.Int64Value effective_cpv_bid_micros = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The effective Percent CPC bid amount. + google.protobuf.Int64Value effective_percent_cpc_bid_micros = 34 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Source of the effective CPC bid. + google.ads.googleads.v3.enums.BiddingSourceEnum.BiddingSource effective_cpc_bid_source = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Source of the effective CPM bid. + google.ads.googleads.v3.enums.BiddingSourceEnum.BiddingSource effective_cpm_bid_source = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Source of the effective CPV bid. + google.ads.googleads.v3.enums.BiddingSourceEnum.BiddingSource effective_cpv_bid_source = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Source of the effective Percent CPC bid. + google.ads.googleads.v3.enums.BiddingSourceEnum.BiddingSource effective_percent_cpc_bid_source = 35 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Estimates for criterion bids at various positions. + PositionEstimates position_estimates = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The list of possible final URLs after all cross-domain redirects for the + // ad. + repeated google.protobuf.StringValue final_urls = 11; + + // The list of possible final mobile URLs after all cross-domain redirects. + repeated google.protobuf.StringValue final_mobile_urls = 51; + + // URL template for appending params to final URL. + google.protobuf.StringValue final_url_suffix = 50; + + // The URL template for constructing a tracking URL. + google.protobuf.StringValue tracking_url_template = 13; + + // The list of mappings used to substitute custom parameter tags in a + // `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + repeated google.ads.googleads.v3.common.CustomParameter url_custom_parameters = 14; + + // The ad group criterion. + // + // Exactly one must be set. + oneof criterion { + // Immutable. Keyword. + google.ads.googleads.v3.common.KeywordInfo keyword = 27 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Placement. + google.ads.googleads.v3.common.PlacementInfo placement = 28 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Mobile app category. + google.ads.googleads.v3.common.MobileAppCategoryInfo mobile_app_category = 29 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Mobile application. + google.ads.googleads.v3.common.MobileApplicationInfo mobile_application = 30 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Listing group. + google.ads.googleads.v3.common.ListingGroupInfo listing_group = 32 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Age range. + google.ads.googleads.v3.common.AgeRangeInfo age_range = 36 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Gender. + google.ads.googleads.v3.common.GenderInfo gender = 37 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Income range. + google.ads.googleads.v3.common.IncomeRangeInfo income_range = 38 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Parental status. + google.ads.googleads.v3.common.ParentalStatusInfo parental_status = 39 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. User List. + google.ads.googleads.v3.common.UserListInfo user_list = 42 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. YouTube Video. + google.ads.googleads.v3.common.YouTubeVideoInfo youtube_video = 40 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. YouTube Channel. + google.ads.googleads.v3.common.YouTubeChannelInfo youtube_channel = 41 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Topic. + google.ads.googleads.v3.common.TopicInfo topic = 43 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. User Interest. + google.ads.googleads.v3.common.UserInterestInfo user_interest = 45 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Webpage + google.ads.googleads.v3.common.WebpageInfo webpage = 46 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. App Payment Model. + google.ads.googleads.v3.common.AppPaymentModelInfo app_payment_model = 47 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Custom Affinity. + google.ads.googleads.v3.common.CustomAffinityInfo custom_affinity = 48 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Custom Intent. + google.ads.googleads.v3.common.CustomIntentInfo custom_intent = 49 [(google.api.field_behavior) = IMMUTABLE]; + } +} diff --git a/google/ads/googleads/v3/resources/ad_group_criterion_label.proto b/google/ads/googleads/v3/resources/ad_group_criterion_label.proto new file mode 100644 index 000000000..54b131677 --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_group_criterion_label.proto @@ -0,0 +1,67 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionLabelProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ad group criterion label resource. + +// A relationship between an ad group criterion and a label. +message AdGroupCriterionLabel { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupCriterionLabel" + pattern: "customers/{customer}/adGroupCriterionLabels/{ad_group_criterion_label}" + }; + + // Immutable. The resource name of the ad group criterion label. + // Ad group criterion label resource names have the form: + // `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterionLabel" + } + ]; + + // Immutable. The ad group criterion to which the label is attached. + google.protobuf.StringValue ad_group_criterion = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; + + // Immutable. The label assigned to the ad group criterion. + google.protobuf.StringValue label = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/ad_group_criterion_simulation.proto b/google/ads/googleads/v3/resources/ad_group_criterion_simulation.proto new file mode 100644 index 000000000..4b5e73154 --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_group_criterion_simulation.proto @@ -0,0 +1,85 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/simulation.proto"; +import "google/ads/googleads/v3/enums/simulation_modification_method.proto"; +import "google/ads/googleads/v3/enums/simulation_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionSimulationProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ad group criterion simulation resource. + +// An ad group criterion simulation. Supported combinations of advertising +// channel type, criterion type, simulation type, and simulation modification +// method are detailed below respectively. +// +// 1. DISPLAY - KEYWORD - CPC_BID - UNIFORM +// 2. SEARCH - KEYWORD - CPC_BID - UNIFORM +// 3. SHOPPING - LISTING_GROUP - CPC_BID - UNIFORM +message AdGroupCriterionSimulation { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupCriterionSimulation" + pattern: "customers/{customer}/adGroupCriterionSimulations/{ad_group_criterion_simulation}" + }; + + // Output only. The resource name of the ad group criterion simulation. + // Ad group criterion simulation resource names have the form: + // + // `customers/{customer_id}/adGroupCriterionSimulations/{ad_group_id}~{criterion_id}~{type}~{modification_method}~{start_date}~{end_date}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterionSimulation" + } + ]; + + // Output only. AdGroup ID of the simulation. + google.protobuf.Int64Value ad_group_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Criterion ID of the simulation. + google.protobuf.Int64Value criterion_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The field that the simulation modifies. + google.ads.googleads.v3.enums.SimulationTypeEnum.SimulationType type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How the simulation modifies the field. + google.ads.googleads.v3.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue end_date = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // List of simulation points. + oneof point_list { + // Output only. Simulation points if the simulation type is CPC_BID. + google.ads.googleads.v3.common.CpcBidSimulationPointList cpc_bid_point_list = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} diff --git a/google/ads/googleads/v3/resources/ad_group_extension_setting.proto b/google/ads/googleads/v3/resources/ad_group_extension_setting.proto new file mode 100644 index 000000000..5dabbcf4d --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_group_extension_setting.proto @@ -0,0 +1,80 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/extension_setting_device.proto"; +import "google/ads/googleads/v3/enums/extension_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupExtensionSettingProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the AdGroupExtensionSetting resource. + +// An ad group extension setting. +message AdGroupExtensionSetting { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupExtensionSetting" + pattern: "customers/{customer}/adGroupExtensionSettings/{ad_group_extension_setting}" + }; + + // Immutable. The resource name of the ad group extension setting. + // AdGroupExtensionSetting resource names have the form: + // + // `customers/{customer_id}/adGroupExtensionSettings/{ad_group_id}~{extension_type}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupExtensionSetting" + } + ]; + + // Immutable. The extension type of the ad group extension setting. + google.ads.googleads.v3.enums.ExtensionTypeEnum.ExtensionType extension_type = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The resource name of the ad group. The linked extension feed items will + // serve under this ad group. + // AdGroup resource names have the form: + // + // `customers/{customer_id}/adGroups/{ad_group_id}` + google.protobuf.StringValue ad_group = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // The resource names of the extension feed items to serve under the ad group. + // ExtensionFeedItem resource names have the form: + // + // `customers/{customer_id}/extensionFeedItems/{feed_item_id}` + repeated google.protobuf.StringValue extension_feed_items = 4 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + }]; + + // The device for which the extensions will serve. Optional. + google.ads.googleads.v3.enums.ExtensionSettingDeviceEnum.ExtensionSettingDevice device = 5; +} diff --git a/google/ads/googleads/v3/resources/ad_group_feed.proto b/google/ads/googleads/v3/resources/ad_group_feed.proto new file mode 100644 index 000000000..f3ed3fca7 --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_group_feed.proto @@ -0,0 +1,84 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/matching_function.proto"; +import "google/ads/googleads/v3/enums/feed_link_status.proto"; +import "google/ads/googleads/v3/enums/placeholder_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupFeedProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the AdGroupFeed resource. + +// An ad group feed. +message AdGroupFeed { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupFeed" + pattern: "customers/{customer}/adGroupFeeds/{ad_group_feed}" + }; + + // Immutable. The resource name of the ad group feed. + // Ad group feed resource names have the form: + // + // `customers/{customer_id}/adGroupFeeds/{ad_group_id}~{feed_id} + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupFeed" + } + ]; + + // Immutable. The feed being linked to the ad group. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + + // Immutable. The ad group being linked to the feed. + google.protobuf.StringValue ad_group = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Indicates which placeholder types the feed may populate under the connected + // ad group. Required. + repeated google.ads.googleads.v3.enums.PlaceholderTypeEnum.PlaceholderType placeholder_types = 4; + + // Matching function associated with the AdGroupFeed. + // The matching function is used to filter the set of feed items selected. + // Required. + google.ads.googleads.v3.common.MatchingFunction matching_function = 5; + + // Output only. Status of the ad group feed. + // This field is read-only. + google.ads.googleads.v3.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/ad_group_label.proto b/google/ads/googleads/v3/resources/ad_group_label.proto new file mode 100644 index 000000000..e6213c35b --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_group_label.proto @@ -0,0 +1,67 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupLabelProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ad group label resource. + +// A relationship between an ad group and a label. +message AdGroupLabel { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupLabel" + pattern: "customers/{customer}/adGroupLabels/{ad_group_label}" + }; + + // Immutable. The resource name of the ad group label. + // Ad group label resource names have the form: + // `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupLabel" + } + ]; + + // Immutable. The ad group to which the label is attached. + google.protobuf.StringValue ad_group = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Immutable. The label assigned to the ad group. + google.protobuf.StringValue label = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/ad_group_simulation.proto b/google/ads/googleads/v3/resources/ad_group_simulation.proto new file mode 100644 index 000000000..d05037998 --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_group_simulation.proto @@ -0,0 +1,93 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/simulation.proto"; +import "google/ads/googleads/v3/enums/simulation_modification_method.proto"; +import "google/ads/googleads/v3/enums/simulation_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupSimulationProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ad group simulation resource. + +// An ad group simulation. Supported combinations of advertising +// channel type, simulation type and simulation modification method is +// detailed below respectively. +// +// 1. SEARCH - CPC_BID - DEFAULT +// 2. SEARCH - CPC_BID - UNIFORM +// 3. SEARCH - TARGET_CPA - UNIFORM +// 4. DISPLAY - CPC_BID - DEFAULT +// 5. DISPLAY - CPC_BID - UNIFORM +// 6. DISPLAY - TARGET_CPA - UNIFORM +// 7. VIDEO - CPV_BID - DEFAULT +// 8. VIDEO - CPV_BID - UNIFORM +message AdGroupSimulation { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdGroupSimulation" + pattern: "customers/{customer}/adGroupSimulations/{ad_group_simulation}" + }; + + // Output only. The resource name of the ad group simulation. + // Ad group simulation resource names have the form: + // + // `customers/{customer_id}/adGroupSimulations/{ad_group_id}~{type}~{modification_method}~{start_date}~{end_date}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupSimulation" + } + ]; + + // Output only. Ad group id of the simulation. + google.protobuf.Int64Value ad_group_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The field that the simulation modifies. + google.ads.googleads.v3.enums.SimulationTypeEnum.SimulationType type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How the simulation modifies the field. + google.ads.googleads.v3.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last day on which the simulation is based, in YYYY-MM-DD format + google.protobuf.StringValue end_date = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // List of simulation points. + oneof point_list { + // Output only. Simulation points if the simulation type is CPC_BID. + google.ads.googleads.v3.common.CpcBidSimulationPointList cpc_bid_point_list = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Simulation points if the simulation type is CPV_BID. + google.ads.googleads.v3.common.CpvBidSimulationPointList cpv_bid_point_list = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Simulation points if the simulation type is TARGET_CPA. + google.ads.googleads.v3.common.TargetCpaSimulationPointList target_cpa_point_list = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} diff --git a/google/ads/googleads/v3/resources/ad_parameter.proto b/google/ads/googleads/v3/resources/ad_parameter.proto new file mode 100644 index 000000000..d19383e3d --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_parameter.proto @@ -0,0 +1,83 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdParameterProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ad parameter resource. + +// An ad parameter that is used to update numeric values (such as prices or +// inventory levels) in any text line of an ad (including URLs). There can +// be a maximum of two AdParameters per ad group criterion. (One with +// parameter_index = 1 and one with parameter_index = 2.) +// In the ad the parameters are referenced by a placeholder of the form +// "{param#:value}". E.g. "{param1:$17}" +message AdParameter { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdParameter" + pattern: "customers/{customer}/adParameters/{ad_parameter}" + }; + + // Immutable. The resource name of the ad parameter. + // Ad parameter resource names have the form: + // + // `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdParameter" + } + ]; + + // Immutable. The ad group criterion that this ad parameter belongs to. + google.protobuf.StringValue ad_group_criterion = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; + + // Immutable. The unique index of this ad parameter. Must be either 1 or 2. + google.protobuf.Int64Value parameter_index = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Numeric value to insert into the ad text. The following restrictions + // apply: + // - Can use comma or period as a separator, with an optional period or + // comma (respectively) for fractional values. For example, 1,000,000.00 + // and 2.000.000,10 are valid. + // - Can be prepended or appended with a currency symbol. For example, + // $99.99 is valid. + // - Can be prepended or appended with a currency code. For example, 99.99USD + // and EUR200 are valid. + // - Can use '%'. For example, 1.0% and 1,0% are valid. + // - Can use plus or minus. For example, -10.99 and 25+ are valid. + // - Can use '/' between two numbers. For example 4/1 and 0.95/0.45 are + // valid. + google.protobuf.StringValue insertion_text = 4; +} diff --git a/google/ads/googleads/v3/resources/ad_schedule_view.proto b/google/ads/googleads/v3/resources/ad_schedule_view.proto new file mode 100644 index 000000000..3e667ac05 --- /dev/null +++ b/google/ads/googleads/v3/resources/ad_schedule_view.proto @@ -0,0 +1,52 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdScheduleViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ad schedule view resource. + +// An ad schedule view summarizes the performance of campaigns by +// AdSchedule criteria. +message AdScheduleView { + option (google.api.resource) = { + type: "googleads.googleapis.com/AdScheduleView" + pattern: "customers/{customer}/adScheduleViews/{ad_schedule_view}" + }; + + // Output only. The resource name of the ad schedule view. + // AdSchedule view resource names have the form: + // + // `customers/{customer_id}/adScheduleViews/{campaign_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdScheduleView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/age_range_view.proto b/google/ads/googleads/v3/resources/age_range_view.proto new file mode 100644 index 000000000..83b9450fc --- /dev/null +++ b/google/ads/googleads/v3/resources/age_range_view.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AgeRangeViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the age range view resource. + +// An age range view. +message AgeRangeView { + option (google.api.resource) = { + type: "googleads.googleapis.com/AgeRangeView" + pattern: "customers/{customer}/ageRangeViews/{age_range_view}" + }; + + // Output only. The resource name of the age range view. + // Age range view resource names have the form: + // + // `customers/{customer_id}/ageRangeViews/{ad_group_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AgeRangeView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/asset.proto b/google/ads/googleads/v3/resources/asset.proto new file mode 100644 index 000000000..814936872 --- /dev/null +++ b/google/ads/googleads/v3/resources/asset.proto @@ -0,0 +1,79 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/asset_types.proto"; +import "google/ads/googleads/v3/enums/asset_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AssetProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the asset resource. + +// Asset is a part of an ad which can be shared across multiple ads. +// It can be an image (ImageAsset), a video (YoutubeVideoAsset), etc. +message Asset { + option (google.api.resource) = { + type: "googleads.googleapis.com/Asset" + pattern: "customers/{customer}/assets/{asset}" + }; + + // Immutable. The resource name of the asset. + // Asset resource names have the form: + // + // `customers/{customer_id}/assets/{asset_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Asset" + } + ]; + + // Output only. The ID of the asset. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional name of the asset. + google.protobuf.StringValue name = 3; + + // Output only. Type of the asset. + google.ads.googleads.v3.enums.AssetTypeEnum.AssetType type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The specific type of the asset. + oneof asset_data { + // Immutable. A YouTube video asset. + google.ads.googleads.v3.common.YoutubeVideoAsset youtube_video_asset = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. A media bundle asset. + google.ads.googleads.v3.common.MediaBundleAsset media_bundle_asset = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. An image asset. + google.ads.googleads.v3.common.ImageAsset image_asset = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A text asset. + google.ads.googleads.v3.common.TextAsset text_asset = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} diff --git a/google/ads/googleads/v3/resources/bidding_strategy.proto b/google/ads/googleads/v3/resources/bidding_strategy.proto new file mode 100644 index 000000000..5a45e755a --- /dev/null +++ b/google/ads/googleads/v3/resources/bidding_strategy.proto @@ -0,0 +1,112 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/bidding.proto"; +import "google/ads/googleads/v3/enums/bidding_strategy_status.proto"; +import "google/ads/googleads/v3/enums/bidding_strategy_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "BiddingStrategyProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the BiddingStrategy resource + +// A bidding strategy. +message BiddingStrategy { + option (google.api.resource) = { + type: "googleads.googleapis.com/BiddingStrategy" + pattern: "customers/{customer}/biddingStrategies/{bidding_strategy}" + }; + + // Immutable. The resource name of the bidding strategy. + // Bidding strategy resource names have the form: + // + // `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BiddingStrategy" + } + ]; + + // Output only. The ID of the bidding strategy. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The name of the bidding strategy. + // All bidding strategies within an account must be named distinctly. + // + // The length of this string should be between 1 and 255, inclusive, + // in UTF-8 bytes, (trimmed). + google.protobuf.StringValue name = 4; + + // Output only. The status of the bidding strategy. + // + // This field is read-only. + google.ads.googleads.v3.enums.BiddingStrategyStatusEnum.BiddingStrategyStatus status = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the bidding strategy. + // Create a bidding strategy by setting the bidding scheme. + // + // This field is read-only. + google.ads.googleads.v3.enums.BiddingStrategyTypeEnum.BiddingStrategyType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of campaigns attached to this bidding strategy. + // + // This field is read-only. + google.protobuf.Int64Value campaign_count = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of non-removed campaigns attached to this bidding strategy. + // + // This field is read-only. + google.protobuf.Int64Value non_removed_campaign_count = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The bidding scheme. + // + // Only one can be set. + oneof scheme { + // A bidding strategy that raises bids for clicks that seem more likely to + // lead to a conversion and lowers them for clicks where they seem less + // likely. + google.ads.googleads.v3.common.EnhancedCpc enhanced_cpc = 7; + + // A bidding strategy that sets bids to help get as many conversions as + // possible at the target cost-per-acquisition (CPA) you set. + google.ads.googleads.v3.common.TargetCpa target_cpa = 9; + + // A bidding strategy that automatically optimizes towards a desired + // percentage of impressions. + google.ads.googleads.v3.common.TargetImpressionShare target_impression_share = 48; + + // A bidding strategy that helps you maximize revenue while averaging a + // specific target Return On Ad Spend (ROAS). + google.ads.googleads.v3.common.TargetRoas target_roas = 11; + + // A bid strategy that sets your bids to help get as many clicks as + // possible within your budget. + google.ads.googleads.v3.common.TargetSpend target_spend = 12; + } +} diff --git a/google/ads/googleads/v3/resources/billing_setup.proto b/google/ads/googleads/v3/resources/billing_setup.proto new file mode 100644 index 000000000..f37f59175 --- /dev/null +++ b/google/ads/googleads/v3/resources/billing_setup.proto @@ -0,0 +1,139 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/billing_setup_status.proto"; +import "google/ads/googleads/v3/enums/time_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "BillingSetupProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the BillingSetup resource. + +// A billing setup, which associates a payments account and an advertiser. A +// billing setup is specific to one advertiser. +message BillingSetup { + option (google.api.resource) = { + type: "googleads.googleapis.com/BillingSetup" + pattern: "customers/{customer}/billingSetups/{billing_setup}" + }; + + // Container of payments account information for this billing. + message PaymentsAccountInfo { + // Output only. A 16 digit id used to identify the payments account associated with the + // billing setup. + // + // This must be passed as a string with dashes, e.g. "1234-5678-9012-3456". + google.protobuf.StringValue payments_account_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The name of the payments account associated with the billing setup. + // + // This enables the user to specify a meaningful name for a payments account + // to aid in reconciling monthly invoices. + // + // This name will be printed in the monthly invoices. + google.protobuf.StringValue payments_account_name = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. A 12 digit id used to identify the payments profile associated with the + // billing setup. + // + // This must be passed in as a string with dashes, e.g. "1234-5678-9012". + google.protobuf.StringValue payments_profile_id = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The name of the payments profile associated with the billing setup. + google.protobuf.StringValue payments_profile_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A secondary payments profile id present in uncommon situations, e.g. + // when a sequential liability agreement has been arranged. + google.protobuf.StringValue secondary_payments_profile_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Immutable. The resource name of the billing setup. + // BillingSetup resource names have the form: + // + // `customers/{customer_id}/billingSetups/{billing_setup_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BillingSetup" + } + ]; + + // Output only. The ID of the billing setup. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The status of the billing setup. + google.ads.googleads.v3.enums.BillingSetupStatusEnum.BillingSetupStatus status = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The resource name of the payments account associated with this billing + // setup. Payments resource names have the form: + // + // `customers/{customer_id}/paymentsAccounts/{payments_account_id}` + // When setting up billing, this is used to signup with an existing payments + // account (and then payments_account_info should not be set). + // When getting a billing setup, this and payments_account_info will be + // populated. + google.protobuf.StringValue payments_account = 11 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/PaymentsAccount" + } + ]; + + // Immutable. The payments account information associated with this billing setup. + // When setting up billing, this is used to signup with a new payments account + // (and then payments_account should not be set). + // When getting a billing setup, this and payments_account will be + // populated. + PaymentsAccountInfo payments_account_info = 12 [(google.api.field_behavior) = IMMUTABLE]; + + // When creating a new billing setup, this is when the setup should take + // effect. NOW is the only acceptable start time if the customer doesn't have + // any approved setups. + // + // When fetching an existing billing setup, this is the requested start time. + // However, if the setup was approved (see status) after the requested start + // time, then this is the approval time. + oneof start_time { + // Immutable. The start date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. Only a + // future time is allowed. + google.protobuf.StringValue start_date_time = 9 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The start time as a type. Only NOW is allowed. + google.ads.googleads.v3.enums.TimeTypeEnum.TimeType start_time_type = 10 [(google.api.field_behavior) = IMMUTABLE]; + } + + // When the billing setup ends / ended. This is either FOREVER or the start + // time of the next scheduled billing setup. + oneof end_time { + // Output only. The end date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue end_date_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The end time as a type. The only possible value is FOREVER. + google.ads.googleads.v3.enums.TimeTypeEnum.TimeType end_time_type = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} diff --git a/google/ads/googleads/v3/resources/campaign.proto b/google/ads/googleads/v3/resources/campaign.proto new file mode 100644 index 000000000..189d5e6d3 --- /dev/null +++ b/google/ads/googleads/v3/resources/campaign.proto @@ -0,0 +1,404 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/bidding.proto"; +import "google/ads/googleads/v3/common/custom_parameter.proto"; +import "google/ads/googleads/v3/common/frequency_cap.proto"; +import "google/ads/googleads/v3/common/real_time_bidding_setting.proto"; +import "google/ads/googleads/v3/common/targeting_setting.proto"; +import "google/ads/googleads/v3/enums/ad_serving_optimization_status.proto"; +import "google/ads/googleads/v3/enums/advertising_channel_sub_type.proto"; +import "google/ads/googleads/v3/enums/advertising_channel_type.proto"; +import "google/ads/googleads/v3/enums/app_campaign_app_store.proto"; +import "google/ads/googleads/v3/enums/app_campaign_bidding_strategy_goal_type.proto"; +import "google/ads/googleads/v3/enums/bidding_strategy_type.proto"; +import "google/ads/googleads/v3/enums/brand_safety_suitability.proto"; +import "google/ads/googleads/v3/enums/campaign_experiment_type.proto"; +import "google/ads/googleads/v3/enums/campaign_serving_status.proto"; +import "google/ads/googleads/v3/enums/campaign_status.proto"; +import "google/ads/googleads/v3/enums/negative_geo_target_type.proto"; +import "google/ads/googleads/v3/enums/payment_mode.proto"; +import "google/ads/googleads/v3/enums/positive_geo_target_type.proto"; +import "google/ads/googleads/v3/enums/vanity_pharma_display_url_mode.proto"; +import "google/ads/googleads/v3/enums/vanity_pharma_text.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Campaign resource. + +// A campaign. +message Campaign { + option (google.api.resource) = { + type: "googleads.googleapis.com/Campaign" + pattern: "customers/{customer}/campaigns/{campaign}" + }; + + // The network settings for the campaign. + message NetworkSettings { + // Whether ads will be served with google.com search results. + google.protobuf.BoolValue target_google_search = 1; + + // Whether ads will be served on partner sites in the Google Search Network + // (requires `target_google_search` to also be `true`). + google.protobuf.BoolValue target_search_network = 2; + + // Whether ads will be served on specified placements in the Google Display + // Network. Placements are specified using the Placement criterion. + google.protobuf.BoolValue target_content_network = 3; + + // Whether ads will be served on the Google Partner Network. + // This is available only to some select Google partner accounts. + google.protobuf.BoolValue target_partner_search_network = 4; + } + + // Campaign-level settings for hotel ads. + message HotelSettingInfo { + // Immutable. The linked Hotel Center account. + google.protobuf.Int64Value hotel_center_id = 1 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Campaign-level settings for App Campaigns. + message AppCampaignSetting { + // Represents the goal which the bidding strategy of this app campaign + // should optimize towards. + google.ads.googleads.v3.enums.AppCampaignBiddingStrategyGoalTypeEnum.AppCampaignBiddingStrategyGoalType bidding_strategy_goal_type = 1; + + // Immutable. A string that uniquely identifies a mobile application. + google.protobuf.StringValue app_id = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The application store that distributes this specific app. + google.ads.googleads.v3.enums.AppCampaignAppStoreEnum.AppCampaignAppStore app_store = 3 [(google.api.field_behavior) = IMMUTABLE]; + } + + // The setting for controlling Dynamic Search Ads (DSA). + message DynamicSearchAdsSetting { + // The Internet domain name that this setting represents, e.g., "google.com" + // or "www.google.com". + google.protobuf.StringValue domain_name = 1; + + // The language code specifying the language of the domain, e.g., "en". + google.protobuf.StringValue language_code = 2; + + // Whether the campaign uses advertiser supplied URLs exclusively. + google.protobuf.BoolValue use_supplied_urls_only = 3; + + // Output only. The list of page feeds associated with the campaign. + repeated google.protobuf.StringValue feeds = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + } + + // The setting for Shopping campaigns. Defines the universe of products that + // can be advertised by the campaign, and how this campaign interacts with + // other Shopping campaigns. + message ShoppingSetting { + // Immutable. ID of the Merchant Center account. + // This field is required for create operations. This field is immutable for + // Shopping campaigns. + google.protobuf.Int64Value merchant_id = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Sales country of products to include in the campaign. + // This field is required for Shopping campaigns. This field is immutable. + // This field is optional for non-Shopping campaigns, but it must be equal + // to 'ZZ' if set. + google.protobuf.StringValue sales_country = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Priority of the campaign. Campaigns with numerically higher priorities + // take precedence over those with lower priorities. + // This field is required for Shopping campaigns, with values between 0 and + // 2, inclusive. + // This field is optional for Smart Shopping campaigns, but must be equal to + // 3 if set. + google.protobuf.Int32Value campaign_priority = 3; + + // Whether to include local products. + google.protobuf.BoolValue enable_local = 4; + } + + // Describes how unbranded pharma ads will be displayed. + message VanityPharma { + // The display mode for vanity pharma URLs. + google.ads.googleads.v3.enums.VanityPharmaDisplayUrlModeEnum.VanityPharmaDisplayUrlMode vanity_pharma_display_url_mode = 1; + + // The text that will be displayed in display URL of the text ad when + // website description is the selected display mode for vanity pharma URLs. + google.ads.googleads.v3.enums.VanityPharmaTextEnum.VanityPharmaText vanity_pharma_text = 2; + } + + // Campaign-level settings for tracking information. + message TrackingSetting { + // Output only. The url used for dynamic tracking. + google.protobuf.StringValue tracking_url = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Represents a collection of settings related to ads geotargeting. + message GeoTargetTypeSetting { + // The setting used for positive geotargeting in this particular campaign. + google.ads.googleads.v3.enums.PositiveGeoTargetTypeEnum.PositiveGeoTargetType positive_geo_target_type = 1; + + // The setting used for negative geotargeting in this particular campaign. + google.ads.googleads.v3.enums.NegativeGeoTargetTypeEnum.NegativeGeoTargetType negative_geo_target_type = 2; + } + + // Selective optimization setting for this campaign, which includes a set of + // conversion actions to optimize this campaign towards. + message SelectiveOptimization { + // The selected set of conversion actions for optimizing this campaign. + repeated google.protobuf.StringValue conversion_actions = 1 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ConversionAction" + }]; + } + + // Immutable. The resource name of the campaign. + // Campaign resource names have the form: + // + // `customers/{customer_id}/campaigns/{campaign_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Output only. The ID of the campaign. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The name of the campaign. + // + // This field is required and should not be empty when creating new + // campaigns. + // + // It must not contain any null (code point 0x0), NL line feed + // (code point 0xA) or carriage return (code point 0xD) characters. + google.protobuf.StringValue name = 4; + + // The status of the campaign. + // + // When a new campaign is added, the status defaults to ENABLED. + google.ads.googleads.v3.enums.CampaignStatusEnum.CampaignStatus status = 5; + + // Output only. The ad serving status of the campaign. + google.ads.googleads.v3.enums.CampaignServingStatusEnum.CampaignServingStatus serving_status = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The ad serving optimization status of the campaign. + google.ads.googleads.v3.enums.AdServingOptimizationStatusEnum.AdServingOptimizationStatus ad_serving_optimization_status = 8; + + // Immutable. The primary serving target for ads within the campaign. + // The targeting options can be refined in `network_settings`. + // + // This field is required and should not be empty when creating new + // campaigns. + // + // Can be set only when creating campaigns. + // After the campaign is created, the field can not be changed. + google.ads.googleads.v3.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 9 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Optional refinement to `advertising_channel_type`. + // Must be a valid sub-type of the parent channel type. + // + // Can be set only when creating campaigns. + // After campaign is created, the field can not be changed. + google.ads.googleads.v3.enums.AdvertisingChannelSubTypeEnum.AdvertisingChannelSubType advertising_channel_sub_type = 10 [(google.api.field_behavior) = IMMUTABLE]; + + // The URL template for constructing a tracking URL. + google.protobuf.StringValue tracking_url_template = 11; + + // The list of mappings used to substitute custom parameter tags in a + // `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + repeated google.ads.googleads.v3.common.CustomParameter url_custom_parameters = 12; + + // Settings for Real-Time Bidding, a feature only available for campaigns + // targeting the Ad Exchange network. + google.ads.googleads.v3.common.RealTimeBiddingSetting real_time_bidding_setting = 39; + + // The network settings for the campaign. + NetworkSettings network_settings = 14; + + // Immutable. The hotel setting for the campaign. + HotelSettingInfo hotel_setting = 32 [(google.api.field_behavior) = IMMUTABLE]; + + // The setting for controlling Dynamic Search Ads (DSA). + DynamicSearchAdsSetting dynamic_search_ads_setting = 33; + + // The setting for controlling Shopping campaigns. + ShoppingSetting shopping_setting = 36; + + // Setting for targeting related features. + google.ads.googleads.v3.common.TargetingSetting targeting_setting = 43; + + // The setting for ads geotargeting. + GeoTargetTypeSetting geo_target_type_setting = 47; + + // The setting related to App Campaign. + AppCampaignSetting app_campaign_setting = 51; + + // Output only. The resource names of labels attached to this campaign. + repeated google.protobuf.StringValue labels = 53 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignLabel" + } + ]; + + // Output only. The type of campaign: normal, draft, or experiment. + google.ads.googleads.v3.enums.CampaignExperimentTypeEnum.CampaignExperimentType experiment_type = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the base campaign of a draft or experiment campaign. + // For base campaigns, this is equal to `resource_name`. + // + // This field is read-only. + google.protobuf.StringValue base_campaign = 28 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // The budget of the campaign. + google.protobuf.StringValue campaign_budget = 6 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBudget" + }]; + + // Output only. The type of bidding strategy. + // + // A bidding strategy can be created by setting either the bidding scheme to + // create a standard bidding strategy or the `bidding_strategy` field to + // create a portfolio bidding strategy. + // + // This field is read-only. + google.ads.googleads.v3.enums.BiddingStrategyTypeEnum.BiddingStrategyType bidding_strategy_type = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The date when campaign started. + // + // This field must not be used in WHERE clauses. + google.protobuf.StringValue start_date = 19; + + // The date when campaign ended. + // + // This field must not be used in WHERE clauses. + google.protobuf.StringValue end_date = 20; + + // Suffix used to append query parameters to landing pages that are served + // with parallel tracking. + google.protobuf.StringValue final_url_suffix = 38; + + // A list that limits how often each user will see this campaign's ads. + repeated google.ads.googleads.v3.common.FrequencyCapEntry frequency_caps = 40; + + // Output only. 3-Tier Brand Safety setting for the campaign. + google.ads.googleads.v3.enums.BrandSafetySuitabilityEnum.BrandSafetySuitability video_brand_safety_suitability = 42 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Describes how unbranded pharma ads will be displayed. + VanityPharma vanity_pharma = 44; + + // Selective optimization setting for this campaign, which includes a set of + // conversion actions to optimize this campaign towards. + SelectiveOptimization selective_optimization = 45; + + // Output only. Campaign-level settings for tracking information. + TrackingSetting tracking_setting = 46 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Payment mode for the campaign. + google.ads.googleads.v3.enums.PaymentModeEnum.PaymentMode payment_mode = 52; + + // Output only. Optimization score of the campaign. + // + // Optimization score is an estimate of how well a campaign is set to perform. + // It ranges from 0% (0.0) to 100% (1.0), with 100% indicating that the + // campaign is performing at full potential. + // + // See "About optimization score" at + // https://support.google.com/google-ads/answer/9061546. + // + // This field is read-only. + google.protobuf.DoubleValue optimization_score = 55 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The bidding strategy for the campaign. + // + // Must be either portfolio (created via BiddingStrategy service) or + // standard, that is embedded into the campaign. + oneof campaign_bidding_strategy { + // Portfolio bidding strategy used by campaign. + google.protobuf.StringValue bidding_strategy = 23 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/BiddingStrategy" + }]; + + // Commission is an automatic bidding strategy in which the advertiser pays + // a certain portion of the conversion value. + google.ads.googleads.v3.common.Commission commission = 49; + + // Standard Manual CPC bidding strategy. + // Manual click-based bidding where user pays per click. + google.ads.googleads.v3.common.ManualCpc manual_cpc = 24; + + // Standard Manual CPM bidding strategy. + // Manual impression-based bidding where user pays per thousand + // impressions. + google.ads.googleads.v3.common.ManualCpm manual_cpm = 25; + + // Output only. A bidding strategy that pays a configurable amount per video view. + google.ads.googleads.v3.common.ManualCpv manual_cpv = 37 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Standard Maximize Conversions bidding strategy that automatically + // maximizes number of conversions given a daily budget. + google.ads.googleads.v3.common.MaximizeConversions maximize_conversions = 30; + + // Standard Maximize Conversion Value bidding strategy that automatically + // sets bids to maximize revenue while spending your budget. + google.ads.googleads.v3.common.MaximizeConversionValue maximize_conversion_value = 31; + + // Standard Target CPA bidding strategy that automatically sets bids to + // help get as many conversions as possible at the target + // cost-per-acquisition (CPA) you set. + google.ads.googleads.v3.common.TargetCpa target_cpa = 26; + + // Target Impression Share bidding strategy. An automated bidding strategy + // that sets bids to achieve a desired percentage of impressions. + google.ads.googleads.v3.common.TargetImpressionShare target_impression_share = 48; + + // Standard Target ROAS bidding strategy that automatically maximizes + // revenue while averaging a specific target return on ad spend (ROAS). + google.ads.googleads.v3.common.TargetRoas target_roas = 29; + + // Standard Target Spend bidding strategy that automatically sets your bids + // to help get as many clicks as possible within your budget. + google.ads.googleads.v3.common.TargetSpend target_spend = 27; + + // Standard Percent Cpc bidding strategy where bids are a fraction of the + // advertised price for some good or service. + google.ads.googleads.v3.common.PercentCpc percent_cpc = 34; + + // A bidding strategy that automatically optimizes cost per thousand + // impressions. + google.ads.googleads.v3.common.TargetCpm target_cpm = 41; + } +} diff --git a/google/ads/googleads/v3/resources/campaign_audience_view.proto b/google/ads/googleads/v3/resources/campaign_audience_view.proto new file mode 100644 index 000000000..a68968694 --- /dev/null +++ b/google/ads/googleads/v3/resources/campaign_audience_view.proto @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignAudienceViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the campaign audience view resource. + +// A campaign audience view. +// Includes performance data from interests and remarketing lists for Display +// Network and YouTube Network ads, and remarketing lists for search ads (RLSA), +// aggregated by campaign and audience criterion. This view only includes +// audiences attached at the campaign level. +message CampaignAudienceView { + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignAudienceView" + pattern: "customers/{customer}/campaignAudienceViews/{campaign_audience_view}" + }; + + // Output only. The resource name of the campaign audience view. + // Campaign audience view resource names have the form: + // + // `customers/{customer_id}/campaignAudienceViews/{campaign_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignAudienceView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/campaign_bid_modifier.proto b/google/ads/googleads/v3/resources/campaign_bid_modifier.proto new file mode 100644 index 000000000..0a5ce82f1 --- /dev/null +++ b/google/ads/googleads/v3/resources/campaign_bid_modifier.proto @@ -0,0 +1,75 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/criteria.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignBidModifierProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Campaign Bid Modifier resource. + +// Represents a bid-modifiable only criterion at the campaign level. +message CampaignBidModifier { + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignBidModifier" + pattern: "customers/{customer}/campaignBidModifiers/{campaign_bid_modifier}" + }; + + // Immutable. The resource name of the campaign bid modifier. + // Campaign bid modifier resource names have the form: + // + // `customers/{customer_id}/campaignBidModifiers/{campaign_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBidModifier" + } + ]; + + // Output only. The campaign to which this criterion belongs. + google.protobuf.StringValue campaign = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Output only. The ID of the criterion to bid modify. + // + // This field is ignored for mutates. + google.protobuf.Int64Value criterion_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The modifier for the bid when the criterion matches. + google.protobuf.DoubleValue bid_modifier = 4; + + // The criterion of this campaign bid modifier. + oneof criterion { + // Immutable. Criterion for interaction type. Only supported for search campaigns. + google.ads.googleads.v3.common.InteractionTypeInfo interaction_type = 5 [(google.api.field_behavior) = IMMUTABLE]; + } +} diff --git a/google/ads/googleads/v3/resources/campaign_budget.proto b/google/ads/googleads/v3/resources/campaign_budget.proto new file mode 100644 index 000000000..46b1a7a34 --- /dev/null +++ b/google/ads/googleads/v3/resources/campaign_budget.proto @@ -0,0 +1,157 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/budget_delivery_method.proto"; +import "google/ads/googleads/v3/enums/budget_period.proto"; +import "google/ads/googleads/v3/enums/budget_status.proto"; +import "google/ads/googleads/v3/enums/budget_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignBudgetProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Budget resource. + +// A campaign budget. +message CampaignBudget { + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignBudget" + pattern: "customers/{customer}/campaignBudgets/{campaign_budget}" + }; + + // Immutable. The resource name of the campaign budget. + // Campaign budget resource names have the form: + // + // `customers/{customer_id}/campaignBudgets/{budget_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBudget" + } + ]; + + // Output only. The ID of the campaign budget. + // + // A campaign budget is created using the CampaignBudgetService create + // operation and is assigned a budget ID. A budget ID can be shared across + // different campaigns; the system will then allocate the campaign budget + // among different campaigns to get optimum results. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The name of the campaign budget. + // + // When creating a campaign budget through CampaignBudgetService, every + // explicitly shared campaign budget must have a non-null, non-empty name. + // Campaign budgets that are not explicitly shared derive their name from the + // attached campaign's name. + // + // The length of this string must be between 1 and 255, inclusive, + // in UTF-8 bytes, (trimmed). + google.protobuf.StringValue name = 4; + + // The amount of the budget, in the local currency for the account. + // Amount is specified in micros, where one million is equivalent to one + // currency unit. Monthly spend is capped at 30.4 times this amount. + google.protobuf.Int64Value amount_micros = 5; + + // The lifetime amount of the budget, in the local currency for the account. + // Amount is specified in micros, where one million is equivalent to one + // currency unit. + google.protobuf.Int64Value total_amount_micros = 10; + + // Output only. The status of this campaign budget. This field is read-only. + google.ads.googleads.v3.enums.BudgetStatusEnum.BudgetStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The delivery method that determines the rate at which the campaign budget + // is spent. + // + // Defaults to STANDARD if unspecified in a create operation. + google.ads.googleads.v3.enums.BudgetDeliveryMethodEnum.BudgetDeliveryMethod delivery_method = 7; + + // Specifies whether the budget is explicitly shared. Defaults to true if + // unspecified in a create operation. + // + // If true, the budget was created with the purpose of sharing + // across one or more campaigns. + // + // If false, the budget was created with the intention of only being used + // with a single campaign. The budget's name and status will stay in sync + // with the campaign's name and status. Attempting to share the budget with a + // second campaign will result in an error. + // + // A non-shared budget can become an explicitly shared. The same operation + // must also assign the budget a name. + // + // A shared campaign budget can never become non-shared. + google.protobuf.BoolValue explicitly_shared = 8; + + // Output only. The number of campaigns actively using the budget. + // + // This field is read-only. + google.protobuf.Int64Value reference_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether there is a recommended budget for this campaign budget. + // + // This field is read-only. + google.protobuf.BoolValue has_recommended_budget = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The recommended budget amount. If no recommendation is available, this will + // be set to the budget amount. + // Amount is specified in micros, where one million is equivalent to one + // currency unit. + // + // This field is read-only. + google.protobuf.Int64Value recommended_budget_amount_micros = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Period over which to spend the budget. Defaults to DAILY if not specified. + google.ads.googleads.v3.enums.BudgetPeriodEnum.BudgetPeriod period = 13 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The estimated change in weekly clicks if the recommended budget is applied. + // + // This field is read-only. + google.protobuf.Int64Value recommended_budget_estimated_change_weekly_clicks = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The estimated change in weekly cost in micros if the recommended budget is + // applied. One million is equivalent to one currency unit. + // + // This field is read-only. + google.protobuf.Int64Value recommended_budget_estimated_change_weekly_cost_micros = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The estimated change in weekly interactions if the recommended budget is + // applied. + // + // This field is read-only. + google.protobuf.Int64Value recommended_budget_estimated_change_weekly_interactions = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The estimated change in weekly views if the recommended budget is applied. + // + // This field is read-only. + google.protobuf.Int64Value recommended_budget_estimated_change_weekly_views = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The type of the campaign budget. + google.ads.googleads.v3.enums.BudgetTypeEnum.BudgetType type = 18 [(google.api.field_behavior) = IMMUTABLE]; +} diff --git a/google/ads/googleads/v3/resources/campaign_criterion.proto b/google/ads/googleads/v3/resources/campaign_criterion.proto new file mode 100644 index 000000000..3a84f0b31 --- /dev/null +++ b/google/ads/googleads/v3/resources/campaign_criterion.proto @@ -0,0 +1,168 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/criteria.proto"; +import "google/ads/googleads/v3/enums/campaign_criterion_status.proto"; +import "google/ads/googleads/v3/enums/criterion_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignCriterionProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Campaign Criterion resource. + +// A campaign criterion. +message CampaignCriterion { + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignCriterion" + pattern: "customers/{customer}/campaignCriteria/{campaign_criterion}" + }; + + // Immutable. The resource name of the campaign criterion. + // Campaign criterion resource names have the form: + // + // `customers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterion" + } + ]; + + // Immutable. The campaign to which the criterion belongs. + google.protobuf.StringValue campaign = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Output only. The ID of the criterion. + // + // This field is ignored during mutate. + google.protobuf.Int64Value criterion_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The modifier for the bids when the criterion matches. The modifier must be + // in the range: 0.1 - 10.0. Most targetable criteria types support modifiers. + // Use 0 to opt out of a Device type. + google.protobuf.FloatValue bid_modifier = 14; + + // Immutable. Whether to target (`false`) or exclude (`true`) the criterion. + google.protobuf.BoolValue negative = 7 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The type of the criterion. + google.ads.googleads.v3.enums.CriterionTypeEnum.CriterionType type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The status of the criterion. + google.ads.googleads.v3.enums.CampaignCriterionStatusEnum.CampaignCriterionStatus status = 35; + + // The campaign criterion. + // + // Exactly one must be set. + oneof criterion { + // Immutable. Keyword. + google.ads.googleads.v3.common.KeywordInfo keyword = 8 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Placement. + google.ads.googleads.v3.common.PlacementInfo placement = 9 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Mobile app category. + google.ads.googleads.v3.common.MobileAppCategoryInfo mobile_app_category = 10 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Mobile application. + google.ads.googleads.v3.common.MobileApplicationInfo mobile_application = 11 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Location. + google.ads.googleads.v3.common.LocationInfo location = 12 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Device. + google.ads.googleads.v3.common.DeviceInfo device = 13 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Ad Schedule. + google.ads.googleads.v3.common.AdScheduleInfo ad_schedule = 15 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Age range. + google.ads.googleads.v3.common.AgeRangeInfo age_range = 16 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Gender. + google.ads.googleads.v3.common.GenderInfo gender = 17 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Income range. + google.ads.googleads.v3.common.IncomeRangeInfo income_range = 18 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Parental status. + google.ads.googleads.v3.common.ParentalStatusInfo parental_status = 19 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. User List. + google.ads.googleads.v3.common.UserListInfo user_list = 22 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. YouTube Video. + google.ads.googleads.v3.common.YouTubeVideoInfo youtube_video = 20 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. YouTube Channel. + google.ads.googleads.v3.common.YouTubeChannelInfo youtube_channel = 21 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Proximity. + google.ads.googleads.v3.common.ProximityInfo proximity = 23 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Topic. + google.ads.googleads.v3.common.TopicInfo topic = 24 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Listing scope. + google.ads.googleads.v3.common.ListingScopeInfo listing_scope = 25 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Language. + google.ads.googleads.v3.common.LanguageInfo language = 26 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. IpBlock. + google.ads.googleads.v3.common.IpBlockInfo ip_block = 27 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. ContentLabel. + google.ads.googleads.v3.common.ContentLabelInfo content_label = 28 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Carrier. + google.ads.googleads.v3.common.CarrierInfo carrier = 29 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. User Interest. + google.ads.googleads.v3.common.UserInterestInfo user_interest = 30 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Webpage. + google.ads.googleads.v3.common.WebpageInfo webpage = 31 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Operating system version. + google.ads.googleads.v3.common.OperatingSystemVersionInfo operating_system_version = 32 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Mobile Device. + google.ads.googleads.v3.common.MobileDeviceInfo mobile_device = 33 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Location Group + google.ads.googleads.v3.common.LocationGroupInfo location_group = 34 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Custom Affinity. + google.ads.googleads.v3.common.CustomAffinityInfo custom_affinity = 36 [(google.api.field_behavior) = IMMUTABLE]; + } +} diff --git a/google/ads/googleads/v3/resources/campaign_criterion_simulation.proto b/google/ads/googleads/v3/resources/campaign_criterion_simulation.proto new file mode 100644 index 000000000..f57a3ba76 --- /dev/null +++ b/google/ads/googleads/v3/resources/campaign_criterion_simulation.proto @@ -0,0 +1,85 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/simulation.proto"; +import "google/ads/googleads/v3/enums/simulation_modification_method.proto"; +import "google/ads/googleads/v3/enums/simulation_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignCriterionSimulationProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the campaign criterion simulation resource. + +// A campaign criterion simulation. Supported combinations of advertising +// channel type, criterion ids, simulation type and simulation modification +// method is detailed below respectively. +// +// 1. SEARCH - 30000,30001,30002 - BID_MODIFIER - UNIFORM +// 2. SHOPPING - 30000,30001,30002 - BID_MODIFIER - UNIFORM +// 3. DISPLAY - 30001 - BID_MODIFIER - UNIFORM +message CampaignCriterionSimulation { + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignCriterionSimulation" + pattern: "customers/{customer}/campaignCriterionSimulations/{campaign_criterion_simulation}" + }; + + // Output only. The resource name of the campaign criterion simulation. + // Campaign criterion simulation resource names have the form: + // + // `customers/{customer_id}/campaignCriterionSimulations/{campaign_id}~{criterion_id}~{type}~{modification_method}~{start_date}~{end_date}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterionSimulation" + } + ]; + + // Output only. Campaign ID of the simulation. + google.protobuf.Int64Value campaign_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Criterion ID of the simulation. + google.protobuf.Int64Value criterion_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The field that the simulation modifies. + google.ads.googleads.v3.enums.SimulationTypeEnum.SimulationType type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How the simulation modifies the field. + google.ads.googleads.v3.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue end_date = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // List of simulation points. + oneof point_list { + // Output only. Simulation points if the simulation type is BID_MODIFIER. + google.ads.googleads.v3.common.BidModifierSimulationPointList bid_modifier_point_list = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} diff --git a/google/ads/googleads/v3/resources/campaign_draft.proto b/google/ads/googleads/v3/resources/campaign_draft.proto new file mode 100644 index 000000000..6e3601b68 --- /dev/null +++ b/google/ads/googleads/v3/resources/campaign_draft.proto @@ -0,0 +1,99 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/campaign_draft_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignDraftProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Campaign Draft resource. + +// A campaign draft. +message CampaignDraft { + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignDraft" + pattern: "customers/{customer}/campaignDrafts/{campaign_draft}" + }; + + // Immutable. The resource name of the campaign draft. + // Campaign draft resource names have the form: + // + // `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignDraft" + } + ]; + + // Output only. The ID of the draft. + // + // This field is read-only. + google.protobuf.Int64Value draft_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The base campaign to which the draft belongs. + google.protobuf.StringValue base_campaign = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // The name of the campaign draft. + // + // This field is required and should not be empty when creating new + // campaign drafts. + // + // It must not contain any null (code point 0x0), NL line feed + // (code point 0xA) or carriage return (code point 0xD) characters. + google.protobuf.StringValue name = 4; + + // Output only. Resource name of the Campaign that results from overlaying the draft + // changes onto the base campaign. + // + // This field is read-only. + google.protobuf.StringValue draft_campaign = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Output only. The status of the campaign draft. This field is read-only. + // + // When a new campaign draft is added, the status defaults to PROPOSED. + google.ads.googleads.v3.enums.CampaignDraftStatusEnum.CampaignDraftStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether there is an experiment based on this draft currently serving. + google.protobuf.BoolValue has_experiment_running = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the long-running operation that can be used to poll + // for completion of draft promotion. This is only set if the draft promotion + // is in progress or finished. + google.protobuf.StringValue long_running_operation = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/campaign_experiment.proto b/google/ads/googleads/v3/resources/campaign_experiment.proto new file mode 100644 index 000000000..a02838ba5 --- /dev/null +++ b/google/ads/googleads/v3/resources/campaign_experiment.proto @@ -0,0 +1,122 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/campaign_experiment_status.proto"; +import "google/ads/googleads/v3/enums/campaign_experiment_traffic_split_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExperimentProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Campaign Experiment resource. + +// An A/B experiment that compares the performance of the base campaign +// (the control) and a variation of that campaign (the experiment). +message CampaignExperiment { + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignExperiment" + pattern: "customers/{customer}/campaignExperiments/{campaign_experiment}" + }; + + // Immutable. The resource name of the campaign experiment. + // Campaign experiment resource names have the form: + // + // `customers/{customer_id}/campaignExperiments/{campaign_experiment_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExperiment" + } + ]; + + // Output only. The ID of the campaign experiment. + // + // This field is read-only. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The campaign draft with staged changes to the base campaign. + google.protobuf.StringValue campaign_draft = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignDraft" + } + ]; + + // The name of the campaign experiment. + // + // This field is required when creating new campaign experiments + // and must not conflict with the name of another non-removed + // campaign experiment or campaign. + // + // It must not contain any null (code point 0x0), NL line feed + // (code point 0xA) or carriage return (code point 0xD) characters. + google.protobuf.StringValue name = 4; + + // The description of the experiment. + google.protobuf.StringValue description = 5; + + // Immutable. Share of traffic directed to experiment as a percent (must be between 1 and + // 99 inclusive. Base campaign receives the remainder of the traffic + // (100 - traffic_split_percent). Required for create. + google.protobuf.Int64Value traffic_split_percent = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Determines the behavior of the traffic split. + google.ads.googleads.v3.enums.CampaignExperimentTrafficSplitTypeEnum.CampaignExperimentTrafficSplitType traffic_split_type = 7 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The experiment campaign, as opposed to the base campaign. + google.protobuf.StringValue experiment_campaign = 8 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Output only. The status of the campaign experiment. This field is read-only. + google.ads.googleads.v3.enums.CampaignExperimentStatusEnum.CampaignExperimentStatus status = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the long-running operation that can be used to poll + // for completion of experiment create or promote. The most recent long + // running operation is returned. + google.protobuf.StringValue long_running_operation = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Date when the campaign experiment starts. By default, the experiment starts + // now or on the campaign's start date, whichever is later. If this field is + // set, then the experiment starts at the beginning of the specified date in + // the customer's time zone. Cannot be changed once the experiment starts. + // + // Format: YYYY-MM-DD + // Example: 2019-03-14 + google.protobuf.StringValue start_date = 11; + + // Date when the campaign experiment ends. By default, the experiment ends on + // the campaign's end date. If this field is set, then the experiment ends at + // the end of the specified date in the customer's time zone. + // + // Format: YYYY-MM-DD + // Example: 2019-04-18 + google.protobuf.StringValue end_date = 12; +} diff --git a/google/ads/googleads/v3/resources/campaign_extension_setting.proto b/google/ads/googleads/v3/resources/campaign_extension_setting.proto new file mode 100644 index 000000000..32758f7e4 --- /dev/null +++ b/google/ads/googleads/v3/resources/campaign_extension_setting.proto @@ -0,0 +1,80 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/extension_setting_device.proto"; +import "google/ads/googleads/v3/enums/extension_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExtensionSettingProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the CampaignExtensionSetting resource. + +// A campaign extension setting. +message CampaignExtensionSetting { + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignExtensionSetting" + pattern: "customers/{customer}/campaignExtensionSettings/{campaign_extension_setting}" + }; + + // Immutable. The resource name of the campaign extension setting. + // CampaignExtensionSetting resource names have the form: + // + // `customers/{customer_id}/campaignExtensionSettings/{campaign_id}~{extension_type}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExtensionSetting" + } + ]; + + // Immutable. The extension type of the customer extension setting. + google.ads.googleads.v3.enums.ExtensionTypeEnum.ExtensionType extension_type = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The resource name of the campaign. The linked extension feed items will + // serve under this campaign. + // Campaign resource names have the form: + // + // `customers/{customer_id}/campaigns/{campaign_id}` + google.protobuf.StringValue campaign = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // The resource names of the extension feed items to serve under the campaign. + // ExtensionFeedItem resource names have the form: + // + // `customers/{customer_id}/extensionFeedItems/{feed_item_id}` + repeated google.protobuf.StringValue extension_feed_items = 4 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + }]; + + // The device for which the extensions will serve. Optional. + google.ads.googleads.v3.enums.ExtensionSettingDeviceEnum.ExtensionSettingDevice device = 5; +} diff --git a/google/ads/googleads/v3/resources/campaign_feed.proto b/google/ads/googleads/v3/resources/campaign_feed.proto new file mode 100644 index 000000000..7836d161a --- /dev/null +++ b/google/ads/googleads/v3/resources/campaign_feed.proto @@ -0,0 +1,84 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/matching_function.proto"; +import "google/ads/googleads/v3/enums/feed_link_status.proto"; +import "google/ads/googleads/v3/enums/placeholder_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignFeedProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the CampaignFeed resource. + +// A campaign feed. +message CampaignFeed { + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignFeed" + pattern: "customers/{customer}/campaignFeeds/{campaign_feed}" + }; + + // Immutable. The resource name of the campaign feed. + // Campaign feed resource names have the form: + // + // `customers/{customer_id}/campaignFeeds/{campaign_id}~{feed_id} + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignFeed" + } + ]; + + // Immutable. The feed to which the CampaignFeed belongs. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + + // Immutable. The campaign to which the CampaignFeed belongs. + google.protobuf.StringValue campaign = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Indicates which placeholder types the feed may populate under the connected + // campaign. Required. + repeated google.ads.googleads.v3.enums.PlaceholderTypeEnum.PlaceholderType placeholder_types = 4; + + // Matching function associated with the CampaignFeed. + // The matching function is used to filter the set of feed items selected. + // Required. + google.ads.googleads.v3.common.MatchingFunction matching_function = 5; + + // Output only. Status of the campaign feed. + // This field is read-only. + google.ads.googleads.v3.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/campaign_label.proto b/google/ads/googleads/v3/resources/campaign_label.proto new file mode 100644 index 000000000..8a92f5fa0 --- /dev/null +++ b/google/ads/googleads/v3/resources/campaign_label.proto @@ -0,0 +1,67 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignLabelProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the campaign label resource. + +// Represents a relationship between a campaign and a label. +message CampaignLabel { + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignLabel" + pattern: "customers/{customer}/campaignLabels/{campaign_label}" + }; + + // Immutable. Name of the resource. + // Campaign label resource names have the form: + // `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignLabel" + } + ]; + + // Immutable. The campaign to which the label is attached. + google.protobuf.StringValue campaign = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Immutable. The label assigned to the campaign. + google.protobuf.StringValue label = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/campaign_shared_set.proto b/google/ads/googleads/v3/resources/campaign_shared_set.proto new file mode 100644 index 000000000..2dab3234e --- /dev/null +++ b/google/ads/googleads/v3/resources/campaign_shared_set.proto @@ -0,0 +1,78 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/campaign_shared_set_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignSharedSetProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the CampaignSharedSet resource. + +// CampaignSharedSets are used for managing the shared sets associated with a +// campaign. +message CampaignSharedSet { + option (google.api.resource) = { + type: "googleads.googleapis.com/CampaignSharedSet" + pattern: "customers/{customer}/campaignSharedSets/{campaign_shared_set}" + }; + + // Immutable. The resource name of the campaign shared set. + // Campaign shared set resource names have the form: + // + // `customers/{customer_id}/campaignSharedSets/{campaign_id}~{shared_set_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignSharedSet" + } + ]; + + // Immutable. The campaign to which the campaign shared set belongs. + google.protobuf.StringValue campaign = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Immutable. The shared set associated with the campaign. This may be a negative keyword + // shared set of another customer. This customer should be a manager of the + // other customer, otherwise the campaign shared set will exist but have no + // serving effect. Only negative keyword shared sets can be associated with + // Shopping campaigns. Only negative placement shared sets can be associated + // with Display mobile app campaigns. + google.protobuf.StringValue shared_set = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedSet" + } + ]; + + // Output only. The status of this campaign shared set. Read only. + google.ads.googleads.v3.enums.CampaignSharedSetStatusEnum.CampaignSharedSetStatus status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/carrier_constant.proto b/google/ads/googleads/v3/resources/carrier_constant.proto new file mode 100644 index 000000000..b892f3e4f --- /dev/null +++ b/google/ads/googleads/v3/resources/carrier_constant.proto @@ -0,0 +1,62 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CarrierConstantProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Carrier constant resource. + +// A carrier criterion that can be used in campaign targeting. +message CarrierConstant { + option (google.api.resource) = { + type: "googleads.googleapis.com/CarrierConstant" + pattern: "carrierConstants/{carrier_constant}" + }; + + // Output only. The resource name of the carrier criterion. + // Carrier criterion resource names have the form: + // + // `carrierConstants/{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CarrierConstant" + } + ]; + + // Output only. The ID of the carrier criterion. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The full name of the carrier in English. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The country code of the country where the carrier is located, e.g., "AR", + // "FR", etc. + google.protobuf.StringValue country_code = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/change_status.proto b/google/ads/googleads/v3/resources/change_status.proto new file mode 100644 index 000000000..9c54a236c --- /dev/null +++ b/google/ads/googleads/v3/resources/change_status.proto @@ -0,0 +1,145 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/change_status_operation.proto"; +import "google/ads/googleads/v3/enums/change_status_resource_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ChangeStatusProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Change Status resource. + +// Describes the status of returned resource. +message ChangeStatus { + option (google.api.resource) = { + type: "googleads.googleapis.com/ChangeStatus" + pattern: "customers/{customer}/changeStatus/{change_status}" + }; + + // Output only. The resource name of the change status. + // Change status resource names have the form: + // + // `customers/{customer_id}/changeStatus/{change_status_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ChangeStatus" + } + ]; + + // Output only. Time at which the most recent change has occurred on this resource. + google.protobuf.StringValue last_change_date_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Represents the type of the changed resource. This dictates what fields + // will be set. For example, for AD_GROUP, campaign and ad_group fields will + // be set. + google.ads.googleads.v3.enums.ChangeStatusResourceTypeEnum.ChangeStatusResourceType resource_type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Campaign affected by this change. + google.protobuf.StringValue campaign = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Output only. The AdGroup affected by this change. + google.protobuf.StringValue ad_group = 6 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Output only. Represents the status of the changed resource. + google.ads.googleads.v3.enums.ChangeStatusOperationEnum.ChangeStatusOperation resource_status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The AdGroupAd affected by this change. + google.protobuf.StringValue ad_group_ad = 9 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; + + // Output only. The AdGroupCriterion affected by this change. + google.protobuf.StringValue ad_group_criterion = 10 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; + + // Output only. The CampaignCriterion affected by this change. + google.protobuf.StringValue campaign_criterion = 11 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterion" + } + ]; + + // Output only. The Feed affected by this change. + google.protobuf.StringValue feed = 12 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + + // Output only. The FeedItem affected by this change. + google.protobuf.StringValue feed_item = 13 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItem" + } + ]; + + // Output only. The AdGroupFeed affected by this change. + google.protobuf.StringValue ad_group_feed = 14 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupFeed" + } + ]; + + // Output only. The CampaignFeed affected by this change. + google.protobuf.StringValue campaign_feed = 15 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignFeed" + } + ]; + + // Output only. The AdGroupBidModifier affected by this change. + google.protobuf.StringValue ad_group_bid_modifier = 16 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupBidModifier" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/click_view.proto b/google/ads/googleads/v3/resources/click_view.proto new file mode 100644 index 000000000..216e207e4 --- /dev/null +++ b/google/ads/googleads/v3/resources/click_view.proto @@ -0,0 +1,80 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/click_location.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ClickViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ClickView resource. + +// A click view with metrics aggregated at each click level, including both +// valid and invalid clicks. For non-Search campaigns, metrics.clicks +// represents the number of valid and invalid interactions. +// Queries including ClickView must have a filter limiting the results to one +// day and can be requested for dates back to 90 days before the time of the +// request. +message ClickView { + option (google.api.resource) = { + type: "googleads.googleapis.com/ClickView" + pattern: "customers/{customer}/clickViews/{click_view}" + }; + + // Output only. The resource name of the click view. + // Click view resource names have the form: + // + // `customers/{customer_id}/clickViews/{date (yyyy-MM-dd)}~{gclid}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ClickView" + } + ]; + + // Output only. The Google Click ID. + google.protobuf.StringValue gclid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The location criteria matching the area of interest associated with the + // impression. + google.ads.googleads.v3.common.ClickLocation area_of_interest = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The location criteria matching the location of presence associated with the + // impression. + google.ads.googleads.v3.common.ClickLocation location_of_presence = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Page number in search results where the ad was shown. + google.protobuf.Int64Value page_number = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The associated ad. + google.protobuf.StringValue ad_group_ad = 7 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/conversion_action.proto b/google/ads/googleads/v3/resources/conversion_action.proto new file mode 100644 index 000000000..b5a33d3c6 --- /dev/null +++ b/google/ads/googleads/v3/resources/conversion_action.proto @@ -0,0 +1,144 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/tag_snippet.proto"; +import "google/ads/googleads/v3/enums/attribution_model.proto"; +import "google/ads/googleads/v3/enums/conversion_action_category.proto"; +import "google/ads/googleads/v3/enums/conversion_action_counting_type.proto"; +import "google/ads/googleads/v3/enums/conversion_action_status.proto"; +import "google/ads/googleads/v3/enums/conversion_action_type.proto"; +import "google/ads/googleads/v3/enums/data_driven_model_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Conversion Action resource. + +// A conversion action. +message ConversionAction { + option (google.api.resource) = { + type: "googleads.googleapis.com/ConversionAction" + pattern: "customers/{customer}/conversionActions/{conversion_action}" + }; + + // Settings related to this conversion action's attribution model. + message AttributionModelSettings { + // The attribution model type of this conversion action. + google.ads.googleads.v3.enums.AttributionModelEnum.AttributionModel attribution_model = 1; + + // Output only. The status of the data-driven attribution model for the conversion + // action. + google.ads.googleads.v3.enums.DataDrivenModelStatusEnum.DataDrivenModelStatus data_driven_model_status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Settings related to the value for conversion events associated with this + // conversion action. + message ValueSettings { + // The value to use when conversion events for this conversion action are + // sent with an invalid, disallowed or missing value, or when + // this conversion action is configured to always use the default value. + google.protobuf.DoubleValue default_value = 1; + + // The currency code to use when conversion events for this conversion + // action are sent with an invalid or missing currency code, or when this + // conversion action is configured to always use the default value. + google.protobuf.StringValue default_currency_code = 2; + + // Controls whether the default value and default currency code are used in + // place of the value and currency code specified in conversion events for + // this conversion action. + google.protobuf.BoolValue always_use_default_value = 3; + } + + // Immutable. The resource name of the conversion action. + // Conversion action resource names have the form: + // + // `customers/{customer_id}/conversionActions/{conversion_action_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ConversionAction" + } + ]; + + // Output only. The ID of the conversion action. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The name of the conversion action. + // + // This field is required and should not be empty when creating new + // conversion actions. + google.protobuf.StringValue name = 3; + + // The status of this conversion action for conversion event accrual. + google.ads.googleads.v3.enums.ConversionActionStatusEnum.ConversionActionStatus status = 4; + + // Immutable. The type of this conversion action. + google.ads.googleads.v3.enums.ConversionActionTypeEnum.ConversionActionType type = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // The category of conversions reported for this conversion action. + google.ads.googleads.v3.enums.ConversionActionCategoryEnum.ConversionActionCategory category = 6; + + // Output only. The resource name of the conversion action owner customer, or null if this + // is a system-defined conversion action. + google.protobuf.StringValue owner_customer = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Whether this conversion action should be included in the "conversions" + // metric. + google.protobuf.BoolValue include_in_conversions_metric = 8; + + // The maximum number of days that may elapse between an interaction + // (e.g., a click) and a conversion event. + google.protobuf.Int64Value click_through_lookback_window_days = 9; + + // The maximum number of days which may elapse between an impression and a + // conversion without an interaction. + google.protobuf.Int64Value view_through_lookback_window_days = 10; + + // Settings related to the value for conversion events associated with this + // conversion action. + ValueSettings value_settings = 11; + + // How to count conversion events for the conversion action. + google.ads.googleads.v3.enums.ConversionActionCountingTypeEnum.ConversionActionCountingType counting_type = 12; + + // Settings related to this conversion action's attribution model. + AttributionModelSettings attribution_model_settings = 13; + + // Output only. The snippets used for tracking conversions. + repeated google.ads.googleads.v3.common.TagSnippet tag_snippets = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The phone call duration in seconds after which a conversion should be + // reported for this conversion action. + // + // The value must be between 0 and 10000, inclusive. + google.protobuf.Int64Value phone_call_duration_seconds = 15; + + // App ID for an app conversion action. + google.protobuf.StringValue app_id = 16; +} diff --git a/google/ads/googleads/v3/resources/currency_constant.proto b/google/ads/googleads/v3/resources/currency_constant.proto new file mode 100644 index 000000000..69be80653 --- /dev/null +++ b/google/ads/googleads/v3/resources/currency_constant.proto @@ -0,0 +1,65 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CurrencyConstantProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Currency Constant resource. + +// A currency constant. +message CurrencyConstant { + option (google.api.resource) = { + type: "googleads.googleapis.com/CurrencyConstant" + pattern: "currencyConstants/{currency_constant}" + }; + + // Output only. The resource name of the currency constant. + // Currency constant resource names have the form: + // + // `currencyConstants/{currency_code}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CurrencyConstant" + } + ]; + + // Output only. ISO 4217 three-letter currency code, e.g. "USD" + google.protobuf.StringValue code = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Full English name of the currency. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Standard symbol for describing this currency, e.g. '$' for US Dollars. + google.protobuf.StringValue symbol = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The billable unit for this currency. Billed amounts should be multiples of + // this value. + google.protobuf.Int64Value billable_unit_micros = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/custom_interest.proto b/google/ads/googleads/v3/resources/custom_interest.proto new file mode 100644 index 000000000..c2824decd --- /dev/null +++ b/google/ads/googleads/v3/resources/custom_interest.proto @@ -0,0 +1,90 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/custom_interest_member_type.proto"; +import "google/ads/googleads/v3/enums/custom_interest_status.proto"; +import "google/ads/googleads/v3/enums/custom_interest_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomInterestProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Custom Interest resource. + +// A custom interest. This is a list of users by interest. +message CustomInterest { + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomInterest" + pattern: "customers/{customer}/customInterests/{custom_interest}" + }; + + // Immutable. The resource name of the custom interest. + // Custom interest resource names have the form: + // + // `customers/{customer_id}/customInterests/{custom_interest_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomInterest" + } + ]; + + // Output only. Id of the custom interest. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Status of this custom interest. Indicates whether the custom interest is + // enabled or removed. + google.ads.googleads.v3.enums.CustomInterestStatusEnum.CustomInterestStatus status = 3; + + // Name of the custom interest. It should be unique across the same custom + // affinity audience. + // This field is required for create operations. + google.protobuf.StringValue name = 4; + + // Type of the custom interest, CUSTOM_AFFINITY or CUSTOM_INTENT. + // By default the type is set to CUSTOM_AFFINITY. + google.ads.googleads.v3.enums.CustomInterestTypeEnum.CustomInterestType type = 5; + + // Description of this custom interest audience. + google.protobuf.StringValue description = 6; + + // List of custom interest members that this custom interest is composed of. + // Members can be added during CustomInterest creation. If members are + // presented in UPDATE operation, existing members will be overridden. + repeated CustomInterestMember members = 7; +} + +// A member of custom interest audience. A member can be a keyword or url. +// It is immutable, that is, it can only be created or removed but not changed. +message CustomInterestMember { + // The type of custom interest member, KEYWORD or URL. + google.ads.googleads.v3.enums.CustomInterestMemberTypeEnum.CustomInterestMemberType member_type = 1; + + // Keyword text when member_type is KEYWORD or URL string when + // member_type is URL. + google.protobuf.StringValue parameter = 2; +} diff --git a/google/ads/googleads/v3/resources/customer.proto b/google/ads/googleads/v3/resources/customer.proto new file mode 100644 index 000000000..7e4d3af1a --- /dev/null +++ b/google/ads/googleads/v3/resources/customer.proto @@ -0,0 +1,138 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/customer_pay_per_conversion_eligibility_failure_reason.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Customer resource. + +// A customer. +message Customer { + option (google.api.resource) = { + type: "googleads.googleapis.com/Customer" + pattern: "customers/{customer}" + }; + + // Immutable. The resource name of the customer. + // Customer resource names have the form: + // + // `customers/{customer_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Customer" + } + ]; + + // Output only. The ID of the customer. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional, non-unique descriptive name of the customer. + google.protobuf.StringValue descriptive_name = 4; + + // Immutable. The currency in which the account operates. + // A subset of the currency codes from the ISO 4217 standard is + // supported. + google.protobuf.StringValue currency_code = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The local timezone ID of the customer. + google.protobuf.StringValue time_zone = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // The URL template for constructing a tracking URL out of parameters. + google.protobuf.StringValue tracking_url_template = 7; + + // The URL template for appending params to the final URL + google.protobuf.StringValue final_url_suffix = 11; + + // Whether auto-tagging is enabled for the customer. + google.protobuf.BoolValue auto_tagging_enabled = 8; + + // Output only. Whether the Customer has a Partners program badge. If the Customer is not + // associated with the Partners program, this will be false. For more + // information, see https://support.google.com/partners/answer/3125774. + google.protobuf.BoolValue has_partners_badge = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the customer is a manager. + google.protobuf.BoolValue manager = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the customer is a test account. + google.protobuf.BoolValue test_account = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Call reporting setting for a customer. + CallReportingSetting call_reporting_setting = 10; + + // Output only. Conversion tracking setting for a customer. + ConversionTrackingSetting conversion_tracking_setting = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Remarketing setting for a customer. + RemarketingSetting remarketing_setting = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reasons why the customer is not eligible to use PaymentMode.CONVERSIONS. If + // the list is empty, the customer is eligible. This field is read-only. + repeated google.ads.googleads.v3.enums.CustomerPayPerConversionEligibilityFailureReasonEnum.CustomerPayPerConversionEligibilityFailureReason pay_per_conversion_eligibility_failure_reasons = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Call reporting setting for a customer. +message CallReportingSetting { + // Enable reporting of phone call events by redirecting them via Google + // System. + google.protobuf.BoolValue call_reporting_enabled = 1; + + // Whether to enable call conversion reporting. + google.protobuf.BoolValue call_conversion_reporting_enabled = 2; + + // Customer-level call conversion action to attribute a call conversion to. + // If not set a default conversion action is used. Only in effect when + // call_conversion_reporting_enabled is set to true. + google.protobuf.StringValue call_conversion_action = 9 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ConversionAction" + }]; +} + +// A collection of customer-wide settings related to Google Ads Conversion +// Tracking. +message ConversionTrackingSetting { + // Output only. The conversion tracking id used for this account. This id is automatically + // assigned after any conversion tracking feature is used. If the customer + // doesn't use conversion tracking, this is 0. This field is read-only. + google.protobuf.Int64Value conversion_tracking_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The conversion tracking id of the customer's manager. This is set when the + // customer is opted into cross account conversion tracking, and it overrides + // conversion_tracking_id. This field can only be managed through the Google + // Ads UI. This field is read-only. + google.protobuf.Int64Value cross_account_conversion_tracking_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Remarketing setting for a customer. +message RemarketingSetting { + // Output only. The Google global site tag. + google.protobuf.StringValue google_global_site_tag = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/customer_client.proto b/google/ads/googleads/v3/resources/customer_client.proto new file mode 100644 index 000000000..d04d4cada --- /dev/null +++ b/google/ads/googleads/v3/resources/customer_client.proto @@ -0,0 +1,85 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerClientProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the CustomerClient resource. + +// A link between the given customer and a client customer. CustomerClients only +// exist for manager customers. All direct and indirect client customers are +// included, as well as the manager itself. +message CustomerClient { + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerClient" + pattern: "customers/{customer}/customerClients/{customer_client}" + }; + + // Output only. The resource name of the customer client. + // CustomerClient resource names have the form: + // `customers/{customer_id}/customerClients/{client_customer_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerClient" + } + ]; + + // Output only. The resource name of the client-customer which is linked to + // the given customer. Read only. + google.protobuf.StringValue client_customer = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Specifies whether this is a + // [hidden account](https://support.google.com/google-ads/answer/7519830). + // Read only. + google.protobuf.BoolValue hidden = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Distance between given customer and client. For self link, the level value + // will be 0. Read only. + google.protobuf.Int64Value level = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Common Locale Data Repository (CLDR) string representation of the + // time zone of the client, e.g. America/Los_Angeles. Read only. + google.protobuf.StringValue time_zone = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies if the client is a test account. Read only. + google.protobuf.BoolValue test_account = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies if the client is a manager. Read only. + google.protobuf.BoolValue manager = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Descriptive name for the client. Read only. + google.protobuf.StringValue descriptive_name = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Currency code (e.g. 'USD', 'EUR') for the client. Read only. + google.protobuf.StringValue currency_code = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the client customer. Read only. + google.protobuf.Int64Value id = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/customer_client_link.proto b/google/ads/googleads/v3/resources/customer_client_link.proto new file mode 100644 index 000000000..c0c8dd663 --- /dev/null +++ b/google/ads/googleads/v3/resources/customer_client_link.proto @@ -0,0 +1,66 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/manager_link_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerClientLinkProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the CustomerClientLink resource. + +// Represents customer client link relationship. +message CustomerClientLink { + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerClientLink" + pattern: "customers/{customer}/customerClientLinks/{customer_client_link}" + }; + + // Immutable. Name of the resource. + // CustomerClientLink resource names have the form: + // `customers/{customer_id}/customerClientLinks/{client_customer_id}~{manager_link_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerClientLink" + } + ]; + + // Immutable. The client customer linked to this customer. + google.protobuf.StringValue client_customer = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. This is uniquely identifies a customer client link. Read only. + google.protobuf.Int64Value manager_link_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This is the status of the link between client and manager. + google.ads.googleads.v3.enums.ManagerLinkStatusEnum.ManagerLinkStatus status = 5; + + // The visibility of the link. Users can choose whether or not to see hidden + // links in the AdWords UI. + // Default value is false + google.protobuf.BoolValue hidden = 6; +} diff --git a/google/ads/googleads/v3/resources/customer_extension_setting.proto b/google/ads/googleads/v3/resources/customer_extension_setting.proto new file mode 100644 index 000000000..c4c1ef8b8 --- /dev/null +++ b/google/ads/googleads/v3/resources/customer_extension_setting.proto @@ -0,0 +1,68 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/extension_setting_device.proto"; +import "google/ads/googleads/v3/enums/extension_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerExtensionSettingProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the CustomerExtensionSetting resource. + +// A customer extension setting. +message CustomerExtensionSetting { + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerExtensionSetting" + pattern: "customers/{customer}/customerExtensionSettings/{customer_extension_setting}" + }; + + // Immutable. The resource name of the customer extension setting. + // CustomerExtensionSetting resource names have the form: + // + // `customers/{customer_id}/customerExtensionSettings/{extension_type}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerExtensionSetting" + } + ]; + + // Immutable. The extension type of the customer extension setting. + google.ads.googleads.v3.enums.ExtensionTypeEnum.ExtensionType extension_type = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // The resource names of the extension feed items to serve under the customer. + // ExtensionFeedItem resource names have the form: + // + // `customers/{customer_id}/extensionFeedItems/{feed_item_id}` + repeated google.protobuf.StringValue extension_feed_items = 3 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + }]; + + // The device for which the extensions will serve. Optional. + google.ads.googleads.v3.enums.ExtensionSettingDeviceEnum.ExtensionSettingDevice device = 4; +} diff --git a/google/ads/googleads/v3/resources/customer_feed.proto b/google/ads/googleads/v3/resources/customer_feed.proto new file mode 100644 index 000000000..aacc6938d --- /dev/null +++ b/google/ads/googleads/v3/resources/customer_feed.proto @@ -0,0 +1,76 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/matching_function.proto"; +import "google/ads/googleads/v3/enums/feed_link_status.proto"; +import "google/ads/googleads/v3/enums/placeholder_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerFeedProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the CustomerFeed resource. + +// A customer feed. +message CustomerFeed { + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerFeed" + pattern: "customers/{customer}/customerFeeds/{customer_feed}" + }; + + // Immutable. The resource name of the customer feed. + // Customer feed resource names have the form: + // + // `customers/{customer_id}/customerFeeds/{feed_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerFeed" + } + ]; + + // Immutable. The feed being linked to the customer. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + + // Indicates which placeholder types the feed may populate under the connected + // customer. Required. + repeated google.ads.googleads.v3.enums.PlaceholderTypeEnum.PlaceholderType placeholder_types = 3; + + // Matching function associated with the CustomerFeed. + // The matching function is used to filter the set of feed items selected. + // Required. + google.ads.googleads.v3.common.MatchingFunction matching_function = 4; + + // Output only. Status of the customer feed. + // This field is read-only. + google.ads.googleads.v3.enums.FeedLinkStatusEnum.FeedLinkStatus status = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/customer_label.proto b/google/ads/googleads/v3/resources/customer_label.proto new file mode 100644 index 000000000..c36f4c381 --- /dev/null +++ b/google/ads/googleads/v3/resources/customer_label.proto @@ -0,0 +1,63 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerLabelProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the customer label resource. + +// Represents a relationship between a customer and a label. This customer may +// not have access to all the labels attached to it. Additional CustomerLabels +// may be returned by increasing permissions with login-customer-id. +message CustomerLabel { + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerLabel" + pattern: "customers/{customer}/customerLabels/{customer_label}" + }; + + // Immutable. Name of the resource. + // Customer label resource names have the form: + // `customers/{customer_id}/customerLabels/{label_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerLabel" + } + ]; + + // Output only. The resource name of the customer to which the label is attached. + // Read only. + google.protobuf.StringValue customer = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the label assigned to the customer. + // + // Note: the Customer ID portion of the label resource name is not + // validated when creating a new CustomerLabel. + google.protobuf.StringValue label = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/customer_manager_link.proto b/google/ads/googleads/v3/resources/customer_manager_link.proto new file mode 100644 index 000000000..9843d9d39 --- /dev/null +++ b/google/ads/googleads/v3/resources/customer_manager_link.proto @@ -0,0 +1,61 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/manager_link_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerManagerLinkProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the CustomerManagerLink resource. + +// Represents customer-manager link relationship. +message CustomerManagerLink { + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerManagerLink" + pattern: "customers/{customer}/customerManagerLinks/{customer_manager_link}" + }; + + // Immutable. Name of the resource. + // CustomerManagerLink resource names have the form: + // `customers/{customer_id}/customerManagerLinks/{manager_customer_id}~{manager_link_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerManagerLink" + } + ]; + + // Output only. The manager customer linked to the customer. + google.protobuf.StringValue manager_customer = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the customer-manager link. This field is read only. + google.protobuf.Int64Value manager_link_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Status of the link between the customer and the manager. + google.ads.googleads.v3.enums.ManagerLinkStatusEnum.ManagerLinkStatus status = 5; +} diff --git a/google/ads/googleads/v3/resources/customer_negative_criterion.proto b/google/ads/googleads/v3/resources/customer_negative_criterion.proto new file mode 100644 index 000000000..521aabcdf --- /dev/null +++ b/google/ads/googleads/v3/resources/customer_negative_criterion.proto @@ -0,0 +1,83 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/criteria.proto"; +import "google/ads/googleads/v3/enums/criterion_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerNegativeCriterionProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Customer Negative Criterion resource. + +// A negative criterion for exclusions at the customer level. +message CustomerNegativeCriterion { + option (google.api.resource) = { + type: "googleads.googleapis.com/CustomerNegativeCriterion" + pattern: "customers/{customer}/customerNegativeCriteria/{customer_negative_criterion}" + }; + + // Immutable. The resource name of the customer negative criterion. + // Customer negative criterion resource names have the form: + // + // `customers/{customer_id}/customerNegativeCriteria/{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerNegativeCriterion" + } + ]; + + // Output only. The ID of the criterion. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the criterion. + google.ads.googleads.v3.enums.CriterionTypeEnum.CriterionType type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The customer negative criterion. + // + // Exactly one must be set. + oneof criterion { + // Immutable. ContentLabel. + google.ads.googleads.v3.common.ContentLabelInfo content_label = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. MobileApplication. + google.ads.googleads.v3.common.MobileApplicationInfo mobile_application = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. MobileAppCategory. + google.ads.googleads.v3.common.MobileAppCategoryInfo mobile_app_category = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Placement. + google.ads.googleads.v3.common.PlacementInfo placement = 7 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. YouTube Video. + google.ads.googleads.v3.common.YouTubeVideoInfo youtube_video = 8 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. YouTube Channel. + google.ads.googleads.v3.common.YouTubeChannelInfo youtube_channel = 9 [(google.api.field_behavior) = IMMUTABLE]; + } +} diff --git a/google/ads/googleads/v3/resources/detail_placement_view.proto b/google/ads/googleads/v3/resources/detail_placement_view.proto new file mode 100644 index 000000000..b34526abd --- /dev/null +++ b/google/ads/googleads/v3/resources/detail_placement_view.proto @@ -0,0 +1,72 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/placement_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "DetailPlacementViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the detail placement view resource. + +// A view with metrics aggregated by ad group and URL or YouTube video. +message DetailPlacementView { + option (google.api.resource) = { + type: "googleads.googleapis.com/DetailPlacementView" + pattern: "customers/{customer}/detailPlacementViews/{detail_placement_view}" + }; + + // Output only. The resource name of the detail placement view. + // Detail placement view resource names have the form: + // + // `customers/{customer_id}/detailPlacementViews/{ad_group_id}~{base64_placement}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DetailPlacementView" + } + ]; + + // Output only. The automatic placement string at detail level, e. g. website URL, mobile + // application ID, or a YouTube video ID. + google.protobuf.StringValue placement = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The display name is URL name for websites, YouTube video name for YouTube + // videos, and translated mobile app name for mobile apps. + google.protobuf.StringValue display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. URL of the group placement, e.g. domain, link to the mobile application in + // app store, or a YouTube channel URL. + google.protobuf.StringValue group_placement_target_url = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. URL of the placement, e.g. website, link to the mobile application in app + // store, or a YouTube video URL. + google.protobuf.StringValue target_url = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of the placement, e.g. Website, YouTube Video, and Mobile Application. + google.ads.googleads.v3.enums.PlacementTypeEnum.PlacementType placement_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/display_keyword_view.proto b/google/ads/googleads/v3/resources/display_keyword_view.proto new file mode 100644 index 000000000..ef6a16f7c --- /dev/null +++ b/google/ads/googleads/v3/resources/display_keyword_view.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "DisplayKeywordViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the display keyword view resource. + +// A display keyword view. +message DisplayKeywordView { + option (google.api.resource) = { + type: "googleads.googleapis.com/DisplayKeywordView" + pattern: "customers/{customer}/displayKeywordViews/{display_keyword_view}" + }; + + // Output only. The resource name of the display keyword view. + // Display Keyword view resource names have the form: + // + // `customers/{customer_id}/displayKeywordViews/{ad_group_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DisplayKeywordView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/distance_view.proto b/google/ads/googleads/v3/resources/distance_view.proto new file mode 100644 index 000000000..d334934b6 --- /dev/null +++ b/google/ads/googleads/v3/resources/distance_view.proto @@ -0,0 +1,63 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/distance_bucket.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "DistanceViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the DistanceView resource. + +// A distance view with metrics aggregated by the user's distance from an +// advertiser's location extensions. Each DistanceBucket includes all +// impressions that fall within its distance and a single impression will +// contribute to the metrics for all DistanceBuckets that include the user's +// distance. +message DistanceView { + option (google.api.resource) = { + type: "googleads.googleapis.com/DistanceView" + pattern: "customers/{customer}/distanceViews/{distance_view}" + }; + + // Output only. The resource name of the distance view. + // Distance view resource names have the form: + // + // `customers/{customer_id}/distanceViews/1~{distance_bucket}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DistanceView" + } + ]; + + // Output only. Grouping of user distance from location extensions. + google.ads.googleads.v3.enums.DistanceBucketEnum.DistanceBucket distance_bucket = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. True if the DistanceBucket is using the metric system, false otherwise. + google.protobuf.BoolValue metric_system = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/domain_category.proto b/google/ads/googleads/v3/resources/domain_category.proto new file mode 100644 index 000000000..95faa4dcd --- /dev/null +++ b/google/ads/googleads/v3/resources/domain_category.proto @@ -0,0 +1,91 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "DomainCategoryProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Domain Category resource. + +// A category generated automatically by crawling a domain. If a campaign uses +// the DynamicSearchAdsSetting, then domain categories will be generated for +// the domain. The categories can be targeted using WebpageConditionInfo. +// See: https://support.google.com/google-ads/answer/2471185 +message DomainCategory { + option (google.api.resource) = { + type: "googleads.googleapis.com/DomainCategory" + pattern: "customers/{customer}/domainCategories/{domain_category}" + }; + + // Output only. The resource name of the domain category. + // Domain category resource names have the form: + // + // `customers/{customer_id}/domainCategories/{campaign_id}~{category_base64}~{language_code}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DomainCategory" + } + ]; + + // Output only. The campaign this category is recommended for. + google.protobuf.StringValue campaign = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Output only. Recommended category for the website domain. e.g. if you have a website + // about electronics, the categories could be "cameras", "televisions", etc. + google.protobuf.StringValue category = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The language code specifying the language of the website. e.g. "en" for + // English. The language can be specified in the DynamicSearchAdsSetting + // required for dynamic search ads. This is the language of the pages from + // your website that you want Google Ads to find, create ads for, + // and match searches with. + google.protobuf.StringValue language_code = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The domain for the website. The domain can be specified in the + // DynamicSearchAdsSetting required for dynamic search ads. + google.protobuf.StringValue domain = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Fraction of pages on your site that this category matches. + google.protobuf.DoubleValue coverage_fraction = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The position of this category in the set of categories. Lower numbers + // indicate a better match for the domain. null indicates not recommended. + google.protobuf.Int64Value category_rank = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether this category has sub-categories. + google.protobuf.BoolValue has_children = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The recommended cost per click for the category. + google.protobuf.Int64Value recommended_cpc_bid_micros = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/dynamic_search_ads_search_term_view.proto b/google/ads/googleads/v3/resources/dynamic_search_ads_search_term_view.proto new file mode 100644 index 000000000..688d4af4d --- /dev/null +++ b/google/ads/googleads/v3/resources/dynamic_search_ads_search_term_view.proto @@ -0,0 +1,87 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "DynamicSearchAdsSearchTermViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Dynamic Search Ads Search Term View resource. + +// A dynamic search ads search term view. +message DynamicSearchAdsSearchTermView { + option (google.api.resource) = { + type: "googleads.googleapis.com/DynamicSearchAdsSearchTermView" + pattern: "customers/{customer}/dynamicSearchAdsSearchTermViews/{dynamic_search_ads_search_term_view}" + }; + + // Output only. The resource name of the dynamic search ads search term view. + // Dynamic search ads search term view resource names have the form: + // + // `customers/{customer_id}/dynamicSearchAdsSearchTermViews/{ad_group_id}~{search_term_fp}~{headline_fp}~{landing_page_fp}~{page_url_fp}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DynamicSearchAdsSearchTermView" + } + ]; + + // Output only. Search term + // + // This field is read-only. + google.protobuf.StringValue search_term = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The dynamically generated headline of the Dynamic Search Ad. + // + // This field is read-only. + google.protobuf.StringValue headline = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The dynamically selected landing page URL of the impression. + // + // This field is read-only. + google.protobuf.StringValue landing_page = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The URL of page feed item served for the impression. + // + // This field is read-only. + google.protobuf.StringValue page_url = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. True if query matches a negative keyword. + // + // This field is read-only. + google.protobuf.BoolValue has_negative_keyword = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. True if query is added to targeted keywords. + // + // This field is read-only. + google.protobuf.BoolValue has_matching_keyword = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. True if query matches a negative url. + // + // This field is read-only. + google.protobuf.BoolValue has_negative_url = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/expanded_landing_page_view.proto b/google/ads/googleads/v3/resources/expanded_landing_page_view.proto new file mode 100644 index 000000000..c6402b156 --- /dev/null +++ b/google/ads/googleads/v3/resources/expanded_landing_page_view.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ExpandedLandingPageViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the expanded landing page view resource. + +// A landing page view with metrics aggregated at the expanded final URL +// level. +message ExpandedLandingPageView { + option (google.api.resource) = { + type: "googleads.googleapis.com/ExpandedLandingPageView" + pattern: "customers/{customer}/expandedLandingPageViews/{expanded_landing_page_view}" + }; + + // Output only. The resource name of the expanded landing page view. + // Expanded landing page view resource names have the form: + // + // `customers/{customer_id}/expandedLandingPageViews/{expanded_final_url_fingerprint}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ExpandedLandingPageView" + } + ]; + + // Output only. The final URL that clicks are directed to. + google.protobuf.StringValue expanded_final_url = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/extension_feed_item.proto b/google/ads/googleads/v3/resources/extension_feed_item.proto new file mode 100644 index 000000000..5f8348682 --- /dev/null +++ b/google/ads/googleads/v3/resources/extension_feed_item.proto @@ -0,0 +1,149 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/criteria.proto"; +import "google/ads/googleads/v3/common/extensions.proto"; +import "google/ads/googleads/v3/enums/extension_type.proto"; +import "google/ads/googleads/v3/enums/feed_item_status.proto"; +import "google/ads/googleads/v3/enums/feed_item_target_device.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionFeedItemProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ExtensionFeedItem resource. + +// An extension feed item. +message ExtensionFeedItem { + option (google.api.resource) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + pattern: "customers/{customer}/extensionFeedItems/{extension_feed_item}" + }; + + // Immutable. The resource name of the extension feed item. + // Extension feed item resource names have the form: + // + // `customers/{customer_id}/extensionFeedItems/{feed_item_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + } + ]; + + // Output only. The ID of this feed item. Read-only. + google.protobuf.Int64Value id = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The extension type of the extension feed item. + // This field is read-only. + google.ads.googleads.v3.enums.ExtensionTypeEnum.ExtensionType extension_type = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Start time in which this feed item is effective and can begin serving. The + // time is in the customer's time zone. + // The format is "YYYY-MM-DD HH:MM:SS". + // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30" + google.protobuf.StringValue start_date_time = 5; + + // End time in which this feed item is no longer effective and will stop + // serving. The time is in the customer's time zone. + // The format is "YYYY-MM-DD HH:MM:SS". + // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30" + google.protobuf.StringValue end_date_time = 6; + + // List of non-overlapping schedules specifying all time intervals + // for which the feed item may serve. There can be a maximum of 6 schedules + // per day. + repeated google.ads.googleads.v3.common.AdScheduleInfo ad_schedules = 16; + + // The targeted device. + google.ads.googleads.v3.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 17; + + // The targeted geo target constant. + google.protobuf.StringValue targeted_geo_target_constant = 20 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + }]; + + // The targeted keyword. + google.ads.googleads.v3.common.KeywordInfo targeted_keyword = 22; + + // Output only. Status of the feed item. + // This field is read-only. + google.ads.googleads.v3.enums.FeedItemStatusEnum.FeedItemStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Extension type. + oneof extension { + // Sitelink extension. + google.ads.googleads.v3.common.SitelinkFeedItem sitelink_feed_item = 2; + + // Structured snippet extension. + google.ads.googleads.v3.common.StructuredSnippetFeedItem structured_snippet_feed_item = 3; + + // App extension. + google.ads.googleads.v3.common.AppFeedItem app_feed_item = 7; + + // Call extension. + google.ads.googleads.v3.common.CallFeedItem call_feed_item = 8; + + // Callout extension. + google.ads.googleads.v3.common.CalloutFeedItem callout_feed_item = 9; + + // Text message extension. + google.ads.googleads.v3.common.TextMessageFeedItem text_message_feed_item = 10; + + // Price extension. + google.ads.googleads.v3.common.PriceFeedItem price_feed_item = 11; + + // Promotion extension. + google.ads.googleads.v3.common.PromotionFeedItem promotion_feed_item = 12; + + // Output only. Location extension. Locations are synced from a GMB account into a feed. + // This field is read-only. + google.ads.googleads.v3.common.LocationFeedItem location_feed_item = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Affiliate location extension. Feed locations are populated by Google Ads + // based on a chain ID. + // This field is read-only. + google.ads.googleads.v3.common.AffiliateLocationFeedItem affiliate_location_feed_item = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Hotel Callout extension. + google.ads.googleads.v3.common.HotelCalloutFeedItem hotel_callout_feed_item = 23; + } + + // Targeting at either the campaign or ad group level. Feed items that target + // a campaign or ad group will only serve with that resource. + oneof serving_resource_targeting { + // The targeted campaign. + google.protobuf.StringValue targeted_campaign = 18 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + }]; + + // The targeted ad group. + google.protobuf.StringValue targeted_ad_group = 19 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + }]; + } +} diff --git a/google/ads/googleads/v3/resources/feed.proto b/google/ads/googleads/v3/resources/feed.proto new file mode 100644 index 000000000..98c58d338 --- /dev/null +++ b/google/ads/googleads/v3/resources/feed.proto @@ -0,0 +1,193 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/affiliate_location_feed_relationship_type.proto"; +import "google/ads/googleads/v3/enums/feed_attribute_type.proto"; +import "google/ads/googleads/v3/enums/feed_origin.proto"; +import "google/ads/googleads/v3/enums/feed_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "FeedProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Feed resource. + +// A feed. +message Feed { + option (google.api.resource) = { + type: "googleads.googleapis.com/Feed" + pattern: "customers/{customer}/feeds/{feed}" + }; + + // Data used to configure a location feed populated from Google My Business + // Locations. + message PlacesLocationFeedData { + // Data used for authorization using OAuth. + message OAuthInfo { + // The HTTP method used to obtain authorization. + google.protobuf.StringValue http_method = 1; + + // The HTTP request URL used to obtain authorization. + google.protobuf.StringValue http_request_url = 2; + + // The HTTP authorization header used to obtain authorization. + google.protobuf.StringValue http_authorization_header = 3; + } + + // Immutable. Required authentication token (from OAuth API) for the email. + // This field can only be specified in a create request. All its subfields + // are not selectable. + OAuthInfo oauth_info = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Email address of a Google My Business account or email address of a + // manager of the Google My Business account. Required. + google.protobuf.StringValue email_address = 2; + + // Plus page ID of the managed business whose locations should be used. If + // this field is not set, then all businesses accessible by the user + // (specified by email_address) are used. + // This field is mutate-only and is not selectable. + google.protobuf.StringValue business_account_id = 10; + + // Used to filter Google My Business listings by business name. If + // business_name_filter is set, only listings with a matching business name + // are candidates to be sync'd into FeedItems. + google.protobuf.StringValue business_name_filter = 4; + + // Used to filter Google My Business listings by categories. If entries + // exist in category_filters, only listings that belong to any of the + // categories are candidates to be sync'd into FeedItems. If no entries + // exist in category_filters, then all listings are candidates for syncing. + repeated google.protobuf.StringValue category_filters = 5; + + // Used to filter Google My Business listings by labels. If entries exist in + // label_filters, only listings that has any of the labels set are + // candidates to be synchronized into FeedItems. If no entries exist in + // label_filters, then all listings are candidates for syncing. + repeated google.protobuf.StringValue label_filters = 6; + } + + // Data used to configure an affiliate location feed populated with the + // specified chains. + message AffiliateLocationFeedData { + // The list of chains that the affiliate location feed will sync the + // locations from. + repeated google.protobuf.Int64Value chain_ids = 1; + + // The relationship the chains have with the advertiser. + google.ads.googleads.v3.enums.AffiliateLocationFeedRelationshipTypeEnum.AffiliateLocationFeedRelationshipType relationship_type = 2; + } + + // Immutable. The resource name of the feed. + // Feed resource names have the form: + // + // `customers/{customer_id}/feeds/{feed_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + + // Output only. The ID of the feed. + // This field is read-only. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Name of the feed. Required. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // The Feed's attributes. Required on CREATE, unless + // system_feed_generation_data is provided, in which case Google Ads will + // update the feed with the correct attributes. + // Disallowed on UPDATE. Use attribute_operations to add new attributes. + repeated FeedAttribute attributes = 4; + + // The list of operations changing the feed attributes. Attributes can only + // be added, not removed. + repeated FeedAttributeOperation attribute_operations = 9; + + // Immutable. Specifies who manages the FeedAttributes for the Feed. + google.ads.googleads.v3.enums.FeedOriginEnum.FeedOrigin origin = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Status of the feed. + // This field is read-only. + google.ads.googleads.v3.enums.FeedStatusEnum.FeedStatus status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The system data for the Feed. This data specifies information for + // generating the feed items of the system generated feed. + oneof system_feed_generation_data { + // Data used to configure a location feed populated from Google My Business + // Locations. + PlacesLocationFeedData places_location_feed_data = 6; + + // Data used to configure an affiliate location feed populated with + // the specified chains. + AffiliateLocationFeedData affiliate_location_feed_data = 7; + } +} + +// FeedAttributes define the types of data expected to be present in a Feed. A +// single FeedAttribute specifies the expected type of the FeedItemAttributes +// with the same FeedAttributeId. Optionally, a FeedAttribute can be marked as +// being part of a FeedItem's unique key. +message FeedAttribute { + // ID of the attribute. + google.protobuf.Int64Value id = 1; + + // The name of the attribute. Required. + google.protobuf.StringValue name = 2; + + // Data type for feed attribute. Required. + google.ads.googleads.v3.enums.FeedAttributeTypeEnum.FeedAttributeType type = 3; + + // Indicates that data corresponding to this attribute is part of a + // FeedItem's unique key. It defaults to false if it is unspecified. Note + // that a unique key is not required in a Feed's schema, in which case the + // FeedItems must be referenced by their feed_item_id. + google.protobuf.BoolValue is_part_of_key = 4; +} + +// Operation to be performed on a feed attribute list in a mutate. +message FeedAttributeOperation { + // The operator. + enum Operator { + // Unspecified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // Add the attribute to the existing attributes. + ADD = 2; + } + + // Output only. Type of list operation to perform. + Operator operator = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The feed attribute being added to the list. + FeedAttribute value = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/feed_item.proto b/google/ads/googleads/v3/resources/feed_item.proto new file mode 100644 index 000000000..e683626fc --- /dev/null +++ b/google/ads/googleads/v3/resources/feed_item.proto @@ -0,0 +1,215 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/custom_parameter.proto"; +import "google/ads/googleads/v3/common/feed_common.proto"; +import "google/ads/googleads/v3/common/policy.proto"; +import "google/ads/googleads/v3/enums/feed_item_quality_approval_status.proto"; +import "google/ads/googleads/v3/enums/feed_item_quality_disapproval_reason.proto"; +import "google/ads/googleads/v3/enums/feed_item_status.proto"; +import "google/ads/googleads/v3/enums/feed_item_validation_status.proto"; +import "google/ads/googleads/v3/enums/geo_targeting_restriction.proto"; +import "google/ads/googleads/v3/enums/placeholder_type.proto"; +import "google/ads/googleads/v3/enums/policy_approval_status.proto"; +import "google/ads/googleads/v3/enums/policy_review_status.proto"; +import "google/ads/googleads/v3/errors/feed_item_validation_error.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the FeedItem resource. + +// A feed item. +message FeedItem { + option (google.api.resource) = { + type: "googleads.googleapis.com/FeedItem" + pattern: "customers/{customer}/feedItems/{feed_item}" + }; + + // Immutable. The resource name of the feed item. + // Feed item resource names have the form: + // + // `customers/{customer_id}/feedItems/{feed_id}~{feed_item_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItem" + } + ]; + + // Immutable. The feed to which this feed item belongs. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + + // Output only. The ID of this feed item. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Start time in which this feed item is effective and can begin serving. The + // time is in the customer's time zone. + // The format is "YYYY-MM-DD HH:MM:SS". + // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30" + google.protobuf.StringValue start_date_time = 4; + + // End time in which this feed item is no longer effective and will stop + // serving. The time is in the customer's time zone. + // The format is "YYYY-MM-DD HH:MM:SS". + // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30" + google.protobuf.StringValue end_date_time = 5; + + // The feed item's attribute values. + repeated FeedItemAttributeValue attribute_values = 6; + + // Geo targeting restriction specifies the type of location that can be used + // for targeting. + google.ads.googleads.v3.enums.GeoTargetingRestrictionEnum.GeoTargetingRestriction geo_targeting_restriction = 7; + + // The list of mappings used to substitute custom parameter tags in a + // `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + repeated google.ads.googleads.v3.common.CustomParameter url_custom_parameters = 8; + + // Output only. Status of the feed item. + // This field is read-only. + google.ads.googleads.v3.enums.FeedItemStatusEnum.FeedItemStatus status = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. List of info about a feed item's validation and approval state for active + // feed mappings. There will be an entry in the list for each type of feed + // mapping associated with the feed, e.g. a feed with a sitelink and a call + // feed mapping would cause every feed item associated with that feed to have + // an entry in this list for both sitelink and call. + // This field is read-only. + repeated FeedItemPlaceholderPolicyInfo policy_infos = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A feed item attribute value. +message FeedItemAttributeValue { + // Id of the feed attribute for which the value is associated with. + google.protobuf.Int64Value feed_attribute_id = 1; + + // Int64 value. Should be set if feed_attribute_id refers to a feed attribute + // of type INT64. + google.protobuf.Int64Value integer_value = 2; + + // Bool value. Should be set if feed_attribute_id refers to a feed attribute + // of type BOOLEAN. + google.protobuf.BoolValue boolean_value = 3; + + // String value. Should be set if feed_attribute_id refers to a feed attribute + // of type STRING, URL or DATE_TIME. + // For STRING the maximum length is 1500 characters. For URL the maximum + // length is 2076 characters. For DATE_TIME the string must be in the format + // "YYYYMMDD HHMMSS". + google.protobuf.StringValue string_value = 4; + + // Double value. Should be set if feed_attribute_id refers to a feed attribute + // of type DOUBLE. + google.protobuf.DoubleValue double_value = 5; + + // Price value. Should be set if feed_attribute_id refers to a feed attribute + // of type PRICE. + google.ads.googleads.v3.common.Money price_value = 6; + + // Repeated int64 value. Should be set if feed_attribute_id refers to a feed + // attribute of type INT64_LIST. + repeated google.protobuf.Int64Value integer_values = 7; + + // Repeated bool value. Should be set if feed_attribute_id refers to a feed + // attribute of type BOOLEAN_LIST. + repeated google.protobuf.BoolValue boolean_values = 8; + + // Repeated string value. Should be set if feed_attribute_id refers to a feed + // attribute of type STRING_LIST, URL_LIST or DATE_TIME_LIST. + // For STRING_LIST and URL_LIST the total size of the list in bytes may not + // exceed 3000. For DATE_TIME_LIST the number of elements may not exceed 200. + // + // For STRING_LIST the maximum length of each string element is 1500 + // characters. For URL_LIST the maximum length is 2076 characters. For + // DATE_TIME the format of the string must be the same as start and end time + // for the feed item. + repeated google.protobuf.StringValue string_values = 9; + + // Repeated double value. Should be set if feed_attribute_id refers to a feed + // attribute of type DOUBLE_LIST. + repeated google.protobuf.DoubleValue double_values = 10; +} + +// Policy, validation, and quality approval info for a feed item for the +// specified placeholder type. +message FeedItemPlaceholderPolicyInfo { + // Output only. The placeholder type. + google.ads.googleads.v3.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type_enum = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The FeedMapping that contains the placeholder type. + google.protobuf.StringValue feed_mapping_resource_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Where the placeholder type is in the review process. + google.ads.googleads.v3.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The overall approval status of the placeholder type, calculated based on + // the status of its individual policy topic entries. + google.ads.googleads.v3.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The list of policy findings for the placeholder type. + repeated google.ads.googleads.v3.common.PolicyTopicEntry policy_topic_entries = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The validation status of the palceholder type. + google.ads.googleads.v3.enums.FeedItemValidationStatusEnum.FeedItemValidationStatus validation_status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. List of placeholder type validation errors. + repeated FeedItemValidationError validation_errors = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Placeholder type quality evaluation approval status. + google.ads.googleads.v3.enums.FeedItemQualityApprovalStatusEnum.FeedItemQualityApprovalStatus quality_approval_status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. List of placeholder type quality evaluation disapproval reasons. + repeated google.ads.googleads.v3.enums.FeedItemQualityDisapprovalReasonEnum.FeedItemQualityDisapprovalReason quality_disapproval_reasons = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Stores a validation error and the set of offending feed attributes which +// together are responsible for causing a feed item validation error. +message FeedItemValidationError { + // Output only. Error code indicating what validation error was triggered. The description + // of the error can be found in the 'description' field. + google.ads.googleads.v3.errors.FeedItemValidationErrorEnum.FeedItemValidationError validation_error = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The description of the validation error. + google.protobuf.StringValue description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Set of feed attributes in the feed item flagged during validation. If + // empty, no specific feed attributes can be associated with the error + // (e.g. error across the entire feed item). + repeated google.protobuf.Int64Value feed_attribute_ids = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Any extra information related to this error which is not captured by + // validation_error and feed_attribute_id (e.g. placeholder field IDs when + // feed_attribute_id is not mapped). Note that extra_info is not localized. + google.protobuf.StringValue extra_info = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/feed_item_target.proto b/google/ads/googleads/v3/resources/feed_item_target.proto new file mode 100644 index 000000000..d5ca398df --- /dev/null +++ b/google/ads/googleads/v3/resources/feed_item_target.proto @@ -0,0 +1,109 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/criteria.proto"; +import "google/ads/googleads/v3/enums/feed_item_target_device.proto"; +import "google/ads/googleads/v3/enums/feed_item_target_status.proto"; +import "google/ads/googleads/v3/enums/feed_item_target_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemTargetProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the FeedItemTarget resource. + +// A feed item target. +message FeedItemTarget { + option (google.api.resource) = { + type: "googleads.googleapis.com/FeedItemTarget" + pattern: "customers/{customer}/feedItemTargets/{feed_item_target}" + }; + + // Immutable. The resource name of the feed item target. + // Feed item target resource names have the form: + // `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItemTarget" + } + ]; + + // Immutable. The feed item to which this feed item target belongs. + google.protobuf.StringValue feed_item = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItem" + } + ]; + + // Output only. The target type of this feed item target. This field is read-only. + google.ads.googleads.v3.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the targeted resource. This field is read-only. + google.protobuf.Int64Value feed_item_target_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Status of the feed item target. + // This field is read-only. + google.ads.googleads.v3.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The targeted resource. + oneof target { + // Immutable. The targeted campaign. + google.protobuf.StringValue campaign = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Immutable. The targeted ad group. + google.protobuf.StringValue ad_group = 5 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Immutable. The targeted keyword. + google.ads.googleads.v3.common.KeywordInfo keyword = 7 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The targeted geo target constant resource name. + google.protobuf.StringValue geo_target_constant = 8 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + } + ]; + + // Immutable. The targeted device. + google.ads.googleads.v3.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The targeted schedule. + google.ads.googleads.v3.common.AdScheduleInfo ad_schedule = 10 [(google.api.field_behavior) = IMMUTABLE]; + } +} diff --git a/google/ads/googleads/v3/resources/feed_mapping.proto b/google/ads/googleads/v3/resources/feed_mapping.proto new file mode 100644 index 000000000..b0a0d51b7 --- /dev/null +++ b/google/ads/googleads/v3/resources/feed_mapping.proto @@ -0,0 +1,186 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/ad_customizer_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/affiliate_location_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/app_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/call_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/callout_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/custom_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/dsa_page_feed_criterion_field.proto"; +import "google/ads/googleads/v3/enums/education_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/feed_mapping_criterion_type.proto"; +import "google/ads/googleads/v3/enums/feed_mapping_status.proto"; +import "google/ads/googleads/v3/enums/flight_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/hotel_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/job_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/local_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/location_extension_targeting_criterion_field.proto"; +import "google/ads/googleads/v3/enums/location_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/message_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/placeholder_type.proto"; +import "google/ads/googleads/v3/enums/price_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/promotion_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/real_estate_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/sitelink_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/structured_snippet_placeholder_field.proto"; +import "google/ads/googleads/v3/enums/travel_placeholder_field.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "FeedMappingProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the FeedMapping resource. + +// A feed mapping. +message FeedMapping { + option (google.api.resource) = { + type: "googleads.googleapis.com/FeedMapping" + pattern: "customers/{customer}/feedMappings/{feed_mapping}" + }; + + // Immutable. The resource name of the feed mapping. + // Feed mapping resource names have the form: + // + // `customers/{customer_id}/feedMappings/{feed_id}~{feed_mapping_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedMapping" + } + ]; + + // Immutable. The feed of this feed mapping. + google.protobuf.StringValue feed = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; + + // Immutable. Feed attributes to field mappings. These mappings are a one-to-many + // relationship meaning that 1 feed attribute can be used to populate + // multiple placeholder fields, but 1 placeholder field can only draw + // data from 1 feed attribute. Ad Customizer is an exception, 1 placeholder + // field can be mapped to multiple feed attributes. Required. + repeated AttributeFieldMapping attribute_field_mappings = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Status of the feed mapping. + // This field is read-only. + google.ads.googleads.v3.enums.FeedMappingStatusEnum.FeedMappingStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Feed mapping target. Can be either a placeholder or a criterion. For a + // given feed, the active FeedMappings must have unique targets. Required. + oneof target { + // Immutable. The placeholder type of this mapping (i.e., if the mapping maps feed + // attributes to placeholder fields). + google.ads.googleads.v3.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The criterion type of this mapping (i.e., if the mapping maps feed + // attributes to criterion fields). + google.ads.googleads.v3.enums.FeedMappingCriterionTypeEnum.FeedMappingCriterionType criterion_type = 4 [(google.api.field_behavior) = IMMUTABLE]; + } +} + +// Maps from feed attribute id to a placeholder or criterion field id. +message AttributeFieldMapping { + // Immutable. Feed attribute from which to map. + google.protobuf.Int64Value feed_attribute_id = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The placeholder field ID. If a placeholder field enum is not published in + // the current API version, then this field will be populated and the field + // oneof will be empty. + // This field is read-only. + google.protobuf.Int64Value field_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Placeholder or criterion field to be populated using data from + // the above feed attribute. Required. + oneof field { + // Immutable. Sitelink Placeholder Fields. + google.ads.googleads.v3.enums.SitelinkPlaceholderFieldEnum.SitelinkPlaceholderField sitelink_field = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Call Placeholder Fields. + google.ads.googleads.v3.enums.CallPlaceholderFieldEnum.CallPlaceholderField call_field = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. App Placeholder Fields. + google.ads.googleads.v3.enums.AppPlaceholderFieldEnum.AppPlaceholderField app_field = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Location Placeholder Fields. This field is read-only. + google.ads.googleads.v3.enums.LocationPlaceholderFieldEnum.LocationPlaceholderField location_field = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Affiliate Location Placeholder Fields. This field is read-only. + google.ads.googleads.v3.enums.AffiliateLocationPlaceholderFieldEnum.AffiliateLocationPlaceholderField affiliate_location_field = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Callout Placeholder Fields. + google.ads.googleads.v3.enums.CalloutPlaceholderFieldEnum.CalloutPlaceholderField callout_field = 8 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Structured Snippet Placeholder Fields. + google.ads.googleads.v3.enums.StructuredSnippetPlaceholderFieldEnum.StructuredSnippetPlaceholderField structured_snippet_field = 9 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Message Placeholder Fields. + google.ads.googleads.v3.enums.MessagePlaceholderFieldEnum.MessagePlaceholderField message_field = 10 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Price Placeholder Fields. + google.ads.googleads.v3.enums.PricePlaceholderFieldEnum.PricePlaceholderField price_field = 11 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Promotion Placeholder Fields. + google.ads.googleads.v3.enums.PromotionPlaceholderFieldEnum.PromotionPlaceholderField promotion_field = 12 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Ad Customizer Placeholder Fields + google.ads.googleads.v3.enums.AdCustomizerPlaceholderFieldEnum.AdCustomizerPlaceholderField ad_customizer_field = 13 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Dynamic Search Ad Page Feed Fields. + google.ads.googleads.v3.enums.DsaPageFeedCriterionFieldEnum.DsaPageFeedCriterionField dsa_page_feed_field = 14 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Location Target Fields. + google.ads.googleads.v3.enums.LocationExtensionTargetingCriterionFieldEnum.LocationExtensionTargetingCriterionField location_extension_targeting_field = 15 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Education Placeholder Fields + google.ads.googleads.v3.enums.EducationPlaceholderFieldEnum.EducationPlaceholderField education_field = 16 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Flight Placeholder Fields + google.ads.googleads.v3.enums.FlightPlaceholderFieldEnum.FlightPlaceholderField flight_field = 17 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Custom Placeholder Fields + google.ads.googleads.v3.enums.CustomPlaceholderFieldEnum.CustomPlaceholderField custom_field = 18 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Hotel Placeholder Fields + google.ads.googleads.v3.enums.HotelPlaceholderFieldEnum.HotelPlaceholderField hotel_field = 19 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Real Estate Placeholder Fields + google.ads.googleads.v3.enums.RealEstatePlaceholderFieldEnum.RealEstatePlaceholderField real_estate_field = 20 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Travel Placeholder Fields + google.ads.googleads.v3.enums.TravelPlaceholderFieldEnum.TravelPlaceholderField travel_field = 21 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Local Placeholder Fields + google.ads.googleads.v3.enums.LocalPlaceholderFieldEnum.LocalPlaceholderField local_field = 22 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Job Placeholder Fields + google.ads.googleads.v3.enums.JobPlaceholderFieldEnum.JobPlaceholderField job_field = 23 [(google.api.field_behavior) = IMMUTABLE]; + } +} diff --git a/google/ads/googleads/v3/resources/feed_placeholder_view.proto b/google/ads/googleads/v3/resources/feed_placeholder_view.proto new file mode 100644 index 000000000..1857fb14a --- /dev/null +++ b/google/ads/googleads/v3/resources/feed_placeholder_view.proto @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/placeholder_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "FeedPlaceholderViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the FeedPlaceholderView resource. + +// A feed placeholder view. +message FeedPlaceholderView { + option (google.api.resource) = { + type: "googleads.googleapis.com/FeedPlaceholderView" + pattern: "customers/{customer}/feedPlaceholderViews/{feed_placeholder_view}" + }; + + // Output only. The resource name of the feed placeholder view. + // Feed placeholder view resource names have the form: + // + // `customers/{customer_id}/feedPlaceholderViews/{placeholder_type}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedPlaceholderView" + } + ]; + + // Output only. The placeholder type of the feed placeholder view. + google.ads.googleads.v3.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/gender_view.proto b/google/ads/googleads/v3/resources/gender_view.proto new file mode 100644 index 000000000..ab28a2361 --- /dev/null +++ b/google/ads/googleads/v3/resources/gender_view.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "GenderViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the gender view resource. + +// A gender view. +message GenderView { + option (google.api.resource) = { + type: "googleads.googleapis.com/GenderView" + pattern: "customers/{customer}/genderViews/{gender_view}" + }; + + // Output only. The resource name of the gender view. + // Gender view resource names have the form: + // + // `customers/{customer_id}/genderViews/{ad_group_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GenderView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/geo_target_constant.proto b/google/ads/googleads/v3/resources/geo_target_constant.proto new file mode 100644 index 000000000..ca8e916f2 --- /dev/null +++ b/google/ads/googleads/v3/resources/geo_target_constant.proto @@ -0,0 +1,72 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/geo_target_constant_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "GeoTargetConstantProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the geo target constant resource. + +// A geo target constant. +message GeoTargetConstant { + option (google.api.resource) = { + type: "googleads.googleapis.com/GeoTargetConstant" + pattern: "geoTargetConstants/{geo_target_constant}" + }; + + // Output only. The resource name of the geo target constant. + // Geo target constant resource names have the form: + // + // `geoTargetConstants/{geo_target_constant_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + } + ]; + + // Output only. The ID of the geo target constant. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Geo target constant English name. + google.protobuf.StringValue name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ISO-3166-1 alpha-2 country code that is associated with the target. + google.protobuf.StringValue country_code = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Geo target constant target type. + google.protobuf.StringValue target_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Geo target constant status. + google.ads.googleads.v3.enums.GeoTargetConstantStatusEnum.GeoTargetConstantStatus status = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The fully qualified English name, consisting of the target's name and that + // of its parent and country. + google.protobuf.StringValue canonical_name = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/geographic_view.proto b/google/ads/googleads/v3/resources/geographic_view.proto new file mode 100644 index 000000000..39b363716 --- /dev/null +++ b/google/ads/googleads/v3/resources/geographic_view.proto @@ -0,0 +1,64 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/geo_targeting_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "GeographicViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the geographic view resource. + +// A geographic view. +// +// Geographic View includes all metrics aggregated at the country level, +// one row per country. It reports metrics at either actual physical location of +// the user or an area of interest. If other segment fields are used, you may +// get more than one row per country. +message GeographicView { + option (google.api.resource) = { + type: "googleads.googleapis.com/GeographicView" + pattern: "customers/{customer}/geographicViews/{geographic_view}" + }; + + // Output only. The resource name of the geographic view. + // Geographic view resource names have the form: + // + // `customers/{customer_id}/geographicViews/{country_criterion_id}~{location_type}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeographicView" + } + ]; + + // Output only. Type of the geo targeting of the campaign. + google.ads.googleads.v3.enums.GeoTargetingTypeEnum.GeoTargetingType location_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Criterion Id for the country. + google.protobuf.Int64Value country_criterion_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/google_ads_field.proto b/google/ads/googleads/v3/resources/google_ads_field.proto new file mode 100644 index 000000000..3dc08c1f8 --- /dev/null +++ b/google/ads/googleads/v3/resources/google_ads_field.proto @@ -0,0 +1,118 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/google_ads_field_category.proto"; +import "google/ads/googleads/v3/enums/google_ads_field_data_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "GoogleAdsFieldProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Google Ads Field resource. + +// A field or resource (artifact) used by GoogleAdsService. +message GoogleAdsField { + option (google.api.resource) = { + type: "googleads.googleapis.com/GoogleAdsField" + pattern: "googleAdsFields/{google_ads_field}" + }; + + // Output only. The resource name of the artifact. + // Artifact resource names have the form: + // + // `googleAdsFields/{name}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GoogleAdsField" + } + ]; + + // Output only. The name of the artifact. + google.protobuf.StringValue name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The category of the artifact. + google.ads.googleads.v3.enums.GoogleAdsFieldCategoryEnum.GoogleAdsFieldCategory category = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the artifact can be used in a SELECT clause in search + // queries. + google.protobuf.BoolValue selectable = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the artifact can be used in a WHERE clause in search + // queries. + google.protobuf.BoolValue filterable = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the artifact can be used in a ORDER BY clause in search + // queries. + google.protobuf.BoolValue sortable = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The names of all resources, segments, and metrics that are selectable with + // the described artifact. + repeated google.protobuf.StringValue selectable_with = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The names of all resources that are selectable with the described + // artifact. Fields from these resources do not segment metrics when included + // in search queries. + // + // This field is only set for artifacts whose category is RESOURCE. + repeated google.protobuf.StringValue attribute_resources = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. At and beyond version V1 this field lists the names of all metrics that are + // selectable with the described artifact when it is used in the FROM clause. + // It is only set for artifacts whose category is RESOURCE. + // + // Before version V1 this field lists the names of all metrics that are + // selectable with the described artifact. It is only set for artifacts whose + // category is either RESOURCE or SEGMENT + repeated google.protobuf.StringValue metrics = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. At and beyond version V1 this field lists the names of all artifacts, + // whether a segment or another resource, that segment metrics when included + // in search queries and when the described artifact is used in the FROM + // clause. It is only set for artifacts whose category is RESOURCE. + // + // Before version V1 this field lists the names of all artifacts, whether a + // segment or another resource, that segment metrics when included in search + // queries. It is only set for artifacts of category RESOURCE, SEGMENT or + // METRIC. + repeated google.protobuf.StringValue segments = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Values the artifact can assume if it is a field of type ENUM. + // + // This field is only set for artifacts of category SEGMENT or ATTRIBUTE. + repeated google.protobuf.StringValue enum_values = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This field determines the operators that can be used with the artifact + // in WHERE clauses. + google.ads.googleads.v3.enums.GoogleAdsFieldDataTypeEnum.GoogleAdsFieldDataType data_type = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The URL of proto describing the artifact's data type. + google.protobuf.StringValue type_url = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the field artifact is repeated. + google.protobuf.BoolValue is_repeated = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/group_placement_view.proto b/google/ads/googleads/v3/resources/group_placement_view.proto new file mode 100644 index 000000000..78e5152ed --- /dev/null +++ b/google/ads/googleads/v3/resources/group_placement_view.proto @@ -0,0 +1,67 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/placement_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "GroupPlacementViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the group placement view resource. + +// A group placement view. +message GroupPlacementView { + option (google.api.resource) = { + type: "googleads.googleapis.com/GroupPlacementView" + pattern: "customers/{customer}/groupPlacementViews/{group_placement_view}" + }; + + // Output only. The resource name of the group placement view. + // Group placement view resource names have the form: + // + // `customers/{customer_id}/groupPlacementViews/{ad_group_id}~{base64_placement}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GroupPlacementView" + } + ]; + + // Output only. The automatic placement string at group level, e. g. web domain, mobile + // app ID, or a YouTube channel ID. + google.protobuf.StringValue placement = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Domain name for websites and YouTube channel name for YouTube channels. + google.protobuf.StringValue display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. URL of the group placement, e.g. domain, link to the mobile application in + // app store, or a YouTube channel URL. + google.protobuf.StringValue target_url = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of the placement, e.g. Website, YouTube Channel, Mobile Application. + google.ads.googleads.v3.enums.PlacementTypeEnum.PlacementType placement_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/hotel_group_view.proto b/google/ads/googleads/v3/resources/hotel_group_view.proto new file mode 100644 index 000000000..5eaf7a228 --- /dev/null +++ b/google/ads/googleads/v3/resources/hotel_group_view.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "HotelGroupViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the hotel group view resource. + +// A hotel group view. +message HotelGroupView { + option (google.api.resource) = { + type: "googleads.googleapis.com/HotelGroupView" + pattern: "customers/{customer}/hotelGroupViews/{hotel_group_view}" + }; + + // Output only. The resource name of the hotel group view. + // Hotel Group view resource names have the form: + // + // `customers/{customer_id}/hotelGroupViews/{ad_group_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/HotelGroupView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/hotel_performance_view.proto b/google/ads/googleads/v3/resources/hotel_performance_view.proto new file mode 100644 index 000000000..8af349912 --- /dev/null +++ b/google/ads/googleads/v3/resources/hotel_performance_view.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "HotelPerformanceViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the hotel performance view resource. + +// A hotel performance view. +message HotelPerformanceView { + option (google.api.resource) = { + type: "googleads.googleapis.com/HotelPerformanceView" + pattern: "customers/{customer}/hotelPerformanceView" + }; + + // Output only. The resource name of the hotel performance view. + // Hotel performance view resource names have the form: + // + // `customers/{customer_id}/hotelPerformanceView` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/HotelPerformanceView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/invoice.proto b/google/ads/googleads/v3/resources/invoice.proto new file mode 100644 index 000000000..1e86c822f --- /dev/null +++ b/google/ads/googleads/v3/resources/invoice.proto @@ -0,0 +1,184 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/dates.proto"; +import "google/ads/googleads/v3/enums/invoice_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "InvoiceProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Invoice resource. + +// An invoice. All invoice information is snapshotted to match the PDF invoice. +// For invoices older than the launch of InvoiceService, the snapshotted +// information may not match the PDF invoice. +message Invoice { + option (google.api.resource) = { + type: "googleads.googleapis.com/Invoice" + pattern: "customers/{customer}/invoices/{invoice}" + }; + + // Represents a summarized account budget billable cost. + message AccountBudgetSummary { + // Output only. The resource name of the customer associated with this account budget. + // This contains the customer ID, which appears on the invoice PDF as + // "Account ID". + // Customer resource names have the form: + // + // `customers/{customer_id}` + google.protobuf.StringValue customer = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The descriptive name of the account budget’s customer. It appears on the + // invoice PDF as "Account". + google.protobuf.StringValue customer_descriptive_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the account budget associated with this summarized + // billable cost. + // AccountBudget resource names have the form: + // + // `customers/{customer_id}/accountBudgets/{account_budget_id}` + google.protobuf.StringValue account_budget = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the account budget. It appears on the invoice PDF as "Account + // budget". + google.protobuf.StringValue account_budget_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The purchase order number of the account budget. It appears on the + // invoice PDF as "Purchase order". + google.protobuf.StringValue purchase_order_number = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The pretax subtotal amount attributable to this budget during the service + // period, in micros. + google.protobuf.Int64Value subtotal_amount_micros = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The tax amount attributable to this budget during the service period, in + // micros. + google.protobuf.Int64Value tax_amount_micros = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total amount attributable to this budget during the service period, + // in micros. This equals the sum of the account budget subtotal amount and + // the account budget tax amount. + google.protobuf.Int64Value total_amount_micros = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The billable activity date range of the account budget, within the + // service date range of this invoice. The end date is inclusive. This can + // be different from the account budget's start and end time. + google.ads.googleads.v3.common.DateRange billable_activity_date_range = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The resource name of the invoice. Multiple customers can share a given + // invoice, so multiple resource names may point to the same invoice. + // Invoice resource names have the form: + // + // `customers/{customer_id}/invoices/{invoice_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Invoice" + } + ]; + + // Output only. The ID of the invoice. It appears on the invoice PDF as "Invoice number". + google.protobuf.StringValue id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of invoice. + google.ads.googleads.v3.enums.InvoiceTypeEnum.InvoiceType type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of this invoice’s billing setup. + // + // `customers/{customer_id}/billingSetups/{billing_setup_id}` + google.protobuf.StringValue billing_setup = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A 16 digit ID used to identify the payments account associated with the + // billing setup, e.g. "1234-5678-9012-3456". It appears on the invoice PDF as + // "Billing Account Number". + google.protobuf.StringValue payments_account_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A 12 digit ID used to identify the payments profile associated with the + // billing setup, e.g. "1234-5678-9012". It appears on the invoice PDF as + // "Billing ID". + google.protobuf.StringValue payments_profile_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The issue date in yyyy-mm-dd format. It appears on the invoice PDF as + // either "Issue date" or "Invoice date". + google.protobuf.StringValue issue_date = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The due date in yyyy-mm-dd format. + google.protobuf.StringValue due_date = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The service period date range of this invoice. The end date is inclusive. + google.ads.googleads.v3.common.DateRange service_date_range = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The currency code. All costs are returned in this currency. A subset of the + // currency codes derived from the ISO 4217 standard is supported. + google.protobuf.StringValue currency_code = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total amount of invoice level adjustments. These adjustments are made + // on the invoice, not on a specific account budget. + google.protobuf.Int64Value invoice_level_adjustments_micros = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The pretax subtotal amount, in micros. This equals the sum of the + // AccountBudgetSummary subtotal amounts, plus the invoice level adjustments. + google.protobuf.Int64Value subtotal_amount_micros = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The sum of all taxes on the invoice, in micros. This equals the sum of the + // AccountBudgetSummary tax amounts, plus taxes not associated with a specific + // account budget. + google.protobuf.Int64Value tax_amount_micros = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total amount, in micros. This equals the sum of the invoice subtotal + // amount and the invoice tax amount. + google.protobuf.Int64Value total_amount_micros = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the original invoice corrected, wrote off, or canceled + // by this invoice, if applicable. If `corrected_invoice` is set, + // `replaced_invoices` will not be set. + // + // Invoice resource names have the form: + // + // `customers/{customer_id}/invoices/{invoice_id}` + google.protobuf.StringValue corrected_invoice = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the original invoice(s) being rebilled or replaced by + // this invoice, if applicable. There might be multiple replaced invoices due + // to invoice consolidation. The replaced invoices may not belong to the same + // payments account. If `replaced_invoices` is set, `corrected_invoice` will + // not be set. + // Invoice resource names have the form: + // + // `customers/{customer_id}/invoices/{invoice_id}` + repeated google.protobuf.StringValue replaced_invoices = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The URL to a PDF copy of the invoice. Users need to pass in their OAuth + // token to request the PDF with this URL. + google.protobuf.StringValue pdf_url = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The list of summarized account budget information associated with this + // invoice. + repeated AccountBudgetSummary account_budget_summaries = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/keyword_plan.proto b/google/ads/googleads/v3/resources/keyword_plan.proto new file mode 100644 index 000000000..58e8b8c84 --- /dev/null +++ b/google/ads/googleads/v3/resources/keyword_plan.proto @@ -0,0 +1,83 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/dates.proto"; +import "google/ads/googleads/v3/enums/keyword_plan_forecast_interval.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the keyword plan resource. + +// A Keyword Planner plan. +// Max number of saved keyword plans: 10000. +// It's possible to remove plans if limit is reached. +message KeywordPlan { + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlan" + pattern: "customers/{customer}/keywordPlans/{keyword_plan}" + }; + + // Immutable. The resource name of the Keyword Planner plan. + // KeywordPlan resource names have the form: + // + // `customers/{customer_id}/keywordPlans/{kp_plan_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlan" + } + ]; + + // Output only. The ID of the keyword plan. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The name of the keyword plan. + // + // This field is required and should not be empty when creating new keyword + // plans. + google.protobuf.StringValue name = 3; + + // The date period used for forecasting the plan. + KeywordPlanForecastPeriod forecast_period = 4; +} + +// The forecasting period associated with the keyword plan. +message KeywordPlanForecastPeriod { + // Required. The date used for forecasting the Plan. + oneof interval { + // A future date range relative to the current date used for forecasting. + google.ads.googleads.v3.enums.KeywordPlanForecastIntervalEnum.KeywordPlanForecastInterval date_interval = 1; + + // The custom date range used for forecasting. + // The start and end dates must be in the future. Otherwise, an error will + // be returned when the forecasting action is performed. + // The start and end dates are inclusive. + google.ads.googleads.v3.common.DateRange date_range = 2; + } +} diff --git a/google/ads/googleads/v3/resources/keyword_plan_ad_group.proto b/google/ads/googleads/v3/resources/keyword_plan_ad_group.proto new file mode 100644 index 000000000..e0fc27991 --- /dev/null +++ b/google/ads/googleads/v3/resources/keyword_plan_ad_group.proto @@ -0,0 +1,72 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanAdGroupProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the keyword plan ad group resource. + +// A Keyword Planner ad group. +// Max number of keyword plan ad groups per plan: 200. +message KeywordPlanAdGroup { + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlanAdGroup" + pattern: "customers/{customer}/keywordPlanAdGroups/{keyword_plan_ad_group}" + }; + + // Immutable. The resource name of the Keyword Planner ad group. + // KeywordPlanAdGroup resource names have the form: + // + // `customers/{customer_id}/keywordPlanAdGroups/{kp_ad_group_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanAdGroup" + } + ]; + + // The keyword plan campaign to which this ad group belongs. + google.protobuf.StringValue keyword_plan_campaign = 2 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + }]; + + // Output only. The ID of the keyword plan ad group. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The name of the keyword plan ad group. + // + // This field is required and should not be empty when creating keyword plan + // ad group. + google.protobuf.StringValue name = 4; + + // A default ad group max cpc bid in micros in account currency for all + // biddable keywords under the keyword plan ad group. + // If not set, will inherit from parent campaign. + google.protobuf.Int64Value cpc_bid_micros = 5; +} diff --git a/google/ads/googleads/v3/resources/keyword_plan_campaign.proto b/google/ads/googleads/v3/resources/keyword_plan_campaign.proto new file mode 100644 index 000000000..8c24b0e1b --- /dev/null +++ b/google/ads/googleads/v3/resources/keyword_plan_campaign.proto @@ -0,0 +1,99 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/keyword_plan_network.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanCampaignProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the keyword plan campaign resource. + +// A Keyword Plan campaign. +// Max number of keyword plan campaigns per plan allowed: 1. +message KeywordPlanCampaign { + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + pattern: "customers/{customer}/keywordPlanCampaigns/{keyword_plan_campaign}" + }; + + // Immutable. The resource name of the Keyword Plan campaign. + // KeywordPlanCampaign resource names have the form: + // + // `customers/{customer_id}/keywordPlanCampaigns/{kp_campaign_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + } + ]; + + // The keyword plan this campaign belongs to. + google.protobuf.StringValue keyword_plan = 2 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlan" + }]; + + // Output only. The ID of the Keyword Plan campaign. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The name of the Keyword Plan campaign. + // + // This field is required and should not be empty when creating Keyword Plan + // campaigns. + google.protobuf.StringValue name = 4; + + // The languages targeted for the Keyword Plan campaign. + // Max allowed: 1. + repeated google.protobuf.StringValue language_constants = 5 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/LanguageConstant" + }]; + + // Targeting network. + // + // This field is required and should not be empty when creating Keyword Plan + // campaigns. + google.ads.googleads.v3.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 6; + + // A default max cpc bid in micros, and in the account currency, for all ad + // groups under the campaign. + // + // This field is required and should not be empty when creating Keyword Plan + // campaigns. + google.protobuf.Int64Value cpc_bid_micros = 7; + + // The geo targets. + // Max number allowed: 20. + repeated KeywordPlanGeoTarget geo_targets = 8; +} + +// A geo target. +message KeywordPlanGeoTarget { + // Required. The resource name of the geo target. + google.protobuf.StringValue geo_target_constant = 1 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + }]; +} diff --git a/google/ads/googleads/v3/resources/keyword_plan_keyword.proto b/google/ads/googleads/v3/resources/keyword_plan_keyword.proto new file mode 100644 index 000000000..ae4ca9033 --- /dev/null +++ b/google/ads/googleads/v3/resources/keyword_plan_keyword.proto @@ -0,0 +1,72 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/keyword_match_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanKeywordProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the keyword plan keyword resource. + +// A Keyword Plan ad group keyword. +// Max number of keyword plan keywords per plan: 2500. +message KeywordPlanKeyword { + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlanKeyword" + pattern: "customers/{customer}/keywordPlanKeywords/{keyword_plan_keyword}" + }; + + // Immutable. The resource name of the Keyword Plan ad group keyword. + // KeywordPlanKeyword resource names have the form: + // + // `customers/{customer_id}/keywordPlanKeywords/{kp_ad_group_keyword_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanKeyword" + } + ]; + + // The Keyword Plan ad group to which this keyword belongs. + google.protobuf.StringValue keyword_plan_ad_group = 2 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanAdGroup" + }]; + + // Output only. The ID of the Keyword Plan keyword. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The keyword text. + google.protobuf.StringValue text = 4; + + // The keyword match type. + google.ads.googleads.v3.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 5; + + // A keyword level max cpc bid in micros, in the account currency, that + // overrides the keyword plan ad group cpc bid. + google.protobuf.Int64Value cpc_bid_micros = 6; +} diff --git a/google/ads/googleads/v3/resources/keyword_plan_negative_keyword.proto b/google/ads/googleads/v3/resources/keyword_plan_negative_keyword.proto new file mode 100644 index 000000000..8c691bd5e --- /dev/null +++ b/google/ads/googleads/v3/resources/keyword_plan_negative_keyword.proto @@ -0,0 +1,68 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/keyword_match_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanNegativeKeywordProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the keyword plan negative keyword resource. + +// A Keyword Plan negative keyword. +// Max number of keyword plan negative keywords per plan: 1000. +message KeywordPlanNegativeKeyword { + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordPlanNegativeKeyword" + pattern: "customers/{customer}/keywordPlanNegativeKeywords/{keyword_plan_negative_keyword}" + }; + + // Immutable. The resource name of the Keyword Plan negative keyword. + // KeywordPlanNegativeKeyword resource names have the form: + // + // `customers/{customer_id}/keywordPlanNegativeKeywords/{kp_negative_keyword_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanNegativeKeyword" + } + ]; + + // The Keyword Plan campaign to which this negative keyword belongs. + google.protobuf.StringValue keyword_plan_campaign = 2 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + }]; + + // Output only. The ID of the Keyword Plan negative keyword. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The keyword text. + google.protobuf.StringValue text = 4; + + // The keyword match type. + google.ads.googleads.v3.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 5; +} diff --git a/google/ads/googleads/v3/resources/keyword_view.proto b/google/ads/googleads/v3/resources/keyword_view.proto new file mode 100644 index 000000000..36701ce06 --- /dev/null +++ b/google/ads/googleads/v3/resources/keyword_view.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "KeywordViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the keyword view resource. + +// A keyword view. +message KeywordView { + option (google.api.resource) = { + type: "googleads.googleapis.com/KeywordView" + pattern: "customers/{customer}/keywordViews/{keyword_view}" + }; + + // Output only. The resource name of the keyword view. + // Keyword view resource names have the form: + // + // `customers/{customer_id}/keywordViews/{ad_group_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/label.proto b/google/ads/googleads/v3/resources/label.proto new file mode 100644 index 000000000..a75871e9f --- /dev/null +++ b/google/ads/googleads/v3/resources/label.proto @@ -0,0 +1,67 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/text_label.proto"; +import "google/ads/googleads/v3/enums/label_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "LabelProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// A label. +message Label { + option (google.api.resource) = { + type: "googleads.googleapis.com/Label" + pattern: "customers/{customer}/labels/{label}" + }; + + // Immutable. Name of the resource. + // Label resource names have the form: + // `customers/{customer_id}/labels/{label_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; + + // Output only. Id of the label. Read only. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The name of the label. + // + // This field is required and should not be empty when creating a new label. + // + // The length of this string should be between 1 and 80, inclusive. + google.protobuf.StringValue name = 3; + + // Output only. Status of the label. Read only. + google.ads.googleads.v3.enums.LabelStatusEnum.LabelStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A type of label displaying text on a colored background. + google.ads.googleads.v3.common.TextLabel text_label = 5; +} diff --git a/google/ads/googleads/v3/resources/landing_page_view.proto b/google/ads/googleads/v3/resources/landing_page_view.proto new file mode 100644 index 000000000..fda51342c --- /dev/null +++ b/google/ads/googleads/v3/resources/landing_page_view.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "LandingPageViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the landing page view resource. + +// A landing page view with metrics aggregated at the unexpanded final URL +// level. +message LandingPageView { + option (google.api.resource) = { + type: "googleads.googleapis.com/LandingPageView" + pattern: "customers/{customer}/landingPageViews/{landing_page_view}" + }; + + // Output only. The resource name of the landing page view. + // Landing page view resource names have the form: + // + // `customers/{customer_id}/landingPageViews/{unexpanded_final_url_fingerprint}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LandingPageView" + } + ]; + + // Output only. The advertiser-specified final URL. + google.protobuf.StringValue unexpanded_final_url = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/language_constant.proto b/google/ads/googleads/v3/resources/language_constant.proto new file mode 100644 index 000000000..54eabdbbf --- /dev/null +++ b/google/ads/googleads/v3/resources/language_constant.proto @@ -0,0 +1,65 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "LanguageConstantProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the language constant resource. + +// A language. +message LanguageConstant { + option (google.api.resource) = { + type: "googleads.googleapis.com/LanguageConstant" + pattern: "languageConstants/{language_constant}" + }; + + // Output only. The resource name of the language constant. + // Language constant resource names have the form: + // + // `languageConstants/{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LanguageConstant" + } + ]; + + // Output only. The ID of the language constant. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The language code, e.g. "en_US", "en_AU", "es", "fr", etc. + google.protobuf.StringValue code = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The full name of the language in English, e.g., "English (US)", "Spanish", + // etc. + google.protobuf.StringValue name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the language is targetable. + google.protobuf.BoolValue targetable = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/location_view.proto b/google/ads/googleads/v3/resources/location_view.proto new file mode 100644 index 000000000..1405e57c9 --- /dev/null +++ b/google/ads/googleads/v3/resources/location_view.proto @@ -0,0 +1,52 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "LocationViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the location view resource. + +// A location view summarizes the performance of campaigns by +// Location criteria. +message LocationView { + option (google.api.resource) = { + type: "googleads.googleapis.com/LocationView" + pattern: "customers/{customer}/locationViews/{location_view}" + }; + + // Output only. The resource name of the location view. + // Location view resource names have the form: + // + // `customers/{customer_id}/locationViews/{campaign_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LocationView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/managed_placement_view.proto b/google/ads/googleads/v3/resources/managed_placement_view.proto new file mode 100644 index 000000000..2175df462 --- /dev/null +++ b/google/ads/googleads/v3/resources/managed_placement_view.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ManagedPlacementViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Managed Placement view resource. + +// A managed placement view. +message ManagedPlacementView { + option (google.api.resource) = { + type: "googleads.googleapis.com/ManagedPlacementView" + pattern: "customers/{customer}/managedPlacementViews/{managed_placement_view}" + }; + + // Output only. The resource name of the Managed Placement view. + // Managed placement view resource names have the form: + // + // `customers/{customer_id}/managedPlacementViews/{ad_group_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ManagedPlacementView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/media_file.proto b/google/ads/googleads/v3/resources/media_file.proto new file mode 100644 index 000000000..4068912af --- /dev/null +++ b/google/ads/googleads/v3/resources/media_file.proto @@ -0,0 +1,125 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/media_type.proto"; +import "google/ads/googleads/v3/enums/mime_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "MediaFileProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the media file resource. + +// A media file. +message MediaFile { + option (google.api.resource) = { + type: "googleads.googleapis.com/MediaFile" + pattern: "customers/{customer}/mediaFiles/{media_file}" + }; + + // Immutable. The resource name of the media file. + // Media file resource names have the form: + // + // `customers/{customer_id}/mediaFiles/{media_file_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MediaFile" + } + ]; + + // Output only. The ID of the media file. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Type of the media file. + google.ads.googleads.v3.enums.MediaTypeEnum.MediaType type = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The mime type of the media file. + google.ads.googleads.v3.enums.MimeTypeEnum.MimeType mime_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The URL of where the original media file was downloaded from (or a file + // name). Only used for media of type AUDIO and IMAGE. + google.protobuf.StringValue source_url = 7 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The name of the media file. The name can be used by clients to help + // identify previously uploaded media. + google.protobuf.StringValue name = 8 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The size of the media file in bytes. + google.protobuf.Int64Value file_size = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The specific type of the media file. + oneof mediatype { + // Immutable. Encapsulates an Image. + MediaImage image = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. A ZIP archive media the content of which contains HTML5 assets. + MediaBundle media_bundle = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Encapsulates an Audio. + MediaAudio audio = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Encapsulates a Video. + MediaVideo video = 11 [(google.api.field_behavior) = IMMUTABLE]; + } +} + +// Encapsulates an Image. +message MediaImage { + // Immutable. Raw image data. + google.protobuf.BytesValue data = 1 [(google.api.field_behavior) = IMMUTABLE]; +} + +// Represents a ZIP archive media the content of which contains HTML5 assets. +message MediaBundle { + // Immutable. Raw zipped data. + google.protobuf.BytesValue data = 1 [(google.api.field_behavior) = IMMUTABLE]; +} + +// Encapsulates an Audio. +message MediaAudio { + // Output only. The duration of the Audio in milliseconds. + google.protobuf.Int64Value ad_duration_millis = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Encapsulates a Video. +message MediaVideo { + // Output only. The duration of the Video in milliseconds. + google.protobuf.Int64Value ad_duration_millis = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The YouTube video ID (as seen in YouTube URLs). + google.protobuf.StringValue youtube_video_id = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The Advertising Digital Identification code for this video, as defined by + // the American Association of Advertising Agencies, used mainly for + // television commercials. + google.protobuf.StringValue advertising_id_code = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Industry Standard Commercial Identifier code for this video, used + // mainly for television commercials. + google.protobuf.StringValue isci_code = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/merchant_center_link.proto b/google/ads/googleads/v3/resources/merchant_center_link.proto new file mode 100644 index 000000000..a5a8d021b --- /dev/null +++ b/google/ads/googleads/v3/resources/merchant_center_link.proto @@ -0,0 +1,65 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/merchant_center_link_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "MerchantCenterLinkProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Merchant Center link resource. + +// A data sharing connection, proposed or in use, +// between a Google Ads Customer and a Merchant Center account. +message MerchantCenterLink { + option (google.api.resource) = { + type: "googleads.googleapis.com/MerchantCenterLink" + pattern: "customers/{customer}/merchantCenterLinks/{merchant_center_link}" + }; + + // Immutable. The resource name of the merchant center link. + // Merchant center link resource names have the form: + // + // `customers/{customer_id}/merchantCenterLinks/{merchant_center_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MerchantCenterLink" + } + ]; + + // Output only. The ID of the Merchant Center account. + // This field is readonly. + google.protobuf.Int64Value id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the Merchant Center account. + // This field is readonly. + google.protobuf.StringValue merchant_center_account_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The status of the link. + google.ads.googleads.v3.enums.MerchantCenterLinkStatusEnum.MerchantCenterLinkStatus status = 5; +} diff --git a/google/ads/googleads/v3/resources/mobile_app_category_constant.proto b/google/ads/googleads/v3/resources/mobile_app_category_constant.proto new file mode 100644 index 000000000..7ae25c914 --- /dev/null +++ b/google/ads/googleads/v3/resources/mobile_app_category_constant.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "MobileAppCategoryConstantProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Mobile App Category Constant resource. + +// A mobile application category constant. +message MobileAppCategoryConstant { + option (google.api.resource) = { + type: "googleads.googleapis.com/MobileAppCategoryConstant" + pattern: "mobileAppCategoryConstants/{mobile_app_category_constant}" + }; + + // Output only. The resource name of the mobile app category constant. + // Mobile app category constant resource names have the form: + // + // `mobileAppCategoryConstants/{mobile_app_category_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MobileAppCategoryConstant" + } + ]; + + // Output only. The ID of the mobile app category constant. + google.protobuf.Int32Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Mobile app category name. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/mobile_device_constant.proto b/google/ads/googleads/v3/resources/mobile_device_constant.proto new file mode 100644 index 000000000..711904254 --- /dev/null +++ b/google/ads/googleads/v3/resources/mobile_device_constant.proto @@ -0,0 +1,68 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/mobile_device_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "MobileDeviceConstantProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the mobile device constant resource. + +// A mobile device constant. +message MobileDeviceConstant { + option (google.api.resource) = { + type: "googleads.googleapis.com/MobileDeviceConstant" + pattern: "mobileDeviceConstants/{mobile_device_constant}" + }; + + // Output only. The resource name of the mobile device constant. + // Mobile device constant resource names have the form: + // + // `mobileDeviceConstants/{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MobileDeviceConstant" + } + ]; + + // Output only. The ID of the mobile device constant. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the mobile device. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The manufacturer of the mobile device. + google.protobuf.StringValue manufacturer_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The operating system of the mobile device. + google.protobuf.StringValue operating_system_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of mobile device. + google.ads.googleads.v3.enums.MobileDeviceTypeEnum.MobileDeviceType type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/mutate_job.proto b/google/ads/googleads/v3/resources/mutate_job.proto new file mode 100644 index 000000000..61a72ca04 --- /dev/null +++ b/google/ads/googleads/v3/resources/mutate_job.proto @@ -0,0 +1,95 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/mutate_job_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "MutateJobProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the mutate job resource. + +// A list of mutates being processed asynchronously. The mutates are uploaded +// by the user. The mutates themselves aren't readable and the results of the +// job can only be read using MutateJobService.ListMutateJobResults. +message MutateJob { + option (google.api.resource) = { + type: "googleads.googleapis.com/MutateJob" + pattern: "customers/{customer}/mutateJobs/{mutate_job}" + }; + + // Additional information about the mutate job. This message is also used as + // metadata returned in mutate job Long Running Operations. + message MutateJobMetadata { + // Output only. The time when this mutate job was created. + // Formatted as yyyy-mm-dd hh:mm:ss. Example: "2018-03-05 09:15:00" + google.protobuf.StringValue creation_date_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when this mutate job was completed. + // Formatted as yyyy-MM-dd HH:mm:ss. Example: "2018-03-05 09:16:00" + google.protobuf.StringValue completion_date_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The fraction (between 0.0 and 1.0) of mutates that have been processed. + // This is empty if the job hasn't started running yet. + google.protobuf.DoubleValue estimated_completion_ratio = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of mutate operations in the mutate job. + google.protobuf.Int64Value operation_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of mutate operations executed by the mutate job. + // Present only if the job has started running. + google.protobuf.Int64Value executed_operation_count = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Immutable. The resource name of the mutate job. + // Mutate job resource names have the form: + // + // `customers/{customer_id}/mutateJobs/{mutate_job_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; + + // Output only. ID of this mutate job. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The next sequence token to use when adding operations. Only set when the + // mutate job status is PENDING. + google.protobuf.StringValue next_add_sequence_token = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Contains additional information about this mutate job. + MutateJobMetadata metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Status of this mutate job. + google.ads.googleads.v3.enums.MutateJobStatusEnum.MutateJobStatus status = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the long-running operation that can be used to poll + // for completion. Only set when the mutate job status is RUNNING or DONE. + google.protobuf.StringValue long_running_operation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/offline_user_data_job.proto b/google/ads/googleads/v3/resources/offline_user_data_job.proto new file mode 100644 index 000000000..6e2d5e394 --- /dev/null +++ b/google/ads/googleads/v3/resources/offline_user_data_job.proto @@ -0,0 +1,83 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/offline_user_data.proto"; +import "google/ads/googleads/v3/enums/offline_user_data_job_failure_reason.proto"; +import "google/ads/googleads/v3/enums/offline_user_data_job_status.proto"; +import "google/ads/googleads/v3/enums/offline_user_data_job_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "OfflineUserDataJobProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the offline user data job resource. + +// A job containing offline user data of store visitors, or user list members +// that will be processed asynchronously. The uploaded data isn't readable and +// the processing results of the job can only be read using +// OfflineUserDataJobService.GetOfflineUserDataJob. +message OfflineUserDataJob { + option (google.api.resource) = { + type: "googleads.googleapis.com/OfflineUserDataJob" + pattern: "customers/{customer}/offlineUserDataJobs/{offline_user_data_job}" + }; + + // Immutable. The resource name of the offline user data job. + // Offline user data job resource names have the form: + // + // `customers/{customer_id}/offlineUserDataJobs/{offline_user_data_job_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/OfflineUserDataJob" + } + ]; + + // Output only. ID of this offline user data job. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. User specified job ID. + google.protobuf.Int64Value external_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of the job. + google.ads.googleads.v3.enums.OfflineUserDataJobTypeEnum.OfflineUserDataJobType type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Status of the job. + google.ads.googleads.v3.enums.OfflineUserDataJobStatusEnum.OfflineUserDataJobStatus status = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reason for the processing failure, if status is FAILED. + google.ads.googleads.v3.enums.OfflineUserDataJobFailureReasonEnum.OfflineUserDataJobFailureReason failure_reason = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Metadata of the job. + oneof metadata { + // Output only. Metadata for data updates to a CRM-based user list. + google.ads.googleads.v3.common.CustomerMatchUserListMetadata customer_match_user_list_metadata = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata for store sales data update. + google.ads.googleads.v3.common.StoreSalesMetadata store_sales_metadata = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} diff --git a/google/ads/googleads/v3/resources/operating_system_version_constant.proto b/google/ads/googleads/v3/resources/operating_system_version_constant.proto new file mode 100644 index 000000000..cb9ed40ba --- /dev/null +++ b/google/ads/googleads/v3/resources/operating_system_version_constant.proto @@ -0,0 +1,71 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/operating_system_version_operator_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "OperatingSystemVersionConstantProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the operating system version constant resource. + +// A mobile operating system version or a range of versions, depending on +// `operator_type`. List of available mobile platforms at +// https://developers.google.com/adwords/api/docs/appendix/codes-formats#mobile-platforms +message OperatingSystemVersionConstant { + option (google.api.resource) = { + type: "googleads.googleapis.com/OperatingSystemVersionConstant" + pattern: "operatingSystemVersionConstants/{operating_system_version_constant}" + }; + + // Output only. The resource name of the operating system version constant. + // Operating system version constant resource names have the form: + // + // `operatingSystemVersionConstants/{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/OperatingSystemVersionConstant" + } + ]; + + // Output only. The ID of the operating system version. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the operating system. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The OS Major Version number. + google.protobuf.Int32Value os_major_version = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The OS Minor Version number. + google.protobuf.Int32Value os_minor_version = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Determines whether this constant represents a single version or a range of + // versions. + google.ads.googleads.v3.enums.OperatingSystemVersionOperatorTypeEnum.OperatingSystemVersionOperatorType operator_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/paid_organic_search_term_view.proto b/google/ads/googleads/v3/resources/paid_organic_search_term_view.proto new file mode 100644 index 000000000..0bb047386 --- /dev/null +++ b/google/ads/googleads/v3/resources/paid_organic_search_term_view.proto @@ -0,0 +1,57 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "PaidOrganicSearchTermViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the PaidOrganicSearchTermView resource. + +// A paid organic search term view providing a view of search stats across +// ads and organic listings aggregated by search term at the ad group level. +message PaidOrganicSearchTermView { + option (google.api.resource) = { + type: "googleads.googleapis.com/PaidOrganicSearchTermView" + pattern: "customers/{customer}/paidOrganicSearchTermViews/{paid_organic_search_term_view}" + }; + + // Output only. The resource name of the search term view. + // Search term view resource names have the form: + // + // `customers/{customer_id}/paidOrganicSearchTermViews/{campaign_id}~ + // {ad_group_id}~{URL-base64 search term}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/PaidOrganicSearchTermView" + } + ]; + + // Output only. The search term. + google.protobuf.StringValue search_term = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/parental_status_view.proto b/google/ads/googleads/v3/resources/parental_status_view.proto new file mode 100644 index 000000000..8aae34dbc --- /dev/null +++ b/google/ads/googleads/v3/resources/parental_status_view.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ParentalStatusViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the parental status view resource. + +// A parental status view. +message ParentalStatusView { + option (google.api.resource) = { + type: "googleads.googleapis.com/ParentalStatusView" + pattern: "customers/{customer}/parentalStatusViews/{parental_status_view}" + }; + + // Output only. The resource name of the parental status view. + // Parental Status view resource names have the form: + // + // `customers/{customer_id}/parentalStatusViews/{ad_group_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ParentalStatusView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/payments_account.proto b/google/ads/googleads/v3/resources/payments_account.proto new file mode 100644 index 000000000..5012e167b --- /dev/null +++ b/google/ads/googleads/v3/resources/payments_account.proto @@ -0,0 +1,74 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "PaymentsAccountProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the PaymentsAccount resource. + +// A payments account, which can be used to set up billing for an Ads customer. +message PaymentsAccount { + option (google.api.resource) = { + type: "googleads.googleapis.com/PaymentsAccount" + pattern: "customers/{customer}/paymentsAccounts/{payments_account}" + }; + + // Output only. The resource name of the payments account. + // PaymentsAccount resource names have the form: + // + // `customers/{customer_id}/paymentsAccounts/{payments_account_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/PaymentsAccount" + } + ]; + + // Output only. A 16 digit ID used to identify a payments account. + google.protobuf.StringValue payments_account_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the payments account. + google.protobuf.StringValue name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The currency code of the payments account. + // A subset of the currency codes derived from the ISO 4217 standard is + // supported. + google.protobuf.StringValue currency_code = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A 12 digit ID used to identify the payments profile associated with the + // payments account. + google.protobuf.StringValue payments_profile_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A secondary payments profile ID present in uncommon situations, e.g. + // when a sequential liability agreement has been arranged. + google.protobuf.StringValue secondary_payments_profile_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Paying manager of this payment account. + google.protobuf.StringValue paying_manager_customer = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/product_bidding_category_constant.proto b/google/ads/googleads/v3/resources/product_bidding_category_constant.proto new file mode 100644 index 000000000..149fb016a --- /dev/null +++ b/google/ads/googleads/v3/resources/product_bidding_category_constant.proto @@ -0,0 +1,84 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/product_bidding_category_level.proto"; +import "google/ads/googleads/v3/enums/product_bidding_category_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ProductBiddingCategoryConstantProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ProductBiddingCategoryConstant resource. + +// A Product Bidding Category. +message ProductBiddingCategoryConstant { + option (google.api.resource) = { + type: "googleads.googleapis.com/ProductBiddingCategoryConstant" + pattern: "productBiddingCategoryConstants/{product_bidding_category_constant}" + }; + + // Output only. The resource name of the product bidding category. + // Product bidding category resource names have the form: + // + // `productBiddingCategoryConstants/{country_code}~{level}~{id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ProductBiddingCategoryConstant" + } + ]; + + // Output only. ID of the product bidding category. + // + // This ID is equivalent to the google_product_category ID as described in + // this article: https://support.google.com/merchants/answer/6324436. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Two-letter upper-case country code of the product bidding category. + google.protobuf.StringValue country_code = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Resource name of the parent product bidding category. + google.protobuf.StringValue product_bidding_category_constant_parent = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ProductBiddingCategoryConstant" + } + ]; + + // Output only. Level of the product bidding category. + google.ads.googleads.v3.enums.ProductBiddingCategoryLevelEnum.ProductBiddingCategoryLevel level = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Status of the product bidding category. + google.ads.googleads.v3.enums.ProductBiddingCategoryStatusEnum.ProductBiddingCategoryStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Language code of the product bidding category. + google.protobuf.StringValue language_code = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Display value of the product bidding category localized according to + // language_code. + google.protobuf.StringValue localized_name = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/product_group_view.proto b/google/ads/googleads/v3/resources/product_group_view.proto new file mode 100644 index 000000000..2572a3fb6 --- /dev/null +++ b/google/ads/googleads/v3/resources/product_group_view.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ProductGroupViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ProductGroup View resource. + +// A product group view. +message ProductGroupView { + option (google.api.resource) = { + type: "googleads.googleapis.com/ProductGroupView" + pattern: "customers/{customer}/productGroupViews/{product_group_view}" + }; + + // Output only. The resource name of the product group view. + // Product group view resource names have the form: + // + // `customers/{customer_id}/productGroupViews/{ad_group_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ProductGroupView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/recommendation.proto b/google/ads/googleads/v3/resources/recommendation.proto new file mode 100644 index 000000000..104ab6e8d --- /dev/null +++ b/google/ads/googleads/v3/resources/recommendation.proto @@ -0,0 +1,319 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/criteria.proto"; +import "google/ads/googleads/v3/common/extensions.proto"; +import "google/ads/googleads/v3/enums/keyword_match_type.proto"; +import "google/ads/googleads/v3/enums/recommendation_type.proto"; +import "google/ads/googleads/v3/enums/target_cpa_opt_in_recommendation_goal.proto"; +import "google/ads/googleads/v3/resources/ad.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "RecommendationProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Recommendation resource. + +// A recommendation. +message Recommendation { + option (google.api.resource) = { + type: "googleads.googleapis.com/Recommendation" + pattern: "customers/{customer}/recommendations/{recommendation}" + }; + + // The impact of making the change as described in the recommendation. + // Some types of recommendations may not have impact information. + message RecommendationImpact { + // Output only. Base metrics at the time the recommendation was generated. + RecommendationMetrics base_metrics = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Estimated metrics if the recommendation is applied. + RecommendationMetrics potential_metrics = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Weekly account performance metrics. For some recommendation types, these + // are averaged over the past 90-day period and hence can be fractional. + message RecommendationMetrics { + // Output only. Number of ad impressions. + google.protobuf.DoubleValue impressions = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of ad clicks. + google.protobuf.DoubleValue clicks = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cost (in micros) for advertising, in the local currency for the account. + google.protobuf.Int64Value cost_micros = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of conversions. + google.protobuf.DoubleValue conversions = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of video views for a video ad campaign. + google.protobuf.DoubleValue video_views = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The budget recommendation for budget constrained campaigns. + message CampaignBudgetRecommendation { + // The impact estimates for a given budget amount. + message CampaignBudgetRecommendationOption { + // Output only. The budget amount for this option. + google.protobuf.Int64Value budget_amount_micros = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The impact estimate if budget is changed to amount specified in this + // option. + RecommendationImpact impact = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The current budget amount in micros. + google.protobuf.Int64Value current_budget_amount_micros = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The recommended budget amount in micros. + google.protobuf.Int64Value recommended_budget_amount_micros = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The budget amounts and associated impact estimates for some values of + // possible budget amounts. + repeated CampaignBudgetRecommendationOption budget_options = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The keyword recommendation. + message KeywordRecommendation { + // Output only. The recommended keyword. + google.ads.googleads.v3.common.KeywordInfo keyword = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The recommended CPC (cost-per-click) bid. + google.protobuf.Int64Value recommended_cpc_bid_micros = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The text ad recommendation. + message TextAdRecommendation { + // Output only. Recommended ad. + Ad ad = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Creation date of the recommended ad. + // YYYY-MM-DD format, e.g., 2018-04-17. + google.protobuf.StringValue creation_date = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Date, if present, is the earliest when the recommendation will be auto + // applied. + // YYYY-MM-DD format, e.g., 2018-04-17. + google.protobuf.StringValue auto_apply_date = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The Target CPA opt-in recommendation. + message TargetCpaOptInRecommendation { + // The Target CPA opt-in option with impact estimate. + message TargetCpaOptInRecommendationOption { + // Output only. The goal achieved by this option. + google.ads.googleads.v3.enums.TargetCpaOptInRecommendationGoalEnum.TargetCpaOptInRecommendationGoal goal = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Average CPA target. + google.protobuf.Int64Value target_cpa_micros = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The minimum campaign budget, in local currency for the account, + // required to achieve the target CPA. + // Amount is specified in micros, where one million is equivalent to one + // currency unit. + google.protobuf.Int64Value required_campaign_budget_amount_micros = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The impact estimate if this option is selected. + RecommendationImpact impact = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The available goals and corresponding options for Target CPA strategy. + repeated TargetCpaOptInRecommendationOption options = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The recommended average CPA target. See required budget amount and impact + // of using this recommendation in options list. + google.protobuf.Int64Value recommended_target_cpa_micros = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The Maximize Conversions Opt-In recommendation. + message MaximizeConversionsOptInRecommendation { + // Output only. The recommended new budget amount. + google.protobuf.Int64Value recommended_budget_amount_micros = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The Maximize Clicks opt-in recommendation. + message MaximizeClicksOptInRecommendation { + // Output only. The recommended new budget amount. + // Only set if the current budget is too high. + google.protobuf.Int64Value recommended_budget_amount_micros = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The Callout extension recommendation. + message CalloutExtensionRecommendation { + // Output only. Callout extensions recommended to be added. + repeated google.ads.googleads.v3.common.CalloutFeedItem recommended_extensions = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The move unused budget recommendation. + message MoveUnusedBudgetRecommendation { + // Output only. The excess budget's resource_name. + google.protobuf.StringValue excess_campaign_budget = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The recommendation for the constrained budget to increase. + CampaignBudgetRecommendation budget_recommendation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The Enhanced Cost-Per-Click Opt-In recommendation. + message EnhancedCpcOptInRecommendation { + + } + + // The keyword match type recommendation. + message KeywordMatchTypeRecommendation { + // Output only. The existing keyword where the match type should be more broad. + google.ads.googleads.v3.common.KeywordInfo keyword = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The recommended new match type. + google.ads.googleads.v3.enums.KeywordMatchTypeEnum.KeywordMatchType recommended_match_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The Search Partners Opt-In recommendation. + message SearchPartnersOptInRecommendation { + + } + + // The Call extension recommendation. + message CallExtensionRecommendation { + // Output only. Call extensions recommended to be added. + repeated google.ads.googleads.v3.common.CallFeedItem recommended_extensions = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The Optimize Ad Rotation recommendation. + message OptimizeAdRotationRecommendation { + + } + + // The Sitelink extension recommendation. + message SitelinkExtensionRecommendation { + // Output only. Sitelink extensions recommended to be added. + repeated google.ads.googleads.v3.common.SitelinkFeedItem recommended_extensions = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Immutable. The resource name of the recommendation. + // + // `customers/{customer_id}/recommendations/{recommendation_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Recommendation" + } + ]; + + // Output only. The type of recommendation. + google.ads.googleads.v3.enums.RecommendationTypeEnum.RecommendationType type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The impact on account performance as a result of applying the + // recommendation. + RecommendationImpact impact = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The budget targeted by this recommendation. This will be set only when + // the recommendation affects a single campaign budget. + // + // This field will be set for the following recommendation types: + // CAMPAIGN_BUDGET, MOVE_UNUSED_BUDGET + google.protobuf.StringValue campaign_budget = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBudget" + } + ]; + + // Output only. The campaign targeted by this recommendation. This will be set only when + // the recommendation affects a single campaign. + // + // This field will be set for the following recommendation types: + // CALL_EXTENSION, CALLOUT_EXTENSION, ENHANCED_CPC_OPT_IN, KEYWORD, + // KEYWORD_MATCH_TYPE, MAXIMIZE_CLICKS_OPT_IN, MAXIMIZE_CONVERSIONS_OPT_IN, + // OPTIMIZE_AD_ROTATION, SEARCH_PARTNERS_OPT_IN, SITELINK_EXTENSION, + // TARGET_CPA_OPT_IN, TEXT_AD + google.protobuf.StringValue campaign = 6 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Output only. The ad group targeted by this recommendation. This will be set only when + // the recommendation affects a single ad group. + // + // This field will be set for the following recommendation types: + // KEYWORD, OPTIMIZE_AD_ROTATION, TEXT_AD + google.protobuf.StringValue ad_group = 7 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Output only. Whether the recommendation is dismissed or not. + google.protobuf.BoolValue dismissed = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The details of recommendation. + oneof recommendation { + // Output only. The campaign budget recommendation. + CampaignBudgetRecommendation campaign_budget_recommendation = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The keyword recommendation. + KeywordRecommendation keyword_recommendation = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Add expanded text ad recommendation. + TextAdRecommendation text_ad_recommendation = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The TargetCPA opt-in recommendation. + TargetCpaOptInRecommendation target_cpa_opt_in_recommendation = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The MaximizeConversions Opt-In recommendation. + MaximizeConversionsOptInRecommendation maximize_conversions_opt_in_recommendation = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Enhanced Cost-Per-Click Opt-In recommendation. + EnhancedCpcOptInRecommendation enhanced_cpc_opt_in_recommendation = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Search Partners Opt-In recommendation. + SearchPartnersOptInRecommendation search_partners_opt_in_recommendation = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The MaximizeClicks Opt-In recommendation. + MaximizeClicksOptInRecommendation maximize_clicks_opt_in_recommendation = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Optimize Ad Rotation recommendation. + OptimizeAdRotationRecommendation optimize_ad_rotation_recommendation = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Callout extension recommendation. + CalloutExtensionRecommendation callout_extension_recommendation = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Sitelink extension recommendation. + SitelinkExtensionRecommendation sitelink_extension_recommendation = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Call extension recommendation. + CallExtensionRecommendation call_extension_recommendation = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The keyword match type recommendation. + KeywordMatchTypeRecommendation keyword_match_type_recommendation = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The move unused budget recommendation. + MoveUnusedBudgetRecommendation move_unused_budget_recommendation = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} diff --git a/google/ads/googleads/v3/resources/remarketing_action.proto b/google/ads/googleads/v3/resources/remarketing_action.proto new file mode 100644 index 000000000..e1aff0a8a --- /dev/null +++ b/google/ads/googleads/v3/resources/remarketing_action.proto @@ -0,0 +1,67 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/tag_snippet.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "RemarketingActionProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Remarketing Action resource. + +// A remarketing action. A snippet of JavaScript code that will collect the +// product id and the type of page people visited (product page, shopping cart +// page, purchase page, general site visit) on an advertiser's website. +message RemarketingAction { + option (google.api.resource) = { + type: "googleads.googleapis.com/RemarketingAction" + pattern: "customers/{customer}/remarketingActions/{remarketing_action}" + }; + + // Immutable. The resource name of the remarketing action. + // Remarketing action resource names have the form: + // + // `customers/{customer_id}/remarketingActions/{remarketing_action_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/RemarketingAction" + } + ]; + + // Output only. Id of the remarketing action. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The name of the remarketing action. + // + // This field is required and should not be empty when creating new + // remarketing actions. + google.protobuf.StringValue name = 3; + + // Output only. The snippets used for tracking remarketing actions. + repeated google.ads.googleads.v3.common.TagSnippet tag_snippets = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/search_term_view.proto b/google/ads/googleads/v3/resources/search_term_view.proto new file mode 100644 index 000000000..11125bc95 --- /dev/null +++ b/google/ads/googleads/v3/resources/search_term_view.proto @@ -0,0 +1,69 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/search_term_targeting_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "SearchTermViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the SearchTermView resource. + +// A search term view with metrics aggregated by search term at the ad group +// level. +message SearchTermView { + option (google.api.resource) = { + type: "googleads.googleapis.com/SearchTermView" + pattern: "customers/{customer}/searchTermViews/{search_term_view}" + }; + + // Output only. The resource name of the search term view. + // Search term view resource names have the form: + // + // `customers/{customer_id}/searchTermViews/{campaign_id}~{ad_group_id}~{URL-base64_search_term}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SearchTermView" + } + ]; + + // Output only. The search term. + google.protobuf.StringValue search_term = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ad group the search term served in. + google.protobuf.StringValue ad_group = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; + + // Output only. Indicates whether the search term is currently one of your + // targeted or excluded keywords. + google.ads.googleads.v3.enums.SearchTermTargetingStatusEnum.SearchTermTargetingStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/shared_criterion.proto b/google/ads/googleads/v3/resources/shared_criterion.proto new file mode 100644 index 000000000..25baf4a43 --- /dev/null +++ b/google/ads/googleads/v3/resources/shared_criterion.proto @@ -0,0 +1,93 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/criteria.proto"; +import "google/ads/googleads/v3/enums/criterion_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "SharedCriterionProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the SharedCriterion resource. + +// A criterion belonging to a shared set. +message SharedCriterion { + option (google.api.resource) = { + type: "googleads.googleapis.com/SharedCriterion" + pattern: "customers/{customer}/sharedCriteria/{shared_criterion}" + }; + + // Immutable. The resource name of the shared criterion. + // Shared set resource names have the form: + // + // `customers/{customer_id}/sharedCriteria/{shared_set_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedCriterion" + } + ]; + + // Immutable. The shared set to which the shared criterion belongs. + google.protobuf.StringValue shared_set = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedSet" + } + ]; + + // Output only. The ID of the criterion. + // + // This field is ignored for mutates. + google.protobuf.Int64Value criterion_id = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the criterion. + google.ads.googleads.v3.enums.CriterionTypeEnum.CriterionType type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The criterion. + // + // Exactly one must be set. + oneof criterion { + // Immutable. Keyword. + google.ads.googleads.v3.common.KeywordInfo keyword = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. YouTube Video. + google.ads.googleads.v3.common.YouTubeVideoInfo youtube_video = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. YouTube Channel. + google.ads.googleads.v3.common.YouTubeChannelInfo youtube_channel = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Placement. + google.ads.googleads.v3.common.PlacementInfo placement = 7 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Mobile App Category. + google.ads.googleads.v3.common.MobileAppCategoryInfo mobile_app_category = 8 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Mobile application. + google.ads.googleads.v3.common.MobileApplicationInfo mobile_application = 9 [(google.api.field_behavior) = IMMUTABLE]; + } +} diff --git a/google/ads/googleads/v3/resources/shared_set.proto b/google/ads/googleads/v3/resources/shared_set.proto new file mode 100644 index 000000000..0ec8bc632 --- /dev/null +++ b/google/ads/googleads/v3/resources/shared_set.proto @@ -0,0 +1,78 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/enums/shared_set_status.proto"; +import "google/ads/googleads/v3/enums/shared_set_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "SharedSetProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the SharedSet resource. + +// SharedSets are used for sharing criterion exclusions across multiple +// campaigns. +message SharedSet { + option (google.api.resource) = { + type: "googleads.googleapis.com/SharedSet" + pattern: "customers/{customer}/sharedSets/{shared_set}" + }; + + // Immutable. The resource name of the shared set. + // Shared set resource names have the form: + // + // `customers/{customer_id}/sharedSets/{shared_set_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedSet" + } + ]; + + // Output only. The ID of this shared set. Read only. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The type of this shared set: each shared set holds only a single kind + // of resource. Required. Immutable. + google.ads.googleads.v3.enums.SharedSetTypeEnum.SharedSetType type = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // The name of this shared set. Required. + // Shared Sets must have names that are unique among active shared sets of + // the same type. + // The length of this string should be between 1 and 255 UTF-8 bytes, + // inclusive. + google.protobuf.StringValue name = 4; + + // Output only. The status of this shared set. Read only. + google.ads.googleads.v3.enums.SharedSetStatusEnum.SharedSetStatus status = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of shared criteria within this shared set. Read only. + google.protobuf.Int64Value member_count = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of campaigns associated with this shared set. Read only. + google.protobuf.Int64Value reference_count = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/shopping_performance_view.proto b/google/ads/googleads/v3/resources/shopping_performance_view.proto new file mode 100644 index 000000000..e794512d9 --- /dev/null +++ b/google/ads/googleads/v3/resources/shopping_performance_view.proto @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ShoppingPerformanceViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the ShoppingPerformanceView resource. + +// Shopping performance view. +// Provides Shopping campaign statistics aggregated at several product dimension +// levels. Product dimension values from Merchant Center such as brand, +// category, custom attributes, product condition and product type will reflect +// the state of each dimension as of the date and time when the corresponding +// event was recorded. +message ShoppingPerformanceView { + option (google.api.resource) = { + type: "googleads.googleapis.com/ShoppingPerformanceView" + pattern: "customers/{customer}/shoppingPerformanceView" + }; + + // Output only. The resource name of the Shopping performance view. + // Shopping performance view resource names have the form: + // `customers/{customer_id}/shoppingPerformanceView` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ShoppingPerformanceView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/topic_constant.proto b/google/ads/googleads/v3/resources/topic_constant.proto new file mode 100644 index 000000000..a20f7706c --- /dev/null +++ b/google/ads/googleads/v3/resources/topic_constant.proto @@ -0,0 +1,72 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "TopicConstantProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the Topic Constant resource. + +// Use topics to target or exclude placements in the Google Display Network +// based on the category into which the placement falls (for example, +// "Pets & Animals/Pets/Dogs"). +message TopicConstant { + option (google.api.resource) = { + type: "googleads.googleapis.com/TopicConstant" + pattern: "topicConstants/{topic_constant}" + }; + + // Output only. The resource name of the topic constant. + // topic constant resource names have the form: + // + // `topicConstants/{topic_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/TopicConstant" + } + ]; + + // Output only. The ID of the topic. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Resource name of parent of the topic constant. + google.protobuf.StringValue topic_constant_parent = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/TopicConstant" + } + ]; + + // Output only. The category to target or exclude. Each subsequent element in the array + // describes a more specific sub-category. For example, + // {"Pets & Animals", "Pets", "Dogs"} represents the + // "Pets & Animals/Pets/Dogs" category. List of available topic categories at + // https://developers.google.com/adwords/api/docs/appendix/verticals + repeated google.protobuf.StringValue path = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/topic_view.proto b/google/ads/googleads/v3/resources/topic_view.proto new file mode 100644 index 000000000..8f5731196 --- /dev/null +++ b/google/ads/googleads/v3/resources/topic_view.proto @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "TopicViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the topic view resource. + +// A topic view. +message TopicView { + option (google.api.resource) = { + type: "googleads.googleapis.com/TopicView" + pattern: "customers/{customer}/topicViews/{topic_view}" + }; + + // Output only. The resource name of the topic view. + // Topic view resource names have the form: + // + // `customers/{customer_id}/topicViews/{ad_group_id}~{criterion_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/TopicView" + } + ]; +} diff --git a/google/ads/googleads/v3/resources/user_interest.proto b/google/ads/googleads/v3/resources/user_interest.proto new file mode 100644 index 000000000..8ab8e5e57 --- /dev/null +++ b/google/ads/googleads/v3/resources/user_interest.proto @@ -0,0 +1,77 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/criterion_category_availability.proto"; +import "google/ads/googleads/v3/enums/user_interest_taxonomy_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "UserInterestProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the User Interest resource. + +// A user interest: a particular interest-based vertical to be targeted. +message UserInterest { + option (google.api.resource) = { + type: "googleads.googleapis.com/UserInterest" + pattern: "customers/{customer}/userInterests/{user_interest}" + }; + + // Output only. The resource name of the user interest. + // User interest resource names have the form: + // + // `customers/{customer_id}/userInterests/{user_interest_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserInterest" + } + ]; + + // Output only. Taxonomy type of the user interest. + google.ads.googleads.v3.enums.UserInterestTaxonomyTypeEnum.UserInterestTaxonomyType taxonomy_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the user interest. + google.protobuf.Int64Value user_interest_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the user interest. + google.protobuf.StringValue name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The parent of the user interest. + google.protobuf.StringValue user_interest_parent = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserInterest" + } + ]; + + // Output only. True if the user interest is launched to all channels and locales. + google.protobuf.BoolValue launched_to_all = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Availability information of the user interest. + repeated google.ads.googleads.v3.common.CriterionCategoryAvailability availabilities = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/user_list.proto b/google/ads/googleads/v3/resources/user_list.proto new file mode 100644 index 000000000..c62da5dc7 --- /dev/null +++ b/google/ads/googleads/v3/resources/user_list.proto @@ -0,0 +1,168 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/ads/googleads/v3/common/user_lists.proto"; +import "google/ads/googleads/v3/enums/access_reason.proto"; +import "google/ads/googleads/v3/enums/user_list_access_status.proto"; +import "google/ads/googleads/v3/enums/user_list_closing_reason.proto"; +import "google/ads/googleads/v3/enums/user_list_membership_status.proto"; +import "google/ads/googleads/v3/enums/user_list_size_range.proto"; +import "google/ads/googleads/v3/enums/user_list_type.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "UserListProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the User List resource. + +// A user list. This is a list of users a customer may target. +message UserList { + option (google.api.resource) = { + type: "googleads.googleapis.com/UserList" + pattern: "customers/{customer}/userLists/{user_list}" + }; + + // Immutable. The resource name of the user list. + // User list resource names have the form: + // + // `customers/{customer_id}/userLists/{user_list_id}` + string resource_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserList" + } + ]; + + // Output only. Id of the user list. + google.protobuf.Int64Value id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A flag that indicates if a user may edit a list. Depends on the list + // ownership and list type. For example, external remarketing user lists are + // not editable. + // + // This field is read-only. + google.protobuf.BoolValue read_only = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Name of this user list. Depending on its access_reason, the user list name + // may not be unique (e.g. if access_reason=SHARED) + google.protobuf.StringValue name = 4; + + // Description of this user list. + google.protobuf.StringValue description = 5; + + // Membership status of this user list. Indicates whether a user list is open + // or active. Only open user lists can accumulate more users and can be + // targeted to. + google.ads.googleads.v3.enums.UserListMembershipStatusEnum.UserListMembershipStatus membership_status = 6; + + // An ID from external system. It is used by user list sellers to correlate + // IDs on their systems. + google.protobuf.StringValue integration_code = 7; + + // Number of days a user's cookie stays on your list since its most recent + // addition to the list. This field must be between 0 and 540 inclusive. + // However, for CRM based userlists, this field can be set to 10000 which + // means no expiration. + // + // It'll be ignored for logical_user_list. + google.protobuf.Int64Value membership_life_span = 8; + + // Output only. Estimated number of users in this user list, on the Google Display Network. + // This value is null if the number of users has not yet been determined. + // + // This field is read-only. + google.protobuf.Int64Value size_for_display = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Size range in terms of number of users of the UserList, on the Google + // Display Network. + // + // This field is read-only. + google.ads.googleads.v3.enums.UserListSizeRangeEnum.UserListSizeRange size_range_for_display = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Estimated number of users in this user list in the google.com domain. + // These are the users available for targeting in Search campaigns. + // This value is null if the number of users has not yet been determined. + // + // This field is read-only. + google.protobuf.Int64Value size_for_search = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Size range in terms of number of users of the UserList, for Search ads. + // + // This field is read-only. + google.ads.googleads.v3.enums.UserListSizeRangeEnum.UserListSizeRange size_range_for_search = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of this list. + // + // This field is read-only. + google.ads.googleads.v3.enums.UserListTypeEnum.UserListType type = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Indicating the reason why this user list membership status is closed. It is + // only populated on lists that were automatically closed due to inactivity, + // and will be cleared once the list membership status becomes open. + google.ads.googleads.v3.enums.UserListClosingReasonEnum.UserListClosingReason closing_reason = 14; + + // Output only. Indicates the reason this account has been granted access to the list. + // The reason can be SHARED, OWNED, LICENSED or SUBSCRIBED. + // + // This field is read-only. + google.ads.googleads.v3.enums.AccessReasonEnum.AccessReason access_reason = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Indicates if this share is still enabled. When a UserList is shared with + // the user this field is set to ENABLED. Later the userList owner can decide + // to revoke the share and make it DISABLED. + // The default value of this field is set to ENABLED. + google.ads.googleads.v3.enums.UserListAccessStatusEnum.UserListAccessStatus account_user_list_status = 16; + + // Indicates if this user list is eligible for Google Search Network. + google.protobuf.BoolValue eligible_for_search = 17; + + // Output only. Indicates this user list is eligible for Google Display Network. + // + // This field is read-only. + google.protobuf.BoolValue eligible_for_display = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The user list. + // + // Exactly one must be set. + oneof user_list { + // User list of CRM users provided by the advertiser. + google.ads.googleads.v3.common.CrmBasedUserListInfo crm_based_user_list = 19; + + // Output only. User list which are similar to users from another UserList. + // These lists are readonly and automatically created by google. + google.ads.googleads.v3.common.SimilarUserListInfo similar_user_list = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User list generated by a rule. + google.ads.googleads.v3.common.RuleBasedUserListInfo rule_based_user_list = 21; + + // User list that is a custom combination of user lists and user interests. + google.ads.googleads.v3.common.LogicalUserListInfo logical_user_list = 22; + + // User list targeting as a collection of conversion or remarketing actions. + google.ads.googleads.v3.common.BasicUserListInfo basic_user_list = 23; + } +} diff --git a/google/ads/googleads/v3/resources/user_location_view.proto b/google/ads/googleads/v3/resources/user_location_view.proto new file mode 100644 index 000000000..115196711 --- /dev/null +++ b/google/ads/googleads/v3/resources/user_location_view.proto @@ -0,0 +1,63 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "UserLocationViewProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the user location view resource. + +// A user location view. +// +// User Location View includes all metrics aggregated at the country level, +// one row per country. It reports metrics at the actual physical location of +// the user by targeted or not targeted location. If other segment fields are +// used, you may get more than one row per country. +message UserLocationView { + option (google.api.resource) = { + type: "googleads.googleapis.com/UserLocationView" + pattern: "customers/{customer}/userLocationViews/{user_location_view}" + }; + + // Output only. The resource name of the user location view. + // UserLocation view resource names have the form: + // + // `customers/{customer_id}/userLocationViews/{country_criterion_id}~{targeting_location}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserLocationView" + } + ]; + + // Output only. Criterion Id for the country. + google.protobuf.Int64Value country_criterion_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether location was targeted or not. + google.protobuf.BoolValue targeting_location = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/resources/video.proto b/google/ads/googleads/v3/resources/video.proto new file mode 100644 index 000000000..5b984c85c --- /dev/null +++ b/google/ads/googleads/v3/resources/video.proto @@ -0,0 +1,64 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.resources; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "VideoProto"; +option java_package = "com.google.ads.googleads.v3.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V3::Resources"; + +// Proto file describing the video resource. + +// A video. +message Video { + option (google.api.resource) = { + type: "googleads.googleapis.com/Video" + pattern: "customers/{customer}/videos/{video}" + }; + + // Output only. The resource name of the video. + // Video resource names have the form: + // + // `customers/{customer_id}/videos/{video_id}` + string resource_name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Video" + } + ]; + + // Output only. The ID of the video. + google.protobuf.StringValue id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The owner channel id of the video. + google.protobuf.StringValue channel_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The duration of the video in milliseconds. + google.protobuf.Int64Value duration_millis = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The title of the video. + google.protobuf.StringValue title = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/ads/googleads/v3/services/account_budget_proposal_service.proto b/google/ads/googleads/v3/services/account_budget_proposal_service.proto new file mode 100644 index 000000000..ddba31b0e --- /dev/null +++ b/google/ads/googleads/v3/services/account_budget_proposal_service.proto @@ -0,0 +1,137 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/account_budget_proposal.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetProposalServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the AccountBudgetProposal service. + +// A service for managing account-level budgets via proposals. +// +// A proposal is a request to create a new budget or make changes to an +// existing one. +// +// Reads for account-level budgets managed by these proposals will be +// supported in a future version. Until then, please use the +// BudgetOrderService from the AdWords API. Learn more at +// https://developers.google.com/adwords/api/docs/guides/budget-order +// +// Mutates: +// The CREATE operation creates a new proposal. +// UPDATE operations aren't supported. +// The REMOVE operation cancels a pending proposal. +service AccountBudgetProposalService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns an account-level budget proposal in full detail. + rpc GetAccountBudgetProposal(GetAccountBudgetProposalRequest) returns (google.ads.googleads.v3.resources.AccountBudgetProposal) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/accountBudgetProposals/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes account budget proposals. Operation statuses + // are returned. + rpc MutateAccountBudgetProposal(MutateAccountBudgetProposalRequest) returns (MutateAccountBudgetProposalResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/accountBudgetProposals:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operation"; + } +} + +// Request message for +// [AccountBudgetProposalService.GetAccountBudgetProposal][google.ads.googleads.v3.services.AccountBudgetProposalService.GetAccountBudgetProposal]. +message GetAccountBudgetProposalRequest { + // Required. The resource name of the account-level budget proposal to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudgetProposal" + } + ]; +} + +// Request message for +// [AccountBudgetProposalService.MutateAccountBudgetProposal][google.ads.googleads.v3.services.AccountBudgetProposalService.MutateAccountBudgetProposal]. +message MutateAccountBudgetProposalRequest { + // Required. The ID of the customer. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The operation to perform on an individual account-level budget proposal. + AccountBudgetProposalOperation operation = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 3; +} + +// A single operation to propose the creation of a new account-level budget or +// edit/end/remove an existing one. +message AccountBudgetProposalOperation { + // FieldMask that determines which budget fields are modified. While budgets + // may be modified, proposals that propose such modifications are final. + // Therefore, update operations are not supported for proposals. + // + // Proposals that modify budgets have the 'update' proposal type. Specifying + // a mask for any other proposal type is considered an error. + google.protobuf.FieldMask update_mask = 3; + + // The mutate operation. + oneof operation { + // Create operation: A new proposal to create a new budget, edit an + // existing budget, end an actively running budget, or remove an approved + // budget scheduled to start in the future. + // No resource name is expected for the new proposal. + google.ads.googleads.v3.resources.AccountBudgetProposal create = 2; + + // Remove operation: A resource name for the removed proposal is expected, + // in this format: + // + // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}` + // A request may be cancelled iff it is pending. + string remove = 1; + } +} + +// Response message for account-level budget mutate operations. +message MutateAccountBudgetProposalResponse { + // The result of the mutate. + MutateAccountBudgetProposalResult result = 2; +} + +// The result for the account budget proposal mutate. +message MutateAccountBudgetProposalResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/account_budget_service.proto b/google/ads/googleads/v3/services/account_budget_service.proto new file mode 100644 index 000000000..44ebb9d60 --- /dev/null +++ b/google/ads/googleads/v3/services/account_budget_service.proto @@ -0,0 +1,61 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/account_budget.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the AccountBudget service. + +// A service for fetching an account-level budget. +// +// Account-level budgets are mutated by creating proposal resources. +service AccountBudgetService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns an account-level budget in full detail. + rpc GetAccountBudget(GetAccountBudgetRequest) returns (google.ads.googleads.v3.resources.AccountBudget) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/accountBudgets/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for +// [AccountBudgetService.GetAccountBudget][google.ads.googleads.v3.services.AccountBudgetService.GetAccountBudget]. +message GetAccountBudgetRequest { + // Required. The resource name of the account-level budget to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AccountBudget" + } + ]; +} diff --git a/google/ads/googleads/v3/services/ad_group_ad_asset_view_service.proto b/google/ads/googleads/v3/services/ad_group_ad_asset_view_service.proto new file mode 100644 index 000000000..72248d021 --- /dev/null +++ b/google/ads/googleads/v3/services/ad_group_ad_asset_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/ad_group_ad_asset_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdAssetViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the ad group ad asset view service. + +// Service to fetch ad group ad asset views. +service AdGroupAdAssetViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad group ad asset view in full detail. + rpc GetAdGroupAdAssetView(GetAdGroupAdAssetViewRequest) returns (google.ads.googleads.v3.resources.AdGroupAdAssetView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adGroupAdAssetViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [AdGroupAdAssetViewService.GetAdGroupAdAssetView][google.ads.googleads.v3.services.AdGroupAdAssetViewService.GetAdGroupAdAssetView]. +message GetAdGroupAdAssetViewRequest { + // Required. The resource name of the ad group ad asset view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAdAssetView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/ad_group_ad_label_service.proto b/google/ads/googleads/v3/services/ad_group_ad_label_service.proto new file mode 100644 index 000000000..4f1271dc3 --- /dev/null +++ b/google/ads/googleads/v3/services/ad_group_ad_label_service.proto @@ -0,0 +1,123 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/ad_group_ad_label.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdLabelServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Ad Group Ad Label service. + +// Service to manage labels on ad group ads. +service AdGroupAdLabelService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad group ad label in full detail. + rpc GetAdGroupAdLabel(GetAdGroupAdLabelRequest) returns (google.ads.googleads.v3.resources.AdGroupAdLabel) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adGroupAdLabels/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates and removes ad group ad labels. + // Operation statuses are returned. + rpc MutateAdGroupAdLabels(MutateAdGroupAdLabelsRequest) returns (MutateAdGroupAdLabelsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/adGroupAdLabels:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [AdGroupAdLabelService.GetAdGroupAdLabel][google.ads.googleads.v3.services.AdGroupAdLabelService.GetAdGroupAdLabel]. +message GetAdGroupAdLabelRequest { + // Required. The resource name of the ad group ad label to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAdLabel" + } + ]; +} + +// Request message for [AdGroupAdLabelService.MutateAdGroupAdLabels][google.ads.googleads.v3.services.AdGroupAdLabelService.MutateAdGroupAdLabels]. +message MutateAdGroupAdLabelsRequest { + // Required. ID of the customer whose ad group ad labels are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on ad group ad labels. + repeated AdGroupAdLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, remove) on an ad group ad label. +message AdGroupAdLabelOperation { + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new ad group ad + // label. + google.ads.googleads.v3.resources.AdGroupAdLabel create = 1; + + // Remove operation: A resource name for the ad group ad label + // being removed, in this format: + // + // `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id} + // _{label_id}` + string remove = 2; + } +} + +// Response message for an ad group ad labels mutate. +message MutateAdGroupAdLabelsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateAdGroupAdLabelResult results = 2; +} + +// The result for an ad group ad label mutate. +message MutateAdGroupAdLabelResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/ad_group_ad_service.proto b/google/ads/googleads/v3/services/ad_group_ad_service.proto new file mode 100644 index 000000000..f6d10b732 --- /dev/null +++ b/google/ads/googleads/v3/services/ad_group_ad_service.proto @@ -0,0 +1,131 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/common/policy.proto"; +import "google/ads/googleads/v3/resources/ad_group_ad.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Ad Group Ad service. + +// Service to manage ads in an ad group. +service AdGroupAdService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad in full detail. + rpc GetAdGroupAd(GetAdGroupAdRequest) returns (google.ads.googleads.v3.resources.AdGroupAd) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adGroupAds/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes ads. Operation statuses are returned. + rpc MutateAdGroupAds(MutateAdGroupAdsRequest) returns (MutateAdGroupAdsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/adGroupAds:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [AdGroupAdService.GetAdGroupAd][google.ads.googleads.v3.services.AdGroupAdService.GetAdGroupAd]. +message GetAdGroupAdRequest { + // Required. The resource name of the ad to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAd" + } + ]; +} + +// Request message for [AdGroupAdService.MutateAdGroupAds][google.ads.googleads.v3.services.AdGroupAdService.MutateAdGroupAds]. +message MutateAdGroupAdsRequest { + // Required. The ID of the customer whose ads are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual ads. + repeated AdGroupAdOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on an ad group ad. +message AdGroupAdOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // Configuration for how policies are validated. + google.ads.googleads.v3.common.PolicyValidationParameter policy_validation_parameter = 5; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new ad. + google.ads.googleads.v3.resources.AdGroupAd create = 1; + + // Update operation: The ad is expected to have a valid resource name. + google.ads.googleads.v3.resources.AdGroupAd update = 2; + + // Remove operation: A resource name for the removed ad is expected, + // in this format: + // + // `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}` + string remove = 3; + } +} + +// Response message for an ad group ad mutate. +message MutateAdGroupAdsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateAdGroupAdResult results = 2; +} + +// The result for the ad mutate. +message MutateAdGroupAdResult { + // The resource name returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/ad_group_audience_view_service.proto b/google/ads/googleads/v3/services/ad_group_audience_view_service.proto new file mode 100644 index 000000000..9b4f6f26a --- /dev/null +++ b/google/ads/googleads/v3/services/ad_group_audience_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/ad_group_audience_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAudienceViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the AdGroup Audience View service. + +// Service to manage ad group audience views. +service AdGroupAudienceViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad group audience view in full detail. + rpc GetAdGroupAudienceView(GetAdGroupAudienceViewRequest) returns (google.ads.googleads.v3.resources.AdGroupAudienceView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adGroupAudienceViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [AdGroupAudienceViewService.GetAdGoupAudienceView][]. +message GetAdGroupAudienceViewRequest { + // Required. The resource name of the ad group audience view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupAudienceView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/ad_group_bid_modifier_service.proto b/google/ads/googleads/v3/services/ad_group_bid_modifier_service.proto new file mode 100644 index 000000000..1c44496ec --- /dev/null +++ b/google/ads/googleads/v3/services/ad_group_bid_modifier_service.proto @@ -0,0 +1,130 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/ad_group_bid_modifier.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupBidModifierServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Ad Group Bid Modifier service. + +// Service to manage ad group bid modifiers. +service AdGroupBidModifierService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad group bid modifier in full detail. + rpc GetAdGroupBidModifier(GetAdGroupBidModifierRequest) returns (google.ads.googleads.v3.resources.AdGroupBidModifier) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adGroupBidModifiers/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes ad group bid modifiers. + // Operation statuses are returned. + rpc MutateAdGroupBidModifiers(MutateAdGroupBidModifiersRequest) returns (MutateAdGroupBidModifiersResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/adGroupBidModifiers:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [AdGroupBidModifierService.GetAdGroupBidModifier][google.ads.googleads.v3.services.AdGroupBidModifierService.GetAdGroupBidModifier]. +message GetAdGroupBidModifierRequest { + // Required. The resource name of the ad group bid modifier to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupBidModifier" + } + ]; +} + +// Request message for [AdGroupBidModifierService.MutateAdGroupBidModifiers][google.ads.googleads.v3.services.AdGroupBidModifierService.MutateAdGroupBidModifiers]. +message MutateAdGroupBidModifiersRequest { + // Required. ID of the customer whose ad group bid modifiers are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual ad group bid modifiers. + repeated AdGroupBidModifierOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, remove, update) on an ad group bid modifier. +message AdGroupBidModifierOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new ad group bid + // modifier. + google.ads.googleads.v3.resources.AdGroupBidModifier create = 1; + + // Update operation: The ad group bid modifier is expected to have a valid + // resource name. + google.ads.googleads.v3.resources.AdGroupBidModifier update = 2; + + // Remove operation: A resource name for the removed ad group bid modifier + // is expected, in this format: + // + // `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}~{criterion_id}` + string remove = 3; + } +} + +// Response message for ad group bid modifiers mutate. +message MutateAdGroupBidModifiersResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateAdGroupBidModifierResult results = 2; +} + +// The result for the criterion mutate. +message MutateAdGroupBidModifierResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/ad_group_criterion_label_service.proto b/google/ads/googleads/v3/services/ad_group_criterion_label_service.proto new file mode 100644 index 000000000..b30e72072 --- /dev/null +++ b/google/ads/googleads/v3/services/ad_group_criterion_label_service.proto @@ -0,0 +1,124 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/ad_group_criterion_label.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionLabelServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Ad Group Criterion Label service. + +// Service to manage labels on ad group criteria. +service AdGroupCriterionLabelService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad group criterion label in full detail. + rpc GetAdGroupCriterionLabel(GetAdGroupCriterionLabelRequest) returns (google.ads.googleads.v3.resources.AdGroupCriterionLabel) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adGroupCriterionLabels/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates and removes ad group criterion labels. + // Operation statuses are returned. + rpc MutateAdGroupCriterionLabels(MutateAdGroupCriterionLabelsRequest) returns (MutateAdGroupCriterionLabelsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/adGroupCriterionLabels:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for +// [AdGroupCriterionLabelService.GetAdGroupCriterionLabel][google.ads.googleads.v3.services.AdGroupCriterionLabelService.GetAdGroupCriterionLabel]. +message GetAdGroupCriterionLabelRequest { + // Required. The resource name of the ad group criterion label to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterionLabel" + } + ]; +} + +// Request message for +// [AdGroupCriterionLabelService.MutateAdGroupCriterionLabels][google.ads.googleads.v3.services.AdGroupCriterionLabelService.MutateAdGroupCriterionLabels]. +message MutateAdGroupCriterionLabelsRequest { + // Required. ID of the customer whose ad group criterion labels are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on ad group criterion labels. + repeated AdGroupCriterionLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, remove) on an ad group criterion label. +message AdGroupCriterionLabelOperation { + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new ad group + // label. + google.ads.googleads.v3.resources.AdGroupCriterionLabel create = 1; + + // Remove operation: A resource name for the ad group criterion label + // being removed, in this format: + // + // `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}` + string remove = 2; + } +} + +// Response message for an ad group criterion labels mutate. +message MutateAdGroupCriterionLabelsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateAdGroupCriterionLabelResult results = 2; +} + +// The result for an ad group criterion label mutate. +message MutateAdGroupCriterionLabelResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/ad_group_criterion_service.proto b/google/ads/googleads/v3/services/ad_group_criterion_service.proto new file mode 100644 index 000000000..b34ece539 --- /dev/null +++ b/google/ads/googleads/v3/services/ad_group_criterion_service.proto @@ -0,0 +1,140 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/common/policy.proto"; +import "google/ads/googleads/v3/resources/ad_group_criterion.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Ad Group Criterion service. + +// Service to manage ad group criteria. +service AdGroupCriterionService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested criterion in full detail. + rpc GetAdGroupCriterion(GetAdGroupCriterionRequest) returns (google.ads.googleads.v3.resources.AdGroupCriterion) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adGroupCriteria/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes criteria. Operation statuses are returned. + rpc MutateAdGroupCriteria(MutateAdGroupCriteriaRequest) returns (MutateAdGroupCriteriaResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/adGroupCriteria:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [AdGroupCriterionService.GetAdGroupCriterion][google.ads.googleads.v3.services.AdGroupCriterionService.GetAdGroupCriterion]. +message GetAdGroupCriterionRequest { + // Required. The resource name of the criterion to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterion" + } + ]; +} + +// Request message for [AdGroupCriterionService.MutateAdGroupCriteria][google.ads.googleads.v3.services.AdGroupCriterionService.MutateAdGroupCriteria]. +message MutateAdGroupCriteriaRequest { + // Required. ID of the customer whose criteria are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual criteria. + repeated AdGroupCriterionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, remove, update) on an ad group criterion. +message AdGroupCriterionOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The list of policy violation keys that should not cause a + // PolicyViolationError to be reported. Not all policy violations are + // exemptable, please refer to the is_exemptible field in the returned + // PolicyViolationError. + // + // Resources violating these polices will be saved, but will not be eligible + // to serve. They may begin serving at a later time due to a change in + // policies, re-review of the resource, or a change in advertiser + // certificates. + repeated google.ads.googleads.v3.common.PolicyViolationKey exempt_policy_violation_keys = 5; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new criterion. + google.ads.googleads.v3.resources.AdGroupCriterion create = 1; + + // Update operation: The criterion is expected to have a valid resource + // name. + google.ads.googleads.v3.resources.AdGroupCriterion update = 2; + + // Remove operation: A resource name for the removed criterion is expected, + // in this format: + // + // `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}` + string remove = 3; + } +} + +// Response message for an ad group criterion mutate. +message MutateAdGroupCriteriaResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateAdGroupCriterionResult results = 2; +} + +// The result for the criterion mutate. +message MutateAdGroupCriterionResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/ad_group_criterion_simulation_service.proto b/google/ads/googleads/v3/services/ad_group_criterion_simulation_service.proto new file mode 100644 index 000000000..c56a9b028 --- /dev/null +++ b/google/ads/googleads/v3/services/ad_group_criterion_simulation_service.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/ad_group_criterion_simulation.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionSimulationServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the AdGroupCriterionSimulation service. + +// Service to fetch ad group criterion simulations. +service AdGroupCriterionSimulationService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad group criterion simulation in full detail. + rpc GetAdGroupCriterionSimulation(GetAdGroupCriterionSimulationRequest) returns (google.ads.googleads.v3.resources.AdGroupCriterionSimulation) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adGroupCriterionSimulations/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for +// [AdGroupCriterionSimulationService.GetAdGroupCriterionSimulation][google.ads.googleads.v3.services.AdGroupCriterionSimulationService.GetAdGroupCriterionSimulation]. +message GetAdGroupCriterionSimulationRequest { + // Required. The resource name of the ad group criterion simulation to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupCriterionSimulation" + } + ]; +} diff --git a/google/ads/googleads/v3/services/ad_group_extension_setting_service.proto b/google/ads/googleads/v3/services/ad_group_extension_setting_service.proto new file mode 100644 index 000000000..7047e706a --- /dev/null +++ b/google/ads/googleads/v3/services/ad_group_extension_setting_service.proto @@ -0,0 +1,134 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/ad_group_extension_setting.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupExtensionSettingServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the AdGroupExtensionSetting service. + +// Service to manage ad group extension settings. +service AdGroupExtensionSettingService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad group extension setting in full detail. + rpc GetAdGroupExtensionSetting(GetAdGroupExtensionSettingRequest) returns (google.ads.googleads.v3.resources.AdGroupExtensionSetting) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adGroupExtensionSettings/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes ad group extension settings. Operation + // statuses are returned. + rpc MutateAdGroupExtensionSettings(MutateAdGroupExtensionSettingsRequest) returns (MutateAdGroupExtensionSettingsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/adGroupExtensionSettings:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for +// [AdGroupExtensionSettingService.GetAdGroupExtensionSetting][google.ads.googleads.v3.services.AdGroupExtensionSettingService.GetAdGroupExtensionSetting]. +message GetAdGroupExtensionSettingRequest { + // Required. The resource name of the ad group extension setting to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupExtensionSetting" + } + ]; +} + +// Request message for +// [AdGroupExtensionSettingService.MutateAdGroupExtensionSettings][google.ads.googleads.v3.services.AdGroupExtensionSettingService.MutateAdGroupExtensionSettings]. +message MutateAdGroupExtensionSettingsRequest { + // Required. The ID of the customer whose ad group extension settings are being + // modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual ad group extension + // settings. + repeated AdGroupExtensionSettingOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on an ad group extension setting. +message AdGroupExtensionSettingOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new ad group + // extension setting. + google.ads.googleads.v3.resources.AdGroupExtensionSetting create = 1; + + // Update operation: The ad group extension setting is expected to have a + // valid resource name. + google.ads.googleads.v3.resources.AdGroupExtensionSetting update = 2; + + // Remove operation: A resource name for the removed ad group extension + // setting is expected, in this format: + // + // `customers/{customer_id}/adGroupExtensionSettings/{ad_group_id}~{extension_type}` + string remove = 3; + } +} + +// Response message for an ad group extension setting mutate. +message MutateAdGroupExtensionSettingsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateAdGroupExtensionSettingResult results = 2; +} + +// The result for the ad group extension setting mutate. +message MutateAdGroupExtensionSettingResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/ad_group_feed_service.proto b/google/ads/googleads/v3/services/ad_group_feed_service.proto new file mode 100644 index 000000000..103f59c44 --- /dev/null +++ b/google/ads/googleads/v3/services/ad_group_feed_service.proto @@ -0,0 +1,129 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/ad_group_feed.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupFeedServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the AdGroupFeed service. + +// Service to manage ad group feeds. +service AdGroupFeedService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad group feed in full detail. + rpc GetAdGroupFeed(GetAdGroupFeedRequest) returns (google.ads.googleads.v3.resources.AdGroupFeed) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adGroupFeeds/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes ad group feeds. Operation statuses are + // returned. + rpc MutateAdGroupFeeds(MutateAdGroupFeedsRequest) returns (MutateAdGroupFeedsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/adGroupFeeds:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [AdGroupFeedService.GetAdGroupFeed][google.ads.googleads.v3.services.AdGroupFeedService.GetAdGroupFeed]. +message GetAdGroupFeedRequest { + // Required. The resource name of the ad group feed to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupFeed" + } + ]; +} + +// Request message for [AdGroupFeedService.MutateAdGroupFeeds][google.ads.googleads.v3.services.AdGroupFeedService.MutateAdGroupFeeds]. +message MutateAdGroupFeedsRequest { + // Required. The ID of the customer whose ad group feeds are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual ad group feeds. + repeated AdGroupFeedOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on an ad group feed. +message AdGroupFeedOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new ad group feed. + google.ads.googleads.v3.resources.AdGroupFeed create = 1; + + // Update operation: The ad group feed is expected to have a valid resource + // name. + google.ads.googleads.v3.resources.AdGroupFeed update = 2; + + // Remove operation: A resource name for the removed ad group feed is + // expected, in this format: + // + // `customers/{customer_id}/adGroupFeeds/{ad_group_id}~{feed_id}` + string remove = 3; + } +} + +// Response message for an ad group feed mutate. +message MutateAdGroupFeedsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateAdGroupFeedResult results = 2; +} + +// The result for the ad group feed mutate. +message MutateAdGroupFeedResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/ad_group_label_service.proto b/google/ads/googleads/v3/services/ad_group_label_service.proto new file mode 100644 index 000000000..e903a8fb7 --- /dev/null +++ b/google/ads/googleads/v3/services/ad_group_label_service.proto @@ -0,0 +1,122 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/ad_group_label.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupLabelServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Ad Group Label service. + +// Service to manage labels on ad groups. +service AdGroupLabelService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad group label in full detail. + rpc GetAdGroupLabel(GetAdGroupLabelRequest) returns (google.ads.googleads.v3.resources.AdGroupLabel) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adGroupLabels/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates and removes ad group labels. + // Operation statuses are returned. + rpc MutateAdGroupLabels(MutateAdGroupLabelsRequest) returns (MutateAdGroupLabelsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/adGroupLabels:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [AdGroupLabelService.GetAdGroupLabel][google.ads.googleads.v3.services.AdGroupLabelService.GetAdGroupLabel]. +message GetAdGroupLabelRequest { + // Required. The resource name of the ad group label to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupLabel" + } + ]; +} + +// Request message for [AdGroupLabelService.MutateAdGroupLabels][google.ads.googleads.v3.services.AdGroupLabelService.MutateAdGroupLabels]. +message MutateAdGroupLabelsRequest { + // Required. ID of the customer whose ad group labels are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on ad group labels. + repeated AdGroupLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, remove) on an ad group label. +message AdGroupLabelOperation { + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new ad group + // label. + google.ads.googleads.v3.resources.AdGroupLabel create = 1; + + // Remove operation: A resource name for the ad group label + // being removed, in this format: + // + // `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}` + string remove = 2; + } +} + +// Response message for an ad group labels mutate. +message MutateAdGroupLabelsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateAdGroupLabelResult results = 2; +} + +// The result for an ad group label mutate. +message MutateAdGroupLabelResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/ad_group_service.proto b/google/ads/googleads/v3/services/ad_group_service.proto new file mode 100644 index 000000000..495449e0a --- /dev/null +++ b/google/ads/googleads/v3/services/ad_group_service.proto @@ -0,0 +1,127 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/ad_group.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Ad Group service. + +// Service to manage ad groups. +service AdGroupService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad group in full detail. + rpc GetAdGroup(GetAdGroupRequest) returns (google.ads.googleads.v3.resources.AdGroup) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adGroups/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes ad groups. Operation statuses are returned. + rpc MutateAdGroups(MutateAdGroupsRequest) returns (MutateAdGroupsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/adGroups:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [AdGroupService.GetAdGroup][google.ads.googleads.v3.services.AdGroupService.GetAdGroup]. +message GetAdGroupRequest { + // Required. The resource name of the ad group to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroup" + } + ]; +} + +// Request message for [AdGroupService.MutateAdGroups][google.ads.googleads.v3.services.AdGroupService.MutateAdGroups]. +message MutateAdGroupsRequest { + // Required. The ID of the customer whose ad groups are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual ad groups. + repeated AdGroupOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on an ad group. +message AdGroupOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new ad group. + google.ads.googleads.v3.resources.AdGroup create = 1; + + // Update operation: The ad group is expected to have a valid resource name. + google.ads.googleads.v3.resources.AdGroup update = 2; + + // Remove operation: A resource name for the removed ad group is expected, + // in this format: + // + // `customers/{customer_id}/adGroups/{ad_group_id}` + string remove = 3; + } +} + +// Response message for an ad group mutate. +message MutateAdGroupsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateAdGroupResult results = 2; +} + +// The result for the ad group mutate. +message MutateAdGroupResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/ad_group_simulation_service.proto b/google/ads/googleads/v3/services/ad_group_simulation_service.proto new file mode 100644 index 000000000..56f00966f --- /dev/null +++ b/google/ads/googleads/v3/services/ad_group_simulation_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/ad_group_simulation.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupSimulationServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the AdGroupSimulation service. + +// Service to fetch ad group simulations. +service AdGroupSimulationService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad group simulation in full detail. + rpc GetAdGroupSimulation(GetAdGroupSimulationRequest) returns (google.ads.googleads.v3.resources.AdGroupSimulation) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adGroupSimulations/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [AdGroupSimulationService.GetAdGroupSimulation][google.ads.googleads.v3.services.AdGroupSimulationService.GetAdGroupSimulation]. +message GetAdGroupSimulationRequest { + // Required. The resource name of the ad group simulation to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdGroupSimulation" + } + ]; +} diff --git a/google/ads/googleads/v3/services/ad_parameter_service.proto b/google/ads/googleads/v3/services/ad_parameter_service.proto new file mode 100644 index 000000000..290a6ee3c --- /dev/null +++ b/google/ads/googleads/v3/services/ad_parameter_service.proto @@ -0,0 +1,129 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/ad_parameter.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdParameterServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Ad Parameter service. + +// Service to manage ad parameters. +service AdParameterService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad parameter in full detail. + rpc GetAdParameter(GetAdParameterRequest) returns (google.ads.googleads.v3.resources.AdParameter) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adParameters/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes ad parameters. Operation statuses are + // returned. + rpc MutateAdParameters(MutateAdParametersRequest) returns (MutateAdParametersResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/adParameters:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [AdParameterService.GetAdParameter][google.ads.googleads.v3.services.AdParameterService.GetAdParameter] +message GetAdParameterRequest { + // Required. The resource name of the ad parameter to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdParameter" + } + ]; +} + +// Request message for [AdParameterService.MutateAdParameters][google.ads.googleads.v3.services.AdParameterService.MutateAdParameters] +message MutateAdParametersRequest { + // Required. The ID of the customer whose ad parameters are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual ad parameters. + repeated AdParameterOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on ad parameter. +message AdParameterOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new ad parameter. + google.ads.googleads.v3.resources.AdParameter create = 1; + + // Update operation: The ad parameter is expected to have a valid resource + // name. + google.ads.googleads.v3.resources.AdParameter update = 2; + + // Remove operation: A resource name for the ad parameter to remove is + // expected in this format: + // + // `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}` + string remove = 3; + } +} + +// Response message for an ad parameter mutate. +message MutateAdParametersResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateAdParameterResult results = 2; +} + +// The result for the ad parameter mutate. +message MutateAdParameterResult { + // The resource name returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/ad_schedule_view_service.proto b/google/ads/googleads/v3/services/ad_schedule_view_service.proto new file mode 100644 index 000000000..ac547c10e --- /dev/null +++ b/google/ads/googleads/v3/services/ad_schedule_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/ad_schedule_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdScheduleViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the AdSchedule View service. + +// Service to fetch ad schedule views. +service AdScheduleViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad schedule view in full detail. + rpc GetAdScheduleView(GetAdScheduleViewRequest) returns (google.ads.googleads.v3.resources.AdScheduleView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/adScheduleViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [AdScheduleViewService.GetAdScheduleView][google.ads.googleads.v3.services.AdScheduleViewService.GetAdScheduleView]. +message GetAdScheduleViewRequest { + // Required. The resource name of the ad schedule view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AdScheduleView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/ad_service.proto b/google/ads/googleads/v3/services/ad_service.proto new file mode 100644 index 000000000..40cf417a8 --- /dev/null +++ b/google/ads/googleads/v3/services/ad_service.proto @@ -0,0 +1,104 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/ad.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Ad service. + +// Service to manage ads. +service AdService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested ad in full detail. + rpc GetAd(GetAdRequest) returns (google.ads.googleads.v3.resources.Ad) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/ads/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Updates ads. Operation statuses are returned. + rpc MutateAds(MutateAdsRequest) returns (MutateAdsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/ads:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [AdService.GetAd][google.ads.googleads.v3.services.AdService.GetAd]. +message GetAdRequest { + // Required. The resource name of the ad to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Ad" + } + ]; +} + +// Request message for [AdService.MutateAds][google.ads.googleads.v3.services.AdService.MutateAds]. +message MutateAdsRequest { + // Required. The ID of the customer whose ads are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual ads. + repeated AdOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A single update operation on an ad. +message AdOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 2; + + // The mutate operation. + oneof operation { + // Update operation: The ad is expected to have a valid resource name + // in this format: + // + // `customers/{customer_id}/ads/{ad_id}` + google.ads.googleads.v3.resources.Ad update = 1; + } +} + +// Response message for an ad mutate. +message MutateAdsResponse { + // All results for the mutate. + repeated MutateAdResult results = 2; +} + +// The result for the ad mutate. +message MutateAdResult { + // The resource name returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/age_range_view_service.proto b/google/ads/googleads/v3/services/age_range_view_service.proto new file mode 100644 index 000000000..ac159e1b3 --- /dev/null +++ b/google/ads/googleads/v3/services/age_range_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/age_range_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AgeRangeViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Age Range View service. + +// Service to manage age range views. +service AgeRangeViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested age range view in full detail. + rpc GetAgeRangeView(GetAgeRangeViewRequest) returns (google.ads.googleads.v3.resources.AgeRangeView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/ageRangeViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [AgeRangeViewService.GetAgeRangeView][google.ads.googleads.v3.services.AgeRangeViewService.GetAgeRangeView]. +message GetAgeRangeViewRequest { + // Required. The resource name of the age range view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/AgeRangeView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/asset_service.proto b/google/ads/googleads/v3/services/asset_service.proto new file mode 100644 index 000000000..8f1416603 --- /dev/null +++ b/google/ads/googleads/v3/services/asset_service.proto @@ -0,0 +1,101 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/asset.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AssetServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Asset service. + +// Service to manage assets. Asset types can be created with AssetService are +// YoutubeVideoAsset, MediaBundleAsset and ImageAsset. TextAsset should be +// created with Ad inline. +service AssetService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested asset in full detail. + rpc GetAsset(GetAssetRequest) returns (google.ads.googleads.v3.resources.Asset) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/assets/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates assets. Operation statuses are returned. + rpc MutateAssets(MutateAssetsRequest) returns (MutateAssetsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/assets:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [AssetService.GetAsset][google.ads.googleads.v3.services.AssetService.GetAsset] +message GetAssetRequest { + // Required. The resource name of the asset to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Asset" + } + ]; +} + +// Request message for [AssetService.MutateAssets][google.ads.googleads.v3.services.AssetService.MutateAssets] +message MutateAssetsRequest { + // Required. The ID of the customer whose assets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual assets. + repeated AssetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A single operation to create an asset. Supported asset types are +// YoutubeVideoAsset, MediaBundleAsset, ImageAsset, and LeadFormAsset. TextAsset +// should be created with Ad inline. +message AssetOperation { + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new asset. + google.ads.googleads.v3.resources.Asset create = 1; + } +} + +// Response message for an asset mutate. +message MutateAssetsResponse { + // All results for the mutate. + repeated MutateAssetResult results = 2; +} + +// The result for the asset mutate. +message MutateAssetResult { + // The resource name returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/bidding_strategy_service.proto b/google/ads/googleads/v3/services/bidding_strategy_service.proto new file mode 100644 index 000000000..8fdbfb8d8 --- /dev/null +++ b/google/ads/googleads/v3/services/bidding_strategy_service.proto @@ -0,0 +1,130 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/bidding_strategy.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "BiddingStrategyServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Bidding Strategy service. + +// Service to manage bidding strategies. +service BiddingStrategyService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested bidding strategy in full detail. + rpc GetBiddingStrategy(GetBiddingStrategyRequest) returns (google.ads.googleads.v3.resources.BiddingStrategy) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/biddingStrategies/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes bidding strategies. Operation statuses are + // returned. + rpc MutateBiddingStrategies(MutateBiddingStrategiesRequest) returns (MutateBiddingStrategiesResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/biddingStrategies:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [BiddingStrategyService.GetBiddingStrategy][google.ads.googleads.v3.services.BiddingStrategyService.GetBiddingStrategy]. +message GetBiddingStrategyRequest { + // Required. The resource name of the bidding strategy to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BiddingStrategy" + } + ]; +} + +// Request message for [BiddingStrategyService.MutateBiddingStrategies][google.ads.googleads.v3.services.BiddingStrategyService.MutateBiddingStrategies]. +message MutateBiddingStrategiesRequest { + // Required. The ID of the customer whose bidding strategies are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual bidding strategies. + repeated BiddingStrategyOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on a bidding strategy. +message BiddingStrategyOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new bidding + // strategy. + google.ads.googleads.v3.resources.BiddingStrategy create = 1; + + // Update operation: The bidding strategy is expected to have a valid + // resource name. + google.ads.googleads.v3.resources.BiddingStrategy update = 2; + + // Remove operation: A resource name for the removed bidding strategy is + // expected, in this format: + // + // `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}` + string remove = 3; + } +} + +// Response message for bidding strategy mutate. +message MutateBiddingStrategiesResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateBiddingStrategyResult results = 2; +} + +// The result for the bidding strategy mutate. +message MutateBiddingStrategyResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/billing_setup_service.proto b/google/ads/googleads/v3/services/billing_setup_service.proto new file mode 100644 index 000000000..8a177e9b2 --- /dev/null +++ b/google/ads/googleads/v3/services/billing_setup_service.proto @@ -0,0 +1,115 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/billing_setup.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "BillingSetupServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the BillingSetup service. + +// A service for designating the business entity responsible for accrued costs. +// +// A billing setup is associated with a payments account. Billing-related +// activity for all billing setups associated with a particular payments account +// will appear on a single invoice generated monthly. +// +// Mutates: +// The REMOVE operation cancels a pending billing setup. +// The CREATE operation creates a new billing setup. +service BillingSetupService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns a billing setup. + rpc GetBillingSetup(GetBillingSetupRequest) returns (google.ads.googleads.v3.resources.BillingSetup) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/billingSetups/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates a billing setup, or cancels an existing billing setup. + rpc MutateBillingSetup(MutateBillingSetupRequest) returns (MutateBillingSetupResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/billingSetups:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operation"; + } +} + +// Request message for +// [BillingSetupService.GetBillingSetup][google.ads.googleads.v3.services.BillingSetupService.GetBillingSetup]. +message GetBillingSetupRequest { + // Required. The resource name of the billing setup to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/BillingSetup" + } + ]; +} + +// Request message for billing setup mutate operations. +message MutateBillingSetupRequest { + // Required. Id of the customer to apply the billing setup mutate operation to. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The operation to perform. + BillingSetupOperation operation = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A single operation on a billing setup, which describes the cancellation of an +// existing billing setup. +message BillingSetupOperation { + // Only one of these operations can be set. "Update" operations are not + // supported. + oneof operation { + // Creates a billing setup. No resource name is expected for the new billing + // setup. + google.ads.googleads.v3.resources.BillingSetup create = 2; + + // Resource name of the billing setup to remove. A setup cannot be + // removed unless it is in a pending state or its scheduled start time is in + // the future. The resource name looks like + // `customers/{customer_id}/billingSetups/{billing_id}`. + string remove = 1; + } +} + +// Response message for a billing setup operation. +message MutateBillingSetupResponse { + // A result that identifies the resource affected by the mutate request. + MutateBillingSetupResult result = 1; +} + +// Result for a single billing setup mutate. +message MutateBillingSetupResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/campaign_audience_view_service.proto b/google/ads/googleads/v3/services/campaign_audience_view_service.proto new file mode 100644 index 000000000..0134cd2fa --- /dev/null +++ b/google/ads/googleads/v3/services/campaign_audience_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/campaign_audience_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignAudienceViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Campaign Audience View service. + +// Service to manage campaign audience views. +service CampaignAudienceViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested campaign audience view in full detail. + rpc GetCampaignAudienceView(GetCampaignAudienceViewRequest) returns (google.ads.googleads.v3.resources.CampaignAudienceView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/campaignAudienceViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [CampaignAudienceViewService.GetCampaignAudienceView][google.ads.googleads.v3.services.CampaignAudienceViewService.GetCampaignAudienceView]. +message GetCampaignAudienceViewRequest { + // Required. The resource name of the campaign audience view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignAudienceView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/campaign_bid_modifier_service.proto b/google/ads/googleads/v3/services/campaign_bid_modifier_service.proto new file mode 100644 index 000000000..113107cc0 --- /dev/null +++ b/google/ads/googleads/v3/services/campaign_bid_modifier_service.proto @@ -0,0 +1,130 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/campaign_bid_modifier.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignBidModifierServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Campaign Bid Modifier service. + +// Service to manage campaign bid modifiers. +service CampaignBidModifierService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested campaign bid modifier in full detail. + rpc GetCampaignBidModifier(GetCampaignBidModifierRequest) returns (google.ads.googleads.v3.resources.CampaignBidModifier) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/campaignBidModifiers/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes campaign bid modifiers. + // Operation statuses are returned. + rpc MutateCampaignBidModifiers(MutateCampaignBidModifiersRequest) returns (MutateCampaignBidModifiersResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/campaignBidModifiers:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [CampaignBidModifierService.GetCampaignBidModifier][google.ads.googleads.v3.services.CampaignBidModifierService.GetCampaignBidModifier]. +message GetCampaignBidModifierRequest { + // Required. The resource name of the campaign bid modifier to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBidModifier" + } + ]; +} + +// Request message for [CampaignBidModifierService.MutateCampaignBidModifier][]. +message MutateCampaignBidModifiersRequest { + // Required. ID of the customer whose campaign bid modifiers are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual campaign bid modifiers. + repeated CampaignBidModifierOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, remove, update) on a campaign bid modifier. +message CampaignBidModifierOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new campaign bid + // modifier. + google.ads.googleads.v3.resources.CampaignBidModifier create = 1; + + // Update operation: The campaign bid modifier is expected to have a valid + // resource name. + google.ads.googleads.v3.resources.CampaignBidModifier update = 2; + + // Remove operation: A resource name for the removed campaign bid modifier + // is expected, in this format: + // + // `customers/{customer_id}/CampaignBidModifiers/{campaign_id}~{criterion_id}` + string remove = 3; + } +} + +// Response message for campaign bid modifiers mutate. +message MutateCampaignBidModifiersResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateCampaignBidModifierResult results = 2; +} + +// The result for the criterion mutate. +message MutateCampaignBidModifierResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/campaign_budget_service.proto b/google/ads/googleads/v3/services/campaign_budget_service.proto new file mode 100644 index 000000000..95bf89291 --- /dev/null +++ b/google/ads/googleads/v3/services/campaign_budget_service.proto @@ -0,0 +1,129 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/campaign_budget.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignBudgetServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Campaign Budget service. + +// Service to manage campaign budgets. +service CampaignBudgetService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested Campaign Budget in full detail. + rpc GetCampaignBudget(GetCampaignBudgetRequest) returns (google.ads.googleads.v3.resources.CampaignBudget) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/campaignBudgets/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes campaign budgets. Operation statuses are + // returned. + rpc MutateCampaignBudgets(MutateCampaignBudgetsRequest) returns (MutateCampaignBudgetsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/campaignBudgets:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [CampaignBudgetService.GetCampaignBudget][google.ads.googleads.v3.services.CampaignBudgetService.GetCampaignBudget]. +message GetCampaignBudgetRequest { + // Required. The resource name of the campaign budget to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignBudget" + } + ]; +} + +// Request message for [CampaignBudgetService.MutateCampaignBudgets][google.ads.googleads.v3.services.CampaignBudgetService.MutateCampaignBudgets]. +message MutateCampaignBudgetsRequest { + // Required. The ID of the customer whose campaign budgets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual campaign budgets. + repeated CampaignBudgetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on a campaign budget. +message CampaignBudgetOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new budget. + google.ads.googleads.v3.resources.CampaignBudget create = 1; + + // Update operation: The campaign budget is expected to have a valid + // resource name. + google.ads.googleads.v3.resources.CampaignBudget update = 2; + + // Remove operation: A resource name for the removed budget is expected, in + // this format: + // + // `customers/{customer_id}/campaignBudgets/{budget_id}` + string remove = 3; + } +} + +// Response message for campaign budget mutate. +message MutateCampaignBudgetsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateCampaignBudgetResult results = 2; +} + +// The result for the campaign budget mutate. +message MutateCampaignBudgetResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/campaign_criterion_service.proto b/google/ads/googleads/v3/services/campaign_criterion_service.proto new file mode 100644 index 000000000..678c83e71 --- /dev/null +++ b/google/ads/googleads/v3/services/campaign_criterion_service.proto @@ -0,0 +1,128 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/campaign_criterion.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignCriterionServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Campaign Criterion service. + +// Service to manage campaign criteria. +service CampaignCriterionService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested criterion in full detail. + rpc GetCampaignCriterion(GetCampaignCriterionRequest) returns (google.ads.googleads.v3.resources.CampaignCriterion) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/campaignCriteria/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes criteria. Operation statuses are returned. + rpc MutateCampaignCriteria(MutateCampaignCriteriaRequest) returns (MutateCampaignCriteriaResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/campaignCriteria:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [CampaignCriterionService.GetCampaignCriterion][google.ads.googleads.v3.services.CampaignCriterionService.GetCampaignCriterion]. +message GetCampaignCriterionRequest { + // Required. The resource name of the criterion to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterion" + } + ]; +} + +// Request message for [CampaignCriterionService.MutateCampaignCriteria][google.ads.googleads.v3.services.CampaignCriterionService.MutateCampaignCriteria]. +message MutateCampaignCriteriaRequest { + // Required. The ID of the customer whose criteria are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual criteria. + repeated CampaignCriterionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on a campaign criterion. +message CampaignCriterionOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new criterion. + google.ads.googleads.v3.resources.CampaignCriterion create = 1; + + // Update operation: The criterion is expected to have a valid resource + // name. + google.ads.googleads.v3.resources.CampaignCriterion update = 2; + + // Remove operation: A resource name for the removed criterion is expected, + // in this format: + // + // `customers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}` + string remove = 3; + } +} + +// Response message for campaign criterion mutate. +message MutateCampaignCriteriaResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateCampaignCriterionResult results = 2; +} + +// The result for the criterion mutate. +message MutateCampaignCriterionResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/campaign_criterion_simulation_service.proto b/google/ads/googleads/v3/services/campaign_criterion_simulation_service.proto new file mode 100644 index 000000000..c2261b0af --- /dev/null +++ b/google/ads/googleads/v3/services/campaign_criterion_simulation_service.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/campaign_criterion_simulation.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignCriterionSimulationServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the CampaignCriterionSimulation service. + +// Service to fetch campaign criterion simulations. +service CampaignCriterionSimulationService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested campaign criterion simulation in full detail. + rpc GetCampaignCriterionSimulation(GetCampaignCriterionSimulationRequest) returns (google.ads.googleads.v3.resources.CampaignCriterionSimulation) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/campaignCriterionSimulations/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for +// [CampaignCriterionSimulationService.GetCampaignCriterionSimulation][google.ads.googleads.v3.services.CampaignCriterionSimulationService.GetCampaignCriterionSimulation]. +message GetCampaignCriterionSimulationRequest { + // Required. The resource name of the campaign criterion simulation to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignCriterionSimulation" + } + ]; +} diff --git a/google/ads/googleads/v3/services/campaign_draft_service.proto b/google/ads/googleads/v3/services/campaign_draft_service.proto new file mode 100644 index 000000000..1be17bf22 --- /dev/null +++ b/google/ads/googleads/v3/services/campaign_draft_service.proto @@ -0,0 +1,202 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/campaign_draft.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignDraftServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Campaign Draft service. + +// Service to manage campaign drafts. +service CampaignDraftService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested campaign draft in full detail. + rpc GetCampaignDraft(GetCampaignDraftRequest) returns (google.ads.googleads.v3.resources.CampaignDraft) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/campaignDrafts/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes campaign drafts. Operation statuses are + // returned. + rpc MutateCampaignDrafts(MutateCampaignDraftsRequest) returns (MutateCampaignDraftsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/campaignDrafts:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } + + // Promotes the changes in a draft back to the base campaign. + // + // This method returns a Long Running Operation (LRO) indicating if the + // Promote is done. Use [Operations.GetOperation] to poll the LRO until it + // is done. Only a done status is returned in the response. See the status + // in the Campaign Draft resource to determine if the promotion was + // successful. If the LRO failed, use + // [CampaignDraftService.ListCampaignDraftAsyncErrors][google.ads.googleads.v3.services.CampaignDraftService.ListCampaignDraftAsyncErrors] to view the list of + // error reasons. + rpc PromoteCampaignDraft(PromoteCampaignDraftRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{campaign_draft=customers/*/campaignDrafts/*}:promote" + body: "*" + }; + option (google.api.method_signature) = "campaign_draft"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Empty" + }; + } + + // Returns all errors that occurred during CampaignDraft promote. Throws an + // error if called before campaign draft is promoted. + // Supports standard list paging. + rpc ListCampaignDraftAsyncErrors(ListCampaignDraftAsyncErrorsRequest) returns (ListCampaignDraftAsyncErrorsResponse) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/campaignDrafts/*}:listAsyncErrors" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [CampaignDraftService.GetCampaignDraft][google.ads.googleads.v3.services.CampaignDraftService.GetCampaignDraft]. +message GetCampaignDraftRequest { + // Required. The resource name of the campaign draft to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignDraft" + } + ]; +} + +// Request message for [CampaignDraftService.MutateCampaignDrafts][google.ads.googleads.v3.services.CampaignDraftService.MutateCampaignDrafts]. +message MutateCampaignDraftsRequest { + // Required. The ID of the customer whose campaign drafts are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual campaign drafts. + repeated CampaignDraftOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// Request message for [CampaignDraftService.PromoteCampaignDraft][google.ads.googleads.v3.services.CampaignDraftService.PromoteCampaignDraft]. +message PromoteCampaignDraftRequest { + // Required. The resource name of the campaign draft to promote. + string campaign_draft = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// A single operation (create, update, remove) on a campaign draft. +message CampaignDraftOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new campaign + // draft. + google.ads.googleads.v3.resources.CampaignDraft create = 1; + + // Update operation: The campaign draft is expected to have a valid + // resource name. + google.ads.googleads.v3.resources.CampaignDraft update = 2; + + // Remove operation: The campaign draft is expected to have a valid + // resource name, in this format: + // + // `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}` + string remove = 3; + } +} + +// Response message for campaign draft mutate. +message MutateCampaignDraftsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateCampaignDraftResult results = 2; +} + +// The result for the campaign draft mutate. +message MutateCampaignDraftResult { + // Returned for successful operations. + string resource_name = 1; +} + +// Request message for [CampaignDraftService.ListCampaignDraftAsyncErrors][google.ads.googleads.v3.services.CampaignDraftService.ListCampaignDraftAsyncErrors]. +message ListCampaignDraftAsyncErrorsRequest { + // Required. The name of the campaign draft from which to retrieve the async errors. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignDraft" + } + ]; + + // Token of the page to retrieve. If not specified, the first + // page of results will be returned. Use the value obtained from + // `next_page_token` in the previous response in order to request + // the next page of results. + string page_token = 2; + + // Number of elements to retrieve in a single page. + // When a page request is too large, the server may decide to + // further limit the number of returned resources. + int32 page_size = 3; +} + +// Response message for [CampaignDraftService.ListCampaignDraftAsyncErrors][google.ads.googleads.v3.services.CampaignDraftService.ListCampaignDraftAsyncErrors]. +message ListCampaignDraftAsyncErrorsResponse { + // Details of the errors when performing the asynchronous operation. + repeated google.rpc.Status errors = 1; + + // Pagination token used to retrieve the next page of results. + // Pass the content of this string as the `page_token` attribute of + // the next request. `next_page_token` is not returned for the last + // page. + string next_page_token = 2; +} diff --git a/google/ads/googleads/v3/services/campaign_experiment_service.proto b/google/ads/googleads/v3/services/campaign_experiment_service.proto new file mode 100644 index 000000000..1f80bda6d --- /dev/null +++ b/google/ads/googleads/v3/services/campaign_experiment_service.proto @@ -0,0 +1,293 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/campaign_experiment.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExperimentServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Campaign Experiment service. + +// CampaignExperimentService manages the life cycle of campaign experiments. +// It is used to create new experiments from drafts, modify experiment +// properties, promote changes in an experiment back to its base campaign, +// graduate experiments into new stand-alone campaigns, and to remove an +// experiment. +// +// An experiment consists of two variants or arms - the base campaign and the +// experiment campaign, directing a fixed share of traffic to each arm. +// A campaign experiment is created from a draft of changes to the base campaign +// and will be a snapshot of changes in the draft at the time of creation. +service CampaignExperimentService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested campaign experiment in full detail. + rpc GetCampaignExperiment(GetCampaignExperimentRequest) returns (google.ads.googleads.v3.resources.CampaignExperiment) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/campaignExperiments/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates a campaign experiment based on a campaign draft. The draft campaign + // will be forked into a real campaign (called the experiment campaign) that + // will begin serving ads if successfully created. + // + // The campaign experiment is created immediately with status INITIALIZING. + // This method return a long running operation that tracks the forking of the + // draft campaign. If the forking fails, a list of errors can be retrieved + // using the ListCampaignExperimentAsyncErrors method. The operation's + // metadata will be a StringValue containing the resource name of the created + // campaign experiment. + rpc CreateCampaignExperiment(CreateCampaignExperimentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/campaignExperiments:create" + body: "*" + }; + option (google.api.method_signature) = "customer_id,campaign_experiment"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.ads.googleads.v3.services.CreateCampaignExperimentMetadata" + }; + } + + // Updates campaign experiments. Operation statuses are returned. + rpc MutateCampaignExperiments(MutateCampaignExperimentsRequest) returns (MutateCampaignExperimentsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/campaignExperiments:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } + + // Graduates a campaign experiment to a full campaign. The base and experiment + // campaigns will start running independently with their own budgets. + rpc GraduateCampaignExperiment(GraduateCampaignExperimentRequest) returns (GraduateCampaignExperimentResponse) { + option (google.api.http) = { + post: "/v3/{campaign_experiment=customers/*/campaignExperiments/*}:graduate" + body: "*" + }; + option (google.api.method_signature) = "campaign_experiment,campaign_budget"; + } + + // Promotes the changes in a experiment campaign back to the base campaign. + // + // The campaign experiment is updated immediately with status PROMOTING. + // This method return a long running operation that tracks the promoting of + // the experiment campaign. If the promoting fails, a list of errors can be + // retrieved using the ListCampaignExperimentAsyncErrors method. + rpc PromoteCampaignExperiment(PromoteCampaignExperimentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{campaign_experiment=customers/*/campaignExperiments/*}:promote" + body: "*" + }; + option (google.api.method_signature) = "campaign_experiment"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Empty" + }; + } + + // Immediately ends a campaign experiment, changing the experiment's scheduled + // end date and without waiting for end of day. End date is updated to be the + // time of the request. + rpc EndCampaignExperiment(EndCampaignExperimentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v3/{campaign_experiment=customers/*/campaignExperiments/*}:end" + body: "*" + }; + option (google.api.method_signature) = "campaign_experiment"; + } + + // Returns all errors that occurred during CampaignExperiment create or + // promote (whichever occurred last). + // Supports standard list paging. + rpc ListCampaignExperimentAsyncErrors(ListCampaignExperimentAsyncErrorsRequest) returns (ListCampaignExperimentAsyncErrorsResponse) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/campaignExperiments/*}:listAsyncErrors" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [CampaignExperimentService.GetCampaignExperiment][google.ads.googleads.v3.services.CampaignExperimentService.GetCampaignExperiment]. +message GetCampaignExperimentRequest { + // Required. The resource name of the campaign experiment to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExperiment" + } + ]; +} + +// Request message for [CampaignExperimentService.MutateCampaignExperiments][google.ads.googleads.v3.services.CampaignExperimentService.MutateCampaignExperiments]. +message MutateCampaignExperimentsRequest { + // Required. The ID of the customer whose campaign experiments are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual campaign experiments. + repeated CampaignExperimentOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single update operation on a campaign experiment. +message CampaignExperimentOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 3; + + // The mutate operation. + oneof operation { + // Update operation: The campaign experiment is expected to have a valid + // resource name. + google.ads.googleads.v3.resources.CampaignExperiment update = 1; + + // Remove operation: The campaign experiment is expected to have a valid + // resource name, in this format: + // + // `customers/{customer_id}/campaignExperiments/{campaign_experiment_id}` + string remove = 2; + } +} + +// Response message for campaign experiment mutate. +message MutateCampaignExperimentsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateCampaignExperimentResult results = 2; +} + +// The result for the campaign experiment mutate. +message MutateCampaignExperimentResult { + // Returned for successful operations. + string resource_name = 1; +} + +// Request message for [CampaignExperimentService.CreateCampaignExperiment][google.ads.googleads.v3.services.CampaignExperimentService.CreateCampaignExperiment]. +message CreateCampaignExperimentRequest { + // Required. The ID of the customer whose campaign experiment is being created. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The campaign experiment to be created. + google.ads.googleads.v3.resources.CampaignExperiment campaign_experiment = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 3; +} + +// Message used as metadata returned in Long Running Operations for +// CreateCampaignExperimentRequest +message CreateCampaignExperimentMetadata { + // Resource name of campaign experiment created. + string campaign_experiment = 1; +} + +// Request message for [CampaignExperimentService.GraduateCampaignExperiment][google.ads.googleads.v3.services.CampaignExperimentService.GraduateCampaignExperiment]. +message GraduateCampaignExperimentRequest { + // Required. The resource name of the campaign experiment to graduate. + string campaign_experiment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Resource name of the budget to attach to the campaign graduated from the + // experiment. + string campaign_budget = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for campaign experiment graduate. +message GraduateCampaignExperimentResponse { + // The resource name of the campaign from the graduated experiment. + // This campaign is the same one as CampaignExperiment.experiment_campaign. + string graduated_campaign = 1; +} + +// Request message for [CampaignExperimentService.PromoteCampaignExperiment][google.ads.googleads.v3.services.CampaignExperimentService.PromoteCampaignExperiment]. +message PromoteCampaignExperimentRequest { + // Required. The resource name of the campaign experiment to promote. + string campaign_experiment = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [CampaignExperimentService.EndCampaignExperiment][google.ads.googleads.v3.services.CampaignExperimentService.EndCampaignExperiment]. +message EndCampaignExperimentRequest { + // Required. The resource name of the campaign experiment to end. + string campaign_experiment = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [CampaignExperimentService.ListCampaignExperimentAsyncErrors][google.ads.googleads.v3.services.CampaignExperimentService.ListCampaignExperimentAsyncErrors]. +message ListCampaignExperimentAsyncErrorsRequest { + // Required. The name of the campaign experiment from which to retrieve the async + // errors. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExperiment" + } + ]; + + // Token of the page to retrieve. If not specified, the first + // page of results will be returned. Use the value obtained from + // `next_page_token` in the previous response in order to request + // the next page of results. + string page_token = 2; + + // Number of elements to retrieve in a single page. + // When a page request is too large, the server may decide to + // further limit the number of returned resources. + int32 page_size = 3; +} + +// Response message for +// [CampaignExperimentService.ListCampaignExperimentAsyncErrors][google.ads.googleads.v3.services.CampaignExperimentService.ListCampaignExperimentAsyncErrors]. +message ListCampaignExperimentAsyncErrorsResponse { + // Details of the errors when performing the asynchronous operation. + repeated google.rpc.Status errors = 1; + + // Pagination token used to retrieve the next page of results. + // Pass the content of this string as the `page_token` attribute of + // the next request. `next_page_token` is not returned for the last + // page. + string next_page_token = 2; +} diff --git a/google/ads/googleads/v3/services/campaign_extension_setting_service.proto b/google/ads/googleads/v3/services/campaign_extension_setting_service.proto new file mode 100644 index 000000000..2c2af123e --- /dev/null +++ b/google/ads/googleads/v3/services/campaign_extension_setting_service.proto @@ -0,0 +1,134 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/campaign_extension_setting.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExtensionSettingServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the CampaignExtensionSetting service. + +// Service to manage campaign extension settings. +service CampaignExtensionSettingService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested campaign extension setting in full detail. + rpc GetCampaignExtensionSetting(GetCampaignExtensionSettingRequest) returns (google.ads.googleads.v3.resources.CampaignExtensionSetting) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/campaignExtensionSettings/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes campaign extension settings. Operation + // statuses are returned. + rpc MutateCampaignExtensionSettings(MutateCampaignExtensionSettingsRequest) returns (MutateCampaignExtensionSettingsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/campaignExtensionSettings:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for +// [CampaignExtensionSettingService.GetCampaignExtensionSetting][google.ads.googleads.v3.services.CampaignExtensionSettingService.GetCampaignExtensionSetting]. +message GetCampaignExtensionSettingRequest { + // Required. The resource name of the campaign extension setting to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignExtensionSetting" + } + ]; +} + +// Request message for +// [CampaignExtensionSettingService.MutateCampaignExtensionSettings][google.ads.googleads.v3.services.CampaignExtensionSettingService.MutateCampaignExtensionSettings]. +message MutateCampaignExtensionSettingsRequest { + // Required. The ID of the customer whose campaign extension settings are being + // modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual campaign extension + // settings. + repeated CampaignExtensionSettingOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on a campaign extension setting. +message CampaignExtensionSettingOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new campaign + // extension setting. + google.ads.googleads.v3.resources.CampaignExtensionSetting create = 1; + + // Update operation: The campaign extension setting is expected to have a + // valid resource name. + google.ads.googleads.v3.resources.CampaignExtensionSetting update = 2; + + // Remove operation: A resource name for the removed campaign extension + // setting is expected, in this format: + // + // `customers/{customer_id}/campaignExtensionSettings/{campaign_id}~{extension_type}` + string remove = 3; + } +} + +// Response message for a campaign extension setting mutate. +message MutateCampaignExtensionSettingsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateCampaignExtensionSettingResult results = 2; +} + +// The result for the campaign extension setting mutate. +message MutateCampaignExtensionSettingResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/campaign_feed_service.proto b/google/ads/googleads/v3/services/campaign_feed_service.proto new file mode 100644 index 000000000..e8a9d8d58 --- /dev/null +++ b/google/ads/googleads/v3/services/campaign_feed_service.proto @@ -0,0 +1,129 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/campaign_feed.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignFeedServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the CampaignFeed service. + +// Service to manage campaign feeds. +service CampaignFeedService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested campaign feed in full detail. + rpc GetCampaignFeed(GetCampaignFeedRequest) returns (google.ads.googleads.v3.resources.CampaignFeed) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/campaignFeeds/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes campaign feeds. Operation statuses are + // returned. + rpc MutateCampaignFeeds(MutateCampaignFeedsRequest) returns (MutateCampaignFeedsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/campaignFeeds:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [CampaignFeedService.GetCampaignFeed][google.ads.googleads.v3.services.CampaignFeedService.GetCampaignFeed]. +message GetCampaignFeedRequest { + // Required. The resource name of the campaign feed to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignFeed" + } + ]; +} + +// Request message for [CampaignFeedService.MutateCampaignFeeds][google.ads.googleads.v3.services.CampaignFeedService.MutateCampaignFeeds]. +message MutateCampaignFeedsRequest { + // Required. The ID of the customer whose campaign feeds are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual campaign feeds. + repeated CampaignFeedOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on a campaign feed. +message CampaignFeedOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new campaign feed. + google.ads.googleads.v3.resources.CampaignFeed create = 1; + + // Update operation: The campaign feed is expected to have a valid resource + // name. + google.ads.googleads.v3.resources.CampaignFeed update = 2; + + // Remove operation: A resource name for the removed campaign feed is + // expected, in this format: + // + // `customers/{customer_id}/campaignFeeds/{campaign_id}~{feed_id}` + string remove = 3; + } +} + +// Response message for a campaign feed mutate. +message MutateCampaignFeedsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateCampaignFeedResult results = 2; +} + +// The result for the campaign feed mutate. +message MutateCampaignFeedResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/campaign_label_service.proto b/google/ads/googleads/v3/services/campaign_label_service.proto new file mode 100644 index 000000000..eaabcd07a --- /dev/null +++ b/google/ads/googleads/v3/services/campaign_label_service.proto @@ -0,0 +1,122 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/campaign_label.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignLabelServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Campaign Label service. + +// Service to manage labels on campaigns. +service CampaignLabelService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested campaign-label relationship in full detail. + rpc GetCampaignLabel(GetCampaignLabelRequest) returns (google.ads.googleads.v3.resources.CampaignLabel) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/campaignLabels/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates and removes campaign-label relationships. + // Operation statuses are returned. + rpc MutateCampaignLabels(MutateCampaignLabelsRequest) returns (MutateCampaignLabelsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/campaignLabels:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [CampaignLabelService.GetCampaignLabel][google.ads.googleads.v3.services.CampaignLabelService.GetCampaignLabel]. +message GetCampaignLabelRequest { + // Required. The resource name of the campaign-label relationship to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignLabel" + } + ]; +} + +// Request message for [CampaignLabelService.MutateCampaignLabels][google.ads.googleads.v3.services.CampaignLabelService.MutateCampaignLabels]. +message MutateCampaignLabelsRequest { + // Required. ID of the customer whose campaign-label relationships are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on campaign-label relationships. + repeated CampaignLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, remove) on a campaign-label relationship. +message CampaignLabelOperation { + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new campaign-label + // relationship. + google.ads.googleads.v3.resources.CampaignLabel create = 1; + + // Remove operation: A resource name for the campaign-label relationship + // being removed, in this format: + // + // `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}` + string remove = 2; + } +} + +// Response message for a campaign labels mutate. +message MutateCampaignLabelsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateCampaignLabelResult results = 2; +} + +// The result for a campaign label mutate. +message MutateCampaignLabelResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/campaign_service.proto b/google/ads/googleads/v3/services/campaign_service.proto new file mode 100644 index 000000000..b89d06fc9 --- /dev/null +++ b/google/ads/googleads/v3/services/campaign_service.proto @@ -0,0 +1,128 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/campaign.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Campaign service. + +// Service to manage campaigns. +service CampaignService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested campaign in full detail. + rpc GetCampaign(GetCampaignRequest) returns (google.ads.googleads.v3.resources.Campaign) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/campaigns/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes campaigns. Operation statuses are returned. + rpc MutateCampaigns(MutateCampaignsRequest) returns (MutateCampaignsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/campaigns:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [CampaignService.GetCampaign][google.ads.googleads.v3.services.CampaignService.GetCampaign]. +message GetCampaignRequest { + // Required. The resource name of the campaign to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; +} + +// Request message for [CampaignService.MutateCampaigns][google.ads.googleads.v3.services.CampaignService.MutateCampaigns]. +message MutateCampaignsRequest { + // Required. The ID of the customer whose campaigns are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual campaigns. + repeated CampaignOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on a campaign. +message CampaignOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new campaign. + google.ads.googleads.v3.resources.Campaign create = 1; + + // Update operation: The campaign is expected to have a valid + // resource name. + google.ads.googleads.v3.resources.Campaign update = 2; + + // Remove operation: A resource name for the removed campaign is + // expected, in this format: + // + // `customers/{customer_id}/campaigns/{campaign_id}` + string remove = 3; + } +} + +// Response message for campaign mutate. +message MutateCampaignsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateCampaignResult results = 2; +} + +// The result for the campaign mutate. +message MutateCampaignResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/campaign_shared_set_service.proto b/google/ads/googleads/v3/services/campaign_shared_set_service.proto new file mode 100644 index 000000000..9169a74f5 --- /dev/null +++ b/google/ads/googleads/v3/services/campaign_shared_set_service.proto @@ -0,0 +1,121 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/campaign_shared_set.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignSharedSetServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Campaign Shared Set service. + +// Service to manage campaign shared sets. +service CampaignSharedSetService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested campaign shared set in full detail. + rpc GetCampaignSharedSet(GetCampaignSharedSetRequest) returns (google.ads.googleads.v3.resources.CampaignSharedSet) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/campaignSharedSets/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates or removes campaign shared sets. Operation statuses are returned. + rpc MutateCampaignSharedSets(MutateCampaignSharedSetsRequest) returns (MutateCampaignSharedSetsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/campaignSharedSets:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [CampaignSharedSetService.GetCampaignSharedSet][google.ads.googleads.v3.services.CampaignSharedSetService.GetCampaignSharedSet]. +message GetCampaignSharedSetRequest { + // Required. The resource name of the campaign shared set to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CampaignSharedSet" + } + ]; +} + +// Request message for [CampaignSharedSetService.MutateCampaignSharedSets][google.ads.googleads.v3.services.CampaignSharedSetService.MutateCampaignSharedSets]. +message MutateCampaignSharedSetsRequest { + // Required. The ID of the customer whose campaign shared sets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual campaign shared sets. + repeated CampaignSharedSetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, remove) on an campaign shared set. +message CampaignSharedSetOperation { + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new campaign + // shared set. + google.ads.googleads.v3.resources.CampaignSharedSet create = 1; + + // Remove operation: A resource name for the removed campaign shared set is + // expected, in this format: + // + // `customers/{customer_id}/campaignSharedSets/{campaign_id}~{shared_set_id}` + string remove = 3; + } +} + +// Response message for a campaign shared set mutate. +message MutateCampaignSharedSetsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateCampaignSharedSetResult results = 2; +} + +// The result for the campaign shared set mutate. +message MutateCampaignSharedSetResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/carrier_constant_service.proto b/google/ads/googleads/v3/services/carrier_constant_service.proto new file mode 100644 index 000000000..9bc0b4c05 --- /dev/null +++ b/google/ads/googleads/v3/services/carrier_constant_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/carrier_constant.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CarrierConstantServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the carrier constant service. + +// Service to fetch carrier constants. +service CarrierConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested carrier constant in full detail. + rpc GetCarrierConstant(GetCarrierConstantRequest) returns (google.ads.googleads.v3.resources.CarrierConstant) { + option (google.api.http) = { + get: "/v3/{resource_name=carrierConstants/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [CarrierConstantService.GetCarrierConstant][google.ads.googleads.v3.services.CarrierConstantService.GetCarrierConstant]. +message GetCarrierConstantRequest { + // Required. Resource name of the carrier constant to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CarrierConstant" + } + ]; +} diff --git a/google/ads/googleads/v3/services/change_status_service.proto b/google/ads/googleads/v3/services/change_status_service.proto new file mode 100644 index 000000000..1f884296b --- /dev/null +++ b/google/ads/googleads/v3/services/change_status_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/change_status.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ChangeStatusServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Change Status service. + +// Service to fetch change statuses. +service ChangeStatusService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested change status in full detail. + rpc GetChangeStatus(GetChangeStatusRequest) returns (google.ads.googleads.v3.resources.ChangeStatus) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/changeStatus/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for '[ChangeStatusService.GetChangeStatus][google.ads.googleads.v3.services.ChangeStatusService.GetChangeStatus]'. +message GetChangeStatusRequest { + // Required. The resource name of the change status to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ChangeStatus" + } + ]; +} diff --git a/google/ads/googleads/v3/services/click_view_service.proto b/google/ads/googleads/v3/services/click_view_service.proto new file mode 100644 index 000000000..d1ce74c91 --- /dev/null +++ b/google/ads/googleads/v3/services/click_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/click_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ClickViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the ClickView service. + +// Service to fetch click views. +service ClickViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested click view in full detail. + rpc GetClickView(GetClickViewRequest) returns (google.ads.googleads.v3.resources.ClickView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/clickViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [ClickViewService.GetClickView][google.ads.googleads.v3.services.ClickViewService.GetClickView]. +message GetClickViewRequest { + // Required. The resource name of the click view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ClickView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/conversion_action_service.proto b/google/ads/googleads/v3/services/conversion_action_service.proto new file mode 100644 index 000000000..2b2d4ac34 --- /dev/null +++ b/google/ads/googleads/v3/services/conversion_action_service.proto @@ -0,0 +1,130 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/conversion_action.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Conversion Action service. + +// Service to manage conversion actions. +service ConversionActionService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested conversion action. + rpc GetConversionAction(GetConversionActionRequest) returns (google.ads.googleads.v3.resources.ConversionAction) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/conversionActions/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates or removes conversion actions. Operation statuses are + // returned. + rpc MutateConversionActions(MutateConversionActionsRequest) returns (MutateConversionActionsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/conversionActions:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [ConversionActionService.GetConversionAction][google.ads.googleads.v3.services.ConversionActionService.GetConversionAction]. +message GetConversionActionRequest { + // Required. The resource name of the conversion action to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ConversionAction" + } + ]; +} + +// Request message for [ConversionActionService.MutateConversionActions][google.ads.googleads.v3.services.ConversionActionService.MutateConversionActions]. +message MutateConversionActionsRequest { + // Required. The ID of the customer whose conversion actions are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual conversion actions. + repeated ConversionActionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on a conversion action. +message ConversionActionOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new conversion + // action. + google.ads.googleads.v3.resources.ConversionAction create = 1; + + // Update operation: The conversion action is expected to have a valid + // resource name. + google.ads.googleads.v3.resources.ConversionAction update = 2; + + // Remove operation: A resource name for the removed conversion action is + // expected, in this format: + // + // `customers/{customer_id}/conversionActions/{conversion_action_id}` + string remove = 3; + } +} + +// Response message for [ConversionActionService.MutateConversionActions][google.ads.googleads.v3.services.ConversionActionService.MutateConversionActions]. +message MutateConversionActionsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateConversionActionResult results = 2; +} + +// The result for the conversion action mutate. +message MutateConversionActionResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/conversion_adjustment_upload_service.proto b/google/ads/googleads/v3/services/conversion_adjustment_upload_service.proto new file mode 100644 index 000000000..ddd1bfe5f --- /dev/null +++ b/google/ads/googleads/v3/services/conversion_adjustment_upload_service.proto @@ -0,0 +1,167 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/enums/conversion_adjustment_type.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ConversionAdjustmentUploadServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Service to upload conversion adjustments. +service ConversionAdjustmentUploadService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Processes the given conversion adjustments. + rpc UploadConversionAdjustments(UploadConversionAdjustmentsRequest) returns (UploadConversionAdjustmentsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}:uploadConversionAdjustments" + body: "*" + }; + option (google.api.method_signature) = "customer_id,conversion_adjustments,partial_failure"; + } +} + +// Request message for +// [ConversionAdjustmentUploadService.UploadConversionAdjustments][google.ads.googleads.v3.services.ConversionAdjustmentUploadService.UploadConversionAdjustments]. +message UploadConversionAdjustmentsRequest { + // Required. The ID of the customer performing the upload. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The conversion adjustments that are being uploaded. + repeated ConversionAdjustment conversion_adjustments = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried out + // in one transaction if and only if they are all valid. This should always be + // set to true. + bool partial_failure = 3 [(google.api.field_behavior) = REQUIRED]; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// Response message for +// [ConversionAdjustmentUploadService.UploadConversionAdjustments][google.ads.googleads.v3.services.ConversionAdjustmentUploadService.UploadConversionAdjustments]. +message UploadConversionAdjustmentsResponse { + // Errors that pertain to conversion adjustment failures in the partial + // failure mode. Returned when all errors occur inside the adjustments. If any + // errors occur outside the adjustments (e.g. auth errors), we return an RPC + // level error. + google.rpc.Status partial_failure_error = 1; + + // Returned for successfully processed conversion adjustments. Proto will be + // empty for rows that received an error. Results are not returned when + // validate_only is true. + repeated ConversionAdjustmentResult results = 2; +} + +// A conversion adjustment. +message ConversionAdjustment { + // Resource name of the conversion action associated with this conversion + // adjustment. Note: Although this resource name consists of a customer id and + // a conversion action id, validation will ignore the customer id and use the + // conversion action id as the sole identifier of the conversion action. + google.protobuf.StringValue conversion_action = 3; + + // The date time at which the adjustment occurred. Must be after the + // conversion_date_time. The timezone must be specified. The format is + // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00". + google.protobuf.StringValue adjustment_date_time = 4; + + // The adjustment type. + google.ads.googleads.v3.enums.ConversionAdjustmentTypeEnum.ConversionAdjustmentType adjustment_type = 5; + + // Information needed to restate the conversion's value. + // Required for restatements. Should not be supplied for retractions. An error + // will be returned if provided for a retraction. + RestatementValue restatement_value = 6; + + // Identifies the conversion to be adjusted. + oneof conversion_identifier { + // Uniquely identifies a conversion that was reported without an order ID + // specified. + GclidDateTimePair gclid_date_time_pair = 1; + + // The order ID of the conversion to be adjusted. If the conversion was + // reported with an order ID specified, that order ID must be used as the + // identifier here. + google.protobuf.StringValue order_id = 2; + } +} + +// Contains information needed to restate a conversion's value. +message RestatementValue { + // The restated conversion value. This is the value of the conversion after + // restatement. For example, to change the value of a conversion from 100 to + // 70, an adjusted value of 70 should be reported. + google.protobuf.DoubleValue adjusted_value = 1; + + // The currency of the restated value. If not provided, then the default + // currency from the conversion action is used, and if that is not set then + // the account currency is used. This is the ISO 4217 3-character currency + // code e.g. USD or EUR. + google.protobuf.StringValue currency_code = 2; +} + +// Uniquely identifies a conversion that was reported without an order ID +// specified. +message GclidDateTimePair { + // Google click ID (gclid) associated with the original conversion for this + // adjustment. + google.protobuf.StringValue gclid = 1; + + // The date time at which the original conversion for this adjustment + // occurred. The timezone must be specified. The format is "yyyy-mm-dd + // hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00". + google.protobuf.StringValue conversion_date_time = 2; +} + +// Information identifying a successfully processed ConversionAdjustment. +message ConversionAdjustmentResult { + // Resource name of the conversion action associated with this conversion + // adjustment. + google.protobuf.StringValue conversion_action = 3; + + // The date time at which the adjustment occurred. The format is + // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00". + google.protobuf.StringValue adjustment_date_time = 4; + + // The adjustment type. + google.ads.googleads.v3.enums.ConversionAdjustmentTypeEnum.ConversionAdjustmentType adjustment_type = 5; + + // Identifies the conversion that was adjusted. + oneof conversion_identifier { + // Uniquely identifies a conversion that was reported without an order ID + // specified. + GclidDateTimePair gclid_date_time_pair = 1; + + // The order ID of the conversion that was adjusted. + google.protobuf.StringValue order_id = 2; + } +} diff --git a/google/ads/googleads/v3/services/conversion_upload_service.proto b/google/ads/googleads/v3/services/conversion_upload_service.proto new file mode 100644 index 000000000..0ca815bfa --- /dev/null +++ b/google/ads/googleads/v3/services/conversion_upload_service.proto @@ -0,0 +1,223 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ConversionUploadServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Service to upload conversions. +service ConversionUploadService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Processes the given click conversions. + rpc UploadClickConversions(UploadClickConversionsRequest) returns (UploadClickConversionsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}:uploadClickConversions" + body: "*" + }; + option (google.api.method_signature) = "customer_id,conversions,partial_failure"; + } + + // Processes the given call conversions. + rpc UploadCallConversions(UploadCallConversionsRequest) returns (UploadCallConversionsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}:uploadCallConversions" + body: "*" + }; + option (google.api.method_signature) = "customer_id,conversions,partial_failure"; + } +} + +// Request message for [ConversionUploadService.UploadClickConversions][google.ads.googleads.v3.services.ConversionUploadService.UploadClickConversions]. +message UploadClickConversionsRequest { + // Required. The ID of the customer performing the upload. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The conversions that are being uploaded. + repeated ClickConversion conversions = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // This should always be set to true. + bool partial_failure = 3 [(google.api.field_behavior) = REQUIRED]; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// Response message for [ConversionUploadService.UploadClickConversions][google.ads.googleads.v3.services.ConversionUploadService.UploadClickConversions]. +message UploadClickConversionsResponse { + // Errors that pertain to conversion failures in the partial failure mode. + // Returned when all errors occur inside the conversions. If any errors occur + // outside the conversions (e.g. auth errors), we return an RPC level error. + google.rpc.Status partial_failure_error = 1; + + // Returned for successfully processed conversions. Proto will be empty for + // rows that received an error. Results are not returned when validate_only is + // true. + repeated ClickConversionResult results = 2; +} + +// Request message for [ConversionUploadService.UploadCallConversions][google.ads.googleads.v3.services.ConversionUploadService.UploadCallConversions]. +message UploadCallConversionsRequest { + // Required. The ID of the customer performing the upload. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The conversions that are being uploaded. + repeated CallConversion conversions = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // This should always be set to true. + bool partial_failure = 3 [(google.api.field_behavior) = REQUIRED]; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// Response message for [ConversionUploadService.UploadCallConversions][google.ads.googleads.v3.services.ConversionUploadService.UploadCallConversions]. +message UploadCallConversionsResponse { + // Errors that pertain to conversion failures in the partial failure mode. + // Returned when all errors occur inside the conversions. If any errors occur + // outside the conversions (e.g. auth errors), we return an RPC level error. + google.rpc.Status partial_failure_error = 1; + + // Returned for successfully processed conversions. Proto will be empty for + // rows that received an error. Results are not returned when validate_only is + // true. + repeated CallConversionResult results = 2; +} + +// A click conversion. +message ClickConversion { + // The Google click ID (gclid) associated with this conversion. + google.protobuf.StringValue gclid = 1; + + // Resource name of the conversion action associated with this conversion. + // Note: Although this resource name consists of a customer id and a + // conversion action id, validation will ignore the customer id and use the + // conversion action id as the sole identifier of the conversion action. + google.protobuf.StringValue conversion_action = 2; + + // The date time at which the conversion occurred. Must be after + // the click time. The timezone must be specified. The format is + // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. “2019-01-01 12:32:45-08:00”. + google.protobuf.StringValue conversion_date_time = 3; + + // The value of the conversion for the advertiser. + google.protobuf.DoubleValue conversion_value = 4; + + // Currency associated with the conversion value. This is the ISO 4217 + // 3-character currency code. For example: USD, EUR. + google.protobuf.StringValue currency_code = 5; + + // The order ID associated with the conversion. An order id can only be used + // for one conversion per conversion action. + google.protobuf.StringValue order_id = 6; + + // Additional data about externally attributed conversions. This field + // is required for conversions with an externally attributed conversion + // action, but should not be set otherwise. + ExternalAttributionData external_attribution_data = 7; +} + +// A call conversion. +message CallConversion { + // The caller id from which this call was placed. Caller id is expected to be + // in E.164 format with preceding '+' sign. e.g. "+16502531234". + google.protobuf.StringValue caller_id = 1; + + // The date time at which the call occurred. The timezone must be specified. + // The format is "yyyy-mm-dd hh:mm:ss+|-hh:mm", + // e.g. "2019-01-01 12:32:45-08:00". + google.protobuf.StringValue call_start_date_time = 2; + + // Resource name of the conversion action associated with this conversion. + // Note: Although this resource name consists of a customer id and a + // conversion action id, validation will ignore the customer id and use the + // conversion action id as the sole identifier of the conversion action. + google.protobuf.StringValue conversion_action = 3; + + // The date time at which the conversion occurred. Must be after the call + // time. The timezone must be specified. The format is + // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00". + google.protobuf.StringValue conversion_date_time = 4; + + // The value of the conversion for the advertiser. + google.protobuf.DoubleValue conversion_value = 5; + + // Currency associated with the conversion value. This is the ISO 4217 + // 3-character currency code. For example: USD, EUR. + google.protobuf.StringValue currency_code = 6; +} + +// Contains additional information about externally attributed conversions. +message ExternalAttributionData { + // Represents the fraction of the conversion that is attributed to the + // Google Ads click. + google.protobuf.DoubleValue external_attribution_credit = 1; + + // Specifies the attribution model name. + google.protobuf.StringValue external_attribution_model = 2; +} + +// Identifying information for a successfully processed ClickConversion. +message ClickConversionResult { + // The Google Click ID (gclid) associated with this conversion. + google.protobuf.StringValue gclid = 1; + + // Resource name of the conversion action associated with this conversion. + google.protobuf.StringValue conversion_action = 2; + + // The date time at which the conversion occurred. The format is + // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. “2019-01-01 12:32:45-08:00”. + google.protobuf.StringValue conversion_date_time = 3; +} + +// Identifying information for a successfully processed CallConversionUpload. +message CallConversionResult { + // The caller id from which this call was placed. Caller id is expected to be + // in E.164 format with preceding '+' sign. + google.protobuf.StringValue caller_id = 1; + + // The date time at which the call occurred. The format is + // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00". + google.protobuf.StringValue call_start_date_time = 2; + + // Resource name of the conversion action associated with this conversion. + google.protobuf.StringValue conversion_action = 3; + + // The date time at which the conversion occurred. The format is + // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00". + google.protobuf.StringValue conversion_date_time = 4; +} diff --git a/google/ads/googleads/v3/services/currency_constant_service.proto b/google/ads/googleads/v3/services/currency_constant_service.proto new file mode 100644 index 000000000..a9c788ff3 --- /dev/null +++ b/google/ads/googleads/v3/services/currency_constant_service.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/currency_constant.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CurrencyConstantServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Service to fetch currency constants. +service CurrencyConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested currency constant. + rpc GetCurrencyConstant(GetCurrencyConstantRequest) returns (google.ads.googleads.v3.resources.CurrencyConstant) { + option (google.api.http) = { + get: "/v3/{resource_name=currencyConstants/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [CurrencyConstantService.GetCurrencyConstant][google.ads.googleads.v3.services.CurrencyConstantService.GetCurrencyConstant]. +message GetCurrencyConstantRequest { + // Required. Resource name of the currency constant to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CurrencyConstant" + } + ]; +} diff --git a/google/ads/googleads/v3/services/custom_interest_service.proto b/google/ads/googleads/v3/services/custom_interest_service.proto new file mode 100644 index 000000000..4be702b05 --- /dev/null +++ b/google/ads/googleads/v3/services/custom_interest_service.proto @@ -0,0 +1,110 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/custom_interest.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomInterestServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Custom Interest service. + +// Service to manage custom interests. +service CustomInterestService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested custom interest in full detail. + rpc GetCustomInterest(GetCustomInterestRequest) returns (google.ads.googleads.v3.resources.CustomInterest) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/customInterests/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates or updates custom interests. Operation statuses are returned. + rpc MutateCustomInterests(MutateCustomInterestsRequest) returns (MutateCustomInterestsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/customInterests:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [CustomInterestService.GetCustomInterest][google.ads.googleads.v3.services.CustomInterestService.GetCustomInterest]. +message GetCustomInterestRequest { + // Required. The resource name of the custom interest to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomInterest" + } + ]; +} + +// Request message for [CustomInterestService.MutateCustomInterests][google.ads.googleads.v3.services.CustomInterestService.MutateCustomInterests]. +message MutateCustomInterestsRequest { + // Required. The ID of the customer whose custom interests are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual custom interests. + repeated CustomInterestOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update) on a custom interest. +message CustomInterestOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new custom + // interest. + google.ads.googleads.v3.resources.CustomInterest create = 1; + + // Update operation: The custom interest is expected to have a valid + // resource name. + google.ads.googleads.v3.resources.CustomInterest update = 2; + } +} + +// Response message for custom interest mutate. +message MutateCustomInterestsResponse { + // All results for the mutate. + repeated MutateCustomInterestResult results = 2; +} + +// The result for the custom interest mutate. +message MutateCustomInterestResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/customer_client_link_service.proto b/google/ads/googleads/v3/services/customer_client_link_service.proto new file mode 100644 index 000000000..ab1d1a3b8 --- /dev/null +++ b/google/ads/googleads/v3/services/customer_client_link_service.proto @@ -0,0 +1,102 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/customer_client_link.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomerClientLinkServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Service to manage customer client links. +service CustomerClientLinkService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested CustomerClientLink in full detail. + rpc GetCustomerClientLink(GetCustomerClientLinkRequest) returns (google.ads.googleads.v3.resources.CustomerClientLink) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/customerClientLinks/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates or updates a customer client link. Operation statuses are returned. + rpc MutateCustomerClientLink(MutateCustomerClientLinkRequest) returns (MutateCustomerClientLinkResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/customerClientLinks:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operation"; + } +} + +// Request message for [CustomerClientLinkService.GetCustomerClientLink][google.ads.googleads.v3.services.CustomerClientLinkService.GetCustomerClientLink]. +message GetCustomerClientLinkRequest { + // Required. The resource name of the customer client link to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerClientLink" + } + ]; +} + +// Request message for [CustomerClientLinkService.MutateCustomerClientLink][google.ads.googleads.v3.services.CustomerClientLinkService.MutateCustomerClientLink]. +message MutateCustomerClientLinkRequest { + // Required. The ID of the customer whose customer link are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The operation to perform on the individual CustomerClientLink. + CustomerClientLinkOperation operation = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A single operation (create, update) on a CustomerClientLink. +message CustomerClientLinkOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new link. + google.ads.googleads.v3.resources.CustomerClientLink create = 1; + + // Update operation: The link is expected to have a valid resource name. + google.ads.googleads.v3.resources.CustomerClientLink update = 2; + } +} + +// Response message for a CustomerClientLink mutate. +message MutateCustomerClientLinkResponse { + // A result that identifies the resource affected by the mutate request. + MutateCustomerClientLinkResult result = 1; +} + +// The result for a single customer client link mutate. +message MutateCustomerClientLinkResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/customer_client_service.proto b/google/ads/googleads/v3/services/customer_client_service.proto new file mode 100644 index 000000000..d61eb7e83 --- /dev/null +++ b/google/ads/googleads/v3/services/customer_client_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/customer_client.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomerClientServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Customer Client service. + +// Service to get clients in a customer's hierarchy. +service CustomerClientService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested client in full detail. + rpc GetCustomerClient(GetCustomerClientRequest) returns (google.ads.googleads.v3.resources.CustomerClient) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/customerClients/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [CustomerClientService.GetCustomerClient][google.ads.googleads.v3.services.CustomerClientService.GetCustomerClient]. +message GetCustomerClientRequest { + // Required. The resource name of the client to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerClient" + } + ]; +} diff --git a/google/ads/googleads/v3/services/customer_extension_setting_service.proto b/google/ads/googleads/v3/services/customer_extension_setting_service.proto new file mode 100644 index 000000000..4eedadbfd --- /dev/null +++ b/google/ads/googleads/v3/services/customer_extension_setting_service.proto @@ -0,0 +1,134 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/customer_extension_setting.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomerExtensionSettingServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the CustomerExtensionSetting service. + +// Service to manage customer extension settings. +service CustomerExtensionSettingService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested customer extension setting in full detail. + rpc GetCustomerExtensionSetting(GetCustomerExtensionSettingRequest) returns (google.ads.googleads.v3.resources.CustomerExtensionSetting) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/customerExtensionSettings/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes customer extension settings. Operation + // statuses are returned. + rpc MutateCustomerExtensionSettings(MutateCustomerExtensionSettingsRequest) returns (MutateCustomerExtensionSettingsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/customerExtensionSettings:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for +// [CustomerExtensionSettingService.GetCustomerExtensionSetting][google.ads.googleads.v3.services.CustomerExtensionSettingService.GetCustomerExtensionSetting]. +message GetCustomerExtensionSettingRequest { + // Required. The resource name of the customer extension setting to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerExtensionSetting" + } + ]; +} + +// Request message for +// [CustomerExtensionSettingService.MutateCustomerExtensionSettings][google.ads.googleads.v3.services.CustomerExtensionSettingService.MutateCustomerExtensionSettings]. +message MutateCustomerExtensionSettingsRequest { + // Required. The ID of the customer whose customer extension settings are being + // modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual customer extension + // settings. + repeated CustomerExtensionSettingOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on a customer extension setting. +message CustomerExtensionSettingOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new customer + // extension setting. + google.ads.googleads.v3.resources.CustomerExtensionSetting create = 1; + + // Update operation: The customer extension setting is expected to have a + // valid resource name. + google.ads.googleads.v3.resources.CustomerExtensionSetting update = 2; + + // Remove operation: A resource name for the removed customer extension + // setting is expected, in this format: + // + // `customers/{customer_id}/customerExtensionSettings/{extension_type}` + string remove = 3; + } +} + +// Response message for a customer extension setting mutate. +message MutateCustomerExtensionSettingsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateCustomerExtensionSettingResult results = 2; +} + +// The result for the customer extension setting mutate. +message MutateCustomerExtensionSettingResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/customer_feed_service.proto b/google/ads/googleads/v3/services/customer_feed_service.proto new file mode 100644 index 000000000..6b8a63a4e --- /dev/null +++ b/google/ads/googleads/v3/services/customer_feed_service.proto @@ -0,0 +1,129 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/customer_feed.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomerFeedServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the CustomerFeed service. + +// Service to manage customer feeds. +service CustomerFeedService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested customer feed in full detail. + rpc GetCustomerFeed(GetCustomerFeedRequest) returns (google.ads.googleads.v3.resources.CustomerFeed) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/customerFeeds/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes customer feeds. Operation statuses are + // returned. + rpc MutateCustomerFeeds(MutateCustomerFeedsRequest) returns (MutateCustomerFeedsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/customerFeeds:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [CustomerFeedService.GetCustomerFeed][google.ads.googleads.v3.services.CustomerFeedService.GetCustomerFeed]. +message GetCustomerFeedRequest { + // Required. The resource name of the customer feed to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerFeed" + } + ]; +} + +// Request message for [CustomerFeedService.MutateCustomerFeeds][google.ads.googleads.v3.services.CustomerFeedService.MutateCustomerFeeds]. +message MutateCustomerFeedsRequest { + // Required. The ID of the customer whose customer feeds are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual customer feeds. + repeated CustomerFeedOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on a customer feed. +message CustomerFeedOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new customer feed. + google.ads.googleads.v3.resources.CustomerFeed create = 1; + + // Update operation: The customer feed is expected to have a valid resource + // name. + google.ads.googleads.v3.resources.CustomerFeed update = 2; + + // Remove operation: A resource name for the removed customer feed is + // expected, in this format: + // + // `customers/{customer_id}/customerFeeds/{feed_id}` + string remove = 3; + } +} + +// Response message for a customer feed mutate. +message MutateCustomerFeedsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateCustomerFeedResult results = 2; +} + +// The result for the customer feed mutate. +message MutateCustomerFeedResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/customer_label_service.proto b/google/ads/googleads/v3/services/customer_label_service.proto new file mode 100644 index 000000000..c6c7a7c52 --- /dev/null +++ b/google/ads/googleads/v3/services/customer_label_service.proto @@ -0,0 +1,122 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/customer_label.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomerLabelServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Customer Label service. + +// Service to manage labels on customers. +service CustomerLabelService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested customer-label relationship in full detail. + rpc GetCustomerLabel(GetCustomerLabelRequest) returns (google.ads.googleads.v3.resources.CustomerLabel) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/customerLabels/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates and removes customer-label relationships. + // Operation statuses are returned. + rpc MutateCustomerLabels(MutateCustomerLabelsRequest) returns (MutateCustomerLabelsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/customerLabels:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [CustomerLabelService.GetCustomerLabel][google.ads.googleads.v3.services.CustomerLabelService.GetCustomerLabel]. +message GetCustomerLabelRequest { + // Required. The resource name of the customer-label relationship to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerLabel" + } + ]; +} + +// Request message for [CustomerLabelService.MutateCustomerLabels][google.ads.googleads.v3.services.CustomerLabelService.MutateCustomerLabels]. +message MutateCustomerLabelsRequest { + // Required. ID of the customer whose customer-label relationships are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on customer-label relationships. + repeated CustomerLabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, remove) on a customer-label relationship. +message CustomerLabelOperation { + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new customer-label + // relationship. + google.ads.googleads.v3.resources.CustomerLabel create = 1; + + // Remove operation: A resource name for the customer-label relationship + // being removed, in this format: + // + // `customers/{customer_id}/customerLabels/{label_id}` + string remove = 2; + } +} + +// Response message for a customer labels mutate. +message MutateCustomerLabelsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateCustomerLabelResult results = 2; +} + +// The result for a customer label mutate. +message MutateCustomerLabelResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/customer_manager_link_service.proto b/google/ads/googleads/v3/services/customer_manager_link_service.proto new file mode 100644 index 000000000..e0701eaef --- /dev/null +++ b/google/ads/googleads/v3/services/customer_manager_link_service.proto @@ -0,0 +1,139 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/customer_manager_link.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomerManagerLinkServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Service to manage customer-manager links. +service CustomerManagerLinkService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested CustomerManagerLink in full detail. + rpc GetCustomerManagerLink(GetCustomerManagerLinkRequest) returns (google.ads.googleads.v3.resources.CustomerManagerLink) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/customerManagerLinks/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates or updates customer manager links. Operation statuses are returned. + rpc MutateCustomerManagerLink(MutateCustomerManagerLinkRequest) returns (MutateCustomerManagerLinkResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/customerManagerLinks:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } + + // Moves a client customer to a new manager customer. + // This simplifies the complex request that requires two operations to move + // a client customer to a new manager. i.e: + // 1. Update operation with Status INACTIVE (previous manager) and, + // 2. Update operation with Status ACTIVE (new manager). + rpc MoveManagerLink(MoveManagerLinkRequest) returns (MoveManagerLinkResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/customerManagerLinks:moveManagerLink" + body: "*" + }; + option (google.api.method_signature) = "customer_id,previous_customer_manager_link,new_manager"; + } +} + +// Request message for [CustomerManagerLinkService.GetCustomerManagerLink][google.ads.googleads.v3.services.CustomerManagerLinkService.GetCustomerManagerLink]. +message GetCustomerManagerLinkRequest { + // Required. The resource name of the CustomerManagerLink to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerManagerLink" + } + ]; +} + +// Request message for [CustomerManagerLinkService.MutateCustomerManagerLink][google.ads.googleads.v3.services.CustomerManagerLinkService.MutateCustomerManagerLink]. +message MutateCustomerManagerLinkRequest { + // Required. The ID of the customer whose customer manager links are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual customer manager links. + repeated CustomerManagerLinkOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [CustomerManagerLinkService.MoveManagerLink][google.ads.googleads.v3.services.CustomerManagerLinkService.MoveManagerLink]. +message MoveManagerLinkRequest { + // Required. The ID of the client customer that is being moved. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource name of the previous CustomerManagerLink. + // The resource name has the form: + // `customers/{customer_id}/customerManagerLinks/{manager_customer_id}~{manager_link_id}` + string previous_customer_manager_link = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource name of the new manager customer that the client wants to move + // to. Customer resource names have the format: "customers/{customer_id}" + string new_manager = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Updates the status of a CustomerManagerLink. +// The following actions are possible: +// 1. Update operation with status ACTIVE accepts a pending invitation. +// 2. Update operation with status REFUSED declines a pending invitation. +// 3. Update operation with status INACTIVE terminates link to manager. +message CustomerManagerLinkOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Update operation: The link is expected to have a valid resource name. + google.ads.googleads.v3.resources.CustomerManagerLink update = 2; + } +} + +// Response message for a CustomerManagerLink mutate. +message MutateCustomerManagerLinkResponse { + // A result that identifies the resource affected by the mutate request. + repeated MutateCustomerManagerLinkResult results = 1; +} + +// Response message for a CustomerManagerLink moveManagerLink. +message MoveManagerLinkResponse { + // Returned for successful operations. Represents a CustomerManagerLink + // resource of the newly created link between client customer and new manager + // customer. + string resource_name = 1; +} + +// The result for the customer manager link mutate. +message MutateCustomerManagerLinkResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/customer_negative_criterion_service.proto b/google/ads/googleads/v3/services/customer_negative_criterion_service.proto new file mode 100644 index 000000000..b4e39244a --- /dev/null +++ b/google/ads/googleads/v3/services/customer_negative_criterion_service.proto @@ -0,0 +1,122 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/customer_negative_criterion.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomerNegativeCriterionServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Customer Negative Criterion service. + +// Service to manage customer negative criteria. +service CustomerNegativeCriterionService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested criterion in full detail. + rpc GetCustomerNegativeCriterion(GetCustomerNegativeCriterionRequest) returns (google.ads.googleads.v3.resources.CustomerNegativeCriterion) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/customerNegativeCriteria/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates or removes criteria. Operation statuses are returned. + rpc MutateCustomerNegativeCriteria(MutateCustomerNegativeCriteriaRequest) returns (MutateCustomerNegativeCriteriaResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/customerNegativeCriteria:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for +// [CustomerNegativeCriterionService.GetCustomerNegativeCriterion][google.ads.googleads.v3.services.CustomerNegativeCriterionService.GetCustomerNegativeCriterion]. +message GetCustomerNegativeCriterionRequest { + // Required. The resource name of the criterion to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/CustomerNegativeCriterion" + } + ]; +} + +// Request message for +// [CustomerNegativeCriterionService.MutateCustomerNegativeCriteria][google.ads.googleads.v3.services.CustomerNegativeCriterionService.MutateCustomerNegativeCriteria]. +message MutateCustomerNegativeCriteriaRequest { + // Required. The ID of the customer whose criteria are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual criteria. + repeated CustomerNegativeCriterionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create or remove) on a customer level negative criterion. +message CustomerNegativeCriterionOperation { + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new criterion. + google.ads.googleads.v3.resources.CustomerNegativeCriterion create = 1; + + // Remove operation: A resource name for the removed criterion is expected, + // in this format: + // + // `customers/{customer_id}/customerNegativeCriteria/{criterion_id}` + string remove = 2; + } +} + +// Response message for customer negative criterion mutate. +message MutateCustomerNegativeCriteriaResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateCustomerNegativeCriteriaResult results = 2; +} + +// The result for the criterion mutate. +message MutateCustomerNegativeCriteriaResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/customer_service.proto b/google/ads/googleads/v3/services/customer_service.proto new file mode 100644 index 000000000..0644c9561 --- /dev/null +++ b/google/ads/googleads/v3/services/customer_service.proto @@ -0,0 +1,157 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/enums/access_role.proto"; +import "google/ads/googleads/v3/resources/customer.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomerServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Customer service. + +// Service to manage customers. +service CustomerService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested customer in full detail. + rpc GetCustomer(GetCustomerRequest) returns (google.ads.googleads.v3.resources.Customer) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Updates a customer. Operation statuses are returned. + rpc MutateCustomer(MutateCustomerRequest) returns (MutateCustomerResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operation"; + } + + // Returns resource names of customers directly accessible by the + // user authenticating the call. + rpc ListAccessibleCustomers(ListAccessibleCustomersRequest) returns (ListAccessibleCustomersResponse) { + option (google.api.http) = { + get: "/v3/customers:listAccessibleCustomers" + }; + } + + // Creates a new client under manager. The new client customer is returned. + rpc CreateCustomerClient(CreateCustomerClientRequest) returns (CreateCustomerClientResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}:createCustomerClient" + body: "*" + }; + option (google.api.method_signature) = "customer_id,customer_client"; + } +} + +// Request message for [CustomerService.GetCustomer][google.ads.googleads.v3.services.CustomerService.GetCustomer]. +message GetCustomerRequest { + // Required. The resource name of the customer to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Customer" + } + ]; +} + +// Request message for [CustomerService.MutateCustomer][google.ads.googleads.v3.services.CustomerService.MutateCustomer]. +message MutateCustomerRequest { + // Required. The ID of the customer being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The operation to perform on the customer + CustomerOperation operation = 4 [(google.api.field_behavior) = REQUIRED]; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 5; +} + +// Request message for [CustomerService.CreateCustomerClient][google.ads.googleads.v3.services.CustomerService.CreateCustomerClient]. +message CreateCustomerClientRequest { + // Required. The ID of the Manager under whom client customer is being created. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new client customer to create. The resource name on this customer + // will be ignored. + google.ads.googleads.v3.resources.Customer customer_client = 2 [(google.api.field_behavior) = REQUIRED]; + + // Email address of the user who should be invited on the created client + // customer. Accessible to whitelisted customers only. + google.protobuf.StringValue email_address = 3; + + // The proposed role of user on the created client customer. + // Accessible to whitelisted customers only. + google.ads.googleads.v3.enums.AccessRoleEnum.AccessRole access_role = 4; +} + +// A single update on a customer. +message CustomerOperation { + // Mutate operation. Only updates are supported for customer. + google.ads.googleads.v3.resources.Customer update = 1; + + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 2; +} + +// Response message for CreateCustomerClient mutate. +message CreateCustomerClientResponse { + // The resource name of the newly created customer client. + string resource_name = 2; +} + +// Response message for customer mutate. +message MutateCustomerResponse { + // Result for the mutate. + MutateCustomerResult result = 2; +} + +// The result for the customer mutate. +message MutateCustomerResult { + // Returned for successful operations. + string resource_name = 1; +} + +// Request message for [CustomerService.ListAccessibleCustomers][google.ads.googleads.v3.services.CustomerService.ListAccessibleCustomers]. +message ListAccessibleCustomersRequest { + +} + +// Response message for [CustomerService.ListAccessibleCustomers][google.ads.googleads.v3.services.CustomerService.ListAccessibleCustomers]. +message ListAccessibleCustomersResponse { + // Resource name of customers directly accessible by the + // user authenticating the call. + repeated string resource_names = 1; +} diff --git a/google/ads/googleads/v3/services/detail_placement_view_service.proto b/google/ads/googleads/v3/services/detail_placement_view_service.proto new file mode 100644 index 000000000..dc92f24c7 --- /dev/null +++ b/google/ads/googleads/v3/services/detail_placement_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/detail_placement_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "DetailPlacementViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Detail Placement View service. + +// Service to fetch Detail Placement views. +service DetailPlacementViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested Detail Placement view in full detail. + rpc GetDetailPlacementView(GetDetailPlacementViewRequest) returns (google.ads.googleads.v3.resources.DetailPlacementView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/detailPlacementViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [DetailPlacementViewService.GetDetailPlacementView][google.ads.googleads.v3.services.DetailPlacementViewService.GetDetailPlacementView]. +message GetDetailPlacementViewRequest { + // Required. The resource name of the Detail Placement view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DetailPlacementView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/display_keyword_view_service.proto b/google/ads/googleads/v3/services/display_keyword_view_service.proto new file mode 100644 index 000000000..1189819fc --- /dev/null +++ b/google/ads/googleads/v3/services/display_keyword_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/display_keyword_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "DisplayKeywordViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Display Keyword View service. + +// Service to manage display keyword views. +service DisplayKeywordViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested display keyword view in full detail. + rpc GetDisplayKeywordView(GetDisplayKeywordViewRequest) returns (google.ads.googleads.v3.resources.DisplayKeywordView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/displayKeywordViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [DisplayKeywordViewService.GetDisplayKeywordView][google.ads.googleads.v3.services.DisplayKeywordViewService.GetDisplayKeywordView]. +message GetDisplayKeywordViewRequest { + // Required. The resource name of the display keyword view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DisplayKeywordView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/distance_view_service.proto b/google/ads/googleads/v3/services/distance_view_service.proto new file mode 100644 index 000000000..6673b5546 --- /dev/null +++ b/google/ads/googleads/v3/services/distance_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/distance_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "DistanceViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Distance View service. + +// Service to fetch distance views. +service DistanceViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the attributes of the requested distance view. + rpc GetDistanceView(GetDistanceViewRequest) returns (google.ads.googleads.v3.resources.DistanceView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/distanceViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [DistanceViewService.GetDistanceView][google.ads.googleads.v3.services.DistanceViewService.GetDistanceView]. +message GetDistanceViewRequest { + // Required. The resource name of the distance view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DistanceView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/domain_category_service.proto b/google/ads/googleads/v3/services/domain_category_service.proto new file mode 100644 index 000000000..cedbbdb5b --- /dev/null +++ b/google/ads/googleads/v3/services/domain_category_service.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/domain_category.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "DomainCategoryServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the DomainCategory Service. + +// Service to fetch domain categories. +service DomainCategoryService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested domain category. + rpc GetDomainCategory(GetDomainCategoryRequest) returns (google.ads.googleads.v3.resources.DomainCategory) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/domainCategories/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for +// [DomainCategoryService.GetDomainCategory][google.ads.googleads.v3.services.DomainCategoryService.GetDomainCategory]. +message GetDomainCategoryRequest { + // Required. Resource name of the domain category to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DomainCategory" + } + ]; +} diff --git a/google/ads/googleads/v3/services/dynamic_search_ads_search_term_view_service.proto b/google/ads/googleads/v3/services/dynamic_search_ads_search_term_view_service.proto new file mode 100644 index 000000000..fe5066c86 --- /dev/null +++ b/google/ads/googleads/v3/services/dynamic_search_ads_search_term_view_service.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/dynamic_search_ads_search_term_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "DynamicSearchAdsSearchTermViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Dynamic Search Ads Search Term View service. + +// Service to fetch dynamic search ads views. +service DynamicSearchAdsSearchTermViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested dynamic search ads search term view in full detail. + rpc GetDynamicSearchAdsSearchTermView(GetDynamicSearchAdsSearchTermViewRequest) returns (google.ads.googleads.v3.resources.DynamicSearchAdsSearchTermView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/dynamicSearchAdsSearchTermViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for +// [DynamicSearchAdsSearchTermViewService.GetDynamicSearchAdsSearchTermView][google.ads.googleads.v3.services.DynamicSearchAdsSearchTermViewService.GetDynamicSearchAdsSearchTermView]. +message GetDynamicSearchAdsSearchTermViewRequest { + // Required. The resource name of the dynamic search ads search term view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/DynamicSearchAdsSearchTermView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/expanded_landing_page_view_service.proto b/google/ads/googleads/v3/services/expanded_landing_page_view_service.proto new file mode 100644 index 000000000..b0a7909f7 --- /dev/null +++ b/google/ads/googleads/v3/services/expanded_landing_page_view_service.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/expanded_landing_page_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ExpandedLandingPageViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the expanded landing page view service. + +// Service to fetch expanded landing page views. +service ExpandedLandingPageViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested expanded landing page view in full detail. + rpc GetExpandedLandingPageView(GetExpandedLandingPageViewRequest) returns (google.ads.googleads.v3.resources.ExpandedLandingPageView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/expandedLandingPageViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for +// [ExpandedLandingPageViewService.GetExpandedLandingPageView][google.ads.googleads.v3.services.ExpandedLandingPageViewService.GetExpandedLandingPageView]. +message GetExpandedLandingPageViewRequest { + // Required. The resource name of the expanded landing page view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ExpandedLandingPageView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/extension_feed_item_service.proto b/google/ads/googleads/v3/services/extension_feed_item_service.proto new file mode 100644 index 000000000..d505f023c --- /dev/null +++ b/google/ads/googleads/v3/services/extension_feed_item_service.proto @@ -0,0 +1,131 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/extension_feed_item.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionFeedItemServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the ExtensionFeedItem service. + +// Service to manage extension feed items. +service ExtensionFeedItemService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested extension feed item in full detail. + rpc GetExtensionFeedItem(GetExtensionFeedItemRequest) returns (google.ads.googleads.v3.resources.ExtensionFeedItem) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/extensionFeedItems/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes extension feed items. Operation + // statuses are returned. + rpc MutateExtensionFeedItems(MutateExtensionFeedItemsRequest) returns (MutateExtensionFeedItemsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/extensionFeedItems:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [ExtensionFeedItemService.GetExtensionFeedItem][google.ads.googleads.v3.services.ExtensionFeedItemService.GetExtensionFeedItem]. +message GetExtensionFeedItemRequest { + // Required. The resource name of the extension feed item to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ExtensionFeedItem" + } + ]; +} + +// Request message for [ExtensionFeedItemService.MutateExtensionFeedItems][google.ads.googleads.v3.services.ExtensionFeedItemService.MutateExtensionFeedItems]. +message MutateExtensionFeedItemsRequest { + // Required. The ID of the customer whose extension feed items are being + // modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual extension feed items. + repeated ExtensionFeedItemOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on an extension feed item. +message ExtensionFeedItemOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new extension + // feed item. + google.ads.googleads.v3.resources.ExtensionFeedItem create = 1; + + // Update operation: The extension feed item is expected to have a + // valid resource name. + google.ads.googleads.v3.resources.ExtensionFeedItem update = 2; + + // Remove operation: A resource name for the removed extension feed item + // is expected, in this format: + // + // `customers/{customer_id}/extensionFeedItems/{feed_item_id}` + string remove = 3; + } +} + +// Response message for an extension feed item mutate. +message MutateExtensionFeedItemsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateExtensionFeedItemResult results = 2; +} + +// The result for the extension feed item mutate. +message MutateExtensionFeedItemResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/feed_item_service.proto b/google/ads/googleads/v3/services/feed_item_service.proto new file mode 100644 index 000000000..a7b5525f0 --- /dev/null +++ b/google/ads/googleads/v3/services/feed_item_service.proto @@ -0,0 +1,129 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/feed_item.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the FeedItem service. + +// Service to manage feed items. +service FeedItemService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested feed item in full detail. + rpc GetFeedItem(GetFeedItemRequest) returns (google.ads.googleads.v3.resources.FeedItem) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/feedItems/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes feed items. Operation statuses are + // returned. + rpc MutateFeedItems(MutateFeedItemsRequest) returns (MutateFeedItemsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/feedItems:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [FeedItemService.GetFeedItem][google.ads.googleads.v3.services.FeedItemService.GetFeedItem]. +message GetFeedItemRequest { + // Required. The resource name of the feed item to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItem" + } + ]; +} + +// Request message for [FeedItemService.MutateFeedItems][google.ads.googleads.v3.services.FeedItemService.MutateFeedItems]. +message MutateFeedItemsRequest { + // Required. The ID of the customer whose feed items are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual feed items. + repeated FeedItemOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on an feed item. +message FeedItemOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new feed item. + google.ads.googleads.v3.resources.FeedItem create = 1; + + // Update operation: The feed item is expected to have a valid resource + // name. + google.ads.googleads.v3.resources.FeedItem update = 2; + + // Remove operation: A resource name for the removed feed item is + // expected, in this format: + // + // `customers/{customer_id}/feedItems/{feed_id}~{feed_item_id}` + string remove = 3; + } +} + +// Response message for an feed item mutate. +message MutateFeedItemsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateFeedItemResult results = 2; +} + +// The result for the feed item mutate. +message MutateFeedItemResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/feed_item_target_service.proto b/google/ads/googleads/v3/services/feed_item_target_service.proto new file mode 100644 index 000000000..ad135525e --- /dev/null +++ b/google/ads/googleads/v3/services/feed_item_target_service.proto @@ -0,0 +1,104 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/feed_item_target.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemTargetServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the FeedItemTarget service. + +// Service to manage feed item targets. +service FeedItemTargetService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested feed item targets in full detail. + rpc GetFeedItemTarget(GetFeedItemTargetRequest) returns (google.ads.googleads.v3.resources.FeedItemTarget) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/feedItemTargets/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates or removes feed item targets. Operation statuses are returned. + rpc MutateFeedItemTargets(MutateFeedItemTargetsRequest) returns (MutateFeedItemTargetsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/feedItemTargets:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [FeedItemTargetService.GetFeedItemTarget][google.ads.googleads.v3.services.FeedItemTargetService.GetFeedItemTarget]. +message GetFeedItemTargetRequest { + // Required. The resource name of the feed item targets to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedItemTarget" + } + ]; +} + +// Request message for [FeedItemTargetService.MutateFeedItemTargets][google.ads.googleads.v3.services.FeedItemTargetService.MutateFeedItemTargets]. +message MutateFeedItemTargetsRequest { + // Required. The ID of the customer whose feed item targets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual feed item targets. + repeated FeedItemTargetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A single operation (create, remove) on an feed item target. +message FeedItemTargetOperation { + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new feed item + // target. + google.ads.googleads.v3.resources.FeedItemTarget create = 1; + + // Remove operation: A resource name for the removed feed item target is + // expected, in this format: + // + // `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}` + string remove = 2; + } +} + +// Response message for an feed item target mutate. +message MutateFeedItemTargetsResponse { + // All results for the mutate. + repeated MutateFeedItemTargetResult results = 2; +} + +// The result for the feed item target mutate. +message MutateFeedItemTargetResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/feed_mapping_service.proto b/google/ads/googleads/v3/services/feed_mapping_service.proto new file mode 100644 index 000000000..02aeb34f5 --- /dev/null +++ b/google/ads/googleads/v3/services/feed_mapping_service.proto @@ -0,0 +1,121 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/feed_mapping.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "FeedMappingServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the FeedMapping service. + +// Service to manage feed mappings. +service FeedMappingService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested feed mapping in full detail. + rpc GetFeedMapping(GetFeedMappingRequest) returns (google.ads.googleads.v3.resources.FeedMapping) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/feedMappings/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates or removes feed mappings. Operation statuses are + // returned. + rpc MutateFeedMappings(MutateFeedMappingsRequest) returns (MutateFeedMappingsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/feedMappings:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [FeedMappingService.GetFeedMapping][google.ads.googleads.v3.services.FeedMappingService.GetFeedMapping]. +message GetFeedMappingRequest { + // Required. The resource name of the feed mapping to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedMapping" + } + ]; +} + +// Request message for [FeedMappingService.MutateFeedMappings][google.ads.googleads.v3.services.FeedMappingService.MutateFeedMappings]. +message MutateFeedMappingsRequest { + // Required. The ID of the customer whose feed mappings are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual feed mappings. + repeated FeedMappingOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, remove) on a feed mapping. +message FeedMappingOperation { + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new feed mapping. + google.ads.googleads.v3.resources.FeedMapping create = 1; + + // Remove operation: A resource name for the removed feed mapping is + // expected, in this format: + // + // `customers/{customer_id}/feedMappings/{feed_id}~{feed_mapping_id}` + string remove = 3; + } +} + +// Response message for a feed mapping mutate. +message MutateFeedMappingsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateFeedMappingResult results = 2; +} + +// The result for the feed mapping mutate. +message MutateFeedMappingResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/feed_placeholder_view_service.proto b/google/ads/googleads/v3/services/feed_placeholder_view_service.proto new file mode 100644 index 000000000..2936bf767 --- /dev/null +++ b/google/ads/googleads/v3/services/feed_placeholder_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/feed_placeholder_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "FeedPlaceholderViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the FeedPlaceholderView service. + +// Service to fetch feed placeholder views. +service FeedPlaceholderViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested feed placeholder view in full detail. + rpc GetFeedPlaceholderView(GetFeedPlaceholderViewRequest) returns (google.ads.googleads.v3.resources.FeedPlaceholderView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/feedPlaceholderViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [FeedPlaceholderViewService.GetFeedPlaceholderView][google.ads.googleads.v3.services.FeedPlaceholderViewService.GetFeedPlaceholderView]. +message GetFeedPlaceholderViewRequest { + // Required. The resource name of the feed placeholder view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/FeedPlaceholderView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/feed_service.proto b/google/ads/googleads/v3/services/feed_service.proto new file mode 100644 index 000000000..165a2c374 --- /dev/null +++ b/google/ads/googleads/v3/services/feed_service.proto @@ -0,0 +1,129 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/feed.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "FeedServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Feed service. + +// Service to manage feeds. +service FeedService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested feed in full detail. + rpc GetFeed(GetFeedRequest) returns (google.ads.googleads.v3.resources.Feed) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/feeds/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes feeds. Operation statuses are + // returned. + rpc MutateFeeds(MutateFeedsRequest) returns (MutateFeedsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/feeds:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [FeedService.GetFeed][google.ads.googleads.v3.services.FeedService.GetFeed]. +message GetFeedRequest { + // Required. The resource name of the feed to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Feed" + } + ]; +} + +// Request message for [FeedService.MutateFeeds][google.ads.googleads.v3.services.FeedService.MutateFeeds]. +message MutateFeedsRequest { + // Required. The ID of the customer whose feeds are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual feeds. + repeated FeedOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on an feed. +message FeedOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new feed. + google.ads.googleads.v3.resources.Feed create = 1; + + // Update operation: The feed is expected to have a valid resource + // name. + google.ads.googleads.v3.resources.Feed update = 2; + + // Remove operation: A resource name for the removed feed is + // expected, in this format: + // + // `customers/{customer_id}/feeds/{feed_id}` + string remove = 3; + } +} + +// Response message for an feed mutate. +message MutateFeedsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateFeedResult results = 2; +} + +// The result for the feed mutate. +message MutateFeedResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/gender_view_service.proto b/google/ads/googleads/v3/services/gender_view_service.proto new file mode 100644 index 000000000..69965c21a --- /dev/null +++ b/google/ads/googleads/v3/services/gender_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/gender_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "GenderViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Gender View service. + +// Service to manage gender views. +service GenderViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested gender view in full detail. + rpc GetGenderView(GetGenderViewRequest) returns (google.ads.googleads.v3.resources.GenderView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/genderViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [GenderViewService.GetGenderView][google.ads.googleads.v3.services.GenderViewService.GetGenderView]. +message GetGenderViewRequest { + // Required. The resource name of the gender view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GenderView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/geo_target_constant_service.proto b/google/ads/googleads/v3/services/geo_target_constant_service.proto new file mode 100644 index 000000000..f0088c409 --- /dev/null +++ b/google/ads/googleads/v3/services/geo_target_constant_service.proto @@ -0,0 +1,129 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/geo_target_constant.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "GeoTargetConstantServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Geo target constant service. + +// Service to fetch geo target constants. +service GeoTargetConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested geo target constant in full detail. + rpc GetGeoTargetConstant(GetGeoTargetConstantRequest) returns (google.ads.googleads.v3.resources.GeoTargetConstant) { + option (google.api.http) = { + get: "/v3/{resource_name=geoTargetConstants/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Returns GeoTargetConstant suggestions by location name or by resource name. + rpc SuggestGeoTargetConstants(SuggestGeoTargetConstantsRequest) returns (SuggestGeoTargetConstantsResponse) { + option (google.api.http) = { + post: "/v3/geoTargetConstants:suggest" + body: "*" + }; + } +} + +// Request message for [GeoTargetConstantService.GetGeoTargetConstant][google.ads.googleads.v3.services.GeoTargetConstantService.GetGeoTargetConstant]. +message GetGeoTargetConstantRequest { + // Required. The resource name of the geo target constant to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeoTargetConstant" + } + ]; +} + +// Request message for +// [GeoTargetConstantService.SuggestGeoTargetConstantsRequest][]. +message SuggestGeoTargetConstantsRequest { + // A list of location names. + message LocationNames { + // A list of location names. + repeated google.protobuf.StringValue names = 1; + } + + // A list of geo target constant resource names. + message GeoTargets { + // A list of geo target constant resource names. + repeated google.protobuf.StringValue geo_target_constants = 1; + } + + // If possible, returned geo targets are translated using this locale. If not, + // en is used by default. This is also used as a hint for returned geo + // targets. + google.protobuf.StringValue locale = 3; + + // Returned geo targets are restricted to this country code. + google.protobuf.StringValue country_code = 5; + + // Required. A selector of geo target constants. + oneof query { + // The location names to search by. At most 25 names can be set. + LocationNames location_names = 1; + + // The geo target constant resource names to filter by. + GeoTargets geo_targets = 2; + } +} + +// Response message for [GeoTargetConstantService.SuggestGeoTargetConstants][google.ads.googleads.v3.services.GeoTargetConstantService.SuggestGeoTargetConstants] +message SuggestGeoTargetConstantsResponse { + // Geo target constant suggestions. + repeated GeoTargetConstantSuggestion geo_target_constant_suggestions = 1; +} + +// A geo target constant suggestion. +message GeoTargetConstantSuggestion { + // The language this GeoTargetConstantSuggestion is currently translated to. + // It affects the name of geo target fields. For example, if locale=en, then + // name=Spain. If locale=es, then name=España. The default locale will be + // returned if no translation exists for the locale in the request. + google.protobuf.StringValue locale = 1; + + // Approximate user population that will be targeted, rounded to the + // nearest 100. + google.protobuf.Int64Value reach = 2; + + // If the request searched by location name, this is the location name that + // matched the geo target. + google.protobuf.StringValue search_term = 3; + + // The GeoTargetConstant result. + google.ads.googleads.v3.resources.GeoTargetConstant geo_target_constant = 4; + + // The list of parents of the geo target constant. + repeated google.ads.googleads.v3.resources.GeoTargetConstant geo_target_constant_parents = 5; +} diff --git a/google/ads/googleads/v3/services/geographic_view_service.proto b/google/ads/googleads/v3/services/geographic_view_service.proto new file mode 100644 index 000000000..a9f301c99 --- /dev/null +++ b/google/ads/googleads/v3/services/geographic_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/geographic_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "GeographicViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the GeographicViewService. + +// Service to manage geographic views. +service GeographicViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested geographic view in full detail. + rpc GetGeographicView(GetGeographicViewRequest) returns (google.ads.googleads.v3.resources.GeographicView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/geographicViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [GeographicViewService.GetGeographicView][google.ads.googleads.v3.services.GeographicViewService.GetGeographicView]. +message GetGeographicViewRequest { + // Required. The resource name of the geographic view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GeographicView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/google_ads_field_service.proto b/google/ads/googleads/v3/services/google_ads_field_service.proto new file mode 100644 index 000000000..04f4a7866 --- /dev/null +++ b/google/ads/googleads/v3/services/google_ads_field_service.proto @@ -0,0 +1,97 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/google_ads_field.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "GoogleAdsFieldServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the GoogleAdsFieldService + +// Service to fetch Google Ads API fields. +service GoogleAdsFieldService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns just the requested field. + rpc GetGoogleAdsField(GetGoogleAdsFieldRequest) returns (google.ads.googleads.v3.resources.GoogleAdsField) { + option (google.api.http) = { + get: "/v3/{resource_name=googleAdsFields/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Returns all fields that match the search query. + rpc SearchGoogleAdsFields(SearchGoogleAdsFieldsRequest) returns (SearchGoogleAdsFieldsResponse) { + option (google.api.http) = { + post: "/v3/googleAdsFields:search" + body: "*" + }; + option (google.api.method_signature) = "query"; + } +} + +// Request message for [GoogleAdsFieldService.GetGoogleAdsField][google.ads.googleads.v3.services.GoogleAdsFieldService.GetGoogleAdsField]. +message GetGoogleAdsFieldRequest { + // Required. The resource name of the field to get. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GoogleAdsField" + } + ]; +} + +// Request message for [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v3.services.GoogleAdsFieldService.SearchGoogleAdsFields]. +message SearchGoogleAdsFieldsRequest { + // Required. The query string. + string query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Token of the page to retrieve. If not specified, the first page of + // results will be returned. Use the value obtained from `next_page_token` + // in the previous response in order to request the next page of results. + string page_token = 2; + + // Number of elements to retrieve in a single page. + // When too large a page is requested, the server may decide to further + // limit the number of returned resources. + int32 page_size = 3; +} + +// Response message for [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v3.services.GoogleAdsFieldService.SearchGoogleAdsFields]. +message SearchGoogleAdsFieldsResponse { + // The list of fields that matched the query. + repeated google.ads.googleads.v3.resources.GoogleAdsField results = 1; + + // Pagination token used to retrieve the next page of results. Pass the + // content of this string as the `page_token` attribute of the next request. + // `next_page_token` is not returned for the last page. + string next_page_token = 2; + + // Total number of results that match the query ignoring the LIMIT clause. + int64 total_results_count = 3; +} diff --git a/google/ads/googleads/v3/services/google_ads_service.proto b/google/ads/googleads/v3/services/google_ads_service.proto new file mode 100644 index 000000000..44dc020c9 --- /dev/null +++ b/google/ads/googleads/v3/services/google_ads_service.proto @@ -0,0 +1,928 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/common/metrics.proto"; +import "google/ads/googleads/v3/common/segments.proto"; +import "google/ads/googleads/v3/enums/summary_row_setting.proto"; +import "google/ads/googleads/v3/resources/account_budget.proto"; +import "google/ads/googleads/v3/resources/account_budget_proposal.proto"; +import "google/ads/googleads/v3/resources/ad_group.proto"; +import "google/ads/googleads/v3/resources/ad_group_ad.proto"; +import "google/ads/googleads/v3/resources/ad_group_ad_asset_view.proto"; +import "google/ads/googleads/v3/resources/ad_group_ad_label.proto"; +import "google/ads/googleads/v3/resources/ad_group_audience_view.proto"; +import "google/ads/googleads/v3/resources/ad_group_bid_modifier.proto"; +import "google/ads/googleads/v3/resources/ad_group_criterion.proto"; +import "google/ads/googleads/v3/resources/ad_group_criterion_label.proto"; +import "google/ads/googleads/v3/resources/ad_group_criterion_simulation.proto"; +import "google/ads/googleads/v3/resources/ad_group_extension_setting.proto"; +import "google/ads/googleads/v3/resources/ad_group_feed.proto"; +import "google/ads/googleads/v3/resources/ad_group_label.proto"; +import "google/ads/googleads/v3/resources/ad_group_simulation.proto"; +import "google/ads/googleads/v3/resources/ad_parameter.proto"; +import "google/ads/googleads/v3/resources/ad_schedule_view.proto"; +import "google/ads/googleads/v3/resources/age_range_view.proto"; +import "google/ads/googleads/v3/resources/asset.proto"; +import "google/ads/googleads/v3/resources/bidding_strategy.proto"; +import "google/ads/googleads/v3/resources/billing_setup.proto"; +import "google/ads/googleads/v3/resources/campaign.proto"; +import "google/ads/googleads/v3/resources/campaign_audience_view.proto"; +import "google/ads/googleads/v3/resources/campaign_bid_modifier.proto"; +import "google/ads/googleads/v3/resources/campaign_budget.proto"; +import "google/ads/googleads/v3/resources/campaign_criterion.proto"; +import "google/ads/googleads/v3/resources/campaign_criterion_simulation.proto"; +import "google/ads/googleads/v3/resources/campaign_draft.proto"; +import "google/ads/googleads/v3/resources/campaign_experiment.proto"; +import "google/ads/googleads/v3/resources/campaign_extension_setting.proto"; +import "google/ads/googleads/v3/resources/campaign_feed.proto"; +import "google/ads/googleads/v3/resources/campaign_label.proto"; +import "google/ads/googleads/v3/resources/campaign_shared_set.proto"; +import "google/ads/googleads/v3/resources/carrier_constant.proto"; +import "google/ads/googleads/v3/resources/change_status.proto"; +import "google/ads/googleads/v3/resources/click_view.proto"; +import "google/ads/googleads/v3/resources/conversion_action.proto"; +import "google/ads/googleads/v3/resources/currency_constant.proto"; +import "google/ads/googleads/v3/resources/custom_interest.proto"; +import "google/ads/googleads/v3/resources/customer.proto"; +import "google/ads/googleads/v3/resources/customer_client.proto"; +import "google/ads/googleads/v3/resources/customer_client_link.proto"; +import "google/ads/googleads/v3/resources/customer_extension_setting.proto"; +import "google/ads/googleads/v3/resources/customer_feed.proto"; +import "google/ads/googleads/v3/resources/customer_label.proto"; +import "google/ads/googleads/v3/resources/customer_manager_link.proto"; +import "google/ads/googleads/v3/resources/customer_negative_criterion.proto"; +import "google/ads/googleads/v3/resources/detail_placement_view.proto"; +import "google/ads/googleads/v3/resources/display_keyword_view.proto"; +import "google/ads/googleads/v3/resources/distance_view.proto"; +import "google/ads/googleads/v3/resources/domain_category.proto"; +import "google/ads/googleads/v3/resources/dynamic_search_ads_search_term_view.proto"; +import "google/ads/googleads/v3/resources/expanded_landing_page_view.proto"; +import "google/ads/googleads/v3/resources/extension_feed_item.proto"; +import "google/ads/googleads/v3/resources/feed.proto"; +import "google/ads/googleads/v3/resources/feed_item.proto"; +import "google/ads/googleads/v3/resources/feed_item_target.proto"; +import "google/ads/googleads/v3/resources/feed_mapping.proto"; +import "google/ads/googleads/v3/resources/feed_placeholder_view.proto"; +import "google/ads/googleads/v3/resources/gender_view.proto"; +import "google/ads/googleads/v3/resources/geo_target_constant.proto"; +import "google/ads/googleads/v3/resources/geographic_view.proto"; +import "google/ads/googleads/v3/resources/group_placement_view.proto"; +import "google/ads/googleads/v3/resources/hotel_group_view.proto"; +import "google/ads/googleads/v3/resources/hotel_performance_view.proto"; +import "google/ads/googleads/v3/resources/keyword_plan.proto"; +import "google/ads/googleads/v3/resources/keyword_plan_ad_group.proto"; +import "google/ads/googleads/v3/resources/keyword_plan_campaign.proto"; +import "google/ads/googleads/v3/resources/keyword_plan_keyword.proto"; +import "google/ads/googleads/v3/resources/keyword_plan_negative_keyword.proto"; +import "google/ads/googleads/v3/resources/keyword_view.proto"; +import "google/ads/googleads/v3/resources/label.proto"; +import "google/ads/googleads/v3/resources/landing_page_view.proto"; +import "google/ads/googleads/v3/resources/language_constant.proto"; +import "google/ads/googleads/v3/resources/location_view.proto"; +import "google/ads/googleads/v3/resources/managed_placement_view.proto"; +import "google/ads/googleads/v3/resources/media_file.proto"; +import "google/ads/googleads/v3/resources/mobile_app_category_constant.proto"; +import "google/ads/googleads/v3/resources/mobile_device_constant.proto"; +import "google/ads/googleads/v3/resources/mutate_job.proto"; +import "google/ads/googleads/v3/resources/offline_user_data_job.proto"; +import "google/ads/googleads/v3/resources/operating_system_version_constant.proto"; +import "google/ads/googleads/v3/resources/paid_organic_search_term_view.proto"; +import "google/ads/googleads/v3/resources/parental_status_view.proto"; +import "google/ads/googleads/v3/resources/product_bidding_category_constant.proto"; +import "google/ads/googleads/v3/resources/product_group_view.proto"; +import "google/ads/googleads/v3/resources/recommendation.proto"; +import "google/ads/googleads/v3/resources/remarketing_action.proto"; +import "google/ads/googleads/v3/resources/search_term_view.proto"; +import "google/ads/googleads/v3/resources/shared_criterion.proto"; +import "google/ads/googleads/v3/resources/shared_set.proto"; +import "google/ads/googleads/v3/resources/shopping_performance_view.proto"; +import "google/ads/googleads/v3/resources/topic_constant.proto"; +import "google/ads/googleads/v3/resources/topic_view.proto"; +import "google/ads/googleads/v3/resources/user_interest.proto"; +import "google/ads/googleads/v3/resources/user_list.proto"; +import "google/ads/googleads/v3/resources/user_location_view.proto"; +import "google/ads/googleads/v3/resources/video.proto"; +import "google/ads/googleads/v3/services/ad_group_ad_label_service.proto"; +import "google/ads/googleads/v3/services/ad_group_ad_service.proto"; +import "google/ads/googleads/v3/services/ad_group_bid_modifier_service.proto"; +import "google/ads/googleads/v3/services/ad_group_criterion_label_service.proto"; +import "google/ads/googleads/v3/services/ad_group_criterion_service.proto"; +import "google/ads/googleads/v3/services/ad_group_extension_setting_service.proto"; +import "google/ads/googleads/v3/services/ad_group_feed_service.proto"; +import "google/ads/googleads/v3/services/ad_group_label_service.proto"; +import "google/ads/googleads/v3/services/ad_group_service.proto"; +import "google/ads/googleads/v3/services/ad_parameter_service.proto"; +import "google/ads/googleads/v3/services/ad_service.proto"; +import "google/ads/googleads/v3/services/asset_service.proto"; +import "google/ads/googleads/v3/services/bidding_strategy_service.proto"; +import "google/ads/googleads/v3/services/campaign_bid_modifier_service.proto"; +import "google/ads/googleads/v3/services/campaign_budget_service.proto"; +import "google/ads/googleads/v3/services/campaign_criterion_service.proto"; +import "google/ads/googleads/v3/services/campaign_draft_service.proto"; +import "google/ads/googleads/v3/services/campaign_experiment_service.proto"; +import "google/ads/googleads/v3/services/campaign_extension_setting_service.proto"; +import "google/ads/googleads/v3/services/campaign_feed_service.proto"; +import "google/ads/googleads/v3/services/campaign_label_service.proto"; +import "google/ads/googleads/v3/services/campaign_service.proto"; +import "google/ads/googleads/v3/services/campaign_shared_set_service.proto"; +import "google/ads/googleads/v3/services/conversion_action_service.proto"; +import "google/ads/googleads/v3/services/customer_extension_setting_service.proto"; +import "google/ads/googleads/v3/services/customer_feed_service.proto"; +import "google/ads/googleads/v3/services/customer_label_service.proto"; +import "google/ads/googleads/v3/services/customer_negative_criterion_service.proto"; +import "google/ads/googleads/v3/services/customer_service.proto"; +import "google/ads/googleads/v3/services/extension_feed_item_service.proto"; +import "google/ads/googleads/v3/services/feed_item_service.proto"; +import "google/ads/googleads/v3/services/feed_item_target_service.proto"; +import "google/ads/googleads/v3/services/feed_mapping_service.proto"; +import "google/ads/googleads/v3/services/feed_service.proto"; +import "google/ads/googleads/v3/services/label_service.proto"; +import "google/ads/googleads/v3/services/media_file_service.proto"; +import "google/ads/googleads/v3/services/remarketing_action_service.proto"; +import "google/ads/googleads/v3/services/shared_criterion_service.proto"; +import "google/ads/googleads/v3/services/shared_set_service.proto"; +import "google/ads/googleads/v3/services/user_list_service.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "GoogleAdsServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the GoogleAdsService. + +// Service to fetch data and metrics across resources. +service GoogleAdsService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns all rows that match the search query. + rpc Search(SearchGoogleAdsRequest) returns (SearchGoogleAdsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/googleAds:search" + body: "*" + }; + option (google.api.method_signature) = "customer_id,query"; + } + + // Returns all rows that match the search stream query. + rpc SearchStream(SearchGoogleAdsStreamRequest) returns (stream SearchGoogleAdsStreamResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/googleAds:searchStream" + body: "*" + }; + option (google.api.method_signature) = "customer_id,query"; + } + + // Creates, updates, or removes resources. This method supports atomic + // transactions with multiple types of resources. For example, you can + // atomically create a campaign and a campaign budget, or perform up to + // thousands of mutates atomically. + // + // This method is essentially a wrapper around a series of mutate methods. The + // only features it offers over calling those methods directly are: + // + // - Atomic transactions + // - Temp resource names (described below) + // - Somewhat reduced latency over making a series of mutate calls + // + // Note: Only resources that support atomic transactions are included, so this + // method can't replace all calls to individual services. + // + // ## Atomic Transaction Benefits + // + // Atomicity makes error handling much easier. If you're making a series of + // changes and one fails, it can leave your account in an inconsistent state. + // With atomicity, you either reach the desired state directly, or the request + // fails and you can retry. + // + // ## Temp Resource Names + // + // Temp resource names are a special type of resource name used to create a + // resource and reference that resource in the same request. For example, if a + // campaign budget is created with `resource_name` equal to + // `customers/123/campaignBudgets/-1`, that resource name can be reused in + // the `Campaign.budget` field in the same request. That way, the two + // resources are created and linked atomically. + // + // To create a temp resource name, put a negative number in the part of the + // name that the server would normally allocate. + // + // Note: + // + // - Resources must be created with a temp name before the name can be reused. + // For example, the previous CampaignBudget+Campaign example would fail if + // the mutate order was reversed. + // - Temp names are not remembered across requests. + // - There's no limit to the number of temp names in a request. + // - Each temp name must use a unique negative number, even if the resource + // types differ. + // + // ## Latency + // + // It's important to group mutates by resource type or the request may time + // out and fail. Latency is roughly equal to a series of calls to individual + // mutate methods, where each change in resource type is a new call. For + // example, mutating 10 campaigns then 10 ad groups is like 2 calls, while + // mutating 1 campaign, 1 ad group, 1 campaign, 1 ad group is like 4 calls. + rpc Mutate(MutateGoogleAdsRequest) returns (MutateGoogleAdsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/googleAds:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,mutate_operations"; + } +} + +// Request message for [GoogleAdsService.Search][google.ads.googleads.v3.services.GoogleAdsService.Search]. +message SearchGoogleAdsRequest { + // Required. The ID of the customer being queried. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The query string. + string query = 2 [(google.api.field_behavior) = REQUIRED]; + + // Token of the page to retrieve. If not specified, the first + // page of results will be returned. Use the value obtained from + // `next_page_token` in the previous response in order to request + // the next page of results. + string page_token = 3; + + // Number of elements to retrieve in a single page. + // When too large a page is requested, the server may decide to + // further limit the number of returned resources. + int32 page_size = 4; + + // If true, the request is validated but not executed. + bool validate_only = 5; + + // If true, the total number of results that match the query ignoring the + // LIMIT clause will be included in the response. + // Default is false. + bool return_total_results_count = 7; + + // Determines whether a summary row will be returned. By default, summary row + // is not returned. If requested, the summary row will be sent in a response + // by itself after all other query results are returned. + google.ads.googleads.v3.enums.SummaryRowSettingEnum.SummaryRowSetting summary_row_setting = 8; +} + +// Response message for [GoogleAdsService.Search][google.ads.googleads.v3.services.GoogleAdsService.Search]. +message SearchGoogleAdsResponse { + // The list of rows that matched the query. + repeated GoogleAdsRow results = 1; + + // Pagination token used to retrieve the next page of results. + // Pass the content of this string as the `page_token` attribute of + // the next request. `next_page_token` is not returned for the last + // page. + string next_page_token = 2; + + // Total number of results that match the query ignoring the LIMIT + // clause. + int64 total_results_count = 3; + + // FieldMask that represents what fields were requested by the user. + google.protobuf.FieldMask field_mask = 5; + + // Summary row that contains summary of metrics in results. + // Summary of metrics means aggregation of metrics across all results, + // here aggregation could be sum, average, rate, etc. + GoogleAdsRow summary_row = 6; +} + +// Request message for [GoogleAdsService.SearchStream][google.ads.googleads.v3.services.GoogleAdsService.SearchStream]. +message SearchGoogleAdsStreamRequest { + // Required. The ID of the customer being queried. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The query string. + string query = 2 [(google.api.field_behavior) = REQUIRED]; + + // Determines whether a summary row will be returned. By default, summary row + // is not returned. If requested, the summary row will be sent in a response + // by itself after all other query results are returned. + google.ads.googleads.v3.enums.SummaryRowSettingEnum.SummaryRowSetting summary_row_setting = 3; +} + +// Response message for [GoogleAdsService.SearchStream][google.ads.googleads.v3.services.GoogleAdsService.SearchStream]. +message SearchGoogleAdsStreamResponse { + // The list of rows that matched the query. + repeated GoogleAdsRow results = 1; + + // FieldMask that represents what fields were requested by the user. + google.protobuf.FieldMask field_mask = 2; + + // Summary row that contains summary of metrics in results. + // Summary of metrics means aggregation of metrics across all results, + // here aggregation could be sum, average, rate, etc. + GoogleAdsRow summary_row = 3; +} + +// A returned row from the query. +message GoogleAdsRow { + // The account budget in the query. + google.ads.googleads.v3.resources.AccountBudget account_budget = 42; + + // The account budget proposal referenced in the query. + google.ads.googleads.v3.resources.AccountBudgetProposal account_budget_proposal = 43; + + // The ad group referenced in the query. + google.ads.googleads.v3.resources.AdGroup ad_group = 3; + + // The ad referenced in the query. + google.ads.googleads.v3.resources.AdGroupAd ad_group_ad = 16; + + // The ad group ad asset view in the query. + google.ads.googleads.v3.resources.AdGroupAdAssetView ad_group_ad_asset_view = 131; + + // The ad group ad label referenced in the query. + google.ads.googleads.v3.resources.AdGroupAdLabel ad_group_ad_label = 120; + + // The ad group audience view referenced in the query. + google.ads.googleads.v3.resources.AdGroupAudienceView ad_group_audience_view = 57; + + // The bid modifier referenced in the query. + google.ads.googleads.v3.resources.AdGroupBidModifier ad_group_bid_modifier = 24; + + // The criterion referenced in the query. + google.ads.googleads.v3.resources.AdGroupCriterion ad_group_criterion = 17; + + // The ad group criterion label referenced in the query. + google.ads.googleads.v3.resources.AdGroupCriterionLabel ad_group_criterion_label = 121; + + // The ad group criterion simulation referenced in the query. + google.ads.googleads.v3.resources.AdGroupCriterionSimulation ad_group_criterion_simulation = 110; + + // The ad group extension setting referenced in the query. + google.ads.googleads.v3.resources.AdGroupExtensionSetting ad_group_extension_setting = 112; + + // The ad group feed referenced in the query. + google.ads.googleads.v3.resources.AdGroupFeed ad_group_feed = 67; + + // The ad group label referenced in the query. + google.ads.googleads.v3.resources.AdGroupLabel ad_group_label = 115; + + // The ad group simulation referenced in the query. + google.ads.googleads.v3.resources.AdGroupSimulation ad_group_simulation = 107; + + // The ad parameter referenced in the query. + google.ads.googleads.v3.resources.AdParameter ad_parameter = 130; + + // The age range view referenced in the query. + google.ads.googleads.v3.resources.AgeRangeView age_range_view = 48; + + // The ad schedule view referenced in the query. + google.ads.googleads.v3.resources.AdScheduleView ad_schedule_view = 89; + + // The domain category referenced in the query. + google.ads.googleads.v3.resources.DomainCategory domain_category = 91; + + // The asset referenced in the query. + google.ads.googleads.v3.resources.Asset asset = 105; + + // The bidding strategy referenced in the query. + google.ads.googleads.v3.resources.BiddingStrategy bidding_strategy = 18; + + // The billing setup referenced in the query. + google.ads.googleads.v3.resources.BillingSetup billing_setup = 41; + + // The campaign budget referenced in the query. + google.ads.googleads.v3.resources.CampaignBudget campaign_budget = 19; + + // The campaign referenced in the query. + google.ads.googleads.v3.resources.Campaign campaign = 2; + + // The campaign audience view referenced in the query. + google.ads.googleads.v3.resources.CampaignAudienceView campaign_audience_view = 69; + + // The campaign bid modifier referenced in the query. + google.ads.googleads.v3.resources.CampaignBidModifier campaign_bid_modifier = 26; + + // The campaign criterion referenced in the query. + google.ads.googleads.v3.resources.CampaignCriterion campaign_criterion = 20; + + // The campaign criterion simulation referenced in the query. + google.ads.googleads.v3.resources.CampaignCriterionSimulation campaign_criterion_simulation = 111; + + // The campaign draft referenced in the query. + google.ads.googleads.v3.resources.CampaignDraft campaign_draft = 49; + + // The campaign experiment referenced in the query. + google.ads.googleads.v3.resources.CampaignExperiment campaign_experiment = 84; + + // The campaign extension setting referenced in the query. + google.ads.googleads.v3.resources.CampaignExtensionSetting campaign_extension_setting = 113; + + // The campaign feed referenced in the query. + google.ads.googleads.v3.resources.CampaignFeed campaign_feed = 63; + + // The campaign label referenced in the query. + google.ads.googleads.v3.resources.CampaignLabel campaign_label = 108; + + // Campaign Shared Set referenced in AWQL query. + google.ads.googleads.v3.resources.CampaignSharedSet campaign_shared_set = 30; + + // The carrier constant referenced in the query. + google.ads.googleads.v3.resources.CarrierConstant carrier_constant = 66; + + // The ChangeStatus referenced in the query. + google.ads.googleads.v3.resources.ChangeStatus change_status = 37; + + // The conversion action referenced in the query. + google.ads.googleads.v3.resources.ConversionAction conversion_action = 103; + + // The ClickView referenced in the query. + google.ads.googleads.v3.resources.ClickView click_view = 122; + + // The currency constant referenced in the query. + google.ads.googleads.v3.resources.CurrencyConstant currency_constant = 134; + + // The CustomInterest referenced in the query. + google.ads.googleads.v3.resources.CustomInterest custom_interest = 104; + + // The customer referenced in the query. + google.ads.googleads.v3.resources.Customer customer = 1; + + // The CustomerManagerLink referenced in the query. + google.ads.googleads.v3.resources.CustomerManagerLink customer_manager_link = 61; + + // The CustomerClientLink referenced in the query. + google.ads.googleads.v3.resources.CustomerClientLink customer_client_link = 62; + + // The CustomerClient referenced in the query. + google.ads.googleads.v3.resources.CustomerClient customer_client = 70; + + // The customer extension setting referenced in the query. + google.ads.googleads.v3.resources.CustomerExtensionSetting customer_extension_setting = 114; + + // The customer feed referenced in the query. + google.ads.googleads.v3.resources.CustomerFeed customer_feed = 64; + + // The customer label referenced in the query. + google.ads.googleads.v3.resources.CustomerLabel customer_label = 124; + + // The customer negative criterion referenced in the query. + google.ads.googleads.v3.resources.CustomerNegativeCriterion customer_negative_criterion = 88; + + // The detail placement view referenced in the query. + google.ads.googleads.v3.resources.DetailPlacementView detail_placement_view = 118; + + // The display keyword view referenced in the query. + google.ads.googleads.v3.resources.DisplayKeywordView display_keyword_view = 47; + + // The distance view referenced in the query. + google.ads.googleads.v3.resources.DistanceView distance_view = 132; + + // The dynamic search ads search term view referenced in the query. + google.ads.googleads.v3.resources.DynamicSearchAdsSearchTermView dynamic_search_ads_search_term_view = 106; + + // The expanded landing page view referenced in the query. + google.ads.googleads.v3.resources.ExpandedLandingPageView expanded_landing_page_view = 128; + + // The extension feed item referenced in the query. + google.ads.googleads.v3.resources.ExtensionFeedItem extension_feed_item = 85; + + // The feed referenced in the query. + google.ads.googleads.v3.resources.Feed feed = 46; + + // The feed item referenced in the query. + google.ads.googleads.v3.resources.FeedItem feed_item = 50; + + // The feed item target referenced in the query. + google.ads.googleads.v3.resources.FeedItemTarget feed_item_target = 116; + + // The feed mapping referenced in the query. + google.ads.googleads.v3.resources.FeedMapping feed_mapping = 58; + + // The feed placeholder view referenced in the query. + google.ads.googleads.v3.resources.FeedPlaceholderView feed_placeholder_view = 97; + + // The gender view referenced in the query. + google.ads.googleads.v3.resources.GenderView gender_view = 40; + + // The geo target constant referenced in the query. + google.ads.googleads.v3.resources.GeoTargetConstant geo_target_constant = 23; + + // The geographic view referenced in the query. + google.ads.googleads.v3.resources.GeographicView geographic_view = 125; + + // The group placement view referenced in the query. + google.ads.googleads.v3.resources.GroupPlacementView group_placement_view = 119; + + // The hotel group view referenced in the query. + google.ads.googleads.v3.resources.HotelGroupView hotel_group_view = 51; + + // The hotel performance view referenced in the query. + google.ads.googleads.v3.resources.HotelPerformanceView hotel_performance_view = 71; + + // The keyword view referenced in the query. + google.ads.googleads.v3.resources.KeywordView keyword_view = 21; + + // The keyword plan referenced in the query. + google.ads.googleads.v3.resources.KeywordPlan keyword_plan = 32; + + // The keyword plan campaign referenced in the query. + google.ads.googleads.v3.resources.KeywordPlanCampaign keyword_plan_campaign = 33; + + // The keyword plan negative keyword referenced in the query. + google.ads.googleads.v3.resources.KeywordPlanNegativeKeyword keyword_plan_negative_keyword = 34; + + // The keyword plan ad group referenced in the query. + google.ads.googleads.v3.resources.KeywordPlanAdGroup keyword_plan_ad_group = 35; + + // The keyword plan keyword referenced in the query. + google.ads.googleads.v3.resources.KeywordPlanKeyword keyword_plan_keyword = 36; + + // The label referenced in the query. + google.ads.googleads.v3.resources.Label label = 52; + + // The landing page view referenced in the query. + google.ads.googleads.v3.resources.LandingPageView landing_page_view = 126; + + // The language constant referenced in the query. + google.ads.googleads.v3.resources.LanguageConstant language_constant = 55; + + // The location view referenced in the query. + google.ads.googleads.v3.resources.LocationView location_view = 123; + + // The managed placement view referenced in the query. + google.ads.googleads.v3.resources.ManagedPlacementView managed_placement_view = 53; + + // The media file referenced in the query. + google.ads.googleads.v3.resources.MediaFile media_file = 90; + + // The mobile app category constant referenced in the query. + google.ads.googleads.v3.resources.MobileAppCategoryConstant mobile_app_category_constant = 87; + + // The mobile device constant referenced in the query. + google.ads.googleads.v3.resources.MobileDeviceConstant mobile_device_constant = 98; + + // The mutate job referenced in the query. + google.ads.googleads.v3.resources.MutateJob mutate_job = 127; + + // The offline user data job referenced in the query. + google.ads.googleads.v3.resources.OfflineUserDataJob offline_user_data_job = 137; + + // The operating system version constant referenced in the query. + google.ads.googleads.v3.resources.OperatingSystemVersionConstant operating_system_version_constant = 86; + + // The paid organic search term view referenced in the query. + google.ads.googleads.v3.resources.PaidOrganicSearchTermView paid_organic_search_term_view = 129; + + // The parental status view referenced in the query. + google.ads.googleads.v3.resources.ParentalStatusView parental_status_view = 45; + + // The Product Bidding Category referenced in the query. + google.ads.googleads.v3.resources.ProductBiddingCategoryConstant product_bidding_category_constant = 109; + + // The product group view referenced in the query. + google.ads.googleads.v3.resources.ProductGroupView product_group_view = 54; + + // The recommendation referenced in the query. + google.ads.googleads.v3.resources.Recommendation recommendation = 22; + + // The search term view referenced in the query. + google.ads.googleads.v3.resources.SearchTermView search_term_view = 68; + + // The shared set referenced in the query. + google.ads.googleads.v3.resources.SharedCriterion shared_criterion = 29; + + // The shared set referenced in the query. + google.ads.googleads.v3.resources.SharedSet shared_set = 27; + + // The shopping performance view referenced in the query. + google.ads.googleads.v3.resources.ShoppingPerformanceView shopping_performance_view = 117; + + // The topic view referenced in the query. + google.ads.googleads.v3.resources.TopicView topic_view = 44; + + // The user interest referenced in the query. + google.ads.googleads.v3.resources.UserInterest user_interest = 59; + + // The user list referenced in the query. + google.ads.googleads.v3.resources.UserList user_list = 38; + + // The user location view referenced in the query. + google.ads.googleads.v3.resources.UserLocationView user_location_view = 135; + + // The remarketing action referenced in the query. + google.ads.googleads.v3.resources.RemarketingAction remarketing_action = 60; + + // The topic constant referenced in the query. + google.ads.googleads.v3.resources.TopicConstant topic_constant = 31; + + // The video referenced in the query. + google.ads.googleads.v3.resources.Video video = 39; + + // The metrics. + google.ads.googleads.v3.common.Metrics metrics = 4; + + // The segments. + google.ads.googleads.v3.common.Segments segments = 102; +} + +// Request message for [GoogleAdsService.Mutate][google.ads.googleads.v3.services.GoogleAdsService.Mutate]. +message MutateGoogleAdsRequest { + // Required. The ID of the customer whose resources are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual resources. + repeated MutateOperation mutate_operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// Response message for [GoogleAdsService.Mutate][google.ads.googleads.v3.services.GoogleAdsService.Mutate]. +message MutateGoogleAdsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g., auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All responses for the mutate. + repeated MutateOperationResponse mutate_operation_responses = 1; +} + +// A single operation (create, update, remove) on a resource. +message MutateOperation { + // The mutate operation. + oneof operation { + // An ad group ad label mutate operation. + AdGroupAdLabelOperation ad_group_ad_label_operation = 17; + + // An ad group ad mutate operation. + AdGroupAdOperation ad_group_ad_operation = 1; + + // An ad group bid modifier mutate operation. + AdGroupBidModifierOperation ad_group_bid_modifier_operation = 2; + + // An ad group criterion label mutate operation. + AdGroupCriterionLabelOperation ad_group_criterion_label_operation = 18; + + // An ad group criterion mutate operation. + AdGroupCriterionOperation ad_group_criterion_operation = 3; + + // An ad group extension setting mutate operation. + AdGroupExtensionSettingOperation ad_group_extension_setting_operation = 19; + + // An ad group feed mutate operation. + AdGroupFeedOperation ad_group_feed_operation = 20; + + // An ad group label mutate operation. + AdGroupLabelOperation ad_group_label_operation = 21; + + // An ad group mutate operation. + AdGroupOperation ad_group_operation = 5; + + // An ad mutate operation. + AdOperation ad_operation = 49; + + // An ad parameter mutate operation. + AdParameterOperation ad_parameter_operation = 22; + + // An asset mutate operation. + AssetOperation asset_operation = 23; + + // A bidding strategy mutate operation. + BiddingStrategyOperation bidding_strategy_operation = 6; + + // A campaign bid modifier mutate operation. + CampaignBidModifierOperation campaign_bid_modifier_operation = 7; + + // A campaign budget mutate operation. + CampaignBudgetOperation campaign_budget_operation = 8; + + // A campaign criterion mutate operation. + CampaignCriterionOperation campaign_criterion_operation = 13; + + // A campaign draft mutate operation. + CampaignDraftOperation campaign_draft_operation = 24; + + // A campaign experiment mutate operation. + CampaignExperimentOperation campaign_experiment_operation = 25; + + // A campaign extension setting mutate operation. + CampaignExtensionSettingOperation campaign_extension_setting_operation = 26; + + // A campaign feed mutate operation. + CampaignFeedOperation campaign_feed_operation = 27; + + // A campaign label mutate operation. + CampaignLabelOperation campaign_label_operation = 28; + + // A campaign mutate operation. + CampaignOperation campaign_operation = 10; + + // A campaign shared set mutate operation. + CampaignSharedSetOperation campaign_shared_set_operation = 11; + + // A conversion action mutate operation. + ConversionActionOperation conversion_action_operation = 12; + + // A customer extension setting mutate operation. + CustomerExtensionSettingOperation customer_extension_setting_operation = 30; + + // A customer feed mutate operation. + CustomerFeedOperation customer_feed_operation = 31; + + // A customer label mutate operation. + CustomerLabelOperation customer_label_operation = 32; + + // A customer negative criterion mutate operation. + CustomerNegativeCriterionOperation customer_negative_criterion_operation = 34; + + // A customer mutate operation. + CustomerOperation customer_operation = 35; + + // An extension feed item mutate operation. + ExtensionFeedItemOperation extension_feed_item_operation = 36; + + // A feed item mutate operation. + FeedItemOperation feed_item_operation = 37; + + // A feed item target mutate operation. + FeedItemTargetOperation feed_item_target_operation = 38; + + // A feed mapping mutate operation. + FeedMappingOperation feed_mapping_operation = 39; + + // A feed mutate operation. + FeedOperation feed_operation = 40; + + // A label mutate operation. + LabelOperation label_operation = 41; + + // A media file mutate operation. + MediaFileOperation media_file_operation = 42; + + // A remarketing action mutate operation. + RemarketingActionOperation remarketing_action_operation = 43; + + // A shared criterion mutate operation. + SharedCriterionOperation shared_criterion_operation = 14; + + // A shared set mutate operation. + SharedSetOperation shared_set_operation = 15; + + // A user list mutate operation. + UserListOperation user_list_operation = 16; + } +} + +// Response message for the resource mutate. +message MutateOperationResponse { + // The mutate response. + oneof response { + // The result for the ad group ad label mutate. + MutateAdGroupAdLabelResult ad_group_ad_label_result = 17; + + // The result for the ad group ad mutate. + MutateAdGroupAdResult ad_group_ad_result = 1; + + // The result for the ad group bid modifier mutate. + MutateAdGroupBidModifierResult ad_group_bid_modifier_result = 2; + + // The result for the ad group criterion label mutate. + MutateAdGroupCriterionLabelResult ad_group_criterion_label_result = 18; + + // The result for the ad group criterion mutate. + MutateAdGroupCriterionResult ad_group_criterion_result = 3; + + // The result for the ad group extension setting mutate. + MutateAdGroupExtensionSettingResult ad_group_extension_setting_result = 19; + + // The result for the ad group feed mutate. + MutateAdGroupFeedResult ad_group_feed_result = 20; + + // The result for the ad group label mutate. + MutateAdGroupLabelResult ad_group_label_result = 21; + + // The result for the ad group mutate. + MutateAdGroupResult ad_group_result = 5; + + // The result for the ad parameter mutate. + MutateAdParameterResult ad_parameter_result = 22; + + // The result for the ad mutate. + MutateAdResult ad_result = 49; + + // The result for the asset mutate. + MutateAssetResult asset_result = 23; + + // The result for the bidding strategy mutate. + MutateBiddingStrategyResult bidding_strategy_result = 6; + + // The result for the campaign bid modifier mutate. + MutateCampaignBidModifierResult campaign_bid_modifier_result = 7; + + // The result for the campaign budget mutate. + MutateCampaignBudgetResult campaign_budget_result = 8; + + // The result for the campaign criterion mutate. + MutateCampaignCriterionResult campaign_criterion_result = 13; + + // The result for the campaign draft mutate. + MutateCampaignDraftResult campaign_draft_result = 24; + + // The result for the campaign experiment mutate. + MutateCampaignExperimentResult campaign_experiment_result = 25; + + // The result for the campaign extension setting mutate. + MutateCampaignExtensionSettingResult campaign_extension_setting_result = 26; + + // The result for the campaign feed mutate. + MutateCampaignFeedResult campaign_feed_result = 27; + + // The result for the campaign label mutate. + MutateCampaignLabelResult campaign_label_result = 28; + + // The result for the campaign mutate. + MutateCampaignResult campaign_result = 10; + + // The result for the campaign shared set mutate. + MutateCampaignSharedSetResult campaign_shared_set_result = 11; + + // The result for the conversion action mutate. + MutateConversionActionResult conversion_action_result = 12; + + // The result for the customer extension setting mutate. + MutateCustomerExtensionSettingResult customer_extension_setting_result = 30; + + // The result for the customer feed mutate. + MutateCustomerFeedResult customer_feed_result = 31; + + // The result for the customer label mutate. + MutateCustomerLabelResult customer_label_result = 32; + + // The result for the customer negative criterion mutate. + MutateCustomerNegativeCriteriaResult customer_negative_criterion_result = 34; + + // The result for the customer mutate. + MutateCustomerResult customer_result = 35; + + // The result for the extension feed item mutate. + MutateExtensionFeedItemResult extension_feed_item_result = 36; + + // The result for the feed item mutate. + MutateFeedItemResult feed_item_result = 37; + + // The result for the feed item target mutate. + MutateFeedItemTargetResult feed_item_target_result = 38; + + // The result for the feed mapping mutate. + MutateFeedMappingResult feed_mapping_result = 39; + + // The result for the feed mutate. + MutateFeedResult feed_result = 40; + + // The result for the label mutate. + MutateLabelResult label_result = 41; + + // The result for the media file mutate. + MutateMediaFileResult media_file_result = 42; + + // The result for the remarketing action mutate. + MutateRemarketingActionResult remarketing_action_result = 43; + + // The result for the shared criterion mutate. + MutateSharedCriterionResult shared_criterion_result = 14; + + // The result for the shared set mutate. + MutateSharedSetResult shared_set_result = 15; + + // The result for the user list mutate. + MutateUserListResult user_list_result = 16; + } +} diff --git a/google/ads/googleads/v3/services/group_placement_view_service.proto b/google/ads/googleads/v3/services/group_placement_view_service.proto new file mode 100644 index 000000000..0f8a3a668 --- /dev/null +++ b/google/ads/googleads/v3/services/group_placement_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/group_placement_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "GroupPlacementViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Group Placement View service. + +// Service to fetch Group Placement views. +service GroupPlacementViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested Group Placement view in full detail. + rpc GetGroupPlacementView(GetGroupPlacementViewRequest) returns (google.ads.googleads.v3.resources.GroupPlacementView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/groupPlacementViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [GroupPlacementViewService.GetGroupPlacementView][google.ads.googleads.v3.services.GroupPlacementViewService.GetGroupPlacementView]. +message GetGroupPlacementViewRequest { + // Required. The resource name of the Group Placement view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/GroupPlacementView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/hotel_group_view_service.proto b/google/ads/googleads/v3/services/hotel_group_view_service.proto new file mode 100644 index 000000000..2354eff9a --- /dev/null +++ b/google/ads/googleads/v3/services/hotel_group_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/hotel_group_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "HotelGroupViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Hotel Group View Service. + +// Service to manage Hotel Group Views. +service HotelGroupViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested Hotel Group View in full detail. + rpc GetHotelGroupView(GetHotelGroupViewRequest) returns (google.ads.googleads.v3.resources.HotelGroupView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/hotelGroupViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [HotelGroupViewService.GetHotelGroupView][google.ads.googleads.v3.services.HotelGroupViewService.GetHotelGroupView]. +message GetHotelGroupViewRequest { + // Required. Resource name of the Hotel Group View to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/HotelGroupView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/hotel_performance_view_service.proto b/google/ads/googleads/v3/services/hotel_performance_view_service.proto new file mode 100644 index 000000000..c24eff83c --- /dev/null +++ b/google/ads/googleads/v3/services/hotel_performance_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/hotel_performance_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "HotelPerformanceViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Hotel Performance View Service. + +// Service to manage Hotel Performance Views. +service HotelPerformanceViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested Hotel Performance View in full detail. + rpc GetHotelPerformanceView(GetHotelPerformanceViewRequest) returns (google.ads.googleads.v3.resources.HotelPerformanceView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/hotelPerformanceView}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [HotelPerformanceViewService.GetHotelPerformanceView][google.ads.googleads.v3.services.HotelPerformanceViewService.GetHotelPerformanceView]. +message GetHotelPerformanceViewRequest { + // Required. Resource name of the Hotel Performance View to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/HotelPerformanceView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/invoice_service.proto b/google/ads/googleads/v3/services/invoice_service.proto new file mode 100644 index 000000000..614cf93e9 --- /dev/null +++ b/google/ads/googleads/v3/services/invoice_service.proto @@ -0,0 +1,72 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/enums/month_of_year.proto"; +import "google/ads/googleads/v3/resources/invoice.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "InvoiceServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Invoice service. + +// A service to fetch invoices issued for a billing setup during a given month. +service InvoiceService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns all invoices associated with a billing setup, for a given month. + rpc ListInvoices(ListInvoicesRequest) returns (ListInvoicesResponse) { + option (google.api.http) = { + get: "/v3/customers/{customer_id=*}/invoices" + }; + option (google.api.method_signature) = "customer_id,billing_setup,issue_year,issue_month"; + } +} + +// Request message for fetching the invoices of a given billing setup that were +// issued during a given month. +message ListInvoicesRequest { + // Required. The ID of the customer to fetch invoices for. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The billing setup resource name of the requested invoices. + // + // `customers/{customer_id}/billingSetups/{billing_setup_id}` + string billing_setup = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The issue year to retrieve invoices, in yyyy format. Only + // invoices issued in 2019 or later can be retrieved. + string issue_year = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The issue month to retrieve invoices. + google.ads.googleads.v3.enums.MonthOfYearEnum.MonthOfYear issue_month = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for [InvoiceService.ListInvoices][google.ads.googleads.v3.services.InvoiceService.ListInvoices]. +message ListInvoicesResponse { + // The list of invoices that match the billing setup and time period. + repeated google.ads.googleads.v3.resources.Invoice invoices = 1; +} diff --git a/google/ads/googleads/v3/services/keyword_plan_ad_group_service.proto b/google/ads/googleads/v3/services/keyword_plan_ad_group_service.proto new file mode 100644 index 000000000..4a0d8a05d --- /dev/null +++ b/google/ads/googleads/v3/services/keyword_plan_ad_group_service.proto @@ -0,0 +1,131 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/keyword_plan_ad_group.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanAdGroupServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the keyword plan ad group service. + +// Service to manage Keyword Plan ad groups. +service KeywordPlanAdGroupService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested Keyword Plan ad group in full detail. + rpc GetKeywordPlanAdGroup(GetKeywordPlanAdGroupRequest) returns (google.ads.googleads.v3.resources.KeywordPlanAdGroup) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/keywordPlanAdGroups/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes Keyword Plan ad groups. Operation statuses are + // returned. + rpc MutateKeywordPlanAdGroups(MutateKeywordPlanAdGroupsRequest) returns (MutateKeywordPlanAdGroupsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/keywordPlanAdGroups:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [KeywordPlanAdGroupService.GetKeywordPlanAdGroup][google.ads.googleads.v3.services.KeywordPlanAdGroupService.GetKeywordPlanAdGroup]. +message GetKeywordPlanAdGroupRequest { + // Required. The resource name of the Keyword Plan ad group to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanAdGroup" + } + ]; +} + +// Request message for [KeywordPlanAdGroupService.MutateKeywordPlanAdGroups][google.ads.googleads.v3.services.KeywordPlanAdGroupService.MutateKeywordPlanAdGroups]. +message MutateKeywordPlanAdGroupsRequest { + // Required. The ID of the customer whose Keyword Plan ad groups are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual Keyword Plan ad groups. + repeated KeywordPlanAdGroupOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on a Keyword Plan ad group. +message KeywordPlanAdGroupOperation { + // The FieldMask that determines which resource fields are modified in an + // update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new Keyword Plan + // ad group. + google.ads.googleads.v3.resources.KeywordPlanAdGroup create = 1; + + // Update operation: The Keyword Plan ad group is expected to have a valid + // resource name. + google.ads.googleads.v3.resources.KeywordPlanAdGroup update = 2; + + // Remove operation: A resource name for the removed Keyword Plan ad group + // is expected, in this format: + // + // `customers/{customer_id}/keywordPlanAdGroups/{kp_ad_group_id}` + string remove = 3; + } +} + +// Response message for a Keyword Plan ad group mutate. +message MutateKeywordPlanAdGroupsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateKeywordPlanAdGroupResult results = 2; +} + +// The result for the Keyword Plan ad group mutate. +message MutateKeywordPlanAdGroupResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/keyword_plan_campaign_service.proto b/google/ads/googleads/v3/services/keyword_plan_campaign_service.proto new file mode 100644 index 000000000..728a90c2b --- /dev/null +++ b/google/ads/googleads/v3/services/keyword_plan_campaign_service.proto @@ -0,0 +1,132 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/keyword_plan_campaign.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanCampaignServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the keyword plan campaign service. + +// Service to manage Keyword Plan campaigns. +service KeywordPlanCampaignService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested Keyword Plan campaign in full detail. + rpc GetKeywordPlanCampaign(GetKeywordPlanCampaignRequest) returns (google.ads.googleads.v3.resources.KeywordPlanCampaign) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/keywordPlanCampaigns/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes Keyword Plan campaigns. Operation statuses are + // returned. + rpc MutateKeywordPlanCampaigns(MutateKeywordPlanCampaignsRequest) returns (MutateKeywordPlanCampaignsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/keywordPlanCampaigns:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [KeywordPlanCampaignService.GetKeywordPlanCampaign][google.ads.googleads.v3.services.KeywordPlanCampaignService.GetKeywordPlanCampaign]. +message GetKeywordPlanCampaignRequest { + // Required. The resource name of the Keyword Plan campaign to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanCampaign" + } + ]; +} + +// Request message for +// [KeywordPlanCampaignService.MutateKeywordPlanCampaigns][google.ads.googleads.v3.services.KeywordPlanCampaignService.MutateKeywordPlanCampaigns]. +message MutateKeywordPlanCampaignsRequest { + // Required. The ID of the customer whose Keyword Plan campaigns are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual Keyword Plan campaigns. + repeated KeywordPlanCampaignOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on a Keyword Plan campaign. +message KeywordPlanCampaignOperation { + // The FieldMask that determines which resource fields are modified in an + // update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new Keyword Plan + // campaign. + google.ads.googleads.v3.resources.KeywordPlanCampaign create = 1; + + // Update operation: The Keyword Plan campaign is expected to have a valid + // resource name. + google.ads.googleads.v3.resources.KeywordPlanCampaign update = 2; + + // Remove operation: A resource name for the removed Keyword Plan campaign + // is expected, in this format: + // + // `customers/{customer_id}/keywordPlanCampaigns/{keywordPlan_campaign_id}` + string remove = 3; + } +} + +// Response message for a Keyword Plan campaign mutate. +message MutateKeywordPlanCampaignsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateKeywordPlanCampaignResult results = 2; +} + +// The result for the Keyword Plan campaign mutate. +message MutateKeywordPlanCampaignResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/keyword_plan_idea_service.proto b/google/ads/googleads/v3/services/keyword_plan_idea_service.proto new file mode 100644 index 000000000..b14ebdc4e --- /dev/null +++ b/google/ads/googleads/v3/services/keyword_plan_idea_service.proto @@ -0,0 +1,117 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/common/keyword_plan_common.proto"; +import "google/ads/googleads/v3/enums/keyword_plan_network.proto"; +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanIdeaServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the keyword plan idea service. + +// Service to generate keyword ideas. +service KeywordPlanIdeaService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns a list of keyword ideas. + rpc GenerateKeywordIdeas(GenerateKeywordIdeasRequest) returns (GenerateKeywordIdeaResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}:generateKeywordIdeas" + body: "*" + }; + } +} + +// Request message for [KeywordIdeaService.GenerateKeywordIdeas][]. +message GenerateKeywordIdeasRequest { + // The ID of the customer with the recommendation. + string customer_id = 1; + + // Required. The resource name of the language to target. + // Required + google.protobuf.StringValue language = 7 [(google.api.field_behavior) = REQUIRED]; + + // The resource names of the location to target. + // Max 10 + repeated google.protobuf.StringValue geo_target_constants = 8; + + // Targeting network. + google.ads.googleads.v3.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 9; + + // The type of seed to generate keyword ideas. + oneof seed { + // A Keyword and a specific Url to generate ideas from + // e.g. cars, www.example.com/cars. + KeywordAndUrlSeed keyword_and_url_seed = 2; + + // A Keyword or phrase to generate ideas from, e.g. cars. + KeywordSeed keyword_seed = 3; + + // A specific url to generate ideas from, e.g. www.example.com/cars. + UrlSeed url_seed = 5; + } +} + +// Keyword And Url Seed +message KeywordAndUrlSeed { + // The URL to crawl in order to generate keyword ideas. + google.protobuf.StringValue url = 1; + + // Requires at least one keyword. + repeated google.protobuf.StringValue keywords = 2; +} + +// Keyword Seed +message KeywordSeed { + // Requires at least one keyword. + repeated google.protobuf.StringValue keywords = 1; +} + +// Url Seed +message UrlSeed { + // The URL to crawl in order to generate keyword ideas. + google.protobuf.StringValue url = 1; +} + +// Response message for [KeywordIdeaService.GenerateKeywordIdeas][]. +message GenerateKeywordIdeaResponse { + // Results of generating keyword ideas. + repeated GenerateKeywordIdeaResult results = 1; +} + +// The result of generating keyword ideas. +message GenerateKeywordIdeaResult { + // Text of the keyword idea. + // As in Keyword Plan historical metrics, this text may not be an actual + // keyword, but the canonical form of multiple keywords. + // See KeywordPlanKeywordHistoricalMetrics message in KeywordPlanService. + google.protobuf.StringValue text = 2; + + // The historical metrics for the keyword + google.ads.googleads.v3.common.KeywordPlanHistoricalMetrics keyword_idea_metrics = 3; +} diff --git a/google/ads/googleads/v3/services/keyword_plan_keyword_service.proto b/google/ads/googleads/v3/services/keyword_plan_keyword_service.proto new file mode 100644 index 000000000..5806273ef --- /dev/null +++ b/google/ads/googleads/v3/services/keyword_plan_keyword_service.proto @@ -0,0 +1,131 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/keyword_plan_keyword.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanKeywordServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the keyword plan keyword service. + +// Service to manage Keyword Plan ad group keywords. +service KeywordPlanKeywordService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested Keyword Plan keyword in full detail. + rpc GetKeywordPlanKeyword(GetKeywordPlanKeywordRequest) returns (google.ads.googleads.v3.resources.KeywordPlanKeyword) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/keywordPlanKeywords/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes Keyword Plan keywords. Operation statuses are + // returned. + rpc MutateKeywordPlanKeywords(MutateKeywordPlanKeywordsRequest) returns (MutateKeywordPlanKeywordsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/keywordPlanKeywords:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [KeywordPlanKeywordService.GetKeywordPlanKeyword][google.ads.googleads.v3.services.KeywordPlanKeywordService.GetKeywordPlanKeyword]. +message GetKeywordPlanKeywordRequest { + // Required. The resource name of the ad group keyword to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanKeyword" + } + ]; +} + +// Request message for [KeywordPlanKeywordService.MutateKeywordPlanKeywords][google.ads.googleads.v3.services.KeywordPlanKeywordService.MutateKeywordPlanKeywords]. +message MutateKeywordPlanKeywordsRequest { + // Required. The ID of the customer whose Keyword Plan keywords are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual Keyword Plan keywords. + repeated KeywordPlanKeywordOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on a Keyword Plan keyword. +message KeywordPlanKeywordOperation { + // The FieldMask that determines which resource fields are modified in an + // update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new Keyword Plan + // ad group keyword. + google.ads.googleads.v3.resources.KeywordPlanKeyword create = 1; + + // Update operation: The Keyword Plan keyword is expected to have a valid + // resource name. + google.ads.googleads.v3.resources.KeywordPlanKeyword update = 2; + + // Remove operation: A resource name for the removed Keyword Plan keyword is + // expected, in this format: + // + // `customers/{customer_id}/keywordPlanKeywords/{kp_ad_group_keyword_id}` + string remove = 3; + } +} + +// Response message for a Keyword Plan keyword mutate. +message MutateKeywordPlanKeywordsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateKeywordPlanKeywordResult results = 2; +} + +// The result for the Keyword Plan keyword mutate. +message MutateKeywordPlanKeywordResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/keyword_plan_negative_keyword_service.proto b/google/ads/googleads/v3/services/keyword_plan_negative_keyword_service.proto new file mode 100644 index 000000000..b40bbe457 --- /dev/null +++ b/google/ads/googleads/v3/services/keyword_plan_negative_keyword_service.proto @@ -0,0 +1,135 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/keyword_plan_negative_keyword.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanNegativeKeywordServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the keyword plan negative keyword service. + +// Service to manage Keyword Plan negative keywords. +service KeywordPlanNegativeKeywordService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested plan in full detail. + rpc GetKeywordPlanNegativeKeyword(GetKeywordPlanNegativeKeywordRequest) returns (google.ads.googleads.v3.resources.KeywordPlanNegativeKeyword) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/keywordPlanNegativeKeywords/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes Keyword Plan negative keywords. Operation + // statuses are returned. + rpc MutateKeywordPlanNegativeKeywords(MutateKeywordPlanNegativeKeywordsRequest) returns (MutateKeywordPlanNegativeKeywordsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/keywordPlanNegativeKeywords:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for +// [KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword][google.ads.googleads.v3.services.KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword]. +message GetKeywordPlanNegativeKeywordRequest { + // Required. The resource name of the plan to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlanNegativeKeyword" + } + ]; +} + +// Request message for +// [KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords][google.ads.googleads.v3.services.KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords]. +message MutateKeywordPlanNegativeKeywordsRequest { + // Required. The ID of the customer whose negative keywords are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual Keyword Plan negative + // keywords. + repeated KeywordPlanNegativeKeywordOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on a Keyword Plan negative +// keyword. +message KeywordPlanNegativeKeywordOperation { + // The FieldMask that determines which resource fields are modified in an + // update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new Keyword Plan + // negative keyword. + google.ads.googleads.v3.resources.KeywordPlanNegativeKeyword create = 1; + + // Update operation: The Keyword Plan negative keyword expected to have a + // valid resource name. + google.ads.googleads.v3.resources.KeywordPlanNegativeKeyword update = 2; + + // Remove operation: A resource name for the removed Keyword Plan negative + // keywords expected in this format: + // + // `customers/{customer_id}/keywordPlanNegativeKeywords/{kp_negative_keyword_id}` + string remove = 3; + } +} + +// Response message for a Keyword Plan negative keyword mutate. +message MutateKeywordPlanNegativeKeywordsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateKeywordPlanNegativeKeywordResult results = 2; +} + +// The result for the Keyword Plan negative keyword mutate. +message MutateKeywordPlanNegativeKeywordResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/keyword_plan_service.proto b/google/ads/googleads/v3/services/keyword_plan_service.proto new file mode 100644 index 000000000..7d963347d --- /dev/null +++ b/google/ads/googleads/v3/services/keyword_plan_service.proto @@ -0,0 +1,249 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/common/keyword_plan_common.proto"; +import "google/ads/googleads/v3/resources/keyword_plan.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the keyword plan service. + +// Service to manage keyword plans. +service KeywordPlanService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested plan in full detail. + rpc GetKeywordPlan(GetKeywordPlanRequest) returns (google.ads.googleads.v3.resources.KeywordPlan) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/keywordPlans/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes keyword plans. Operation statuses are + // returned. + rpc MutateKeywordPlans(MutateKeywordPlansRequest) returns (MutateKeywordPlansResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/keywordPlans:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } + + // Returns the requested Keyword Plan forecasts. + rpc GenerateForecastMetrics(GenerateForecastMetricsRequest) returns (GenerateForecastMetricsResponse) { + option (google.api.http) = { + post: "/v3/{keyword_plan=customers/*/keywordPlans/*}:generateForecastMetrics" + body: "*" + }; + option (google.api.method_signature) = "keyword_plan"; + } + + // Returns the requested Keyword Plan historical metrics. + rpc GenerateHistoricalMetrics(GenerateHistoricalMetricsRequest) returns (GenerateHistoricalMetricsResponse) { + option (google.api.http) = { + post: "/v3/{keyword_plan=customers/*/keywordPlans/*}:generateHistoricalMetrics" + body: "*" + }; + option (google.api.method_signature) = "keyword_plan"; + } +} + +// Request message for [KeywordPlanService.GetKeywordPlan][google.ads.googleads.v3.services.KeywordPlanService.GetKeywordPlan]. +message GetKeywordPlanRequest { + // Required. The resource name of the plan to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordPlan" + } + ]; +} + +// Request message for [KeywordPlanService.MutateKeywordPlans][google.ads.googleads.v3.services.KeywordPlanService.MutateKeywordPlans]. +message MutateKeywordPlansRequest { + // Required. The ID of the customer whose keyword plans are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual keyword plans. + repeated KeywordPlanOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on a keyword plan. +message KeywordPlanOperation { + // The FieldMask that determines which resource fields are modified in an + // update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new keyword plan. + google.ads.googleads.v3.resources.KeywordPlan create = 1; + + // Update operation: The keyword plan is expected to have a valid resource + // name. + google.ads.googleads.v3.resources.KeywordPlan update = 2; + + // Remove operation: A resource name for the removed keyword plan is + // expected in this format: + // + // `customers/{customer_id}/keywordPlans/{keyword_plan_id}` + string remove = 3; + } +} + +// Response message for a keyword plan mutate. +message MutateKeywordPlansResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateKeywordPlansResult results = 2; +} + +// The result for the keyword plan mutate. +message MutateKeywordPlansResult { + // Returned for successful operations. + string resource_name = 1; +} + +// Request message for [KeywordPlanService.GenerateForecastMetrics][google.ads.googleads.v3.services.KeywordPlanService.GenerateForecastMetrics]. +message GenerateForecastMetricsRequest { + // Required. The resource name of the keyword plan to be forecasted. + string keyword_plan = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for [KeywordPlanService.GenerateForecastMetrics][google.ads.googleads.v3.services.KeywordPlanService.GenerateForecastMetrics]. +message GenerateForecastMetricsResponse { + // List of campaign forecasts. + // One maximum. + repeated KeywordPlanCampaignForecast campaign_forecasts = 1; + + // List of ad group forecasts. + repeated KeywordPlanAdGroupForecast ad_group_forecasts = 2; + + // List of keyword forecasts. + repeated KeywordPlanKeywordForecast keyword_forecasts = 3; +} + +// A campaign forecast. +message KeywordPlanCampaignForecast { + // The resource name of the Keyword Plan campaign related to the forecast. + // + // `customers/{customer_id}/keywordPlanCampaigns/{keyword_plan_campaign_id}` + google.protobuf.StringValue keyword_plan_campaign = 1; + + // The forecast for the Keyword Plan campaign. + ForecastMetrics campaign_forecast = 2; +} + +// An ad group forecast. +message KeywordPlanAdGroupForecast { + // The resource name of the Keyword Plan ad group related to the forecast. + // + // `customers/{customer_id}/keywordPlanAdGroups/{keyword_plan_ad_group_id}` + google.protobuf.StringValue keyword_plan_ad_group = 1; + + // The forecast for the Keyword Plan ad group. + ForecastMetrics ad_group_forecast = 2; +} + +// A keyword forecast. +message KeywordPlanKeywordForecast { + // The resource name of the Keyword Plan keyword related to the forecast. + // + // `customers/{customer_id}/keywordPlanAdGroupKeywords/{keyword_plan_ad_group_keyword_id}` + google.protobuf.StringValue keyword_plan_ad_group_keyword = 1; + + // The forecast for the Keyword Plan keyword. + ForecastMetrics keyword_forecast = 2; +} + +// Forecast metrics. +message ForecastMetrics { + // Impressions + google.protobuf.DoubleValue impressions = 1; + + // Ctr + google.protobuf.DoubleValue ctr = 2; + + // AVG cpc + google.protobuf.Int64Value average_cpc = 3; + + // Clicks + google.protobuf.DoubleValue clicks = 5; + + // Cost + google.protobuf.Int64Value cost_micros = 6; +} + +// Request message for [KeywordPlanService.GenerateHistoricalMetrics][google.ads.googleads.v3.services.KeywordPlanService.GenerateHistoricalMetrics]. +message GenerateHistoricalMetricsRequest { + // Required. The resource name of the keyword plan of which historical metrics are + // requested. + string keyword_plan = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for [KeywordPlanService.GenerateHistoricalMetrics][google.ads.googleads.v3.services.KeywordPlanService.GenerateHistoricalMetrics]. +message GenerateHistoricalMetricsResponse { + // List of keyword historical metrics. + repeated KeywordPlanKeywordHistoricalMetrics metrics = 1; +} + +// A keyword historical metrics. +message KeywordPlanKeywordHistoricalMetrics { + // The text of the query associated with one or more ad_group_keywords in the + // plan. + // + // Note that we de-dupe your keywords list, eliminating close variants before + // returning the plan's keywords as text. For example, if your plan originally + // contained the keywords 'car' and 'cars', the returned search query will + // only contain 'car'. + google.protobuf.StringValue search_query = 1; + + // The historical metrics for the query associated with one or more + // ad_group_keywords in the plan. + google.ads.googleads.v3.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; +} diff --git a/google/ads/googleads/v3/services/keyword_view_service.proto b/google/ads/googleads/v3/services/keyword_view_service.proto new file mode 100644 index 000000000..da07da190 --- /dev/null +++ b/google/ads/googleads/v3/services/keyword_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/keyword_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "KeywordViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Keyword View service. + +// Service to manage keyword views. +service KeywordViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested keyword view in full detail. + rpc GetKeywordView(GetKeywordViewRequest) returns (google.ads.googleads.v3.resources.KeywordView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/keywordViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [KeywordViewService.GetKeywordView][google.ads.googleads.v3.services.KeywordViewService.GetKeywordView]. +message GetKeywordViewRequest { + // Required. The resource name of the keyword view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/KeywordView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/label_service.proto b/google/ads/googleads/v3/services/label_service.proto new file mode 100644 index 000000000..f0a341314 --- /dev/null +++ b/google/ads/googleads/v3/services/label_service.proto @@ -0,0 +1,125 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/label.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "LabelServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Service to manage labels. +service LabelService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested label in full detail. + rpc GetLabel(GetLabelRequest) returns (google.ads.googleads.v3.resources.Label) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/labels/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes labels. Operation statuses are returned. + rpc MutateLabels(MutateLabelsRequest) returns (MutateLabelsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/labels:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [LabelService.GetLabel][google.ads.googleads.v3.services.LabelService.GetLabel]. +message GetLabelRequest { + // Required. The resource name of the label to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Label" + } + ]; +} + +// Request message for [LabelService.MutateLabels][google.ads.googleads.v3.services.LabelService.MutateLabels]. +message MutateLabelsRequest { + // Required. ID of the customer whose labels are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on labels. + repeated LabelOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, remove, update) on a label. +message LabelOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new label. + google.ads.googleads.v3.resources.Label create = 1; + + // Update operation: The label is expected to have a valid resource name. + google.ads.googleads.v3.resources.Label update = 2; + + // Remove operation: A resource name for the label being removed, in + // this format: + // + // `customers/{customer_id}/labels/{label_id}` + string remove = 3; + } +} + +// Response message for a labels mutate. +message MutateLabelsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateLabelResult results = 2; +} + +// The result for a label mutate. +message MutateLabelResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/landing_page_view_service.proto b/google/ads/googleads/v3/services/landing_page_view_service.proto new file mode 100644 index 000000000..8ea75bdf3 --- /dev/null +++ b/google/ads/googleads/v3/services/landing_page_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/landing_page_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "LandingPageViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the landing page view service. + +// Service to fetch landing page views. +service LandingPageViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested landing page view in full detail. + rpc GetLandingPageView(GetLandingPageViewRequest) returns (google.ads.googleads.v3.resources.LandingPageView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/landingPageViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [LandingPageViewService.GetLandingPageView][google.ads.googleads.v3.services.LandingPageViewService.GetLandingPageView]. +message GetLandingPageViewRequest { + // Required. The resource name of the landing page view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LandingPageView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/language_constant_service.proto b/google/ads/googleads/v3/services/language_constant_service.proto new file mode 100644 index 000000000..f1bb58598 --- /dev/null +++ b/google/ads/googleads/v3/services/language_constant_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/language_constant.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "LanguageConstantServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the language constant service. + +// Service to fetch language constants. +service LanguageConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested language constant. + rpc GetLanguageConstant(GetLanguageConstantRequest) returns (google.ads.googleads.v3.resources.LanguageConstant) { + option (google.api.http) = { + get: "/v3/{resource_name=languageConstants/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [LanguageConstantService.GetLanguageConstant][google.ads.googleads.v3.services.LanguageConstantService.GetLanguageConstant]. +message GetLanguageConstantRequest { + // Required. Resource name of the language constant to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LanguageConstant" + } + ]; +} diff --git a/google/ads/googleads/v3/services/location_view_service.proto b/google/ads/googleads/v3/services/location_view_service.proto new file mode 100644 index 000000000..cb8d8602f --- /dev/null +++ b/google/ads/googleads/v3/services/location_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/location_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "LocationViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Location View service. + +// Service to fetch location views. +service LocationViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested location view in full detail. + rpc GetLocationView(GetLocationViewRequest) returns (google.ads.googleads.v3.resources.LocationView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/locationViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [LocationViewService.GetLocationView][google.ads.googleads.v3.services.LocationViewService.GetLocationView]. +message GetLocationViewRequest { + // Required. The resource name of the location view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/LocationView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/managed_placement_view_service.proto b/google/ads/googleads/v3/services/managed_placement_view_service.proto new file mode 100644 index 000000000..cb8c938dc --- /dev/null +++ b/google/ads/googleads/v3/services/managed_placement_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/managed_placement_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ManagedPlacementViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Managed Placement View service. + +// Service to manage Managed Placement views. +service ManagedPlacementViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested Managed Placement view in full detail. + rpc GetManagedPlacementView(GetManagedPlacementViewRequest) returns (google.ads.googleads.v3.resources.ManagedPlacementView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/managedPlacementViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [ManagedPlacementViewService.GetManagedPlacementView][google.ads.googleads.v3.services.ManagedPlacementViewService.GetManagedPlacementView]. +message GetManagedPlacementViewRequest { + // Required. The resource name of the Managed Placement View to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ManagedPlacementView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/media_file_service.proto b/google/ads/googleads/v3/services/media_file_service.proto new file mode 100644 index 000000000..54e27bea9 --- /dev/null +++ b/google/ads/googleads/v3/services/media_file_service.proto @@ -0,0 +1,114 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/media_file.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "MediaFileServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Media File service. + +// Service to manage media files. +service MediaFileService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested media file in full detail. + rpc GetMediaFile(GetMediaFileRequest) returns (google.ads.googleads.v3.resources.MediaFile) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/mediaFiles/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates media files. Operation statuses are returned. + rpc MutateMediaFiles(MutateMediaFilesRequest) returns (MutateMediaFilesResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/mediaFiles:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [MediaFileService.GetMediaFile][google.ads.googleads.v3.services.MediaFileService.GetMediaFile] +message GetMediaFileRequest { + // Required. The resource name of the media file to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MediaFile" + } + ]; +} + +// Request message for [MediaFileService.MutateMediaFiles][google.ads.googleads.v3.services.MediaFileService.MutateMediaFiles] +message MutateMediaFilesRequest { + // Required. The ID of the customer whose media files are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual media file. + repeated MediaFileOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation to create media file. +message MediaFileOperation { + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new media file. + google.ads.googleads.v3.resources.MediaFile create = 1; + } +} + +// Response message for a media file mutate. +message MutateMediaFilesResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateMediaFileResult results = 2; +} + +// The result for the media file mutate. +message MutateMediaFileResult { + // The resource name returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/merchant_center_link_service.proto b/google/ads/googleads/v3/services/merchant_center_link_service.proto new file mode 100644 index 000000000..5a5e80d30 --- /dev/null +++ b/google/ads/googleads/v3/services/merchant_center_link_service.proto @@ -0,0 +1,130 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/merchant_center_link.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "MerchantCenterLinkServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the MerchantCenterLink service. + +// This service allows management of links between Google Ads and Google +// Merchant Center. +service MerchantCenterLinkService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns Merchant Center links available for this customer. + rpc ListMerchantCenterLinks(ListMerchantCenterLinksRequest) returns (ListMerchantCenterLinksResponse) { + option (google.api.http) = { + get: "/v3/customers/{customer_id=*}/merchantCenterLinks" + }; + option (google.api.method_signature) = "customer_id"; + } + + // Returns the Merchant Center link in full detail. + rpc GetMerchantCenterLink(GetMerchantCenterLinkRequest) returns (google.ads.googleads.v3.resources.MerchantCenterLink) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/merchantCenterLinks/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Updates status or removes a Merchant Center link. + rpc MutateMerchantCenterLink(MutateMerchantCenterLinkRequest) returns (MutateMerchantCenterLinkResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/merchantCenterLinks:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operation"; + } +} + +// Request message for [MerchantCenterLinkService.ListMerchantCenterLinks][google.ads.googleads.v3.services.MerchantCenterLinkService.ListMerchantCenterLinks]. +message ListMerchantCenterLinksRequest { + // Required. The ID of the customer onto which to apply the Merchant Center link list + // operation. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for [MerchantCenterLinkService.ListMerchantCenterLinks][google.ads.googleads.v3.services.MerchantCenterLinkService.ListMerchantCenterLinks]. +message ListMerchantCenterLinksResponse { + // Merchant Center links available for the requested customer + repeated google.ads.googleads.v3.resources.MerchantCenterLink merchant_center_links = 1; +} + +// Request message for [MerchantCenterLinkService.GetMerchantCenterLink][google.ads.googleads.v3.services.MerchantCenterLinkService.GetMerchantCenterLink]. +message GetMerchantCenterLinkRequest { + // Required. Resource name of the Merchant Center link. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MerchantCenterLink" + } + ]; +} + +// Request message for [MerchantCenterLinkService.MutateMerchantCenterLink][google.ads.googleads.v3.services.MerchantCenterLinkService.MutateMerchantCenterLink]. +message MutateMerchantCenterLinkRequest { + // Required. The ID of the customer being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The operation to perform on the link + MerchantCenterLinkOperation operation = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A single update on a Merchant Center link. +message MerchantCenterLinkOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 3; + + // The operation to perform + oneof operation { + // Update operation: The merchant center link is expected to have a valid + // resource name. + google.ads.googleads.v3.resources.MerchantCenterLink update = 1; + + // Remove operation: A resource name for the removed merchant center link is + // expected, in this format: + // + // `customers/{customer_id}/merchantCenterLinks/{merchant_center_id}` + string remove = 2; + } +} + +// Response message for Merchant Center link mutate. +message MutateMerchantCenterLinkResponse { + // Result for the mutate. + MutateMerchantCenterLinkResult result = 2; +} + +// The result for the Merchant Center link mutate. +message MutateMerchantCenterLinkResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/mobile_app_category_constant_service.proto b/google/ads/googleads/v3/services/mobile_app_category_constant_service.proto new file mode 100644 index 000000000..e40489eaa --- /dev/null +++ b/google/ads/googleads/v3/services/mobile_app_category_constant_service.proto @@ -0,0 +1,57 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/mobile_app_category_constant.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "MobileAppCategoryConstantServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Service to fetch mobile app category constants. +service MobileAppCategoryConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested mobile app category constant. + rpc GetMobileAppCategoryConstant(GetMobileAppCategoryConstantRequest) returns (google.ads.googleads.v3.resources.MobileAppCategoryConstant) { + option (google.api.http) = { + get: "/v3/{resource_name=mobileAppCategoryConstants/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for +// [MobileAppCategoryConstantService.GetMobileAppCategoryConstant][google.ads.googleads.v3.services.MobileAppCategoryConstantService.GetMobileAppCategoryConstant]. +message GetMobileAppCategoryConstantRequest { + // Required. Resource name of the mobile app category constant to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MobileAppCategoryConstant" + } + ]; +} diff --git a/google/ads/googleads/v3/services/mobile_device_constant_service.proto b/google/ads/googleads/v3/services/mobile_device_constant_service.proto new file mode 100644 index 000000000..ce3297ef3 --- /dev/null +++ b/google/ads/googleads/v3/services/mobile_device_constant_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/mobile_device_constant.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "MobileDeviceConstantServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the mobile device constant service. + +// Service to fetch mobile device constants. +service MobileDeviceConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested mobile device constant in full detail. + rpc GetMobileDeviceConstant(GetMobileDeviceConstantRequest) returns (google.ads.googleads.v3.resources.MobileDeviceConstant) { + option (google.api.http) = { + get: "/v3/{resource_name=mobileDeviceConstants/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [MobileDeviceConstantService.GetMobileDeviceConstant][google.ads.googleads.v3.services.MobileDeviceConstantService.GetMobileDeviceConstant]. +message GetMobileDeviceConstantRequest { + // Required. Resource name of the mobile device to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MobileDeviceConstant" + } + ]; +} diff --git a/google/ads/googleads/v3/services/mutate_job_service.proto b/google/ads/googleads/v3/services/mutate_job_service.proto new file mode 100644 index 000000000..d8f6583ec --- /dev/null +++ b/google/ads/googleads/v3/services/mutate_job_service.proto @@ -0,0 +1,217 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/mutate_job.proto"; +import "google/ads/googleads/v3/services/google_ads_service.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "MutateJobServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the MutateJobService. + +// Service to manage mutate jobs. +service MutateJobService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Creates a mutate job. + rpc CreateMutateJob(CreateMutateJobRequest) returns (CreateMutateJobResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/mutateJobs:create" + body: "*" + }; + option (google.api.method_signature) = "customer_id"; + } + + // Returns the mutate job. + rpc GetMutateJob(GetMutateJobRequest) returns (google.ads.googleads.v3.resources.MutateJob) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/mutateJobs/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Returns the results of the mutate job. The job must be done. + // Supports standard list paging. + rpc ListMutateJobResults(ListMutateJobResultsRequest) returns (ListMutateJobResultsResponse) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/mutateJobs/*}:listResults" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Runs the mutate job. + // + // The Operation.metadata field type is MutateJobMetadata. When finished, the + // long running operation will not contain errors or a response. Instead, use + // ListMutateJobResults to get the results of the job. + rpc RunMutateJob(RunMutateJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{resource_name=customers/*/mutateJobs/*}:run" + body: "*" + }; + option (google.api.method_signature) = "resource_name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.ads.googleads.v3.resources.MutateJob.MutateJobMetadata" + }; + } + + // Add operations to the mutate job. + rpc AddMutateJobOperations(AddMutateJobOperationsRequest) returns (AddMutateJobOperationsResponse) { + option (google.api.http) = { + post: "/v3/{resource_name=customers/*/mutateJobs/*}:addOperations" + body: "*" + }; + option (google.api.method_signature) = "resource_name,sequence_token,mutate_operations"; + option (google.api.method_signature) = "resource_name,mutate_operations"; + } +} + +// Request message for [MutateJobService.CreateMutateJobRequest][] +message CreateMutateJobRequest { + // Required. The ID of the customer for which to create a mutate job. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for [MutateJobService.CreateMutateJobResponse][] +message CreateMutateJobResponse { + // The resource name of the MutateJob. + string resource_name = 1; +} + +// Request message for [MutateJobService.GetMutateJob][google.ads.googleads.v3.services.MutateJobService.GetMutateJob] +message GetMutateJobRequest { + // Required. The resource name of the MutateJob to get. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; +} + +// Request message for [MutateJobService.RunMutateJob][google.ads.googleads.v3.services.MutateJobService.RunMutateJob] +message RunMutateJobRequest { + // Required. The resource name of the MutateJob to run. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; +} + +// Request message for [MutateJobService.AddMutateJobOperations][google.ads.googleads.v3.services.MutateJobService.AddMutateJobOperations] +message AddMutateJobOperationsRequest { + // Required. The resource name of the MutateJob. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; + + // A token used to enforce sequencing. + // + // The first AddMutateJobOperations request for a MutateJob should not set + // sequence_token. Subsequent requests must set sequence_token to the value of + // next_sequence_token received in the previous AddMutateJobOperations + // response. + string sequence_token = 2; + + // Required. The list of mutates being added. + // + // Operations can use negative integers as temp ids to signify dependencies + // between entities created in this MutateJob. For example, a customer with + // id = 1234 can create a campaign and an ad group in that same campaign by + // creating a campaign in the first operation with the resource name + // explicitly set to "customers/1234/campaigns/-1", and creating an ad group + // in the second operation with the campaign field also set to + // "customers/1234/campaigns/-1". + repeated MutateOperation mutate_operations = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for [MutateJobService.AddMutateJobOperations][google.ads.googleads.v3.services.MutateJobService.AddMutateJobOperations] +message AddMutateJobOperationsResponse { + // The total number of operations added so far for this job. + int64 total_operations = 1; + + // The sequence token to be used when calling AddMutateJobOperations again if + // more operations need to be added. The next AddMutateJobOperations request + // must set the sequence_token field to the value of this field. + string next_sequence_token = 2; +} + +// Request message for [MutateJobService.ListMutateJobResults][google.ads.googleads.v3.services.MutateJobService.ListMutateJobResults]. +message ListMutateJobResultsRequest { + // Required. The resource name of the MutateJob whose results are being listed. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/MutateJob" + } + ]; + + // Token of the page to retrieve. If not specified, the first + // page of results will be returned. Use the value obtained from + // `next_page_token` in the previous response in order to request + // the next page of results. + string page_token = 2; + + // Number of elements to retrieve in a single page. + // When a page request is too large, the server may decide to + // further limit the number of returned resources. + int32 page_size = 3; +} + +// Response message for [MutateJobService.ListMutateJobResults][google.ads.googleads.v3.services.MutateJobService.ListMutateJobResults]. +message ListMutateJobResultsResponse { + // The list of rows that matched the query. + repeated MutateJobResult results = 1; + + // Pagination token used to retrieve the next page of results. + // Pass the content of this string as the `page_token` attribute of + // the next request. `next_page_token` is not returned for the last + // page. + string next_page_token = 2; +} + +// MutateJob result. +message MutateJobResult { + // Index of the mutate operation. + int64 operation_index = 1; + + // Response for the mutate. + // May be empty if errors occurred. + MutateOperationResponse mutate_operation_response = 2; + + // Details of the errors when processing the operation. + google.rpc.Status status = 3; +} diff --git a/google/ads/googleads/v3/services/offline_user_data_job_service.proto b/google/ads/googleads/v3/services/offline_user_data_job_service.proto new file mode 100644 index 000000000..31b4754a9 --- /dev/null +++ b/google/ads/googleads/v3/services/offline_user_data_job_service.proto @@ -0,0 +1,170 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/common/offline_user_data.proto"; +import "google/ads/googleads/v3/resources/offline_user_data_job.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "OfflineUserDataJobServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the OfflineUserDataJobService. + +// Service to manage offline user data jobs. +service OfflineUserDataJobService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Creates an offline user data job. + rpc CreateOfflineUserDataJob(CreateOfflineUserDataJobRequest) returns (CreateOfflineUserDataJobResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/offlineUserDataJobs:create" + body: "*" + }; + option (google.api.method_signature) = "customer_id,job"; + } + + // Returns the offline user data job. + rpc GetOfflineUserDataJob(GetOfflineUserDataJobRequest) returns (google.ads.googleads.v3.resources.OfflineUserDataJob) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/offlineUserDataJobs/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Adds operations to the offline user data job. + rpc AddOfflineUserDataJobOperations(AddOfflineUserDataJobOperationsRequest) returns (AddOfflineUserDataJobOperationsResponse) { + option (google.api.http) = { + post: "/v3/{resource_name=customers/*/offlineUserDataJobs/*}:addOperations" + body: "*" + }; + option (google.api.method_signature) = "resource_name,operations"; + } + + // Runs the offline user data job. + // + // When finished, the long running operation will contain the processing + // result or failure information, if any. + rpc RunOfflineUserDataJob(RunOfflineUserDataJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{resource_name=customers/*/offlineUserDataJobs/*}:run" + body: "*" + }; + option (google.api.method_signature) = "resource_name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Empty" + }; + } +} + +// Request message for +// [OfflineUserDataJobService.CreateOfflineUserDataJobRequest][] +message CreateOfflineUserDataJobRequest { + // Required. The ID of the customer for which to create an offline user data job. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The offline user data job to be created. + google.ads.googleads.v3.resources.OfflineUserDataJob job = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [OfflineUserDataJobService.CreateOfflineUserDataJobResponse][] +message CreateOfflineUserDataJobResponse { + // The resource name of the OfflineUserDataJob. + string resource_name = 1; +} + +// Request message for [OfflineUserDataJobService.GetOfflineUserDataJob][google.ads.googleads.v3.services.OfflineUserDataJobService.GetOfflineUserDataJob] +message GetOfflineUserDataJobRequest { + // Required. The resource name of the OfflineUserDataJob to get. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/OfflineUserDataJob" + } + ]; +} + +// Request message for [OfflineUserDataJobService.RunOfflineUserDataJob][google.ads.googleads.v3.services.OfflineUserDataJobService.RunOfflineUserDataJob] +message RunOfflineUserDataJobRequest { + // Required. The resource name of the OfflineUserDataJob to run. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/OfflineUserDataJob" + } + ]; +} + +// Request message for +// [OfflineUserDataJobService.AddOfflineUserDataJobOperations][google.ads.googleads.v3.services.OfflineUserDataJobService.AddOfflineUserDataJobOperations] +message AddOfflineUserDataJobOperationsRequest { + // Required. The resource name of the OfflineUserDataJob. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/OfflineUserDataJob" + } + ]; + + // True to enable partial failure for the offline user data job. + google.protobuf.BoolValue enable_partial_failure = 2; + + // Required. The list of operations to be done. + repeated OfflineUserDataJobOperation operations = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Operation to be made for the AddOfflineUserDataJobOperationsRequest. +message OfflineUserDataJobOperation { + // Operation to be made for the AddOfflineUserDataJobOperationsRequest. + oneof operation { + // Add the provided data to the transaction. Data cannot be retrieved after + // being uploaded. + google.ads.googleads.v3.common.UserData create = 1; + + // Remove the provided data from the transaction. Data cannot be retrieved + // after being uploaded. + google.ads.googleads.v3.common.UserData remove = 2; + + // Remove all previously provided data. This is only supported for Customer + // Match. + bool remove_all = 3; + } +} + +// Response message for +// [OfflineUserDataJobService.AddOfflineUserDataJobOperations][google.ads.googleads.v3.services.OfflineUserDataJobService.AddOfflineUserDataJobOperations] +message AddOfflineUserDataJobOperationsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 1; +} diff --git a/google/ads/googleads/v3/services/operating_system_version_constant_service.proto b/google/ads/googleads/v3/services/operating_system_version_constant_service.proto new file mode 100644 index 000000000..ea6dbb9a8 --- /dev/null +++ b/google/ads/googleads/v3/services/operating_system_version_constant_service.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/operating_system_version_constant.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "OperatingSystemVersionConstantServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the OS version constant service + +// Service to fetch Operating System Version constants. +service OperatingSystemVersionConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested OS version constant in full detail. + rpc GetOperatingSystemVersionConstant(GetOperatingSystemVersionConstantRequest) returns (google.ads.googleads.v3.resources.OperatingSystemVersionConstant) { + option (google.api.http) = { + get: "/v3/{resource_name=operatingSystemVersionConstants/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for +// [OperatingSystemVersionConstantService.GetOperatingSystemVersionConstant][google.ads.googleads.v3.services.OperatingSystemVersionConstantService.GetOperatingSystemVersionConstant]. +message GetOperatingSystemVersionConstantRequest { + // Required. Resource name of the OS version to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/OperatingSystemVersionConstant" + } + ]; +} diff --git a/google/ads/googleads/v3/services/paid_organic_search_term_view_service.proto b/google/ads/googleads/v3/services/paid_organic_search_term_view_service.proto new file mode 100644 index 000000000..8c58ad9f5 --- /dev/null +++ b/google/ads/googleads/v3/services/paid_organic_search_term_view_service.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/paid_organic_search_term_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "PaidOrganicSearchTermViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Paid Organic Search Term View service. + +// Service to fetch paid organic search term views. +service PaidOrganicSearchTermViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested paid organic search term view in full detail. + rpc GetPaidOrganicSearchTermView(GetPaidOrganicSearchTermViewRequest) returns (google.ads.googleads.v3.resources.PaidOrganicSearchTermView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/paidOrganicSearchTermViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for +// [PaidOrganicSearchTermViewService.GetPaidOrganicSearchTermView][google.ads.googleads.v3.services.PaidOrganicSearchTermViewService.GetPaidOrganicSearchTermView]. +message GetPaidOrganicSearchTermViewRequest { + // Required. The resource name of the paid organic search term view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/PaidOrganicSearchTermView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/parental_status_view_service.proto b/google/ads/googleads/v3/services/parental_status_view_service.proto new file mode 100644 index 000000000..b28736bd6 --- /dev/null +++ b/google/ads/googleads/v3/services/parental_status_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/parental_status_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ParentalStatusViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Parental Status View service. + +// Service to manage parental status views. +service ParentalStatusViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested parental status view in full detail. + rpc GetParentalStatusView(GetParentalStatusViewRequest) returns (google.ads.googleads.v3.resources.ParentalStatusView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/parentalStatusViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [ParentalStatusViewService.GetParentalStatusView][google.ads.googleads.v3.services.ParentalStatusViewService.GetParentalStatusView]. +message GetParentalStatusViewRequest { + // Required. The resource name of the parental status view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ParentalStatusView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/payments_account_service.proto b/google/ads/googleads/v3/services/payments_account_service.proto new file mode 100644 index 000000000..4ac37d322 --- /dev/null +++ b/google/ads/googleads/v3/services/payments_account_service.proto @@ -0,0 +1,61 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/payments_account.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "PaymentsAccountServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the payments account service. + +// Service to provide payments accounts that can be used to set up consolidated +// billing. +service PaymentsAccountService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns all payments accounts associated with all managers + // between the login customer ID and specified serving customer in the + // hierarchy, inclusive. + rpc ListPaymentsAccounts(ListPaymentsAccountsRequest) returns (ListPaymentsAccountsResponse) { + option (google.api.http) = { + get: "/v3/customers/{customer_id=*}/paymentsAccounts" + }; + option (google.api.method_signature) = "customer_id"; + } +} + +// Request message for fetching all accessible payments accounts. +message ListPaymentsAccountsRequest { + // Required. The ID of the customer to apply the PaymentsAccount list operation to. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for [PaymentsAccountService.ListPaymentsAccounts][google.ads.googleads.v3.services.PaymentsAccountService.ListPaymentsAccounts]. +message ListPaymentsAccountsResponse { + // The list of accessible payments accounts. + repeated google.ads.googleads.v3.resources.PaymentsAccount payments_accounts = 1; +} diff --git a/google/ads/googleads/v3/services/product_bidding_category_constant_service.proto b/google/ads/googleads/v3/services/product_bidding_category_constant_service.proto new file mode 100644 index 000000000..b94e28138 --- /dev/null +++ b/google/ads/googleads/v3/services/product_bidding_category_constant_service.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/product_bidding_category_constant.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ProductBiddingCategoryConstantServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Product Bidding Category constant service + +// Service to fetch Product Bidding Categories. +service ProductBiddingCategoryConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested Product Bidding Category in full detail. + rpc GetProductBiddingCategoryConstant(GetProductBiddingCategoryConstantRequest) returns (google.ads.googleads.v3.resources.ProductBiddingCategoryConstant) { + option (google.api.http) = { + get: "/v3/{resource_name=productBiddingCategoryConstants/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for +// [ProductBiddingCategoryService.GetProductBiddingCategory][]. +message GetProductBiddingCategoryConstantRequest { + // Required. Resource name of the Product Bidding Category to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ProductBiddingCategoryConstant" + } + ]; +} diff --git a/google/ads/googleads/v3/services/product_group_view_service.proto b/google/ads/googleads/v3/services/product_group_view_service.proto new file mode 100644 index 000000000..0205b1d5b --- /dev/null +++ b/google/ads/googleads/v3/services/product_group_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/product_group_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ProductGroupViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the ProductGroup View service. + +// Service to manage product group views. +service ProductGroupViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested product group view in full detail. + rpc GetProductGroupView(GetProductGroupViewRequest) returns (google.ads.googleads.v3.resources.ProductGroupView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/productGroupViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [ProductGroupViewService.GetProductGroupView][google.ads.googleads.v3.services.ProductGroupViewService.GetProductGroupView]. +message GetProductGroupViewRequest { + // Required. The resource name of the product group view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ProductGroupView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/reach_plan_service.proto b/google/ads/googleads/v3/services/reach_plan_service.proto new file mode 100644 index 000000000..9986fe59a --- /dev/null +++ b/google/ads/googleads/v3/services/reach_plan_service.proto @@ -0,0 +1,367 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/common/criteria.proto"; +import "google/ads/googleads/v3/enums/reach_plan_ad_length.proto"; +import "google/ads/googleads/v3/enums/reach_plan_age_range.proto"; +import "google/ads/googleads/v3/enums/reach_plan_network.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ReachPlanServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the reach plan service. + +// Reach Plan Service gives users information about audience size that can +// be reached through advertisement on YouTube. In particular, +// GenerateReachForecast provides estimated number of people of specified +// demographics that can be reached by an ad in a given market by a campaign of +// certain duration with a defined budget. +service ReachPlanService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the list of plannable locations (for example, countries & DMAs). + rpc ListPlannableLocations(ListPlannableLocationsRequest) returns (ListPlannableLocationsResponse) { + option (google.api.http) = { + post: "/v3:listPlannableLocations" + body: "*" + }; + } + + // Returns the list of per-location plannable YouTube ad formats with allowed + // targeting. + rpc ListPlannableProducts(ListPlannableProductsRequest) returns (ListPlannableProductsResponse) { + option (google.api.http) = { + post: "/v3:listPlannableProducts" + body: "*" + }; + option (google.api.method_signature) = "plannable_location_id"; + } + + // Generates a product mix ideas given a set of preferences. This method + // helps the advertiser to obtain a good mix of ad formats and budget + // allocations based on its preferences. + rpc GenerateProductMixIdeas(GenerateProductMixIdeasRequest) returns (GenerateProductMixIdeasResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}:generateProductMixIdeas" + body: "*" + }; + option (google.api.method_signature) = "customer_id,plannable_location_id,currency_code,budget_micros"; + } + + // Generates a reach forecast for a given targeting / product mix. + rpc GenerateReachForecast(GenerateReachForecastRequest) returns (GenerateReachForecastResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}:generateReachForecast" + body: "*" + }; + option (google.api.method_signature) = "customer_id,campaign_duration,planned_products"; + } +} + +// Request message for [ReachForecastService.ListPlannableLocations][] +message ListPlannableLocationsRequest { + +} + +// The list of plannable locations. +message ListPlannableLocationsResponse { + // The list of locations available for planning (Countries, DMAs, + // sub-countries). + // For locations like Countries, DMAs see + // https://developers.google.com/adwords/api/docs/appendix/geotargeting for + // more information. + repeated PlannableLocation plannable_locations = 1; +} + +// A plannable location: a country, a DMA, a metro region, a tv region, +// a province. +message PlannableLocation { + // The location identifier. + google.protobuf.StringValue id = 1; + + // The unique location name in english. + google.protobuf.StringValue name = 2; + + // The parent country code, not present if location is a country. + // If present will always be a criterion id: additional information, such as + // country name are returned both via ListPlannableLocations or directly by + // accessing GeoTargetConstantService with the criterion id. + google.protobuf.Int64Value parent_country_id = 3; +} + +// Request to list available products in a given location. +message ListPlannableProductsRequest { + // Required. The ID of the selected location for planning. To list the available + // plannable location ids use ListPlannableLocations. + google.protobuf.StringValue plannable_location_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// A response with all available products. +message ListPlannableProductsResponse { + // The list of products available for planning and related targeting metadata. + repeated ProductMetadata product_metadata = 1; +} + +// The metadata associated with an available plannable product. +message ProductMetadata { + // The code associated with the ad product. E.g. Trueview, Bumper + // To list the available plannable product codes use ListPlannableProducts. + google.protobuf.StringValue plannable_product_code = 1; + + // The allowed plannable targeting for this product. + PlannableTargeting plannable_targeting = 2; +} + +// The targeting for which traffic metrics will be reported. +message PlannableTargeting { + // Allowed plannable age ranges for the product for which metrics will be + // reported. Actual targeting is computed by mapping this age range onto + // standard Google common.AgeRangeInfo values. + repeated google.ads.googleads.v3.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1; + + // Targetable genders for the ad product. + repeated google.ads.googleads.v3.common.GenderInfo genders = 2; + + // Targetable devices for the ad product. + repeated google.ads.googleads.v3.common.DeviceInfo devices = 3; + + // Targetable networks for the ad product. + repeated google.ads.googleads.v3.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4; +} + +// Request message for [ReachForecastService.GenerateProductMixIdeas][]. +message GenerateProductMixIdeasRequest { + // Required. The ID of the customer. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID of the location, this is one of the ids returned by + // ListPlannableLocations. + google.protobuf.StringValue plannable_location_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Currency code. + // Three-character ISO 4217 currency code. + google.protobuf.StringValue currency_code = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Total budget. + // Amount in micros. One million is equivalent to one unit. + google.protobuf.Int64Value budget_micros = 4 [(google.api.field_behavior) = REQUIRED]; + + // The preferences of the suggested product mix. + // An unset preference is interpreted as all possible values are allowed, + // unless explicitly specified. + Preferences preferences = 5; +} + +// Set of preferences about the planned mix. +message Preferences { + // True if ad skippable. + // If not set, default is any value. + google.protobuf.BoolValue is_skippable = 1; + + // True if ad start with sound. + // If not set, default is any value. + google.protobuf.BoolValue starts_with_sound = 2; + + // The length of the ad. + // If not set, default is any value. + google.ads.googleads.v3.enums.ReachPlanAdLengthEnum.ReachPlanAdLength ad_length = 3; + + // True if ad will only show on the top content. + // If not set, default is false. + google.protobuf.BoolValue top_content_only = 4; + + // True if the price guaranteed. The cost of serving the ad is agreed upfront + // and not subject to an auction. + // If not set, default is any value. + google.protobuf.BoolValue has_guaranteed_price = 5; +} + +// The suggested product mix. +message GenerateProductMixIdeasResponse { + // A list of products (ad formats) and the associated budget allocation idea. + repeated ProductAllocation product_allocation = 1; +} + +// An allocation of a part of the budget on a given product. +message ProductAllocation { + // Selected product for planning. The product codes returned are within the + // set of the ones returned by ListPlannableProducts when using the same + // location id. + google.protobuf.StringValue plannable_product_code = 1; + + // The value to be allocated for the suggested product in requested currency. + // Amount in micros. One million is equivalent to one unit. + google.protobuf.Int64Value budget_micros = 2; +} + +// Request message for [ReachPlanService.GenerateReachForecast][google.ads.googleads.v3.services.ReachPlanService.GenerateReachForecast]. +message GenerateReachForecastRequest { + // Required. The ID of the customer. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The currency code. + // Three-character ISO 4217 currency code. + google.protobuf.StringValue currency_code = 2; + + // Required. Campaign duration. + CampaignDuration campaign_duration = 3 [(google.api.field_behavior) = REQUIRED]; + + // Desired cookie frequency cap that will be applied to each planned product. + // This is equivalent to the frequency cap exposed in Google Ads when creating + // a campaign, it represents the maximum number of times an ad can be shown to + // the same user. + // If not specified, no cap is applied. + google.protobuf.Int32Value cookie_frequency_cap = 4; + + // Desired minimum effective frequency (the number of times a person was + // exposed to the ad) for the reported reach metrics [1-10]. + // This won't affect the targeting, but just the reporting. + // If not specified, a default of 1 is applied. + google.protobuf.Int32Value min_effective_frequency = 5; + + // The targeting to be applied to all products selected in the product mix. + // + // This is planned targeting: execution details might vary based on the + // advertising product, please consult an implementation specialist. + // + // See specific metrics for details on how targeting affects them. + // + // In some cases, targeting may be overridden using the + // PlannedProduct.advanced_product_targeting field. + Targeting targeting = 6; + + // Required. The products to be forecast. + // The max number of allowed planned products is 15. + repeated PlannedProduct planned_products = 7 [(google.api.field_behavior) = REQUIRED]; +} + +// The targeting for which traffic metrics will be reported. +message Targeting { + // Required. The ID of the selected location. + // Plannable locations ID can be obtained from ListPlannableLocations. + google.protobuf.StringValue plannable_location_id = 1; + + // Targeted age range. + // If not specified, targets all age ranges. + google.ads.googleads.v3.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_range = 2; + + // Targeted genders. + // If not specified, targets all genders. + repeated google.ads.googleads.v3.common.GenderInfo genders = 3; + + // Targeted devices. + // If not specified, targets all applicable devices. Applicable devices vary + // by product and region and can be obtained from ListPlannableProducts. + repeated google.ads.googleads.v3.common.DeviceInfo devices = 4; + + // Targetable network for the ad product. + // If not specified, targets all applicable networks. Applicable networks vary + // by product and region and can be obtained from ListPlannableProducts. + google.ads.googleads.v3.enums.ReachPlanNetworkEnum.ReachPlanNetwork network = 5; +} + +// The duration of a planned campaign. +message CampaignDuration { + // The duration value in days. + google.protobuf.Int32Value duration_in_days = 1; +} + +// A product being planned for reach. +message PlannedProduct { + // Required. Selected product for planning. + // Plannable products codes can be obtained from ListPlannableProducts. + google.protobuf.StringValue plannable_product_code = 1; + + // Required. Maximum budget allocation in micros for the selected product. + // The value is specified in the selected planning currency_code. + // E.g. 1 000 000$ = 1 000 000 000 000 micros. + google.protobuf.Int64Value budget_micros = 2; +} + +// Response message containing the generated reach curve. +message GenerateReachForecastResponse { + // Reference on target audiences for this curve. + OnTargetAudienceMetrics on_target_audience_metrics = 1; + + // The generated reach curve for the planned product mix. + ReachCurve reach_curve = 2; +} + +// The reach curve for the planned products. +message ReachCurve { + // All points on the reach curve. + repeated ReachForecast reach_forecasts = 1; +} + +// A point on reach curve. +message ReachForecast { + // The cost in micros. + google.protobuf.Int64Value cost_micros = 1; + + // Forecasted traffic metrics for this point. + Forecast forecast = 2; + + // The forecasted allocation. This differs from the input allocation if one + // or more product cannot fulfill the budget because of limited inventory. + repeated ProductAllocation forecasted_product_allocations = 3; +} + +// Forecasted traffic metrics for the planned products and targeting. +message Forecast { + // Number of unique people reached at least + // GenerateReachForecastRequest.min_effective_frequency times that exactly + // matches the Targeting. + google.protobuf.Int64Value on_target_reach = 1; + + // Total number of unique people reached at least + // GenerateReachForecastRequest.min_effective_frequency times. This includes + // people that may fall outside the specified Targeting. + google.protobuf.Int64Value total_reach = 2; + + // Number of ad impressions that exactly matches the Targeting. + google.protobuf.Int64Value on_target_impressions = 3; + + // Total number of ad impressions. This includes impressions that may fall + // outside the specified Targeting, due to insufficient information on + // signed-in users. + google.protobuf.Int64Value total_impressions = 4; +} + +// Audience metrics for the planned products. +// These metrics consider the following targeting dimensions: +// +// - Location +// - PlannableAgeRange +// - Gender +message OnTargetAudienceMetrics { + // Reference audience size matching the considered targeting for YouTube. + google.protobuf.Int64Value youtube_audience_size = 1; + + // Reference audience size matching the considered targeting for Census. + google.protobuf.Int64Value census_audience_size = 2; +} diff --git a/google/ads/googleads/v3/services/recommendation_service.proto b/google/ads/googleads/v3/services/recommendation_service.proto new file mode 100644 index 000000000..b71d6992d --- /dev/null +++ b/google/ads/googleads/v3/services/recommendation_service.proto @@ -0,0 +1,255 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/common/extensions.proto"; +import "google/ads/googleads/v3/enums/keyword_match_type.proto"; +import "google/ads/googleads/v3/resources/ad.proto"; +import "google/ads/googleads/v3/resources/recommendation.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "RecommendationServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Recommendation service. + +// Service to manage recommendations. +service RecommendationService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested recommendation in full detail. + rpc GetRecommendation(GetRecommendationRequest) returns (google.ads.googleads.v3.resources.Recommendation) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/recommendations/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Applies given recommendations with corresponding apply parameters. + rpc ApplyRecommendation(ApplyRecommendationRequest) returns (ApplyRecommendationResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/recommendations:apply" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } + + // Dismisses given recommendations. + rpc DismissRecommendation(DismissRecommendationRequest) returns (DismissRecommendationResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/recommendations:dismiss" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [RecommendationService.GetRecommendation][google.ads.googleads.v3.services.RecommendationService.GetRecommendation]. +message GetRecommendationRequest { + // Required. The resource name of the recommendation to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Recommendation" + } + ]; +} + +// Request message for [RecommendationService.ApplyRecommendation][google.ads.googleads.v3.services.RecommendationService.ApplyRecommendation]. +message ApplyRecommendationRequest { + // Required. The ID of the customer with the recommendation. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to apply recommendations. + // If partial_failure=false all recommendations should be of the same type + // There is a limit of 100 operations per request. + repeated ApplyRecommendationOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, operations will be carried + // out as a transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; +} + +// Information about the operation to apply a recommendation and any parameters +// to customize it. +message ApplyRecommendationOperation { + // Parameters to use when applying a campaign budget recommendation. + message CampaignBudgetParameters { + // New budget amount to set for target budget resource. This is a required + // field. + google.protobuf.Int64Value new_budget_amount_micros = 1; + } + + // Parameters to use when applying a text ad recommendation. + message TextAdParameters { + // New ad to add to recommended ad group. All necessary fields need to be + // set in this message. This is a required field. + google.ads.googleads.v3.resources.Ad ad = 1; + } + + // Parameters to use when applying keyword recommendation. + message KeywordParameters { + // The ad group resource to add keyword to. This is a required field. + google.protobuf.StringValue ad_group = 1; + + // The match type of the keyword. This is a required field. + google.ads.googleads.v3.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 2; + + // Optional, CPC bid to set for the keyword. If not set, keyword will use + // bid based on bidding strategy used by target ad group. + google.protobuf.Int64Value cpc_bid_micros = 3; + } + + // Parameters to use when applying Target CPA recommendation. + message TargetCpaOptInParameters { + // Average CPA to use for Target CPA bidding strategy. This is a required + // field. + google.protobuf.Int64Value target_cpa_micros = 1; + + // Optional, budget amount to set for the campaign. + google.protobuf.Int64Value new_campaign_budget_amount_micros = 2; + } + + // Parameters to use when applying callout extension recommendation. + message CalloutExtensionParameters { + // Callout extensions to be added. This is a required field. + repeated google.ads.googleads.v3.common.CalloutFeedItem callout_extensions = 1; + } + + // Parameters to use when applying call extension recommendation. + message CallExtensionParameters { + // Call extensions to be added. This is a required field. + repeated google.ads.googleads.v3.common.CallFeedItem call_extensions = 1; + } + + // Parameters to use when applying sitelink extension recommendation. + message SitelinkExtensionParameters { + // Sitelink extensions to be added. This is a required field. + repeated google.ads.googleads.v3.common.SitelinkFeedItem sitelink_extensions = 1; + } + + // Parameters to use when applying move unused budget recommendation. + message MoveUnusedBudgetParameters { + // Budget amount to move from excess budget to constrained budget. This is + // a required field. + google.protobuf.Int64Value budget_micros_to_move = 1; + } + + // The resource name of the recommendation to apply. + string resource_name = 1; + + // Parameters to use when applying the recommendation. + oneof apply_parameters { + // Optional parameters to use when applying a campaign budget + // recommendation. + CampaignBudgetParameters campaign_budget = 2; + + // Optional parameters to use when applying a text ad recommendation. + TextAdParameters text_ad = 3; + + // Optional parameters to use when applying keyword recommendation. + KeywordParameters keyword = 4; + + // Optional parameters to use when applying target CPA opt-in + // recommendation. + TargetCpaOptInParameters target_cpa_opt_in = 5; + + // Parameters to use when applying callout extension recommendation. + CalloutExtensionParameters callout_extension = 6; + + // Parameters to use when applying call extension recommendation. + CallExtensionParameters call_extension = 7; + + // Parameters to use when applying sitelink extension recommendation. + SitelinkExtensionParameters sitelink_extension = 8; + + // Parameters to use when applying move unused budget recommendation. + MoveUnusedBudgetParameters move_unused_budget = 9; + } +} + +// Response message for [RecommendationService.ApplyRecommendation][google.ads.googleads.v3.services.RecommendationService.ApplyRecommendation]. +message ApplyRecommendationResponse { + // Results of operations to apply recommendations. + repeated ApplyRecommendationResult results = 1; + + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors) + // we return the RPC level error. + google.rpc.Status partial_failure_error = 2; +} + +// The result of applying a recommendation. +message ApplyRecommendationResult { + // Returned for successful applies. + string resource_name = 1; +} + +// Request message for [RecommendationService.DismissRecommendation][google.ads.googleads.v3.services.RecommendationService.DismissRecommendation]. +message DismissRecommendationRequest { + // Operation to dismiss a single recommendation identified by resource_name. + message DismissRecommendationOperation { + // The resource name of the recommendation to dismiss. + string resource_name = 1; + } + + // Required. The ID of the customer with the recommendation. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to dismiss recommendations. + // If partial_failure=false all recommendations should be of the same type + // There is a limit of 100 operations per request. + repeated DismissRecommendationOperation operations = 3 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, operations will be carried in a + // single transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 2; +} + +// Response message for [RecommendationService.DismissRecommendation][google.ads.googleads.v3.services.RecommendationService.DismissRecommendation]. +message DismissRecommendationResponse { + // The result of dismissing a recommendation. + message DismissRecommendationResult { + // Returned for successful dismissals. + string resource_name = 1; + } + + // Results of operations to dismiss recommendations. + repeated DismissRecommendationResult results = 1; + + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors) + // we return the RPC level error. + google.rpc.Status partial_failure_error = 2; +} diff --git a/google/ads/googleads/v3/services/remarketing_action_service.proto b/google/ads/googleads/v3/services/remarketing_action_service.proto new file mode 100644 index 000000000..234339e95 --- /dev/null +++ b/google/ads/googleads/v3/services/remarketing_action_service.proto @@ -0,0 +1,123 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/remarketing_action.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "RemarketingActionServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Remarketing Action service. + +// Service to manage remarketing actions. +service RemarketingActionService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested remarketing action in full detail. + rpc GetRemarketingAction(GetRemarketingActionRequest) returns (google.ads.googleads.v3.resources.RemarketingAction) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/remarketingActions/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates or updates remarketing actions. Operation statuses are returned. + rpc MutateRemarketingActions(MutateRemarketingActionsRequest) returns (MutateRemarketingActionsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/remarketingActions:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [RemarketingActionService.GetRemarketingAction][google.ads.googleads.v3.services.RemarketingActionService.GetRemarketingAction]. +message GetRemarketingActionRequest { + // Required. The resource name of the remarketing action to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/RemarketingAction" + } + ]; +} + +// Request message for [RemarketingActionService.MutateRemarketingActions][google.ads.googleads.v3.services.RemarketingActionService.MutateRemarketingActions]. +message MutateRemarketingActionsRequest { + // Required. The ID of the customer whose remarketing actions are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual remarketing actions. + repeated RemarketingActionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update) on a remarketing action. +message RemarketingActionOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new remarketing + // action. + google.ads.googleads.v3.resources.RemarketingAction create = 1; + + // Update operation: The remarketing action is expected to have a valid + // resource name. + google.ads.googleads.v3.resources.RemarketingAction update = 2; + } +} + +// Response message for remarketing action mutate. +message MutateRemarketingActionsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateRemarketingActionResult results = 2; +} + +// The result for the remarketing action mutate. +message MutateRemarketingActionResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/search_term_view_service.proto b/google/ads/googleads/v3/services/search_term_view_service.proto new file mode 100644 index 000000000..ac752fe30 --- /dev/null +++ b/google/ads/googleads/v3/services/search_term_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/search_term_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "SearchTermViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Search Term View service. + +// Service to manage search term views. +service SearchTermViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the attributes of the requested search term view. + rpc GetSearchTermView(GetSearchTermViewRequest) returns (google.ads.googleads.v3.resources.SearchTermView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/searchTermViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [SearchTermViewService.GetSearchTermView][google.ads.googleads.v3.services.SearchTermViewService.GetSearchTermView]. +message GetSearchTermViewRequest { + // Required. The resource name of the search term view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SearchTermView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/shared_criterion_service.proto b/google/ads/googleads/v3/services/shared_criterion_service.proto new file mode 100644 index 000000000..49849e550 --- /dev/null +++ b/google/ads/googleads/v3/services/shared_criterion_service.proto @@ -0,0 +1,121 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/shared_criterion.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "SharedCriterionServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Shared Criterion service. + +// Service to manage shared criteria. +service SharedCriterionService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested shared criterion in full detail. + rpc GetSharedCriterion(GetSharedCriterionRequest) returns (google.ads.googleads.v3.resources.SharedCriterion) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/sharedCriteria/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates or removes shared criteria. Operation statuses are returned. + rpc MutateSharedCriteria(MutateSharedCriteriaRequest) returns (MutateSharedCriteriaResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/sharedCriteria:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [SharedCriterionService.GetSharedCriterion][google.ads.googleads.v3.services.SharedCriterionService.GetSharedCriterion]. +message GetSharedCriterionRequest { + // Required. The resource name of the shared criterion to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedCriterion" + } + ]; +} + +// Request message for [SharedCriterionService.MutateSharedCriteria][google.ads.googleads.v3.services.SharedCriterionService.MutateSharedCriteria]. +message MutateSharedCriteriaRequest { + // Required. The ID of the customer whose shared criteria are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual shared criteria. + repeated SharedCriterionOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, remove) on an shared criterion. +message SharedCriterionOperation { + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new shared + // criterion. + google.ads.googleads.v3.resources.SharedCriterion create = 1; + + // Remove operation: A resource name for the removed shared criterion is + // expected, in this format: + // + // `customers/{customer_id}/sharedCriteria/{shared_set_id}~{criterion_id}` + string remove = 3; + } +} + +// Response message for a shared criterion mutate. +message MutateSharedCriteriaResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateSharedCriterionResult results = 2; +} + +// The result for the shared criterion mutate. +message MutateSharedCriterionResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/shared_set_service.proto b/google/ads/googleads/v3/services/shared_set_service.proto new file mode 100644 index 000000000..5b5192ec2 --- /dev/null +++ b/google/ads/googleads/v3/services/shared_set_service.proto @@ -0,0 +1,128 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/shared_set.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "SharedSetServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Shared Set service. + +// Service to manage shared sets. +service SharedSetService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested shared set in full detail. + rpc GetSharedSet(GetSharedSetRequest) returns (google.ads.googleads.v3.resources.SharedSet) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/sharedSets/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates, updates, or removes shared sets. Operation statuses are returned. + rpc MutateSharedSets(MutateSharedSetsRequest) returns (MutateSharedSetsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/sharedSets:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [SharedSetService.GetSharedSet][google.ads.googleads.v3.services.SharedSetService.GetSharedSet]. +message GetSharedSetRequest { + // Required. The resource name of the shared set to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/SharedSet" + } + ]; +} + +// Request message for [SharedSetService.MutateSharedSets][google.ads.googleads.v3.services.SharedSetService.MutateSharedSets]. +message MutateSharedSetsRequest { + // Required. The ID of the customer whose shared sets are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual shared sets. + repeated SharedSetOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update, remove) on an shared set. +message SharedSetOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new shared set. + google.ads.googleads.v3.resources.SharedSet create = 1; + + // Update operation: The shared set is expected to have a valid resource + // name. + google.ads.googleads.v3.resources.SharedSet update = 2; + + // Remove operation: A resource name for the removed shared set is expected, + // in this format: + // + // `customers/{customer_id}/sharedSets/{shared_set_id}` + string remove = 3; + } +} + +// Response message for a shared set mutate. +message MutateSharedSetsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateSharedSetResult results = 2; +} + +// The result for the shared set mutate. +message MutateSharedSetResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/shopping_performance_view_service.proto b/google/ads/googleads/v3/services/shopping_performance_view_service.proto new file mode 100644 index 000000000..46c91862d --- /dev/null +++ b/google/ads/googleads/v3/services/shopping_performance_view_service.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/shopping_performance_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ShoppingPerformanceViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the ShoppingPerformanceView service. + +// Service to fetch Shopping performance views. +service ShoppingPerformanceViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested Shopping performance view in full detail. + rpc GetShoppingPerformanceView(GetShoppingPerformanceViewRequest) returns (google.ads.googleads.v3.resources.ShoppingPerformanceView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/shoppingPerformanceView}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for +// [ShoppingPerformanceViewService.GetShoppingPerformanceView][google.ads.googleads.v3.services.ShoppingPerformanceViewService.GetShoppingPerformanceView]. +message GetShoppingPerformanceViewRequest { + // Required. The resource name of the Shopping performance view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/ShoppingPerformanceView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/topic_constant_service.proto b/google/ads/googleads/v3/services/topic_constant_service.proto new file mode 100644 index 000000000..5f06a0aa1 --- /dev/null +++ b/google/ads/googleads/v3/services/topic_constant_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/topic_constant.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "TopicConstantServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Topic constant service + +// Service to fetch topic constants. +service TopicConstantService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested topic constant in full detail. + rpc GetTopicConstant(GetTopicConstantRequest) returns (google.ads.googleads.v3.resources.TopicConstant) { + option (google.api.http) = { + get: "/v3/{resource_name=topicConstants/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [TopicConstantService.GetTopicConstant][google.ads.googleads.v3.services.TopicConstantService.GetTopicConstant]. +message GetTopicConstantRequest { + // Required. Resource name of the Topic to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/TopicConstant" + } + ]; +} diff --git a/google/ads/googleads/v3/services/topic_view_service.proto b/google/ads/googleads/v3/services/topic_view_service.proto new file mode 100644 index 000000000..ef16d79f5 --- /dev/null +++ b/google/ads/googleads/v3/services/topic_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/topic_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "TopicViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Topic View service. + +// Service to manage topic views. +service TopicViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested topic view in full detail. + rpc GetTopicView(GetTopicViewRequest) returns (google.ads.googleads.v3.resources.TopicView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/topicViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [TopicViewService.GetTopicView][google.ads.googleads.v3.services.TopicViewService.GetTopicView]. +message GetTopicViewRequest { + // Required. The resource name of the topic view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/TopicView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/user_data_service.proto b/google/ads/googleads/v3/services/user_data_service.proto new file mode 100644 index 000000000..2b8a9fcd1 --- /dev/null +++ b/google/ads/googleads/v3/services/user_data_service.proto @@ -0,0 +1,82 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/common/offline_user_data.proto"; +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "UserDataServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the UserDataService. + +// Service to manage user data uploads. +// Accessible to whitelisted customers only. +service UserDataService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Uploads the given user data. + rpc UploadUserData(UploadUserDataRequest) returns (UploadUserDataResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}:uploadUserData" + body: "*" + }; + } +} + +// Request message for [UserDataService.UploadUserData][google.ads.googleads.v3.services.UserDataService.UploadUserData] +message UploadUserDataRequest { + // Required. The ID of the customer for which to update the user data. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to be done. + repeated UserDataOperation operations = 3 [(google.api.field_behavior) = REQUIRED]; + + // Metadata of the request. + oneof metadata { + // Metadata for data updates to a Customer Match user list. + google.ads.googleads.v3.common.CustomerMatchUserListMetadata customer_match_user_list_metadata = 2; + } +} + +// Operation to be made for the UploadUserDataRequest. +message UserDataOperation { + // Operation to be made for the UploadUserDataRequest. + oneof operation { + // The list of user data to be appended to the user list. + google.ads.googleads.v3.common.UserData create = 1; + } +} + +// Response message for [UserDataService.UploadUserData][google.ads.googleads.v3.services.UserDataService.UploadUserData] +message UploadUserDataResponse { + // The date time at which the request was received by API, formatted as + // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00". + google.protobuf.StringValue upload_date_time = 1; + + // Number of upload data operations received by API. + google.protobuf.Int32Value received_operations_count = 2; +} diff --git a/google/ads/googleads/v3/services/user_interest_service.proto b/google/ads/googleads/v3/services/user_interest_service.proto new file mode 100644 index 000000000..2b2c1bb5b --- /dev/null +++ b/google/ads/googleads/v3/services/user_interest_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/user_interest.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "UserInterestServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the user interest service + +// Service to fetch Google Ads User Interest. +service UserInterestService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested user interest in full detail + rpc GetUserInterest(GetUserInterestRequest) returns (google.ads.googleads.v3.resources.UserInterest) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/userInterests/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [UserInterestService.GetUserInterest][google.ads.googleads.v3.services.UserInterestService.GetUserInterest]. +message GetUserInterestRequest { + // Required. Resource name of the UserInterest to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserInterest" + } + ]; +} diff --git a/google/ads/googleads/v3/services/user_list_service.proto b/google/ads/googleads/v3/services/user_list_service.proto new file mode 100644 index 000000000..5e2f7492e --- /dev/null +++ b/google/ads/googleads/v3/services/user_list_service.proto @@ -0,0 +1,128 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/user_list.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "UserListServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the User List service. + +// Service to manage user lists. +service UserListService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested user list. + rpc GetUserList(GetUserListRequest) returns (google.ads.googleads.v3.resources.UserList) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/userLists/*}" + }; + option (google.api.method_signature) = "resource_name"; + } + + // Creates or updates user lists. Operation statuses are returned. + rpc MutateUserLists(MutateUserListsRequest) returns (MutateUserListsResponse) { + option (google.api.http) = { + post: "/v3/customers/{customer_id=*}/userLists:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } +} + +// Request message for [UserListService.GetUserList][google.ads.googleads.v3.services.UserListService.GetUserList]. +message GetUserListRequest { + // Required. The resource name of the user list to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserList" + } + ]; +} + +// Request message for [UserListService.MutateUserLists][google.ads.googleads.v3.services.UserListService.MutateUserLists]. +message MutateUserListsRequest { + // Required. The ID of the customer whose user lists are being modified. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to perform on individual user lists. + repeated UserListOperation operations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If true, successful operations will be carried out and invalid + // operations will return errors. If false, all operations will be carried + // out in one transaction if and only if they are all valid. + // Default is false. + bool partial_failure = 3; + + // If true, the request is validated but not executed. Only errors are + // returned, not results. + bool validate_only = 4; +} + +// A single operation (create, update) on a user list. +message UserListOperation { + // FieldMask that determines which resource fields are modified in an update. + google.protobuf.FieldMask update_mask = 4; + + // The mutate operation. + oneof operation { + // Create operation: No resource name is expected for the new user list. + google.ads.googleads.v3.resources.UserList create = 1; + + // Update operation: The user list is expected to have a valid resource + // name. + google.ads.googleads.v3.resources.UserList update = 2; + + // Remove operation: A resource name for the removed user list is expected, + // in this format: + // + // `customers/{customer_id}/userLists/{user_list_id}` + string remove = 3; + } +} + +// Response message for user list mutate. +message MutateUserListsResponse { + // Errors that pertain to operation failures in the partial failure mode. + // Returned only when partial_failure = true and all errors occur inside the + // operations. If any errors occur outside the operations (e.g. auth errors), + // we return an RPC level error. + google.rpc.Status partial_failure_error = 3; + + // All results for the mutate. + repeated MutateUserListResult results = 2; +} + +// The result for the user list mutate. +message MutateUserListResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v3/services/user_location_view_service.proto b/google/ads/googleads/v3/services/user_location_view_service.proto new file mode 100644 index 000000000..0fc7437fb --- /dev/null +++ b/google/ads/googleads/v3/services/user_location_view_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/user_location_view.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "UserLocationViewServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the UserLocationView service. + +// Service to manage user location views. +service UserLocationViewService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested user location view in full detail. + rpc GetUserLocationView(GetUserLocationViewRequest) returns (google.ads.googleads.v3.resources.UserLocationView) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/userLocationViews/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [UserLocationViewService.GetUserLocationView][google.ads.googleads.v3.services.UserLocationViewService.GetUserLocationView]. +message GetUserLocationViewRequest { + // Required. The resource name of the user location view to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/UserLocationView" + } + ]; +} diff --git a/google/ads/googleads/v3/services/video_service.proto b/google/ads/googleads/v3/services/video_service.proto new file mode 100644 index 000000000..d43862235 --- /dev/null +++ b/google/ads/googleads/v3/services/video_service.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.googleads.v3.services; + +import "google/ads/googleads/v3/resources/video.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V3.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/services;services"; +option java_multiple_files = true; +option java_outer_classname = "VideoServiceProto"; +option java_package = "com.google.ads.googleads.v3.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V3::Services"; + +// Proto file describing the Video service. + +// Service to manage videos. +service VideoService { + option (google.api.default_host) = "googleads.googleapis.com"; + + // Returns the requested video in full detail. + rpc GetVideo(GetVideoRequest) returns (google.ads.googleads.v3.resources.Video) { + option (google.api.http) = { + get: "/v3/{resource_name=customers/*/videos/*}" + }; + option (google.api.method_signature) = "resource_name"; + } +} + +// Request message for [VideoService.GetVideo][google.ads.googleads.v3.services.VideoService.GetVideo]. +message GetVideoRequest { + // Required. The resource name of the video to fetch. + string resource_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Video" + } + ]; +} diff --git a/google/analytics/management/v1alpha/BUILD.bazel b/google/analytics/management/v1alpha/BUILD.bazel new file mode 100644 index 000000000..f1bd991eb --- /dev/null +++ b/google/analytics/management/v1alpha/BUILD.bazel @@ -0,0 +1,369 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "management_proto", + srcs = [ + "management_api.proto", + "resources.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "management_proto_with_info", + deps = [ + ":management_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "management_java_proto", + deps = [":management_proto"], +) + +java_grpc_library( + name = "management_java_grpc", + srcs = [":management_proto"], + deps = [":management_java_proto"], +) + +java_gapic_library( + name = "management_java_gapic", + src = ":management_proto_with_info", + gapic_yaml = "analyticsmanagement_gapic.yaml", + package = "google.analytics.management.v1alpha", + service_yaml = "analyticsmanagement_v1alpha.yaml", + test_deps = [ + ":management_java_grpc", + ], + deps = [ + ":management_java_proto", + ], +) + +java_gapic_test( + name = "management_java_gapic_test_suite", + test_classes = [ + "com.google.analytics.management.v1alpha.ManagementClientTest", + ], + runtime_deps = [":management_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-analytics-management-v1alpha-java", + deps = [ + ":management_java_gapic", + ":management_java_grpc", + ":management_java_proto", + ":management_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "management_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/analytics/management/v1alpha", + protos = [":management_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +# go_gapic_library( +# name = "management_go_gapic", +# src = ":management_proto_with_info", +# gapic_yaml = "analyticsmanagement_gapic.yaml", +# importpath = "google.golang.org/genproto/googleapis/analytics/management/v1alpha", +# package = "google.analytics.management.v1alpha", +# service_yaml = "analyticsmanagement_v1alpha.yaml", +# deps = [ +# ":management_go_proto", +# ], +# ) + +#go_test( +# name = "management_go_gapic_test", +# srcs = [":management_go_gapic_srcjar_test"], +# embed = [":management_go_gapic"], +# importpath = "google.golang.org/genproto/googleapis/analytics/management/v1alpha", +#) + +# # Open Source Packages +# go_gapic_assembly_pkg( +# name = "gapi-cloud-analytics-management-v1alpha-go", +# deps = [ +# ":management_go_gapic", +# ":management_go_gapic_srcjar-smoke-test.srcjar", +# ":management_go_gapic_srcjar-test.srcjar", +# ":management_go_proto", +# ], +# ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "management_moved_proto", + srcs = [":management_proto"], + # Customization (ikuleshov): Without this parameter, the proto resources + # are generated with "google.cloud" package prefix and the generated + # clients do not compile. + import_prefix = "google/analytics/management/v1alpha/proto", + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "management_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":management_moved_proto"], +) + +py_grpc_library( + name = "management_py_grpc", + srcs = [":management_moved_proto"], + deps = [":management_py_proto"], +) + +py_gapic_library( + name = "management_py_gapic", + src = ":management_proto_with_info", + gapic_yaml = "analyticsmanagement_gapic.yaml", + package = "google.analytics.management.v1alpha", + service_yaml = "analyticsmanagement_v1alpha.yaml", + deps = [ + ":management_py_grpc", + ":management_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "analytics-management-v1alpha-py", + deps = [ + ":management_py_gapic", + ":management_py_grpc", + ":management_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "management_php_proto", + deps = [":management_proto"], +) + +php_grpc_library( + name = "management_php_grpc", + srcs = [":management_proto"], + deps = [":management_php_proto"], +) + +php_gapic_library( + name = "management_php_gapic", + src = ":management_proto_with_info", + gapic_yaml = "analyticsmanagement_gapic.yaml", + package = "google.analytics.management.v1alpha", + service_yaml = "analyticsmanagement_v1alpha.yaml", + deps = [ + ":management_php_grpc", + ":management_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-analytics-management-v1alpha-php", + deps = [ + ":management_php_gapic", + ":management_php_grpc", + ":management_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "management_nodejs_gapic", + src = ":management_proto_with_info", + gapic_yaml = "analyticsmanagement_gapic.yaml", + package = "google.analytics.management.v1alpha", + service_yaml = "analyticsmanagement_v1alpha.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "analytics-management-v1alpha-nodejs", + deps = [ + ":management_nodejs_gapic", + ":management_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "management_ruby_proto", + deps = [":management_proto"], +) + +ruby_grpc_library( + name = "management_ruby_grpc", + srcs = [":management_proto"], + deps = [":management_ruby_proto"], +) + +ruby_gapic_library( + name = "management_ruby_gapic", + src = ":management_proto_with_info", + gapic_yaml = "analyticsmanagement_gapic.yaml", + package = "google.analytics.management.v1alpha", + service_yaml = "analyticsmanagement_v1alpha.yaml", + deps = [ + ":management_ruby_grpc", + ":management_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-analytics-management-v1alpha-ruby", + deps = [ + ":management_ruby_gapic", + ":management_ruby_grpc", + ":management_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "management_csharp_proto", + deps = [":management_proto"], +) + +csharp_grpc_library( + name = "management_csharp_grpc", + srcs = [":management_proto"], + deps = [":management_csharp_proto"], +) + +csharp_gapic_library( + name = "management_csharp_gapic", + src = ":management_proto_with_info", + gapic_yaml = "analyticsmanagement_gapic.yaml", + package = "google.analytics.management.v1alpha", + service_yaml = "analyticsmanagement_v1alpha.yaml", + deps = [ + ":management_csharp_grpc", + ":management_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-analytics-management-v1alpha-csharp", + deps = [ + ":management_csharp_gapic", + ":management_csharp_grpc", + ":management_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/analytics/management/v1alpha/analyticsmanagement_gapic.yaml b/google/analytics/management/v1alpha/analyticsmanagement_gapic.yaml new file mode 100644 index 000000000..991a5ac17 --- /dev/null +++ b/google/analytics/management/v1alpha/analyticsmanagement_gapic.yaml @@ -0,0 +1,19 @@ +# The file created manually as per go/actools-user-guide +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + java: + package_name: com.google.analytics.management.v1alpha + python: + package_name: google.analytics.management.v1alpha.gapic + go: + package_name: google.golang.org/api/analyticsmanagement/v1alpha + csharp: + package_name: Google.Analytics.Management.V1alpha + ruby: + package_name: Google::Analytics::Management::V1alpha + php: + package_name: Google\Analytics\Management\V1alpha + nodejs: + package_name: google.analytics.management.v1alpha + domain_layer_location: analyticsmanagement.google.com diff --git a/google/analytics/management/v1alpha/analyticsmanagement_v1alpha.yaml b/google/analytics/management/v1alpha/analyticsmanagement_v1alpha.yaml new file mode 100644 index 000000000..ff7ffb2f1 --- /dev/null +++ b/google/analytics/management/v1alpha/analyticsmanagement_v1alpha.yaml @@ -0,0 +1,106 @@ +type: google.api.Service +config_version: 3 +name: analyticsmanagement.googleapis.com +title: Analytics Management API + +apis: +- name: google.analytics.management.v1alpha.Management + +authentication: + rules: + - selector: 'google.analytics.management.v1alpha.Management.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.edit + - selector: google.analytics.management.v1alpha.Management.AuditUserLinks + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.manage.users.readonly + - selector: google.analytics.management.v1alpha.Management.BatchCreateUserLinks + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.manage.users + - selector: google.analytics.management.v1alpha.Management.BatchDeleteUserLinks + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.manage.users + - selector: google.analytics.management.v1alpha.Management.BatchGetUserLinks + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.manage.users.readonly + - selector: google.analytics.management.v1alpha.Management.BatchUpdateUserLinks + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.manage.users + - selector: google.analytics.management.v1alpha.Management.CreateUserLink + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.manage.users + - selector: google.analytics.management.v1alpha.Management.DeleteUserLink + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.manage.users + - selector: google.analytics.management.v1alpha.Management.GetAccount + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.readonly + - selector: google.analytics.management.v1alpha.Management.GetAndroidAppDataStream + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.readonly + - selector: google.analytics.management.v1alpha.Management.GetEnhancedMeasurementSettings + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.readonly + - selector: google.analytics.management.v1alpha.Management.GetIosAppDataStream + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.readonly + - selector: google.analytics.management.v1alpha.Management.GetProperty + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.readonly + - selector: google.analytics.management.v1alpha.Management.GetUserLink + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.manage.users.readonly + - selector: google.analytics.management.v1alpha.Management.GetWebDataStream + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.readonly + - selector: google.analytics.management.v1alpha.Management.ListAccounts + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.readonly + - selector: google.analytics.management.v1alpha.Management.ListAndroidAppDataStreams + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.readonly + - selector: google.analytics.management.v1alpha.Management.ListFirebaseLinks + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.readonly + - selector: google.analytics.management.v1alpha.Management.ListGoogleAdsLinks + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.readonly + - selector: google.analytics.management.v1alpha.Management.ListIosAppDataStreams + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.readonly + - selector: google.analytics.management.v1alpha.Management.ListProperties + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.readonly + - selector: google.analytics.management.v1alpha.Management.ListUserLinks + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.manage.users.readonly + - selector: google.analytics.management.v1alpha.Management.ListWebDataStreams + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.readonly + - selector: google.analytics.management.v1alpha.Management.UpdateUserLink + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/analytics.manage.users diff --git a/google/analytics/management/v1alpha/management_api.proto b/google/analytics/management/v1alpha/management_api.proto new file mode 100644 index 000000000..2312ae7cc --- /dev/null +++ b/google/analytics/management/v1alpha/management_api.proto @@ -0,0 +1,1315 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.analytics.management.v1alpha; + +import "google/analytics/management/v1alpha/resources.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/management/v1alpha;management"; +option java_multiple_files = true; +option java_outer_classname = "ManagementApiProto"; +option java_package = "com.google.analytics.management.v1alpha"; + +// Service Interface for the GA Management API (App+Web). +service Management { + option (google.api.default_host) = "analyticsmanagement.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/analytics.edit," + "https://www.googleapis.com/auth/analytics.manage.users," + "https://www.googleapis.com/auth/analytics.manage.users.readonly," + "https://www.googleapis.com/auth/analytics.readonly"; + + // Lookup for a single Account. + // Throws "Target not found" if no such account found, or if caller does not + // have permissions to access it. + rpc GetAccount(GetAccountRequest) returns (Account) { + option (google.api.http) = { + get: "/v1alpha/{name=accounts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns all accounts accessible by the caller. + // + // Note that these accounts might not currently have App+Web properties. + // Soft-deleted (ie: "trashed") accounts are excluded by default. + // Returns an empty list if no relevant accounts are found. + rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) { + option (google.api.http) = { + get: "/v1alpha/accounts" + }; + } + + // Marks target Account as soft-deleted (ie: "trashed") and returns it. + // + // This API does not have a method to restore soft-deleted accounts. + // However, they can be restored using the Trash Can UI. + // + // If the accounts are not restored before the expiration time, the account + // and all child resources (eg: Properties, GoogleAdsLinks, Streams, + // UserLinks) will be permanently purged. + // https://support.google.com/analytics/answer/6154772 + // + // Returns an error if the target is not found. + rpc DeleteAccount(DeleteAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=accounts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an account. + rpc UpdateAccount(UpdateAccountRequest) returns (Account) { + option (google.api.http) = { + patch: "/v1alpha/{account.name=accounts/*}" + body: "account" + }; + option (google.api.method_signature) = "account,update_mask"; + } + + // Requests a ticket for creating an account. + rpc ProvisionAccountTicket(ProvisionAccountTicketRequest) returns (ProvisionAccountTicketResponse) { + option (google.api.http) = { + post: "/v1alpha/accounts:provisionAccountTicket" + body: "*" + }; + } + + // Lookup for a single "App+Web" Property. + // + // Throws "Target not found" if no such property found, if property is not + // of the type "App+Web", or if caller does not have permissions to access it. + rpc GetProperty(GetPropertyRequest) returns (Property) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns child Properties under the specified parent Account. + // + // Only "App+Web" properties will be returned. + // Properties will be excluded if the caller does not have access. + // Soft-deleted (ie: "trashed") properties are excluded by default. + // Returns an empty list if no relevant properties are found. + rpc ListProperties(ListPropertiesRequest) returns (ListPropertiesResponse) { + option (google.api.http) = { + get: "/v1alpha/properties" + }; + } + + // Creates an "App+Web" property with the specified location and attributes. + rpc CreateProperty(CreatePropertyRequest) returns (Property) { + option (google.api.http) = { + post: "/v1alpha/properties" + body: "property" + }; + option (google.api.method_signature) = "property"; + } + + // Marks target Property as soft-deleted (ie: "trashed") and returns it. + // + // This API does not have a method to restore soft-deleted properties. + // However, they can be restored using the Trash Can UI. + // + // If the properties are not restored before the expiration time, the Property + // and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) + // will be permanently purged. + // https://support.google.com/analytics/answer/6154772 + // + // Returns an error if the target is not found, or is not an App+Web Property. + rpc DeleteProperty(DeletePropertyRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a property. + rpc UpdateProperty(UpdatePropertyRequest) returns (Property) { + option (google.api.http) = { + patch: "/v1alpha/{property.name=properties/*}" + body: "property" + }; + option (google.api.method_signature) = "property,update_mask"; + } + + // Gets information about a user's link to an account or property. + rpc GetUserLink(GetUserLinkRequest) returns (UserLink) { + option (google.api.http) = { + get: "/v1alpha/{name=accounts/*/userLinks/*}" + additional_bindings { + get: "/v1alpha/{name=properties/*/userLinks/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Gets information about multiple users' links to an account or property. + rpc BatchGetUserLinks(BatchGetUserLinksRequest) returns (BatchGetUserLinksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=accounts/*}/userLinks:batchGet" + additional_bindings { + get: "/v1alpha/{parent=properties/*}/userLinks:batchGet" + } + }; + } + + // Lists all user links on an account or property. + rpc ListUserLinks(ListUserLinksRequest) returns (ListUserLinksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=accounts/*}/userLinks" + additional_bindings { + get: "/v1alpha/{parent=properties/*}/userLinks" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Lists all user links on an account or property, including implicit ones + // that come from effective permissions granted by groups or organization + // admin roles. + // + // If a returned user link does not have direct permissions, they cannot + // be removed from the account or property directly with the DeleteUserLink + // command. They have to be removed from the group/etc that gives them + // permissions, which is currently only usable/discoverable in the GA or GMP + // UIs. + rpc AuditUserLinks(AuditUserLinksRequest) returns (AuditUserLinksResponse) { + option (google.api.http) = { + post: "/v1alpha/{parent=accounts/*}/userLinks:audit" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=properties/*}/userLinks:audit" + body: "*" + } + }; + } + + // Creates a user link on an account or property. + // + // If the user with the specified email already has permissions on the + // account or property, then the user's existing permissions will be unioned + // with the permissions specified in the new UserLink. + rpc CreateUserLink(CreateUserLinkRequest) returns (UserLink) { + option (google.api.http) = { + post: "/v1alpha/{parent=accounts/*}/userLinks" + body: "user_link" + additional_bindings { + post: "/v1alpha/{parent=properties/*}/userLinks" + body: "user_link" + } + }; + option (google.api.method_signature) = "parent,user_link"; + } + + // Creates information about multiple users' links to an account or property. + // + // This method is transactional. If any UserLink cannot be created, none of + // the UserLinks will be created. + rpc BatchCreateUserLinks(BatchCreateUserLinksRequest) returns (BatchCreateUserLinksResponse) { + option (google.api.http) = { + post: "/v1alpha/{parent=accounts/*}/userLinks:batchCreate" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=properties/*}/userLinks:batchCreate" + body: "*" + } + }; + } + + // Updates a user link on an account or property. + rpc UpdateUserLink(UpdateUserLinkRequest) returns (UserLink) { + option (google.api.http) = { + patch: "/v1alpha/{user_link.name=accounts/*/userLinks/*}" + body: "user_link" + additional_bindings { + patch: "/v1alpha/{user_link.name=properties/*/userLinks/*}" + body: "user_link" + } + }; + option (google.api.method_signature) = "user_link"; + } + + // Updates information about multiple users' links to an account or property. + rpc BatchUpdateUserLinks(BatchUpdateUserLinksRequest) returns (BatchUpdateUserLinksResponse) { + option (google.api.http) = { + post: "/v1alpha/{parent=accounts/*}/userLinks:batchUpdate" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=properties/*}/userLinks:batchUpdate" + body: "*" + } + }; + } + + // Deletes a user link on an account or property. + rpc DeleteUserLink(DeleteUserLinkRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=accounts/*/userLinks/*}" + additional_bindings { + delete: "/v1alpha/{name=properties/*/userLinks/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Deletes information about multiple users' links to an account or property. + rpc BatchDeleteUserLinks(BatchDeleteUserLinksRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha/{parent=accounts/*}/userLinks:batchDelete" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=properties/*}/userLinks:batchDelete" + body: "*" + } + }; + } + + // Lookup for a single WebDataStream + // + // Throws "Target not found" if no such web data stream found, or if the + // caller does not have permissions to access it. + rpc GetWebDataStream(GetWebDataStreamRequest) returns (WebDataStream) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/webDataStreams/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a web stream on a property. + rpc DeleteWebDataStream(DeleteWebDataStreamRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/webDataStreams/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a web stream on a property. + rpc UpdateWebDataStream(UpdateWebDataStreamRequest) returns (WebDataStream) { + option (google.api.http) = { + patch: "/v1alpha/{web_data_stream.name=properties/*/webDataStreams/*}" + body: "web_data_stream" + }; + option (google.api.method_signature) = "web_data_stream,update_mask"; + } + + // Creates a web stream with the specified location and attributes. + rpc CreateWebDataStream(CreateWebDataStreamRequest) returns (WebDataStream) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/webDataStreams" + body: "web_data_stream" + }; + option (google.api.method_signature) = "parent,web_data_stream"; + } + + // Returns child web data streams under the specified parent property. + // + // Web data streams will be excluded if the caller does not have access. + // Returns an empty list if no relevant web data streams are found. + rpc ListWebDataStreams(ListWebDataStreamsRequest) returns (ListWebDataStreamsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/webDataStreams" + }; + option (google.api.method_signature) = "parent"; + } + + // Lookup for a single IosAppDataStream + // + // Throws "Target not found" if no such iOS app data stream found, or if the + // caller does not have permissions to access it. + rpc GetIosAppDataStream(GetIosAppDataStreamRequest) returns (IosAppDataStream) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/iosAppDataStreams/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes an iOS app stream on a property. + rpc DeleteIosAppDataStream(DeleteIosAppDataStreamRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/iosAppDataStreams/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an iOS app stream on a property. + rpc UpdateIosAppDataStream(UpdateIosAppDataStreamRequest) returns (IosAppDataStream) { + option (google.api.http) = { + patch: "/v1alpha/{ios_app_data_stream.name=properties/*/iosAppDataStreams/*}" + body: "ios_app_data_stream" + }; + option (google.api.method_signature) = "ios_app_data_stream,update_mask"; + } + + // Creates an iOS app data stream with the specified location and attributes. + rpc CreateIosAppDataStream(CreateIosAppDataStreamRequest) returns (IosAppDataStream) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/iosAppDataStreams" + body: "ios_app_data_stream" + }; + option (google.api.method_signature) = "parent,ios_app_data_stream"; + } + + // Returns child iOS app data streams under the specified parent property. + // + // iOS app data streams will be excluded if the caller does not have access. + // Returns an empty list if no relevant iOS app data streams are found. + rpc ListIosAppDataStreams(ListIosAppDataStreamsRequest) returns (ListIosAppDataStreamsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/iosAppDataStreams" + }; + option (google.api.method_signature) = "parent"; + } + + // Lookup for a single AndroidAppDataStream + // + // Throws "Target not found" if no such android app data stream found, or if + // the caller does not have permissions to access it. + rpc GetAndroidAppDataStream(GetAndroidAppDataStreamRequest) returns (AndroidAppDataStream) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/androidAppDataStreams/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes an android app stream on a property. + rpc DeleteAndroidAppDataStream(DeleteAndroidAppDataStreamRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/androidAppDataStreams/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an android app stream on a property. + rpc UpdateAndroidAppDataStream(UpdateAndroidAppDataStreamRequest) returns (AndroidAppDataStream) { + option (google.api.http) = { + patch: "/v1alpha/{android_app_data_stream.name=properties/*/androidAppDataStreams/*}" + body: "android_app_data_stream" + }; + option (google.api.method_signature) = "android_app_data_stream,update_mask"; + } + + // Creates an android app stream with the specified location and attributes. + rpc CreateAndroidAppDataStream(CreateAndroidAppDataStreamRequest) returns (AndroidAppDataStream) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/androidAppDataStreams" + body: "android_app_data_stream" + }; + option (google.api.method_signature) = "parent,android_app_data_stream"; + } + + // Returns child android app streams under the specified parent property. + // + // Android app streams will be excluded if the caller does not have access. + // Returns an empty list if no relevant android app streams are found. + rpc ListAndroidAppDataStreams(ListAndroidAppDataStreamsRequest) returns (ListAndroidAppDataStreamsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/androidAppDataStreams" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the singleton enhanced measurement settings for this web stream. + // Note that the stream must enable enhanced measurement for these settings to + // take effect. + rpc GetEnhancedMeasurementSettings(GetEnhancedMeasurementSettingsRequest) returns (EnhancedMeasurementSettings) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/webDataStreams/*/enhancedMeasurementSettings}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the singleton enhanced measurement settings for this web stream. + // Note that the stream must enable enhanced measurement for these settings to + // take effect. + rpc UpdateEnhancedMeasurementSettings(UpdateEnhancedMeasurementSettingsRequest) returns (EnhancedMeasurementSettings) { + option (google.api.http) = { + patch: "/v1alpha/{enhanced_measurement_settings.name=properties/*/webDataStreams/*/enhancedMeasurementSettings}" + body: "enhanced_measurement_settings" + }; + option (google.api.method_signature) = "enhanced_measurement_settings,update_mask"; + } + + // Creates a FirebaseLink. + // + // Properties can have at most one FirebaseLink. + rpc CreateFirebaseLink(CreateFirebaseLinkRequest) returns (FirebaseLink) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/firebaseLinks" + body: "firebase_link" + }; + option (google.api.method_signature) = "parent,firebase_link"; + } + + // Updates a FirebaseLink on a property + rpc UpdateFirebaseLink(UpdateFirebaseLinkRequest) returns (FirebaseLink) { + option (google.api.http) = { + patch: "/v1alpha/{firebase_link.name=properties/*/firebaseLinks/*}" + body: "firebase_link" + }; + option (google.api.method_signature) = "firebase_link,update_mask"; + } + + // Deletes a FirebaseLink on a property + rpc DeleteFirebaseLink(DeleteFirebaseLinkRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/firebaseLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists FirebaseLinks on a property. + // Properties can have at most one FirebaseLink. + rpc ListFirebaseLinks(ListFirebaseLinksRequest) returns (ListFirebaseLinksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/firebaseLinks" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the Site Tag for the specified web stream. + // Site Tags are immutable singletons. + rpc GetGlobalSiteTag(GetGlobalSiteTagRequest) returns (GlobalSiteTag) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/webDataStreams/*/globalSiteTag}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a GoogleAdsLink. + rpc CreateGoogleAdsLink(CreateGoogleAdsLinkRequest) returns (GoogleAdsLink) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/googleAdsLinks" + body: "google_ads_link" + }; + option (google.api.method_signature) = "parent,google_ads_link"; + } + + // Updates a GoogleAdsLink on a property + rpc UpdateGoogleAdsLink(UpdateGoogleAdsLinkRequest) returns (GoogleAdsLink) { + option (google.api.http) = { + patch: "/v1alpha/{google_ads_link.name=properties/*/googleAdsLinks/*}" + body: "google_ads_link" + }; + option (google.api.method_signature) = "google_ads_link,update_mask"; + } + + // Deletes a GoogleAdsLink on a property + rpc DeleteGoogleAdsLink(DeleteGoogleAdsLinkRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/googleAdsLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists GoogleAdsLinks on a property. + rpc ListGoogleAdsLinks(ListGoogleAdsLinksRequest) returns (ListGoogleAdsLinksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/googleAdsLinks" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request message for GetAccount RPC. +message GetAccountRequest { + // Required. The name of the account to lookup. + // Format: accounts/{account_id} + // Example: "accounts/100" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/Account" + } + ]; +} + +// Request message for ListAccounts RPC. +message ListAccountsRequest { + // The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 1; + + // A page token, received from a previous `ListAccounts` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListAccounts` must + // match the call that provided the page token. + string page_token = 2; + + // Whether to include soft-deleted (ie: "trashed") Accounts in the + // results. Accounts can be inspected to determine whether they are deleted or + // not. + bool show_deleted = 3; +} + +// Request message for ListAccounts RPC. +message ListAccountsResponse { + // Results that were accessible to the caller. + repeated Account accounts = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for DeleteAccount RPC. +message DeleteAccountRequest { + // Required. The name of the Account to soft-delete. + // Format: accounts/{account_id} + // Example: "accounts/100" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/Account" + } + ]; +} + +// Request message for UpdateAccount RPC. +message UpdateAccountRequest { + // Required. The account to update. + // The account's `name` field is used to identify the account. + Account account = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. Omitted fields will not be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for ProvisionAccountTicket RPC. +message ProvisionAccountTicketRequest { + // The account to create. + Account account = 1; + + // Redirect URI where the user will be sent after accepting Terms of Service. + // Must be configured in Developers Console as a Redirect URI + string redirect_uri = 2; +} + +// Response message for ProvisionAccountTicket RPC. +message ProvisionAccountTicketResponse { + // The param to be passed in the ToS link. + string account_ticket_id = 1; +} + +// Request message for GetProperty RPC. +message GetPropertyRequest { + // Required. The name of the property to lookup. + // Format: properties/{property_id} + // Example: "properties/1000" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/Property" + } + ]; +} + +// Request message for ListProperties RPC. +message ListPropertiesRequest { + // Required. An expression for filtering the results of the request. + // Fields eligible for filtering are: + // `parent:`(The resource name of the parent account) or + // `firebase_project:`(The id or number of the linked firebase project). + // Some examples of filters: + // + // | Filter | Description | + // |-----------------------------|-------------------------------------------| + // | parent:accounts/123 | The account with account id: 123. | + // | firebase_project:project-id | The firebase project with id: project-id. | + // | firebase_project:123 | The firebase project with number: 123. | + string filter = 1 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 2; + + // A page token, received from a previous `ListProperties` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListProperties` must + // match the call that provided the page token. + string page_token = 3; + + // Whether to include soft-deleted (ie: "trashed") Properties in the + // results. Properties can be inspected to determine whether they are deleted + // or not. + bool show_deleted = 4; +} + +// Response message for ListProperties RPC. +message ListPropertiesResponse { + // Results that matched the filter criteria and were accessible to the caller. + repeated Property properties = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for UpdateProperty RPC. +message UpdatePropertyRequest { + // Required. The property to update. + // The property's `name` field is used to identify the property to be + // updated. + Property property = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. Omitted fields will not be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for CreateProperty RPC. +message CreatePropertyRequest { + // Required. The property to create. + // Note: the supplied property must specify its parent. + Property property = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteProperty RPC. +message DeletePropertyRequest { + // Required. The name of the Property to soft-delete. + // Format: properties/{property_id} + // Example: "properties/1000" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/Property" + } + ]; +} + +// Request message for GetUserLink RPC. +message GetUserLinkRequest { + // Required. Example format: accounts/1234/userLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/UserLink" + } + ]; +} + +// Request message for BatchGetUserLinks RPC. +message BatchGetUserLinksRequest { + // Required. The account or property that all user links in the request are + // for. The parent of all provided values for the 'names' field must match + // this field. + // Example format: accounts/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsmanagement.googleapis.com/UserLink" + } + ]; + + // Required. The names of the user links to retrieve. + // A maximum of 1000 user links can be retrieved in a batch. + // Format: accounts/{accountId}/userLinks/{userLinkId} + repeated string names = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/UserLink" + } + ]; +} + +// Response message for BatchGetUserLinks RPC. +message BatchGetUserLinksResponse { + // The requested user links. + repeated UserLink user_links = 1; +} + +// Request message for ListUserLinks RPC. +message ListUserLinksRequest { + // Required. Example format: accounts/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsmanagement.googleapis.com/UserLink" + } + ]; + + // The maximum number of user links to return. + // The service may return fewer than this value. + // If unspecified, at most 200 user links will be returned. + // The maximum value is 500; values above 500 will be coerced to 500. + int32 page_size = 2; + + // A page token, received from a previous `ListUserLinks` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListUserLinks` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListUserLinks RPC. +message ListUserLinksResponse { + // List of UserLinks. These will be ordered stably, but in an arbitrary order. + repeated UserLink user_links = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for AuditUserLinks RPC. +message AuditUserLinksRequest { + // Required. Example format: accounts/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsmanagement.googleapis.com/UserLink" + } + ]; + + // The maximum number of user links to return. + // The service may return fewer than this value. + // If unspecified, at most 1000 user links will be returned. + // The maximum value is 5000; values above 5000 will be coerced to 5000. + int32 page_size = 2; + + // A page token, received from a previous `AuditUserLinks` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `AuditUserLinks` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for AuditUserLinks RPC. +message AuditUserLinksResponse { + // List of AuditUserLinks. These will be ordered stably, but in an arbitrary + // order. + repeated AuditUserLink user_links = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for CreateUserLink RPC. +// +// Users can have multiple email addresses associated with their Google +// account, and one of these email addresses is the "primary" email address. +// Any of the email addresses associated with a Google account may be used +// for a new UserLink, but the returned UserLink will always contain the +// "primary" email address. As a result, the input and output email address +// for this request may differ. +message CreateUserLinkRequest { + // Required. Example format: accounts/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsmanagement.googleapis.com/UserLink" + } + ]; + + // Required. The user link to create. + UserLink user_link = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for BatchCreateUserLinks RPC. +message BatchCreateUserLinksRequest { + // Required. The account or property that all user links in the request are for. + // This field is required. The parent field in the CreateUserLinkRequest + // messages must either be empty or match this field. + // Example format: accounts/1234 + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The requests specifying the user links to create. + // A maximum of 1000 user links can be created in a batch. + repeated CreateUserLinkRequest requests = 2; +} + +// Response message for BatchCreateUserLinks RPC. +message BatchCreateUserLinksResponse { + // The user links created. + repeated UserLink user_links = 1; +} + +// Request message for UpdateUserLink RPC. +message UpdateUserLinkRequest { + // Required. The user link to update. + UserLink user_link = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for BatchUpdateUserLinks RPC. +message BatchUpdateUserLinksRequest { + // Required. The account or property that all user links in the request are + // for. The parent field in the UpdateUserLinkRequest messages must either be + // empty or match this field. + // Example format: accounts/1234 + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The requests specifying the user links to update. + // A maximum of 1000 user links can be updated in a batch. + repeated UpdateUserLinkRequest requests = 2; +} + +// Response message for BatchUpdateUserLinks RPC. +message BatchUpdateUserLinksResponse { + // The user links updated. + repeated UserLink user_links = 1; +} + +// Request message for DeleteUserLink RPC. +message DeleteUserLinkRequest { + // Required. Example format: accounts/1234/userLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/UserLink" + } + ]; +} + +// Request message for BatchDeleteUserLinks RPC. +message BatchDeleteUserLinksRequest { + // Required. The account or property that all user links in the request are + // for. The parent of all values for user link names to delete must match this + // field. + // Example format: accounts/1234 + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The requests specifying the user links to update. + // A maximum of 1000 user links can be updated in a batch. + repeated DeleteUserLinkRequest requests = 2; +} + +// Request message for GetWebDataStream RPC. +message GetWebDataStreamRequest { + // Required. The name of the web data stream to lookup. + // Format: properties/{property_id}/webDataStreams/{stream_id} + // Example: "properties/123/webDataStreams/456" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/WebDataStream" + } + ]; +} + +// Request message for DeleteWebDataStream RPC. +message DeleteWebDataStreamRequest { + // Required. The name of the web data stream to delete. + // Format: properties/{property_id}/webDataStreams/{stream_id} + // Example: "properties/123/webDataStreams/456" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/WebDataStream" + } + ]; +} + +// Request message for UpdateWebDataStream RPC. +message UpdateWebDataStreamRequest { + // Required. The web stream to update. + // The `name` field is used to identify the web stream to be updated. + WebDataStream web_data_stream = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. Omitted fields will not be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for CreateWebDataStream RPC. +message CreateWebDataStreamRequest { + // Required. The web stream to create. + WebDataStream web_data_stream = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The parent resource where this web data stream will be created. + // Format: properties/123 + string parent = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsmanagement.googleapis.com/WebDataStream" + } + ]; +} + +// Request message for ListWebDataStreams RPC. +message ListWebDataStreamsRequest { + // Required. The name of the parent property. + // For example, to list results of web streams under the property with Id + // 123: "properties/123" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsmanagement.googleapis.com/WebDataStream" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 2; + + // A page token, received from a previous `ListWebDataStreams` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListWebDataStreams` must + // match the call that provided the page token. + string page_token = 3; +} + +// Request message for ListWebDataStreams RPC. +message ListWebDataStreamsResponse { + // Results that matched the filter criteria and were accessible to the caller. + repeated WebDataStream web_data_streams = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for GetIosAppDataStream RPC. +message GetIosAppDataStreamRequest { + // Required. The name of the iOS app data stream to lookup. + // Format: properties/{property_id}/iosAppDataStreams/{stream_id} + // Example: "properties/123/iosAppDataStreams/456" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/IosAppDataStream" + } + ]; +} + +// Request message for DeleteIosAppDataStream RPC. +message DeleteIosAppDataStreamRequest { + // Required. The name of the iOS app data stream to delete. + // Format: properties/{property_id}/iosAppDataStreams/{stream_id} + // Example: "properties/123/iosAppDataStreams/456" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/IosAppDataStream" + } + ]; +} + +// Request message for UpdateIosAppDataStream RPC. +message UpdateIosAppDataStreamRequest { + // Required. The iOS app stream to update. + // The `name` field is used to identify the iOS app stream to be updated. + IosAppDataStream ios_app_data_stream = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. Omitted fields will not be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for CreateIosAppDataStream RPC. +message CreateIosAppDataStreamRequest { + // Required. The iOS app data stream to create. + IosAppDataStream ios_app_data_stream = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The parent resource where this ios app data stream will be created. + // Format: properties/123 + string parent = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsmanagement.googleapis.com/IosAppDataStream" + } + ]; +} + +// Request message for ListIosAppDataStreams RPC. +message ListIosAppDataStreamsRequest { + // Required. The name of the parent property. + // For example, to list results of app streams under the property with Id + // 123: "properties/123" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsmanagement.googleapis.com/IosAppDataStream" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 2; + + // A page token, received from a previous `ListIosAppDataStreams` + // call. Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListIosAppDataStreams` + // must match the call that provided the page token. + string page_token = 3; +} + +// Request message for ListIosAppDataStreams RPC. +message ListIosAppDataStreamsResponse { + // Results that matched the filter criteria and were accessible to the caller. + repeated IosAppDataStream ios_app_data_streams = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for GetAndroidAppDataStream RPC. +message GetAndroidAppDataStreamRequest { + // Required. The name of the android app data stream to lookup. + // Format: properties/{property_id}/androidAppDataStreams/{stream_id} + // Example: "properties/123/androidAppDataStreams/456" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/AndroidAppDataStream" + } + ]; +} + +// Request message for DeleteAndroidAppDataStream RPC. +message DeleteAndroidAppDataStreamRequest { + // Required. The name of the android app data stream to delete. + // Format: properties/{property_id}/androidAppDataStreams/{stream_id} + // Example: "properties/123/androidAppDataStreams/456" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/AndroidAppDataStream" + } + ]; +} + +// Request message for UpdateAndroidAppDataStream RPC. +message UpdateAndroidAppDataStreamRequest { + // Required. The android app stream to update. + // The `name` field is used to identify the android app stream to be updated. + AndroidAppDataStream android_app_data_stream = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. Omitted fields will not be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for CreateAndroidAppDataStream RPC. +message CreateAndroidAppDataStreamRequest { + // Required. The android app stream to create. + AndroidAppDataStream android_app_data_stream = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The parent resource where this android app data stream will be created. + // Format: properties/123 + string parent = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsmanagement.googleapis.com/AndroidAppDataStream" + } + ]; +} + +// Request message for ListAndroidAppDataStreams RPC. +message ListAndroidAppDataStreamsRequest { + // Required. The name of the parent property. + // For example, to limit results to app streams under the property with Id + // 123: "properties/123" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsmanagement.googleapis.com/AndroidAppDataStream" + } + ]; + + // The maximum number of resources to return. + // + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 2; + + // A page token, received from a previous call. Provide this to + // retrieve the subsequent page. + // When paginating, all other parameters provided to + // `ListAndroidAppDataStreams` must match the call that provided the page + // token. + string page_token = 3; +} + +// Request message for ListAndroidDataStreams RPC. +message ListAndroidAppDataStreamsResponse { + // Results that matched the filter criteria and were accessible to the caller. + repeated AndroidAppDataStream android_app_data_streams = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for GetEnhancedMeasurementSettings RPC. +message GetEnhancedMeasurementSettingsRequest { + // Required. The name of the settings to lookup. + // Format: + // properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings + // Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/EnhancedMeasurementSettings" + } + ]; +} + +// Request message for UpdateEnhancedMeasurementSettings RPC. +message UpdateEnhancedMeasurementSettingsRequest { + // Required. The settings to update. + // The `name` field is used to identify the settings to be updated. + EnhancedMeasurementSettings enhanced_measurement_settings = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. Omitted fields will not be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for CreateFirebaseLink RPC +message CreateFirebaseLinkRequest { + // Required. Format: properties/{property_id} + // Example: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsmanagement.googleapis.com/FirebaseLink" + } + ]; + + // Required. The Firebase link to create. + FirebaseLink firebase_link = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateFirebaseLink RPC +message UpdateFirebaseLinkRequest { + // Required. The Firebase link to update. + FirebaseLink firebase_link = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. Omitted fields will not be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for DeleteFirebaseLink RPC +message DeleteFirebaseLinkRequest { + // Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} + // Example: properties/1234/firebaseLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/FirebaseLink" + } + ]; +} + +// Request message for ListFirebaseLinks RPC +message ListFirebaseLinksRequest { + // Required. Format: properties/{property_id} + // Example: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsmanagement.googleapis.com/FirebaseLink" + } + ]; +} + +// Response message for ListFirebaseLinks RPC +message ListFirebaseLinksResponse { + // List of FirebaseLinks. This will have at most one value. + repeated FirebaseLink firebase_links = 1; +} + +// Request message for GetGlobalSiteTag RPC. +message GetGlobalSiteTagRequest { + // Required. The name of the site tag to lookup. + // Note that site tags are singletons and do not have unique IDs. + // Format: properties/{property_id}/webDataStreams/{stream_id}/globalSiteTag + // Example: "properties/123/webDataStreams/456/globalSiteTag" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/GlobalSiteTag" + } + ]; +} + +// Request message for CreateGoogleAdsLink RPC +message CreateGoogleAdsLinkRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsmanagement.googleapis.com/GoogleAdsLink" + } + ]; + + // Required. The GoogleAdsLink to create. + GoogleAdsLink google_ads_link = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateGoogleAdsLink RPC +message UpdateGoogleAdsLinkRequest { + // The GoogleAdsLink to update + GoogleAdsLink google_ads_link = 1; + + // The list of fields to be updated. Omitted fields will not be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for DeleteGoogleAdsLink RPC. +message DeleteGoogleAdsLinkRequest { + // Required. Example format: properties/1234/googleAdsLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsmanagement.googleapis.com/GoogleAdsLink" + } + ]; +} + +// Request message for ListGoogleAdsLinks RPC. +message ListGoogleAdsLinksRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsmanagement.googleapis.com/GoogleAdsLink" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListGoogleAdsLinks` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListGoogleAdsLinks` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListGoogleAdsLinks RPC. +message ListGoogleAdsLinksResponse { + // List of GoogleAdsLinks. + repeated GoogleAdsLink google_ads_links = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/google/analytics/management/v1alpha/management_grpc_service_config.json b/google/analytics/management/v1alpha/management_grpc_service_config.json new file mode 100644 index 000000000..19d999b66 --- /dev/null +++ b/google/analytics/management/v1alpha/management_grpc_service_config.json @@ -0,0 +1,148 @@ +{ + "methodConfig": [ + { + "timeout": "60s", + "name": [ + { + "service": "google.analytics.management.v1alpha.Management", + "method": "GetAccount" + }, + { + "service": "google.analytics.management.v1alpha.Management", + "method": "ListAccounts" + }, + { + "service": "google.analytics.management.v1alpha.Management", + "method": "DeleteAccount" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "UpdateAccount" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "ProvisionAccountTicket" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "GetProperty" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "ListProperties" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "DeleteProperty" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "CreateProperty" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "UpdateProperty" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "GetUserLink" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "BatchGetUserLinks" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "ListUserLinks" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "AuditUserLinks" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "CreateUserLink" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "BatchCreateUserLinks" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "UpdateUserLink" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "BatchUpdateUserLinks" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "DeleteUserLink" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "BatchDeleteUserLinks" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "GetWebDataStream" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "UpdateWebDataStream" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "CreateWebDataStream" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "ListWebDataStreams" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "GetIosAppDataStream" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "DeleteIosAppDataStream" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "UpdateIosAppDataStream" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "CreateIosAppDataStream" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "ListIosAppDataStreams" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "GetAndroidAppDataStream" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "DeleteAndroidAppDataStream" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "UpdateAndroidAppDataStream" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "CreateAndroidAppDataStream" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "ListAndroidAppDataStreams" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "GetEnhancedMeasurementSettings" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "UpdateEnhancedMeasurementSettings" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "CreateFirebaseLink" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "UpdateFirebaseLink" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "DeleteFirebaseLink" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "ListFirebaseLinks" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "GetGlobalSiteTag" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "CreateGoogleAdsLink" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "UpdateGoogleAdsLink" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "DeleteGoogleAdsLink" + }, { + "service": "google.analytics.management.v1alpha.Management", + "method": "ListGoogleAdsLinks" + } + ], + "timeout": "60s" + } + ] +} diff --git a/google/analytics/management/v1alpha/resources.proto b/google/analytics/management/v1alpha/resources.proto new file mode 100644 index 000000000..2db63ff62 --- /dev/null +++ b/google/analytics/management/v1alpha/resources.proto @@ -0,0 +1,526 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.analytics.management.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/management/v1alpha;management"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.analytics.management.v1alpha"; + +// NEXT TAG: 7 +// A resource message representing a Google Analytics account. +message Account { + option (google.api.resource) = { + type: "analyticsmanagement.googleapis.com/Account" + pattern: "accounts/{account}" + }; + + // Output only. Resource name of this account. + // Format: accounts/{account_id} + // Example: "accounts/100" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this account was originally created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when account payload fields were last updated. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Human-readable display name for this account. + string display_name = 4; + + // Country of business. Must be a non-deprecated code for a UN M.49 region. + // https://unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html + string country_code = 5; + + // Output only. Indicates whether this Account is soft-deleted or not. Deleted + // accounts are excluded from List results unless specifically requested. + bool deleted = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// NEXT TAG: 10 +// A resource message representing a Google Analytics App+Web property. +message Property { + option (google.api.resource) = { + type: "analyticsmanagement.googleapis.com/Property" + pattern: "properties/{property}" + }; + + // Output only. Resource name of this property. + // Format: properties/{property_id} + // Example: "properties/1000" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the entity was originally created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when entity payload fields were last updated. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Resource name of this property's logical parent. + // + // Note: The Property-Moving UI can be used to change the parent. + // Format: accounts/{account_id} + // Example: "accounts/100" + string parent = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Human-readable display name for this property. + string display_name = 5; + + // Industry associated with this property + // Example: AUTOMOTIVE, FOOD_AND_DRINK + IndustryCategory industry_category = 6; + + // Reporting Time Zone, used as the day boundary for reports, regardless of + // where the data originates. If the time zone honors DST, Analytics will + // automatically adjust for the changes. + // + // NOTE: Changing the time zone only affects data going forward, and is not + // applied retroactively. + // + // Format: https://www.iana.org/time-zones + // Example: "America/Los_Angeles" + string time_zone = 7; + + // The currency type used in reports involving monetary values. + // + // + // Format: https://en.wikipedia.org/wiki/ISO_4217 + // Examples: "USD", "EUR", "JPY" + string currency_code = 8; + + // Output only. Indicates whether this Property is soft-deleted or not. Deleted properties + // are excluded from List results unless specifically requested. + bool deleted = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A resource message representing a Google Analytics Android app stream. +message AndroidAppDataStream { + option (google.api.resource) = { + type: "analyticsmanagement.googleapis.com/AndroidAppDataStream" + pattern: "properties/{property}/androidAppDataStreams/{android_app_data_stream}" + }; + + // Output only. Resource name of this Data Stream. + // Format: properties/{property_id}/androidAppDataStreams/{stream_id} + // Example: "properties/1000/androidAppDataStreams/2000" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Analytics "Measurement ID", without the "G-" prefix. + // ex: "G-1A2BCD345E" would just be "1A2BCD345E" + string measurement_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the corresponding Android app in Firebase, if any. + // This ID can change if the Android app is deleted and recreated. + string firebase_app_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this stream was originally created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when stream payload fields were last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The package name for the app being measured. + // Example: "com.example.myandroidapp" + string package_name = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Human-readable display name for the Data Stream. + string display_name = 7; +} + +// A resource message representing a Google Analytics IOS app stream. +message IosAppDataStream { + option (google.api.resource) = { + type: "analyticsmanagement.googleapis.com/IosAppDataStream" + pattern: "properties/{property}/iosAppDataStreams/{ios_app_data_stream}" + }; + + // Output only. Resource name of this Data Stream. + // Format: properties/{property_id}/iosAppDataStreams/{stream_id} + // Example: "properties/1000/iosAppDataStreams/2000" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Analytics "Measurement ID", without the "G-" prefix. + // Example: "G-1A2BCD345E" would just be "1A2BCD345E" + string measurement_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the corresponding iOS app in Firebase, if any. + // This ID can change if the iOS app is deleted and recreated. + string firebase_app_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this stream was originally created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when stream payload fields were last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The Apple App Store Bundle ID for the app + // Example: "com.example.myiosapp" + string bundle_id = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Human-readable display name for the Data Stream. + string display_name = 7; +} + +// A resource message representing a Google Analytics web stream. +message WebDataStream { + option (google.api.resource) = { + type: "analyticsmanagement.googleapis.com/WebDataStream" + pattern: "properties/{property}/webDataStreams/{web_data_stream}" + }; + + // Output only. Resource name of this Data Stream. + // Format: properties/{property_id}/webDataStreams/{stream_id} + // Example: "properties/1000/webDataStreams/2000" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Analytics "Measurement ID", without the "G-" prefix. + // Example: "G-1A2BCD345E" would just be "1A2BCD345E" + string measurement_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the corresponding web app in Firebase, if any. + // This ID can change if the web app is deleted and recreated. + string firebase_app_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this stream was originally created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when stream payload fields were last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Domain name of the web app being measured, or empty. + // Example: "http://www.google.com", "https://www.google.com" + string default_uri = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Human-readable display name for the Data Stream. + string display_name = 7; +} + +// A resource message representing a user's permissions on an Account or +// Property resource. +message UserLink { + option (google.api.resource) = { + type: "analyticsmanagement.googleapis.com/UserLink" + pattern: "accounts/{account}/userLinks/{user_link}" + pattern: "properties/{property}/userLinks/{user_link}" + }; + + // Example format: properties/1234/userLinks/5678 + string name = 1; + + // Email address of the user to link + string email_address = 2; + + // Roles directly assigned to this user for this account or property. + // + // Valid values: + // predefinedRoles/read + // predefinedRoles/collaborate + // predefinedRoles/edit + // predefinedRoles/manage-users + // + // Excludes roles that are inherited from a higher-level entity, group, + // or organization admin role. + // + // A UserLink that is updated to have an empty list of direct_roles will be + // deleted. + repeated string direct_roles = 3; +} + +// Read-only resource used to summarize a principal's effective roles. +message AuditUserLink { + // Example format: properties/1234/userLinks/5678 + string name = 1; + + // Email address of the linked user + string email_address = 2; + + // Roles directly assigned to this user for this entity. + // + // Format: predefinedRoles/read + // + // Excludes roles that are inherited from an account (if this is for a + // property), group, or organization admin role. + repeated string direct_roles = 3; + + // Union of all permissions a user has at this account or property (includes + // direct permissions, group-inherited permissions, etc.). + // + // Format: predefinedRoles/read + repeated string effective_roles = 4; +} + +// Singleton resource under a WebDataStream, configuring measurement of +// additional site interactions and content. +message EnhancedMeasurementSettings { + option (google.api.resource) = { + type: "analyticsmanagement.googleapis.com/EnhancedMeasurementSettings" + pattern: "properties/{property}/webDataStreams/{web_data_stream}/enhancedMeasurementSettings" + }; + + // Output only. Resource name of this Data Stream. + // Format: + // properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings + // Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Indicates whether Enhanced Measurement Settings will be used to + // automatically measure interactions and content on this web stream. + // + // Changing this value does not affect the settings themselves, but determines + // whether they are respected. + bool stream_enabled = 2; + + // Output only. If enabled, capture a page view event each time a page loads or the + // website changes the browser history state. + bool page_views_enabled = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // If enabled, capture scroll events each time a visitor gets to the bottom of + // a page. + bool scrolls_enabled = 4; + + // If enabled, capture an outbound click event each time a visitor clicks a + // link that leads them away from your domain. + bool outbound_clicks_enabled = 5; + + // Capture events when your visitors view content on your site that has + // structured data (eg, articles, blog posts, product details screens, etc.). + bool content_views_enabled = 6; + + // If enabled, capture a view search results event each time a visitor + // performs a search on your site (based on a query parameter). + bool site_search_enabled = 7; + + // If enabled, capture a view search results event each time a visitor + // interacts with a form on your site. + bool form_interactions_enabled = 8; + + // If enabled, capture video play, progress, and complete events as visitors + // view embedded videos on your site. + bool video_engagement_enabled = 9; + + // If enabled, capture a file download event each time a link is clicked with + // a common document, compressed file, application, video, or audio extension. + bool file_downloads_enabled = 10; + + // If enabled, capture a click event each time a visitor clicks a link or + // element that has data attributes beginning with "data-ga". + bool data_tagged_element_clicks_enabled = 11; + + // If enabled, capture a page view event each time a page loads. + bool page_loads_enabled = 12; + + // If enabled, capture a page view event each time the website changes the + // browser history state. + bool page_changes_enabled = 13; + + // Capture events when your visitors view content on your site that has + // articles or blog posts. + bool articles_and_blogs_enabled = 14; + + // Capture events when your visitors view content on your site that has + // product details screens, etc. + bool products_and_ecommerce_enabled = 15; + + // Required. URL query parameters to interpret as site search parameters. + // Max length is 1024 characters. Must not be empty. + string search_query_parameter = 16 [(google.api.field_behavior) = REQUIRED]; + + // Additional URL query parameters. + // Max length is 1024 characters. + string url_query_parameter = 17; + + // Domains to exclude from measurement. Max length is 1024 characters. + string excluded_domains = 18; +} + +// A link between an App+Web property and a Firebase project. +message FirebaseLink { + option (google.api.resource) = { + type: "analyticsmanagement.googleapis.com/FirebaseLink" + pattern: "properties/{property}/firebaseLinks/{firebase_link}" + }; + + // Output only. Example format: properties/1234/firebaseLinks/5678 + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Firebase project resource name. When creating a FirebaseLink, you may + // provide this resource name using either a project number or project ID. + // Once this resource has been created, returned FirebaseLinks will always + // have a project_name that contains a project number. + // + // Format: 'projects/{project number}' + // Example: 'projects/1234' + string project = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Time when this FirebaseLink was originally created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Maximum user access to the App + Web property allowed to admins of + // the linked Firebase project. + MaximumUserAccess maximum_user_access = 4; +} + +// Read-only resource with the tag for sending data from a website to a +// WebDataStream. +message GlobalSiteTag { + option (google.api.resource) = { + type: "analyticsmanagement.googleapis.com/GlobalSiteTag" + pattern: "properties/{property}/globalSiteTag" + }; + + // Immutable. JavaScript code snippet to be pasted as the first item into the head tag of + // every webpage to measure. + string snippet = 1 [(google.api.field_behavior) = IMMUTABLE]; +} + +// A link between an App+Web property and a Google Ads account. +message GoogleAdsLink { + option (google.api.resource) = { + type: "analyticsmanagement.googleapis.com/GoogleAdsLink" + pattern: "properties/{property}/googleAdsLinks/{google_ads_link}" + }; + + // Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} + // + // Note: googleAdsLinkId is not the Google Ads customer ID. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Format: properties/{propertyId} + string parent = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Google Ads customer ID. + string customer_id = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. If true, this link is for a Google Ads manager account. + bool can_manage_clients = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Enable personalized advertising features with this integration. + // Automatically publish my Google Analytics audience lists and Google + // Analytics remarketing events/parameters to the linked Google Ads account. + bool ads_personalization_enabled = 5; +} + +// The category selected for this property, used for industry benchmarking. +enum IndustryCategory { + // Industry category unspecified + INDUSTRY_CATEGORY_UNSPECIFIED = 0; + + // Automotive + AUTOMOTIVE = 1; + + // Business and industrial markets + BUSINESS_AND_INDUSTRIAL_MARKETS = 2; + + // Finance + FINANCE = 3; + + // Healthcare + HEALTHCARE = 4; + + // Technology + TECHNOLOGY = 5; + + // Travel + TRAVEL = 6; + + // Other + OTHER = 7; + + // Arts and entertainment + ARTS_AND_ENTERTAINMENT = 8; + + // Beauty and fitness + BEAUTY_AND_FITNESS = 9; + + // Books and literature + BOOKS_AND_LITERATURE = 10; + + // Food and drink + FOOD_AND_DRINK = 11; + + // Games + GAMES = 12; + + // Hobbies and leisure + HOBBIES_AND_LEISURE = 13; + + // Home and garden + HOME_AND_GARDEN = 14; + + // Internet and telecom + INTERNET_AND_TELECOM = 15; + + // Law and government + LAW_AND_GOVERNMENT = 16; + + // News + NEWS = 17; + + // Online communities + ONLINE_COMMUNITIES = 18; + + // People and society + PEOPLE_AND_SOCIETY = 19; + + // Pets and animals + PETS_AND_ANIMALS = 20; + + // Real estate + REAL_ESTATE = 21; + + // Reference + REFERENCE = 22; + + // Science + SCIENCE = 23; + + // Sports + SPORTS = 24; + + // Jobs and education + JOBS_AND_EDUCATION = 25; + + // Shopping + SHOPPING = 26; +} + +// Maximum access settings that Firebase user receive on the linked Analytics +// property. +enum MaximumUserAccess { + // Unspecified maximum user access. + MAXIMUM_USER_ACCESS_UNSPECIFIED = 0; + + // Firebase users have no access to the Analytics property. + NO_ACCESS = 1; + + // Firebase users have Read & Analyze access to the Analytics property. + READ_AND_ANALYZE = 2; + + // Firebase users have edit access to the Analytics property, but may not + // manage the Firebase link. + EDITOR_WITHOUT_LINK_MANAGEMENT = 3; + + // Firebase users have edit access to the Analytics property and may manage + // the Firebase link. + EDITOR_INCLUDING_LINK_MANAGEMENT = 4; +} diff --git a/google/api/BUILD.bazel b/google/api/BUILD.bazel index f7c43cd32..ec6301030 100644 --- a/google/api/BUILD.bazel +++ b/google/api/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -317,8 +319,6 @@ go_proto_library( importpath = "google.golang.org/genproto/googleapis/api", protos = [ ":launch_stage_proto", - "//google/api/experimental:authorization_config_proto", - "//google/api/experimental:experimental_proto", ], deps = [ ":annotations_go_proto", @@ -524,3 +524,148 @@ cc_proto_library( name = "usage_cc_proto", deps = [":usage_proto"], ) + +############################################################################## +# Python +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "py_proto_library") + +py_proto_library( + name = "annotations_py_proto", + deps = [":annotations_proto"], +) + +py_proto_library( + name = "auth_py_proto", + deps = [":auth_proto"], +) + +py_proto_library( + name = "backend_py_proto", + deps = [":backend_proto"], +) + +py_proto_library( + name = "billing_py_proto", + deps = [":billing_proto"], +) + +py_proto_library( + name = "client_py_proto", + deps = [":client_proto"], +) + +py_proto_library( + name = "config_change_py_proto", + deps = [":config_change_proto"], +) + +py_proto_library( + name = "consumer_py_proto", + deps = [":consumer_proto"], +) + +py_proto_library( + name = "context_py_proto", + deps = [":context_proto"], +) + +py_proto_library( + name = "control_py_proto", + deps = [":control_proto"], +) + +py_proto_library( + name = "distribution_py_proto", + deps = [":distribution_proto"], +) + +py_proto_library( + name = "documentation_py_proto", + deps = [":documentation_proto"], +) + +py_proto_library( + name = "endpoint_py_proto", + deps = [":endpoint_proto"], +) + +py_proto_library( + name = "field_behavior_py_proto", + deps = [":field_behavior_proto"], +) + +py_proto_library( + name = "http_py_proto", + deps = [":http_proto"], +) + +py_proto_library( + name = "httpbody_py_proto", + deps = [":httpbody_proto"], +) + +py_proto_library( + name = "label_py_proto", + deps = [":label_proto"], +) + +py_proto_library( + name = "launch_stage_py_proto", + deps = [":launch_stage_proto"], +) + +py_proto_library( + name = "log_py_proto", + deps = [":log_proto"], +) + +py_proto_library( + name = "logging_py_proto", + deps = [":logging_proto"], +) + +py_proto_library( + name = "metric_py_proto", + deps = [":metric_proto"], +) + +py_proto_library( + name = "monitored_resource_py_proto", + deps = [":monitored_resource_proto"], +) + +py_proto_library( + name = "monitoring_py_proto", + deps = ["monitoring_proto"], +) + +py_proto_library( + name = "quota_py_proto", + deps = ["quota_proto"], +) + +py_proto_library( + name = "resource_py_proto", + deps = [":resource_proto"], +) + +py_proto_library( + name = "service_py_proto", + deps = [":service_proto"], +) + +py_proto_library( + name = "source_info_py_proto", + deps = [":source_info_proto"], +) + +py_proto_library( + name = "system_parameter_py_proto", + deps = [":system_parameter_proto"], +) + +py_proto_library( + name = "usage_py_proto", + deps = [":usage_proto"], +) diff --git a/google/api/auth.proto b/google/api/auth.proto index 7c5d61666..1b187cb49 100644 --- a/google/api/auth.proto +++ b/google/api/auth.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -72,6 +71,27 @@ message AuthenticationRule { repeated AuthRequirement requirements = 7; } +// Specifies a location to extract JWT from an API request. +message JwtLocation { + oneof in { + // Specifies HTTP header name to extract JWT token. + string header = 1; + + // Specifies URL query parameter name to extract JWT token. + string query = 2; + } + + // The value prefix. The value format is "value_prefix{token}" + // Only applies to "in" header type. Must be empty for "in" query type. + // If not empty, the header value has to match (case sensitive) this prefix. + // If not matched, JWT will not be extracted. If matched, JWT will be + // extracted after the prefix is removed. + // + // For example, for "Authorization: Bearer {JWT}", + // value_prefix="Bearer " with a space at the end. + string value_prefix = 3; +} + // Configuration for an authentication provider, including support for // [JSON Web Token // (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). @@ -122,6 +142,25 @@ message AuthProvider { // Redirect URL if JWT token is required but not present or is expired. // Implement authorizationUrl of securityDefinitions in OpenAPI spec. string authorization_url = 5; + + // Defines the locations to extract the JWT. + // + // JWT locations can be either from HTTP headers or URL query parameters. + // The rule is that the first match wins. The checking order is: checking + // all headers first, then URL query parameters. + // + // If not specified, default to use following 3 locations: + // 1) Authorization: Bearer + // 2) x-goog-iap-jwt-assertion + // 3) access_token query parameter + // + // Default locations can be specified as followings: + // jwt_locations: + // - header: Authorization + // value_prefix: "Bearer " + // - header: x-goog-iap-jwt-assertion + // - query: access_token + repeated JwtLocation jwt_locations = 6; } // OAuth scopes are a way to define data and permissions on data. For example, diff --git a/google/api/backend.proto b/google/api/backend.proto index 26a16ef41..2dbaa30a7 100644 --- a/google/api/backend.proto +++ b/google/api/backend.proto @@ -96,10 +96,29 @@ message BackendRule { string selector = 1; // The address of the API backend. + // + // The scheme is used to determine the backend protocol and security. + // The following schemes are accepted: + // + // SCHEME PROTOCOL SECURITY + // http:// HTTP None + // https:// HTTP TLS + // grpc:// gRPC None + // grpcs:// gRPC TLS + // + // It is recommended to explicitly include a scheme. Leaving out the scheme + // may cause constrasting behaviors across platforms. + // + // If the port is unspecified, the default is: + // - 80 for schemes without TLS + // - 443 for schemes with TLS + // + // For HTTP backends, use [protocol][google.api.BackendRule.protocol] + // to specify the protocol version. string address = 2; - // The number of seconds to wait for a response from a request. The default - // deadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds. + // The number of seconds to wait for a response from a request. The default + // varies based on the request protocol and deployment environment. double deadline = 3; // Minimum deadline in seconds needed for this method. Calls having deadline @@ -120,8 +139,45 @@ message BackendRule { // // For example, specifying `jwt_audience` implies that the backend expects // authentication via a JWT. + // + // When authentication is unspecified, the resulting behavior is the same + // as `disable_auth` set to `true`. + // + // Refer to https://developers.google.com/identity/protocols/OpenIDConnect for + // JWT ID token. oneof authentication { - // The JWT audience is used when generating a JWT id token for the backend. + // The JWT audience is used when generating a JWT ID token for the backend. + // This ID token will be added in the HTTP "authorization" header, and sent + // to the backend. string jwt_audience = 7; + + // When disable_auth is true, a JWT ID token won't be generated and the + // original "Authorization" HTTP header will be preserved. If the header is + // used to carry the original token and is expected by the backend, this + // field must be set to true to preserve the header. + bool disable_auth = 8; } + + // The protocol used for sending a request to the backend. + // The supported values are "http/1.1" and "h2". + // + // The default value is inferred from the scheme in the + // [address][google.api.BackendRule.address] field: + // + // SCHEME PROTOCOL + // http:// http/1.1 + // https:// http/1.1 + // grpc:// h2 + // grpcs:// h2 + // + // For secure HTTP backends (https://) that support HTTP/2, set this field + // to "h2" for improved performance. + // + // Configuring this field to non-default values is only supported for secure + // HTTP backends. This field will be ignored for all other backends. + // + // See + // https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids + // for more details on the supported values. + string protocol = 9; } diff --git a/google/api/expr/artman_cel.yaml b/google/api/expr/artman_cel.yaml deleted file mode 100644 index 89d2d28b2..000000000 --- a/google/api/expr/artman_cel.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# This file is auto-generated based on service config and could be -# incorrect. The API producer can manually edit it. Remove all the FIXMEs -# before sending this file out for review. -common: - api_name: cel - api_version: v1alpha1 - organization_name: google-cloud - proto_deps: - - name: google-common-protos - src_proto_paths: - - v1alpha1 - service_yaml: cel.yaml - gapic_yaml: v1alpha1/cel_gapic.yaml -artifacts: -- name: gapic_config - type: GAPIC_CONFIG -- name: java_gapic - type: GAPIC - language: JAVA -- name: python_gapic - type: GAPIC - language: PYTHON -- name: nodejs_gapic - type: GAPIC - language: NODEJS -- name: php_gapic - type: GAPIC - language: PHP -- name: go_gapic - type: GAPIC - language: GO -- name: ruby_gapic - type: GAPIC - language: RUBY -- name: csharp_gapic - type: GAPIC - language: CSHARP diff --git a/google/api/expr/v1alpha1/BUILD.bazel b/google/api/expr/v1alpha1/BUILD.bazel index 6334c9d3d..c2e842bc3 100644 --- a/google/api/expr/v1alpha1/BUILD.bazel +++ b/google/api/expr/v1alpha1/BUILD.bazel @@ -1,32 +1,37 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## -load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") +load("@rules_proto//proto:defs.bzl", "proto_library") proto_library( - name = "cel_service_proto", - srcs = ["cel_service.proto"], - deps = [ - ":conformance_service_proto", + name = "expr_proto", + srcs = [ + "checked.proto", + "eval.proto", + "explain.proto", + "syntax.proto", + "value.proto", ], -) - -proto_library( - name = "checked_proto", - srcs = ["checked.proto"], deps = [ - ":syntax_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", ], ) proto_library( name = "conformance_service_proto", - srcs = ["conformance_service.proto"], + srcs = [ + "conformance_service.proto", + ], deps = [ ":checked_proto", ":eval_proto", @@ -35,6 +40,16 @@ proto_library( ], ) +proto_library( + name = "checked_proto", + srcs = ["checked.proto"], + deps = [ + ":syntax_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:struct_proto", + ], +) + proto_library( name = "eval_proto", srcs = ["eval.proto"], @@ -71,90 +86,29 @@ proto_library( ], ) -proto_library( - name = "cel_proto", - srcs = [ - "cel_service.proto", - "checked.proto", - "conformance_service.proto", - "eval.proto", - "explain.proto", - "syntax.proto", - "value.proto", - ], - deps = [ - "//google/rpc:status_proto", - "@com_google_protobuf//:any_proto", - "@com_google_protobuf//:duration_proto", - "@com_google_protobuf//:empty_proto", - "@com_google_protobuf//:struct_proto", - "@com_google_protobuf//:timestamp_proto", - ], -) - -proto_library_with_info( - name = "cel_proto_with_info", - deps = [":cel_proto"], -) - ############################################################################## # Java ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", - "java_gapic_library", - "java_gapic_assembly_gradle_pkg", "java_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] +java_proto_library( + name = "expr_java_proto", + deps = [":expr_proto"], +) java_proto_library( - name = "cel_java_proto", - deps = [":cel_proto"], + name = "conformance_service_java_proto", + deps = [":conformance_service_proto"], ) java_grpc_library( - name = "cel_java_grpc", - srcs = [":cel_proto"], - deps = [":cel_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_gapic_library( - name = "cel_java_gapic", - src = ":cel_proto_with_info", - gapic_yaml = "cel_gapic.yaml", - service_yaml = "//google/api/expr:cel.yaml", - test_deps = [":cel_java_grpc"], - deps = [":cel_java_proto"] + _JAVA_GRPC_DEPS, -) - -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [":cel_java_gapic_test"], -) for test_name in [ - "com.google.cloud.api.expr.v1alpha1.CelServiceClientTest", - "com.google.cloud.api.expr.v1alpha1.ConformanceServiceClientTest", -]] - -# Opensource Packages -java_gapic_assembly_gradle_pkg( - name = "google-cloud-cel-v1alpha1-java", - client_deps = [":cel_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":cel_java_gapic_test"], - grpc_deps = [":cel_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":cel_java_proto", - ":cel_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + name = "conformance_service_java_grpc", + srcs = [":conformance_service_proto"], + deps = [":conformance_service_java_proto"], ) ############################################################################## @@ -163,68 +117,162 @@ java_gapic_assembly_gradle_pkg( load( "@com_google_googleapis_imports//:imports.bzl", "go_proto_library", - "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "cel_go_proto", + name = "expr_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/api/expr/v1alpha1", - protos = [":cel_proto"], + protos = [":expr_proto"], deps = [ - "//google/api:annotations_go_proto", "//google/rpc:status_go_proto", ], ) -go_gapic_library( - name = "cel_go_gapic", - src = ":cel_proto_with_info", - gapic_yaml = "cel_gapic.yaml", - importpath = "cloud.google.com/go/expr/apiv1alpha1", - service_yaml = "//google/api/expr:cel.yaml", - deps = [":cel_go_proto"], +go_proto_library( + name = "conformance_service_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/api/expr/conformance/v1alpha1", + protos = [":conformance_service_proto"], + deps = [ + ":expr_go_proto", + "//google/rpc:status_go_proto", + ], ) -go_test( - name = "cel_go_gapic_test", - srcs = [":cel_go_gapic_srcjar_test"], - embed = [":cel_go_gapic"], - importpath = "cloud.google.com/go/expr/apiv1alpha1", + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", ) -# Opensource Packages -go_gapic_assembly_pkg( - name = "gapi-cloud-cel-v1alpha1-go", +moved_proto_library( + name = "expr_moved_proto", + srcs = [":expr_proto"], deps = [ - ":cel_go_gapic", - ":cel_go_gapic_srcjar-smoke-test.srcjar", - ":cel_go_gapic_srcjar-test.srcjar", - ":cel_go_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", ], ) +moved_proto_library( + name = "conformance_service_moved_proto", + srcs = [":conformance_service_proto"], + deps = [ + ":expr_moved_proto", + "//google/rpc:status_proto", + ], +) + +py_proto_library( + name = "expr_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":expr_moved_proto"], +) + +py_proto_library( + name = "conformance_service_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":conformance_service_moved_proto"], +) + +py_grpc_library( + name = "conformance_service_py_grpc", + srcs = [":conformance_service_moved_proto"], + deps = [":conformance_service_py_proto"], +) + ############################################################################## -# C++ +# PHP ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "cc_grpc_library", - "cc_proto_library", + "php_grpc_library", + "php_proto_library", ) -cc_proto_library( - name = "cel_service_cc_proto", - deps = [":cel_service_proto"], +php_proto_library( + name = "expr_php_proto", + deps = [":expr_proto"], ) -cc_grpc_library( - name = "cel_service_cc_grpc", - srcs = [":cel_service_proto"], - deps = [":cel_service_cc_proto"], - grpc_only = True, +php_proto_library( + name = "conformance_service_php_proto", + deps = [":conformance_service_proto"], +) + +php_grpc_library( + name = "conformance_service_php_grpc", + srcs = [":conformance_service_proto"], + deps = [":conformance_service_php_proto"], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "expr_ruby_proto", + deps = [":expr_proto"], +) + +ruby_proto_library( + name = "conformance_service_ruby_proto", + deps = [":conformance_service_proto"], +) + +ruby_grpc_library( + name = "conformance_service_ruby_grpc", + srcs = [":conformance_service_proto"], + deps = [":conformance_service_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "expr_csharp_proto", + deps = [":expr_proto"], +) + +csharp_proto_library( + name = "conformance_service_csharp_proto", + deps = [":conformance_service_proto"], +) + +csharp_grpc_library( + name = "conformance_service_csharp_grpc", + srcs = [":conformance_service_proto"], + deps = [":conformance_service_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", ) cc_proto_library( @@ -240,8 +288,9 @@ cc_proto_library( cc_grpc_library( name = "conformance_service_cc_grpc", srcs = [":conformance_service_proto"], - deps = [":conformance_service_cc_proto"], + generate_mocks = True, grpc_only = True, + deps = [":conformance_service_cc_proto"], ) cc_proto_library( diff --git a/google/api/expr/v1alpha1/cel_service.proto b/google/api/expr/v1alpha1/cel_service.proto deleted file mode 100644 index 0bf649ff5..000000000 --- a/google/api/expr/v1alpha1/cel_service.proto +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2018 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.api.expr.v1alpha1; - -import "google/api/expr/v1alpha1/conformance_service.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr"; -option java_multiple_files = true; -option java_outer_classname = "CelServiceProto"; -option java_package = "com.google.api.expr.v1alpha1"; - -// Access a CEL implementation from another process or machine. -// A CEL implementation is decomposed as a parser, a static checker, -// and an evaluator. Every CEL implementation is expected to provide -// a server for this API. The API will be used for conformance testing, -// utilities, and execution as a service. -service CelService { - // Transforms CEL source text into a parsed representation. - rpc Parse(ParseRequest) returns (ParseResponse) {} - - // Runs static checks on a parsed CEL representation and return - // an annotated representation, or a set of issues. - rpc Check(CheckRequest) returns (CheckResponse) {} - - // Evaluates a parsed or annotation CEL representation given - // values of external bindings. - rpc Eval(EvalRequest) returns (EvalResponse) {} -} diff --git a/google/api/expr/v1alpha1/checked.proto b/google/api/expr/v1alpha1/checked.proto index 60dd09e20..e6333b073 100644 --- a/google/api/expr/v1alpha1/checked.proto +++ b/google/api/expr/v1alpha1/checked.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -236,8 +235,8 @@ message Decl { // logging which are not observable from CEL). message FunctionDecl { // An overload indicates a function's parameter types and return type, and - // may optionally include a function body described in terms of - // [Expr][google.api.expr.v1alpha1.Expr] values. + // may optionally include a function body described in terms of [Expr][google.api.expr.v1alpha1.Expr] + // values. // // Functions overloads are declared in either a function or method // call-style. For methods, the `params[0]` is the expected type of the @@ -249,13 +248,11 @@ message Decl { // Required. Globally unique overload name of the function which reflects // the function name and argument types. // - // This will be used by a [Reference][google.api.expr.v1alpha1.Reference] - // to indicate the `overload_id` that was resolved for the function - // `name`. + // This will be used by a [Reference][google.api.expr.v1alpha1.Reference] to indicate the `overload_id` that + // was resolved for the function `name`. string overload_id = 1; - // List of function parameter [Type][google.api.expr.v1alpha1.Type] - // values. + // List of function parameter [Type][google.api.expr.v1alpha1.Type] values. // // Param types are disjoint after generic type parameters have been // replaced with the type `DYN`. Since the `DYN` type is compatible with @@ -297,11 +294,9 @@ message Decl { // Declarations are organized in containers and this represents the full path // to the declaration in its container, as in `google.api.expr.Decl`. // - // Declarations used as - // [FunctionDecl.Overload][google.api.expr.v1alpha1.Decl.FunctionDecl.Overload] - // parameters may or may not have a name depending on whether the overload is - // function declaration or a function definition containing a result - // [Expr][google.api.expr.v1alpha1.Expr]. + // Declarations used as [FunctionDecl.Overload][google.api.expr.v1alpha1.Decl.FunctionDecl.Overload] parameters may or may not + // have a name depending on whether the overload is function declaration or a + // function definition containing a result [Expr][google.api.expr.v1alpha1.Expr]. string name = 1; // Required. The declaration kind. @@ -326,8 +321,7 @@ message Reference { // presented candidates must happen at runtime because of dynamic types. The // type checker attempts to narrow down this list as much as possible. // - // Empty if this is not a reference to a - // [Decl.FunctionDecl][google.api.expr.v1alpha1.Decl.FunctionDecl]. + // Empty if this is not a reference to a [Decl.FunctionDecl][google.api.expr.v1alpha1.Decl.FunctionDecl]. repeated string overload_id = 3; // For references to constants, this may contain the value of the diff --git a/google/api/expr/v1alpha1/conformance_service.proto b/google/api/expr/v1alpha1/conformance_service.proto index 7a9321a0e..8dfa9d74d 100644 --- a/google/api/expr/v1alpha1/conformance_service.proto +++ b/google/api/expr/v1alpha1/conformance_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -23,7 +22,7 @@ import "google/api/expr/v1alpha1/syntax.proto"; import "google/rpc/status.proto"; option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr"; +option go_package = "google.golang.org/genproto/googleapis/api/expr/conformance/v1alpha1;confpb"; option java_multiple_files = true; option java_outer_classname = "ConformanceServiceProto"; option java_package = "com.google.api.expr.v1alpha1"; @@ -34,16 +33,20 @@ option java_package = "com.google.api.expr.v1alpha1"; // a server for this API. The API will be used for conformance testing // and other utilities. service ConformanceService { + // Transforms CEL source text into a parsed representation. - rpc Parse(ParseRequest) returns (ParseResponse) {} + rpc Parse(ParseRequest) returns (ParseResponse) { + } // Runs static checks on a parsed CEL representation and return // an annotated representation, or a set of issues. - rpc Check(CheckRequest) returns (CheckResponse) {} + rpc Check(CheckRequest) returns (CheckResponse) { + } // Evaluates a parsed or annotation CEL representation given // values of external bindings. - rpc Eval(EvalRequest) returns (EvalResponse) {} + rpc Eval(EvalRequest) returns (EvalResponse) { + } } // Request message for the Parse method. @@ -54,8 +57,7 @@ message ParseRequest { // Tag for version of CEL syntax, for future use. string syntax_version = 2; - // File or resource for source text, used in - // [SourceInfo][google.api.expr.v1alpha1.SourceInfo]. + // File or resource for source text, used in [SourceInfo][google.api.expr.v1alpha1.SourceInfo]. string source_location = 3; // Prevent macro expansion. See "Macros" in Language Defiinition. @@ -85,10 +87,9 @@ message CheckRequest { // Language Definition. string container = 3; - // If true, use only the declarations in - // [type_env][google.api.expr.v1alpha1.CheckRequest.type_env]. If false - // (default), add declarations for the standard definitions to the type - // environment. See "Standard Definitions" in the Language Definition. + // If true, use only the declarations in [type_env][google.api.expr.v1alpha1.CheckRequest.type_env]. If false (default), + // add declarations for the standard definitions to the type environment. See + // "Standard Definitions" in the Language Definition. bool no_std_env = 4; } @@ -113,12 +114,10 @@ message EvalRequest { } // Bindings for the external variables. The types SHOULD be compatible - // with the type environment in - // [CheckRequest][google.api.expr.v1alpha1.CheckRequest], if checked. + // with the type environment in [CheckRequest][google.api.expr.v1alpha1.CheckRequest], if checked. map bindings = 3; - // SHOULD be the same container as used in - // [CheckRequest][google.api.expr.v1alpha1.CheckRequest], if checked. + // SHOULD be the same container as used in [CheckRequest][google.api.expr.v1alpha1.CheckRequest], if checked. string container = 4; } @@ -128,9 +127,9 @@ message EvalResponse { ExprValue result = 1; // Any number of issues with [StatusDetails][] as the details. - // Note that CEL execution errors are reified into - // [ExprValue][google.api.expr.v1alpha1.ExprValue]. Nevertheless, we'll allow - // out-of-band issues to be raised, which also makes the replies more regular. + // Note that CEL execution errors are reified into [ExprValue][google.api.expr.v1alpha1.ExprValue]. + // Nevertheless, we'll allow out-of-band issues to be raised, + // which also makes the replies more regular. repeated google.rpc.Status issues = 2; } diff --git a/google/api/expr/v1alpha1/eval.proto b/google/api/expr/v1alpha1/eval.proto index f516ba6bc..c09506830 100644 --- a/google/api/expr/v1alpha1/eval.proto +++ b/google/api/expr/v1alpha1/eval.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/api/expr/v1alpha1/explain.proto b/google/api/expr/v1alpha1/explain.proto index 089e144a1..5e1bc941d 100644 --- a/google/api/expr/v1alpha1/explain.proto +++ b/google/api/expr/v1alpha1/explain.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/api/expr/v1alpha1/syntax.proto b/google/api/expr/v1alpha1/syntax.proto index 4a3cb907a..3f7652f16 100644 --- a/google/api/expr/v1alpha1/syntax.proto +++ b/google/api/expr/v1alpha1/syntax.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -45,24 +44,21 @@ message ParsedExpr { // operators with the exception of the '.' operator are modelled as function // calls. This makes it easy to represent new operators into the existing AST. // -// All references within expressions must resolve to a -// [Decl][google.api.expr.v1alpha1.Decl] provided at type-check for an -// expression to be valid. A reference may either be a bare identifier `name` or -// a qualified identifier `google.api.name`. References may either refer to a -// value or a function declaration. +// All references within expressions must resolve to a [Decl][google.api.expr.v1alpha1.Decl] provided at +// type-check for an expression to be valid. A reference may either be a bare +// identifier `name` or a qualified identifier `google.api.name`. References +// may either refer to a value or a function declaration. // // For example, the expression `google.api.name.startsWith('expr')` references -// the declaration `google.api.name` within a -// [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and the -// function declaration `startsWith`. +// the declaration `google.api.name` within a [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and +// the function declaration `startsWith`. message Expr { // An identifier expression. e.g. `request`. message Ident { // Required. Holds a single, unqualified identifier, possibly preceded by a // '.'. // - // Qualified names are represented by the - // [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression. + // Qualified names are represented by the [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression. string name = 1; } @@ -239,8 +235,7 @@ message Expr { // primitives. // // Lists and structs are not included as constants as these aggregate types may -// contain [Expr][google.api.expr.v1alpha1.Expr] elements which require -// evaluation and are thus not constant. +// contain [Expr][google.api.expr.v1alpha1.Expr] elements which require evaluation and are thus not constant. // // Examples of literals include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`, // `true`, `null`. @@ -302,6 +297,16 @@ message SourceInfo { // A map from the parse node id (e.g. `Expr.id`) to the character offset // within source. map positions = 4; + + // A map from the parse node id where a macro replacement was made to the + // call `Expr` that resulted in a macro expansion. + // + // For example, `has(value.field)` is a function call that is replaced by a + // `test_only` field selection in the AST. Likewise, the call + // `list.exists(e, e > 10)` translates to a comprehension expression. The key + // in the map corresponds to the expression id of the expanded macro, and the + // value is the call `Expr` that was replaced. + map macro_calls = 5; } // A specific position in source. diff --git a/google/api/expr/v1alpha1/value.proto b/google/api/expr/v1alpha1/value.proto index a0508ed91..3f2d250fa 100644 --- a/google/api/expr/v1alpha1/value.proto +++ b/google/api/expr/v1alpha1/value.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/api/expr/v1beta1/BUILD.bazel b/google/api/expr/v1beta1/BUILD.bazel index bcf7e6f03..819e1364a 100644 --- a/google/api/expr/v1beta1/BUILD.bazel +++ b/google/api/expr/v1beta1/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) diff --git a/google/api/expr/v1beta1/decl.proto b/google/api/expr/v1beta1/decl.proto index 6d079b822..d3d748b4e 100644 --- a/google/api/expr/v1beta1/decl.proto +++ b/google/api/expr/v1beta1/decl.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/expr/v1beta1/eval.proto b/google/api/expr/v1beta1/eval.proto index cdbe6ac3f..0c6c4d98e 100644 --- a/google/api/expr/v1beta1/eval.proto +++ b/google/api/expr/v1beta1/eval.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/expr/v1beta1/expr.proto b/google/api/expr/v1beta1/expr.proto index 93b917f14..77249bafc 100644 --- a/google/api/expr/v1beta1/expr.proto +++ b/google/api/expr/v1beta1/expr.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -45,24 +45,21 @@ message ParsedExpr { // operators with the exception of the '.' operator are modelled as function // calls. This makes it easy to represent new operators into the existing AST. // -// All references within expressions must resolve to a -// [Decl][google.api.expr.v1beta1.Decl] provided at type-check for an expression -// to be valid. A reference may either be a bare identifier `name` or a -// qualified identifier `google.api.name`. References may either refer to a -// value or a function declaration. +// All references within expressions must resolve to a [Decl][google.api.expr.v1beta1.Decl] provided at +// type-check for an expression to be valid. A reference may either be a bare +// identifier `name` or a qualified identifier `google.api.name`. References +// may either refer to a value or a function declaration. // // For example, the expression `google.api.name.startsWith('expr')` references -// the declaration `google.api.name` within a -// [Expr.Select][google.api.expr.v1beta1.Expr.Select] expression, and the -// function declaration `startsWith`. +// the declaration `google.api.name` within a [Expr.Select][google.api.expr.v1beta1.Expr.Select] expression, and +// the function declaration `startsWith`. message Expr { // An identifier expression. e.g. `request`. message Ident { // Required. Holds a single, unqualified identifier, possibly preceded by a // '.'. // - // Qualified names are represented by the - // [Expr.Select][google.api.expr.v1beta1.Expr.Select] expression. + // Qualified names are represented by the [Expr.Select][google.api.expr.v1beta1.Expr.Select] expression. string name = 1; } @@ -237,8 +234,7 @@ message Expr { // primitives. // // Lists and structs are not included as constants as these aggregate types may -// contain [Expr][google.api.expr.v1beta1.Expr] elements which require -// evaluation and are thus not constant. +// contain [Expr][google.api.expr.v1beta1.Expr] elements which require evaluation and are thus not constant. // // Examples of literals include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`, // `true`, `null`. diff --git a/google/api/expr/v1beta1/source.proto b/google/api/expr/v1beta1/source.proto index adaf84d5e..78bb0a064 100644 --- a/google/api/expr/v1beta1/source.proto +++ b/google/api/expr/v1beta1/source.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/expr/v1beta1/value.proto b/google/api/expr/v1beta1/value.proto index a5ae06766..0978228dc 100644 --- a/google/api/expr/v1beta1/value.proto +++ b/google/api/expr/v1beta1/value.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/metric.proto b/google/api/metric.proto index cd2762a94..a200d48be 100644 --- a/google/api/metric.proto +++ b/google/api/metric.proto @@ -123,9 +123,27 @@ message MetricDescriptor { // Some combinations of `metric_kind` and `value_type` might not be supported. ValueType value_type = 4; - // The unit in which the metric value is reported. It is only applicable - // if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The - // supported units are a subset of [The Unified Code for Units of + // The units in which the metric value is reported. It is only applicable + // if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` + // defines the representation of the stored metric values. + // + // Different systems may scale the values to be more easily displayed (so a + // value of `0.02KBy` _might_ be displayed as `20By`, and a value of + // `3523KBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is + // `KBy`, then the value of the metric is always in thousands of bytes, no + // matter how it may be displayed.. + // + // If you want a custom metric to record the exact number of CPU-seconds used + // by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is + // `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 + // CPU-seconds, then the value is written as `12005`. + // + // Alternatively, if you want a custome metric to record data in a more + // granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is + // `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), + // or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). + // + // The supported units are a subset of [The Unified Code for Units of // Measure](http://unitsofmeasure.org/ucum.html) standard: // // **Basic units (UNIT)** @@ -139,33 +157,40 @@ message MetricDescriptor { // // **Prefixes (PREFIX)** // - // * `k` kilo (10**3) - // * `M` mega (10**6) - // * `G` giga (10**9) - // * `T` tera (10**12) - // * `P` peta (10**15) - // * `E` exa (10**18) - // * `Z` zetta (10**21) - // * `Y` yotta (10**24) - // * `m` milli (10**-3) - // * `u` micro (10**-6) - // * `n` nano (10**-9) - // * `p` pico (10**-12) - // * `f` femto (10**-15) - // * `a` atto (10**-18) - // * `z` zepto (10**-21) - // * `y` yocto (10**-24) - // * `Ki` kibi (2**10) - // * `Mi` mebi (2**20) - // * `Gi` gibi (2**30) - // * `Ti` tebi (2**40) + // * `k` kilo (10^3) + // * `M` mega (10^6) + // * `G` giga (10^9) + // * `T` tera (10^12) + // * `P` peta (10^15) + // * `E` exa (10^18) + // * `Z` zetta (10^21) + // * `Y` yotta (10^24) + // + // * `m` milli (10^-3) + // * `u` micro (10^-6) + // * `n` nano (10^-9) + // * `p` pico (10^-12) + // * `f` femto (10^-15) + // * `a` atto (10^-18) + // * `z` zepto (10^-21) + // * `y` yocto (10^-24) + // + // * `Ki` kibi (2^10) + // * `Mi` mebi (2^20) + // * `Gi` gibi (2^30) + // * `Ti` tebi (2^40) + // * `Pi` pebi (2^50) // // **Grammar** // // The grammar also includes these connectors: // - // * `/` division (as an infix operator, e.g. `1/s`). - // * `.` multiplication (as an infix operator, e.g. `GBy.d`) + // * `/` division or ratio (as an infix operator). For examples, + // `kBy/{email}` or `MiBy/10ms` (although you should almost never + // have `/s` in a metric `unit`; rates should always be computed at + // query time from the underlying cumulative or delta value). + // * `.` multiplication or composition (as an infix operator). For + // examples, `GBy.d` or `k{watt}.h`. // // The grammar for a unit is as follows: // @@ -180,14 +205,26 @@ message MetricDescriptor { // // Notes: // - // * `Annotation` is just a comment if it follows a `UNIT` and is - // equivalent to `1` if it is used alone. For examples, - // `{requests}/s == 1/s`, `By{transmitted}/s == By/s`. + // * `Annotation` is just a comment if it follows a `UNIT`. If the annotation + // is used alone, then the unit is equivalent to `1`. For examples, + // `{request}/s == 1/s`, `By{transmitted}/s == By/s`. // * `NAME` is a sequence of non-blank printable ASCII characters not - // containing '{' or '}'. - // * `1` represents dimensionless value 1, such as in `1/s`. - // * `%` represents dimensionless value 1/100, and annotates values giving - // a percentage. + // containing `{` or `}`. + // * `1` represents a unitary [dimensionless + // unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such + // as in `1/s`. It is typically used when none of the basic units are + // appropriate. For example, "new users per day" can be represented as + // `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new + // users). Alternatively, "thousands of page views per day" would be + // represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric + // value of `5.3` would mean "5300 page views per day"). + // * `%` represents dimensionless value of 1/100, and annotates values giving + // a percentage (so the metric values are typically in the range of 0..100, + // and a metric value `3` means "3 percent"). + // * `10^2.%` indicates a metric contains a ratio, typically in the range + // 0..1, that will be multiplied by 100 and displayed as a percentage + // (so a metric value `0.03` means "3 percent"). + // string unit = 5; // A detailed description of the metric, which can be used in documentation. diff --git a/google/api/resource.proto b/google/api/resource.proto index ad6230f1e..2a52e61aa 100644 --- a/google/api/resource.proto +++ b/google/api/resource.proto @@ -27,29 +27,20 @@ option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; extend google.protobuf.FieldOptions { - // An annotation that describes a resource reference. - // - // Example: - // - // message Subscription { - // string topic = 2 [(google.api.resource_reference) = { - // type: "pubsub.googleapis.com/Topic" - // }]; - // } + // An annotation that describes a resource reference, see + // [ResourceReference][]. google.api.ResourceReference resource_reference = 1055; } +extend google.protobuf.FileOptions { + // An annotation that describes a resource definition without a corresponding + // message; see [ResourceDescriptor][]. + repeated google.api.ResourceDescriptor resource_definition = 1053; +} + extend google.protobuf.MessageOptions { - // An annotation that describes a resource definition. - // - // Example: - // - // message Topic { - // option (google.api.resource) = { - // type: "pubsub.googleapis.com/Topic" - // pattern: "projects/{project}/topics/{topic}" - // }; - // } + // An annotation that describes a resource definition, see + // [ResourceDescriptor][]. google.api.ResourceDescriptor resource = 1053; } @@ -61,30 +52,106 @@ extend google.protobuf.MessageOptions { // // Example: // -// message Topic { -// // Indicates this message defines a resource schema. -// // Declares the resource type in the format of {service}/{kind}. -// // For Kubernetes resources, the format is {api group}/{kind}. -// option (google.api.resource) = { -// type: "pubsub.googleapis.com/Topic" -// pattern: "projects/{project}/topics/{topic}" -// }; -// } +// message Topic { +// // Indicates this message defines a resource schema. +// // Declares the resource type in the format of {service}/{kind}. +// // For Kubernetes resources, the format is {api group}/{kind}. +// option (google.api.resource) = { +// type: "pubsub.googleapis.com/Topic" +// name_descriptor: { +// pattern: "projects/{project}/topics/{topic}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" +// } +// }; +// } +// +// The ResourceDescriptor Yaml config will look like: +// +// resources: +// - type: "pubsub.googleapis.com/Topic" +// name_descriptor: +// - pattern: "projects/{project}/topics/{topic}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" // // Sometimes, resources have multiple patterns, typically because they can // live under multiple parents. // // Example: // -// message LogEntry { -// option (google.api.resource) = { -// type: "logging.googleapis.com/LogEntry" -// pattern: "projects/{project}/logs/{log}" -// pattern: "organizations/{organization}/logs/{log}" -// pattern: "folders/{folder}/logs/{log}" -// pattern: "billingAccounts/{billing_account}/logs/{log}" -// }; -// } +// message LogEntry { +// option (google.api.resource) = { +// type: "logging.googleapis.com/LogEntry" +// name_descriptor: { +// pattern: "projects/{project}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" +// } +// name_descriptor: { +// pattern: "folders/{folder}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" +// parent_name_extractor: "folders/{folder}" +// } +// name_descriptor: { +// pattern: "organizations/{organization}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Organization" +// parent_name_extractor: "organizations/{organization}" +// } +// name_descriptor: { +// pattern: "billingAccounts/{billing_account}/logs/{log}" +// parent_type: "billing.googleapis.com/BillingAccount" +// parent_name_extractor: "billingAccounts/{billing_account}" +// } +// }; +// } +// +// The ResourceDescriptor Yaml config will look like: +// +// resources: +// - type: 'logging.googleapis.com/LogEntry' +// name_descriptor: +// - pattern: "projects/{project}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" +// - pattern: "folders/{folder}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" +// parent_name_extractor: "folders/{folder}" +// - pattern: "organizations/{organization}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Organization" +// parent_name_extractor: "organizations/{organization}" +// - pattern: "billingAccounts/{billing_account}/logs/{log}" +// parent_type: "billing.googleapis.com/BillingAccount" +// parent_name_extractor: "billingAccounts/{billing_account}" +// +// For flexible resources, the resource name doesn't contain parent names, but +// the resource itself has parents for policy evaluation. +// +// Example: +// +// message Shelf { +// option (google.api.resource) = { +// type: "library.googleapis.com/Shelf" +// name_descriptor: { +// pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// } +// name_descriptor: { +// pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" +// } +// }; +// } +// +// The ResourceDescriptor Yaml config will look like: +// +// resources: +// - type: 'library.googleapis.com/Shelf' +// name_descriptor: +// - pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// - pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" message ResourceDescriptor { // A description of the historical or future-looking state of the // resource pattern. @@ -114,11 +181,20 @@ message ResourceDescriptor { // characters allowed for the `resource_type_kind` is 100. string type = 1; - // Optional. The valid resource name pattern(s) for this resource type. + // Optional. The relative resource name pattern associated with this resource + // type. The DNS prefix of the full resource name shouldn't be specified here. + // + // The path pattern must follow the syntax, which aligns with HTTP binding + // syntax: + // + // Template = Segment { "/" Segment } ; + // Segment = LITERAL | Variable ; + // Variable = "{" LITERAL "}" ; // // Examples: - // - "projects/{project}/topics/{topic}" - // - "projects/{project}/knowledgeBases/{knowledge_base}" + // + // - "projects/{project}/topics/{topic}" + // - "projects/{project}/knowledgeBases/{knowledge_base}" // // The components in braces correspond to the IDs for each resource in the // hierarchy. It is expected that, if multiple patterns are provided, @@ -133,43 +209,56 @@ message ResourceDescriptor { // Optional. The historical or future-looking state of the resource pattern. // // Example: - // // The InspectTemplate message originally only supported resource - // // names with organization, and project was added later. - // message InspectTemplate { - // option (google.api.resource) = { - // type: "dlp.googleapis.com/InspectTemplate" - // pattern: - // "organizations/{organization}/inspectTemplates/{inspect_template}" - // pattern: "projects/{project}/inspectTemplates/{inspect_template}" - // history: ORIGINALLY_SINGLE_PATTERN - // }; - // } + // + // // The InspectTemplate message originally only supported resource + // // names with organization, and project was added later. + // message InspectTemplate { + // option (google.api.resource) = { + // type: "dlp.googleapis.com/InspectTemplate" + // pattern: + // "organizations/{organization}/inspectTemplates/{inspect_template}" + // pattern: "projects/{project}/inspectTemplates/{inspect_template}" + // history: ORIGINALLY_SINGLE_PATTERN + // }; + // } History history = 4; + + // The plural name used in the resource name, such as 'projects' for + // the name of 'projects/{project}'. It is the same concept of the `plural` + // field in k8s CRD spec + // https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + string plural = 5; + + // The same concept of the `singular` field in k8s CRD spec + // https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + // Such as "project" for the `resourcemanager.googleapis.com/Project` type. + string singular = 6; } -// Defines a proto annotation that describes a field that refers to a resource. +// Defines a proto annotation that describes a string field that refers to +// an API resource. message ResourceReference { // The resource type that the annotated field references. // // Example: // - // message Subscription { - // string topic = 2 [(google.api.resource_reference) = { - // type = "pubsub.googleapis.com/Topic" - // }]; - // } + // message Subscription { + // string topic = 2 [(google.api.resource_reference) = { + // type: "pubsub.googleapis.com/Topic" + // }]; + // } string type = 1; // The resource type of a child collection that the annotated field - // references. This is useful for `parent` fields where a resource has more - // than one possible type of parent. + // references. This is useful for annotating the `parent` field that + // doesn't have a fixed resource type. // // Example: // - // message ListLogEntriesRequest { - // string parent = 1 [(google.api.resource_reference) = { - // child_type: "logging.googleapis.com/LogEntry" - // }; - // } + // message ListLogEntriesRequest { + // string parent = 1 [(google.api.resource_reference) = { + // child_type: "logging.googleapis.com/LogEntry" + // }; + // } string child_type = 2; } diff --git a/google/api/servicecontrol/v1/BUILD.bazel b/google/api/servicecontrol/v1/BUILD.bazel new file mode 100644 index 000000000..a9d2dd312 --- /dev/null +++ b/google/api/servicecontrol/v1/BUILD.bazel @@ -0,0 +1,43 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "servicecontrol_proto", + srcs = [ + "check_error.proto", + "distribution.proto", + "log_entry.proto", + "metric_value.proto", + "operation.proto", + "quota_controller.proto", + "service_controller.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/logging/type:type_proto", + "//google/rpc:status_proto", + "//google/type:money_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "cc_proto_library") + +cc_proto_library( + name = "servicecontrol_cc_proto", + deps = [ + ":servicecontrol_proto", + ], +) diff --git a/google/api/servicecontrol/v1/check_error.proto b/google/api/servicecontrol/v1/check_error.proto index 3395839d8..de3969d2f 100644 --- a/google/api/servicecontrol/v1/check_error.proto +++ b/google/api/servicecontrol/v1/check_error.proto @@ -32,8 +32,8 @@ message CheckError { // This is never used in `CheckResponse`. ERROR_CODE_UNSPECIFIED = 0; - // The consumer's project id was not found. - // Same as [google.rpc.Code.NOT_FOUND][]. + // The consumer's project id, network container, or resource container was + // not found. Same as [google.rpc.Code.NOT_FOUND][]. NOT_FOUND = 5; // The consumer doesn't have access to the specified resource. @@ -43,6 +43,9 @@ message CheckError { // Quota check failed. Same as [google.rpc.Code.RESOURCE_EXHAUSTED][]. RESOURCE_EXHAUSTED = 8; + // The consumer has been flagged as an abuser. + ABUSER_DETECTED = 103; + // The consumer hasn't activated the service. SERVICE_NOT_ACTIVATED = 104; @@ -80,6 +83,26 @@ message CheckError { // The consumer's API Key was not found in config record. API_KEY_NOT_FOUND = 113; + // Request is not allowed as per security policies defined in Org Policy. + SECURITY_POLICY_VIOLATED = 121; + + // The credential in the request can not be verified. + INVALID_CREDENTIAL = 123; + + // Request is not allowed as per location policies defined in Org Policy. + LOCATION_POLICY_VIOLATED = 124; + + // The input consumer info does not represent a valid consumer folder or + // organization. + CONSUMER_INVALID = 125; + + // NOTE: By convention, all *_UNAVAILABLE codes are required to be in the + // 300 - 399 range. + + // NOTE: Unless there are very special business requirements, service + // producer should ignore the following errors. These errors should not + // cause the rejection of client requests. + // The backend server for looking up project id/number is unavailable. NAMESPACE_LOOKUP_UNAVAILABLE = 300; @@ -88,6 +111,18 @@ message CheckError { // The backend server for checking billing status is unavailable. BILLING_STATUS_UNAVAILABLE = 302; + + // The backend server for checking quota limits is unavailable. + QUOTA_CHECK_UNAVAILABLE = 303; + + // Cloud Resource Manager backend server is unavailable. + CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE = 305; + + // Backend server for evaluating security policy is unavailable. + SECURITY_POLICY_BACKEND_UNAVAILABLE = 306; + + // Backend server for evaluating location policy is unavailable. + LOCATION_POLICY_BACKEND_UNAVAILABLE = 307; } // The error code. diff --git a/google/api/servicemanagement/BUILD.bazel b/google/api/servicemanagement/BUILD.bazel index e69de29bb..1e5b8c2af 100644 --- a/google/api/servicemanagement/BUILD.bazel +++ b/google/api/servicemanagement/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/api/servicemanagement/artman_servicemanagement_v1.yaml b/google/api/servicemanagement/artman_servicemanagement_v1.yaml index cfb5fce21..a7e229cf9 100644 --- a/google/api/servicemanagement/artman_servicemanagement_v1.yaml +++ b/google/api/servicemanagement/artman_servicemanagement_v1.yaml @@ -3,11 +3,12 @@ common: api_version: v1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1 - service_yaml: servicemanagement_v1.yaml + service_yaml: v1/servicemanagement_v1.yaml gapic_yaml: v1/servicemanagement_gapic.yaml + proto_package: google.api.servicemanagement.v1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/api/servicemanagement/servicemanagement_v1.yaml b/google/api/servicemanagement/servicemanagement_v1.yaml deleted file mode 100644 index b23a788f8..000000000 --- a/google/api/servicemanagement/servicemanagement_v1.yaml +++ /dev/null @@ -1,233 +0,0 @@ -type: google.api.Service -config_version: 2 -name: servicemanagement.googleapis.com -title: Google Service Management API - -apis: -- name: google.api.servicemanagement.v1.ServiceManager - -types: -- name: google.api.servicemanagement.v1.ConfigSource -- name: google.api.servicemanagement.v1.ConfigRef -- name: google.api.servicemanagement.v1.OperationMetadata -- name: google.api.servicemanagement.v1.Rollout -- name: google.api.servicemanagement.v1.SubmitConfigSourceResponse -- name: google.api.servicemanagement.v1.UndeleteServiceResponse - -documentation: - summary: |- - Google Service Management allows service producers to publish their services - on Google Cloud Platform so that they can be discovered and used by service - consumers. - overview: |- - Google Service Management manages a set of *services*. Service Management - allows *service producers* to publish their services on Google Cloud - Platform so that they can be discovered and used by *service consumers*. It - also handles the tasks of tracking service lifecycle and programming various - backend systems -- such as [Stackdriver - Logging](https://cloud.google.com/stackdriver), [Stackdriver - Monitoring](https://cloud.google.com/stackdriver) -- to support the managed - services. - - If you are a service producer, you can use the Google Service Management API - and [Google Cloud SDK (gcloud)](/sdk) to publish and manage your services. - Each managed service has a service configuration which declares various - aspects of the service such as its API surface, along with parameters to - configure the supporting backend systems, such as logging and monitoring. If - you build your service using [Google Cloud - Endpoints](https://cloud.google.com/endpoints/), the service configuration - will be handled automatically. - - If you are a service consumer and want to use a managed service, you can use - the Google Service Management API or [Google Cloud - Console](https://console.cloud.google.com) to activate the service for your - [Google developer project](https://developers.google.com/console/help/new/), - then start using its APIs and functions. - - ## Managed services - - REST URL: - `https://servicemanagement.googleapis.com/v1/services/{service-name}`
- REST schema is defined - [here](/service-management/reference/rest/v1/services). - - A managed service refers to a network service managed by Service Management. - Each managed service has a unique name, such as `example.googleapis.com`, - which must be a valid fully-qualified DNS name, as per RFC 1035. - - A managed service typically provides some REST APIs and/or other functions - to their service consumers, such as mobile apps or cloud services. - - Service producers can use methods, such as - [services.create](/service-management/reference/rest/v1/services/create), - [services.delete](/service-management/reference/rest/v1/services/delete), - [services.undelete](/service-management/reference/rest/v1/services/undelete), - to manipulate their managed services. - - ## Service producers - - A service producer is the Google developer project responsible for - publishing and maintaining a managed service. Each managed service is owned - by exactly one service producer. - - ## Service consumers - - A service consumer is a Google developer project that has enabled and can - invoke APIs on a managed service. A managed service can have many service - consumers. - - ## Service configuration - - REST URL: - `https://servicemanagement.googleapis.com/v1/services/{service-name}/configs/{config_id}` -
REST schema is defined - [here](/service-management/reference/rest/v1/services.configs). - - Each managed service is described by a service configuration which covers a - wide range of features, including its name, title, RPC API definitions, REST - API definitions, documentation, authentication, and more. - - To change the configuration of a managed service, the service producer needs - to publish an updated service configuration to Service Management. Service - Management keeps a history of published service configurations, making it - possible to easily retrace how a service's configuration evolved over time. - Service configurations can be published using the - [services.configs.create](/service-management/reference/rest/v1/services.configs/create) - or - [services.configs.submit](/service-management/reference/rest/v1/services.configs/submit) - methods. - - Alternatively, `services.configs.submit` allows publishing an - [OpenAPI](https://github.com/OAI/OpenAPI-Specification) specification, - formerly known as the Swagger Specification, which is automatically - converted to a corresponding service configuration. - - ## Service rollout - - REST URL: - `https://servicemanagement.googleapis.com/v1/services/{service-name}/rollouts/{rollout-id}` -
REST schema is defined - [here](/service-management/reference/rest/v1/services.rollouts). - - A `Rollout` defines how Google Service Management should deploy service - configurations to backend systems and how the configurations take effect at - runtime. It lets service producers specify multiple service configuration - versions to be deployed together, and a strategy that indicates how they - should be used. - - Updating a managed service's configuration can be dangerous, as a - configuration error can lead to a service outage. To mitigate risks, Service - Management supports gradual rollout of service configuration changes. This - feature gives service producers time to identity potential issues and - rollback service configuration changes in case of errors, thus minimizing - the customer impact of bad configurations. For example, you could specify - that 5% of traffic uses configuration 1, while the remaining 95% uses - configuration 2. - - Service Management keeps a history of rollouts so that service producers can - undo to previous configuration versions. You can rollback a configuration by - initiating a new `Rollout` that clones a previously submitted rollout - record. - rules: - - selector: google.longrunning.Operations.ListOperations - description: Lists service operations that match the specified filter in the request. - -backend: - rules: - - selector: google.longrunning.Operations.ListOperations - deadline: 10.0 - - selector: google.longrunning.Operations.GetOperation - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.ListServices - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.GetService - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.CreateService - deadline: 20.0 - - selector: google.api.servicemanagement.v1.ServiceManager.DeleteService - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.UndeleteService - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.GetServiceConfig - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.CreateServiceConfig - deadline: 20.0 - - selector: google.api.servicemanagement.v1.ServiceManager.SubmitConfigSource - deadline: 20.0 - - selector: google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.GetServiceRollout - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.GenerateConfigReport - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.EnableService - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.DisableService - deadline: 10.0 - - selector: google.iam.v1.IAMPolicy.SetIamPolicy - deadline: 10.0 - - selector: google.iam.v1.IAMPolicy.GetIamPolicy - deadline: 10.0 - - selector: google.iam.v1.IAMPolicy.TestIamPermissions - deadline: 10.0 - -http: - rules: - - selector: google.longrunning.Operations.ListOperations - get: /v1/operations - - - selector: google.iam.v1.IAMPolicy.SetIamPolicy - post: '/v1/{resource=services/*}:setIamPolicy' - body: '*' - additional_bindings: - - post: '/v1/{resource=services/*/consumers/*}:setIamPolicy' - body: '*' - - - selector: google.iam.v1.IAMPolicy.GetIamPolicy - post: '/v1/{resource=services/*}:getIamPolicy' - body: '*' - additional_bindings: - - post: '/v1/{resource=services/*/consumers/*}:getIamPolicy' - body: '*' - - - selector: google.iam.v1.IAMPolicy.TestIamPermissions - post: '/v1/{resource=services/*}:testIamPermissions' - body: '*' - additional_bindings: - - post: '/v1/{resource=services/*/consumers/*}:testIamPermissions' - body: '*' - - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/service.management - - selector: |- - google.api.servicemanagement.v1.ServiceManager.GetService, - google.api.servicemanagement.v1.ServiceManager.GetServiceConfig, - google.api.servicemanagement.v1.ServiceManager.GetServiceRollout, - google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs, - google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts, - google.api.servicemanagement.v1.ServiceManager.ListServices - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/cloud-platform.read-only, - https://www.googleapis.com/auth/service.management, - https://www.googleapis.com/auth/service.management.readonly - - selector: |- - google.iam.v1.IAMPolicy.GetIamPolicy, - google.iam.v1.IAMPolicy.TestIamPermissions - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/cloud-platform.read-only, - https://www.googleapis.com/auth/service.management, - https://www.googleapis.com/auth/service.management.readonly diff --git a/google/api/servicemanagement/v1/BUILD.bazel b/google/api/servicemanagement/v1/BUILD.bazel new file mode 100644 index 000000000..13cdb85a1 --- /dev/null +++ b/google/api/servicemanagement/v1/BUILD.bazel @@ -0,0 +1,385 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "servicemanagement_proto", + srcs = [ + "resources.proto", + "servicemanager.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:config_change_proto", + "//google/api:field_behavior_proto", + "//google/api:metric_proto", + "//google/api:quota_proto", + "//google/api:service_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "servicemanagement_proto_with_info", + deps = [ + ":servicemanagement_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "servicemanagement_java_proto", + deps = [":servicemanagement_proto"], +) + +java_grpc_library( + name = "servicemanagement_java_grpc", + srcs = [":servicemanagement_proto"], + deps = [":servicemanagement_java_proto"], +) + +java_gapic_library( + name = "servicemanagement_java_gapic", + src = ":servicemanagement_proto_with_info", + gapic_yaml = "servicemanagement_gapic.yaml", + package = "google.api.servicemanagement.v1", + service_yaml = "servicemanagement_v1.yaml", + test_deps = [ + ":servicemanagement_java_grpc", + ], + deps = [ + ":servicemanagement_java_proto", + "//google/api:api_java_proto", + ], +) + +java_gapic_test( + name = "servicemanagement_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.api.servicemanagement.v1.ServiceManagerClientTest", + ], + runtime_deps = [":servicemanagement_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-api-servicemanagement-v1-java", + deps = [ + ":servicemanagement_java_gapic", + ":servicemanagement_java_grpc", + ":servicemanagement_java_proto", + ":servicemanagement_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "servicemanagement_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/api/servicemanagement/v1", + protos = [":servicemanagement_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/api:configchange_go_proto", + "//google/api:metric_go_proto", + "//google/api:serviceconfig_go_proto", + "//google/longrunning:longrunning_go_proto", + "//google/rpc:status_go_proto", + ], +) + +go_gapic_library( + name = "servicemanagement_go_gapic", + srcs = [":servicemanagement_proto_with_info"], + grpc_service_config = "servicemanagement_grpc_service_config.json", + importpath = "cloud.google.com/go/api/servicemanagement/apiv1;servicemanagement", + service_yaml = "servicemanagement_v1.yaml", + deps = [ + ":servicemanagement_go_proto", + "//google/api:serviceconfig_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:any_go_proto", + ], +) + +go_test( + name = "servicemanagement_go_gapic_test", + srcs = [":servicemanagement_go_gapic_srcjar_test"], + embed = [":servicemanagement_go_gapic"], + importpath = "cloud.google.com/go/api/servicemanagement/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-api-servicemanagement-v1-go", + deps = [ + ":servicemanagement_go_gapic", + ":servicemanagement_go_gapic_srcjar-test.srcjar", + ":servicemanagement_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "servicemanagement_moved_proto", + srcs = [":servicemanagement_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:config_change_proto", + "//google/api:field_behavior_proto", + "//google/api:metric_proto", + "//google/api:quota_proto", + "//google/api:service_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "servicemanagement_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":servicemanagement_moved_proto"], +) + +py_grpc_library( + name = "servicemanagement_py_grpc", + srcs = [":servicemanagement_moved_proto"], + deps = [":servicemanagement_py_proto"], +) + +py_gapic_library( + name = "servicemanagement_py_gapic", + src = ":servicemanagement_proto_with_info", + gapic_yaml = "servicemanagement_gapic.yaml", + package = "google.api.servicemanagement.v1", + service_yaml = "servicemanagement_v1.yaml", + deps = [ + ":servicemanagement_py_grpc", + ":servicemanagement_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "api-servicemanagement-v1-py", + deps = [ + ":servicemanagement_py_gapic", + ":servicemanagement_py_grpc", + ":servicemanagement_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "servicemanagement_php_proto", + deps = [":servicemanagement_proto"], +) + +php_grpc_library( + name = "servicemanagement_php_grpc", + srcs = [":servicemanagement_proto"], + deps = [":servicemanagement_php_proto"], +) + +php_gapic_library( + name = "servicemanagement_php_gapic", + src = ":servicemanagement_proto_with_info", + gapic_yaml = "servicemanagement_gapic.yaml", + package = "google.api.servicemanagement.v1", + service_yaml = "servicemanagement_v1.yaml", + deps = [ + ":servicemanagement_php_grpc", + ":servicemanagement_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-api-servicemanagement-v1-php", + deps = [ + ":servicemanagement_php_gapic", + ":servicemanagement_php_grpc", + ":servicemanagement_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "servicemanagement_nodejs_gapic", + src = ":servicemanagement_proto_with_info", + gapic_yaml = "servicemanagement_gapic.yaml", + package = "google.api.servicemanagement.v1", + service_yaml = "servicemanagement_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "api-servicemanagement-v1-nodejs", + deps = [ + ":servicemanagement_nodejs_gapic", + ":servicemanagement_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "servicemanagement_ruby_proto", + deps = [":servicemanagement_proto"], +) + +ruby_grpc_library( + name = "servicemanagement_ruby_grpc", + srcs = [":servicemanagement_proto"], + deps = [":servicemanagement_ruby_proto"], +) + +ruby_gapic_library( + name = "servicemanagement_ruby_gapic", + src = ":servicemanagement_proto_with_info", + gapic_yaml = "servicemanagement_gapic.yaml", + package = "google.api.servicemanagement.v1", + service_yaml = "servicemanagement_v1.yaml", + deps = [ + ":servicemanagement_ruby_grpc", + ":servicemanagement_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-api-servicemanagement-v1-ruby", + deps = [ + ":servicemanagement_ruby_gapic", + ":servicemanagement_ruby_grpc", + ":servicemanagement_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "servicemanagement_csharp_proto", + deps = [":servicemanagement_proto"], +) + +csharp_grpc_library( + name = "servicemanagement_csharp_grpc", + srcs = [":servicemanagement_proto"], + deps = [":servicemanagement_csharp_proto"], +) + +csharp_gapic_library( + name = "servicemanagement_csharp_gapic", + src = ":servicemanagement_proto_with_info", + gapic_yaml = "servicemanagement_gapic.yaml", + package = "google.api.servicemanagement.v1", + service_yaml = "servicemanagement_v1.yaml", + deps = [ + ":servicemanagement_csharp_grpc", + ":servicemanagement_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-api-servicemanagement-v1-csharp", + deps = [ + ":servicemanagement_csharp_gapic", + ":servicemanagement_csharp_grpc", + ":servicemanagement_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/api/servicemanagement/v1/resources.proto b/google/api/servicemanagement/v1/resources.proto index 1c924849c..d7eee52c9 100644 --- a/google/api/servicemanagement/v1/resources.proto +++ b/google/api/servicemanagement/v1/resources.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; @@ -18,12 +19,13 @@ package google.api.servicemanagement.v1; import "google/api/annotations.proto"; import "google/api/config_change.proto"; +import "google/api/field_behavior.proto"; import "google/api/metric.proto"; +import "google/api/quota.proto"; import "google/api/service.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/any.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -195,7 +197,7 @@ message ChangeReport { message Rollout { // Strategy that specifies how clients of Google Service Controller want to // send traffic to use different config versions. This is generally - // used by API proxy to split traffic based on your configured precentage for + // used by API proxy to split traffic based on your configured percentage for // each config version. // // One example of how to gradually rollout a new service configuration using @@ -232,7 +234,9 @@ message Rollout { // Strategy used to delete a service. This strategy is a placeholder only // used by the system generated rollout to delete a service. - message DeleteServiceStrategy {} + message DeleteServiceStrategy { + + } // Status of a Rollout. enum RolloutStatus { @@ -260,15 +264,15 @@ message Rollout { FAILED_ROLLED_BACK = 6; } - // Optional unique identifier of this Rollout. Only lower case letters, digits - // and '-' are allowed. + // Optional. Unique identifier of this Rollout. Must be no longer than 63 characters + // and only lower case letters, digits, '.', '_' and '-' are allowed. // // If not specified by client, the server will generate one. The generated id // will have the form of , where "date" is the create // date in ISO 8601 format. "revision number" is a monotonically increasing // positive number that is reset every day for each service. // An example of the generated rollout_id is '2016-02-16r1' - string rollout_id = 1; + string rollout_id = 1 [(google.api.field_behavior) = OPTIONAL]; // Creation time of the rollout. Readonly. google.protobuf.Timestamp create_time = 2; diff --git a/google/api/servicemanagement/v1/servicemanagement_gapic.legacy.yaml b/google/api/servicemanagement/v1/servicemanagement_gapic.legacy.yaml new file mode 100644 index 000000000..7086218c1 --- /dev/null +++ b/google/api/servicemanagement/v1/servicemanagement_gapic.legacy.yaml @@ -0,0 +1,300 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.api.servicemanagement.v1 + python: + package_name: google.cloud.api.servicemanagement_v1.gapic + go: + package_name: cloud.google.com/go/api/servicemanagement/apiv1 + csharp: + package_name: Google.Api.Servicemanagement.V1 + ruby: + package_name: Google::Cloud::Api::Servicemanagement::V1 + php: + package_name: Google\Cloud\Api\Servicemanagement\V1 + nodejs: + package_name: servicemanagement.v1 +# A list of API interface configurations. +interfaces: +- name: google.api.servicemanagement.v1.ServiceManager + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + smoke_test: + method: ListServices + init_fields: + - producer_project_id=$PROJECT_ID + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListServices + flattening: + groups: + - parameters: + - producer_project_id + - consumer_id + required_fields: + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: services + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: GetService + flattening: + groups: + - parameters: + - service_name + required_fields: + - service_name + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: CreateService + flattening: + groups: + - parameters: + - service + required_fields: + - service + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: DeleteService + flattening: + groups: + - parameters: + - service_name + required_fields: + - service_name + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: UndeleteService + flattening: + groups: + - parameters: + - service_name + required_fields: + - service_name + retry_codes_name: non_idempotent + retry_params_name: default + # REVIEW: Could this operation take a long time? + timeout_millis: 60000 + - name: ListServiceConfigs + flattening: + groups: + - parameters: + - service_name + required_fields: + - service_name + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: service_configs + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: GetServiceConfig + flattening: + groups: + - parameters: + - service_name + - config_id + - view + required_fields: + - service_name + - config_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: CreateServiceConfig + flattening: + groups: + - parameters: + - service_name + - service_config + required_fields: + - service_name + - service_config + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SubmitConfigSource + flattening: + groups: + - parameters: + - service_name + - config_source + - validate_only + required_fields: + - service_name + - config_source + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 10000 + - name: ListServiceRollouts + flattening: + groups: + - parameters: + - service_name + - filter + required_fields: + - service_name + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: rollouts + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: GetServiceRollout + flattening: + groups: + - parameters: + - service_name + - rollout_id + required_fields: + - service_name + - rollout_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: CreateServiceRollout + flattening: + groups: + - parameters: + - service_name + - rollout + required_fields: + - service_name + - rollout + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 10000 + - name: GenerateConfigReport + flattening: + groups: + - parameters: + - new_config + - old_config + required_fields: + - new_config + - old_config + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 10000 + - name: EnableService + flattening: + groups: + - parameters: + - service_name + - consumer_id + required_fields: + - service_name + - consumer_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: DisableService + flattening: + groups: + - parameters: + - service_name + - consumer_id + required_fields: + - service_name + - consumer_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 diff --git a/google/api/servicemanagement/v1/servicemanagement_gapic.yaml b/google/api/servicemanagement/v1/servicemanagement_gapic.yaml index 0cca80e29..e6985653f 100644 --- a/google/api/servicemanagement/v1/servicemanagement_gapic.yaml +++ b/google/api/servicemanagement/v1/servicemanagement_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -16,286 +16,3 @@ language_settings: package_name: Google\Cloud\Api\Servicemanagement\V1 nodejs: package_name: servicemanagement.v1 -# A list of API interface configurations. -interfaces: - # The fully qualified name of the API interface. -- name: google.api.servicemanagement.v1.ServiceManager - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - smoke_test: - method: ListServices - init_fields: - - producer_project_id=$PROJECT_ID - collections: [] - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: ListServices - flattening: - groups: - - parameters: - - producer_project_id - - consumer_id - required_fields: - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: services - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 - - name: GetService - flattening: - groups: - - parameters: - - service_name - required_fields: - - service_name - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 - - name: CreateService - flattening: - groups: - - parameters: - - service - required_fields: - - service - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: DeleteService - flattening: - groups: - - parameters: - - service_name - required_fields: - - service_name - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - - name: UndeleteService - flattening: - groups: - - parameters: - - service_name - required_fields: - - service_name - retry_codes_name: non_idempotent - retry_params_name: default - # REVIEW: Could this operation take a long time? - timeout_millis: 60000 - - name: ListServiceConfigs - flattening: - groups: - - parameters: - - service_name - required_fields: - - service_name - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: service_configs - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 - - name: GetServiceConfig - flattening: - groups: - - parameters: - - service_name - - config_id - - view - required_fields: - - service_name - - config_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 - - name: CreateServiceConfig - flattening: - groups: - - parameters: - - service_name - - service_config - required_fields: - - service_name - - service_config - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SubmitConfigSource - flattening: - groups: - - parameters: - - service_name - - config_source - - validate_only - required_fields: - - service_name - - config_source - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 10000 - - name: ListServiceRollouts - flattening: - groups: - - parameters: - - service_name - - filter - required_fields: - - service_name - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: rollouts - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 - - name: GetServiceRollout - flattening: - groups: - - parameters: - - service_name - - rollout_id - required_fields: - - service_name - - rollout_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 - - name: CreateServiceRollout - flattening: - groups: - - parameters: - - service_name - - rollout - required_fields: - - service_name - - rollout - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 10000 - - name: GenerateConfigReport - flattening: - groups: - - parameters: - - new_config - - old_config - required_fields: - - new_config - - old_config - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 10000 - - name: EnableService - flattening: - groups: - - parameters: - - service_name - - consumer_id - required_fields: - - service_name - - consumer_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 - - name: DisableService - flattening: - groups: - - parameters: - - service_name - - consumer_id - required_fields: - - service_name - - consumer_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 diff --git a/google/api/servicemanagement/v1/servicemanagement_grpc_service_config.json b/google/api/servicemanagement/v1/servicemanagement_grpc_service_config.json new file mode 100755 index 000000000..e2ec9d59e --- /dev/null +++ b/google/api/servicemanagement/v1/servicemanagement_grpc_service_config.json @@ -0,0 +1,12 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.api.servicemanagement.v1.ServiceManager" + } + ], + "timeout": "10s" + } + ] +} diff --git a/google/api/servicemanagement/v1/servicemanagement_v1.yaml b/google/api/servicemanagement/v1/servicemanagement_v1.yaml new file mode 100644 index 000000000..43640dd58 --- /dev/null +++ b/google/api/servicemanagement/v1/servicemanagement_v1.yaml @@ -0,0 +1,275 @@ +type: google.api.Service +config_version: 2 +name: servicemanagement.googleapis.com +title: Service Management API + +apis: +- name: google.api.servicemanagement.v1.ServiceManager + +types: +- name: google.api.servicemanagement.v1.ConfigRef +- name: google.api.servicemanagement.v1.ConfigSource +- name: google.api.servicemanagement.v1.DisableServiceResponse +- name: google.api.servicemanagement.v1.EnableServiceResponse +- name: google.api.servicemanagement.v1.OperationMetadata +- name: google.api.servicemanagement.v1.Rollout +- name: google.api.servicemanagement.v1.SubmitConfigSourceResponse +- name: google.api.servicemanagement.v1.UndeleteServiceResponse + +documentation: + summary: |- + Google Service Management allows service producers to publish their + services on Google Cloud Platform so that they can be discovered and used + by service consumers. + overview: |- + Google Service Management manages a set of *services*. Service Management + allows *service producers* to + publish their services on Google Cloud Platform so that they can be + discovered and used by *service consumers*. It also handles the tasks of + tracking + service lifecycle and programming various backend systems -- such as + [Stackdriver Logging](https://cloud.google.com/stackdriver), + [Stackdriver Monitoring](https://cloud.google.com/stackdriver) -- to + support the managed services. + + If you are a service producer, you can use the Google Service Management + API and [Google Cloud SDK (gcloud)](/sdk) to publish and manage your + services. + Each managed service has a service configuration which declares various + aspects of the service such as its API surface, along with parameters to + configure the supporting backend systems, such as logging and monitoring. + If you build your service using + [Google Cloud Endpoints](https://cloud.google.com/endpoints/), the service + configuration will be handled automatically. + + If you are a service consumer and want to use a managed service, you can + use the Google Service Management API or [Google Cloud + Console](https://console.cloud.google.com) to activate the service for + your [Google developer + project](https://developers.google.com/console/help/new/), then start + using its APIs and functions. + + ## Managed services + + REST URL: + `https://servicemanagement.googleapis.com/v1/services/{service-name}`
REST schema is defined + [here](/service-management/reference/rest/v1/services). + + A managed service refers to a network service managed by + Service Management. Each managed service has a unique name, such as + `example.googleapis.com`, which must be a valid fully-qualified DNS name, + as per RFC 1035. + + A managed service typically provides some REST APIs and/or other + functions to their service consumers, such as mobile apps or cloud + services. + + Service producers can use methods, such as + [services.create](/service-management/reference/rest/v1/services/create), + [services.delete](/service-management/reference/rest/v1/services/delete), + [services.undelete](/service-management/reference/rest/v1/services/undelete), to + manipulate their managed services. + + ## Service producers + + A service producer is the Google developer project responsible for + publishing and maintaining a managed service. Each managed service is + owned by exactly one service producer. + + ## Service consumers + + A service consumer is a Google developer project that has enabled and can + invoke APIs on a managed service. A managed service can have many service + consumers. + + ## Service configuration + + REST URL: + `https://servicemanagement.googleapis.com/v1/services/{service-name}/configs/{config_id}` +
REST schema is defined + [here](/service-management/reference/rest/v1/services.configs). + + Each managed service is described by a service configuration which covers + a wide range of features, including its name, title, RPC API + definitions, + REST API definitions, documentation, authentication, and more. + + To change the configuration of a managed service, the service producer + needs to publish an updated service configuration to Service + Management. + Service Management keeps a history of published + service configurations, making it possible to easily retrace how a + service's configuration evolved over time. Service configurations can be + published + using the [services.configs.create](/service-management/reference/rest/v1/services.configs/create) or + [services.configs.submit](/service-management/reference/rest/v1/services.configs/submit) methods. Alternatively, + `services.configs.submit` allows publishing an + [OpenAPI](https://github.com/OAI/OpenAPI-Specification) specification, + formerly known as the Swagger Specification, which is automatically + converted to a corresponding service configuration. + + ## Service rollout + + REST URL: + `https://servicemanagement.googleapis.com/v1/services/{service-name}/rollouts/{rollout-id}` +
REST schema is defined + [here](/service-management/reference/rest/v1/services.rollouts). + + A `Rollout` defines how Google Service Management should deploy service + configurations to backend systems and how the configurations take effect + at runtime. It lets service producers specify multiple service + configuration + versions to be deployed together, and a strategy that indicates how they + should be used. + + Updating a managed service's configuration can be dangerous, as a + configuration error can lead to a service outage. To mitigate risks, + Service Management + supports gradual rollout of service configuration changes. This feature + gives service producers time to identity potential issues and rollback + service + configuration changes in case of errors, thus minimizing the customer + impact of bad configurations. For example, you could specify that 5% of + traffic uses configuration 1, while the remaining 95% uses configuration + 2. + + Service Management keeps a history of rollouts so that service + producers can undo to previous configuration versions. You can rollback a + configuration by initiating a new `Rollout` that clones a previously + submitted + rollout record. + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + description: |- + Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + description: |- + Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and + PERMISSION_DENIED + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + description: |- + Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + + - selector: google.longrunning.Operations.ListOperations + description: Lists service operations that match the specified filter in the request. + +backend: + rules: + - selector: 'google.api.servicemanagement.v1.ServiceManager.*' + deadline: 10.0 + - selector: google.api.servicemanagement.v1.ServiceManager.CreateServiceConfig + deadline: 20.0 + - selector: 'google.iam.v1.IAMPolicy.*' + deadline: 10.0 + - selector: 'google.longrunning.Operations.*' + deadline: 10.0 + +http: + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + post: '/v1/{resource=services/*}:getIamPolicy' + body: '*' + additional_bindings: + - post: '/v1/{resource=services/*/consumers/*}:getIamPolicy' + body: '*' + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + post: '/v1/{resource=services/*}:setIamPolicy' + body: '*' + additional_bindings: + - post: '/v1/{resource=services/*/consumers/*}:setIamPolicy' + body: '*' + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + post: '/v1/{resource=services/*}:testIamPermissions' + body: '*' + additional_bindings: + - post: '/v1/{resource=services/*/consumers/*}:testIamPermissions' + body: '*' + - selector: google.longrunning.Operations.ListOperations + get: /v1/operations + +authentication: + rules: + - selector: 'google.api.servicemanagement.v1.ServiceManager.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/service.management + - selector: google.api.servicemanagement.v1.ServiceManager.GetService + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/service.management, + https://www.googleapis.com/auth/service.management.readonly + - selector: google.api.servicemanagement.v1.ServiceManager.GetServiceConfig + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/service.management, + https://www.googleapis.com/auth/service.management.readonly + - selector: google.api.servicemanagement.v1.ServiceManager.GetServiceRollout + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/service.management, + https://www.googleapis.com/auth/service.management.readonly + - selector: google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/service.management, + https://www.googleapis.com/auth/service.management.readonly + - selector: google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/service.management, + https://www.googleapis.com/auth/service.management.readonly + - selector: google.api.servicemanagement.v1.ServiceManager.ListServices + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/service.management, + https://www.googleapis.com/auth/service.management.readonly + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/service.management, + https://www.googleapis.com/auth/service.management.readonly + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/service.management + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/service.management, + https://www.googleapis.com/auth/service.management.readonly + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/service.management diff --git a/google/api/servicemanagement/v1/servicemanager.proto b/google/api/servicemanagement/v1/servicemanager.proto index 02d506665..6069b8176 100644 --- a/google/api/servicemanagement/v1/servicemanager.proto +++ b/google/api/servicemanagement/v1/servicemanager.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,12 +17,13 @@ syntax = "proto3"; package google.api.servicemanagement.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/service.proto"; import "google/api/servicemanagement/v1/resources.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/any.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.ServiceManagement.V1"; @@ -35,6 +36,13 @@ option php_namespace = "Google\\Cloud\\ServiceManagement\\V1"; // [Google Service Management API](/service-management/overview) service ServiceManager { + option (google.api.default_host) = "servicemanagement.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only," + "https://www.googleapis.com/auth/service.management," + "https://www.googleapis.com/auth/service.management.readonly"; + // Lists managed services. // // Returns all public services. For authenticated users, also returns all @@ -48,6 +56,7 @@ service ServiceManager { option (google.api.http) = { get: "/v1/services" }; + option (google.api.method_signature) = "producer_project_id,consumer_id"; } // Gets a managed service. Authentication is required unless the service is @@ -56,33 +65,40 @@ service ServiceManager { option (google.api.http) = { get: "/v1/services/{service_name}" }; + option (google.api.method_signature) = "service_name"; } // Creates a new managed service. // Please note one producer project can own no more than 20 services. // // Operation - rpc CreateService(CreateServiceRequest) - returns (google.longrunning.Operation) { + rpc CreateService(CreateServiceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/services" body: "service" }; + option (google.api.method_signature) = "service"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.ManagedService" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; } // Deletes a managed service. This method will change the service to the // `Soft-Delete` state for 30 days. Within this period, service producers may - // call - // [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] - // to restore the service. After 30 days, the service will be permanently - // deleted. + // call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service. + // After 30 days, the service will be permanently deleted. // // Operation - rpc DeleteService(DeleteServiceRequest) - returns (google.longrunning.Operation) { + rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/services/{service_name}" }; + option (google.api.method_signature) = "service_name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; } // Revives a previously deleted managed service. The method restores the @@ -91,28 +107,35 @@ service ServiceManager { // last 30 days. // // Operation - rpc UndeleteService(UndeleteServiceRequest) - returns (google.longrunning.Operation) { + rpc UndeleteService(UndeleteServiceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/services/{service_name}:undelete" }; + option (google.api.method_signature) = "service_name"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.UndeleteServiceResponse" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; } // Lists the history of the service configuration for a managed service, // from the newest to the oldest. - rpc ListServiceConfigs(ListServiceConfigsRequest) - returns (ListServiceConfigsResponse) { + rpc ListServiceConfigs(ListServiceConfigsRequest) returns (ListServiceConfigsResponse) { option (google.api.http) = { get: "/v1/services/{service_name}/configs" }; + option (google.api.method_signature) = "service_name"; } // Gets a service configuration (version) for a managed service. rpc GetServiceConfig(GetServiceConfigRequest) returns (google.api.Service) { option (google.api.http) = { get: "/v1/services/{service_name}/configs/{config_id}" - additional_bindings { get: "/v1/services/{service_name}/config" } + additional_bindings { + get: "/v1/services/{service_name}/config" + } }; + option (google.api.method_signature) = "service_name,config_id,view"; } // Creates a new service configuration (version) for a managed service. @@ -123,12 +146,12 @@ service ServiceManager { // Only the 100 most recent service configurations and ones referenced by // existing rollouts are kept for each service. The rest will be deleted // eventually. - rpc CreateServiceConfig(CreateServiceConfigRequest) - returns (google.api.Service) { + rpc CreateServiceConfig(CreateServiceConfigRequest) returns (google.api.Service) { option (google.api.http) = { post: "/v1/services/{service_name}/configs" body: "service_config" }; + option (google.api.method_signature) = "service_name,service_config"; } // Creates a new service configuration (version) for a managed service based @@ -137,37 +160,40 @@ service ServiceManager { // Specification). This method stores the source configurations as well as the // generated service configuration. To rollout the service configuration to // other services, - // please call - // [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + // please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. // // Only the 100 most recent configuration sources and ones referenced by // existing service configurtions are kept for each service. The rest will be // deleted eventually. // // Operation - rpc SubmitConfigSource(SubmitConfigSourceRequest) - returns (google.longrunning.Operation) { + rpc SubmitConfigSource(SubmitConfigSourceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/services/{service_name}/configs:submit" body: "*" }; + option (google.api.method_signature) = "service_name,config_source,validate_only"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.SubmitConfigSourceResponse" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; } // Lists the history of the service configuration rollouts for a managed // service, from the newest to the oldest. - rpc ListServiceRollouts(ListServiceRolloutsRequest) - returns (ListServiceRolloutsResponse) { + rpc ListServiceRollouts(ListServiceRolloutsRequest) returns (ListServiceRolloutsResponse) { option (google.api.http) = { get: "/v1/services/{service_name}/rollouts" }; + option (google.api.method_signature) = "service_name,filter"; } - // Gets a service configuration - // [rollout][google.api.servicemanagement.v1.Rollout]. + // Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout]. rpc GetServiceRollout(GetServiceRolloutRequest) returns (Rollout) { option (google.api.http) = { get: "/v1/services/{service_name}/rollouts/{rollout_id}" }; + option (google.api.method_signature) = "service_name,rollout_id"; } // Creates a new service configuration rollout. Based on rollout, the @@ -184,12 +210,16 @@ service ServiceManager { // service. The rest will be deleted eventually. // // Operation - rpc CreateServiceRollout(CreateServiceRolloutRequest) - returns (google.longrunning.Operation) { + rpc CreateServiceRollout(CreateServiceRolloutRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/services/{service_name}/rollouts" body: "rollout" }; + option (google.api.method_signature) = "service_name,rollout"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.Rollout" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; } // Generates and returns a report (errors, warnings and changes from @@ -203,39 +233,49 @@ service ServiceManager { // If GenerateConfigReportRequest.old_value is not specified, this method // will compare GenerateConfigReportRequest.new_value with the last pushed // service configuration. - rpc GenerateConfigReport(GenerateConfigReportRequest) - returns (GenerateConfigReportResponse) { + rpc GenerateConfigReport(GenerateConfigReportRequest) returns (GenerateConfigReportResponse) { option (google.api.http) = { post: "/v1/services:generateConfigReport" body: "*" }; + option (google.api.method_signature) = "new_config,old_config"; } - // Enables a [service][google.api.servicemanagement.v1.ManagedService] for a - // project, so it can be used for the project. See [Cloud Auth - // Guide](https://cloud.google.com/docs/authentication) for more information. + // Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be used + // for the project. See + // [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for + // more information. // // Operation - rpc EnableService(EnableServiceRequest) - returns (google.longrunning.Operation) { + rpc EnableService(EnableServiceRequest) returns (google.longrunning.Operation) { + option deprecated = true; option (google.api.http) = { post: "/v1/services/{service_name}:enable" body: "*" }; + option (google.api.method_signature) = "service_name,consumer_id"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.EnableServiceResponse" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; } - // Disables a [service][google.api.servicemanagement.v1.ManagedService] for a - // project, so it can no longer be be used for the project. It prevents - // accidental usage that may cause unexpected billing charges or security - // leaks. + // Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can no longer be + // be used for the project. It prevents accidental usage that may cause + // unexpected billing charges or security leaks. // // Operation - rpc DisableService(DisableServiceRequest) - returns (google.longrunning.Operation) { + rpc DisableService(DisableServiceRequest) returns (google.longrunning.Operation) { + option deprecated = true; option (google.api.http) = { post: "/v1/services/{service_name}:disable" body: "*" }; + option (google.api.method_signature) = "service_name,consumer_id"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.DisableServiceResponse" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; } } @@ -244,7 +284,8 @@ message ListServicesRequest { // Include services produced by the specified project. string producer_project_id = 1; - // Requested size of the next page of data. + // The max number of items to include in the response list. Page size is 50 + // if not specified. Maximum value is 100. int32 page_size = 5; // Token identifying which result to start with; returned by a previous list @@ -256,7 +297,7 @@ message ListServicesRequest { // The Google Service Management implementation accepts the following // forms: // - project: - string consumer_id = 7; + string consumer_id = 7 [deprecated = true]; } // Response message for `ListServices` method. @@ -270,29 +311,29 @@ message ListServicesResponse { // Request message for `GetService` method. message GetServiceRequest { - // The name of the service. See the `ServiceManager` overview for naming + // Required. The name of the service. See the `ServiceManager` overview for naming // requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for CreateService method. message CreateServiceRequest { - // Initial values for the service resource. - ManagedService service = 1; + // Required. Initial values for the service resource. + ManagedService service = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for DeleteService method. message DeleteServiceRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for UndeleteService method. message UndeleteServiceRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; } // Response message for UndeleteService method. @@ -314,12 +355,15 @@ message GetServiceConfigRequest { FULL = 1; } - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - // The id of the service configuration resource. - string config_id = 2; + // Required. The id of the service configuration resource. + // + // This field must be specified for the server to return all fields, including + // `SourceInfo`. + string config_id = 2 [(google.api.field_behavior) = REQUIRED]; // Specifies which parts of the Service Config should be returned in the // response. @@ -328,14 +372,15 @@ message GetServiceConfigRequest { // Request message for ListServiceConfigs method. message ListServiceConfigsRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; // The token of the page to retrieve. string page_token = 2; - // The max number of items to include in the response list. + // The max number of items to include in the response list. Page size is 50 + // if not specified. Maximum value is 100. int32 page_size = 3; } @@ -350,27 +395,27 @@ message ListServiceConfigsResponse { // Request message for CreateServiceConfig method. message CreateServiceConfigRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - // The service configuration resource. - google.api.Service service_config = 2; + // Required. The service configuration resource. + google.api.Service service_config = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for SubmitConfigSource method. message SubmitConfigSourceRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - // The source configuration for the service. - ConfigSource config_source = 2; + // Required. The source configuration for the service. + ConfigSource config_source = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. If set, this will result in the generation of a // `google.api.Service` configuration based on the `ConfigSource` provided, // but the generated config and the sources will NOT be persisted. - bool validate_only = 3; + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for SubmitConfigSource method. @@ -381,27 +426,28 @@ message SubmitConfigSourceResponse { // Request message for 'CreateServiceRollout' message CreateServiceRolloutRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - // The rollout resource. The `service_name` field is output only. - Rollout rollout = 2; + // Required. The rollout resource. The `service_name` field is output only. + Rollout rollout = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for 'ListServiceRollouts' message ListServiceRolloutsRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; // The token of the page to retrieve. string page_token = 2; - // The max number of items to include in the response list. + // The max number of items to include in the response list. Page size is 50 + // if not specified. Maximum value is 100. int32 page_size = 3; - // Use `filter` to return subset of rollouts. + // Required. Use `filter` to return subset of rollouts. // The following filters are supported: // -- To limit the results to only those in // [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', @@ -409,7 +455,7 @@ message ListServiceRolloutsRequest { // -- To limit the results to those in // [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' // or 'FAILED', use filter='status=CANCELLED OR status=FAILED' - string filter = 4; + string filter = 4 [(google.api.field_behavior) = REQUIRED]; } // Response message for ListServiceRollouts method. @@ -423,21 +469,21 @@ message ListServiceRolloutsResponse { // Request message for GetServiceRollout method. message GetServiceRolloutRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - // The id of the rollout resource. - string rollout_id = 2; + // Required. The id of the rollout resource. + string rollout_id = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for EnableService method. message EnableServiceRequest { - // Name of the service to enable. Specifying an unknown service name will + // Required. Name of the service to enable. Specifying an unknown service name will // cause the request to fail. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - // The identity of consumer resource which service enablement will be + // Required. The identity of consumer resource which service enablement will be // applied to. // // The Google Service Management implementation accepts the following @@ -446,16 +492,21 @@ message EnableServiceRequest { // // Note: this is made compatible with // google.api.servicecontrol.v1.Operation.consumer_id. - string consumer_id = 2; + string consumer_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Operation payload for EnableService method. +message EnableServiceResponse { + } // Request message for DisableService method. message DisableServiceRequest { - // Name of the service to disable. Specifying an unknown service name + // Required. Name of the service to disable. Specifying an unknown service name // will cause the request to fail. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - // The identity of consumer resource which service disablement will be + // Required. The identity of consumer resource which service disablement will be // applied to. // // The Google Service Management implementation accepts the following @@ -464,24 +515,29 @@ message DisableServiceRequest { // // Note: this is made compatible with // google.api.servicecontrol.v1.Operation.consumer_id. - string consumer_id = 2; + string consumer_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Operation payload for DisableService method. +message DisableServiceResponse { + } // Request message for GenerateConfigReport method. message GenerateConfigReportRequest { - // Service configuration for which we want to generate the report. + // Required. Service configuration for which we want to generate the report. // For this version of API, the supported types are // [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef], // [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource], // and [google.api.Service][google.api.Service] - google.protobuf.Any new_config = 1; + google.protobuf.Any new_config = 1 [(google.api.field_behavior) = REQUIRED]; - // Service configuration against which the comparison will be done. + // Optional. Service configuration against which the comparison will be done. // For this version of API, the supported types are // [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef], // [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource], // and [google.api.Service][google.api.Service] - google.protobuf.Any old_config = 2; + google.protobuf.Any old_config = 2 [(google.api.field_behavior) = OPTIONAL]; } // Response message for GenerateConfigReport method. diff --git a/google/artman_core.yaml b/google/artman_core.yaml index 1ae4967ae..3cdd232ea 100644 --- a/google/artman_core.yaml +++ b/google/artman_core.yaml @@ -4,6 +4,7 @@ common: src_proto_paths: - api - cloud/audit + - geo/type - logging/type - longrunning - rpc diff --git a/google/bigtable/BUILD.bazel b/google/bigtable/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/bigtable/BUILD.bazel +++ b/google/bigtable/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/bigtable/admin/BUILD.bazel b/google/bigtable/admin/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/bigtable/admin/BUILD.bazel +++ b/google/bigtable/admin/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/bigtable/admin/artman_bigtableadmin.legacy.yaml b/google/bigtable/admin/artman_bigtableadmin.legacy.yaml new file mode 100644 index 000000000..4f6edfec6 --- /dev/null +++ b/google/bigtable/admin/artman_bigtableadmin.legacy.yaml @@ -0,0 +1,19 @@ +common: + api_name: bigtable-admin + api_version: v2 + organization_name: google-cloud + service_yaml: v2/bigtableadmin_v2.yaml + gapic_yaml: v2/bigtableadmin_gapic.legacy.yaml + src_proto_paths: + - v2 + proto_deps: + - name: google-common-protos + - name: google-iam-v1 + proto_path: google/iam/v1 + test_proto_deps: + - name: google-iam-v1 + proto_path: google/iam/v1 +artifacts: +- name: ruby_gapic + type: GAPIC + language: RUBY diff --git a/google/bigtable/admin/artman_bigtableadmin.yaml b/google/bigtable/admin/artman_bigtableadmin.yaml index abb1304d8..0c6ec1d6d 100644 --- a/google/bigtable/admin/artman_bigtableadmin.yaml +++ b/google/bigtable/admin/artman_bigtableadmin.yaml @@ -2,7 +2,7 @@ common: api_name: bigtable-admin api_version: v2 organization_name: google-cloud - service_yaml: bigtableadmin.yaml + service_yaml: v2/bigtableadmin_v2.yaml gapic_yaml: v2/bigtableadmin_gapic.yaml src_proto_paths: - v2 @@ -23,9 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP -- name: ruby_gapic - type: GAPIC - language: RUBY - name: go_gapic type: GAPIC language: GO @@ -35,5 +32,3 @@ artifacts: - name: nodejs_gapic type: GAPIC language: NODEJS -- name: gapic_config - type: GAPIC_CONFIG diff --git a/google/bigtable/admin/cluster/bigtableclusteradmin.yaml b/google/bigtable/admin/cluster/bigtableclusteradmin.yaml index be789aa70..ca8f73b9a 100644 --- a/google/bigtable/admin/cluster/bigtableclusteradmin.yaml +++ b/google/bigtable/admin/cluster/bigtableclusteradmin.yaml @@ -1,5 +1,5 @@ type: google.api.Service -config_version: 0 +config_version: 1 name: bigtableclusteradmin.googleapis.com title: Google Cloud Bigtable Cluster Admin API diff --git a/google/bigtable/admin/table/bigtabletableadmin.yaml b/google/bigtable/admin/table/bigtabletableadmin.yaml index e1b7886b4..a3411efa2 100644 --- a/google/bigtable/admin/table/bigtabletableadmin.yaml +++ b/google/bigtable/admin/table/bigtabletableadmin.yaml @@ -1,5 +1,5 @@ type: google.api.Service -config_version: 0 +config_version: 1 name: bigtabletableadmin.googleapis.com title: Google Cloud Bigtable Table Admin API diff --git a/google/bigtable/admin/v2/BUILD.bazel b/google/bigtable/admin/v2/BUILD.bazel index 03cfa6018..726ea842b 100644 --- a/google/bigtable/admin/v2/BUILD.bazel +++ b/google/bigtable/admin/v2/BUILD.bazel @@ -1,13 +1,16 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "bigtableadmin_proto", + name = "admin_proto", srcs = [ "bigtable_instance_admin.proto", "bigtable_table_admin.proto", @@ -17,6 +20,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/iam/v1:iam_policy_proto", "//google/iam/v1:policy_proto", "//google/longrunning:operations_proto", @@ -28,8 +34,11 @@ proto_library( ) proto_library_with_info( - name = "bigtableadmin_proto_with_info", - deps = [":bigtableadmin_proto"], + name = "admin_proto_with_info", + deps = [ + ":admin_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -37,71 +46,58 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", - "@com_google_api_grpc_proto_google_iam_v1//jar", -] - java_proto_library( - name = "bigtableadmin_java_proto", - deps = [":bigtableadmin_proto"], + name = "admin_java_proto", + deps = [":admin_proto"], ) java_grpc_library( - name = "bigtableadmin_java_grpc", - srcs = [":bigtableadmin_proto"], - deps = [":bigtableadmin_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "bigtableadmin_resource_name_java_proto", - gapic_yaml = "bigtableadmin_gapic.yaml", - deps = [":bigtableadmin_proto"], + name = "admin_java_grpc", + srcs = [":admin_proto"], + deps = [":admin_java_proto"], ) java_gapic_library( - name = "bigtableadmin_java_gapic", - src = ":bigtableadmin_proto_with_info", + name = "admin_java_gapic", + src = ":admin_proto_with_info", gapic_yaml = "bigtableadmin_gapic.yaml", - service_yaml = "//google/bigtable/admin:bigtableadmin.yaml", - test_deps = [":bigtableadmin_java_grpc"], + package = "google.bigtable.admin.v2", + service_yaml = "bigtableadmin_v2.yaml", + test_deps = [ + ":admin_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], deps = [ - ":bigtableadmin_java_proto", - ":bigtableadmin_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ":admin_java_proto", + "//google/iam/v1:iam_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [":bigtableadmin_java_gapic_test"], -) for test_name in [ - "com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClientTest", - "com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClientTest", -]] +java_gapic_test( + name = "admin_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClientTest", + "com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClientTest", + ], + runtime_deps = [":admin_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-bigtable-admin-v2-java", - client_deps = [":bigtableadmin_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":bigtableadmin_java_gapic_test"], - grpc_deps = [":bigtableadmin_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":bigtableadmin_proto", - ":bigtableadmin_java_proto", - ":bigtableadmin_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + deps = [ + ":admin_java_gapic", + ":admin_java_grpc", + ":admin_java_proto", + ":admin_proto", + ], ) ############################################################################## @@ -109,17 +105,17 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "bigtableadmin_go_proto", + name = "admin_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/bigtable/admin/v2", - protos = [":bigtableadmin_proto"], + protos = [":admin_proto"], deps = [ "//google/api:annotations_go_proto", "//google/iam/v1:iam_go_proto", @@ -128,34 +124,280 @@ go_proto_library( ) go_gapic_library( - name = "bigtableadmin_go_gapic", - src = ":bigtableadmin_proto_with_info", - gapic_yaml = "bigtableadmin_gapic.yaml", - importpath = "cloud.google.com/go/bigtable/admin/apiv2", - service_yaml = "//google/bigtable/admin:bigtableadmin.yaml", + name = "admin_go_gapic", + srcs = [":admin_proto_with_info"], + grpc_service_config = "bigtableadmin_grpc_service_config.json", + importpath = "cloud.google.com/go/bigtable/admin/apiv2;admin", + service_yaml = "bigtableadmin_v2.yaml", deps = [ - ":bigtableadmin_go_proto", + ":admin_go_proto", "//google/iam/v1:iam_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", ], ) go_test( - name = "bigtableadmin_go_gapic_test", - srcs = [":bigtableadmin_go_gapic_srcjar_test"], - embed = [":bigtableadmin_go_gapic"], + name = "admin_go_gapic_test", + srcs = [":admin_go_gapic_srcjar_test"], + embed = [":admin_go_gapic"], importpath = "cloud.google.com/go/bigtable/admin/apiv2", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-bigtableadmin-v2-go", + name = "gapi-cloud-bigtable-admin-v2-go", + deps = [ + ":admin_go_gapic", + ":admin_go_gapic_srcjar-test.srcjar", + ":admin_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "admin_moved_proto", + srcs = [":admin_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "admin_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":admin_moved_proto"], +) + +py_grpc_library( + name = "admin_py_grpc", + srcs = [":admin_moved_proto"], + deps = [":admin_py_proto"], +) + +py_gapic_library( + name = "admin_py_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "bigtableadmin_gapic.yaml", + package = "google.bigtable.admin.v2", + service_yaml = "bigtableadmin_v2.yaml", + deps = [ + ":admin_py_grpc", + ":admin_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "bigtable-admin-v2-py", + deps = [ + ":admin_py_gapic", + ":admin_py_grpc", + ":admin_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "admin_php_proto", + deps = [":admin_proto"], +) + +php_grpc_library( + name = "admin_php_grpc", + srcs = [":admin_proto"], + deps = [":admin_php_proto"], +) + +php_gapic_library( + name = "admin_php_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "bigtableadmin_gapic.legacy.yaml", + package = "google.bigtable.admin.v2", + service_yaml = "bigtableadmin_v2.yaml", + deps = [ + ":admin_php_grpc", + ":admin_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-bigtable-admin-v2-php", + deps = [ + ":admin_php_gapic", + ":admin_php_grpc", + ":admin_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "admin_nodejs_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "bigtableadmin_gapic.yaml", + package = "google.bigtable.admin.v2", + service_yaml = "bigtableadmin_v2.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "bigtable-admin-v2-nodejs", + deps = [ + ":admin_nodejs_gapic", + ":admin_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "admin_ruby_proto", + deps = [":admin_proto"], +) + +ruby_grpc_library( + name = "admin_ruby_grpc", + srcs = [":admin_proto"], + deps = [":admin_ruby_proto"], +) + +ruby_gapic_library( + name = "admin_ruby_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "bigtableadmin_gapic.yaml", + package = "google.bigtable.admin.v2", + service_yaml = "bigtableadmin_v2.yaml", + deps = [ + ":admin_ruby_grpc", + ":admin_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-bigtable-admin-v2-ruby", deps = [ - ":bigtableadmin_go_gapic", - ":bigtableadmin_go_gapic_srcjar-smoke-test.srcjar", - ":bigtableadmin_go_gapic_srcjar-test.srcjar", - ":bigtableadmin_go_proto", + ":admin_ruby_gapic", + ":admin_ruby_grpc", + ":admin_ruby_proto", ], ) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "admin_csharp_proto", + deps = [":admin_proto"], +) + +csharp_grpc_library( + name = "admin_csharp_grpc", + srcs = [":admin_proto"], + deps = [":admin_csharp_proto"], +) + +csharp_gapic_library( + name = "admin_csharp_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "bigtableadmin_gapic.yaml", + package = "google.bigtable.admin.v2", + service_yaml = "bigtableadmin_v2.yaml", + deps = [ + ":admin_csharp_grpc", + ":admin_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-bigtable-admin-v2-csharp", + deps = [ + ":admin_csharp_gapic", + ":admin_csharp_grpc", + ":admin_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# +# PLEASE DO NOT DELETE +# These rules are not auto-generated, but they are used by OSS C++ projects. +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library") + +cc_proto_library( + name = "admin_cc_proto", + deps = [":admin_proto"], +) + +cc_grpc_library( + name = "admin_cc_grpc", + srcs = [":admin_proto"], + grpc_only = True, + deps = [":admin_cc_proto"], +) diff --git a/google/bigtable/admin/v2/bigtable_instance_admin.proto b/google/bigtable/admin/v2/bigtable_instance_admin.proto index 80ce42470..8e05bfd0f 100644 --- a/google/bigtable/admin/v2/bigtable_instance_admin.proto +++ b/google/bigtable/admin/v2/bigtable_instance_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,9 @@ syntax = "proto3"; package google.bigtable.admin.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/bigtable/admin/v2/instance.proto"; import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; @@ -37,13 +40,27 @@ option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; // Clusters. Provides access to the Instance and Cluster schemas only, not the // tables' metadata or data stored in those tables. service BigtableInstanceAdmin { + option (google.api.default_host) = "bigtableadmin.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/bigtable.admin," + "https://www.googleapis.com/auth/bigtable.admin.cluster," + "https://www.googleapis.com/auth/bigtable.admin.instance," + "https://www.googleapis.com/auth/cloud-bigtable.admin," + "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + // Create an instance within a project. - rpc CreateInstance(CreateInstanceRequest) - returns (google.longrunning.Operation) { + rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*}/instances" body: "*" }; + option (google.api.method_signature) = "parent,instance_id,instance,clusters"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "CreateInstanceMetadata" + }; } // Gets information about an instance. @@ -51,6 +68,7 @@ service BigtableInstanceAdmin { option (google.api.http) = { get: "/v2/{name=projects/*/instances/*}" }; + option (google.api.method_signature) = "name"; } // Lists information about instances in a project. @@ -58,9 +76,12 @@ service BigtableInstanceAdmin { option (google.api.http) = { get: "/v2/{parent=projects/*}/instances" }; + option (google.api.method_signature) = "parent"; } - // Updates an instance within a project. + // Updates an instance within a project. This method updates only the display + // name and type for an Instance. To update other Instance properties, such as + // labels, use PartialUpdateInstance. rpc UpdateInstance(Instance) returns (Instance) { option (google.api.http) = { put: "/v2/{name=projects/*/instances/*}" @@ -68,13 +89,18 @@ service BigtableInstanceAdmin { }; } - // Partially updates an instance within a project. - rpc PartialUpdateInstance(PartialUpdateInstanceRequest) - returns (google.longrunning.Operation) { + // Partially updates an instance within a project. This method can modify all + // fields of an Instance and is the preferred way to update an Instance. + rpc PartialUpdateInstance(PartialUpdateInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v2/{instance.name=projects/*/instances/*}" body: "instance" }; + option (google.api.method_signature) = "instance,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "UpdateInstanceMetadata" + }; } // Delete an instance from a project. @@ -82,15 +108,20 @@ service BigtableInstanceAdmin { option (google.api.http) = { delete: "/v2/{name=projects/*/instances/*}" }; + option (google.api.method_signature) = "name"; } // Creates a cluster within an instance. - rpc CreateCluster(CreateClusterRequest) - returns (google.longrunning.Operation) { + rpc CreateCluster(CreateClusterRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*/instances/*}/clusters" body: "cluster" }; + option (google.api.method_signature) = "parent,cluster_id,cluster"; + option (google.longrunning.operation_info) = { + response_type: "Cluster" + metadata_type: "CreateClusterMetadata" + }; } // Gets information about a cluster. @@ -98,6 +129,7 @@ service BigtableInstanceAdmin { option (google.api.http) = { get: "/v2/{name=projects/*/instances/*/clusters/*}" }; + option (google.api.method_signature) = "name"; } // Lists information about clusters in an instance. @@ -105,6 +137,7 @@ service BigtableInstanceAdmin { option (google.api.http) = { get: "/v2/{parent=projects/*/instances/*}/clusters" }; + option (google.api.method_signature) = "parent"; } // Updates a cluster within an instance. @@ -113,6 +146,10 @@ service BigtableInstanceAdmin { put: "/v2/{name=projects/*/instances/*/clusters/*}" body: "*" }; + option (google.longrunning.operation_info) = { + response_type: "Cluster" + metadata_type: "UpdateClusterMetadata" + }; } // Deletes a cluster from an instance. @@ -120,6 +157,7 @@ service BigtableInstanceAdmin { option (google.api.http) = { delete: "/v2/{name=projects/*/instances/*/clusters/*}" }; + option (google.api.method_signature) = "name"; } // Creates an app profile within an instance. @@ -128,6 +166,7 @@ service BigtableInstanceAdmin { post: "/v2/{parent=projects/*/instances/*}/appProfiles" body: "app_profile" }; + option (google.api.method_signature) = "parent,app_profile_id,app_profile"; } // Gets information about an app profile. @@ -135,98 +174,118 @@ service BigtableInstanceAdmin { option (google.api.http) = { get: "/v2/{name=projects/*/instances/*/appProfiles/*}" }; + option (google.api.method_signature) = "name"; } // Lists information about app profiles in an instance. - rpc ListAppProfiles(ListAppProfilesRequest) - returns (ListAppProfilesResponse) { + rpc ListAppProfiles(ListAppProfilesRequest) returns (ListAppProfilesResponse) { option (google.api.http) = { get: "/v2/{parent=projects/*/instances/*}/appProfiles" }; + option (google.api.method_signature) = "parent"; } // Updates an app profile within an instance. - rpc UpdateAppProfile(UpdateAppProfileRequest) - returns (google.longrunning.Operation) { + rpc UpdateAppProfile(UpdateAppProfileRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v2/{app_profile.name=projects/*/instances/*/appProfiles/*}" body: "app_profile" }; + option (google.api.method_signature) = "app_profile,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AppProfile" + metadata_type: "UpdateAppProfileMetadata" + }; } // Deletes an app profile from an instance. - rpc DeleteAppProfile(DeleteAppProfileRequest) - returns (google.protobuf.Empty) { + rpc DeleteAppProfile(DeleteAppProfileRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=projects/*/instances/*/appProfiles/*}" }; + option (google.api.method_signature) = "name"; } // Gets the access control policy for an instance resource. Returns an empty // policy if an instance exists but does not have a policy set. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v2/{resource=projects/*/instances/*}:getIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource"; } // Sets the access control policy on an instance resource. Replaces any // existing policy. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v2/{resource=projects/*/instances/*}:setIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource,policy"; } // Returns permissions that the caller has on the specified instance resource. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v2/{resource=projects/*/instances/*}:testIamPermissions" body: "*" }; + option (google.api.method_signature) = "resource,permissions"; } } // Request message for BigtableInstanceAdmin.CreateInstance. message CreateInstanceRequest { - // The unique name of the project in which to create the new instance. - // Values are of the form `projects/`. - string parent = 1; - - // The ID to be used when referring to the new instance within its project, + // Required. The unique name of the project in which to create the new instance. + // Values are of the form `projects/{project}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The ID to be used when referring to the new instance within its project, // e.g., just `myinstance` rather than // `projects/myproject/instances/myinstance`. - string instance_id = 2; + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The instance to create. + // Required. The instance to create. // Fields marked `OutputOnly` must be left blank. - Instance instance = 3; + Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; - // The clusters to be created within the instance, mapped by desired + // Required. The clusters to be created within the instance, mapped by desired // cluster ID, e.g., just `mycluster` rather than // `projects/myproject/instances/myinstance/clusters/mycluster`. // Fields marked `OutputOnly` must be left blank. - // Currently, at most two clusters can be specified. - map clusters = 4; + // Currently, at most four clusters can be specified. + map clusters = 4 [(google.api.field_behavior) = REQUIRED]; } // Request message for BigtableInstanceAdmin.GetInstance. message GetInstanceRequest { - // The unique name of the requested instance. Values are of the form - // `projects//instances/`. - string name = 1; + // Required. The unique name of the requested instance. Values are of the form + // `projects/{project}/instances/{instance}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Instance" + } + ]; } // Request message for BigtableInstanceAdmin.ListInstances. message ListInstancesRequest { - // The unique name of the project for which a list of instances is requested. - // Values are of the form `projects/`. - string parent = 1; + // Required. The unique name of the project for which a list of instances is requested. + // Values are of the form `projects/{project}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // DEPRECATED: This field is unused and ignored. string page_token = 2; @@ -251,52 +310,72 @@ message ListInstancesResponse { // Request message for BigtableInstanceAdmin.PartialUpdateInstance. message PartialUpdateInstanceRequest { - // The Instance which will (partially) replace the current value. - Instance instance = 1; + // Required. The Instance which will (partially) replace the current value. + Instance instance = 1 [(google.api.field_behavior) = REQUIRED]; - // The subset of Instance fields which should be replaced. + // Required. The subset of Instance fields which should be replaced. // Must be explicitly set. - google.protobuf.FieldMask update_mask = 2; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for BigtableInstanceAdmin.DeleteInstance. message DeleteInstanceRequest { - // The unique name of the instance to be deleted. - // Values are of the form `projects//instances/`. - string name = 1; + // Required. The unique name of the instance to be deleted. + // Values are of the form `projects/{project}/instances/{instance}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Instance" + } + ]; } // Request message for BigtableInstanceAdmin.CreateCluster. message CreateClusterRequest { - // The unique name of the instance in which to create the new cluster. + // Required. The unique name of the instance in which to create the new cluster. // Values are of the form - // `projects//instances/`. - string parent = 1; - - // The ID to be used when referring to the new cluster within its instance, + // `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Instance" + } + ]; + + // Required. The ID to be used when referring to the new cluster within its instance, // e.g., just `mycluster` rather than // `projects/myproject/instances/myinstance/clusters/mycluster`. - string cluster_id = 2; + string cluster_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The cluster to be created. + // Required. The cluster to be created. // Fields marked `OutputOnly` must be left blank. - Cluster cluster = 3; + Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for BigtableInstanceAdmin.GetCluster. message GetClusterRequest { - // The unique name of the requested cluster. Values are of the form - // `projects//instances//clusters/`. - string name = 1; + // Required. The unique name of the requested cluster. Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Cluster" + } + ]; } // Request message for BigtableInstanceAdmin.ListClusters. message ListClustersRequest { - // The unique name of the instance for which a list of clusters is requested. - // Values are of the form `projects//instances/`. - // Use ` = '-'` to list Clusters for all Instances in a project, + // Required. The unique name of the instance for which a list of clusters is requested. + // Values are of the form `projects/{project}/instances/{instance}`. + // Use `{instance} = '-'` to list Clusters for all Instances in a project, // e.g., `projects/myproject/instances/-`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Instance" + } + ]; // DEPRECATED: This field is unused and ignored. string page_token = 2; @@ -320,9 +399,14 @@ message ListClustersResponse { // Request message for BigtableInstanceAdmin.DeleteCluster. message DeleteClusterRequest { - // The unique name of the cluster to be deleted. Values are of the form - // `projects//instances//clusters/`. - string name = 1; + // Required. The unique name of the cluster to be deleted. Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Cluster" + } + ]; } // The metadata for the Operation returned by CreateInstance. @@ -375,19 +459,24 @@ message UpdateClusterMetadata { // Request message for BigtableInstanceAdmin.CreateAppProfile. message CreateAppProfileRequest { - // The unique name of the instance in which to create the new app profile. + // Required. The unique name of the instance in which to create the new app profile. // Values are of the form - // `projects//instances/`. - string parent = 1; - - // The ID to be used when referring to the new app profile within its + // `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Instance" + } + ]; + + // Required. The ID to be used when referring to the new app profile within its // instance, e.g., just `myprofile` rather than // `projects/myproject/instances/myinstance/appProfiles/myprofile`. - string app_profile_id = 2; + string app_profile_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The app profile to be created. + // Required. The app profile to be created. // Fields marked `OutputOnly` will be ignored. - AppProfile app_profile = 3; + AppProfile app_profile = 3 [(google.api.field_behavior) = REQUIRED]; // If true, ignore safety checks when creating the app profile. bool ignore_warnings = 4; @@ -395,22 +484,39 @@ message CreateAppProfileRequest { // Request message for BigtableInstanceAdmin.GetAppProfile. message GetAppProfileRequest { - // The unique name of the requested app profile. Values are of the form - // `projects//instances//appProfiles/`. - string name = 1; + // Required. The unique name of the requested app profile. Values are of the form + // `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/AppProfile" + } + ]; } // Request message for BigtableInstanceAdmin.ListAppProfiles. message ListAppProfilesRequest { - // The unique name of the instance for which a list of app profiles is + // Required. The unique name of the instance for which a list of app profiles is // requested. Values are of the form - // `projects//instances/`. - // Use ` = '-'` to list AppProfiles for all Instances in a project, + // `projects/{project}/instances/{instance}`. + // Use `{instance} = '-'` to list AppProfiles for all Instances in a project, // e.g., `projects/myproject/instances/-`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Instance" + } + ]; // Maximum number of results per page. - // CURRENTLY UNIMPLEMENTED AND IGNORED. + // + // A page_size of zero lets the server choose the number of items to return. + // A page_size which is strictly positive will return at most that many items. + // A negative page_size will cause an error. + // + // Following the first request, subsequent paginated calls are not required + // to pass a page_size. If a page_size is set in subsequent calls, it must + // match the page_size given in the first request. int32 page_size = 3; // The value of `next_page_token` returned by a previous call. @@ -436,12 +542,12 @@ message ListAppProfilesResponse { // Request message for BigtableInstanceAdmin.UpdateAppProfile. message UpdateAppProfileRequest { - // The app profile which will (partially) replace the current value. - AppProfile app_profile = 1; + // Required. The app profile which will (partially) replace the current value. + AppProfile app_profile = 1 [(google.api.field_behavior) = REQUIRED]; - // The subset of app profile fields which should be replaced. + // Required. The subset of app profile fields which should be replaced. // If unset, all fields will be replaced. - google.protobuf.FieldMask update_mask = 2; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; // If true, ignore safety checks when updating the app profile. bool ignore_warnings = 3; @@ -449,9 +555,14 @@ message UpdateAppProfileRequest { // Request message for BigtableInstanceAdmin.DeleteAppProfile. message DeleteAppProfileRequest { - // The unique name of the app profile to be deleted. Values are of the form - // `projects//instances//appProfiles/`. - string name = 1; + // Required. The unique name of the app profile to be deleted. Values are of the form + // `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/AppProfile" + } + ]; // If true, ignore safety checks when deleting the app profile. bool ignore_warnings = 2; diff --git a/google/bigtable/admin/v2/bigtable_table_admin.proto b/google/bigtable/admin/v2/bigtable_table_admin.proto index 79c461e05..119ef73a4 100644 --- a/google/bigtable/admin/v2/bigtable_table_admin.proto +++ b/google/bigtable/admin/v2/bigtable_table_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,17 +11,23 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.bigtable.admin.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/bigtable/admin/v2/common.proto"; import "google/bigtable/admin/v2/table.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; @@ -37,6 +43,15 @@ option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; // Provides access to the table schemas only, not the data stored within // the tables. service BigtableTableAdmin { + option (google.api.default_host) = "bigtableadmin.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/bigtable.admin," + "https://www.googleapis.com/auth/bigtable.admin.table," + "https://www.googleapis.com/auth/cloud-bigtable.admin," + "https://www.googleapis.com/auth/cloud-bigtable.admin.table," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + // Creates a new table in the specified instance. // The table can be created with a full set of initial column families, // specified in the request. @@ -45,6 +60,7 @@ service BigtableTableAdmin { post: "/v2/{parent=projects/*/instances/*}/tables" body: "*" }; + option (google.api.method_signature) = "parent,table_id,table"; } // Creates a new table from the specified snapshot. The target table must @@ -61,6 +77,11 @@ service BigtableTableAdmin { post: "/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot" body: "*" }; + option (google.api.method_signature) = "parent,table_id,source_snapshot"; + option (google.longrunning.operation_info) = { + response_type: "Table" + metadata_type: "CreateTableFromSnapshotMetadata" + }; } // Lists all tables served from a specified instance. @@ -68,6 +89,7 @@ service BigtableTableAdmin { option (google.api.http) = { get: "/v2/{parent=projects/*/instances/*}/tables" }; + option (google.api.method_signature) = "parent"; } // Gets metadata information about the specified table. @@ -75,6 +97,7 @@ service BigtableTableAdmin { option (google.api.http) = { get: "/v2/{name=projects/*/instances/*/tables/*}" }; + option (google.api.method_signature) = "name"; } // Permanently deletes a specified table and all of its data. @@ -82,6 +105,7 @@ service BigtableTableAdmin { option (google.api.http) = { delete: "/v2/{name=projects/*/instances/*/tables/*}" }; + option (google.api.method_signature) = "name"; } // Performs a series of column family modifications on the specified table. @@ -93,6 +117,7 @@ service BigtableTableAdmin { post: "/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies" body: "*" }; + option (google.api.method_signature) = "name,modifications"; } // Permanently drop/delete a row range from a specified table. The request can @@ -115,6 +140,7 @@ service BigtableTableAdmin { post: "/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken" body: "*" }; + option (google.api.method_signature) = "name"; } // Checks replication consistency based on a consistency token, that is, if @@ -126,6 +152,7 @@ service BigtableTableAdmin { post: "/v2/{name=projects/*/instances/*/tables/*}:checkConsistency" body: "*" }; + option (google.api.method_signature) = "name,consistency_token"; } // Creates a new snapshot in the specified cluster from the specified @@ -142,6 +169,12 @@ service BigtableTableAdmin { post: "/v2/{name=projects/*/instances/*/tables/*}:snapshot" body: "*" }; + option (google.api.method_signature) = + "name,cluster,snapshot_id,description"; + option (google.longrunning.operation_info) = { + response_type: "Snapshot" + metadata_type: "SnapshotTableMetadata" + }; } // Gets metadata information about the specified snapshot. @@ -155,6 +188,7 @@ service BigtableTableAdmin { option (google.api.http) = { get: "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}" }; + option (google.api.method_signature) = "name"; } // Lists all snapshots associated with the specified cluster. @@ -168,6 +202,7 @@ service BigtableTableAdmin { option (google.api.http) = { get: "/v2/{parent=projects/*/instances/*/clusters/*}/snapshots" }; + option (google.api.method_signature) = "parent"; } // Permanently deletes the specified snapshot. @@ -181,6 +216,121 @@ service BigtableTableAdmin { option (google.api.http) = { delete: "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}" }; + option (google.api.method_signature) = "name"; + } + + // Starts creating a new Cloud Bigtable Backup. The returned backup + // [long-running operation][google.longrunning.Operation] can be used to + // track creation of the backup. The + // [metadata][google.longrunning.Operation.metadata] field type is + // [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The + // [response][google.longrunning.Operation.response] field type is + // [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the + // returned operation will stop the creation and delete the backup. + rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*/clusters/*}/backups" + body: "backup" + }; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "CreateBackupMetadata" + }; + option (google.api.method_signature) = "parent,backup_id,backup"; + } + + // Gets metadata on a pending or completed Cloud Bigtable Backup. + rpc GetBackup(GetBackupRequest) returns (Backup) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*/clusters/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a pending or completed Cloud Bigtable Backup. + rpc UpdateBackup(UpdateBackupRequest) returns (Backup) { + option (google.api.http) = { + patch: "/v2/{backup.name=projects/*/instances/*/clusters/*/backups/*}" + body: "backup" + }; + option (google.api.method_signature) = "backup,update_mask"; + } + + // Deletes a pending or completed Cloud Bigtable backup. + rpc DeleteBackup(DeleteBackupRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*/clusters/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Cloud Bigtable backups. Returns both completed and pending + // backups. + rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*/clusters/*}/backups" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a new table by restoring from a completed backup. The new table + // must be in the same instance as the instance containing the backup. The + // returned table [long-running operation][google.longrunning.Operation] can + // be used to track the progress of the operation, and to cancel it. The + // [metadata][google.longrunning.Operation.metadata] field type is + // [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The + // [response][google.longrunning.Operation.response] type is + // [Table][google.bigtable.admin.v2.Table], if successful. + rpc RestoreTable(RestoreTableRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*}/tables:restore" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Table" + metadata_type: "RestoreTableMetadata" + }; + } + + // Gets the access control policy for a resource. + // Returns an empty policy if the resource exists but does not have a policy + // set. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v2/{resource=projects/*/instances/*/tables/*}:getIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource"; + } + + // Sets the access control policy on a Table or Backup resource. + // Replaces any existing policy. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v2/{resource=projects/*/instances/*/tables/*}:setIamPolicy" + body: "*" + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:setIamPolicy" + body: "*" + } + }; + option (google.api.method_signature) = "resource,policy"; + } + + // Returns permissions that the caller has on the specified table resource. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v2/{resource=projects/*/instances/*/tables/*}:testIamPermissions" + body: "*" + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:testIamPermissions" + body: "*" + } + }; + option (google.api.method_signature) = "resource,permissions"; } } @@ -193,16 +343,22 @@ message CreateTableRequest { bytes key = 1; } - // The unique name of the instance in which to create the table. - // Values are of the form `projects//instances/`. - string parent = 1; + // Required. The unique name of the instance in which to create the table. + // Values are of the form `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Instance" + } + ]; - // The name by which the new table should be referred to within the parent - // instance, e.g., `foobar` rather than `/tables/foobar`. - string table_id = 2; + // Required. The name by which the new table should be referred to within the + // parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + // Maximum 50 characters. + string table_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The Table to create. - Table table = 3; + // Required. The Table to create. + Table table = 3 [(google.api.field_behavior) = REQUIRED]; // The optional list of row keys that will be used to initially split the // table into several tablets (tablets are similar to HBase regions). @@ -231,28 +387,41 @@ message CreateTableRequest { // feature might be changed in backward-incompatible ways and is not recommended // for production use. It is not subject to any SLA or deprecation policy. message CreateTableFromSnapshotRequest { - // The unique name of the instance in which to create the table. - // Values are of the form `projects//instances/`. - string parent = 1; - - // The name by which the new table should be referred to within the parent - // instance, e.g., `foobar` rather than `/tables/foobar`. - string table_id = 2; - - // The unique name of the snapshot from which to restore the table. The - // snapshot and the table must be in the same instance. - // Values are of the form - // `projects//instances//clusters//snapshots/`. - string source_snapshot = 3; + // Required. The unique name of the instance in which to create the table. + // Values are of the form `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Instance" + } + ]; + + // Required. The name by which the new table should be referred to within the + // parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + string table_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The unique name of the snapshot from which to restore the table. + // The snapshot and the table must be in the same instance. Values are of the + // form + // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + string source_snapshot = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Snapshot" + } + ]; } // Request message for // [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange] message DropRowRangeRequest { - // The unique name of the table on which to drop a range of rows. + // Required. The unique name of the table on which to drop a range of rows. // Values are of the form - // `projects//instances//tables/`. - string name = 1; + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "bigtable.googleapis.com/Table" } + ]; // Delete all rows or by prefix. oneof target { @@ -268,16 +437,28 @@ message DropRowRangeRequest { // Request message for // [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables] message ListTablesRequest { - // The unique name of the instance for which tables should be listed. - // Values are of the form `projects//instances/`. - string parent = 1; + // Required. The unique name of the instance for which tables should be + // listed. Values are of the form `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Instance" + } + ]; // The view to be applied to the returned tables' fields. - // Defaults to `NAME_ONLY` if unspecified; no others are currently supported. + // Only NAME_ONLY view (default) and REPLICATION_VIEW are supported. Table.View view = 2; // Maximum number of results per page. - // CURRENTLY UNIMPLEMENTED AND IGNORED. + // + // A page_size of zero lets the server choose the number of items to return. + // A page_size which is strictly positive will return at most that many items. + // A negative page_size will cause an error. + // + // Following the first request, subsequent paginated calls are not required + // to pass a page_size. If a page_size is set in subsequent calls, it must + // match the page_size given in the first request. int32 page_size = 4; // The value of `next_page_token` returned by a previous call. @@ -299,10 +480,13 @@ message ListTablesResponse { // Request message for // [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable] message GetTableRequest { - // The unique name of the requested table. + // Required. The unique name of the requested table. // Values are of the form - // `projects//instances//tables/
`. - string name = 1; + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "bigtable.googleapis.com/Table" } + ]; // The view to be applied to the returned table's fields. // Defaults to `SCHEMA_VIEW` if unspecified. @@ -312,10 +496,13 @@ message GetTableRequest { // Request message for // [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable] message DeleteTableRequest { - // The unique name of the table to be deleted. + // Required. The unique name of the table to be deleted. // Values are of the form - // `projects//instances//tables/
`. - string name = 1; + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "bigtable.googleapis.com/Table" } + ]; } // Request message for @@ -342,25 +529,32 @@ message ModifyColumnFamiliesRequest { } } - // The unique name of the table whose families should be modified. + // Required. The unique name of the table whose families should be modified. // Values are of the form - // `projects//instances//tables/
`. - string name = 1; - - // Modifications to be atomically applied to the specified table's families. - // Entries are applied in order, meaning that earlier modifications can be - // masked by later ones (in the case of repeated updates to the same family, - // for example). - repeated Modification modifications = 2; + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "bigtable.googleapis.com/Table" } + ]; + + // Required. Modifications to be atomically applied to the specified table's + // families. Entries are applied in order, meaning that earlier modifications + // can be masked by later ones (in the case of repeated updates to the same + // family, for example). + repeated Modification modifications = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request message for // [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken] message GenerateConsistencyTokenRequest { - // The unique name of the Table for which to create a consistency token. - // Values are of the form - // `projects//instances//tables/
`. - string name = 1; + // Required. The unique name of the Table for which to create a consistency + // token. Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "bigtable.googleapis.com/Table" } + ]; } // Response message for @@ -373,13 +567,16 @@ message GenerateConsistencyTokenResponse { // Request message for // [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency] message CheckConsistencyRequest { - // The unique name of the Table for which to check replication consistency. - // Values are of the form - // `projects//instances//tables/
`. - string name = 1; - - // The token created using GenerateConsistencyToken for the Table. - string consistency_token = 2; + // Required. The unique name of the Table for which to check replication + // consistency. Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "bigtable.googleapis.com/Table" } + ]; + + // Required. The token created using GenerateConsistencyToken for the Table. + string consistency_token = 2 [(google.api.field_behavior) = REQUIRED]; } // Response message for @@ -398,21 +595,29 @@ message CheckConsistencyResponse { // feature might be changed in backward-incompatible ways and is not recommended // for production use. It is not subject to any SLA or deprecation policy. message SnapshotTableRequest { - // The unique name of the table to have the snapshot taken. + // Required. The unique name of the table to have the snapshot taken. // Values are of the form - // `projects//instances//tables/
`. - string name = 1; + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "bigtable.googleapis.com/Table" } + ]; - // The name of the cluster where the snapshot will be created in. + // Required. The name of the cluster where the snapshot will be created in. // Values are of the form - // `projects//instances//clusters/`. - string cluster = 2; + // `projects/{project}/instances/{instance}/clusters/{cluster}`. + string cluster = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Cluster" + } + ]; - // The ID by which the new snapshot should be referred to within the parent - // cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` - // rather than - // `projects//instances//clusters//snapshots/mysnapshot`. - string snapshot_id = 3; + // Required. The ID by which the new snapshot should be referred to within the + // parent cluster, e.g., `mysnapshot` of the form: + // `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than + // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. + string snapshot_id = 3 [(google.api.field_behavior) = REQUIRED]; // The amount of time that the new snapshot can stay active after it is // created. Once 'ttl' expires, the snapshot will get deleted. The maximum @@ -432,10 +637,15 @@ message SnapshotTableRequest { // feature might be changed in backward-incompatible ways and is not recommended // for production use. It is not subject to any SLA or deprecation policy. message GetSnapshotRequest { - // The unique name of the requested snapshot. + // Required. The unique name of the requested snapshot. // Values are of the form - // `projects//instances//clusters//snapshots/`. - string name = 1; + // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Snapshot" + } + ]; } // Request message for @@ -446,12 +656,17 @@ message GetSnapshotRequest { // feature might be changed in backward-incompatible ways and is not recommended // for production use. It is not subject to any SLA or deprecation policy. message ListSnapshotsRequest { - // The unique name of the cluster for which snapshots should be listed. - // Values are of the form - // `projects//instances//clusters/`. - // Use ` = '-'` to list snapshots for all clusters in an instance, - // e.g., `projects//instances//clusters/-`. - string parent = 1; + // Required. The unique name of the cluster for which snapshots should be + // listed. Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}`. + // Use `{cluster} = '-'` to list snapshots for all clusters in an instance, + // e.g., `projects/{project}/instances/{instance}/clusters/-`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Cluster" + } + ]; // The maximum number of snapshots to return per page. // CURRENTLY UNIMPLEMENTED AND IGNORED. @@ -486,10 +701,15 @@ message ListSnapshotsResponse { // feature might be changed in backward-incompatible ways and is not recommended // for production use. It is not subject to any SLA or deprecation policy. message DeleteSnapshotRequest { - // The unique name of the snapshot to be deleted. + // Required. The unique name of the snapshot to be deleted. // Values are of the form - // `projects//instances//clusters//snapshots/`. - string name = 1; + // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Snapshot" + } + ]; } // The metadata for the Operation returned by SnapshotTable. @@ -526,3 +746,248 @@ message CreateTableFromSnapshotMetadata { // The time at which the operation failed or was completed successfully. google.protobuf.Timestamp finish_time = 3; } + +// The request for +// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]. +message CreateBackupRequest { + // Required. This must be one of the clusters in the instance in which this + // table is located. The backup will be stored in this cluster. Values are + // of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Cluster" + } + ]; + + // Required. The id of the backup to be created. The `backup_id` along with + // the parent `parent` are combined as {parent}/backups/{backup_id} to create + // the full backup name, of the form: + // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + // This string must be between 1 and 50 characters in length and match the + // regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. + string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The backup to create. + Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata type for the operation returned by +// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]. +message CreateBackupMetadata { + // The name of the backup being created. + string name = 1; + + // The name of the table the backup is created from. + string source_table = 2; + + // The time at which this operation started. + google.protobuf.Timestamp start_time = 3; + + // If set, the time at which this operation finished or was cancelled. + google.protobuf.Timestamp end_time = 4; +} + +// The request for +// [GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup]. +message GetBackupRequest { + // Required. Name of the backup. + // Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "bigtable.googleapis.com/Backup" } + ]; +} + +// The request for +// [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup]. +message UpdateBackupRequest { + // Required. The backup to update. `backup.name`, and the fields to be updated + // as specified by `update_mask` are required. Other fields are ignored. + // Update is only supported for the following fields: + // * `backup.expire_time`. + Backup backup = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A mask specifying which fields (e.g. `expire_time`) in the + // Backup resource should be updated. This mask is relative to the Backup + // resource, not to the request message. The field mask must always be + // specified; this prevents any future fields from being erased accidentally + // by clients that do not know about them. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// The request for +// [DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup]. +message DeleteBackupRequest { + // Required. Name of the backup to delete. + // Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "bigtable.googleapis.com/Backup" } + ]; +} + +// The request for +// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]. +message ListBackupsRequest { + // Required. The cluster to list backups from. Values are of the + // form `projects/{project}/instances/{instance}/clusters/{cluster}`. + // Use `{cluster} = '-'` to list backups for all clusters in an instance, + // e.g., `projects/{project}/instances/{instance}/clusters/-`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Cluster" + } + ]; + + // A filter expression that filters backups listed in the response. + // The expression must specify the field name, a comparison operator, + // and the value that you want to use for filtering. The value must be a + // string, a number, or a boolean. The comparison operator must be + // <, >, <=, >=, !=, =, or :. Colon ‘:’ represents a HAS operator which is + // roughly synonymous with equality. Filter rules are case insensitive. + // + // The fields eligible for filtering are: + // * `name` + // * `source_table` + // * `state` + // * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + // * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + // * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + // * `size_bytes` + // + // To filter on multiple expressions, provide each separate expression within + // parentheses. By default, each expression is an AND expression. However, + // you can include AND, OR, and NOT expressions explicitly. + // + // Some examples of using filters are: + // + // * `name:"exact"` --> The backup's name is the string "exact". + // * `name:howl` --> The backup's name contains the string "howl". + // * `source_table:prod` + // --> The source_table's name contains the string "prod". + // * `state:CREATING` --> The backup is pending creation. + // * `state:READY` --> The backup is fully created and ready for use. + // * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` + // --> The backup name contains the string "howl" and start_time + // of the backup is before 2018-03-28T14:50:00Z. + // * `size_bytes > 10000000000` --> The backup's size is greater than 10GB + string filter = 2; + + // An expression for specifying the sort order of the results of the request. + // The string value should specify one or more fields in + // [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at + // https://aip.dev/132#ordering. + // + // Fields supported are: + // * name + // * source_table + // * expire_time + // * start_time + // * end_time + // * size_bytes + // * state + // + // For example, "start_time". The default sorting order is ascending. + // To specify descending order for the field, a suffix " desc" should + // be appended to the field name. For example, "start_time desc". + // Redundant space characters in the syntax are insigificant. + // + // If order_by is empty, results will be sorted by `start_time` in descending + // order starting from the most recently created backup. + string order_by = 3; + + // Number of backups to be returned in the response. If 0 or + // less, defaults to the server's maximum allowed page size. + int32 page_size = 4; + + // If non-empty, `page_token` should contain a + // [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] + // from a previous + // [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the + // same `parent` and with the same `filter`. + string page_token = 5; +} + +// The response for +// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]. +message ListBackupsResponse { + // The list of matching backups. + repeated Backup backups = 1; + + // `next_page_token` can be sent in a subsequent + // [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call + // to fetch more of the matching backups. + string next_page_token = 2; +} + +// The request for +// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]. +message RestoreTableRequest { + // Required. The name of the instance in which to create the restored + // table. This instance must be the parent of the source backup. Values are + // of the form `projects//instances/`. + string parent = 1; + + // Required. The id of the table to create and restore to. This + // table must not already exist. The `table_id` appended to + // `parent` forms the full table name of the form + // `projects//instances//tables/`. + string table_id = 2; + + // Required. The source from which to restore. + oneof source { + // Name of the backup from which to restore. Values are of the form + // `projects//instances//clusters//backups/`. + string backup = 3; + } +} + +// Metadata type for the long-running operation returned by +// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]. +message RestoreTableMetadata { + // Name of the table being created and restored to. + string name = 1; + + // The type of the restore source. + RestoreSourceType source_type = 2; + + // Information about the source used to restore the table, as specified by + // `source` in + // [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest]. + oneof source_info { + BackupInfo backup_info = 3; + } + + // If exists, the name of the long-running operation that will be used to + // track the post-restore optimization process to optimize the performance of + // the restored table. The metadata type of the long-running operation is + // [OptimizeRestoreTableMetadata][]. The response type is + // [Empty][google.protobuf.Empty]. This long-running operation may be + // automatically created by the system if applicable after the + // RestoreTable long-running operation completes successfully. This operation + // may not be created if the table is already optimized or the restore was + // not successful. + string optimize_table_operation_name = 4; + + // The progress of the + // [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] + // operation. + OperationProgress progress = 5; +} + +// Metadata type for the long-running operation used to track the progress +// of optimizations performed on a newly restored table. This long-running +// operation is automatically created by the system after the successful +// completion of a table restore, and cannot be cancelled. +message OptimizeRestoredTableMetadata { + // Name of the restored table being optimized. + string name = 1; + + // The progress of the post-restore optimizations. + OperationProgress progress = 2; +} diff --git a/google/bigtable/admin/v2/bigtableadmin_gapic.legacy.yaml b/google/bigtable/admin/v2/bigtableadmin_gapic.legacy.yaml new file mode 100644 index 000000000..80ea567b3 --- /dev/null +++ b/google/bigtable/admin/v2/bigtableadmin_gapic.legacy.yaml @@ -0,0 +1,1029 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.bigtable.admin.v2 + interface_names: + google.bigtable.admin.v2.BigtableInstanceAdmin: BaseBigtableInstanceAdmin + google.bigtable.admin.v2.BigtableTableAdmin: BaseBigtableTableAdmin + python: + package_name: google.cloud.bigtable_admin_v2.gapic + go: + package_name: cloud.google.com/go/bigtable/admin/apiv2 + csharp: + package_name: Google.Cloud.Bigtable.Admin.V2 + ruby: + package_name: Google::Cloud::Bigtable::Admin::V2 + release_level: GA + php: + package_name: Google\Cloud\Bigtable\Admin\V2 + nodejs: + package_name: admin.v2 +interfaces: +- name: google.bigtable.admin.v2.BigtableInstanceAdmin + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + - name_pattern: projects/{project}/instances/{instance} + entity_name: instance + - name_pattern: projects/{project}/instances/{instance}/appProfiles/{app_profile} + entity_name: app_profile + - name_pattern: projects/{project}/instances/{instance}/clusters/{cluster} + entity_name: cluster + - name_pattern: projects/{project}/locations/{location} + entity_name: location + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: idempotent_params + initial_retry_delay_millis: 1000 + retry_delay_multiplier: 2 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + - name: non_idempotent_params + initial_retry_delay_millis: 0 + retry_delay_multiplier: 1 + max_retry_delay_millis: 0 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 60000 + - name: non_idempotent_heavy_params + initial_retry_delay_millis: 0 + retry_delay_multiplier: 1 + max_retry_delay_millis: 0 + initial_rpc_timeout_millis: 300000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 300000 + total_timeout_millis: 300000 + methods: + - name: CreateInstance + flattening: + groups: + - parameters: + - parent + - instance_id + - instance + - clusters + required_fields: + - parent + - instance_id + - instance + - clusters + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_heavy_params + field_name_patterns: + parent: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 300000 + long_running: + return_type: google.bigtable.admin.v2.Instance + metadata_type: google.bigtable.admin.v2.CreateInstanceMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 600000 + header_request_params: + - parent + - name: GetInstance + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + name: instance + timeout_millis: 60000 + header_request_params: + - name + - name: ListInstances + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + parent: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - parent + - name: UpdateInstance + required_fields: + - name + - display_name + - type + - labels + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + name: instance + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + # Should use PartialUpdateInstance instead + surface_treatments: + - include_languages: [java, csharp] + visibility: DISABLED + header_request_params: + - name + - name: PartialUpdateInstance + flattening: + groups: + - parameters: + - instance + - update_mask + required_fields: + - instance + - update_mask + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + instance.name: instance + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + long_running: + return_type: google.bigtable.admin.v2.Instance + metadata_type: google.bigtable.admin.v2.UpdateInstanceMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 600000 + header_request_params: + - instance.name + - name: DeleteInstance + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + name: instance + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - name + - name: CreateCluster + flattening: + groups: + - parameters: + - parent + - cluster_id + - cluster + required_fields: + - parent + - cluster_id + - cluster + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + parent: instance + resource_name_treatment: STATIC_TYPES + long_running: + return_type: google.bigtable.admin.v2.Cluster + metadata_type: google.bigtable.admin.v2.CreateClusterMetadata + initial_poll_delay_millis: 5000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 60000 + total_poll_timeout_millis: 21600000 + timeout_millis: 60000 + header_request_params: + - parent + - name: GetCluster + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + name: cluster + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - name + - name: ListClusters + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + parent: instance + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - parent + - name: UpdateCluster + required_fields: + - name + - serve_nodes + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + name: cluster + resource_name_treatment: STATIC_TYPES + long_running: + return_type: google.bigtable.admin.v2.Cluster + metadata_type: google.bigtable.admin.v2.UpdateClusterMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 600000 + timeout_millis: 60000 + header_request_params: + - name + - name: DeleteCluster + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + name: cluster + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - name + - name: CreateAppProfile + flattening: + groups: + - parameters: + - parent + - app_profile_id + - app_profile + required_fields: + - parent + - app_profile_id + - app_profile + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + parent: instance + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - parent + - name: GetAppProfile + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + name: app_profile + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - name + - name: ListAppProfiles + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + token_field: page_token + response: + token_field: next_page_token + resources_field: app_profiles + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + parent: instance + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - parent + - name: UpdateAppProfile + flattening: + groups: + - parameters: + - app_profile + - update_mask + required_fields: + - app_profile + - update_mask + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + app_profile.name: app_profile + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + long_running: + return_type: google.bigtable.admin.v2.AppProfile + metadata_type: google.bigtable.admin.v2.UpdateAppProfileMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 600000 + header_request_params: + - app_profile.name + - name: DeleteAppProfile + flattening: + groups: + - parameters: + - name + required_fields: + - name + - ignore_warnings + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + name: app_profile + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - name + - name: GetIamPolicy + flattening: + groups: + - parameters: + - resource + required_fields: + - resource + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + resource: instance + timeout_millis: 60000 + header_request_params: + - resource + - name: SetIamPolicy + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + resource: instance + timeout_millis: 60000 + header_request_params: + - resource + - name: TestIamPermissions + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + resource: instance + timeout_millis: 60000 + header_request_params: + - resource +- name: google.bigtable.admin.v2.BigtableTableAdmin + collections: + - name_pattern: projects/{project}/instances/{instance} + entity_name: instance + - name_pattern: projects/{project}/instances/{instance}/clusters/{cluster} + entity_name: cluster + - name_pattern: projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot} + entity_name: snapshot + - name_pattern: projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup} + entity_name: backup + - name_pattern: projects/{project}/instances/{instance}/tables/{table} + entity_name: table + language_overrides: + - language: csharp + common_resource_name: Google.Cloud.Bigtable.Common.V2.TableName + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: idempotent_params + initial_retry_delay_millis: 1000 + retry_delay_multiplier: 2 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + - name: non_idempotent_params + initial_retry_delay_millis: 0 + retry_delay_multiplier: 1 + max_retry_delay_millis: 0 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 60000 + - name: non_idempotent_heavy_params + initial_retry_delay_millis: 0 + retry_delay_multiplier: 1 + max_retry_delay_millis: 0 + initial_rpc_timeout_millis: 300000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 300000 + total_timeout_millis: 300000 + - name: drop_row_range_params + initial_retry_delay_millis: 0 + retry_delay_multiplier: 1 + max_retry_delay_millis: 0 + initial_rpc_timeout_millis: 3600000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 3600000 + total_timeout_millis: 3600000 + + methods: + - name: CreateTable + flattening: + groups: + - parameters: + - parent + - table_id + - table + required_fields: + - parent + - table_id + - table + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_heavy_params + field_name_patterns: + parent: instance + resource_name_treatment: STATIC_TYPES + timeout_millis: 300000 + header_request_params: + - parent + - name: CreateTableFromSnapshot + flattening: + groups: + - parameters: + - parent + - table_id + - source_snapshot + required_fields: + - parent + - table_id + - source_snapshot + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + parent: instance + resource_name_treatment: STATIC_TYPES + long_running: + return_type: google.bigtable.admin.v2.Table + metadata_type: google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + initial_poll_delay_millis: 5000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 60000 + total_poll_timeout_millis: 3600000 + timeout_millis: 60000 + # Snapshots are Alpha-only and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + header_request_params: + - parent + - name: ListTables + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + token_field: page_token + response: + token_field: next_page_token + resources_field: tables + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + parent: instance + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - parent + - name: GetTable + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + name: table + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - name + - name: DeleteTable + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + name: table + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - name + - name: ModifyColumnFamilies + flattening: + groups: + - parameters: + - name + - modifications + required_fields: + - name + - modifications + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_heavy_params + field_name_patterns: + name: table + resource_name_treatment: STATIC_TYPES + timeout_millis: 300000 + header_request_params: + - name + - name: DropRowRange + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: drop_row_range_params + field_name_patterns: + name: table + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - name + - name: GenerateConsistencyToken + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + name: table + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - name + - name: CheckConsistency + flattening: + groups: + - parameters: + - name + - consistency_token + required_fields: + - name + - consistency_token + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + name: table + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - name + - name: GetIamPolicy + flattening: + groups: + - parameters: + - resource + required_fields: + - resource + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + resource: table + timeout_millis: 60000 + header_request_params: + - resource + - name: SetIamPolicy + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + resource: table + timeout_millis: 60000 + header_request_params: + - resource + - name: TestIamPermissions + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + resource: table + timeout_millis: 60000 + header_request_params: + - resource + - name: SnapshotTable + flattening: + groups: + - parameters: + - name + - cluster + - snapshot_id + - description + required_fields: + - name + - cluster + - snapshot_id + - description + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + name: table + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + long_running: + return_type: google.bigtable.admin.v2.Snapshot + metadata_type: google.bigtable.admin.v2.SnapshotTableMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 600000 + # Snapshots are Alpha-only and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + header_request_params: + - name + - name: GetSnapshot + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + name: snapshot + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + # Snapshots are Alpha-only and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + header_request_params: + - name + - name: ListSnapshots + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: snapshots + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + parent: cluster + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + # Snapshots are Alpha-only and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + header_request_params: + - parent + - name: DeleteSnapshot + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + name: snapshot + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + # Snapshots are Alpha-only and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + header_request_params: + - name + - name: CreateBackup + flattening: + groups: + - parameters: + - parent + - backup_id + - backup + required_fields: + - parent + - backup_id + - backup + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + parent: cluster + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + long_running: + return_type: google.bigtable.admin.v2.Backup + metadata_type: google.bigtable.admin.v2.CreateBackupMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 600000 + # Managed Backup is in alpha and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + header_request_params: + - parent + - name: GetBackup + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + name: backup + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + # Managed Backup is in alpha and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + header_request_params: + - name + - name: ListBackups + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: backups + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + parent: cluster + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + # Managed Backup is in alpha and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + header_request_params: + - parent + - name: UpdateBackup + flattening: + groups: + - parameters: + - backup + - update_mask + required_fields: + - backup + - update_mask + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + name: backup + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + # Managed Backup is in alpha and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + header_request_params: + - backup + - name: DeleteBackup + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + name: backup + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + # Managed Backup is in alpha and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + header_request_params: + - name + - name: RestoreTable + required_fields: + - parent + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + name: cluster + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + long_running: + return_type: google.bigtable.admin.v2.Table + metadata_type: google.bigtable.admin.v2.RestoreTableMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 600000 + # Managed Backup is in alpha and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + header_request_params: + - parent + +resource_name_generation: +- message_name: CreateInstanceRequest + field_entity_map: + parent: project +- message_name: GetInstanceRequest + field_entity_map: + name: instance +- message_name: ListInstancesRequest + field_entity_map: + parent: project +- message_name: UpdateInstanceRequest + field_entity_map: + name: instance +- message_name: DeleteInstanceRequest + field_entity_map: + name: instance +- message_name: CreateClusterRequest + field_entity_map: + parent: instance +- message_name: GetClusterRequest + field_entity_map: + name: cluster +- message_name: ListClustersRequest + field_entity_map: + parent: instance +- message_name: UpdateClusterRequest + field_entity_map: + name: cluster +- message_name: DeleteClusterRequest + field_entity_map: + name: cluster +- message_name: CreateAppProfileRequest + field_entity_map: + parent: instance +- message_name: GetAppProfileRequest + field_entity_map: + name: app_profile +- message_name: ListAppProfilesRequest + field_entity_map: + parent: instance +- message_name: DeleteAppProfileRequest + field_entity_map: + name: app_profile +- message_name: CreateTableRequest + field_entity_map: + parent: instance +- message_name: CreateTableFromSnapshotRequest + field_entity_map: + parent: instance + source_snapshot: snapshot +- message_name: ListTablesRequest + field_entity_map: + parent: instance +- message_name: GetTableRequest + field_entity_map: + name: table +- message_name: DeleteTableRequest + field_entity_map: + name: table +- message_name: ModifyColumnFamiliesRequest + field_entity_map: + name: table +- message_name: DropRowRangeRequest + field_entity_map: + name: table +- message_name: GenerateConsistencyTokenRequest + field_entity_map: + name: table +- message_name: CheckConsistencyRequest + field_entity_map: + name: table +- message_name: SnapshotTableRequest + field_entity_map: + name: table + cluster: cluster + snapshot_id: snapshot +- message_name: GetSnapshotRequest + field_entity_map: + name: snapshot +- message_name: ListSnapshotsRequest + field_entity_map: + parent: cluster +- message_name: DeleteSnapshotRequest + field_entity_map: + name: snapshot +- message_name: CreateBackupRequest + field_entity_map: + parent: cluster +- message_name: GetBackupRequest + field_entity_map: + name: backup +- message_name: ListBackupsRequest + field_entity_map: + parent: cluster +- message_name: UpdateBackupRequest + field_entity_map: + name: backup +- message_name: DeleteBackupRequest + field_entity_map: + name: backup +- message_name: Instance + field_entity_map: + name: instance +- message_name: Cluster + field_entity_map: + name: cluster + location: location +- message_name: Table + field_entity_map: + name: table +- message_name: Snapshot + field_entity_map: + name: snapshot +- message_name: Backup + field_entity_map: + name: backup diff --git a/google/bigtable/admin/v2/bigtableadmin_gapic.yaml b/google/bigtable/admin/v2/bigtableadmin_gapic.yaml index 521f43ec2..1fef6825f 100644 --- a/google/bigtable/admin/v2/bigtableadmin_gapic.yaml +++ b/google/bigtable/admin/v2/bigtableadmin_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.bigtable.admin.v2 @@ -14,773 +14,257 @@ language_settings: package_name: Google.Cloud.Bigtable.Admin.V2 ruby: package_name: Google::Cloud::Bigtable::Admin::V2 - release_level: BETA + release_level: GA php: package_name: Google\Cloud\Bigtable\Admin\V2 nodejs: package_name: admin.v2 interfaces: - name: google.bigtable.admin.v2.BigtableInstanceAdmin - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - - name_pattern: projects/{project}/instances/{instance} - entity_name: instance - - name_pattern: projects/{project}/instances/{instance}/appProfiles/{app_profile} - entity_name: app_profile - - name_pattern: projects/{project}/instances/{instance}/clusters/{cluster} - entity_name: cluster - - name_pattern: projects/{project}/locations/{location} - entity_name: location - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: - - UNAVAILABLE retry_params_def: - - name: default - initial_retry_delay_millis: 5 + - name: idempotent_params + initial_retry_delay_millis: 1000 retry_delay_multiplier: 2 max_retry_delay_millis: 60000 initial_rpc_timeout_millis: 60000 rpc_timeout_multiplier: 1 max_rpc_timeout_millis: 60000 total_timeout_millis: 600000 + - name: non_idempotent_params + initial_retry_delay_millis: 0 + retry_delay_multiplier: 1 + max_retry_delay_millis: 0 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 60000 + - name: non_idempotent_heavy_params + initial_retry_delay_millis: 0 + retry_delay_multiplier: 1 + max_retry_delay_millis: 0 + initial_rpc_timeout_millis: 300000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 300000 + total_timeout_millis: 300000 methods: - name: CreateInstance - flattening: - groups: - - parameters: - - parent - - instance_id - - instance - - clusters - required_fields: - - parent - - instance_id - - instance - - clusters - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + retry_params_name: non_idempotent_heavy_params long_running: - return_type: google.bigtable.admin.v2.Instance - metadata_type: google.bigtable.admin.v2.CreateInstanceMetadata initial_poll_delay_millis: 500 poll_delay_multiplier: 1.5 max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - header_request_params: - - parent + total_poll_timeout_millis: 600000 - name: GetInstance - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: instance - timeout_millis: 120000 - header_request_params: - - name + retry_params_name: idempotent_params - name: ListInstances - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 120000 - header_request_params: - - parent + retry_params_name: idempotent_params - name: UpdateInstance - required_fields: - - name - - display_name - - type - - labels retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: instance - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - # Should use PartialUpdateInstance instead + retry_params_name: idempotent_params surface_treatments: - include_languages: [java, csharp] visibility: DISABLED - header_request_params: - - name - name: PartialUpdateInstance - flattening: - groups: - - parameters: - - instance - - update_mask - required_fields: - - instance - - update_mask retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - instance.name: instance - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + retry_params_name: idempotent_params long_running: - return_type: google.bigtable.admin.v2.Instance - metadata_type: google.bigtable.admin.v2.UpdateInstanceMetadata initial_poll_delay_millis: 500 poll_delay_multiplier: 1.5 max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - header_request_params: - - instance.name + total_poll_timeout_millis: 600000 - name: DeleteInstance - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: instance - resource_name_treatment: STATIC_TYPES - timeout_millis: 150000 - header_request_params: - - name + retry_params_name: non_idempotent_params - name: CreateCluster - flattening: - groups: - - parameters: - - parent - - cluster_id - - cluster - required_fields: - - parent - - cluster_id - - cluster - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: instance - resource_name_treatment: STATIC_TYPES + retry_params_name: non_idempotent_params long_running: - return_type: google.bigtable.admin.v2.Cluster - metadata_type: google.bigtable.admin.v2.CreateClusterMetadata - initial_poll_delay_millis: 500 + initial_poll_delay_millis: 5000 poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 60000 - header_request_params: - - parent + max_poll_delay_millis: 60000 + total_poll_timeout_millis: 21600000 - name: GetCluster - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: cluster - resource_name_treatment: STATIC_TYPES - timeout_millis: 120000 - header_request_params: - - name + retry_params_name: idempotent_params - name: ListClusters - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: instance - resource_name_treatment: STATIC_TYPES - timeout_millis: 120000 - header_request_params: - - parent + retry_params_name: idempotent_params - name: UpdateCluster - required_fields: - - name - - serve_nodes retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: cluster - resource_name_treatment: STATIC_TYPES + retry_params_name: idempotent_params long_running: - return_type: google.bigtable.admin.v2.Cluster - metadata_type: google.bigtable.admin.v2.UpdateClusterMetadata initial_poll_delay_millis: 500 poll_delay_multiplier: 1.5 max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 60000 - header_request_params: - - name + total_poll_timeout_millis: 600000 - name: DeleteCluster - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: cluster - resource_name_treatment: STATIC_TYPES - timeout_millis: 120000 - header_request_params: - - name + retry_params_name: non_idempotent_params - name: CreateAppProfile - flattening: - groups: - - parameters: - - parent - - app_profile_id - - app_profile - required_fields: - - parent - - app_profile_id - - app_profile - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: instance - resource_name_treatment: STATIC_TYPES - timeout_millis: 120000 - header_request_params: - - parent + retry_params_name: non_idempotent_params - name: GetAppProfile - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: app_profile - resource_name_treatment: STATIC_TYPES - timeout_millis: 120000 - header_request_params: - - name + retry_params_name: idempotent_params - name: ListAppProfiles - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - token_field: page_token - response: - token_field: next_page_token - resources_field: app_profiles - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: instance - resource_name_treatment: STATIC_TYPES - timeout_millis: 120000 - header_request_params: - - parent + retry_params_name: idempotent_params - name: UpdateAppProfile - flattening: - groups: - - parameters: - - app_profile - - update_mask - required_fields: - - app_profile - - update_mask retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - app_profile.name: app_profile - resource_name_treatment: STATIC_TYPES - timeout_millis: 120000 + retry_params_name: idempotent_params long_running: - return_type: google.bigtable.admin.v2.AppProfile - metadata_type: google.bigtable.admin.v2.UpdateAppProfileMetadata - initial_poll_delay_millis: 5 + initial_poll_delay_millis: 500 poll_delay_multiplier: 1.5 max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - header_request_params: - - app_profile.name + total_poll_timeout_millis: 600000 - name: DeleteAppProfile - flattening: - groups: - - parameters: - - name - required_fields: - - name - - ignore_warnings - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: app_profile - resource_name_treatment: STATIC_TYPES - timeout_millis: 120000 - header_request_params: - - name + retry_params_name: non_idempotent_params - name: GetIamPolicy - flattening: - groups: - - parameters: - - resource - required_fields: - - resource retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - resource: instance - timeout_millis: 120000 - header_request_params: - - resource + retry_params_name: idempotent_params - name: SetIamPolicy - flattening: - groups: - - parameters: - - resource - - policy - required_fields: - - resource - - policy - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: instance - timeout_millis: 120000 - header_request_params: - - resource + retry_params_name: non_idempotent_params - name: TestIamPermissions - flattening: - groups: - - parameters: - - resource - - permissions - required_fields: - - resource - - permissions retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - resource: instance - timeout_millis: 120000 - header_request_params: - - resource + retry_params_name: idempotent_params + - name: google.bigtable.admin.v2.BigtableTableAdmin - collections: - - name_pattern: projects/{project}/instances/{instance} - entity_name: instance - - name_pattern: projects/{project}/instances/{instance}/clusters/{cluster} - entity_name: cluster - - name_pattern: projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot} - entity_name: snapshot - - name_pattern: projects/{project}/instances/{instance}/tables/{table} - entity_name: table - language_overrides: - - language: csharp - common_resource_name: Google.Cloud.Bigtable.Common.V2.TableName - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 + - name: idempotent_params + initial_retry_delay_millis: 1000 + retry_delay_multiplier: 2 max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 + initial_rpc_timeout_millis: 60000 rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 + max_rpc_timeout_millis: 60000 total_timeout_millis: 600000 + - name: non_idempotent_params + initial_retry_delay_millis: 0 + retry_delay_multiplier: 1 + max_retry_delay_millis: 0 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 60000 + - name: non_idempotent_heavy_params + initial_retry_delay_millis: 0 + retry_delay_multiplier: 1 + max_retry_delay_millis: 0 + initial_rpc_timeout_millis: 300000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 300000 + total_timeout_millis: 300000 + - name: drop_row_range_params + initial_retry_delay_millis: 0 + retry_delay_multiplier: 1 + max_retry_delay_millis: 0 + initial_rpc_timeout_millis: 3600000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 3600000 + total_timeout_millis: 3600000 methods: - name: CreateTable - flattening: - groups: - - parameters: - - parent - - table_id - - table - required_fields: - - parent - - table_id - - table - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: instance - resource_name_treatment: STATIC_TYPES - timeout_millis: 900000 - header_request_params: - - parent + retry_params_name: non_idempotent_heavy_params - name: CreateTableFromSnapshot - flattening: - groups: - - parameters: - - parent - - table_id - - source_snapshot - required_fields: - - parent - - table_id - - source_snapshot - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: instance - resource_name_treatment: STATIC_TYPES + retry_params_name: non_idempotent_params long_running: - return_type: google.bigtable.admin.v2.Table - metadata_type: google.bigtable.admin.v2.CreateTableFromSnapshotMetadata - initial_poll_delay_millis: 500 + initial_poll_delay_millis: 5000 poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 60000 + max_poll_delay_millis: 60000 + total_poll_timeout_millis: 3600000 # Snapshots are Alpha-only and not supported in C# surface_treatments: - include_languages: [csharp] visibility: DISABLED - header_request_params: - - parent - name: ListTables - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - token_field: page_token - response: - token_field: next_page_token - resources_field: tables - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: instance - resource_name_treatment: STATIC_TYPES - timeout_millis: 120000 - header_request_params: - - parent + retry_params_name: idempotent_params - name: GetTable - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: table - resource_name_treatment: STATIC_TYPES - timeout_millis: 120000 - header_request_params: - - name + retry_params_name: idempotent_params - name: DeleteTable - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: table - resource_name_treatment: STATIC_TYPES - timeout_millis: 120000 - header_request_params: - - name + retry_params_name: non_idempotent_params - name: ModifyColumnFamilies - flattening: - groups: - - parameters: - - name - - modifications - required_fields: - - name - - modifications - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: table - resource_name_treatment: STATIC_TYPES - timeout_millis: 900000 - header_request_params: - - name + retry_params_name: non_idempotent_heavy_params - name: DropRowRange - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: table - resource_name_treatment: STATIC_TYPES - timeout_millis: 900000 - header_request_params: - - name + retry_params_name: drop_row_range_params - name: GenerateConsistencyToken - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: table - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - header_request_params: - - name + retry_params_name: idempotent_params - name: CheckConsistency - flattening: - groups: - - parameters: - - name - - consistency_token - required_fields: - - name - - consistency_token retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: table - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - header_request_params: - - name + retry_params_name: idempotent_params + - name: GetIamPolicy + retry_codes_name: idempotent + retry_params_name: idempotent_params + - name: SetIamPolicy + retry_params_name: non_idempotent_params + - name: TestIamPermissions + retry_codes_name: idempotent + retry_params_name: idempotent_params - name: SnapshotTable - flattening: - groups: - - parameters: - - name - - cluster - - snapshot_id - - description - required_fields: - - name - - cluster - - snapshot_id - - description - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: table - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + retry_params_name: non_idempotent_params long_running: - return_type: google.bigtable.admin.v2.Snapshot - metadata_type: google.bigtable.admin.v2.SnapshotTableMetadata initial_poll_delay_millis: 500 poll_delay_multiplier: 1.5 max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 + total_poll_timeout_millis: 600000 # Snapshots are Alpha-only and not supported in C# surface_treatments: - include_languages: [csharp] visibility: DISABLED - header_request_params: - - name - name: GetSnapshot - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: snapshot - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + retry_params_name: idempotent_params # Snapshots are Alpha-only and not supported in C# surface_treatments: - include_languages: [csharp] visibility: DISABLED - header_request_params: - - name - name: ListSnapshots - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: snapshots retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: cluster - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + retry_params_name: idempotent_params # Snapshots are Alpha-only and not supported in C# surface_treatments: - include_languages: [csharp] visibility: DISABLED - header_request_params: - - parent - name: DeleteSnapshot - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: snapshot - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + retry_params_name: non_idempotent_params # Snapshots are Alpha-only and not supported in C# surface_treatments: - include_languages: [csharp] visibility: DISABLED - header_request_params: - - name - -resource_name_generation: -- message_name: CreateInstanceRequest - field_entity_map: - parent: project -- message_name: GetInstanceRequest - field_entity_map: - name: instance -- message_name: ListInstancesRequest - field_entity_map: - parent: project -- message_name: UpdateInstanceRequest - field_entity_map: - name: instance -- message_name: DeleteInstanceRequest - field_entity_map: - name: instance -- message_name: CreateClusterRequest - field_entity_map: - parent: instance -- message_name: GetClusterRequest - field_entity_map: - name: cluster -- message_name: ListClustersRequest - field_entity_map: - parent: instance -- message_name: UpdateClusterRequest - field_entity_map: - name: cluster -- message_name: DeleteClusterRequest - field_entity_map: - name: cluster -- message_name: CreateAppProfileRequest - field_entity_map: - parent: instance -- message_name: GetAppProfileRequest - field_entity_map: - name: app_profile -- message_name: ListAppProfilesRequest - field_entity_map: - parent: instance -- message_name: DeleteAppProfileRequest - field_entity_map: - name: app_profile -- message_name: CreateTableRequest - field_entity_map: - parent: instance -- message_name: CreateTableFromSnapshotRequest - field_entity_map: - parent: instance - source_snapshot: snapshot -- message_name: ListTablesRequest - field_entity_map: - parent: instance -- message_name: GetTableRequest - field_entity_map: - name: table -- message_name: DeleteTableRequest - field_entity_map: - name: table -- message_name: ModifyColumnFamiliesRequest - field_entity_map: - name: table -- message_name: DropRowRangeRequest - field_entity_map: - name: table -- message_name: GenerateConsistencyTokenRequest - field_entity_map: - name: table -- message_name: CheckConsistencyRequest - field_entity_map: - name: table -- message_name: SnapshotTableRequest - field_entity_map: - name: table - cluster: cluster - snapshot_id: snapshot -- message_name: GetSnapshotRequest - field_entity_map: - name: snapshot -- message_name: ListSnapshotsRequest - field_entity_map: - parent: cluster -- message_name: DeleteSnapshotRequest - field_entity_map: - name: snapshot -- message_name: Instance - field_entity_map: - name: instance -- message_name: Cluster - field_entity_map: - name: cluster - location: location -- message_name: Table - field_entity_map: - name: table -- message_name: Snapshot - field_entity_map: - name: snapshot + - name: CreateBackup + retry_params_name: non_idempotent_params + long_running: + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 600000 + # Managed Backup is in alpha and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + - name: GetBackup + retry_params_name: idempotent_params + # Managed Backup is in alpha and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + - name: ListBackups + retry_params_name: idempotent_params + # Managed Backup is in alpha and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + - name: UpdateBackup + retry_params_name: non_idempotent_params + # Managed Backup is in alpha and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + - name: DeleteBackup + retry_params_name: non_idempotent_params + # Managed Backup is in alpha and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED + - name: RestoreTable + retry_params_name: non_idempotent_params + long_running: + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 600000 + # Managed Backup is in alpha and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED diff --git a/google/bigtable/admin/v2/bigtableadmin_grpc_service_config.json b/google/bigtable/admin/v2/bigtableadmin_grpc_service_config.json new file mode 100755 index 000000000..5682ad9fa --- /dev/null +++ b/google/bigtable/admin/v2/bigtableadmin_grpc_service_config.json @@ -0,0 +1,199 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "CreateTable" + }, + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "ModifyColumnFamilies" + } + ], + "timeout": "300s" + }, + { + "name": [ + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "CreateTableFromSnapshot" + }, + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "DeleteTable" + }, + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "SetIamPolicy" + }, + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "SnapshotTable" + }, + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "DeleteSnapshot" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "ListTables" + }, + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "GetTable" + }, + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "GenerateConsistencyToken" + }, + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "CheckConsistency" + }, + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "GetIamPolicy" + }, + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "TestIamPermissions" + }, + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "GetSnapshot" + }, + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "ListSnapshots" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 2, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.bigtable.admin.v2.BigtableTableAdmin", + "method": "DropRowRange" + } + ], + "timeout": "3600s" + }, + { + "name": [ + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "CreateInstance" + } + ], + "timeout": "300s" + }, + { + "name": [ + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "GetInstance" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "ListInstances" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "UpdateInstance" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "PartialUpdateInstance" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "GetCluster" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "ListClusters" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "UpdateCluster" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "GetAppProfile" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "ListAppProfiles" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "UpdateAppProfile" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "GetIamPolicy" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "TestIamPermissions" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 2, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "DeleteInstance" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "CreateCluster" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "DeleteCluster" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "CreateAppProfile" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "DeleteAppProfile" + }, + { + "service": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "method": "SetIamPolicy" + } + ], + "timeout": "60s" + } + ] +} diff --git a/google/bigtable/admin/bigtableadmin.yaml b/google/bigtable/admin/v2/bigtableadmin_v2.yaml similarity index 52% rename from google/bigtable/admin/bigtableadmin.yaml rename to google/bigtable/admin/v2/bigtableadmin_v2.yaml index 5e6b8075d..f13bf93c1 100644 --- a/google/bigtable/admin/bigtableadmin.yaml +++ b/google/bigtable/admin/v2/bigtableadmin_v2.yaml @@ -8,113 +8,48 @@ apis: - name: google.bigtable.admin.v2.BigtableTableAdmin types: +- name: google.bigtable.admin.v2.Backup +- name: google.bigtable.admin.v2.CreateBackupMetadata +- name: google.bigtable.admin.v2.CreateClusterMetadata - name: google.bigtable.admin.v2.CreateInstanceMetadata -- name: google.bigtable.admin.v2.UpdateInstanceMetadata - name: google.bigtable.admin.v2.CreateTableFromSnapshotMetadata +- name: google.bigtable.admin.v2.OptimizeRestoredTableMetadata +- name: google.bigtable.admin.v2.RestoreTableMetadata - name: google.bigtable.admin.v2.SnapshotTableMetadata -- name: google.bigtable.admin.v2.CreateClusterMetadata -- name: google.bigtable.admin.v2.UpdateClusterMetadata - name: google.bigtable.admin.v2.UpdateAppProfileMetadata +- name: google.bigtable.admin.v2.UpdateClusterMetadata +- name: google.bigtable.admin.v2.UpdateInstanceMetadata + +documentation: + summary: Administer your Cloud Bigtable tables and instances. backend: rules: - - selector: google.longrunning.Operations.ListOperations - deadline: 60.0 - - selector: google.longrunning.Operations.GetOperation - deadline: 60.0 - - selector: google.longrunning.Operations.DeleteOperation - deadline: 60.0 - - selector: google.longrunning.Operations.CancelOperation - deadline: 60.0 - - selector: google.longrunning.Operations.WaitOperation - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.CreateInstance - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateInstance - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateInstance - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteInstance - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.CreateCluster - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateCluster - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteCluster - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.CreateAppProfile - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfile - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.ListAppProfiles - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateAppProfile - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.EnableAppProfile - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.DisableAppProfile + - selector: 'google.bigtable.admin.v2.BigtableInstanceAdmin.*' deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteAppProfile - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.GetIamPolicy - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.SetIamPolicy - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.TestIamPermissions + - selector: 'google.bigtable.admin.v2.BigtableTableAdmin.*' deadline: 60.0 - selector: google.bigtable.admin.v2.BigtableTableAdmin.CreateTable deadline: 130.0 - - selector: google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableTableAdmin.ListTables - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableTableAdmin.GetTable - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies - deadline: 60.0 - selector: google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange deadline: 900.0 - - selector: google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots - deadline: 60.0 - - selector: google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot + - selector: 'google.longrunning.Operations.*' deadline: 60.0 http: rules: - - selector: google.longrunning.Operations.ListOperations - get: '/v2/{name=operations/projects/**}/operations' - - - selector: google.longrunning.Operations.GetOperation - get: '/v2/{name=operations/**}' - - - selector: google.longrunning.Operations.DeleteOperation - delete: '/v2/{name=operations/**}' - - selector: google.longrunning.Operations.CancelOperation post: '/v2/{name=operations/**}:cancel' - + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v2/{name=operations/**}' + - selector: google.longrunning.Operations.GetOperation + get: '/v2/{name=operations/**}' + - selector: google.longrunning.Operations.ListOperations + get: '/v2/{name=operations/projects/**}/operations' authentication: rules: - - selector: '*' + - selector: 'google.bigtable.admin.v2.BigtableInstanceAdmin.*' oauth: canonical_scopes: |- https://www.googleapis.com/auth/bigtable.admin, @@ -123,6 +58,56 @@ authentication: https://www.googleapis.com/auth/cloud-bigtable.admin, https://www.googleapis.com/auth/cloud-bigtable.admin.cluster, https://www.googleapis.com/auth/cloud-platform + - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfile + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigtable.admin, + https://www.googleapis.com/auth/bigtable.admin.cluster, + https://www.googleapis.com/auth/bigtable.admin.instance, + https://www.googleapis.com/auth/cloud-bigtable.admin, + https://www.googleapis.com/auth/cloud-bigtable.admin.cluster, + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only + - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigtable.admin, + https://www.googleapis.com/auth/bigtable.admin.cluster, + https://www.googleapis.com/auth/bigtable.admin.instance, + https://www.googleapis.com/auth/cloud-bigtable.admin, + https://www.googleapis.com/auth/cloud-bigtable.admin.cluster, + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only + - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigtable.admin, + https://www.googleapis.com/auth/bigtable.admin.cluster, + https://www.googleapis.com/auth/bigtable.admin.instance, + https://www.googleapis.com/auth/cloud-bigtable.admin, + https://www.googleapis.com/auth/cloud-bigtable.admin.cluster, + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only + - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigtable.admin, + https://www.googleapis.com/auth/bigtable.admin.cluster, + https://www.googleapis.com/auth/bigtable.admin.instance, + https://www.googleapis.com/auth/cloud-bigtable.admin, + https://www.googleapis.com/auth/cloud-bigtable.admin.cluster, + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only + - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigtable.admin, + https://www.googleapis.com/auth/bigtable.admin.cluster, + https://www.googleapis.com/auth/bigtable.admin.instance, + https://www.googleapis.com/auth/cloud-bigtable.admin, + https://www.googleapis.com/auth/cloud-bigtable.admin.cluster, + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only - selector: 'google.bigtable.admin.v2.BigtableTableAdmin.*' oauth: canonical_scopes: |- @@ -131,23 +116,16 @@ authentication: https://www.googleapis.com/auth/cloud-bigtable.admin, https://www.googleapis.com/auth/cloud-bigtable.admin.table, https://www.googleapis.com/auth/cloud-platform - - selector: |- - google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster, - google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance, - google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters, - google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances + - selector: google.bigtable.admin.v2.BigtableTableAdmin.GetTable oauth: canonical_scopes: |- https://www.googleapis.com/auth/bigtable.admin, - https://www.googleapis.com/auth/bigtable.admin.cluster, - https://www.googleapis.com/auth/bigtable.admin.instance, + https://www.googleapis.com/auth/bigtable.admin.table, https://www.googleapis.com/auth/cloud-bigtable.admin, - https://www.googleapis.com/auth/cloud-bigtable.admin.cluster, + https://www.googleapis.com/auth/cloud-bigtable.admin.table, https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/cloud-platform.read-only - - selector: |- - google.bigtable.admin.v2.BigtableTableAdmin.GetTable, - google.bigtable.admin.v2.BigtableTableAdmin.ListTables + - selector: google.bigtable.admin.v2.BigtableTableAdmin.ListTables oauth: canonical_scopes: |- https://www.googleapis.com/auth/bigtable.admin, @@ -156,9 +134,26 @@ authentication: https://www.googleapis.com/auth/cloud-bigtable.admin.table, https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/cloud-platform.read-only - - selector: |- - google.longrunning.Operations.GetOperation, - google.longrunning.Operations.ListOperations + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigtable.admin, + https://www.googleapis.com/auth/bigtable.admin.cluster, + https://www.googleapis.com/auth/bigtable.admin.instance, + https://www.googleapis.com/auth/cloud-bigtable.admin, + https://www.googleapis.com/auth/cloud-bigtable.admin.cluster, + https://www.googleapis.com/auth/cloud-platform + - selector: google.longrunning.Operations.GetOperation + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigtable.admin, + https://www.googleapis.com/auth/bigtable.admin.cluster, + https://www.googleapis.com/auth/bigtable.admin.instance, + https://www.googleapis.com/auth/cloud-bigtable.admin, + https://www.googleapis.com/auth/cloud-bigtable.admin.cluster, + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only + - selector: google.longrunning.Operations.ListOperations oauth: canonical_scopes: |- https://www.googleapis.com/auth/bigtable.admin, diff --git a/google/bigtable/admin/v2/common.proto b/google/bigtable/admin/v2/common.proto index ad4d73599..89d24ea97 100644 --- a/google/bigtable/admin/v2/common.proto +++ b/google/bigtable/admin/v2/common.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,11 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.bigtable.admin.v2; -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; @@ -38,3 +36,18 @@ enum StorageType { // Magnetic drive (HDD) storage should be used. HDD = 2; } + +// Encapsulates progress related information for a Cloud Bigtable long +// running operation. +message OperationProgress { + // Percent completion of the operation. + // Values are between 0 and 100 inclusive. + int32 progress_percent = 1; + + // Time the request was received. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation failed or was completed + // successfully. + google.protobuf.Timestamp end_time = 3; +} diff --git a/google/bigtable/admin/v2/instance.proto b/google/bigtable/admin/v2/instance.proto index ef8599bfe..e15f63ac0 100644 --- a/google/bigtable/admin/v2/instance.proto +++ b/google/bigtable/admin/v2/instance.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,7 +17,8 @@ syntax = "proto3"; package google.bigtable.admin.v2; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/bigtable/admin/v2/common.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; @@ -29,9 +30,14 @@ option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; // A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and // the resources that serve them. -// All tables in an instance are served from a single -// [Cluster][google.bigtable.admin.v2.Cluster]. +// All tables in an instance are served from all +// [Clusters][google.bigtable.admin.v2.Cluster] in the instance. message Instance { + option (google.api.resource) = { + type: "bigtable.googleapis.com/Instance" + pattern: "projects/{project}/instances/{instance}" + }; + // Possible states of an instance. enum State { // The state of the instance could not be determined. @@ -67,15 +73,14 @@ message Instance { DEVELOPMENT = 2; } - // (`OutputOnly`) // The unique name of the instance. Values are of the form - // `projects//instances/[a-z][a-z0-9\\-]+[a-z0-9]`. - string name = 1; + // `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The descriptive name for this instance as it appears in UIs. + // Required. The descriptive name for this instance as it appears in UIs. // Can be changed at any time, but should be kept globally unique // to avoid confusion. - string display_name = 2; + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; // (`OutputOnly`) // The current state of the instance. @@ -102,6 +107,11 @@ message Instance { // of serving all [Tables][google.bigtable.admin.v2.Table] in the parent // [Instance][google.bigtable.admin.v2.Instance]. message Cluster { + option (google.api.resource) = { + type: "bigtable.googleapis.com/Cluster" + pattern: "projects/{project}/instances/{instance}/clusters/{cluster}" + }; + // Possible states of a cluster. enum State { // The state of the cluster could not be determined. @@ -127,25 +137,25 @@ message Cluster { DISABLED = 4; } - // (`OutputOnly`) // The unique name of the cluster. Values are of the form - // `projects//instances//clusters/[a-z][-a-z0-9]*`. - string name = 1; + // `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // (`CreationOnly`) // The location where this cluster's nodes and storage reside. For best // performance, clients should be located as close as possible to this // cluster. Currently only zones are supported, so values should be of the - // form `projects//locations/`. - string location = 2; + // form `projects/{project}/locations/{zone}`. + string location = 2 [(google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + }]; - // (`OutputOnly`) // The current state of the cluster. - State state = 3; + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number of nodes allocated to this cluster. More nodes enable higher - // throughput and more consistent performance. - int32 serve_nodes = 4; + // Required. The number of nodes allocated to this cluster. More nodes enable + // higher throughput and more consistent performance. + int32 serve_nodes = 4 [(google.api.field_behavior) = REQUIRED]; // (`CreationOnly`) // The type of storage used by this cluster to serve its @@ -156,14 +166,20 @@ message Cluster { // A configuration object describing how Cloud Bigtable should treat traffic // from a particular end user application. message AppProfile { - // Read/write requests may be routed to any cluster in the instance, and will - // fail over to another cluster in the event of transient errors or delays. - // Choosing this option sacrifices read-your-writes consistency to improve - // availability. + option (google.api.resource) = { + type: "bigtable.googleapis.com/AppProfile" + pattern: "projects/{project}/instances/{instance}/appProfiles/{app_profile}" + }; + + // Read/write requests are routed to the nearest cluster in the instance, and + // will fail over to the nearest cluster that is available in the event of + // transient errors or delays. Clusters in a region are considered + // equidistant. Choosing this option sacrifices read-your-writes consistency + // to improve availability. message MultiClusterRoutingUseAny {} // Unconditionally routes all read/write requests to a specific cluster. - // This option preserves read-your-writes consistency, but does not improve + // This option preserves read-your-writes consistency but does not improve // availability. message SingleClusterRouting { // The cluster to which read/write requests should be routed. @@ -193,10 +209,10 @@ message AppProfile { // Optional long form description of the use case for this AppProfile. string description = 3; - // The routing policy for all read/write requests which use this app profile. + // The routing policy for all read/write requests that use this app profile. // A value must be explicitly set. oneof routing_policy { - // Use a multi-cluster routing policy that may pick any cluster. + // Use a multi-cluster routing policy. MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5; // Use a single-cluster routing policy. diff --git a/google/bigtable/admin/v2/table.proto b/google/bigtable/admin/v2/table.proto index 5019d8b86..535378989 100644 --- a/google/bigtable/admin/v2/table.proto +++ b/google/bigtable/admin/v2/table.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.bigtable.admin.v2; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -28,9 +28,36 @@ option java_outer_classname = "TableProto"; option java_package = "com.google.bigtable.admin.v2"; option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; +// Indicates the type of the restore source. +enum RestoreSourceType { + // No restore associated. + RESTORE_SOURCE_TYPE_UNSPECIFIED = 0; + + // A backup was used as the source of the restore. + BACKUP = 1; +} + +// Information about a table restore. +message RestoreInfo { + // The type of the restore source. + RestoreSourceType source_type = 1; + + // Information about the source used to restore the table. + oneof source_info { + // Information about the backup used to restore the table. The backup + // may no longer exist. + BackupInfo backup_info = 2; + } +} + // A collection of user data indexed by row, column, and timestamp. // Each table is served using the resources of its parent cluster. message Table { + option (google.api.resource) = { + type: "bigtable.googleapis.com/Table" + pattern: "projects/{project}/instances/{instance}/tables/{table}" + }; + // The state of a table's data in a particular cluster. message ClusterState { // Table replication states. @@ -55,10 +82,14 @@ message Table { // replication delay, reads may not immediately reflect the state of the // table in other clusters. READY = 4; + + // The table is fully created and ready for use after a restore, and is + // being optimized for performance. When optimizations are complete, the + // table will transition to `READY` state. + READY_OPTIMIZING = 5; } - // (`OutputOnly`) - // The state of replication for the table in this cluster. + // Output only. The state of replication for the table in this cluster. ReplicationState replication_state = 1; } @@ -84,22 +115,20 @@ message Table { // Only populates `name` and fields related to the table's schema. SCHEMA_VIEW = 2; - // Only populates `name` and fields related to the table's - // replication state. + // Only populates `name` and fields related to the table's replication + // state. REPLICATION_VIEW = 3; // Populates all fields. FULL = 4; } - // (`OutputOnly`) - // The unique name of the table. Values are of the form + // Output only. The unique name of the table. Values are of the form // `projects//instances//tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. // Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` string name = 1; - // (`OutputOnly`) - // Map from cluster ID to per-cluster table state. + // Output only. Map from cluster ID to per-cluster table state. // If it could not be determined whether or not the table has data in a // particular cluster (for example, if its zone is unavailable), then // there will be an entry for the cluster with UNKNOWN `replication_status`. @@ -115,8 +144,12 @@ message Table { // The granularity (i.e. `MILLIS`) at which timestamps are stored in // this table. Timestamps not matching the granularity will be rejected. // If unspecified at creation time, the value will be set to `MILLIS`. - // Views: `SCHEMA_VIEW`, `FULL` + // Views: `SCHEMA_VIEW`, `FULL`. TimestampGranularity granularity = 4; + + // Output only. If this table was restored from another data source (e.g. a + // backup), this field will be populated with information about the restore. + RestoreInfo restore_info = 6; } // A set of columns within a table which share a common configuration. @@ -170,6 +203,11 @@ message GcRule { // feature might be changed in backward-incompatible ways and is not recommended // for production use. It is not subject to any SLA or deprecation policy. message Snapshot { + option (google.api.resource) = { + type: "bigtable.googleapis.com/Snapshot" + pattern: "projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}" + }; + // Possible states of a snapshot. enum State { // The state of the snapshot could not be determined. @@ -184,37 +222,118 @@ message Snapshot { CREATING = 2; } - // (`OutputOnly`) - // The unique name of the snapshot. + // Output only. The unique name of the snapshot. // Values are of the form // `projects//instances//clusters//snapshots/`. string name = 1; - // (`OutputOnly`) - // The source table at the time the snapshot was taken. + // Output only. The source table at the time the snapshot was taken. Table source_table = 2; - // (`OutputOnly`) - // The size of the data in the source table at the time the snapshot was - // taken. In some cases, this value may be computed asynchronously via a - // background process and a placeholder of 0 will be used in the meantime. + // Output only. The size of the data in the source table at the time the + // snapshot was taken. In some cases, this value may be computed + // asynchronously via a background process and a placeholder of 0 will be used + // in the meantime. int64 data_size_bytes = 3; - // (`OutputOnly`) - // The time when the snapshot is created. + // Output only. The time when the snapshot is created. google.protobuf.Timestamp create_time = 4; - // (`OutputOnly`) - // The time when the snapshot will be deleted. The maximum amount of time a - // snapshot can stay active is 365 days. If 'ttl' is not specified, + // Output only. The time when the snapshot will be deleted. The maximum amount + // of time a snapshot can stay active is 365 days. If 'ttl' is not specified, // the default maximum of 365 days will be used. google.protobuf.Timestamp delete_time = 5; - // (`OutputOnly`) - // The current state of the snapshot. + // Output only. The current state of the snapshot. State state = 6; - // (`OutputOnly`) - // Description of the snapshot. + // Output only. Description of the snapshot. string description = 7; } + +// A backup of a Cloud Bigtable table. +message Backup { + option (google.api.resource) = { + type: "bigtable.googleapis.com/Backup" + pattern: "projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}" + }; + + // Indicates the current state of the backup. + enum State { + // Not specified. + STATE_UNSPECIFIED = 0; + + // The pending backup is still being created. Operations on the + // backup may fail with `FAILED_PRECONDITION` in this state. + CREATING = 1; + + // The backup is complete and ready for use. + READY = 2; + } + + // Output only. A globally unique identifier for the backup which cannot be + // changed. Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}/ + // backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + // The final segment of the name must be between 1 and 50 characters + // in length. + // + // The backup is stored in the cluster identified by the prefix of the backup + // name of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. Name of the table from which this backup was created. + // This needs to be in the same instance as the backup. Values are of the form + // `projects/{project}/instances/{instance}/tables/{source_table}`. + string source_table = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. The expiration time of the backup, with microseconds + // granularity that must be at least 6 hours and at most 30 days + // from the time the request is received. Once the `expire_time` + // has passed, Cloud Bigtable will delete the backup and free the + // resources used by the backup. + google.protobuf.Timestamp expire_time = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. `start_time` is the time that the backup was started + // (i.e. approximately the time the + // [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] + // request is received). The row data in this backup will be no older than + // this timestamp. + google.protobuf.Timestamp start_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. `end_time` is the time that the backup was finished. The row + // data in the backup will be no newer than this timestamp. + google.protobuf.Timestamp end_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Size of the backup in bytes. + int64 size_bytes = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the backup. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Information about a backup. +message BackupInfo { + // Output only. Name of the backup. + string backup = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time that the backup was started. Row data in the backup + // will be no older than this timestamp. + google.protobuf.Timestamp start_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This time that the backup was finished. Row data in the + // backup will be no newer than this timestamp. + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the table the backup was created from. + string source_table = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/bigtable/artman_bigtable.yaml b/google/bigtable/artman_bigtable.yaml index 5b4aa0258..7fd1777a4 100644 --- a/google/bigtable/artman_bigtable.yaml +++ b/google/bigtable/artman_bigtable.yaml @@ -2,8 +2,9 @@ common: api_name: bigtable api_version: v2 organization_name: google-cloud - service_yaml: bigtable.yaml + service_yaml: v2/bigtable_v2.yaml gapic_yaml: v2/bigtable_gapic.yaml + proto_package: google.bigtable.v2 src_proto_paths: - v2 proto_deps: diff --git a/google/bigtable/v2/BUILD.bazel b/google/bigtable/v2/BUILD.bazel index a1d7fc108..c60faf6d4 100644 --- a/google/bigtable/v2/BUILD.bazel +++ b/google/bigtable/v2/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -14,6 +17,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/rpc:status_proto", "@com_google_protobuf//:wrappers_proto", ], @@ -21,7 +27,10 @@ proto_library( proto_library_with_info( name = "bigtable_proto_with_info", - deps = [":bigtable_proto"], + deps = [ + ":bigtable_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -29,18 +38,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "bigtable_java_proto", deps = [":bigtable_proto"], @@ -49,49 +53,40 @@ java_proto_library( java_grpc_library( name = "bigtable_java_grpc", srcs = [":bigtable_proto"], - deps = [":bigtable_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "bigtable_resource_name_java_proto", - gapic_yaml = "bigtable_gapic.yaml", - deps = [":bigtable_proto"], + deps = [":bigtable_java_proto"], ) java_gapic_library( name = "bigtable_java_gapic", src = ":bigtable_proto_with_info", gapic_yaml = "bigtable_gapic.yaml", - service_yaml = "//google/bigtable:bigtable.yaml", - test_deps = [":bigtable_java_grpc"], + package = "google.bigtable.v2", + service_yaml = "bigtable_v2.yaml", + test_deps = [ + ":bigtable_java_grpc", + ], deps = [ ":bigtable_java_proto", - ":bigtable_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, +java_gapic_test( + name = "bigtable_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.bigtable.data.v2.BaseBigtableDataClientTest", + ], runtime_deps = [":bigtable_java_gapic_test"], -) for test_name in [ - "com.google.cloud.bigtable.data.v2.BaseBigtableDataClientTest", -]] +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-bigtable-v2-java", - client_deps = [":bigtable_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":bigtable_java_gapic_test"], - grpc_deps = [":bigtable_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":bigtable_java_gapic", + ":bigtable_java_grpc", ":bigtable_java_proto", ":bigtable_proto", - ":bigtable_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -99,10 +94,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -118,11 +113,13 @@ go_proto_library( go_gapic_library( name = "bigtable_go_gapic", - src = ":bigtable_proto_with_info", - gapic_yaml = "bigtable_gapic.yaml", - importpath = "cloud.google.com/go/bigtable/apiv2", - service_yaml = "//google/bigtable:bigtable.yaml", - deps = [":bigtable_go_proto"], + srcs = [":bigtable_proto_with_info"], + grpc_service_config = "bigtable_grpc_service_config.json", + importpath = "cloud.google.com/go/bigtable/apiv2;bigtable", + service_yaml = "bigtable_v2.yaml", + deps = [ + ":bigtable_go_proto", + ], ) go_test( @@ -132,13 +129,249 @@ go_test( importpath = "cloud.google.com/go/bigtable/apiv2", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-bigtable-v2-go", deps = [ ":bigtable_go_gapic", - ":bigtable_go_gapic_srcjar-smoke-test.srcjar", ":bigtable_go_gapic_srcjar-test.srcjar", ":bigtable_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "bigtable_moved_proto", + srcs = [":bigtable_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "bigtable_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":bigtable_moved_proto"], +) + +py_grpc_library( + name = "bigtable_py_grpc", + srcs = [":bigtable_moved_proto"], + deps = [":bigtable_py_proto"], +) + +py_gapic_library( + name = "bigtable_py_gapic", + src = ":bigtable_proto_with_info", + gapic_yaml = "bigtable_gapic.yaml", + package = "google.bigtable.v2", + service_yaml = "bigtable_v2.yaml", + deps = [ + ":bigtable_py_grpc", + ":bigtable_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "bigtable-v2-py", + deps = [ + ":bigtable_py_gapic", + ":bigtable_py_grpc", + ":bigtable_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "bigtable_php_proto", + deps = [":bigtable_proto"], +) + +php_grpc_library( + name = "bigtable_php_grpc", + srcs = [":bigtable_proto"], + deps = [":bigtable_php_proto"], +) + +php_gapic_library( + name = "bigtable_php_gapic", + src = ":bigtable_proto_with_info", + gapic_yaml = "bigtable_gapic.yaml", + package = "google.bigtable.v2", + service_yaml = "bigtable_v2.yaml", + deps = [ + ":bigtable_php_grpc", + ":bigtable_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-bigtable-v2-php", + deps = [ + ":bigtable_php_gapic", + ":bigtable_php_grpc", + ":bigtable_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "bigtable_nodejs_gapic", + src = ":bigtable_proto_with_info", + gapic_yaml = "bigtable_gapic.yaml", + package = "google.bigtable.v2", + service_yaml = "bigtable_v2.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "bigtable-v2-nodejs", + deps = [ + ":bigtable_nodejs_gapic", + ":bigtable_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "bigtable_ruby_proto", + deps = [":bigtable_proto"], +) + +ruby_grpc_library( + name = "bigtable_ruby_grpc", + srcs = [":bigtable_proto"], + deps = [":bigtable_ruby_proto"], +) + +ruby_gapic_library( + name = "bigtable_ruby_gapic", + src = ":bigtable_proto_with_info", + gapic_yaml = "bigtable_gapic.yaml", + package = "google.bigtable.v2", + service_yaml = "bigtable_v2.yaml", + deps = [ + ":bigtable_ruby_grpc", + ":bigtable_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-bigtable-v2-ruby", + deps = [ + ":bigtable_ruby_gapic", + ":bigtable_ruby_grpc", + ":bigtable_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "bigtable_csharp_proto", + deps = [":bigtable_proto"], +) + +csharp_grpc_library( + name = "bigtable_csharp_grpc", + srcs = [":bigtable_proto"], + deps = [":bigtable_csharp_proto"], +) + +csharp_gapic_library( + name = "bigtable_csharp_gapic", + src = ":bigtable_proto_with_info", + gapic_yaml = "bigtable_gapic.yaml", + package = "google.bigtable.v2", + service_yaml = "bigtable_v2.yaml", + deps = [ + ":bigtable_csharp_grpc", + ":bigtable_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-bigtable-v2-csharp", + deps = [ + ":bigtable_csharp_gapic", + ":bigtable_csharp_grpc", + ":bigtable_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library") + +cc_proto_library( + name = "bigtable_cc_proto", + deps = [":bigtable_proto"], +) + +cc_grpc_library( + name = "bigtable_cc_grpc", + srcs = [":bigtable_proto"], + grpc_only = True, + deps = [":bigtable_cc_proto"], +) diff --git a/google/bigtable/v2/bigtable.proto b/google/bigtable/v2/bigtable.proto index 0ab763ba6..c54225ed3 100644 --- a/google/bigtable/v2/bigtable.proto +++ b/google/bigtable/v2/bigtable.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,9 @@ syntax = "proto3"; package google.bigtable.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/bigtable/v2/data.proto"; import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; @@ -27,9 +30,22 @@ option java_multiple_files = true; option java_outer_classname = "BigtableProto"; option java_package = "com.google.bigtable.v2"; option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option (google.api.resource_definition) = { + type: "bigtable.googleapis.com/Table" + pattern: "projects/{project}/instances/{instance}/tables/{table}" +}; // Service for reading from and writing to existing Bigtable tables. service Bigtable { + option (google.api.default_host) = "bigtable.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/bigtable.data," + "https://www.googleapis.com/auth/bigtable.data.readonly," + "https://www.googleapis.com/auth/cloud-bigtable.data," + "https://www.googleapis.com/auth/cloud-bigtable.data.readonly," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + // Streams back the contents of all requested rows in key order, optionally // applying the same Reader filter to each. Depending on their size, // rows and cells may be broken up across multiple responses, but @@ -40,17 +56,20 @@ service Bigtable { post: "/v2/{table_name=projects/*/instances/*/tables/*}:readRows" body: "*" }; + option (google.api.method_signature) = "table_name"; + option (google.api.method_signature) = "table_name,app_profile_id"; } // Returns a sample of row keys in the table. The returned row keys will // delimit contiguous sections of the table of approximately equal size, // which can be used to break up the data for distributed tasks like // mapreduces. - rpc SampleRowKeys(SampleRowKeysRequest) - returns (stream SampleRowKeysResponse) { + rpc SampleRowKeys(SampleRowKeysRequest) returns (stream SampleRowKeysResponse) { option (google.api.http) = { get: "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys" }; + option (google.api.method_signature) = "table_name"; + option (google.api.method_signature) = "table_name,app_profile_id"; } // Mutates a row atomically. Cells already present in the row are left @@ -60,6 +79,8 @@ service Bigtable { post: "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow" body: "*" }; + option (google.api.method_signature) = "table_name,row_key,mutations"; + option (google.api.method_signature) = "table_name,row_key,mutations,app_profile_id"; } // Mutates multiple rows in a batch. Each individual row is mutated @@ -70,15 +91,18 @@ service Bigtable { post: "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows" body: "*" }; + option (google.api.method_signature) = "table_name,entries"; + option (google.api.method_signature) = "table_name,entries,app_profile_id"; } // Mutates a row atomically based on the output of a predicate Reader filter. - rpc CheckAndMutateRow(CheckAndMutateRowRequest) - returns (CheckAndMutateRowResponse) { + rpc CheckAndMutateRow(CheckAndMutateRowRequest) returns (CheckAndMutateRowResponse) { option (google.api.http) = { post: "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow" body: "*" }; + option (google.api.method_signature) = "table_name,row_key,predicate_filter,true_mutations,false_mutations"; + option (google.api.method_signature) = "table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id"; } // Modifies a row atomically on the server. The method reads the latest @@ -86,21 +110,27 @@ service Bigtable { // entry based on pre-defined read/modify/write rules. The new value for the // timestamp is the greater of the existing timestamp or the current server // time. The method returns the new contents of all modified cells. - rpc ReadModifyWriteRow(ReadModifyWriteRowRequest) - returns (ReadModifyWriteRowResponse) { + rpc ReadModifyWriteRow(ReadModifyWriteRowRequest) returns (ReadModifyWriteRowResponse) { option (google.api.http) = { post: "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow" body: "*" }; + option (google.api.method_signature) = "table_name,row_key,rules"; + option (google.api.method_signature) = "table_name,row_key,rules,app_profile_id"; } } // Request message for Bigtable.ReadRows. message ReadRowsRequest { - // The unique name of the table from which to read. + // Required. The unique name of the table from which to read. // Values are of the form // `projects//instances//tables/
`. - string table_name = 1; + string table_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Table" + } + ]; // This value specifies routing for replication. If not specified, the // "default" application profile will be used. @@ -172,6 +202,7 @@ message ReadRowsResponse { // to pre-allocate memory to hold the full cell value. int32 value_size = 7; + // Signals to the client concerning previous CellChunks received. oneof row_status { // Indicates that the client should drop all previous chunks for // `row_key`, as it will be re-read from the beginning. @@ -183,6 +214,7 @@ message ReadRowsResponse { } } + // A collection of a row's contents as part of the read request. repeated CellChunk chunks = 1; // Optionally the server might return the row key of the last row it @@ -197,10 +229,15 @@ message ReadRowsResponse { // Request message for Bigtable.SampleRowKeys. message SampleRowKeysRequest { - // The unique name of the table from which to sample row keys. + // Required. The unique name of the table from which to sample row keys. // Values are of the form // `projects//instances//tables/
`. - string table_name = 1; + string table_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Table" + } + ]; // This value specifies routing for replication. If not specified, the // "default" application profile will be used. @@ -227,57 +264,71 @@ message SampleRowKeysResponse { // Request message for Bigtable.MutateRow. message MutateRowRequest { - // The unique name of the table to which the mutation should be applied. + // Required. The unique name of the table to which the mutation should be applied. // Values are of the form // `projects//instances//tables/
`. - string table_name = 1; + string table_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Table" + } + ]; // This value specifies routing for replication. If not specified, the // "default" application profile will be used. string app_profile_id = 4; - // The key of the row to which the mutation should be applied. - bytes row_key = 2; + // Required. The key of the row to which the mutation should be applied. + bytes row_key = 2 [(google.api.field_behavior) = REQUIRED]; - // Changes to be atomically applied to the specified row. Entries are applied + // Required. Changes to be atomically applied to the specified row. Entries are applied // in order, meaning that earlier mutations can be masked by later ones. // Must contain at least one entry and at most 100000. - repeated Mutation mutations = 3; + repeated Mutation mutations = 3 [(google.api.field_behavior) = REQUIRED]; } // Response message for Bigtable.MutateRow. -message MutateRowResponse {} +message MutateRowResponse { + +} // Request message for BigtableService.MutateRows. message MutateRowsRequest { + // A mutation for a given row. message Entry { // The key of the row to which the `mutations` should be applied. bytes row_key = 1; - // Changes to be atomically applied to the specified row. Mutations are + // Required. Changes to be atomically applied to the specified row. Mutations are // applied in order, meaning that earlier mutations can be masked by // later ones. // You must specify at least one mutation. - repeated Mutation mutations = 2; + repeated Mutation mutations = 2 [(google.api.field_behavior) = REQUIRED]; } - // The unique name of the table to which the mutations should be applied. - string table_name = 1; + // Required. The unique name of the table to which the mutations should be applied. + string table_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Table" + } + ]; // This value specifies routing for replication. If not specified, the // "default" application profile will be used. string app_profile_id = 3; - // The row keys and corresponding mutations to be applied in bulk. + // Required. The row keys and corresponding mutations to be applied in bulk. // Each entry is applied as an atomic mutation, but the entries may be // applied in arbitrary order (even between entries for the same row). // At least one entry must be specified, and in total the entries can // contain at most 100000 mutations. - repeated Entry entries = 2; + repeated Entry entries = 2 [(google.api.field_behavior) = REQUIRED]; } // Response message for BigtableService.MutateRows. message MutateRowsResponse { + // The result of applying a passed mutation in the original request. message Entry { // The index into the original request's `entries` list of the Entry // for which a result is being reported. @@ -296,18 +347,23 @@ message MutateRowsResponse { // Request message for Bigtable.CheckAndMutateRow. message CheckAndMutateRowRequest { - // The unique name of the table to which the conditional mutation should be + // Required. The unique name of the table to which the conditional mutation should be // applied. // Values are of the form // `projects//instances//tables/
`. - string table_name = 1; + string table_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Table" + } + ]; // This value specifies routing for replication. If not specified, the // "default" application profile will be used. string app_profile_id = 7; - // The key of the row to which the conditional mutation should be applied. - bytes row_key = 2; + // Required. The key of the row to which the conditional mutation should be applied. + bytes row_key = 2 [(google.api.field_behavior) = REQUIRED]; // The filter to be applied to the contents of the specified row. Depending // on whether or not any results are yielded, either `true_mutations` or @@ -339,23 +395,28 @@ message CheckAndMutateRowResponse { // Request message for Bigtable.ReadModifyWriteRow. message ReadModifyWriteRowRequest { - // The unique name of the table to which the read/modify/write rules should be + // Required. The unique name of the table to which the read/modify/write rules should be // applied. // Values are of the form // `projects//instances//tables/
`. - string table_name = 1; + string table_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtable.googleapis.com/Table" + } + ]; // This value specifies routing for replication. If not specified, the // "default" application profile will be used. string app_profile_id = 4; - // The key of the row to which the read/modify/write rules should be applied. - bytes row_key = 2; + // Required. The key of the row to which the read/modify/write rules should be applied. + bytes row_key = 2 [(google.api.field_behavior) = REQUIRED]; - // Rules specifying how the specified row's contents are to be transformed + // Required. Rules specifying how the specified row's contents are to be transformed // into writes. Entries are applied in order, meaning that earlier rules will // affect the results of later ones. - repeated ReadModifyWriteRule rules = 3; + repeated ReadModifyWriteRule rules = 3 [(google.api.field_behavior) = REQUIRED]; } // Response message for Bigtable.ReadModifyWriteRow. diff --git a/google/bigtable/v2/bigtable_gapic.legacy.yaml b/google/bigtable/v2/bigtable_gapic.legacy.yaml new file mode 100644 index 000000000..d88eee9fd --- /dev/null +++ b/google/bigtable/v2/bigtable_gapic.legacy.yaml @@ -0,0 +1,198 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.bigtable.data.v2 + interface_names: + google.bigtable.v2.Bigtable: BaseBigtableData + python: + package_name: google.cloud.bigtable_v2.gapic + go: + package_name: cloud.google.com/go/bigtable/apiv2 + csharp: + package_name: Google.Cloud.Bigtable.V2 + interface_names: + google.bigtable.v2.Bigtable: BigtableServiceApi + ruby: + package_name: Google::Cloud::Bigtable::V2 + release_level: GA + php: + package_name: Google\Cloud\Bigtable\V2 + nodejs: + package_name: bigtable.v2 + domain_layer_location: google-cloud +interfaces: +- name: google.bigtable.v2.Bigtable + collections: + - name_pattern: projects/{project}/instances/{instance}/tables/{table} + entity_name: table + language_overrides: + - language: csharp + common_resource_name: Google.Cloud.Bigtable.Common.V2.TableName + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: idempotent_params + initial_retry_delay_millis: 10 + retry_delay_multiplier: 2 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + - name: non_idempotent_params + initial_retry_delay_millis: 10 + retry_delay_multiplier: 2 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 20000 + - name: read_rows_params + initial_retry_delay_millis: 10 + retry_delay_multiplier: 2 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 300000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 300000 + total_timeout_millis: 43200000 + - name: mutate_rows_params + initial_retry_delay_millis: 10 + retry_delay_multiplier: 2 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: ReadRows + flattening: + groups: + - parameters: + - table_name + required_fields: + - table_name + retry_codes_name: idempotent + retry_params_name: read_rows_params + field_name_patterns: + table_name: table + resource_name_treatment: STATIC_TYPES + timeout_millis: 43200000 + header_request_params: + - table_name + - name: SampleRowKeys + flattening: + groups: + - parameters: + - table_name + required_fields: + - table_name + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + table_name: table + timeout_millis: 20000 + resource_name_treatment: STATIC_TYPES + header_request_params: + - table_name + - name: MutateRow + flattening: + groups: + - parameters: + - table_name + - row_key + - mutations + required_fields: + - table_name + - row_key + - mutations + retry_codes_name: idempotent + retry_params_name: idempotent_params + field_name_patterns: + table_name: table + resource_name_treatment: STATIC_TYPES + timeout_millis: 20000 + header_request_params: + - table_name + - name: MutateRows + flattening: + groups: + - parameters: + - table_name + - entries + required_fields: + - table_name + - entries + retry_codes_name: idempotent + retry_params_name: mutate_rows_params + field_name_patterns: + table_name: table + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + header_request_params: + - table_name + - name: CheckAndMutateRow + flattening: + groups: + - parameters: + - table_name + - row_key + - predicate_filter + - true_mutations + - false_mutations + # Note that one of {true_mutations,false_mutations} must be specified, but + # since they are not both required, we leave them as optional params. + required_fields: + - table_name + - row_key + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + table_name: table + resource_name_treatment: STATIC_TYPES + timeout_millis: 20000 + header_request_params: + - table_name + - name: ReadModifyWriteRow + flattening: + groups: + - parameters: + - table_name + - row_key + - rules + required_fields: + - table_name + - row_key + - rules + retry_codes_name: non_idempotent + retry_params_name: non_idempotent_params + field_name_patterns: + table_name: table + resource_name_treatment: STATIC_TYPES + timeout_millis: 20000 + header_request_params: + - table_name +resource_name_generation: +- message_name: ReadRowsRequest + field_entity_map: + table_name: table +- message_name: SampleRowKeysRequest + field_entity_map: + table_name: table +- message_name: MutateRowRequest + field_entity_map: + table_name: table +- message_name: MutateRowsRequest + field_entity_map: + table_name: table +- message_name: CheckAndMutateRowRequest + field_entity_map: + table_name: table +- message_name: ReadModifyWriteRowRequest + field_entity_map: + table_name: table diff --git a/google/bigtable/v2/bigtable_gapic.yaml b/google/bigtable/v2/bigtable_gapic.yaml index c34fe42b3..792c288ca 100644 --- a/google/bigtable/v2/bigtable_gapic.yaml +++ b/google/bigtable/v2/bigtable_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.bigtable.data.v2 @@ -15,7 +15,7 @@ language_settings: google.bigtable.v2.Bigtable: BigtableServiceApi ruby: package_name: Google::Cloud::Bigtable::V2 - release_level: BETA + release_level: GA php: package_name: Google\Cloud\Bigtable\V2 nodejs: @@ -24,8 +24,7 @@ language_settings: interfaces: - name: google.bigtable.v2.Bigtable collections: - - name_pattern: projects/{project}/instances/{instance}/tables/{table} - entity_name: table + - entity_name: table language_overrides: - language: csharp common_resource_name: Google.Cloud.Bigtable.Common.V2.TableName @@ -37,146 +36,60 @@ interfaces: - name: non_idempotent retry_codes: [] retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 + - name: idempotent_params + initial_retry_delay_millis: 10 + retry_delay_multiplier: 2 max_retry_delay_millis: 60000 initial_rpc_timeout_millis: 20000 rpc_timeout_multiplier: 1 max_rpc_timeout_millis: 20000 total_timeout_millis: 600000 - - name: streaming - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 + - name: non_idempotent_params + initial_retry_delay_millis: 10 + retry_delay_multiplier: 2 max_retry_delay_millis: 60000 initial_rpc_timeout_millis: 20000 rpc_timeout_multiplier: 1 max_rpc_timeout_millis: 20000 - total_timeout_millis: 3600000 + total_timeout_millis: 20000 + - name: read_rows_params + initial_retry_delay_millis: 10 + retry_delay_multiplier: 2 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 300000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 300000 + total_timeout_millis: 43200000 + - name: mutate_rows_params + initial_retry_delay_millis: 10 + retry_delay_multiplier: 2 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 methods: - name: ReadRows - flattening: - groups: - - parameters: - - table_name - required_fields: - - table_name retry_codes_name: idempotent - retry_params_name: streaming - field_name_patterns: - table_name: table - resource_name_treatment: STATIC_TYPES - timeout_millis: 3600000 - header_request_params: - - table_name + retry_params_name: read_rows_params + timeout_millis: 43200000 - name: SampleRowKeys - flattening: - groups: - - parameters: - - table_name - required_fields: - - table_name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - table_name: table - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - header_request_params: - - table_name + retry_params_name: idempotent_params + timeout_millis: 20000 - name: MutateRow - flattening: - groups: - - parameters: - - table_name - - row_key - - mutations - required_fields: - - table_name - - row_key - - mutations retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - table_name: table - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - header_request_params: - - table_name + retry_params_name: idempotent_params + timeout_millis: 20000 - name: MutateRows - flattening: - groups: - - parameters: - - table_name - - entries - required_fields: - - table_name - - entries retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - table_name: table - resource_name_treatment: STATIC_TYPES + retry_params_name: mutate_rows_params timeout_millis: 60000 - header_request_params: - - table_name - name: CheckAndMutateRow - flattening: - groups: - - parameters: - - table_name - - row_key - - predicate_filter - - true_mutations - - false_mutations - # Note that one of {true_mutations,false_mutations} must be specified, but - # since they are not both required, we leave them as optional params. - required_fields: - - table_name - - row_key retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - table_name: table - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - header_request_params: - - table_name + retry_params_name: non_idempotent_params + timeout_millis: 20000 - name: ReadModifyWriteRow - flattening: - groups: - - parameters: - - table_name - - row_key - - rules - required_fields: - - table_name - - row_key - - rules retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - table_name: table - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - header_request_params: - - table_name -resource_name_generation: -- message_name: ReadRowsRequest - field_entity_map: - table_name: table -- message_name: SampleRowKeysRequest - field_entity_map: - table_name: table -- message_name: MutateRowRequest - field_entity_map: - table_name: table -- message_name: MutateRowsRequest - field_entity_map: - table_name: table -- message_name: CheckAndMutateRowRequest - field_entity_map: - table_name: table -- message_name: ReadModifyWriteRowRequest - field_entity_map: - table_name: table + retry_params_name: non_idempotent_params + timeout_millis: 20000 diff --git a/google/bigtable/v2/bigtable_grpc_service_config.json b/google/bigtable/v2/bigtable_grpc_service_config.json new file mode 100755 index 000000000..d6a182eb5 --- /dev/null +++ b/google/bigtable/v2/bigtable_grpc_service_config.json @@ -0,0 +1,78 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.bigtable.v2.Bigtable", + "method": "ReadRows" + } + ], + "timeout": "43200s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.010s", + "maxBackoff": "60s", + "backoffMultiplier": 2, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.bigtable.v2.Bigtable", + "method": "SampleRowKeys" + }, + { + "service": "google.bigtable.v2.Bigtable", + "method": "MutateRow" + } + ], + "timeout": "20s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.010s", + "maxBackoff": "60s", + "backoffMultiplier": 2, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.bigtable.v2.Bigtable", + "method": "MutateRows" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.010s", + "maxBackoff": "60s", + "backoffMultiplier": 2, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.bigtable.v2.Bigtable", + "method": "CheckAndMutateRow" + }, + { + "service": "google.bigtable.v2.Bigtable", + "method": "ReadModifyWriteRow" + } + ], + "timeout": "20s" + } + ] +} diff --git a/google/bigtable/bigtable.yaml b/google/bigtable/v2/bigtable_v2.yaml similarity index 60% rename from google/bigtable/bigtable.yaml rename to google/bigtable/v2/bigtable_v2.yaml index ba5393cd7..44f5f5f35 100644 --- a/google/bigtable/bigtable.yaml +++ b/google/bigtable/v2/bigtable_v2.yaml @@ -1,5 +1,5 @@ type: google.api.Service -config_version: 0 +config_version: 1 name: bigtable.googleapis.com title: Cloud Bigtable API @@ -13,15 +13,22 @@ documentation: authentication: rules: - - selector: '*' + - selector: 'google.bigtable.v2.Bigtable.*' oauth: canonical_scopes: |- https://www.googleapis.com/auth/bigtable.data, https://www.googleapis.com/auth/cloud-bigtable.data, https://www.googleapis.com/auth/cloud-platform - - selector: |- - google.bigtable.v2.Bigtable.ReadRows, - google.bigtable.v2.Bigtable.SampleRowKeys + - selector: google.bigtable.v2.Bigtable.ReadRows + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigtable.data, + https://www.googleapis.com/auth/bigtable.data.readonly, + https://www.googleapis.com/auth/cloud-bigtable.data, + https://www.googleapis.com/auth/cloud-bigtable.data.readonly, + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only + - selector: google.bigtable.v2.Bigtable.SampleRowKeys oauth: canonical_scopes: |- https://www.googleapis.com/auth/bigtable.data, diff --git a/google/bigtable/v2/data.proto b/google/bigtable/v2/data.proto index d0aab0b63..8fd0c15cb 100644 --- a/google/bigtable/v2/data.proto +++ b/google/bigtable/v2/data.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; @@ -485,7 +486,9 @@ message Mutation { } // A Mutation which deletes all cells from the containing row. - message DeleteFromRow {} + message DeleteFromRow { + + } // Which of the possible Mutation types to apply. oneof mutation { diff --git a/google/chromeos/moblab/BUILD.bazel b/google/chromeos/moblab/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/chromeos/moblab/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/chromeos/moblab/v1beta1/BUILD.bazel b/google/chromeos/moblab/v1beta1/BUILD.bazel new file mode 100644 index 000000000..03f5ca267 --- /dev/null +++ b/google/chromeos/moblab/v1beta1/BUILD.bazel @@ -0,0 +1,368 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "moblab_proto", + srcs = [ + "build_service.proto", + "resources.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "moblab_proto_with_info", + deps = [ + ":moblab_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "moblab_java_proto", + deps = [":moblab_proto"], +) + +java_grpc_library( + name = "moblab_java_grpc", + srcs = [":moblab_proto"], + deps = [":moblab_java_proto"], +) + +java_gapic_library( + name = "moblab_java_gapic", + src = ":moblab_proto_with_info", + gapic_yaml = "chromeosmoblab_gapic.yaml", + package = "google.chromeos.moblab.v1beta1", + service_yaml = "chromeosmoblab_v1beta1.yaml", + test_deps = [ + ":moblab_java_grpc", + ], + deps = [ + ":moblab_java_proto", + ], +) + +java_gapic_test( + name = "moblab_java_gapic_test_suite", + test_classes = [ + "com.google.chromeos.moblab.v1beta1.BuildServiceClientTest", + ], + runtime_deps = [":moblab_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-chromeos-moblab-v1beta1-java", + deps = [ + ":moblab_java_gapic", + ":moblab_java_grpc", + ":moblab_java_proto", + ":moblab_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "moblab_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/chromeos/moblab/v1beta1", + protos = [":moblab_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "moblab_go_gapic", + srcs = [":moblab_proto_with_info"], + grpc_service_config = "moblab_grpc_service_config.json", + importpath = "google.golang.org/google/chromeos/moblab/v1beta1;moblab", + service_yaml = "chromeosmoblab_v1beta1.yaml", + deps = [ + ":moblab_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + ], +) + +go_test( + name = "moblab_go_gapic_test", + srcs = [":moblab_go_gapic_srcjar_test"], + embed = [":moblab_go_gapic"], + importpath = "google.golang.org/google/chromeos/moblab/v1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-chromeos-moblab-v1beta1-go", + deps = [ + ":moblab_go_gapic", + ":moblab_go_gapic_srcjar-test.srcjar", + ":moblab_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "moblab_moved_proto", + srcs = [":moblab_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "moblab_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":moblab_moved_proto"], +) + +py_grpc_library( + name = "moblab_py_grpc", + srcs = [":moblab_moved_proto"], + deps = [":moblab_py_proto"], +) + +py_gapic_library( + name = "moblab_py_gapic", + src = ":moblab_proto_with_info", + gapic_yaml = "chromeosmoblab_gapic.yaml", + package = "google.chromeos.moblab.v1beta1", + service_yaml = "chromeosmoblab_v1beta1.yaml", + deps = [ + ":moblab_py_grpc", + ":moblab_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "chromeos-moblab-v1beta1-py", + deps = [ + ":moblab_py_gapic", + ":moblab_py_grpc", + ":moblab_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "moblab_php_proto", + deps = [":moblab_proto"], +) + +php_grpc_library( + name = "moblab_php_grpc", + srcs = [":moblab_proto"], + deps = [":moblab_php_proto"], +) + +php_gapic_library( + name = "moblab_php_gapic", + src = ":moblab_proto_with_info", + gapic_yaml = "chromeosmoblab_gapic.yaml", + package = "google.chromeos.moblab.v1beta1", + service_yaml = "chromeosmoblab_v1beta1.yaml", + deps = [ + ":moblab_php_grpc", + ":moblab_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-chromeos-moblab-v1beta1-php", + deps = [ + ":moblab_php_gapic", + ":moblab_php_grpc", + ":moblab_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "moblab_nodejs_gapic", + src = ":moblab_proto_with_info", + gapic_yaml = "chromeosmoblab_gapic.yaml", + package = "google.chromeos.moblab.v1beta1", + service_yaml = "chromeosmoblab_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "chromeos-moblab-v1beta1-nodejs", + deps = [ + ":moblab_nodejs_gapic", + ":moblab_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "moblab_ruby_proto", + deps = [":moblab_proto"], +) + +ruby_grpc_library( + name = "moblab_ruby_grpc", + srcs = [":moblab_proto"], + deps = [":moblab_ruby_proto"], +) + +ruby_gapic_library( + name = "moblab_ruby_gapic", + src = ":moblab_proto_with_info", + gapic_yaml = "chromeosmoblab_gapic.yaml", + package = "google.chromeos.moblab.v1beta1", + service_yaml = "chromeosmoblab_v1beta1.yaml", + deps = [ + ":moblab_ruby_grpc", + ":moblab_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-chromeos-moblab-v1beta1-ruby", + deps = [ + ":moblab_ruby_gapic", + ":moblab_ruby_grpc", + ":moblab_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "moblab_csharp_proto", + deps = [":moblab_proto"], +) + +csharp_grpc_library( + name = "moblab_csharp_grpc", + srcs = [":moblab_proto"], + deps = [":moblab_csharp_proto"], +) + +csharp_gapic_library( + name = "moblab_csharp_gapic", + src = ":moblab_proto_with_info", + gapic_yaml = "chromeosmoblab_gapic.yaml", + package = "google.chromeos.moblab.v1beta1", + service_yaml = "chromeosmoblab_v1beta1.yaml", + deps = [ + ":moblab_csharp_grpc", + ":moblab_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-chromeos-moblab-v1beta1-csharp", + deps = [ + ":moblab_csharp_gapic", + ":moblab_csharp_grpc", + ":moblab_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/chromeos/moblab/v1beta1/build_service.proto b/google/chromeos/moblab/v1beta1/build_service.proto new file mode 100644 index 000000000..a39a3989c --- /dev/null +++ b/google/chromeos/moblab/v1beta1/build_service.proto @@ -0,0 +1,186 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.chromeos.moblab.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/chromeos/moblab/v1beta1/resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/chromeos/moblab/v1beta1;moblab"; +option java_multiple_files = true; +option java_outer_classname = "BuildServiceProto"; +option java_package = "com.google.chromeos.moblab.v1beta1"; +option optimize_for = SPEED; + +// Manages Chrome OS build services. +service BuildService { + option (google.api.default_host) = "chromeosmoblab.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/moblabapi"; + + // Lists all builds for the given build target and model in descending order + // for the milestones and build versions. + rpc ListBuilds(ListBuildsRequest) returns (ListBuildsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=buildTargets/*/models/*}/builds" + }; + option (google.api.method_signature) = "parent"; + } + + // Checks the stage status for a given build artifact in a partner Google + // Cloud Storage bucket. + rpc CheckBuildStageStatus(CheckBuildStageStatusRequest) returns (CheckBuildStageStatusResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=buildTargets/*/models/*/builds/*/artifacts/*}:check" + }; + option (google.api.method_signature) = "name"; + } + + // Stages a given build artifact from a internal Google Cloud Storage bucket + // to a partner Google Cloud Storage bucket. If any of objects has already + // been copied, it will overwrite the previous objects. Operation + rpc StageBuild(StageBuildRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=buildTargets/*/models/*/builds/*/artifacts/*}:stage" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "StageBuildResponse" + metadata_type: "StageBuildMetadata" + }; + } +} + +// Request message for listing builds. +// NEXT_TAG: 7 +message ListBuildsRequest { + // Required. The full resource name of the model. The model id is the same as + // the build target id for non-unified builds. + // For example, + // 'buildTargets/octopus/models/bobba'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "chromeosmoblab.googleapis.com/Model" + } + ]; + + // Optional. The number of builds to return in a page. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListBuilds` call. Provide this to + // retrieve the subsequent page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter that specifies value constraints of fields. For example, the + // filter can be set as "filter='milestone=milestones/80'" to only select + // builds in milestone 80. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Read mask that specifies which Build fields to return. If empty, all Build + // fields will be returned. + // Valid fields: name, milestone, build_version. + // For example, if the read_mask is set as "read_mask='milestone'", the + // ListBuilds will return a list of Builds object with only the milestone + // field. + google.protobuf.FieldMask read_mask = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The operation that groups by all the Build fields specified in the read + // mask. The group_by field should be the same as the read_mask field in + // convention of SQL. + google.protobuf.FieldMask group_by = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing builds. +// NEXT_TAG: 4 +message ListBuildsResponse { + // The list of builds. + repeated Build builds = 1; + + // Token to retrieve the next page of builds. If this field is omitted, there + // are no subsequent pages. + string next_page_token = 2; + + // Total number of builds. + int32 total_size = 3; +} + +// Request message for checking if the build artifact is staged. +message CheckBuildStageStatusRequest { + // Required. The full resource name of the build artifact. + // For example, + // 'buildTargets/octopus/models/bobba/builds/12607.6.0/artifacts/chromeos-moblab-peng-staging'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "chromeosmoblab.googleapis.com/BuildArtifact" + } + ]; +} + +// Response message for checking the stage status of a build artifact. +// NEXT_TAG: 4 +message CheckBuildStageStatusResponse { + // The status to represent if the build is staged or not. + bool is_build_staged = 1; + + // The staged build artifact in the destination bucket. + BuildArtifact staged_build_artifact = 2; + + // The source build artifact in the source bucket. + BuildArtifact source_build_artifact = 3; +} + +// Request message for staging a build artifact. +message StageBuildRequest { + // Required. The full resource name of the build artifact. + // For example, + // 'buildTargets/octopus/models/bobba/builds/12607.6.0/artifacts/chromeos-moblab-peng-staging'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "chromeosmoblab.googleapis.com/BuildArtifact" + } + ]; +} + +// Response message for staging a build artifact. +message StageBuildResponse { + // The staged build in the destination bucket. + BuildArtifact staged_build_artifact = 1; +} + +// Metadata message for staging a build artifact. +// NEXT_TAG: 4 +message StageBuildMetadata { + // Approximate percentage of progress, e.g. "50" means 50%. + float progress_percent = 1; + + // Build stage start time. + google.protobuf.Timestamp start_time = 2; + + // Build stage end time. + google.protobuf.Timestamp end_time = 3; +} diff --git a/google/chromeos/moblab/v1beta1/chromeosmoblab_gapic.yaml b/google/chromeos/moblab/v1beta1/chromeosmoblab_gapic.yaml new file mode 100644 index 000000000..602b7eacb --- /dev/null +++ b/google/chromeos/moblab/v1beta1/chromeosmoblab_gapic.yaml @@ -0,0 +1,17 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + java: + package_name: com.google.chromeos.moblab.v1beta1 + python: + package_name: google.chromeos.moblab_v1beta1.gapic + go: + package_name: cloud.google.com/go/chromeos/moblab/apiv1beta1 + csharp: + package_name: Google.Chromeos.Moblab.V1beta1 + ruby: + package_name: Google::Chromeos::Moblab::V1beta1 + php: + package_name: Google\Chromeos\Moblab\V1beta1 + nodejs: + package_name: google.chromeos.moblab.v1beta1 diff --git a/google/chromeos/moblab/v1beta1/chromeosmoblab_v1beta1.yaml b/google/chromeos/moblab/v1beta1/chromeosmoblab_v1beta1.yaml new file mode 100644 index 000000000..64a8aa6b4 --- /dev/null +++ b/google/chromeos/moblab/v1beta1/chromeosmoblab_v1beta1.yaml @@ -0,0 +1,26 @@ +type: google.api.Service +config_version: 3 +name: chromeosmoblab.googleapis.com +title: Chrome OS Moblab API + +control: + environment: servicecontrol.googleapis.com + +apis: +- name: google.chromeos.moblab.v1beta1.BuildService + +backend: + rules: + - selector: 'google.chromeos.moblab.v1beta1.BuildService.*' + deadline: 10.0 + +documentation: + summary: |- + Moblab API is an external-facing API that Moblabs deployed in remote external labs of Chrome OS + partners can communicate with for various testing needs. + +authentication: + rules: + - selector: 'google.chromeos.moblab.v1beta1.BuildService.*' + oauth: + canonical_scopes: https://www.googleapis.com/auth/moblabapi diff --git a/google/chromeos/moblab/v1beta1/moblab_grpc_service_config.json b/google/chromeos/moblab/v1beta1/moblab_grpc_service_config.json new file mode 100644 index 000000000..5c9de9d18 --- /dev/null +++ b/google/chromeos/moblab/v1beta1/moblab_grpc_service_config.json @@ -0,0 +1,35 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.chromeos.moblab.v1beta1.BuildService", + "method": "CheckBuildStageStatus" + }, + { + "service": "google.chromeos.moblab.v1beta1.BuildService", + "method": "ListBuilds" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "10s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.chromeos.moblab.v1beta1.BuildService", + "method": "StageBuild" + } + ], + "timeout": "60s" + } + ] +} \ No newline at end of file diff --git a/google/chromeos/moblab/v1beta1/resources.proto b/google/chromeos/moblab/v1beta1/resources.proto new file mode 100644 index 000000000..290268935 --- /dev/null +++ b/google/chromeos/moblab/v1beta1/resources.proto @@ -0,0 +1,118 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.chromeos.moblab.v1beta1; + +import "google/api/resource.proto"; + +option go_package = "google.golang.org/genproto/googleapis/chromeos/moblab/v1beta1;moblab"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.chromeos.moblab.v1beta1"; +option optimize_for = SPEED; + +// Resource that represents a build target. +message BuildTarget { + option (google.api.resource) = { + type: "chromeosmoblab.googleapis.com/BuildTarget" + pattern: "buildTargets/{build_target}" + }; + + // The resource name of the build target. + // Format: buildTargets/{build_target} + string name = 1; +} + +// Resource that represents a model. Each model belongs to a build target. For +// non-unified build, the model name is the same as its build target name. +message Model { + option (google.api.resource) = { + type: "chromeosmoblab.googleapis.com/Model" + pattern: "buildTargets/{build_target}/models/{model}" + }; + + // The resource name of the model. + // Format: buildTargets/{build_target}/models/{model} + string name = 1; +} + +// Resource that represents a chrome OS milestone. +message Milestone { + option (google.api.resource) = { + type: "chromeosmoblab.googleapis.com/Milestone" + pattern: "milestones/{milestone}" + }; + + // The resource name of the milestone. + // Format: milestones/{milestone} + string name = 1; +} + +// Resource that represents a build for the given build target, model, milestone +// and build version. +// NEXT_TAG: 4 +message Build { + option (google.api.resource) = { + type: "chromeosmoblab.googleapis.com/Build" + pattern: "buildTargets/{build_target}/models/{model}/builds/{build}" + }; + + // The resource name of the build. + // Format: buildTargets/{build_target}/models/{model}/builds/{build} + // Example: buildTargets/octopus/models/bobba/builds/1234.0.0 + string name = 1; + + // The milestone that owns the build. + // Format: milestones/{milestone} + string milestone = 2 [(google.api.resource_reference) = { + type: "chromeosmoblab.googleapis.com/Milestone" + }]; + + // The build version of the build, e.g. 1234.0.0. + string build_version = 3; +} + +// Resource that represents a build artifact stored in Google Cloud Storage for +// the given build target, model, build version and bucket. NEXT_TAG: 6 +message BuildArtifact { + option (google.api.resource) = { + type: "chromeosmoblab.googleapis.com/BuildArtifact" + pattern: "buildTargets/{build_target}/models/{model}/builds/{build}/artifacts/{artifact}" + }; + + // The resource name of the build artifact. + // Format: + // buildTargets/{build_target}/models/{model}/builds/{build}/artifacts/{artifact} + // Example: + // buildTargets/octopus/models/bobba/builds/1234.0.0/artifacts/chromeos-moblab-peng-staging + string name = 1; + + // The build metadata of the build artifact. + string build = 2 [(google.api.resource_reference) = { + type: "chromeosmoblab.googleapis.com/Build" + }]; + + // The bucket that stores the build artifact. + string bucket = 3; + + // The path of the build artifact in the bucket. + string path = 4; + + // The number of objects in the build artifact folder. The object number can + // be used to calculated the stage progress by comparing the source build + // artifact with the destination build artifact. + uint32 object_count = 5; +} diff --git a/google/cloud/BUILD.bazel b/google/cloud/BUILD.bazel new file mode 100644 index 000000000..676dc2e50 --- /dev/null +++ b/google/cloud/BUILD.bazel @@ -0,0 +1,13 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +proto_library( + name = "common_resources_proto", + srcs = ["common_resources.proto"], + deps = ["//google/api:resource_proto"], +) diff --git a/google/cloud/accessapproval/v1/BUILD.bazel b/google/cloud/accessapproval/v1/BUILD.bazel new file mode 100644 index 000000000..8d4858977 --- /dev/null +++ b/google/cloud/accessapproval/v1/BUILD.bazel @@ -0,0 +1,360 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "accessapproval_proto", + srcs = [ + "accessapproval.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "accessapproval_proto_with_info", + deps = [ + ":accessapproval_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "accessapproval_java_proto", + deps = [":accessapproval_proto"], +) + +java_grpc_library( + name = "accessapproval_java_grpc", + srcs = [":accessapproval_proto"], + deps = [":accessapproval_java_proto"], +) + +java_gapic_library( + name = "accessapproval_java_gapic", + src = ":accessapproval_proto_with_info", + gapic_yaml = "accessapproval_gapic.yaml", + package = "google.cloud.accessapproval.v1", + service_yaml = "accessapproval_v1.yaml", + test_deps = [ + ":accessapproval_java_grpc", + ], + deps = [ + ":accessapproval_java_proto", + ], +) + +java_gapic_test( + name = "accessapproval_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.accessapproval.v1.AccessApprovalAdminClientTest", + ], + runtime_deps = [":accessapproval_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-accessapproval-v1-java", + deps = [ + ":accessapproval_java_gapic", + ":accessapproval_java_grpc", + ":accessapproval_java_proto", + ":accessapproval_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "accessapproval_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/accessapproval/v1", + protos = [":accessapproval_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "accessapproval_go_gapic", + srcs = [":accessapproval_proto_with_info"], + grpc_service_config = "", + importpath = "cloud.google.com/go/accessapproval/apiv1;accessapproval", + service_yaml = "accessapproval_v1.yaml", + deps = [ + ":accessapproval_go_proto", + ], +) + +go_test( + name = "accessapproval_go_gapic_test", + srcs = [":accessapproval_go_gapic_srcjar_test"], + embed = [":accessapproval_go_gapic"], + importpath = "cloud.google.com/go/accessapproval/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-accessapproval-v1-go", + deps = [ + ":accessapproval_go_gapic", + ":accessapproval_go_gapic_srcjar-test.srcjar", + ":accessapproval_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "accessapproval_moved_proto", + srcs = [":accessapproval_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "accessapproval_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":accessapproval_moved_proto"], +) + +py_grpc_library( + name = "accessapproval_py_grpc", + srcs = [":accessapproval_moved_proto"], + deps = [":accessapproval_py_proto"], +) + +py_gapic_library( + name = "accessapproval_py_gapic", + src = ":accessapproval_proto_with_info", + gapic_yaml = "accessapproval_gapic.yaml", + package = "google.cloud.accessapproval.v1", + service_yaml = "accessapproval_v1.yaml", + deps = [ + ":accessapproval_py_grpc", + ":accessapproval_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "accessapproval-v1-py", + deps = [ + ":accessapproval_py_gapic", + ":accessapproval_py_grpc", + ":accessapproval_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "accessapproval_php_proto", + deps = [":accessapproval_proto"], +) + +php_grpc_library( + name = "accessapproval_php_grpc", + srcs = [":accessapproval_proto"], + deps = [":accessapproval_php_proto"], +) + +php_gapic_library( + name = "accessapproval_php_gapic", + src = ":accessapproval_proto_with_info", + gapic_yaml = "accessapproval_gapic.yaml", + package = "google.cloud.accessapproval.v1", + service_yaml = "accessapproval_v1.yaml", + deps = [ + ":accessapproval_php_grpc", + ":accessapproval_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-accessapproval-v1-php", + deps = [ + ":accessapproval_php_gapic", + ":accessapproval_php_grpc", + ":accessapproval_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "accessapproval_nodejs_gapic", + src = ":accessapproval_proto_with_info", + gapic_yaml = "accessapproval_gapic.yaml", + package = "google.cloud.accessapproval.v1", + service_yaml = "accessapproval_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "accessapproval-v1-nodejs", + deps = [ + ":accessapproval_nodejs_gapic", + ":accessapproval_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "accessapproval_ruby_proto", + deps = [":accessapproval_proto"], +) + +ruby_grpc_library( + name = "accessapproval_ruby_grpc", + srcs = [":accessapproval_proto"], + deps = [":accessapproval_ruby_proto"], +) + +ruby_gapic_library( + name = "accessapproval_ruby_gapic", + src = ":accessapproval_proto_with_info", + gapic_yaml = "accessapproval_gapic.yaml", + package = "google.cloud.accessapproval.v1", + service_yaml = "accessapproval_v1.yaml", + deps = [ + ":accessapproval_ruby_grpc", + ":accessapproval_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-accessapproval-v1-ruby", + deps = [ + ":accessapproval_ruby_gapic", + ":accessapproval_ruby_grpc", + ":accessapproval_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "accessapproval_csharp_proto", + deps = [":accessapproval_proto"], +) + +csharp_grpc_library( + name = "accessapproval_csharp_grpc", + srcs = [":accessapproval_proto"], + deps = [":accessapproval_csharp_proto"], +) + +csharp_gapic_library( + name = "accessapproval_csharp_gapic", + src = ":accessapproval_proto_with_info", + gapic_yaml = "accessapproval_gapic.yaml", + package = "google.cloud.accessapproval.v1", + service_yaml = "accessapproval_v1.yaml", + deps = [ + ":accessapproval_csharp_grpc", + ":accessapproval_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-accessapproval-v1-csharp", + deps = [ + ":accessapproval_csharp_gapic", + ":accessapproval_csharp_grpc", + ":accessapproval_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/accessapproval/v1/accessapproval.proto b/google/cloud/accessapproval/v1/accessapproval.proto new file mode 100644 index 000000000..96aaa048f --- /dev/null +++ b/google/cloud/accessapproval/v1/accessapproval.proto @@ -0,0 +1,481 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.accessapproval.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/accessapproval/v1;accessapproval"; +option java_multiple_files = true; +option java_outer_classname = "AccessApprovalProto"; +option java_package = "com.google.cloud.accessapproval.v1"; +option ruby_package = "Google::Cloud::AccessApproval::V1"; + +// This API allows a customer to manage accesses to cloud resources by +// Google personnel. It defines the following resource model: +// +// - The API has a collection of +// [ApprovalRequest][google.cloud.accessapproval.v1.ApprovalRequest] +// resources, named `approvalRequests/{approval_request_id}` +// - The API has top-level settings per Project/Folder/Organization, named +// `accessApprovalSettings` +// +// The service also periodically emails a list of recipients, defined at the +// Project/Folder/Organization level in the accessApprovalSettings, when there +// is a pending ApprovalRequest for them to act on. The ApprovalRequests can +// also optionally be published to a Cloud Pub/Sub topic owned by the customer +// (for Beta, the Pub/Sub setup is managed manually). +// +// ApprovalRequests can be approved or dismissed. Google personel can only +// access the indicated resource or resources if the request is approved +// (subject to some exclusions: +// https://cloud.google.com/access-approval/docs/overview#exclusions). +// +// Note: Using Access Approval functionality will mean that Google may not be +// able to meet the SLAs for your chosen products, as any support response times +// may be dramatically increased. As such the SLAs do not apply to any service +// disruption to the extent impacted by Customer's use of Access Approval. Do +// not enable Access Approval for projects where you may require high service +// availability and rapid response by Google Cloud Support. +// +// After a request is approved or dismissed, no further action may be taken on +// it. Requests with the requested_expiration in the past or with no activity +// for 14 days are considered dismissed. When an approval expires, the request +// is considered dismissed. +// +// If a request is not approved or dismissed, we call it pending. +service AccessApproval { + option (google.api.default_host) = "accessapproval.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists approval requests associated with a project, folder, or organization. + // Approval requests can be filtered by state (pending, active, dismissed). + // The order is reverse chronological. + rpc ListApprovalRequests(ListApprovalRequestsMessage) returns (ListApprovalRequestsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/approvalRequests" + additional_bindings { + get: "/v1/{parent=folders/*}/approvalRequests" + } + additional_bindings { + get: "/v1/{parent=organizations/*}/approvalRequests" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets an approval request. Returns NOT_FOUND if the request does not exist. + rpc GetApprovalRequest(GetApprovalRequestMessage) returns (ApprovalRequest) { + option (google.api.http) = { + get: "/v1/{name=projects/*/approvalRequests/*}" + additional_bindings { + get: "/v1/{name=folders/*/approvalRequests/*}" + } + additional_bindings { + get: "/v1/{name=organizations/*/approvalRequests/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Approves a request and returns the updated ApprovalRequest. + // + // Returns NOT_FOUND if the request does not exist. Returns + // FAILED_PRECONDITION if the request exists but is not in a pending state. + rpc ApproveApprovalRequest(ApproveApprovalRequestMessage) returns (ApprovalRequest) { + option (google.api.http) = { + post: "/v1/{name=projects/*/approvalRequests/*}:approve" + body: "*" + additional_bindings { + post: "/v1/{name=folders/*/approvalRequests/*}:approve" + body: "*" + } + additional_bindings { + post: "/v1/{name=organizations/*/approvalRequests/*}:approve" + body: "*" + } + }; + } + + // Dismisses a request. Returns the updated ApprovalRequest. + // + // NOTE: This does not deny access to the resource if another request has been + // made and approved. It is equivalent in effect to ignoring the request + // altogether. + // + // Returns NOT_FOUND if the request does not exist. + // + // Returns FAILED_PRECONDITION if the request exists but is not in a pending + // state. + rpc DismissApprovalRequest(DismissApprovalRequestMessage) returns (ApprovalRequest) { + option (google.api.http) = { + post: "/v1/{name=projects/*/approvalRequests/*}:dismiss" + body: "*" + additional_bindings { + post: "/v1/{name=folders/*/approvalRequests/*}:dismiss" + body: "*" + } + additional_bindings { + post: "/v1/{name=organizations/*/approvalRequests/*}:dismiss" + body: "*" + } + }; + } + + // Gets the settings associated with a project, folder, or organization. + rpc GetAccessApprovalSettings(GetAccessApprovalSettingsMessage) returns (AccessApprovalSettings) { + option (google.api.http) = { + get: "/v1/{name=projects/*/accessApprovalSettings}" + additional_bindings { + get: "/v1/{name=folders/*/accessApprovalSettings}" + } + additional_bindings { + get: "/v1/{name=organizations/*/accessApprovalSettings}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings associated with a project, folder, or organization. + // Settings to update are determined by the value of field_mask. + rpc UpdateAccessApprovalSettings(UpdateAccessApprovalSettingsMessage) returns (AccessApprovalSettings) { + option (google.api.http) = { + patch: "/v1/{settings.name=projects/*/accessApprovalSettings}" + body: "settings" + additional_bindings { + patch: "/v1/{settings.name=folders/*/accessApprovalSettings}" + body: "settings" + } + additional_bindings { + patch: "/v1/{settings.name=organizations/*/accessApprovalSettings}" + body: "settings" + } + }; + option (google.api.method_signature) = "settings,update_mask"; + } + + // Deletes the settings associated with a project, folder, or organization. + // This will have the effect of disabling Access Approval for the project, + // folder, or organization, but only if all ancestors also have Access + // Approval disabled. If Access Approval is enabled at a higher level of the + // hierarchy, then Access Approval will still be enabled at this level as + // the settings are inherited. + rpc DeleteAccessApprovalSettings(DeleteAccessApprovalSettingsMessage) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/accessApprovalSettings}" + additional_bindings { + delete: "/v1/{name=folders/*/accessApprovalSettings}" + } + additional_bindings { + delete: "/v1/{name=organizations/*/accessApprovalSettings}" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// Home office and physical location of the principal. +message AccessLocations { + // The "home office" location of the principal. A two-letter country code + // (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code. In some + // limited situations Google systems may refer refer to a region code instead + // of a country code. + // Possible Region Codes: + //
    + //
  1. ASI: Asia
  2. + //
  3. EUR: Europe
  4. + //
  5. OCE: Oceania
  6. + //
  7. AFR: Africa
  8. + //
  9. NAM: North America
  10. + //
  11. SAM: South America
  12. + //
  13. ANT: Antarctica
  14. + //
  15. ANY: Any location
  16. + //
+ string principal_office_country = 1; + + // Physical location of the principal at the time of the access. A + // two-letter country code (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or + // a region code. In some limited situations Google systems may refer refer to + // a region code instead of a country code. + // Possible Region Codes: + //
    + //
  1. ASI: Asia
  2. + //
  3. EUR: Europe
  4. + //
  5. OCE: Oceania
  6. + //
  7. AFR: Africa
  8. + //
  9. NAM: North America
  10. + //
  11. SAM: South America
  12. + //
  13. ANT: Antarctica
  14. + //
  15. ANY: Any location
  16. + //
+ string principal_physical_location_country = 2; +} + +message AccessReason { + // Type of access justification. + enum Type { + // Default value for proto, shouldn't be used. + TYPE_UNSPECIFIED = 0; + + // Customer made a request or raised an issue that required the principal to + // access customer data. `detail` is of the form ("#####" is the issue ID): + //
    + //
  1. "Feedback Report: #####"
  2. + //
  3. "Case Number: #####"
  4. + //
  5. "Case ID: #####"
  6. + //
  7. "E-PIN Reference: #####"
  8. + //
  9. "Google-#####"
  10. + //
  11. "T-#####"
  12. + //
+ CUSTOMER_INITIATED_SUPPORT = 1; + + // The principal accessed customer data in order to diagnose or resolve a + // suspected issue in services or a known outage. Often this access is used + // to confirm that customers are not affected by a suspected service issue + // or to remediate a reversible system issue. + GOOGLE_INITIATED_SERVICE = 2; + + // Google initiated service for security, fraud, abuse, or compliance + // purposes. + GOOGLE_INITIATED_REVIEW = 3; + } + + // Type of access justification. + Type type = 1; + + // More detail about certain reason types. See comments for each type above. + string detail = 2; +} + +// A decision that has been made to approve access to a resource. +message ApproveDecision { + // The time at which approval was granted. + google.protobuf.Timestamp approve_time = 1; + + // The time at which the approval expires. + google.protobuf.Timestamp expire_time = 2; +} + +// A decision that has been made to dismiss an approval request. +message DismissDecision { + // The time at which the approval request was dismissed. + google.protobuf.Timestamp dismiss_time = 1; +} + +// The properties associated with the resource of the request. +message ResourceProperties { + // Whether an approval will exclude the descendants of the resource being + // requested. + bool excludes_descendants = 1; +} + +// A request for the customer to approve access to a resource. +message ApprovalRequest { + // The resource name of the request. Format is + // "{projects|folders|organizations}/{id}/approvalRequests/{approval_request_id}". + string name = 1; + + // The resource for which approval is being requested. The format of the + // resource name is defined at + // https://cloud.google.com/apis/design/resource_names. The resource name here + // may either be a "full" resource name (e.g. + // "//library.googleapis.com/shelves/shelf1/books/book2") or a "relative" + // resource name (e.g. "shelves/shelf1/books/book2") as described in the + // resource name specification. + string requested_resource_name = 2; + + // Properties related to the resource represented by requested_resource_name. + ResourceProperties requested_resource_properties = 9; + + // The justification for which approval is being requested. + AccessReason requested_reason = 3; + + // The locations for which approval is being requested. + AccessLocations requested_locations = 4; + + // The time at which approval was requested. + google.protobuf.Timestamp request_time = 5; + + // The requested expiration for the approval. If the request is approved, + // access will be granted from the time of approval until the expiration time. + google.protobuf.Timestamp requested_expiration = 6; + + // The current decision on the approval request. + oneof decision { + // Access was approved. + ApproveDecision approve = 7; + + // The request was dismissed. + DismissDecision dismiss = 8; + } +} + +// Represents the enrollment of a cloud resource into a specific service. +message EnrolledService { + // The product for which Access Approval will be enrolled. Allowed values are + // listed below (case-sensitive): + //
    + //
  1. all
  2. + //
  3. appengine.googleapis.com
  4. + //
  5. bigquery.googleapis.com
  6. + //
  7. bigtable.googleapis.com
  8. + //
  9. cloudkms.googleapis.com
  10. + //
  11. compute.googleapis.com
  12. + //
  13. dataflow.googleapis.com
  14. + //
  15. iam.googleapis.com
  16. + //
  17. pubsub.googleapis.com
  18. + //
  19. storage.googleapis.com
  20. + //
      + string cloud_product = 1; + + // The enrollment level of the service. + EnrollmentLevel enrollment_level = 2; +} + +// Represents the type of enrollment for a given service to Access Approval. +enum EnrollmentLevel { + // Default value for proto, shouldn't be used. + ENROLLMENT_LEVEL_UNSPECIFIED = 0; + + // Service is enrolled in Access Approval for all requests + BLOCK_ALL = 1; +} + +// Settings on a Project/Folder/Organization related to Access Approval. +message AccessApprovalSettings { + // The resource name of the settings. Format is one of: + //
        + //
      1. "projects/{project_id}/accessApprovalSettings"
      2. + //
      3. "folders/{folder_id}/accessApprovalSettings"
      4. + //
      5. "organizations/{organization_id}/accessApprovalSettings"
      6. + //
          + string name = 1; + + // A list of email addresses to which notifications relating to approval + // requests should be sent. Notifications relating to a resource will be sent + // to all emails in the settings of ancestor resources of that resource. A + // maximum of 50 email addresses are allowed. + repeated string notification_emails = 2; + + // A list of Google Cloud Services for which the given resource has Access + // Approval enrolled. Access requests for the resource given by name against + // any of these services contained here will be required to have explicit + // approval. If name refers to an organization, enrollment can be done for + // individual services. If name refers to a folder or project, enrollment can + // only be done on an all or nothing basis. + // + // If a cloud_product is repeated in this list, the first entry will be + // honored and all following entries will be discarded. A maximum of 10 + // enrolled services will be enforced, to be expanded as the set of supported + // services is expanded. + repeated EnrolledService enrolled_services = 3; + + // Output only. This field is read only (not settable via + // UpdateAccessAccessApprovalSettings method). If the field is true, that + // indicates that at least one service is enrolled for Access Approval in one + // or more ancestors of the Project or Folder (this field will always be + // unset for the organization since organizations do not have ancestors). + bool enrolled_ancestor = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request to list approval requests. +message ListApprovalRequestsMessage { + // The parent resource. This may be "projects/{project_id}", + // "folders/{folder_id}", or "organizations/{organization_id}". + string parent = 1; + + // A filter on the type of approval requests to retrieve. Must be one of the + // following values: + //
            + //
          1. [not set]: Requests that are pending or have active approvals.
          2. + //
          3. ALL: All requests.
          4. + //
          5. PENDING: Only pending requests.
          6. + //
          7. ACTIVE: Only active (i.e. currently approved) requests.
          8. + //
          9. DISMISSED: Only dismissed (including expired) requests.
          10. + //
          + string filter = 2; + + // Requested page size. + int32 page_size = 3; + + // A token identifying the page of results to return. + string page_token = 4; +} + +// Response to listing of ApprovalRequest objects. +message ListApprovalRequestsResponse { + // Approval request details. + repeated ApprovalRequest approval_requests = 1; + + // Token to retrieve the next page of results, or empty if there are no more. + string next_page_token = 2; +} + +// Request to get an approval request. +message GetApprovalRequestMessage { + // Name of the approval request to retrieve. + string name = 1; +} + +// Request to approve an ApprovalRequest. +message ApproveApprovalRequestMessage { + // Name of the approval request to approve. + string name = 1; + + // The expiration time of this approval. + google.protobuf.Timestamp expire_time = 2; +} + +// Request to dismiss an approval request. +message DismissApprovalRequestMessage { + // Name of the ApprovalRequest to dismiss. + string name = 1; +} + +// Request to get access approval settings. +message GetAccessApprovalSettingsMessage { + // Name of the AccessApprovalSettings to retrieve. + string name = 1; +} + +// Request to update access approval settings. +message UpdateAccessApprovalSettingsMessage { + // The new AccessApprovalSettings. + AccessApprovalSettings settings = 1; + + // The update mask applies to the settings. Only the top level fields of + // AccessApprovalSettings (notification_emails & enrolled_services) are + // supported. For each field, if it is included, the currently stored value + // will be entirely overwritten with the value of the field passed in this + // request. + // + // For the `FieldMask` definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // If this field is left unset, only the notification_emails field will be + // updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request to delete access approval settings. +message DeleteAccessApprovalSettingsMessage { + // Name of the AccessApprovalSettings to delete. + string name = 1; +} diff --git a/google/cloud/accessapproval/v1/accessapproval_gapic.yaml b/google/cloud/accessapproval/v1/accessapproval_gapic.yaml new file mode 100644 index 000000000..634eeef01 --- /dev/null +++ b/google/cloud/accessapproval/v1/accessapproval_gapic.yaml @@ -0,0 +1,20 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + java: + package_name: com.google.cloud.accessapproval.v1 + interface_names: + google.cloud.accessapproval.v1.AccessApproval: AccessApprovalAdmin + python: + package_name: google.cloud.accessapproval_v1.gapic + go: + package_name: cloud.google.com/go/accessapproval/apiv1 + csharp: + package_name: Google.Cloud.AccessApproval.V1 + ruby: + package_name: Google::Cloud::AccessApproval::V1 + php: + package_name: Google\Cloud\AccessApproval\V1 + nodejs: + package_name: accessapproval.v1 + domain_layer_location: google-cloud diff --git a/google/cloud/accessapproval/v1/accessapproval_v1.yaml b/google/cloud/accessapproval/v1/accessapproval_v1.yaml new file mode 100644 index 000000000..9893bf20f --- /dev/null +++ b/google/cloud/accessapproval/v1/accessapproval_v1.yaml @@ -0,0 +1,22 @@ +type: google.api.Service +config_version: 3 +name: accessapproval.googleapis.com +title: Access Approval API + +apis: +- name: google.cloud.accessapproval.v1.AccessApproval + +documentation: + summary: An API for controlling access to data by Google personnel. + +backend: + rules: + - selector: 'google.cloud.accessapproval.v1.AccessApproval.*' + deadline: 10.0 + +authentication: + rules: + - selector: 'google.cloud.accessapproval.v1.AccessApproval.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/asset/BUILD.bazel b/google/cloud/asset/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/cloud/asset/BUILD.bazel +++ b/google/cloud/asset/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/asset/artman_cloudasset_v1.yaml b/google/cloud/asset/artman_cloudasset_v1.yaml index 53429a5d8..f0ef4c771 100644 --- a/google/cloud/asset/artman_cloudasset_v1.yaml +++ b/google/cloud/asset/artman_cloudasset_v1.yaml @@ -4,11 +4,12 @@ common: api_version: v1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1 - service_yaml: asset_v1.yaml + service_yaml: v1/cloudasset_v1.yaml gapic_yaml: v1/cloudasset_gapic.yaml + proto_package: google.cloud.asset.v1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/asset/artman_cloudasset_v1beta1.yaml b/google/cloud/asset/artman_cloudasset_v1beta1.yaml index c3278c500..fa196fe9c 100644 --- a/google/cloud/asset/artman_cloudasset_v1beta1.yaml +++ b/google/cloud/asset/artman_cloudasset_v1beta1.yaml @@ -4,7 +4,7 @@ common: api_version: v1beta1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1beta1 service_yaml: asset_v1beta1.yaml diff --git a/google/cloud/asset/artman_cloudasset_v1p2beta1.yaml b/google/cloud/asset/artman_cloudasset_v1p2beta1.yaml new file mode 100644 index 000000000..004cd2bfd --- /dev/null +++ b/google/cloud/asset/artman_cloudasset_v1p2beta1.yaml @@ -0,0 +1,35 @@ +common: + # Keep the api_name asset, otherwise Java code gen will be broken. + api_name: asset + api_version: v1p2beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1p2beta1 + service_yaml: asset_v1p2beta1.yaml + gapic_yaml: v1p2beta1/cloudasset_gapic.yaml +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: php_gapic + type: GAPIC + language: PHP +- name: go_gapic + type: GAPIC + language: GO +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: csharp_gapic + type: GAPIC + language: CSHARP diff --git a/google/cloud/asset/asset_v1p2beta1.yaml b/google/cloud/asset/asset_v1p2beta1.yaml new file mode 100644 index 000000000..3d218a365 --- /dev/null +++ b/google/cloud/asset/asset_v1p2beta1.yaml @@ -0,0 +1,38 @@ +type: google.api.Service +config_version: 3 +name: cloudasset.googleapis.com +title: Cloud Asset API + +apis: +- name: google.cloud.asset.v1p2beta1.AssetService + +documentation: + summary: The cloud asset API manages the history and inventory of cloud resources. + overview: |- + # Cloud Asset API + + The Cloud Asset API keeps a history of Google Cloud Platform (GCP) asset + metadata, and allows GCP users to download a dump of all asset metadata + for the resource types listed below within an organization or a project at + a given timestamp. + + Read more documents here: + https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview + +backend: + rules: + - selector: 'google.cloud.asset.v1p2beta1.AssetService.*' + deadline: 600.0 + - selector: google.longrunning.Operations.GetOperation + deadline: 60.0 + +authentication: + rules: + - selector: 'google.cloud.asset.v1p2beta1.AssetService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.longrunning.Operations.GetOperation + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/asset/v1/BUILD.bazel b/google/cloud/asset/v1/BUILD.bazel new file mode 100644 index 000000000..ef733e6d2 --- /dev/null +++ b/google/cloud/asset/v1/BUILD.bazel @@ -0,0 +1,391 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "asset_proto", + srcs = [ + "asset_service.proto", + "assets.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/cloud/orgpolicy/v1:orgpolicy_proto", + "//google/iam/v1:policy_proto", + "//google/identity/accesscontextmanager/v1:accesscontextmanager_proto", + "//google/longrunning:operations_proto", + "//google/type:expr_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "asset_proto_with_info", + deps = [ + ":asset_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "asset_java_proto", + deps = [":asset_proto"], +) + +java_grpc_library( + name = "asset_java_grpc", + srcs = [":asset_proto"], + deps = [":asset_java_proto"], +) + +java_gapic_library( + name = "asset_java_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1", + service_yaml = "cloudasset_v1.yaml", + test_deps = [ + ":asset_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":asset_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "asset_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.asset.v1.AssetServiceClientTest", + ], + runtime_deps = [":asset_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-asset-v1-java", + deps = [ + ":asset_java_gapic", + ":asset_java_grpc", + ":asset_java_proto", + ":asset_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "asset_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/asset/v1", + protos = [":asset_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/cloud/orgpolicy/v1:orgpolicy_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/identity/accesscontextmanager/v1:accesscontextmanager_go_proto", + "//google/longrunning:longrunning_go_proto", + "//google/type:expr_go_proto", + ], +) + +go_gapic_library( + name = "asset_go_gapic", + srcs = [":asset_proto_with_info"], + grpc_service_config = "cloudasset_grpc_service_config.json", + importpath = "cloud.google.com/go/asset/apiv1;asset", + service_yaml = "cloudasset_v1.yaml", + deps = [ + ":asset_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:any_go_proto", + "@io_bazel_rules_go//proto/wkt:struct_go_proto", + ], +) + +go_test( + name = "asset_go_gapic_test", + srcs = [":asset_go_gapic_srcjar_test"], + embed = [":asset_go_gapic"], + importpath = "cloud.google.com/go/asset/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-asset-v1-go", + deps = [ + ":asset_go_gapic", + ":asset_go_gapic_srcjar-test.srcjar", + ":asset_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "asset_moved_proto", + srcs = [":asset_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/cloud/orgpolicy/v1:orgpolicy_proto", + "//google/iam/v1:policy_proto", + "//google/identity/accesscontextmanager/v1:accesscontextmanager_proto", + "//google/longrunning:operations_proto", + "//google/type:expr_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "asset_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":asset_moved_proto"], +) + +py_grpc_library( + name = "asset_py_grpc", + srcs = [":asset_moved_proto"], + deps = [":asset_py_proto"], +) + +py_gapic_library( + name = "asset_py_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1", + service_yaml = "cloudasset_v1.yaml", + deps = [ + ":asset_py_grpc", + ":asset_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "asset-v1-py", + deps = [ + ":asset_py_gapic", + ":asset_py_grpc", + ":asset_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "asset_php_proto", + deps = [":asset_proto"], +) + +php_grpc_library( + name = "asset_php_grpc", + srcs = [":asset_proto"], + deps = [":asset_php_proto"], +) + +php_gapic_library( + name = "asset_php_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1", + service_yaml = "cloudasset_v1.yaml", + deps = [ + ":asset_php_grpc", + ":asset_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-asset-v1-php", + deps = [ + ":asset_php_gapic", + ":asset_php_grpc", + ":asset_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "asset_nodejs_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1", + service_yaml = "cloudasset_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "asset-v1-nodejs", + deps = [ + ":asset_nodejs_gapic", + ":asset_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "asset_ruby_proto", + deps = [":asset_proto"], +) + +ruby_grpc_library( + name = "asset_ruby_grpc", + srcs = [":asset_proto"], + deps = [":asset_ruby_proto"], +) + +ruby_gapic_library( + name = "asset_ruby_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1", + service_yaml = "cloudasset_v1.yaml", + deps = [ + ":asset_ruby_grpc", + ":asset_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-asset-v1-ruby", + deps = [ + ":asset_ruby_gapic", + ":asset_ruby_grpc", + ":asset_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "asset_csharp_proto", + deps = [":asset_proto"], +) + +csharp_grpc_library( + name = "asset_csharp_grpc", + srcs = [":asset_proto"], + deps = [":asset_csharp_proto"], +) + +csharp_gapic_library( + name = "asset_csharp_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1", + service_yaml = "cloudasset_v1.yaml", + deps = [ + ":asset_csharp_grpc", + ":asset_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-asset-v1-csharp", + deps = [ + ":asset_csharp_gapic", + ":asset_csharp_grpc", + ":asset_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/asset/v1/asset_service.proto b/google/cloud/asset/v1/asset_service.proto index 0dfc2898b..0eab6efdd 100644 --- a/google/cloud/asset/v1/asset_service.proto +++ b/google/cloud/asset/v1/asset_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,16 +11,21 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.asset.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/asset/v1/assets.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; +import "google/type/expr.proto"; option csharp_namespace = "Google.Cloud.Asset.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1;asset"; @@ -29,18 +34,26 @@ option java_outer_classname = "AssetServiceProto"; option java_package = "com.google.cloud.asset.v1"; option php_namespace = "Google\\Cloud\\Asset\\V1"; - // Asset service definition. service AssetService { + option (google.api.default_host) = "cloudasset.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + // Exports assets with time and resource types to a given Cloud Storage // location. The output format is newline-delimited JSON. - // This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you - // to keep track of the export. + // This API implements the + // [google.longrunning.Operation][google.longrunning.Operation] API allowing + // you to keep track of the export. rpc ExportAssets(ExportAssetsRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=*/*}:exportAssets" body: "*" }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.asset.v1.ExportAssetsResponse" + metadata_type: "google.cloud.asset.v1.ExportAssetsRequest" + }; } // Batch gets the update history of assets that overlap a time window. @@ -50,11 +63,79 @@ service AssetService { // attached IAM POLICY both exist. This can create gaps in the output history. // If a specified asset does not exist, this API returns an INVALID_ARGUMENT // error. - rpc BatchGetAssetsHistory(BatchGetAssetsHistoryRequest) returns (BatchGetAssetsHistoryResponse) { + rpc BatchGetAssetsHistory(BatchGetAssetsHistoryRequest) + returns (BatchGetAssetsHistoryResponse) { option (google.api.http) = { get: "/v1/{parent=*/*}:batchGetAssetsHistory" }; } + + // Creates a feed in a parent project/folder/organization to listen to its + // asset updates. + rpc CreateFeed(CreateFeedRequest) returns (Feed) { + option (google.api.http) = { + post: "/v1/{parent=*/*}/feeds" + body: "*" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about an asset feed. + rpc GetFeed(GetFeedRequest) returns (Feed) { + option (google.api.http) = { + get: "/v1/{name=*/*/feeds/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all asset feeds in a parent project/folder/organization. + rpc ListFeeds(ListFeedsRequest) returns (ListFeedsResponse) { + option (google.api.http) = { + get: "/v1/{parent=*/*}/feeds" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates an asset feed configuration. + rpc UpdateFeed(UpdateFeedRequest) returns (Feed) { + option (google.api.http) = { + patch: "/v1/{feed.name=*/*/feeds/*}" + body: "*" + }; + option (google.api.method_signature) = "feed"; + } + + // Deletes an asset feed. + rpc DeleteFeed(DeleteFeedRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=*/*/feeds/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Searches all the resources within the given accessible scope (e.g., a + // project, a folder or an organization). Callers should have + // cloud.assets.SearchAllResources permission upon the requested scope, + // otherwise the request will be rejected. + rpc SearchAllResources(SearchAllResourcesRequest) + returns (SearchAllResourcesResponse) { + option (google.api.http) = { + get: "/v1/{scope=*/*}:searchAllResources" + }; + option (google.api.method_signature) = "scope,query,asset_types"; + } + + // Searches all the IAM policies within the given accessible scope (e.g., a + // project, a folder or an organization). Callers should have + // cloud.assets.SearchAllIamPolicies permission upon the requested scope, + // otherwise the request will be rejected. + rpc SearchAllIamPolicies(SearchAllIamPoliciesRequest) + returns (SearchAllIamPoliciesResponse) { + option (google.api.http) = { + get: "/v1/{scope=*/*}:searchAllIamPolicies" + }; + option (google.api.method_signature) = "scope,query"; + } } // Export asset request. @@ -63,19 +144,24 @@ message ExportAssetsRequest { // organization number (such as "organizations/123"), a project ID (such as // "projects/my-project-id"), or a project number (such as "projects/12345"), // or a folder number (such as "folders/123"). - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/Asset" + } + ]; // Timestamp to take an asset snapshot. This can only be set to a timestamp - // between 2018-10-02 UTC (inclusive) and the current time. If not specified, - // the current time will be used. Due to delays in resource data collection - // and indexing, there is a volatile window during which running the same - // query may get different results. + // between the current time and the current time minus 35 days (inclusive). + // If not specified, the current time will be used. Due to delays in resource + // data collection and indexing, there is a volatile window during which + // running the same query may get different results. google.protobuf.Timestamp read_time = 2; // A list of asset types of which to take a snapshot for. For example: - // "compute.googleapis.com/Disk". If specified, only matching assets will be returned. - // See [Introduction to Cloud Asset - // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + // "compute.googleapis.com/Disk". If specified, only matching assets will be + // returned. See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) // for all supported asset types. repeated string asset_types = 3; @@ -85,12 +171,14 @@ message ExportAssetsRequest { // Required. Output configuration indicating where the results will be output // to. All results will be in newline delimited JSON format. - OutputConfig output_config = 5; + OutputConfig output_config = 5 [(google.api.field_behavior) = REQUIRED]; } // The export asset response. This message is returned by the -// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned -// [google.longrunning.Operation.response][google.longrunning.Operation.response] field. +// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] +// method in the returned +// [google.longrunning.Operation.response][google.longrunning.Operation.response] +// field. message ExportAssetsResponse { // Time the snapshot was taken. google.protobuf.Timestamp read_time = 1; @@ -105,29 +193,35 @@ message BatchGetAssetsHistoryRequest { // Required. The relative name of the root asset. It can only be an // organization number (such as "organizations/123"), a project ID (such as // "projects/my-project-id")", or a project number (such as "projects/12345"). - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/Asset" + } + ]; // A list of the full names of the assets. For example: // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. // See [Resource // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + // and [Resource Name + // Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) // for more info. // // The request becomes a no-op if the asset name list is empty, and the max // size of the asset name list is 100 in one request. repeated string asset_names = 2; - // Required. The content type. - ContentType content_type = 3; + // Optional. The content type. + ContentType content_type = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The time window for the asset history. Both start_time and - // end_time are optional and if set, it must be after 2018-10-02 UTC. If - // end_time is not set, it is default to current timestamp. If start_time is - // not set, the snapshot of the assets at end_time will be returned. The - // returned results contain all temporal assets whose time window overlap with - // read_time_window. - TimeWindow read_time_window = 4; + // end_time are optional and if set, it must be after the current time minus + // 35 days. If end_time is not set, it is default to current timestamp. + // If start_time is not set, the snapshot of the assets at end_time will be + // returned. The returned results contain all temporal assets whose time + // window overlap with read_time_window. + TimeWindow read_time_window = 4 [(google.api.field_behavior) = OPTIONAL]; } // Batch get assets history response. @@ -136,12 +230,90 @@ message BatchGetAssetsHistoryResponse { repeated TemporalAsset assets = 1; } +// Create asset feed request. +message CreateFeedRequest { + // Required. The name of the project/folder/organization where this feed + // should be created in. It can only be an organization number (such as + // "organizations/123"), a folder number (such as "folders/123"), a project ID + // (such as "projects/my-project-id")", or a project number (such as + // "projects/12345"). + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. This is the client-assigned asset feed identifier and it needs to + // be unique under a specific parent project/folder/organization. + string feed_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The feed details. The field `name` must be empty and it will be + // generated in the format of: projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + Feed feed = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Get asset feed request. +message GetFeedRequest { + // Required. The name of the Feed and it must be in the format of: + // projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "cloudasset.googleapis.com/Feed" } + ]; +} + +// List asset feeds request. +message ListFeedsRequest { + // Required. The parent project/folder/organization whose feeds are to be + // listed. It can only be using project/folder/organization number (such as + // "folders/12345")", or a project ID (such as "projects/my-project-id"). + string parent = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message ListFeedsResponse { + // A list of feeds. + repeated Feed feeds = 1; +} + +// Update asset feed request. +message UpdateFeedRequest { + // Required. The new values of feed details. It must match an existing feed + // and the field `name` must be in the format of: + // projects/project_number/feeds/feed_id or + // folders/folder_number/feeds/feed_id or + // organizations/organization_number/feeds/feed_id. + Feed feed = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Only updates the `feed` fields indicated by this mask. + // The field mask must not be empty, and it must not contain fields that + // are immutable or only set by the server. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +message DeleteFeedRequest { + // Required. The name of the feed and it must be in the format of: + // projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "cloudasset.googleapis.com/Feed" } + ]; +} + // Output configuration for export assets destination. message OutputConfig { // Asset export destination. oneof destination { // Destination on Cloud Storage. GcsDestination gcs_destination = 1; + + // Destination on BigQuery. The output table stores the fields in asset + // proto as columns in BigQuery. The resource/iam_policy field is converted + // to a record with each field to a column, except metadata to a single JSON + // string. + BigQueryDestination bigquery_destination = 2; } } @@ -155,9 +327,257 @@ message GcsDestination { // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) // for more information. string uri = 1; + + // The uri prefix of all generated Cloud Storage objects. For example: + // "gs://bucket_name/object_name_prefix". Each object uri is in format: + // "gs://bucket_name/object_name_prefix// and only + // contains assets for that type. starts from 0. For example: + // "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is + // the first shard of output objects containing all + // compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be + // returned if file with the same name "gs://bucket_name/object_name_prefix" + // already exists. + string uri_prefix = 2; } } +// A BigQuery destination. +message BigQueryDestination { + // Required. The BigQuery dataset in format + // "projects/projectId/datasets/datasetId", to which the snapshot result + // should be exported. If this dataset does not exist, the export call returns + // an INVALID_ARGUMENT error. + string dataset = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The BigQuery table to which the snapshot result should be + // written. If this table does not exist, a new table with the given name + // will be created. + string table = 2 [(google.api.field_behavior) = REQUIRED]; + + // If the destination table already exists and this flag is `TRUE`, the + // table will be overwritten by the contents of assets snapshot. If the flag + // is `FALSE` or unset and the destination table already exists, the export + // call returns an INVALID_ARGUMEMT error. + bool force = 3; +} + +// A Pub/Sub destination. +message PubsubDestination { + // The name of the Pub/Sub topic to publish to. + // For example: `projects/PROJECT_ID/topics/TOPIC_ID`. + string topic = 1; +} + +// Output configuration for asset feed destination. +message FeedOutputConfig { + // Asset feed destination. + oneof destination { + // Destination on Pub/Sub. + PubsubDestination pubsub_destination = 1; + } +} + +// An asset feed used to export asset updates to a destinations. +// An asset feed filter controls what updates are exported. +// The asset feed must be created within a project, organization, or +// folder. Supported destinations are: +// Pub/Sub topics. +message Feed { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/Feed" + pattern: "projects/{project}/feeds/{feed}" + pattern: "folders/{folder}/feeds/{feed}" + pattern: "organizations/{organization}/feeds/{feed}" + history: ORIGINALLY_SINGLE_PATTERN + }; + + // Required. The format will be + // projects/{project_number}/feeds/{client-assigned_feed_identifier} or + // folders/{folder_number}/feeds/{client-assigned_feed_identifier} or + // organizations/{organization_number}/feeds/{client-assigned_feed_identifier} + // + // The client-assigned feed identifier must be unique within the parent + // project/folder/organization. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // A list of the full names of the assets to receive updates. You must specify + // either or both of asset_names and asset_types. Only asset updates matching + // specified asset_names and asset_types are exported to the feed. For + // example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // See [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more info. + repeated string asset_names = 2; + + // A list of types of the assets to receive updates. You must specify either + // or both of asset_names and asset_types. Only asset updates matching + // specified asset_names and asset_types are exported to the feed. + // For example: `"compute.googleapis.com/Disk"` + // + // See [this + // topic](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + // for a list of all supported asset types. + repeated string asset_types = 3; + + // Asset content type. If not specified, no content but the asset name and + // type will be returned. + ContentType content_type = 4; + + // Required. Feed output configuration defining where the asset updates are + // published to. + FeedOutputConfig feed_output_config = 5 + [(google.api.field_behavior) = REQUIRED]; +} + +// Search all resources request. +message SearchAllResourcesRequest { + // Required. A scope can be a project, a folder or an organization. The search + // is limited to the resources within the `scope`. + // + // The allowed values are: + // + // * projects/{PROJECT_ID} + // * projects/{PROJECT_NUMBER} + // * folders/{FOLDER_NUMBER} + // * organizations/{ORGANIZATION_NUMBER} + string scope = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The query statement. An empty query can be specified to search + // all the resources of certain `asset_types` within the given `scope`. + // + // Examples: + // + // * `name : "Important"` to find Cloud resources whose name contains + // "Important" as a word. + // * `displayName : "Impor*"` to find Cloud resources whose display name + // contains "Impor" as a word prefix. + // * `description : "*por*"` to find Cloud resources whose description + // contains "por" as a substring. + // * `location : "us-west*"` to find Cloud resources whose location is + // prefixed with "us-west". + // * `labels : "prod"` to find Cloud resources whose labels contain "prod" as + // a key or value. + // * `labels.env : "prod"` to find Cloud resources which have a label "env" + // and its value is "prod". + // * `labels.env : *` to find Cloud resources which have a label "env". + // * `"Important"` to find Cloud resources which contain "Important" as a word + // in any of the searchable fields. + // * `"Impor*"` to find Cloud resources which contain "Impor" as a word prefix + // in any of the searchable fields. + // * `"*por*"` to find Cloud resources which contain "por" as a substring in + // any of the searchable fields. + // * `("Important" AND location : ("us-west1" OR "global"))` to find Cloud + // resources which contain "Important" as a word in any of the searchable + // fields and are also located in the "us-west1" region or the "global" + // location. + // + // See [how to construct a + // query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) + // for more details. + string query = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of asset types that this request searches for. If empty, + // it will search all the [searchable asset + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + repeated string asset_types = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page size for search result pagination. Page size is capped + // at 500 even if a larger value is given. If set to zero, server will pick an + // appropriate default. Returned results may be fewer than requested. When + // this happens, there could be more results as long as `next_page_token` is + // returned. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If present, then retrieve the next batch of results from the + // preceding call to this method. `page_token` must be the value of + // `next_page_token` from the previous response. The values of all other + // method parameters, must be identical to those in the previous call. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma separated list of fields specifying the sorting order of + // the results. The default order is ascending. Add " DESC" after the field + // name to indicate descending order. Redundant space characters are ignored. + // Example: "location DESC, name". See [supported resource metadata + // fields](https://cloud.google.com/asset-inventory/docs/searching-resources#query_on_resource_metadata_fields) + // for more details. + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Search all resources response. +message SearchAllResourcesResponse { + // A list of Resources that match the search query. It contains the resource + // standard metadata information. + repeated ResourceSearchResult results = 1; + + // If there are more results than those appearing in this response, then + // `next_page_token` is included. To get the next set of results, call this + // method again using the value of `next_page_token` as `page_token`. + string next_page_token = 2; +} + +// Search all IAM policies request. +message SearchAllIamPoliciesRequest { + // Required. A scope can be a project, a folder or an organization. The search + // is limited to the IAM policies within the `scope`. + // + // The allowed values are: + // + // * projects/{PROJECT_ID} + // * projects/{PROJECT_NUMBER} + // * folders/{FOLDER_NUMBER} + // * organizations/{ORGANIZATION_NUMBER} + string scope = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The query statement. An empty query can be specified to search + // all the IAM policies within the given `scope`. + // + // Examples: + // + // * `policy : "amy@gmail.com"` to find Cloud IAM policy bindings that + // specify user "amy@gmail.com". + // * `policy : "roles/compute.admin"` to find Cloud IAM policy bindings that + // specify the Compute Admin role. + // * `policy.role.permissions : "storage.buckets.update"` to find Cloud IAM + // policy bindings that specify a role containing "storage.buckets.update" + // permission. + // * `resource : "organizations/123"` to find Cloud IAM policy bindings that + // are set on "organizations/123". + // * `(resource : ("organizations/123" OR "folders/1234") AND policy : "amy")` + // to find Cloud IAM policy bindings that are set on "organizations/123" or + // "folders/1234", and also specify user "amy". + // + // See [how to construct a + // query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) + // for more details. + string query = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page size for search result pagination. Page size is capped + // at 500 even if a larger value is given. If set to zero, server will pick an + // appropriate default. Returned results may be fewer than requested. When + // this happens, there could be more results as long as `next_page_token` is + // returned. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If present, retrieve the next batch of results from the preceding + // call to this method. `page_token` must be the value of `next_page_token` + // from the previous response. The values of all other method parameters must + // be identical to those in the previous call. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Search all IAM policies response. +message SearchAllIamPoliciesResponse { + // A list of IamPolicy that match the search query. Related information such + // as the associated resource is returned along with the policy. + repeated IamPolicySearchResult results = 1; + + // Set if there are more results than those appearing in this response; to get + // the next set of results, call this method again, using this value as the + // `page_token`. + string next_page_token = 2; +} + // Asset content type. enum ContentType { // Unspecified content type. @@ -168,4 +588,10 @@ enum ContentType { // The actual IAM policy set on a resource. IAM_POLICY = 2; + + // The Cloud Organization Policy set on an asset. + ORG_POLICY = 4; + + // The Cloud Access context mananger Policy set on an asset. + ACCESS_POLICY = 5; } diff --git a/google/cloud/asset/v1/assets.proto b/google/cloud/asset/v1/assets.proto index f6a8108c0..4e537d5ce 100644 --- a/google/cloud/asset/v1/assets.proto +++ b/google/cloud/asset/v1/assets.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,18 +11,23 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.asset.v1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; +import "google/cloud/orgpolicy/v1/orgpolicy.proto"; import "google/iam/v1/policy.proto"; +import "google/identity/accesscontextmanager/v1/access_level.proto"; +import "google/identity/accesscontextmanager/v1/access_policy.proto"; +import "google/identity/accesscontextmanager/v1/service_perimeter.proto"; import "google/protobuf/any.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Asset.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1;asset"; option java_multiple_files = true; @@ -30,73 +35,122 @@ option java_outer_classname = "AssetProto"; option java_package = "com.google.cloud.asset.v1"; option php_namespace = "Google\\Cloud\\Asset\\V1"; - -// Temporal asset. In addition to the asset, the temporal asset includes the -// status of the asset and valid from and to time of it. +// An asset in Google Cloud and its temporal metadata, including the time window +// when it was observed and its status during that window. message TemporalAsset { // The time window when the asset data and state was observed. TimeWindow window = 1; - // If the asset is deleted or not. + // Whether the asset has been deleted or not. bool deleted = 2; - // Asset. + // An asset in Google Cloud. Asset asset = 3; } -// A time window of (start_time, end_time]. +// A time window specified by its "start_time" and "end_time". message TimeWindow { // Start time of the time window (exclusive). google.protobuf.Timestamp start_time = 1; - // End time of the time window (inclusive). - // Current timestamp if not specified. + // End time of the time window (inclusive). If not specified, the current + // timestamp is used instead. google.protobuf.Timestamp end_time = 2; } -// Cloud asset. This includes all Google Cloud Platform resources, -// Cloud IAM policies, and other non-GCP assets. +// An asset in Google Cloud. An asset can be any resource in the Google Cloud +// [resource +// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), +// a resource outside the Google Cloud resource hierarchy (such as Google +// Kubernetes Engine clusters and objects), or a Cloud IAM policy. message Asset { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/Asset" + pattern: "*" + }; + // The full name of the asset. For example: - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // "//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1" + // // See [Resource - // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // names](https://cloud.google.com/apis/design/resource_names#full_resource_name) // for more information. string name = 1; - // Type of the asset. Example: "compute.googleapis.com/Disk". + // The type of the asset. For example: "compute.googleapis.com/Disk" + // + // See [Supported asset + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + // for more information. string asset_type = 2; - // Representation of the resource. + // A representation of the resource. Resource resource = 3; - // Representation of the actual Cloud IAM policy set on a cloud resource. For - // each resource, there must be at most one Cloud IAM policy set on it. + // A representation of the Cloud IAM policy set on a Google Cloud resource. + // There can be a maximum of one Cloud IAM policy set on any given resource. + // In addition, Cloud IAM policies inherit their granted access scope from any + // policies set on parent resources in the resource hierarchy. Therefore, the + // effectively policy is the union of both the policy set on this resource + // and each policy set on all of the resource's ancestry resource levels in + // the hierarchy. See + // [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for + // more information. google.iam.v1.Policy iam_policy = 4; + + // A representation of an [organization + // policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy). + // There can be more than one organization policy with different constraints + // set on a given resource. + repeated google.cloud.orgpolicy.v1.Policy org_policy = 6; + + // A representation of an [access + // policy](https://cloud.google.com/access-context-manager/docs/overview#access-policies). + oneof access_context_policy { + google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + + google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + + google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = + 9; + } + + // The ancestry path of an asset in Google Cloud [resource + // hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + // represented as a list of relative resource names. An ancestry path starts + // with the closest ancestor in the hierarchy and ends at root. If the asset + // is a project, folder, or organization, the ancestry path starts from the + // asset itself. + // + // For example: `["projects/123456789", "folders/5432", "organizations/1234"]` + repeated string ancestors = 10; } -// Representation of a cloud resource. +// A representation of a Google Cloud resource. message Resource { - // The API version. Example: "v1". + // The API version. For example: "v1" string version = 1; // The URL of the discovery document containing the resource's JSON schema. // For example: - // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. - // It will be left unspecified for resources without a discovery-based API, - // such as Cloud Bigtable. + // "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest" + // + // This value is unspecified for resources that do not have an API based on a + // discovery document, such as Cloud Bigtable. string discovery_document_uri = 2; - // The JSON schema name listed in the discovery document. - // Example: "Project". It will be left unspecified for resources (such as - // Cloud Bigtable) without a discovery-based API. + // The JSON schema name listed in the discovery document. For example: + // "Project" + // + // This value is unspecified for resources that do not have an API based on a + // discovery document, such as Cloud Bigtable. string discovery_name = 3; - // The REST URL for accessing the resource. An HTTP GET operation using this - // URL returns the resource itself. - // Example: - // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. - // It will be left unspecified for resources without a REST API. + // The REST URL for accessing the resource. An HTTP `GET` request using this + // URL returns the resource itself. For example: + // "https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123" + // + // This value is unspecified for resources without a REST API. string resource_url = 4; // The full name of the immediate parent of this resource. See @@ -104,15 +158,175 @@ message Resource { // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) // for more information. // - // For GCP assets, it is the parent resource defined in the [Cloud IAM policy + // For Google Cloud assets, this value is the parent resource defined in the + // [Cloud IAM policy // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). // For example: - // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + // "//cloudresourcemanager.googleapis.com/projects/my_project_123" // - // For third-party assets, it is up to the users to define. + // For third-party assets, this field may be set differently. string parent = 5; - // The content of the resource, in which some sensitive fields are scrubbed - // away and may not be present. + // The content of the resource, in which some sensitive fields are removed + // and may not be present. google.protobuf.Struct data = 6; + + // The location of the resource in Google Cloud, such as its zone and region. + // For more information, see https://cloud.google.com/about/locations/. + string location = 8; +} + +// A result of Resource Search, containing information of a cloud resoure. +message ResourceSearchResult { + // The full resource name of this resource. Example: + // "//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1". + // See [Cloud Asset Inventory Resource Name + // Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) + // for more information. + // + // To search against the `name`: + // + // * use a field query. Example: `name : "instance1"` + // * use a free text query. Example: `"instance1"` + string name = 1; + + // The type of this resource. Example: "compute.googleapis.com/Disk". + // + // To search against the `asset_type`: + // + // * specify the `asset_type` field in your search request. + string asset_type = 2; + + // The project that this resource belongs to, in the form of + // projects/{PROJECT_NUMBER}. + // + // To search against the `project`: + // + // * specify the `scope` field as this project in your search request. + string project = 3; + + // The display name of this resource. + // + // To search against the `display_name`: + // + // * use a field query. Example: `displayName : "My Instance"` + // * use a free text query. Example: `"My Instance"` + string display_name = 4; + + // One or more paragraphs of text description of this resource. Maximum length + // could be up to 1M bytes. + // + // To search against the `description`: + // + // * use a field query. Example: `description : "*important instance*"` + // * use a free text query. Example: `"*important instance*"` + string description = 5; + + // Location can be "global", regional like "us-east1", or zonal like + // "us-west1-b". + // + // To search against the `location`: + // + // * use a field query. Example: `location : "us-west*"` + // * use a free text query. Example: `"us-west*"` + string location = 6; + + // Labels associated with this resource. See [Labelling and grouping GCP + // resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) + // for more information. + // + // To search against the `labels`: + // + // * use a field query, as following: + // - query on any label's key or value. Example: `labels : "prod"` + // - query by a given label. Example: `labels.env : "prod"` + // - query by a given label'sexistence. Example: `labels.env : *` + // * use a free text query. Example: `"prod"` + map labels = 7; + + // Network tags associated with this resource. Like labels, network tags are a + // type of annotations used to group GCP resources. See [Labelling GCP + // resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) + // for more information. + // + // To search against the `network_tags`: + // + // * use a field query. Example: `networkTags : "internal"` + // * use a free text query. Example: `"internal"` + repeated string network_tags = 8; + + // The additional attributes of this resource. The attributes may vary from + // one resource type to another. Examples: "projectId" for Project, + // "dnsName" for DNS ManagedZone. + // + // To search against the `additional_attributes`: + // + // * use a free text query to match the attributes values. Example: to search + // additional_attributes = { dnsName: "foobar" }, you can issue a query + // `"foobar"`. + google.protobuf.Struct additional_attributes = 9; +} + +// A result of IAM Policy search, containing information of an IAM policy. +message IamPolicySearchResult { + // Explanation about the IAM policy search result. + message Explanation { + // IAM permissions + message Permissions { + // A list of permissions. A sample permission string: "compute.disk.get". + repeated string permissions = 1; + } + + // The map from roles to their included permissions that match the + // permission query (i.e., a query containing `policy.role.permissions:`). + // Example: if query `policy.role.permissions : "compute.disk.get"` + // matches a policy binding that contains owner role, the + // matched_permissions will be {"roles/owner": ["compute.disk.get"]}. The + // roles can also be found in the returned `policy` bindings. Note that the + // map is populated only for requests with permission queries. + map matched_permissions = 1; + } + + // The full resource name of the resource associated with this IAM policy. + // Example: + // "//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1". + // See [Cloud Asset Inventory Resource Name + // Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) + // for more information. + // + // To search against the `resource`: + // + // * use a field query. Example: `resource : "organizations/123"` + string resource = 1; + + // The project that the associated GCP resource belongs to, in the form of + // projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM + // instance, Cloud Storage bucket), the project field will indicate the + // project that contains the resource. If an IAM policy is set on a folder or + // orgnization, the project field will be empty. + // + // To search against the `project`: + // + // * specify the `scope` field as this project in your search request. + string project = 2; + + // The IAM policy directly set on the given resource. Note that the original + // IAM policy can contain multiple bindings. This only contains the bindings + // that match the given query. For queries that don't contain a constrain on + // policies (e.g., an empty query), this contains all the bindings. + // + // To search against the `policy` bindings: + // + // * use a field query, as following: + // - query by the policy contained members. Example: + // `policy : "amy@gmail.com"` + // - query by the policy contained roles. Example: + // `policy : "roles/compute.admin"` + // - query by the policy contained roles' implied permissions. Example: + // `policy.role.permissions : "compute.instances.create"` + google.iam.v1.Policy policy = 3; + + // Explanation about the IAM policy search result. It contains additional + // information to explain why the search result matches the query. + Explanation explanation = 4; } diff --git a/google/cloud/asset/v1/cloudasset_gapic.legacy.yaml b/google/cloud/asset/v1/cloudasset_gapic.legacy.yaml new file mode 100644 index 000000000..754d5a8d6 --- /dev/null +++ b/google/cloud/asset/v1/cloudasset_gapic.legacy.yaml @@ -0,0 +1,194 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.asset.v1 + python: + package_name: google.cloud.asset_v1.gapic + go: + package_name: cloud.google.com/go/asset/apiv1 + csharp: + package_name: Google.Cloud.Asset.V1 + ruby: + package_name: Google::Cloud::Asset::V1 + php: + package_name: Google\Cloud\Asset\V1 + nodejs: + package_name: asset.v1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.asset.v1.AssetService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + - name_pattern: 'projects/{project}/feeds/{feed}' + entity_name: feed + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ExportAssets + required_fields: + - parent + - output_config + retry_codes_name: non_idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + long_running: + return_type: google.cloud.asset.v1.ExportAssetsResponse + metadata_type: google.cloud.asset.v1.ExportAssetsRequest + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 600000 + - name: BatchGetAssetsHistory + required_fields: + - parent + - content_type + - read_time_window + retry_codes_name: idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + timeout_millis: 600000 + - name: CreateFeed + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + - feed_id + - feed + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 30000 + - name: GetFeed + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: feed + timeout_millis: 10000 + - name: ListFeeds + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: UpdateFeed + flattening: + groups: + - parameters: + - feed + required_fields: + - feed + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + feed.name: feed + timeout_millis: 30000 + - name: DeleteFeed + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: feed + timeout_millis: 30000 +resource_name_generation: +- message_name: ExportAssetsRequest + field_entity_map: + parent: project +- message_name: BatchGetAssetsHistoryRequest + field_entity_map: + parent: project diff --git a/google/cloud/asset/v1/cloudasset_gapic.yaml b/google/cloud/asset/v1/cloudasset_gapic.yaml index 9d60f1042..4e0d26236 100644 --- a/google/cloud/asset/v1/cloudasset_gapic.yaml +++ b/google/cloud/asset/v1/cloudasset_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -16,127 +16,8 @@ language_settings: package_name: Google\Cloud\Asset\V1 nodejs: package_name: asset.v1 -# A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.cloud.asset.v1.AssetService - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: ExportAssets - required_fields: - - parent - - output_config - retry_codes_name: non_idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - long_running: - return_type: google.cloud.asset.v1.ExportAssetsResponse - metadata_type: google.cloud.asset.v1.ExportAssetsRequest - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 600000 - - name: BatchGetAssetsHistory - required_fields: - - parent - - content_type - - read_time_window + - name: DeleteFeed retry_codes_name: idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - timeout_millis: 600000 -resource_name_generation: -- message_name: ExportAssetsRequest - field_entity_map: - parent: project -- message_name: BatchGetAssetsHistoryRequest - field_entity_map: - parent: project diff --git a/google/cloud/asset/v1/cloudasset_grpc_service_config.json b/google/cloud/asset/v1/cloudasset_grpc_service_config.json new file mode 100755 index 000000000..031b3169a --- /dev/null +++ b/google/cloud/asset/v1/cloudasset_grpc_service_config.json @@ -0,0 +1,54 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.asset.v1.AssetService", + "method": "ExportAssets" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.asset.v1.AssetService", + "method": "BatchGetAssetsHistory" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.asset.v1.AssetService", + "method": "SearchAllResources" + }, + { + "service": "google.cloud.asset.v1.AssetService", + "method": "SearchAllIamPolicies" + } + ], + "timeout": "15s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/asset/v1/cloudasset_v1.yaml b/google/cloud/asset/v1/cloudasset_v1.yaml new file mode 100644 index 000000000..dc65c62cf --- /dev/null +++ b/google/cloud/asset/v1/cloudasset_v1.yaml @@ -0,0 +1,38 @@ +type: google.api.Service +config_version: 3 +name: cloudasset.googleapis.com +title: Cloud Asset API + +apis: +- name: google.cloud.asset.v1.AssetService + +documentation: + summary: The cloud asset API manages the history and inventory of cloud resources. + overview: |- + # Cloud Asset API + + The Cloud Asset API keeps a history of Google Cloud Platform (GCP) asset + metadata, and allows GCP users to download a dump of all asset metadata + for the resource types listed below within an organization or a project at + a given timestamp. + + Read more documents here: + https://cloud.google.com/asset-inventory/docs + +backend: + rules: + - selector: 'google.cloud.asset.v1.AssetService.*' + deadline: 600.0 + - selector: google.longrunning.Operations.GetOperation + deadline: 60.0 + +authentication: + rules: + - selector: 'google.cloud.asset.v1.AssetService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.longrunning.Operations.GetOperation + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/asset/v1beta1/BUILD.bazel b/google/cloud/asset/v1beta1/BUILD.bazel index 6b2b2ac92..fbf50ebc8 100644 --- a/google/cloud/asset/v1beta1/BUILD.bazel +++ b/google/cloud/asset/v1beta1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -14,6 +17,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/iam/v1:policy_proto", "//google/longrunning:operations_proto", "@com_google_protobuf//:any_proto", @@ -24,7 +30,10 @@ proto_library( proto_library_with_info( name = "asset_proto_with_info", - deps = [":asset_proto"], + deps = [ + ":asset_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -32,19 +41,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", - "@com_google_api_grpc_proto_google_iam_v1//jar", -] - java_proto_library( name = "asset_java_proto", deps = [":asset_proto"], @@ -53,45 +56,45 @@ java_proto_library( java_grpc_library( name = "asset_java_grpc", srcs = [":asset_proto"], - deps = [":asset_java_proto"] + _JAVA_GRPC_DEPS, + deps = [":asset_java_proto"], ) java_gapic_library( name = "asset_java_gapic", src = ":asset_proto_with_info", gapic_yaml = "cloudasset_gapic.yaml", - service_yaml = "//google/cloud/asset:asset_v1beta1.yaml", - test_deps = [":asset_java_grpc"], - deps = [":asset_java_proto"] + _JAVA_GRPC_DEPS, + package = "google.cloud.asset.v1beta1", + service_yaml = "cloudasset_v1beta1.yaml", + test_deps = [ + ":asset_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":asset_java_proto", + "//google/iam/v1:iam_java_proto", + ], ) -# TODO: configure flattened methods in AssetServiceClient so +# Configure flattened methods in AssetServiceClient so # com.google.cloud.asset.v1beta1.AssetServiceClientTest has actual methods to test (now it is empty, # and Bazel does not allow to run empty test classes (test classes without test methods)). -# -#[java_test( -# name = test_name, -# test_class = test_name, -# runtime_deps = [ -# ":asset_java_gapic_test", -# ], -#) for test_name in [ -# "com.google.cloud.asset.v1beta1.AssetServiceClientTest", -#]] - -# Opensource Packages +java_gapic_test( + name = "asset_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.asset.v1beta1.AssetServiceClientTest", + ], + runtime_deps = [":asset_java_gapic_test"], +) + +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-asset-v1beta1-java", - client_deps = [":asset_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":asset_java_gapic_test"], - grpc_deps = [":asset_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":asset_java_gapic", + ":asset_java_grpc", ":asset_java_proto", ":asset_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -99,10 +102,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -119,15 +122,19 @@ go_proto_library( go_gapic_library( name = "asset_go_gapic", - src = ":asset_proto_with_info", - gapic_yaml = "cloudasset_gapic.yaml", - importpath = "cloud.google.com/go/asset/apiv1beta1", - service_yaml = "//google/cloud/asset:asset_v1beta1.yaml", + srcs = [":asset_proto_with_info"], + grpc_service_config = "cloudasset_grpc_service_config.json", + importpath = "cloud.google.com/go/asset/apiv1beta1;asset", + service_yaml = "cloudasset_v1beta1.yaml", deps = [ ":asset_go_proto", + "//google/iam/v1:iam_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:any_go_proto", + "@io_bazel_rules_go//proto/wkt:struct_go_proto", ], ) @@ -138,13 +145,237 @@ go_test( importpath = "cloud.google.com/go/asset/apiv1beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-asset-v1beta1-go", deps = [ ":asset_go_gapic", - ":asset_go_gapic_srcjar-smoke-test.srcjar", ":asset_go_gapic_srcjar-test.srcjar", ":asset_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "asset_moved_proto", + srcs = [":asset_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "asset_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":asset_moved_proto"], +) + +py_grpc_library( + name = "asset_py_grpc", + srcs = [":asset_moved_proto"], + deps = [":asset_py_proto"], +) + +py_gapic_library( + name = "asset_py_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1beta1", + service_yaml = "cloudasset_v1beta1.yaml", + deps = [ + ":asset_py_grpc", + ":asset_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "asset-v1beta1-py", + deps = [ + ":asset_py_gapic", + ":asset_py_grpc", + ":asset_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "asset_php_proto", + deps = [":asset_proto"], +) + +php_grpc_library( + name = "asset_php_grpc", + srcs = [":asset_proto"], + deps = [":asset_php_proto"], +) + +php_gapic_library( + name = "asset_php_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1beta1", + service_yaml = "cloudasset_v1beta1.yaml", + deps = [ + ":asset_php_grpc", + ":asset_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-asset-v1beta1-php", + deps = [ + ":asset_php_gapic", + ":asset_php_grpc", + ":asset_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "asset_nodejs_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1beta1", + service_yaml = "cloudasset_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "asset-v1beta1-nodejs", + deps = [ + ":asset_nodejs_gapic", + ":asset_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "asset_ruby_proto", + deps = [":asset_proto"], +) + +ruby_grpc_library( + name = "asset_ruby_grpc", + srcs = [":asset_proto"], + deps = [":asset_ruby_proto"], +) + +ruby_gapic_library( + name = "asset_ruby_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1beta1", + service_yaml = "cloudasset_v1beta1.yaml", + deps = [ + ":asset_ruby_grpc", + ":asset_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-asset-v1beta1-ruby", + deps = [ + ":asset_ruby_gapic", + ":asset_ruby_grpc", + ":asset_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "asset_csharp_proto", + deps = [":asset_proto"], +) + +csharp_grpc_library( + name = "asset_csharp_grpc", + srcs = [":asset_proto"], + deps = [":asset_csharp_proto"], +) + +csharp_gapic_library( + name = "asset_csharp_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1beta1", + service_yaml = "cloudasset_v1beta1.yaml", + deps = [ + ":asset_csharp_grpc", + ":asset_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-asset-v1beta1-csharp", + deps = [ + ":asset_csharp_gapic", + ":asset_csharp_grpc", + ":asset_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/asset/v1beta1/asset_service.proto b/google/cloud/asset/v1beta1/asset_service.proto index 8e2d1b0a3..956c6a767 100644 --- a/google/cloud/asset/v1beta1/asset_service.proto +++ b/google/cloud/asset/v1beta1/asset_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,9 @@ syntax = "proto3"; package google.cloud.asset.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/asset/v1beta1/assets.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/timestamp.proto"; @@ -31,6 +34,10 @@ option php_namespace = "Google\\Cloud\\Asset\\V1beta1"; // Asset service definition. service AssetService { + option (google.api.default_host) = "cloudasset.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + // Exports assets with time and resource types to a given Cloud Storage // location. The output format is newline-delimited JSON. // This API implements the @@ -49,6 +56,10 @@ service AssetService { body: "*" } }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.asset.v1beta1.ExportAssetsResponse" + metadata_type: "google.cloud.asset.v1beta1.ExportAssetsRequest" + }; } // Batch gets the update history of assets that overlap a time window. @@ -56,6 +67,8 @@ service AssetService { // non-delete or deleted status. // For IAM_POLICY content, this API outputs history when the asset and its // attached IAM POLICY both exist. This can create gaps in the output history. + // If a specified asset does not exist, this API returns an INVALID_ARGUMENT + // error. rpc BatchGetAssetsHistory(BatchGetAssetsHistoryRequest) returns (BatchGetAssetsHistoryResponse) { option (google.api.http) = { @@ -73,7 +86,12 @@ message ExportAssetsRequest { // organization number (such as "organizations/123"), a project ID (such as // "projects/my-project-id"), a project number (such as "projects/12345"), or // a folder number (such as "folders/123"). - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/Asset" + } + ]; // Timestamp to take an asset snapshot. This can only be set to a timestamp // between 2018-10-02 UTC (inclusive) and the current time. If not specified, @@ -95,7 +113,7 @@ message ExportAssetsRequest { // Required. Output configuration indicating where the results will be output // to. All results will be in newline delimited JSON format. - OutputConfig output_config = 5; + OutputConfig output_config = 5 [(google.api.field_behavior) = REQUIRED]; } // The export asset response. This message is returned by the @@ -117,7 +135,12 @@ message BatchGetAssetsHistoryRequest { // Required. The relative name of the root asset. It can only be an // organization number (such as "organizations/123"), a project ID (such as // "projects/my-project-id")", or a project number (such as "projects/12345"). - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/Asset" + } + ]; // A list of the full names of the assets. For example: // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. @@ -129,8 +152,8 @@ message BatchGetAssetsHistoryRequest { // size of the asset name list is 100 in one request. repeated string asset_names = 2; - // Required. The content type. - ContentType content_type = 3; + // Optional. The content type. + ContentType content_type = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The time window for the asset history. Both start_time and // end_time are optional and if set, it must be after 2018-10-02 UTC. If @@ -138,7 +161,7 @@ message BatchGetAssetsHistoryRequest { // not set, the snapshot of the assets at end_time will be returned. The // returned results contain all temporal assets whose time window overlap with // read_time_window. - TimeWindow read_time_window = 4; + TimeWindow read_time_window = 4 [(google.api.field_behavior) = OPTIONAL]; } // Batch get assets history response. @@ -166,6 +189,16 @@ message GcsDestination { // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) // for more information. string uri = 1; + + // The uri prefix of all generated Cloud Storage objects. For example: + // "gs://bucket_name/object_name_prefix". Each object uri is in format: + // "gs://bucket_name/object_name_prefix// and only + // contains assets for that type. starts from 0. For example: + // "gs://bucket_name/object_name_prefix/google.compute.disk/0" is the first + // shard of output objects containing all google.compute.disk assets. + // An INVALID_ARGUMENT error will be returned if file with the same name + // "gs://bucket_name/object_name_prefix" already exists. + string uri_prefix = 2; } } diff --git a/google/cloud/asset/v1beta1/assets.proto b/google/cloud/asset/v1beta1/assets.proto index 84db977b9..4bb1438c8 100644 --- a/google/cloud/asset/v1beta1/assets.proto +++ b/google/cloud/asset/v1beta1/assets.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,11 +18,13 @@ syntax = "proto3"; package google.cloud.asset.v1beta1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/iam/v1/policy.proto"; import "google/protobuf/any.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Asset.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset"; option java_multiple_files = true; @@ -56,6 +58,11 @@ message TimeWindow { // Cloud asset. This includes all Google Cloud Platform resources, // Cloud IAM policies, and other non-GCP assets. message Asset { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/Asset" + pattern: "*" + }; + // The full name of the asset. For example: // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. // See [Resource diff --git a/google/cloud/asset/v1beta1/cloudasset_gapic.legacy.yaml b/google/cloud/asset/v1beta1/cloudasset_gapic.legacy.yaml new file mode 100644 index 000000000..d88a59238 --- /dev/null +++ b/google/cloud/asset/v1beta1/cloudasset_gapic.legacy.yaml @@ -0,0 +1,146 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.asset.v1beta1 + python: + package_name: google.cloud.asset_v1beta1.gapic + go: + package_name: cloud.google.com/go/asset/apiv1beta1 + csharp: + package_name: Google.Cloud.Asset.V1Beta1 + ruby: + package_name: Google::Cloud::Asset::V1beta1 + php: + package_name: Google\Cloud\Asset\V1beta1 + nodejs: + package_name: asset.v1beta1 +# A list of API interface configurations. +interfaces: + # The fully qualified name of the API interface. +- name: google.cloud.asset.v1beta1.AssetService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ExportAssets + required_fields: + - parent + - output_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + resource_name_treatment: STATIC_TYPES + long_running: + return_type: google.cloud.asset.v1beta1.ExportAssetsResponse + metadata_type: google.cloud.asset.v1beta1.ExportAssetsRequest + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 600000 + - name: BatchGetAssetsHistory + required_fields: + - parent + - content_type + - read_time_window + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 600000 +resource_name_generation: +- message_name: ExportAssetsRequest + field_entity_map: + parent: project +- message_name: BatchGetAssetsHistoryRequest + field_entity_map: + parent: project diff --git a/google/cloud/asset/v1beta1/cloudasset_gapic.yaml b/google/cloud/asset/v1beta1/cloudasset_gapic.yaml index d88a59238..8081d9ea4 100644 --- a/google/cloud/asset/v1beta1/cloudasset_gapic.yaml +++ b/google/cloud/asset/v1beta1/cloudasset_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -20,127 +20,10 @@ language_settings: interfaces: # The fully qualified name of the API interface. - name: google.cloud.asset.v1beta1.AssetService - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: ExportAssets - required_fields: - - parent - - output_config - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - resource_name_treatment: STATIC_TYPES long_running: - return_type: google.cloud.asset.v1beta1.ExportAssetsResponse - metadata_type: google.cloud.asset.v1beta1.ExportAssetsRequest initial_poll_delay_millis: 500 poll_delay_multiplier: 1.5 max_poll_delay_millis: 5000 total_poll_timeout_millis: 300000 - timeout_millis: 600000 - - name: BatchGetAssetsHistory - required_fields: - - parent - - content_type - - read_time_window - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 600000 -resource_name_generation: -- message_name: ExportAssetsRequest - field_entity_map: - parent: project -- message_name: BatchGetAssetsHistoryRequest - field_entity_map: - parent: project diff --git a/google/cloud/asset/v1beta1/cloudasset_grpc_service_config.json b/google/cloud/asset/v1beta1/cloudasset_grpc_service_config.json new file mode 100755 index 000000000..e38239344 --- /dev/null +++ b/google/cloud/asset/v1beta1/cloudasset_grpc_service_config.json @@ -0,0 +1,31 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.asset.v1beta1.AssetService", + "method": "ExportAssets" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.asset.v1beta1.AssetService", + "method": "BatchGetAssetsHistory" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/asset/asset_v1.yaml b/google/cloud/asset/v1beta1/cloudasset_v1beta1.yaml similarity index 55% rename from google/cloud/asset/asset_v1.yaml rename to google/cloud/asset/v1beta1/cloudasset_v1beta1.yaml index 71c62ee8d..b959cb05b 100644 --- a/google/cloud/asset/asset_v1.yaml +++ b/google/cloud/asset/v1beta1/cloudasset_v1beta1.yaml @@ -4,7 +4,7 @@ name: cloudasset.googleapis.com title: Cloud Asset API apis: -- name: google.cloud.asset.v1.AssetService +- name: google.cloud.asset.v1beta1.AssetService documentation: summary: The cloud asset API manages the history and inventory of cloud resources. @@ -12,21 +12,21 @@ documentation: # Cloud Asset API The Cloud Asset API keeps a history of Google Cloud Platform (GCP) asset - metadata, and allows GCP users to download a dump of all asset metadata for - the resource types listed below within an organization or a project at a - given timestamp. + metadata, and allows GCP users to download a dump of all asset metadata + for the resource types listed below within an organization or a project at + a given timestamp. Read more documents here: - https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview + https://cloud.google.com/asset-inventory/docs backend: rules: - - selector: google.longrunning.Operations.GetOperation - deadline: 60.0 - - selector: google.cloud.asset.v1.AssetService.ExportAssets + - selector: google.cloud.asset.v1beta1.AssetService.BatchGetAssetsHistory deadline: 600.0 - - selector: google.cloud.asset.v1.AssetService.BatchGetAssetsHistory + - selector: google.cloud.asset.v1beta1.AssetService.ExportAssets deadline: 600.0 + - selector: google.longrunning.Operations.GetOperation + deadline: 60.0 http: rules: @@ -34,17 +34,19 @@ http: get: '/v1beta1/{name=projects/*/operations/*/**}' additional_bindings: - get: '/v1beta1/{name=folders/*/operations/*/**}' - - get: '/v1beta1/{name=organizations/*/operations/*/**}' - - get: '/v1p1alpha1/{name=*/*/operations/*/**}' - - - get: '/v1/{name=*/*/operations/*/**}' - - authentication: rules: - - selector: '*' + - selector: google.cloud.asset.v1beta1.AssetService.BatchGetAssetsHistory + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.asset.v1beta1.AssetService.ExportAssets + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.longrunning.Operations.GetOperation oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/asset/v1p1beta1/BUILD.bazel b/google/cloud/asset/v1p1beta1/BUILD.bazel new file mode 100644 index 000000000..f039fdd85 --- /dev/null +++ b/google/cloud/asset/v1p1beta1/BUILD.bazel @@ -0,0 +1,361 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "asset_proto", + srcs = [ + "asset_service.proto", + "assets.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/iam/v1:policy_proto", + ], +) + +proto_library_with_info( + name = "asset_proto_with_info", + deps = [ + ":asset_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "asset_java_proto", + deps = [":asset_proto"], +) + +java_grpc_library( + name = "asset_java_grpc", + srcs = [":asset_proto"], + deps = [":asset_java_proto"], +) + +java_gapic_library( + name = "asset_java_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p1beta1", + service_yaml = "cloudasset_v1p1beta1.yaml", + test_deps = [ + ":asset_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":asset_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "asset_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.asset.v1p1beta1.AssetServiceClientTest", + ], + runtime_deps = [":asset_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-asset-v1p1beta1-java", + deps = [ + ":asset_java_gapic", + ":asset_java_grpc", + ":asset_java_proto", + ":asset_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "asset_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/asset/v1p1beta1", + protos = [":asset_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_gapic_library( + name = "asset_go_gapic", + srcs = [":asset_proto_with_info"], + grpc_service_config = "cloudasset_grpc_service_config.json", + importpath = "cloud.google.com/go/asset/apiv1p1beta1;asset", + service_yaml = "cloudasset_v1p1beta1.yaml", + deps = [ + ":asset_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_test( + name = "asset_go_gapic_test", + srcs = [":asset_go_gapic_srcjar_test"], + embed = [":asset_go_gapic"], + importpath = "cloud.google.com/go/asset/apiv1p1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-asset-v1p1beta1-go", + deps = [ + ":asset_go_gapic", + ":asset_go_gapic_srcjar-test.srcjar", + ":asset_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "asset_moved_proto", + srcs = [":asset_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/iam/v1:policy_proto", + ], +) + +py_proto_library( + name = "asset_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":asset_moved_proto"], +) + +py_grpc_library( + name = "asset_py_grpc", + srcs = [":asset_moved_proto"], + deps = [":asset_py_proto"], +) + +py_gapic_library( + name = "asset_py_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p1beta1", + service_yaml = "cloudasset_v1p1beta1.yaml", + deps = [ + ":asset_py_grpc", + ":asset_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "asset-v1p1beta1-py", + deps = [ + ":asset_py_gapic", + ":asset_py_grpc", + ":asset_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "asset_php_proto", + deps = [":asset_proto"], +) + +php_grpc_library( + name = "asset_php_grpc", + srcs = [":asset_proto"], + deps = [":asset_php_proto"], +) + +php_gapic_library( + name = "asset_php_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p1beta1", + service_yaml = "cloudasset_v1p1beta1.yaml", + deps = [ + ":asset_php_grpc", + ":asset_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-asset-v1p1beta1-php", + deps = [ + ":asset_php_gapic", + ":asset_php_grpc", + ":asset_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "asset_nodejs_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p1beta1", + service_yaml = "cloudasset_v1p1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "asset-v1p1beta1-nodejs", + deps = [ + ":asset_nodejs_gapic", + ":asset_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "asset_ruby_proto", + deps = [":asset_proto"], +) + +ruby_grpc_library( + name = "asset_ruby_grpc", + srcs = [":asset_proto"], + deps = [":asset_ruby_proto"], +) + +ruby_gapic_library( + name = "asset_ruby_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p1beta1", + service_yaml = "cloudasset_v1p1beta1.yaml", + deps = [ + ":asset_ruby_grpc", + ":asset_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-asset-v1p1beta1-ruby", + deps = [ + ":asset_ruby_gapic", + ":asset_ruby_grpc", + ":asset_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "asset_csharp_proto", + deps = [":asset_proto"], +) + +csharp_grpc_library( + name = "asset_csharp_grpc", + srcs = [":asset_proto"], + deps = [":asset_csharp_proto"], +) + +csharp_gapic_library( + name = "asset_csharp_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p1beta1", + service_yaml = "cloudasset_v1p1beta1.yaml", + deps = [ + ":asset_csharp_grpc", + ":asset_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-asset-v1p1beta1-csharp", + deps = [ + ":asset_csharp_gapic", + ":asset_csharp_grpc", + ":asset_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/asset/v1p1beta1/artman_cloudasset_v1p1beta1.yaml b/google/cloud/asset/v1p1beta1/artman_cloudasset_v1p1beta1.yaml new file mode 100644 index 000000000..ca93339bf --- /dev/null +++ b/google/cloud/asset/v1p1beta1/artman_cloudasset_v1p1beta1.yaml @@ -0,0 +1,35 @@ +common: + # Keep the api_name asset, otherwise Java code gen will be broken. + api_name: asset + api_version: v1p1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - . + service_yaml: cloudasset_v1p1beta1.yaml + gapic_yaml: cloudasset_gapic.yaml +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: php_gapic + type: GAPIC + language: PHP +- name: go_gapic + type: GAPIC + language: GO +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: csharp_gapic + type: GAPIC + language: CSHARP diff --git a/google/cloud/asset/v1p1beta1/asset_service.proto b/google/cloud/asset/v1p1beta1/asset_service.proto new file mode 100644 index 000000000..d5a0d8c41 --- /dev/null +++ b/google/cloud/asset/v1p1beta1/asset_service.proto @@ -0,0 +1,149 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.asset.v1p1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/asset/v1p1beta1/assets.proto"; + +option csharp_namespace = "Google.Cloud.Asset.V1P1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetServiceProto"; +option java_package = "com.google.cloud.asset.v1p1beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p1beta1"; + +// Asset service definition. +service AssetService { + option (google.api.default_host) = "cloudasset.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Searches all the resources under a given accessible CRM scope + // (project/folder/organization). This RPC gives callers + // especially admins the ability to search all the resources under a scope, + // even if they don't have .get permission of all the resources. Callers + // should have cloud.assets.SearchAllResources permission on the requested + // scope, otherwise it will be rejected. + rpc SearchAllResources(SearchAllResourcesRequest) returns (SearchAllResourcesResponse) { + option (google.api.http) = { + get: "/v1p1beta1/{scope=*/*}/resources:searchAll" + }; + option (google.api.method_signature) = "scope,query,asset_types"; + } + + // Searches all the IAM policies under a given accessible CRM scope + // (project/folder/organization). This RPC gives callers + // especially admins the ability to search all the IAM policies under a scope, + // even if they don't have .getIamPolicy permission of all the IAM policies. + // Callers should have cloud.assets.SearchAllIamPolicies permission on the + // requested scope, otherwise it will be rejected. + rpc SearchAllIamPolicies(SearchAllIamPoliciesRequest) returns (SearchAllIamPoliciesResponse) { + option (google.api.http) = { + get: "/v1p1beta1/{scope=*/*}/iamPolicies:searchAll" + }; + option (google.api.method_signature) = "scope,query"; + } +} + +// Search all resources request. +message SearchAllResourcesRequest { + // Required. The relative name of an asset. The search is limited to the resources + // within the `scope`. The allowed value must be: + // * Organization number (such as "organizations/123") + // * Folder number(such as "folders/1234") + // * Project number (such as "projects/12345") + // * Project id (such as "projects/abc") + string scope = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The query statement. + string query = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of asset types that this request searches for. If empty, it will + // search all the supported asset types. + repeated string asset_types = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page size for search result pagination. Page size is capped at 500 even + // if a larger value is given. If set to zero, server will pick an appropriate + // default. Returned results may be fewer than requested. When this happens, + // there could be more results as long as `next_page_token` is returned. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If present, then retrieve the next batch of results from the preceding call + // to this method. `page_token` must be the value of `next_page_token` from + // the previous response. The values of all other method parameters, must be + // identical to those in the previous call. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma separated list of fields specifying the sorting order of the + // results. The default order is ascending. Add " desc" after the field name + // to indicate descending order. Redundant space characters are ignored. For + // example, " foo , bar desc ". + string order_by = 10 [(google.api.field_behavior) = OPTIONAL]; +} + +// Search all resources response. +message SearchAllResourcesResponse { + // A list of resource that match the search query. + repeated StandardResourceMetadata results = 1; + + // If there are more results than those appearing in this response, then + // `next_page_token` is included. To get the next set of results, call this + // method again using the value of `next_page_token` as `page_token`. + string next_page_token = 2; +} + +// Search all IAM policies request. +message SearchAllIamPoliciesRequest { + // Required. The relative name of an asset. The search is limited to the resources + // within the `scope`. The allowed value must be: + // * Organization number (such as "organizations/123") + // * Folder number(such as "folders/1234") + // * Project number (such as "projects/12345") + // * Project id (such as "projects/abc") + string scope = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The query statement. + // Examples: + // * "policy:myuser@mydomain.com" + // * "policy:(myuser@mydomain.com viewer)" + string query = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page size for search result pagination. Page size is capped at 500 even + // if a larger value is given. If set to zero, server will pick an appropriate + // default. Returned results may be fewer than requested. When this happens, + // there could be more results as long as `next_page_token` is returned. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If present, retrieve the next batch of results from the preceding call to + // this method. `page_token` must be the value of `next_page_token` from the + // previous response. The values of all other method parameters must be + // identical to those in the previous call. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Search all IAM policies response. +message SearchAllIamPoliciesResponse { + // A list of IamPolicy that match the search query. Related information such + // as the associated resource is returned along with the policy. + repeated IamPolicySearchResult results = 1; + + // Set if there are more results than those appearing in this response; to get + // the next set of results, call this method again, using this value as the + // `page_token`. + string next_page_token = 2; +} diff --git a/google/cloud/asset/v1p1beta1/assets.proto b/google/cloud/asset/v1p1beta1/assets.proto new file mode 100644 index 000000000..549ea688b --- /dev/null +++ b/google/cloud/asset/v1p1beta1/assets.proto @@ -0,0 +1,114 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.asset.v1p1beta1; + +import "google/iam/v1/policy.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Asset.V1P1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetProto"; +option java_package = "com.google.cloud.asset.v1p1beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p1beta1"; + +// The standard metadata of a cloud resource. +message StandardResourceMetadata { + // The full resource name. For example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // See [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + string name = 1; + + // The type of this resource. + // For example: "compute.googleapis.com/Disk". + string asset_type = 2; + + // The project that this resource belongs to, in the form of + // `projects/{project_number}`. + string project = 3; + + // The display name of this resource. + string display_name = 4; + + // One or more paragraphs of text description of this resource. Maximum length + // could be up to 1M bytes. + string description = 5; + + // Additional searchable attributes of this resource. + // Informational only. The exact set of attributes is subject to change. + // For example: project id, DNS name etc. + repeated string additional_attributes = 10; + + // Location can be "global", regional like "us-east1", or zonal like + // "us-west1-b". + string location = 11; + + // Labels associated with this resource. See [Labelling and grouping GCP + // resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) + // for more information. + map labels = 12; + + // Network tags associated with this resource. Like labels, network tags are a + // type of annotations used to group GCP resources. See [Labelling GCP + // resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) + // for more information. + repeated string network_tags = 13; +} + +// The result for a IAM Policy search. +message IamPolicySearchResult { + // Explanation about the IAM policy search result. + message Explanation { + // The map from roles to their included permission matching the permission + // query (e.g. containing `policy.role.permissions:`). A sample role string: + // "roles/compute.instanceAdmin". The roles can also be found in the + // returned `policy` bindings. Note that the map is populated only if + // requesting with a permission query. + map matched_permissions = 1; + } + + // The [full resource + // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // of the resource associated with this IAM policy. + string resource = 1; + + // The project that the associated GCP resource belongs to, in the form of + // `projects/{project_number}`. If an IAM policy is set on a resource (like VM + // instance, Cloud Storage bucket), the project field will indicate the + // project that contains the resource. If an IAM policy is set on a folder or + // orgnization, the project field will be empty. + string project = 3; + + // The IAM policy directly set on the given resource. Note that the original + // IAM policy can contain multiple bindings. This only contains the bindings + // that match the given query. For queries that don't contain a constrain on + // policies (e.g. an empty query), this contains all the bindings. + google.iam.v1.Policy policy = 4; + + // Explanation about the IAM policy search result. It contains additional + // information to explain why the search result matches the query. + Explanation explanation = 5; +} + +// IAM permissions +message Permissions { + // A list of permissions. A sample permission string: "compute.disk.get". + repeated string permissions = 1; +} diff --git a/google/cloud/asset/v1p1beta1/cloudasset_gapic.legacy.yaml b/google/cloud/asset/v1p1beta1/cloudasset_gapic.legacy.yaml new file mode 100644 index 000000000..11f29e134 --- /dev/null +++ b/google/cloud/asset/v1p1beta1/cloudasset_gapic.legacy.yaml @@ -0,0 +1,134 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.asset.v1p1beta1 + python: + package_name: google.cloud.asset_v1p1beta1.gapic + go: + package_name: cloud.google.com/go/asset/apiv1p1beta1 + csharp: + package_name: Google.Cloud.Asset.V1p1beta1 + ruby: + package_name: Google::Cloud::Asset::V1p1beta1 + php: + package_name: Google\Cloud\Asset\V1p1beta1 + nodejs: + package_name: asset.v1p1beta1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.asset.v1p1beta1.AssetService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: SearchAllResources + flattening: + groups: + - parameters: + - scope + - query + - asset_types + required_fields: + - scope + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: results + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 15000 + - name: SearchAllIamPolicies + flattening: + groups: + - parameters: + - scope + - query + required_fields: + - scope + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: results + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 15000 diff --git a/google/cloud/asset/v1p1beta1/cloudasset_gapic.yaml b/google/cloud/asset/v1p1beta1/cloudasset_gapic.yaml new file mode 100644 index 000000000..039c76216 --- /dev/null +++ b/google/cloud/asset/v1p1beta1/cloudasset_gapic.yaml @@ -0,0 +1,22 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.asset.v1p1beta1 + python: + package_name: google.cloud.asset_v1p1beta1.gapic + go: + package_name: cloud.google.com/go/asset/apiv1p1beta1 + csharp: + package_name: Google.Cloud.Asset.V1p1beta1 + ruby: + package_name: Google::Cloud::Asset::V1p1beta1 + php: + package_name: Google\Cloud\Asset\V1p1beta1 + nodejs: + package_name: asset.v1p1beta1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.asset.v1p1beta1.AssetService diff --git a/google/cloud/asset/v1p1beta1/cloudasset_grpc_service_config.json b/google/cloud/asset/v1p1beta1/cloudasset_grpc_service_config.json new file mode 100755 index 000000000..34b6749d7 --- /dev/null +++ b/google/cloud/asset/v1p1beta1/cloudasset_grpc_service_config.json @@ -0,0 +1,35 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.asset.v1p1beta1.AssetService", + "method": "SearchResources" + }, + { + "service": "google.cloud.asset.v1p1beta1.AssetService", + "method": "SearchIamPolicies" + }, + { + "service": "google.cloud.asset.v1p1beta1.AssetService", + "method": "SearchAllResources" + }, + { + "service": "google.cloud.asset.v1p1beta1.AssetService", + "method": "SearchAllIamPolicies" + } + ], + "timeout": "15s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/asset/v1p1beta1/cloudasset_v1p1beta1.yaml b/google/cloud/asset/v1p1beta1/cloudasset_v1p1beta1.yaml new file mode 100644 index 000000000..74aad50aa --- /dev/null +++ b/google/cloud/asset/v1p1beta1/cloudasset_v1p1beta1.yaml @@ -0,0 +1,44 @@ +type: google.api.Service +config_version: 3 +name: cloudasset.googleapis.com +title: Cloud Asset API + +apis: +- name: google.cloud.asset.v1p1beta1.AssetService + +documentation: + summary: The cloud asset API manages the history and inventory of cloud resources. + overview: |- + # Cloud Asset API + + The Cloud Asset API keeps a history of Google Cloud Platform (GCP) asset + metadata, and allows GCP users to download a dump of all asset metadata + for the resource types listed below within an organization or a project at + a given timestamp. + + Read more documents here: + https://cloud.google.com/asset-inventory/docs + +backend: + rules: + - selector: google.cloud.asset.v1p1beta1.AssetService.SearchAllIamPolicies + deadline: 600.0 + - selector: google.cloud.asset.v1p1beta1.AssetService.SearchAllResources + deadline: 600.0 + - selector: google.longrunning.Operations.GetOperation + deadline: 60.0 + +authentication: + rules: + - selector: google.cloud.asset.v1p1beta1.AssetService.SearchAllIamPolicies + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.asset.v1p1beta1.AssetService.SearchAllResources + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.longrunning.Operations.GetOperation + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/asset/v1p2beta1/BUILD.bazel b/google/cloud/asset/v1p2beta1/BUILD.bazel new file mode 100644 index 000000000..45ef0b256 --- /dev/null +++ b/google/cloud/asset/v1p2beta1/BUILD.bazel @@ -0,0 +1,382 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "asset_proto", + srcs = [ + "asset_service.proto", + "assets.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "asset_proto_with_info", + deps = [ + ":asset_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "asset_java_proto", + deps = [":asset_proto"], +) + +java_grpc_library( + name = "asset_java_grpc", + srcs = [":asset_proto"], + deps = [":asset_java_proto"], +) + +java_gapic_library( + name = "asset_java_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p2beta1", + service_yaml = "cloudasset_v1p2beta1.yaml", + test_deps = [ + ":asset_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":asset_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "asset_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.asset.v1p2beta1.AssetServiceClientTest", + ], + runtime_deps = [":asset_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-asset-v1p2beta1-java", + deps = [ + ":asset_java_gapic", + ":asset_java_grpc", + ":asset_java_proto", + ":asset_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "asset_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1", + protos = [":asset_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "asset_go_gapic", + srcs = [":asset_proto_with_info"], + grpc_service_config = "cloudasset_grpc_service_config.json", + importpath = "cloud.google.com/go/asset/apiv1p2beta1;asset", + service_yaml = "cloudasset_v1p2beta1.yaml", + deps = [ + ":asset_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:any_go_proto", + "@io_bazel_rules_go//proto/wkt:struct_go_proto", + ], +) + +go_test( + name = "asset_go_gapic_test", + srcs = [":asset_go_gapic_srcjar_test"], + embed = [":asset_go_gapic"], + importpath = "cloud.google.com/go/asset/apiv1p2beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-asset-v1p2beta1-go", + deps = [ + ":asset_go_gapic", + ":asset_go_gapic_srcjar-test.srcjar", + ":asset_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "asset_moved_proto", + srcs = [":asset_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "asset_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":asset_moved_proto"], +) + +py_grpc_library( + name = "asset_py_grpc", + srcs = [":asset_moved_proto"], + deps = [":asset_py_proto"], +) + +py_gapic_library( + name = "asset_py_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p2beta1", + service_yaml = "cloudasset_v1p2beta1.yaml", + deps = [ + ":asset_py_grpc", + ":asset_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "asset-v1p2beta1-py", + deps = [ + ":asset_py_gapic", + ":asset_py_grpc", + ":asset_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "asset_php_proto", + deps = [":asset_proto"], +) + +php_grpc_library( + name = "asset_php_grpc", + srcs = [":asset_proto"], + deps = [":asset_php_proto"], +) + +php_gapic_library( + name = "asset_php_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p2beta1", + service_yaml = "cloudasset_v1p2beta1.yaml", + deps = [ + ":asset_php_grpc", + ":asset_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-asset-v1p2beta1-php", + deps = [ + ":asset_php_gapic", + ":asset_php_grpc", + ":asset_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "asset_nodejs_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p2beta1", + service_yaml = "cloudasset_v1p2beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "asset-v1p2beta1-nodejs", + deps = [ + ":asset_nodejs_gapic", + ":asset_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "asset_ruby_proto", + deps = [":asset_proto"], +) + +ruby_grpc_library( + name = "asset_ruby_grpc", + srcs = [":asset_proto"], + deps = [":asset_ruby_proto"], +) + +ruby_gapic_library( + name = "asset_ruby_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p2beta1", + service_yaml = "cloudasset_v1p2beta1.yaml", + deps = [ + ":asset_ruby_grpc", + ":asset_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-asset-v1p2beta1-ruby", + deps = [ + ":asset_ruby_gapic", + ":asset_ruby_grpc", + ":asset_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "asset_csharp_proto", + deps = [":asset_proto"], +) + +csharp_grpc_library( + name = "asset_csharp_grpc", + srcs = [":asset_proto"], + deps = [":asset_csharp_proto"], +) + +csharp_gapic_library( + name = "asset_csharp_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p2beta1", + service_yaml = "cloudasset_v1p2beta1.yaml", + deps = [ + ":asset_csharp_grpc", + ":asset_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-asset-v1p2beta1-csharp", + deps = [ + ":asset_csharp_gapic", + ":asset_csharp_grpc", + ":asset_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/asset/v1p2beta1/asset_service.proto b/google/cloud/asset/v1p2beta1/asset_service.proto new file mode 100644 index 000000000..7925bba68 --- /dev/null +++ b/google/cloud/asset/v1p2beta1/asset_service.proto @@ -0,0 +1,261 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.asset.v1p2beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/asset/v1p2beta1/assets.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Asset.V1p2Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetServiceProto"; +option java_package = "com.google.cloud.asset.v1p2beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p2Beta1"; + +// Asset service definition. +service AssetService { + option (google.api.default_host) = "cloudasset.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a feed in a parent project/folder/organization to listen to its + // asset updates. + rpc CreateFeed(CreateFeedRequest) returns (Feed) { + option (google.api.http) = { + post: "/v1p2beta1/{parent=*/*}/feeds" + body: "*" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about an asset feed. + rpc GetFeed(GetFeedRequest) returns (Feed) { + option (google.api.http) = { + get: "/v1p2beta1/{name=*/*/feeds/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all asset feeds in a parent project/folder/organization. + rpc ListFeeds(ListFeedsRequest) returns (ListFeedsResponse) { + option (google.api.http) = { + get: "/v1p2beta1/{parent=*/*}/feeds" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates an asset feed configuration. + rpc UpdateFeed(UpdateFeedRequest) returns (Feed) { + option (google.api.http) = { + patch: "/v1p2beta1/{feed.name=*/*/feeds/*}" + body: "*" + }; + option (google.api.method_signature) = "feed"; + } + + // Deletes an asset feed. + rpc DeleteFeed(DeleteFeedRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1p2beta1/{name=*/*/feeds/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Create asset feed request. +message CreateFeedRequest { + // Required. The name of the project/folder/organization where this feed + // should be created in. It can only be an organization number (such as + // "organizations/123"), a folder number (such as "folders/123"), a project ID + // (such as "projects/my-project-id")", or a project number (such as + // "projects/12345"). + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. This is the client-assigned asset feed identifier and it needs to + // be unique under a specific parent project/folder/organization. + string feed_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The feed details. The field `name` must be empty and it will be generated + // in the format of: + // projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + Feed feed = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Get asset feed request. +message GetFeedRequest { + // Required. The name of the Feed and it must be in the format of: + // projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudasset.googleapis.com/Feed" + } + ]; +} + +// List asset feeds request. +message ListFeedsRequest { + // Required. The parent project/folder/organization whose feeds are to be + // listed. It can only be using project/folder/organization number (such as + // "folders/12345")", or a project ID (such as "projects/my-project-id"). + string parent = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message ListFeedsResponse { + // A list of feeds. + repeated Feed feeds = 1; +} + +// Update asset feed request. +message UpdateFeedRequest { + // Required. The new values of feed details. It must match an existing feed and the + // field `name` must be in the format of: + // projects/project_number/feeds/feed_id or + // folders/folder_number/feeds/feed_id or + // organizations/organization_number/feeds/feed_id. + Feed feed = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Only updates the `feed` fields indicated by this mask. + // The field mask must not be empty, and it must not contain fields that + // are immutable or only set by the server. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +message DeleteFeedRequest { + // Required. The name of the feed and it must be in the format of: + // projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudasset.googleapis.com/Feed" + } + ]; +} + +// Output configuration for export assets destination. +message OutputConfig { + // Asset export destination. + oneof destination { + // Destination on Cloud Storage. + GcsDestination gcs_destination = 1; + } +} + +// A Cloud Storage location. +message GcsDestination { + // Required. + oneof object_uri { + // The uri of the Cloud Storage object. It's the same uri that is used by + // gsutil. For example: "gs://bucket_name/object_name". See [Viewing and + // Editing Object + // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) + // for more information. + string uri = 1; + } +} + +// A Cloud Pubsub destination. +message PubsubDestination { + // The name of the Cloud Pub/Sub topic to publish to. + // For example: `projects/PROJECT_ID/topics/TOPIC_ID`. + string topic = 1; +} + +// Output configuration for asset feed destination. +message FeedOutputConfig { + // Asset feed destination. + oneof destination { + // Destination on Cloud Pubsub. + PubsubDestination pubsub_destination = 1; + } +} + +// An asset feed used to export asset updates to a destinations. +// An asset feed filter controls what updates are exported. +// The asset feed must be created within a project, organization, or +// folder. Supported destinations are: +// Cloud Pub/Sub topics. +message Feed { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/Feed" + pattern: "projects/{project}/feeds/{feed}" + pattern: "folders/{folder}/feeds/{feed}" + pattern: "organizations/{organization}/feeds/{feed}" + history: ORIGINALLY_SINGLE_PATTERN + }; + + // Required. The format will be + // projects/{project_number}/feeds/{client-assigned_feed_identifier} or + // folders/{folder_number}/feeds/{client-assigned_feed_identifier} or + // organizations/{organization_number}/feeds/{client-assigned_feed_identifier} + // + // The client-assigned feed identifier must be unique within the parent + // project/folder/organization. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // A list of the full names of the assets to receive updates. You must specify + // either or both of asset_names and asset_types. Only asset updates matching + // specified asset_names and asset_types are exported to the feed. For + // example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // See [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more info. + repeated string asset_names = 2; + + // A list of types of the assets to receive updates. You must specify either + // or both of asset_names and asset_types. Only asset updates matching + // specified asset_names and asset_types are exported to the feed. + // For example: + // "compute.googleapis.com/Disk" See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + // for all supported asset types. + repeated string asset_types = 3; + + // Asset content type. If not specified, no content but the asset name and + // type will be returned. + ContentType content_type = 4; + + // Required. Feed output configuration defining where the asset updates are + // published to. + FeedOutputConfig feed_output_config = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// Asset content type. +enum ContentType { + // Unspecified content type. + CONTENT_TYPE_UNSPECIFIED = 0; + + // Resource metadata. + RESOURCE = 1; + + // The actual IAM policy set on a resource. + IAM_POLICY = 2; +} diff --git a/google/cloud/asset/v1p2beta1/assets.proto b/google/cloud/asset/v1p2beta1/assets.proto new file mode 100644 index 000000000..8fee229bb --- /dev/null +++ b/google/cloud/asset/v1p2beta1/assets.proto @@ -0,0 +1,126 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.asset.v1p2beta1; + +import "google/api/annotations.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Asset.v1p2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetProto"; +option java_package = "com.google.cloud.asset.v1p2beta1"; +option php_namespace = "Google\\Cloud\\Asset\\v1p2beta1"; + +// Temporal asset. In addition to the asset, the temporal asset includes the +// status of the asset and valid from and to time of it. +message TemporalAsset { + // The time window when the asset data and state was observed. + TimeWindow window = 1; + + // If the asset is deleted or not. + bool deleted = 2; + + // Asset. + Asset asset = 3; +} + +// A time window of (start_time, end_time]. +message TimeWindow { + // Start time of the time window (exclusive). + google.protobuf.Timestamp start_time = 1; + + // End time of the time window (inclusive). + // Current timestamp if not specified. + google.protobuf.Timestamp end_time = 2; +} + +// Cloud asset. This includes all Google Cloud Platform resources, +// Cloud IAM policies, and other non-GCP assets. +message Asset { + // The full name of the asset. For example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // See [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + string name = 1; + + // Type of the asset. Example: "compute.googleapis.com/Disk". + string asset_type = 2; + + // Representation of the resource. + Resource resource = 3; + + // Representation of the actual Cloud IAM policy set on a cloud resource. For + // each resource, there must be at most one Cloud IAM policy set on it. + google.iam.v1.Policy iam_policy = 4; + + // Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + // represented as a list of relative resource names. Ancestry path starts with + // the closest CRM ancestor and ends at root. If the asset is a CRM + // project/folder/organization, this starts from the asset itself. + // + // Example: ["projects/123456789", "folders/5432", "organizations/1234"] + repeated string ancestors = 6; +} + +// Representation of a cloud resource. +message Resource { + // The API version. Example: "v1". + string version = 1; + + // The URL of the discovery document containing the resource's JSON schema. + // For example: + // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + // It will be left unspecified for resources without a discovery-based API, + // such as Cloud Bigtable. + string discovery_document_uri = 2; + + // The JSON schema name listed in the discovery document. + // Example: "Project". It will be left unspecified for resources (such as + // Cloud Bigtable) without a discovery-based API. + string discovery_name = 3; + + // The REST URL for accessing the resource. An HTTP GET operation using this + // URL returns the resource itself. + // Example: + // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + // It will be left unspecified for resources without a REST API. + string resource_url = 4; + + // The full name of the immediate parent of this resource. See + // [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + // + // For GCP assets, it is the parent resource defined in the [Cloud IAM policy + // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + // For example: + // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + // + // For third-party assets, it is up to the users to define. + string parent = 5; + + // The content of the resource, in which some sensitive fields are scrubbed + // away and may not be present. + google.protobuf.Struct data = 6; +} diff --git a/google/cloud/asset/v1p2beta1/cloudasset_gapic.legacy.yaml b/google/cloud/asset/v1p2beta1/cloudasset_gapic.legacy.yaml new file mode 100644 index 000000000..f26588ff5 --- /dev/null +++ b/google/cloud/asset/v1p2beta1/cloudasset_gapic.legacy.yaml @@ -0,0 +1,158 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.asset.v1p2beta1 + python: + package_name: google.cloud.asset_v1p2beta1.gapic + go: + package_name: cloud.google.com/go/asset/apiv1p2beta1 + csharp: + package_name: Google.Cloud.Asset.V1p2beta1 + ruby: + package_name: Google::Cloud::Asset::V1p2beta1 + php: + package_name: Google\Cloud\Asset\V1p2beta1 + nodejs: + package_name: asset.v1p2beta1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.asset.v1p2beta1.AssetService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: 'projects/{project}/feeds/{feed}' + entity_name: feed + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateFeed + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + - feed_id + - feed + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 30000 + - name: GetFeed + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: feed + timeout_millis: 10000 + - name: ListFeeds + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: UpdateFeed + flattening: + groups: + - parameters: + - feed + required_fields: + - feed + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + feed.name: feed + timeout_millis: 30000 + - name: DeleteFeed + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: feed + timeout_millis: 30000 diff --git a/google/cloud/asset/v1p2beta1/cloudasset_gapic.yaml b/google/cloud/asset/v1p2beta1/cloudasset_gapic.yaml new file mode 100644 index 000000000..233203a6d --- /dev/null +++ b/google/cloud/asset/v1p2beta1/cloudasset_gapic.yaml @@ -0,0 +1,25 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.asset.v1p2beta1 + python: + package_name: google.cloud.asset_v1p2beta1.gapic + go: + package_name: cloud.google.com/go/asset/apiv1p2beta1 + csharp: + package_name: Google.Cloud.Asset.V1p2beta1 + ruby: + package_name: Google::Cloud::Asset::V1p2beta1 + php: + package_name: Google\Cloud\Asset\V1p2beta1 + nodejs: + package_name: asset.v1p2beta1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.asset.v1p2beta1.AssetService + methods: + - name: DeleteFeed + retry_codes_name: idempotent diff --git a/google/cloud/asset/v1p2beta1/cloudasset_grpc_service_config.json b/google/cloud/asset/v1p2beta1/cloudasset_grpc_service_config.json new file mode 100755 index 000000000..7e7147099 --- /dev/null +++ b/google/cloud/asset/v1p2beta1/cloudasset_grpc_service_config.json @@ -0,0 +1,43 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.asset.v1p2beta1.AssetService", + "method": "CreateFeed" + }, + { + "service": "google.cloud.asset.v1p2beta1.AssetService", + "method": "UpdateFeed" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.asset.v1p2beta1.AssetService", + "method": "GetFeed" + }, + { + "service": "google.cloud.asset.v1p2beta1.AssetService", + "method": "ListFeeds" + }, + { + "service": "google.cloud.asset.v1p2beta1.AssetService", + "method": "DeleteFeed" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/asset/v1p2beta1/cloudasset_v1p2beta1.yaml b/google/cloud/asset/v1p2beta1/cloudasset_v1p2beta1.yaml new file mode 100644 index 000000000..19bc8819f --- /dev/null +++ b/google/cloud/asset/v1p2beta1/cloudasset_v1p2beta1.yaml @@ -0,0 +1,38 @@ +type: google.api.Service +config_version: 3 +name: cloudasset.googleapis.com +title: Cloud Asset API + +apis: +- name: google.cloud.asset.v1p2beta1.AssetService + +documentation: + summary: The cloud asset API manages the history and inventory of cloud resources. + overview: |- + # Cloud Asset API + + The Cloud Asset API keeps a history of Google Cloud Platform (GCP) asset + metadata, and allows GCP users to download a dump of all asset metadata + for the resource types listed below within an organization or a project at + a given timestamp. + + Read more documents here: + https://cloud.google.com/asset-inventory/docs + +backend: + rules: + - selector: 'google.cloud.asset.v1p2beta1.AssetService.*' + deadline: 600.0 + - selector: google.longrunning.Operations.GetOperation + deadline: 60.0 + +authentication: + rules: + - selector: 'google.cloud.asset.v1p2beta1.AssetService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.longrunning.Operations.GetOperation + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/asset/v1p4beta1/BUILD.bazel b/google/cloud/asset/v1p4beta1/BUILD.bazel new file mode 100644 index 000000000..f7a8b2233 --- /dev/null +++ b/google/cloud/asset/v1p4beta1/BUILD.bazel @@ -0,0 +1,374 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "asset_proto", + srcs = [ + "asset_service.proto", + "assets.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "//google/rpc:code_proto", + "@com_google_protobuf//:duration_proto", + ], +) + +proto_library_with_info( + name = "asset_proto_with_info", + deps = [ + ":asset_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "asset_java_proto", + deps = [":asset_proto"], +) + +java_grpc_library( + name = "asset_java_grpc", + srcs = [":asset_proto"], + deps = [":asset_java_proto"], +) + +java_gapic_library( + name = "asset_java_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p4beta1", + service_yaml = "cloudasset_v1p4beta1.yaml", + test_deps = [ + ":asset_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":asset_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "asset_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.asset.v1p4beta1.AssetServiceClientTest", + ], + runtime_deps = [":asset_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-asset-v1p4beta1-java", + deps = [ + ":asset_java_gapic", + ":asset_java_grpc", + ":asset_java_proto", + ":asset_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "asset_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/asset/v1p4beta1", + protos = [":asset_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/longrunning:longrunning_go_proto", + "//google/rpc:code_go_proto", + ], +) + +go_gapic_library( + name = "asset_go_gapic", + srcs = [":asset_proto_with_info"], + grpc_service_config = "cloudasset_grpc_service_config.json", + importpath = "cloud.google.com/go/asset/apiv1p4beta1;asset", + service_yaml = "cloudasset_v1p4beta1.yaml", + deps = [ + ":asset_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +go_test( + name = "asset_go_gapic_test", + srcs = [":asset_go_gapic_srcjar_test"], + embed = [":asset_go_gapic"], + importpath = "cloud.google.com/go/asset/apiv1p4beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-asset-v1p4beta1-go", + deps = [ + ":asset_go_gapic", + ":asset_go_gapic_srcjar-test.srcjar", + ":asset_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "asset_moved_proto", + srcs = [":asset_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "//google/rpc:code_proto", + "@com_google_protobuf//:duration_proto", + ], +) + +py_proto_library( + name = "asset_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":asset_moved_proto"], +) + +py_grpc_library( + name = "asset_py_grpc", + srcs = [":asset_moved_proto"], + deps = [":asset_py_proto"], +) + +py_gapic_library( + name = "asset_py_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p4beta1", + service_yaml = "cloudasset_v1p4beta1.yaml", + deps = [ + ":asset_py_grpc", + ":asset_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "asset-v1p4beta1-py", + deps = [ + ":asset_py_gapic", + ":asset_py_grpc", + ":asset_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "asset_php_proto", + deps = [":asset_proto"], +) + +php_grpc_library( + name = "asset_php_grpc", + srcs = [":asset_proto"], + deps = [":asset_php_proto"], +) + +php_gapic_library( + name = "asset_php_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p4beta1", + service_yaml = "cloudasset_v1p4beta1.yaml", + deps = [ + ":asset_php_grpc", + ":asset_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-asset-v1p4beta1-php", + deps = [ + ":asset_php_gapic", + ":asset_php_grpc", + ":asset_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "asset_nodejs_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p4beta1", + service_yaml = "cloudasset_v1p4beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "asset-v1p4beta1-nodejs", + deps = [ + ":asset_nodejs_gapic", + ":asset_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "asset_ruby_proto", + deps = [":asset_proto"], +) + +ruby_grpc_library( + name = "asset_ruby_grpc", + srcs = [":asset_proto"], + deps = [":asset_ruby_proto"], +) + +ruby_gapic_library( + name = "asset_ruby_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p4beta1", + service_yaml = "cloudasset_v1p4beta1.yaml", + deps = [ + ":asset_ruby_grpc", + ":asset_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-asset-v1p4beta1-ruby", + deps = [ + ":asset_ruby_gapic", + ":asset_ruby_grpc", + ":asset_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "asset_csharp_proto", + deps = [":asset_proto"], +) + +csharp_grpc_library( + name = "asset_csharp_grpc", + srcs = [":asset_proto"], + deps = [":asset_csharp_proto"], +) + +csharp_gapic_library( + name = "asset_csharp_gapic", + src = ":asset_proto_with_info", + gapic_yaml = "cloudasset_gapic.yaml", + package = "google.cloud.asset.v1p4beta1", + service_yaml = "cloudasset_v1p4beta1.yaml", + deps = [ + ":asset_csharp_grpc", + ":asset_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-asset-v1p4beta1-csharp", + deps = [ + ":asset_csharp_gapic", + ":asset_csharp_grpc", + ":asset_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/asset/v1p4beta1/asset_service.proto b/google/cloud/asset/v1p4beta1/asset_service.proto new file mode 100644 index 000000000..db60941a5 --- /dev/null +++ b/google/cloud/asset/v1p4beta1/asset_service.proto @@ -0,0 +1,343 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.asset.v1p4beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/asset/v1p4beta1/assets.proto"; +import "google/iam/v1/policy.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/api/client.proto"; + +option csharp_namespace = "Google.Cloud.Asset.V1P4Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p4beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetServiceProto"; +option java_package = "com.google.cloud.asset.v1p4beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p4beta1"; + +// Asset service definition. +service AssetService { + option (google.api.default_host) = "cloudasset.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Analyzes IAM policies based on the specified request. Returns + // a list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] matching the request. + rpc AnalyzeIamPolicy(AnalyzeIamPolicyRequest) returns (AnalyzeIamPolicyResponse) { + option (google.api.http) = { + get: "/v1p4beta1/{analysis_query.parent=*/*}:analyzeIamPolicy" + }; + } + + // Exports IAM policy analysis based on the specified request. This API + // implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you to keep + // track of the export. The metadata contains the request to help callers to + // map responses to requests. + rpc ExportIamPolicyAnalysis(ExportIamPolicyAnalysisRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p4beta1/{analysis_query.parent=*/*}:exportIamPolicyAnalysis" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse" + metadata_type: "google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest" + }; + } +} + +// IAM policy analysis query message. +message IamPolicyAnalysisQuery { + // Specifies the resource to analyze for access policies, which may be set + // directly on the resource, or on ancestors such as organizations, folders or + // projects. At least one of [ResourceSelector][google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector], [IdentitySelector][google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector] or + // [AccessSelector][google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector] must be specified in a request. + message ResourceSelector { + // Required. The [full resource + // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // . + string full_resource_name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Specifies an identity for which to determine resource access, based on + // roles assigned either directly to them or to the groups they belong to, + // directly or indirectly. + message IdentitySelector { + // Required. The identity appear in the form of members in + // [IAM policy + // binding](https://cloud.google.com/iam/reference/rest/v1/Binding). + string identity = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Specifies roles and/or permissions to analyze, to determine both the + // identities possessing them and the resources they control. If multiple + // values are specified, results will include identities and resources + // matching any of them. + message AccessSelector { + // Optional. The roles to appear in result. + repeated string roles = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The permissions to appear in result. + repeated string permissions = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The relative name of the root asset. Only resources and IAM policies within + // the parent will be analyzed. This can only be an organization number (such + // as "organizations/123") or a folder number (such as "folders/123"). + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Specifies a resource for analysis. Leaving it empty means ANY. + ResourceSelector resource_selector = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies an identity for analysis. Leaving it empty means ANY. + IdentitySelector identity_selector = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies roles or permissions for analysis. Leaving it empty + // means ANY. + AccessSelector access_selector = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request message for [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1p4beta1.AssetService.AnalyzeIamPolicy]. +message AnalyzeIamPolicyRequest { + // Contains request options. + message Options { + // Optional. If true, the identities section of the result will expand any + // Google groups appearing in an IAM policy binding. + // + // If [identity_selector][] is specified, the identity in the result will + // be determined by the selector, and this flag will have no effect. + // + // Default is false. + bool expand_groups = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the access section of result will expand any roles + // appearing in IAM policy bindings to include their permissions. + // + // If [access_selector][] is specified, the access section of the result + // will be determined by the selector, and this flag will have no effect. + // + // Default is false. + bool expand_roles = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the resource section of the result will expand any + // resource attached to an IAM policy to include resources lower in the + // resource hierarchy. + // + // For example, if the request analyzes for which resources user A has + // permission P, and the results include an IAM policy with P on a GCP + // folder, the results will also include resources in that folder with + // permission P. + // + // If [resource_selector][] is specified, the resource section of the result + // will be determined by the selector, and this flag will have no effect. + // Default is false. + bool expand_resources = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the result will output resource edges, starting + // from the policy attached resource, to any expanded resources. + // Default is false. + bool output_resource_edges = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the result will output group identity edges, starting + // from the binding's group members, to any expanded identities. + // Default is false. + bool output_group_edges = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the response will include access analysis from identities to + // resources via service account impersonation. This is a very expensive + // operation, because many derived queries will be executed. We highly + // recommend you use ExportIamPolicyAnalysis rpc instead. + // + // For example, if the request analyzes for which resources user A has + // permission P, and there's an IAM policy states user A has + // iam.serviceAccounts.getAccessToken permission to a service account SA, + // and there's another IAM policy states service account SA has permission P + // to a GCP folder F, then user A potentially has access to the GCP folder + // F. And those advanced analysis results will be included in + // [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. + // + // Another example, if the request analyzes for who has + // permission P to a GCP folder F, and there's an IAM policy states user A + // has iam.serviceAccounts.actAs permission to a service account SA, and + // there's another IAM policy states service account SA has permission P to + // the GCP folder F, then user A potentially has access to the GCP folder + // F. And those advanced analysis results will be included in + // [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. + // + // Default is false. + bool analyze_service_account_impersonation = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Amount of time executable has to complete. See JSON representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json). + // + // If this field is set with a value less than the RPC deadline, and the + // execution of your query hasn't finished in the specified + // execution timeout, you will get a response with partial result. + // Otherwise, your query's execution will continue until the RPC deadline. + // If it's not finished until then, you will get a DEADLINE_EXCEEDED error. + // + // Default is empty. + google.protobuf.Duration execution_timeout = 7 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The request query. + IamPolicyAnalysisQuery analysis_query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The request options. + Options options = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response message for [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1p4beta1.AssetService.AnalyzeIamPolicy]. +message AnalyzeIamPolicyResponse { + // An analysis message to group the query and results. + message IamPolicyAnalysis { + // The analysis query. + IamPolicyAnalysisQuery analysis_query = 1; + + // A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or + // empty if no result is found. + repeated IamPolicyAnalysisResult analysis_results = 2; + + // Represents whether all entries in the [analysis_results][google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results] have been + // fully explored to answer the query. + bool fully_explored = 3; + } + + // The main analysis that matches the original request. + IamPolicyAnalysis main_analysis = 1; + + // The service account impersonation analysis if + // [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is + // enabled. + repeated IamPolicyAnalysis service_account_impersonation_analysis = 2; + + // Represents whether all entries in the [main_analysis][google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.main_analysis] and + // [service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis] have been fully explored to + // answer the query in the request. + bool fully_explored = 3; + + // A list of non-critical errors happened during the request handling to + // explain why `fully_explored` is false, or empty if no error happened. + repeated IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; +} + +// Output configuration for export IAM policy analysis destination. +message IamPolicyAnalysisOutputConfig { + // A Cloud Storage location. + message GcsDestination { + // Required. The uri of the Cloud Storage object. It's the same uri that is used by + // gsutil. For example: "gs://bucket_name/object_name". See [Viewing and + // Editing Object + // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) + // for more information. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // IAM policy analysis export destination. + oneof destination { + // Destination on Cloud Storage. + GcsDestination gcs_destination = 1; + } +} + +// A request message for [AssetService.ExportIamPolicyAnalysis][google.cloud.asset.v1p4beta1.AssetService.ExportIamPolicyAnalysis]. +message ExportIamPolicyAnalysisRequest { + // Contains request options. + message Options { + // Optional. If true, the identities section of the result will expand any + // Google groups appearing in an IAM policy binding. + // + // If [identity_selector][] is specified, the identity in the result will + // be determined by the selector, and this flag will have no effect. + // + // Default is false. + bool expand_groups = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the access section of result will expand any roles + // appearing in IAM policy bindings to include their permissions. + // + // If [access_selector][] is specified, the access section of the result + // will be determined by the selector, and this flag will have no effect. + // + // Default is false. + bool expand_roles = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the resource section of the result will expand any + // resource attached to an IAM policy to include resources lower in the + // resource hierarchy. + // + // For example, if the request analyzes for which resources user A has + // permission P, and the results include an IAM policy with P on a GCP + // folder, the results will also include resources in that folder with + // permission P. + // + // If [resource_selector][] is specified, the resource section of the result + // will be determined by the selector, and this flag will have no effect. + // Default is false. + bool expand_resources = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the result will output resource edges, starting + // from the policy attached resource, to any expanded resources. + // Default is false. + bool output_resource_edges = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the result will output group identity edges, starting + // from the binding's group members, to any expanded identities. + // Default is false. + bool output_group_edges = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the response will include access analysis from identities to + // resources via service account impersonation. This is a very expensive + // operation, because many derived queries will be executed. + // + // For example, if the request analyzes for which resources user A has + // permission P, and there's an IAM policy states user A has + // iam.serviceAccounts.getAccessToken permission to a service account SA, + // and there's another IAM policy states service account SA has permission P + // to a GCP folder F, then user A potentially has access to the GCP folder + // F. And those advanced analysis results will be included in + // [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. + // + // Another example, if the request analyzes for who has + // permission P to a GCP folder F, and there's an IAM policy states user A + // has iam.serviceAccounts.actAs permission to a service account SA, and + // there's another IAM policy states service account SA has permission P to + // the GCP folder F, then user A potentially has access to the GCP folder + // F. And those advanced analysis results will be included in + // [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. + // + // Default is false. + bool analyze_service_account_impersonation = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The request query. + IamPolicyAnalysisQuery analysis_query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The request options. + Options options = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Output configuration indicating where the results will be output to. + IamPolicyAnalysisOutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The export IAM policy analysis response. This message is returned by the +// [google.longrunning.Operations.GetOperation][] method in the returned +// [google.longrunning.Operation.response][] field. +message ExportIamPolicyAnalysisResponse { + // Output configuration indicating where the results were output to. + IamPolicyAnalysisOutputConfig output_config = 1; +} diff --git a/google/cloud/asset/v1p4beta1/assets.proto b/google/cloud/asset/v1p4beta1/assets.proto new file mode 100644 index 000000000..0d7c5e055 --- /dev/null +++ b/google/cloud/asset/v1p4beta1/assets.proto @@ -0,0 +1,167 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.asset.v1p4beta1; + +import "google/iam/v1/policy.proto"; +import "google/rpc/code.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Asset.V1P4Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p4beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetProto"; +option java_package = "com.google.cloud.asset.v1p4beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p4beta1"; + +// IAM Policy analysis result, consisting of one IAM policy binding and derived +// access control lists. +message IamPolicyAnalysisResult { + // Represents analysis state of each node in the result graph or non-critical + // errors in the response. + message AnalysisState { + // The Google standard error code that best describes the state. + // For example: + // - OK means the node has been successfully explored; + // - PERMISSION_DENIED means an access denied error is encountered; + // - DEADLINE_EXCEEDED means the node hasn't been explored in time; + google.rpc.Code code = 1; + + // The human-readable description of the cause of failure. + string cause = 2; + } + + // A GCP resource that appears in an access control list. + message Resource { + // The [full resource name](https://aip.dev/122#full-resource-names). + string full_resource_name = 1; + + // The analysis state of this resource node. + AnalysisState analysis_state = 2; + } + + // A role or permission that appears in an access control list. + message Access { + oneof oneof_access { + // The role. + string role = 1; + + // The permission. + string permission = 2; + } + + // The analysis state of this access node. + AnalysisState analysis_state = 3; + } + + // A directional edge. + message Edge { + // The source node of the edge. + string source_node = 1; + + // The target node of the edge. + string target_node = 2; + } + + // An identity that appears in an access control list. + message Identity { + // The identity name in any form of members appear in + // [IAM policy + // binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such + // as: + // - user:foo@google.com + // - group:group1@google.com + // - serviceAccount:s1@prj1.iam.gserviceaccount.com + // - projectOwner:some_project_id + // - domain:google.com + // - allUsers + // - etc. + string name = 1; + + // The analysis state of this identity node. + AnalysisState analysis_state = 2; + } + + // An access control list, derived from the above IAM policy binding, which + // contains a set of resources and accesses. May include one + // item from each set to compose an access control entry. + // + // NOTICE that there could be multiple access control lists for one IAM policy + // binding. The access control lists are created based on resource and access + // combinations. + // + // For example, assume we have the following cases in one IAM policy binding: + // - Permission P1 and P2 apply to resource R1 and R2; + // - Permission P3 applies to resource R2 and R3; + // + // This will result in the following access control lists: + // - AccessControlList 1: [R1, R2], [P1, P2] + // - AccessControlList 2: [R2, R3], [P3] + message AccessControlList { + // The resources that match one of the following conditions: + // - The resource_selector, if it is specified in request; + // - Otherwise, resources reachable from the policy attached resource. + repeated Resource resources = 1; + + // The accesses that match one of the following conditions: + // - The access_selector, if it is specified in request; + // - Otherwise, access specifiers reachable from the policy binding's role. + repeated Access accesses = 2; + + // Resource edges of the graph starting from the policy attached + // resource to any descendant resources. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains + // the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.target_node] + // contains the full resource name of a child resource. This field is + // present only if the output_resource_edges option is enabled in request. + repeated Edge resource_edges = 3; + } + + message IdentityList { + // Only the identities that match one of the following conditions will be + // presented: + // - The identity_selector, if it is specified in request; + // - Otherwise, identities reachable from the policy binding's members. + repeated Identity identities = 1; + + // Group identity edges of the graph starting from the binding's + // group members to any node of the [identities][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] + // contains a group, such as "group:parent@google.com". The + // [Edge.target_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.target_node] contains a member of the group, + // such as "group:child@google.com" or "user:foo@google.com". + // This field is present only if the output_group_edges option is enabled in + // request. + repeated Edge group_edges = 2; + } + + // The full name of the resource to which the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] policy attaches. + string attached_resource_full_name = 1; + + // The Cloud IAM policy binding under analysis. + google.iam.v1.Binding iam_binding = 2; + + // The access control lists derived from the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or + // potentially match resource and access selectors specified in the request. + repeated AccessControlList access_control_lists = 3; + + // The identity list derived from members of the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or + // potentially match identity selector specified in the request. + IdentityList identity_list = 4; + + // Represents whether all nodes in the transitive closure of the + // [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] node have been explored. + bool fully_explored = 5; +} diff --git a/google/cloud/asset/v1p4beta1/cloudasset_gapic.legacy.yaml b/google/cloud/asset/v1p4beta1/cloudasset_gapic.legacy.yaml new file mode 100644 index 000000000..e57332c63 --- /dev/null +++ b/google/cloud/asset/v1p4beta1/cloudasset_gapic.legacy.yaml @@ -0,0 +1,117 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.asset.v1p4beta1 + python: + package_name: google.cloud.asset_v1p4beta1.gapic + go: + package_name: cloud.google.com/go/asset/apiv1p4beta1 + csharp: + package_name: Google.Cloud.Asset.V1p2beta1 + ruby: + package_name: Google::Cloud::Asset::V1p2beta1 + php: + package_name: Google\Cloud\Asset\V1p2beta1 + nodejs: + package_name: asset.v1p4beta1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.asset.v1p4beta1.AssetService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: AnalyzeIamPolicy + required_fields: + - analysis_query + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 300000 + - name: ExportIamPolicyAnalysis + required_fields: + - analysis_query + - output_config + retry_codes_name: non_idempotent + retry_params_name: default + long_running: + return_type: google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse + metadata_type: google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 300000 diff --git a/google/cloud/asset/v1p4beta1/cloudasset_gapic.yaml b/google/cloud/asset/v1p4beta1/cloudasset_gapic.yaml new file mode 100644 index 000000000..4757e0a34 --- /dev/null +++ b/google/cloud/asset/v1p4beta1/cloudasset_gapic.yaml @@ -0,0 +1,29 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.asset.v1p4beta1 + python: + package_name: google.cloud.asset_v1p4beta1.gapic + go: + package_name: cloud.google.com/go/asset/apiv1p4beta1 + csharp: + package_name: Google.Cloud.Asset.V1p2beta1 + ruby: + package_name: Google::Cloud::Asset::V1p2beta1 + php: + package_name: Google\Cloud\Asset\V1p2beta1 + nodejs: + package_name: asset.v1p4beta1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.asset.v1p4beta1.AssetService + methods: + - name: ExportIamPolicyAnalysis + long_running: + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 diff --git a/google/cloud/asset/v1p4beta1/cloudasset_grpc_service_config.json b/google/cloud/asset/v1p4beta1/cloudasset_grpc_service_config.json new file mode 100644 index 000000000..95f62b468 --- /dev/null +++ b/google/cloud/asset/v1p4beta1/cloudasset_grpc_service_config.json @@ -0,0 +1,30 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.asset.v1p4beta1.AssetService", + "method": "ExportIamPolicyAnalysis" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.asset.v1p4beta1.AssetService", + "method": "AnalyzeIamPolicy" + } + ], + "timeout": "300s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/asset/v1p4beta1/cloudasset_v1p4beta1.yaml b/google/cloud/asset/v1p4beta1/cloudasset_v1p4beta1.yaml new file mode 100644 index 000000000..fe6be3970 --- /dev/null +++ b/google/cloud/asset/v1p4beta1/cloudasset_v1p4beta1.yaml @@ -0,0 +1,44 @@ +type: google.api.Service +config_version: 3 +name: cloudasset.googleapis.com +title: Cloud Asset API + +apis: +- name: google.cloud.asset.v1p4beta1.AssetService + +documentation: + summary: The cloud asset API manages the history and inventory of cloud resources. + overview: |- + # Cloud Asset API + + The Cloud Asset API keeps a history of Google Cloud Platform (GCP) asset + metadata, and allows GCP users to download a dump of all asset metadata + for the resource types listed below within an organization or a project at + a given timestamp. + + Read more documents here: + https://cloud.google.com/asset-inventory/docs + +backend: + rules: + - selector: google.cloud.asset.v1p4beta1.AssetService.AnalyzeIamPolicy + deadline: 600.0 + - selector: google.cloud.asset.v1p4beta1.AssetService.ExportIamPolicyAnalysis + deadline: 600.0 + - selector: google.longrunning.Operations.GetOperation + deadline: 60.0 + +authentication: + rules: + - selector: google.cloud.asset.v1p4beta1.AssetService.AnalyzeIamPolicy + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.asset.v1p4beta1.AssetService.ExportIamPolicyAnalysis + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.longrunning.Operations.GetOperation + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/automl/BUILD.bazel b/google/cloud/automl/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/cloud/automl/BUILD.bazel +++ b/google/cloud/automl/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/automl/artman_automl_v1.yaml b/google/cloud/automl/artman_automl_v1.yaml new file mode 100644 index 000000000..115e73eef --- /dev/null +++ b/google/cloud/automl/artman_automl_v1.yaml @@ -0,0 +1,34 @@ +common: + api_name: automl + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1 + service_yaml: automl_v1.yaml + gapic_yaml: v1/automl_gapic.yaml +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: php_gapic + type: GAPIC + language: PHP +- name: go_gapic + type: GAPIC + language: GO +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: csharp_gapic + type: GAPIC + language: CSHARP diff --git a/google/cloud/automl/automl_v1.yaml b/google/cloud/automl/automl_v1.yaml new file mode 100644 index 000000000..7f890c92e --- /dev/null +++ b/google/cloud/automl/automl_v1.yaml @@ -0,0 +1,117 @@ +type: google.api.Service +config_version: 3 +name: automl.googleapis.com +title: Cloud AutoML API + +apis: +- name: google.cloud.automl.v1.AutoMl +- name: google.cloud.automl.v1.PredictionService + +types: +- name: google.cloud.automl.v1.OperationMetadata +- name: google.cloud.automl.v1.BatchPredictResult + +documentation: + summary: |- + Train high-quality custom machine learning models with minimum effort and + machine learning expertise. + overview: |- + Cloud AutoML is a suite of machine learning products that enables developers + with limited machine learning expertise to train high-quality models + specific to their business needs, by leveraging Google’s state-of-the-art + transfer learning, and Neural Architecture Search technology. + +backend: + rules: + - selector: google.longrunning.Operations.ListOperations + deadline: 50.0 + - selector: google.longrunning.Operations.GetOperation + deadline: 5.0 + - selector: google.longrunning.Operations.DeleteOperation + deadline: 5.0 + - selector: google.longrunning.Operations.CancelOperation + deadline: 5.0 + - selector: google.cloud.automl.v1.PredictionService.Predict + deadline: 60.0 + - selector: google.cloud.automl.v1.PredictionService.BatchPredict + deadline: 20.0 + - selector: google.cloud.automl.v1.AutoMl.CreateDataset + deadline: 5.0 + - selector: google.cloud.automl.v1.AutoMl.GetDataset + deadline: 5.0 + - selector: google.cloud.automl.v1.AutoMl.ListDatasets + deadline: 50.0 + - selector: google.cloud.automl.v1.AutoMl.UpdateDataset + deadline: 5.0 + - selector: google.cloud.automl.v1.AutoMl.DeleteDataset + deadline: 5.0 + - selector: google.cloud.automl.v1.AutoMl.ImportData + deadline: 20.0 + - selector: google.cloud.automl.v1.AutoMl.ExportData + deadline: 5.0 + - selector: google.cloud.automl.v1.AutoMl.GetAnnotationSpec + deadline: 5.0 + - selector: google.cloud.automl.v1.AutoMl.CreateModel + deadline: 20.0 + - selector: google.cloud.automl.v1.AutoMl.GetModel + deadline: 5.0 + - selector: google.cloud.automl.v1.AutoMl.UpdateModel + deadline: 5.0 + - selector: google.cloud.automl.v1.AutoMl.ListModels + deadline: 50.0 + - selector: google.cloud.automl.v1.AutoMl.DeleteModel + deadline: 5.0 + - selector: google.cloud.automl.v1.AutoMl.DeployModel + deadline: 5.0 + - selector: google.cloud.automl.v1.AutoMl.UndeployModel + deadline: 5.0 + - selector: google.cloud.automl.v1.AutoMl.ExportModel + deadline: 5.0 + - selector: google.cloud.automl.v1.AutoMl.GetModelEvaluation + deadline: 5.0 + - selector: google.cloud.automl.v1.AutoMl.ListModelEvaluations + deadline: 50.0 + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + deadline: 5.0 + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + deadline: 5.0 + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + deadline: 5.0 + +http: + rules: + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=projects/*/locations/*}/operations' + + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=projects/*/locations/*/operations/*}' + + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=projects/*/locations/*/operations/*}' + + - selector: google.longrunning.Operations.CancelOperation + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel' + body: '*' + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + post: '/v1/{resource=projects/*/locations/*/datasets/*}:setIamPolicy' + body: '*' + additional_bindings: + - post: '/v1/{resource=projects/*/locations/*/models/*}:setIamPolicy' + body: '*' + + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + get: '/v1/{resource=projects/*/locations/*/datasets/*}:getIamPolicy' + additional_bindings: + - get: '/v1/{resource=projects/*/locations/*/models/*}:getIamPolicy' + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + post: '/v1/{resource=projects/*/locations/*/**}:testIamPermissions' + body: '*' + +authentication: + rules: + - selector: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/automl/v1/BUILD.bazel b/google/cloud/automl/v1/BUILD.bazel new file mode 100644 index 000000000..0f849c873 --- /dev/null +++ b/google/cloud/automl/v1/BUILD.bazel @@ -0,0 +1,400 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "automl_proto", + srcs = [ + "annotation_payload.proto", + "annotation_spec.proto", + "classification.proto", + "data_items.proto", + "dataset.proto", + "detection.proto", + "geometry.proto", + "image.proto", + "io.proto", + "model.proto", + "model_evaluation.proto", + "operations.proto", + "prediction_service.proto", + "service.proto", + "text.proto", + "text_extraction.proto", + "text_segment.proto", + "text_sentiment.proto", + "translation.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "automl_proto_with_info", + deps = [ + ":automl_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "automl_java_proto", + deps = [":automl_proto"], +) + +java_grpc_library( + name = "automl_java_grpc", + srcs = [":automl_proto"], + deps = [":automl_java_proto"], +) + +java_gapic_library( + name = "automl_java_gapic", + src = ":automl_proto_with_info", + gapic_yaml = "automl_gapic.yaml", + package = "google.cloud.automl.v1", + service_yaml = "automl_v1.yaml", + test_deps = [ + ":automl_java_grpc", + ], + deps = [ + ":automl_java_proto", + ], +) + +java_gapic_test( + name = "automl_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.automl.v1.AutoMlClientTest", + "com.google.cloud.automl.v1.PredictionServiceClientTest", + ], + runtime_deps = [":automl_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-automl-v1-java", + deps = [ + ":automl_java_gapic", + ":automl_java_grpc", + ":automl_java_proto", + ":automl_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "automl_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/automl/v1", + protos = [":automl_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + "//google/rpc:status_go_proto", + ], +) + +go_gapic_library( + name = "automl_go_gapic", + srcs = [":automl_proto_with_info"], + grpc_service_config = "automl_grpc_service_config.json", + importpath = "cloud.google.com/go/automl/apiv1;automl", + service_yaml = "automl_v1.yaml", + deps = [ + ":automl_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:any_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + "@io_bazel_rules_go//proto/wkt:struct_go_proto", + ], +) + +go_test( + name = "automl_go_gapic_test", + srcs = [":automl_go_gapic_srcjar_test"], + embed = [":automl_go_gapic"], + importpath = "cloud.google.com/go/automl/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-automl-v1-go", + deps = [ + ":automl_go_gapic", + ":automl_go_gapic_srcjar-test.srcjar", + ":automl_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "automl_moved_proto", + srcs = [":automl_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "automl_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":automl_moved_proto"], +) + +py_grpc_library( + name = "automl_py_grpc", + srcs = [":automl_moved_proto"], + deps = [":automl_py_proto"], +) + +py_gapic_library( + name = "automl_py_gapic", + src = ":automl_proto_with_info", + gapic_yaml = "automl_gapic.yaml", + package = "google.cloud.automl.v1", + service_yaml = "automl_v1.yaml", + deps = [ + ":automl_py_grpc", + ":automl_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "automl-v1-py", + deps = [ + ":automl_py_gapic", + ":automl_py_grpc", + ":automl_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "automl_php_proto", + deps = [":automl_proto"], +) + +php_grpc_library( + name = "automl_php_grpc", + srcs = [":automl_proto"], + deps = [":automl_php_proto"], +) + +php_gapic_library( + name = "automl_php_gapic", + src = ":automl_proto_with_info", + gapic_yaml = "automl_gapic.yaml", + package = "google.cloud.automl.v1", + service_yaml = "automl_v1.yaml", + deps = [ + ":automl_php_grpc", + ":automl_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-automl-v1-php", + deps = [ + ":automl_php_gapic", + ":automl_php_grpc", + ":automl_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "automl_nodejs_gapic", + src = ":automl_proto_with_info", + gapic_yaml = "automl_gapic.yaml", + package = "google.cloud.automl.v1", + service_yaml = "automl_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "automl-v1-nodejs", + deps = [ + ":automl_nodejs_gapic", + ":automl_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "automl_ruby_proto", + deps = [":automl_proto"], +) + +ruby_grpc_library( + name = "automl_ruby_grpc", + srcs = [":automl_proto"], + deps = [":automl_ruby_proto"], +) + +ruby_gapic_library( + name = "automl_ruby_gapic", + src = ":automl_proto_with_info", + gapic_yaml = "automl_gapic.yaml", + package = "google.cloud.automl.v1", + service_yaml = "automl_v1.yaml", + deps = [ + ":automl_ruby_grpc", + ":automl_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-automl-v1-ruby", + deps = [ + ":automl_ruby_gapic", + ":automl_ruby_grpc", + ":automl_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "automl_csharp_proto", + deps = [":automl_proto"], +) + +csharp_grpc_library( + name = "automl_csharp_grpc", + srcs = [":automl_proto"], + deps = [":automl_csharp_proto"], +) + +csharp_gapic_library( + name = "automl_csharp_gapic", + src = ":automl_proto_with_info", + gapic_yaml = "automl_gapic.yaml", + package = "google.cloud.automl.v1", + service_yaml = "automl_v1.yaml", + deps = [ + ":automl_csharp_grpc", + ":automl_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-automl-v1-csharp", + deps = [ + ":automl_csharp_gapic", + ":automl_csharp_grpc", + ":automl_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/automl/v1/annotation_payload.proto b/google/cloud/automl/v1/annotation_payload.proto new file mode 100644 index 000000000..a81feaf10 --- /dev/null +++ b/google/cloud/automl/v1/annotation_payload.proto @@ -0,0 +1,67 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/cloud/automl/v1/classification.proto"; +import "google/cloud/automl/v1/detection.proto"; +import "google/cloud/automl/v1/text_extraction.proto"; +import "google/cloud/automl/v1/text_sentiment.proto"; +import "google/cloud/automl/v1/translation.proto"; +import "google/protobuf/any.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Contains annotation information that is relevant to AutoML. +message AnnotationPayload { + // Output only . Additional information about the annotation + // specific to the AutoML domain. + oneof detail { + // Annotation details for translation. + TranslationAnnotation translation = 2; + + // Annotation details for content or image classification. + ClassificationAnnotation classification = 3; + + // Annotation details for image object detection. + ImageObjectDetectionAnnotation image_object_detection = 4; + + // Annotation details for text extraction. + TextExtractionAnnotation text_extraction = 6; + + // Annotation details for text sentiment. + TextSentimentAnnotation text_sentiment = 7; + } + + // Output only . The resource ID of the annotation spec that + // this annotation pertains to. The annotation spec comes from either an + // ancestor dataset, or the dataset that was used to train the model in use. + string annotation_spec_id = 1; + + // Output only. The value of + // [display_name][google.cloud.automl.v1.AnnotationSpec.display_name] + // when the model was trained. Because this field returns a value at model + // training time, for different models trained using the same dataset, the + // returned value could be different as model owner could update the + // `display_name` between any two model training. + string display_name = 5; +} diff --git a/google/cloud/automl/v1/annotation_spec.proto b/google/cloud/automl/v1/annotation_spec.proto new file mode 100644 index 000000000..9eb61579e --- /dev/null +++ b/google/cloud/automl/v1/annotation_spec.proto @@ -0,0 +1,49 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// A definition of an annotation spec. +message AnnotationSpec { + option (google.api.resource) = { + type: "automl.googleapis.com/AnnotationSpec" + pattern: "projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}" + }; + + // Output only. Resource name of the annotation spec. + // Form: + // + // 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}' + string name = 1; + + // Required. The name of the annotation spec to show in the interface. The name can be + // up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. + string display_name = 2; + + // Output only. The number of examples in the parent dataset + // labeled by the annotation spec. + int32 example_count = 9; +} diff --git a/google/cloud/automl/v1/automl_gapic.legacy.yaml b/google/cloud/automl/v1/automl_gapic.legacy.yaml new file mode 100644 index 000000000..71da5602d --- /dev/null +++ b/google/cloud/automl/v1/automl_gapic.legacy.yaml @@ -0,0 +1,612 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.automl.v1 + python: + package_name: google.cloud.automl_v1.gapic + go: + package_name: cloud.google.com/go/automl/apiv1 + release_level: GA + csharp: + package_name: Google.Cloud.AutoML.V1 + ruby: + package_name: Google::Cloud::AutoML::V1 + php: + package_name: Google\Cloud\AutoMl\V1 + nodejs: + package_name: automl.v1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.automl.v1.AutoMl + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/datasets/{dataset} + entity_name: dataset + - name_pattern: projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec} + entity_name: annotation_spec + - name_pattern: projects/{project}/locations/{location}/models/{model} + entity_name: model + - name_pattern: projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation} + entity_name: model_evaluation + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateDataset + flattening: + groups: + - parameters: + - parent + - dataset + required_fields: + - parent + - dataset + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.cloud.automl.v1.Dataset + metadata_type: google.cloud.automl.v1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + - name: UpdateDataset + flattening: + groups: + - parameters: + - dataset + - update_mask + required_fields: + - dataset + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + dataset.name: dataset + timeout_millis: 5000 + - name: GetDataset + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: dataset + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + - name: ListDatasets + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: datasets + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + - name: DeleteDataset + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: dataset + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + - name: ImportData + flattening: + groups: + - parameters: + - name + - input_config + required_fields: + - name + - input_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: dataset + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 3600000 + - name: ExportData + flattening: + groups: + - parameters: + - name + - output_config + required_fields: + - name + - output_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: dataset + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + - name: GetAnnotationSpec + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: annotation_spec + timeout_millis: 5000 + - name: CreateModel + flattening: + groups: + - parameters: + - parent + - model + required_fields: + - parent + - model + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.cloud.automl.v1.Model + metadata_type: google.cloud.automl.v1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + - name: GetModel + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: model + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + - name: UpdateModel + flattening: + groups: + - parameters: + - model + - update_mask + required_fields: + - model + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: model + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + - name: ListModels + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: model + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + - name: DeleteModel + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: model + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + - name: DeployModel + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: model + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 3600000 + - name: UndeployModel + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: model + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 3600000 + - name: ExportModel + required_fields: + - name + - output_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: model + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 5000 + - name: GetModelEvaluation + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: model_evaluation + timeout_millis: 60000 + - name: ListModelEvaluations + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + - filter + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: model_evaluation + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: model + timeout_millis: 60000 +# The fully qualified name of the API interface. +- name: google.cloud.automl.v1.PredictionService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location}/models/{model} + entity_name: model + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: Predict + flattening: + groups: + - parameters: + - name + - payload + - params + required_fields: + - name + - payload + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: model + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: BatchPredict + required_fields: + - name + - input_config + - output_config + flattening: + groups: + - parameters: + - name + - input_config + - output_config + - params + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: model + long_running: + return_type: google.cloud.automl.v1.BatchPredictResult + metadata_type: google.cloud.automl.v1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 86400000 + timeout_millis: 20000 +resource_name_generation: +- message_name: CreateDatasetRequest + field_entity_map: + parent: location +- message_name: UpdateDatasetRequest + field_entity_map: + dataset.name: dataset +- message_name: GetDatasetRequest + field_entity_map: + name: dataset +- message_name: ListDatasetsRequest + field_entity_map: + parent: location +- message_name: DeleteDatasetRequest + field_entity_map: + name: dataset +- message_name: ImportDataRequest + field_entity_map: + name: dataset +- message_name: ExportDataRequest + field_entity_map: + name: dataset +- message_name: GetAnnotationSpecRequest + field_entity_map: + name: annotation_spec +- message_name: CreateModelRequest + field_entity_map: + parent: location +- message_name: GetModelRequest + field_entity_map: + name: model +- message_name: UpdateModelRequest + field_entity_map: + name: model +- message_name: ListModelsRequest + field_entity_map: + parent: location +- message_name: DeleteModelRequest + field_entity_map: + name: model +- message_name: DeployModelRequest + field_entity_map: + name: model +- message_name: UndeployModelRequest + field_entity_map: + name: model +- message_name: ExportModelRequest + field_entity_map: + name: model +- message_name: GetModelEvaluationRequest + field_entity_map: + name: model_evaluation +- message_name: ListModelEvaluationsRequest + field_entity_map: + parent: model +- message_name: PredictRequest + field_entity_map: + name: model +- message_name: BatchPredictRequest + field_entity_map: + name: model diff --git a/google/cloud/automl/v1/automl_gapic.yaml b/google/cloud/automl/v1/automl_gapic.yaml new file mode 100644 index 000000000..8cc635f23 --- /dev/null +++ b/google/cloud/automl/v1/automl_gapic.yaml @@ -0,0 +1,75 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.automl.v1 + python: + package_name: google.cloud.automl_v1.gapic + go: + package_name: cloud.google.com/go/automl/apiv1 + release_level: GA + csharp: + package_name: Google.Cloud.AutoML.V1 + ruby: + package_name: Google::Cloud::AutoML::V1 + php: + package_name: Google\Cloud\AutoMl\V1 + nodejs: + package_name: automl.v1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.automl.v1.AutoMl + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: DeleteDataset + retry_codes_name: idempotent + - name: DeleteModel + retry_codes_name: idempotent +# The fully qualified name of the API interface. +- name: google.cloud.automl.v1.PredictionService diff --git a/google/cloud/automl/v1/automl_grpc_service_config.json b/google/cloud/automl/v1/automl_grpc_service_config.json new file mode 100644 index 000000000..9cd59d2c0 --- /dev/null +++ b/google/cloud/automl/v1/automl_grpc_service_config.json @@ -0,0 +1,109 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "CreateDataset" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "UpdateDataset" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "ImportData" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "ExportData" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "CreateModel" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "UpdateModel" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "DeployModel" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "UndeployModel" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "ExportModel" + } + ], + "timeout": "5s" + }, + { + "name": [ + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "GetDataset" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "ListDatasets" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "DeleteDataset" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "GetAnnotationSpec" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "GetModel" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "ListModels" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "DeleteModel" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "GetModelEvaluation" + }, + { + "service": "google.cloud.automl.v1.AutoMl", + "method": "ListModelEvaluations" + } + ], + "timeout": "5s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.automl.v1.PredictionService", + "method": "Predict" + }, + { + "service": "google.cloud.automl.v1.PredictionService", + "method": "BatchPredict" + } + ], + "timeout": "60s" + } + ] +} diff --git a/google/cloud/automl/v1/automl_v1.yaml b/google/cloud/automl/v1/automl_v1.yaml new file mode 100644 index 000000000..bc75483c3 --- /dev/null +++ b/google/cloud/automl/v1/automl_v1.yaml @@ -0,0 +1,127 @@ +type: google.api.Service +config_version: 3 +name: automl.googleapis.com +title: Cloud AutoML API + +apis: +- name: google.cloud.automl.v1.AutoMl +- name: google.cloud.automl.v1.PredictionService + +types: +- name: google.cloud.automl.v1.BatchPredictResult +- name: google.cloud.automl.v1.OperationMetadata + +documentation: + summary: |- + Train high-quality custom machine learning models with minimum effort and + machine learning expertise. + overview: |- + Cloud AutoML is a suite of machine learning products that enables + developers with limited machine learning expertise to train high-quality + models specific to their business needs, by leveraging Google's + state-of-the-art transfer learning, and Neural Architecture Search + technology. + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + description: |- + Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + description: |- + Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and + PERMISSION_DENIED + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + description: |- + Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + +backend: + rules: + - selector: 'google.cloud.automl.v1.AutoMl.*' + deadline: 5.0 + - selector: google.cloud.automl.v1.AutoMl.CreateModel + deadline: 20.0 + - selector: google.cloud.automl.v1.AutoMl.ImportData + deadline: 20.0 + - selector: google.cloud.automl.v1.AutoMl.ListDatasets + deadline: 50.0 + - selector: google.cloud.automl.v1.AutoMl.ListModelEvaluations + deadline: 50.0 + - selector: google.cloud.automl.v1.AutoMl.ListModels + deadline: 50.0 + - selector: google.cloud.automl.v1.PredictionService.BatchPredict + deadline: 20.0 + - selector: google.cloud.automl.v1.PredictionService.Predict + deadline: 60.0 + - selector: 'google.iam.v1.IAMPolicy.*' + deadline: 5.0 + - selector: 'google.longrunning.Operations.*' + deadline: 5.0 + - selector: google.longrunning.Operations.ListOperations + deadline: 50.0 + - selector: google.longrunning.Operations.WaitOperation + deadline: 300.0 + +http: + rules: + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=projects/*/locations/*}/operations' + + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=projects/*/locations/*/operations/*}' + + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=projects/*/locations/*/operations/*}' + + - selector: google.longrunning.Operations.CancelOperation + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel' + body: '*' + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + post: '/v1/{resource=projects/*/locations/*/datasets/*}:setIamPolicy' + body: '*' + additional_bindings: + - post: '/v1/{resource=projects/*/locations/*/models/*}:setIamPolicy' + body: '*' + + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + get: '/v1/{resource=projects/*/locations/*/datasets/*}:getIamPolicy' + additional_bindings: + - get: '/v1/{resource=projects/*/locations/*/models/*}:getIamPolicy' + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + post: '/v1/{resource=projects/*/locations/*/**}:testIamPermissions' + body: '*' + +authentication: + rules: + - selector: 'google.cloud.automl.v1.AutoMl.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.automl.v1.PredictionService.BatchPredict + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.automl.v1.PredictionService.Predict + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.iam.v1.IAMPolicy.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/automl/v1/classification.proto b/google/cloud/automl/v1/classification.proto new file mode 100644 index 000000000..9213bfde8 --- /dev/null +++ b/google/cloud/automl/v1/classification.proto @@ -0,0 +1,177 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_outer_classname = "ClassificationProto"; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Type of the classification problem. +enum ClassificationType { + // An un-set value of this enum. + CLASSIFICATION_TYPE_UNSPECIFIED = 0; + + // At most one label is allowed per example. + MULTICLASS = 1; + + // Multiple labels are allowed for one example. + MULTILABEL = 2; +} + +// Contains annotation details specific to classification. +message ClassificationAnnotation { + // Output only. A confidence estimate between 0.0 and 1.0. A higher value + // means greater confidence that the annotation is positive. If a user + // approves an annotation as negative or positive, the score value remains + // unchanged. If a user creates an annotation, the score is 0 for negative or + // 1 for positive. + float score = 1; +} + +// Model evaluation metrics for classification problems. +// Note: For Video Classification this metrics only describe quality of the +// Video Classification predictions of "segment_classification" type. +message ClassificationEvaluationMetrics { + // Metrics for a single confidence threshold. + message ConfidenceMetricsEntry { + // Output only. Metrics are computed with an assumption that the model + // never returns predictions with score lower than this value. + float confidence_threshold = 1; + + // Output only. Metrics are computed with an assumption that the model + // always returns at most this many predictions (ordered by their score, + // descendingly), but they all still need to meet the confidence_threshold. + int32 position_threshold = 14; + + // Output only. Recall (True Positive Rate) for the given confidence + // threshold. + float recall = 2; + + // Output only. Precision for the given confidence threshold. + float precision = 3; + + // Output only. False Positive Rate for the given confidence threshold. + float false_positive_rate = 8; + + // Output only. The harmonic mean of recall and precision. + float f1_score = 4; + + // Output only. The Recall (True Positive Rate) when only considering the + // label that has the highest prediction score and not below the confidence + // threshold for each example. + float recall_at1 = 5; + + // Output only. The precision when only considering the label that has the + // highest prediction score and not below the confidence threshold for each + // example. + float precision_at1 = 6; + + // Output only. The False Positive Rate when only considering the label that + // has the highest prediction score and not below the confidence threshold + // for each example. + float false_positive_rate_at1 = 9; + + // Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1]. + float f1_score_at1 = 7; + + // Output only. The number of model created labels that match a ground truth + // label. + int64 true_positive_count = 10; + + // Output only. The number of model created labels that do not match a + // ground truth label. + int64 false_positive_count = 11; + + // Output only. The number of ground truth labels that are not matched + // by a model created label. + int64 false_negative_count = 12; + + // Output only. The number of labels that were not created by the model, + // but if they would, they would not match a ground truth label. + int64 true_negative_count = 13; + } + + // Confusion matrix of the model running the classification. + message ConfusionMatrix { + // Output only. A row in the confusion matrix. + message Row { + // Output only. Value of the specific cell in the confusion matrix. + // The number of values each row has (i.e. the length of the row) is equal + // to the length of the `annotation_spec_id` field or, if that one is not + // populated, length of the [display_name][google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field. + repeated int32 example_count = 1; + } + + // Output only. IDs of the annotation specs used in the confusion matrix. + // For Tables CLASSIFICATION + // + // [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type] + // only list of [annotation_spec_display_name-s][] is populated. + repeated string annotation_spec_id = 1; + + // Output only. Display name of the annotation specs used in the confusion + // matrix, as they were at the moment of the evaluation. For Tables + // CLASSIFICATION + // + // [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type], + // distinct values of the target column at the moment of the model + // evaluation are populated here. + repeated string display_name = 3; + + // Output only. Rows in the confusion matrix. The number of rows is equal to + // the size of `annotation_spec_id`. + // `row[i].example_count[j]` is the number of examples that have ground + // truth of the `annotation_spec_id[i]` and are predicted as + // `annotation_spec_id[j]` by the model being evaluated. + repeated Row row = 2; + } + + // Output only. The Area Under Precision-Recall Curve metric. Micro-averaged + // for the overall evaluation. + float au_prc = 1; + + // Output only. The Area Under Receiver Operating Characteristic curve metric. + // Micro-averaged for the overall evaluation. + float au_roc = 6; + + // Output only. The Log Loss metric. + float log_loss = 7; + + // Output only. Metrics for each confidence_threshold in + // 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and + // position_threshold = INT32_MAX_VALUE. + // ROC and precision-recall curves, and other aggregated metrics are derived + // from them. The confidence metrics entries may also be supplied for + // additional values of position_threshold, but from these no aggregated + // metrics are computed. + repeated ConfidenceMetricsEntry confidence_metrics_entry = 3; + + // Output only. Confusion matrix of the evaluation. + // Only set for MULTICLASS classification problems where number + // of labels is no more than 10. + // Only set for model level evaluation, not for evaluation per label. + ConfusionMatrix confusion_matrix = 4; + + // Output only. The annotation spec ids used for this evaluation. + repeated string annotation_spec_id = 5; +} diff --git a/google/cloud/automl/v1/data_items.proto b/google/cloud/automl/v1/data_items.proto new file mode 100644 index 000000000..63896ba92 --- /dev/null +++ b/google/cloud/automl/v1/data_items.proto @@ -0,0 +1,192 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/cloud/automl/v1/geometry.proto"; +import "google/cloud/automl/v1/io.proto"; +import "google/cloud/automl/v1/text_segment.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// A representation of an image. +// Only images up to 30MB in size are supported. +message Image { + // Input only. The data representing the image. + // For Predict calls [image_bytes][google.cloud.automl.v1.Image.image_bytes] must be set . + oneof data { + // Image content represented as a stream of bytes. + // Note: As with all `bytes` fields, protobuffers use a pure binary + // representation, whereas JSON representations use base64. + bytes image_bytes = 1; + } + + // Output only. HTTP URI to the thumbnail image. + string thumbnail_uri = 4; +} + +// A representation of a text snippet. +message TextSnippet { + // Required. The content of the text snippet as a string. Up to 250000 + // characters long. + string content = 1; + + // Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed + // values are "text/html" and "text/plain". If left blank, the format is + // automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content]. + string mime_type = 2; + + // Output only. HTTP URI where you can download the content. + string content_uri = 4; +} + +// Message that describes dimension of a document. +message DocumentDimensions { + // Unit of the document dimension. + enum DocumentDimensionUnit { + // Should not be used. + DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0; + + // Document dimension is measured in inches. + INCH = 1; + + // Document dimension is measured in centimeters. + CENTIMETER = 2; + + // Document dimension is measured in points. 72 points = 1 inch. + POINT = 3; + } + + // Unit of the dimension. + DocumentDimensionUnit unit = 1; + + // Width value of the document, works together with the unit. + float width = 2; + + // Height value of the document, works together with the unit. + float height = 3; +} + +// A structured text document e.g. a PDF. +message Document { + // Describes the layout information of a [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the document. + message Layout { + // The type of TextSegment in the context of the original document. + enum TextSegmentType { + // Should not be used. + TEXT_SEGMENT_TYPE_UNSPECIFIED = 0; + + // The text segment is a token. e.g. word. + TOKEN = 1; + + // The text segment is a paragraph. + PARAGRAPH = 2; + + // The text segment is a form field. + FORM_FIELD = 3; + + // The text segment is the name part of a form field. It will be treated + // as child of another FORM_FIELD TextSegment if its span is subspan of + // another TextSegment with type FORM_FIELD. + FORM_FIELD_NAME = 4; + + // The text segment is the text content part of a form field. It will be + // treated as child of another FORM_FIELD TextSegment if its span is + // subspan of another TextSegment with type FORM_FIELD. + FORM_FIELD_CONTENTS = 5; + + // The text segment is a whole table, including headers, and all rows. + TABLE = 6; + + // The text segment is a table's headers. It will be treated as child of + // another TABLE TextSegment if its span is subspan of another TextSegment + // with type TABLE. + TABLE_HEADER = 7; + + // The text segment is a row in table. It will be treated as child of + // another TABLE TextSegment if its span is subspan of another TextSegment + // with type TABLE. + TABLE_ROW = 8; + + // The text segment is a cell in table. It will be treated as child of + // another TABLE_ROW TextSegment if its span is subspan of another + // TextSegment with type TABLE_ROW. + TABLE_CELL = 9; + } + + // Text Segment that represents a segment in + // [document_text][google.cloud.automl.v1p1beta.Document.document_text]. + TextSegment text_segment = 1; + + // Page number of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the original document, starts + // from 1. + int32 page_number = 2; + + // The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page. + // Contains exactly 4 + // + // [normalized_vertices][google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices] + // and they are connected by edges in the order provided, which will + // represent a rectangle parallel to the frame. The + // [NormalizedVertex-s][google.cloud.automl.v1p1beta.NormalizedVertex] are + // relative to the page. + // Coordinates are based on top-left as point (0,0). + BoundingPoly bounding_poly = 3; + + // The type of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in document. + TextSegmentType text_segment_type = 4; + } + + // An input config specifying the content of the document. + DocumentInputConfig input_config = 1; + + // The plain text version of this document. + TextSnippet document_text = 2; + + // Describes the layout of the document. + // Sorted by [page_number][]. + repeated Layout layout = 3; + + // The dimensions of the page in the document. + DocumentDimensions document_dimensions = 4; + + // Number of pages in the document. + int32 page_count = 5; +} + +// Example data used for training or prediction. +message ExamplePayload { + // Required. The example data. + oneof payload { + // Example image. + Image image = 1; + + // Example text. + TextSnippet text_snippet = 2; + + // Example document. + Document document = 4; + } +} diff --git a/google/cloud/automl/v1/dataset.proto b/google/cloud/automl/v1/dataset.proto new file mode 100644 index 000000000..2040ec96a --- /dev/null +++ b/google/cloud/automl/v1/dataset.proto @@ -0,0 +1,96 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/resource.proto"; +import "google/cloud/automl/v1/image.proto"; +import "google/cloud/automl/v1/text.proto"; +import "google/cloud/automl/v1/translation.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// A workspace for solving a single, particular machine learning (ML) problem. +// A workspace contains examples that may be annotated. +message Dataset { + option (google.api.resource) = { + type: "automl.googleapis.com/Dataset" + pattern: "projects/{project}/locations/{location}/datasets/{dataset}" + }; + + // Required. + // The dataset metadata that is specific to the problem type. + oneof dataset_metadata { + // Metadata for a dataset used for translation. + TranslationDatasetMetadata translation_dataset_metadata = 23; + + // Metadata for a dataset used for image classification. + ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; + + // Metadata for a dataset used for text classification. + TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; + + // Metadata for a dataset used for image object detection. + ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; + + // Metadata for a dataset used for text extraction. + TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; + + // Metadata for a dataset used for text sentiment. + TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; + } + + // Output only. The resource name of the dataset. + // Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` + string name = 1; + + // Required. The name of the dataset to show in the interface. The name can be + // up to 32 characters long and can consist only of ASCII Latin letters A-Z + // and a-z, underscores + // (_), and ASCII digits 0-9. + string display_name = 2; + + // User-provided description of the dataset. The description can be up to + // 25000 characters long. + string description = 3; + + // Output only. The number of examples in the dataset. + int32 example_count = 21; + + // Output only. Timestamp when this dataset was created. + google.protobuf.Timestamp create_time = 14; + + // Used to perform consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + string etag = 17; + + // Optional. The labels with user-defined metadata to organize your dataset. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // Label values are optional. Label keys must start with a letter. + // + // See https://goo.gl/xmQnxf for more information on and examples of labels. + map labels = 39; +} diff --git a/google/cloud/automl/v1/detection.proto b/google/cloud/automl/v1/detection.proto new file mode 100644 index 000000000..13fe5935f --- /dev/null +++ b/google/cloud/automl/v1/detection.proto @@ -0,0 +1,87 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/cloud/automl/v1/geometry.proto"; +import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Annotation details for image object detection. +message ImageObjectDetectionAnnotation { + // Output only. The rectangle representing the object location. + BoundingPoly bounding_box = 1; + + // Output only. The confidence that this annotation is positive for the parent example, + // value in [0, 1], higher means higher positivity confidence. + float score = 2; +} + +// Bounding box matching model metrics for a single intersection-over-union +// threshold and multiple label match confidence thresholds. +message BoundingBoxMetricsEntry { + // Metrics for a single confidence threshold. + message ConfidenceMetricsEntry { + // Output only. The confidence threshold value used to compute the metrics. + float confidence_threshold = 1; + + // Output only. Recall under the given confidence threshold. + float recall = 2; + + // Output only. Precision under the given confidence threshold. + float precision = 3; + + // Output only. The harmonic mean of recall and precision. + float f1_score = 4; + } + + // Output only. The intersection-over-union threshold value used to compute + // this metrics entry. + float iou_threshold = 1; + + // Output only. The mean average precision, most often close to au_prc. + float mean_average_precision = 2; + + // Output only. Metrics for each label-match confidence_threshold from + // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is + // derived from them. + repeated ConfidenceMetricsEntry confidence_metrics_entries = 3; +} + +// Model evaluation metrics for image object detection problems. +// Evaluates prediction quality of labeled bounding boxes. +message ImageObjectDetectionEvaluationMetrics { + // Output only. The total number of bounding boxes (i.e. summed over all + // images) the ground truth used to create this evaluation had. + int32 evaluated_bounding_box_count = 1; + + // Output only. The bounding boxes match metrics for each + // Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + // and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + // pair. + repeated BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; + + // Output only. The single metric for bounding boxes evaluation: + // the mean_average_precision averaged over all bounding_box_metrics_entries. + float bounding_box_mean_average_precision = 3; +} diff --git a/google/cloud/automl/v1/geometry.proto b/google/cloud/automl/v1/geometry.proto new file mode 100644 index 000000000..a6d97e805 --- /dev/null +++ b/google/cloud/automl/v1/geometry.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// A vertex represents a 2D point in the image. +// The normalized vertex coordinates are between 0 to 1 fractions relative to +// the original plane (image, video). E.g. if the plane (e.g. whole image) would +// have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would +// be at the position (1, 6) on that plane. +message NormalizedVertex { + // Required. Horizontal coordinate. + float x = 1; + + // Required. Vertical coordinate. + float y = 2; +} + +// A bounding polygon of a detected object on a plane. +// On output both vertices and normalized_vertices are provided. +// The polygon is formed by connecting vertices in the order they are listed. +message BoundingPoly { + // Output only . The bounding polygon normalized vertices. + repeated NormalizedVertex normalized_vertices = 2; +} diff --git a/google/cloud/automl/v1/image.proto b/google/cloud/automl/v1/image.proto new file mode 100644 index 000000000..5269d22c0 --- /dev/null +++ b/google/cloud/automl/v1/image.proto @@ -0,0 +1,206 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/resource.proto"; +import "google/cloud/automl/v1/annotation_spec.proto"; +import "google/cloud/automl/v1/classification.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_outer_classname = "ImageProto"; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Dataset metadata that is specific to image classification. +message ImageClassificationDatasetMetadata { + // Required. Type of the classification problem. + ClassificationType classification_type = 1; +} + +// Dataset metadata specific to image object detection. +message ImageObjectDetectionDatasetMetadata { + +} + +// Model metadata for image classification. +message ImageClassificationModelMetadata { + // Optional. The ID of the `base` model. If it is specified, the new model + // will be created based on the `base` model. Otherwise, the new model will be + // created from scratch. The `base` model must be in the same + // `project` and `location` as the new model to create, and have the same + // `model_type`. + string base_model_id = 1; + + // The train budget of creating this model, expressed in milli node + // hours i.e. 1,000 value in this field means 1 node hour. The actual + // `train_cost` will be equal or less than this value. If further model + // training ceases to provide any improvements, it will stop without using + // full budget and the stop_reason will be `MODEL_CONVERGED`. + // Note, node_hour = actual_hour * number_of_nodes_invovled. + // For model type `cloud`(default), the train budget must be between 8,000 + // and 800,000 milli node hours, inclusive. The default value is 192, 000 + // which represents one day in wall time. For model type + // `mobile-low-latency-1`, `mobile-versatile-1`, `mobile-high-accuracy-1`, + // `mobile-core-ml-low-latency-1`, `mobile-core-ml-versatile-1`, + // `mobile-core-ml-high-accuracy-1`, the train budget must be between 1,000 + // and 100,000 milli node hours, inclusive. The default value is 24, 000 which + // represents one day in wall time. + int64 train_budget_milli_node_hours = 16; + + // Output only. The actual train cost of creating this model, expressed in + // milli node hours, i.e. 1,000 value in this field means 1 node hour. + // Guaranteed to not exceed the train budget. + int64 train_cost_milli_node_hours = 17; + + // Output only. The reason that this create model operation stopped, + // e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. + string stop_reason = 5; + + // Optional. Type of the model. The available values are: + // * `cloud` - Model to be used via prediction calls to AutoML API. + // This is the default value. + // * `mobile-low-latency-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. Expected to have low latency, but + // may have lower prediction quality than other models. + // * `mobile-versatile-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. + // * `mobile-high-accuracy-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. Expected to have a higher + // latency, but should also have a higher prediction quality + // than other models. + // * `mobile-core-ml-low-latency-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile device with Core + // ML afterwards. Expected to have low latency, but may have + // lower prediction quality than other models. + // * `mobile-core-ml-versatile-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile device with Core + // ML afterwards. + // * `mobile-core-ml-high-accuracy-1` - A model that, in addition to + // providing prediction via AutoML API, can also be exported + // (see [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile device with + // Core ML afterwards. Expected to have a higher latency, but + // should also have a higher prediction quality than other + // models. + string model_type = 7; + + // Output only. An approximate number of online prediction QPS that can + // be supported by this model per each node on which it is deployed. + double node_qps = 13; + + // Output only. The number of nodes this model is deployed on. A node is an + // abstraction of a machine resource, which can handle online prediction QPS + // as given in the node_qps field. + int64 node_count = 14; +} + +// Model metadata specific to image object detection. +message ImageObjectDetectionModelMetadata { + // Optional. Type of the model. The available values are: + // * `cloud-high-accuracy-1` - (default) A model to be used via prediction + // calls to AutoML API. Expected to have a higher latency, but + // should also have a higher prediction quality than other + // models. + // * `cloud-low-latency-1` - A model to be used via prediction + // calls to AutoML API. Expected to have low latency, but may + // have lower prediction quality than other models. + // * `mobile-low-latency-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. Expected to have low latency, but + // may have lower prediction quality than other models. + // * `mobile-versatile-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. + // * `mobile-high-accuracy-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. Expected to have a higher + // latency, but should also have a higher prediction quality + // than other models. + string model_type = 1; + + // Output only. The number of nodes this model is deployed on. A node is an + // abstraction of a machine resource, which can handle online prediction QPS + // as given in the qps_per_node field. + int64 node_count = 3; + + // Output only. An approximate number of online prediction QPS that can + // be supported by this model per each node on which it is deployed. + double node_qps = 4; + + // Output only. The reason that this create model operation stopped, + // e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. + string stop_reason = 5; + + // The train budget of creating this model, expressed in milli node + // hours i.e. 1,000 value in this field means 1 node hour. The actual + // `train_cost` will be equal or less than this value. If further model + // training ceases to provide any improvements, it will stop without using + // full budget and the stop_reason will be `MODEL_CONVERGED`. + // Note, node_hour = actual_hour * number_of_nodes_invovled. + // For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, + // the train budget must be between 20,000 and 900,000 milli node hours, + // inclusive. The default value is 216, 000 which represents one day in + // wall time. + // For model type `mobile-low-latency-1`, `mobile-versatile-1`, + // `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, + // `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train + // budget must be between 1,000 and 100,000 milli node hours, inclusive. + // The default value is 24, 000 which represents one day in wall time. + int64 train_budget_milli_node_hours = 6; + + // Output only. The actual train cost of creating this model, expressed in + // milli node hours, i.e. 1,000 value in this field means 1 node hour. + // Guaranteed to not exceed the train budget. + int64 train_cost_milli_node_hours = 7; +} + +// Model deployment metadata specific to Image Classification. +message ImageClassificationModelDeploymentMetadata { + // Input only. The number of nodes to deploy the model on. A node is an + // abstraction of a machine resource, which can handle online prediction QPS + // as given in the model's + // + // [node_qps][google.cloud.automl.v1.ImageClassificationModelMetadata.node_qps]. + // Must be between 1 and 100, inclusive on both ends. + int64 node_count = 1; +} + +// Model deployment metadata specific to Image Object Detection. +message ImageObjectDetectionModelDeploymentMetadata { + // Input only. The number of nodes to deploy the model on. A node is an + // abstraction of a machine resource, which can handle online prediction QPS + // as given in the model's + // + // [qps_per_node][google.cloud.automl.v1.ImageObjectDetectionModelMetadata.qps_per_node]. + // Must be between 1 and 100, inclusive on both ends. + int64 node_count = 1; +} diff --git a/google/cloud/automl/v1/io.proto b/google/cloud/automl/v1/io.proto new file mode 100644 index 000000000..c6ac8a35b --- /dev/null +++ b/google/cloud/automl/v1/io.proto @@ -0,0 +1,1377 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Input configuration for [AutoMl.ImportData][google.cloud.automl.v1.AutoMl.ImportData] action. +// +// The format of input depends on dataset_metadata the Dataset into which +// the import is happening has. As input source the +// [gcs_source][google.cloud.automl.v1.InputConfig.gcs_source] +// is expected, unless specified otherwise. Additionally any input .CSV file +// by itself must be 100MB or smaller, unless specified otherwise. +// If an "example" file (that is, image, video etc.) with identical content +// (even if it had different `GCS_FILE_PATH`) is mentioned multiple times, then +// its label, bounding boxes etc. are appended. The same file should be always +// provided with the same `ML_USE` and `GCS_FILE_PATH`, if it is not, then +// these values are nondeterministically selected from the given ones. +// +// The formats are represented in EBNF with commas being literal and with +// non-terminal symbols defined near the end of this comment. The formats are: +// +//

          AutoML Vision

          +// +// +//
          Classification
          +// +// See [Preparing your training +// data](https://cloud.google.com/vision/automl/docs/prepare) for more +// information. +// +// CSV file(s) with each line in format: +// +// ML_USE,GCS_FILE_PATH,LABEL,LABEL,... +// +// * `ML_USE` - Identifies the data set that the current row (file) applies +// to. +// This value can be one of the following: +// * `TRAIN` - Rows in this file are used to train the model. +// * `TEST` - Rows in this file are used to test the model during training. +// * `UNASSIGNED` - Rows in this file are not categorized. They are +// Automatically divided into train and test data. 80% for training and +// 20% for testing. +// +// * `GCS_FILE_PATH` - The Google Cloud Storage location of an image of up to +// 30MB in size. Supported extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, +// .TIFF, .ICO. +// +// * `LABEL` - A label that identifies the object in the image. +// +// For the `MULTICLASS` classification type, at most one `LABEL` is allowed +// per image. If an image has not yet been labeled, then it should be +// mentioned just once with no `LABEL`. +// +// Some sample rows: +// +// TRAIN,gs://folder/image1.jpg,daisy +// TEST,gs://folder/image2.jpg,dandelion,tulip,rose +// UNASSIGNED,gs://folder/image3.jpg,daisy +// UNASSIGNED,gs://folder/image4.jpg +// +// +//
          Object Detection
          +// See [Preparing your training +// data](https://cloud.google.com/vision/automl/object-detection/docs/prepare) +// for more information. +// +// A CSV file(s) with each line in format: +// +// ML_USE,GCS_FILE_PATH,[LABEL],(BOUNDING_BOX | ,,,,,,,) +// +// * `ML_USE` - Identifies the data set that the current row (file) applies +// to. +// This value can be one of the following: +// * `TRAIN` - Rows in this file are used to train the model. +// * `TEST` - Rows in this file are used to test the model during training. +// * `UNASSIGNED` - Rows in this file are not categorized. They are +// Automatically divided into train and test data. 80% for training and +// 20% for testing. +// +// * `GCS_FILE_PATH` - The Google Cloud Storage location of an image of up to +// 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. Each image +// is assumed to be exhaustively labeled. +// +// * `LABEL` - A label that identifies the object in the image specified by the +// `BOUNDING_BOX`. +// +// * `BOUNDING BOX` - The vertices of an object in the example image. +// The minimum allowed `BOUNDING_BOX` edge length is 0.01, and no more than +// 500 `BOUNDING_BOX` instances per image are allowed (one `BOUNDING_BOX` +// per line). If an image has no looked for objects then it should be +// mentioned just once with no LABEL and the ",,,,,,," in place of the +// `BOUNDING_BOX`. +// +// **Four sample rows:** +// +// TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, +// TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, +// UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 +// TEST,gs://folder/im3.png,,,,,,,,, +//
          +//
          +// +// +//

          AutoML Video Intelligence

          +// +// +//
          Classification
          +// +// See [Preparing your training +// data](https://cloud.google.com/video-intelligence/automl/docs/prepare) for +// more information. +// +// CSV file(s) with each line in format: +// +// ML_USE,GCS_FILE_PATH +// +// For `ML_USE`, do not use `VALIDATE`. +// +// `GCS_FILE_PATH` is the path to another .csv file that describes training +// example for a given `ML_USE`, using the following row format: +// +// GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,) +// +// Here `GCS_FILE_PATH` leads to a video of up to 50GB in size and up +// to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. +// +// `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the +// length of the video, and the end time must be after the start time. Any +// segment of a video which has one or more labels on it, is considered a +// hard negative for all other labels. Any segment with no labels on +// it is considered to be unknown. If a whole video is unknown, then +// it should be mentioned just once with ",," in place of `LABEL, +// TIME_SEGMENT_START,TIME_SEGMENT_END`. +// +// Sample top level CSV file: +// +// TRAIN,gs://folder/train_videos.csv +// TEST,gs://folder/test_videos.csv +// UNASSIGNED,gs://folder/other_videos.csv +// +// Sample rows of a CSV file for a particular ML_USE: +// +// gs://folder/video1.avi,car,120,180.000021 +// gs://folder/video1.avi,bike,150,180.000021 +// gs://folder/vid2.avi,car,0,60.5 +// gs://folder/vid3.avi,,, +// +// +// +//
          Object Tracking
          +// +// See [Preparing your training +// data](/video-intelligence/automl/object-tracking/docs/prepare) for more +// information. +// +// CSV file(s) with each line in format: +// +// ML_USE,GCS_FILE_PATH +// +// For `ML_USE`, do not use `VALIDATE`. +// +// `GCS_FILE_PATH` is the path to another .csv file that describes training +// example for a given `ML_USE`, using the following row format: +// +// GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX +// +// or +// +// GCS_FILE_PATH,,,,,,,,,, +// +// Here `GCS_FILE_PATH` leads to a video of up to 50GB in size and up +// to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. +// Providing `INSTANCE_ID`s can help to obtain a better model. When +// a specific labeled entity leaves the video frame, and shows up +// afterwards it is not required, albeit preferable, that the same +// `INSTANCE_ID` is given to it. +// +// `TIMESTAMP` must be within the length of the video, the +// `BOUNDING_BOX` is assumed to be drawn on the closest video's frame +// to the `TIMESTAMP`. Any mentioned by the `TIMESTAMP` frame is expected +// to be exhaustively labeled and no more than 500 `BOUNDING_BOX`-es per +// frame are allowed. If a whole video is unknown, then it should be +// mentioned just once with ",,,,,,,,,," in place of `LABEL, +// [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX`. +// +// Sample top level CSV file: +// +// TRAIN,gs://folder/train_videos.csv +// TEST,gs://folder/test_videos.csv +// UNASSIGNED,gs://folder/other_videos.csv +// +// Seven sample rows of a CSV file for a particular ML_USE: +// +// gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9 +// gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9 +// gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3 +// gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,, +// gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, +// gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, +// gs://folder/video2.avi,,,,,,,,,,, +//
          +//
          +// +// +//

          AutoML Natural Language

          +// +// +//
          Entity Extraction
          +// +// See [Preparing your training +// data](/natural-language/automl/entity-analysis/docs/prepare) for more +// information. +// +// One or more CSV file(s) with each line in the following format: +// +// ML_USE,GCS_FILE_PATH +// +// * `ML_USE` - Identifies the data set that the current row (file) applies +// to. +// This value can be one of the following: +// * `TRAIN` - Rows in this file are used to train the model. +// * `TEST` - Rows in this file are used to test the model during training. +// * `UNASSIGNED` - Rows in this file are not categorized. They are +// Automatically divided into train and test data. 80% for training and +// 20% for testing.. +// +// * `GCS_FILE_PATH` - a Identifies JSON Lines (.JSONL) file stored in +// Google Cloud Storage that contains in-line text in-line as documents +// for model training. +// +// After the training data set has been determined from the `TRAIN` and +// `UNASSIGNED` CSV files, the training data is divided into train and +// validation data sets. 70% for training and 30% for validation. +// +// For example: +// +// TRAIN,gs://folder/file1.jsonl +// VALIDATE,gs://folder/file2.jsonl +// TEST,gs://folder/file3.jsonl +// +// **In-line JSONL files** +// +// In-line .JSONL files contain, per line, a JSON document that wraps a +// [`text_snippet`][google.cloud.automl.v1.TextSnippet] field followed by +// one or more [`annotations`][google.cloud.automl.v1.AnnotationPayload] +// fields, which have `display_name` and `text_extraction` fields to describe +// the entity from the text snippet. Multiple JSON documents can be separated +// using line breaks (\n). +// +// The supplied text must be annotated exhaustively. For example, if you +// include the text "horse", but do not label it as "animal", +// then "horse" is assumed to not be an "animal". +// +// Any given text snippet content must have 30,000 characters or +// less, and also be UTF-8 NFC encoded. ASCII is accepted as it is +// UTF-8 NFC encoded. +// +// For example: +// +// { +// "text_snippet": { +// "content": "dog car cat" +// }, +// "annotations": [ +// { +// "display_name": "animal", +// "text_extraction": { +// "text_segment": {"start_offset": 0, "end_offset": 2} +// } +// }, +// { +// "display_name": "vehicle", +// "text_extraction": { +// "text_segment": {"start_offset": 4, "end_offset": 6} +// } +// }, +// { +// "display_name": "animal", +// "text_extraction": { +// "text_segment": {"start_offset": 8, "end_offset": 10} +// } +// } +// ] +// }\n +// { +// "text_snippet": { +// "content": "This dog is good." +// }, +// "annotations": [ +// { +// "display_name": "animal", +// "text_extraction": { +// "text_segment": {"start_offset": 5, "end_offset": 7} +// } +// } +// ] +// } +// +// **JSONL files that reference documents** +// +// .JSONL files contain, per line, a JSON document that wraps a +// `input_config` that contains the path to a source document. +// Multiple JSON documents can be separated using line breaks (\n). +// +// Supported document extensions: .PDF, .TIF, .TIFF +// +// For example: +// +// { +// "document": { +// "input_config": { +// "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] +// } +// } +// } +// }\n +// { +// "document": { +// "input_config": { +// "gcs_source": { "input_uris": [ "gs://folder/document2.tif" ] +// } +// } +// } +// } +// +// **In-line JSONL files with document layout information** +// +// **Note:** You can only annotate documents using the UI. The format described +// below applies to annotated documents exported using the UI or `exportData`. +// +// In-line .JSONL files for documents contain, per line, a JSON document +// that wraps a `document` field that provides the textual content of the +// document and the layout information. +// +// For example: +// +// { +// "document": { +// "document_text": { +// "content": "dog car cat" +// } +// "layout": [ +// { +// "text_segment": { +// "start_offset": 0, +// "end_offset": 11, +// }, +// "page_number": 1, +// "bounding_poly": { +// "normalized_vertices": [ +// {"x": 0.1, "y": 0.1}, +// {"x": 0.1, "y": 0.3}, +// {"x": 0.3, "y": 0.3}, +// {"x": 0.3, "y": 0.1}, +// ], +// }, +// "text_segment_type": TOKEN, +// } +// ], +// "document_dimensions": { +// "width": 8.27, +// "height": 11.69, +// "unit": INCH, +// } +// "page_count": 3, +// }, +// "annotations": [ +// { +// "display_name": "animal", +// "text_extraction": { +// "text_segment": {"start_offset": 0, "end_offset": 3} +// } +// }, +// { +// "display_name": "vehicle", +// "text_extraction": { +// "text_segment": {"start_offset": 4, "end_offset": 7} +// } +// }, +// { +// "display_name": "animal", +// "text_extraction": { +// "text_segment": {"start_offset": 8, "end_offset": 11} +// } +// }, +// ], +// +// +// +// +//
          Classification
          +// +// See [Preparing your training +// data](https://cloud.google.com/natural-language/automl/docs/prepare) for more +// information. +// +// One or more CSV file(s) with each line in the following format: +// +// ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... +// +// * `ML_USE` - Identifies the data set that the current row (file) applies +// to. +// This value can be one of the following: +// * `TRAIN` - Rows in this file are used to train the model. +// * `TEST` - Rows in this file are used to test the model during training. +// * `UNASSIGNED` - Rows in this file are not categorized. They are +// Automatically divided into train and test data. 80% for training and +// 20% for testing. +// +// * `TEXT_SNIPPET` and `GCS_FILE_PATH` are distinguished by a pattern. If +// the column content is a valid Google Cloud Storage file path, that is, +// prefixed by "gs://", it is treated as a `GCS_FILE_PATH`. Otherwise, if +// the content is enclosed in double quotes (""), it is treated as a +// `TEXT_SNIPPET`. For `GCS_FILE_PATH`, the path must lead to a +// file with supported extension and UTF-8 encoding, for example, +// "gs://folder/content.txt" AutoML imports the file content +// as a text snippet. For `TEXT_SNIPPET`, AutoML imports the column content +// excluding quotes. In both cases, size of the content must be 10MB or +// less in size. For zip files, the size of each file inside the zip must be +// 10MB or less in size. +// +// For the `MULTICLASS` classification type, at most one `LABEL` is allowed. +// +// The `ML_USE` and `LABEL` columns are optional. +// Supported file extensions: .TXT, .PDF, .TIF, .TIFF, .ZIP +// +// A maximum of 100 unique labels are allowed per CSV row. +// +// Sample rows: +// +// TRAIN,"They have bad food and very rude",RudeService,BadFood +// gs://folder/content.txt,SlowService +// TEST,gs://folder/document.pdf +// VALIDATE,gs://folder/text_files.zip,BadFood +// +// +// +//
          Sentiment Analysis
          +// +// See [Preparing your training +// data](https://cloud.google.com/natural-language/automl/docs/prepare) for more +// information. +// +// CSV file(s) with each line in format: +// +// ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT +// +// * `ML_USE` - Identifies the data set that the current row (file) applies +// to. +// This value can be one of the following: +// * `TRAIN` - Rows in this file are used to train the model. +// * `TEST` - Rows in this file are used to test the model during training. +// * `UNASSIGNED` - Rows in this file are not categorized. They are +// Automatically divided into train and test data. 80% for training and +// 20% for testing. +// +// * `TEXT_SNIPPET` and `GCS_FILE_PATH` are distinguished by a pattern. If +// the column content is a valid Google Cloud Storage file path, that is, +// prefixed by "gs://", it is treated as a `GCS_FILE_PATH`. Otherwise, if +// the content is enclosed in double quotes (""), it is treated as a +// `TEXT_SNIPPET`. For `GCS_FILE_PATH`, the path must lead to a +// file with supported extension and UTF-8 encoding, for example, +// "gs://folder/content.txt" AutoML imports the file content +// as a text snippet. For `TEXT_SNIPPET`, AutoML imports the column content +// excluding quotes. In both cases, size of the content must be 128kB or +// less in size. For zip files, the size of each file inside the zip must be +// 128kB or less in size. +// +// The `ML_USE` and `SENTIMENT` columns are optional. +// Supported file extensions: .TXT, .PDF, .TIF, .TIFF, .ZIP +// +// * `SENTIMENT` - An integer between 0 and +// Dataset.text_sentiment_dataset_metadata.sentiment_max +// (inclusive). Describes the ordinal of the sentiment - higher +// value means a more positive sentiment. All the values are +// completely relative, i.e. neither 0 needs to mean a negative or +// neutral sentiment nor sentiment_max needs to mean a positive one - +// it is just required that 0 is the least positive sentiment +// in the data, and sentiment_max is the most positive one. +// The SENTIMENT shouldn't be confused with "score" or "magnitude" +// from the previous Natural Language Sentiment Analysis API. +// All SENTIMENT values between 0 and sentiment_max must be +// represented in the imported data. On prediction the same 0 to +// sentiment_max range will be used. The difference between +// neighboring sentiment values needs not to be uniform, e.g. 1 and +// 2 may be similar whereas the difference between 2 and 3 may be +// large. +// +// Sample rows: +// +// TRAIN,"@freewrytin this is way too good for your product",2 +// gs://folder/content.txt,3 +// TEST,gs://folder/document.pdf +// VALIDATE,gs://folder/text_files.zip,2 +//
          +//
          +// +// +// +//

          AutoML Tables

          +// +// See [Preparing your training +// data](https://cloud.google.com/automl-tables/docs/prepare) for more +// information. +// +// You can use either +// [gcs_source][google.cloud.automl.v1.InputConfig.gcs_source] or +// [bigquery_source][google.cloud.automl.v1.InputConfig.bigquery_source]. +// All input is concatenated into a +// single +// +// [primary_table_spec_id][google.cloud.automl.v1.TablesDatasetMetadata.primary_table_spec_id] +// +// **For gcs_source:** +// +// CSV file(s), where the first row of the first file is the header, +// containing unique column names. If the first row of a subsequent +// file is the same as the header, then it is also treated as a +// header. All other rows contain values for the corresponding +// columns. +// +// Each .CSV file by itself must be 10GB or smaller, and their total +// size must be 100GB or smaller. +// +// First three sample rows of a CSV file: +//
          +// "Id","First Name","Last Name","Dob","Addresses"
          +//
          +// "1","John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
          +//
          +// "2","Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
          +// 
          +// **For bigquery_source:** +// +// An URI of a BigQuery table. The user data size of the BigQuery +// table must be 100GB or smaller. +// +// An imported table must have between 2 and 1,000 columns, inclusive, +// and between 1000 and 100,000,000 rows, inclusive. There are at most 5 +// import data running in parallel. +// +//
          +//
          +// +// +// **Input field definitions:** +// +// `ML_USE` +// : ("TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED") +// Describes how the given example (file) should be used for model +// training. "UNASSIGNED" can be used when user has no preference. +// +// `GCS_FILE_PATH` +// : The path to a file on Google Cloud Storage. For example, +// "gs://folder/image1.png". +// +// `LABEL` +// : A display name of an object on an image, video etc., e.g. "dog". +// Must be up to 32 characters long and can consist only of ASCII +// Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9. +// For each label an AnnotationSpec is created which display_name +// becomes the label; AnnotationSpecs are given back in predictions. +// +// `INSTANCE_ID` +// : A positive integer that identifies a specific instance of a +// labeled entity on an example. Used e.g. to track two cars on +// a video while being able to tell apart which one is which. +// +// `BOUNDING_BOX` +// : (`VERTEX,VERTEX,VERTEX,VERTEX` | `VERTEX,,,VERTEX,,`) +// A rectangle parallel to the frame of the example (image, +// video). If 4 vertices are given they are connected by edges +// in the order provided, if 2 are given they are recognized +// as diagonally opposite vertices of the rectangle. +// +// `VERTEX` +// : (`COORDINATE,COORDINATE`) +// First coordinate is horizontal (x), the second is vertical (y). +// +// `COORDINATE` +// : A float in 0 to 1 range, relative to total length of +// image or video in given dimension. For fractions the +// leading non-decimal 0 can be omitted (i.e. 0.3 = .3). +// Point 0,0 is in top left. +// +// `TIME_SEGMENT_START` +// : (`TIME_OFFSET`) +// Expresses a beginning, inclusive, of a time segment +// within an example that has a time dimension +// (e.g. video). +// +// `TIME_SEGMENT_END` +// : (`TIME_OFFSET`) +// Expresses an end, exclusive, of a time segment within +// n example that has a time dimension (e.g. video). +// +// `TIME_OFFSET` +// : A number of seconds as measured from the start of an +// example (e.g. video). Fractions are allowed, up to a +// microsecond precision. "inf" is allowed, and it means the end +// of the example. +// +// `TEXT_SNIPPET` +// : The content of a text snippet, UTF-8 encoded, enclosed within +// double quotes (""). +// +// `DOCUMENT` +// : A field that provides the textual content with document and the layout +// information. +// +// +// **Errors:** +// +// If any of the provided CSV files can't be parsed or if more than certain +// percent of CSV rows cannot be processed then the operation fails and +// nothing is imported. Regardless of overall success or failure the per-row +// failures, up to a certain count cap, is listed in +// Operation.metadata.partial_failures. +// +message InputConfig { + // The source of the input. + oneof source { + // The Google Cloud Storage location for the input content. + // For [AutoMl.ImportData][google.cloud.automl.v1.AutoMl.ImportData], `gcs_source` points to a CSV file with + // a structure described in [InputConfig][google.cloud.automl.v1.InputConfig]. + GcsSource gcs_source = 1; + } + + // Additional domain-specific parameters describing the semantic of the + // imported data, any string must be up to 25000 + // characters long. + // + //

          AutoML Tables

          + // + // `schema_inference_version` + // : (integer) This value must be supplied. + // The version of the + // algorithm to use for the initial inference of the + // column data types of the imported table. Allowed values: "1". + map params = 2; +} + +// Input configuration for BatchPredict Action. +// +// The format of input depends on the ML problem of the model used for +// prediction. As input source the +// [gcs_source][google.cloud.automl.v1.InputConfig.gcs_source] +// is expected, unless specified otherwise. +// +// The formats are represented in EBNF with commas being literal and with +// non-terminal symbols defined near the end of this comment. The formats +// are: +// +//

          AutoML Vision

          +//
          Classification
          +// +// One or more CSV files where each line is a single column: +// +// GCS_FILE_PATH +// +// The Google Cloud Storage location of an image of up to +// 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. +// This path is treated as the ID in the batch predict output. +// +// Sample rows: +// +// gs://folder/image1.jpeg +// gs://folder/image2.gif +// gs://folder/image3.png +// +//
          Object Detection
          +// +// One or more CSV files where each line is a single column: +// +// GCS_FILE_PATH +// +// The Google Cloud Storage location of an image of up to +// 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. +// This path is treated as the ID in the batch predict output. +// +// Sample rows: +// +// gs://folder/image1.jpeg +// gs://folder/image2.gif +// gs://folder/image3.png +//
          +//
          +// +//

          AutoML Video Intelligence

          +//
          Classification
          +// +// One or more CSV files where each line is a single column: +// +// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END +// +// `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in +// size and up to 3h in duration duration. +// Supported extensions: .MOV, .MPEG4, .MP4, .AVI. +// +// `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the +// length of the video, and the end time must be after the start time. +// +// Sample rows: +// +// gs://folder/video1.mp4,10,40 +// gs://folder/video1.mp4,20,60 +// gs://folder/vid2.mov,0,inf +// +//
          Object Tracking
          +// +// One or more CSV files where each line is a single column: +// +// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END +// +// `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in +// size and up to 3h in duration duration. +// Supported extensions: .MOV, .MPEG4, .MP4, .AVI. +// +// `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the +// length of the video, and the end time must be after the start time. +// +// Sample rows: +// +// gs://folder/video1.mp4,10,40 +// gs://folder/video1.mp4,20,60 +// gs://folder/vid2.mov,0,inf +//
          +//
          +// +//

          AutoML Natural Language

          +//
          Classification
          +// +// One or more CSV files where each line is a single column: +// +// GCS_FILE_PATH +// +// `GCS_FILE_PATH` is the Google Cloud Storage location of a text file. +// Supported file extensions: .TXT, .PDF, .TIF, .TIFF +// +// Text files can be no larger than 10MB in size. +// +// Sample rows: +// +// gs://folder/text1.txt +// gs://folder/text2.pdf +// gs://folder/text3.tif +// +//
          Sentiment Analysis
          +// One or more CSV files where each line is a single column: +// +// GCS_FILE_PATH +// +// `GCS_FILE_PATH` is the Google Cloud Storage location of a text file. +// Supported file extensions: .TXT, .PDF, .TIF, .TIFF +// +// Text files can be no larger than 128kB in size. +// +// Sample rows: +// +// gs://folder/text1.txt +// gs://folder/text2.pdf +// gs://folder/text3.tif +// +//
          Entity Extraction
          +// +// One or more JSONL (JSON Lines) files that either provide inline text or +// documents. You can only use one format, either inline text or documents, +// for a single call to [AutoMl.BatchPredict]. +// +// Each JSONL file contains a per line a proto that +// wraps a temporary user-assigned TextSnippet ID (string up to 2000 +// characters long) called "id", a TextSnippet proto (in +// JSON representation) and zero or more TextFeature protos. Any given +// text snippet content must have 30,000 characters or less, and also +// be UTF-8 NFC encoded (ASCII already is). The IDs provided should be +// unique. +// +// Each document JSONL file contains, per line, a proto that wraps a Document +// proto with `input_config` set. Each document cannot exceed 2MB in size. +// +// Supported document extensions: .PDF, .TIF, .TIFF +// +// Each JSONL file must not exceed 100MB in size, and no more than 20 +// JSONL files may be passed. +// +// Sample inline JSONL file (Shown with artificial line +// breaks. Actual line breaks are denoted by "\n".): +// +// { +// "id": "my_first_id", +// "text_snippet": { "content": "dog car cat"}, +// "text_features": [ +// { +// "text_segment": {"start_offset": 4, "end_offset": 6}, +// "structural_type": PARAGRAPH, +// "bounding_poly": { +// "normalized_vertices": [ +// {"x": 0.1, "y": 0.1}, +// {"x": 0.1, "y": 0.3}, +// {"x": 0.3, "y": 0.3}, +// {"x": 0.3, "y": 0.1}, +// ] +// }, +// } +// ], +// }\n +// { +// "id": "2", +// "text_snippet": { +// "content": "Extended sample content", +// "mime_type": "text/plain" +// } +// } +// +// Sample document JSONL file (Shown with artificial line +// breaks. Actual line breaks are denoted by "\n".): +// +// { +// "document": { +// "input_config": { +// "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] +// } +// } +// } +// }\n +// { +// "document": { +// "input_config": { +// "gcs_source": { "input_uris": [ "gs://folder/document2.tif" ] +// } +// } +// } +// } +//
          +//
          +// +//

          AutoML Tables

          +// +// See [Preparing your training +// data](https://cloud.google.com/automl-tables/docs/predict-batch) for more +// information. +// +// You can use either +// [gcs_source][google.cloud.automl.v1.BatchPredictInputConfig.gcs_source] +// or +// [bigquery_source][BatchPredictInputConfig.bigquery_source]. +// +// **For gcs_source:** +// +// CSV file(s), each by itself 10GB or smaller and total size must be +// 100GB or smaller, where first file must have a header containing +// column names. If the first row of a subsequent file is the same as +// the header, then it is also treated as a header. All other rows +// contain values for the corresponding columns. +// +// The column names must contain the model's +// +// [input_feature_column_specs'][google.cloud.automl.v1.TablesModelMetadata.input_feature_column_specs] +// [display_name-s][google.cloud.automl.v1.ColumnSpec.display_name] +// (order doesn't matter). The columns corresponding to the model's +// input feature column specs must contain values compatible with the +// column spec's data types. Prediction on all the rows, i.e. the CSV +// lines, will be attempted. +// +// +// Sample rows from a CSV file: +//
          +// "First Name","Last Name","Dob","Addresses"
          +//
          +// "John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
          +//
          +// "Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
          +// 
          +// **For bigquery_source:** +// +// The URI of a BigQuery table. The user data size of the BigQuery +// table must be 100GB or smaller. +// +// The column names must contain the model's +// +// [input_feature_column_specs'][google.cloud.automl.v1.TablesModelMetadata.input_feature_column_specs] +// [display_name-s][google.cloud.automl.v1.ColumnSpec.display_name] +// (order doesn't matter). The columns corresponding to the model's +// input feature column specs must contain values compatible with the +// column spec's data types. Prediction on all the rows of the table +// will be attempted. +//
          +//
          +// +// **Input field definitions:** +// +// `GCS_FILE_PATH` +// : The path to a file on Google Cloud Storage. For example, +// "gs://folder/video.avi". +// +// `TIME_SEGMENT_START` +// : (`TIME_OFFSET`) +// Expresses a beginning, inclusive, of a time segment +// within an example that has a time dimension +// (e.g. video). +// +// `TIME_SEGMENT_END` +// : (`TIME_OFFSET`) +// Expresses an end, exclusive, of a time segment within +// n example that has a time dimension (e.g. video). +// +// `TIME_OFFSET` +// : A number of seconds as measured from the start of an +// example (e.g. video). Fractions are allowed, up to a +// microsecond precision. "inf" is allowed, and it means the end +// of the example. +// +// **Errors:** +// +// If any of the provided CSV files can't be parsed or if more than certain +// percent of CSV rows cannot be processed then the operation fails and +// prediction does not happen. Regardless of overall success or failure the +// per-row failures, up to a certain count cap, will be listed in +// Operation.metadata.partial_failures. +message BatchPredictInputConfig { + // The source of the input. + oneof source { + // Required. The Google Cloud Storage location for the input content. + GcsSource gcs_source = 1 [(google.api.field_behavior) = REQUIRED]; + } +} + +// Input configuration of a [Document][google.cloud.automl.v1.Document]. +message DocumentInputConfig { + // The Google Cloud Storage location of the document file. Only a single path + // should be given. + // + // Max supported size: 512MB. + // + // Supported extensions: .PDF. + GcsSource gcs_source = 1; +} + +// * For Translation: +// CSV file `translation.csv`, with each line in format: +// ML_USE,GCS_FILE_PATH +// GCS_FILE_PATH leads to a .TSV file which describes examples that have +// given ML_USE, using the following row format per line: +// TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target +// language) +// +// * For Tables: +// Output depends on whether the dataset was imported from Google Cloud +// Storage or BigQuery. +// Google Cloud Storage case: +// +// [gcs_destination][google.cloud.automl.v1p1beta.OutputConfig.gcs_destination] +// must be set. Exported are CSV file(s) `tables_1.csv`, +// `tables_2.csv`,...,`tables_N.csv` with each having as header line +// the table's column names, and all other lines contain values for +// the header columns. +// BigQuery case: +// +// [bigquery_destination][google.cloud.automl.v1p1beta.OutputConfig.bigquery_destination] +// pointing to a BigQuery project must be set. In the given project a +// new dataset will be created with name +// +// `export_data__` +// where will be made +// BigQuery-dataset-name compatible (e.g. most special characters will +// become underscores), and timestamp will be in +// YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that +// dataset a new table called `primary_table` will be created, and +// filled with precisely the same data as this obtained on import. +message OutputConfig { + // The destination of the output. + oneof destination { + // Required. The Google Cloud Storage location where the output is to be written to. + // For Image Object Detection, Text Extraction, Video Classification and + // Tables, in the given directory a new directory will be created with name: + // export_data-- where + // timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export + // output will be written into that directory. + GcsDestination gcs_destination = 1 [(google.api.field_behavior) = REQUIRED]; + } +} + +// Output configuration for BatchPredict Action. +// +// As destination the +// +// [gcs_destination][google.cloud.automl.v1.BatchPredictOutputConfig.gcs_destination] +// must be set unless specified otherwise for a domain. If gcs_destination is +// set then in the given directory a new directory is created. Its name +// will be +// "prediction--", +// where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents +// of it depends on the ML problem the predictions are made for. +// +// * For Image Classification: +// In the created directory files `image_classification_1.jsonl`, +// `image_classification_2.jsonl`,...,`image_classification_N.jsonl` +// will be created, where N may be 1, and depends on the +// total number of the successfully predicted images and annotations. +// A single image will be listed only once with all its annotations, +// and its annotations will never be split across files. +// Each .JSONL file will contain, per line, a JSON representation of a +// proto that wraps image's "ID" : "" followed by a list of +// zero or more AnnotationPayload protos (called annotations), which +// have classification detail populated. +// If prediction for any image failed (partially or completely), then an +// additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` +// files will be created (N depends on total number of failed +// predictions). These files will have a JSON representation of a proto +// that wraps the same "ID" : "" but here followed by +// exactly one +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// containing only `code` and `message`fields. +// +// * For Image Object Detection: +// In the created directory files `image_object_detection_1.jsonl`, +// `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` +// will be created, where N may be 1, and depends on the +// total number of the successfully predicted images and annotations. +// Each .JSONL file will contain, per line, a JSON representation of a +// proto that wraps image's "ID" : "" followed by a list of +// zero or more AnnotationPayload protos (called annotations), which +// have image_object_detection detail populated. A single image will +// be listed only once with all its annotations, and its annotations +// will never be split across files. +// If prediction for any image failed (partially or completely), then +// additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` +// files will be created (N depends on total number of failed +// predictions). These files will have a JSON representation of a proto +// that wraps the same "ID" : "" but here followed by +// exactly one +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// containing only `code` and `message`fields. +// * For Video Classification: +// In the created directory a video_classification.csv file, and a .JSON +// file per each video classification requested in the input (i.e. each +// line in given CSV(s)), will be created. +// +// The format of video_classification.csv is: +// +// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS +// where: +// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 +// the prediction input lines (i.e. video_classification.csv has +// precisely the same number of lines as the prediction input had.) +// JSON_FILE_NAME = Name of .JSON file in the output directory, which +// contains prediction responses for the video time segment. +// STATUS = "OK" if prediction completed successfully, or an error code +// with message otherwise. If STATUS is not "OK" then the .JSON file +// for that line may not exist or be empty. +// +// Each .JSON file, assuming STATUS is "OK", will contain a list of +// AnnotationPayload protos in JSON format, which are the predictions +// for the video time segment the file is assigned to in the +// video_classification.csv. All AnnotationPayload protos will have +// video_classification field set, and will be sorted by +// video_classification.type field (note that the returned types are +// governed by `classifaction_types` parameter in +// [PredictService.BatchPredictRequest.params][]). +// +// * For Video Object Tracking: +// In the created directory a video_object_tracking.csv file will be +// created, and multiple files video_object_trackinng_1.json, +// video_object_trackinng_2.json,..., video_object_trackinng_N.json, +// where N is the number of requests in the input (i.e. the number of +// lines in given CSV(s)). +// +// The format of video_object_tracking.csv is: +// +// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS +// where: +// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 +// the prediction input lines (i.e. video_object_tracking.csv has +// precisely the same number of lines as the prediction input had.) +// JSON_FILE_NAME = Name of .JSON file in the output directory, which +// contains prediction responses for the video time segment. +// STATUS = "OK" if prediction completed successfully, or an error +// code with message otherwise. If STATUS is not "OK" then the .JSON +// file for that line may not exist or be empty. +// +// Each .JSON file, assuming STATUS is "OK", will contain a list of +// AnnotationPayload protos in JSON format, which are the predictions +// for each frame of the video time segment the file is assigned to in +// video_object_tracking.csv. All AnnotationPayload protos will have +// video_object_tracking field set. +// * For Text Classification: +// In the created directory files `text_classification_1.jsonl`, +// `text_classification_2.jsonl`,...,`text_classification_N.jsonl` +// will be created, where N may be 1, and depends on the +// total number of inputs and annotations found. +// +// Each .JSONL file will contain, per line, a JSON representation of a +// proto that wraps input text file (or document) in +// the text snippet (or document) proto and a list of +// zero or more AnnotationPayload protos (called annotations), which +// have classification detail populated. A single text file (or +// document) will be listed only once with all its annotations, and its +// annotations will never be split across files. +// +// If prediction for any input file (or document) failed (partially or +// completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., +// `errors_N.jsonl` files will be created (N depends on total number of +// failed predictions). These files will have a JSON representation of a +// proto that wraps input file followed by exactly one +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// containing only `code` and `message`. +// +// * For Text Sentiment: +// In the created directory files `text_sentiment_1.jsonl`, +// `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` +// will be created, where N may be 1, and depends on the +// total number of inputs and annotations found. +// +// Each .JSONL file will contain, per line, a JSON representation of a +// proto that wraps input text file (or document) in +// the text snippet (or document) proto and a list of +// zero or more AnnotationPayload protos (called annotations), which +// have text_sentiment detail populated. A single text file (or +// document) will be listed only once with all its annotations, and its +// annotations will never be split across files. +// +// If prediction for any input file (or document) failed (partially or +// completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., +// `errors_N.jsonl` files will be created (N depends on total number of +// failed predictions). These files will have a JSON representation of a +// proto that wraps input file followed by exactly one +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// containing only `code` and `message`. +// +// * For Text Extraction: +// In the created directory files `text_extraction_1.jsonl`, +// `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` +// will be created, where N may be 1, and depends on the +// total number of inputs and annotations found. +// The contents of these .JSONL file(s) depend on whether the input +// used inline text, or documents. +// If input was inline, then each .JSONL file will contain, per line, +// a JSON representation of a proto that wraps given in request text +// snippet's "id" (if specified), followed by input text snippet, +// and a list of zero or more +// AnnotationPayload protos (called annotations), which have +// text_extraction detail populated. A single text snippet will be +// listed only once with all its annotations, and its annotations will +// never be split across files. +// If input used documents, then each .JSONL file will contain, per +// line, a JSON representation of a proto that wraps given in request +// document proto, followed by its OCR-ed representation in the form +// of a text snippet, finally followed by a list of zero or more +// AnnotationPayload protos (called annotations), which have +// text_extraction detail populated and refer, via their indices, to +// the OCR-ed text snippet. A single document (and its text snippet) +// will be listed only once with all its annotations, and its +// annotations will never be split across files. +// If prediction for any text snippet failed (partially or completely), +// then additional `errors_1.jsonl`, `errors_2.jsonl`,..., +// `errors_N.jsonl` files will be created (N depends on total number of +// failed predictions). These files will have a JSON representation of a +// proto that wraps either the "id" : "" (in case of inline) +// or the document proto (in case of document) but here followed by +// exactly one +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// containing only `code` and `message`. +// +// * For Tables: +// Output depends on whether +// +// [gcs_destination][google.cloud.automl.v1p1beta.BatchPredictOutputConfig.gcs_destination] +// or +// +// [bigquery_destination][google.cloud.automl.v1p1beta.BatchPredictOutputConfig.bigquery_destination] +// is set (either is allowed). +// Google Cloud Storage case: +// In the created directory files `tables_1.csv`, `tables_2.csv`,..., +// `tables_N.csv` will be created, where N may be 1, and depends on +// the total number of the successfully predicted rows. +// For all CLASSIFICATION +// +// [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]: +// Each .csv file will contain a header, listing all columns' +// +// [display_name-s][google.cloud.automl.v1p1beta.ColumnSpec.display_name] +// given on input followed by M target column names in the format of +// +// "<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] +// +// [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>__score" where M is the number of distinct target values, +// i.e. number of distinct values in the target column of the table +// used to train the model. Subsequent lines will contain the +// respective values of successfully predicted rows, with the last, +// i.e. the target, columns having the corresponding prediction +// [scores][google.cloud.automl.v1p1beta.TablesAnnotation.score]. +// For REGRESSION and FORECASTING +// +// [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]: +// Each .csv file will contain a header, listing all columns' +// [display_name-s][google.cloud.automl.v1p1beta.display_name] +// given on input followed by the predicted target column with name +// in the format of +// +// "predicted_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] +// +// [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>" +// Subsequent lines will contain the respective values of +// successfully predicted rows, with the last, i.e. the target, +// column having the predicted target value. +// If prediction for any rows failed, then an additional +// `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be +// created (N depends on total number of failed rows). These files +// will have analogous format as `tables_*.csv`, but always with a +// single target column having +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// represented as a JSON string, and containing only `code` and +// `message`. +// BigQuery case: +// +// [bigquery_destination][google.cloud.automl.v1p1beta.OutputConfig.bigquery_destination] +// pointing to a BigQuery project must be set. In the given project a +// new dataset will be created with name +// `prediction__` +// where will be made +// BigQuery-dataset-name compatible (e.g. most special characters will +// become underscores), and timestamp will be in +// YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset +// two tables will be created, `predictions`, and `errors`. +// The `predictions` table's column names will be the input columns' +// +// [display_name-s][google.cloud.automl.v1p1beta.ColumnSpec.display_name] +// followed by the target column with name in the format of +// +// "predicted_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] +// +// [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>" +// The input feature columns will contain the respective values of +// successfully predicted rows, with the target column having an +// ARRAY of +// +// [AnnotationPayloads][google.cloud.automl.v1p1beta.AnnotationPayload], +// represented as STRUCT-s, containing +// [TablesAnnotation][google.cloud.automl.v1p1beta.TablesAnnotation]. +// The `errors` table contains rows for which the prediction has +// failed, it has analogous input columns while the target column name +// is in the format of +// +// "errors_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] +// +// [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>", +// and as a value has +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// represented as a STRUCT, and containing only `code` and `message`. +message BatchPredictOutputConfig { + // The destination of the output. + oneof destination { + // Required. The Google Cloud Storage location of the directory where the output is to + // be written to. + GcsDestination gcs_destination = 1 [(google.api.field_behavior) = REQUIRED]; + } +} + +// Output configuration for ModelExport Action. +message ModelExportOutputConfig { + // The destination of the output. + oneof destination { + // Required. The Google Cloud Storage location where the model is to be written to. + // This location may only be set for the following model formats: + // "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". + // + // Under the directory given as the destination a new one with name + // "model-export--", + // where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, + // will be created. Inside the model and any of its supporting files + // will be written. + GcsDestination gcs_destination = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The format in which the model must be exported. The available, and default, + // formats depend on the problem and model type (if given problem and type + // combination doesn't have a format listed, it means its models are not + // exportable): + // + // * For Image Classification mobile-low-latency-1, mobile-versatile-1, + // mobile-high-accuracy-1: + // "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", + // "docker". + // + // * For Image Classification mobile-core-ml-low-latency-1, + // mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: + // "core_ml" (default). + // + // * For Image Object Detection mobile-low-latency-1, mobile-versatile-1, + // mobile-high-accuracy-1: + // "tflite", "tf_saved_model", "tf_js". + // Formats description: + // + // * tflite - Used for Android mobile devices. + // * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/) + // devices. + // * tf_saved_model - A tensorflow model in SavedModel format. + // * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can + // be used in the browser and in Node.js using JavaScript. + // * docker - Used for Docker containers. Use the params field to customize + // the container. The container is verified to work correctly on + // ubuntu 16.04 operating system. See more at + // [containers + // + // quickstart](https: + // //cloud.google.com/vision/automl/docs/containers-gcs-quickstart) + // * core_ml - Used for iOS mobile devices. + string model_format = 4; + + // Additional model-type and format specific parameters describing the + // requirements for the to be exported model files, any string must be up to + // 25000 characters long. + // + // * For `docker` format: + // `cpu_architecture` - (string) "x86_64" (default). + // `gpu_architecture` - (string) "none" (default), "nvidia". + map params = 2; +} + +// The Google Cloud Storage location for the input content. +message GcsSource { + // Required. Google Cloud Storage URIs to input files, up to 2000 + // characters long. Accepted forms: + // * Full object path, e.g. gs://bucket/directory/object.csv + repeated string input_uris = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The Google Cloud Storage location where the output is to be written to. +message GcsDestination { + // Required. Google Cloud Storage URI to output directory, up to 2000 + // characters long. + // Accepted forms: + // * Prefix path: gs://bucket/directory + // The requesting user must have write permission to the bucket. + // The directory is created if it doesn't exist. + string output_uri_prefix = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/google/cloud/automl/v1/model.proto b/google/cloud/automl/v1/model.proto new file mode 100644 index 000000000..f53689377 --- /dev/null +++ b/google/cloud/automl/v1/model.proto @@ -0,0 +1,112 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/resource.proto"; +import "google/cloud/automl/v1/image.proto"; +import "google/cloud/automl/v1/text.proto"; +import "google/cloud/automl/v1/translation.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// API proto representing a trained machine learning model. +message Model { + option (google.api.resource) = { + type: "automl.googleapis.com/Model" + pattern: "projects/{project}/locations/{location}/models/{model}" + }; + + // Deployment state of the model. + enum DeploymentState { + // Should not be used, an un-set enum has this value by default. + DEPLOYMENT_STATE_UNSPECIFIED = 0; + + // Model is deployed. + DEPLOYED = 1; + + // Model is not deployed. + UNDEPLOYED = 2; + } + + // Required. + // The model metadata that is specific to the problem type. + // Must match the metadata type of the dataset used to train the model. + oneof model_metadata { + // Metadata for translation models. + TranslationModelMetadata translation_model_metadata = 15; + + // Metadata for image classification models. + ImageClassificationModelMetadata image_classification_model_metadata = 13; + + // Metadata for text classification models. + TextClassificationModelMetadata text_classification_model_metadata = 14; + + // Metadata for image object detection models. + ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; + + // Metadata for text extraction models. + TextExtractionModelMetadata text_extraction_model_metadata = 19; + + // Metadata for text sentiment models. + TextSentimentModelMetadata text_sentiment_model_metadata = 22; + } + + // Output only. Resource name of the model. + // Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` + string name = 1; + + // Required. The name of the model to show in the interface. The name can be + // up to 32 characters long and can consist only of ASCII Latin letters A-Z + // and a-z, underscores + // (_), and ASCII digits 0-9. It must start with a letter. + string display_name = 2; + + // Required. The resource ID of the dataset used to create the model. The dataset must + // come from the same ancestor project and location. + string dataset_id = 3; + + // Output only. Timestamp when the model training finished and can be used for prediction. + google.protobuf.Timestamp create_time = 7; + + // Output only. Timestamp when this model was last updated. + google.protobuf.Timestamp update_time = 11; + + // Output only. Deployment state of the model. A model can only serve + // prediction requests after it gets deployed. + DeploymentState deployment_state = 8; + + // Used to perform a consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + string etag = 10; + + // Optional. The labels with user-defined metadata to organize your model. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // Label values are optional. Label keys must start with a letter. + // + // See https://goo.gl/xmQnxf for more information on and examples of labels. + map labels = 34; +} diff --git a/google/cloud/automl/v1/model_evaluation.proto b/google/cloud/automl/v1/model_evaluation.proto new file mode 100644 index 000000000..601389f7a --- /dev/null +++ b/google/cloud/automl/v1/model_evaluation.proto @@ -0,0 +1,106 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/resource.proto"; +import "google/cloud/automl/v1/classification.proto"; +import "google/cloud/automl/v1/detection.proto"; +import "google/cloud/automl/v1/text_extraction.proto"; +import "google/cloud/automl/v1/text_sentiment.proto"; +import "google/cloud/automl/v1/translation.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Evaluation results of a model. +message ModelEvaluation { + option (google.api.resource) = { + type: "automl.googleapis.com/ModelEvaluation" + pattern: "projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}" + }; + + // Output only. Problem type specific evaluation metrics. + oneof metrics { + // Model evaluation metrics for image, text, video and tables + // classification. + // Tables problem is considered a classification when the target column + // is CATEGORY DataType. + ClassificationEvaluationMetrics classification_evaluation_metrics = 8; + + // Model evaluation metrics for translation. + TranslationEvaluationMetrics translation_evaluation_metrics = 9; + + // Model evaluation metrics for image object detection. + ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; + + // Evaluation metrics for text sentiment models. + TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; + + // Evaluation metrics for text extraction models. + TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; + } + + // Output only. Resource name of the model evaluation. + // Format: + // + // `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` + string name = 1; + + // Output only. The ID of the annotation spec that the model evaluation applies to. The + // The ID is empty for the overall model evaluation. + // For Tables annotation specs in the dataset do not exist and this ID is + // always not set, but for CLASSIFICATION + // + // [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] + // the + // [display_name][google.cloud.automl.v1.ModelEvaluation.display_name] + // field is used. + string annotation_spec_id = 2; + + // Output only. The value of + // [display_name][google.cloud.automl.v1.AnnotationSpec.display_name] + // at the moment when the model was trained. Because this field returns a + // value at model training time, for different models trained from the same + // dataset, the values may differ, since display names could had been changed + // between the two model's trainings. For Tables CLASSIFICATION + // + // [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] + // distinct values of the target column at the moment of the model evaluation + // are populated here. + // The display_name is empty for the overall model evaluation. + string display_name = 15; + + // Output only. Timestamp when this model evaluation was created. + google.protobuf.Timestamp create_time = 5; + + // Output only. The number of examples used for model evaluation, i.e. for + // which ground truth from time of model creation is compared against the + // predicted annotations created by the model. + // For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is + // the total number of all examples used for evaluation. + // Otherwise, this is the count of examples that according to the ground + // truth were annotated by the + // + // [annotation_spec_id][google.cloud.automl.v1.ModelEvaluation.annotation_spec_id]. + int32 evaluated_example_count = 6; +} diff --git a/google/cloud/automl/v1/operations.proto b/google/cloud/automl/v1/operations.proto new file mode 100644 index 000000000..d6a998708 --- /dev/null +++ b/google/cloud/automl/v1/operations.proto @@ -0,0 +1,167 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/cloud/automl/v1/dataset.proto"; +import "google/cloud/automl/v1/io.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Metadata used across all long running operations returned by AutoML API. +message OperationMetadata { + // Ouptut only. Details of specific operation. Even if this field is empty, + // the presence allows to distinguish different types of operations. + oneof details { + // Details of a Delete operation. + DeleteOperationMetadata delete_details = 8; + + // Details of a DeployModel operation. + DeployModelOperationMetadata deploy_model_details = 24; + + // Details of an UndeployModel operation. + UndeployModelOperationMetadata undeploy_model_details = 25; + + // Details of CreateModel operation. + CreateModelOperationMetadata create_model_details = 10; + + // Details of CreateDataset operation. + CreateDatasetOperationMetadata create_dataset_details = 30; + + // Details of ImportData operation. + ImportDataOperationMetadata import_data_details = 15; + + // Details of BatchPredict operation. + BatchPredictOperationMetadata batch_predict_details = 16; + + // Details of ExportData operation. + ExportDataOperationMetadata export_data_details = 21; + + // Details of ExportModel operation. + ExportModelOperationMetadata export_model_details = 22; + } + + // Output only. Progress of operation. Range: [0, 100]. + // Not used currently. + int32 progress_percent = 13; + + // Output only. Partial failures encountered. + // E.g. single files that couldn't be read. + // This field should never exceed 20 entries. + // Status details field will contain standard GCP error details. + repeated google.rpc.Status partial_failures = 2; + + // Output only. Time when the operation was created. + google.protobuf.Timestamp create_time = 3; + + // Output only. Time when the operation was updated for the last time. + google.protobuf.Timestamp update_time = 4; +} + +// Details of operations that perform deletes of any entities. +message DeleteOperationMetadata { + +} + +// Details of DeployModel operation. +message DeployModelOperationMetadata { + +} + +// Details of UndeployModel operation. +message UndeployModelOperationMetadata { + +} + +// Details of CreateDataset operation. +message CreateDatasetOperationMetadata { + +} + +// Details of CreateModel operation. +message CreateModelOperationMetadata { + +} + +// Details of ImportData operation. +message ImportDataOperationMetadata { + +} + +// Details of ExportData operation. +message ExportDataOperationMetadata { + // Further describes this export data's output. + // Supplements + // [OutputConfig][google.cloud.automl.v1.OutputConfig]. + message ExportDataOutputInfo { + // The output location to which the exported data is written. + oneof output_location { + // The full path of the Google Cloud Storage directory created, into which + // the exported data is written. + string gcs_output_directory = 1; + } + } + + // Output only. Information further describing this export data's output. + ExportDataOutputInfo output_info = 1; +} + +// Details of BatchPredict operation. +message BatchPredictOperationMetadata { + // Further describes this batch predict's output. + // Supplements + // + // [BatchPredictOutputConfig][google.cloud.automl.v1.BatchPredictOutputConfig]. + message BatchPredictOutputInfo { + // The output location into which prediction output is written. + oneof output_location { + // The full path of the Google Cloud Storage directory created, into which + // the prediction output is written. + string gcs_output_directory = 1; + } + } + + // Output only. The input config that was given upon starting this + // batch predict operation. + BatchPredictInputConfig input_config = 1; + + // Output only. Information further describing this batch predict's output. + BatchPredictOutputInfo output_info = 2; +} + +// Details of ExportModel operation. +message ExportModelOperationMetadata { + // Further describes the output of model export. + // Supplements + // [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig]. + message ExportModelOutputInfo { + // The full path of the Google Cloud Storage directory created, into which + // the model will be exported. + string gcs_output_directory = 1; + } + + // Output only. Information further describing the output of this model + // export. + ExportModelOutputInfo output_info = 2; +} diff --git a/google/cloud/automl/v1/prediction_service.proto b/google/cloud/automl/v1/prediction_service.proto new file mode 100644 index 000000000..b7b69cc2b --- /dev/null +++ b/google/cloud/automl/v1/prediction_service.proto @@ -0,0 +1,323 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/automl/v1/annotation_payload.proto"; +import "google/cloud/automl/v1/data_items.proto"; +import "google/cloud/automl/v1/io.proto"; +import "google/cloud/automl/v1/operations.proto"; +import "google/longrunning/operations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_outer_classname = "PredictionServiceProto"; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// AutoML Prediction API. +// +// On any input that is documented to expect a string parameter in +// snake_case or kebab-case, either of those cases is accepted. +service PredictionService { + option (google.api.default_host) = "automl.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Perform an online prediction. The prediction result is directly + // returned in the response. + // Available for following ML scenarios, and their expected request payloads: + // + // AutoML Vision Classification + // + // * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. + // + // AutoML Vision Object Detection + // + // * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. + // + // AutoML Natural Language Classification + // + // * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + // .PDF, .TIF or .TIFF format with size upto 2MB. + // + // AutoML Natural Language Entity Extraction + // + // * A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document + // in .PDF, .TIF or .TIFF format with size upto 20MB. + // + // AutoML Natural Language Sentiment Analysis + // + // * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + // .PDF, .TIF or .TIFF format with size upto 2MB. + // + // AutoML Translation + // + // * A TextSnippet up to 25,000 characters, UTF-8 encoded. + // + // AutoML Tables + // + // * A row with column values matching + // the columns of the model, up to 5MB. Not available for FORECASTING + // `prediction_type`. + rpc Predict(PredictRequest) returns (PredictResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/models/*}:predict" + body: "*" + }; + option (google.api.method_signature) = "name,payload,params"; + } + + // Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1.PredictionService.Predict], batch + // prediction result won't be immediately available in the response. Instead, + // a long running operation object is returned. User can poll the operation + // result via [GetOperation][google.longrunning.Operations.GetOperation] + // method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1.BatchPredictResult] is returned in + // the [response][google.longrunning.Operation.response] field. + // Available for following ML scenarios: + // + // * AutoML Vision Classification + // * AutoML Vision Object Detection + // * AutoML Video Intelligence Classification + // * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification + // * AutoML Natural Language Entity Extraction + // * AutoML Natural Language Sentiment Analysis + // * AutoML Tables + rpc BatchPredict(BatchPredictRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/models/*}:batchPredict" + body: "*" + }; + option (google.api.method_signature) = "name,input_config,output_config,params"; + option (google.longrunning.operation_info) = { + response_type: "BatchPredictResult" + metadata_type: "OperationMetadata" + }; + } +} + +// Request message for [PredictionService.Predict][google.cloud.automl.v1.PredictionService.Predict]. +message PredictRequest { + // Required. Name of the model requested to serve the prediction. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; + + // Required. Payload to perform a prediction on. The payload must match the + // problem type that the model was trained to solve. + ExamplePayload payload = 2 [(google.api.field_behavior) = REQUIRED]; + + // Additional domain-specific parameters, any string must be up to 25000 + // characters long. + // + // AutoML Vision Classification + // + // `score_threshold` + // : (float) A value from 0.0 to 1.0. When the model + // makes predictions for an image, it will only produce results that have + // at least this confidence score. The default is 0.5. + // + // AutoML Vision Object Detection + // + // `score_threshold` + // : (float) When Model detects objects on the image, + // it will only produce bounding boxes which have at least this + // confidence score. Value in 0 to 1 range, default is 0.5. + // + // `max_bounding_box_count` + // : (int64) The maximum number of bounding + // boxes returned. The default is 100. The + // number of returned bounding boxes might be limited by the server. + // + // AutoML Tables + // + // `feature_importance` + // : (boolean) Whether + // + // [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance] + // is populated in the returned list of + // [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation] + // objects. The default is false. + map params = 3; +} + +// Response message for [PredictionService.Predict][google.cloud.automl.v1.PredictionService.Predict]. +message PredictResponse { + // Prediction result. + // AutoML Translation and AutoML Natural Language Sentiment Analysis + // return precisely one payload. + repeated AnnotationPayload payload = 1; + + // The preprocessed example that AutoML actually makes prediction on. + // Empty if AutoML does not preprocess the input example. + // + // For AutoML Natural Language (Classification, Entity Extraction, and + // Sentiment Analysis), if the input is a document, the recognized text is + // returned in the + // [document_text][google.cloud.automl.v1.Document.document_text] + // property. + ExamplePayload preprocessed_input = 3; + + // Additional domain-specific prediction response metadata. + // + // AutoML Vision Object Detection + // + // `max_bounding_box_count` + // : (int64) The maximum number of bounding boxes to return per image. + // + // AutoML Natural Language Sentiment Analysis + // + // `sentiment_score` + // : (float, deprecated) A value between -1 and 1, + // -1 maps to least positive sentiment, while 1 maps to the most positive + // one and the higher the score, the more positive the sentiment in the + // document is. Yet these values are relative to the training data, so + // e.g. if all data was positive then -1 is also positive (though + // the least). + // `sentiment_score` is not the same as "score" and "magnitude" + // from Sentiment Analysis in the Natural Language API. + map metadata = 2; +} + +// Request message for [PredictionService.BatchPredict][google.cloud.automl.v1.PredictionService.BatchPredict]. +message BatchPredictRequest { + // Required. Name of the model requested to serve the batch prediction. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; + + // Required. The input configuration for batch prediction. + BatchPredictInputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Configuration specifying where output predictions should + // be written. + BatchPredictOutputConfig output_config = 4 [(google.api.field_behavior) = REQUIRED]; + + // Additional domain-specific parameters for the predictions, any string must + // be up to 25000 characters long. + // + // AutoML Natural Language Classification + // + // `score_threshold` + // : (float) A value from 0.0 to 1.0. When the model + // makes predictions for a text snippet, it will only produce results + // that have at least this confidence score. The default is 0.5. + // + // + // AutoML Vision Classification + // + // `score_threshold` + // : (float) A value from 0.0 to 1.0. When the model + // makes predictions for an image, it will only produce results that + // have at least this confidence score. The default is 0.5. + // + // AutoML Vision Object Detection + // + // `score_threshold` + // : (float) When Model detects objects on the image, + // it will only produce bounding boxes which have at least this + // confidence score. Value in 0 to 1 range, default is 0.5. + // + // `max_bounding_box_count` + // : (int64) The maximum number of bounding + // boxes returned per image. The default is 100, the + // number of bounding boxes returned might be limited by the server. + // AutoML Video Intelligence Classification + // + // `score_threshold` + // : (float) A value from 0.0 to 1.0. When the model + // makes predictions for a video, it will only produce results that + // have at least this confidence score. The default is 0.5. + // + // `segment_classification` + // : (boolean) Set to true to request + // segment-level classification. AutoML Video Intelligence returns + // labels and their confidence scores for the entire segment of the + // video that user specified in the request configuration. + // The default is true. + // + // `shot_classification` + // : (boolean) Set to true to request shot-level + // classification. AutoML Video Intelligence determines the boundaries + // for each camera shot in the entire segment of the video that user + // specified in the request configuration. AutoML Video Intelligence + // then returns labels and their confidence scores for each detected + // shot, along with the start and end time of the shot. + // The default is false. + // + // WARNING: Model evaluation is not done for this classification type, + // the quality of it depends on training data, but there are no metrics + // provided to describe that quality. + // + // `1s_interval_classification` + // : (boolean) Set to true to request + // classification for a video at one-second intervals. AutoML Video + // Intelligence returns labels and their confidence scores for each + // second of the entire segment of the video that user specified in the + // request configuration. The default is false. + // + // WARNING: Model evaluation is not done for this classification + // type, the quality of it depends on training data, but there are no + // metrics provided to describe that quality. + // + // AutoML Video Intelligence Object Tracking + // + // `score_threshold` + // : (float) When Model detects objects on video frames, + // it will only produce bounding boxes which have at least this + // confidence score. Value in 0 to 1 range, default is 0.5. + // + // `max_bounding_box_count` + // : (int64) The maximum number of bounding + // boxes returned per image. The default is 100, the + // number of bounding boxes returned might be limited by the server. + // + // `min_bounding_box_size` + // : (float) Only bounding boxes with shortest edge + // at least that long as a relative value of video frame size are + // returned. Value in 0 to 1 range. Default is 0. + // + map params = 5; +} + +// Result of the Batch Predict. This message is returned in +// [response][google.longrunning.Operation.response] of the operation returned +// by the [PredictionService.BatchPredict][google.cloud.automl.v1.PredictionService.BatchPredict]. +message BatchPredictResult { + // Additional domain-specific prediction response metadata. + // + // AutoML Vision Object Detection + // + // `max_bounding_box_count` + // : (int64) The maximum number of bounding boxes returned per image. + // + // AutoML Video Intelligence Object Tracking + // + // `max_bounding_box_count` + // : (int64) The maximum number of bounding boxes returned per frame. + map metadata = 1; +} diff --git a/google/cloud/automl/v1/service.proto b/google/cloud/automl/v1/service.proto new file mode 100644 index 000000000..7c73243cc --- /dev/null +++ b/google/cloud/automl/v1/service.proto @@ -0,0 +1,609 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/automl/v1/annotation_payload.proto"; +import "google/cloud/automl/v1/annotation_spec.proto"; +import "google/cloud/automl/v1/dataset.proto"; +import "google/cloud/automl/v1/image.proto"; +import "google/cloud/automl/v1/io.proto"; +import "google/cloud/automl/v1/model.proto"; +import "google/cloud/automl/v1/model_evaluation.proto"; +import "google/cloud/automl/v1/operations.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_outer_classname = "AutoMlProto"; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// AutoML Server API. +// +// The resource names are assigned by the server. +// The server never reuses names that it has created after the resources with +// those names are deleted. +// +// An ID of a resource is the last element of the item's resource name. For +// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then +// the id for the item is `{dataset_id}`. +// +// Currently the only supported `location_id` is "us-central1". +// +// On any input that is documented to expect a string parameter in +// snake_case or kebab-case, either of those cases is accepted. +service AutoMl { + option (google.api.default_host) = "automl.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a dataset. + rpc CreateDataset(CreateDatasetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/datasets" + body: "dataset" + }; + option (google.api.method_signature) = "parent,dataset"; + option (google.longrunning.operation_info) = { + response_type: "Dataset" + metadata_type: "OperationMetadata" + }; + } + + // Gets a dataset. + rpc GetDataset(GetDatasetRequest) returns (Dataset) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/datasets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists datasets in a project. + rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/datasets" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a dataset. + rpc UpdateDataset(UpdateDatasetRequest) returns (Dataset) { + option (google.api.http) = { + patch: "/v1/{dataset.name=projects/*/locations/*/datasets/*}" + body: "dataset" + }; + option (google.api.method_signature) = "dataset,update_mask"; + } + + // Deletes a dataset and all of its contents. + // Returns empty response in the + // [response][google.longrunning.Operation.response] field when it completes, + // and `delete_details` in the + // [metadata][google.longrunning.Operation.metadata] field. + rpc DeleteDataset(DeleteDatasetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/datasets/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Imports data into a dataset. + // For Tables this method can only be called on an empty Dataset. + // + // For Tables: + // * A + // [schema_inference_version][google.cloud.automl.v1.InputConfig.params] + // parameter must be explicitly set. + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/datasets/*}:importData" + body: "*" + }; + option (google.api.method_signature) = "name,input_config"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Exports dataset's data to the provided output location. + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/datasets/*}:exportData" + body: "*" + }; + option (google.api.method_signature) = "name,output_config"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets an annotation spec. + rpc GetAnnotationSpec(GetAnnotationSpecRequest) returns (AnnotationSpec) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a model. + // Returns a Model in the [response][google.longrunning.Operation.response] + // field when it completes. + // When you create a model, several model evaluations are created for it: + // a global evaluation, and one evaluation for each annotation spec. + rpc CreateModel(CreateModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/models" + body: "model" + }; + option (google.api.method_signature) = "parent,model"; + option (google.longrunning.operation_info) = { + response_type: "Model" + metadata_type: "OperationMetadata" + }; + } + + // Gets a model. + rpc GetModel(GetModelRequest) returns (Model) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/models/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists models. + rpc ListModels(ListModelsRequest) returns (ListModelsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/models" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a model. + // Returns `google.protobuf.Empty` in the + // [response][google.longrunning.Operation.response] field when it completes, + // and `delete_details` in the + // [metadata][google.longrunning.Operation.metadata] field. + rpc DeleteModel(DeleteModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/models/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Updates a model. + rpc UpdateModel(UpdateModelRequest) returns (Model) { + option (google.api.http) = { + patch: "/v1/{model.name=projects/*/locations/*/models/*}" + body: "model" + }; + option (google.api.method_signature) = "model,update_mask"; + } + + // Deploys a model. If a model is already deployed, deploying it with the + // same parameters has no effect. Deploying with different parametrs + // (as e.g. changing + // + // [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) + // will reset the deployment state without pausing the model's availability. + // + // Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + // deployment automatically. + // + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + rpc DeployModel(DeployModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/models/*}:deploy" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Undeploys a model. If the model is not deployed this method has no effect. + // + // Only applicable for Text Classification, Image Object Detection and Tables; + // all other domains manage deployment automatically. + // + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + rpc UndeployModel(UndeployModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/models/*}:undeploy" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Exports a trained, "export-able", model to a user specified Google Cloud + // Storage location. A model is considered export-able if and only if it has + // an export format defined for it in + // [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig]. + // + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + rpc ExportModel(ExportModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/models/*}:export" + body: "*" + }; + option (google.api.method_signature) = "name,output_config"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets a model evaluation. + rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/models/*/modelEvaluations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists model evaluations. + rpc ListModelEvaluations(ListModelEvaluationsRequest) returns (ListModelEvaluationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/models/*}/modelEvaluations" + }; + option (google.api.method_signature) = "parent,filter"; + } +} + +// Request message for [AutoMl.CreateDataset][google.cloud.automl.v1.AutoMl.CreateDataset]. +message CreateDatasetRequest { + // Required. The resource name of the project to create the dataset for. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The dataset to create. + Dataset dataset = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [AutoMl.GetDataset][google.cloud.automl.v1.AutoMl.GetDataset]. +message GetDatasetRequest { + // Required. The resource name of the dataset to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Dataset" + } + ]; +} + +// Request message for [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets]. +message ListDatasetsRequest { + // Required. The resource name of the project from which to list datasets. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // An expression for filtering the results of the request. + // + // * `dataset_metadata` - for existence of the case (e.g. + // image_classification_dataset_metadata:*). Some examples of using the filter are: + // + // * `translation_dataset_metadata:*` --> The dataset has + // translation_dataset_metadata. + string filter = 3; + + // Requested page size. Server may return fewer results than requested. + // If unspecified, server will pick a default size. + int32 page_size = 4; + + // A token identifying a page of results for the server to return + // Typically obtained via + // [ListDatasetsResponse.next_page_token][google.cloud.automl.v1.ListDatasetsResponse.next_page_token] of the previous + // [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets] call. + string page_token = 6; +} + +// Response message for [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets]. +message ListDatasetsResponse { + // The datasets read. + repeated Dataset datasets = 1; + + // A token to retrieve next page of results. + // Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1.ListDatasetsRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// Request message for [AutoMl.UpdateDataset][google.cloud.automl.v1.AutoMl.UpdateDataset] +message UpdateDatasetRequest { + // Required. The dataset which replaces the resource on the server. + Dataset dataset = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1.AutoMl.DeleteDataset]. +message DeleteDatasetRequest { + // Required. The resource name of the dataset to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Dataset" + } + ]; +} + +// Request message for [AutoMl.ImportData][google.cloud.automl.v1.AutoMl.ImportData]. +message ImportDataRequest { + // Required. Dataset name. Dataset must already exist. All imported + // annotations and examples will be added. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Dataset" + } + ]; + + // Required. The desired input location and its domain specific semantics, + // if any. + InputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [AutoMl.ExportData][google.cloud.automl.v1.AutoMl.ExportData]. +message ExportDataRequest { + // Required. The resource name of the dataset. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Dataset" + } + ]; + + // Required. The desired output location. + OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [AutoMl.GetAnnotationSpec][google.cloud.automl.v1.AutoMl.GetAnnotationSpec]. +message GetAnnotationSpecRequest { + // Required. The resource name of the annotation spec to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/AnnotationSpec" + } + ]; +} + +// Request message for [AutoMl.CreateModel][google.cloud.automl.v1.AutoMl.CreateModel]. +message CreateModelRequest { + // Required. Resource name of the parent project where the model is being created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The model to create. + Model model = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [AutoMl.GetModel][google.cloud.automl.v1.AutoMl.GetModel]. +message GetModelRequest { + // Required. Resource name of the model. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; +} + +// Request message for [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels]. +message ListModelsRequest { + // Required. Resource name of the project, from which to list the models. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // An expression for filtering the results of the request. + // + // * `model_metadata` - for existence of the case (e.g. + // video_classification_model_metadata:*). + // * `dataset_id` - for = or !=. Some examples of using the filter are: + // + // * `image_classification_model_metadata:*` --> The model has + // image_classification_model_metadata. + // * `dataset_id=5` --> The model was created from a dataset with ID 5. + string filter = 3; + + // Requested page size. + int32 page_size = 4; + + // A token identifying a page of results for the server to return + // Typically obtained via + // [ListModelsResponse.next_page_token][google.cloud.automl.v1.ListModelsResponse.next_page_token] of the previous + // [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels] call. + string page_token = 6; +} + +// Response message for [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels]. +message ListModelsResponse { + // List of models in the requested page. + repeated Model model = 1; + + // A token to retrieve next page of results. + // Pass to [ListModelsRequest.page_token][google.cloud.automl.v1.ListModelsRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// Request message for [AutoMl.DeleteModel][google.cloud.automl.v1.AutoMl.DeleteModel]. +message DeleteModelRequest { + // Required. Resource name of the model being deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; +} + +// Request message for [AutoMl.UpdateModel][google.cloud.automl.v1.AutoMl.UpdateModel] +message UpdateModelRequest { + // Required. The model which replaces the resource on the server. + Model model = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [AutoMl.DeployModel][google.cloud.automl.v1.AutoMl.DeployModel]. +message DeployModelRequest { + // The per-domain specific deployment parameters. + oneof model_deployment_metadata { + // Model deployment metadata specific to Image Object Detection. + ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; + + // Model deployment metadata specific to Image Classification. + ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + } + + // Required. Resource name of the model to deploy. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; +} + +// Request message for [AutoMl.UndeployModel][google.cloud.automl.v1.AutoMl.UndeployModel]. +message UndeployModelRequest { + // Required. Resource name of the model to undeploy. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; +} + +// Request message for [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]. +// Models need to be enabled for exporting, otherwise an error code will be +// returned. +message ExportModelRequest { + // Required. The resource name of the model to export. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; + + // Required. The desired output location and configuration. + ModelExportOutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1.AutoMl.GetModelEvaluation]. +message GetModelEvaluationRequest { + // Required. Resource name for the model evaluation. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/ModelEvaluation" + } + ]; +} + +// Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations]. +message ListModelEvaluationsRequest { + // Required. Resource name of the model to list the model evaluations for. + // If modelId is set as "-", this will list model evaluations from across all + // models of the parent location. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; + + // Required. An expression for filtering the results of the request. + // + // * `annotation_spec_id` - for =, != or existence. See example below for + // the last. + // + // Some examples of using the filter are: + // + // * `annotation_spec_id!=4` --> The model evaluation was done for + // annotation spec with ID different than 4. + // * `NOT annotation_spec_id:*` --> The model evaluation was done for + // aggregate of all annotation specs. + string filter = 3 [(google.api.field_behavior) = REQUIRED]; + + // Requested page size. + int32 page_size = 4; + + // A token identifying a page of results for the server to return. + // Typically obtained via + // [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1.ListModelEvaluationsResponse.next_page_token] of the previous + // [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] call. + string page_token = 6; +} + +// Response message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations]. +message ListModelEvaluationsResponse { + // List of model evaluations in the requested page. + repeated ModelEvaluation model_evaluation = 1; + + // A token to retrieve next page of results. + // Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1.ListModelEvaluationsRequest.page_token] field of a new + // [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] request to obtain that page. + string next_page_token = 2; +} diff --git a/google/cloud/automl/v1/text.proto b/google/cloud/automl/v1/text.proto new file mode 100644 index 000000000..667031b87 --- /dev/null +++ b/google/cloud/automl/v1/text.proto @@ -0,0 +1,66 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/cloud/automl/v1/classification.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_outer_classname = "TextProto"; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Dataset metadata for classification. +message TextClassificationDatasetMetadata { + // Required. Type of the classification problem. + ClassificationType classification_type = 1; +} + +// Model metadata that is specific to text classification. +message TextClassificationModelMetadata { + // Output only. Classification type of the dataset used to train this model. + ClassificationType classification_type = 3; +} + +// Dataset metadata that is specific to text extraction +message TextExtractionDatasetMetadata { + +} + +// Model metadata that is specific to text extraction. +message TextExtractionModelMetadata { + +} + +// Dataset metadata for text sentiment. +message TextSentimentDatasetMetadata { + // Required. A sentiment is expressed as an integer ordinal, where higher value + // means a more positive sentiment. The range of sentiments that will be used + // is between 0 and sentiment_max (inclusive on both ends), and all the values + // in the range must be represented in the dataset before a model can be + // created. + // sentiment_max value must be between 1 and 10 (inclusive). + int32 sentiment_max = 1; +} + +// Model metadata that is specific to text sentiment. +message TextSentimentModelMetadata { + +} diff --git a/google/cloud/automl/v1/text_extraction.proto b/google/cloud/automl/v1/text_extraction.proto new file mode 100644 index 000000000..37a31e715 --- /dev/null +++ b/google/cloud/automl/v1/text_extraction.proto @@ -0,0 +1,69 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/cloud/automl/v1/text_segment.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Annotation for identifying spans of text. +message TextExtractionAnnotation { + // Required. Text extraction annotations can either be a text segment or a + // text relation. + oneof annotation { + // An entity annotation will set this, which is the part of the original + // text to which the annotation pertains. + TextSegment text_segment = 3; + } + + // Output only. A confidence estimate between 0.0 and 1.0. A higher value + // means greater confidence in correctness of the annotation. + float score = 1; +} + +// Model evaluation metrics for text extraction problems. +message TextExtractionEvaluationMetrics { + // Metrics for a single confidence threshold. + message ConfidenceMetricsEntry { + // Output only. The confidence threshold value used to compute the metrics. + // Only annotations with score of at least this threshold are considered to + // be ones the model would return. + float confidence_threshold = 1; + + // Output only. Recall under the given confidence threshold. + float recall = 3; + + // Output only. Precision under the given confidence threshold. + float precision = 4; + + // Output only. The harmonic mean of recall and precision. + float f1_score = 5; + } + + // Output only. The Area under precision recall curve metric. + float au_prc = 1; + + // Output only. Metrics that have confidence thresholds. + // Precision-recall curve can be derived from it. + repeated ConfidenceMetricsEntry confidence_metrics_entries = 2; +} diff --git a/google/cloud/automl/v1/text_segment.proto b/google/cloud/automl/v1/text_segment.proto new file mode 100644 index 000000000..be7eb1543 --- /dev/null +++ b/google/cloud/automl/v1/text_segment.proto @@ -0,0 +1,42 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_outer_classname = "TextSegmentProto"; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding. +message TextSegment { + // Output only. The content of the TextSegment. + string content = 3; + + // Required. Zero-based character index of the first character of the text + // segment (counting characters from the beginning of the text). + int64 start_offset = 1; + + // Required. Zero-based character index of the first character past the end of + // the text segment (counting character from the beginning of the text). + // The character at the end_offset is NOT included in the text segment. + int64 end_offset = 2; +} diff --git a/google/cloud/automl/v1/text_sentiment.proto b/google/cloud/automl/v1/text_sentiment.proto new file mode 100644 index 000000000..c68b9ed3d --- /dev/null +++ b/google/cloud/automl/v1/text_sentiment.proto @@ -0,0 +1,78 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/cloud/automl/v1/classification.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_outer_classname = "TextSentimentProto"; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Contains annotation details specific to text sentiment. +message TextSentimentAnnotation { + // Output only. The sentiment with the semantic, as given to the + // [AutoMl.ImportData][google.cloud.automl.v1.AutoMl.ImportData] when populating the dataset from which the model used + // for the prediction had been trained. + // The sentiment values are between 0 and + // Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive), + // with higher value meaning more positive sentiment. They are completely + // relative, i.e. 0 means least positive sentiment and sentiment_max means + // the most positive from the sentiments present in the train data. Therefore + // e.g. if train data had only negative sentiment, then sentiment_max, would + // be still negative (although least negative). + // The sentiment shouldn't be confused with "score" or "magnitude" + // from the previous Natural Language Sentiment Analysis API. + int32 sentiment = 1; +} + +// Model evaluation metrics for text sentiment problems. +message TextSentimentEvaluationMetrics { + // Output only. Precision. + float precision = 1; + + // Output only. Recall. + float recall = 2; + + // Output only. The harmonic mean of recall and precision. + float f1_score = 3; + + // Output only. Mean absolute error. Only set for the overall model + // evaluation, not for evaluation of a single annotation spec. + float mean_absolute_error = 4; + + // Output only. Mean squared error. Only set for the overall model + // evaluation, not for evaluation of a single annotation spec. + float mean_squared_error = 5; + + // Output only. Linear weighted kappa. Only set for the overall model + // evaluation, not for evaluation of a single annotation spec. + float linear_kappa = 6; + + // Output only. Quadratic weighted kappa. Only set for the overall model + // evaluation, not for evaluation of a single annotation spec. + float quadratic_kappa = 7; + + // Output only. Confusion matrix of the evaluation. + // Only set for the overall model evaluation, not for evaluation of a single + // annotation spec. + ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; +} diff --git a/google/cloud/automl/v1/translation.proto b/google/cloud/automl/v1/translation.proto new file mode 100644 index 000000000..642894e85 --- /dev/null +++ b/google/cloud/automl/v1/translation.proto @@ -0,0 +1,70 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/automl/v1/data_items.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option java_multiple_files = true; +option java_outer_classname = "TranslationProto"; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Dataset metadata that is specific to translation. +message TranslationDatasetMetadata { + // Required. The BCP-47 language code of the source language. + string source_language_code = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The BCP-47 language code of the target language. + string target_language_code = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Evaluation metrics for the dataset. +message TranslationEvaluationMetrics { + // Output only. BLEU score. + double bleu_score = 1; + + // Output only. BLEU score for base model. + double base_bleu_score = 2; +} + +// Model metadata that is specific to translation. +message TranslationModelMetadata { + // The resource name of the model to use as a baseline to train the custom + // model. If unset, we use the default base model provided by Google + // Translate. Format: + // `projects/{project_id}/locations/{location_id}/models/{model_id}` + string base_model = 1; + + // Output only. Inferred from the dataset. + // The source language (The BCP-47 language code) that is used for training. + string source_language_code = 2; + + // Output only. The target language (The BCP-47 language code) that is used + // for training. + string target_language_code = 3; +} + +// Annotation details specific to translation. +message TranslationAnnotation { + // Output only . The translated content. + TextSnippet translated_content = 1; +} diff --git a/google/cloud/automl/v1beta1/BUILD.bazel b/google/cloud/automl/v1beta1/BUILD.bazel index 320e14835..87ca7a56e 100644 --- a/google/cloud/automl/v1beta1/BUILD.bazel +++ b/google/cloud/automl/v1beta1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -41,6 +44,8 @@ proto_library( deps = [ "//google/api:annotations_proto", "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/longrunning:operations_proto", "//google/rpc:status_proto", "@com_google_protobuf//:any_proto", @@ -54,7 +59,10 @@ proto_library( proto_library_with_info( name = "automl_proto_with_info", - deps = [":automl_proto"], + deps = [ + ":automl_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -62,18 +70,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "automl_java_proto", deps = [":automl_proto"], @@ -82,52 +85,41 @@ java_proto_library( java_grpc_library( name = "automl_java_grpc", srcs = [":automl_proto"], - deps = [":automl_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "automl_resource_name_java_proto", - gapic_yaml = "automl_gapic.yaml", - deps = [":automl_proto"], + deps = [":automl_java_proto"], ) java_gapic_library( name = "automl_java_gapic", src = ":automl_proto_with_info", gapic_yaml = "automl_gapic.yaml", - service_yaml = "//google/cloud/automl:automl_v1beta1.yaml", - test_deps = [":automl_java_grpc"], + package = "google.cloud.automl.v1beta1", + service_yaml = "automl_v1beta1.yaml", + test_deps = [ + ":automl_java_grpc", + ], deps = [ ":automl_java_proto", - ":automl_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":automl_java_gapic_test", +java_gapic_test( + name = "automl_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.automl.v1beta1.AutoMlClientTest", + "com.google.cloud.automl.v1beta1.PredictionServiceClientTest", ], -) for test_name in [ - "com.google.cloud.automl.v1beta1.AutoMlClientTest", - "com.google.cloud.automl.v1beta1.PredictionServiceClientTest", -]] + runtime_deps = [":automl_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-automl-v1beta1-java", - client_deps = [":automl_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":automl_java_gapic_test"], - grpc_deps = [":automl_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":automl_java_gapic", + ":automl_java_grpc", ":automl_java_proto", ":automl_proto", - ":automl_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -135,10 +127,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -155,15 +147,19 @@ go_proto_library( go_gapic_library( name = "automl_go_gapic", - src = ":automl_proto_with_info", - gapic_yaml = "automl_gapic.yaml", - importpath = "cloud.google.com/go/cloud/automl/apiv1beta1", - service_yaml = "//google/cloud/automl:automl_v1beta1.yaml", + srcs = [":automl_proto_with_info"], + grpc_service_config = "automl_grpc_service_config.json", + importpath = "cloud.google.com/go/automl/apiv1beta1;automl", + service_yaml = "automl_v1beta1.yaml", deps = [ ":automl_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:any_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + "@io_bazel_rules_go//proto/wkt:struct_go_proto", ], ) @@ -171,16 +167,243 @@ go_test( name = "automl_go_gapic_test", srcs = [":automl_go_gapic_srcjar_test"], embed = [":automl_go_gapic"], - importpath = "cloud.google.com/go/cloud/automl/apiv1beta1", + importpath = "cloud.google.com/go/automl/apiv1beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-automl-v1beta1-go", deps = [ ":automl_go_gapic", - ":automl_go_gapic_srcjar-smoke-test.srcjar", ":automl_go_gapic_srcjar-test.srcjar", ":automl_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "automl_moved_proto", + srcs = [":automl_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "automl_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":automl_moved_proto"], +) + +py_grpc_library( + name = "automl_py_grpc", + srcs = [":automl_moved_proto"], + deps = [":automl_py_proto"], +) + +py_gapic_library( + name = "automl_py_gapic", + src = ":automl_proto_with_info", + gapic_yaml = "automl_gapic.yaml", + package = "google.cloud.automl.v1beta1", + service_yaml = "automl_v1beta1.yaml", + deps = [ + ":automl_py_grpc", + ":automl_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "automl-v1beta1-py", + deps = [ + ":automl_py_gapic", + ":automl_py_grpc", + ":automl_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "automl_php_proto", + deps = [":automl_proto"], +) + +php_grpc_library( + name = "automl_php_grpc", + srcs = [":automl_proto"], + deps = [":automl_php_proto"], +) + +php_gapic_library( + name = "automl_php_gapic", + src = ":automl_proto_with_info", + gapic_yaml = "automl_gapic.yaml", + package = "google.cloud.automl.v1beta1", + service_yaml = "automl_v1beta1.yaml", + deps = [ + ":automl_php_grpc", + ":automl_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-automl-v1beta1-php", + deps = [ + ":automl_php_gapic", + ":automl_php_grpc", + ":automl_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "automl_nodejs_gapic", + src = ":automl_proto_with_info", + gapic_yaml = "automl_gapic.yaml", + package = "google.cloud.automl.v1beta1", + service_yaml = "automl_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "automl-v1beta1-nodejs", + deps = [ + ":automl_nodejs_gapic", + ":automl_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "automl_ruby_proto", + deps = [":automl_proto"], +) + +ruby_grpc_library( + name = "automl_ruby_grpc", + srcs = [":automl_proto"], + deps = [":automl_ruby_proto"], +) + +ruby_gapic_library( + name = "automl_ruby_gapic", + src = ":automl_proto_with_info", + gapic_yaml = "automl_gapic.yaml", + package = "google.cloud.automl.v1beta1", + service_yaml = "automl_v1beta1.yaml", + deps = [ + ":automl_ruby_grpc", + ":automl_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-automl-v1beta1-ruby", + deps = [ + ":automl_ruby_gapic", + ":automl_ruby_grpc", + ":automl_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "automl_csharp_proto", + deps = [":automl_proto"], +) + +csharp_grpc_library( + name = "automl_csharp_grpc", + srcs = [":automl_proto"], + deps = [":automl_csharp_proto"], +) + +csharp_gapic_library( + name = "automl_csharp_gapic", + src = ":automl_proto_with_info", + gapic_yaml = "automl_gapic.yaml", + package = "google.cloud.automl.v1beta1", + service_yaml = "automl_v1beta1.yaml", + deps = [ + ":automl_csharp_grpc", + ":automl_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-automl-v1beta1-csharp", + deps = [ + ":automl_csharp_gapic", + ":automl_csharp_grpc", + ":automl_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/automl/v1beta1/annotation_payload.proto b/google/cloud/automl/v1beta1/annotation_payload.proto index 7cc2860f1..f62bb269e 100644 --- a/google/cloud/automl/v1beta1/annotation_payload.proto +++ b/google/cloud/automl/v1beta1/annotation_payload.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/cloud/automl/v1beta1/annotation_spec.proto b/google/cloud/automl/v1beta1/annotation_spec.proto index 483792b66..d9df07ee3 100644 --- a/google/cloud/automl/v1beta1/annotation_spec.proto +++ b/google/cloud/automl/v1beta1/annotation_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.automl.v1beta1; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; @@ -27,16 +27,19 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // A definition of an annotation spec. message AnnotationSpec { + option (google.api.resource) = { + type: "automl.googleapis.com/AnnotationSpec" + pattern: "projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}" + }; + // Output only. Resource name of the annotation spec. // Form: // // 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}' string name = 1; - // Required. - // The name of the annotation spec to show in the interface. The name can be + // Required. The name of the annotation spec to show in the interface. The name can be // up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. - // (_), and ASCII digits 0-9. string display_name = 2; // Output only. The number of examples in the parent dataset diff --git a/google/cloud/automl/v1beta1/automl_gapic.legacy.yaml b/google/cloud/automl/v1beta1/automl_gapic.legacy.yaml new file mode 100644 index 000000000..c83ffca05 --- /dev/null +++ b/google/cloud/automl/v1beta1/automl_gapic.legacy.yaml @@ -0,0 +1,730 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.automl.v1beta1 + python: + package_name: google.cloud.automl_v1beta1.gapic + go: + package_name: cloud.google.com/go/automl/apiv1beta1 + csharp: + package_name: Google.Cloud.Automl.V1Beta1 + ruby: + package_name: Google::Cloud::AutoML::V1beta1 + php: + package_name: Google\Cloud\AutoMl\V1beta1 + nodejs: + package_name: automl.v1beta1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: + # The fully qualified name of the API interface. +- name: google.cloud.automl.v1beta1.PredictionService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location}/models/{model} + entity_name: model + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: Predict + flattening: + groups: + - parameters: + - name + - payload + - params + required_fields: + - name + - payload + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: model + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: BatchPredict + required_fields: + - name + - input_config + - output_config + flattening: + groups: + - parameters: + - name + - input_config + - output_config + - params + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: model + long_running: + return_type: google.cloud.automl.v1beta1.BatchPredictResult + metadata_type: google.cloud.automl.v1beta1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 86400000 + timeout_millis: 20000 + # The fully qualified name of the API interface. +- name: google.cloud.automl.v1beta1.AutoMl + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/datasets/{dataset} + entity_name: dataset + - name_pattern: projects/{project}/locations/{location}/models/{model} + entity_name: model + - name_pattern: projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation} + entity_name: model_evaluation + - name_pattern: projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec} + entity_name: annotation_spec + - name_pattern: projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec} + entity_name: table_spec + - name_pattern: projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec} + entity_name: column_spec + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateDataset + flattening: + groups: + - parameters: + - parent + - dataset + required_fields: + - parent + - dataset + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + - name: UpdateDataset + flattening: + groups: + - parameters: + - dataset + required_fields: + - dataset + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + dataset.name: dataset + timeout_millis: 5000 + - name: GetDataset + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: dataset + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + - name: ListDatasets + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: datasets + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + - name: DeleteDataset + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: dataset + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1beta1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + - name: ImportData + flattening: + groups: + - parameters: + - name + - input_config + required_fields: + - name + - input_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: dataset + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1beta1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 86400000 + - name: ExportData + flattening: + groups: + - parameters: + - name + - output_config + required_fields: + - name + - output_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: dataset + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1beta1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + - name: CreateModel + flattening: + groups: + - parameters: + - parent + - model + required_fields: + - parent + - model + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.cloud.automl.v1beta1.Model + metadata_type: google.cloud.automl.v1beta1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 86400000 + - name: GetModel + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: model + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + - name: ListModels + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: model + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + - name: DeleteModel + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: model + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1beta1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + - name: DeployModel + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: model + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1beta1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 3600000 + - name: UndeployModel + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: model + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1beta1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 3600000 + - name: GetModelEvaluation + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: model_evaluation + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + - name: ExportModel + required_fields: + - name + - output_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: model + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1beta1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 5000 + - name: ExportEvaluatedExamples + required_fields: + - name + - output_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: model + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.automl.v1beta1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 5000 + - name: ListModelEvaluations + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: model_evaluation + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: model + resource_name_treatment: STATIC_TYPES + timeout_millis: 5000 + - name: GetAnnotationSpec + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: annotation_spec + timeout_millis: 5000 + - name: GetTableSpec + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: table_spec + timeout_millis: 5000 + - name: ListTableSpecs + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: table_specs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: dataset + timeout_millis: 5000 + - name: UpdateTableSpec + flattening: + groups: + - parameters: + - table_spec + required_fields: + - table_spec + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + table_spec.name: table_spec + timeout_millis: 5000 + - name: GetColumnSpec + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: column_spec + timeout_millis: 5000 + - name: ListColumnSpecs + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: column_specs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: table_spec + timeout_millis: 5000 + - name: UpdateColumnSpec + flattening: + groups: + - parameters: + - column_spec + required_fields: + - column_spec + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + column_spec.name: column_spec + timeout_millis: 5000 +resource_name_generation: +- message_name: CreateDatasetRequest + field_entity_map: + parent: location +- message_name: UpdateDatasetRequest + field_entity_map: + dataset.name: dataset +- message_name: GetDatasetRequest + field_entity_map: + name: dataset +- message_name: ListDatasetsRequest + field_entity_map: + parent: location +- message_name: DeleteDatasetRequest + field_entity_map: + name: dataset +- message_name: ImportDataRequest + field_entity_map: + name: dataset +- message_name: ExportDataRequest + field_entity_map: + name: dataset +- message_name: CreateModelRequest + field_entity_map: + parent: location +- message_name: GetModelRequest + field_entity_map: + name: model +- message_name: ListModelsRequest + field_entity_map: + parent: location +- message_name: DeleteModelRequest + field_entity_map: + name: model +- message_name: DeployModelRequest + field_entity_map: + name: model +- message_name: UndeployModelRequest + field_entity_map: + name: model +- message_name: ExportModelRequest + field_entity_map: + name: model +- message_name: ExportEvaluatedExamplesRequest + field_entity_map: + name: model +- message_name: GetModelEvaluationRequest + field_entity_map: + name: model_evaluation +- message_name: ListModelEvaluationsRequest + field_entity_map: + parent: model +- message_name: PredictRequest + field_entity_map: + name: model +- message_name: BatchPredictRequest + field_entity_map: + name: model +- message_name: GetAnnotationSpecRequest + field_entity_map: + name: annotation_spec +- message_name: GetTableSpecRequest + field_entity_map: + name: table_spec +- message_name: ListTableSpecsRequest + field_entity_map: + parent: dataset +- message_name: UpdateTableSpecRequest + field_entity_map: + table_spec.name: table_spec +- message_name: GetColumnSpecRequest + field_entity_map: + name: column_spec +- message_name: ListColumnSpecsRequest + field_entity_map: + parent: table_spec +- message_name: UpdateColumnSpecRequest + field_entity_map: + column_spec.name: column_spec diff --git a/google/cloud/automl/v1beta1/automl_gapic.yaml b/google/cloud/automl/v1beta1/automl_gapic.yaml index 2895ae1be..90d99c485 100644 --- a/google/cloud/automl/v1beta1/automl_gapic.yaml +++ b/google/cloud/automl/v1beta1/automl_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -21,27 +21,6 @@ language_settings: interfaces: # The fully qualified name of the API interface. - name: google.cloud.automl.v1beta1.PredictionService - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/locations/{location}/models/{model} - entity_name: model - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] # Definition for retry/backoff parameters. retry_params_def: - name: default @@ -108,90 +87,13 @@ interfaces: # the call is retrying, refer to retry_params_name instead. methods: - name: Predict - flattening: - groups: - - parameters: - - name - - payload - - params - required_fields: - - name - - payload retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - name: model - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - name: BatchPredict - required_fields: - - name - - input_config - - output_config - flattening: - groups: - - parameters: - - name - - input_config - - output_config - - params retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - name: model - long_running: - return_type: google.cloud.automl.v1beta1.BatchPredictResult - metadata_type: google.cloud.automl.v1beta1.OperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 20000 # The fully qualified name of the API interface. - name: google.cloud.automl.v1beta1.AutoMl - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/locations/{location} - entity_name: location - - name_pattern: projects/{project}/locations/{location}/datasets/{dataset} - entity_name: dataset - - name_pattern: projects/{project}/locations/{location}/models/{model} - entity_name: model - - name_pattern: projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation} - entity_name: model_evaluation - - name_pattern: projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec} - entity_name: annotation_spec - - name_pattern: projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec} - entity_name: table_spec - - name_pattern: projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec} - entity_name: column_spec - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 # A list of method configurations. # Common properties: # @@ -247,484 +149,17 @@ interfaces: # timeout_millis - Specifies the default timeout for a non-retrying call. If # the call is retrying, refer to retry_params_name instead. methods: - - name: CreateDataset - flattening: - groups: - - parameters: - - parent - - dataset - required_fields: - - parent - - dataset - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - resource_name_treatment: STATIC_TYPES - timeout_millis: 5000 - - name: UpdateDataset - flattening: - groups: - - parameters: - - dataset - required_fields: - - dataset - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - dataset.name: dataset - timeout_millis: 5000 - - name: GetDataset - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: dataset - resource_name_treatment: STATIC_TYPES - timeout_millis: 5000 - - name: ListDatasets - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: datasets - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: location - resource_name_treatment: STATIC_TYPES - timeout_millis: 5000 - name: DeleteDataset - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: dataset - resource_name_treatment: STATIC_TYPES - timeout_millis: 5000 - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.automl.v1beta1.OperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - name: ImportData - flattening: - groups: - - parameters: - - name - - input_config - required_fields: - - name - - input_config retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: dataset - resource_name_treatment: STATIC_TYPES - timeout_millis: 5000 - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.automl.v1beta1.OperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - name: ExportData - flattening: - groups: - - parameters: - - name - - output_config - required_fields: - - name - - output_config - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: dataset - resource_name_treatment: STATIC_TYPES - timeout_millis: 5000 - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.automl.v1beta1.OperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - - name: CreateModel - flattening: - groups: - - parameters: - - parent - - model - required_fields: - - parent - - model retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - resource_name_treatment: STATIC_TYPES - timeout_millis: 5000 - long_running: - return_type: google.cloud.automl.v1beta1.Model - metadata_type: google.cloud.automl.v1beta1.OperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - - name: GetModel - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: model - resource_name_treatment: STATIC_TYPES - timeout_millis: 5000 - - name: ListModels - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: model - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: location - resource_name_treatment: STATIC_TYPES - timeout_millis: 5000 - name: DeleteModel - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: model - resource_name_treatment: STATIC_TYPES - timeout_millis: 5000 - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.automl.v1beta1.OperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - - name: DeployModel - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: model - resource_name_treatment: STATIC_TYPES - timeout_millis: 5000 - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.automl.v1beta1.OperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - - name: UndeployModel - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: model - resource_name_treatment: STATIC_TYPES - timeout_millis: 5000 - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.automl.v1beta1.OperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - - name: GetModelEvaluation - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: model_evaluation - resource_name_treatment: STATIC_TYPES - timeout_millis: 5000 - name: ExportModel - required_fields: - - name - - output_config retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: model - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.automl.v1beta1.OperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 5000 - name: ExportEvaluatedExamples - required_fields: - - name - - output_config retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: model - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.automl.v1beta1.OperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 5000 - name: ListModelEvaluations - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: model_evaluation - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: model - resource_name_treatment: STATIC_TYPES - timeout_millis: 5000 - - name: GetAnnotationSpec - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: annotation_spec - timeout_millis: 5000 - - name: GetTableSpec - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: table_spec - timeout_millis: 5000 - - name: ListTableSpecs - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: table_specs - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: dataset - timeout_millis: 5000 - - name: UpdateTableSpec - flattening: - groups: - - parameters: - - table_spec - required_fields: - - table_spec - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - table_spec.name: table_spec - timeout_millis: 5000 - - name: GetColumnSpec - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: column_spec - timeout_millis: 5000 - - name: ListColumnSpecs - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: column_specs - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: table_spec - timeout_millis: 5000 - - name: UpdateColumnSpec - flattening: - groups: - - parameters: - - column_spec - required_fields: - - column_spec retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - column_spec.name: column_spec - timeout_millis: 5000 -resource_name_generation: -- message_name: CreateDatasetRequest - field_entity_map: - parent: location -- message_name: UpdateDatasetRequest - field_entity_map: - dataset.name: dataset -- message_name: GetDatasetRequest - field_entity_map: - name: dataset -- message_name: ListDatasetsRequest - field_entity_map: - parent: location -- message_name: DeleteDatasetRequest - field_entity_map: - name: dataset -- message_name: ImportDataRequest - field_entity_map: - name: dataset -- message_name: ExportDataRequest - field_entity_map: - name: dataset -- message_name: CreateModelRequest - field_entity_map: - parent: location -- message_name: GetModelRequest - field_entity_map: - name: model -- message_name: ListModelsRequest - field_entity_map: - parent: location -- message_name: DeleteModelRequest - field_entity_map: - name: model -- message_name: DeployModelRequest - field_entity_map: - name: model -- message_name: UndeployModelRequest - field_entity_map: - name: model -- message_name: ExportModelRequest - field_entity_map: - name: model -- message_name: ExportEvaluatedExamplesRequest - field_entity_map: - name: model -- message_name: GetModelEvaluationRequest - field_entity_map: - name: model_evaluation -- message_name: ListModelEvaluationsRequest - field_entity_map: - parent: model -- message_name: PredictRequest - field_entity_map: - name: model -- message_name: BatchPredictRequest - field_entity_map: - name: model -- message_name: GetAnnotationSpecRequest - field_entity_map: - name: annotation_spec -- message_name: GetTableSpecRequest - field_entity_map: - name: table_spec -- message_name: ListTableSpecsRequest - field_entity_map: - parent: dataset -- message_name: UpdateTableSpecRequest - field_entity_map: - table_spec.name: table_spec -- message_name: GetColumnSpecRequest - field_entity_map: - name: column_spec -- message_name: ListColumnSpecsRequest - field_entity_map: - parent: table_spec -- message_name: UpdateColumnSpecRequest - field_entity_map: - column_spec.name: column_spec diff --git a/google/cloud/automl/v1beta1/automl_grpc_service_config.json b/google/cloud/automl/v1beta1/automl_grpc_service_config.json new file mode 100755 index 000000000..f008ecc37 --- /dev/null +++ b/google/cloud/automl/v1beta1/automl_grpc_service_config.json @@ -0,0 +1,133 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.automl.v1beta1.PredictionService", + "method": "Predict" + }, + { + "service": "google.cloud.automl.v1beta1.PredictionService", + "method": "BatchPredict" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "CreateDataset" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "UpdateDataset" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "ImportData" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "ExportData" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "CreateModel" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "DeployModel" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "UndeployModel" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "ExportModel" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "ExportEvaluatedExamples" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "ListModelEvaluations" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "UpdateTableSpec" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "UpdateColumnSpec" + } + ], + "timeout": "5s" + }, + { + "name": [ + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "GetDataset" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "ListDatasets" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "DeleteDataset" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "GetModel" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "ListModels" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "DeleteModel" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "GetModelEvaluation" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "GetAnnotationSpec" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "GetTableSpec" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "ListTableSpecs" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "GetColumnSpec" + }, + { + "service": "google.cloud.automl.v1beta1.AutoMl", + "method": "ListColumnSpecs" + } + ], + "timeout": "5s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/automl/v1beta1/automl_v1beta1.yaml b/google/cloud/automl/v1beta1/automl_v1beta1.yaml new file mode 100644 index 000000000..179829f8c --- /dev/null +++ b/google/cloud/automl/v1beta1/automl_v1beta1.yaml @@ -0,0 +1,127 @@ +type: google.api.Service +config_version: 3 +name: automl.googleapis.com +title: Cloud AutoML API + +apis: +- name: google.cloud.automl.v1beta1.AutoMl +- name: google.cloud.automl.v1beta1.PredictionService + +types: +- name: google.cloud.automl.v1beta1.BatchPredictResult +- name: google.cloud.automl.v1beta1.OperationMetadata + +documentation: + summary: |- + Train high-quality custom machine learning models with minimum effort and + machine learning expertise. + overview: |- + Cloud AutoML is a suite of machine learning products that enables + developers with limited machine learning expertise to train high-quality + models specific to their business needs, by leveraging Google's + state-of-the-art transfer learning, and Neural Architecture Search + technology. + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + description: |- + Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + description: |- + Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and + PERMISSION_DENIED + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + description: |- + Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + +backend: + rules: + - selector: 'google.cloud.automl.v1beta1.AutoMl.*' + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.CreateModel + deadline: 20.0 + - selector: google.cloud.automl.v1beta1.AutoMl.ImportData + deadline: 20.0 + - selector: google.cloud.automl.v1beta1.AutoMl.ListDatasets + deadline: 50.0 + - selector: google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations + deadline: 50.0 + - selector: google.cloud.automl.v1beta1.AutoMl.ListModels + deadline: 50.0 + - selector: google.cloud.automl.v1beta1.PredictionService.BatchPredict + deadline: 20.0 + - selector: google.cloud.automl.v1beta1.PredictionService.Predict + deadline: 60.0 + - selector: 'google.iam.v1.IAMPolicy.*' + deadline: 5.0 + - selector: 'google.longrunning.Operations.*' + deadline: 5.0 + - selector: google.longrunning.Operations.ListOperations + deadline: 50.0 + - selector: google.longrunning.Operations.WaitOperation + deadline: 300.0 + +http: + rules: + - selector: google.longrunning.Operations.ListOperations + get: '/v1beta1/{name=projects/*/locations/*}/operations' + + - selector: google.longrunning.Operations.GetOperation + get: '/v1beta1/{name=projects/*/locations/*/operations/*}' + + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1beta1/{name=projects/*/locations/*/operations/*}' + + - selector: google.longrunning.Operations.CancelOperation + post: '/v1beta1/{name=projects/*/locations/*/operations/*}:cancel' + body: '*' + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + post: '/v1beta1/{resource=projects/*/locations/*/datasets/*}:setIamPolicy' + body: '*' + additional_bindings: + - post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy' + body: '*' + + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + get: '/v1beta1/{resource=projects/*/locations/*/datasets/*}:getIamPolicy' + additional_bindings: + - get: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy' + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + post: '/v1beta1/{resource=projects/*/locations/*/**}:testIamPermissions' + body: '*' + +authentication: + rules: + - selector: 'google.cloud.automl.v1beta1.AutoMl.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.automl.v1beta1.PredictionService.BatchPredict + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.automl.v1beta1.PredictionService.Predict + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.iam.v1.IAMPolicy.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/automl/v1beta1/classification.proto b/google/cloud/automl/v1beta1/classification.proto index 9d588c152..0594d01e6 100644 --- a/google/cloud/automl/v1beta1/classification.proto +++ b/google/cloud/automl/v1beta1/classification.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -164,11 +163,20 @@ message ClassificationEvaluationMetrics { // only list of [annotation_spec_display_name-s][] is populated. repeated string annotation_spec_id = 1; + // Output only. Display name of the annotation specs used in the confusion + // matrix, as they were at the moment of the evaluation. For Tables + // CLASSIFICATION + // + // [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type], + // distinct values of the target column at the moment of the model + // evaluation are populated here. + repeated string display_name = 3; + // Output only. Rows in the confusion matrix. The number of rows is equal to // the size of `annotation_spec_id`. - // `row[i].value[j]` is the number of examples that have ground truth of the - // `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by - // the model being evaluated. + // `row[i].example_count[j]` is the number of examples that have ground + // truth of the `annotation_spec_id[i]` and are predicted as + // `annotation_spec_id[j]` by the model being evaluated. repeated Row row = 2; } diff --git a/google/cloud/automl/v1beta1/column_spec.proto b/google/cloud/automl/v1beta1/column_spec.proto index 8a3b52110..03389b8a4 100644 --- a/google/cloud/automl/v1beta1/column_spec.proto +++ b/google/cloud/automl/v1beta1/column_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.automl.v1beta1; +import "google/api/resource.proto"; import "google/cloud/automl/v1beta1/data_stats.proto"; import "google/cloud/automl/v1beta1/data_types.proto"; import "google/api/annotations.proto"; @@ -32,6 +32,11 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // Used by: // * Tables message ColumnSpec { + option (google.api.resource) = { + type: "automl.googleapis.com/ColumnSpec" + pattern: "projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}" + }; + // Identifies the table's column, and its correlation with the column this // ColumnSpec describes. message CorrelatedColumn { @@ -64,12 +69,7 @@ message ColumnSpec { // for the timestamp at which these stats were last updated. DataStats data_stats = 4; - // Output only. Top 10 most correlated with this column columns of the table, - // ordered by - // [cramers_v][google.cloud.automl.v1beta1.CorrelationStats.cramers_v] metric. - // This field may be stale, see the ancestor's - // Dataset.tables_dataset_metadata.stats_update_time field - // for the timestamp at which these stats were last updated. + // Deprecated. repeated CorrelatedColumn top_correlated_columns = 5; // Used to perform consistent read-modify-write updates. If not set, a blind diff --git a/google/cloud/automl/v1beta1/data_items.proto b/google/cloud/automl/v1beta1/data_items.proto index a1ad57214..9b9187ad3 100644 --- a/google/cloud/automl/v1beta1/data_items.proto +++ b/google/cloud/automl/v1beta1/data_items.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.automl.v1beta1; +import "google/cloud/automl/v1beta1/geometry.proto"; import "google/cloud/automl/v1beta1/io.proto"; +import "google/cloud/automl/v1beta1/temporal.proto"; +import "google/cloud/automl/v1beta1/text_segment.proto"; import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/struct.proto"; @@ -33,9 +35,9 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // Only images up to 30MB in size are supported. message Image { // Input only. The data representing the image. - // For Predict calls [image_bytes][] must be set, as other options are not + // For Predict calls [image_bytes][google.cloud.automl.v1beta1.Image.image_bytes] must be set, as other options are not // currently supported by prediction API. You can read the contents of an - // uploaded image by using the [content_uri][] field. + // uploaded image by using the [content_uri][google.cloud.automl.v1beta1.Image.content_uri] field. oneof data { // Image content represented as a stream of bytes. // Note: As with all `bytes` fields, protobuffers use a pure binary @@ -56,26 +58,134 @@ message TextSnippet { // characters long. string content = 1; - // The format of the source text. Currently the only two allowed values are - // "text/html" and "text/plain". If left blank the format is automatically - // determined from the type of the uploaded content. + // Optional. The format of [content][google.cloud.automl.v1beta1.TextSnippet.content]. Currently the only two allowed + // values are "text/html" and "text/plain". If left blank, the format is + // automatically determined from the type of the uploaded [content][google.cloud.automl.v1beta1.TextSnippet.content]. string mime_type = 2; // Output only. HTTP URI where you can download the content. string content_uri = 4; } +// Message that describes dimension of a document. +message DocumentDimensions { + // Unit of the document dimension. + enum DocumentDimensionUnit { + // Should not be used. + DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0; + + // Document dimension is measured in inches. + INCH = 1; + + // Document dimension is measured in centimeters. + CENTIMETER = 2; + + // Document dimension is measured in points. 72 points = 1 inch. + POINT = 3; + } + + // Unit of the dimension. + DocumentDimensionUnit unit = 1; + + // Width value of the document, works together with the unit. + float width = 2; + + // Height value of the document, works together with the unit. + float height = 3; +} + // A structured text document e.g. a PDF. message Document { + // Describes the layout information of a [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the document. + message Layout { + // The type of TextSegment in the context of the original document. + enum TextSegmentType { + // Should not be used. + TEXT_SEGMENT_TYPE_UNSPECIFIED = 0; + + // The text segment is a token. e.g. word. + TOKEN = 1; + + // The text segment is a paragraph. + PARAGRAPH = 2; + + // The text segment is a form field. + FORM_FIELD = 3; + + // The text segment is the name part of a form field. It will be treated + // as child of another FORM_FIELD TextSegment if its span is subspan of + // another TextSegment with type FORM_FIELD. + FORM_FIELD_NAME = 4; + + // The text segment is the text content part of a form field. It will be + // treated as child of another FORM_FIELD TextSegment if its span is + // subspan of another TextSegment with type FORM_FIELD. + FORM_FIELD_CONTENTS = 5; + + // The text segment is a whole table, including headers, and all rows. + TABLE = 6; + + // The text segment is a table's headers. It will be treated as child of + // another TABLE TextSegment if its span is subspan of another TextSegment + // with type TABLE. + TABLE_HEADER = 7; + + // The text segment is a row in table. It will be treated as child of + // another TABLE TextSegment if its span is subspan of another TextSegment + // with type TABLE. + TABLE_ROW = 8; + + // The text segment is a cell in table. It will be treated as child of + // another TABLE_ROW TextSegment if its span is subspan of another + // TextSegment with type TABLE_ROW. + TABLE_CELL = 9; + } + + // Text Segment that represents a segment in + // [document_text][google.cloud.automl.v1beta1.Document.document_text]. + TextSegment text_segment = 1; + + // Page number of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the original document, starts + // from 1. + int32 page_number = 2; + + // The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page. + // Contains exactly 4 + // + // [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices] + // and they are connected by edges in the order provided, which will + // represent a rectangle parallel to the frame. The + // [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are + // relative to the page. + // Coordinates are based on top-left as point (0,0). + BoundingPoly bounding_poly = 3; + + // The type of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in document. + TextSegmentType text_segment_type = 4; + } + // An input config specifying the content of the document. DocumentInputConfig input_config = 1; + + // The plain text version of this document. + TextSnippet document_text = 2; + + // Describes the layout of the document. + // Sorted by [page_number][]. + repeated Layout layout = 3; + + // The dimensions of the page in the document. + DocumentDimensions document_dimensions = 4; + + // Number of pages in the document. + int32 page_count = 5; } // A representation of a row in a relational table. message Row { - // Input Only. // The resource IDs of the column specs describing the columns of the row. - // If set must contain, but possibly in a different order, all input feature + // If set must contain, but possibly in a different order, all input + // feature // // [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] // of the Model this row is being passed to. @@ -83,9 +193,9 @@ message Row { // field is set. repeated string column_spec_ids = 2; - // Input Only. - // The values of the row cells, given in the same order as the - // column_spec_ids, or, if not set, then in the same order as input feature + // Required. The values of the row cells, given in the same order as the + // column_spec_ids, or, if not set, then in the same order as input + // feature // // [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] // of the Model this row is being passed to. diff --git a/google/cloud/automl/v1beta1/data_stats.proto b/google/cloud/automl/v1beta1/data_stats.proto index 5d941a5ba..c13a5d451 100644 --- a/google/cloud/automl/v1beta1/data_stats.proto +++ b/google/cloud/automl/v1beta1/data_stats.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/cloud/automl/v1beta1/data_types.proto b/google/cloud/automl/v1beta1/data_types.proto index e97314508..6f77f56b9 100644 --- a/google/cloud/automl/v1beta1/data_types.proto +++ b/google/cloud/automl/v1beta1/data_types.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -27,14 +26,6 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // `TypeCode` is used as a part of // [DataType][google.cloud.automl.v1beta1.DataType]. -// -// Each legal value of a DataType can be encoded to or decoded from a JSON -// value, using the encodings listed below, and definitions of which can be -// found at -// -// https: -// //developers.google.com/protocol-buffers -// // /docs/reference/google.protobuf#value. enum TypeCode { // Not specified. Should not be used. TYPE_CODE_UNSPECIFIED = 0; diff --git a/google/cloud/automl/v1beta1/dataset.proto b/google/cloud/automl/v1beta1/dataset.proto index e07b17841..8d1b8d937 100644 --- a/google/cloud/automl/v1beta1/dataset.proto +++ b/google/cloud/automl/v1beta1/dataset.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.automl.v1beta1; +import "google/api/resource.proto"; import "google/cloud/automl/v1beta1/image.proto"; import "google/cloud/automl/v1beta1/tables.proto"; import "google/cloud/automl/v1beta1/text.proto"; @@ -34,6 +34,11 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // A workspace for solving a single, particular machine learning (ML) problem. // A workspace contains examples that may be annotated. message Dataset { + option (google.api.resource) = { + type: "automl.googleapis.com/Dataset" + pattern: "projects/{project}/locations/{location}/datasets/{dataset}" + }; + // Required. // The dataset metadata that is specific to the problem type. oneof dataset_metadata { diff --git a/google/cloud/automl/v1beta1/detection.proto b/google/cloud/automl/v1beta1/detection.proto index 66f0b2fc1..c5864e209 100644 --- a/google/cloud/automl/v1beta1/detection.proto +++ b/google/cloud/automl/v1beta1/detection.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -29,20 +28,17 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // Annotation details for image object detection. message ImageObjectDetectionAnnotation { - // Output only. - // The rectangle representing the object location. + // Output only. The rectangle representing the object location. BoundingPoly bounding_box = 1; - // Output only. - // The confidence that this annotation is positive for the parent example, + // Output only. The confidence that this annotation is positive for the parent example, // value in [0, 1], higher means higher positivity confidence. float score = 2; } // Annotation details for video object tracking. message VideoObjectTrackingAnnotation { - // Optional. - // The instance of the object, expressed as a positive integer. Used to tell + // Optional. The instance of the object, expressed as a positive integer. Used to tell // apart objects of the same type (i.e. AnnotationSpec) when multiple are // present on a single example. // NOTE: Instance ID prediction quality is not a part of model evaluation and @@ -59,8 +55,7 @@ message VideoObjectTrackingAnnotation { // at the time_offset of the video). BoundingPoly bounding_box = 3; - // Output only. - // The confidence that this annotation is positive for the video at + // Output only. The confidence that this annotation is positive for the video at // the time_offset, value in [0, 1], higher means higher positivity // confidence. For annotations created by the user the score is 1. When // user approves an annotation, the original float score is kept (and not diff --git a/google/cloud/automl/v1beta1/geometry.proto b/google/cloud/automl/v1beta1/geometry.proto index e5379ab14..d5654aaca 100644 --- a/google/cloud/automl/v1beta1/geometry.proto +++ b/google/cloud/automl/v1beta1/geometry.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/cloud/automl/v1beta1/image.proto b/google/cloud/automl/v1beta1/image.proto index c1596c634..960eaeb01 100644 --- a/google/cloud/automl/v1beta1/image.proto +++ b/google/cloud/automl/v1beta1/image.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.automl.v1beta1; +import "google/api/resource.proto"; import "google/cloud/automl/v1beta1/annotation_spec.proto"; import "google/cloud/automl/v1beta1/classification.proto"; import "google/protobuf/timestamp.proto"; @@ -96,6 +96,15 @@ message ImageClassificationModelMetadata { // should also have a higher prediction quality than other // models. string model_type = 7; + + // Output only. An approximate number of online prediction QPS that can + // be supported by this model per each node on which it is deployed. + double node_qps = 13; + + // Output only. The number of nodes this model is deployed on. A node is an + // abstraction of a machine resource, which can handle online prediction QPS + // as given in the node_qps field. + int64 node_count = 14; } // Model metadata specific to image object detection. @@ -108,6 +117,21 @@ message ImageObjectDetectionModelMetadata { // * `cloud-low-latency-1` - A model to be used via prediction // calls to AutoML API. Expected to have low latency, but may // have lower prediction quality than other models. + // * `mobile-low-latency-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. Expected to have low latency, but + // may have lower prediction quality than other models. + // * `mobile-versatile-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. + // * `mobile-high-accuracy-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. Expected to have a higher + // latency, but should also have a higher prediction quality + // than other models. string model_type = 1; // Output only. The number of nodes this model is deployed on. A node is an @@ -128,9 +152,16 @@ message ImageObjectDetectionModelMetadata { // `train_cost` will be equal or less than this value. If further model // training ceases to provide any improvements, it will stop without using // full budget and the stop_reason will be `MODEL_CONVERGED`. - // Note, node_hour = actual_hour * number_of_nodes_invovled. The train budget - // must be between 20,000 and 2,000,000 milli node hours, inclusive. The - // default value is 216, 000 which represents one day in wall time. + // Note, node_hour = actual_hour * number_of_nodes_invovled. + // For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, + // the train budget must be between 20,000 and 900,000 milli node hours, + // inclusive. The default value is 216, 000 which represents one day in + // wall time. + // For model type `mobile-low-latency-1`, `mobile-versatile-1`, + // `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, + // `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train + // budget must be between 1,000 and 100,000 milli node hours, inclusive. + // The default value is 24, 000 which represents one day in wall time. int64 train_budget_milli_node_hours = 6; // Output only. The actual train cost of creating this model, expressed in @@ -139,6 +170,17 @@ message ImageObjectDetectionModelMetadata { int64 train_cost_milli_node_hours = 7; } +// Model deployment metadata specific to Image Classification. +message ImageClassificationModelDeploymentMetadata { + // Input only. The number of nodes to deploy the model on. A node is an + // abstraction of a machine resource, which can handle online prediction QPS + // as given in the model's + // + // [node_qps][google.cloud.automl.v1beta1.ImageClassificationModelMetadata.node_qps]. + // Must be between 1 and 100, inclusive on both ends. + int64 node_count = 1; +} + // Model deployment metadata specific to Image Object Detection. message ImageObjectDetectionModelDeploymentMetadata { // Input only. The number of nodes to deploy the model on. A node is an diff --git a/google/cloud/automl/v1beta1/io.proto b/google/cloud/automl/v1beta1/io.proto index cab08b3b7..a99793830 100644 --- a/google/cloud/automl/v1beta1/io.proto +++ b/google/cloud/automl/v1beta1/io.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -32,10 +31,10 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] // is expected, unless specified otherwise. Additionally any input .CSV file // by itself must be 100MB or smaller, unless specified otherwise. -// If an "example" file (i.e. image, video etc.) with identical content +// If an "example" file (that is, image, video etc.) with identical content // (even if it had different GCS_FILE_PATH) is mentioned multiple times, then // its label, bounding boxes etc. are appended. The same file should be always -// provided with the same ML_USE and GCS_FILE_PATH, if it is not then +// provided with the same ML_USE and GCS_FILE_PATH, if it is not, then // these values are nondeterministically selected from the given ones. // // The formats are represented in EBNF with commas being literal and with @@ -65,12 +64,16 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // BOUNDING_BOX-es per image are allowed (one BOUNDING_BOX is defined // per line). If an image has not yet been labeled, then it should be // mentioned just once with no LABEL and the ",,,,,,," in place of the +// BOUNDING_BOX. For images which are known to not contain any +// bounding boxes, they should be labelled explictly as +// "NEGATIVE_IMAGE", followed by ",,,,,,," in place of the // BOUNDING_BOX. -// Four sample rows: +// Sample rows: // TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, // TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, // UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 // TEST,gs://folder/im3.png,,,,,,,,, +// TRAIN,gs://folder/im4.png,NEGATIVE_IMAGE,,,,,,,,, // // * For Video Classification: // CSV file(s) with each line in format: @@ -135,21 +138,26 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // * For Text Extraction: // CSV file(s) with each line in format: // ML_USE,GCS_FILE_PATH -// GCS_FILE_PATH leads to a .JSONL (i.e. JSON Lines) file which either -// imports text in-line or as documents. +// GCS_FILE_PATH leads to a .JSONL (that is, JSON Lines) file which +// either imports text in-line or as documents. Any given +// .JSONL file must be 100MB or smaller. // The in-line .JSONL file contains, per line, a proto that wraps a -// TextSnippet proto (in json representation) followed by one or -// more AnnotationPayload protos (called annotations), which have -// display_name and text_extraction detail populated. -// The given text is expected to be annotated exhaustively, e.g. if -// you look for animals and text contains "dolphin" that is not -// labeled, then "dolphin" will be assumed to not be an animal. Any -// given text snippet content must have 30,000 characters or less, -// and also be UTF-8 NFC encoded (ASCII already is). The document .JSONL file contains, per line, a proto that wraps a -// Document proto with input_config set. Only PDF documents are -// supported now, and each document may be up to 2MB large. -// Currently annotations on documents cannot be specified at import. -// Any given .JSONL file must be 100MB or smaller. +// TextSnippet proto (in json representation) followed by one or more +// AnnotationPayload protos (called annotations), which have +// display_name and text_extraction detail populated. The given text +// is expected to be annotated exhaustively, for example, if you look +// for animals and text contains "dolphin" that is not labeled, then +// "dolphin" is assumed to not be an animal. Any given text snippet +// content must be 10KB or smaller, and also be UTF-8 NFC encoded +// (ASCII already is). +// The document .JSONL file contains, per line, a proto that wraps a +// Document proto. The Document proto must have either document_text +// or input_config set. In document_text case, the Document proto may +// also contain the spatial information of the document, including +// layout, document dimension and page number. In input_config case, +// only PDF documents are supported now, and each document may be up +// to 2MB large. Currently, annotations on documents cannot be +// specified at import. // Three sample CSV rows: // TRAIN,gs://folder/file1.jsonl // VALIDATE,gs://folder/file2.jsonl @@ -158,27 +166,61 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // with artificial line breaks, but the only actual line break is // denoted by \n).: // { -// "text_snippet": { -// "content": "dog car cat" -// } "annotations": [ -// { -// "display_name": "animal", -// "text_extraction": { -// "text_segment": {"start_offset": 0, "end_offset": 3} +// "document": { +// "document_text": {"content": "dog cat"} +// "layout": [ +// { +// "text_segment": { +// "start_offset": 0, +// "end_offset": 3, +// }, +// "page_number": 1, +// "bounding_poly": { +// "normalized_vertices": [ +// {"x": 0.1, "y": 0.1}, +// {"x": 0.1, "y": 0.3}, +// {"x": 0.3, "y": 0.3}, +// {"x": 0.3, "y": 0.1}, +// ], +// }, +// "text_segment_type": TOKEN, +// }, +// { +// "text_segment": { +// "start_offset": 4, +// "end_offset": 7, +// }, +// "page_number": 1, +// "bounding_poly": { +// "normalized_vertices": [ +// {"x": 0.4, "y": 0.1}, +// {"x": 0.4, "y": 0.3}, +// {"x": 0.8, "y": 0.3}, +// {"x": 0.8, "y": 0.1}, +// ], +// }, +// "text_segment_type": TOKEN, // } -// }, +// +// ], +// "document_dimensions": { +// "width": 8.27, +// "height": 11.69, +// "unit": INCH, +// } +// "page_count": 1, +// }, +// "annotations": [ // { -// "display_name": "vehicle", -// "text_extraction": { -// "text_segment": {"start_offset": 4, "end_offset": 7} -// } +// "display_name": "animal", +// "text_extraction": {"text_segment": {"start_offset": 0, +// "end_offset": 3}} // }, // { // "display_name": "animal", -// "text_extraction": { -// "text_segment": {"start_offset": 8, "end_offset": 11} -// } -// }, +// "text_extraction": {"text_segment": {"start_offset": 4, +// "end_offset": 7}} +// } // ], // }\n // { @@ -219,44 +261,44 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If // the column content is a valid gcs file path, i.e. prefixed by // "gs://", it will be treated as a GCS_FILE_PATH, else if the content -// is enclosed within double quotes (""), it will -// be treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path -// must lead to a .txt file with UTF-8 encoding, e.g. -// "gs://folder/content.txt", and the content in it will be extracted +// is enclosed within double quotes (""), it is +// treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path +// must lead to a .txt file with UTF-8 encoding, for example, +// "gs://folder/content.txt", and the content in it is extracted // as a text snippet. In TEXT_SNIPPET case, the column content -// excluding quotes will be treated as to be imported text snippet. In +// excluding quotes is treated as to be imported text snippet. In // both cases, the text snippet/file size must be within 128kB. // Maximum 100 unique labels are allowed per CSV row. -// Four sample rows: -// TRAIN,"They have bad food and very rude",RudeService,BadFood -// TRAIN,gs://folder/content.txt,SlowService -// TEST,"Typically always bad service there.",RudeService -// VALIDATE,"Stomach ache to go.",BadFood +// Sample rows: +// TRAIN,"They have bad food and very rude",RudeService,BadFood +// TRAIN,gs://folder/content.txt,SlowService +// TEST,"Typically always bad service there.",RudeService +// VALIDATE,"Stomach ache to go.",BadFood // // * For Text Sentiment: // CSV file(s) with each line in format: // ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT // TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If -// the column content is a valid gcs file path, i.e. prefixed by -// "gs://", it will be treated as a GCS_FILE_PATH, otherwise it will -// be treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path -// must lead to a .txt file with UTF-8 encoding, e.g. -// "gs://folder/content.txt", and the content in it will be extracted +// the column content is a valid gcs file path, that is, prefixed by +// "gs://", it is treated as a GCS_FILE_PATH, otherwise it is treated +// as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path +// must lead to a .txt file with UTF-8 encoding, for example, +// "gs://folder/content.txt", and the content in it is extracted // as a text snippet. In TEXT_SNIPPET case, the column content itself -// will be treated as to be imported text snippet. In both cases, the +// is treated as to be imported text snippet. In both cases, the // text snippet must be up to 500 characters long. -// Four sample rows: -// TRAIN,"@freewrytin God is way too good for Claritin",2 -// TRAIN,"I need Claritin so bad",3 -// TEST,"Thank god for Claritin.",4 -// VALIDATE,gs://folder/content.txt,2 +// Sample rows: +// TRAIN,"@freewrytin this is way too good for your product",2 +// TRAIN,"I need this product so bad",3 +// TEST,"Thank you for this product.",4 +// VALIDATE,gs://folder/content.txt,2 // // * For Tables: // Either // [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or // // [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source] -// can be used. All inputs will be concatenated into a single +// can be used. All inputs is concatenated into a single // // [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_name] // For gcs_source: @@ -279,7 +321,6 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // An imported table must have between 2 and 1,000 columns, inclusive, // and between 1000 and 100,000,000 rows, inclusive. There are at most 5 // import data running in parallel. -// // Definitions: // ML_USE = "TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED" // Describes how the given example (file) should be used for model @@ -338,7 +379,7 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // If any of the provided CSV files can't be parsed or if more than certain // percent of CSV rows cannot be processed then the operation fails and // nothing is imported. Regardless of overall success or failure the per-row -// failures, up to a certain count cap, will be listed in +// failures, up to a certain count cap, is listed in // Operation.metadata.partial_failures. // message InputConfig { @@ -375,6 +416,28 @@ message InputConfig { // The formats are represented in EBNF with commas being literal and with // non-terminal symbols defined near the end of this comment. The formats // are: +// +// * For Image Classification: +// CSV file(s) with each line having just a single column: +// GCS_FILE_PATH +// which leads to image of up to 30MB in size. Supported +// extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in +// the Batch predict output. +// Three sample rows: +// gs://folder/image1.jpeg +// gs://folder/image2.gif +// gs://folder/image3.png +// +// * For Image Object Detection: +// CSV file(s) with each line having just a single column: +// GCS_FILE_PATH +// which leads to image of up to 30MB in size. Supported +// extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in +// the Batch predict output. +// Three sample rows: +// gs://folder/image1.jpeg +// gs://folder/image2.gif +// gs://folder/image3.png // * For Video Classification: // CSV file(s) with each line in format: // GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END @@ -398,6 +461,28 @@ message InputConfig { // gs://folder/video1.mp4,10,240 // gs://folder/video1.mp4,300,360 // gs://folder/vid2.mov,0,inf +// * For Text Classification: +// CSV file(s) with each line having just a single column: +// GCS_FILE_PATH | TEXT_SNIPPET +// Any given text file can have size upto 128kB. +// Any given text snippet content must have 60,000 characters or less. +// Three sample rows: +// gs://folder/text1.txt +// "Some text content to predict" +// gs://folder/text3.pdf +// Supported file extensions: .txt, .pdf +// +// * For Text Sentiment: +// CSV file(s) with each line having just a single column: +// GCS_FILE_PATH | TEXT_SNIPPET +// Any given text file can have size upto 128kB. +// Any given text snippet content must have 500 characters or less. +// Three sample rows: +// gs://folder/text1.txt +// "Some text content to predict" +// gs://folder/text3.pdf +// Supported file extensions: .txt, .pdf +// // * For Text Extraction // .JSONL (i.e. JSON Lines) file(s) which either provide text in-line or // as documents (for a single BatchPredict call only one of the these @@ -470,101 +555,51 @@ message InputConfig { // 100GB or smaller, where first file must have a header containing // column names. If the first row of a subsequent file is the same as // the header, then it is also treated as a header. All other rows -// contain values for the corresponding columns. For all -// CLASSIFICATION and REGRESSION -// -// [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: -// The column names must contain the model's +// contain values for the corresponding columns. +// The column names must contain the model's // // [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] // // [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name] -// (order doesn't matter). The columns corresponding to the model's -// input feature column specs must contain values compatible with -// the column spec's data types. Prediction on all the rows, i.e. -// the CSV lines, will be attempted. First three sample rows of a -// CSV file: +// (order doesn't matter). The columns corresponding to the model's +// input feature column specs must contain values compatible with the +// column spec's data types. Prediction on all the rows, i.e. the CSV +// lines, will be attempted. For FORECASTING +// +// [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: +// all columns having +// +// [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] +// type will be ignored. +// First three sample rows of a CSV file: // "First Name","Last Name","Dob","Addresses" // // "John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" // // "Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} -// For FORECASTING -// -// [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: -// The column names must contain the union of the model's -// -// [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] -// -// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name] -// and -// -// [target_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] -// -// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name] -// (order doesn't matter), with values compatible with these column -// specs data types, except as specified below. -// The input rows must contain not only the to-be-predicted rows -// but also the historical data rows, even if they would be -// identical as the ones on which the model has been trained. -// The historical rows must have non-NULL target column -// values. The to-be-predicted rows must have NULL values in the -// target column and all columns having -// -// [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType.KEY] -// type, regardless if these columns are -// [nullable][google.cloud.automl.v1beta1.DataType.nullable]. -// Prediction only on the to-be-predicted rows will be attempted. -// First four sample rows of a CSV file: -// -// "Year","City","OlympicsThatYear","Population","WaterUsedGigaGallons" -// "2000","NYC","true","8008278","452.7" -// "2001","NYC","false","8024963","432.2" -// "2002","NYC","true","","" // BigQuery case: // An URI of a BigQuery table. The user data size of the BigQuery // table must be 100GB or smaller. -// For all CLASSIFICATION and REGRESSION -// -// [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: -// The column names must contain the model's +// The column names must contain the model's // // [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] // // [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name] -// (order doesn't matter). The columns corresponding to the model's -// input feature column specs must contain values compatible with -// the column spec's data types. Prediction on all the rows of the -// table will be attempted. -// For FORECASTING +// (order doesn't matter). The columns corresponding to the model's +// input feature column specs must contain values compatible with the +// column spec's data types. Prediction on all the rows of the table +// will be attempted. For FORECASTING // // [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: -// The column names must contain the union of the model's +// all columns having // -// [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] -// -// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name] -// and -// -// [target_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] -// -// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name] -// (order doesn't matter), with values compatible with these column -// specs data types, except as specified below. -// The table's rows must contain not only the to-be-predicted rows -// but also the historical data rows, even if they would be -// identical as the ones on which the model has been trained. -// The historical rows must have non-NULL target column values. -// The to-be-predicted rows must have NULL values in the -// target column and all columns having -// -// [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType.KEY] -// type, regardless if these columns are -// [nullable][google.cloud.automl.v1beta1.DataType.nullable]. -// Prediction only on the to-be-predicted rows will be attempted. +// [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] +// type will be ignored. // // Definitions: // GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/video.avi". +// TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within +// double quotes ("") // TIME_SEGMENT_START = TIME_OFFSET // Expresses a beginning, inclusive, of a time segment // within an @@ -656,11 +691,55 @@ message OutputConfig { // // [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination] // must be set unless specified otherwise for a domain. If gcs_destination is -// set then in the given directory a new directory will be created. Its name +// set then in the given directory a new directory is created. Its name // will be // "prediction--", // where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents // of it depends on the ML problem the predictions are made for. +// +// * For Image Classification: +// In the created directory files `image_classification_1.jsonl`, +// `image_classification_2.jsonl`,...,`image_classification_N.jsonl` +// will be created, where N may be 1, and depends on the +// total number of the successfully predicted images and annotations. +// A single image will be listed only once with all its annotations, +// and its annotations will never be split across files. +// Each .JSONL file will contain, per line, a JSON representation of a +// proto that wraps image's "ID" : "" followed by a list of +// zero or more AnnotationPayload protos (called annotations), which +// have classification detail populated. +// If prediction for any image failed (partially or completely), then an +// additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` +// files will be created (N depends on total number of failed +// predictions). These files will have a JSON representation of a proto +// that wraps the same "ID" : "" but here followed by +// exactly one +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// containing only `code` and `message`fields. +// +// * For Image Object Detection: +// In the created directory files `image_object_detection_1.jsonl`, +// `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` +// will be created, where N may be 1, and depends on the +// total number of the successfully predicted images and annotations. +// Each .JSONL file will contain, per line, a JSON representation of a +// proto that wraps image's "ID" : "" followed by a list of +// zero or more AnnotationPayload protos (called annotations), which +// have image_object_detection detail populated. A single image will +// be listed only once with all its annotations, and its annotations +// will never be split across files. +// If prediction for any image failed (partially or completely), then +// additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` +// files will be created (N depends on total number of failed +// predictions). These files will have a JSON representation of a proto +// that wraps the same "ID" : "" but here followed by +// exactly one +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// containing only `code` and `message`fields. // * For Video Classification: // In the created directory a video_classification.csv file, and a .JSON // file per each video classification requested in the input (i.e. each @@ -713,6 +792,54 @@ message OutputConfig { // for each frame of the video time segment the file is assigned to in // video_object_tracking.csv. All AnnotationPayload protos will have // video_object_tracking field set. +// * For Text Classification: +// In the created directory files `text_classification_1.jsonl`, +// `text_classification_2.jsonl`,...,`text_classification_N.jsonl` +// will be created, where N may be 1, and depends on the +// total number of inputs and annotations found. +// +// Each .JSONL file will contain, per line, a JSON representation of a +// proto that wraps input text snippet or input text file and a list of +// zero or more AnnotationPayload protos (called annotations), which +// have classification detail populated. A single text snippet or file +// will be listed only once with all its annotations, and its +// annotations will never be split across files. +// +// If prediction for any text snippet or file failed (partially or +// completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., +// `errors_N.jsonl` files will be created (N depends on total number of +// failed predictions). These files will have a JSON representation of a +// proto that wraps input text snippet or input text file followed by +// exactly one +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// containing only `code` and `message`. +// +// * For Text Sentiment: +// In the created directory files `text_sentiment_1.jsonl`, +// `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` +// will be created, where N may be 1, and depends on the +// total number of inputs and annotations found. +// +// Each .JSONL file will contain, per line, a JSON representation of a +// proto that wraps input text snippet or input text file and a list of +// zero or more AnnotationPayload protos (called annotations), which +// have text_sentiment detail populated. A single text snippet or file +// will be listed only once with all its annotations, and its +// annotations will never be split across files. +// +// If prediction for any text snippet or file failed (partially or +// completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., +// `errors_N.jsonl` files will be created (N depends on total number of +// failed predictions). These files will have a JSON representation of a +// proto that wraps input text snippet or input text file followed by +// exactly one +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// containing only `code` and `message`. +// // * For Text Extraction: // In the created directory files `text_extraction_1.jsonl`, // `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` @@ -722,7 +849,8 @@ message OutputConfig { // used inline text, or documents. // If input was inline, then each .JSONL file will contain, per line, // a JSON representation of a proto that wraps given in request text -// snippet's "id" : "" followed by a list of zero or more +// snippet's "id" (if specified), followed by input text snippet, +// and a list of zero or more // AnnotationPayload protos (called annotations), which have // text_extraction detail populated. A single text snippet will be // listed only once with all its annotations, and its annotations will @@ -857,7 +985,7 @@ message ModelExportOutputConfig { oneof destination { // The Google Cloud Storage location where the model is to be written to. // This location may only be set for the following model formats: - // "tflite", "edgetpu_tflite", "core_ml", "docker". + // "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". // // Under the directory given as the destination a new one with name // "model-export--", @@ -881,7 +1009,8 @@ message ModelExportOutputConfig { // // * For Image Classification mobile-low-latency-1, mobile-versatile-1, // mobile-high-accuracy-1: - // "tflite" (default), "edgetpu_tflite", "tf_saved_model", "docker". + // "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", + // "docker". // // * For Image Classification mobile-core-ml-low-latency-1, // mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: @@ -892,10 +1021,15 @@ message ModelExportOutputConfig { // * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/) // devices. // * tf_saved_model - A tensorflow model in SavedModel format. + // * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can + // be used in the browser and in Node.js using JavaScript. // * docker - Used for Docker containers. Use the params field to customize // the container. The container is verified to work correctly on // ubuntu 16.04 operating system. See more at - // [containers quickstart](https://cloud.google.com/vision/automl/docs/containers-gcs-quickstart) + // [containers + // + // quickstart](https: + // //cloud.google.com/vision/automl/docs/containers-gcs-quickstart) // * core_ml - Used for iOS mobile devices. string model_format = 4; diff --git a/google/cloud/automl/v1beta1/model.proto b/google/cloud/automl/v1beta1/model.proto index ecac533e1..2b2e8d73f 100644 --- a/google/cloud/automl/v1beta1/model.proto +++ b/google/cloud/automl/v1beta1/model.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.automl.v1beta1; +import "google/api/resource.proto"; import "google/cloud/automl/v1beta1/image.proto"; import "google/cloud/automl/v1beta1/tables.proto"; import "google/cloud/automl/v1beta1/text.proto"; @@ -33,6 +33,11 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // API proto representing a trained machine learning model. message Model { + option (google.api.resource) = { + type: "automl.googleapis.com/Model" + pattern: "projects/{project}/locations/{location}/models/{model}" + }; + // Deployment state of the model. enum DeploymentState { // Should not be used, an un-set enum has this value by default. @@ -77,8 +82,7 @@ message Model { TextSentimentModelMetadata text_sentiment_model_metadata = 22; } - // Output only. - // Resource name of the model. + // Output only. Resource name of the model. // Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` string name = 1; @@ -88,17 +92,14 @@ message Model { // (_), and ASCII digits 0-9. It must start with a letter. string display_name = 2; - // Required. - // The resource ID of the dataset used to create the model. The dataset must + // Required. The resource ID of the dataset used to create the model. The dataset must // come from the same ancestor project and location. string dataset_id = 3; - // Output only. - // Timestamp when the model training finished and can be used for prediction. + // Output only. Timestamp when the model training finished and can be used for prediction. google.protobuf.Timestamp create_time = 7; - // Output only. - // Timestamp when this model was last updated. + // Output only. Timestamp when this model was last updated. google.protobuf.Timestamp update_time = 11; // Output only. Deployment state of the model. A model can only serve diff --git a/google/cloud/automl/v1beta1/model_evaluation.proto b/google/cloud/automl/v1beta1/model_evaluation.proto index f84ae62f6..d5633fcdf 100644 --- a/google/cloud/automl/v1beta1/model_evaluation.proto +++ b/google/cloud/automl/v1beta1/model_evaluation.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.automl.v1beta1; +import "google/api/resource.proto"; import "google/cloud/automl/v1beta1/classification.proto"; import "google/cloud/automl/v1beta1/detection.proto"; import "google/cloud/automl/v1beta1/regression.proto"; @@ -35,6 +35,11 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // Evaluation results of a model. message ModelEvaluation { + option (google.api.resource) = { + type: "automl.googleapis.com/ModelEvaluation" + pattern: "projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}" + }; + // Output only. Problem type specific evaluation metrics. oneof metrics { // Model evaluation metrics for image, text, video and tables @@ -64,15 +69,13 @@ message ModelEvaluation { TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; } - // Output only. - // Resource name of the model evaluation. + // Output only. Resource name of the model evaluation. // Format: // // `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` string name = 1; - // Output only. - // The ID of the annotation spec that the model evaluation applies to. The + // Output only. The ID of the annotation spec that the model evaluation applies to. The // The ID is empty for the overall model evaluation. // For Tables annotation specs in the dataset do not exist and this ID is // always not set, but for CLASSIFICATION @@ -84,7 +87,7 @@ message ModelEvaluation { string annotation_spec_id = 2; // Output only. The value of - // [display_name][google.cloud.automl.v1beta1.AnnotationSpec.dispay_name] at + // [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] at // the moment when the model was trained. Because this field returns a value // at model training time, for different models trained from the same dataset, // the values may differ, since display names could had been changed between @@ -97,12 +100,10 @@ message ModelEvaluation { // The display_name is empty for the overall model evaluation. string display_name = 15; - // Output only. - // Timestamp when this model evaluation was created. + // Output only. Timestamp when this model evaluation was created. google.protobuf.Timestamp create_time = 5; - // Output only. - // The number of examples used for model evaluation, i.e. for + // Output only. The number of examples used for model evaluation, i.e. for // which ground truth from time of model creation is compared against the // predicted annotations created by the model. // For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is diff --git a/google/cloud/automl/v1beta1/operations.proto b/google/cloud/automl/v1beta1/operations.proto index aba18cd67..cce3fedc5 100644 --- a/google/cloud/automl/v1beta1/operations.proto +++ b/google/cloud/automl/v1beta1/operations.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/cloud/automl/v1beta1/prediction_service.proto b/google/cloud/automl/v1beta1/prediction_service.proto index b45f35316..0bcf685e0 100644 --- a/google/cloud/automl/v1beta1/prediction_service.proto +++ b/google/cloud/automl/v1beta1/prediction_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,19 +11,20 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.automl.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/automl/v1beta1/annotation_payload.proto"; import "google/cloud/automl/v1beta1/data_items.proto"; import "google/cloud/automl/v1beta1/io.proto"; import "google/cloud/automl/v1beta1/operations.proto"; import "google/longrunning/operations.proto"; -import "google/api/client.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; option java_multiple_files = true; @@ -57,11 +58,14 @@ service PredictionService { // up to 5MB. Not available for FORECASTING // // [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. + // * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 + // encoded. rpc Predict(PredictRequest) returns (PredictResponse) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/models/*}:predict" body: "*" }; + option (google.api.method_signature) = "name,payload,params"; } // Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch @@ -71,27 +75,37 @@ service PredictionService { // method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in // the [response][google.longrunning.Operation.response] field. // Available for following ML problems: + // * Image Classification + // * Image Object Detection // * Video Classification - // * Video Object Tracking - // * Text Extraction + // * Video Object Tracking * Text Extraction // * Tables rpc BatchPredict(BatchPredictRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/models/*}:batchPredict" body: "*" }; + option (google.api.method_signature) = "name,input_config,output_config,params"; + option (google.longrunning.operation_info) = { + response_type: "BatchPredictResult" + metadata_type: "OperationMetadata" + }; } } // Request message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict]. message PredictRequest { - // Name of the model requested to serve the prediction. - string name = 1; + // Required. Name of the model requested to serve the prediction. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; - // Required. - // Payload to perform a prediction on. The payload must match the + // Required. Payload to perform a prediction on. The payload must match the // problem type that the model was trained to solve. - ExamplePayload payload = 2; + ExamplePayload payload = 2 [(google.api.field_behavior) = REQUIRED]; // Additional domain-specific parameters, any string must be up to 25000 // characters long. @@ -101,13 +115,17 @@ message PredictRequest { // `score_threshold` - (float) A value from 0.0 to 1.0. When the model // makes predictions for an image, it will only produce results that have // at least this confidence score. The default is 0.5. - // * For Tables: - // `feature_importance` - (boolean) Whether // - // [feature_importance][[google.cloud.automl.v1beta1.TablesModelColumnInfo.feature_importance] - // should be populated in the returned - // - // [TablesAnnotation(-s)][[google.cloud.automl.v1beta1.TablesAnnotation]. + // * For Image Object Detection: + // `score_threshold` - (float) When Model detects objects on the image, + // it will only produce bounding boxes which have at least this + // confidence score. Value in 0 to 1 range, default is 0.5. + // `max_bounding_box_count` - (int64) No more than this number of bounding + // boxes will be returned in the response. Default is 100, the + // requested value may be limited by server. + // * For Tables: + // feature_importance - (boolean) Whether feature importance + // should be populated in the returned TablesAnnotation. // The default is false. map params = 3; } @@ -118,6 +136,13 @@ message PredictResponse { // Translation and Text Sentiment will return precisely one payload. repeated AnnotationPayload payload = 1; + // The preprocessed example that AutoML actually makes prediction on. + // Empty if AutoML does not preprocess the input example. + // * For Text Extraction: + // If the input is a .pdf file, the OCR'ed text will be provided in + // [document_text][google.cloud.automl.v1beta1.Document.document_text]. + ExamplePayload preprocessed_input = 3; + // Additional domain-specific prediction response metadata. // // * For Image Object Detection: @@ -138,20 +163,47 @@ message PredictResponse { // Request message for [PredictionService.BatchPredict][google.cloud.automl.v1beta1.PredictionService.BatchPredict]. message BatchPredictRequest { - // Name of the model requested to serve the batch prediction. - string name = 1; + // Required. Name of the model requested to serve the batch prediction. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; // Required. The input configuration for batch prediction. - BatchPredictInputConfig input_config = 3; + BatchPredictInputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The Configuration specifying where output predictions should // be written. - BatchPredictOutputConfig output_config = 4; + BatchPredictOutputConfig output_config = 4 [(google.api.field_behavior) = REQUIRED]; - // Additional domain-specific parameters for the predictions, any string must + // Required. Additional domain-specific parameters for the predictions, any string must // be up to 25000 characters long. // + // * For Text Classification: + // + // `score_threshold` - (float) A value from 0.0 to 1.0. When the model + // makes predictions for a text snippet, it will only produce results + // that have at least this confidence score. The default is 0.5. + // + // * For Image Classification: + // + // `score_threshold` - (float) A value from 0.0 to 1.0. When the model + // makes predictions for an image, it will only produce results that + // have at least this confidence score. The default is 0.5. + // + // * For Image Object Detection: + // + // `score_threshold` - (float) When Model detects objects on the image, + // it will only produce bounding boxes which have at least this + // confidence score. Value in 0 to 1 range, default is 0.5. + // `max_bounding_box_count` - (int64) No more than this number of bounding + // boxes will be produced per image. Default is 100, the + // requested value may be limited by server. + // // * For Video Classification : + // // `score_threshold` - (float) A value from 0.0 to 1.0. When the model // makes predictions for a video, it will only produce results that // have at least this confidence score. The default is 0.5. @@ -179,7 +231,14 @@ message BatchPredictRequest { // metrics provided to describe that quality. The default is // "false". // + // * For Tables: + // + // feature_importance - (boolean) Whether feature importance + // should be populated in the returned TablesAnnotations. The + // default is false. + // // * For Video Object Tracking: + // // `score_threshold` - (float) When Model detects objects on video frames, // it will only produce bounding boxes which have at least this // confidence score. Value in 0 to 1 range, default is 0.5. @@ -189,13 +248,21 @@ message BatchPredictRequest { // `min_bounding_box_size` - (float) Only bounding boxes with shortest edge // at least that long as a relative value of video frame size will be // returned. Value in 0 to 1 range. Default is 0. - // - map params = 5; + map params = 5 [(google.api.field_behavior) = REQUIRED]; } // Result of the Batch Predict. This message is returned in // [response][google.longrunning.Operation.response] of the operation returned // by the [PredictionService.BatchPredict][google.cloud.automl.v1beta1.PredictionService.BatchPredict]. message BatchPredictResult { - + // Additional domain-specific prediction response metadata. + // + // * For Image Object Detection: + // `max_bounding_box_count` - (int64) At most that many bounding boxes per + // image could have been returned. + // + // * For Video Object Tracking: + // `max_bounding_box_count` - (int64) At most that many bounding boxes per + // frame could have been returned. + map metadata = 1; } diff --git a/google/cloud/automl/v1beta1/ranges.proto b/google/cloud/automl/v1beta1/ranges.proto index 6a1d66fa0..89572bb05 100644 --- a/google/cloud/automl/v1beta1/ranges.proto +++ b/google/cloud/automl/v1beta1/ranges.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/cloud/automl/v1beta1/regression.proto b/google/cloud/automl/v1beta1/regression.proto index d2b96af13..1286d3d80 100644 --- a/google/cloud/automl/v1beta1/regression.proto +++ b/google/cloud/automl/v1beta1/regression.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/cloud/automl/v1beta1/service.proto b/google/cloud/automl/v1beta1/service.proto index 323bf0626..a421ece14 100644 --- a/google/cloud/automl/v1beta1/service.proto +++ b/google/cloud/automl/v1beta1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.automl.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/automl/v1beta1/annotation_payload.proto"; import "google/cloud/automl/v1beta1/annotation_spec.proto"; import "google/cloud/automl/v1beta1/column_spec.proto"; @@ -30,7 +32,6 @@ import "google/cloud/automl/v1beta1/operations.proto"; import "google/cloud/automl/v1beta1/table_spec.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; -import "google/api/client.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; option java_multiple_files = true; @@ -63,6 +64,7 @@ service AutoMl { post: "/v1beta1/{parent=projects/*/locations/*}/datasets" body: "dataset" }; + option (google.api.method_signature) = "parent,dataset"; } // Gets a dataset. @@ -70,6 +72,7 @@ service AutoMl { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/datasets/*}" }; + option (google.api.method_signature) = "name"; } // Lists datasets in a project. @@ -77,6 +80,7 @@ service AutoMl { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*}/datasets" }; + option (google.api.method_signature) = "parent"; } // Updates a dataset. @@ -85,6 +89,7 @@ service AutoMl { patch: "/v1beta1/{dataset.name=projects/*/locations/*/datasets/*}" body: "dataset" }; + option (google.api.method_signature) = "dataset"; } // Deletes a dataset and all of its contents. @@ -96,6 +101,11 @@ service AutoMl { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/datasets/*}" }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; } // Imports data into a dataset. @@ -112,6 +122,11 @@ service AutoMl { post: "/v1beta1/{name=projects/*/locations/*/datasets/*}:importData" body: "*" }; + option (google.api.method_signature) = "name,input_config"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; } // Exports dataset's data to the provided output location. @@ -122,6 +137,11 @@ service AutoMl { post: "/v1beta1/{name=projects/*/locations/*/datasets/*}:exportData" body: "*" }; + option (google.api.method_signature) = "name,output_config"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; } // Gets an annotation spec. @@ -129,6 +149,7 @@ service AutoMl { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}" }; + option (google.api.method_signature) = "name"; } // Gets a table spec. @@ -136,6 +157,7 @@ service AutoMl { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*}" }; + option (google.api.method_signature) = "name"; } // Lists table specs in a dataset. @@ -143,6 +165,7 @@ service AutoMl { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*/datasets/*}/tableSpecs" }; + option (google.api.method_signature) = "parent"; } // Updates a table spec. @@ -151,6 +174,7 @@ service AutoMl { patch: "/v1beta1/{table_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*}" body: "table_spec" }; + option (google.api.method_signature) = "table_spec"; } // Gets a column spec. @@ -158,6 +182,7 @@ service AutoMl { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}" }; + option (google.api.method_signature) = "name"; } // Lists column specs in a table spec. @@ -165,6 +190,7 @@ service AutoMl { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*/datasets/*/tableSpecs/*}/columnSpecs" }; + option (google.api.method_signature) = "parent"; } // Updates a column spec. @@ -173,6 +199,7 @@ service AutoMl { patch: "/v1beta1/{column_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}" body: "column_spec" }; + option (google.api.method_signature) = "column_spec"; } // Creates a model. @@ -185,6 +212,11 @@ service AutoMl { post: "/v1beta1/{parent=projects/*/locations/*}/models" body: "model" }; + option (google.api.method_signature) = "parent,model"; + option (google.longrunning.operation_info) = { + response_type: "Model" + metadata_type: "OperationMetadata" + }; } // Gets a model. @@ -192,6 +224,7 @@ service AutoMl { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/models/*}" }; + option (google.api.method_signature) = "name"; } // Lists models. @@ -199,6 +232,7 @@ service AutoMl { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*}/models" }; + option (google.api.method_signature) = "parent"; } // Deletes a model. @@ -210,6 +244,11 @@ service AutoMl { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/models/*}" }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; } // Deploys a model. If a model is already deployed, deploying it with the @@ -219,8 +258,8 @@ service AutoMl { // [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) // will reset the deployment state without pausing the model's availability. // - // Only applicable for Text Classification, Image Object Detection and Tables; - // all other domains manage deployment automatically. + // Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + // deployment automatically. // // Returns an empty response in the // [response][google.longrunning.Operation.response] field when it completes. @@ -229,6 +268,11 @@ service AutoMl { post: "/v1beta1/{name=projects/*/locations/*/models/*}:deploy" body: "*" }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; } // Undeploys a model. If the model is not deployed this method has no effect. @@ -243,6 +287,11 @@ service AutoMl { post: "/v1beta1/{name=projects/*/locations/*/models/*}:undeploy" body: "*" }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; } // Exports a trained, "export-able", model to a user specified Google Cloud @@ -258,6 +307,11 @@ service AutoMl { post: "/v1beta1/{name=projects/*/locations/*/models/*}:export" body: "*" }; + option (google.api.method_signature) = "name,output_config"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; } // Exports examples on which the model was evaluated (i.e. which were in the @@ -279,6 +333,11 @@ service AutoMl { post: "/v1beta1/{name=projects/*/locations/*/models/*}:exportEvaluatedExamples" body: "*" }; + option (google.api.method_signature) = "name,output_config"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; } // Gets a model evaluation. @@ -286,6 +345,7 @@ service AutoMl { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/models/*/modelEvaluations/*}" }; + option (google.api.method_signature) = "name"; } // Lists model evaluations. @@ -293,28 +353,44 @@ service AutoMl { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*/models/*}/modelEvaluations" }; + option (google.api.method_signature) = "parent"; } } // Request message for [AutoMl.CreateDataset][google.cloud.automl.v1beta1.AutoMl.CreateDataset]. message CreateDatasetRequest { - // The resource name of the project to create the dataset for. - string parent = 1; - - // The dataset to create. - Dataset dataset = 2; + // Required. The resource name of the project to create the dataset for. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The dataset to create. + Dataset dataset = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for [AutoMl.GetDataset][google.cloud.automl.v1beta1.AutoMl.GetDataset]. message GetDatasetRequest { - // The resource name of the dataset to retrieve. - string name = 1; + // Required. The resource name of the dataset to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Dataset" + } + ]; } // Request message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets]. message ListDatasetsRequest { - // The resource name of the project from which to list datasets. - string parent = 1; + // Required. The resource name of the project from which to list datasets. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // An expression for filtering the results of the request. // @@ -348,54 +424,74 @@ message ListDatasetsResponse { // Request message for [AutoMl.UpdateDataset][google.cloud.automl.v1beta1.AutoMl.UpdateDataset] message UpdateDatasetRequest { - // The dataset which replaces the resource on the server. - Dataset dataset = 1; + // Required. The dataset which replaces the resource on the server. + Dataset dataset = 1 [(google.api.field_behavior) = REQUIRED]; - // The update mask applies to the resource. For the `FieldMask` definition, - // see - // - // https: - // //developers.google.com/protocol-buffers - // // /docs/reference/google.protobuf#fieldmask + // The update mask applies to the resource. google.protobuf.FieldMask update_mask = 2; } // Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1beta1.AutoMl.DeleteDataset]. message DeleteDatasetRequest { - // The resource name of the dataset to delete. - string name = 1; + // Required. The resource name of the dataset to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Dataset" + } + ]; } // Request message for [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData]. message ImportDataRequest { // Required. Dataset name. Dataset must already exist. All imported // annotations and examples will be added. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Dataset" + } + ]; // Required. The desired input location and its domain specific semantics, // if any. - InputConfig input_config = 3; + InputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for [AutoMl.ExportData][google.cloud.automl.v1beta1.AutoMl.ExportData]. message ExportDataRequest { // Required. The resource name of the dataset. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Dataset" + } + ]; // Required. The desired output location. - OutputConfig output_config = 3; + OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for [AutoMl.GetAnnotationSpec][google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec]. message GetAnnotationSpecRequest { - // The resource name of the annotation spec to retrieve. - string name = 1; + // Required. The resource name of the annotation spec to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/AnnotationSpec" + } + ]; } // Request message for [AutoMl.GetTableSpec][google.cloud.automl.v1beta1.AutoMl.GetTableSpec]. message GetTableSpecRequest { - // The resource name of the table spec to retrieve. - string name = 1; + // Required. The resource name of the table spec to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/TableSpec" + } + ]; // Mask specifying which fields to read. google.protobuf.FieldMask field_mask = 2; @@ -403,8 +499,13 @@ message GetTableSpecRequest { // Request message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs]. message ListTableSpecsRequest { - // The resource name of the dataset to list table specs from. - string parent = 1; + // Required. The resource name of the dataset to list table specs from. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Dataset" + } + ]; // Mask specifying which fields to read. google.protobuf.FieldMask field_mask = 2; @@ -435,22 +536,22 @@ message ListTableSpecsResponse { // Request message for [AutoMl.UpdateTableSpec][google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec] message UpdateTableSpecRequest { - // The table spec which replaces the resource on the server. - TableSpec table_spec = 1; + // Required. The table spec which replaces the resource on the server. + TableSpec table_spec = 1 [(google.api.field_behavior) = REQUIRED]; - // The update mask applies to the resource. For the `FieldMask` definition, - // see - // - // https: - // //developers.google.com/protocol-buffers - // // /docs/reference/google.protobuf#fieldmask + // The update mask applies to the resource. google.protobuf.FieldMask update_mask = 2; } // Request message for [AutoMl.GetColumnSpec][google.cloud.automl.v1beta1.AutoMl.GetColumnSpec]. message GetColumnSpecRequest { - // The resource name of the column spec to retrieve. - string name = 1; + // Required. The resource name of the column spec to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/ColumnSpec" + } + ]; // Mask specifying which fields to read. google.protobuf.FieldMask field_mask = 2; @@ -458,8 +559,13 @@ message GetColumnSpecRequest { // Request message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs]. message ListColumnSpecsRequest { - // The resource name of the table spec to list column specs from. - string parent = 1; + // Required. The resource name of the table spec to list column specs from. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/TableSpec" + } + ]; // Mask specifying which fields to read. google.protobuf.FieldMask field_mask = 2; @@ -490,37 +596,47 @@ message ListColumnSpecsResponse { // Request message for [AutoMl.UpdateColumnSpec][google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec] message UpdateColumnSpecRequest { - // The column spec which replaces the resource on the server. - ColumnSpec column_spec = 1; + // Required. The column spec which replaces the resource on the server. + ColumnSpec column_spec = 1 [(google.api.field_behavior) = REQUIRED]; - // The update mask applies to the resource. For the `FieldMask` definition, - // see - // - // https: - // //developers.google.com/protocol-buffers - // // /docs/reference/google.protobuf#fieldmask + // The update mask applies to the resource. google.protobuf.FieldMask update_mask = 2; } // Request message for [AutoMl.CreateModel][google.cloud.automl.v1beta1.AutoMl.CreateModel]. message CreateModelRequest { - // Resource name of the parent project where the model is being created. - string parent = 1; - - // The model to create. - Model model = 4; + // Required. Resource name of the parent project where the model is being created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The model to create. + Model model = 4 [(google.api.field_behavior) = REQUIRED]; } // Request message for [AutoMl.GetModel][google.cloud.automl.v1beta1.AutoMl.GetModel]. message GetModelRequest { - // Resource name of the model. - string name = 1; + // Required. Resource name of the model. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; } // Request message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels]. message ListModelsRequest { - // Resource name of the project, from which to list the models. - string parent = 1; + // Required. Resource name of the project, from which to list the models. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // An expression for filtering the results of the request. // @@ -555,8 +671,13 @@ message ListModelsResponse { // Request message for [AutoMl.DeleteModel][google.cloud.automl.v1beta1.AutoMl.DeleteModel]. message DeleteModelRequest { - // Resource name of the model being deleted. - string name = 1; + // Required. Resource name of the model being deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; } // Request message for [AutoMl.DeployModel][google.cloud.automl.v1beta1.AutoMl.DeployModel]. @@ -565,16 +686,29 @@ message DeployModelRequest { oneof model_deployment_metadata { // Model deployment metadata specific to Image Object Detection. ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; + + // Model deployment metadata specific to Image Classification. + ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; } - // Resource name of the model to deploy. - string name = 1; + // Required. Resource name of the model to deploy. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; } // Request message for [AutoMl.UndeployModel][google.cloud.automl.v1beta1.AutoMl.UndeployModel]. message UndeployModelRequest { - // Resource name of the model to undeploy. - string name = 1; + // Required. Resource name of the model to undeploy. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; } // Request message for [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]. @@ -582,34 +716,54 @@ message UndeployModelRequest { // returned. message ExportModelRequest { // Required. The resource name of the model to export. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; // Required. The desired output location and configuration. - ModelExportOutputConfig output_config = 3; + ModelExportOutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for [AutoMl.ExportEvaluatedExamples][google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples]. message ExportEvaluatedExamplesRequest { // Required. The resource name of the model whose evaluated examples are to // be exported. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; // Required. The desired output location and configuration. - ExportEvaluatedExamplesOutputConfig output_config = 3; + ExportEvaluatedExamplesOutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation]. message GetModelEvaluationRequest { - // Resource name for the model evaluation. - string name = 1; + // Required. Resource name for the model evaluation. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/ModelEvaluation" + } + ]; } // Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations]. message ListModelEvaluationsRequest { - // Resource name of the model to list the model evaluations for. + // Required. Resource name of the model to list the model evaluations for. // If modelId is set as "-", this will list model evaluations from across all // models of the parent location. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; // An expression for filtering the results of the request. // diff --git a/google/cloud/automl/v1beta1/table_spec.proto b/google/cloud/automl/v1beta1/table_spec.proto index 98f87f122..bc3fc7440 100644 --- a/google/cloud/automl/v1beta1/table_spec.proto +++ b/google/cloud/automl/v1beta1/table_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.automl.v1beta1; +import "google/api/resource.proto"; import "google/cloud/automl/v1beta1/io.proto"; import "google/api/annotations.proto"; @@ -36,6 +36,11 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // Used by: // * Tables message TableSpec { + option (google.api.resource) = { + type: "automl.googleapis.com/TableSpec" + pattern: "projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}" + }; + // Output only. The resource name of the table spec. // Form: // @@ -55,6 +60,10 @@ message TableSpec { // Output only. The number of rows (i.e. examples) in the table. int64 row_count = 3; + // Output only. The number of valid rows (i.e. without values that don't match + // DataType-s of their columns). + int64 valid_row_count = 4; + // Output only. The number of columns of the table. That is, the number of // child ColumnSpec-s. int64 column_count = 7; diff --git a/google/cloud/automl/v1beta1/tables.proto b/google/cloud/automl/v1beta1/tables.proto index 1cf916367..5327f5e78 100644 --- a/google/cloud/automl/v1beta1/tables.proto +++ b/google/cloud/automl/v1beta1/tables.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -22,6 +21,7 @@ import "google/cloud/automl/v1beta1/column_spec.proto"; import "google/cloud/automl/v1beta1/data_items.proto"; import "google/cloud/automl/v1beta1/data_stats.proto"; import "google/cloud/automl/v1beta1/ranges.proto"; +import "google/cloud/automl/v1beta1/regression.proto"; import "google/cloud/automl/v1beta1/temporal.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; @@ -42,9 +42,12 @@ message TablesDatasetMetadata { // training & prediction target. // This column must be non-nullable and have one of following data types // (otherwise model creation will error): + // // * CATEGORY + // // * FLOAT64 - // Furthermore, if the type is CATEGORY , then only up to + // + // If the type is CATEGORY , only up to // 100 unique values may exist in that column across all rows. // // NOTE: Updates of this field will instantly affect any other users @@ -89,16 +92,30 @@ message TablesDatasetMetadata { // for the timestamp at which these stats were last updated. map target_column_correlations = 6; - // The most recent timestamp when target_column_correlations field and all - // descendant ColumnSpec.data_stats and ColumnSpec.top_correlated_columns - // fields were last (re-)generated. Any changes that happened to the dataset - // afterwards are not reflected in these fields values. The regeneration - // happens in the background on a best effort basis. + // Output only. The most recent timestamp when target_column_correlations + // field and all descendant ColumnSpec.data_stats and + // ColumnSpec.top_correlated_columns fields were last (re-)generated. Any + // changes that happened to the dataset afterwards are not reflected in these + // fields values. The regeneration happens in the background on a best effort + // basis. google.protobuf.Timestamp stats_update_time = 7; } // Model metadata specific to AutoML Tables. message TablesModelMetadata { + // Additional optimization objective configuration. Required for + // `MAXIMIZE_PRECISION_AT_RECALL` and `MAXIMIZE_RECALL_AT_PRECISION`, + // otherwise unused. + oneof additional_optimization_objective_config { + // Required when optimization_objective is "MAXIMIZE_PRECISION_AT_RECALL". + // Must be between 0 and 1, inclusive. + float optimization_objective_recall_value = 17; + + // Required when optimization_objective is "MAXIMIZE_RECALL_AT_PRECISION". + // Must be between 0 and 1, inclusive. + float optimization_objective_precision_value = 18; + } + // Column spec of the dataset's primary table's column the model is // predicting. Snapshotted when model creation started. // Only 3 fields are used: @@ -122,12 +139,16 @@ message TablesModelMetadata { // // [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id] // must never be included here. + // // Only 3 fields are used: - // name - May be set on CreateModel, if set only the columns specified are - // used, otherwise all primary table's columns (except the ones listed - // above) are used for the training and prediction input. - // display_name - Output only. - // data_type - Output only. + // + // * name - May be set on CreateModel, if set only the columns specified are + // used, otherwise all primary table's columns (except the ones listed + // above) are used for the training and prediction input. + // + // * display_name - Output only. + // + // * data_type - Output only. repeated ColumnSpec input_feature_column_specs = 3; // Objective function the model is optimizing towards. The training process @@ -155,25 +176,8 @@ message TablesModelMetadata { // "MINIMIZE_RMSE" (default) - Minimize root-mean-squared error (RMSE). // "MINIMIZE_MAE" - Minimize mean-absolute error (MAE). // "MINIMIZE_RMSLE" - Minimize root-mean-squared log error (RMSLE). - // - // FORECASTING: - // "MINIMIZE_RMSE" (default) - Minimize root-mean-squared error (RMSE). - // "MINIMIZE_MAE" - Minimize mean-absolute error (MAE). string optimization_objective = 4; - // Additional optimization objective configuration. Required for - // `MAXIMIZE_PRECISION_AT_RECALL` and `MAXIMIZE_RECALL_AT_PRECISION`, - // otherwise unused. - oneof additional_optimization_objective_config { - // Required when optimization_objective is "MAXIMIZE_PRECISION_AT_RECALL". - // Must be between 0 and 1, inclusive. - float optimization_objective_recall_value = 17; - - // Required when optimization_objective is "MAXIMIZE_RECALL_AT_PRECISION". - // Must be between 0 and 1, inclusive. - float optimization_objective_precision_value = 18; - } - // Output only. Auxiliary information for each of the // input_feature_column_specs with respect to this particular model. repeated TablesModelColumnInfo tables_model_column_info = 5; @@ -226,9 +230,11 @@ message TablesAnnotation { // // [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]. // The value depends on the column's DataType: - // CATEGORY - the predicted (with the above confidence `score`) CATEGORY - // value. - // FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value. + // + // * CATEGORY - the predicted (with the above confidence `score`) CATEGORY + // value. + // + // * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value. google.protobuf.Value value = 2; // Output only. Auxiliary information for each of the model's @@ -243,6 +249,15 @@ message TablesAnnotation { // [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name] // would be populated, then this whole field is not. repeated TablesModelColumnInfo tables_model_column_info = 3; + + // Output only. Stores the prediction score for the baseline example, which + // is defined as the example with all values set to their baseline values. + // This is used as part of the Sampled Shapley explanation of the model's + // prediction. This field is populated only when feature importance is + // requested. For regression models, this holds the baseline prediction for + // the baseline example. For classification models, this holds the baseline + // prediction for the baseline example for the argmax class. + float baseline_score = 5; } // An information specific to given column and Tables Model, in context @@ -256,9 +271,7 @@ message TablesModelColumnInfo { // its ColumnSpec). string column_display_name = 2; - // Output only. - // - // When given as part of a Model (always populated): + // Output only. When given as part of a Model (always populated): // Measurement of how much model predictions correctness on the TEST data // depend on values in this column. A value between 0 and 1, higher means // higher influence. These values are normalized - for all input feature @@ -271,8 +284,9 @@ message TablesModelColumnInfo { // [feature_importance][google.cloud.automl.v1beta1.PredictRequest.params] // param is set): // Measurement of how impactful for the prediction returned for the given row - // the value in this column was. A value between 0 and 1, higher means larger - // impact. These values are normalized - for all input feature columns of a - // single predicted row they add to 1. + // the value in this column was. Specifically, the feature importance + // specifies the marginal contribution that the feature made to the prediction + // score compared to the baseline score. These values are computed using the + // Sampled Shapley method. float feature_importance = 3; } diff --git a/google/cloud/automl/v1beta1/temporal.proto b/google/cloud/automl/v1beta1/temporal.proto index 84874d99f..76db8887c 100644 --- a/google/cloud/automl/v1beta1/temporal.proto +++ b/google/cloud/automl/v1beta1/temporal.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/cloud/automl/v1beta1/text.proto b/google/cloud/automl/v1beta1/text.proto index 15c8368ed..f6f33185c 100644 --- a/google/cloud/automl/v1beta1/text.proto +++ b/google/cloud/automl/v1beta1/text.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -29,14 +28,14 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // Dataset metadata for classification. message TextClassificationDatasetMetadata { - // Required. - // Type of the classification problem. + // Required. Type of the classification problem. ClassificationType classification_type = 1; } // Model metadata that is specific to text classification. message TextClassificationModelMetadata { - + // Output only. Classification type of the dataset used to train this model. + ClassificationType classification_type = 3; } // Dataset metadata that is specific to text extraction @@ -51,8 +50,7 @@ message TextExtractionModelMetadata { // Dataset metadata for text sentiment. message TextSentimentDatasetMetadata { - // Required. - // A sentiment is expressed as an integer ordinal, where higher value + // Required. A sentiment is expressed as an integer ordinal, where higher value // means a more positive sentiment. The range of sentiments that will be used // is between 0 and sentiment_max (inclusive on both ends), and all the values // in the range must be represented in the dataset before a model can be diff --git a/google/cloud/automl/v1beta1/text_extraction.proto b/google/cloud/automl/v1beta1/text_extraction.proto index 07f0dda81..cfb0e0b37 100644 --- a/google/cloud/automl/v1beta1/text_extraction.proto +++ b/google/cloud/automl/v1beta1/text_extraction.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/cloud/automl/v1beta1/text_segment.proto b/google/cloud/automl/v1beta1/text_segment.proto index 41b8be1cc..94b17d930 100644 --- a/google/cloud/automl/v1beta1/text_segment.proto +++ b/google/cloud/automl/v1beta1/text_segment.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/cloud/automl/v1beta1/text_sentiment.proto b/google/cloud/automl/v1beta1/text_sentiment.proto index 978acb0f9..5444c52b9 100644 --- a/google/cloud/automl/v1beta1/text_sentiment.proto +++ b/google/cloud/automl/v1beta1/text_sentiment.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/cloud/automl/v1beta1/translation.proto b/google/cloud/automl/v1beta1/translation.proto index ed02b2af5..8585bd410 100644 --- a/google/cloud/automl/v1beta1/translation.proto +++ b/google/cloud/automl/v1beta1/translation.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.automl.v1beta1; +import "google/api/field_behavior.proto"; import "google/cloud/automl/v1beta1/data_items.proto"; import "google/api/annotations.proto"; @@ -30,10 +30,10 @@ option ruby_package = "Google::Cloud::AutoML::V1beta1"; // Dataset metadata that is specific to translation. message TranslationDatasetMetadata { // Required. The BCP-47 language code of the source language. - string source_language_code = 1; + string source_language_code = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The BCP-47 language code of the target language. - string target_language_code = 2; + string target_language_code = 2 [(google.api.field_behavior) = REQUIRED]; } // Evaluation metrics for the dataset. diff --git a/google/cloud/automl/v1beta1/video.proto b/google/cloud/automl/v1beta1/video.proto index b7c7325bc..268ae2a8c 100644 --- a/google/cloud/automl/v1beta1/video.proto +++ b/google/cloud/automl/v1beta1/video.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/cloud/bigquery/artman_bigquery_v2.yaml b/google/cloud/bigquery/artman_bigquery_v2.yaml index 426a197a8..e0b3851f2 100644 --- a/google/cloud/bigquery/artman_bigquery_v2.yaml +++ b/google/cloud/bigquery/artman_bigquery_v2.yaml @@ -8,6 +8,7 @@ common: - v2 service_yaml: bigquery_v2.yaml gapic_yaml: v2/bigquery_gapic.yaml + proto_package: google.cloud.bigquery.v2 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/bigquery/bigquery_v2.yaml b/google/cloud/bigquery/bigquery_v2.yaml index f6ffefee7..75c9634a7 100644 --- a/google/cloud/bigquery/bigquery_v2.yaml +++ b/google/cloud/bigquery/bigquery_v2.yaml @@ -20,12 +20,14 @@ authentication: oauth: canonical_scopes: |- https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/bigquery.readonly, https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/cloud-platform.read-only - selector: google.cloud.bigquery.v2.ModelService.ListModels oauth: canonical_scopes: |- https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/bigquery.readonly, https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/cloud-platform.read-only - selector: google.cloud.bigquery.v2.ModelService.PatchModel diff --git a/google/cloud/bigquery/connection/v1/BUILD.bazel b/google/cloud/bigquery/connection/v1/BUILD.bazel new file mode 100644 index 000000000..f97c0d8f1 --- /dev/null +++ b/google/cloud/bigquery/connection/v1/BUILD.bazel @@ -0,0 +1,179 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "connection_proto", + srcs = [ + "connection.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "connection_java_proto", + deps = [":connection_proto"], +) + +java_grpc_library( + name = "connection_java_grpc", + srcs = [":connection_proto"], + deps = [":connection_java_proto"], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", +) + +go_proto_library( + name = "connection_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/connection/v1", + protos = [":connection_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "connection_moved_proto", + srcs = [":connection_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "connection_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":connection_moved_proto"], +) + +py_grpc_library( + name = "connection_py_grpc", + srcs = [":connection_moved_proto"], + deps = [":connection_py_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "connection_php_proto", + deps = [":connection_proto"], +) + +php_grpc_library( + name = "connection_php_grpc", + srcs = [":connection_proto"], + deps = [":connection_php_proto"], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "connection_ruby_proto", + deps = [":connection_proto"], +) + +ruby_grpc_library( + name = "connection_ruby_grpc", + srcs = [":connection_proto"], + deps = [":connection_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "connection_csharp_proto", + deps = [":connection_proto"], +) + +csharp_grpc_library( + name = "connection_csharp_grpc", + srcs = [":connection_proto"], + deps = [":connection_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ code here diff --git a/google/cloud/bigquery/connection/v1/bigqueryconnection_grpc_service_config.json b/google/cloud/bigquery/connection/v1/bigqueryconnection_grpc_service_config.json new file mode 100755 index 000000000..b73fed3a5 --- /dev/null +++ b/google/cloud/bigquery/connection/v1/bigqueryconnection_grpc_service_config.json @@ -0,0 +1,56 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.bigquery.connection.v1.ConnectionService", + "method": "CreateConnection" + }, + { + "service": "google.cloud.bigquery.connection.v1.ConnectionService", + "method": "UpdateConnection" + }, + { + "service": "google.cloud.bigquery.connection.v1.ConnectionService", + "method": "GetIamPolicy" + }, + { + "service": "google.cloud.bigquery.connection.v1.ConnectionService", + "method": "SetIamPolicy" + }, + { + "service": "google.cloud.bigquery.connection.v1.ConnectionService", + "method": "TestIamPermissions" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.bigquery.connection.v1.ConnectionService", + "method": "GetConnection" + }, + { + "service": "google.cloud.bigquery.connection.v1.ConnectionService", + "method": "ListConnections" + }, + { + "service": "google.cloud.bigquery.connection.v1.ConnectionService", + "method": "DeleteConnection" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/bigquery/connection/v1/bigqueryconnection_v1.yaml b/google/cloud/bigquery/connection/v1/bigqueryconnection_v1.yaml new file mode 100644 index 000000000..2cdc5bc72 --- /dev/null +++ b/google/cloud/bigquery/connection/v1/bigqueryconnection_v1.yaml @@ -0,0 +1,18 @@ +type: google.api.Service +config_version: 3 +name: bigqueryconnection.googleapis.com +title: BigQuery Connection API + +apis: +- name: google.cloud.bigquery.connection.v1.ConnectionService + +documentation: + summary: Allows users to manage BigQuery connections to external data sources. + +authentication: + rules: + - selector: 'google.cloud.bigquery.connection.v1.ConnectionService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/bigquery/connection/v1/connection.proto b/google/cloud/bigquery/connection/v1/connection.proto new file mode 100644 index 000000000..3bde8c124 --- /dev/null +++ b/google/cloud/bigquery/connection/v1/connection.proto @@ -0,0 +1,278 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.connection.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.Connection.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/connection/v1;connection"; +option java_multiple_files = true; +option java_outer_classname = "ConnectionProto"; +option java_package = "com.google.cloud.bigquery.connection.v1"; + +// Manages external data source connections and credentials. +service ConnectionService { + option (google.api.default_host) = "bigqueryconnection.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/bigquery," + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new connection. + rpc CreateConnection(CreateConnectionRequest) returns (Connection) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/connections" + body: "connection" + }; + option (google.api.method_signature) = "parent,connection,connection_id"; + } + + // Returns specified connection. + rpc GetConnection(GetConnectionRequest) returns (Connection) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/connections/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of connections in the given project. + rpc ListConnections(ListConnectionsRequest) returns (ListConnectionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/connections" + }; + } + + // Updates the specified connection. For security reasons, also resets + // credential if connection properties are in the update field mask. + rpc UpdateConnection(UpdateConnectionRequest) returns (Connection) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/locations/*/connections/*}" + body: "connection" + }; + option (google.api.method_signature) = "name,connection,update_mask"; + } + + // Deletes connection and associated credential. + rpc DeleteConnection(DeleteConnectionRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/connections/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the access control policy for a resource. + // Returns an empty policy if the resource exists and does not have a policy + // set. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/connections/*}:getIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource,options"; + } + + // Sets the access control policy on the specified resource. Replaces any + // existing policy. + // + // Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/connections/*}:setIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource,policy"; + } + + // Returns permissions that a caller has on the specified resource. + // If the resource does not exist, this will return an empty set of + // permissions, not a NOT_FOUND error. + // + // Note: This operation is designed to be used for building permission-aware + // UIs and command-line tools, not for authorization checking. This operation + // may "fail open" without warning. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/connections/*}:testIamPermissions" + body: "*" + }; + option (google.api.method_signature) = "resource,permissions"; + } +} + +// The request for [ConnectionService.CreateConnection][google.cloud.bigquery.connection.v1.ConnectionService.CreateConnection]. +message CreateConnectionRequest { + // Required. Parent resource name. + // Must be in the format `projects/{project_id}/locations/{location_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Connection id that should be assigned to the created connection. + string connection_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Connection to create. + Connection connection = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request for [ConnectionService.GetConnection][google.cloud.bigquery.connection.v1.ConnectionService.GetConnection]. +message GetConnectionRequest { + // Required. Name of the requested connection, for example: + // `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryconnection.googleapis.com/Connection" + } + ]; +} + +// The request for [ConnectionService.ListConnections][google.cloud.bigquery.connection.v1.ConnectionService.ListConnections]. +message ListConnectionsRequest { + // Required. Parent resource name. + // Must be in the form: `projects/{project_id}/locations/{location_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Page size. + int32 page_size = 4 [(google.api.field_behavior) = REQUIRED]; + + // Page token. + string page_token = 3; +} + +// The response for [ConnectionService.ListConnections][google.cloud.bigquery.connection.v1.ConnectionService.ListConnections]. +message ListConnectionsResponse { + // Next page token. + string next_page_token = 1; + + // List of connections. + repeated Connection connections = 2; +} + +// The request for [ConnectionService.UpdateConnection][google.cloud.bigquery.connection.v1.ConnectionService.UpdateConnection]. +message UpdateConnectionRequest { + // Required. Name of the connection to update, for example: + // `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryconnection.googleapis.com/Connection" + } + ]; + + // Required. Connection containing the updated fields. + Connection connection = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Update mask for the connection fields to be updated. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request for [ConnectionService.DeleteConnectionRequest][]. +message DeleteConnectionRequest { + // Required. Name of the deleted connection, for example: + // `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryconnection.googleapis.com/Connection" + } + ]; +} + +// Configuration parameters to establish connection with an external data +// source, except the credential attributes. +message Connection { + option (google.api.resource) = { + type: "bigqueryconnection.googleapis.com/Connection" + pattern: "projects/{project}/locations/{location}/connections/{connection}" + }; + + // The resource name of the connection in the form of: + // `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + string name = 1; + + // User provided display name for the connection. + string friendly_name = 2; + + // User provided description. + string description = 3; + + // Properties specific to the underlying data source. + oneof properties { + // Cloud SQL properties. + CloudSqlProperties cloud_sql = 4; + } + + // Output only. The creation timestamp of the connection. + int64 creation_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of the connection. + int64 last_modified_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. True, if credential is configured for this connection. + bool has_credential = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Connection properties specific to the Cloud SQL. +message CloudSqlProperties { + // Supported Cloud SQL database types. + enum DatabaseType { + // Unspecified database type. + DATABASE_TYPE_UNSPECIFIED = 0; + + // Cloud SQL for PostgreSQL. + POSTGRES = 1; + + // Cloud SQL for MySQL. + MYSQL = 2; + } + + // Cloud SQL instance ID in the form `project:location:instance`. + string instance_id = 1; + + // Database name. + string database = 2; + + // Type of the Cloud SQL database. + DatabaseType type = 3; + + // Input only. Cloud SQL credential. + CloudSqlCredential credential = 4 [(google.api.field_behavior) = INPUT_ONLY]; +} + +// Credential info for the Cloud SQL. +message CloudSqlCredential { + // The username for the credential. + string username = 1; + + // The password for the credential. + string password = 2; +} diff --git a/google/cloud/bigquery/connection/v1beta1/BUILD.bazel b/google/cloud/bigquery/connection/v1beta1/BUILD.bazel new file mode 100644 index 000000000..f2ccafc2a --- /dev/null +++ b/google/cloud/bigquery/connection/v1beta1/BUILD.bazel @@ -0,0 +1,372 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "connection_proto", + srcs = [ + "connection.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library_with_info( + name = "connection_proto_with_info", + deps = [ + ":connection_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "connection_java_proto", + deps = [":connection_proto"], +) + +java_grpc_library( + name = "connection_java_grpc", + srcs = [":connection_proto"], + deps = [":connection_java_proto"], +) + +java_gapic_library( + name = "connection_java_gapic", + src = ":connection_proto_with_info", + gapic_yaml = "bigqueryconnection_gapic.yaml", + package = "google.cloud.bigquery.connection.v1beta1", + service_yaml = "bigqueryconnection_v1beta1.yaml", + test_deps = [ + ":connection_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":connection_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "connection_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.bigquery.connection.v1beta1.ConnectionServiceClientTest", + ], + runtime_deps = [":connection_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-bigquery-connection-v1beta1-java", + deps = [ + ":connection_java_gapic", + ":connection_java_grpc", + ":connection_java_proto", + ":connection_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "connection_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/connection/v1beta1", + protos = [":connection_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +#go_gapic_library( +# name = "connection_go_gapic", +# src = ":connection_proto_with_info", +# gapic_yaml = "bigqueryconnection_gapic.yaml", +# importpath = "cloud.google.com/go/bigquery/connection/apiv1beta1", +# package = "google.cloud.bigquery.connection.v1beta1", +# service_yaml = "bigqueryconnection_v1beta1.yaml", +# deps = [ +# ":connection_go_proto", +# "//google/iam/v1:iam_go_proto", +# ], +#) +# +#go_test( +# name = "connection_go_gapic_test", +# srcs = [":connection_go_gapic_srcjar_test"], +# embed = [":connection_go_gapic"], +# importpath = "cloud.google.com/go/bigquery/connection/apiv1beta1", +#) +# +## Open Source Packages +#go_gapic_assembly_pkg( +# name = "gapi-cloud-bigquery-connection-v1beta1-go", +# deps = [ +# ":connection_go_gapic", +# ":connection_go_gapic_srcjar-smoke-test.srcjar", +# ":connection_go_gapic_srcjar-test.srcjar", +# ":connection_go_proto", +# ], +#) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "connection_moved_proto", + srcs = [":connection_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "connection_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":connection_moved_proto"], +) + +py_grpc_library( + name = "connection_py_grpc", + srcs = [":connection_moved_proto"], + deps = [":connection_py_proto"], +) + +py_gapic_library( + name = "connection_py_gapic", + src = ":connection_proto_with_info", + gapic_yaml = "bigqueryconnection_gapic.yaml", + package = "google.cloud.bigquery.connection.v1beta1", + service_yaml = "bigqueryconnection_v1beta1.yaml", + deps = [ + ":connection_py_grpc", + ":connection_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "bigquery-connection-v1beta1-py", + deps = [ + ":connection_py_gapic", + ":connection_py_grpc", + ":connection_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "connection_php_proto", + deps = [":connection_proto"], +) + +php_grpc_library( + name = "connection_php_grpc", + srcs = [":connection_proto"], + deps = [":connection_php_proto"], +) + +php_gapic_library( + name = "connection_php_gapic", + src = ":connection_proto_with_info", + gapic_yaml = "bigqueryconnection_gapic.yaml", + package = "google.cloud.bigquery.connection.v1beta1", + service_yaml = "bigqueryconnection_v1beta1.yaml", + deps = [ + ":connection_php_grpc", + ":connection_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-bigquery-connection-v1beta1-php", + deps = [ + ":connection_php_gapic", + ":connection_php_grpc", + ":connection_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "connection_nodejs_gapic", + src = ":connection_proto_with_info", + gapic_yaml = "bigqueryconnection_gapic.yaml", + package = "google.cloud.bigquery.connection.v1beta1", + service_yaml = "bigqueryconnection_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "bigquery-connection-v1beta1-nodejs", + deps = [ + ":connection_nodejs_gapic", + ":connection_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "connection_ruby_proto", + deps = [":connection_proto"], +) + +ruby_grpc_library( + name = "connection_ruby_grpc", + srcs = [":connection_proto"], + deps = [":connection_ruby_proto"], +) + +ruby_gapic_library( + name = "connection_ruby_gapic", + src = ":connection_proto_with_info", + gapic_yaml = "bigqueryconnection_gapic.yaml", + package = "google.cloud.bigquery.connection.v1beta1", + service_yaml = "bigqueryconnection_v1beta1.yaml", + deps = [ + ":connection_ruby_grpc", + ":connection_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-bigquery-connection-v1beta1-ruby", + deps = [ + ":connection_ruby_gapic", + ":connection_ruby_grpc", + ":connection_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "connection_csharp_proto", + deps = [":connection_proto"], +) + +csharp_grpc_library( + name = "connection_csharp_grpc", + srcs = [":connection_proto"], + deps = [":connection_csharp_proto"], +) + +csharp_gapic_library( + name = "connection_csharp_gapic", + src = ":connection_proto_with_info", + gapic_yaml = "bigqueryconnection_gapic.yaml", + package = "google.cloud.bigquery.connection.v1beta1", + service_yaml = "bigqueryconnection_v1beta1.yaml", + deps = [ + ":connection_csharp_grpc", + ":connection_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-bigquery-connection-v1beta1-csharp", + deps = [ + ":connection_csharp_gapic", + ":connection_csharp_grpc", + ":connection_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/bigquery/connection/v1beta1/artman_bigqueryconnection_v1beta1.yaml b/google/cloud/bigquery/connection/v1beta1/artman_bigqueryconnection_v1beta1.yaml new file mode 100644 index 000000000..86bdca407 --- /dev/null +++ b/google/cloud/bigquery/connection/v1beta1/artman_bigqueryconnection_v1beta1.yaml @@ -0,0 +1,20 @@ +common: + api_name: bigqueryconnection + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - . + service_yaml: bigqueryconnection_v1beta1.yaml + gapic_yaml: bigqueryconnection_gapic.yaml + proto_package: google.cloud.bigquery.connection.v1beta1 +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: python_gapic + type: GAPIC + language: PYTHON +- name: php_gapic + type: GAPIC + language: PHP diff --git a/google/cloud/bigquery/connection/v1beta1/bigqueryconnection_gapic.legacy.yaml b/google/cloud/bigquery/connection/v1beta1/bigqueryconnection_gapic.legacy.yaml new file mode 100644 index 000000000..120914a57 --- /dev/null +++ b/google/cloud/bigquery/connection/v1beta1/bigqueryconnection_gapic.legacy.yaml @@ -0,0 +1,230 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.bigquery.connection.v1beta1 + python: + package_name: google.cloud.bigquery.connection_v1beta1.gapic + go: + package_name: cloud.google.com/go/bigquery/connection/apiv1beta1 + csharp: + package_name: Google.Cloud.BigQuery.Connection.V1Beta1 + ruby: + package_name: Google::Cloud::Bigquery::Connection::V1beta1 + php: + package_name: Google\Cloud\BigQuery\Connection\V1beta1 + nodejs: + package_name: connection.v1beta1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.bigquery.connection.v1beta1.ConnectionService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/connections/{connection} + entity_name: connection + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateConnection + flattening: + groups: + - parameters: + - parent + - connection + - connection_id + required_fields: + - parent + - connection + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetConnection + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: connection + timeout_millis: 60000 + - name: ListConnections + flattening: + groups: + - parameters: + - parent + - max_results + required_fields: + - parent + - max_results + page_streaming: + request: + token_field: page_token + response: + token_field: next_page_token + resources_field: connections + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: UpdateConnection + flattening: + groups: + - parameters: + - name + - connection + - update_mask + required_fields: + - name + - connection + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: connection + timeout_millis: 60000 + - name: UpdateConnectionCredential + flattening: + groups: + - parameters: + - name + - credential + required_fields: + - name + - credential + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: DeleteConnection + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: connection + timeout_millis: 60000 + - name: GetIamPolicy + flattening: + groups: + - parameters: + - resource + - options + required_fields: + - resource + - options + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: connection + timeout_millis: 60000 + - name: SetIamPolicy + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: connection + timeout_millis: 60000 + - name: TestIamPermissions + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: connection + timeout_millis: 60000 diff --git a/google/cloud/bigquery/connection/v1beta1/bigqueryconnection_gapic.yaml b/google/cloud/bigquery/connection/v1beta1/bigqueryconnection_gapic.yaml new file mode 100644 index 000000000..c668bf552 --- /dev/null +++ b/google/cloud/bigquery/connection/v1beta1/bigqueryconnection_gapic.yaml @@ -0,0 +1,23 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.bigquery.connection.v1beta1 + python: + package_name: google.cloud.bigquery.connection_v1beta1.gapic + go: + package_name: cloud.google.com/go/bigquery/connection/apiv1beta1 + csharp: + package_name: Google.Cloud.BigQuery.Connection.V1Beta1 + ruby: + package_name: Google::Cloud::Bigquery::Connection::V1beta1 + php: + package_name: Google\Cloud\BigQuery\Connection\V1beta1 + nodejs: + package_name: connection.v1beta1 +interfaces: +- name: google.cloud.bigquery.connection.v1beta1.ConnectionService + methods: + - name: DeleteConnection + retry_codes_name: idempotent diff --git a/google/cloud/bigquery/connection/v1beta1/bigqueryconnection_grpc_service_config.json b/google/cloud/bigquery/connection/v1beta1/bigqueryconnection_grpc_service_config.json new file mode 100755 index 000000000..d65121d4e --- /dev/null +++ b/google/cloud/bigquery/connection/v1beta1/bigqueryconnection_grpc_service_config.json @@ -0,0 +1,60 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.bigquery.connection.v1beta1.ConnectionService", + "method": "CreateConnection" + }, + { + "service": "google.cloud.bigquery.connection.v1beta1.ConnectionService", + "method": "UpdateConnection" + }, + { + "service": "google.cloud.bigquery.connection.v1beta1.ConnectionService", + "method": "UpdateConnectionCredential" + }, + { + "service": "google.cloud.bigquery.connection.v1beta1.ConnectionService", + "method": "GetIamPolicy" + }, + { + "service": "google.cloud.bigquery.connection.v1beta1.ConnectionService", + "method": "SetIamPolicy" + }, + { + "service": "google.cloud.bigquery.connection.v1beta1.ConnectionService", + "method": "TestIamPermissions" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.bigquery.connection.v1beta1.ConnectionService", + "method": "GetConnection" + }, + { + "service": "google.cloud.bigquery.connection.v1beta1.ConnectionService", + "method": "ListConnections" + }, + { + "service": "google.cloud.bigquery.connection.v1beta1.ConnectionService", + "method": "DeleteConnection" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/bigquery/connection/v1beta1/bigqueryconnection_v1beta1.yaml b/google/cloud/bigquery/connection/v1beta1/bigqueryconnection_v1beta1.yaml new file mode 100644 index 000000000..0758da5e1 --- /dev/null +++ b/google/cloud/bigquery/connection/v1beta1/bigqueryconnection_v1beta1.yaml @@ -0,0 +1,18 @@ +type: google.api.Service +config_version: 3 +name: bigqueryconnection.googleapis.com +title: BigQuery Connection API + +apis: +- name: google.cloud.bigquery.connection.v1beta1.ConnectionService + +documentation: + summary: Allows users to manage BigQuery connections to external data sources. + +authentication: + rules: + - selector: 'google.cloud.bigquery.connection.v1beta1.ConnectionService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/bigquery/connection/v1beta1/connection.proto b/google/cloud/bigquery/connection/v1beta1/connection.proto new file mode 100644 index 000000000..5b6d05dff --- /dev/null +++ b/google/cloud/bigquery/connection/v1beta1/connection.proto @@ -0,0 +1,306 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.connection.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.Connection.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/connection/v1beta1;connection"; +option java_outer_classname = "ConnectionProto"; +option java_package = "com.google.cloud.bigquery.connection.v1beta1"; + +// Manages external data source connections and credentials. +service ConnectionService { + option (google.api.default_host) = "bigqueryconnection.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/bigquery," + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new connection. + rpc CreateConnection(CreateConnectionRequest) returns (Connection) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/connections" + body: "connection" + }; + option (google.api.method_signature) = "parent,connection,connection_id"; + } + + // Returns specified connection. + rpc GetConnection(GetConnectionRequest) returns (Connection) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/connections/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of connections in the given project. + rpc ListConnections(ListConnectionsRequest) returns (ListConnectionsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/connections" + }; + option (google.api.method_signature) = "parent,max_results"; + } + + // Updates the specified connection. For security reasons, also resets + // credential if connection properties are in the update field mask. + rpc UpdateConnection(UpdateConnectionRequest) returns (Connection) { + option (google.api.http) = { + patch: "/v1beta1/{name=projects/*/locations/*/connections/*}" + body: "connection" + }; + option (google.api.method_signature) = "name,connection,update_mask"; + } + + // Sets the credential for the specified connection. + rpc UpdateConnectionCredential(UpdateConnectionCredentialRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + patch: "/v1beta1/{name=projects/*/locations/*/connections/*/credential}" + body: "credential" + }; + option (google.api.method_signature) = "name,credential"; + } + + // Deletes connection and associated credential. + rpc DeleteConnection(DeleteConnectionRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/connections/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the access control policy for a resource. + // Returns an empty policy if the resource exists and does not have a policy + // set. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/connections/*}:getIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource,options"; + } + + // Sets the access control policy on the specified resource. Replaces any + // existing policy. + // + // Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/connections/*}:setIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource,policy"; + } + + // Returns permissions that a caller has on the specified resource. + // If the resource does not exist, this will return an empty set of + // permissions, not a NOT_FOUND error. + // + // Note: This operation is designed to be used for building permission-aware + // UIs and command-line tools, not for authorization checking. This operation + // may "fail open" without warning. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/connections/*}:testIamPermissions" + body: "*" + }; + option (google.api.method_signature) = "resource,permissions"; + } +} + +// The request for [ConnectionService.CreateConnection][google.cloud.bigquery.connection.v1beta1.ConnectionService.CreateConnection]. +message CreateConnectionRequest { + // Required. Parent resource name. + // Must be in the format `projects/{project_id}/locations/{location_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Connection id that should be assigned to the created connection. + string connection_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Connection to create. + Connection connection = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request for [ConnectionService.GetConnection][google.cloud.bigquery.connection.v1beta1.ConnectionService.GetConnection]. +message GetConnectionRequest { + // Required. Name of the requested connection, for example: + // `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryconnection.googleapis.com/Connection" + } + ]; +} + +// The request for [ConnectionService.ListConnections][google.cloud.bigquery.connection.v1beta1.ConnectionService.ListConnections]. +message ListConnectionsRequest { + // Required. Parent resource name. + // Must be in the form: `projects/{project_id}/locations/{location_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Maximum number of results per page. + google.protobuf.UInt32Value max_results = 2 [(google.api.field_behavior) = REQUIRED]; + + // Page token. + string page_token = 3; +} + +// The response for [ConnectionService.ListConnections][google.cloud.bigquery.connection.v1beta1.ConnectionService.ListConnections]. +message ListConnectionsResponse { + // Next page token. + string next_page_token = 1; + + // List of connections. + repeated Connection connections = 2; +} + +// The request for [ConnectionService.UpdateConnection][google.cloud.bigquery.connection.v1beta1.ConnectionService.UpdateConnection]. +message UpdateConnectionRequest { + // Required. Name of the connection to update, for example: + // `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryconnection.googleapis.com/Connection" + } + ]; + + // Required. Connection containing the updated fields. + Connection connection = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Update mask for the connection fields to be updated. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request for [ConnectionService.UpdateConnectionCredential][google.cloud.bigquery.connection.v1beta1.ConnectionService.UpdateConnectionCredential]. +message UpdateConnectionCredentialRequest { + // Required. Name of the connection, for example: + // `projects/{project_id}/locations/{location_id}/connections/{connection_id}/credential` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Credential to use with the connection. + ConnectionCredential credential = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request for [ConnectionService.DeleteConnectionRequest][]. +message DeleteConnectionRequest { + // Required. Name of the deleted connection, for example: + // `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryconnection.googleapis.com/Connection" + } + ]; +} + +// Configuration parameters to establish connection with an external data +// source, except the credential attributes. +message Connection { + option (google.api.resource) = { + type: "bigqueryconnection.googleapis.com/Connection" + pattern: "projects/{project}/locations/{location}/connections/{connection}" + }; + + // The resource name of the connection in the form of: + // `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + string name = 1; + + // User provided display name for the connection. + string friendly_name = 2; + + // User provided description. + string description = 3; + + // Properties specific to the underlying data source. + oneof properties { + // Cloud SQL properties. + CloudSqlProperties cloud_sql = 4; + } + + // Output only. The creation timestamp of the connection. + int64 creation_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of the connection. + int64 last_modified_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. True, if credential is configured for this connection. + bool has_credential = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Credential to use with a connection. +message ConnectionCredential { + // Credential specific to the underlying data source. + oneof credential { + // Credential for Cloud SQL database. + CloudSqlCredential cloud_sql = 1; + } +} + +// Connection properties specific to the Cloud SQL. +message CloudSqlProperties { + // Supported Cloud SQL database types. + enum DatabaseType { + // Unspecified database type. + DATABASE_TYPE_UNSPECIFIED = 0; + + // Cloud SQL for PostgreSQL. + POSTGRES = 1; + + // Cloud SQL for MySQL. + MYSQL = 2; + } + + // Cloud SQL instance ID in the form `project:location:instance`. + string instance_id = 1; + + // Database name. + string database = 2; + + // Type of the Cloud SQL database. + DatabaseType type = 3; + + // Input only. Cloud SQL credential. + CloudSqlCredential credential = 4 [(google.api.field_behavior) = INPUT_ONLY]; +} + +// Credential info for the Cloud SQL. +message CloudSqlCredential { + // The username for the credential. + string username = 1; + + // The password for the credential. + string password = 2; +} diff --git a/google/cloud/bigquery/datatransfer/BUILD.bazel b/google/cloud/bigquery/datatransfer/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/cloud/bigquery/datatransfer/BUILD.bazel +++ b/google/cloud/bigquery/datatransfer/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml b/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml index 6e3950d8c..16a4c1865 100644 --- a/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml +++ b/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml @@ -6,8 +6,9 @@ common: - name: google-common-protos src_proto_paths: - v1 - service_yaml: datatransfer.yaml + service_yaml: v1/bigquerydatatransfer_v1.yaml gapic_yaml: v1/bigquerydatatransfer_gapic.yaml + proto_package: google.cloud.bigquery.datatransfer.v1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/bigquery/datatransfer/datatransfer.yaml b/google/cloud/bigquery/datatransfer/datatransfer.yaml deleted file mode 100644 index 9879bbf37..000000000 --- a/google/cloud/bigquery/datatransfer/datatransfer.yaml +++ /dev/null @@ -1,19 +0,0 @@ -type: google.api.Service -config_version: 3 -name: bigquerydatatransfer.googleapis.com -title: BigQuery Data Transfer API - -apis: -- name: google.cloud.bigquery.datatransfer.v1.DataTransferService - -documentation: - summary: |- - Transfers data from partner SaaS applications to Google BigQuery on a - scheduled, managed basis. - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/bigquery/datatransfer/v1/BUILD.bazel b/google/cloud/bigquery/datatransfer/v1/BUILD.bazel index a26bb5e1c..47f825f96 100644 --- a/google/cloud/bigquery/datatransfer/v1/BUILD.bazel +++ b/google/cloud/bigquery/datatransfer/v1/BUILD.bazel @@ -1,20 +1,25 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "bigquerydatatransfer_proto", + name = "datatransfer_proto", srcs = [ - ":datatransfer.proto", - ":transfer.proto", + "datatransfer.proto", + "transfer.proto", ], deps = [ "//google/api:annotations_proto", "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/rpc:status_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:empty_proto", @@ -26,8 +31,11 @@ proto_library( ) proto_library_with_info( - name = "bigquerydatatransfer_proto_with_info", - deps = [":bigquerydatatransfer_proto"], + name = "datatransfer_proto_with_info", + deps = [ + ":datatransfer_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -35,75 +43,55 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( - name = "bigquerydatatransfer_java_proto", - deps = [":bigquerydatatransfer_proto"], + name = "datatransfer_java_proto", + deps = [":datatransfer_proto"], ) java_grpc_library( - name = "bigquerydatatransfer_java_grpc", - srcs = [":bigquerydatatransfer_proto"], - deps = [":bigquerydatatransfer_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "bigquerydatatransfer_resource_name_java_proto", - gapic_yaml = "bigquerydatatransfer_gapic.yaml", - deps = [":bigquerydatatransfer_proto"], + name = "datatransfer_java_grpc", + srcs = [":datatransfer_proto"], + deps = [":datatransfer_java_proto"], ) java_gapic_library( - name = "bigquerydatatransfer_java_gapic", - src = ":bigquerydatatransfer_proto_with_info", + name = "datatransfer_java_gapic", + src = ":datatransfer_proto_with_info", gapic_yaml = "bigquerydatatransfer_gapic.yaml", - service_yaml = "//google/cloud/bigquery/datatransfer:datatransfer.yaml", - test_deps = [":bigquerydatatransfer_java_grpc"], + package = "google.cloud.bigquery.datatransfer.v1", + service_yaml = "bigquerydatatransfer_v1.yaml", + test_deps = [ + ":datatransfer_java_grpc", + ], deps = [ - ":bigquerydatatransfer_java_proto", - ":bigquerydatatransfer_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ":datatransfer_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":bigquerydatatransfer_java_gapic_test", +java_gapic_test( + name = "datatransfer_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClientTest", ], -) for test_name in [ - "com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClientTest", -]] + runtime_deps = [":datatransfer_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-bigquerydatatransfer-v1-java", - client_deps = [ - ":bigquerydatatransfer_java_gapic", - ], - client_group = "com.google.cloud", - client_test_deps = [ - ":bigquerydatatransfer_java_gapic_test", + name = "google-cloud-bigquery-datatransfer-v1-java", + deps = [ + ":datatransfer_java_gapic", + ":datatransfer_java_grpc", + ":datatransfer_java_proto", + ":datatransfer_proto", ], - grpc_deps = [":bigquerydatatransfer_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":bigquerydatatransfer_java_proto", - ":bigquerydatatransfer_proto", - ":bigquerydatatransfer_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", ) ############################################################################## @@ -111,17 +99,17 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "bigquerydatatransfer_go_proto", + name = "datatransfer_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1", - protos = [":bigquerydatatransfer_proto"], + protos = [":datatransfer_proto"], deps = [ "//google/api:annotations_go_proto", "//google/rpc:status_go_proto", @@ -129,28 +117,257 @@ go_proto_library( ) go_gapic_library( - name = "bigquerydatatransfer_go_gapic", - src = ":bigquerydatatransfer_proto_with_info", - gapic_yaml = "bigquerydatatransfer_gapic.yaml", - importpath = "cloud.google.com/go/bigquery/datatransfer/apiv1", - service_yaml = "//google/cloud/bigquery/datatransfer:datatransfer.yaml", - deps = [":bigquerydatatransfer_go_proto"], + name = "datatransfer_go_gapic", + srcs = [":datatransfer_proto_with_info"], + grpc_service_config = "bigquerydatatransfer_grpc_service_config.json", + importpath = "cloud.google.com/go/bigquery/datatransfer/apiv1;datatransfer", + service_yaml = "bigquerydatatransfer_v1.yaml", + deps = [ + ":datatransfer_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], ) go_test( - name = "bigquerydatatransfer_go_gapic_test", - srcs = [":bigquerydatatransfer_go_gapic_srcjar_test"], - embed = [":bigquerydatatransfer_go_gapic"], + name = "datatransfer_go_gapic_test", + srcs = [":datatransfer_go_gapic_srcjar_test"], + embed = [":datatransfer_go_gapic"], importpath = "cloud.google.com/go/bigquery/datatransfer/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-bigquerydatatransfer-v1-go", + name = "gapi-cloud-bigquery-datatransfer-v1-go", deps = [ - ":bigquerydatatransfer_go_gapic", - ":bigquerydatatransfer_go_gapic_srcjar-smoke-test.srcjar", - ":bigquerydatatransfer_go_gapic_srcjar-test.srcjar", - ":bigquerydatatransfer_go_proto", + ":datatransfer_go_gapic", + ":datatransfer_go_gapic_srcjar-test.srcjar", + ":datatransfer_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "datatransfer_moved_proto", + srcs = [":datatransfer_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "datatransfer_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":datatransfer_moved_proto"], +) + +py_grpc_library( + name = "datatransfer_py_grpc", + srcs = [":datatransfer_moved_proto"], + deps = [":datatransfer_py_proto"], +) + +py_gapic_library( + name = "datatransfer_py_gapic", + src = ":datatransfer_proto_with_info", + gapic_yaml = "bigquerydatatransfer_gapic.yaml", + package = "google.cloud.bigquery.datatransfer.v1", + service_yaml = "bigquerydatatransfer_v1.yaml", + deps = [ + ":datatransfer_py_grpc", + ":datatransfer_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "bigquery-datatransfer-v1-py", + deps = [ + ":datatransfer_py_gapic", + ":datatransfer_py_grpc", + ":datatransfer_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "datatransfer_php_proto", + deps = [":datatransfer_proto"], +) + +php_grpc_library( + name = "datatransfer_php_grpc", + srcs = [":datatransfer_proto"], + deps = [":datatransfer_php_proto"], +) + +php_gapic_library( + name = "datatransfer_php_gapic", + src = ":datatransfer_proto_with_info", + gapic_yaml = "bigquerydatatransfer_gapic.yaml", + package = "google.cloud.bigquery.datatransfer.v1", + service_yaml = "bigquerydatatransfer_v1.yaml", + deps = [ + ":datatransfer_php_grpc", + ":datatransfer_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-bigquery-datatransfer-v1-php", + deps = [ + ":datatransfer_php_gapic", + ":datatransfer_php_grpc", + ":datatransfer_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "datatransfer_nodejs_gapic", + src = ":datatransfer_proto_with_info", + gapic_yaml = "bigquerydatatransfer_gapic.yaml", + package = "google.cloud.bigquery.datatransfer.v1", + service_yaml = "bigquerydatatransfer_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "bigquery-datatransfer-v1-nodejs", + deps = [ + ":datatransfer_nodejs_gapic", + ":datatransfer_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "datatransfer_ruby_proto", + deps = [":datatransfer_proto"], +) + +ruby_grpc_library( + name = "datatransfer_ruby_grpc", + srcs = [":datatransfer_proto"], + deps = [":datatransfer_ruby_proto"], +) + +ruby_gapic_library( + name = "datatransfer_ruby_gapic", + src = ":datatransfer_proto_with_info", + gapic_yaml = "bigquerydatatransfer_gapic.yaml", + package = "google.cloud.bigquery.datatransfer.v1", + service_yaml = "bigquerydatatransfer_v1.yaml", + deps = [ + ":datatransfer_ruby_grpc", + ":datatransfer_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-bigquery-datatransfer-v1-ruby", + deps = [ + ":datatransfer_ruby_gapic", + ":datatransfer_ruby_grpc", + ":datatransfer_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "datatransfer_csharp_proto", + deps = [":datatransfer_proto"], +) + +csharp_grpc_library( + name = "datatransfer_csharp_grpc", + srcs = [":datatransfer_proto"], + deps = [":datatransfer_csharp_proto"], +) + +csharp_gapic_library( + name = "datatransfer_csharp_gapic", + src = ":datatransfer_proto_with_info", + gapic_yaml = "bigquerydatatransfer_gapic.yaml", + package = "google.cloud.bigquery.datatransfer.v1", + service_yaml = "bigquerydatatransfer_v1.yaml", + deps = [ + ":datatransfer_csharp_grpc", + ":datatransfer_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-bigquery-datatransfer-v1-csharp", + deps = [ + ":datatransfer_csharp_gapic", + ":datatransfer_csharp_grpc", + ":datatransfer_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.legacy.yaml b/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.legacy.yaml new file mode 100644 index 000000000..1320af240 --- /dev/null +++ b/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.legacy.yaml @@ -0,0 +1,424 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.bigquery.datatransfer.v1 + python: + package_name: google.cloud.bigquery_datatransfer_v1.gapic + go: + package_name: cloud.google.com/go/bigquery/datatransfer/apiv1 + csharp: + package_name: Google.Cloud.BigQuery.DataTransfer.V1 + ruby: + package_name: Google::Cloud::Bigquery::DataTransfer::V1 + release_level: BETA + php: + package_name: Google\Cloud\BigQuery\DataTransfer\V1 + nodejs: + package_name: bigquery-data-transfer.v1 + domain_layer_location: google-cloud +collection_oneofs: +- oneof_name: parent_oneof + collection_names: + - project + - location +- oneof_name: data_source_oneof + collection_names: + - project_data_source + - location_data_source +- oneof_name: transfer_config_oneof + collection_names: + - project_transfer_config + - location_transfer_config +- oneof_name: run_oneof + collection_names: + - project_run + - location_run +collections: +- name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName +- name_pattern: projects/{project}/locations/{location} + entity_name: location +- name_pattern: projects/{project}/dataSources/{data_source} + entity_name: project_data_source +- name_pattern: projects/{project}/locations/{location}/dataSources/{data_source} + entity_name: location_data_source +- name_pattern: projects/{project}/transferConfigs/{transfer_config} + entity_name: project_transfer_config +- name_pattern: projects/{project}/locations/{location}/transferConfigs/{transfer_config} + entity_name: location_transfer_config +- name_pattern: projects/{project}/transferConfigs/{transfer_config}/runs/{run} + entity_name: project_run +- name_pattern: projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run} + entity_name: location_run +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.bigquery.datatransfer.v1.DataTransferService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location} + entity_name: location + # Definition for smoke test. + smoke_test: + method: ListDataSources + init_fields: + - parent%project=$PROJECT_ID + - parent%location="us-central1" + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # name - The simple name of the method. + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce + # method overloads which allow a client to directly pass request message + # fields as method parameters. This information may or may not be used, + # depending on the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request + # message. + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the + # resource name formats defined in the field_name_patterns + # and response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a + # paging list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It + # defines which fields match the paging pattern in the request. The + # request consists of a page_size_field and a token_field. The + # page_size_field is the name of the optional field specifying the + # maximum number of elements to be returned in the response. The + # token_field is the name of the field in the request containing the + # page token. + # The response specifies response information of the list method. It + # defines which fields match the paging pattern in the response. The + # response consists of a token_field and a resources_field. The + # token_field is the name of the field in the response containing the + # next page token. The resources_field is the name of the field in the + # response containing the list of resources belonging to the page. + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: GetDataSource + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: data_source_oneof + timeout_millis: 20000 + resource_name_treatment: STATIC_TYPES + header_request_params: + - name + - name: ListDataSources + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: data_sources + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: parent_oneof + timeout_millis: 20000 + resource_name_treatment: STATIC_TYPES + header_request_params: + - parent + - name: CreateTransferConfig + flattening: + groups: + - parameters: + - parent + - transfer_config + required_fields: + - parent + - transfer_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: parent_oneof + timeout_millis: 30000 + resource_name_treatment: STATIC_TYPES + header_request_params: + - parent + - name: UpdateTransferConfig + flattening: + groups: + - parameters: + - transfer_config + - update_mask + required_fields: + - transfer_config + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + transfer_config.name: transfer_config_oneof + timeout_millis: 30000 + resource_name_treatment: STATIC_TYPES + header_request_params: + - transfer_config.name + - name: DeleteTransferConfig + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: transfer_config_oneof + timeout_millis: 30000 + resource_name_treatment: STATIC_TYPES + header_request_params: + - name + - name: GetTransferConfig + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: transfer_config_oneof + timeout_millis: 30000 + resource_name_treatment: STATIC_TYPES + header_request_params: + - name + - name: ListTransferConfigs + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: transfer_configs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: parent_oneof + timeout_millis: 30000 + resource_name_treatment: STATIC_TYPES + header_request_params: + - parent + - name: ScheduleTransferRuns + flattening: + groups: + - parameters: + - parent + - start_time + - end_time + required_fields: + - parent + - start_time + - end_time + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: transfer_config_oneof + timeout_millis: 30000 + resource_name_treatment: STATIC_TYPES + header_request_params: + - parent + - name: GetTransferRun + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: run_oneof + timeout_millis: 30000 + resource_name_treatment: STATIC_TYPES + header_request_params: + - name + - name: DeleteTransferRun + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: run_oneof + timeout_millis: 30000 + resource_name_treatment: STATIC_TYPES + header_request_params: + - name + - name: ListTransferRuns + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: transfer_runs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: transfer_config_oneof + timeout_millis: 30000 + resource_name_treatment: STATIC_TYPES + header_request_params: + - parent + - name: ListTransferLogs + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: transfer_messages + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: run_oneof + timeout_millis: 30000 + resource_name_treatment: STATIC_TYPES + header_request_params: + - parent + - name: CheckValidCreds + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: data_source_oneof + timeout_millis: 30000 + resource_name_treatment: STATIC_TYPES + header_request_params: + - name +resource_name_generation: +- message_name: GetDataSourceRequest + field_entity_map: + name: data_source_oneof +- message_name: ListDataSourcesRequest + field_entity_map: + parent: parent_oneof +- message_name: CreateTransferConfigRequest + field_entity_map: + parent: parent_oneof +- message_name: GetTransferConfigRequest + field_entity_map: + name: transfer_config_oneof +- message_name: DeleteTransferConfigRequest + field_entity_map: + name: transfer_config_oneof +- message_name: GetTransferRunRequest + field_entity_map: + name: run_oneof +- message_name: DeleteTransferRunRequest + field_entity_map: + name: run_oneof +- message_name: ListTransferConfigsRequest + field_entity_map: + parent: parent_oneof +- message_name: ListTransferRunsRequest + field_entity_map: + parent: transfer_config_oneof +- message_name: ListTransferLogsRequest + field_entity_map: + parent: run_oneof +- message_name: CheckValidCredsRequest + field_entity_map: + name: data_source_oneof +- message_name: ScheduleTransferRunsRequest + field_entity_map: + parent: transfer_config_oneof +- message_name: DataSource + field_entity_map: + name: data_source_oneof +- message_name: TransferConfig + field_entity_map: + name: transfer_config_oneof +- message_name: TransferRun + field_entity_map: + name: run_oneof diff --git a/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.yaml b/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.yaml index 82ea62ff5..cca93ce4d 100644 --- a/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.yaml +++ b/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -18,44 +18,11 @@ language_settings: nodejs: package_name: bigquery-data-transfer.v1 domain_layer_location: google-cloud -collection_oneofs: -- oneof_name: parent_oneof - collection_names: - - project - - location -- oneof_name: data_source_oneof - collection_names: - - project_data_source - - location_data_source -- oneof_name: transfer_config_oneof - collection_names: - - project_transfer_config - - location_transfer_config -- oneof_name: run_oneof - collection_names: - - project_run - - location_run collections: -- name_pattern: projects/{project} - entity_name: project +- entity_name: project language_overrides: - language: csharp common_resource_name: Google.Api.Gax.ResourceNames.ProjectName -- name_pattern: projects/{project}/locations/{location} - entity_name: location -- name_pattern: projects/{project}/dataSources/{data_source} - entity_name: project_data_source -- name_pattern: projects/{project}/locations/{location}/dataSources/{data_source} - entity_name: location_data_source -- name_pattern: projects/{project}/transferConfigs/{transfer_config} - entity_name: project_transfer_config -- name_pattern: projects/{project}/locations/{location}/transferConfigs/{transfer_config} - entity_name: location_transfer_config -- name_pattern: projects/{project}/transferConfigs/{transfer_config}/runs/{run} - entity_name: project_run -- name_pattern: projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run} - entity_name: location_run -# A list of API interface configurations. interfaces: # The fully qualified name of the API interface. - name: google.cloud.bigquery.datatransfer.v1.DataTransferService @@ -69,356 +36,29 @@ interfaces: # methods. If empty, no name methods are generated. # The entity_name is the name to be used as a basis for generated methods and # classes. - collections: - - name_pattern: projects/{project}/locations/{location} - entity_name: location + deprecated_collections: + - name_pattern: projects/{project}/dataSources/{data_source} + entity_name: project_data_source + - name_pattern: projects/{project}/locations/{location}/dataSources/{data_source} + entity_name: location_data_source + - name_pattern: projects/{project}/transferConfigs/{transfer_config} + entity_name: project_transfer_config + - name_pattern: projects/{project}/locations/{location}/transferConfigs/{transfer_config} + entity_name: location_transfer_config + - name_pattern: projects/{project}/transferConfigs/{transfer_config}/runs/{run} + entity_name: project_run + - name_pattern: projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run} + entity_name: location_run # Definition for smoke test. smoke_test: method: ListDataSources init_fields: - parent%project=$PROJECT_ID - parent%location="us-central1" - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # name - The simple name of the method. - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce - # method overloads which allow a client to directly pass request message - # fields as method parameters. This information may or may not be used, - # depending on the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request - # message. - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the - # resource name formats defined in the field_name_patterns - # and response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a - # paging list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It - # defines which fields match the paging pattern in the request. The - # request consists of a page_size_field and a token_field. The - # page_size_field is the name of the optional field specifying the - # maximum number of elements to be returned in the response. The - # token_field is the name of the field in the request containing the - # page token. - # The response specifies response information of the list method. It - # defines which fields match the paging pattern in the response. The - # response consists of a token_field and a resources_field. The - # token_field is the name of the field in the response containing the - # next page token. The resources_field is the name of the field in the - # response containing the list of resources belonging to the page. - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: GetDataSource - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: data_source_oneof - timeout_millis: 20000 - resource_name_treatment: STATIC_TYPES - header_request_params: - - name - - name: ListDataSources - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: data_sources - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: parent_oneof - timeout_millis: 20000 - resource_name_treatment: STATIC_TYPES - header_request_params: - - parent - - name: CreateTransferConfig - flattening: - groups: - - parameters: - - parent - - transfer_config - required_fields: - - parent - - transfer_config - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: parent_oneof - timeout_millis: 30000 - resource_name_treatment: STATIC_TYPES - header_request_params: - - parent - - name: UpdateTransferConfig - flattening: - groups: - - parameters: - - transfer_config - - update_mask - required_fields: - - transfer_config - - update_mask - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - transfer_config.name: transfer_config_oneof - timeout_millis: 30000 - resource_name_treatment: STATIC_TYPES - header_request_params: - - transfer_config.name - name: DeleteTransferConfig - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: transfer_config_oneof - timeout_millis: 30000 - resource_name_treatment: STATIC_TYPES - header_request_params: - - name - - name: GetTransferConfig - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: transfer_config_oneof - timeout_millis: 30000 - resource_name_treatment: STATIC_TYPES - header_request_params: - - name - - name: ListTransferConfigs - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: transfer_configs retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: parent_oneof - timeout_millis: 30000 - resource_name_treatment: STATIC_TYPES - header_request_params: - - parent - - name: ScheduleTransferRuns - flattening: - groups: - - parameters: - - parent - - start_time - - end_time - required_fields: - - parent - - start_time - - end_time - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: transfer_config_oneof - timeout_millis: 30000 - resource_name_treatment: STATIC_TYPES - header_request_params: - - parent - - name: GetTransferRun - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: run_oneof - timeout_millis: 30000 - resource_name_treatment: STATIC_TYPES - header_request_params: - - name - name: DeleteTransferRun - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: run_oneof - timeout_millis: 30000 - resource_name_treatment: STATIC_TYPES - header_request_params: - - name - - name: ListTransferRuns - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: transfer_runs - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: transfer_config_oneof - timeout_millis: 30000 - resource_name_treatment: STATIC_TYPES - header_request_params: - - parent - - name: ListTransferLogs - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: transfer_messages retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: run_oneof - timeout_millis: 30000 - resource_name_treatment: STATIC_TYPES - header_request_params: - - parent - name: CheckValidCreds - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: data_source_oneof - timeout_millis: 30000 - resource_name_treatment: STATIC_TYPES - header_request_params: - - name -resource_name_generation: -- message_name: GetDataSourceRequest - field_entity_map: - name: data_source_oneof -- message_name: ListDataSourcesRequest - field_entity_map: - parent: parent_oneof -- message_name: CreateTransferConfigRequest - field_entity_map: - parent: parent_oneof -- message_name: GetTransferConfigRequest - field_entity_map: - name: transfer_config_oneof -- message_name: DeleteTransferConfigRequest - field_entity_map: - name: transfer_config_oneof -- message_name: GetTransferRunRequest - field_entity_map: - name: run_oneof -- message_name: DeleteTransferRunRequest - field_entity_map: - name: run_oneof -- message_name: ListTransferConfigsRequest - field_entity_map: - parent: parent_oneof -- message_name: ListTransferRunsRequest - field_entity_map: - parent: transfer_config_oneof -- message_name: ListTransferLogsRequest - field_entity_map: - parent: run_oneof -- message_name: CheckValidCredsRequest - field_entity_map: - name: data_source_oneof -- message_name: ScheduleTransferRunsRequest - field_entity_map: - parent: transfer_config_oneof -- message_name: DataSource - field_entity_map: - name: data_source_oneof -- message_name: TransferConfig - field_entity_map: - name: transfer_config_oneof -- message_name: TransferRun - field_entity_map: - name: run_oneof diff --git a/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_grpc_service_config.json b/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_grpc_service_config.json new file mode 100755 index 000000000..fae673513 --- /dev/null +++ b/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_grpc_service_config.json @@ -0,0 +1,76 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.bigquery.datatransfer.v1.DataTransferService", + "method": "GetDataSource" + }, + { + "service": "google.cloud.bigquery.datatransfer.v1.DataTransferService", + "method": "ListDataSources" + }, + { + "service": "google.cloud.bigquery.datatransfer.v1.DataTransferService", + "method": "DeleteTransferConfig" + }, + { + "service": "google.cloud.bigquery.datatransfer.v1.DataTransferService", + "method": "GetTransferConfig" + }, + { + "service": "google.cloud.bigquery.datatransfer.v1.DataTransferService", + "method": "ListTransferConfigs" + }, + { + "service": "google.cloud.bigquery.datatransfer.v1.DataTransferService", + "method": "GetTransferRun" + }, + { + "service": "google.cloud.bigquery.datatransfer.v1.DataTransferService", + "method": "DeleteTransferRun" + }, + { + "service": "google.cloud.bigquery.datatransfer.v1.DataTransferService", + "method": "ListTransferRuns" + }, + { + "service": "google.cloud.bigquery.datatransfer.v1.DataTransferService", + "method": "ListTransferLogs" + }, + { + "service": "google.cloud.bigquery.datatransfer.v1.DataTransferService", + "method": "CheckValidCreds" + } + ], + "timeout": "20s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.bigquery.datatransfer.v1.DataTransferService", + "method": "CreateTransferConfig" + }, + { + "service": "google.cloud.bigquery.datatransfer.v1.DataTransferService", + "method": "UpdateTransferConfig" + }, + { + "service": "google.cloud.bigquery.datatransfer.v1.DataTransferService", + "method": "ScheduleTransferRuns" + } + ], + "timeout": "30s" + } + ] +} diff --git a/google/cloud/bigquery/datatransfer/bigquerydatatransfer.yaml b/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_v1.yaml similarity index 100% rename from google/cloud/bigquery/datatransfer/bigquerydatatransfer.yaml rename to google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_v1.yaml diff --git a/google/cloud/bigquery/datatransfer/v1/datasource.proto b/google/cloud/bigquery/datatransfer/v1/datasource.proto deleted file mode 100644 index d7400a559..000000000 --- a/google/cloud/bigquery/datatransfer/v1/datasource.proto +++ /dev/null @@ -1,542 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.bigquery.datatransfer.v1; - -import "google/api/annotations.proto"; -import "google/cloud/bigquery/datatransfer/v1/datatransfer.proto"; -import "google/cloud/bigquery/datatransfer/v1/transfer.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; -import "google/api/client.proto"; - -option csharp_namespace = "Google.Cloud.BigQuery.DataTransfer.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1;datatransfer"; -option java_multiple_files = true; -option java_outer_classname = "DataSourceProto"; -option java_package = "com.google.cloud.bigquery.datatransfer.v1"; -option php_namespace = "Google\\Cloud\\BigQuery\\DataTransfer\\V1"; - -// The Google BigQuery Data Transfer API allows BigQuery users to -// configure transfer of their data from other Google Products into BigQuery. -// This service exposes methods that should be used by data source backend. -service DataSourceService { - option (google.api.default_host) = "bigquerydatatransfer.googleapis.com"; - - // Update a transfer run. If successful, resets - // data_source.update_deadline_seconds timer. - rpc UpdateTransferRun(UpdateTransferRunRequest) returns (TransferRun) { - option (google.api.http) = { - patch: "/v1/{transfer_run.name=projects/*/locations/*/transferConfigs/*/runs/*}" - body: "transfer_run" - }; - } - - // Log messages for a transfer run. If successful (at least 1 message), resets - // data_source.update_deadline_seconds timer. - rpc LogTransferRunMessages(LogTransferRunMessagesRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}:logMessages" - body: "*" - }; - } - - // Notify the Data Transfer Service that data is ready for loading. - // The Data Transfer Service will start and monitor multiple BigQuery Load - // jobs for a transfer run. Monitored jobs will be automatically retried - // and produce log messages when starting and finishing a job. - // Can be called multiple times for the same transfer run. - rpc StartBigQueryJobs(StartBigQueryJobsRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}:startBigQueryJobs" - body: "*" - }; - } - - // Notify the Data Transfer Service that the data source is done processing - // the run. No more status updates or requests to start/monitor jobs will be - // accepted. The run will be finalized by the Data Transfer Service when all - // monitored jobs are completed. - // Does not need to be called if the run is set to FAILED. - rpc FinishRun(FinishRunRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}:finishRun" - body: "*" - }; - } - - // Creates a data source definition. Calling this method will automatically - // use your credentials to create the following Google Cloud resources in - // YOUR Google Cloud project. - // 1. OAuth client - // 2. Pub/Sub Topics and Subscriptions in each supported_location_ids. e.g., - // projects/{project_id}/{topics|subscriptions}/bigquerydatatransfer.{data_source_id}.{location_id}.run - // The field data_source.client_id should be left empty in the input request, - // as the API will create a new OAuth client on behalf of the caller. On the - // other hand data_source.scopes usually need to be set when there are OAuth - // scopes that need to be granted by end users. - // 3. We need a longer deadline due to the 60 seconds SLO from Pub/Sub admin - // Operations. This also applies to update and delete data source definition. - rpc CreateDataSourceDefinition(CreateDataSourceDefinitionRequest) returns (DataSourceDefinition) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/dataSourceDefinitions" - body: "data_source_definition" - }; - } - - // Updates an existing data source definition. If changing - // supported_location_ids, triggers same effects as mentioned in "Create a - // data source definition." - rpc UpdateDataSourceDefinition(UpdateDataSourceDefinitionRequest) returns (DataSourceDefinition) { - option (google.api.http) = { - patch: "/v1/{data_source_definition.name=projects/*/locations/*/dataSourceDefinitions/*}" - body: "data_source_definition" - }; - } - - // Deletes a data source definition, all of the transfer configs associated - // with this data source definition (if any) must be deleted first by the user - // in ALL regions, in order to delete the data source definition. - // This method is primarily meant for deleting data sources created during - // testing stage. - // If the data source is referenced by transfer configs in the region - // specified in the request URL, the method will fail immediately. If in the - // current region (e.g., US) it's not used by any transfer configs, but in - // another region (e.g., EU) it is, then although the method will succeed in - // region US, but it will fail when the deletion operation is replicated to - // region EU. And eventually, the system will replicate the data source - // definition back from EU to US, in order to bring all regions to - // consistency. The final effect is that the data source appears to be - // 'undeleted' in the US region. - rpc DeleteDataSourceDefinition(DeleteDataSourceDefinitionRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/dataSourceDefinitions/*}" - }; - } - - // Retrieves an existing data source definition. - rpc GetDataSourceDefinition(GetDataSourceDefinitionRequest) returns (DataSourceDefinition) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/dataSourceDefinitions/*}" - }; - } - - // Lists supported data source definitions. - rpc ListDataSourceDefinitions(ListDataSourceDefinitionsRequest) returns (ListDataSourceDefinitionsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/dataSourceDefinitions" - }; - } -} - -// Describes data which should be imported. -message ImportedDataInfo { - // Defines schema of a field in the imported data. - message FieldSchema { - // LINT.IfChange - // Field type. - enum Type { - // Illegal value. - TYPE_UNSPECIFIED = 0; - - // 64K, UTF8. - STRING = 1; - - // 64-bit signed. - INTEGER = 2; - - // 64-bit IEEE floating point. - FLOAT = 3; - - // Aggregate type. - RECORD = 4; - - // 64K, Binary. - BYTES = 5; - - // 2-valued. - BOOLEAN = 6; - - // 64-bit signed usec since UTC epoch. - TIMESTAMP = 7; - - // Civil date - Year, Month, Day. - DATE = 8; - - // Civil time - Hour, Minute, Second, Microseconds. - TIME = 9; - - // Combination of civil date and civil time. - DATETIME = 10; - - // Numeric type with 38 decimal digits of precision and 9 decimal digits - // of scale. - NUMERIC = 11; - - // Geography object (go/googlesql_geography). - GEOGRAPHY = 12; - } - - // Field name. Matches: [A-Za-z_][A-Za-z_0-9]{0,127} - string field_name = 1; - - // Field type - Type type = 2; - - // Is field repeated. - bool is_repeated = 3; - - // Description for this field. - string description = 4; - - // Present iff type == RECORD. - RecordSchema schema = 5; - } - - // Describes schema of the data to be ingested. - message RecordSchema { - // One field per column in the record. - repeated FieldSchema fields = 1; - } - - // External table definition. These tables can be referenced with 'name' - // in the query and can be read just like any other table. - message TableDefinition { - // CSV specific options. - message CsvOptions { - // The delimiter. We currently restrict this to U+0001 to U+00FF and - // apply additional constraints during validation. - google.protobuf.StringValue field_delimiter = 1; - - // Whether CSV files are allowed to have quoted newlines. If quoted - // newlines are allowed, we can't split CSV files. - google.protobuf.BoolValue allow_quoted_newlines = 2; - - // The quote character. We currently restrict this to U+0000 to U+00FF - // and apply additional constraints during validation. Set to '\0' to - // indicate no quote is used. - google.protobuf.StringValue quote_char = 3; - - // Number of leading rows to skip. - google.protobuf.Int64Value skip_leading_rows = 4; - - // Accept rows that are missing trailing optional columns. - google.protobuf.BoolValue allow_jagged_rows = 5; - } - - // BigQuery table_id (required). This will be used to reference this - // table in the query. - string table_id = 1; - - // URIs for the data to be imported. All URIs must be from the same storage - // system. - repeated string source_uris = 2; - - // Describes the format of the data in source_uri. - Format format = 3; - - // Specify the maximum number of bad records that can be ignored. - // If bad records exceed this threshold the query is aborted. - int32 max_bad_records = 4; - - // Character encoding of the input when applicable (CSV, JSON). - // Defaults to UTF8. - Encoding encoding = 5; - - // CSV specific options. - CsvOptions csv_options = 6; - - // Optional schema for the data. When not specified for JSON and CSV formats - // we will try to detect it automatically. - RecordSchema schema = 7; - - // Indicates if extra values that are not represented in the table schema is - // allowed. - google.protobuf.BoolValue ignore_unknown_values = 10; - } - - // Data format. - enum Format { - // Unspecified format. In this case, we have to infer the format from the - // data source. - FORMAT_UNSPECIFIED = 0; - - // CSV format. - CSV = 1; - - // Newline-delimited JSON. - JSON = 2; - - // Avro format. See http://avro.apache.org . - AVRO = 3; - - // RecordIO. - RECORDIO = 4; - - // ColumnIO. - COLUMNIO = 5; - - // Capacitor. - CAPACITOR = 6; - - // Parquet format. See https://parquet.apache.org . - PARQUET = 7; - - // ORC format. See https://orc.apache.org . - ORC = 8; - } - - // Encoding of input data in CSV/JSON format. - enum Encoding { - // Default encoding (UTF8). - ENCODING_UNSPECIFIED = 0; - - // ISO_8859_1 encoding. - ISO_8859_1 = 1; - - // UTF8 encoding. - UTF8 = 2; - } - - // SQL query to run. When empty, API checks that there is only one - // table_def specified and loads this table. Only Standard SQL queries - // are accepted. Legacy SQL is not allowed. - string sql = 1; - - // Table where results should be written. - string destination_table_id = 2; - - // The description of a destination table. This can be several sentences - // or paragraphs describing the table contents in detail. - string destination_table_description = 10; - - // When used WITHOUT the "sql" parameter, describes the schema of the - // destination table. - // When used WITH the "sql" parameter, describes tables with data stored - // outside of BigQuery. - repeated TableDefinition table_defs = 3; - - // Inline code for User-defined function resources. - // Ignored when "sql" parameter is empty. - repeated string user_defined_functions = 4; - - // Specifies the action if the destination table already exists. - WriteDisposition write_disposition = 6; -} - -// A request to update a transfer run. -message UpdateTransferRunRequest { - // Run name must be set and correspond to an already existing run. Only - // state, error_status, and data_version fields will be updated. All other - // fields will be ignored. - TransferRun transfer_run = 1; - - // Required list of fields to be updated in this request. - google.protobuf.FieldMask update_mask = 2; -} - -// A request to add transfer status messages to the run. -message LogTransferRunMessagesRequest { - // Name of the resource in the form: - // "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}" - string name = 1; - - // Messages to append. - repeated TransferMessage transfer_messages = 2; -} - -// A request to start and monitor a BigQuery load job. -message StartBigQueryJobsRequest { - // Name of the resource in the form: - // "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}" - string name = 1; - - // Import jobs which should be started and monitored. - repeated ImportedDataInfo imported_data = 2; - - // User credentials which should be used to start/monitor - // BigQuery jobs. If not specified, then jobs - // are started using data source service account credentials. - // This may be OAuth token or JWT token. - bytes user_credentials = 3; - - // The number of BQ Jobs that can run in parallel. - int32 max_parallelism = 8; -} - -// A request to finish a run. -message FinishRunRequest { - // Name of the resource in the form: - // "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}" - string name = 1; -} - -// Represents the request of the CreateDataSourceDefinition method. -message CreateDataSourceDefinitionRequest { - // The BigQuery project id for which data source definition is associated. - // Must be in the form: `projects/{project_id}/locations/{location_id}` - string parent = 1; - - // Data source definition. - DataSourceDefinition data_source_definition = 2; -} - -// Represents the request of the UpdateDataSourceDefinition method. -message UpdateDataSourceDefinitionRequest { - // Data source definition. - DataSourceDefinition data_source_definition = 1; - - // Update field mask. - google.protobuf.FieldMask update_mask = 2; -} - -// Represents the request of the DeleteDataSourceDefinition method. All transfer -// configs associated with the data source must be deleted first, before the -// data source can be deleted. -message DeleteDataSourceDefinitionRequest { - // The field will contain name of the resource requested, for example: - // `projects/{project_id}/locations/{location_id}/dataSourceDefinitions/{data_source_id}` - string name = 1; -} - -// Represents the request of the GetDataSourceDefinition method. -message GetDataSourceDefinitionRequest { - // The field will contain name of the resource requested. - string name = 1; -} - -// Options for writing to the table. -// The WRITE_EMPTY option is intentionally excluded from the enum and is not -// supported by the data transfer service. -enum WriteDisposition { - // The default writeDispostion - WRITE_DISPOSITION_UNSPECIFIED = 0; - - // overwrites the table data. - WRITE_TRUNCATE = 1; - - // the data is appended to the table. - // Note duplication might happen if this mode is used. - WRITE_APPEND = 2; -} - -// Represents the request of the ListDataSourceDefinitions method. -message ListDataSourceDefinitionsRequest { - // The BigQuery project id for which data sources should be returned. - // Must be in the form: `projects/{project_id}/locations/{location_id}` - string parent = 1; - - // Pagination token, which can be used to request a specific page - // of `ListDataSourceDefinitionsRequest` list results. For multiple-page - // results, `ListDataSourceDefinitionsResponse` outputs a `next_page` token, - // which can be used as the `page_token` value to request the next page of - // the list results. - string page_token = 2; - - // Page size. The default page size is the maximum value of 1000 results. - int32 page_size = 3; -} - -// Returns a list of supported data source definitions. -message ListDataSourceDefinitionsResponse { - // List of supported data source definitions. - repeated DataSourceDefinition data_source_definitions = 1; - - // Output only. The next-pagination token. For multiple-page list results, - // this token can be used as the - // `ListDataSourceDefinitionsRequest.page_token` - // to request the next page of the list results. - string next_page_token = 2; -} - -// Represents the data source definition. -message DataSourceDefinition { - // The resource name of the data source definition. - // Data source definition names have the form - // `projects/{project_id}/locations/{location}/dataSourceDefinitions/{data_source_id}`. - string name = 21; - - // Data source metadata. - DataSource data_source = 1; - - // The Pub/Sub topic to be used for broadcasting a message when a transfer run - // is created. Both this topic and transfer_config_pubsub_topic can be - // set to a custom topic. By default, both topics are auto-generated if none - // of them is provided when creating the definition. However, if one topic is - // manually set, the other topic has to be manually set as well. The only - // difference is that transfer_run_pubsub_topic must be a non-empty Pub/Sub - // topic, but transfer_config_pubsub_topic can be set to empty. The comments - // about "{location}" for transfer_config_pubsub_topic apply here too. - string transfer_run_pubsub_topic = 13; - - // Duration which should be added to schedule_time to calculate - // run_time when job is scheduled. Only applicable for automatically - // scheduled transfer runs. Used to start a run early on a data source that - // supports continuous data refresh to compensate for unknown timezone - // offsets. Use a negative number to start a run late for data sources not - // supporting continuous data refresh. - google.protobuf.Duration run_time_offset = 16; - - // Support e-mail address of the OAuth client's Brand, which contains the - // consent screen data. - string support_email = 22; - - // When service account is specified, BigQuery will share created dataset - // with the given service account. Also, this service account will be - // eligible to perform status updates and message logging for data transfer - // runs for the corresponding data_source_id. - string service_account = 2; - - // Is data source disabled? If true, data_source is not visible. - // API will also stop returning any data transfer configs and/or runs - // associated with the data source. This setting has higher priority - // than whitelisted_project_ids. - bool disabled = 5; - - // The Pub/Sub topic to use for broadcasting a message for transfer config. If - // empty, a message will not be broadcasted. Both this topic and - // transfer_run_pubsub_topic are auto-generated if none of them is provided - // when creating the definition. It is recommended to provide - // transfer_config_pubsub_topic if a user-owned transfer_run_pubsub_topic is - // provided. Otherwise, it will be set to empty. If "{location}" is found in - // the value, then that means, data source wants to handle message separately - // for datasets in different regions. We will replace {location} with the - // actual dataset location, as the actual topic name. For example, - // projects/connector/topics/scheduler-{location} could become - // projects/connector/topics/scheduler-us. If "{location}" is not found, then - // we will use the input value as topic name. - string transfer_config_pubsub_topic = 12; - - // Supported location_ids used for deciding in which locations Pub/Sub topics - // need to be created. If custom Pub/Sub topics are used and they contains - // '{location}', the location_ids will be used for validating the topics by - // replacing the '{location}' with the individual location in the list. The - // valid values are the "location_id" field of the response of `GET - // https://bigquerydatatransfer.googleapis.com/v1/{name=projects/*}/locations` - // In addition, if the data source needs to support all available regions, - // supported_location_ids can be set to "global" (a single string element). - // When "global" is specified: - // 1) the data source implementation is supposed to stage the data in proper - // region of the destination dataset; - // 2) Data source developer should be aware of the implications (e.g., network - // traffic latency, potential charge associated with cross-region traffic, - // etc.) of supporting the "global" region; - repeated string supported_location_ids = 23; -} diff --git a/google/cloud/bigquery/datatransfer/v1/datatransfer.proto b/google/cloud/bigquery/datatransfer/v1/datatransfer.proto index e9a396834..a401c15c3 100644 --- a/google/cloud/bigquery/datatransfer/v1/datatransfer.proto +++ b/google/cloud/bigquery/datatransfer/v1/datatransfer.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,20 +11,21 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.bigquery.datatransfer.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/bigquery/datatransfer/v1/transfer.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.BigQuery.DataTransfer.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1;datatransfer"; @@ -32,6 +33,7 @@ option java_multiple_files = true; option java_outer_classname = "DataTransferProto"; option java_package = "com.google.cloud.bigquery.datatransfer.v1"; option php_namespace = "Google\\Cloud\\BigQuery\\DataTransfer\\V1"; +option ruby_package = "Google::Cloud::Bigquery::DataTransfer::V1"; // The Google BigQuery Data Transfer Service API enables BigQuery users to // configure the transfer of their data from other Google Products into @@ -50,6 +52,7 @@ service DataTransferService { get: "/v1/{name=projects/*/dataSources/*}" } }; + option (google.api.method_signature) = "name"; } // Lists supported data sources and returns their settings, @@ -61,6 +64,7 @@ service DataTransferService { get: "/v1/{parent=projects/*}/dataSources" } }; + option (google.api.method_signature) = "parent"; } // Creates a new data transfer configuration. @@ -73,6 +77,7 @@ service DataTransferService { body: "transfer_config" } }; + option (google.api.method_signature) = "parent,transfer_config"; } // Updates a data transfer configuration. @@ -86,6 +91,7 @@ service DataTransferService { body: "transfer_config" } }; + option (google.api.method_signature) = "transfer_config,update_mask"; } // Deletes a data transfer configuration, @@ -97,6 +103,7 @@ service DataTransferService { delete: "/v1/{name=projects/*/transferConfigs/*}" } }; + option (google.api.method_signature) = "name"; } // Returns information about a data transfer config. @@ -107,6 +114,7 @@ service DataTransferService { get: "/v1/{name=projects/*/transferConfigs/*}" } }; + option (google.api.method_signature) = "name"; } // Returns information about all data transfers in the project. @@ -117,6 +125,7 @@ service DataTransferService { get: "/v1/{parent=projects/*}/transferConfigs" } }; + option (google.api.method_signature) = "parent"; } // Creates transfer runs for a time range [start_time, end_time]. @@ -134,6 +143,7 @@ service DataTransferService { body: "*" } }; + option (google.api.method_signature) = "parent,start_time,end_time"; } // Start manual transfer runs to be executed now with schedule_time equal to @@ -159,6 +169,7 @@ service DataTransferService { get: "/v1/{name=projects/*/transferConfigs/*/runs/*}" } }; + option (google.api.method_signature) = "name"; } // Deletes the specified transfer run. @@ -169,6 +180,7 @@ service DataTransferService { delete: "/v1/{name=projects/*/transferConfigs/*/runs/*}" } }; + option (google.api.method_signature) = "name"; } // Returns information about running and completed jobs. @@ -179,6 +191,7 @@ service DataTransferService { get: "/v1/{parent=projects/*/transferConfigs/*}/runs" } }; + option (google.api.method_signature) = "parent"; } // Returns user facing log messages for the data transfer run. @@ -189,6 +202,7 @@ service DataTransferService { get: "/v1/{parent=projects/*/transferConfigs/*/runs/*}/transferLogs" } }; + option (google.api.method_signature) = "parent"; } // Returns true if valid credentials exist for the given data source and @@ -206,6 +220,7 @@ service DataTransferService { body: "*" } }; + option (google.api.method_signature) = "name"; } } @@ -295,6 +310,12 @@ message DataSourceParameter { // Represents data source metadata. Metadata is sufficient to // render UI and request proper OAuth tokens. message DataSource { + option (google.api.resource) = { + type: "bigquerydatatransfer.googleapis.com/DataSource" + pattern: "projects/{project}/dataSources/{data_source}" + pattern: "projects/{project}/locations/{location}/dataSources/{data_source}" + }; + // The type of authorization needed for this data source. enum AuthorizationType { // Type unspecified. @@ -307,6 +328,11 @@ message DataSource { // Return an authorization code for a given Google+ page that can then be // exchanged for a refresh token on the backend. GOOGLE_PLUS_AUTHORIZATION_CODE = 2; + + // Use First Party Client OAuth. First Party Client OAuth doesn't require a + // refresh token to get an offline access token. Instead, it uses a + // client-signed JWT assertion to retrieve an access token. + FIRST_PARTY_OAUTH = 3; } // Represents how the data source supports data auto refresh. @@ -326,7 +352,7 @@ message DataSource { } // Output only. Data source resource name. - string name = 1; + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Data source id. string data_source_id = 2; @@ -396,16 +422,28 @@ message DataSource { // A request to get data source info. message GetDataSourceRequest { - // The field will contain name of the resource requested, for example: - // `projects/{project_id}/dataSources/{data_source_id}` - string name = 1; + // Required. The field will contain name of the resource requested, for example: + // `projects/{project_id}/dataSources/{data_source_id}` or + // `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/DataSource" + } + ]; } // Request to list supported data sources and their data transfer settings. message ListDataSourcesRequest { - // The BigQuery project id for which data sources should be returned. - // Must be in the form: `projects/{project_id}` - string parent = 1; + // Required. The BigQuery project id for which data sources should be returned. + // Must be in the form: `projects/{project_id}` or + // `projects/{project_id}/locations/{location_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigquerydatatransfer.googleapis.com/DataSource" + } + ]; // Pagination token, which can be used to request a specific page // of `ListDataSourcesRequest` list results. For multiple-page @@ -427,7 +465,7 @@ message ListDataSourcesResponse { // this token can be used as the // `ListDataSourcesRequest.page_token` // to request the next page of list results. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to create a data transfer configuration. If new credentials are @@ -437,14 +475,19 @@ message ListDataSourcesResponse { // authorization code. Otherwise, the transfer configuration will be associated // with the calling user. message CreateTransferConfigRequest { - // The BigQuery project id where the transfer configuration should be created. - // Must be in the format projects/{project_id}/locations/{location_id} - // If specified location and location of the destination bigquery dataset - // do not match - the request will fail. - string parent = 1; - - // Data transfer configuration to create. - TransferConfig transfer_config = 2; + // Required. The BigQuery project id where the transfer configuration should be created. + // Must be in the format projects/{project_id}/locations/{location_id} or + // projects/{project_id}. If specified location and location of the + // destination bigquery dataset do not match - the request will fail. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigquerydatatransfer.googleapis.com/TransferConfig" + } + ]; + + // Required. Data transfer configuration to create. + TransferConfig transfer_config = 2 [(google.api.field_behavior) = REQUIRED]; // Optional OAuth2 authorization code to use with this transfer configuration. // This is required if new credentials are needed, as indicated by @@ -471,13 +514,19 @@ message CreateTransferConfigRequest { // version_info back in the authorization response which be be put in a JWT // claim in the token request. string version_info = 5; + + // Optional service account name. If this field is set, transfer config will + // be created with this service account credentials. It requires that + // requesting user calling this API has permissions to act as this service + // account. + string service_account_name = 6; } // A request to update a transfer configuration. To update the user id of the // transfer configuration, an authorization code needs to be provided. message UpdateTransferConfigRequest { - // Data transfer configuration to create. - TransferConfig transfer_config = 1; + // Required. Data transfer configuration to create. + TransferConfig transfer_config = 1 [(google.api.field_behavior) = REQUIRED]; // Optional OAuth2 authorization code to use with this transfer configuration. // If it is provided, the transfer configuration will be associated with the @@ -497,8 +546,8 @@ message UpdateTransferConfigRequest { // the user to copy the code and paste it in the application. string authorization_code = 3; - // Required list of fields to be updated in this request. - google.protobuf.FieldMask update_mask = 4; + // Required. Required list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; // Optional version info. If users want to find a very recent access token, // that is, immediately after approving access, users have to set the @@ -507,42 +556,79 @@ message UpdateTransferConfigRequest { // version_info back in the authorization response which be be put in a JWT // claim in the token request. string version_info = 5; + + // Optional service account name. If this field is set and + // "service_account_name" is set in update_mask, transfer config will be + // updated to use this service account credentials. It requires that + // requesting user calling this API has permissions to act as this service + // account. + string service_account_name = 6; } // A request to get data transfer information. message GetTransferConfigRequest { - // The field will contain name of the resource requested, for example: - // `projects/{project_id}/transferConfigs/{config_id}` - string name = 1; + // Required. The field will contain name of the resource requested, for example: + // `projects/{project_id}/transferConfigs/{config_id}` or + // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/TransferConfig" + } + ]; } // A request to delete data transfer information. All associated transfer runs // and log messages will be deleted as well. message DeleteTransferConfigRequest { - // The field will contain name of the resource requested, for example: - // `projects/{project_id}/transferConfigs/{config_id}` - string name = 1; + // Required. The field will contain name of the resource requested, for example: + // `projects/{project_id}/transferConfigs/{config_id}` or + // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/TransferConfig" + } + ]; } // A request to get data transfer run information. message GetTransferRunRequest { - // The field will contain name of the resource requested, for example: - // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - string name = 1; + // Required. The field will contain name of the resource requested, for example: + // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or + // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/Run" + } + ]; } // A request to delete data transfer run information. message DeleteTransferRunRequest { - // The field will contain name of the resource requested, for example: - // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - string name = 1; + // Required. The field will contain name of the resource requested, for example: + // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or + // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/Run" + } + ]; } // A request to list data transfers configured for a BigQuery project. message ListTransferConfigsRequest { - // The BigQuery project id for which data sources - // should be returned: `projects/{project_id}`. - string parent = 1; + // Required. The BigQuery project id for which data sources + // should be returned: `projects/{project_id}` or + // `projects/{project_id}/locations/{location_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigquerydatatransfer.googleapis.com/TransferConfig" + } + ]; // When specified, only configurations of requested data sources are returned. repeated string data_source_ids = 2; @@ -561,13 +647,13 @@ message ListTransferConfigsRequest { // The returned list of pipelines in the project. message ListTransferConfigsResponse { // Output only. The stored pipeline transfer configurations. - repeated TransferConfig transfer_configs = 1; + repeated TransferConfig transfer_configs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The next-pagination token. For multiple-page list results, // this token can be used as the // `ListTransferConfigsRequest.page_token` // to request the next page of list results. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to list data transfer runs. UI can use this method to show/filter @@ -583,10 +669,16 @@ message ListTransferRunsRequest { LATEST = 1; } - // Name of transfer configuration for which transfer runs should be retrieved. + // Required. Name of transfer configuration for which transfer runs should be retrieved. // Format of transfer configuration resource name is: - // `projects/{project_id}/transferConfigs/{config_id}`. - string parent = 1; + // `projects/{project_id}/transferConfigs/{config_id}` or + // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigquerydatatransfer.googleapis.com/Run" + } + ]; // When specified, only transfer runs with requested states are returned. repeated TransferState states = 2; @@ -608,20 +700,26 @@ message ListTransferRunsRequest { // The returned list of pipelines in the project. message ListTransferRunsResponse { // Output only. The stored pipeline transfer runs. - repeated TransferRun transfer_runs = 1; + repeated TransferRun transfer_runs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The next-pagination token. For multiple-page list results, // this token can be used as the // `ListTransferRunsRequest.page_token` // to request the next page of list results. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to get user facing log messages associated with data transfer run. message ListTransferLogsRequest { - // Transfer run name in the form: - // `projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`. - string parent = 1; + // Required. Transfer run name in the form: + // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or + // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/Run" + } + ]; // Pagination token, which can be used to request a specific page // of `ListTransferLogsRequest` list results. For multiple-page @@ -641,13 +739,13 @@ message ListTransferLogsRequest { // The returned list transfer run messages. message ListTransferLogsResponse { // Output only. The stored pipeline transfer messages. - repeated TransferMessage transfer_messages = 1; + repeated TransferMessage transfer_messages = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The next-pagination token. For multiple-page list results, // this token can be used as the // `GetTransferRunLogRequest.page_token` // to request the next page of list results. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to determine whether the user has valid credentials. This method @@ -657,9 +755,15 @@ message ListTransferLogsResponse { // returns false, as it cannot be determined whether the credentials are // already valid merely based on the user id. message CheckValidCredsRequest { - // The data source in the form: - // `projects/{project_id}/dataSources/{data_source_id}` - string name = 1; + // Required. The data source in the form: + // `projects/{project_id}/dataSources/{data_source_id}` or + // `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/DataSource" + } + ]; } // A response indicating whether the credentials exist and are valid. @@ -670,17 +774,23 @@ message CheckValidCredsResponse { // A request to schedule transfer runs for a time range. message ScheduleTransferRunsRequest { - // Transfer configuration name in the form: - // `projects/{project_id}/transferConfigs/{config_id}`. - string parent = 1; - - // Start time of the range of transfer runs. For example, + // Required. Transfer configuration name in the form: + // `projects/{project_id}/transferConfigs/{config_id}` or + // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/TransferConfig" + } + ]; + + // Required. Start time of the range of transfer runs. For example, // `"2017-05-25T00:00:00+00:00"`. - google.protobuf.Timestamp start_time = 2; + google.protobuf.Timestamp start_time = 2 [(google.api.field_behavior) = REQUIRED]; - // End time of the range of transfer runs. For example, + // Required. End time of the range of transfer runs. For example, // `"2017-05-30T00:00:00+00:00"`. - google.protobuf.Timestamp end_time = 3; + google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = REQUIRED]; } // A response to schedule transfer runs for a time range. @@ -708,8 +818,11 @@ message StartManualTransferRunsRequest { } // Transfer configuration name in the form: - // `projects/{project_id}/transferConfigs/{config_id}`. - string parent = 1; + // `projects/{project_id}/transferConfigs/{config_id}` or + // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + string parent = 1 [(google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/TransferConfig" + }]; // The requested time specification - this can be a time range or a specific // run_time. diff --git a/google/cloud/bigquery/datatransfer/v1/transfer.proto b/google/cloud/bigquery/datatransfer/v1/transfer.proto index 9501ea3cc..5985f0969 100644 --- a/google/cloud/bigquery/datatransfer/v1/transfer.proto +++ b/google/cloud/bigquery/datatransfer/v1/transfer.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.bigquery.datatransfer.v1; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -29,6 +29,7 @@ option java_outer_classname = "TransferProto"; option java_package = "com.google.cloud.bigquery.datatransfer.v1"; option objc_class_prefix = "GCBDT"; option php_namespace = "Google\\Cloud\\BigQuery\\DataTransfer\\V1"; +option ruby_package = "Google::Cloud::Bigquery::DataTransfer::V1"; // DEPRECATED. Represents data transfer type. enum TransferType { @@ -67,6 +68,13 @@ enum TransferState { CANCELLED = 6; } +// Represents preferences for sending email notifications for transfer run +// events. +message EmailPreferences { + // If true, email notifications will be sent on transfer run failures. + bool enable_failure_email = 1; +} + // Options customizing the data transfer schedule. message ScheduleOptions { // If true, automatic scheduling of data transfer runs for this configuration @@ -96,6 +104,12 @@ message ScheduleOptions { // `destination_dataset_id` is created when needed and shared with the // appropriate data source service account. message TransferConfig { + option (google.api.resource) = { + type: "bigquerydatatransfer.googleapis.com/TransferConfig" + pattern: "projects/{project}/transferConfigs/{transfer_config}" + pattern: "projects/{project}/locations/{location}/transferConfigs/{transfer_config}" + }; + // The resource name of the transfer config. // Transfer config names have the form of // `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`. @@ -105,8 +119,11 @@ message TransferConfig { // required, will be generated for config_id. string name = 1; - // The BigQuery target dataset id. - string destination_dataset_id = 2; + // The desination of the transfer config. + oneof destination { + // The BigQuery target dataset id. + string destination_dataset_id = 2; + } // User specified display name for the data transfer. string display_name = 3; @@ -147,23 +164,37 @@ message TransferConfig { bool disabled = 13; // Output only. Data transfer modification time. Ignored by server on input. - google.protobuf.Timestamp update_time = 4; + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Next time when data transfer will run. - google.protobuf.Timestamp next_run_time = 8; + google.protobuf.Timestamp next_run_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. State of the most recently updated transfer run. - TransferState state = 10; + TransferState state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Deprecated. Unique ID of the user on whose behalf transfer is done. int64 user_id = 11; // Output only. Region in which BigQuery dataset is located. - string dataset_region = 14; + string dataset_region = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Pub/Sub topic where notifications will be sent after transfer runs + // associated with this transfer config finish. + string notification_pubsub_topic = 15; + + // Email notifications will be sent according to these preferences + // to the email address of the user who owns this transfer config. + EmailPreferences email_preferences = 18; } // Represents a data transfer run. message TransferRun { + option (google.api.resource) = { + type: "bigquerydatatransfer.googleapis.com/Run" + pattern: "projects/{project}/transferConfigs/{transfer_config}/runs/{run}" + pattern: "projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}" + }; + // The resource name of the transfer run. // Transfer run names have the form // `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. @@ -182,23 +213,26 @@ message TransferRun { // Output only. Time when transfer run was started. // Parameter ignored by server for input requests. - google.protobuf.Timestamp start_time = 4; + google.protobuf.Timestamp start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when transfer run ended. // Parameter ignored by server for input requests. - google.protobuf.Timestamp end_time = 5; + google.protobuf.Timestamp end_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Last time the data transfer run state was updated. - google.protobuf.Timestamp update_time = 6; + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Data transfer specific parameters. - google.protobuf.Struct params = 9; + google.protobuf.Struct params = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The BigQuery target dataset id. - string destination_dataset_id = 2; + // Data transfer destination. + oneof destination { + // Output only. The BigQuery target dataset id. + string destination_dataset_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } // Output only. Data source id. - string data_source_id = 7; + string data_source_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Data transfer run state. Ignored for input requests. TransferState state = 8; @@ -211,7 +245,16 @@ message TransferRun { // scheduled manually, this is empty. // NOTE: the system might choose to delay the schedule depending on the // current load, so `schedule_time` doesn't always match this. - string schedule = 12; + string schedule = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Pub/Sub topic where a notification will be sent after this + // transfer run finishes + string notification_pubsub_topic = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Email notifications will be sent according to these + // preferences to the email address of the user who owns the transfer config + // this run was derived from. + EmailPreferences email_preferences = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Represents a user facing message for a particular data transfer run. diff --git a/google/cloud/bigquery/reservation/v1/BUILD.bazel b/google/cloud/bigquery/reservation/v1/BUILD.bazel new file mode 100644 index 000000000..15108ea72 --- /dev/null +++ b/google/cloud/bigquery/reservation/v1/BUILD.bazel @@ -0,0 +1,365 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "reservation_proto", + srcs = [ + "reservation.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "reservation_proto_with_info", + deps = [ + ":reservation_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "reservation_java_proto", + deps = [":reservation_proto"], +) + +java_grpc_library( + name = "reservation_java_grpc", + srcs = [":reservation_proto"], + deps = [":reservation_java_proto"], +) + +java_gapic_library( + name = "reservation_java_gapic", + src = ":reservation_proto_with_info", + gapic_yaml = "bigqueryreservation_gapic.yaml", + package = "google.cloud.bigquery.reservation.v1", + service_yaml = "bigqueryreservation_v1.yaml", + test_deps = [ + ":reservation_java_grpc", + ], + deps = [ + ":reservation_java_proto", + ], +) + +java_gapic_test( + name = "reservation_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.bigquery.reservation.v1.ReservationServiceClientTest", + ], + runtime_deps = [":reservation_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-bigquery-reservation-v1-java", + deps = [ + ":reservation_java_gapic", + ":reservation_java_grpc", + ":reservation_java_proto", + ":reservation_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "reservation_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/reservation/v1", + protos = [":reservation_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + ], +) + +go_gapic_library( + name = "reservation_go_gapic", + srcs = [":reservation_proto_with_info"], + grpc_service_config = "bigqueryreservation_grpc_service_config.json", + importpath = "cloud.google.com/go/bigquery/reservation/apiv1;reservation", + service_yaml = "bigqueryreservation_v1.yaml", + deps = [ + ":reservation_go_proto", + ], +) + +go_test( + name = "reservation_go_gapic_test", + srcs = [":reservation_go_gapic_srcjar_test"], + embed = [":reservation_go_gapic"], + importpath = "cloud.google.com/go/bigquery/reservation/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-bigquery-reservation-v1-go", + deps = [ + ":reservation_go_gapic", + ":reservation_go_gapic_srcjar-test.srcjar", + ":reservation_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "reservation_moved_proto", + srcs = [":reservation_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "reservation_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":reservation_moved_proto"], +) + +py_grpc_library( + name = "reservation_py_grpc", + srcs = [":reservation_moved_proto"], + deps = [":reservation_py_proto"], +) + +py_gapic_library( + name = "reservation_py_gapic", + src = ":reservation_proto_with_info", + gapic_yaml = "bigqueryreservation_gapic.yaml", + package = "google.cloud.bigquery.reservation.v1", + service_yaml = "bigqueryreservation_v1.yaml", + deps = [ + ":reservation_py_grpc", + ":reservation_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "bigquery-reservation-v1-py", + deps = [ + ":reservation_py_gapic", + ":reservation_py_grpc", + ":reservation_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "reservation_php_proto", + deps = [":reservation_proto"], +) + +php_grpc_library( + name = "reservation_php_grpc", + srcs = [":reservation_proto"], + deps = [":reservation_php_proto"], +) + +php_gapic_library( + name = "reservation_php_gapic", + src = ":reservation_proto_with_info", + gapic_yaml = "bigqueryreservation_gapic.yaml", + package = "google.cloud.bigquery.reservation.v1", + service_yaml = "bigqueryreservation_v1.yaml", + deps = [ + ":reservation_php_grpc", + ":reservation_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-bigquery-reservation-v1-php", + deps = [ + ":reservation_php_gapic", + ":reservation_php_grpc", + ":reservation_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "reservation_nodejs_gapic", + src = ":reservation_proto_with_info", + gapic_yaml = "bigqueryreservation_gapic.yaml", + package = "google.cloud.bigquery.reservation.v1", + service_yaml = "bigqueryreservation_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "bigquery-reservation-v1-nodejs", + deps = [ + ":reservation_nodejs_gapic", + ":reservation_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "reservation_ruby_proto", + deps = [":reservation_proto"], +) + +ruby_grpc_library( + name = "reservation_ruby_grpc", + srcs = [":reservation_proto"], + deps = [":reservation_ruby_proto"], +) + +ruby_gapic_library( + name = "reservation_ruby_gapic", + src = ":reservation_proto_with_info", + gapic_yaml = "bigqueryreservation_gapic.yaml", + package = "google.cloud.bigquery.reservation.v1", + service_yaml = "bigqueryreservation_v1.yaml", + deps = [ + ":reservation_ruby_grpc", + ":reservation_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-bigquery-reservation-v1-ruby", + deps = [ + ":reservation_ruby_gapic", + ":reservation_ruby_grpc", + ":reservation_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "reservation_csharp_proto", + deps = [":reservation_proto"], +) + +csharp_grpc_library( + name = "reservation_csharp_grpc", + srcs = [":reservation_proto"], + deps = [":reservation_csharp_proto"], +) + +csharp_gapic_library( + name = "reservation_csharp_gapic", + src = ":reservation_proto_with_info", + gapic_yaml = "bigqueryreservation_gapic.yaml", + package = "google.cloud.bigquery.reservation.v1", + service_yaml = "bigqueryreservation_v1.yaml", + deps = [ + ":reservation_csharp_grpc", + ":reservation_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-bigquery-reservation-v1-csharp", + deps = [ + ":reservation_csharp_gapic", + ":reservation_csharp_grpc", + ":reservation_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/bigquery/reservation/v1/bigqueryreservation_gapic.legacy.yaml b/google/cloud/bigquery/reservation/v1/bigqueryreservation_gapic.legacy.yaml new file mode 100644 index 000000000..ecef35918 --- /dev/null +++ b/google/cloud/bigquery/reservation/v1/bigqueryreservation_gapic.legacy.yaml @@ -0,0 +1,383 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.bigquery.reservation.v1 + python: + package_name: google.cloud.bigquery.reservation_v1.gapic + go: + package_name: cloud.google.com/go/bigquery/reservation/apiv1 + csharp: + package_name: Google.Cloud.Bigquery.Reservation.V1 + ruby: + package_name: Google::Cloud::Bigquery::Reservation::V1 + php: + package_name: Google\Cloud\Bigquery\Reservation\V1 + nodejs: + package_name: reservation.v1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.bigquery.reservation.v1.ReservationService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment} + entity_name: capacity_commitment + - name_pattern: projects/{project}/locations/{location}/reservations/{reservation} + entity_name: reservation + - name_pattern: projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment} + entity_name: assignment + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateReservation + flattening: + groups: + - parameters: + - parent + - reservation_id + - reservation + required_fields: + - parent + - reservation_id + - reservation + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: ListReservations + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: reservations + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetReservation + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: reservation + timeout_millis: 60000 + - name: GetBiReservation + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: reservation + timeout_millis: 60000 + - name: DeleteReservation + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: reservation + timeout_millis: 60000 + - name: UpdateReservation + flattening: + groups: + - parameters: + - reservation + - update_mask + required_fields: + - reservation + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + reservation.name: reservation + timeout_millis: 60000 + - name: UpdateBiReservation + flattening: + groups: + - parameters: + - bi_reservation + - update_mask + required_fields: + - bi_reservation + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + reservation.name: reservation + timeout_millis: 60000 + - name: CreateCapacityCommitment + flattening: + groups: + - parameters: + - parent + - capacity_commitment + required_fields: + - parent + - capacity_commitment + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: ListCapacityCommitments + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: capacity_commitments + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetCapacityCommitment + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: capacity_commitment + timeout_millis: 60000 + - name: UpdateCapacityCommitment + flattening: + groups: + - parameters: + - capacity_commitment + - update_mask + required_fields: + - capacity_commitment + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + capacity_commitment.name: capacity_commitment + timeout_millis: 60000 + - name: SplitCapacityCommitment + flattening: + groups: + - parameters: + - name + - slot_count + required_fields: + - name + - slot_count + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: capacity_commitment + timeout_millis: 60000 + - name: MergeCapacityCommitments + flattening: + groups: + - parameters: + - parent + - capacity_commitment_ids + required_fields: + - parent + - capacity_commitment_ids + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 6000 + - name: DeleteCapacityCommitment + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: capacity_commitment + timeout_millis: 60000 + - name: CreateAssignment + flattening: + groups: + - parameters: + - parent + - assignment + required_fields: + - parent + - assignment + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: reservation + timeout_millis: 60000 + - name: ListAssignments + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: assignments + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: reservation + timeout_millis: 60000 + - name: DeleteAssignment + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: assignment + timeout_millis: 60000 + - name: SearchAssignments + flattening: + groups: + - parameters: + - parent + - query + required_fields: + - parent + - query + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: assignments + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: MoveAssignment + flattening: + groups: + - parameters: + - name + - destination_id + required_fields: + - name + - destination_id + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: assignment + timeout_millis: 60000 diff --git a/google/cloud/bigquery/reservation/v1/bigqueryreservation_gapic.yaml b/google/cloud/bigquery/reservation/v1/bigqueryreservation_gapic.yaml new file mode 100644 index 000000000..8dd77f5a3 --- /dev/null +++ b/google/cloud/bigquery/reservation/v1/bigqueryreservation_gapic.yaml @@ -0,0 +1,29 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.bigquery.reservation.v1 + python: + package_name: google.cloud.bigquery.reservation_v1.gapic + go: + package_name: cloud.google.com/go/bigquery/reservation/apiv1 + csharp: + package_name: Google.Cloud.Bigquery.Reservation.V1 + ruby: + package_name: Google::Cloud::Bigquery::Reservation::V1 + php: + package_name: Google\Cloud\Bigquery\Reservation\V1 + nodejs: + package_name: reservation.v1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.bigquery.reservation.v1.ReservationService + methods: + - name: DeleteReservation + retry_codes_name: idempotent + - name: DeleteCapacityCommitment + retry_codes_name: idempotent + - name: DeleteAssignment + retry_codes_name: idempotent diff --git a/google/cloud/bigquery/reservation/v1/bigqueryreservation_grpc_service_config.json b/google/cloud/bigquery/reservation/v1/bigqueryreservation_grpc_service_config.json new file mode 100755 index 000000000..a32cd2b6e --- /dev/null +++ b/google/cloud/bigquery/reservation/v1/bigqueryreservation_grpc_service_config.json @@ -0,0 +1,100 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "CreateReservation" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "UpdateReservation" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "CreateCapacityCommitment" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "UpdateCapacityCommitment" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "SplitCapacityCommitment" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "MergeCapacityCommitments" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "CreateAssignment" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "MoveAssignment" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "UpdateBiReservation" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "ListReservations" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "GetReservation" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "DeleteReservation" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "ListCapacityCommitments" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "GetCapacityCommitment" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "DeleteCapacityCommitment" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "ListAssignments" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "DeleteAssignment" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "SearchAssignments" + }, + { + "service": "google.cloud.bigquery.reservation.v1.ReservationService", + "method": "GetBiReservation" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/bigquery/reservation/v1/bigqueryreservation_v1.yaml b/google/cloud/bigquery/reservation/v1/bigqueryreservation_v1.yaml new file mode 100644 index 000000000..ab278cf32 --- /dev/null +++ b/google/cloud/bigquery/reservation/v1/bigqueryreservation_v1.yaml @@ -0,0 +1,30 @@ +type: google.api.Service +config_version: 3 +name: bigqueryreservation.googleapis.com +title: BigQuery Reservation API + +apis: +- name: google.cloud.bigquery.reservation.v1.ReservationService + +documentation: + summary: 'A service to modify your BigQuery flat-rate reservations.' + +backend: + rules: + - selector: 'google.cloud.bigquery.reservation.v1.ReservationService.*' + deadline: 30.0 + - selector: 'google.longrunning.Operations.*' + deadline: 30.0 + +authentication: + rules: + - selector: 'google.cloud.bigquery.reservation.v1.ReservationService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/bigquery/reservation/v1/reservation.proto b/google/cloud/bigquery/reservation/v1/reservation.proto new file mode 100644 index 000000000..e3c24d422 --- /dev/null +++ b/google/cloud/bigquery/reservation/v1/reservation.proto @@ -0,0 +1,905 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.reservation.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/reservation/v1;reservation"; +option java_multiple_files = true; +option java_outer_classname = "ReservationProto"; +option java_package = "com.google.cloud.bigquery.reservation.v1"; + +// This API allows users to manage their flat-rate BigQuery reservations. +// +// A reservation provides computational resource guarantees, in the form of +// [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a +// unit of computational power in BigQuery, and serves as the basic unit of +// parallelism. In a scan of a multi-partitioned table, a single slot operates +// on a single partition of the table. A reservation resource exists as a child +// resource of the admin project and location, e.g.: +// `projects/myproject/locations/US/reservations/reservationName`. +// +// A capacity commitment is a way to purchase compute capacity for BigQuery jobs +// (in the form of slots) with some committed period of usage. A capacity +// commitment resource exists as a child resource of the admin project and +// location, e.g.: +// `projects/myproject/locations/US/capacityCommitments/id`. +service ReservationService { + option (google.api.default_host) = "bigqueryreservation.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/bigquery," + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new reservation resource. + rpc CreateReservation(CreateReservationRequest) returns (Reservation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/reservations" + body: "reservation" + }; + option (google.api.method_signature) = "parent,reservation,reservation_id"; + } + + // Lists all the reservations for the project in the specified location. + rpc ListReservations(ListReservationsRequest) + returns (ListReservationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/reservations" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns information about the reservation. + rpc GetReservation(GetReservationRequest) returns (Reservation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/reservations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a reservation. + // Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + // assignments. + rpc DeleteReservation(DeleteReservationRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/reservations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an existing reservation resource. + rpc UpdateReservation(UpdateReservationRequest) returns (Reservation) { + option (google.api.http) = { + patch: "/v1/{reservation.name=projects/*/locations/*/reservations/*}" + body: "reservation" + }; + option (google.api.method_signature) = "reservation,update_mask"; + } + + // Creates a new capacity commitment resource. + rpc CreateCapacityCommitment(CreateCapacityCommitmentRequest) + returns (CapacityCommitment) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/capacityCommitments" + body: "capacity_commitment" + }; + option (google.api.method_signature) = "parent,capacity_commitment"; + } + + // Lists all the capacity commitments for the admin project. + rpc ListCapacityCommitments(ListCapacityCommitmentsRequest) + returns (ListCapacityCommitmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/capacityCommitments" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns information about the capacity commitment. + rpc GetCapacityCommitment(GetCapacityCommitmentRequest) + returns (CapacityCommitment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/capacityCommitments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a capacity commitment. Attempting to delete capacity commitment + // before its commitment_end_time will fail with the error code + // `google.rpc.Code.FAILED_PRECONDITION`. + rpc DeleteCapacityCommitment(DeleteCapacityCommitmentRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/capacityCommitments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an existing capacity commitment. + // + // Only `plan` and `renewal_plan` fields can be updated. + // + // Plan can only be changed to a plan of a longer commitment period. + // Attempting to change to a plan with shorter commitment period will fail + // with the error code `google.rpc.Code.FAILED_PRECONDITION`. + rpc UpdateCapacityCommitment(UpdateCapacityCommitmentRequest) + returns (CapacityCommitment) { + option (google.api.http) = { + patch: "/v1/{capacity_commitment.name=projects/*/locations/*/capacityCommitments/*}" + body: "capacity_commitment" + }; + option (google.api.method_signature) = "capacity_commitment,update_mask"; + } + + // Splits capacity commitment to two commitments of the same plan and + // `commitment_end_time`. + // + // A common use case is to enable downgrading commitments. + // + // For example, in order to downgrade from 10000 slots to 8000, you might + // split a 10000 capacity commitment into commitments of 2000 and 8000. Then, + // you would change the plan of the first one to `FLEX` and then delete it. + rpc SplitCapacityCommitment(SplitCapacityCommitmentRequest) + returns (SplitCapacityCommitmentResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/capacityCommitments/*}:split" + body: "*" + }; + option (google.api.method_signature) = "name,slot_count"; + } + + // Merges capacity commitments of the same plan into a single commitment. + // + // The resulting capacity commitment has the greater commitment_end_time + // out of the to-be-merged capacity commitments. + // + // Attempting to merge capacity commitments of different plan will fail + // with the error code `google.rpc.Code.FAILED_PRECONDITION`. + rpc MergeCapacityCommitments(MergeCapacityCommitmentsRequest) + returns (CapacityCommitment) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/capacityCommitments:merge" + body: "*" + }; + option (google.api.method_signature) = "parent,capacity_commitment_ids"; + } + + // Creates an assignment object which allows the given project to submit jobs + // of a certain type using slots from the specified reservation. + // + // Currently a + // resource (project, folder, organization) can only have one assignment per + // each (job_type, location) combination, and that reservation will be used + // for all jobs of the matching type. + // + // Different assignments can be created on different levels of the + // projects, folders or organization hierarchy. During query execution, + // the assignment is looked up at the project, folder and organization levels + // in that order. The first assignment found is applied to the query. + // + // When creating assignments, it does not matter if other assignments exist at + // higher levels. + // + // Example: + // + // * The organization `organizationA` contains two projects, `project1` + // and `project2`. + // * Assignments for all three entities (`organizationA`, `project1`, and + // `project2`) could all be created and mapped to the same or different + // reservations. + // + // Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have + // 'bigquery.admin' permissions on the project using the reservation + // and the project that owns this reservation. + // + // Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment + // does not match location of the reservation. + rpc CreateAssignment(CreateAssignmentRequest) returns (Assignment) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/reservations/*}/assignments" + body: "assignment" + }; + option (google.api.method_signature) = "parent,assignment"; + } + + // Lists assignments. + // + // Only explicitly created assignments will be returned. + // + // Example: + // + // * Organization `organizationA` contains two projects, `project1` and + // `project2`. + // * Reservation `res1` exists and was created previously. + // * CreateAssignment was used previously to define the following + // associations between entities and reservations: `` + // and `` + // + // In this example, ListAssignments will just return the above two assignments + // for reservation `res1`, and no expansion/merge will happen. + // + // The wildcard "-" can be used for + // reservations in the request. In that case all assignments belongs to the + // specified project and location will be listed. + // + // **Note** "-" cannot be used for projects nor locations. + rpc ListAssignments(ListAssignmentsRequest) + returns (ListAssignmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/reservations/*}/assignments" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a assignment. No expansion will happen. + // + // Example: + // + // * Organization `organizationA` contains two projects, `project1` and + // `project2`. + // * Reservation `res1` exists and was created previously. + // * CreateAssignment was used previously to define the following + // associations between entities and reservations: `` + // and `` + // + // In this example, deletion of the `` assignment won't + // affect the other assignment ``. After said deletion, + // queries from `project1` will still use `res1` while queries from + // `project2` will switch to use on-demand mode. + rpc DeleteAssignment(DeleteAssignmentRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/reservations/*/assignments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Looks up assignments for a specified resource for a particular region. + // If the request is about a project: + // + // 1. Assignments created on the project will be returned if they exist. + // 2. Otherwise assignments created on the closest ancestor will be + // returned. + // 3. Assignments for different JobTypes will all be returned. + // + // The same logic applies if the request is about a folder. + // + // If the request is about an organization, then assignments created on the + // organization will be returned (organization doesn't have ancestors). + // + // Comparing to ListAssignments, there are some behavior + // differences: + // + // 1. permission on the assignee will be verified in this API. + // 2. Hierarchy lookup (project->folder->organization) happens in this API. + // 3. Parent here is `projects/*/locations/*`, instead of + // `projects/*/locations/*reservations/*`. + // + // **Note** "-" cannot be used for projects + // nor locations. + rpc SearchAssignments(SearchAssignmentsRequest) + returns (SearchAssignmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}:searchAssignments" + }; + option (google.api.method_signature) = "parent,query"; + } + + // Moves an assignment under a new reservation. + // + // This differs from removing an existing assignment and recreating a new one + // by providing a transactional change that ensures an assignee always has an + // associated reservation. + rpc MoveAssignment(MoveAssignmentRequest) returns (Assignment) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/reservations/*/assignments/*}:move" + body: "*" + }; + option (google.api.method_signature) = "name,destination_id"; + } + + // Retrieves a BI reservation. + rpc GetBiReservation(GetBiReservationRequest) returns (BiReservation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/biReservation}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a BI reservation. + // + // Only fields specified in the `field_mask` are updated. + // + // A singleton BI reservation always exists with default size 0. + // In order to reserve BI capacity it needs to be updated to an amount + // greater than 0. In order to release BI capacity reservation size + // must be set to 0. + rpc UpdateBiReservation(UpdateBiReservationRequest) returns (BiReservation) { + option (google.api.http) = { + patch: "/v1/{bi_reservation.name=projects/*/locations/*/biReservation}" + body: "bi_reservation" + }; + option (google.api.method_signature) = "bi_reservation,update_mask"; + } +} + +// A reservation is a mechanism used to guarantee slots to users. +message Reservation { + option (google.api.resource) = { + type: "bigqueryreservation.googleapis.com/Reservation" + pattern: "projects/{project}/locations/{location}/reservations/{reservation}" + }; + + // The resource name of the reservation, e.g., + // `projects/*/locations/*/reservations/team1-prod`. + string name = 1; + + // Minimum slots available to this reservation. A slot is a unit of + // computational power in BigQuery, and serves as the unit of parallelism. + // + // Queries using this reservation might use more slots during runtime if + // ignore_idle_slots is set to false. + // + // If the new reservation's slot capacity exceed the parent's slot capacity or + // if total slot capacity of the new reservation and its siblings exceeds the + // parent's slot capacity, the request will fail with + // `google.rpc.Code.RESOURCE_EXHAUSTED`. + int64 slot_capacity = 2; + + // If false, any query using this reservation will use idle slots from other + // reservations within the same admin project. If true, a query using this + // reservation will execute with the slot capacity specified above at most. + bool ignore_idle_slots = 4; +} + +// Capacity commitment is a way to purchase compute capacity for BigQuery jobs +// (in the form of slots) with some committed period of usage. Annual +// commitments renew by default. Commitments can be removed after their +// commitment end time passes. +// +// In order to remove annual commitment, its plan needs to be changed +// to monthly or flex first. +// +// A capacity commitment resource exists as a child resource of the admin +// project. +message CapacityCommitment { + option (google.api.resource) = { + type: "bigqueryreservation.googleapis.com/CapacityCommitment" + pattern: "projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}" + }; + + // Commitment plan defines the current committed period. Capacity commitment + // cannot be deleted during it's committed period. + enum CommitmentPlan { + // Invalid plan value. Requests with this value will be rejected with + // error code `google.rpc.Code.INVALID_ARGUMENT`. + COMMITMENT_PLAN_UNSPECIFIED = 0; + + // Flex commitments have committed period of 1 minute after becoming ACTIVE. + // After that, they are not in a committed period anymore and can be removed + // any time. + FLEX = 3; + + // Trial commitments have a committed period of 182 days after becoming + // ACTIVE. After that, they are converted to a new commitment based on the + // `renewal_plan`. Default `renewal_plan` for Trial commitment is Flex so + // that it can be deleted right after committed period ends. + TRIAL = 5; + + // Monthly commitments have a committed period of 30 days after becoming + // ACTIVE. After that, they are not in a committed period anymore and can be + // removed any time. + MONTHLY = 2; + + // Annual commitments have a committed period of 365 days after becoming + // ACTIVE. After that they are converted to a new commitment based on the + // renewal_plan. + ANNUAL = 4; + } + + // Capacity commitment can either become ACTIVE right away or transition + // from PENDING to ACTIVE or FAILED. + enum State { + // Invalid state value. + STATE_UNSPECIFIED = 0; + + // Capacity commitment is pending provisioning. Pending capacity commitment + // does not contribute to the parent's slot_capacity. + PENDING = 1; + + // Once slots are provisioned, capacity commitment becomes active. + // slot_count is added to the parent's slot_capacity. + ACTIVE = 2; + + // Capacity commitment is failed to be activated by the backend. + FAILED = 3; + } + + // Output only. The resource name of the capacity commitment, e.g., + // `projects/myproject/locations/US/capacityCommitments/123` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Number of slots in this commitment. + int64 slot_count = 2; + + // Capacity commitment commitment plan. + CommitmentPlan plan = 3; + + // Output only. State of the commitment. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The end of the current commitment period. It is applicable + // only for ACTIVE capacity commitments. + google.protobuf.Timestamp commitment_end_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. For FAILED commitment plan, provides the reason of failure. + google.rpc.Status failure_status = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The plan this capacity commitment is converted to after commitment_end_time + // passes. Once the plan is changed, committed period is extended according to + // commitment plan. Only applicable for ANNUAL and TRIAL commitments. + CommitmentPlan renewal_plan = 8; +} + +// The request for +// [ReservationService.CreateReservation][google.cloud.bigquery.reservation.v1.ReservationService.CreateReservation]. +message CreateReservationRequest { + // Required. Project, location. E.g., + // `projects/myproject/locations/US` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigqueryreservation.googleapis.com/Reservation" + } + ]; + + // The reservation ID. This field must only contain lower case alphanumeric + // characters or dash. Max length is 64 characters. + string reservation_id = 2; + + // Definition of the new reservation to create. + Reservation reservation = 3; +} + +// The request for +// [ReservationService.ListReservations][google.cloud.bigquery.reservation.v1.ReservationService.ListReservations]. +message ListReservationsRequest { + // Required. The parent resource name containing project and location, e.g.: + // "projects/myproject/locations/US" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigqueryreservation.googleapis.com/Reservation" + } + ]; + + // The maximum number of items to return per page. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// The response for +// [ReservationService.ListReservations][google.cloud.bigquery.reservation.v1.ReservationService.ListReservations]. +message ListReservationsResponse { + // List of reservations visible to the user. + repeated Reservation reservations = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request for +// [ReservationService.GetReservation][google.cloud.bigquery.reservation.v1.ReservationService.GetReservation]. +message GetReservationRequest { + // Required. Resource name of the reservation to retrieve. E.g., + // `projects/myproject/locations/US/reservations/team1-prod` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/Reservation" + } + ]; +} + +// The request for +// [ReservationService.DeleteReservation][google.cloud.bigquery.reservation.v1.ReservationService.DeleteReservation]. +message DeleteReservationRequest { + // Required. Resource name of the reservation to retrieve. E.g., + // `projects/myproject/locations/US/reservations/team1-prod` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/Reservation" + } + ]; +} + +// The request for +// [ReservationService.UpdateReservation][google.cloud.bigquery.reservation.v1.ReservationService.UpdateReservation]. +message UpdateReservationRequest { + // Content of the reservation to update. + Reservation reservation = 1; + + // Standard field mask for the set of fields to be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// The request for +// [ReservationService.CreateCapacityCommitment][google.cloud.bigquery.reservation.v1.ReservationService.CreateCapacityCommitment]. +message CreateCapacityCommitmentRequest { + // Required. Resource name of the parent reservation. E.g., + // projects/myproject/locations/US + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigqueryreservation.googleapis.com/CapacityCommitment" + } + ]; + + // Content of the capacity commitment to create. + CapacityCommitment capacity_commitment = 2; + + // If true, fail the request if another project in the organization has a + // capacity commitment. + bool enforce_single_admin_project_per_org = 4; +} + +// The request for +// [ReservationService.ListCapacityCommitments][google.cloud.bigquery.reservation.v1.ReservationService.ListCapacityCommitments]. +message ListCapacityCommitmentsRequest { + // Required. Resource name of the parent reservation. E.g., + // projects/myproject/locations/US + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigqueryreservation.googleapis.com/CapacityCommitment" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// The response for +// [ReservationService.ListCapacityCommitments][google.cloud.bigquery.reservation.v1.ReservationService.ListCapacityCommitments]. +message ListCapacityCommitmentsResponse { + // List of capacity commitments visible to the user. + repeated CapacityCommitment capacity_commitments = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request for +// [ReservationService.GetCapacityCommitment][google.cloud.bigquery.reservation.v1.ReservationService.GetCapacityCommitment]. +message GetCapacityCommitmentRequest { + // Required. Resource name of the capacity commitment to retrieve. E.g., + // projects/myproject/locations/US/capacityCommitments/123 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/CapacityCommitment" + } + ]; +} + +// The request for +// [ReservationService.DeleteCapacityCommitment][google.cloud.bigquery.reservation.v1.ReservationService.DeleteCapacityCommitment]. +message DeleteCapacityCommitmentRequest { + // Required. Resource name of the capacity commitment to delete. E.g., + // projects/myproject/locations/US/capacityCommitments/123 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/CapacityCommitment" + } + ]; +} + +// The request for +// [ReservationService.UpdateCapacityCommitment][google.cloud.bigquery.reservation.v1.ReservationService.UpdateCapacityCommitment]. +message UpdateCapacityCommitmentRequest { + // Content of the capacity commitment to update. + CapacityCommitment capacity_commitment = 1; + + // Standard field mask for the set of fields to be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// The request for +// [ReservationService.SplitCapacityCommitment][google.cloud.bigquery.reservation.v1.ReservationService.SplitCapacityCommitment]. +message SplitCapacityCommitmentRequest { + // Required. The resource name e.g.,: + // projects/myproject/locations/US/capacityCommitments/123 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/CapacityCommitment" + } + ]; + + // Number of slots in the capacity commitment after the split. + int64 slot_count = 2; +} + +// The response for +// [ReservationService.SplitCapacityCommitment][google.cloud.bigquery.reservation.v1.ReservationService.SplitCapacityCommitment]. +message SplitCapacityCommitmentResponse { + // First capacity commitment, result of a split. + CapacityCommitment first = 1; + + // Second capacity commitment, result of a split. + CapacityCommitment second = 2; +} + +// The request for +// [ReservationService.MergeCapacityCommitments][google.cloud.bigquery.reservation.v1.ReservationService.MergeCapacityCommitments]. +message MergeCapacityCommitmentsRequest { + // Parent resource that identifies admin project and location e.g., + // projects/myproject/locations/us + string parent = 1 [(google.api.resource_reference) = { + child_type: "bigqueryreservation.googleapis.com/CapacityCommitment" + }]; + + // Ids of capacity commitments to merge. + // These capacity commitments must exist under admin project and location + // specified in the parent. + repeated string capacity_commitment_ids = 2; +} + +// A Assignment allows a project to submit jobs +// of a certain type using slots from the specified reservation. +message Assignment { + option (google.api.resource) = { + type: "bigqueryreservation.googleapis.com/Assignment" + pattern: "projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}" + }; + + // Types of job, which could be specified when using the reservation. + enum JobType { + // Invalid type. Requests with this value will be rejected with + // error code `google.rpc.Code.INVALID_ARGUMENT`. + JOB_TYPE_UNSPECIFIED = 0; + + // Pipeline (load/export) jobs from the project will use the reservation. + PIPELINE = 1; + + // Query jobs from the project will use the reservation. + QUERY = 2; + } + + // Assignment will remain in PENDING state if no active capacity commitment is + // present. It will become ACTIVE when some capacity commitment becomes + // active. + enum State { + // Invalid state value. + STATE_UNSPECIFIED = 0; + + // Queries from assignee will be executed as on-demand, if related + // assignment is pending. + PENDING = 1; + + // Assignment is ready. + ACTIVE = 2; + } + + // Output only. Name of the resource. E.g.: + // `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The resource which will use the reservation. E.g. + // `projects/myproject`, `folders/123`, or `organizations/456`. + string assignee = 4; + + // Which type of jobs will use the reservation. + JobType job_type = 3; + + // Output only. State of the assignment. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request for +// [ReservationService.CreateAssignment][google.cloud.bigquery.reservation.v1.ReservationService.CreateAssignment]. +// Note: "bigquery.reservationAssignments.create" permission is required on the +// related assignee. +message CreateAssignmentRequest { + // Required. The parent resource name of the assignment + // E.g. `projects/myproject/locations/US/reservations/team1-prod` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigqueryreservation.googleapis.com/Assignment" + } + ]; + + // Assignment resource to create. + Assignment assignment = 2; +} + +// The request for +// [ReservationService.ListAssignments][google.cloud.bigquery.reservation.v1.ReservationService.ListAssignments]. +message ListAssignmentsRequest { + // Required. The parent resource name e.g.: + // + // `projects/myproject/locations/US/reservations/team1-prod` + // + // Or: + // + // `projects/myproject/locations/US/reservations/-` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/Reservation" + } + ]; + + // The maximum number of items to return per page. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// The response for +// [ReservationService.ListAssignments][google.cloud.bigquery.reservation.v1.ReservationService.ListAssignments]. +message ListAssignmentsResponse { + // List of assignments visible to the user. + repeated Assignment assignments = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request for +// [ReservationService.DeleteAssignment][google.cloud.bigquery.reservation.v1.ReservationService.DeleteAssignment]. +// Note: "bigquery.reservationAssignments.delete" permission is required on the +// related assignee. +message DeleteAssignmentRequest { + // Required. Name of the resource, e.g. + // `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/Assignment" + } + ]; +} + +// The request for +// [ReservationService.SearchAssignments][google.cloud.bigquery.reservation.v1.ReservationService.SearchAssignments]. +// Note: "bigquery.reservationAssignments.search" permission is required on the +// related assignee. +message SearchAssignmentsRequest { + // Required. The resource name of the admin project(containing project and + // location), e.g.: + // "projects/myproject/locations/US". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigqueryreservation.googleapis.com/Assignment" + } + ]; + + // Please specify resource name as assignee in the query. + // + // Examples: + // + // * `assignee=projects/myproject` + // * `assignee=folders/123` + // * `assignee=organizations/456` + string query = 2; + + // The maximum number of items to return per page. + int32 page_size = 3; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 4; +} + +// The response for +// [ReservationService.SearchAssignments][google.cloud.bigquery.reservation.v1.ReservationService.SearchAssignments]. +message SearchAssignmentsResponse { + // List of assignments visible to the user. + repeated Assignment assignments = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request for +// [ReservationService.MoveAssignment][google.cloud.bigquery.reservation.v1.ReservationService.MoveAssignment]. +// +// **Note**: "bigquery.reservationAssignments.create" permission is required on +// the destination_id. +// +// **Note**: "bigquery.reservationAssignments.create" and +// "bigquery.reservationAssignments.delete" permission are required on the +// related assignee. +message MoveAssignmentRequest { + // Required. The resource name of the assignment, + // e.g. + // `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/Assignment" + } + ]; + + // The new reservation ID, e.g.: + // `projects/myotherproject/locations/US/reservations/team2-prod` + string destination_id = 3; +} + +// Represents a BI Reservation. +message BiReservation { + option (google.api.resource) = { + type: "bigqueryreservation.googleapis.com/BiReservation" + pattern: "projects/{project}/locations/{location}/bireservation" + }; + + // The resource name of the singleton BI reservation. + // Reservation names have the form + // `projects/{project_id}/locations/{location_id}/bireservation`. + string name = 1; + + // Output only. The last update timestamp of a reservation. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Size of a reservation, in bytes. + int64 size = 4; +} + +// A request to get a singleton BI reservation. +message GetBiReservationRequest { + // Required. Name of the requested reservation, for example: + // `projects/{project_id}/locations/{location_id}/bireservation` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/BiReservation" + } + ]; +} + +// A request to update a BI reservation. +message UpdateBiReservationRequest { + // A reservation to update. + BiReservation bi_reservation = 1; + + // A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2; +} diff --git a/google/cloud/bigquery/reservation/v1beta1/BUILD.bazel b/google/cloud/bigquery/reservation/v1beta1/BUILD.bazel new file mode 100644 index 000000000..44b12b6d0 --- /dev/null +++ b/google/cloud/bigquery/reservation/v1beta1/BUILD.bazel @@ -0,0 +1,365 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "reservation_proto", + srcs = [ + "reservation.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "reservation_proto_with_info", + deps = [ + ":reservation_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "reservation_java_proto", + deps = [":reservation_proto"], +) + +java_grpc_library( + name = "reservation_java_grpc", + srcs = [":reservation_proto"], + deps = [":reservation_java_proto"], +) + +java_gapic_library( + name = "reservation_java_gapic", + src = ":reservation_proto_with_info", + gapic_yaml = "bigqueryreservation_gapic.yaml", + package = "google.cloud.bigquery.reservation.v1beta1", + service_yaml = "bigqueryreservation_v1beta1.yaml", + test_deps = [ + ":reservation_java_grpc", + ], + deps = [ + ":reservation_java_proto", + ], +) + +java_gapic_test( + name = "reservation_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.bigquery.reservation.v1beta1.ReservationServiceClientTest", + ], + runtime_deps = [":reservation_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-bigquery-reservation-v1beta1-java", + deps = [ + ":reservation_java_gapic", + ":reservation_java_grpc", + ":reservation_java_proto", + ":reservation_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "reservation_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/reservation/v1beta1", + protos = [":reservation_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + ], +) + +go_gapic_library( + name = "reservation_go_gapic", + srcs = [":reservation_proto_with_info"], + grpc_service_config = "bigqueryreservation_grpc_service_config.json", + importpath = "cloud.google.com/go/bigquery/reservation/apiv1beta1;reservation", + service_yaml = "bigqueryreservation_v1beta1.yaml", + deps = [ + ":reservation_go_proto", + ], +) + +go_test( + name = "reservation_go_gapic_test", + srcs = [":reservation_go_gapic_srcjar_test"], + embed = [":reservation_go_gapic"], + importpath = "cloud.google.com/go/bigquery/reservation/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-bigquery-reservation-v1beta1-go", + deps = [ + ":reservation_go_gapic", + ":reservation_go_gapic_srcjar-test.srcjar", + ":reservation_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "reservation_moved_proto", + srcs = [":reservation_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "reservation_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":reservation_moved_proto"], +) + +py_grpc_library( + name = "reservation_py_grpc", + srcs = [":reservation_moved_proto"], + deps = [":reservation_py_proto"], +) + +py_gapic_library( + name = "reservation_py_gapic", + src = ":reservation_proto_with_info", + gapic_yaml = "bigqueryreservation_gapic.yaml", + package = "google.cloud.bigquery.reservation.v1beta1", + service_yaml = "bigqueryreservation_v1beta1.yaml", + deps = [ + ":reservation_py_grpc", + ":reservation_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "bigquery-reservation-v1beta1-py", + deps = [ + ":reservation_py_gapic", + ":reservation_py_grpc", + ":reservation_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "reservation_php_proto", + deps = [":reservation_proto"], +) + +php_grpc_library( + name = "reservation_php_grpc", + srcs = [":reservation_proto"], + deps = [":reservation_php_proto"], +) + +php_gapic_library( + name = "reservation_php_gapic", + src = ":reservation_proto_with_info", + gapic_yaml = "bigqueryreservation_gapic.yaml", + package = "google.cloud.bigquery.reservation.v1beta1", + service_yaml = "bigqueryreservation_v1beta1.yaml", + deps = [ + ":reservation_php_grpc", + ":reservation_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-bigquery-reservation-v1beta1-php", + deps = [ + ":reservation_php_gapic", + ":reservation_php_grpc", + ":reservation_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "reservation_nodejs_gapic", + src = ":reservation_proto_with_info", + gapic_yaml = "bigqueryreservation_gapic.yaml", + package = "google.cloud.bigquery.reservation.v1beta1", + service_yaml = "bigqueryreservation_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "bigquery-reservation-v1beta1-nodejs", + deps = [ + ":reservation_nodejs_gapic", + ":reservation_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "reservation_ruby_proto", + deps = [":reservation_proto"], +) + +ruby_grpc_library( + name = "reservation_ruby_grpc", + srcs = [":reservation_proto"], + deps = [":reservation_ruby_proto"], +) + +ruby_gapic_library( + name = "reservation_ruby_gapic", + src = ":reservation_proto_with_info", + gapic_yaml = "bigqueryreservation_gapic.yaml", + package = "google.cloud.bigquery.reservation.v1beta1", + service_yaml = "bigqueryreservation_v1beta1.yaml", + deps = [ + ":reservation_ruby_grpc", + ":reservation_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-bigquery-reservation-v1beta1-ruby", + deps = [ + ":reservation_ruby_gapic", + ":reservation_ruby_grpc", + ":reservation_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "reservation_csharp_proto", + deps = [":reservation_proto"], +) + +csharp_grpc_library( + name = "reservation_csharp_grpc", + srcs = [":reservation_proto"], + deps = [":reservation_csharp_proto"], +) + +csharp_gapic_library( + name = "reservation_csharp_gapic", + src = ":reservation_proto_with_info", + gapic_yaml = "bigqueryreservation_gapic.yaml", + package = "google.cloud.bigquery.reservation.v1beta1", + service_yaml = "bigqueryreservation_v1beta1.yaml", + deps = [ + ":reservation_csharp_grpc", + ":reservation_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-bigquery-reservation-v1beta1-csharp", + deps = [ + ":reservation_csharp_gapic", + ":reservation_csharp_grpc", + ":reservation_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/bigquery/reservation/v1beta1/artman_bigqueryreservation_v1beta1.yaml b/google/cloud/bigquery/reservation/v1beta1/artman_bigqueryreservation_v1beta1.yaml new file mode 100644 index 000000000..70460351f --- /dev/null +++ b/google/cloud/bigquery/reservation/v1beta1/artman_bigqueryreservation_v1beta1.yaml @@ -0,0 +1,19 @@ +common: + api_name: bigqueryreservation + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - . + service_yaml: bigqueryreservation_v1beta1.yaml + gapic_yaml: bigqueryreservation_gapic.yaml +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: python_gapic + type: GAPIC + language: PYTHON +- name: php_gapic + type: GAPIC + language: PHP diff --git a/google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_gapic.legacy.yaml b/google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_gapic.legacy.yaml new file mode 100644 index 000000000..10260b254 --- /dev/null +++ b/google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_gapic.legacy.yaml @@ -0,0 +1,369 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.bigquery.reservation.v1beta1 + python: + package_name: google.cloud.bigquery.reservation_v1beta1.gapic + go: + package_name: cloud.google.com/go/bigquery/reservation/apiv1beta1 + csharp: + package_name: Google.Cloud.Bigquery.Reservation.V1beta1 + ruby: + package_name: Google::Cloud::Bigquery::Reservation::V1beta1 + php: + package_name: Google\Cloud\Bigquery\Reservation\V1beta1 + nodejs: + package_name: reservation.v1beta1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.bigquery.reservation.v1beta1.ReservationService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment} + entity_name: capacity_commitment + - name_pattern: projects/{project}/locations/{location}/reservations/{reservation} + entity_name: reservation + - name_pattern: projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment} + entity_name: assignment + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateReservation + flattening: + groups: + - parameters: + - parent + - reservation_id + - reservation + required_fields: + - parent + - reservation_id + - reservation + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: ListReservations + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: reservations + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetReservation + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: reservation + timeout_millis: 60000 + - name: GetBiReservation + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: reservation + timeout_millis: 60000 + - name: DeleteReservation + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: reservation + timeout_millis: 60000 + - name: UpdateReservation + flattening: + groups: + - parameters: + - reservation + - update_mask + required_fields: + - reservation + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + reservation.name: reservation + timeout_millis: 60000 + - name: UpdateBiReservation + flattening: + groups: + - parameters: + - reservation + - update_mask + required_fields: + - reservation + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + reservation.name: reservation + timeout_millis: 60000 + - name: ListCapacityCommitments + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: capacity_commitments + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetCapacityCommitment + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: capacity_commitment + timeout_millis: 60000 + - name: UpdateCapacityCommitment + flattening: + groups: + - parameters: + - capacity_commitment + - update_mask + required_fields: + - capacity_commitment + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + capacity_commitment.name: capacity_commitment + timeout_millis: 60000 + - name: SplitCapacityCommitment + flattening: + groups: + - parameters: + - name + - slot_count + required_fields: + - name + - slot_count + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: capacity_commitment + timeout_millis: 60000 + - name: MergeCapacityCommitments + flattening: + groups: + - parameters: + - parent + - capacity_commitment_ids + required_fields: + - parent + - capacity_commitment_ids + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 6000 + - name: DeleteCapacityCommitment + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: capacity_commitment + timeout_millis: 60000 + - name: CreateAssignment + flattening: + groups: + - parameters: + - parent + - assignment + required_fields: + - parent + - assignment + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: reservation + timeout_millis: 60000 + - name: ListAssignments + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: assignments + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: reservation + timeout_millis: 60000 + - name: DeleteAssignment + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: assignment + timeout_millis: 60000 + - name: SearchAssignments + flattening: + groups: + - parameters: + - parent + - query + required_fields: + - parent + - query + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: assignments + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: MoveAssignment + flattening: + groups: + - parameters: + - name + - destination_id + required_fields: + - name + - destination_id + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: assignment + timeout_millis: 60000 diff --git a/google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_gapic.yaml b/google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_gapic.yaml new file mode 100644 index 000000000..8d36e0466 --- /dev/null +++ b/google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_gapic.yaml @@ -0,0 +1,29 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.bigquery.reservation.v1beta1 + python: + package_name: google.cloud.bigquery.reservation_v1beta1.gapic + go: + package_name: cloud.google.com/go/bigquery/reservation/apiv1beta1 + csharp: + package_name: Google.Cloud.Bigquery.Reservation.V1beta1 + ruby: + package_name: Google::Cloud::Bigquery::Reservation::V1beta1 + php: + package_name: Google\Cloud\Bigquery\Reservation\V1beta1 + nodejs: + package_name: reservation.v1beta1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.bigquery.reservation.v1beta1.ReservationService + methods: + - name: DeleteReservation + retry_codes_name: idempotent + - name: DeleteCapacityCommitment + retry_codes_name: idempotent + - name: DeleteAssignment + retry_codes_name: idempotent diff --git a/google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_grpc_service_config.json b/google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_grpc_service_config.json new file mode 100755 index 000000000..f7c774fdb --- /dev/null +++ b/google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_grpc_service_config.json @@ -0,0 +1,96 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "CreateReservation" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "UpdateReservation" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "UpdateCapacityCommitment" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "SplitCapacityCommitment" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "MergeCapacityCommitments" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "CreateAssignment" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "MoveAssignment" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "UpdateBiReservation" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "ListReservations" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "GetReservation" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "DeleteReservation" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "ListCapacityCommitments" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "GetCapacityCommitment" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "DeleteCapacityCommitment" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "ListAssignments" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "DeleteAssignment" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "SearchAssignments" + }, + { + "service": "google.cloud.bigquery.reservation.v1beta1.ReservationService", + "method": "GetBiReservation" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_v1beta1.yaml b/google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_v1beta1.yaml new file mode 100644 index 000000000..96ff59e55 --- /dev/null +++ b/google/cloud/bigquery/reservation/v1beta1/bigqueryreservation_v1beta1.yaml @@ -0,0 +1,23 @@ +type: google.api.Service +config_version: 3 +name: bigqueryreservation.googleapis.com +title: BigQuery Reservation API + +apis: +- name: google.cloud.bigquery.reservation.v1beta1.ReservationService + +documentation: + summary: 'A service to modify your BigQuery flat-rate reservations.' + +authentication: + rules: + - selector: 'google.cloud.bigquery.reservation.v1beta1.ReservationService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/bigquery/reservation/v1beta1/reservation.proto b/google/cloud/bigquery/reservation/v1beta1/reservation.proto new file mode 100644 index 000000000..2a4fb3a77 --- /dev/null +++ b/google/cloud/bigquery/reservation/v1beta1/reservation.proto @@ -0,0 +1,808 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.reservation.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/reservation/v1beta1;reservation"; +option java_multiple_files = true; +option java_package = "com.google.cloud.bigquery.reservation.v1beta1"; + +// This API allows users to manage their flat-rate BigQuery reservations. +// +// A reservation provides computational resource guarantees, in the form of +// [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a +// unit of computational power in BigQuery, and serves as the basic unit of +// parallelism. In a scan of a multi-partitioned table, a single slot operates +// on a single partition of the table. A reservation resource exists as a child +// resource of the admin project and location, e.g.: +// projects/myproject/locations/US/reservations/reservationName. +// +// A capacity commitment is a way to purchase compute capacity for BigQuery jobs +// (in the form of slots) with some committed period of usage. A capacity +// commitment resource exists as a child resource of the admin project and +// location, e.g.: +// projects/myproject/locations/US/capacityCommitments/id. +service ReservationService { + option (google.api.default_host) = "bigqueryreservation.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/bigquery," + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new reservation resource. + rpc CreateReservation(CreateReservationRequest) returns (Reservation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/reservations" + body: "reservation" + }; + option (google.api.method_signature) = "parent,reservation,reservation_id"; + } + + // Lists all the reservations for the project in the specified location. + rpc ListReservations(ListReservationsRequest) + returns (ListReservationsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/reservations" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns information about the reservation. + rpc GetReservation(GetReservationRequest) returns (Reservation) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/reservations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a reservation. + // Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + // assignments. + rpc DeleteReservation(DeleteReservationRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/reservations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an existing reservation resource. + rpc UpdateReservation(UpdateReservationRequest) returns (Reservation) { + option (google.api.http) = { + patch: "/v1beta1/{reservation.name=projects/*/locations/*/reservations/*}" + body: "reservation" + }; + option (google.api.method_signature) = "reservation,update_mask"; + } + + // Lists all the capacity commitments for the admin project. + rpc ListCapacityCommitments(ListCapacityCommitmentsRequest) + returns (ListCapacityCommitmentsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/capacityCommitments" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns information about the capacity commitment. + rpc GetCapacityCommitment(GetCapacityCommitmentRequest) + returns (CapacityCommitment) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/capacityCommitments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a capacity commitment. Attempting to delete capacity commitment + // before its commitment_end_time will fail with the error code + // `google.rpc.Code.FAILED_PRECONDITION`. + rpc DeleteCapacityCommitment(DeleteCapacityCommitmentRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/capacityCommitments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an existing capacity commitment. + // + // Only renewal_plan field can be updated. + rpc UpdateCapacityCommitment(UpdateCapacityCommitmentRequest) + returns (CapacityCommitment) { + option (google.api.http) = { + patch: "/v1beta1/{capacity_commitment.name=projects/*/locations/*/capacityCommitments/*}" + body: "capacity_commitment" + }; + option (google.api.method_signature) = "capacity_commitment,update_mask"; + } + + // Splits capacity commitment to two commitments of the same plan and + // commitment_end_time. A common use case to do that is to perform a downgrade + // e.g., in order to downgrade from 10000 slots to 8000, one might split 10000 + // capacity commitment to 2000 and 8000, change the plan of the first one to + // flex and then delete it. + rpc SplitCapacityCommitment(SplitCapacityCommitmentRequest) + returns (SplitCapacityCommitmentResponse) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/capacityCommitments/*}:split" + body: "*" + }; + option (google.api.method_signature) = "name,slot_count"; + } + + // Merges capacity commitments of the same plan into one. Resulting capacity + // commitment has the longer commitment_end_time out of the two. Attempting to + // merge capacity commitments of different plan will fail with the error code + // `google.rpc.Code.FAILED_PRECONDITION`. + rpc MergeCapacityCommitments(MergeCapacityCommitmentsRequest) + returns (CapacityCommitment) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/capacityCommitments:merge" + body: "*" + }; + option (google.api.method_signature) = "parent,capacity_commitment_ids"; + } + + // Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have + // 'bigquery.admin' permissions on the project using the reservation + // and the project that owns this reservation. + // Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment + // does not match location of the reservation. + rpc CreateAssignment(CreateAssignmentRequest) returns (Assignment) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/reservations/*}/assignments" + body: "assignment" + }; + option (google.api.method_signature) = "parent,assignment"; + } + + // Lists assignments. + // Only explicitly created assignments will be returned. E.g: + // organizationA contains project1 and project2. Reservation res1 exists. + // CreateAssignment was invoked previously and following assignments were + // created explicitly: + // + // + // Then this API will just return the above two assignments for reservation + // res1, and no expansion/merge will happen. Wildcard "-" can be used for + // reservations in the request. In that case all assignments belongs to the + // specified project and location will be listed. Note + // "-" cannot be used for projects nor locations. + rpc ListAssignments(ListAssignmentsRequest) + returns (ListAssignmentsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/reservations/*}/assignments" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a assignment. No expansion will happen. + // E.g: + // organizationA contains project1 and project2. Reservation res1 exists. + // CreateAssignment was invoked previously and following assignments were + // created explicitly: + // + // + // Then deletion of won't affect . After + // deletion of , queries from project1 will still use + // res1, while queries from project2 will use on-demand mode. + rpc DeleteAssignment(DeleteAssignmentRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/reservations/*/assignments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Looks up assignments for a specified resource for a particular region. + // If the request is about a project: + // 1) Assignments created on the project will be returned if they exist. + // 2) Otherwise assignments created on the closest ancestor will be + // returned. 3) Assignments for different JobTypes will all be returned. + // Same logic applies if the request is about a folder. + // If the request is about an organization, then assignments created on the + // organization will be returned (organization doesn't have ancestors). + // Comparing to ListAssignments, there are some behavior + // differences: + // 1) permission on the assignee will be verified in this API. + // 2) Hierarchy lookup (project->folder->organization) happens in this API. + // 3) Parent here is projects/*/locations/*, instead of + // projects/*/locations/*reservations/*. + // Note "-" cannot be used for projects + // nor locations. + rpc SearchAssignments(SearchAssignmentsRequest) + returns (SearchAssignmentsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}:searchAssignments" + }; + option (google.api.method_signature) = "parent,query"; + } + + // Moves a assignment under a new reservation. Customers can do this by + // deleting the existing assignment followed by creating another assignment + // under the new reservation, but this method provides a transactional way to + // do so, to make sure the assignee always has an associated reservation. + // Without the method customers might see some queries run on-demand which + // might be unexpected. + rpc MoveAssignment(MoveAssignmentRequest) returns (Assignment) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/reservations/*/assignments/*}:move" + body: "*" + }; + option (google.api.method_signature) = "name,destination_id"; + } + + // Retrieves a BI reservation. + rpc GetBiReservation(GetBiReservationRequest) returns (BiReservation) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/biReservation}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a BI reservation. + // Only fields specified in the field_mask are updated. + // Singleton BI reservation always exists with default size 0. + // In order to reserve BI capacity it needs to be updated to an amount + // greater than 0. In order to release BI capacity reservation size + // must be set to 0. + rpc UpdateBiReservation(UpdateBiReservationRequest) returns (BiReservation) { + option (google.api.http) = { + patch: "/v1beta1/{bi_reservation.name=projects/*/locations/*/biReservation}" + body: "bi_reservation" + }; + option (google.api.method_signature) = "bi_reservation,update_mask"; + } +} + +// A reservation is a mechanism used to guarantee slots to users. +message Reservation { + option (google.api.resource) = { + type: "bigqueryreservation.googleapis.com/Reservation" + pattern: "projects/{project}/locations/{location}/reservations/{reservation}" + }; + + // The resource name of the reservation, e.g., + // "projects/*/locations/*/reservations/team1-prod". + string name = 1; + + // Minimum slots available to this reservation. A slot is a unit of + // computational power in BigQuery, and serves as the unit of parallelism. + // Queries using this reservation might use more slots during runtime if + // ignore_idle_slots is set to false. + // If the new reservation's slot capacity exceed the parent's slot capacity or + // if total slot capacity of the new reservation and its siblings exceeds the + // parent's slot capacity, the request will fail with + // `google.rpc.Code.RESOURCE_EXHAUSTED`. + int64 slot_capacity = 2; + + // If false, any query using this reservation will use idle slots from other + // reservations within the same admin project. If true, a query using this + // reservation will execute with the slot capacity specified above at most. + bool ignore_idle_slots = 4; +} + +// Capacity commitment is a way to purchase compute capacity for BigQuery jobs +// (in the form of slots) with some committed period of usage. Monthly and +// annual commitments renew by default. Only flex commitments can be removed. In +// order to remove monthly or annual commitments, their plan needs to be changed +// to flex first. +// +// A capacity commitment resource exists as a child resource of the admin +// project. +message CapacityCommitment { + option (google.api.resource) = { + type: "bigqueryreservation.googleapis.com/CapacityCommitment" + pattern: "projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}" + }; + + // Commitment plan defines the current committed period. Capacity commitment + // cannot be deleted during it's committed period. + enum CommitmentPlan { + // Invalid plan value. Requests with this value will be rejected with + // error code `google.rpc.Code.INVALID_ARGUMENT`. + COMMITMENT_PLAN_UNSPECIFIED = 0; + + // Flex commitments have committed period of 1 minute after becoming ACTIVE. + // After that, they are not in a committed period anymore and can be removed + // any time. + FLEX = 3; + + // Monthly commitments have a committed period of 30 days after becoming + // ACTIVE. + MONTHLY = 2; + + // Annual commitments have a committed period of 365 days after becoming + // ACTIVE. + ANNUAL = 4; + } + + // Capacity commitment can either become ACTIVE right away or transition + // from PENDING to ACTIVE or FAILED. + enum State { + // Invalid state value. + STATE_UNSPECIFIED = 0; + + // Capacity commitment is pending provisioning. Pending capacity commitment + // does not contribute to the parent's slot_capacity. + PENDING = 1; + + // Once slots are provisioned, capacity commitment becomes active. + // slot_count is added to the parent's slot_capacity. + ACTIVE = 2; + + // Capacity commitment is failed to be activated by the backend. + FAILED = 3; + } + + // Output only. The resource name of the capacity commitment, e.g., + // projects/myproject/locations/US/capacityCommitments/123 + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Number of slots in this commitment. + int64 slot_count = 2; + + // Capacity commitment commitment plan. + CommitmentPlan plan = 3; + + // Output only. State of the commitment. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The end of the current commitment period. It is applicable + // only for ACTIVE capacity commitments. + google.protobuf.Timestamp commitment_end_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. For FAILED commitment plan, provides the reason of failure. + google.rpc.Status failure_status = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The plan this capacity commitment is converted to after commitment_end_time + // passes. Once the plan is changed, committed period is extended according to + // commitment plan. Only applicable for MONTHLY and ANNUAL commitments. + CommitmentPlan renewal_plan = 8; +} + +// The request for +// [ReservationService.CreateReservation][google.cloud.bigquery.reservation.v1beta1.ReservationService.CreateReservation]. +message CreateReservationRequest { + // Required. Project, location. E.g., + // projects/myproject/locations/US + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigqueryreservation.googleapis.com/Reservation" + } + ]; + + // The reservation ID. This field must only contain lower case alphanumeric + // characters or dash. Max length is 64 characters. + string reservation_id = 2; + + // Content of the new reservation to create. + Reservation reservation = 3; +} + +// The request for +// [ReservationService.ListReservations][google.cloud.bigquery.reservation.v1beta1.ReservationService.ListReservations]. +message ListReservationsRequest { + // Required. The parent resource name containing project and location, e.g.: + // "projects/myproject/locations/US" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigqueryreservation.googleapis.com/Reservation" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; + + // Can be used to filter out reservations based on names, capacity, etc, e.g.: + // filter="reservation.slot_capacity > 200" + // filter="reservation.name = \"*dev/*\"" + // Advanced filtering syntax can be + // [here](https://cloud.google.com/logging/docs/view/advanced-filters). + string filter = 4; +} + +// The response for +// [ReservationService.ListReservations][google.cloud.bigquery.reservation.v1beta1.ReservationService.ListReservations]. +message ListReservationsResponse { + // List of reservations visible to the user. + repeated Reservation reservations = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request for +// [ReservationService.GetReservation][google.cloud.bigquery.reservation.v1beta1.ReservationService.GetReservation]. +message GetReservationRequest { + // Required. Resource name of the reservation to retrieve. E.g., + // projects/myproject/locations/US/reservations/team1-prod + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/Reservation" + } + ]; +} + +// The request for +// [ReservationService.DeleteReservation][google.cloud.bigquery.reservation.v1beta1.ReservationService.DeleteReservation]. +message DeleteReservationRequest { + // Required. Resource name of the reservation to retrieve. E.g., + // projects/myproject/locations/US/reservations/team1-prod + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/Reservation" + } + ]; +} + +// The request for +// [ReservationService.UpdateReservation][google.cloud.bigquery.reservation.v1beta1.ReservationService.UpdateReservation]. +message UpdateReservationRequest { + // Content of the reservation to update. + Reservation reservation = 1; + + // Standard field mask for the set of fields to be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// The request for +// [ReservationService.ListCapacityCommitments][google.cloud.bigquery.reservation.v1beta1.ReservationService.ListCapacityCommitments]. +message ListCapacityCommitmentsRequest { + // Required. Resource name of the parent reservation. E.g., + // projects/myproject/locations/US + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigqueryreservation.googleapis.com/CapacityCommitment" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// The response for +// [ReservationService.ListCapacityCommitments][google.cloud.bigquery.reservation.v1beta1.ReservationService.ListCapacityCommitments]. +message ListCapacityCommitmentsResponse { + // List of capacity commitments visible to the user. + repeated CapacityCommitment capacity_commitments = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request for +// [ReservationService.GetCapacityCommitment][google.cloud.bigquery.reservation.v1beta1.ReservationService.GetCapacityCommitment]. +message GetCapacityCommitmentRequest { + // Required. Resource name of the capacity commitment to retrieve. E.g., + // projects/myproject/locations/US/capacityCommitments/123 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/CapacityCommitment" + } + ]; +} + +// The request for +// [ReservationService.DeleteCapacityCommitment][google.cloud.bigquery.reservation.v1beta1.ReservationService.DeleteCapacityCommitment]. +message DeleteCapacityCommitmentRequest { + // Required. Resource name of the capacity commitment to delete. E.g., + // projects/myproject/locations/US/capacityCommitments/123 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/CapacityCommitment" + } + ]; +} + +// The request for +// [ReservationService.UpdateCapacityCommitment][google.cloud.bigquery.reservation.v1beta1.ReservationService.UpdateCapacityCommitment]. +message UpdateCapacityCommitmentRequest { + // Content of the capacity commitment to update. + CapacityCommitment capacity_commitment = 1; + + // Standard field mask for the set of fields to be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// The request for +// [ReservationService.SplitCapacityCommitment][google.cloud.bigquery.reservation.v1beta1.ReservationService.SplitCapacityCommitment]. +message SplitCapacityCommitmentRequest { + // Required. The resource name e.g.,: + // projects/myproject/locations/US/capacityCommitments/123 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/CapacityCommitment" + } + ]; + + // Number of slots in the capacity commitment after the split. + int64 slot_count = 2; +} + +// The response for +// [ReservationService.SplitCapacityCommitment][google.cloud.bigquery.reservation.v1beta1.ReservationService.SplitCapacityCommitment]. +message SplitCapacityCommitmentResponse { + // First capacity commitment, result of a split. + CapacityCommitment first = 1; + + // Second capacity commitment, result of a split. + CapacityCommitment second = 2; +} + +// The request for +// [ReservationService.MergeCapacityCommitments][google.cloud.bigquery.reservation.v1beta1.ReservationService.MergeCapacityCommitments]. +message MergeCapacityCommitmentsRequest { + // Parent resource that identifies admin project and location e.g., + // projects/myproject/locations/us + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigqueryreservation.googleapis.com/CapacityCommitment" + } + ]; + + // Ids of capacity commitments to merge. + // These capacity commitments must exist under admin project and location + // specified in the parent. + repeated string capacity_commitment_ids = 2; +} + +// A Assignment allows a project to submit jobs +// of a certain type using slots from the specified reservation. +message Assignment { + option (google.api.resource) = { + type: "bigqueryreservation.googleapis.com/Assignment" + pattern: "projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}" + }; + + // Types of job, which could be specified when using the reservation. + enum JobType { + // Invalid type. Requests with this value will be rejected with + // error code `google.rpc.Code.INVALID_ARGUMENT`. + JOB_TYPE_UNSPECIFIED = 0; + + // Pipeline (load/export) jobs from the project will use the reservation. + PIPELINE = 1; + + // Query jobs from the project will use the reservation. + QUERY = 2; + } + + // Assignment will remain in PENDING state if no active capacity commitment is + // present. It will become ACTIVE when some capacity commitment becomes + // active. + enum State { + // Invalid state value. + STATE_UNSPECIFIED = 0; + + // Queries from assignee will be executed as on-demand, if related + // assignment is pending. + PENDING = 1; + + // Assignment is ready. + ACTIVE = 2; + } + + // Output only. Name of the resource. E.g.: + // projects/myproject/locations/US/reservations/team1-prod/assignments/123. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The resource which will use the reservation. E.g. + // projects/myproject, folders/123, organizations/456. + string assignee = 4 [(google.api.resource_reference) = { type: "*" }]; + + // Which type of jobs will use the reservation. + JobType job_type = 3; + + // Output only. State of the assignment. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request for +// [ReservationService.CreateAssignment][google.cloud.bigquery.reservation.v1beta1.ReservationService.CreateAssignment]. +// Note: "bigquery.reservationAssignments.create" permission is required on the +// related assignee. +message CreateAssignmentRequest { + // Required. The parent resource name of the assignment + // E.g.: projects/myproject/locations/US/reservations/team1-prod + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigqueryreservation.googleapis.com/Assignment" + } + ]; + + // Assignment resource to create. + Assignment assignment = 2; +} + +// The request for +// [ReservationService.ListAssignments][google.cloud.bigquery.reservation.v1beta1.ReservationService.ListAssignments]. +message ListAssignmentsRequest { + // Required. The parent resource name e.g.: + // projects/myproject/locations/US/reservations/team1-prod + // Or: + // projects/myproject/locations/US/reservations/- + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigqueryreservation.googleapis.com/Assignment" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// The response for +// [ReservationService.ListAssignments][google.cloud.bigquery.reservation.v1beta1.ReservationService.ListAssignments]. +message ListAssignmentsResponse { + // List of assignments visible to the user. + repeated Assignment assignments = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request for +// [ReservationService.DeleteAssignment][google.cloud.bigquery.reservation.v1beta1.ReservationService.DeleteAssignment]. +// Note: "bigquery.reservationAssignments.delete" permission is required on the +// related assignee. +message DeleteAssignmentRequest { + // Required. Name of the resource, e.g.: + // projects/myproject/locations/US/reservations/team1-prod/assignments/123 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/Assignment" + } + ]; +} + +// The request for +// [ReservationService.SearchAssignments][google.cloud.bigquery.reservation.v1beta1.ReservationService.SearchAssignments]. +// Note: "bigquery.reservationAssignments.search" permission is required on the +// related assignee. +message SearchAssignmentsRequest { + // Required. The resource name of the admin project(containing project and + // location), e.g.: + // "projects/myproject/locations/US". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Please specify resource name as assignee in the query. + // e.g., "assignee=projects/myproject" + // "assignee=folders/123" + // "assignee=organizations/456" + string query = 2; + + // The maximum number of items to return. + int32 page_size = 3; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 4; +} + +// The response for +// [ReservationService.SearchAssignments][google.cloud.bigquery.reservation.v1beta1.ReservationService.SearchAssignments]. +message SearchAssignmentsResponse { + // List of assignments visible to the user. + repeated Assignment assignments = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request for +// [ReservationService.MoveAssignment][google.cloud.bigquery.reservation.v1beta1.ReservationService.MoveAssignment]. +// Note: "bigquery.reservationAssignments.create" permission is required on the +// destination_id. Note: "bigquery.reservationAssignments.create" and +// "bigquery.reservationAssignments.delete" permission is required on the +// related assignee. +message MoveAssignmentRequest { + // Required. The resource name of the assignment, + // e.g.: + // projects/myproject/locations/US/reservations/team1-prod/assignments/123 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/Assignment" + } + ]; + + // The new reservation ID, e.g.: + // projects/myotherproject/locations/US/reservations/team2-prod + string destination_id = 3 [(google.api.resource_reference) = { + child_type: "bigqueryreservation.googleapis.com/Assignment" + }]; +} + +// Represents a BI Reservation. +message BiReservation { + option (google.api.resource) = { + type: "bigqueryreservation.googleapis.com/BiReservation" + pattern: "projects/{project}/locations/{location}/bireservation" + }; + + // The resource name of the singleton BI reservation. + // Reservation names have the form + // `projects/{project_id}/locations/{location_id}/bireservation`. + string name = 1; + + // Output only. The last update timestamp of a reservation. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Size of a reservation, in bytes. + int64 size = 4; +} + +// A request to get a singleton BI reservation. +message GetBiReservationRequest { + // Required. Name of the requested reservation, for example: + // `projects/{project_id}/locations/{location_id}/bireservation` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigqueryreservation.googleapis.com/BiReservation" + } + ]; +} + +// A request to update a BI reservation. +message UpdateBiReservationRequest { + // A reservation to update. + BiReservation bi_reservation = 1; + + // A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2; +} diff --git a/google/cloud/bigquery/storage/BUILD.bazel b/google/cloud/bigquery/storage/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/cloud/bigquery/storage/BUILD.bazel +++ b/google/cloud/bigquery/storage/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/bigquery/storage/artman_bigquerystorage_v1.yaml b/google/cloud/bigquery/storage/artman_bigquerystorage_v1.yaml new file mode 100644 index 000000000..a631db85f --- /dev/null +++ b/google/cloud/bigquery/storage/artman_bigquerystorage_v1.yaml @@ -0,0 +1,20 @@ +common: + api_name: bigquerystorage + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1 + service_yaml: v1/bigquerystorage_v1.yaml + gapic_yaml: v1/bigquerystorage_gapic.yaml + proto_package: google.cloud.bigquery.storage.v1 +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: python_gapic + type: GAPIC + language: PYTHON +- name: php_gapic + type: GAPIC + language: PHP diff --git a/google/cloud/bigquery/storage/artman_bigquerystorage_v1alpha2.yaml b/google/cloud/bigquery/storage/artman_bigquerystorage_v1alpha2.yaml new file mode 100644 index 000000000..135151444 --- /dev/null +++ b/google/cloud/bigquery/storage/artman_bigquerystorage_v1alpha2.yaml @@ -0,0 +1,17 @@ +common: + api_name: bigquerystorage + api_version: v1alpha2 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1alpha2 + service_yaml: v1alpha2/bigquerystorage_v1alpha2.yaml + gapic_yaml: v1alpha2/bigquerystorage_gapic.yaml + proto_package: google.cloud.bigquery.storage.v1alpha2 +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: python_gapic + type: GAPIC + language: PYTHON diff --git a/google/cloud/bigquery/storage/artman_bigquerystorage_v1beta1.yaml b/google/cloud/bigquery/storage/artman_bigquerystorage_v1beta1.yaml index 49e837efd..ac737345c 100644 --- a/google/cloud/bigquery/storage/artman_bigquerystorage_v1beta1.yaml +++ b/google/cloud/bigquery/storage/artman_bigquerystorage_v1beta1.yaml @@ -3,32 +3,15 @@ common: api_version: v1beta1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1beta1 - service_yaml: storage_v1beta1.yaml + service_yaml: v1beta1/bigquerystorage_v1beta1.yaml gapic_yaml: v1beta1/bigquerystorage_gapic.yaml + proto_package: google.cloud.bigquery.storage.v1beta1 artifacts: - name: gapic_config type: GAPIC_CONFIG -- name: java_gapic - type: GAPIC - language: JAVA - name: python_gapic type: GAPIC language: PYTHON -- name: nodejs_gapic - type: GAPIC - language: NODEJS -- name: php_gapic - type: GAPIC - language: PHP -- name: go_gapic - type: GAPIC - language: GO -- name: ruby_gapic - type: GAPIC - language: RUBY -- name: csharp_gapic - type: GAPIC - language: CSHARP diff --git a/google/cloud/bigquery/storage/artman_bigquerystorage_v1beta2.yaml b/google/cloud/bigquery/storage/artman_bigquerystorage_v1beta2.yaml new file mode 100644 index 000000000..28d109c29 --- /dev/null +++ b/google/cloud/bigquery/storage/artman_bigquerystorage_v1beta2.yaml @@ -0,0 +1,17 @@ +common: + api_name: bigquerystorage + api_version: v1beta2 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta2 + service_yaml: v1beta2/bigquerystorage_v1beta2.yaml + gapic_yaml: v1beta2/bigquerystorage_gapic.yaml + proto_package: google.cloud.bigquery.storage.v1beta2 +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: python_gapic + type: GAPIC + language: PYTHON diff --git a/google/cloud/bigquery/storage/v1/BUILD.bazel b/google/cloud/bigquery/storage/v1/BUILD.bazel new file mode 100644 index 000000000..0e97194ea --- /dev/null +++ b/google/cloud/bigquery/storage/v1/BUILD.bazel @@ -0,0 +1,377 @@ +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "storage_proto", + srcs = [ + "arrow.proto", + "avro.proto", + "storage.proto", + "stream.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "storage_proto_with_info", + deps = [ + ":storage_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "storage_java_proto", + deps = [":storage_proto"], +) + +java_grpc_library( + name = "storage_java_grpc", + srcs = [":storage_proto"], + deps = [":storage_java_proto"], +) + +java_gapic_library( + name = "storage_java_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1", + service_yaml = "bigquerystorage_v1.yaml", + test_deps = [ + ":storage_java_grpc", + ], + deps = [ + ":storage_java_proto", + ], +) + +java_gapic_test( + name = "storage_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.bigquery.storage.v1.BaseBigQueryReadClientTest", + ], + runtime_deps = [":storage_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-bigquery-storage-v1-java", + deps = [ + ":storage_java_gapic", + ":storage_java_grpc", + ":storage_java_proto", + ":storage_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "storage_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1", + protos = [":storage_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "storage_go_gapic", + srcs = [":storage_proto_with_info"], + grpc_service_config = "bigquerystorage_grpc_service_config.json", + importpath = "cloud.google.com/go/bigquery/storage/apiv1;storage", + service_yaml = "bigquerystorage_v1.yaml", + deps = [ + ":storage_go_proto", + ], +) + +go_test( + name = "storage_go_gapic_test", + srcs = [":storage_go_gapic_srcjar_test"], + embed = [":storage_go_gapic"], + importpath = "cloud.google.com/go/bigquery/storage/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-bigquery-storage-v1-go", + deps = [ + ":storage_go_gapic", + ":storage_go_gapic_srcjar-test.srcjar", + ":storage_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "storage_moved_proto", + srcs = [":storage_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "storage_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":storage_moved_proto"], +) + +py_grpc_library( + name = "storage_py_grpc", + srcs = [":storage_moved_proto"], + deps = [":storage_py_proto"], +) + +py_gapic_library( + name = "storage_py_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1", + service_yaml = "bigquerystorage_v1.yaml", + deps = [ + ":storage_py_grpc", + ":storage_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "bigquery-storage-v1-py", + deps = [ + ":storage_py_gapic", + ":storage_py_grpc", + ":storage_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "storage_php_proto", + deps = [":storage_proto"], +) + +php_grpc_library( + name = "storage_php_grpc", + srcs = [":storage_proto"], + deps = [":storage_php_proto"], +) + +php_gapic_library( + name = "storage_php_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1", + service_yaml = "bigquerystorage_v1.yaml", + deps = [ + ":storage_php_grpc", + ":storage_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-bigquery-storage-v1-php", + deps = [ + ":storage_php_gapic", + ":storage_php_grpc", + ":storage_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "storage_nodejs_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1", + service_yaml = "bigquerystorage_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "bigquery-storage-v1-nodejs", + deps = [ + ":storage_nodejs_gapic", + ":storage_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "storage_ruby_proto", + deps = [":storage_proto"], +) + +ruby_grpc_library( + name = "storage_ruby_grpc", + srcs = [":storage_proto"], + deps = [":storage_ruby_proto"], +) + +ruby_gapic_library( + name = "storage_ruby_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1", + service_yaml = "bigquerystorage_v1.yaml", + deps = [ + ":storage_ruby_grpc", + ":storage_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-bigquery-storage-v1-ruby", + deps = [ + ":storage_ruby_gapic", + ":storage_ruby_grpc", + ":storage_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "storage_csharp_proto", + deps = [":storage_proto"], +) + +csharp_grpc_library( + name = "storage_csharp_grpc", + srcs = [":storage_proto"], + deps = [":storage_csharp_proto"], +) + +csharp_gapic_library( + name = "storage_csharp_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1", + service_yaml = "bigquerystorage_v1.yaml", + deps = [ + ":storage_csharp_grpc", + ":storage_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-bigquery-storage-v1-csharp", + deps = [ + ":storage_csharp_gapic", + ":storage_csharp_grpc", + ":storage_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "storage_cc_proto", + deps = [":storage_proto"], +) + +cc_grpc_library( + name = "storage_cc_grpc", + srcs = [":storage_proto"], + generate_mocks = True, + grpc_only = True, + deps = [":storage_cc_proto"], +) diff --git a/google/cloud/bigquery/storage/v1/arrow.proto b/google/cloud/bigquery/storage/v1/arrow.proto new file mode 100644 index 000000000..1c54eeab0 --- /dev/null +++ b/google/cloud/bigquery/storage/v1/arrow.proto @@ -0,0 +1,45 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1; + +option csharp_namespace = "Google.Cloud.BigQuery.Storage.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1;storage"; +option java_multiple_files = true; +option java_outer_classname = "ArrowProto"; +option java_package = "com.google.cloud.bigquery.storage.v1"; +option php_namespace = "Google\\Cloud\\BigQuery\\Storage\\V1"; + +// Arrow schema as specified in +// https://arrow.apache.org/docs/python/api/datatypes.html +// and serialized to bytes using IPC: +// https://arrow.apache.org/docs/format/Columnar.html#serialization-and-interprocess-communication-ipc +// +// See code samples on how this message can be deserialized. +message ArrowSchema { + // IPC serialized Arrow schema. + bytes serialized_schema = 1; +} + +// Arrow RecordBatch. +message ArrowRecordBatch { + // IPC-serialized Arrow RecordBatch. + bytes serialized_record_batch = 1; + + // The count of rows in `serialized_record_batch`. + int64 row_count = 2; +} diff --git a/google/cloud/bigquery/storage/v1/avro.proto b/google/cloud/bigquery/storage/v1/avro.proto new file mode 100644 index 000000000..9a064447b --- /dev/null +++ b/google/cloud/bigquery/storage/v1/avro.proto @@ -0,0 +1,41 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1; + +option csharp_namespace = "Google.Cloud.BigQuery.Storage.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1;storage"; +option java_multiple_files = true; +option java_outer_classname = "AvroProto"; +option java_package = "com.google.cloud.bigquery.storage.v1"; +option php_namespace = "Google\\Cloud\\BigQuery\\Storage\\V1"; + +// Avro schema. +message AvroSchema { + // Json serialized schema, as described at + // https://avro.apache.org/docs/1.8.1/spec.html. + string schema = 1; +} + +// Avro rows. +message AvroRows { + // Binary serialized rows in a block. + bytes serialized_binary_rows = 1; + + // The count of rows in the returning block. + int64 row_count = 2; +} diff --git a/google/cloud/bigquery/storage/v1/bigquerystorage_gapic.legacy.yaml b/google/cloud/bigquery/storage/v1/bigquerystorage_gapic.legacy.yaml new file mode 100644 index 000000000..3f7d04aa3 --- /dev/null +++ b/google/cloud/bigquery/storage/v1/bigquerystorage_gapic.legacy.yaml @@ -0,0 +1,84 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.bigquery.storage.v1 + interface_names: + google.cloud.bigquery.storage.v1.BigQueryRead: BaseBigQueryRead + python: + package_name: google.cloud.bigquery_storage_v1.gapic + go: + package_name: cloud.google.com/go/bigquery/storage/apiv1 + csharp: + package_name: Google.Cloud.BigQuery.Storage.V1 + ruby: + package_name: Google::Cloud::Bigquery::Storage::V1 + php: + package_name: Google\Cloud\BigQuery\Storage\V1 + nodejs: + package_name: storage.v1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.bigquery.storage.v1.BigQueryRead + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: unary_streaming + retry_codes: + - UNAVAILABLE + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + - name: create_read_session + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 120000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 120000 + total_timeout_millis: 600000 + - name: read_rows + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 86400000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 86400000 + total_timeout_millis: 86400000 + methods: + - name: CreateReadSession + flattening: + groups: + - parameters: + - parent + - read_session + - max_stream_count + retry_codes_name: idempotent + retry_params_name: create_read_session + timeout_millis: 60000 + - name: ReadRows + flattening: + groups: + - parameters: + - read_stream + - offset + retry_codes_name: unary_streaming + retry_params_name: read_rows + timeout_millis: 86400000 + - name: SplitReadStream + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/cloud/bigquery/storage/v1/bigquerystorage_gapic.yaml b/google/cloud/bigquery/storage/v1/bigquerystorage_gapic.yaml new file mode 100644 index 000000000..9162b1677 --- /dev/null +++ b/google/cloud/bigquery/storage/v1/bigquerystorage_gapic.yaml @@ -0,0 +1,70 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.bigquery.storage.v1 + interface_names: + google.cloud.bigquery.storage.v1.BigQueryRead: BaseBigQueryRead + python: + package_name: google.cloud.bigquery_storage_v1.gapic + go: + package_name: cloud.google.com/go/bigquery/storage/apiv1 + csharp: + package_name: Google.Cloud.BigQuery.Storage.V1 + ruby: + package_name: Google::Cloud::Bigquery::Storage::V1 + php: + package_name: Google\Cloud\BigQuery\Storage\V1 + nodejs: + package_name: storage.v1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.bigquery.storage.v1.BigQueryRead + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: unary_streaming + retry_codes: + - UNAVAILABLE + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + - name: create_read_session + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 120000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 120000 + total_timeout_millis: 600000 + - name: read_rows + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 86400000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 86400000 + total_timeout_millis: 86400000 + methods: + - name: CreateReadSession + retry_codes_name: idempotent + retry_params_name: create_read_session + - name: ReadRows + retry_codes_name: unary_streaming + retry_params_name: read_rows + timeout_millis: 86400000 + - name: SplitReadStream + retry_codes_name: idempotent + retry_params_name: default diff --git a/google/cloud/bigquery/storage/v1/bigquerystorage_grpc_service_config.json b/google/cloud/bigquery/storage/v1/bigquerystorage_grpc_service_config.json new file mode 100644 index 000000000..2efc373b1 --- /dev/null +++ b/google/cloud/bigquery/storage/v1/bigquerystorage_grpc_service_config.json @@ -0,0 +1,57 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.bigquery.storage.v1.BigQueryRead", + "method": "CreateReadSession" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.bigquery.storage.v1.BigQueryRead", + "method": "ReadRows" + } + ], + "timeout": "86400s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.bigquery.storage.v1.BigQueryRead", + "method": "SplitReadStream" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/bigquery/storage/v1/bigquerystorage_v1.yaml b/google/cloud/bigquery/storage/v1/bigquerystorage_v1.yaml new file mode 100644 index 000000000..f671c4a51 --- /dev/null +++ b/google/cloud/bigquery/storage/v1/bigquerystorage_v1.yaml @@ -0,0 +1,25 @@ +type: google.api.Service +config_version: 3 +name: bigquerystorage.googleapis.com +title: BigQuery Storage API + +apis: +- name: google.cloud.bigquery.storage.v1.BigQueryRead + +backend: + rules: + - selector: google.cloud.bigquery.storage.v1.BigQueryRead.CreateReadSession + deadline: 120.0 + - selector: google.cloud.bigquery.storage.v1.BigQueryRead.ReadRows + deadline: 21600.0 + - selector: google.cloud.bigquery.storage.v1.BigQueryRead.SplitReadStream + deadline: 120.0 + +authentication: + rules: + - selector: 'google.cloud.bigquery.storage.v1.BigQueryRead.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/bigquery.readonly, + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/bigquery/storage/v1/storage.proto b/google/cloud/bigquery/storage/v1/storage.proto new file mode 100644 index 000000000..26fcd6ac2 --- /dev/null +++ b/google/cloud/bigquery/storage/v1/storage.proto @@ -0,0 +1,236 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/bigquery/storage/v1/arrow.proto"; +import "google/cloud/bigquery/storage/v1/avro.proto"; +import "google/cloud/bigquery/storage/v1/stream.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.Storage.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1;storage"; +option java_multiple_files = true; +option java_outer_classname = "StorageProto"; +option java_package = "com.google.cloud.bigquery.storage.v1"; +option php_namespace = "Google\\Cloud\\BigQuery\\Storage\\V1"; +option (google.api.resource_definition) = { + type: "bigquery.googleapis.com/Table" + pattern: "projects/{project}/datasets/{dataset}/tables/{table}" +}; + +// BigQuery Read API. +// +// The Read API can be used to read data from BigQuery. +service BigQueryRead { + option (google.api.default_host) = "bigquerystorage.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/bigquery," + "https://www.googleapis.com/auth/bigquery.readonly," + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new read session. A read session divides the contents of a + // BigQuery table into one or more streams, which can then be used to read + // data from the table. The read session also specifies properties of the + // data to be read, such as a list of columns or a push-down filter describing + // the rows to be returned. + // + // A particular row can be read by at most one stream. When the caller has + // reached the end of each stream in the session, then all the data in the + // table has been read. + // + // Data is assigned to each stream such that roughly the same number of + // rows can be read from each stream. Because the server-side unit for + // assigning data is collections of rows, the API does not guarantee that + // each stream will return the same number or rows. Additionally, the + // limits are enforced based on the number of pre-filtered rows, so some + // filters can lead to lopsided assignments. + // + // Read sessions automatically expire 24 hours after they are created and do + // not require manual clean-up by the caller. + rpc CreateReadSession(CreateReadSessionRequest) returns (ReadSession) { + option (google.api.http) = { + post: "/v1/{read_session.table=projects/*/datasets/*/tables/*}" + body: "*" + }; + option (google.api.method_signature) = "parent,read_session,max_stream_count"; + } + + // Reads rows from the stream in the format prescribed by the ReadSession. + // Each response contains one or more table rows, up to a maximum of 100 MiB + // per response; read requests which attempt to read individual rows larger + // than 100 MiB will fail. + // + // Each request also returns a set of stream statistics reflecting the current + // state of the stream. + rpc ReadRows(ReadRowsRequest) returns (stream ReadRowsResponse) { + option (google.api.http) = { + get: "/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}" + }; + option (google.api.method_signature) = "read_stream,offset"; + } + + // Splits a given `ReadStream` into two `ReadStream` objects. These + // `ReadStream` objects are referred to as the primary and the residual + // streams of the split. The original `ReadStream` can still be read from in + // the same manner as before. Both of the returned `ReadStream` objects can + // also be read from, and the rows returned by both child streams will be + // the same as the rows read from the original stream. + // + // Moreover, the two child streams will be allocated back-to-back in the + // original `ReadStream`. Concretely, it is guaranteed that for streams + // original, primary, and residual, that original[0-j] = primary[0-j] and + // original[j-n] = residual[0-m] once the streams have been read to + // completion. + rpc SplitReadStream(SplitReadStreamRequest) returns (SplitReadStreamResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/sessions/*/streams/*}" + }; + } +} + +// Request message for `CreateReadSession`. +message CreateReadSessionRequest { + // Required. The request project that owns the session, in the form of + // `projects/{project_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. Session to be created. + ReadSession read_session = 2 [(google.api.field_behavior) = REQUIRED]; + + // Max initial number of streams. If unset or zero, the server will + // provide a value of streams so as to produce reasonable throughput. Must be + // non-negative. The number of streams may be lower than the requested number, + // depending on the amount parallelism that is reasonable for the table. Error + // will be returned if the max count is greater than the current system + // max limit of 1,000. + // + // Streams must be read starting from offset 0. + int32 max_stream_count = 3; +} + +// Request message for `ReadRows`. +message ReadRowsRequest { + // Required. Stream to read rows from. + string read_stream = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerystorage.googleapis.com/ReadStream" + } + ]; + + // The offset requested must be less than the last row read from Read. + // Requesting a larger offset is undefined. If not specified, start reading + // from offset zero. + int64 offset = 2; +} + +// Information on if the current connection is being throttled. +message ThrottleState { + // How much this connection is being throttled. Zero means no throttling, + // 100 means fully throttled. + int32 throttle_percent = 1; +} + +// Estimated stream statistics for a given Stream. +message StreamStats { + message Progress { + // The fraction of rows assigned to the stream that have been processed by + // the server so far, not including the rows in the current response + // message. + // + // This value, along with `at_response_end`, can be used to interpolate + // the progress made as the rows in the message are being processed using + // the following formula: `at_response_start + (at_response_end - + // at_response_start) * rows_processed_from_response / rows_in_response`. + // + // Note that if a filter is provided, the `at_response_end` value of the + // previous response may not necessarily be equal to the + // `at_response_start` value of the current response. + double at_response_start = 1; + + // Similar to `at_response_start`, except that this value includes the + // rows in the current response. + double at_response_end = 2; + } + + // Represents the progress of the current stream. + Progress progress = 2; +} + +// Response from calling `ReadRows` may include row data, progress and +// throttling information. +message ReadRowsResponse { + // Row data is returned in format specified during session creation. + oneof rows { + // Serialized row data in AVRO format. + AvroRows avro_rows = 3; + + // Serialized row data in Arrow RecordBatch format. + ArrowRecordBatch arrow_record_batch = 4; + } + + // Number of serialized rows in the rows block. + int64 row_count = 6; + + // Statistics for the stream. + StreamStats stats = 2; + + // Throttling state. If unset, the latest response still describes + // the current throttling status. + ThrottleState throttle_state = 5; +} + +// Request message for `SplitReadStream`. +message SplitReadStreamRequest { + // Required. Name of the stream to split. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerystorage.googleapis.com/ReadStream" + } + ]; + + // A value in the range (0.0, 1.0) that specifies the fractional point at + // which the original stream should be split. The actual split point is + // evaluated on pre-filtered rows, so if a filter is provided, then there is + // no guarantee that the division of the rows between the new child streams + // will be proportional to this fractional value. Additionally, because the + // server-side unit for assigning data is collections of rows, this fraction + // will always map to a data storage boundary on the server side. + double fraction = 2; +} + +// Response message for `SplitReadStream`. +message SplitReadStreamResponse { + // Primary stream, which contains the beginning portion of + // |original_stream|. An empty value indicates that the original stream can no + // longer be split. + ReadStream primary_stream = 1; + + // Remainder stream, which contains the tail of |original_stream|. An empty + // value indicates that the original stream can no longer be split. + ReadStream remainder_stream = 2; +} diff --git a/google/cloud/bigquery/storage/v1/stream.proto b/google/cloud/bigquery/storage/v1/stream.proto new file mode 100644 index 000000000..febad0367 --- /dev/null +++ b/google/cloud/bigquery/storage/v1/stream.proto @@ -0,0 +1,137 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/bigquery/storage/v1/arrow.proto"; +import "google/cloud/bigquery/storage/v1/avro.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.Storage.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1;storage"; +option java_multiple_files = true; +option java_outer_classname = "StreamProto"; +option java_package = "com.google.cloud.bigquery.storage.v1"; +option php_namespace = "Google\\Cloud\\BigQuery\\Storage\\V1"; + +// Data format for input or output data. +enum DataFormat { + DATA_FORMAT_UNSPECIFIED = 0; + + // Avro is a standard open source row based file format. + // See https://avro.apache.org/ for more details. + AVRO = 1; + + // Arrow is a standard open source column-based message format. + // See https://arrow.apache.org/ for more details. + ARROW = 2; +} + +// Information about the ReadSession. +message ReadSession { + option (google.api.resource) = { + type: "bigquerystorage.googleapis.com/ReadSession" + pattern: "projects/{project}/locations/{location}/sessions/{session}" + }; + + // Additional attributes when reading a table. + message TableModifiers { + // The snapshot time of the table. If not set, interpreted as now. + google.protobuf.Timestamp snapshot_time = 1; + } + + // Options dictating how we read a table. + message TableReadOptions { + // Names of the fields in the table that should be read. If empty, all + // fields will be read. If the specified field is a nested field, all + // the sub-fields in the field will be selected. The output field order is + // unrelated to the order of fields in selected_fields. + repeated string selected_fields = 1; + + // SQL text filtering statement, similar to a WHERE clause in a query. + // Aggregates are not supported. + // + // Examples: "int_field > 5" + // "date_field = CAST('2014-9-27' as DATE)" + // "nullable_field is not NULL" + // "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + // "numeric_field BETWEEN 1.0 AND 5.0" + string row_restriction = 2; + } + + // Output only. Unique identifier for the session, in the form + // `projects/{project_id}/locations/{location}/sessions/{session_id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the session becomes invalid. After this time, subsequent + // requests to read this Session will return errors. The expire_time is + // automatically assigned and currently cannot be specified or updated. + google.protobuf.Timestamp expire_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Data format of the output data. + DataFormat data_format = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // The schema for the read. If read_options.selected_fields is set, the + // schema may be different from the table schema as it will only contain + // the selected fields. + oneof schema { + // Output only. Avro schema. + AvroSchema avro_schema = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Arrow schema. + ArrowSchema arrow_schema = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Immutable. Table that this ReadSession is reading from, in the form + // `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` + string table = 6 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "bigquery.googleapis.com/Table" + } + ]; + + // Optional. Any modifiers which are applied when reading from the specified table. + TableModifiers table_modifiers = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Read options for this session (e.g. column selection, filters). + TableReadOptions read_options = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. A list of streams created with the session. + // + // At least one stream is created with the session. In the future, larger + // request_stream_count values *may* result in this list being unpopulated, + // in that case, the user will need to use a List method to get the streams + // instead, which is not yet available. + repeated ReadStream streams = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Information about a single stream that gets data out of the storage system. +// Most of the information about `ReadStream` instances is aggregated, making +// `ReadStream` lightweight. +message ReadStream { + option (google.api.resource) = { + type: "bigquerystorage.googleapis.com/ReadStream" + pattern: "projects/{project}/locations/{location}/sessions/{session}/streams/{stream}" + }; + + // Output only. Name of the stream, in the form + // `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/bigquery/storage/v1alpha2/BUILD.bazel b/google/cloud/bigquery/storage/v1alpha2/BUILD.bazel new file mode 100644 index 000000000..2789b99ea --- /dev/null +++ b/google/cloud/bigquery/storage/v1alpha2/BUILD.bazel @@ -0,0 +1,371 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "storage_proto", + srcs = [ + "protobuf.proto", + "storage.proto", + "stream.proto", + "table.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/rpc:status_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:descriptor_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library_with_info( + name = "storage_proto_with_info", + deps = [ + ":storage_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "storage_java_proto", + deps = [":storage_proto"], +) + +java_grpc_library( + name = "storage_java_grpc", + srcs = [":storage_proto"], + deps = [":storage_java_proto"], +) + +java_gapic_library( + name = "storage_java_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1alpha2", + service_yaml = "bigquerystorage_v1alpha2.yaml", + test_deps = [ + ":storage_java_grpc", + ], + deps = [ + ":storage_java_proto", + ], +) + +java_gapic_test( + name = "storage_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.bigquery.storage.v1alpha2.BigQueryWriteClientTest", + ], + runtime_deps = [":storage_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-bigquery-storage-v1alpha2-java", + deps = [ + ":storage_java_gapic", + ":storage_java_grpc", + ":storage_java_proto", + ":storage_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "storage_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1alpha2", + protos = [":storage_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + ], +) + +go_gapic_library( + name = "storage_go_gapic", + srcs = [":storage_proto_with_info"], + grpc_service_config = "bigquerystorage_grpc_service_config.json", + importpath = "cloud.google.com/go/bigquery/storage/apiv1alpha2;storage", + service_yaml = "bigquerystorage_v1alpha2.yaml", + deps = [ + ":storage_go_proto", + ], +) + +go_test( + name = "storage_go_gapic_test", + srcs = [":storage_go_gapic_srcjar_test"], + embed = [":storage_go_gapic"], + importpath = "cloud.google.com/go/bigquery/storage/apiv1alpha2", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-bigquery-storage-v1alpha2-go", + deps = [ + ":storage_go_gapic", + ":storage_go_gapic_srcjar-test.srcjar", + ":storage_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "storage_moved_proto", + srcs = [":storage_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/rpc:status_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:descriptor_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "storage_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":storage_moved_proto"], +) + +py_grpc_library( + name = "storage_py_grpc", + srcs = [":storage_moved_proto"], + deps = [":storage_py_proto"], +) + +py_gapic_library( + name = "storage_py_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1alpha2", + service_yaml = "bigquerystorage_v1alpha2.yaml", + deps = [ + ":storage_py_grpc", + ":storage_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "bigquery-storage-v1alpha2-py", + deps = [ + ":storage_py_gapic", + ":storage_py_grpc", + ":storage_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "storage_php_proto", + deps = [":storage_proto"], +) + +php_grpc_library( + name = "storage_php_grpc", + srcs = [":storage_proto"], + deps = [":storage_php_proto"], +) + +php_gapic_library( + name = "storage_php_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1alpha2", + service_yaml = "bigquerystorage_v1alpha2.yaml", + deps = [ + ":storage_php_grpc", + ":storage_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-bigquery-storage-v1alpha2-php", + deps = [ + ":storage_php_gapic", + ":storage_php_grpc", + ":storage_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "storage_nodejs_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1alpha2", + service_yaml = "bigquerystorage_v1alpha2.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "bigquery-storage-v1alpha2-nodejs", + deps = [ + ":storage_nodejs_gapic", + ":storage_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +# Enable once proto2 dependency is eliminated. +#load( +# "@com_google_googleapis_imports//:imports.bzl", +# "ruby_gapic_assembly_pkg", +# "ruby_gapic_library", +# "ruby_grpc_library", +# "ruby_proto_library", +#) +# +#ruby_proto_library( +# name = "storage_ruby_proto", +# deps = [":storage_proto"], +#) +# +#ruby_grpc_library( +# name = "storage_ruby_grpc", +# srcs = [":storage_proto"], +# deps = [":storage_ruby_proto"], +#) +# +#ruby_gapic_library( +# name = "storage_ruby_gapic", +# src = ":storage_proto_with_info", +# gapic_yaml = "bigquerystorage_gapic.yaml", +# package = "google.cloud.bigquery.storage.v1alpha2", +# service_yaml = "bigquerystorage_v1alpha2.yaml", +# deps = [ +# ":storage_ruby_grpc", +# ":storage_ruby_proto", +# ], +#) +# +## Open Source Packages +#ruby_gapic_assembly_pkg( +# name = "google-cloud-bigquery-storage-v1alpha2-ruby", +# deps = [ +# ":storage_ruby_gapic", +# ":storage_ruby_grpc", +# ":storage_ruby_proto", +# ], +#) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "storage_csharp_proto", + deps = [":storage_proto"], +) + +csharp_grpc_library( + name = "storage_csharp_grpc", + srcs = [":storage_proto"], + deps = [":storage_csharp_proto"], +) + +csharp_gapic_library( + name = "storage_csharp_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1alpha2", + service_yaml = "bigquerystorage_v1alpha2.yaml", + deps = [ + ":storage_csharp_grpc", + ":storage_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-bigquery-storage-v1alpha2-csharp", + deps = [ + ":storage_csharp_gapic", + ":storage_csharp_grpc", + ":storage_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/bigquery/storage/v1alpha2/bigquerystorage_gapic.legacy.yaml b/google/cloud/bigquery/storage/v1alpha2/bigquerystorage_gapic.legacy.yaml new file mode 100644 index 000000000..39cd0a76b --- /dev/null +++ b/google/cloud/bigquery/storage/v1alpha2/bigquerystorage_gapic.legacy.yaml @@ -0,0 +1,18 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.bigquery.storage.v1alpha2 + python: + package_name: google.cloud.bigquery.storage_v1alpha2.gapic + go: + package_name: cloud.google.com/go/bigquery/storage/apiv1alpha2 + csharp: + package_name: Google.Cloud.Bigquery.Storage.V1alpha2 + ruby: + package_name: Google::Cloud::Bigquery::Storage::V1alpha2 + php: + package_name: Google\Cloud\Bigquery\Storage\V1alpha2 + nodejs: + package_name: storage.v1alpha2 diff --git a/google/cloud/bigquery/storage/v1alpha2/bigquerystorage_gapic.yaml b/google/cloud/bigquery/storage/v1alpha2/bigquerystorage_gapic.yaml new file mode 100644 index 000000000..60b62f11c --- /dev/null +++ b/google/cloud/bigquery/storage/v1alpha2/bigquerystorage_gapic.yaml @@ -0,0 +1,18 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.bigquery.storage.v1alpha2 + python: + package_name: google.cloud.bigquery.storage_v1alpha2.gapic + go: + package_name: cloud.google.com/go/bigquery/storage/apiv1alpha2 + csharp: + package_name: Google.Cloud.Bigquery.Storage.V1alpha2 + ruby: + package_name: Google::Cloud::Bigquery::Storage::V1alpha2 + php: + package_name: Google\Cloud\Bigquery\Storage\V1alpha2 + nodejs: + package_name: storage.v1alpha2 diff --git a/google/cloud/bigquery/storage/v1alpha2/bigquerystorage_grpc_service_config.json b/google/cloud/bigquery/storage/v1alpha2/bigquerystorage_grpc_service_config.json new file mode 100644 index 000000000..8fe6c1049 --- /dev/null +++ b/google/cloud/bigquery/storage/v1alpha2/bigquerystorage_grpc_service_config.json @@ -0,0 +1,65 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.bigquery.storage.v1alpha2.BigQueryWrite", + "method": "CreateWriteStream" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.bigquery.storage.v1alpha2.BigQueryWrite", + "method": "AppendRows" + } + ], + "timeout": "86400s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.bigquery.storage.v1alpha2.BigQueryWrite", + "method": "BatchCommitWriteStreams" + }, + { + "service": "google.cloud.bigquery.storage.v1alpha2.BigQueryWrite", + "method": "FinalizeWriteStream" + }, + { + "service": "google.cloud.bigquery.storage.v1alpha2.BigQueryWrite", + "method": "GetWriteStream" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/bigquery/storage/v1alpha2/bigquerystorage_v1alpha2.yaml b/google/cloud/bigquery/storage/v1alpha2/bigquerystorage_v1alpha2.yaml new file mode 100644 index 000000000..af09ff19e --- /dev/null +++ b/google/cloud/bigquery/storage/v1alpha2/bigquerystorage_v1alpha2.yaml @@ -0,0 +1,16 @@ +type: google.api.Service +config_version: 3 +name: bigquerystorage.googleapis.com +title: BigQuery Storage API + +apis: +- name: google.cloud.bigquery.storage.v1alpha2.BigQueryWrite + +authentication: + rules: + - selector: 'google.cloud.bigquery.storage.v1alpha2.BigQueryWrite.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/bigquery.insertdata, + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/bigquery/storage/v1alpha2/protobuf.proto b/google/cloud/bigquery/storage/v1alpha2/protobuf.proto new file mode 100644 index 000000000..882adf5b4 --- /dev/null +++ b/google/cloud/bigquery/storage/v1alpha2/protobuf.proto @@ -0,0 +1,42 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1alpha2; + +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1alpha2;storage"; +option java_outer_classname = "ProtoBufProto"; +option java_package = "com.google.cloud.bigquery.storage.v1alpha2"; + +// Protobuf schema is an API presentation the proto buffer schema. +message ProtoSchema { + // Descriptor for input message. The descriptor has to be self contained, + // including all the nested types, excepted for proto buffer well known types + // (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) + // and zetasql public protos + // (https://github.com/google/zetasql/tree/master/zetasql/public/proto). + google.protobuf.DescriptorProto proto_descriptor = 1; +} + +// Protobuf rows. +message ProtoRows { + // A sequence of rows serialized as a Protocol Buffer. + // + // See https://developers.google.com/protocol-buffers/docs/overview for more + // information on deserializing this field. + repeated bytes serialized_rows = 1; +} diff --git a/google/cloud/bigquery/storage/v1alpha2/storage.proto b/google/cloud/bigquery/storage/v1alpha2/storage.proto new file mode 100644 index 000000000..e9a893b99 --- /dev/null +++ b/google/cloud/bigquery/storage/v1alpha2/storage.proto @@ -0,0 +1,256 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1alpha2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/bigquery/storage/v1alpha2/protobuf.proto"; +import "google/cloud/bigquery/storage/v1alpha2/stream.proto"; +import "google/cloud/bigquery/storage/v1alpha2/table.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1alpha2;storage"; +option java_package = "com.google.cloud.bigquery.storage.v1alpha2"; + +// Request message for `CreateWriteStream`. +message CreateWriteStreamRequest { + // Required. Reference to the table to which the stream belongs, in the format + // of `projects/{project}/datasets/{dataset}/tables/{table}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerystorage.googleapis.com/Table" + } + ]; + + // Required. Stream to be created. + WriteStream write_stream = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// BigQuery Write API. +// +// The Write API can be used to write data to BigQuery. +service BigQueryWrite { + option (google.api.default_host) = "bigquerystorage.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/bigquery," + "https://www.googleapis.com/auth/bigquery.insertdata," + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a write stream to the given table. + rpc CreateWriteStream(CreateWriteStreamRequest) returns (WriteStream) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*/datasets/*/tables/*}" + body: "write_stream" + }; + option (google.api.method_signature) = "parent,write_stream"; + } + + // Appends data to the given stream. + // + // If `offset` is specified, the `offset` is checked against the end of + // stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an + // attempt is made to append to an offset beyond the current end of the stream + // or `ALREADY_EXISTS` if user provids an `offset` that has already been + // written to. User can retry with adjusted offset within the same RPC + // stream. If `offset` is not specified, append happens at the end of the + // stream. + // + // The response contains the offset at which the append happened. Responses + // are received in the same order in which requests are sent. There will be + // one response for each successful request. If the `offset` is not set in + // response, it means append didn't happen due to some errors. If one request + // fails, all the subsequent requests will also fail until a success request + // is made again. + // + // If the stream is of `PENDING` type, data will only be available for read + // operations after the stream is committed. + rpc AppendRows(stream AppendRowsRequest) returns (stream AppendRowsResponse) { + option (google.api.http) = { + post: "/v1alpha2/{write_stream=projects/*/datasets/*/tables/*/streams/*}" + body: "*" + }; + option (google.api.method_signature) = "write_stream"; + } + + // Gets a write stream. + rpc GetWriteStream(GetWriteStreamRequest) returns (WriteStream) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/datasets/*/tables/*/streams/*}" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Finalize a write stream so that no new data can be appended to the + // stream. + rpc FinalizeWriteStream(FinalizeWriteStreamRequest) returns (FinalizeWriteStreamResponse) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/datasets/*/tables/*/streams/*}" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Atomically commits a group of `PENDING` streams that belong to the same + // `parent` table. + // Streams must be finalized before commit and cannot be committed multiple + // times. Once a stream is committed, data in the stream becomes available + // for read operations. + rpc BatchCommitWriteStreams(BatchCommitWriteStreamsRequest) returns (BatchCommitWriteStreamsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*/datasets/*/tables/*}" + }; + option (google.api.method_signature) = "parent"; + } + + // Flushes rows to a BUFFERED stream. + // If users are appending rows to BUFFERED stream, flush operation is + // required in order for the rows to become available for reading. A + // Flush operation flushes up to any previously flushed offset in a BUFFERED + // stream, to the offset specified in the request. + rpc FlushRows(FlushRowsRequest) returns (FlushRowsResponse) { + option (google.api.http) = { + post: "/v1alpha2/{write_stream=projects/*/datasets/*/tables/*/streams/*}" + body: "*" + }; + option (google.api.method_signature) = "write_stream"; + } +} + +// Request message for `AppendRows`. +message AppendRowsRequest { + message ProtoData { + // Proto schema used to serialize the data. + ProtoSchema writer_schema = 1; + + // Serialized row data in protobuf message format. + ProtoRows rows = 2; + } + + // Required. The stream that is the target of the append operation. This value must be + // specified for the initial request. If subsequent requests specify the + // stream name, it must equal to the value provided in the first request. + string write_stream = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerystorage.googleapis.com/WriteStream" + } + ]; + + // Optional. If present, the write is only performed if the next append offset is same + // as the provided value. If not present, the write is performed at the + // current end of stream. + google.protobuf.Int64Value offset = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Input rows. The `writer_schema` field must be specified at the initial + // request and currently, it will be ignored if specified in following + // requests. Following requests must have data in the same format as the + // initial request. + oneof rows { + ProtoData proto_rows = 4; + } +} + +// Response message for `AppendRows`. +message AppendRowsResponse { + oneof response { + // The row offset at which the last append occurred. + int64 offset = 1; + + // Error in case of append failure. If set, it means rows are not accepted + // into the system. Users can retry within the same connection. + google.rpc.Status error = 2; + } +} + +// Request message for `GetWriteStreamRequest`. +message GetWriteStreamRequest { + // Required. Name of the stream to get, in the form of + // `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerystorage.googleapis.com/WriteStream" + } + ]; +} + +// Request message for `BatchCommitWriteStreams`. +message BatchCommitWriteStreamsRequest { + // Required. Parent table that all the streams should belong to, in the form of + // `projects/{project}/datasets/{dataset}/tables/{table}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerystorage.googleapis.com/Table" + } + ]; + + // Required. The group of streams that will be committed atomically. + repeated string write_streams = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for `BatchCommitWriteStreams`. +message BatchCommitWriteStreamsResponse { + // The time at which streams were committed in microseconds granularity. + google.protobuf.Timestamp commit_time = 1; +} + +// Request message for invoking `FinalizeWriteStream`. +message FinalizeWriteStreamRequest { + // Required. Name of the stream to finalize, in the form of + // `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerystorage.googleapis.com/WriteStream" + } + ]; +} + +// Response message for `FinalizeWriteStream`. +message FinalizeWriteStreamResponse { + // Number of rows in the finalized stream. + int64 row_count = 1; +} + +// Request message for `FlushRows`. +message FlushRowsRequest { + // Required. The stream that is the target of the flush operation. + string write_stream = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerystorage.googleapis.com/WriteStream" + } + ]; + + // Ending offset of the flush operation. Rows before this offset(including + // this offset) will be flushed. + int64 offset = 2; +} + +// Respond message for `FlushRows`. +message FlushRowsResponse { + // The rows before this offset (including this offset) are flushed. + int64 offset = 1; +} diff --git a/google/cloud/bigquery/storage/v1alpha2/stream.proto b/google/cloud/bigquery/storage/v1alpha2/stream.proto new file mode 100644 index 000000000..0ec0ef81a --- /dev/null +++ b/google/cloud/bigquery/storage/v1alpha2/stream.proto @@ -0,0 +1,76 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1alpha2; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/bigquery/storage/v1alpha2/table.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1alpha2;storage"; +option java_package = "com.google.cloud.bigquery.storage.v1alpha2"; +option (google.api.resource_definition) = { + type: "bigquerystorage.googleapis.com/Table" + pattern: "projects/{project}/datasets/{dataset}/tables/{table}" +}; + +// Information about a single stream that gets data inside the storage system. +message WriteStream { + option (google.api.resource) = { + type: "bigquerystorage.googleapis.com/WriteStream" + pattern: "projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}" + }; + + enum Type { + // Unknown type. + TYPE_UNSPECIFIED = 0; + + // Data will commit automatically and appear as soon as the write is + // acknowledged. + COMMITTED = 1; + + // Data is invisible until the stream is committed. + PENDING = 2; + + // Data is only visible up to the offset to which it was flushed. + BUFFERED = 3; + } + + // Output only. Name of the stream, in the form + // `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + Type type = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Create time of the stream. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Commit time of the stream. + // If a stream is of `COMMITTED` type, then it will have a commit_time same as + // `create_time`. If the stream is of `PENDING` type, commit_time being empty + // means it is not committed. + google.protobuf.Timestamp commit_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The schema of the destination table. It is only returned in + // `CreateWriteStream` response. Caller should generate data that's + // compatible with this schema to send in initial `AppendRowsRequest`. + // The table schema could go out of date during the life time of the stream. + TableSchema table_schema = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Id set by client to annotate its identity. + string external_id = 6; +} diff --git a/google/cloud/bigquery/storage/v1alpha2/table.proto b/google/cloud/bigquery/storage/v1alpha2/table.proto new file mode 100644 index 000000000..d4bc01716 --- /dev/null +++ b/google/cloud/bigquery/storage/v1alpha2/table.proto @@ -0,0 +1,100 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1alpha2; + +import "google/api/field_behavior.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1alpha2;storage"; +option java_package = "com.google.cloud.bigquery.storage.v1alpha2"; + +// Schema of a table +message TableSchema { + // Describes the fields in a table. + repeated TableFieldSchema fields = 1; +} + +// A field in TableSchema +message TableFieldSchema { + enum Type { + // Illegal value + TYPE_UNSPECIFIED = 0; + + // 64K, UTF8 + STRING = 1; + + // 64-bit signed + INT64 = 2; + + // 64-bit IEEE floating point + DOUBLE = 3; + + // Aggregate type + STRUCT = 4; + + // 64K, Binary + BYTES = 5; + + // 2-valued + BOOL = 6; + + // 64-bit signed usec since UTC epoch + TIMESTAMP = 7; + + // Civil date - Year, Month, Day + DATE = 8; + + // Civil time - Hour, Minute, Second, Microseconds + TIME = 9; + + // Combination of civil date and civil time + DATETIME = 10; + + // Geography object (go/googlesql_geography) + GEOGRAPHY = 11; + + // Numeric value (go/googlesql_numeric) + NUMERIC = 12; + } + + enum Mode { + // Illegal value + MODE_UNSPECIFIED = 0; + + NULLABLE = 1; + + REQUIRED = 2; + + REPEATED = 3; + } + + // Required. The field name. The name must contain only letters (a-z, A-Z), + // numbers (0-9), or underscores (_), and must start with a letter or + // underscore. The maximum length is 128 characters. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The field data type. + Type type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The field mode. The default value is NULLABLE. + Mode mode = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes the nested schema fields if the type property is set to STRUCT. + repeated TableFieldSchema fields = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The field description. The maximum length is 1,024 characters. + string description = 6 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/google/cloud/bigquery/storage/v1beta1/BUILD.bazel b/google/cloud/bigquery/storage/v1beta1/BUILD.bazel index 1772fa579..bd8a003b0 100644 --- a/google/cloud/bigquery/storage/v1beta1/BUILD.bazel +++ b/google/cloud/bigquery/storage/v1beta1/BUILD.bazel @@ -1,14 +1,18 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "bigquerystorage_proto", + name = "storage_proto", srcs = [ + "arrow.proto", "avro.proto", "read_options.proto", "storage.proto", @@ -16,6 +20,8 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/api:resource_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:timestamp_proto", @@ -23,8 +29,11 @@ proto_library( ) proto_library_with_info( - name = "bigquerystorage_proto_with_info", - deps = [":bigquerystorage_proto"], + name = "storage_proto_with_info", + deps = [ + ":storage_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -32,71 +41,55 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( - name = "bigquerystorage_java_proto", - deps = [":bigquerystorage_proto"], + name = "storage_java_proto", + deps = [":storage_proto"], ) java_grpc_library( - name = "bigquerystorage_java_grpc", - srcs = [":bigquerystorage_proto"], - deps = [":bigquerystorage_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "bigquerystorage_resource_name_java_proto", - gapic_yaml = "bigquerystorage_gapic.yaml", - deps = [":bigquerystorage_proto"], + name = "storage_java_grpc", + srcs = [":storage_proto"], + deps = [":storage_java_proto"], ) java_gapic_library( - name = "bigquerystorage_java_gapic", - src = ":bigquerystorage_proto_with_info", + name = "storage_java_gapic", + src = ":storage_proto_with_info", gapic_yaml = "bigquerystorage_gapic.yaml", - service_yaml = "//google/cloud/bigquery/storage:storage_v1beta1.yaml", - test_deps = [":bigquerystorage_java_grpc"], + package = "google.cloud.bigquery.storage.v1beta1", + service_yaml = "bigquerystorage_v1beta1.yaml", + test_deps = [ + ":storage_java_grpc", + ], deps = [ - ":bigquerystorage_java_proto", - ":bigquerystorage_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ":storage_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":bigquerystorage_java_gapic_test", +java_gapic_test( + name = "storage_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.bigquery.storage.v1beta1.BaseBigQueryStorageClientTest", ], -) for test_name in [ - "com.google.cloud.bigquery.storage.v1beta1.BaseBigQueryStorageClientTest", -]] + runtime_deps = [":storage_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-bigquerystorage-v1-java", - client_deps = [":bigquerystorage_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":bigquerystorage_java_gapic_test"], - grpc_deps = [":bigquerystorage_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":bigquerystorage_java_proto", - ":bigquerystorage_proto", - ":bigquerystorage_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + name = "google-cloud-bigquery-storage-v1beta1-java", + deps = [ + ":storage_java_gapic", + ":storage_java_grpc", + ":storage_java_proto", + ":storage_proto", + ], ) ############################################################################## @@ -104,45 +97,286 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "bigquerystorage_go_proto", + name = "storage_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1", - protos = [":bigquerystorage_proto"], + protos = [":storage_proto"], deps = [ "//google/api:annotations_go_proto", ], ) go_gapic_library( - name = "bigquerystorage_go_gapic", - src = ":bigquerystorage_proto_with_info", - gapic_yaml = "bigquerystorage_gapic.yaml", - importpath = "cloud.google.com/go/bigquery/datatransfer/apiv1", - service_yaml = "//google/cloud/bigquery/storage:storage_v1beta1.yaml", - deps = [":bigquerystorage_go_proto"], + name = "storage_go_gapic", + srcs = [":storage_proto_with_info"], + grpc_service_config = "bigquerystorage_grpc_service_config.json", + importpath = "cloud.google.com/go/bigquery/storage/apiv1beta1;storage", + service_yaml = "bigquerystorage_v1beta1.yaml", + deps = [ + ":storage_go_proto", + ], ) go_test( - name = "bigquerystorage_go_gapic_test", - srcs = [":bigquerystorage_go_gapic_srcjar_test"], - embed = [":bigquerystorage_go_gapic"], + name = "storage_go_gapic_test", + srcs = [":storage_go_gapic_srcjar_test"], + embed = [":storage_go_gapic"], importpath = "cloud.google.com/go/bigquery/storage/apiv1beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-bigquerystorage-v1-go", + name = "gapi-cloud-bigquery-storage-v1beta1-go", + deps = [ + ":storage_go_gapic", + ":storage_go_gapic_srcjar-test.srcjar", + ":storage_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "storage_moved_proto", + srcs = [":storage_proto"], deps = [ - ":bigquerystorage_go_gapic", - ":bigquerystorage_go_gapic_srcjar-smoke-test.srcjar", - ":bigquerystorage_go_gapic_srcjar-test.srcjar", - ":bigquerystorage_go_proto", + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "storage_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":storage_moved_proto"], +) + +py_grpc_library( + name = "storage_py_grpc", + srcs = [":storage_moved_proto"], + deps = [":storage_py_proto"], +) + +py_gapic_library( + name = "storage_py_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1beta1", + service_yaml = "bigquerystorage_v1beta1.yaml", + deps = [ + ":storage_py_grpc", + ":storage_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "bigquery-storage-v1beta1-py", + deps = [ + ":storage_py_gapic", + ":storage_py_grpc", + ":storage_py_proto", ], ) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "storage_php_proto", + deps = [":storage_proto"], +) + +php_grpc_library( + name = "storage_php_grpc", + srcs = [":storage_proto"], + deps = [":storage_php_proto"], +) + +php_gapic_library( + name = "storage_php_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1beta1", + service_yaml = "bigquerystorage_v1beta1.yaml", + deps = [ + ":storage_php_grpc", + ":storage_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-bigquery-storage-v1beta1-php", + deps = [ + ":storage_php_gapic", + ":storage_php_grpc", + ":storage_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "storage_nodejs_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1beta1", + service_yaml = "bigquerystorage_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "bigquery-storage-v1beta1-nodejs", + deps = [ + ":storage_nodejs_gapic", + ":storage_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "storage_ruby_proto", + deps = [":storage_proto"], +) + +ruby_grpc_library( + name = "storage_ruby_grpc", + srcs = [":storage_proto"], + deps = [":storage_ruby_proto"], +) + +ruby_gapic_library( + name = "storage_ruby_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1beta1", + service_yaml = "bigquerystorage_v1beta1.yaml", + deps = [ + ":storage_ruby_grpc", + ":storage_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-bigquery-storage-v1beta1-ruby", + deps = [ + ":storage_ruby_gapic", + ":storage_ruby_grpc", + ":storage_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "storage_csharp_proto", + deps = [":storage_proto"], +) + +csharp_grpc_library( + name = "storage_csharp_grpc", + srcs = [":storage_proto"], + deps = [":storage_csharp_proto"], +) + +csharp_gapic_library( + name = "storage_csharp_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1beta1", + service_yaml = "bigquerystorage_v1beta1.yaml", + deps = [ + ":storage_csharp_grpc", + ":storage_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-bigquery-storage-v1beta1-csharp", + deps = [ + ":storage_csharp_gapic", + ":storage_csharp_grpc", + ":storage_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "storage_cc_proto", + deps = [":storage_proto"], +) + +cc_grpc_library( + name = "storage_cc_grpc", + srcs = [":storage_proto"], + generate_mocks = True, + grpc_only = True, + deps = [":storage_cc_proto"], +) + diff --git a/google/cloud/bigquery/storage/v1beta1/arrow.proto b/google/cloud/bigquery/storage/v1beta1/arrow.proto index 3003de444..f70c61c72 100644 --- a/google/cloud/bigquery/storage/v1beta1/arrow.proto +++ b/google/cloud/bigquery/storage/v1beta1/arrow.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/cloud/bigquery/storage/v1beta1/avro.proto b/google/cloud/bigquery/storage/v1beta1/avro.proto index 021d8e44f..7d034a28a 100644 --- a/google/cloud/bigquery/storage/v1beta1/avro.proto +++ b/google/cloud/bigquery/storage/v1beta1/avro.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/cloud/bigquery/storage/v1beta1/bigquerystorage_gapic.yaml b/google/cloud/bigquery/storage/v1beta1/bigquerystorage_gapic.yaml index 3843dbc4f..964d2c70c 100644 --- a/google/cloud/bigquery/storage/v1beta1/bigquerystorage_gapic.yaml +++ b/google/cloud/bigquery/storage/v1beta1/bigquerystorage_gapic.yaml @@ -20,7 +20,7 @@ language_settings: package_name: storage.v1beta1 # A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. +# The fully qualified name of the API interface. - name: google.cloud.bigquery.storage.v1beta1.BigQueryStorage # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. diff --git a/google/cloud/bigquery/storage/v1beta1/bigquerystorage_grpc_service_config.json b/google/cloud/bigquery/storage/v1beta1/bigquerystorage_grpc_service_config.json new file mode 100644 index 000000000..4450be8c2 --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta1/bigquerystorage_grpc_service_config.json @@ -0,0 +1,65 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.bigquery.storage.v1beta1.BigQueryStorage", + "method": "CreateReadSession" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.bigquery.storage.v1beta1.BigQueryStorage", + "method": "ReadRows" + } + ], + "timeout": "86400s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.bigquery.storage.v1beta1.BigQueryStorage", + "method": "BatchCreateReadSessionStreams" + }, + { + "service": "google.cloud.bigquery.storage.v1beta1.BigQueryStorage", + "method": "FinalizeStream" + }, + { + "service": "google.cloud.bigquery.storage.v1beta1.BigQueryStorage", + "method": "SplitReadStream" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/bigquery/storage/storage_v1beta1.yaml b/google/cloud/bigquery/storage/v1beta1/bigquerystorage_v1beta1.yaml similarity index 60% rename from google/cloud/bigquery/storage/storage_v1beta1.yaml rename to google/cloud/bigquery/storage/v1beta1/bigquerystorage_v1beta1.yaml index bcb700d62..74689be3f 100644 --- a/google/cloud/bigquery/storage/storage_v1beta1.yaml +++ b/google/cloud/bigquery/storage/v1beta1/bigquerystorage_v1beta1.yaml @@ -6,10 +6,18 @@ title: BigQuery Storage API apis: - name: google.cloud.bigquery.storage.v1beta1.BigQueryStorage +backend: + rules: + - selector: 'google.cloud.bigquery.storage.v1beta1.BigQueryStorage.*' + deadline: 120.0 + - selector: google.cloud.bigquery.storage.v1beta1.BigQueryStorage.ReadRows + deadline: 21600.0 + authentication: rules: - selector: 'google.cloud.bigquery.storage.v1beta1.BigQueryStorage.*' oauth: canonical_scopes: |- https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/bigquery.readonly, https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/bigquery/storage/v1beta1/read_options.proto b/google/cloud/bigquery/storage/v1beta1/read_options.proto index 9591deba7..1ff8d8b5e 100644 --- a/google/cloud/bigquery/storage/v1beta1/read_options.proto +++ b/google/cloud/bigquery/storage/v1beta1/read_options.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -29,8 +28,7 @@ message TableReadOptions { repeated string selected_fields = 1; // Optional. SQL text filtering statement, similar to a WHERE clause in - // a query. Currently, only a single predicate that is a comparison between - // a column and a constant value is supported. Aggregates are not supported. + // a query. Aggregates are not supported. // // Examples: "int_field > 5" // "date_field = CAST('2014-9-27' as DATE)" diff --git a/google/cloud/bigquery/storage/v1beta1/storage.proto b/google/cloud/bigquery/storage/v1beta1/storage.proto index fa2de616d..81e77c73a 100644 --- a/google/cloud/bigquery/storage/v1beta1/storage.proto +++ b/google/cloud/bigquery/storage/v1beta1/storage.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,20 +11,21 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.bigquery.storage.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/bigquery/storage/v1beta1/arrow.proto"; import "google/cloud/bigquery/storage/v1beta1/avro.proto"; import "google/cloud/bigquery/storage/v1beta1/read_options.proto"; import "google/cloud/bigquery/storage/v1beta1/table_reference.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/client.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage"; option java_package = "com.google.cloud.bigquery.storage.v1beta1"; @@ -36,6 +37,7 @@ service BigQueryStorage { option (google.api.default_host) = "bigquerystorage.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/bigquery," + "https://www.googleapis.com/auth/bigquery.readonly," "https://www.googleapis.com/auth/cloud-platform"; // Creates a new read session. A read session divides the contents of a @@ -59,6 +61,7 @@ service BigQueryStorage { body: "*" } }; + option (google.api.method_signature) = "table_reference,parent,requested_streams"; } // Reads rows from the table in the format prescribed by the read session. @@ -74,6 +77,7 @@ service BigQueryStorage { option (google.api.http) = { get: "/v1beta1/{read_position.stream.name=projects/*/streams/*}" }; + option (google.api.method_signature) = "read_position"; } // Creates additional streams for a ReadSession. This API can be used to @@ -84,6 +88,7 @@ service BigQueryStorage { post: "/v1beta1/{session.name=projects/*/sessions/*}" body: "*" }; + option (google.api.method_signature) = "session,requested_streams"; } // Triggers the graceful termination of a single stream in a ReadSession. This @@ -105,6 +110,7 @@ service BigQueryStorage { post: "/v1beta1/{stream.name=projects/*/streams/*}" body: "*" }; + option (google.api.method_signature) = "stream"; } // Splits a given read stream into two Streams. These streams are referred to @@ -124,11 +130,17 @@ service BigQueryStorage { option (google.api.http) = { get: "/v1beta1/{original_stream.name=projects/*/streams/*}" }; + option (google.api.method_signature) = "original_stream"; } } // Information about a single data stream within a read session. message Stream { + option (google.api.resource) = { + type: "bigquerystorage.googleapis.com/Stream" + pattern: "projects/{project}/locations/{location}/streams/{stream}" + }; + // Name of the stream, in the form // `projects/{project_id}/locations/{location}/streams/{stream_id}`. string name = 1; @@ -145,6 +157,11 @@ message StreamPosition { // Information returned from a `CreateReadSession` request. message ReadSession { + option (google.api.resource) = { + type: "bigquerystorage.googleapis.com/ReadSession" + pattern: "projects/{project}/locations/{location}/sessions/{session}" + }; + // Unique identifier for the session, in the form // `projects/{project_id}/locations/{location}/sessions/{session_id}`. string name = 1; @@ -181,17 +198,22 @@ message ReadSession { // requested parallelism, projection filters and constraints. message CreateReadSessionRequest { // Required. Reference to the table to read. - TableReference table_reference = 1; + TableReference table_reference = 1 [(google.api.field_behavior) = REQUIRED]; // Required. String of the form `projects/{project_id}` indicating the // project this ReadSession is associated with. This is the project that will // be billed for usage. - string parent = 6; - - // Optional. Any modifiers to the Table (e.g. snapshot timestamp). + string parent = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Any modifiers to the Table (e.g. snapshot timestamp). TableModifiers table_modifiers = 2; - // Optional. Initial number of streams. If unset or 0, we will + // Initial number of streams. If unset or 0, we will // provide a value of streams so as to produce reasonable throughput. Must be // non-negative. The number of streams may be lower than the requested number, // depending on the amount parallelism that is reasonable for the table and @@ -200,7 +222,7 @@ message CreateReadSessionRequest { // Streams must be read starting from offset 0. int32 requested_streams = 3; - // Optional. Read options for this session (e.g. column selection, filters). + // Read options for this session (e.g. column selection, filters). TableReadOptions read_options = 4; // Data output format. Currently default to Avro. @@ -248,7 +270,7 @@ message ReadRowsRequest { // Required. Identifier of the position in the stream to start reading from. // The offset requested must be less than the last row read from ReadRows. // Requesting a larger offset is undefined. - StreamPosition read_position = 1; + StreamPosition read_position = 1 [(google.api.field_behavior) = REQUIRED]; } // Progress information for a given Stream. @@ -267,6 +289,9 @@ message StreamStatus { // sharding strategy. float fraction_consumed = 2; + // Represents the progress of the current stream. + Progress progress = 4; + // Whether this stream can be split. For sessions that use the LIQUID sharding // strategy, this value is always false. For BALANCED sessions, this value is // false when enough data have been read such that no more splits are possible @@ -275,6 +300,25 @@ message StreamStatus { bool is_splittable = 3; } +message Progress { + // The fraction of rows assigned to the stream that have been processed by the + // server so far, not including the rows in the current response message. + // + // This value, along with `at_response_end`, can be used to interpolate the + // progress made as the rows in the message are being processed using the + // following formula: `at_response_start + (at_response_end - + // at_response_start) * rows_processed_from_response / rows_in_response`. + // + // Note that if a filter is provided, the `at_response_end` value of the + // previous response may not necessarily be equal to the `at_response_start` + // value of the current response. + float at_response_start = 1; + + // Similar to `at_response_start`, except that this value includes the rows in + // the current response. + float at_response_end = 2; +} + // Information on if the current connection is being throttled. message ThrottleStatus { // How much this connection is being throttled. @@ -313,12 +357,12 @@ message ReadRowsResponse { message BatchCreateReadSessionStreamsRequest { // Required. Must be a non-expired session obtained from a call to // CreateReadSession. Only the name field needs to be set. - ReadSession session = 1; + ReadSession session = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Number of new streams requested. Must be positive. // Number of added streams may be less than this, see CreateReadSessionRequest // for more information. - int32 requested_streams = 2; + int32 requested_streams = 2 [(google.api.field_behavior) = REQUIRED]; } // The response from `BatchCreateReadSessionStreams` returns the stream @@ -330,14 +374,14 @@ message BatchCreateReadSessionStreamsResponse { // Request information for invoking `FinalizeStream`. message FinalizeStreamRequest { - // Stream to finalize. - Stream stream = 2; + // Required. Stream to finalize. + Stream stream = 2 [(google.api.field_behavior) = REQUIRED]; } // Request information for `SplitReadStream`. message SplitReadStreamRequest { - // Stream to split. - Stream original_stream = 1; + // Required. Stream to split. + Stream original_stream = 1 [(google.api.field_behavior) = REQUIRED]; // A value in the range (0.0, 1.0) that specifies the fractional point at // which the original stream should be split. The actual split point is diff --git a/google/cloud/bigquery/storage/v1beta1/table_reference.proto b/google/cloud/bigquery/storage/v1beta1/table_reference.proto index fb74bbf6c..4269392f6 100644 --- a/google/cloud/bigquery/storage/v1beta1/table_reference.proto +++ b/google/cloud/bigquery/storage/v1beta1/table_reference.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.bigquery.storage.v1beta1; +import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage"; diff --git a/google/cloud/bigquery/storage/v1beta2/BUILD.bazel b/google/cloud/bigquery/storage/v1beta2/BUILD.bazel new file mode 100644 index 000000000..d2e1ec642 --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta2/BUILD.bazel @@ -0,0 +1,377 @@ +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "storage_proto", + srcs = [ + "arrow.proto", + "avro.proto", + "storage.proto", + "stream.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "storage_proto_with_info", + deps = [ + ":storage_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "storage_java_proto", + deps = [":storage_proto"], +) + +java_grpc_library( + name = "storage_java_grpc", + srcs = [":storage_proto"], + deps = [":storage_java_proto"], +) + +java_gapic_library( + name = "storage_java_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1beta2", + service_yaml = "bigquerystorage_v1beta2.yaml", + test_deps = [ + ":storage_java_grpc", + ], + deps = [ + ":storage_java_proto", + ], +) + +java_gapic_test( + name = "storage_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.bigquery.storage.v1beta2.BaseBigQueryReadClientTest", + ], + runtime_deps = [":storage_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-bigquery-storage-v1beta2-java", + deps = [ + ":storage_java_gapic", + ":storage_java_grpc", + ":storage_java_proto", + ":storage_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "storage_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta2", + protos = [":storage_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "storage_go_gapic", + srcs = [":storage_proto_with_info"], + grpc_service_config = "bigquerystorage_grpc_service_config.json", + importpath = "cloud.google.com/go/bigquery/storage/apiv1beta2;storage", + service_yaml = "bigquerystorage_v1beta2.yaml", + deps = [ + ":storage_go_proto", + ], +) + +go_test( + name = "storage_go_gapic_test", + srcs = [":storage_go_gapic_srcjar_test"], + embed = [":storage_go_gapic"], + importpath = "cloud.google.com/go/bigquery/storage/apiv1beta2", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-bigquery-storage-v1beta2-go", + deps = [ + ":storage_go_gapic", + ":storage_go_gapic_srcjar-test.srcjar", + ":storage_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "storage_moved_proto", + srcs = [":storage_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "storage_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":storage_moved_proto"], +) + +py_grpc_library( + name = "storage_py_grpc", + srcs = [":storage_moved_proto"], + deps = [":storage_py_proto"], +) + +py_gapic_library( + name = "storage_py_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1beta2", + service_yaml = "bigquerystorage_v1beta2.yaml", + deps = [ + ":storage_py_grpc", + ":storage_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "bigquery-storage-v1beta2-py", + deps = [ + ":storage_py_gapic", + ":storage_py_grpc", + ":storage_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "storage_php_proto", + deps = [":storage_proto"], +) + +php_grpc_library( + name = "storage_php_grpc", + srcs = [":storage_proto"], + deps = [":storage_php_proto"], +) + +php_gapic_library( + name = "storage_php_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1beta2", + service_yaml = "bigquerystorage_v1beta2.yaml", + deps = [ + ":storage_php_grpc", + ":storage_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-bigquery-storage-v1beta2-php", + deps = [ + ":storage_php_gapic", + ":storage_php_grpc", + ":storage_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "storage_nodejs_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1beta2", + service_yaml = "bigquerystorage_v1beta2.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "bigquery-storage-v1beta2-nodejs", + deps = [ + ":storage_nodejs_gapic", + ":storage_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "storage_ruby_proto", + deps = [":storage_proto"], +) + +ruby_grpc_library( + name = "storage_ruby_grpc", + srcs = [":storage_proto"], + deps = [":storage_ruby_proto"], +) + +ruby_gapic_library( + name = "storage_ruby_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1beta2", + service_yaml = "bigquerystorage_v1beta2.yaml", + deps = [ + ":storage_ruby_grpc", + ":storage_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-bigquery-storage-v1beta2-ruby", + deps = [ + ":storage_ruby_gapic", + ":storage_ruby_grpc", + ":storage_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "storage_csharp_proto", + deps = [":storage_proto"], +) + +csharp_grpc_library( + name = "storage_csharp_grpc", + srcs = [":storage_proto"], + deps = [":storage_csharp_proto"], +) + +csharp_gapic_library( + name = "storage_csharp_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + package = "google.cloud.bigquery.storage.v1beta2", + service_yaml = "bigquerystorage_v1beta2.yaml", + deps = [ + ":storage_csharp_grpc", + ":storage_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-bigquery-storage-v1beta2-csharp", + deps = [ + ":storage_csharp_gapic", + ":storage_csharp_grpc", + ":storage_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "storage_cc_proto", + deps = [":storage_proto"], +) + +cc_grpc_library( + name = "storage_cc_grpc", + srcs = [":storage_proto"], + generate_mocks = True, + grpc_only = True, + deps = [":storage_cc_proto"], +) diff --git a/google/cloud/bigquery/storage/v1beta2/arrow.proto b/google/cloud/bigquery/storage/v1beta2/arrow.proto new file mode 100644 index 000000000..74733db96 --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta2/arrow.proto @@ -0,0 +1,58 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1beta2; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta2;storage"; +option java_multiple_files = true; +option java_outer_classname = "ArrowProto"; +option java_package = "com.google.cloud.bigquery.storage.v1beta2"; + +// Arrow schema as specified in +// https://arrow.apache.org/docs/python/api/datatypes.html +// and serialized to bytes using IPC: +// https://arrow.apache.org/docs/format/Columnar.html#serialization-and-interprocess-communication-ipc +// +// See code samples on how this message can be deserialized. +message ArrowSchema { + // IPC serialized Arrow schema. + bytes serialized_schema = 1; +} + +// Arrow RecordBatch. +message ArrowRecordBatch { + // IPC-serialized Arrow RecordBatch. + bytes serialized_record_batch = 1; +} + +// Contains options specific to Arrow Serialization. +message ArrowSerializationOptions { + // The IPC format to use when serializing Arrow streams. + enum Format { + // If unspecied the IPC format as of 0.15 release will be used. + FORMAT_UNSPECIFIED = 0; + + // Use the legacy IPC message format as of Apache Arrow Release 0.14. + ARROW_0_14 = 1; + + // Use the message format as of Apache Arrow Release 0.15. + ARROW_0_15 = 2; + } + + // The Arrow IPC format to use. + Format format = 1; +} diff --git a/google/cloud/bigquery/storage/v1beta2/avro.proto b/google/cloud/bigquery/storage/v1beta2/avro.proto new file mode 100644 index 000000000..371946906 --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta2/avro.proto @@ -0,0 +1,36 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1beta2; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta2;storage"; +option java_multiple_files = true; +option java_outer_classname = "AvroProto"; +option java_package = "com.google.cloud.bigquery.storage.v1beta2"; + +// Avro schema. +message AvroSchema { + // Json serialized schema, as described at + // https://avro.apache.org/docs/1.8.1/spec.html. + string schema = 1; +} + +// Avro rows. +message AvroRows { + // Binary serialized rows in a block. + bytes serialized_binary_rows = 1; +} diff --git a/google/cloud/bigquery/storage/v1beta2/bigquerystorage_gapic.legacy.yaml b/google/cloud/bigquery/storage/v1beta2/bigquerystorage_gapic.legacy.yaml new file mode 100644 index 000000000..fef14b57d --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta2/bigquerystorage_gapic.legacy.yaml @@ -0,0 +1,84 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.bigquery.storage.v1beta2 + interface_names: + google.cloud.bigquery.storage.v1beta2.BigQueryRead: BaseBigQueryRead + python: + package_name: google.cloud.bigquery_storage_v1beta2.gapic + go: + package_name: cloud.google.com/go/bigquery/storage/apiv1beta2 + csharp: + package_name: Google.Cloud.Bigquery.Storage.V1beta2 + ruby: + package_name: Google::Cloud::Bigquery::Storage::V1beta2 + php: + package_name: Google\Cloud\Bigquery\Storage\V1beta2 + nodejs: + package_name: storage.v1beta2 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.bigquery.storage.v1beta2.BigQueryRead + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: unary_streaming + retry_codes: + - UNAVAILABLE + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + - name: create_read_session + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 120000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 120000 + total_timeout_millis: 600000 + - name: read_rows + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 86400000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 86400000 + total_timeout_millis: 86400000 + methods: + - name: CreateReadSession + flattening: + groups: + - parameters: + - parent + - read_session + - max_stream_count + retry_codes_name: idempotent + retry_params_name: create_read_session + timeout_millis: 60000 + - name: ReadRows + flattening: + groups: + - parameters: + - read_stream + - offset + retry_codes_name: unary_streaming + retry_params_name: read_rows + timeout_millis: 86400000 + - name: SplitReadStream + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/cloud/bigquery/storage/v1beta2/bigquerystorage_gapic.yaml b/google/cloud/bigquery/storage/v1beta2/bigquerystorage_gapic.yaml new file mode 100644 index 000000000..f3b83cd1b --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta2/bigquerystorage_gapic.yaml @@ -0,0 +1,70 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.bigquery.storage.v1beta2 + interface_names: + google.cloud.bigquery.storage.v1beta2.BigQueryRead: BaseBigQueryRead + python: + package_name: google.cloud.bigquery_storage_v1beta2.gapic + go: + package_name: cloud.google.com/go/bigquery/storage/apiv1beta2 + csharp: + package_name: Google.Cloud.Bigquery.Storage.V1beta2 + ruby: + package_name: Google::Cloud::Bigquery::Storage::V1beta2 + php: + package_name: Google\Cloud\Bigquery\Storage\V1beta2 + nodejs: + package_name: storage.v1beta2 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.bigquery.storage.v1beta2.BigQueryRead + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: unary_streaming + retry_codes: + - UNAVAILABLE + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + - name: create_read_session + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 120000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 120000 + total_timeout_millis: 600000 + - name: read_rows + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 86400000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 86400000 + total_timeout_millis: 86400000 + methods: + - name: CreateReadSession + retry_codes_name: idempotent + retry_params_name: create_read_session + - name: ReadRows + retry_codes_name: unary_streaming + retry_params_name: read_rows + timeout_millis: 86400000 + - name: SplitReadStream + retry_codes_name: idempotent + retry_params_name: default diff --git a/google/cloud/bigquery/storage/v1beta2/bigquerystorage_grpc_service_config.json b/google/cloud/bigquery/storage/v1beta2/bigquerystorage_grpc_service_config.json new file mode 100644 index 000000000..270f5f937 --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta2/bigquerystorage_grpc_service_config.json @@ -0,0 +1,57 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.bigquery.storage.v1beta2.BigQueryRead", + "method": "CreateReadSession" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.bigquery.storage.v1beta2.BigQueryRead", + "method": "ReadRows" + } + ], + "timeout": "86400s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.bigquery.storage.v1beta2.BigQueryRead", + "method": "SplitReadStream" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/bigquery/storage/v1beta2/bigquerystorage_v1beta2.yaml b/google/cloud/bigquery/storage/v1beta2/bigquerystorage_v1beta2.yaml new file mode 100644 index 000000000..16230fadd --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta2/bigquerystorage_v1beta2.yaml @@ -0,0 +1,25 @@ +type: google.api.Service +config_version: 3 +name: bigquerystorage.googleapis.com +title: BigQuery Storage API + +apis: +- name: google.cloud.bigquery.storage.v1beta2.BigQueryRead + +backend: + rules: + - selector: google.cloud.bigquery.storage.v1beta2.BigQueryRead.CreateReadSession + deadline: 120.0 + - selector: google.cloud.bigquery.storage.v1beta2.BigQueryRead.ReadRows + deadline: 21600.0 + - selector: google.cloud.bigquery.storage.v1beta2.BigQueryRead.SplitReadStream + deadline: 120.0 + +authentication: + rules: + - selector: 'google.cloud.bigquery.storage.v1beta2.BigQueryRead.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/bigquery.readonly, + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/bigquery/storage/v1beta2/storage.proto b/google/cloud/bigquery/storage/v1beta2/storage.proto new file mode 100644 index 000000000..373c83525 --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta2/storage.proto @@ -0,0 +1,230 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1beta2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/bigquery/storage/v1beta2/arrow.proto"; +import "google/cloud/bigquery/storage/v1beta2/avro.proto"; +import "google/cloud/bigquery/storage/v1beta2/stream.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta2;storage"; +option java_multiple_files = true; +option java_outer_classname = "StorageProto"; +option java_package = "com.google.cloud.bigquery.storage.v1beta2"; + +// BigQuery Read API. +// +// The Read API can be used to read data from BigQuery. +service BigQueryRead { + option (google.api.default_host) = "bigquerystorage.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/bigquery," + "https://www.googleapis.com/auth/bigquery.readonly," + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new read session. A read session divides the contents of a + // BigQuery table into one or more streams, which can then be used to read + // data from the table. The read session also specifies properties of the + // data to be read, such as a list of columns or a push-down filter describing + // the rows to be returned. + // + // A particular row can be read by at most one stream. When the caller has + // reached the end of each stream in the session, then all the data in the + // table has been read. + // + // Data is assigned to each stream such that roughly the same number of + // rows can be read from each stream. Because the server-side unit for + // assigning data is collections of rows, the API does not guarantee that + // each stream will return the same number or rows. Additionally, the + // limits are enforced based on the number of pre-filtered rows, so some + // filters can lead to lopsided assignments. + // + // Read sessions automatically expire 24 hours after they are created and do + // not require manual clean-up by the caller. + rpc CreateReadSession(CreateReadSessionRequest) returns (ReadSession) { + option (google.api.http) = { + post: "/v1beta2/{read_session.table=projects/*/datasets/*/tables/*}" + body: "*" + }; + option (google.api.method_signature) = "parent,read_session,max_stream_count"; + } + + // Reads rows from the stream in the format prescribed by the ReadSession. + // Each response contains one or more table rows, up to a maximum of 100 MiB + // per response; read requests which attempt to read individual rows larger + // than 100 MiB will fail. + // + // Each request also returns a set of stream statistics reflecting the current + // state of the stream. + rpc ReadRows(ReadRowsRequest) returns (stream ReadRowsResponse) { + option (google.api.http) = { + get: "/v1beta2/{read_stream=projects/*/locations/*/sessions/*/streams/*}" + }; + option (google.api.method_signature) = "read_stream,offset"; + } + + // Splits a given `ReadStream` into two `ReadStream` objects. These + // `ReadStream` objects are referred to as the primary and the residual + // streams of the split. The original `ReadStream` can still be read from in + // the same manner as before. Both of the returned `ReadStream` objects can + // also be read from, and the rows returned by both child streams will be + // the same as the rows read from the original stream. + // + // Moreover, the two child streams will be allocated back-to-back in the + // original `ReadStream`. Concretely, it is guaranteed that for streams + // original, primary, and residual, that original[0-j] = primary[0-j] and + // original[j-n] = residual[0-m] once the streams have been read to + // completion. + rpc SplitReadStream(SplitReadStreamRequest) returns (SplitReadStreamResponse) { + option (google.api.http) = { + get: "/v1beta2/{name=projects/*/locations/*/sessions/*/streams/*}" + }; + } +} + +// Request message for `CreateReadSession`. +message CreateReadSessionRequest { + // Required. The request project that owns the session, in the form of + // `projects/{project_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. Session to be created. + ReadSession read_session = 2 [(google.api.field_behavior) = REQUIRED]; + + // Max initial number of streams. If unset or zero, the server will + // provide a value of streams so as to produce reasonable throughput. Must be + // non-negative. The number of streams may be lower than the requested number, + // depending on the amount parallelism that is reasonable for the table. Error + // will be returned if the max count is greater than the current system + // max limit of 1,000. + // + // Streams must be read starting from offset 0. + int32 max_stream_count = 3; +} + +// Request message for `ReadRows`. +message ReadRowsRequest { + // Required. Stream to read rows from. + string read_stream = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerystorage.googleapis.com/ReadStream" + } + ]; + + // The offset requested must be less than the last row read from Read. + // Requesting a larger offset is undefined. If not specified, start reading + // from offset zero. + int64 offset = 2; +} + +// Information on if the current connection is being throttled. +message ThrottleState { + // How much this connection is being throttled. Zero means no throttling, + // 100 means fully throttled. + int32 throttle_percent = 1; +} + +// Estimated stream statistics for a given Stream. +message StreamStats { + message Progress { + // The fraction of rows assigned to the stream that have been processed by + // the server so far, not including the rows in the current response + // message. + // + // This value, along with `at_response_end`, can be used to interpolate + // the progress made as the rows in the message are being processed using + // the following formula: `at_response_start + (at_response_end - + // at_response_start) * rows_processed_from_response / rows_in_response`. + // + // Note that if a filter is provided, the `at_response_end` value of the + // previous response may not necessarily be equal to the + // `at_response_start` value of the current response. + double at_response_start = 1; + + // Similar to `at_response_start`, except that this value includes the + // rows in the current response. + double at_response_end = 2; + } + + // Represents the progress of the current stream. + Progress progress = 2; +} + +// Response from calling `ReadRows` may include row data, progress and +// throttling information. +message ReadRowsResponse { + // Row data is returned in format specified during session creation. + oneof rows { + // Serialized row data in AVRO format. + AvroRows avro_rows = 3; + + // Serialized row data in Arrow RecordBatch format. + ArrowRecordBatch arrow_record_batch = 4; + } + + // Number of serialized rows in the rows block. + int64 row_count = 6; + + // Statistics for the stream. + StreamStats stats = 2; + + // Throttling state. If unset, the latest response still describes + // the current throttling status. + ThrottleState throttle_state = 5; +} + +// Request message for `SplitReadStream`. +message SplitReadStreamRequest { + // Required. Name of the stream to split. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerystorage.googleapis.com/ReadStream" + } + ]; + + // A value in the range (0.0, 1.0) that specifies the fractional point at + // which the original stream should be split. The actual split point is + // evaluated on pre-filtered rows, so if a filter is provided, then there is + // no guarantee that the division of the rows between the new child streams + // will be proportional to this fractional value. Additionally, because the + // server-side unit for assigning data is collections of rows, this fraction + // will always map to a data storage boundary on the server side. + double fraction = 2; +} + +// Response message for `SplitReadStream`. +message SplitReadStreamResponse { + // Primary stream, which contains the beginning portion of + // |original_stream|. An empty value indicates that the original stream can no + // longer be split. + ReadStream primary_stream = 1; + + // Remainder stream, which contains the tail of |original_stream|. An empty + // value indicates that the original stream can no longer be split. + ReadStream remainder_stream = 2; +} diff --git a/google/cloud/bigquery/storage/v1beta2/stream.proto b/google/cloud/bigquery/storage/v1beta2/stream.proto new file mode 100644 index 000000000..38d5de478 --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta2/stream.proto @@ -0,0 +1,142 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1beta2; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/bigquery/storage/v1beta2/arrow.proto"; +import "google/cloud/bigquery/storage/v1beta2/avro.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta2;storage"; +option java_multiple_files = true; +option java_outer_classname = "StreamProto"; +option java_package = "com.google.cloud.bigquery.storage.v1beta2"; +option (google.api.resource_definition) = { + type: "bigquery.googleapis.com/Table" + pattern: "projects/{project}/datasets/{dataset}/tables/{table}" +}; + +// Data format for input or output data. +enum DataFormat { + DATA_FORMAT_UNSPECIFIED = 0; + + // Avro is a standard open source row based file format. + // See https://avro.apache.org/ for more details. + AVRO = 1; + + // Arrow is a standard open source column-based message format. + // See https://arrow.apache.org/ for more details. + ARROW = 2; +} + +// Information about the ReadSession. +message ReadSession { + option (google.api.resource) = { + type: "bigquerystorage.googleapis.com/ReadSession" + pattern: "projects/{project}/locations/{location}/sessions/{session}" + }; + + // Additional attributes when reading a table. + message TableModifiers { + // The snapshot time of the table. If not set, interpreted as now. + google.protobuf.Timestamp snapshot_time = 1; + } + + // Options dictating how we read a table. + message TableReadOptions { + // Names of the fields in the table that should be read. If empty, all + // fields will be read. If the specified field is a nested field, all + // the sub-fields in the field will be selected. The output field order is + // unrelated to the order of fields in selected_fields. + repeated string selected_fields = 1; + + // SQL text filtering statement, similar to a WHERE clause in a query. + // Aggregates are not supported. + // + // Examples: "int_field > 5" + // "date_field = CAST('2014-9-27' as DATE)" + // "nullable_field is not NULL" + // "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + // "numeric_field BETWEEN 1.0 AND 5.0" + string row_restriction = 2; + + // Optional. Options specific to the Apache Arrow output format. + ArrowSerializationOptions arrow_serialization_options = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Output only. Unique identifier for the session, in the form + // `projects/{project_id}/locations/{location}/sessions/{session_id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the session becomes invalid. After this time, subsequent + // requests to read this Session will return errors. The expire_time is + // automatically assigned and currently cannot be specified or updated. + google.protobuf.Timestamp expire_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Data format of the output data. + DataFormat data_format = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // The schema for the read. If read_options.selected_fields is set, the + // schema may be different from the table schema as it will only contain + // the selected fields. + oneof schema { + // Output only. Avro schema. + AvroSchema avro_schema = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Arrow schema. + ArrowSchema arrow_schema = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Immutable. Table that this ReadSession is reading from, in the form + // `projects/{project_id}/datasets/{dataset_id}/tables/{table_id} + string table = 6 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "bigquery.googleapis.com/Table" + } + ]; + + // Optional. Any modifiers which are applied when reading from the specified table. + TableModifiers table_modifiers = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Read options for this session (e.g. column selection, filters). + TableReadOptions read_options = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. A list of streams created with the session. + // + // At least one stream is created with the session. In the future, larger + // request_stream_count values *may* result in this list being unpopulated, + // in that case, the user will need to use a List method to get the streams + // instead, which is not yet available. + repeated ReadStream streams = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Information about a single stream that gets data out of the storage system. +// Most of the information about `ReadStream` instances is aggregated, making +// `ReadStream` lightweight. +message ReadStream { + option (google.api.resource) = { + type: "bigquerystorage.googleapis.com/ReadStream" + pattern: "projects/{project}/locations/{location}/sessions/{session}/streams/{stream}" + }; + + // Output only. Name of the stream, in the form + // `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/bigquery/v2/BUILD.bazel b/google/cloud/bigquery/v2/BUILD.bazel new file mode 100644 index 000000000..667222cb6 --- /dev/null +++ b/google/cloud/bigquery/v2/BUILD.bazel @@ -0,0 +1,364 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "bigquery_proto", + srcs = [ + "encryption_config.proto", + "model.proto", + "model_reference.proto", + "standard_sql.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library_with_info( + name = "bigquery_proto_with_info", + deps = [ + ":bigquery_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "bigquery_java_proto", + deps = [":bigquery_proto"], +) + +java_grpc_library( + name = "bigquery_java_grpc", + srcs = [":bigquery_proto"], + deps = [":bigquery_java_proto"], +) + +java_gapic_library( + name = "bigquery_java_gapic", + src = ":bigquery_proto_with_info", + gapic_yaml = "bigquery_gapic.yaml", + package = "google.cloud.bigquery.v2", + service_yaml = "bigquery_v2.yaml", + test_deps = [ + ":bigquery_java_grpc", + ], + deps = [ + ":bigquery_java_proto", + ], +) + +java_gapic_test( + name = "bigquery_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.bigquery.v2.ModelServiceClientTest", + ], + runtime_deps = [":bigquery_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-bigquery-v2-java", + deps = [ + ":bigquery_java_gapic", + ":bigquery_java_grpc", + ":bigquery_java_proto", + ":bigquery_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "bigquery_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/v2", + protos = [":bigquery_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "bigquery_go_gapic", + srcs = [":bigquery_proto_with_info"], + grpc_service_config = "bigquery_grpc_service_config.json", + importpath = "cloud.google.com/go/bigquery/apiv2;bigquery", + service_yaml = "bigquery_v2.yaml", + deps = [ + ":bigquery_go_proto", + ], +) + +go_test( + name = "bigquery_go_gapic_test", + srcs = [":bigquery_go_gapic_srcjar_test"], + embed = [":bigquery_go_gapic"], + importpath = "cloud.google.com/go/bigquery/apiv2", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-bigquery-v2-go", + deps = [ + ":bigquery_go_gapic", + ":bigquery_go_gapic_srcjar-test.srcjar", + ":bigquery_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "bigquery_moved_proto", + srcs = [":bigquery_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "bigquery_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":bigquery_moved_proto"], +) + +py_grpc_library( + name = "bigquery_py_grpc", + srcs = [":bigquery_moved_proto"], + deps = [":bigquery_py_proto"], +) + +py_gapic_library( + name = "bigquery_py_gapic", + src = ":bigquery_proto_with_info", + gapic_yaml = "bigquery_gapic.yaml", + package = "google.cloud.bigquery.v2", + service_yaml = "bigquery_v2.yaml", + deps = [ + ":bigquery_py_grpc", + ":bigquery_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "bigquery-v2-py", + deps = [ + ":bigquery_py_gapic", + ":bigquery_py_grpc", + ":bigquery_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "bigquery_php_proto", + deps = [":bigquery_proto"], +) + +php_grpc_library( + name = "bigquery_php_grpc", + srcs = [":bigquery_proto"], + deps = [":bigquery_php_proto"], +) + +# Add api.http options to all RPCs in the services to enable PHP GAPIC +#php_gapic_library( +# name = "bigquery_php_gapic", +# src = ":bigquery_proto_with_info", +# gapic_yaml = "bigquery_gapic.yaml", +# package = "google.cloud.bigquery.v2", +# service_yaml = "bigquery_v2.yaml", +# deps = [ +# ":bigquery_php_grpc", +# ":bigquery_php_proto", +# ], +#) +# +## Open Source Packages +#php_gapic_assembly_pkg( +# name = "google-cloud-bigquery-v2-php", +# deps = [ +# ":bigquery_php_gapic", +# ":bigquery_php_grpc", +# ":bigquery_php_proto", +# ], +#) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "bigquery_nodejs_gapic", + src = ":bigquery_proto_with_info", + gapic_yaml = "bigquery_gapic.yaml", + package = "google.cloud.bigquery.v2", + service_yaml = "bigquery_v2.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "bigquery-v2-nodejs", + deps = [ + ":bigquery_nodejs_gapic", + ":bigquery_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "bigquery_ruby_proto", + deps = [":bigquery_proto"], +) + +ruby_grpc_library( + name = "bigquery_ruby_grpc", + srcs = [":bigquery_proto"], + deps = [":bigquery_ruby_proto"], +) + +ruby_gapic_library( + name = "bigquery_ruby_gapic", + src = ":bigquery_proto_with_info", + gapic_yaml = "bigquery_gapic.yaml", + package = "google.cloud.bigquery.v2", + service_yaml = "bigquery_v2.yaml", + deps = [ + ":bigquery_ruby_grpc", + ":bigquery_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-bigquery-v2-ruby", + deps = [ + ":bigquery_ruby_gapic", + ":bigquery_ruby_grpc", + ":bigquery_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "bigquery_csharp_proto", + deps = [":bigquery_proto"], +) + +csharp_grpc_library( + name = "bigquery_csharp_grpc", + srcs = [":bigquery_proto"], + deps = [":bigquery_csharp_proto"], +) + +csharp_gapic_library( + name = "bigquery_csharp_gapic", + src = ":bigquery_proto_with_info", + gapic_yaml = "bigquery_gapic.yaml", + package = "google.cloud.bigquery.v2", + service_yaml = "bigquery_v2.yaml", + deps = [ + ":bigquery_csharp_grpc", + ":bigquery_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-bigquery-v2-csharp", + deps = [ + ":bigquery_csharp_gapic", + ":bigquery_csharp_grpc", + ":bigquery_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/bigquery/v2/bigquery_gapic.legacy.yaml b/google/cloud/bigquery/v2/bigquery_gapic.legacy.yaml new file mode 100644 index 000000000..de614d248 --- /dev/null +++ b/google/cloud/bigquery/v2/bigquery_gapic.legacy.yaml @@ -0,0 +1,175 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.bigquery.v2 + python: + package_name: google.cloud.bigquery_v2.gapic + go: + package_name: cloud.google.com/go/bigquery/apiv2 + csharp: + package_name: Google.Cloud.Bigquery.V2 + ruby: + package_name: Google::Cloud::Bigquery::V2 + php: + package_name: Google\Cloud\Bigquery\V2 + nodejs: + package_name: bigquery.v2 +# The configuration for the license header to put on generated files. +license_header: + # The file containing the copyright line(s). + copyright_file: copyright-google.txt + # The file containing the raw license header without any copyright line(s). + license_file: license-header-apache-2.0.txt +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.bigquery.v2.ModelService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: GetModel + flattening: + groups: + - parameters: + - project_id + - dataset_id + - model_id + required_fields: + - project_id + - dataset_id + - model_id + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: ListModels + flattening: + groups: + - parameters: + - project_id + - dataset_id + - max_results + required_fields: + - project_id + - dataset_id + page_streaming: + request: + token_field: page_token + response: + token_field: next_page_token + resources_field: models + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: PatchModel + flattening: + groups: + - parameters: + - project_id + - dataset_id + - model_id + - model + required_fields: + - project_id + - dataset_id + - model_id + - model + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: DeleteModel + flattening: + groups: + - parameters: + - project_id + - dataset_id + - model_id + required_fields: + - project_id + - dataset_id + - model_id + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/cloud/bigquery/v2/bigquery_gapic.yaml b/google/cloud/bigquery/v2/bigquery_gapic.yaml index de614d248..e9a219b6d 100644 --- a/google/cloud/bigquery/v2/bigquery_gapic.yaml +++ b/google/cloud/bigquery/v2/bigquery_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -16,160 +16,3 @@ language_settings: package_name: Google\Cloud\Bigquery\V2 nodejs: package_name: bigquery.v2 -# The configuration for the license header to put on generated files. -license_header: - # The file containing the copyright line(s). - copyright_file: copyright-google.txt - # The file containing the raw license header without any copyright line(s). - license_file: license-header-apache-2.0.txt -# A list of API interface configurations. -interfaces: -# The fully qualified name of the API interface. -- name: google.cloud.bigquery.v2.ModelService - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: [] - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: GetModel - flattening: - groups: - - parameters: - - project_id - - dataset_id - - model_id - required_fields: - - project_id - - dataset_id - - model_id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: ListModels - flattening: - groups: - - parameters: - - project_id - - dataset_id - - max_results - required_fields: - - project_id - - dataset_id - page_streaming: - request: - token_field: page_token - response: - token_field: next_page_token - resources_field: models - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: PatchModel - flattening: - groups: - - parameters: - - project_id - - dataset_id - - model_id - - model - required_fields: - - project_id - - dataset_id - - model_id - - model - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: DeleteModel - flattening: - groups: - - parameters: - - project_id - - dataset_id - - model_id - required_fields: - - project_id - - dataset_id - - model_id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 diff --git a/google/cloud/bigquery/v2/bigquery_grpc_service_config.json b/google/cloud/bigquery/v2/bigquery_grpc_service_config.json new file mode 100755 index 000000000..9dcb0e879 --- /dev/null +++ b/google/cloud/bigquery/v2/bigquery_grpc_service_config.json @@ -0,0 +1,25 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.bigquery.v2.ModelService", + "method": "GetModel" + }, + { + "service": "google.cloud.bigquery.v2.ModelService", + "method": "ListModels" + }, + { + "service": "google.cloud.bigquery.v2.ModelService", + "method": "PatchModel" + }, + { + "service": "google.cloud.bigquery.v2.ModelService", + "method": "DeleteModel" + } + ], + "timeout": "600s" + } + ] +} diff --git a/google/cloud/bigquery/v2/bigquery_v2.yaml b/google/cloud/bigquery/v2/bigquery_v2.yaml new file mode 100644 index 000000000..75c9634a7 --- /dev/null +++ b/google/cloud/bigquery/v2/bigquery_v2.yaml @@ -0,0 +1,37 @@ +type: google.api.Service +config_version: 2 +name: bigquery.googleapis.com +title: BigQuery API + +apis: +- name: google.cloud.bigquery.v2.ModelService + +documentation: + summary: 'A data platform for customers to create, manage, share and query data.' + +authentication: + rules: + - selector: google.cloud.bigquery.v2.ModelService.DeleteModel + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.bigquery.v2.ModelService.GetModel + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/bigquery.readonly, + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only + - selector: google.cloud.bigquery.v2.ModelService.ListModels + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/bigquery.readonly, + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only + - selector: google.cloud.bigquery.v2.ModelService.PatchModel + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/bigquery/v2/encryption_config.proto b/google/cloud/bigquery/v2/encryption_config.proto new file mode 100644 index 000000000..54445f0fa --- /dev/null +++ b/google/cloud/bigquery/v2/encryption_config.proto @@ -0,0 +1,33 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.bigquery.v2; + +import "google/api/field_behavior.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/v2;bigquery"; +option java_outer_classname = "EncryptionConfigProto"; +option java_package = "com.google.cloud.bigquery.v2"; + +message EncryptionConfiguration { + // Optional. Describes the Cloud KMS encryption key that will be used to + // protect destination BigQuery table. The BigQuery Service Account associated + // with your project requires access to this encryption key. + google.protobuf.StringValue kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/google/cloud/bigquery/v2/model.proto b/google/cloud/bigquery/v2/model.proto index 2b5b6894d..13d980774 100644 --- a/google/cloud/bigquery/v2/model.proto +++ b/google/cloud/bigquery/v2/model.proto @@ -17,13 +17,15 @@ syntax = "proto3"; package google.cloud.bigquery.v2; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/bigquery/v2/encryption_config.proto"; import "google/cloud/bigquery/v2/model_reference.proto"; import "google/cloud/bigquery/v2/standard_sql.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; -import "google/api/client.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/v2;bigquery"; option java_outer_classname = "ModelProto"; @@ -33,29 +35,52 @@ service ModelService { option (google.api.default_host) = "bigquery.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/bigquery," + "https://www.googleapis.com/auth/bigquery.readonly," "https://www.googleapis.com/auth/cloud-platform," "https://www.googleapis.com/auth/cloud-platform.read-only"; // Gets the specified model resource by model ID. rpc GetModel(GetModelRequest) returns (Model) { + option (google.api.method_signature) = "project_id,dataset_id,model_id"; } // Lists all models in the specified dataset. Requires the READER dataset // role. rpc ListModels(ListModelsRequest) returns (ListModelsResponse) { + option (google.api.method_signature) = "project_id,dataset_id,max_results"; } // Patch specific fields in the specified model. rpc PatchModel(PatchModelRequest) returns (Model) { + option (google.api.method_signature) = "project_id,dataset_id,model_id,model"; } // Deletes the model specified by modelId from the dataset. rpc DeleteModel(DeleteModelRequest) returns (google.protobuf.Empty) { + option (google.api.method_signature) = "project_id,dataset_id,model_id"; } } message Model { - // Evaluation metrics for regression models. + message KmeansEnums { + // Indicates the method used to initialize the centroids for KMeans + // clustering algorithm. + enum KmeansInitializationMethod { + KMEANS_INITIALIZATION_METHOD_UNSPECIFIED = 0; + + // Initializes the centroids randomly. + RANDOM = 1; + + // Initializes the centroids using data specified in + // kmeans_initialization_column. + CUSTOM = 2; + } + + + } + + // Evaluation metrics for regression and explicit feedback type matrix + // factorization models. message RegressionMetrics { // Mean absolute error. google.protobuf.DoubleValue mean_absolute_error = 1; @@ -199,11 +224,60 @@ message Model { // Evaluation metrics for clustering models. message ClusteringMetrics { + // Message containing the information about one cluster. + message Cluster { + // Representative value of a single feature within the cluster. + message FeatureValue { + // Representative value of a categorical feature. + message CategoricalValue { + // Represents the count of a single category within the cluster. + message CategoryCount { + // The name of category. + string category = 1; + + // The count of training samples matching the category within the + // cluster. + google.protobuf.Int64Value count = 2; + } + + // Counts of all categories for the categorical feature. If there are + // more than ten categories, we return top ten (by count) and return + // one more CategoryCount with category "_OTHER_" and count as + // aggregate counts of remaining categories. + repeated CategoryCount category_counts = 1; + } + + // The feature column name. + string feature_column = 1; + + oneof value { + // The numerical feature value. This is the centroid value for this + // feature. + google.protobuf.DoubleValue numerical_value = 2; + + // The categorical feature value. + CategoricalValue categorical_value = 3; + } + } + + // Centroid id. + int64 centroid_id = 1; + + // Values of highly variant features for this cluster. + repeated FeatureValue feature_values = 2; + + // Count of training data rows that were assigned to this cluster. + google.protobuf.Int64Value count = 3; + } + // Davies-Bouldin index. google.protobuf.DoubleValue davies_bouldin_index = 1; // Mean of squared distances between each sample to its cluster centroid. google.protobuf.DoubleValue mean_squared_distance = 2; + + // [Beta] Information for all clusters. + repeated Cluster clusters = 3; } // Evaluation metrics of a model. These are either computed on all training @@ -211,7 +285,8 @@ message Model { // training. These are not present for imported models. message EvaluationMetrics { oneof metrics { - // Populated for regression models. + // Populated for regression models and explicit feedback type matrix + // factorization models. RegressionMetrics regression_metrics = 1; // Populated for binary classification/classifier models. @@ -220,7 +295,7 @@ message Model { // Populated for multi-class classification/classifier models. MultiClassClassificationMetrics multi_class_classification_metrics = 3; - // [Beta] Populated for clustering models. + // Populated for clustering models. ClusteringMetrics clustering_metrics = 4; } } @@ -292,10 +367,10 @@ message Model { // training data. Only applicable for classification models. map label_class_weights = 17; - // [Beta] Distance type for clustering models. + // Distance type for clustering models. DistanceType distance_type = 20; - // [Beta] Number of clusters for clustering models. + // Number of clusters for clustering models. int64 num_clusters = 21; // [Beta] Google Cloud Storage URI from which the model was imported. Only @@ -304,6 +379,13 @@ message Model { // Optimization strategy for training linear regression models. OptimizationStrategy optimization_strategy = 23; + + // The method used to initialize the centroids for kmeans algorithm. + KmeansEnums.KmeansInitializationMethod kmeans_initialization_method = 33; + + // The column used to provide the initial centroids for kmeans algorithm + // when kmeans_initialization_method is CUSTOM. + string kmeans_initialization_column = 34; } // Information about a single iteration of the training run. @@ -336,7 +418,7 @@ message Model { // Learn rate used for this iteration. double learn_rate = 7; - // [Beta] Information about top clusters for clustering models. + // Information about top clusters for clustering models. repeated ClusterInfo cluster_infos = 8; } @@ -365,7 +447,7 @@ message Model { // Logistic regression based classification model. LOGISTIC_REGRESSION = 2; - // [Beta] K-means clustering model. + // K-means clustering model. KMEANS = 3; // [Beta] An imported TensorFlow model. @@ -438,105 +520,108 @@ message Model { } // Output only. A hash of this resource. - string etag = 1; + string etag = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. Unique identifier for this model. - ModelReference model_reference = 2; + ModelReference model_reference = 2 [(google.api.field_behavior) = REQUIRED]; - // Output only. The time when this model was created, in millisecs since the - // epoch. - int64 creation_time = 5; + // Output only. The time when this model was created, in millisecs since the epoch. + int64 creation_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The time when this model was last modified, in millisecs - // since the epoch. - int64 last_modified_time = 6; + // Output only. The time when this model was last modified, in millisecs since the epoch. + int64 last_modified_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // [Optional] A user-friendly description of this model. - string description = 12; + // Optional. A user-friendly description of this model. + string description = 12 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] A descriptive name for this model. - string friendly_name = 14; + // Optional. A descriptive name for this model. + string friendly_name = 14 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] The labels associated with this model. You can use these to - // organize and group your models. Label keys and values can be no longer + // The labels associated with this model. You can use these to organize + // and group your models. Label keys and values can be no longer // than 63 characters, can only contain lowercase letters, numeric // characters, underscores and dashes. International characters are allowed. // Label values are optional. Label keys must start with a letter and each // label in the list must have a different key. map labels = 15; - // [Optional] The time when this model expires, in milliseconds since the - // epoch. If not present, the model will persist indefinitely. Expired models + // Optional. The time when this model expires, in milliseconds since the epoch. + // If not present, the model will persist indefinitely. Expired models // will be deleted and their storage reclaimed. The defaultTableExpirationMs // property of the encapsulating dataset can be used to set a default // expirationTime on newly created models. - int64 expiration_time = 16; + int64 expiration_time = 16 [(google.api.field_behavior) = OPTIONAL]; // Output only. The geographic location where the model resides. This value // is inherited from the dataset. - string location = 13; + string location = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Custom encryption configuration (e.g., Cloud KMS keys). This shows the + // encryption configuration of the model data while stored in BigQuery + // storage. + google.cloud.bigquery.v2.EncryptionConfiguration encryption_configuration = 17; // Output only. Type of the model resource. - ModelType model_type = 7; + ModelType model_type = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Information for all training runs in increasing order of - // start_time. - repeated TrainingRun training_runs = 9; + // Output only. Information for all training runs in increasing order of start_time. + repeated TrainingRun training_runs = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Input feature columns that were used to train this model. - repeated StandardSqlField feature_columns = 10; + repeated StandardSqlField feature_columns = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Label columns that were used to train this model. // The output of the model will have a "predicted_" prefix to these columns. - repeated StandardSqlField label_columns = 11; + repeated StandardSqlField label_columns = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } message GetModelRequest { - // Project ID of the requested model. - string project_id = 1; + // Required. Project ID of the requested model. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Dataset ID of the requested model. - string dataset_id = 2; + // Required. Dataset ID of the requested model. + string dataset_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Model ID of the requested model. - string model_id = 3; + // Required. Model ID of the requested model. + string model_id = 3 [(google.api.field_behavior) = REQUIRED]; } message PatchModelRequest { - // Project ID of the model to patch. - string project_id = 1; + // Required. Project ID of the model to patch. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Dataset ID of the model to patch. - string dataset_id = 2; + // Required. Dataset ID of the model to patch. + string dataset_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Model ID of the model to patch. - string model_id = 3; + // Required. Model ID of the model to patch. + string model_id = 3 [(google.api.field_behavior) = REQUIRED]; - // Patched model. - // Follows patch semantics. Missing fields are not updated. To clear a field, - // explicitly set to default value. - Model model = 4; + // Required. Patched model. + // Follows RFC5789 patch semantics. Missing fields are not updated. + // To clear a field, explicitly set to default value. + Model model = 4 [(google.api.field_behavior) = REQUIRED]; } message DeleteModelRequest { - // Project ID of the model to delete. - string project_id = 1; + // Required. Project ID of the model to delete. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Dataset ID of the model to delete. - string dataset_id = 2; + // Required. Dataset ID of the model to delete. + string dataset_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Model ID of the model to delete. - string model_id = 3; + // Required. Model ID of the model to delete. + string model_id = 3 [(google.api.field_behavior) = REQUIRED]; } message ListModelsRequest { - // Project ID of the models to list. - string project_id = 1; + // Required. Project ID of the models to list. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Dataset ID of the models to list. - string dataset_id = 2; + // Required. Dataset ID of the models to list. + string dataset_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The maximum number of results per page. + // The maximum number of results to return in a single response page. + // Leverage the page tokens to iterate through the entire collection. google.protobuf.UInt32Value max_results = 3; // Page token, returned by a previous call to request the next page of diff --git a/google/cloud/bigquery/v2/model_reference.proto b/google/cloud/bigquery/v2/model_reference.proto index f436659ab..fadd17514 100644 --- a/google/cloud/bigquery/v2/model_reference.proto +++ b/google/cloud/bigquery/v2/model_reference.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.bigquery.v2; +import "google/api/field_behavior.proto"; import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/v2;bigquery"; @@ -25,14 +26,14 @@ option java_package = "com.google.cloud.bigquery.v2"; // Id path of a model. message ModelReference { - // [Required] The ID of the project containing this model. - string project_id = 1; + // Required. The ID of the project containing this model. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // [Required] The ID of the dataset containing this model. - string dataset_id = 2; + // Required. The ID of the dataset containing this model. + string dataset_id = 2 [(google.api.field_behavior) = REQUIRED]; - // [Required] The ID of the model. The ID must contain only + // Required. The ID of the model. The ID must contain only // letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum // length is 1,024 characters. - string model_id = 3; + string model_id = 3 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/cloud/bigquery/v2/standard_sql.proto b/google/cloud/bigquery/v2/standard_sql.proto index 98173092f..ff69dfc4e 100644 --- a/google/cloud/bigquery/v2/standard_sql.proto +++ b/google/cloud/bigquery/v2/standard_sql.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.bigquery.v2; +import "google/api/field_behavior.proto"; import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/v2;bigquery"; @@ -82,7 +83,7 @@ message StandardSqlDataType { // Required. The top level type of this field. // Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY"). - TypeKind type_kind = 1; + TypeKind type_kind = 1 [(google.api.field_behavior) = REQUIRED]; oneof sub_type { // The type of the array's elements, if type_kind = "ARRAY". @@ -96,12 +97,12 @@ message StandardSqlDataType { // A field or a column. message StandardSqlField { // Optional. The name of this field. Can be absent for struct fields. - string name = 1; + string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The type of this parameter. Absent if not explicitly // specified (e.g., CREATE FUNCTION statement can omit the return type; // in this case the output parameter does not have this "type" field). - StandardSqlDataType type = 2; + StandardSqlDataType type = 2 [(google.api.field_behavior) = OPTIONAL]; } message StandardSqlStructType { diff --git a/google/cloud/videointelligence/artman_videointelligence_v1beta1.yaml b/google/cloud/billing/budgets/artman_billingbudgets_v1beta1.yaml similarity index 78% rename from google/cloud/videointelligence/artman_videointelligence_v1beta1.yaml rename to google/cloud/billing/budgets/artman_billingbudgets_v1beta1.yaml index 2f1f114a6..0c5105edd 100644 --- a/google/cloud/videointelligence/artman_videointelligence_v1beta1.yaml +++ b/google/cloud/billing/budgets/artman_billingbudgets_v1beta1.yaml @@ -1,35 +1,34 @@ common: - api_name: video-intelligence + api_name: billingbudgets api_version: v1beta1 organization_name: google-cloud - service_yaml: videointelligence_v1beta1.yaml - gapic_yaml: v1beta1/videointelligence_gapic.yaml - src_proto_paths: - - v1beta1 proto_deps: - name: google-common-protos + src_proto_paths: + - v1beta1 + service_yaml: v1beta1/billingbudgets.yaml + gapic_yaml: v1beta1/billingbudgets_gapic.yaml artifacts: +- name: gapic_config + type: GAPIC_CONFIG - name: java_gapic type: GAPIC language: JAVA - name: python_gapic type: GAPIC language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS - name: php_gapic type: GAPIC language: PHP -- name: ruby_gapic - type: GAPIC - language: RUBY - name: go_gapic type: GAPIC language: GO +- name: ruby_gapic + type: GAPIC + language: RUBY - name: csharp_gapic type: GAPIC language: CSHARP -- name: nodejs_gapic - type: GAPIC - language: NODEJS - release_level: BETA -- name: gapic_config - type: GAPIC_CONFIG diff --git a/google/cloud/billing/budgets/v1alpha1/BUILD.bazel b/google/cloud/billing/budgets/v1alpha1/BUILD.bazel new file mode 100644 index 000000000..4f1148a00 --- /dev/null +++ b/google/cloud/billing/budgets/v1alpha1/BUILD.bazel @@ -0,0 +1,176 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "budgets_proto", + srcs = [ + "budget_model.proto", + "budget_service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/type:money_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "budgets_java_proto", + deps = [":budgets_proto"], +) + +java_grpc_library( + name = "budgets_java_grpc", + srcs = [":budgets_proto"], + deps = [":budgets_java_proto"], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", +) + +go_proto_library( + name = "budgets_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/billing/budgets/v1alpha1", + protos = [":budgets_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/type:money_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "budgets_moved_proto", + srcs = [":budgets_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/type:money_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + ], +) + +py_proto_library( + name = "budgets_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":budgets_moved_proto"], +) + +py_grpc_library( + name = "budgets_py_grpc", + srcs = [":budgets_moved_proto"], + deps = [":budgets_py_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "budgets_php_proto", + deps = [":budgets_proto"], +) + +php_grpc_library( + name = "budgets_php_grpc", + srcs = [":budgets_proto"], + deps = [":budgets_php_proto"], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "budgets_ruby_proto", + deps = [":budgets_proto"], +) + +ruby_grpc_library( + name = "budgets_ruby_grpc", + srcs = [":budgets_proto"], + deps = [":budgets_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "budgets_csharp_proto", + deps = [":budgets_proto"], +) + +csharp_grpc_library( + name = "budgets_csharp_grpc", + srcs = [":budgets_proto"], + deps = [":budgets_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ code here diff --git a/google/cloud/billing/budgets/v1alpha1/billingbudgets.yaml b/google/cloud/billing/budgets/v1alpha1/billingbudgets.yaml new file mode 100644 index 000000000..72accd265 --- /dev/null +++ b/google/cloud/billing/budgets/v1alpha1/billingbudgets.yaml @@ -0,0 +1,20 @@ +type: google.api.Service +config_version: 3 +name: billingbudgets.googleapis.com +title: Cloud Billing Budget API + +apis: +- name: google.cloud.billing.budgets.v1alpha1.BudgetService + +documentation: + summary: |- + The Cloud Billing Budget API stores Cloud Billing budgets, which define a + budget plan and the rules to execute as spend is tracked against that + plan. + +authentication: + rules: + - selector: 'google.cloud.billing.budgets.v1alpha1.BudgetService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/billing/budgets/v1alpha1/billingbudgets_grpc_service_config.json b/google/cloud/billing/budgets/v1alpha1/billingbudgets_grpc_service_config.json new file mode 100644 index 000000000..63dddd879 --- /dev/null +++ b/google/cloud/billing/budgets/v1alpha1/billingbudgets_grpc_service_config.json @@ -0,0 +1,44 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.billing.budgets.v1alpha1.BudgetService", + "method": "CreateBudget" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.billing.budgets.v1alpha1.BudgetService", + "method": "UpdateBudget" + }, + { + "service": "google.cloud.billing.budgets.v1alpha1.BudgetService", + "method": "GetBudget" + }, + { + "service": "google.cloud.billing.budgets.v1alpha1.BudgetService", + "method": "ListBudgets" + }, + { + "service": "google.cloud.billing.budgets.v1alpha1.BudgetService", + "method": "DeleteBudget" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/billing/budgets/v1alpha1/budget_model.proto b/google/cloud/billing/budgets/v1alpha1/budget_model.proto new file mode 100644 index 000000000..c3d907b2c --- /dev/null +++ b/google/cloud/billing/budgets/v1alpha1/budget_model.proto @@ -0,0 +1,179 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.billing.budgets.v1alpha1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/type/money.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/billing/budgets/v1alpha1;budgets"; +option java_multiple_files = true; +option java_package = "com.google.cloud.billing.budgets.v1alpha1"; + +// A budget is a plan that describes what you expect to spend on Cloud +// projects, plus the rules to execute as spend is tracked against that plan, +// (for example, send an alert when 90% of the target spend is met). +// Currently all plans are monthly budgets so the usage period(s) tracked are +// implied (calendar months of usage back-to-back). +message Budget { + option (google.api.resource) = { + type: "billingbudgets.googleapis.com/Budget" + pattern: "billingAccounts/{billing_account}/budgets/{budget}" + }; + + // Output only. Resource name of the budget. + // The resource name implies the scope of a budget. Values are of the form + // `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User data for display name in UI. + // Validation: <= 60 chars. + string display_name = 2; + + // Optional. Filters that define which resources are used to compute + // the actual spend against the budget. + Filter budget_filter = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Budgeted amount. + BudgetAmount amount = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Rules that trigger alerts (notifications of thresholds + // being crossed) when spend exceeds the specified percentages of the budget. + repeated ThresholdRule threshold_rules = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Rules to apply to all updates to the actual spend, regardless + // of the thresholds set in `threshold_rules`. + AllUpdatesRule all_updates_rule = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Etag to validate that the object is unchanged for a + // read-modify-write operation. + // An empty etag will cause an update to overwrite other changes. + string etag = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// The budgeted amount for each usage period. +message BudgetAmount { + // Specification for what amount to use as the budget. + oneof budget_amount { + // A specified amount to use as the budget. + // `currency_code` is optional. If specified, it must match the + // currency of the billing account. The `currency_code` is provided on + // output. + google.type.Money specified_amount = 1; + + // Use the last period's actual spend as the budget for the present period. + LastPeriodAmount last_period_amount = 2; + } +} + +// Describes a budget amount targeted to last period's spend. +// At this time, the amount is automatically 100% of last period's spend; +// that is, there are no other options yet. +// Future configuration will be described here (for example, configuring a +// percentage of last period's spend). +message LastPeriodAmount { + +} + +// ThresholdRule contains a definition of a threshold which triggers +// an alert (a notification of a threshold being crossed) to be sent when +// spend goes above the specified amount. +// Alerts are automatically e-mailed to users with the Billing Account +// Administrator role or the Billing Account User role. +// The thresholds here have no effect on notifications sent to anything +// configured under `Budget.all_updates_rule`. +message ThresholdRule { + // The type of basis used to determine if spend has passed the threshold. + enum Basis { + // Unspecified threshold basis. + BASIS_UNSPECIFIED = 0; + + // Use current spend as the basis for comparison against the threshold. + CURRENT_SPEND = 1; + + // Use forecasted spend for the period as the basis for comparison against + // the threshold. + FORECASTED_SPEND = 2; + } + + // Required. Send an alert when this threshold is exceeded. + // This is a 1.0-based percentage, so 0.5 = 50%. + // Validation: non-negative number. + double threshold_percent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The type of basis used to determine if spend has passed the + // threshold. Behavior defaults to CURRENT_SPEND if not set. + Basis spend_basis = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// AllUpdatesRule defines notifications that are sent on every update to the +// billing account's spend, regardless of the thresholds defined using +// threshold rules. +message AllUpdatesRule { + // Required. The name of the Cloud Pub/Sub topic where budget related messages will be + // published, in the form `projects/{project_id}/topics/{topic_id}`. Updates + // are sent at regular intervals to the topic. + // The topic needs to be created before the budget is created; see + // https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications + // for more details. + // Caller is expected to have + // `pubsub.topics.setIamPolicy` permission on the topic when it's set for a + // budget, otherwise, the API call will fail with PERMISSION_DENIED. See + // https://cloud.google.com/pubsub/docs/access-control for more details on + // Pub/Sub roles and permissions. + string pubsub_topic = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The schema version of the notification. + // Only "1.0" is accepted. It represents the JSON schema as defined in + // https://cloud.google.com/billing/docs/how-to/budgets#notification_format + string schema_version = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A filter for a budget, limiting the scope of the cost to calculate. +message Filter { + // Specifies how credits should be treated when determining spend for + // threshold calculations. + enum CreditTypesTreatment { + CREDIT_TYPES_TREATMENT_UNSPECIFIED = 0; + + // All types of credit are subtracted from the gross cost to determine the + // spend for threshold calculations. + INCLUDE_ALL_CREDITS = 1; + + // All types of credit are added to the net cost to determine the spend for + // threshold calculations. + EXCLUDE_ALL_CREDITS = 2; + } + + // Optional. A set of projects of the form `projects/{project}`, + // specifying that usage from only this set of projects should be + // included in the budget. If omitted, the report will include all usage for + // the billing account, regardless of which project the usage occurred on. + // Only zero or one project can be specified currently. + repeated string projects = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. + CreditTypesTreatment credit_types_treatment = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A set of services of the form `services/{service_id}`, + // specifying that usage from only this set of services should be + // included in the budget. If omitted, the report will include usage for + // all the services. + // The service names are available through the Catalog API: + // https://cloud.google.com/billing/v1/how-tos/catalog-api. + repeated string services = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/google/cloud/billing/budgets/v1alpha1/budget_service.proto b/google/cloud/billing/budgets/v1alpha1/budget_service.proto new file mode 100644 index 000000000..1efd1441c --- /dev/null +++ b/google/cloud/billing/budgets/v1alpha1/budget_service.proto @@ -0,0 +1,174 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.billing.budgets.v1alpha1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/billing/budgets/v1alpha1/budget_model.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/billing/budgets/v1alpha1;budgets"; +option java_multiple_files = true; +option java_package = "com.google.cloud.billing.budgets.v1alpha1"; + +// BudgetService stores Cloud Billing budgets, which define a +// budget plan and rules to execute as we track spend against that plan. +service BudgetService { + option (google.api.default_host) = "billingbudgets.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new budget. See + // Quotas and limits + // for more information on the limits of the number of budgets you can create. + rpc CreateBudget(CreateBudgetRequest) returns (Budget) { + option (google.api.http) = { + post: "/v1alpha1/{parent=billingAccounts/*}/budgets" + body: "*" + }; + } + + // Updates a budget and returns the updated budget. + // + // WARNING: There are some fields exposed on the Google Cloud Console that + // aren't available on this API. Budget fields that are not exposed in + // this API will not be changed by this method. + rpc UpdateBudget(UpdateBudgetRequest) returns (Budget) { + option (google.api.http) = { + patch: "/v1alpha1/{budget.name=billingAccounts/*/budgets/*}" + body: "*" + }; + } + + // Returns a budget. + // + // WARNING: There are some fields exposed on the Google Cloud Console that + // aren't available on this API. When reading from the API, you will not + // see these fields in the return value, though they may have been set + // in the Cloud Console. + rpc GetBudget(GetBudgetRequest) returns (Budget) { + option (google.api.http) = { + get: "/v1alpha1/{name=billingAccounts/*/budgets/*}" + }; + } + + // Returns a list of budgets for a billing account. + // + // WARNING: There are some fields exposed on the Google Cloud Console that + // aren't available on this API. When reading from the API, you will not + // see these fields in the return value, though they may have been set + // in the Cloud Console. + rpc ListBudgets(ListBudgetsRequest) returns (ListBudgetsResponse) { + option (google.api.http) = { + get: "/v1alpha1/{parent=billingAccounts/*}/budgets" + }; + } + + // Deletes a budget. Returns successfully if already deleted. + rpc DeleteBudget(DeleteBudgetRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha1/{name=billingAccounts/*/budgets/*}" + }; + } +} + +// Request for CreateBudget +message CreateBudgetRequest { + // Required. The name of the billing account to create the budget in. Values + // are of the form `billingAccounts/{billingAccountId}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "billingbudgets.googleapis.com/Budget" + } + ]; + + // Required. Budget to create. + Budget budget = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for UpdateBudget +message UpdateBudgetRequest { + // Required. The updated budget object. + // The budget to update is specified by the budget name in the budget. + Budget budget = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates which fields in the provided budget to update. + // Read-only fields (such as `name`) cannot be changed. If this is not + // provided, then only fields with non-default values from the request are + // updated. See + // https://developers.google.com/protocol-buffers/docs/proto3#default for more + // details about default values. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for GetBudget +message GetBudgetRequest { + // Required. Name of budget to get. Values are of the form + // `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "billingbudgets.googleapis.com/Budget" + } + ]; +} + +// Request for ListBudgets +message ListBudgetsRequest { + // Required. Name of billing account to list budgets under. Values + // are of the form `billingAccounts/{billingAccountId}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "billingbudgets.googleapis.com/Budget" + } + ]; + + // Optional. The maximum number of budgets to return per page. + // The default and maximum value are 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value returned by the last `ListBudgetsResponse` which + // indicates that this is a continuation of a prior `ListBudgets` call, + // and that the system should return the next page of data. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for ListBudgets +message ListBudgetsResponse { + // List of the budgets owned by the requested billing account. + repeated Budget budgets = 1; + + // If not empty, indicates that there may be more budgets that match the + // request; this value should be passed in a new `ListBudgetsRequest`. + string next_page_token = 2; +} + +// Request for DeleteBudget +message DeleteBudgetRequest { + // Required. Name of the budget to delete. Values are of the form + // `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "billingbudgets.googleapis.com/Budget" + } + ]; +} diff --git a/google/cloud/billing/budgets/v1beta1/BUILD.bazel b/google/cloud/billing/budgets/v1beta1/BUILD.bazel new file mode 100644 index 000000000..35970baab --- /dev/null +++ b/google/cloud/billing/budgets/v1beta1/BUILD.bazel @@ -0,0 +1,364 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "budgets_proto", + srcs = [ + "budget_model.proto", + "budget_service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/type:money_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + ], +) + +proto_library_with_info( + name = "budgets_proto_with_info", + deps = [ + ":budgets_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "budgets_java_proto", + deps = [":budgets_proto"], +) + +java_grpc_library( + name = "budgets_java_grpc", + srcs = [":budgets_proto"], + deps = [":budgets_java_proto"], +) + +java_gapic_library( + name = "budgets_java_gapic", + src = ":budgets_proto_with_info", + gapic_yaml = "billingbudgets_gapic.yaml", + package = "google.cloud.billing.budgets.v1beta1", + service_yaml = "billingbudgets.yaml", + test_deps = [ + ":budgets_java_grpc", + ], + deps = [ + ":budgets_java_proto", + ], +) + +java_gapic_test( + name = "budgets_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.billing.budgets.v1beta1.BudgetServiceClientTest", + ], + runtime_deps = [":budgets_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-billing-budgets-v1beta1-java", + deps = [ + ":budgets_java_gapic", + ":budgets_java_grpc", + ":budgets_java_proto", + ":budgets_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "budgets_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/billing/budgets/v1beta1", + protos = [":budgets_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/type:money_go_proto", + ], +) + +go_gapic_library( + name = "budgets_go_gapic", + srcs = [":budgets_proto_with_info"], + grpc_service_config = "billingbudgets_grpc_service_config.json", + importpath = "cloud.google.com/go/billing/budgets/apiv1beta1;budgets", + service_yaml = "billingbudgets.yaml", + deps = [ + ":budgets_go_proto", + ], +) + +go_test( + name = "budgets_go_gapic_test", + srcs = [":budgets_go_gapic_srcjar_test"], + embed = [":budgets_go_gapic"], + importpath = "cloud.google.com/go/billing/budgets/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-billing-budgets-v1beta1-go", + deps = [ + ":budgets_go_gapic", + ":budgets_go_gapic_srcjar-test.srcjar", + ":budgets_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "budgets_moved_proto", + srcs = [":budgets_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/type:money_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + ], +) + +py_proto_library( + name = "budgets_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":budgets_moved_proto"], +) + +py_grpc_library( + name = "budgets_py_grpc", + srcs = [":budgets_moved_proto"], + deps = [":budgets_py_proto"], +) + +py_gapic_library( + name = "budgets_py_gapic", + src = ":budgets_proto_with_info", + gapic_yaml = "billingbudgets_gapic.yaml", + package = "google.cloud.billing.budgets.v1beta1", + service_yaml = "billingbudgets.yaml", + deps = [ + ":budgets_py_grpc", + ":budgets_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "billing-budgets-v1beta1-py", + deps = [ + ":budgets_py_gapic", + ":budgets_py_grpc", + ":budgets_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "budgets_php_proto", + deps = [":budgets_proto"], +) + +php_grpc_library( + name = "budgets_php_grpc", + srcs = [":budgets_proto"], + deps = [":budgets_php_proto"], +) + +php_gapic_library( + name = "budgets_php_gapic", + src = ":budgets_proto_with_info", + gapic_yaml = "billingbudgets_gapic.yaml", + package = "google.cloud.billing.budgets.v1beta1", + service_yaml = "billingbudgets.yaml", + deps = [ + ":budgets_php_grpc", + ":budgets_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-billing-budgets-v1beta1-php", + deps = [ + ":budgets_php_gapic", + ":budgets_php_grpc", + ":budgets_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "budgets_nodejs_gapic", + src = ":budgets_proto_with_info", + gapic_yaml = "billingbudgets_gapic.yaml", + package = "google.cloud.billing.budgets.v1beta1", + service_yaml = "billingbudgets.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "billing-budgets-v1beta1-nodejs", + deps = [ + ":budgets_nodejs_gapic", + ":budgets_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "budgets_ruby_proto", + deps = [":budgets_proto"], +) + +ruby_grpc_library( + name = "budgets_ruby_grpc", + srcs = [":budgets_proto"], + deps = [":budgets_ruby_proto"], +) + +ruby_gapic_library( + name = "budgets_ruby_gapic", + src = ":budgets_proto_with_info", + gapic_yaml = "billingbudgets_gapic.yaml", + package = "google.cloud.billing.budgets.v1beta1", + service_yaml = "billingbudgets.yaml", + deps = [ + ":budgets_ruby_grpc", + ":budgets_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-billing-budgets-v1beta1-ruby", + deps = [ + ":budgets_ruby_gapic", + ":budgets_ruby_grpc", + ":budgets_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "budgets_csharp_proto", + deps = [":budgets_proto"], +) + +csharp_grpc_library( + name = "budgets_csharp_grpc", + srcs = [":budgets_proto"], + deps = [":budgets_csharp_proto"], +) + +csharp_gapic_library( + name = "budgets_csharp_gapic", + src = ":budgets_proto_with_info", + gapic_yaml = "billingbudgets_gapic.yaml", + package = "google.cloud.billing.budgets.v1beta1", + service_yaml = "billingbudgets.yaml", + deps = [ + ":budgets_csharp_grpc", + ":budgets_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-billing-budgets-v1beta1-csharp", + deps = [ + ":budgets_csharp_gapic", + ":budgets_csharp_grpc", + ":budgets_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/billing/budgets/v1beta1/billingbudgets.yaml b/google/cloud/billing/budgets/v1beta1/billingbudgets.yaml new file mode 100644 index 000000000..01ae424dc --- /dev/null +++ b/google/cloud/billing/budgets/v1beta1/billingbudgets.yaml @@ -0,0 +1,20 @@ +type: google.api.Service +config_version: 3 +name: billingbudgets.googleapis.com +title: Cloud Billing Budget API + +apis: +- name: google.cloud.billing.budgets.v1beta1.BudgetService + +documentation: + summary: |- + The Cloud Billing Budget API stores Cloud Billing budgets, which define a + budget plan and the rules to execute as spend is tracked against that + plan. + +authentication: + rules: + - selector: 'google.cloud.billing.budgets.v1beta1.BudgetService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/billing/budgets/v1beta1/billingbudgets_gapic.yaml b/google/cloud/billing/budgets/v1beta1/billingbudgets_gapic.yaml new file mode 100644 index 000000000..2829c873e --- /dev/null +++ b/google/cloud/billing/budgets/v1beta1/billingbudgets_gapic.yaml @@ -0,0 +1,70 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.billing.budgets.v1beta1 + python: + package_name: google.cloud.billing_budgets_v1beta1.gapic + go: + package_name: cloud.google.com/go/billing/budgets/apiv1beta1 + csharp: + package_name: Google.Cloud.Billing.Budgets.V1Beta1 + ruby: + package_name: Google::Cloud::Billing::Budgets::V1beta1 + php: + package_name: Google\Cloud\Billing\Budgets\V1beta1 + nodejs: + package_name: billing-budgets.v1beta1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.billing.budgets.v1beta1.BudgetService + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateBudget + retry_codes_name: non_idempotent + retry_params_name: default + - name: UpdateBudget + retry_codes_name: idempotent + retry_params_name: default + - name: GetBudget + retry_codes_name: idempotent + retry_params_name: default + - name: ListBudgets + retry_codes_name: idempotent + retry_params_name: default + - name: DeleteBudget + retry_codes_name: idempotent + retry_params_name: default diff --git a/google/cloud/billing/budgets/v1beta1/billingbudgets_grpc_service_config.json b/google/cloud/billing/budgets/v1beta1/billingbudgets_grpc_service_config.json new file mode 100644 index 000000000..ced46bf84 --- /dev/null +++ b/google/cloud/billing/budgets/v1beta1/billingbudgets_grpc_service_config.json @@ -0,0 +1,44 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.billing.budgets.v1beta1.BudgetService", + "method": "CreateBudget" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.billing.budgets.v1beta1.BudgetService", + "method": "UpdateBudget" + }, + { + "service": "google.cloud.billing.budgets.v1beta1.BudgetService", + "method": "GetBudget" + }, + { + "service": "google.cloud.billing.budgets.v1beta1.BudgetService", + "method": "ListBudgets" + }, + { + "service": "google.cloud.billing.budgets.v1beta1.BudgetService", + "method": "DeleteBudget" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/billing/budgets/v1beta1/budget_model.proto b/google/cloud/billing/budgets/v1beta1/budget_model.proto new file mode 100644 index 000000000..d25cf3324 --- /dev/null +++ b/google/cloud/billing/budgets/v1beta1/budget_model.proto @@ -0,0 +1,179 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.billing.budgets.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/type/money.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/billing/budgets/v1beta1;budgets"; +option java_multiple_files = true; +option java_package = "com.google.cloud.billing.budgets.v1beta1"; + +// A budget is a plan that describes what you expect to spend on Cloud +// projects, plus the rules to execute as spend is tracked against that plan, +// (for example, send an alert when 90% of the target spend is met). +// Currently all plans are monthly budgets so the usage period(s) tracked are +// implied (calendar months of usage back-to-back). +message Budget { + option (google.api.resource) = { + type: "billingbudgets.googleapis.com/Budget" + pattern: "billingAccounts/{billing_account}/budgets/{budget}" + }; + + // Output only. Resource name of the budget. + // The resource name implies the scope of a budget. Values are of the form + // `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User data for display name in UI. + // Validation: <= 60 chars. + string display_name = 2; + + // Optional. Filters that define which resources are used to compute + // the actual spend against the budget. + Filter budget_filter = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Budgeted amount. + BudgetAmount amount = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Rules that trigger alerts (notifications of thresholds + // being crossed) when spend exceeds the specified percentages of the budget. + repeated ThresholdRule threshold_rules = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Rules to apply to all updates to the actual spend, regardless + // of the thresholds set in `threshold_rules`. + AllUpdatesRule all_updates_rule = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Etag to validate that the object is unchanged for a + // read-modify-write operation. + // An empty etag will cause an update to overwrite other changes. + string etag = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// The budgeted amount for each usage period. +message BudgetAmount { + // Specification for what amount to use as the budget. + oneof budget_amount { + // A specified amount to use as the budget. + // `currency_code` is optional. If specified, it must match the + // currency of the billing account. The `currency_code` is provided on + // output. + google.type.Money specified_amount = 1; + + // Use the last period's actual spend as the budget for the present period. + LastPeriodAmount last_period_amount = 2; + } +} + +// Describes a budget amount targeted to last period's spend. +// At this time, the amount is automatically 100% of last period's spend; +// that is, there are no other options yet. +// Future configuration will be described here (for example, configuring a +// percentage of last period's spend). +message LastPeriodAmount { + +} + +// ThresholdRule contains a definition of a threshold which triggers +// an alert (a notification of a threshold being crossed) to be sent when +// spend goes above the specified amount. +// Alerts are automatically e-mailed to users with the Billing Account +// Administrator role or the Billing Account User role. +// The thresholds here have no effect on notifications sent to anything +// configured under `Budget.all_updates_rule`. +message ThresholdRule { + // The type of basis used to determine if spend has passed the threshold. + enum Basis { + // Unspecified threshold basis. + BASIS_UNSPECIFIED = 0; + + // Use current spend as the basis for comparison against the threshold. + CURRENT_SPEND = 1; + + // Use forecasted spend for the period as the basis for comparison against + // the threshold. + FORECASTED_SPEND = 2; + } + + // Required. Send an alert when this threshold is exceeded. + // This is a 1.0-based percentage, so 0.5 = 50%. + // Validation: non-negative number. + double threshold_percent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The type of basis used to determine if spend has passed the + // threshold. Behavior defaults to CURRENT_SPEND if not set. + Basis spend_basis = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// AllUpdatesRule defines notifications that are sent on every update to the +// billing account's spend, regardless of the thresholds defined using +// threshold rules. +message AllUpdatesRule { + // Required. The name of the Cloud Pub/Sub topic where budget related messages will be + // published, in the form `projects/{project_id}/topics/{topic_id}`. Updates + // are sent at regular intervals to the topic. + // The topic needs to be created before the budget is created; see + // https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications + // for more details. + // Caller is expected to have + // `pubsub.topics.setIamPolicy` permission on the topic when it's set for a + // budget, otherwise, the API call will fail with PERMISSION_DENIED. See + // https://cloud.google.com/pubsub/docs/access-control for more details on + // Pub/Sub roles and permissions. + string pubsub_topic = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The schema version of the notification. + // Only "1.0" is accepted. It represents the JSON schema as defined in + // https://cloud.google.com/billing/docs/how-to/budgets#notification_format + string schema_version = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A filter for a budget, limiting the scope of the cost to calculate. +message Filter { + // Specifies how credits should be treated when determining spend for + // threshold calculations. + enum CreditTypesTreatment { + CREDIT_TYPES_TREATMENT_UNSPECIFIED = 0; + + // All types of credit are subtracted from the gross cost to determine the + // spend for threshold calculations. + INCLUDE_ALL_CREDITS = 1; + + // All types of credit are added to the net cost to determine the spend for + // threshold calculations. + EXCLUDE_ALL_CREDITS = 2; + } + + // Optional. A set of projects of the form `projects/{project}`, + // specifying that usage from only this set of projects should be + // included in the budget. If omitted, the report will include all usage for + // the billing account, regardless of which project the usage occurred on. + // Only zero or one project can be specified currently. + repeated string projects = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. + CreditTypesTreatment credit_types_treatment = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A set of services of the form `services/{service_id}`, + // specifying that usage from only this set of services should be + // included in the budget. If omitted, the report will include usage for + // all the services. + // The service names are available through the Catalog API: + // https://cloud.google.com/billing/v1/how-tos/catalog-api. + repeated string services = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/google/cloud/billing/budgets/v1beta1/budget_service.proto b/google/cloud/billing/budgets/v1beta1/budget_service.proto new file mode 100644 index 000000000..ab2b0714c --- /dev/null +++ b/google/cloud/billing/budgets/v1beta1/budget_service.proto @@ -0,0 +1,174 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.billing.budgets.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/billing/budgets/v1beta1/budget_model.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/billing/budgets/v1beta1;budgets"; +option java_multiple_files = true; +option java_package = "com.google.cloud.billing.budgets.v1beta1"; + +// BudgetService stores Cloud Billing budgets, which define a +// budget plan and rules to execute as we track spend against that plan. +service BudgetService { + option (google.api.default_host) = "billingbudgets.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new budget. See + // Quotas and limits + // for more information on the limits of the number of budgets you can create. + rpc CreateBudget(CreateBudgetRequest) returns (Budget) { + option (google.api.http) = { + post: "/v1beta1/{parent=billingAccounts/*}/budgets" + body: "*" + }; + } + + // Updates a budget and returns the updated budget. + // + // WARNING: There are some fields exposed on the Google Cloud Console that + // aren’t available on this API. Budget fields that are not exposed in + // this API will not be changed by this method. + rpc UpdateBudget(UpdateBudgetRequest) returns (Budget) { + option (google.api.http) = { + patch: "/v1beta1/{budget.name=billingAccounts/*/budgets/*}" + body: "*" + }; + } + + // Returns a budget. + // + // WARNING: There are some fields exposed on the Google Cloud Console that + // aren’t available on this API. When reading from the API, you will not + // see these fields in the return value, though they may have been set + // in the Cloud Console. + rpc GetBudget(GetBudgetRequest) returns (Budget) { + option (google.api.http) = { + get: "/v1beta1/{name=billingAccounts/*/budgets/*}" + }; + } + + // Returns a list of budgets for a billing account. + // + // WARNING: There are some fields exposed on the Google Cloud Console that + // aren’t available on this API. When reading from the API, you will not + // see these fields in the return value, though they may have been set + // in the Cloud Console. + rpc ListBudgets(ListBudgetsRequest) returns (ListBudgetsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=billingAccounts/*}/budgets" + }; + } + + // Deletes a budget. Returns successfully if already deleted. + rpc DeleteBudget(DeleteBudgetRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=billingAccounts/*/budgets/*}" + }; + } +} + +// Request for CreateBudget +message CreateBudgetRequest { + // Required. The name of the billing account to create the budget in. Values + // are of the form `billingAccounts/{billingAccountId}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "billingbudgets.googleapis.com/Budget" + } + ]; + + // Required. Budget to create. + Budget budget = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for UpdateBudget +message UpdateBudgetRequest { + // Required. The updated budget object. + // The budget to update is specified by the budget name in the budget. + Budget budget = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates which fields in the provided budget to update. + // Read-only fields (such as `name`) cannot be changed. If this is not + // provided, then only fields with non-default values from the request are + // updated. See + // https://developers.google.com/protocol-buffers/docs/proto3#default for more + // details about default values. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for GetBudget +message GetBudgetRequest { + // Required. Name of budget to get. Values are of the form + // `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "billingbudgets.googleapis.com/Budget" + } + ]; +} + +// Request for ListBudgets +message ListBudgetsRequest { + // Required. Name of billing account to list budgets under. Values + // are of the form `billingAccounts/{billingAccountId}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "billingbudgets.googleapis.com/Budget" + } + ]; + + // Optional. The maximum number of budgets to return per page. + // The default and maximum value are 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value returned by the last `ListBudgetsResponse` which + // indicates that this is a continuation of a prior `ListBudgets` call, + // and that the system should return the next page of data. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for ListBudgets +message ListBudgetsResponse { + // List of the budgets owned by the requested billing account. + repeated Budget budgets = 1; + + // If not empty, indicates that there may be more budgets that match the + // request; this value should be passed in a new `ListBudgetsRequest`. + string next_page_token = 2; +} + +// Request for DeleteBudget +message DeleteBudgetRequest { + // Required. Name of the budget to delete. Values are of the form + // `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "billingbudgets.googleapis.com/Budget" + } + ]; +} diff --git a/google/cloud/billing/v1/BUILD.bazel b/google/cloud/billing/v1/BUILD.bazel new file mode 100644 index 000000000..e7b406a0a --- /dev/null +++ b/google/cloud/billing/v1/BUILD.bazel @@ -0,0 +1,373 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "billing_proto", + srcs = [ + "cloud_billing.proto", + "cloud_catalog.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/type:money_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "billing_proto_with_info", + deps = [ + ":billing_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "billing_java_proto", + deps = [":billing_proto"], +) + +java_grpc_library( + name = "billing_java_grpc", + srcs = [":billing_proto"], + deps = [":billing_java_proto"], +) + +java_gapic_library( + name = "billing_java_gapic", + src = ":billing_proto_with_info", + gapic_yaml = "cloud_billing_gapic.yaml", + package = "google.cloud.billing.v1", + service_yaml = "cloudbilling.yaml", + test_deps = [ + ":billing_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":billing_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "billing_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.billing.v1.CloudBillingClientTest", + "com.google.cloud.billing.v1.CloudCatalogClientTest", + ], + runtime_deps = [":billing_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-billing-v1-java", + deps = [ + ":billing_java_gapic", + ":billing_java_grpc", + ":billing_java_proto", + ":billing_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "billing_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/billing/v1", + protos = [":billing_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/type:money_go_proto", + ], +) + +go_gapic_library( + name = "billing_go_gapic", + srcs = [":billing_proto_with_info"], + grpc_service_config = "cloud_billing_grpc_service_config.json", + importpath = "cloud.google.com/go/billing/apiv1;billing", + service_yaml = "cloudbilling.yaml", + deps = [ + ":billing_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_test( + name = "billing_go_gapic_test", + srcs = [":billing_go_gapic_srcjar_test"], + embed = [":billing_go_gapic"], + importpath = "cloud.google.com/go/billing/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-billing-v1-go", + deps = [ + ":billing_go_gapic", + ":billing_go_gapic_srcjar-test.srcjar", + ":billing_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "billing_moved_proto", + srcs = [":billing_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/type:money_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "billing_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":billing_moved_proto"], +) + +py_grpc_library( + name = "billing_py_grpc", + srcs = [":billing_moved_proto"], + deps = [":billing_py_proto"], +) + +py_gapic_library( + name = "billing_py_gapic", + src = ":billing_proto_with_info", + gapic_yaml = "cloud_billing_gapic.yaml", + package = "google.cloud.billing.v1", + service_yaml = "cloudbilling.yaml", + deps = [ + ":billing_py_grpc", + ":billing_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "billing-v1-py", + deps = [ + ":billing_py_gapic", + ":billing_py_grpc", + ":billing_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "billing_php_proto", + deps = [":billing_proto"], +) + +php_grpc_library( + name = "billing_php_grpc", + srcs = [":billing_proto"], + deps = [":billing_php_proto"], +) + +php_gapic_library( + name = "billing_php_gapic", + src = ":billing_proto_with_info", + gapic_yaml = "cloud_billing_gapic.yaml", + package = "google.cloud.billing.v1", + service_yaml = "cloudbilling.yaml", + deps = [ + ":billing_php_grpc", + ":billing_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-billing-v1-php", + deps = [ + ":billing_php_gapic", + ":billing_php_grpc", + ":billing_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "billing_nodejs_gapic", + src = ":billing_proto_with_info", + gapic_yaml = "cloud_billing_gapic.yaml", + package = "google.cloud.billing.v1", + service_yaml = "cloudbilling.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "billing-v1-nodejs", + deps = [ + ":billing_nodejs_gapic", + ":billing_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "billing_ruby_proto", + deps = [":billing_proto"], +) + +ruby_grpc_library( + name = "billing_ruby_grpc", + srcs = [":billing_proto"], + deps = [":billing_ruby_proto"], +) + +ruby_gapic_library( + name = "billing_ruby_gapic", + src = ":billing_proto_with_info", + gapic_yaml = "cloud_billing_gapic.yaml", + package = "google.cloud.billing.v1", + service_yaml = "cloudbilling.yaml", + deps = [ + ":billing_ruby_grpc", + ":billing_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-billing-v1-ruby", + deps = [ + ":billing_ruby_gapic", + ":billing_ruby_grpc", + ":billing_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "billing_csharp_proto", + deps = [":billing_proto"], +) + +csharp_grpc_library( + name = "billing_csharp_grpc", + srcs = [":billing_proto"], + deps = [":billing_csharp_proto"], +) + +csharp_gapic_library( + name = "billing_csharp_gapic", + src = ":billing_proto_with_info", + gapic_yaml = "cloud_billing_gapic.yaml", + package = "google.cloud.billing.v1", + service_yaml = "cloudbilling.yaml", + deps = [ + ":billing_csharp_grpc", + ":billing_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-billing-v1-csharp", + deps = [ + ":billing_csharp_gapic", + ":billing_csharp_grpc", + ":billing_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/billing/v1/cloud_billing.proto b/google/cloud/billing/v1/cloud_billing.proto index 2985d4515..f0b19d14d 100644 --- a/google/cloud/billing/v1/cloud_billing.proto +++ b/google/cloud/billing/v1/cloud_billing.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,58 +11,102 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.billing.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/field_mask.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/billing/v1;billing"; option java_multiple_files = true; option java_outer_classname = "CloudBillingProto"; option java_package = "com.google.cloud.billing.v1"; -// Retrieves Google Cloud Console billing accounts and associates them with -// projects. +// Retrieves GCP Console billing accounts and associates them with projects. service CloudBilling { + option (google.api.default_host) = "cloudbilling.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Gets information about a billing account. The current authenticated user - // must be an [owner of the billing - // account](https://support.google.com/cloud/answer/4430947). + // must be a [viewer of the billing + // account](https://cloud.google.com/billing/docs/how-to/billing-access). rpc GetBillingAccount(GetBillingAccountRequest) returns (BillingAccount) { option (google.api.http) = { get: "/v1/{name=billingAccounts/*}" }; + option (google.api.method_signature) = "name"; } - // Lists the billing accounts that the current authenticated user - // [owns](https://support.google.com/cloud/answer/4430947). - rpc ListBillingAccounts(ListBillingAccountsRequest) - returns (ListBillingAccountsResponse) { + // Lists the billing accounts that the current authenticated user has + // permission to + // [view](https://cloud.google.com/billing/docs/how-to/billing-access). + rpc ListBillingAccounts(ListBillingAccountsRequest) returns (ListBillingAccountsResponse) { option (google.api.http) = { get: "/v1/billingAccounts" }; + option (google.api.method_signature) = ""; + } + + // Updates a billing account's fields. + // Currently the only field that can be edited is `display_name`. + // The current authenticated user must have the `billing.accounts.update` + // IAM permission, which is typically given to the + // [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) + // of the billing account. + rpc UpdateBillingAccount(UpdateBillingAccountRequest) returns (BillingAccount) { + option (google.api.http) = { + patch: "/v1/{name=billingAccounts/*}" + body: "account" + }; + option (google.api.method_signature) = "name,account"; + } + + // Creates a billing account. + // This method can only be used to create + // [billing subaccounts](https://cloud.google.com/billing/docs/concepts) + // by GCP resellers. + // When creating a subaccount, the current authenticated user must have the + // `billing.accounts.update` IAM permission on the master account, which is + // typically given to billing account + // [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). + // This method will return an error if the master account has not been + // provisioned as a reseller account. + rpc CreateBillingAccount(CreateBillingAccountRequest) returns (BillingAccount) { + option (google.api.http) = { + post: "/v1/billingAccounts" + body: "billing_account" + }; + option (google.api.method_signature) = "billing_account"; } // Lists the projects associated with a billing account. The current - // authenticated user must be an [owner of the billing - // account](https://support.google.com/cloud/answer/4430947). - rpc ListProjectBillingInfo(ListProjectBillingInfoRequest) - returns (ListProjectBillingInfoResponse) { + // authenticated user must have the `billing.resourceAssociations.list` IAM + // permission, which is often given to billing account + // [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). + rpc ListProjectBillingInfo(ListProjectBillingInfoRequest) returns (ListProjectBillingInfoResponse) { option (google.api.http) = { get: "/v1/{name=billingAccounts/*}/projects" }; + option (google.api.method_signature) = "name"; } // Gets the billing information for a project. The current authenticated user // must have [permission to view the // project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo // ). - rpc GetProjectBillingInfo(GetProjectBillingInfoRequest) - returns (ProjectBillingInfo) { + rpc GetProjectBillingInfo(GetProjectBillingInfoRequest) returns (ProjectBillingInfo) { option (google.api.http) = { get: "/v1/{name=projects/*}/billingInfo" }; + option (google.api.method_signature) = "name"; } // Sets or updates the billing account associated with a project. You specify @@ -74,14 +118,14 @@ service CloudBilling { // usage charges. // // *Note:* Incurred charges that have not yet been reported in the transaction - // history of the Google Cloud Console may be billed to the new billing + // history of the GCP Console might be billed to the new billing // account, even if the charge occurred before the new billing account was // assigned to the project. // // The current authenticated user must have ownership privileges for both the // [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo // ) and the [billing - // account](https://support.google.com/cloud/answer/4430947). + // account](https://cloud.google.com/billing/docs/how-to/billing-access). // // You can disable billing on the project by setting the // `billing_account_name` field to empty. This action disassociates the @@ -96,36 +140,79 @@ service CloudBilling { // resources used by the project will be shut down. Thus, unless you wish to // disable billing, you should always call this method with the name of an // *open* billing account. - rpc UpdateProjectBillingInfo(UpdateProjectBillingInfoRequest) - returns (ProjectBillingInfo) { + rpc UpdateProjectBillingInfo(UpdateProjectBillingInfoRequest) returns (ProjectBillingInfo) { option (google.api.http) = { put: "/v1/{name=projects/*}/billingInfo" body: "project_billing_info" }; + option (google.api.method_signature) = "name,project_billing_info"; + } + + // Gets the access control policy for a billing account. + // The caller must have the `billing.accounts.getIamPolicy` permission on the + // account, which is often given to billing account + // [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + get: "/v1/{resource=billingAccounts/*}:getIamPolicy" + }; + option (google.api.method_signature) = "resource"; + } + + // Sets the access control policy for a billing account. Replaces any existing + // policy. + // The caller must have the `billing.accounts.setIamPolicy` permission on the + // account, which is often given to billing account + // [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=billingAccounts/*}:setIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource,policy"; + } + + // Tests the access control policy for a billing account. This method takes + // the resource and a set of permissions as input and returns the subset of + // the input permissions that the caller is allowed for that resource. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=billingAccounts/*}:testIamPermissions" + body: "*" + }; + option (google.api.method_signature) = "resource,permissions"; } } -// A billing account in [Google Cloud -// Console](https://console.cloud.google.com/). You can assign a billing account -// to one or more projects. +// A billing account in [GCP Console](https://console.cloud.google.com/). +// You can assign a billing account to one or more projects. message BillingAccount { // The resource name of the billing account. The resource name has the form // `billingAccounts/{billing_account_id}`. For example, // `billingAccounts/012345-567890-ABCDEF` would be the resource name for // billing account `012345-567890-ABCDEF`. - string name = 1; + string name = 1 [(google.api.resource_reference) = { + type: "cloudbilling.googleapis.com/BillingAccount" + }]; - // True if the billing account is open, and will therefore be charged for any + // Output only. True if the billing account is open, and will therefore be charged for any // usage on associated projects. False if the billing account is closed, and // therefore projects associated with it will be unable to use paid services. - bool open = 2; + bool open = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // The display name given to the billing account, such as `My Billing - // Account`. This name is displayed in the Google Cloud Console. + // Account`. This name is displayed in the GCP Console. string display_name = 3; + + // If this account is a + // [subaccount](https://cloud.google.com/billing/docs/concepts), then this + // will be the resource name of the master billing account that it is being + // resold through. + // Otherwise this will be empty. + string master_billing_account = 4; } -// Encapsulation of billing information for a Cloud Console project. A project +// Encapsulation of billing information for a GCP Console project. A project // has at most one associated billing account at a time (but a billing account // can be assigned to multiple projects). message ProjectBillingInfo { @@ -153,9 +240,14 @@ message ProjectBillingInfo { // Request message for `GetBillingAccount`. message GetBillingAccountRequest { - // The resource name of the billing account to retrieve. For example, + // Required. The resource name of the billing account to retrieve. For example, // `billingAccounts/012345-567890-ABCDEF`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbilling.googleapis.com/BillingAccount" + } + ]; } // Request message for `ListBillingAccounts`. @@ -168,6 +260,14 @@ message ListBillingAccountsRequest { // `next_page_token` value returned from a previous `ListBillingAccounts` // call. If unspecified, the first page of results is returned. string page_token = 2; + + // Options for how to filter the returned billing accounts. + // Currently this only supports filtering for + // [subaccounts](https://cloud.google.com/billing/docs/concepts) under a + // single provided reseller billing account. + // (e.g. "master_billing_account=billingAccounts/012345-678901-ABCDEF"). + // Boolean algebra and other fields are not currently supported. + string filter = 3; } // Response message for `ListBillingAccounts`. @@ -181,11 +281,43 @@ message ListBillingAccountsResponse { string next_page_token = 2; } +// Request message for `CreateBillingAccount`. +message CreateBillingAccountRequest { + // Required. The billing account resource to create. + // Currently CreateBillingAccount only supports subaccount creation, so + // any created billing accounts must be under a provided master billing + // account. + BillingAccount billing_account = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `UpdateBillingAccount`. +message UpdateBillingAccountRequest { + // Required. The name of the billing account resource to be updated. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbilling.googleapis.com/BillingAccount" + } + ]; + + // Required. The billing account resource to replace the resource on the server. + BillingAccount account = 2 [(google.api.field_behavior) = REQUIRED]; + + // The update mask applied to the resource. + // Only "display_name" is currently supported. + google.protobuf.FieldMask update_mask = 3; +} + // Request message for `ListProjectBillingInfo`. message ListProjectBillingInfoRequest { - // The resource name of the billing account associated with the projects that + // Required. The resource name of the billing account associated with the projects that // you want to list. For example, `billingAccounts/012345-567890-ABCDEF`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbilling.googleapis.com/BillingAccount" + } + ]; // Requested page size. The maximum page size is 100; this is also the // default. @@ -211,18 +343,18 @@ message ListProjectBillingInfoResponse { // Request message for `GetProjectBillingInfo`. message GetProjectBillingInfoRequest { - // The resource name of the project for which billing information is + // Required. The resource name of the project for which billing information is // retrieved. For example, `projects/tokyo-rain-123`. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for `UpdateProjectBillingInfo`. message UpdateProjectBillingInfoRequest { - // The resource name of the project associated with the billing information + // Required. The resource name of the project associated with the billing information // that you want to update. For example, `projects/tokyo-rain-123`. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // The new billing information for the project. Read-only fields are ignored; - // thus, you may leave empty all fields except `billing_account_name`. + // thus, you can leave empty all fields except `billing_account_name`. ProjectBillingInfo project_billing_info = 2; } diff --git a/google/cloud/billing/v1/cloud_billing_gapic.yaml b/google/cloud/billing/v1/cloud_billing_gapic.yaml new file mode 100644 index 000000000..66d708ced --- /dev/null +++ b/google/cloud/billing/v1/cloud_billing_gapic.yaml @@ -0,0 +1,19 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.billing.v1 + python: + package_name: google.cloud.billing_v1.gapic + go: + package_name: cloud.google.com/go/billing/apiv1 + csharp: + package_name: Google.Cloud.Billing.V1 + ruby: + package_name: Google::Cloud::Billing::V1 + php: + package_name: Google\Cloud\Billing\V1 + nodejs: + package_name: billing.v1 + domain_layer_location: google-cloud diff --git a/google/cloud/billing/v1/cloud_billing_grpc_service_config.json b/google/cloud/billing/v1/cloud_billing_grpc_service_config.json new file mode 100644 index 000000000..c78eb4d68 --- /dev/null +++ b/google/cloud/billing/v1/cloud_billing_grpc_service_config.json @@ -0,0 +1,64 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.billing.v1.CloudBilling", + "method": "CreateBillingAccount" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.billing.v1.CloudBilling", + "method": "GetBillingAccount" + }, + { + "service": "google.cloud.billing.v1.CloudBilling", + "method": "ListBillingAccounts" + }, + { + "service": "google.cloud.billing.v1.CloudBilling", + "method": "UpdateBillingAccount" + }, + { + "service": "google.cloud.billing.v1.CloudBilling", + "method": "ListProjectBillingInfo" + }, + { + "service": "google.cloud.billing.v1.CloudBilling", + "method": "GetProjectBillingInfo" + }, + { + "service": "google.cloud.billing.v1.CloudBilling", + "method": "UpdateProjectBillingInfo" + }, + { + "service": "google.cloud.billing.v1.CloudBilling", + "method": "GetIamPolicy" + }, + { + "service": "google.cloud.billing.v1.CloudBilling", + "method": "SetIamPolicy" + }, + { + "service": "google.cloud.billing.v1.CloudBilling", + "method": "TestIamPermissions" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/billing/v1/cloud_catalog.proto b/google/cloud/billing/v1/cloud_catalog.proto new file mode 100644 index 000000000..7bc2f14e3 --- /dev/null +++ b/google/cloud/billing/v1/cloud_catalog.proto @@ -0,0 +1,331 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.billing.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/money.proto"; + +option csharp_namespace = "Google.Cloud.Billing.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/billing/v1;billing"; +option java_multiple_files = true; +option java_outer_classname = "CloudCatalogProto"; +option java_package = "com.google.cloud.billing.v1"; +option objc_class_prefix = "CLDCTLG"; + +// A catalog of Google Cloud Platform services and SKUs. +// Provides pricing information and metadata on Google Cloud Platform services +// and SKUs. +service CloudCatalog { + option (google.api.default_host) = "cloudbilling.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all public cloud services. + rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { + option (google.api.http) = { + get: "/v1/services" + }; + option (google.api.method_signature) = ""; + } + + // Lists all publicly available SKUs for a given cloud service. + rpc ListSkus(ListSkusRequest) returns (ListSkusResponse) { + option (google.api.http) = { + get: "/v1/{parent=services/*}/skus" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Encapsulates a single service in Google Cloud Platform. +message Service { + option (google.api.resource) = { + type: "cloudbilling.googleapis.com/Service" + pattern: "services/{service}" + }; + + // The resource name for the service. + // Example: "services/DA34-426B-A397" + string name = 1; + + // The identifier for the service. + // Example: "DA34-426B-A397" + string service_id = 2; + + // A human readable display name for this service. + string display_name = 3; + + // The business under which the service is offered. + // Ex. "businessEntities/GCP", "businessEntities/Maps" + string business_entity_name = 4; +} + +// Encapsulates a single SKU in Google Cloud Platform +message Sku { + option (google.api.resource) = { + type: "cloudbilling.googleapis.com/Sku" + pattern: "services/{service}/skus/{sku}" + }; + + // The resource name for the SKU. + // Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE" + string name = 1; + + // The identifier for the SKU. + // Example: "AA95-CD31-42FE" + string sku_id = 2; + + // A human readable description of the SKU, has a maximum length of 256 + // characters. + string description = 3; + + // The category hierarchy of this SKU, purely for organizational purpose. + Category category = 4; + + // List of service regions this SKU is offered at. + // Example: "asia-east1" + // Service regions can be found at https://cloud.google.com/about/locations/ + repeated string service_regions = 5; + + // A timeline of pricing info for this SKU in chronological order. + repeated PricingInfo pricing_info = 6; + + // Identifies the service provider. + // This is 'Google' for first party services in Google Cloud Platform. + string service_provider_name = 7; +} + +// Represents the category hierarchy of a SKU. +message Category { + // The display name of the service this SKU belongs to. + string service_display_name = 1; + + // The type of product the SKU refers to. + // Example: "Compute", "Storage", "Network", "ApplicationServices" etc. + string resource_family = 2; + + // A group classification for related SKUs. + // Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. + string resource_group = 3; + + // Represents how the SKU is consumed. + // Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. + string usage_type = 4; +} + +// Represents the pricing information for a SKU at a single point of time. +message PricingInfo { + // The timestamp from which this pricing was effective within the requested + // time range. This is guaranteed to be greater than or equal to the + // start_time field in the request and less than the end_time field in the + // request. If a time range was not specified in the request this field will + // be equivalent to a time within the last 12 hours, indicating the latest + // pricing info. + google.protobuf.Timestamp effective_time = 1; + + // An optional human readable summary of the pricing information, has a + // maximum length of 256 characters. + string summary = 2; + + // Expresses the pricing formula. See `PricingExpression` for an example. + PricingExpression pricing_expression = 3; + + // Aggregation Info. This can be left unspecified if the pricing expression + // doesn't require aggregation. + AggregationInfo aggregation_info = 4; + + // Conversion rate used for currency conversion, from USD to the currency + // specified in the request. This includes any surcharge collected for billing + // in non USD currency. If a currency is not specified in the request this + // defaults to 1.0. + // Example: USD * currency_conversion_rate = JPY + double currency_conversion_rate = 5; +} + +// Expresses a mathematical pricing formula. For Example:- +// +// `usage_unit: GBy` +// `tiered_rates:` +// `[start_usage_amount: 20, unit_price: $10]` +// `[start_usage_amount: 100, unit_price: $5]` +// +// The above expresses a pricing formula where the first 20GB is free, the +// next 80GB is priced at $10 per GB followed by $5 per GB for additional +// usage. +message PricingExpression { + // The price rate indicating starting usage and its corresponding price. + message TierRate { + // Usage is priced at this rate only after this amount. + // Example: start_usage_amount of 10 indicates that the usage will be priced + // at the unit_price after the first 10 usage_units. + double start_usage_amount = 1; + + // The price per unit of usage. + // Example: unit_price of amount $10 indicates that each unit will cost $10. + google.type.Money unit_price = 2; + } + + // The short hand for unit of usage this pricing is specified in. + // Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". + string usage_unit = 1; + + // The unit of usage in human readable form. + // Example: "gibi byte". + string usage_unit_description = 4; + + // The base unit for the SKU which is the unit used in usage exports. + // Example: "By" + string base_unit = 5; + + // The base unit in human readable form. + // Example: "byte". + string base_unit_description = 6; + + // Conversion factor for converting from price per usage_unit to price per + // base_unit, and start_usage_amount to start_usage_amount in base_unit. + // unit_price / base_unit_conversion_factor = price per base_unit. + // start_usage_amount * base_unit_conversion_factor = start_usage_amount in + // base_unit. + double base_unit_conversion_factor = 7; + + // The recommended quantity of units for displaying pricing info. When + // displaying pricing info it is recommended to display: + // (unit_price * display_quantity) per display_quantity usage_unit. + // This field does not affect the pricing formula and is for display purposes + // only. + // Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and + // the display_quantity is "1000" then the recommended way of displaying the + // pricing info is "0.10 USD per 1000 GB" + double display_quantity = 2; + + // The list of tiered rates for this pricing. The total cost is computed by + // applying each of the tiered rates on usage. This repeated list is sorted + // by ascending order of start_usage_amount. + repeated TierRate tiered_rates = 3; +} + +// Represents the aggregation level and interval for pricing of a single SKU. +message AggregationInfo { + // The level at which usage is aggregated to compute cost. + // Example: "ACCOUNT" aggregation level indicates that usage for tiered + // pricing is aggregated across all projects in a single account. + enum AggregationLevel { + AGGREGATION_LEVEL_UNSPECIFIED = 0; + + ACCOUNT = 1; + + PROJECT = 2; + } + + // The interval at which usage is aggregated to compute cost. + // Example: "MONTHLY" aggregation interval indicates that usage for tiered + // pricing is aggregated every month. + enum AggregationInterval { + AGGREGATION_INTERVAL_UNSPECIFIED = 0; + + DAILY = 1; + + MONTHLY = 2; + } + + AggregationLevel aggregation_level = 1; + + AggregationInterval aggregation_interval = 2; + + // The number of intervals to aggregate over. + // Example: If aggregation_level is "DAILY" and aggregation_count is 14, + // aggregation will be over 14 days. + int32 aggregation_count = 3; +} + +// Request message for `ListServices`. +message ListServicesRequest { + // Requested page size. Defaults to 5000. + int32 page_size = 1; + + // A token identifying a page of results to return. This should be a + // `next_page_token` value returned from a previous `ListServices` + // call. If unspecified, the first page of results is returned. + string page_token = 2; +} + +// Response message for `ListServices`. +message ListServicesResponse { + // A list of services. + repeated Service services = 1; + + // A token to retrieve the next page of results. To retrieve the next page, + // call `ListServices` again with the `page_token` field set to this + // value. This field is empty if there are no more results to retrieve. + string next_page_token = 2; +} + +// Request message for `ListSkus`. +message ListSkusRequest { + // Required. The name of the service. + // Example: "services/DA34-426B-A397" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbilling.googleapis.com/Service" + } + ]; + + // Optional inclusive start time of the time range for which the pricing + // versions will be returned. Timestamps in the future are not allowed. + // The time range has to be within a single calendar month in + // America/Los_Angeles timezone. Time range as a whole is optional. If not + // specified, the latest pricing will be returned (up to 12 hours old at + // most). + google.protobuf.Timestamp start_time = 2; + + // Optional exclusive end time of the time range for which the pricing + // versions will be returned. Timestamps in the future are not allowed. + // The time range has to be within a single calendar month in + // America/Los_Angeles timezone. Time range as a whole is optional. If not + // specified, the latest pricing will be returned (up to 12 hours old at + // most). + google.protobuf.Timestamp end_time = 3; + + // The ISO 4217 currency code for the pricing info in the response proto. + // Will use the conversion rate as of start_time. + // Optional. If not specified USD will be used. + string currency_code = 4; + + // Requested page size. Defaults to 5000. + int32 page_size = 5; + + // A token identifying a page of results to return. This should be a + // `next_page_token` value returned from a previous `ListSkus` + // call. If unspecified, the first page of results is returned. + string page_token = 6; +} + +// Response message for `ListSkus`. +message ListSkusResponse { + // The list of public SKUs of the given service. + repeated Sku skus = 1; + + // A token to retrieve the next page of results. To retrieve the next page, + // call `ListSkus` again with the `page_token` field set to this + // value. This field is empty if there are no more results to retrieve. + string next_page_token = 2; +} diff --git a/google/cloud/billing/v1/cloud_catalog_grpc_service_config.json b/google/cloud/billing/v1/cloud_catalog_grpc_service_config.json new file mode 100644 index 000000000..188fd0479 --- /dev/null +++ b/google/cloud/billing/v1/cloud_catalog_grpc_service_config.json @@ -0,0 +1,17 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.billing.v1.CloudCatalog", + "method": "ListServices" + }, + { + "service": "google.cloud.billing.v1.CloudCatalog", + "method": "ListSkus" + } + ], + "timeout": "60s" + } + ] +} diff --git a/google/cloud/billing/v1/cloudbilling.yaml b/google/cloud/billing/v1/cloudbilling.yaml new file mode 100644 index 000000000..fb0e32e1b --- /dev/null +++ b/google/cloud/billing/v1/cloudbilling.yaml @@ -0,0 +1,28 @@ +type: google.api.Service +config_version: 1 +name: cloudbilling.googleapis.com +title: Cloud Billing API + +apis: +- name: google.cloud.billing.v1.CloudBilling +- name: google.cloud.billing.v1.CloudCatalog + +documentation: + summary: |- + Allows developers to manage billing for their Google Cloud Platform + projects programmatically. + +authentication: + rules: + - selector: 'google.cloud.billing.v1.CloudBilling.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.billing.v1.CloudCatalog.ListServices + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.billing.v1.CloudCatalog.ListSkus + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/binaryauthorization/artman_binaryauthorization_v1beta1.yaml b/google/cloud/binaryauthorization/artman_binaryauthorization_v1beta1.yaml index 036c547ff..07d27f08a 100644 --- a/google/cloud/binaryauthorization/artman_binaryauthorization_v1beta1.yaml +++ b/google/cloud/binaryauthorization/artman_binaryauthorization_v1beta1.yaml @@ -6,8 +6,9 @@ common: - name: google-common-protos src_proto_paths: - v1beta1 - service_yaml: binaryauthorization_v1beta1.yaml + service_yaml: v1beta1/binaryauthorization_v1beta1.yaml gapic_yaml: v1beta1/binaryauthorization_gapic.yaml + proto_package: google.cloud.binaryauthorization.v1beta1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/binaryauthorization/v1beta1/BUILD.bazel b/google/cloud/binaryauthorization/v1beta1/BUILD.bazel new file mode 100644 index 000000000..c3e3dbb26 --- /dev/null +++ b/google/cloud/binaryauthorization/v1beta1/BUILD.bazel @@ -0,0 +1,362 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "binaryauthorization_proto", + srcs = [ + "resources.proto", + "service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "binaryauthorization_proto_with_info", + deps = [ + ":binaryauthorization_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "binaryauthorization_java_proto", + deps = [":binaryauthorization_proto"], +) + +java_grpc_library( + name = "binaryauthorization_java_grpc", + srcs = [":binaryauthorization_proto"], + deps = [":binaryauthorization_java_proto"], +) + +# Uncomment, once java file level options are included in the protos +#java_gapic_library( +# name = "binaryauthorization_java_gapic", +# src = ":binaryauthorization_proto_with_info", +# gapic_yaml = "binaryauthorization_gapic.yaml", +# package = "google.cloud.binaryauthorization.v1beta1", +# service_yaml = "binaryauthorization_v1beta1.yaml", +# test_deps = [ +# ":binaryauthorization_java_grpc", +# ], +# deps = [ +# ":binaryauthorization_java_proto", +# ], +#) +# +#java_gapic_test( +# name = "binaryauthorization_java_gapic_test_suite", +# test_classes = [ +# "com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1ClientTest", +# ], +# runtime_deps = [":binaryauthorization_java_gapic_test"], +#) +# +## Open Source Packages +#java_gapic_assembly_gradle_pkg( +# name = "google-cloud-binaryauthorization-v1beta1-java", +# deps = [ +# ":binaryauthorization_java_gapic", +# ":binaryauthorization_java_grpc", +# ":binaryauthorization_java_proto", +# ":binaryauthorization_proto", +# ], +#) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "binaryauthorization_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1beta1", + protos = [":binaryauthorization_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "binaryauthorization_go_gapic", + srcs = [":binaryauthorization_proto_with_info"], + grpc_service_config = "binaryauthorization_grpc_service_config.json", + importpath = "cloud.google.com/go/binaryauthorization/apiv1beta1;binaryauthorization", + service_yaml = "binaryauthorization_v1beta1.yaml", + deps = [ + ":binaryauthorization_go_proto", + ], +) + +go_test( + name = "binaryauthorization_go_gapic_test", + srcs = [":binaryauthorization_go_gapic_srcjar_test"], + embed = [":binaryauthorization_go_gapic"], + importpath = "cloud.google.com/go/binaryauthorization/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-binaryauthorization-v1beta1-go", + deps = [ + ":binaryauthorization_go_gapic", + ":binaryauthorization_go_gapic_srcjar-test.srcjar", + ":binaryauthorization_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "binaryauthorization_moved_proto", + srcs = [":binaryauthorization_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "binaryauthorization_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":binaryauthorization_moved_proto"], +) + +py_grpc_library( + name = "binaryauthorization_py_grpc", + srcs = [":binaryauthorization_moved_proto"], + deps = [":binaryauthorization_py_proto"], +) + +py_gapic_library( + name = "binaryauthorization_py_gapic", + src = ":binaryauthorization_proto_with_info", + gapic_yaml = "binaryauthorization_gapic.yaml", + package = "google.cloud.binaryauthorization.v1beta1", + service_yaml = "binaryauthorization_v1beta1.yaml", + deps = [ + ":binaryauthorization_py_grpc", + ":binaryauthorization_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "binaryauthorization-v1beta1-py", + deps = [ + ":binaryauthorization_py_gapic", + ":binaryauthorization_py_grpc", + ":binaryauthorization_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "binaryauthorization_php_proto", + deps = [":binaryauthorization_proto"], +) + +php_grpc_library( + name = "binaryauthorization_php_grpc", + srcs = [":binaryauthorization_proto"], + deps = [":binaryauthorization_php_proto"], +) + +php_gapic_library( + name = "binaryauthorization_php_gapic", + src = ":binaryauthorization_proto_with_info", + gapic_yaml = "binaryauthorization_gapic.yaml", + package = "google.cloud.binaryauthorization.v1beta1", + service_yaml = "binaryauthorization_v1beta1.yaml", + deps = [ + ":binaryauthorization_php_grpc", + ":binaryauthorization_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-binaryauthorization-v1beta1-php", + deps = [ + ":binaryauthorization_php_gapic", + ":binaryauthorization_php_grpc", + ":binaryauthorization_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "binaryauthorization_nodejs_gapic", + src = ":binaryauthorization_proto_with_info", + gapic_yaml = "binaryauthorization_gapic.yaml", + package = "google.cloud.binaryauthorization.v1beta1", + service_yaml = "binaryauthorization_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "binaryauthorization-v1beta1-nodejs", + deps = [ + ":binaryauthorization_nodejs_gapic", + ":binaryauthorization_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "binaryauthorization_ruby_proto", + deps = [":binaryauthorization_proto"], +) + +ruby_grpc_library( + name = "binaryauthorization_ruby_grpc", + srcs = [":binaryauthorization_proto"], + deps = [":binaryauthorization_ruby_proto"], +) + +ruby_gapic_library( + name = "binaryauthorization_ruby_gapic", + src = ":binaryauthorization_proto_with_info", + gapic_yaml = "binaryauthorization_gapic.yaml", + package = "google.cloud.binaryauthorization.v1beta1", + service_yaml = "binaryauthorization_v1beta1.yaml", + deps = [ + ":binaryauthorization_ruby_grpc", + ":binaryauthorization_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-binaryauthorization-v1beta1-ruby", + deps = [ + ":binaryauthorization_ruby_gapic", + ":binaryauthorization_ruby_grpc", + ":binaryauthorization_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "binaryauthorization_csharp_proto", + deps = [":binaryauthorization_proto"], +) + +csharp_grpc_library( + name = "binaryauthorization_csharp_grpc", + srcs = [":binaryauthorization_proto"], + deps = [":binaryauthorization_csharp_proto"], +) + +csharp_gapic_library( + name = "binaryauthorization_csharp_gapic", + src = ":binaryauthorization_proto_with_info", + gapic_yaml = "binaryauthorization_gapic.yaml", + package = "google.cloud.binaryauthorization.v1beta1", + service_yaml = "binaryauthorization_v1beta1.yaml", + deps = [ + ":binaryauthorization_csharp_grpc", + ":binaryauthorization_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-binaryauthorization-v1beta1-csharp", + deps = [ + ":binaryauthorization_csharp_gapic", + ":binaryauthorization_csharp_grpc", + ":binaryauthorization_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/binaryauthorization/v1beta1/binaryauthorization_gapic.legacy.yaml b/google/cloud/binaryauthorization/v1beta1/binaryauthorization_gapic.legacy.yaml new file mode 100644 index 000000000..24a87ee79 --- /dev/null +++ b/google/cloud/binaryauthorization/v1beta1/binaryauthorization_gapic.legacy.yaml @@ -0,0 +1,197 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.binaryauthorization.v1beta1 + python: + package_name: google.cloud.binaryauthorization_v1beta1.gapic + go: + package_name: cloud.google.com/go/binaryauthorization/apiv1beta1 + csharp: + package_name: Google.Cloud.Binaryauthorization.V1beta1 + ruby: + package_name: Google::Cloud::Binaryauthorization::V1beta1 + php: + package_name: Google\Cloud\Binaryauthorization\V1beta1 + nodejs: + package_name: binaryauthorization.v1beta1 +# A list of API interface configurations. +interfaces: +- name: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1 + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + - name_pattern: projects/{project}/attestors/{attestor} + entity_name: attestor + - name_pattern: projects/{project}/policy + entity_name: project_policy + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: GetPolicy + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: project_policy + timeout_millis: 60000 + - name: UpdatePolicy + flattening: + groups: + - parameters: + - policy + required_fields: + - policy + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + policy.name: project_policy + timeout_millis: 60000 + - name: CreateAttestor + flattening: + groups: + - parameters: + - parent + - attestor_id + - attestor + required_fields: + - parent + - attestor_id + - attestor + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: GetAttestor + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: attestor + timeout_millis: 60000 + - name: UpdateAttestor + flattening: + groups: + - parameters: + - attestor + required_fields: + - attestor + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + attestor.name: attestor + timeout_millis: 60000 + - name: ListAttestors + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: attestors + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: DeleteAttestor + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: attestor + timeout_millis: 60000 diff --git a/google/cloud/binaryauthorization/v1beta1/binaryauthorization_gapic.yaml b/google/cloud/binaryauthorization/v1beta1/binaryauthorization_gapic.yaml index 16dbce7ea..7c7b177a2 100644 --- a/google/cloud/binaryauthorization/v1beta1/binaryauthorization_gapic.yaml +++ b/google/cloud/binaryauthorization/v1beta1/binaryauthorization_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -16,183 +16,3 @@ language_settings: package_name: Google\Cloud\Binaryauthorization\V1beta1 nodejs: package_name: binaryauthorization.v1beta1 -# A list of API interface configurations. -interfaces: -# The fully qualified name of the API interface. -- name: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1 - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - - name_pattern: projects/{project}/attestors/{attestor} - entity_name: attestor - - name_pattern: projects/{project}/policy - entity_name: project_policy - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: GetPolicy - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: project_policy - timeout_millis: 60000 - - name: UpdatePolicy - flattening: - groups: - - parameters: - - policy - required_fields: - - policy - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - policy.name: project_policy - timeout_millis: 60000 - - name: CreateAttestor - flattening: - groups: - - parameters: - - parent - - attestor_id - - attestor - required_fields: - - parent - - attestor_id - - attestor - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - - name: GetAttestor - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: attestor - timeout_millis: 60000 - - name: UpdateAttestor - flattening: - groups: - - parameters: - - attestor - required_fields: - - attestor - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - attestor.name: attestor - timeout_millis: 60000 - - name: ListAttestors - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: attestors - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - - name: DeleteAttestor - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: attestor - timeout_millis: 60000 diff --git a/google/cloud/binaryauthorization/v1beta1/binaryauthorization_grpc_service_config.json b/google/cloud/binaryauthorization/v1beta1/binaryauthorization_grpc_service_config.json new file mode 100755 index 000000000..6da9842f4 --- /dev/null +++ b/google/cloud/binaryauthorization/v1beta1/binaryauthorization_grpc_service_config.json @@ -0,0 +1,51 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1", + "method": "GetPolicy" + }, + { + "service": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1", + "method": "UpdatePolicy" + }, + { + "service": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1", + "method": "GetAttestor" + }, + { + "service": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1", + "method": "UpdateAttestor" + }, + { + "service": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1", + "method": "ListAttestors" + }, + { + "service": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1", + "method": "DeleteAttestor" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1", + "method": "CreateAttestor" + } + ], + "timeout": "600s" + } + ] +} diff --git a/google/cloud/binaryauthorization/binaryauthorization_v1beta1.yaml b/google/cloud/binaryauthorization/v1beta1/binaryauthorization_v1beta1.yaml similarity index 68% rename from google/cloud/binaryauthorization/binaryauthorization_v1beta1.yaml rename to google/cloud/binaryauthorization/v1beta1/binaryauthorization_v1beta1.yaml index d2143b3e2..4405518b0 100644 --- a/google/cloud/binaryauthorization/binaryauthorization_v1beta1.yaml +++ b/google/cloud/binaryauthorization/v1beta1/binaryauthorization_v1beta1.yaml @@ -21,6 +21,9 @@ documentation: Sets the access control policy on the specified resource. Replaces any existing policy. + Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and + PERMISSION_DENIED + - selector: google.iam.v1.IAMPolicy.TestIamPermissions description: |- Returns permissions that a caller has on the specified resource. If the @@ -31,25 +34,6 @@ documentation: permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. -http: - rules: - - selector: google.iam.v1.IAMPolicy.GetIamPolicy - get: '/v1beta1/{resource=projects/*/policy}:getIamPolicy' - additional_bindings: - - get: '/v1beta1/{resource=projects/*/attestors/*}:getIamPolicy' - - selector: google.iam.v1.IAMPolicy.SetIamPolicy - post: '/v1beta1/{resource=projects/*/policy}:setIamPolicy' - body: '*' - additional_bindings: - - post: '/v1beta1/{resource=projects/*/attestors/*}:setIamPolicy' - body: '*' - - selector: google.iam.v1.IAMPolicy.TestIamPermissions - post: '/v1beta1/{resource=projects/*/policy}:testIamPermissions' - body: '*' - additional_bindings: - - post: '/v1beta1/{resource=projects/*/attestors/*}:testIamPermissions' - body: '*' - authentication: rules: - selector: 'google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.*' diff --git a/google/cloud/binaryauthorization/v1beta1/resources.proto b/google/cloud/binaryauthorization/v1beta1/resources.proto index 909ba9551..682500500 100644 --- a/google/cloud/binaryauthorization/v1beta1/resources.proto +++ b/google/cloud/binaryauthorization/v1beta1/resources.proto @@ -17,14 +17,21 @@ syntax = "proto3"; package google.cloud.binaryauthorization.v1beta1; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1beta1;binaryauthorization"; // A [policy][google.cloud.binaryauthorization.v1beta1.Policy] for container image binary authorization. message Policy { + option (google.api.resource) = { + type: "binaryauthorization.googleapis.com/Policy" + pattern: "projects/{project}/policy" + }; + enum GlobalPolicyEvaluationMode { // Not specified: DISABLE is assumed. GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; @@ -38,21 +45,21 @@ message Policy { // Output only. The resource name, in the format `projects/*/policy`. There is // at most one policy per project. - string name = 1; + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. A descriptive comment. - string description = 6; + string description = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. Controls the evaluation of a Google-maintained global admission // policy for common system-level images. Images not covered by the global // policy will be subject to the project admission policy. This setting // has no effect when specified inside a global admission policy. - GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7; + GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. Admission policy whitelisting. A matching admission request will // always be permitted. This feature is typically used to exclude Google or // third-party infrastructure images from Binary Authorization policies. - repeated AdmissionWhitelistPattern admission_whitelist_patterns = 2; + repeated AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Per-cluster admission rules. Cluster spec format: // `location.clusterId`. There can be at most one admission rule per cluster @@ -61,14 +68,14 @@ message Policy { // (e.g. us-central1). // For `clusterId` syntax restrictions see // https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. - map cluster_admission_rules = 3; + map cluster_admission_rules = 3 [(google.api.field_behavior) = OPTIONAL]; // Required. Default admission rule for a cluster without a per-cluster, per- // kubernetes-service-account, or per-istio-service-identity admission rule. - AdmissionRule default_admission_rule = 4; + AdmissionRule default_admission_rule = 4 [(google.api.field_behavior) = REQUIRED]; // Output only. Time when the policy was last updated. - google.protobuf.Timestamp update_time = 5; + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } // An [admission whitelist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] exempts images @@ -119,7 +126,7 @@ message AdmissionRule { } // Required. How this admission rule will be evaluated. - EvaluationMode evaluation_mode = 1; + EvaluationMode evaluation_mode = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The resource names of the attestors that must attest to // a container image, in the format `projects/*/attestors/*`. Each @@ -129,23 +136,28 @@ message AdmissionRule { // // Note: this field must be non-empty when the evaluation_mode field specifies // REQUIRE_ATTESTATION, otherwise it must be empty. - repeated string require_attestations_by = 2; + repeated string require_attestations_by = 2 [(google.api.field_behavior) = OPTIONAL]; // Required. The action when a pod creation is denied by the admission rule. - EnforcementMode enforcement_mode = 3; + EnforcementMode enforcement_mode = 3 [(google.api.field_behavior) = REQUIRED]; } // An [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests to container image // artifacts. An existing attestor cannot be modified except where // indicated. message Attestor { + option (google.api.resource) = { + type: "binaryauthorization.googleapis.com/Attestor" + pattern: "projects/{project}/attestors/{attestor}" + }; + // Required. The resource name, in the format: // `projects/*/attestors/*`. This field may not be updated. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A descriptive comment. This field may be updated. // The field may be displayed in chooser dialogs. - string description = 6; + string description = 6 [(google.api.field_behavior) = OPTIONAL]; // Required. Identifies an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests to a // container image artifact. This determines how an attestation will @@ -158,7 +170,7 @@ message Attestor { } // Output only. Time when the attestor was last updated. - google.protobuf.Timestamp update_time = 4; + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // An [user owned drydock note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote] references a Drydock @@ -171,7 +183,7 @@ message UserOwnedDrydockNote { // An attestation by this attestor is stored as a Drydock // ATTESTATION_AUTHORITY Occurrence that names a container image and that // links to this Note. Drydock is an external dependency. - string note_reference = 1; + string note_reference = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Public keys that verify attestations signed by this // attestor. This field may be updated. @@ -182,7 +194,7 @@ message UserOwnedDrydockNote { // // If this field is empty, this attestor always returns that no // valid attestations exist. - repeated AttestorPublicKey public_keys = 2; + repeated AttestorPublicKey public_keys = 2 [(google.api.field_behavior) = OPTIONAL]; // Output only. This field will contain the service account email address // that this Attestor will use as the principal when querying Container @@ -193,7 +205,7 @@ message UserOwnedDrydockNote { // This email address is fixed for the lifetime of the Attestor, but callers // should not make any other assumptions about the service account email; // future versions may use an email based on a different naming pattern. - string delegation_service_account_email = 3; + string delegation_service_account_email = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A public key in the PkixPublicKey format (see @@ -261,7 +273,7 @@ message PkixPublicKey { // attestations signed by this attestor. message AttestorPublicKey { // Optional. A descriptive comment. This field may be updated. - string comment = 1; + string comment = 1 [(google.api.field_behavior) = OPTIONAL]; // The ID of this public key. // Signatures verified by BinAuthz must include the ID of the public key that diff --git a/google/cloud/binaryauthorization/v1beta1/service.proto b/google/cloud/binaryauthorization/v1beta1/service.proto index 33bef1db8..f2e5f59e4 100644 --- a/google/cloud/binaryauthorization/v1beta1/service.proto +++ b/google/cloud/binaryauthorization/v1beta1/service.proto @@ -18,6 +18,9 @@ syntax = "proto3"; package google.cloud.binaryauthorization.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/binaryauthorization/v1beta1/resources.proto"; import "google/protobuf/empty.proto"; @@ -33,18 +36,22 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/binaryauthoriza // // * [Policy][google.cloud.binaryauthorization.v1beta1.Policy] // * [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor] -// -// A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to -// a container image, before the project is allowed to deploy that -// image. There is at most one policy per project. All image admission -// requests are permitted if a project has no policy. service BinauthzManagementServiceV1Beta1 { + option (google.api.default_host) = "binaryauthorization.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to + // a container image, before the project is allowed to deploy that + // image. There is at most one policy per project. All image admission + // requests are permitted if a project has no policy. + // // Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default // [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one. rpc GetPolicy(GetPolicyRequest) returns (Policy) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/policy}" }; + option (google.api.method_signature) = "name"; } // Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the @@ -57,6 +64,7 @@ service BinauthzManagementServiceV1Beta1 { put: "/v1beta1/{policy.name=projects/*/policy}" body: "policy" }; + option (google.api.method_signature) = "policy"; } // Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new @@ -68,6 +76,7 @@ service BinauthzManagementServiceV1Beta1 { post: "/v1beta1/{parent=projects/*}/attestors" body: "attestor" }; + option (google.api.method_signature) = "parent,attestor_id,attestor"; } // Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. @@ -76,6 +85,7 @@ service BinauthzManagementServiceV1Beta1 { option (google.api.http) = { get: "/v1beta1/{name=projects/*/attestors/*}" }; + option (google.api.method_signature) = "name"; } // Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. @@ -85,6 +95,7 @@ service BinauthzManagementServiceV1Beta1 { put: "/v1beta1/{attestor.name=projects/*/attestors/*}" body: "attestor" }; + option (google.api.method_signature) = "attestor"; } // Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. @@ -93,6 +104,7 @@ service BinauthzManagementServiceV1Beta1 { option (google.api.http) = { get: "/v1beta1/{parent=projects/*}/attestors" }; + option (google.api.method_signature) = "parent"; } // Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the @@ -101,6 +113,7 @@ service BinauthzManagementServiceV1Beta1 { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/attestors/*}" }; + option (google.api.method_signature) = "name"; } } @@ -108,7 +121,12 @@ service BinauthzManagementServiceV1Beta1 { message GetPolicyRequest { // Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, // in the format `projects/*/policy`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "binaryauthorization.googleapis.com/Policy" + } + ]; } // Request message for [BinauthzManagementService.UpdatePolicy][]. @@ -116,28 +134,38 @@ message UpdatePolicyRequest { // Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will // overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in // the request URL, in the format `projects/*/policy`. - Policy policy = 1; + Policy policy = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for [BinauthzManagementService.CreateAttestor][]. message CreateAttestorRequest { // Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID. - string attestor_id = 2; + string attestor_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will // overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name, // in the format `projects/*/attestors/*`. - Attestor attestor = 3; + Attestor attestor = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for [BinauthzManagementService.GetAttestor][]. message GetAttestorRequest { // Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format // `projects/*/attestors/*`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "binaryauthorization.googleapis.com/Attestor" + } + ]; } // Request message for [BinauthzManagementService.UpdateAttestor][]. @@ -145,14 +173,19 @@ message UpdateAttestorRequest { // Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will // overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name // in the request URL, in the format `projects/*/attestors/*`. - Attestor attestor = 1; + Attestor attestor = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for [BinauthzManagementService.ListAttestors][]. message ListAttestorsRequest { // Required. The resource name of the project associated with the // [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Requested page size. The server may return fewer results than requested. If // unspecified, the server will pick an appropriate default. @@ -179,5 +212,10 @@ message ListAttestorsResponse { message DeleteAttestorRequest { // Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format // `projects/*/attestors/*`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "binaryauthorization.googleapis.com/Attestor" + } + ]; } diff --git a/google/cloud/common_resources.proto b/google/cloud/common_resources.proto new file mode 100644 index 000000000..56c9f800d --- /dev/null +++ b/google/cloud/common_resources.proto @@ -0,0 +1,52 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file contains stub messages for common resources in GCP. +// It is not intended to be directly generated, and is instead used by +// other tooling to be able to match common resource patterns. +syntax = "proto3"; + +package google.cloud; + +import "google/api/resource.proto"; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Project" + pattern: "projects/{project}" +}; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Organization" + pattern: "organizations/{organization}" +}; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Folder" + pattern: "folders/{folder}" +}; + + +option (google.api.resource_definition) = { + type: "cloudbilling.googleapis.com/BillingAccount" + pattern: "billingAccounts/{billing_account}" +}; + +option (google.api.resource_definition) = { + type: "locations.googleapis.com/Location" + pattern: "projects/{project}/locations/{location}" +}; + diff --git a/google/cloud/datacatalog/v1/BUILD.bazel b/google/cloud/datacatalog/v1/BUILD.bazel new file mode 100644 index 000000000..ddea6a7a2 --- /dev/null +++ b/google/cloud/datacatalog/v1/BUILD.bazel @@ -0,0 +1,377 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "datacatalog_proto", + srcs = [ + "common.proto", + "datacatalog.proto", + "gcs_fileset_spec.proto", + "schema.proto", + "search.proto", + "table_spec.proto", + "tags.proto", + "timestamps.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "datacatalog_proto_with_info", + deps = [ + ":datacatalog_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "datacatalog_java_proto", + deps = [":datacatalog_proto"], +) + +java_grpc_library( + name = "datacatalog_java_grpc", + srcs = [":datacatalog_proto"], + deps = [":datacatalog_java_proto"], +) + +java_gapic_library( + name = "datacatalog_java_gapic", + src = ":datacatalog_proto_with_info", + gapic_yaml = "datacatalog_gapic.yaml", + package = "google.cloud.datacatalog.v1", + service_yaml = "datacatalog_v1.yaml", + test_deps = [ + ":datacatalog_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":datacatalog_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "datacatalog_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.datacatalog.v1.DataCatalogClientTest", + ], + runtime_deps = [":datacatalog_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-datacatalog-v1-java", + deps = [ + ":datacatalog_java_gapic", + ":datacatalog_java_grpc", + ":datacatalog_java_proto", + ":datacatalog_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "datacatalog_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1", + protos = [":datacatalog_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_gapic_library( + name = "datacatalog_go_gapic", + srcs = [":datacatalog_proto_with_info"], + grpc_service_config = "datacatalog_grpc_service_config.json", + importpath = "cloud.google.com/go/datacatalog/apiv1;datacatalog", + service_yaml = "datacatalog_v1.yaml", + deps = [ + ":datacatalog_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_test( + name = "datacatalog_go_gapic_test", + srcs = [":datacatalog_go_gapic_srcjar_test"], + embed = [":datacatalog_go_gapic"], + importpath = "cloud.google.com/go/datacatalog/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-datacatalog-v1-go", + deps = [ + ":datacatalog_go_gapic", + ":datacatalog_go_gapic_srcjar-test.srcjar", + ":datacatalog_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "datacatalog_moved_proto", + srcs = [":datacatalog_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "datacatalog_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":datacatalog_moved_proto"], +) + +py_grpc_library( + name = "datacatalog_py_grpc", + srcs = [":datacatalog_moved_proto"], + deps = [":datacatalog_py_proto"], +) + +py_gapic_library( + name = "datacatalog_py_gapic", + src = ":datacatalog_proto_with_info", + gapic_yaml = "datacatalog_gapic.yaml", + package = "google.cloud.datacatalog.v1", + service_yaml = "datacatalog_v1.yaml", + deps = [ + ":datacatalog_py_grpc", + ":datacatalog_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "datacatalog-v1-py", + deps = [ + ":datacatalog_py_gapic", + ":datacatalog_py_grpc", + ":datacatalog_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "datacatalog_php_proto", + deps = [":datacatalog_proto"], +) + +php_grpc_library( + name = "datacatalog_php_grpc", + srcs = [":datacatalog_proto"], + deps = [":datacatalog_php_proto"], +) + +php_gapic_library( + name = "datacatalog_php_gapic", + src = ":datacatalog_proto_with_info", + gapic_yaml = "datacatalog_gapic.yaml", + package = "google.cloud.datacatalog.v1", + service_yaml = "datacatalog_v1.yaml", + deps = [ + ":datacatalog_php_grpc", + ":datacatalog_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-datacatalog-v1-php", + deps = [ + ":datacatalog_php_gapic", + ":datacatalog_php_grpc", + ":datacatalog_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "datacatalog_nodejs_gapic", + src = ":datacatalog_proto_with_info", + gapic_yaml = "datacatalog_gapic.yaml", + package = "google.cloud.datacatalog.v1", + service_yaml = "datacatalog_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "datacatalog-v1-nodejs", + deps = [ + ":datacatalog_nodejs_gapic", + ":datacatalog_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "datacatalog_ruby_proto", + deps = [":datacatalog_proto"], +) + +ruby_grpc_library( + name = "datacatalog_ruby_grpc", + srcs = [":datacatalog_proto"], + deps = [":datacatalog_ruby_proto"], +) + +ruby_gapic_library( + name = "datacatalog_ruby_gapic", + src = ":datacatalog_proto_with_info", + gapic_yaml = "datacatalog_gapic.yaml", + package = "google.cloud.datacatalog.v1", + service_yaml = "datacatalog_v1.yaml", + deps = [ + ":datacatalog_ruby_grpc", + ":datacatalog_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-datacatalog-v1-ruby", + deps = [ + ":datacatalog_ruby_gapic", + ":datacatalog_ruby_grpc", + ":datacatalog_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "datacatalog_csharp_proto", + deps = [":datacatalog_proto"], +) + +csharp_grpc_library( + name = "datacatalog_csharp_grpc", + srcs = [":datacatalog_proto"], + deps = [":datacatalog_csharp_proto"], +) + +csharp_gapic_library( + name = "datacatalog_csharp_gapic", + src = ":datacatalog_proto_with_info", + gapic_yaml = "datacatalog_gapic.yaml", + package = "google.cloud.datacatalog.v1", + service_yaml = "datacatalog_v1.yaml", + deps = [ + ":datacatalog_csharp_grpc", + ":datacatalog_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-datacatalog-v1-csharp", + deps = [ + ":datacatalog_csharp_gapic", + ":datacatalog_csharp_grpc", + ":datacatalog_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/datacatalog/v1/common.proto b/google/cloud/datacatalog/v1/common.proto new file mode 100644 index 000000000..bb31bceb8 --- /dev/null +++ b/google/cloud/datacatalog/v1/common.proto @@ -0,0 +1,38 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; +option ruby_package = "Google::Cloud::DataCatalog::V1"; + +// This enum describes all the possible systems that Data Catalog integrates +// with. +enum IntegratedSystem { + // Default unknown system. + INTEGRATED_SYSTEM_UNSPECIFIED = 0; + + // BigQuery. + BIGQUERY = 1; + + // Cloud Pub/Sub. + CLOUD_PUBSUB = 2; +} diff --git a/google/cloud/datacatalog/v1/datacatalog.proto b/google/cloud/datacatalog/v1/datacatalog.proto new file mode 100644 index 000000000..c5b700ddb --- /dev/null +++ b/google/cloud/datacatalog/v1/datacatalog.proto @@ -0,0 +1,1261 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/datacatalog/v1/common.proto"; +import "google/cloud/datacatalog/v1/gcs_fileset_spec.proto"; +import "google/cloud/datacatalog/v1/schema.proto"; +import "google/cloud/datacatalog/v1/search.proto"; +import "google/cloud/datacatalog/v1/table_spec.proto"; +import "google/cloud/datacatalog/v1/tags.proto"; +import "google/cloud/datacatalog/v1/timestamps.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; +option ruby_package = "Google::Cloud::DataCatalog::V1"; + +// Data Catalog API service allows clients to discover, understand, and manage +// their data. +service DataCatalog { + option (google.api.default_host) = "datacatalog.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Searches Data Catalog for multiple resources like entries, tags that + // match a query. + // + // This is a custom method + // (https://cloud.google.com/apis/design/custom_methods) and does not return + // the complete resource, only the resource identifier and high level + // fields. Clients can subsequentally call `Get` methods. + // + // Note that Data Catalog search queries do not guarantee full recall. Query + // results that match your query may not be returned, even in subsequent + // result pages. Also note that results returned (and not returned) can vary + // across repeated search queries. + // + // See [Data Catalog Search + // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) + // for more information. + rpc SearchCatalog(SearchCatalogRequest) returns (SearchCatalogResponse) { + option (google.api.http) = { + post: "/v1/catalog:search" + body: "*" + }; + option (google.api.method_signature) = "scope,query"; + } + + // Creates an EntryGroup. + // + // An entry group contains logically related entries together with Cloud + // Identity and Access Management policies that specify the users who can + // create, edit, and view entries within the entry group. + // + // Data Catalog automatically creates an entry group for BigQuery entries + // ("@bigquery") and Pub/Sub topics ("@pubsub"). Users create their own entry + // group to contain Cloud Storage fileset entries or custom type entries, + // and the IAM policies associated with those entries. Entry groups, like + // entries, can be searched. + // + // A maximum of 10,000 entry groups may be created per organization across all + // locations. + // + // Users should enable the Data Catalog API in the project identified by + // the `parent` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + rpc CreateEntryGroup(CreateEntryGroupRequest) returns (EntryGroup) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/entryGroups" + body: "entry_group" + }; + option (google.api.method_signature) = "parent,entry_group_id,entry_group"; + } + + // Gets an EntryGroup. + rpc GetEntryGroup(GetEntryGroupRequest) returns (EntryGroup) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/entryGroups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,read_mask"; + } + + // Updates an EntryGroup. The user should enable the Data Catalog API in the + // project identified by the `entry_group.name` parameter (see [Data Catalog + // Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + rpc UpdateEntryGroup(UpdateEntryGroupRequest) returns (EntryGroup) { + option (google.api.http) = { + patch: "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}" + body: "entry_group" + }; + option (google.api.method_signature) = "entry_group"; + option (google.api.method_signature) = "entry_group,update_mask"; + } + + // Deletes an EntryGroup. Only entry groups that do not contain entries can be + // deleted. Users should enable the Data Catalog API in the project + // identified by the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + rpc DeleteEntryGroup(DeleteEntryGroupRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/entryGroups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists entry groups. + rpc ListEntryGroups(ListEntryGroupsRequest) + returns (ListEntryGroupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/entryGroups" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates an entry. Only entries of 'FILESET' type or user-specified type can + // be created. + // + // Users should enable the Data Catalog API in the project identified by + // the `parent` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + // + // A maximum of 100,000 entries may be created per entry group. + rpc CreateEntry(CreateEntryRequest) returns (Entry) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" + body: "entry" + }; + option (google.api.method_signature) = "parent,entry_id,entry"; + } + + // Updates an existing entry. + // Users should enable the Data Catalog API in the project identified by + // the `entry.name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + rpc UpdateEntry(UpdateEntryRequest) returns (Entry) { + option (google.api.http) = { + patch: "/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}" + body: "entry" + }; + option (google.api.method_signature) = "entry"; + option (google.api.method_signature) = "entry,update_mask"; + } + + // Deletes an existing entry. Only entries created through + // [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] + // method can be deleted. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + rpc DeleteEntry(DeleteEntryRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets an entry. + rpc GetEntry(GetEntryRequest) returns (Entry) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get an entry by target resource name. This method allows clients to use + // the resource name from the source Google Cloud Platform service to get the + // Data Catalog Entry. + rpc LookupEntry(LookupEntryRequest) returns (Entry) { + option (google.api.http) = { + get: "/v1/entries:lookup" + }; + } + + // Lists entries. + rpc ListEntries(ListEntriesRequest) returns (ListEntriesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a tag template. The user should enable the Data Catalog API in + // the project identified by the `parent` parameter (see [Data Catalog + // Resource + // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) + // for more information). + rpc CreateTagTemplate(CreateTagTemplateRequest) returns (TagTemplate) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/tagTemplates" + body: "tag_template" + }; + option (google.api.method_signature) = + "parent,tag_template_id,tag_template"; + } + + // Gets a tag template. + rpc GetTagTemplate(GetTagTemplateRequest) returns (TagTemplate) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/tagTemplates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a tag template. This method cannot be used to update the fields of + // a template. The tag template fields are represented as separate resources + // and should be updated using their own create/update/delete methods. + // Users should enable the Data Catalog API in the project identified by + // the `tag_template.name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + rpc UpdateTagTemplate(UpdateTagTemplateRequest) returns (TagTemplate) { + option (google.api.http) = { + patch: "/v1/{tag_template.name=projects/*/locations/*/tagTemplates/*}" + body: "tag_template" + }; + option (google.api.method_signature) = "tag_template"; + option (google.api.method_signature) = "tag_template,update_mask"; + } + + // Deletes a tag template and all tags using the template. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + rpc DeleteTagTemplate(DeleteTagTemplateRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/tagTemplates/*}" + }; + option (google.api.method_signature) = "name,force"; + } + + // Creates a field in a tag template. The user should enable the Data Catalog + // API in the project identified by the `parent` parameter (see + // [Data Catalog Resource + // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) + // for more information). + rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) + returns (TagTemplateField) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields" + body: "tag_template_field" + }; + option (google.api.method_signature) = + "parent,tag_template_field_id,tag_template_field"; + } + + // Updates a field in a tag template. This method cannot be used to update the + // field type. Users should enable the Data Catalog API in the project + // identified by the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) + returns (TagTemplateField) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" + body: "tag_template_field" + }; + option (google.api.method_signature) = "name,tag_template_field"; + option (google.api.method_signature) = + "name,tag_template_field,update_mask"; + } + + // Renames a field in a tag template. The user should enable the Data Catalog + // API in the project identified by the `name` parameter (see [Data Catalog + // Resource + // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) + // for more information). + rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) + returns (TagTemplateField) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename" + body: "*" + }; + option (google.api.method_signature) = "name,new_tag_template_field_id"; + } + + // Deletes a field in a tag template and all uses of that field. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" + }; + option (google.api.method_signature) = "name,force"; + } + + // Creates a tag on an [Entry][google.cloud.datacatalog.v1.Entry]. + // Note: The project identified by the `parent` parameter for the + // [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) + // and the + // [tag + // template](https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) + // used to create the tag must be from the same organization. + rpc CreateTag(CreateTagRequest) returns (Tag) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" + body: "tag" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags" + body: "tag" + } + }; + option (google.api.method_signature) = "parent,tag"; + } + + // Updates an existing tag. + rpc UpdateTag(UpdateTagRequest) returns (Tag) { + option (google.api.http) = { + patch: "/v1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" + body: "tag" + additional_bindings { + patch: "/v1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}" + body: "tag" + } + }; + option (google.api.method_signature) = "tag"; + option (google.api.method_signature) = "tag,update_mask"; + } + + // Deletes a tag. + rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/entryGroups/*/tags/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. + rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Sets the access control policy for a resource. Replaces any existing + // policy. + // Supported resources are: + // - Tag templates. + // - Entries. + // - Entry groups. + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. + // + // Callers must have following Google IAM permission + // - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag + // templates. + // - `datacatalog.entries.setIamPolicy` to set policies on entries. + // - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy" + body: "*" + } + }; + option (google.api.method_signature) = "resource,policy"; + } + + // Gets the access control policy for a resource. A `NOT_FOUND` error + // is returned if the resource does not exist. An empty policy is returned + // if the resource exists but does not have a policy set on it. + // + // Supported resources are: + // - Tag templates. + // - Entries. + // - Entry groups. + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. + // + // Callers must have following Google IAM permission + // - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag + // templates. + // - `datacatalog.entries.getIamPolicy` to get policies on entries. + // - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy" + body: "*" + } + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy" + body: "*" + } + }; + option (google.api.method_signature) = "resource"; + } + + // Returns the caller's permissions on a resource. + // If the resource does not exist, an empty set of permissions is returned + // (We don't return a `NOT_FOUND` error). + // + // Supported resources are: + // - Tag templates. + // - Entries. + // - Entry groups. + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. + // + // A caller is not required to have Google IAM permission to make this + // request. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions" + body: "*" + } + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions" + body: "*" + } + }; + } +} + +// Request message for +// [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. +message SearchCatalogRequest { + // The criteria that select the subspace used for query matching. + message Scope { + // The list of organization IDs to search within. To find your organization + // ID, follow instructions in + // https://cloud.google.com/resource-manager/docs/creating-managing-organization. + repeated string include_org_ids = 2; + + // The list of project IDs to search within. To learn more about the + // distinction between project names/IDs/numbers, go to + // https://cloud.google.com/docs/overview/#projects. + repeated string include_project_ids = 3; + + // If `true`, include Google Cloud Platform (GCP) public datasets in the + // search results. Info on GCP public datasets is available at + // https://cloud.google.com/public-datasets/. By default, GCP public + // datasets are excluded. + bool include_gcp_public_datasets = 7; + + // Optional. The list of locations to search within. + // 1. If empty, search will be performed in all locations; + // 2. If any of the locations are NOT in the valid locations list, error + // will be returned; + // 3. Otherwise, search only the given locations for matching results. + // Typical usage is to leave this field empty. When a location is + // unreachable as returned in the `SearchCatalogResponse.unreachable` field, + // users can repeat the search request with this parameter set to get + // additional information on the error. + // + // Valid locations: + // * asia-east1 + // * asia-east2 + // * asia-northeast1 + // * asia-northeast2 + // * asia-northeast3 + // * asia-south1 + // * asia-southeast1 + // * australia-southeast1 + // * eu + // * europe-north1 + // * europe-west1 + // * europe-west2 + // * europe-west3 + // * europe-west4 + // * europe-west6 + // * global + // * northamerica-northeast1 + // * southamerica-east1 + // * us + // * us-central1 + // * us-east1 + // * us-east4 + // * us-west1 + // * us-west2 + repeated string restricted_locations = 16 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The scope of this search request. A `scope` that has empty + // `include_org_ids`, `include_project_ids` AND false + // `include_gcp_public_datasets` is considered invalid. Data Catalog will + // return an error in such a case. + Scope scope = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. The query string in search query syntax. The query must be + // non-empty. + // + // Query strings can be simple as "x" or more qualified as: + // + // * name:x + // * column:x + // * description:y + // + // Note: Query tokens need to have a minimum of 3 characters for substring + // matching to work correctly. See [Data Catalog Search + // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) + // for more information. + string query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Number of results in the search page. If <=0 then defaults to 10. Max limit + // for page_size is 1000. Throws an invalid argument for page_size > 1000. + int32 page_size = 2; + + // Optional. Pagination token returned in an earlier + // [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], + // which indicates that this is a continuation of a prior + // [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog] + // call, and that the system should return the next page of data. If empty, + // the first page is returned. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Specifies the ordering of results, currently supported case-sensitive + // choices are: + // + // * `relevance`, only supports descending + // * `last_modified_timestamp [asc|desc]`, defaults to descending if not + // specified + // + // If not specified, defaults to `relevance` descending. + string order_by = 5; +} + +// Response message for +// [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. +message SearchCatalogResponse { + // Search results. + repeated SearchCatalogResult results = 1; + + // The token that can be used to retrieve the next page of results. + string next_page_token = 3; + + // Unreachable locations. Search result does not include data from those + // locations. Users can get additional information on the error by repeating + // the search request with a more restrictive parameter -- setting the value + // for `SearchDataCatalogRequest.scope.include_locations`. + repeated string unreachable = 6; +} + +// Request message for +// [CreateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup]. +message CreateEntryGroupRequest { + // Required. The name of the project this entry group is in. Example: + // + // * projects/{project_id}/locations/{location} + // + // Note that this EntryGroup and its child resources may not actually be + // stored in the location in this name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // Required. The id of the entry group to create. + // The id must begin with a letter or underscore, contain only English + // letters, numbers and underscores, and be at most 64 characters. + string entry_group_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // The entry group to create. Defaults to an empty entry group. + EntryGroup entry_group = 2; +} + +// Request message for +// [UpdateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup]. +message UpdateEntryGroupRequest { + // Required. The updated entry group. "name" field must be set. + EntryGroup entry_group = 1 [(google.api.field_behavior) = REQUIRED]; + + // The fields to update on the entry group. If absent or empty, all modifiable + // fields are updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [GetEntryGroup][google.cloud.datacatalog.v1.DataCatalog.GetEntryGroup]. +message GetEntryGroupRequest { + // Required. The name of the entry group. For example, + // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // The fields to return. If not set or empty, all fields are returned. + google.protobuf.FieldMask read_mask = 2; +} + +// Request message for +// [DeleteEntryGroup][google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroup]. +message DeleteEntryGroupRequest { + // Required. The name of the entry group. For example, + // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // Optional. If true, deletes all entries in the entry group. + bool force = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. +message ListEntryGroupsRequest { + // Required. The name of the location that contains the entry groups, which + // can be provided in URL format. Example: + // + // * projects/{project_id}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // Optional. The maximum number of items to return. Default is 10. Max limit + // is 1000. Throws an invalid argument for `page_size > 1000`. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token that specifies which page is requested. If empty, the first + // page is returned. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. +message ListEntryGroupsResponse { + // EntryGroup details. + repeated EntryGroup entry_groups = 1; + + // Token to retrieve the next page of results. It is set to empty if no items + // remain in results. + string next_page_token = 2; +} + +// Request message for +// [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry]. +message CreateEntryRequest { + // Required. The name of the entry group this entry is in. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + // + // Note that this Entry and its child resources may not actually be stored in + // the location in this name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // Required. The id of the entry to create. + string entry_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entry to create. + Entry entry = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [UpdateEntry][google.cloud.datacatalog.v1.DataCatalog.UpdateEntry]. +message UpdateEntryRequest { + // Required. The updated entry. The "name" field must be set. + Entry entry = 1 [(google.api.field_behavior) = REQUIRED]; + + // The fields to update on the entry. If absent or empty, all modifiable + // fields are updated. + // + // The following fields are modifiable: + // * For entries with type `DATA_STREAM`: + // * `schema` + // * For entries with type `FILESET` + // * `schema` + // * `display_name` + // * `description` + // * `gcs_fileset_spec` + // * `gcs_fileset_spec.file_patterns` + // * For entries with `user_specified_type` + // * `schema` + // * `display_name` + // * `description` + // * user_specified_type + // * user_specified_system + // * linked_resource + // * source_system_timestamps + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [DeleteEntry][google.cloud.datacatalog.v1.DataCatalog.DeleteEntry]. +message DeleteEntryRequest { + // Required. The name of the entry. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Entry" + } + ]; +} + +// Request message for +// [GetEntry][google.cloud.datacatalog.v1.DataCatalog.GetEntry]. +message GetEntryRequest { + // Required. The name of the entry. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Entry" + } + ]; +} + +// Request message for +// [LookupEntry][google.cloud.datacatalog.v1.DataCatalog.LookupEntry]. +message LookupEntryRequest { + // Required. Represents either the Google Cloud Platform resource or SQL name + // for a Google Cloud Platform resource. + oneof target_name { + // The full name of the Google Cloud Platform resource the Data Catalog + // entry represents. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name. + // Full names are case-sensitive. + // + // Examples: + // + // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId + // * //pubsub.googleapis.com/projects/projectId/topics/topicId + string linked_resource = 1; + + // The SQL name of the entry. SQL names are case-sensitive. + // + // Examples: + // + // * `pubsub.project_id.topic_id` + // * ``pubsub.project_id.`topic.id.with.dots` `` + // * `bigquery.table.project_id.dataset_id.table_id` + // * `bigquery.dataset.project_id.dataset_id` + // * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` + // + // `*_id`s shoud satisfy the standard SQL rules for identifiers. + // https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. + string sql_resource = 3; + } +} + +// Entry Metadata. +// A Data Catalog Entry resource represents another resource in Google +// Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or +// outside of Google Cloud Platform. Clients can use the `linked_resource` field +// in the Entry resource to refer to the original resource ID of the source +// system. +// +// An Entry resource contains resource details, such as its schema. An Entry can +// also be used to attach flexible metadata, such as a +// [Tag][google.cloud.datacatalog.v1.Tag]. +message Entry { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/Entry" + pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}" + }; + + // The Data Catalog resource name of the entry in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + // + // Note that this Entry and its child resources may not actually be stored in + // the location in this name. + string name = 1 [(google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + }]; + + // The resource this metadata entry refers to. + // + // For Google Cloud Platform resources, `linked_resource` is the [full name of + // the + // resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). + // For example, the `linked_resource` for a table resource from BigQuery is: + // + // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId + // + // Output only when Entry is of type in the EntryType enum. For entries with + // user_specified_type, this field is optional and defaults to an empty + // string. + string linked_resource = 9; + + // Required. Entry type. + oneof entry_type { + // The type of the entry. + // Only used for Entries with types in the EntryType enum. + EntryType type = 2; + + // Entry type if it does not fit any of the input-allowed values listed in + // `EntryType` enum above. When creating an entry, users should check the + // enum values first, if nothing matches the entry to be created, then + // provide a custom value, for example "my_special_type". + // `user_specified_type` strings must begin with a letter or underscore and + // can only contain letters, numbers, and underscores; are case insensitive; + // must be at least 1 character and at most 64 characters long. + // + // Currently, only FILESET enum value is allowed. All other entries created + // through Data Catalog must use `user_specified_type`. + string user_specified_type = 16; + } + + // The source system of the entry. + oneof system { + // Output only. This field indicates the entry's source system that Data + // Catalog integrates with, such as BigQuery or Pub/Sub. + IntegratedSystem integrated_system = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This field indicates the entry's source system that Data Catalog does not + // integrate with. `user_specified_system` strings must begin with a letter + // or underscore and can only contain letters, numbers, and underscores; are + // case insensitive; must be at least 1 character and at most 64 characters + // long. + string user_specified_system = 18; + } + + // Type specification information. + oneof type_spec { + // Specification that applies to a Cloud Storage fileset. This is only valid + // on entries of type FILESET. + GcsFilesetSpec gcs_fileset_spec = 6; + + // Specification that applies to a BigQuery table. This is only valid on + // entries of type `TABLE`. + BigQueryTableSpec bigquery_table_spec = 12; + + // Specification for a group of BigQuery tables with name pattern + // `[prefix]YYYYMMDD`. Context: + // https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding. + BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + } + + // Display information such as title and description. A short name to identify + // the entry, for example, "Analytics Data - Jan 2011". Default value is an + // empty string. + string display_name = 3; + + // Entry description, which can consist of several sentences or paragraphs + // that describe entry contents. Default value is an empty string. + string description = 4; + + // Schema of the entry. An entry might not have any schema attached to it. + Schema schema = 5; + + // Timestamps about the underlying resource, not about this Data Catalog + // entry. Output only when Entry is of type in the EntryType enum. For entries + // with user_specified_type, this field is optional and defaults to an empty + // timestamp. + SystemTimestamps source_system_timestamps = 7; +} + +// EntryGroup Metadata. +// An EntryGroup resource represents a logical grouping of zero or more +// Data Catalog [Entry][google.cloud.datacatalog.v1.Entry] resources. +message EntryGroup { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/EntryGroup" + pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}" + }; + + // The resource name of the entry group in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + // + // Note that this EntryGroup and its child resources may not actually be + // stored in the location in this name. + string name = 1; + + // A short name to identify the entry group, for example, + // "analytics data - jan 2011". Default value is an empty string. + string display_name = 2; + + // Entry group description, which can consist of several sentences or + // paragraphs that describe entry group contents. Default value is an empty + // string. + string description = 3; + + // Output only. Timestamps about this EntryGroup. Default value is empty + // timestamps. + SystemTimestamps data_catalog_timestamps = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for +// [CreateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplate]. +message CreateTagTemplateRequest { + // Required. The name of the project and the template location + // [region](https://cloud.google.com/data-catalog/docs/concepts/regions). + // + // Example: + // + // * projects/{project_id}/locations/us-central1 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/TagTemplate" + } + ]; + + // Required. The id of the tag template to create. + string tag_template_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The tag template to create. + TagTemplate tag_template = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [GetTagTemplate][google.cloud.datacatalog.v1.DataCatalog.GetTagTemplate]. +message GetTagTemplateRequest { + // Required. The name of the tag template. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplate" + } + ]; +} + +// Request message for +// [UpdateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate]. +message UpdateTagTemplateRequest { + // Required. The template to update. The "name" field must be set. + TagTemplate tag_template = 1 [(google.api.field_behavior) = REQUIRED]; + + // The field mask specifies the parts of the template to overwrite. + // + // Allowed fields: + // + // * `display_name` + // + // If absent or empty, all of the allowed fields above will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [DeleteTagTemplate][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplate]. +message DeleteTagTemplateRequest { + // Required. The name of the tag template to delete. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplate" + } + ]; + + // Required. Currently, this field must always be set to `true`. + // This confirms the deletion of any possible tags using this template. + // `force = false` will be supported in the future. + bool force = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [CreateTag][google.cloud.datacatalog.v1.DataCatalog.CreateTag]. +message CreateTagRequest { + // Required. The name of the resource to attach this tag to. Tags can be + // attached to Entries. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + // + // Note that this Tag and its child resources may not actually be stored in + // the location in this name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "datacatalog.googleapis.com/Tag" } + ]; + + // Required. The tag to create. + Tag tag = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [UpdateTag][google.cloud.datacatalog.v1.DataCatalog.UpdateTag]. +message UpdateTagRequest { + // Required. The updated tag. The "name" field must be set. + Tag tag = 1 [(google.api.field_behavior) = REQUIRED]; + + // The fields to update on the Tag. If absent or empty, all modifiable fields + // are updated. Currently the only modifiable field is the field `fields`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [DeleteTag][google.cloud.datacatalog.v1.DataCatalog.DeleteTag]. +message DeleteTagRequest { + // Required. The name of the tag to delete. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Tag" + } + ]; +} + +// Request message for +// [CreateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateField]. +message CreateTagTemplateFieldRequest { + // Required. The name of the project and the template location + // [region](https://cloud.google.com/data-catalog/docs/concepts/regions). + // + // Example: + // + // * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplate" + } + ]; + + // Required. The ID of the tag template field to create. + // Field ids can contain letters (both uppercase and lowercase), numbers + // (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 + // character long and at most 128 characters long. Field IDs must also be + // unique within their template. + string tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The tag template field to create. + TagTemplateField tag_template_field = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [UpdateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateField]. +message UpdateTagTemplateFieldRequest { + // Required. The name of the tag template field. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplateField" + } + ]; + + // Required. The template to update. + TagTemplateField tag_template_field = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The field mask specifies the parts of the template to be updated. + // Allowed fields: + // + // * `display_name` + // * `type.enum_type` + // * `is_required` + // + // If `update_mask` is not set or empty, all of the allowed fields above will + // be updated. + // + // When updating an enum type, the provided values will be merged with the + // existing values. Therefore, enum values can only be added, existing enum + // values cannot be deleted nor renamed. Updating a template field from + // optional to required is NOT allowed. + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [RenameTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateField]. +message RenameTagTemplateFieldRequest { + // Required. The name of the tag template. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplateField" + } + ]; + + // Required. The new ID of this tag template field. For example, + // `my_new_field`. + string new_tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [DeleteTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField]. +message DeleteTagTemplateFieldRequest { + // Required. The name of the tag template field to delete. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplateField" + } + ]; + + // Required. Currently, this field must always be set to `true`. + // This confirms the deletion of this field from any tags using this field. + // `force = false` will be supported in the future. + bool force = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. +message ListTagsRequest { + // Required. The name of the Data Catalog resource to list the tags of. The + // resource could be an [Entry][google.cloud.datacatalog.v1.Entry] or an + // [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]. + // + // Examples: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Tag" + } + ]; + + // The maximum number of tags to return. Default is 10. Max limit is 1000. + int32 page_size = 2; + + // Token that specifies which page is requested. If empty, the first page is + // returned. + string page_token = 3; +} + +// Response message for +// [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. +message ListTagsResponse { + // [Tag][google.cloud.datacatalog.v1.Tag] details. + repeated Tag tags = 1; + + // Token to retrieve the next page of results. It is set to empty if no items + // remain in results. + string next_page_token = 2; +} + +// Request message for +// [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. +message ListEntriesRequest { + // Required. The name of the entry group that contains the entries, which can + // be provided in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // The maximum number of items to return. Default is 10. Max limit is 1000. + // Throws an invalid argument for `page_size > 1000`. + int32 page_size = 2; + + // Token that specifies which page is requested. If empty, the first page is + // returned. + string page_token = 3; + + // The fields to return for each Entry. If not set or empty, all + // fields are returned. + // For example, setting read_mask to contain only one path "name" will cause + // ListEntries to return a list of Entries with only "name" field. + google.protobuf.FieldMask read_mask = 4; +} + +// Response message for +// [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. +message ListEntriesResponse { + // Entry details. + repeated Entry entries = 1; + + // Token to retrieve the next page of results. It is set to empty if no items + // remain in results. + string next_page_token = 2; +} + +// Entry resources in Data Catalog can be of different types e.g. a BigQuery +// Table entry is of type `TABLE`. This enum describes all the possible types +// Data Catalog contains. +enum EntryType { + // Default unknown type. + ENTRY_TYPE_UNSPECIFIED = 0; + + // Output only. The type of entry that has a GoogleSQL schema, including + // logical views. + TABLE = 2; + + // Output only. The type of models, examples include + // https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro + MODEL = 5; + + // Output only. An entry type which is used for streaming entries. Example: + // Pub/Sub topic. + DATA_STREAM = 3; + + // An entry type which is a set of files or objects. Example: + // Cloud Storage fileset. + FILESET = 4; +} diff --git a/google/cloud/datacatalog/v1/datacatalog_gapic.yaml b/google/cloud/datacatalog/v1/datacatalog_gapic.yaml new file mode 100644 index 000000000..af0e33817 --- /dev/null +++ b/google/cloud/datacatalog/v1/datacatalog_gapic.yaml @@ -0,0 +1,18 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + java: + package_name: com.google.cloud.datacatalog.v1 + python: + package_name: google.cloud.datacatalog_v1.gapic + go: + package_name: cloud.google.com/go/datacatalog/apiv1 + csharp: + package_name: Google.Cloud.Datacatalog.V1 + ruby: + package_name: Google::Cloud::Datacatalog::V1 + php: + package_name: Google\Cloud\Datacatalog\V1 + nodejs: + package_name: datacatalog.v1 + domain_layer_location: google-cloud diff --git a/google/cloud/datacatalog/v1/datacatalog_grpc_service_config.json b/google/cloud/datacatalog/v1/datacatalog_grpc_service_config.json new file mode 100755 index 000000000..b683fa856 --- /dev/null +++ b/google/cloud/datacatalog/v1/datacatalog_grpc_service_config.json @@ -0,0 +1,65 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.datacatalog.v1.DataCatalog" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.datacatalog.v1.DataCatalog", + "method": "GetEntry" + }, + { + "service": "google.cloud.datacatalog.v1.DataCatalog", + "method": "GetEntryGroup" + }, + { + "service": "google.cloud.datacatalog.v1.DataCatalog", + "method": "GetIamPolicy" + }, + { + "service": "google.cloud.datacatalog.v1.DataCatalog", + "method": "GettagTemplate" + }, + { + "service": "google.cloud.datacatalog.v1.DataCatalog", + "method": "ListEntries" + }, + { + "service": "google.cloud.datacatalog.v1.DataCatalog", + "method": "ListEntryGroups" + }, + { + "service": "google.cloud.datacatalog.v1.DataCatalog", + "method": "ListTags" + }, + { + "service": "google.cloud.datacatalog.v1.DataCatalog", + "method": "LookupEntry" + }, + { + "service": "google.cloud.datacatalog.v1.DataCatalog", + "method": "SearchCatalog" + }, + { + "service": "google.cloud.datacatalog.v1.DataCatalog", + "method": "TestIamPermisisons" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/datacatalog/datacatalog_v1beta1.yaml b/google/cloud/datacatalog/v1/datacatalog_v1.yaml similarity index 86% rename from google/cloud/datacatalog/datacatalog_v1beta1.yaml rename to google/cloud/datacatalog/v1/datacatalog_v1.yaml index 5e18b6f2f..7b8f7c609 100644 --- a/google/cloud/datacatalog/datacatalog_v1beta1.yaml +++ b/google/cloud/datacatalog/v1/datacatalog_v1.yaml @@ -4,7 +4,7 @@ name: datacatalog.googleapis.com title: Google Cloud Data Catalog API apis: -- name: google.cloud.datacatalog.v1beta1.DataCatalog +- name: google.cloud.datacatalog.v1.DataCatalog documentation: summary: |- @@ -26,11 +26,14 @@ documentation: Sets the access control policy on the specified resource. Replaces any existing policy. + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + - selector: google.iam.v1.IAMPolicy.TestIamPermissions description: |- Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of - permissions, not a NOT_FOUND error. + permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization @@ -38,7 +41,7 @@ documentation: authentication: rules: - - selector: 'google.cloud.datacatalog.v1beta1.DataCatalog.*' + - selector: 'google.cloud.datacatalog.v1.DataCatalog.*' oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/datacatalog/v1/gcs_fileset_spec.proto b/google/cloud/datacatalog/v1/gcs_fileset_spec.proto new file mode 100644 index 000000000..b0605c13f --- /dev/null +++ b/google/cloud/datacatalog/v1/gcs_fileset_spec.proto @@ -0,0 +1,75 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/datacatalog/v1/timestamps.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; +option ruby_package = "Google::Cloud::DataCatalog::V1"; + +// Describes a Cloud Storage fileset entry. +message GcsFilesetSpec { + // Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud + // Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for + // more information. Note that bucket wildcards are currently not supported. + // + // Examples of valid file_patterns: + // + // * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir` + // directory. + // * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` + // spanning all subdirectories. + // * `gs://bucket_name/file*`: matches files prefixed by `file` in + // `bucket_name` + // * `gs://bucket_name/??.txt`: matches files with two characters followed by + // `.txt` in `bucket_name` + // * `gs://bucket_name/[aeiou].txt`: matches files that contain a single + // vowel character followed by `.txt` in + // `bucket_name` + // * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... + // or `m` followed by `.txt` in `bucket_name` + // * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match + // `a/*/b` pattern, such as `a/c/b`, `a/d/b` + // * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` + // + // You can combine wildcards to provide more powerful matches, for example: + // + // * `gs://bucket_name/[a-m]??.j*g` + repeated string file_patterns = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Sample files contained in this fileset, not all files + // contained in this fileset are represented here. + repeated GcsFileSpec sample_gcs_file_specs = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Specifications of a single file in Cloud Storage. +message GcsFileSpec { + // Required. The full file path. Example: `gs://bucket_name/a/b.txt`. + string file_path = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Timestamps about the Cloud Storage file. + SystemTimestamps gcs_timestamps = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The size of the file, in bytes. + int64 size_bytes = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/datacatalog/v1/schema.proto b/google/cloud/datacatalog/v1/schema.proto new file mode 100644 index 000000000..c34d99e27 --- /dev/null +++ b/google/cloud/datacatalog/v1/schema.proto @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; +option ruby_package = "Google::Cloud::DataCatalog::V1"; + +// Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema). +message Schema { + // Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be + // specified. + repeated ColumnSchema columns = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Representation of a column within a schema. Columns could be nested inside +// other columns. +message ColumnSchema { + // Required. Name of the column. + string column = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Type of the column. + string type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Description of the column. Default value is an empty string. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A column's mode indicates whether the values in this column are required, + // nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported. + // Default mode is `NULLABLE`. + string mode = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Schema of sub-columns. A column can have zero or more sub-columns. + repeated ColumnSchema subcolumns = 7 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/google/cloud/datacatalog/v1/search.proto b/google/cloud/datacatalog/v1/search.proto new file mode 100644 index 000000000..37f6923b1 --- /dev/null +++ b/google/cloud/datacatalog/v1/search.proto @@ -0,0 +1,84 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/datacatalog/v1/common.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; +option ruby_package = "Google::Cloud::DataCatalog::V1"; + +// A result that appears in the response of a search request. Each result +// captures details of one entry that matches the search. +message SearchCatalogResult { + // Type of the search result. This field can be used to determine which Get + // method to call to fetch the full resource. + SearchResultType search_result_type = 1; + + // Sub-type of the search result. This is a dot-delimited description of the + // resource's full type, and is the same as the value callers would provide in + // the "type" search facet. Examples: `entry.table`, `entry.dataStream`, + // `tagTemplate`. + string search_result_subtype = 2; + + // The relative resource name of the resource in URL format. + // Examples: + // + // * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}` + // * `projects/{project_id}/tagTemplates/{tag_template_id}` + string relative_resource_name = 3; + + // The full name of the cloud resource the entry belongs to. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name. + // Example: + // + // * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId` + string linked_resource = 4; + + // The source system of the entry. Only applicable when `search_result_type` + // is ENTRY. + oneof system { + // Output only. This field indicates the entry's source system that Data Catalog + // integrates with, such as BigQuery or Cloud Pub/Sub. + IntegratedSystem integrated_system = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This field indicates the entry's source system that Data Catalog does not + // integrate with. + string user_specified_system = 9; + } +} + +// The different types of resources that can be returned in search. +enum SearchResultType { + // Default unknown type. + SEARCH_RESULT_TYPE_UNSPECIFIED = 0; + + // An [Entry][google.cloud.datacatalog.v1.Entry]. + ENTRY = 1; + + // A [TagTemplate][google.cloud.datacatalog.v1.TagTemplate]. + TAG_TEMPLATE = 2; + + // An [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]. + ENTRY_GROUP = 3; +} diff --git a/google/cloud/datacatalog/v1/table_spec.proto b/google/cloud/datacatalog/v1/table_spec.proto new file mode 100644 index 000000000..c87afc54c --- /dev/null +++ b/google/cloud/datacatalog/v1/table_spec.proto @@ -0,0 +1,101 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; +option ruby_package = "Google::Cloud::DataCatalog::V1"; + +// Describes a BigQuery table. +message BigQueryTableSpec { + // Output only. The table source type. + TableSourceType table_source_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. + oneof type_spec { + // Table view specification. This field should only be populated if + // `table_source_type` is `BIGQUERY_VIEW`. + ViewSpec view_spec = 2; + + // Spec of a BigQuery table. This field should only be populated if + // `table_source_type` is `BIGQUERY_TABLE`. + TableSpec table_spec = 3; + } +} + +// Table source type. +enum TableSourceType { + // Default unknown type. + TABLE_SOURCE_TYPE_UNSPECIFIED = 0; + + // Table view. + BIGQUERY_VIEW = 2; + + // BigQuery native table. + BIGQUERY_TABLE = 5; +} + +// Table view specification. +message ViewSpec { + // Output only. The query that defines the table view. + string view_query = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Normal BigQuery table spec. +message TableSpec { + // Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`, + // `grouped_entry` is the Data Catalog resource name of the date sharded + // grouped entry, for example, + // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. + // Otherwise, `grouped_entry` is empty. + string grouped_entry = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Entry" + } + ]; +} + +// Spec for a group of BigQuery tables with name pattern `[prefix]YYYYMMDD`. +// Context: +// https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding +message BigQueryDateShardedSpec { + // Output only. The Data Catalog resource name of the dataset entry the current table + // belongs to, for example, + // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. + string dataset = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Entry" + } + ]; + + // Output only. The table name prefix of the shards. The name of any given shard is + // `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the + // `table_prefix` is `MyTable`. + string table_prefix = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total number of shards. + int64 shard_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/datacatalog/v1/tags.proto b/google/cloud/datacatalog/v1/tags.proto new file mode 100644 index 000000000..4efefa522 --- /dev/null +++ b/google/cloud/datacatalog/v1/tags.proto @@ -0,0 +1,229 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; +option ruby_package = "Google::Cloud::DataCatalog::V1"; + +// Tags are used to attach custom metadata to Data Catalog resources. Tags +// conform to the specifications within their tag template. +// +// See [Data Catalog +// IAM](https://cloud.google.com/data-catalog/docs/concepts/iam) for information +// on the permissions needed to create or view tags. +message Tag { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/Tag" + pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}" + }; + + // The resource name of the tag in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + // + // where `tag_id` is a system-generated identifier. + // Note that this Tag may not actually be stored in the location in this name. + string name = 1; + + // Required. The resource name of the tag template that this tag uses. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + // + // This field cannot be modified after creation. + string template = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The display name of the tag template. + string template_display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The scope within the parent resource that this tag is attached to. If not + // provided, the tag is attached to the parent resource itself. + // Deleting the scope from the parent resource will delete all tags attached + // to that scope. These fields cannot be updated after creation. + oneof scope { + // Resources like Entry can have schemas associated with them. This scope + // allows users to attach tags to an individual column based on that schema. + // + // For attaching a tag to a nested column, use `.` to separate the column + // names. Example: + // + // * `outer_column.inner_column` + string column = 4; + } + + // Required. This maps the ID of a tag field to the value of and additional information + // about that field. Valid field IDs are defined by the tag's template. A tag + // must have at least 1 field and at most 500 fields. + map fields = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Contains the value and supporting information for a field within +// a [Tag][google.cloud.datacatalog.v1.Tag]. +message TagField { + // Holds an enum value. + message EnumValue { + // The display name of the enum value. + string display_name = 1; + } + + // Output only. The display name of this field. + string display_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The value of this field. + oneof kind { + // Holds the value for a tag field with double type. + double double_value = 2; + + // Holds the value for a tag field with string type. + string string_value = 3; + + // Holds the value for a tag field with boolean type. + bool bool_value = 4; + + // Holds the value for a tag field with timestamp type. + google.protobuf.Timestamp timestamp_value = 5; + + // Holds the value for a tag field with enum type. This value must be + // one of the allowed values in the definition of this enum. + EnumValue enum_value = 6; + } + + // Output only. The order of this field with respect to other fields in this tag. It can be + // set in [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. For + // example, a higher value can indicate a more important field. The value can + // be negative. Multiple fields can have the same order, and field orders + // within a tag do not have to be sequential. + int32 order = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A tag template defines a tag, which can have one or more typed fields. +// The template is used to create and attach the tag to GCP resources. +// [Tag template +// roles](https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) +// provide permissions to create, edit, and use the template. See, for example, +// the [TagTemplate +// User](https://cloud.google.com/data-catalog/docs/how-to/template-user) role, +// which includes permission to use the tag template to tag resources. +message TagTemplate { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/TagTemplate" + pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}" + }; + + // The resource name of the tag template in URL format. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + // + // Note that this TagTemplate and its child resources may not actually be + // stored in the location in this name. + string name = 1; + + // The display name for this template. Defaults to an empty string. + string display_name = 2; + + // Required. Map of tag template field IDs to the settings for the field. + // This map is an exhaustive list of the allowed fields. This map must contain + // at least one field and at most 500 fields. + // + // The keys to this map are tag template field IDs. Field IDs can contain + // letters (both uppercase and lowercase), numbers (0-9) and underscores (_). + // Field IDs must be at least 1 character long and at most + // 64 characters long. Field IDs must start with a letter or underscore. + map fields = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The template for an individual field within a tag template. +message TagTemplateField { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/TagTemplateField" + pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}" + }; + + // Output only. The resource name of the tag template field in URL format. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field} + // + // Note that this TagTemplateField may not actually be stored in the location + // in this name. + string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The display name for this field. Defaults to an empty string. + string display_name = 1; + + // Required. The type of value this tag field can contain. + FieldType type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Whether this is a required field. Defaults to false. + bool is_required = 3; + + // The order of this field with respect to other fields in this tag + // template. For example, a higher value can indicate a more important field. + // The value can be negative. Multiple fields can have the same order, and + // field orders within a tag do not have to be sequential. + int32 order = 5; +} + +message FieldType { + message EnumType { + message EnumValue { + // Required. The display name of the enum value. Must not be an empty string. + string display_name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Required on create; optional on update. The set of allowed values for + // this enum. This set must not be empty, the display names of the values in + // this set must not be empty and the display names of the values must be + // case-insensitively unique within this set. Currently, enum values can + // only be added to the list of allowed values. Deletion and renaming of + // enum values are not supported. Can have up to 500 allowed values. + repeated EnumValue allowed_values = 1; + } + + enum PrimitiveType { + // This is the default invalid value for a type. + PRIMITIVE_TYPE_UNSPECIFIED = 0; + + // A double precision number. + DOUBLE = 1; + + // An UTF-8 string. + STRING = 2; + + // A boolean value. + BOOL = 3; + + // A timestamp. + TIMESTAMP = 4; + } + + // Required. + oneof type_decl { + // Represents primitive types - string, bool etc. + PrimitiveType primitive_type = 1; + + // Represents an enum type. + EnumType enum_type = 2; + } +} diff --git a/google/cloud/datacatalog/v1/timestamps.proto b/google/cloud/datacatalog/v1/timestamps.proto new file mode 100644 index 000000000..a4372ae3c --- /dev/null +++ b/google/cloud/datacatalog/v1/timestamps.proto @@ -0,0 +1,41 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; +option ruby_package = "Google::Cloud::DataCatalog::V1"; + +// Timestamps about this resource according to a particular system. +message SystemTimestamps { + // The creation time of the resource within the given system. + google.protobuf.Timestamp create_time = 1; + + // The last-modified time of the resource within the given system. + google.protobuf.Timestamp update_time = 2; + + // Output only. The expiration time of the resource within the given system. + // Currently only apllicable to BigQuery resources. + google.protobuf.Timestamp expire_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/datacatalog/v1beta1/BUILD.bazel b/google/cloud/datacatalog/v1beta1/BUILD.bazel new file mode 100644 index 000000000..864a16355 --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/BUILD.bazel @@ -0,0 +1,381 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "datacatalog_proto", + srcs = [ + "common.proto", + "datacatalog.proto", + "gcs_fileset_spec.proto", + "policytagmanager.proto", + "policytagmanagerserialization.proto", + "schema.proto", + "search.proto", + "table_spec.proto", + "tags.proto", + "timestamps.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "datacatalog_proto_with_info", + deps = [ + ":datacatalog_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "datacatalog_java_proto", + deps = [":datacatalog_proto"], +) + +java_grpc_library( + name = "datacatalog_java_grpc", + srcs = [":datacatalog_proto"], + deps = [":datacatalog_java_proto"], +) + +java_gapic_library( + name = "datacatalog_java_gapic", + src = ":datacatalog_proto_with_info", + gapic_yaml = "datacatalog_gapic.yaml", + package = "google.cloud.datacatalog.v1beta1", + service_yaml = "datacatalog_v1beta1.yaml", + test_deps = [ + ":datacatalog_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":datacatalog_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "datacatalog_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.datacatalog.v1beta1.DataCatalogClientTest", + "com.google.cloud.datacatalog.v1beta1.PolicyTagManagerClientTest", + "com.google.cloud.datacatalog.v1beta1.PolicyTagManagerSerializationClientTest", + ], + runtime_deps = [":datacatalog_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-datacatalog-v1beta1-java", + deps = [ + ":datacatalog_java_gapic", + ":datacatalog_java_grpc", + ":datacatalog_java_proto", + ":datacatalog_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "datacatalog_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1", + protos = [":datacatalog_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_gapic_library( + name = "datacatalog_go_gapic", + srcs = [":datacatalog_proto_with_info"], + grpc_service_config = "datacatalog_grpc_service_config.json", + importpath = "cloud.google.com/go/datacatalog/apiv1beta1;datacatalog", + service_yaml = "datacatalog_v1beta1.yaml", + deps = [ + ":datacatalog_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_test( + name = "datacatalog_go_gapic_test", + srcs = [":datacatalog_go_gapic_srcjar_test"], + embed = [":datacatalog_go_gapic"], + importpath = "cloud.google.com/go/datacatalog/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-datacatalog-v1beta1-go", + deps = [ + ":datacatalog_go_gapic", + ":datacatalog_go_gapic_srcjar-test.srcjar", + ":datacatalog_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "datacatalog_moved_proto", + srcs = [":datacatalog_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "datacatalog_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":datacatalog_moved_proto"], +) + +py_grpc_library( + name = "datacatalog_py_grpc", + srcs = [":datacatalog_moved_proto"], + deps = [":datacatalog_py_proto"], +) + +py_gapic_library( + name = "datacatalog_py_gapic", + src = ":datacatalog_proto_with_info", + gapic_yaml = "datacatalog_gapic.yaml", + package = "google.cloud.datacatalog.v1beta1", + service_yaml = "datacatalog_v1beta1.yaml", + deps = [ + ":datacatalog_py_grpc", + ":datacatalog_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "datacatalog-v1beta1-py", + deps = [ + ":datacatalog_py_gapic", + ":datacatalog_py_grpc", + ":datacatalog_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "datacatalog_php_proto", + deps = [":datacatalog_proto"], +) + +php_grpc_library( + name = "datacatalog_php_grpc", + srcs = [":datacatalog_proto"], + deps = [":datacatalog_php_proto"], +) + +php_gapic_library( + name = "datacatalog_php_gapic", + src = ":datacatalog_proto_with_info", + gapic_yaml = "datacatalog_gapic.yaml", + package = "google.cloud.datacatalog.v1beta1", + service_yaml = "datacatalog_v1beta1.yaml", + deps = [ + ":datacatalog_php_grpc", + ":datacatalog_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-datacatalog-v1beta1-php", + deps = [ + ":datacatalog_php_gapic", + ":datacatalog_php_grpc", + ":datacatalog_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "datacatalog_nodejs_gapic", + src = ":datacatalog_proto_with_info", + gapic_yaml = "datacatalog_gapic.yaml", + package = "google.cloud.datacatalog.v1beta1", + service_yaml = "datacatalog_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "datacatalog-v1beta1-nodejs", + deps = [ + ":datacatalog_nodejs_gapic", + ":datacatalog_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "datacatalog_ruby_proto", + deps = [":datacatalog_proto"], +) + +ruby_grpc_library( + name = "datacatalog_ruby_grpc", + srcs = [":datacatalog_proto"], + deps = [":datacatalog_ruby_proto"], +) + +ruby_gapic_library( + name = "datacatalog_ruby_gapic", + src = ":datacatalog_proto_with_info", + gapic_yaml = "datacatalog_gapic.yaml", + package = "google.cloud.datacatalog.v1beta1", + service_yaml = "datacatalog_v1beta1.yaml", + deps = [ + ":datacatalog_ruby_grpc", + ":datacatalog_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-datacatalog-v1beta1-ruby", + deps = [ + ":datacatalog_ruby_gapic", + ":datacatalog_ruby_grpc", + ":datacatalog_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "datacatalog_csharp_proto", + deps = [":datacatalog_proto"], +) + +csharp_grpc_library( + name = "datacatalog_csharp_grpc", + srcs = [":datacatalog_proto"], + deps = [":datacatalog_csharp_proto"], +) + +csharp_gapic_library( + name = "datacatalog_csharp_gapic", + src = ":datacatalog_proto_with_info", + gapic_yaml = "datacatalog_gapic.yaml", + package = "google.cloud.datacatalog.v1beta1", + service_yaml = "datacatalog_v1beta1.yaml", + deps = [ + ":datacatalog_csharp_grpc", + ":datacatalog_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-datacatalog-v1beta1-csharp", + deps = [ + ":datacatalog_csharp_gapic", + ":datacatalog_csharp_grpc", + ":datacatalog_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/datacatalog/artman_datacatalog_v1beta1.yaml b/google/cloud/datacatalog/v1beta1/artman_datacatalog_v1beta1.yaml similarity index 91% rename from google/cloud/datacatalog/artman_datacatalog_v1beta1.yaml rename to google/cloud/datacatalog/v1beta1/artman_datacatalog_v1beta1.yaml index e3fdc8ca3..a410e5af1 100644 --- a/google/cloud/datacatalog/artman_datacatalog_v1beta1.yaml +++ b/google/cloud/datacatalog/v1beta1/artman_datacatalog_v1beta1.yaml @@ -5,9 +5,9 @@ common: proto_deps: - name: google-common-protos src_proto_paths: - - v1beta1 + - . service_yaml: datacatalog_v1beta1.yaml - gapic_yaml: v1beta1/datacatalog_gapic.yaml + gapic_yaml: datacatalog_gapic.yaml artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/datacatalog/v1beta1/common.proto b/google/cloud/datacatalog/v1beta1/common.proto new file mode 100644 index 000000000..a759b371e --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/common.proto @@ -0,0 +1,38 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1beta1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; +option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; + +// This enum describes all the possible systems that Data Catalog integrates +// with. +enum IntegratedSystem { + // Default unknown system. + INTEGRATED_SYSTEM_UNSPECIFIED = 0; + + // BigQuery. + BIGQUERY = 1; + + // Cloud Pub/Sub. + CLOUD_PUBSUB = 2; +} diff --git a/google/cloud/datacatalog/v1beta1/datacatalog.proto b/google/cloud/datacatalog/v1beta1/datacatalog.proto index e89e7ad62..038e2203f 100644 --- a/google/cloud/datacatalog/v1beta1/datacatalog.proto +++ b/google/cloud/datacatalog/v1beta1/datacatalog.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,17 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.datacatalog.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/datacatalog/v1beta1/common.proto"; +import "google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto"; import "google/cloud/datacatalog/v1beta1/schema.proto"; import "google/cloud/datacatalog/v1beta1/search.proto"; import "google/cloud/datacatalog/v1beta1/table_spec.proto"; @@ -27,12 +31,14 @@ import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/api/client.proto"; option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; +option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; // Data Catalog API service allows clients to discover, understand, and manage // their data. @@ -46,28 +52,125 @@ service DataCatalog { // This is a custom method // (https://cloud.google.com/apis/design/custom_methods) and does not return // the complete resource, only the resource identifier and high level - // fields. Clients can subsequentally call Get methods. + // fields. Clients can subsequentally call `Get` methods. // - // Note that searches do not have full recall. There may be results that match - // your query but are not returned, even in subsequent pages of results. These - // missing results may vary across repeated calls to search. Do not rely on - // this method if you need to guarantee full recall. + // Note that Data Catalog search queries do not guarantee full recall. Query + // results that match your query may not be returned, even in subsequent + // result pages. Also note that results returned (and not returned) can vary + // across repeated search queries. // // See [Data Catalog Search - // Syntax](/data-catalog/docs/how-to/search-reference) for more information. + // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) + // for more information. rpc SearchCatalog(SearchCatalogRequest) returns (SearchCatalogResponse) { option (google.api.http) = { post: "/v1beta1/catalog:search" body: "*" }; + option (google.api.method_signature) = "scope,query"; + } + + // A maximum of 10,000 entry groups may be created per organization across all + // locations. + // + // Users should enable the Data Catalog API in the project identified by + // the `parent` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + rpc CreateEntryGroup(CreateEntryGroupRequest) returns (EntryGroup) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/entryGroups" + body: "entry_group" + }; + option (google.api.method_signature) = "parent,entry_group_id,entry_group"; + } + + // Updates an EntryGroup. The user should enable the Data Catalog API in the + // project identified by the `entry_group.name` parameter (see [Data Catalog + // Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + rpc UpdateEntryGroup(UpdateEntryGroupRequest) returns (EntryGroup) { + option (google.api.http) = { + patch: "/v1beta1/{entry_group.name=projects/*/locations/*/entryGroups/*}" + body: "entry_group" + }; + option (google.api.method_signature) = "entry_group"; + option (google.api.method_signature) = "entry_group,update_mask"; + } + + // Gets an EntryGroup. + rpc GetEntryGroup(GetEntryGroupRequest) returns (EntryGroup) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/entryGroups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,read_mask"; + } + + // Deletes an EntryGroup. Only entry groups that do not contain entries can be + // deleted. Users should enable the Data Catalog API in the project + // identified by the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + rpc DeleteEntryGroup(DeleteEntryGroupRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/entryGroups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists entry groups. + rpc ListEntryGroups(ListEntryGroupsRequest) returns (ListEntryGroupsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/entryGroups" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates an entry. Only entries of 'FILESET' type or user-specified type can + // be created. + // + // Users should enable the Data Catalog API in the project identified by + // the `parent` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + // + // A maximum of 100,000 entries may be created per entry group. + rpc CreateEntry(CreateEntryRequest) returns (Entry) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/entries" + body: "entry" + }; + option (google.api.method_signature) = "parent,entry_id,entry"; } // Updates an existing entry. + // Users should enable the Data Catalog API in the project identified by + // the `entry.name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). rpc UpdateEntry(UpdateEntryRequest) returns (Entry) { option (google.api.http) = { patch: "/v1beta1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}" body: "entry" }; + option (google.api.method_signature) = "entry"; + option (google.api.method_signature) = "entry,update_mask"; + } + + // Deletes an existing entry. Only entries created through + // [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry] + // method can be deleted. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + rpc DeleteEntry(DeleteEntryRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*}" + }; + option (google.api.method_signature) = "name"; } // Gets an entry. @@ -75,6 +178,7 @@ service DataCatalog { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*}" }; + option (google.api.method_signature) = "name"; } // Get an entry by target resource name. This method allows clients to use @@ -86,12 +190,25 @@ service DataCatalog { }; } - // Creates a tag template. + // Lists entries. + rpc ListEntries(ListEntriesRequest) returns (ListEntriesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/entries" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a tag template. The user should enable the Data Catalog API in + // the project identified by the `parent` parameter (see [Data Catalog + // Resource + // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) + // for more information). rpc CreateTagTemplate(CreateTagTemplateRequest) returns (TagTemplate) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*/locations/*}/tagTemplates" body: "tag_template" }; + option (google.api.method_signature) = "parent,tag_template_id,tag_template"; } // Gets a tag template. @@ -99,63 +216,106 @@ service DataCatalog { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*}" }; + option (google.api.method_signature) = "name"; } // Updates a tag template. This method cannot be used to update the fields of // a template. The tag template fields are represented as separate resources // and should be updated using their own create/update/delete methods. + // Users should enable the Data Catalog API in the project identified by + // the `tag_template.name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). rpc UpdateTagTemplate(UpdateTagTemplateRequest) returns (TagTemplate) { option (google.api.http) = { patch: "/v1beta1/{tag_template.name=projects/*/locations/*/tagTemplates/*}" body: "tag_template" }; + option (google.api.method_signature) = "tag_template"; + option (google.api.method_signature) = "tag_template,update_mask"; } // Deletes a tag template and all tags using the template. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). rpc DeleteTagTemplate(DeleteTagTemplateRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*}" }; + option (google.api.method_signature) = "name,force"; } - // Creates a field in a tag template. + // Creates a field in a tag template. The user should enable the Data Catalog + // API in the project identified by the `parent` parameter (see + // [Data Catalog Resource + // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) + // for more information). rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) returns (TagTemplateField) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*/locations/*/tagTemplates/*}/fields" body: "tag_template_field" }; + option (google.api.method_signature) = "parent,tag_template_field_id,tag_template_field"; } // Updates a field in a tag template. This method cannot be used to update the - // field type. + // field type. Users should enable the Data Catalog API in the project + // identified by the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) returns (TagTemplateField) { option (google.api.http) = { patch: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" body: "tag_template_field" }; + option (google.api.method_signature) = "name,tag_template_field"; + option (google.api.method_signature) = "name,tag_template_field,update_mask"; } - // Renames a field in a tag template. + // Renames a field in a tag template. The user should enable the Data Catalog + // API in the project identified by the `name` parameter (see [Data Catalog + // Resource + // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) + // for more information). rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) returns (TagTemplateField) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename" body: "*" }; + option (google.api.method_signature) = "name,new_tag_template_field_id"; } // Deletes a field in a tag template and all uses of that field. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" }; + option (google.api.method_signature) = "name,force"; } // Creates a tag on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. + // Note: The project identified by the `parent` parameter for the + // [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) + // and the + // [tag + // template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) + // used to create the tag must be from the same organization. rpc CreateTag(CreateTagRequest) returns (Tag) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" body: "tag" + additional_bindings { + post: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/tags" + body: "tag" + } }; + option (google.api.method_signature) = "parent,tag"; } // Updates an existing tag. @@ -163,38 +323,62 @@ service DataCatalog { option (google.api.http) = { patch: "/v1beta1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" body: "tag" + additional_bindings { + patch: "/v1beta1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}" + body: "tag" + } }; + option (google.api.method_signature) = "tag"; + option (google.api.method_signature) = "tag,update_mask"; } // Deletes a tag. rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" + additional_bindings { + delete: "/v1beta1/{name=projects/*/locations/*/entryGroups/*/tags/*}" + } }; + option (google.api.method_signature) = "name"; } // Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" + additional_bindings { + get: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/tags" + } }; + option (google.api.method_signature) = "parent"; } // Sets the access control policy for a resource. Replaces any existing // policy. // Supported resources are: // - Tag templates. - // Note, this method cannot be used to manage policies for BigQuery, Cloud - // Pub/Sub and any external Google Cloud Platform resources synced to Cloud - // Data Catalog. + // - Entries. + // - Entry groups. + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. // // Callers must have following Google IAM permission - // `datacatalog.tagTemplates.setIamPolicy` to set policies on tag templates. + // - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag + // templates. + // - `datacatalog.entries.setIamPolicy` to set policies on entries. + // - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy" body: "*" + additional_bindings { + post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy" + body: "*" + } }; + + option (google.api.method_signature) = "resource,policy"; } // Gets the access control policy for a resource. A `NOT_FOUND` error @@ -203,28 +387,42 @@ service DataCatalog { // // Supported resources are: // - Tag templates. - // Note, this method cannot be used to manage policies for BigQuery, Cloud - // Pub/Sub and any external Google Cloud Platform resources synced to Cloud - // Data Catalog. + // - Entries. + // - Entry groups. + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. // // Callers must have following Google IAM permission - // `datacatalog.tagTemplates.getIamPolicy` to get policies on tag templates. + // - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag + // templates. + // - `datacatalog.entries.getIamPolicy` to get policies on entries. + // - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy" body: "*" + additional_bindings { + post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy" + body: "*" + } + additional_bindings { + post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy" + body: "*" + } }; + option (google.api.method_signature) = "resource"; } // Returns the caller's permissions on a resource. // If the resource does not exist, an empty set of permissions is returned // (We don't return a `NOT_FOUND` error). // - // Supported resource are: - // - tag templates. - // Note, this method cannot be used to manage policies for BigQuery, Cloud - // Pub/Sub and any external Google Cloud Platform resources synced to Cloud - // Data Catalog. + // Supported resources are: + // - Tag templates. + // - Entries. + // - Entry groups. + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. // // A caller is not required to have Google IAM permission to make this // request. @@ -232,6 +430,14 @@ service DataCatalog { option (google.api.http) = { post: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions" body: "*" + additional_bindings { + post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions" + body: "*" + } + additional_bindings { + post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions" + body: "*" + } }; } } @@ -239,35 +445,32 @@ service DataCatalog { // Request message for // [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. message SearchCatalogRequest { + // The criteria that select the subspace used for query matching. message Scope { - // Data Catalog tries to automatically choose the right corpus of data to - // search through. You can ensure an organization is included by adding it - // to "include_org_ids". You can ensure a project's org is included with - // "include_project_ids". You must specify at least one organization - // using "include_org_ids" or "include_project_ids" in all search requests. - // - // List of organization IDs to search within. To find your organization ID, - // follow instructions in - // https://cloud.google.com/resource-manager/docs/creating-managing-organization + // The list of organization IDs to search within. To find your organization + // ID, follow instructions in + // https://cloud.google.com/resource-manager/docs/creating-managing-organization. repeated string include_org_ids = 2; - // List of project IDs to search within. To learn more about the + // The list of project IDs to search within. To learn more about the // distinction between project names/IDs/numbers, go to - // https://cloud.google.com/docs/overview/#projects + // https://cloud.google.com/docs/overview/#projects. repeated string include_project_ids = 3; - // If true, include Google Cloud Platform (GCP) public datasets in the + // If `true`, include Google Cloud Platform (GCP) public datasets in the // search results. Info on GCP public datasets is available at // https://cloud.google.com/public-datasets/. By default, GCP public // datasets are excluded. bool include_gcp_public_datasets = 7; } - // Required. The scope of this search request. - Scope scope = 6; + // Required. The scope of this search request. A `scope` that has empty + // `include_org_ids`, `include_project_ids` AND false + // `include_gcp_public_datasets` is considered invalid. Data Catalog will + // return an error in such a case. + Scope scope = 6 [(google.api.field_behavior) = REQUIRED]; - // Required. The query string in search query syntax. The query must be - // non-empty. + // Required. The query string in search query syntax. The query must be non-empty. // // Query strings can be simple as "x" or more qualified as: // @@ -277,37 +480,37 @@ message SearchCatalogRequest { // // Note: Query tokens need to have a minimum of 3 characters for substring // matching to work correctly. See [Data Catalog Search - // Syntax](/data-catalog/docs/how-to/search-reference) for more information. - string query = 1; + // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) + // for more information. + string query = 1 [(google.api.field_behavior) = REQUIRED]; // Number of results in the search page. If <=0 then defaults to 10. Max limit // for page_size is 1000. Throws an invalid argument for page_size > 1000. int32 page_size = 2; - // Optional pagination token returned in an earlier - // [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalogResponse.next_page_token]; + // Optional. Pagination token returned in an earlier + // [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token], which // indicates that this is a continuation of a prior - // [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog] - // call, and that the system should return the next page of data. If empty - // then the first page is returned. - string page_token = 3; + // [SearchCatalogRequest][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog] + // call, and that the system should return the next page of data. If empty, + // the first page is returned. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Specifies the ordering of results, currently supported case-sensitive // choices are: - //
            - //
          • relevance
          • - //
          • last_access_timestamp [asc|desc], defaults to descending if not - // specified,
          • - //
          • last_modified_timestamp [asc|desc], defaults to descending if not - // specified.
          • - //
          + // + // * `relevance`, only supports descending + // * `last_modified_timestamp [asc|desc]`, defaults to descending if not + // specified + // + // If not specified, defaults to `relevance` descending. string order_by = 5; } // Response message for // [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. message SearchCatalogResponse { - // Search results in descending order of relevance. + // Search results. repeated SearchCatalogResult results = 1; // The token that can be used to retrieve the next page of results. @@ -315,32 +518,185 @@ message SearchCatalogResponse { } // Request message for -// [UpdateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntry]. -message UpdateEntryRequest { - // Required. The updated Entry. - Entry entry = 1; +// [CreateEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroup]. +message CreateEntryGroupRequest { + // Required. The name of the project this entry group is in. Example: + // + // * projects/{project_id}/locations/{location} + // + // Note that this EntryGroup and its child resources may not actually be + // stored in the location in this name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // Required. The id of the entry group to create. + // The id must begin with a letter or underscore, contain only English + // letters, numbers and underscores, and be at most 64 characters. + string entry_group_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // The entry group to create. Defaults to an empty entry group. + EntryGroup entry_group = 2; +} - // Optional. The fields to update on the entry. If absent or empty, all - // modifiable fields are updated. +// Request message for +// [UpdateEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryGroup]. +message UpdateEntryGroupRequest { + // Required. The updated entry group. "name" field must be set. + EntryGroup entry_group = 1 [(google.api.field_behavior) = REQUIRED]; + + // The fields to update on the entry group. If absent or empty, all modifiable + // fields are updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [GetEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroup]. +message GetEntryGroupRequest { + // Required. The name of the entry group. For example, + // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // The fields to return. If not set or empty, all fields are returned. + google.protobuf.FieldMask read_mask = 2; +} + +// Request message for +// [DeleteEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroup]. +message DeleteEntryGroupRequest { + // Required. The name of the entry group. For example, + // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // Optional. If true, deletes all entries in the entry group. + bool force = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. +message ListEntryGroupsRequest { + // Required. The name of the location that contains the entry groups, which can be + // provided in URL format. Example: // - // Modifiable fields in synced entries: + // * projects/{project_id}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // Optional. The maximum number of items to return. Default is 10. Max limit is 1000. + // Throws an invalid argument for `page_size > 1000`. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token that specifies which page is requested. If empty, the first page is + // returned. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. +message ListEntryGroupsResponse { + // EntryGroup details. + repeated EntryGroup entry_groups = 1; + + // Token to retrieve the next page of results. It is set to empty if no items + // remain in results. + string next_page_token = 2; +} + +// Request message for +// [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry]. +message CreateEntryRequest { + // Required. The name of the entry group this entry is in. Example: // - // 1. schema (Pub/Sub topics only) + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} // - // Modifiable fields in native entries: + // Note that this Entry and its child resources may not actually be stored in + // the location in this name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // Required. The id of the entry to create. + string entry_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entry to create. + Entry entry = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [UpdateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntry]. +message UpdateEntryRequest { + // Required. The updated entry. The "name" field must be set. + Entry entry = 1 [(google.api.field_behavior) = REQUIRED]; + + // The fields to update on the entry. If absent or empty, all modifiable + // fields are updated. // - // 1. display_name - // 2. description - // 3. schema + // The following fields are modifiable: + // * For entries with type `DATA_STREAM`: + // * `schema` + // * For entries with type `FILESET` + // * `schema` + // * `display_name` + // * `description` + // * `gcs_fileset_spec` + // * `gcs_fileset_spec.file_patterns` + // * For entries with `user_specified_type` + // * `schema` + // * `display_name` + // * `description` + // * user_specified_type + // * user_specified_system + // * linked_resource + // * source_system_timestamps google.protobuf.FieldMask update_mask = 2; } +// Request message for +// [DeleteEntry][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntry]. +message DeleteEntryRequest { + // Required. The name of the entry. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Entry" + } + ]; +} + // Request message for // [GetEntry][google.cloud.datacatalog.v1beta1.DataCatalog.GetEntry]. message GetEntryRequest { - // Required. The name of the entry. For example, - // "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}". - string name = 1; + // Required. The name of the entry. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Entry" + } + ]; } // Request message for @@ -351,274 +707,406 @@ message LookupEntryRequest { oneof target_name { // The full name of the Google Cloud Platform resource the Data Catalog // entry represents. See: - // https://cloud.google.com/apis/design/resource_names#full_resource_name + // https://cloud.google.com/apis/design/resource_names#full_resource_name. // Full names are case-sensitive. // // Examples: - // "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId". - // "//pubsub.googleapis.com/projects/projectId/topics/topicId" + // + // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId + // * //pubsub.googleapis.com/projects/projectId/topics/topicId string linked_resource = 1; // The SQL name of the entry. SQL names are case-sensitive. // // Examples: - //
            - //
          • cloud_pubsub.project_id.topic_id
          • - //
          • pubsub.project_id.`topic.id.with.dots`
          • - //
          • bigquery.project_id.dataset_id.table_id
          • - //
          • datacatalog.project_id.location_id.entry_group_id.entry_id
          • - //
          - // *_ids shoud satisfy the standard SQL rules for identifiers. - // https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical + // + // * `pubsub.project_id.topic_id` + // * ``pubsub.project_id.`topic.id.with.dots` `` + // * `bigquery.table.project_id.dataset_id.table_id` + // * `bigquery.dataset.project_id.dataset_id` + // * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` + // + // `*_id`s shoud satisfy the standard SQL rules for identifiers. + // https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. string sql_resource = 3; } } // Entry Metadata. // A Data Catalog Entry resource represents another resource in Google -// Cloud Platform, such as a BigQuery Dataset or a Pub/Sub Topic. Clients can -// use the `linked_resource` field in the Entry resource to refer to the -// original resource id of the source system. +// Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic), or +// outside of Google Cloud Platform. Clients can use the `linked_resource` field +// in the Entry resource to refer to the original resource ID of the source +// system. // // An Entry resource contains resource details, such as its schema. An Entry can // also be used to attach flexible metadata, such as a // [Tag][google.cloud.datacatalog.v1beta1.Tag]. message Entry { - // Required when used in - // [UpdateEntryRequest][google.cloud.datacatalog.v1beta1.UpdateEntryRequest]. - // The Data Catalog resource name of the entry in URL format. For example, - // "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}". + option (google.api.resource) = { + type: "datacatalog.googleapis.com/Entry" + pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}" + }; + + // The Data Catalog resource name of the entry in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + // // Note that this Entry and its child resources may not actually be stored in // the location in this name. - string name = 1; + string name = 1 [(google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + }]; - // Output only. The full name of the cloud resource the entry belongs to. See: - // https://cloud.google.com/apis/design/resource_names#full_resource_name + // The resource this metadata entry refers to. // - // Data Catalog supports resources from select Google Cloud Platform systems. - // `linked_resource` is the full name of the Google Cloud Platform resource. + // For Google Cloud Platform resources, `linked_resource` is the [full name of + // the + // resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). // For example, the `linked_resource` for a table resource from BigQuery is: // - // "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId". + // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId + // + // Output only when Entry is of type in the EntryType enum. For entries with + // user_specified_type, this field is optional and defaults to an empty + // string. string linked_resource = 9; - // Required. Type of entry. - EntryType type = 2; + // Required. Entry type. + oneof entry_type { + // The type of the entry. + // Only used for Entries with types in the EntryType enum. + EntryType type = 2; + + // Entry type if it does not fit any of the input-allowed values listed in + // `EntryType` enum above. When creating an entry, users should check the + // enum values first, if nothing matches the entry to be created, then + // provide a custom value, for example "my_special_type". + // `user_specified_type` strings must begin with a letter or underscore and + // can only contain letters, numbers, and underscores; are case insensitive; + // must be at least 1 character and at most 64 characters long. + // + // Currently, only FILESET enum value is allowed. All other entries created + // through Data Catalog must use `user_specified_type`. + string user_specified_type = 16; + } + + // The source system of the entry. + oneof system { + // Output only. This field indicates the entry's source system that Data Catalog + // integrates with, such as BigQuery or Pub/Sub. + IntegratedSystem integrated_system = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This field indicates the entry's source system that Data Catalog does not + // integrate with. `user_specified_system` strings must begin with a letter + // or underscore and can only contain letters, numbers, and underscores; are + // case insensitive; must be at least 1 character and at most 64 characters + // long. + string user_specified_system = 18; + } - // Optional. Type specification information. + // Type specification information. oneof type_spec { + // Specification that applies to a Cloud Storage fileset. This is only valid + // on entries of type FILESET. + GcsFilesetSpec gcs_fileset_spec = 6; + // Specification that applies to a BigQuery table. This is only valid on - // entries of type TABLE. + // entries of type `TABLE`. BigQueryTableSpec bigquery_table_spec = 12; // Specification for a group of BigQuery tables with name pattern - // [prefix]YYYYMMDD. Context: - // https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding + // `[prefix]YYYYMMDD`. Context: + // https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding. BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; } - // Optional. Display information such as title and description. A short name - // to identify the entry, for example, "Analytics Data - Jan 2011". Default - // value is an empty string. + // Display information such as title and description. A short name to identify + // the entry, for example, "Analytics Data - Jan 2011". Default value is an + // empty string. string display_name = 3; - // Optional. Entry description, which can consist of several sentences or - // paragraphs that describe entry contents. Default value is an empty string. + // Entry description, which can consist of several sentences or paragraphs + // that describe entry contents. Default value is an empty string. string description = 4; - // Optional. Schema of the entry. An entry might not have any schema attached - // to it. + // Schema of the entry. An entry might not have any schema attached to it. Schema schema = 5; - // Output only. Timestamps about the underlying Google Cloud Platform resource - // -- not about this Data Catalog Entry. - SystemTimestamps source_system_timestamps = 7; + // Output only. Timestamps about the underlying resource, not about this Data Catalog + // entry. Output only when Entry is of type in the EntryType enum. For entries + // with user_specified_type, this field is optional and defaults to an empty + // timestamp. + SystemTimestamps source_system_timestamps = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// EntryGroup Metadata. +// An EntryGroup resource represents a logical grouping of zero or more +// Data Catalog [Entry][google.cloud.datacatalog.v1beta1.Entry] resources. +message EntryGroup { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/EntryGroup" + pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}" + }; + + // The resource name of the entry group in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + // + // Note that this EntryGroup and its child resources may not actually be + // stored in the location in this name. + string name = 1; + + // A short name to identify the entry group, for example, + // "analytics data - jan 2011". Default value is an empty string. + string display_name = 2; + + // Entry group description, which can consist of several sentences or + // paragraphs that describe entry group contents. Default value is an empty + // string. + string description = 3; + + // Output only. Timestamps about this EntryGroup. Default value is empty timestamps. + SystemTimestamps data_catalog_timestamps = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Request message for // [CreateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplate]. message CreateTagTemplateRequest { - // Required. The name of the project and the location this template is in. - // Example: "projects/{project_id}/locations/{location}". Note that this - // TagTemplate and its child resources may not actually be stored in the - // location in this name. - string parent = 1; + // Required. The name of the project and the template location + // [region](https://cloud.google.com/data-catalog/docs/concepts/regions. + // + // Example: + // + // * projects/{project_id}/locations/us-central1 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/TagTemplate" + } + ]; // Required. The id of the tag template to create. - string tag_template_id = 3; + string tag_template_id = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The tag template to create. - TagTemplate tag_template = 2; + TagTemplate tag_template = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [GetTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplate]. message GetTagTemplateRequest { - // Required. The name of the tag template. For example, - // "projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}". - string name = 1; + // Required. The name of the tag template. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplate" + } + ]; } // Request message for // [UpdateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplate]. message UpdateTagTemplateRequest { - // Required. The template to update. - TagTemplate tag_template = 1; + // Required. The template to update. The "name" field must be set. + TagTemplate tag_template = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The field mask specifies the parts of the template to overwrite. + // The field mask specifies the parts of the template to overwrite. // // Allowed fields: // - // * display_name + // * `display_name` // - // If update_mask is omitted, all of the allowed fields above will be updated. + // If absent or empty, all of the allowed fields above will be updated. google.protobuf.FieldMask update_mask = 2; } // Request message for // [DeleteTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplate]. message DeleteTagTemplateRequest { - // Required. The name of the tag template to delete. For example, - // "projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}". - string name = 1; - - // Required. Currently, this field must always be set to true. + // Required. The name of the tag template to delete. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplate" + } + ]; + + // Required. Currently, this field must always be set to `true`. // This confirms the deletion of any possible tags using this template. - // force = false will be supported in the future. - bool force = 2; + // `force = false` will be supported in the future. + bool force = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [CreateTag][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTag]. message CreateTagRequest { - // Required. - // The name of the resource to attach this tag to. Tags can be attached to - // Entries. (example: - // "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}"). + // Required. The name of the resource to attach this tag to. Tags can be attached to + // Entries. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + // // Note that this Tag and its child resources may not actually be stored in // the location in this name. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Tag" + } + ]; // Required. The tag to create. - Tag tag = 2; + Tag tag = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [UpdateTag][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTag]. message UpdateTagRequest { - // Required. The updated tag. - Tag tag = 1; + // Required. The updated tag. The "name" field must be set. + Tag tag = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The fields to update on the Tag. If absent or empty, all - // modifiable fields are updated. Currently the only modifiable field is the - // field `fields`. + // The fields to update on the Tag. If absent or empty, all modifiable fields + // are updated. Currently the only modifiable field is the field `fields`. google.protobuf.FieldMask update_mask = 2; } // Request message for // [DeleteTag][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTag]. message DeleteTagRequest { - // Required. The name of the tag to delete. For example, - // "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}". - string name = 1; + // Required. The name of the tag to delete. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Tag" + } + ]; } // Request message for // [CreateTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateField]. message CreateTagTemplateFieldRequest { - // Required. The name of the project this template is in. Example: - // "projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}". - // Note that this TagTemplateField may not actually be stored in the location - // in this name. - string parent = 1; - - // Required. The id of the tag template field to create. + // Required. The name of the project and the template location + // [region](https://cloud.google.com/data-catalog/docs/concepts/regions). + // + // Example: + // + // * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplate" + } + ]; + + // Required. The ID of the tag template field to create. // Field ids can contain letters (both uppercase and lowercase), numbers - // (0-9), underscores (_) and dashes (-). Field ids must be at least 1 - // character long and at most 128 characters long. Field ids must also be - // unique to their template. - string tag_template_field_id = 2; + // (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 + // character long and at most 128 characters long. Field IDs must also be + // unique within their template. + string tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The tag template field to create. - TagTemplateField tag_template_field = 3; + TagTemplateField tag_template_field = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [UpdateTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateField]. message UpdateTagTemplateFieldRequest { - // Required. The name of the tag template field. For example, - // "projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}". - string name = 1; + // Required. The name of the tag template field. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplateField" + } + ]; // Required. The template to update. - TagTemplateField tag_template_field = 2; + TagTemplateField tag_template_field = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. The field mask specifies the parts of the template to overwrite. + // Optional. The field mask specifies the parts of the template to be updated. // Allowed fields: // - // * display_name - // * type.enum_type + // * `display_name` + // * `type.enum_type` + // * `is_required` // - // If update_mask is omitted, all of the allowed fields above will be updated. + // If `update_mask` is not set or empty, all of the allowed fields above will + // be updated. // // When updating an enum type, the provided values will be merged with the // existing values. Therefore, enum values can only be added, existing enum - // values cannot be deleted nor renamed. - google.protobuf.FieldMask update_mask = 3; + // values cannot be deleted nor renamed. Updating a template field from + // optional to required is NOT allowed. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; } // Request message for // [RenameTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateField]. message RenameTagTemplateFieldRequest { - // Required. The name of the tag template. For example, - // "projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}". - string name = 1; - - // Required. The new ID of this tag template field. For example, - // "my_new_field". - string new_tag_template_field_id = 2; -} - -// Entry resources in Data Catalog can be of different types e.g. BigQuery -// Table entry is of type 'TABLE'. This enum describes all the possible types -// Data Catalog contains. -enum EntryType { - // Default unknown type - ENTRY_TYPE_UNSPECIFIED = 0; - - // The type of entry that has a GoogleSQL schema, including logical views. - TABLE = 2; - - // An entry type which is used for streaming entries. Example - Pub/Sub. - DATA_STREAM = 3; + // Required. The name of the tag template. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplateField" + } + ]; + + // Required. The new ID of this tag template field. For example, `my_new_field`. + string new_tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [DeleteTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateField]. message DeleteTagTemplateFieldRequest { - // Required. The name of the tag template field to delete. For example, - // "projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}". - string name = 1; - - // Required. Currently, this field must always be set to true. + // Required. The name of the tag template field to delete. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplateField" + } + ]; + + // Required. Currently, this field must always be set to `true`. // This confirms the deletion of this field from any tags using this field. - // force = false will be supported in the future. - bool force = 2; + // `force = false` will be supported in the future. + bool force = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [ListTags][google.cloud.datacatalog.v1beta1.DataCatalog.ListTags]. message ListTagsRequest { - // Required. The name of the Data Catalog resource to list the tags of. The - // resource could be an [Entry][google.cloud.datacatalog.v1beta1.Entry]. - string parent = 1; - - // Optional. The maximum number of tags to return. Default is 10. Max limit is - // 1000. + // Required. The name of the Data Catalog resource to list the tags of. The resource + // could be an [Entry][google.cloud.datacatalog.v1beta1.Entry] or an + // [EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup]. + // + // Examples: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Tag" + } + ]; + + // The maximum number of tags to return. Default is 10. Max limit is 1000. int32 page_size = 2; - // Optional. Token that specifies which page is requested. If empty, the first - // page is returned. + // Token that specifies which page is requested. If empty, the first page is + // returned. string page_token = 3; } @@ -632,3 +1120,67 @@ message ListTagsResponse { // remain in results. string next_page_token = 2; } + +// Request message for +// [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. +message ListEntriesRequest { + // Required. The name of the entry group that contains the entries, which can + // be provided in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // The maximum number of items to return. Default is 10. Max limit is 1000. + // Throws an invalid argument for `page_size > 1000`. + int32 page_size = 2; + + // Token that specifies which page is requested. If empty, the first page is + // returned. + string page_token = 3; + + // The fields to return for each Entry. If not set or empty, all + // fields are returned. + // For example, setting read_mask to contain only one path "name" will cause + // ListEntries to return a list of Entries with only "name" field. + google.protobuf.FieldMask read_mask = 4; +} + +// Response message for +// [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. +message ListEntriesResponse { + // Entry details. + repeated Entry entries = 1; + + // Token to retrieve the next page of results. It is set to empty if no items + // remain in results. + string next_page_token = 2; +} + +// Entry resources in Data Catalog can be of different types e.g. a BigQuery +// Table entry is of type `TABLE`. This enum describes all the possible types +// Data Catalog contains. +enum EntryType { + // Default unknown type. + ENTRY_TYPE_UNSPECIFIED = 0; + + // Output only. The type of entry that has a GoogleSQL schema, including + // logical views. + TABLE = 2; + + // Output only. The type of models. + // https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro + MODEL = 5; + + // Output only. An entry type which is used for streaming entries. Example: + // Pub/Sub topic. + DATA_STREAM = 3; + + // An entry type which is a set of files or objects. Example: + // Cloud Storage fileset. + FILESET = 4; +} diff --git a/google/cloud/datacatalog/v1beta1/datacatalog_gapic.legacy.yaml b/google/cloud/datacatalog/v1beta1/datacatalog_gapic.legacy.yaml new file mode 100644 index 000000000..cbe34409a --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/datacatalog_gapic.legacy.yaml @@ -0,0 +1,586 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.datacatalog.v1beta1 + python: + package_name: google.cloud.datacatalog_v1beta1.gapic + go: + package_name: cloud.google.com/go/datacatalog/apiv1beta1 + csharp: + package_name: Google.Cloud.Datacatalog.V1beta1 + ruby: + package_name: Google::Cloud::Datacatalog::V1beta1 + php: + package_name: Google\Cloud\Datacatalog\V1beta1 + nodejs: + package_name: datacatalog.v1beta1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.datacatalog.v1beta1.DataCatalog + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/entryGroups/{entry_group} + entity_name: entry_group + - name_pattern: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry} + entity_name: entry + - name_pattern: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag} + entity_name: tag + - name_pattern: projects/{project}/locations/{location}/tagTemplates/{tag_template} + entity_name: tag_template + - name_pattern: projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field} + entity_name: field + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: SearchCatalog + flattening: + groups: + - parameters: + - scope + - query + - order_by + required_fields: + - scope + - query + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: results + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + samples: + standalone: + - value_sets: [datacatalog_search] + region_tag: datacatalog_search + sample_value_sets: + - id: datacatalog_search + description: Search Catalog + parameters: + defaults: + - scope.include_project_ids[0] = "[Google Cloud Project ID]" + - scope.include_gcp_public_datasets = false + - query = "[String in search query syntax]" + attributes: + - parameter: scope.include_project_ids[0] + description: Your Google Cloud project ID. + sample_argument_name: include_project_id + - parameter: scope.include_gcp_public_datasets + description: If true, include Google Cloud Platform (GCP) public datasets in the search results. + sample_argument_name: include_gcp_public_datasets + - parameter: query + description: | + Your query string. + See: https://cloud.google.com/data-catalog/docs/how-to/search-reference + Example: system=bigquery type=dataset + sample_argument_name: query + on_success: + - print: ["Result type: %s", $resp.search_result_type] + - print: ["Result subtype: %s", $resp.search_result_subtype] + - print: ["Relative resource name: %s", $resp.relative_resource_name] + - print: ["Linked resource: %s\n", $resp.linked_resource] + - name: CreateEntryGroup + flattening: + groups: + - parameters: + - parent + - entry_group_id + - entry_group + required_fields: + - parent + - entry_group_id + - entry_group + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetEntryGroup + flattening: + groups: + - parameters: + - name + - read_mask + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: entry_group + timeout_millis: 60000 + - name: DeleteEntryGroup + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: entry_group + timeout_millis: 60000 + - name: CreateEntry + flattening: + groups: + - parameters: + - parent + - entry_id + - entry + required_fields: + - parent + - entry_id + - entry + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: entry_group + timeout_millis: 60000 + - name: UpdateEntry + flattening: + groups: + - parameters: + - entry + - update_mask + required_fields: + - entry + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + entry.name: entry + timeout_millis: 60000 + - name: DeleteEntry + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: entry + timeout_millis: 60000 + - name: GetEntry + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: entry + timeout_millis: 60000 + samples: + standalone: + - region_tag: datacatalog_get_entry + value_sets: [datacatalog_get_entry] + sample_value_sets: + - id: datacatalog_get_entry + description: Get Entry + parameters: + defaults: + # The full "name" is of the format: "projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}" + # Each part of the name can be separated out into its own parameter using `name%[part name]` + - name%project = "[Google Cloud Project ID]" + - name%location = "[Google Cloud Location ID]" + - name%entry_group = "[Entry Group ID]" + - name%entry = "[Entry ID]" + attributes: + - parameter: name%project + description: "Your Google Cloud project ID" + sample_argument_name: project_id + - parameter: name%location + description: "Google Cloud region, e.g. us-central1" + sample_argument_name: location_id + - parameter: name%entry_group + description: "ID of the Entry Group, e.g. @bigquery, @pubsub, my_entry_group" + sample_argument_name: entry_group_id + - parameter: name%entry + description: "ID of the Entry" + sample_argument_name: entry_id + on_success: + - define: entry = $resp + - print: ["Entry name: %s", entry.name] + - print: ["Entry type: %s", entry.type] + - print: ["Linked resource: %s", entry.linked_resource] + - name: LookupEntry + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + samples: + standalone: + - region_tag: datacatalog_lookup_entry + value_sets: [datacatalog_lookup_entry] + - region_tag: datacatalog_lookup_entry_sql_resource + value_sets: [datacatalog_lookup_entry_sql_resource] + sample_value_sets: + - id: datacatalog_lookup_entry + description: Lookup Entry + parameters: + defaults: + - linked_resource = "[Full Resource Name]" + attributes: + - parameter: linked_resource + sample_argument_name: resource_name + description: | + The full name of the Google Cloud Platform resource the Data Catalog entry represents. + See: https://cloud.google.com/apis/design/resource_names#full_resource_name + Examples: + //bigquery.googleapis.com/projects/bigquery-public-data/datasets/new_york_taxi_trips/tables/taxi_zone_geom + //pubsub.googleapis.com/projects/pubsub-public-data/topics/taxirides-realtime + on_success: + - define: entry = $resp + - print: ["Entry name: %s", entry.name] + - print: ["Entry type: %s", entry.type] + - print: ["Linked resource: %s", entry.linked_resource] + - id: datacatalog_lookup_entry_sql_resource + description: Lookup Entry using SQL resource + parameters: + defaults: + - sql_resource = "[SQL Resource Name]" + attributes: + - parameter: sql_resource + sample_argument_name: sql_name + description: | + The SQL name of the Google Cloud Platform resource the Data Catalog entry represents. + Examples: + bigquery.table.`bigquery-public-data`.new_york_taxi_trips.taxi_zone_geom + pubsub.topic.`pubsub-public-data`.`taxirides-realtime` + on_success: + - define: entry = $resp + - print: ["Entry name: %s", entry.name] + - print: ["Entry type: %s", entry.type] + - print: ["Linked resource: %s", entry.linked_resource] + - name: ListEntryGroups + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: ListEntries + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: entry_group + timeout_millis: 60000 + - name: UpdateEntryGroup + flattening: + groups: + - parameters: + - entry_group + - parameters: + - entry_group + - update_mask + required_fields: + - entry_group + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + entry_group.name: entry_group + timeout_millis: 60000 + - name: CreateTagTemplate + flattening: + groups: + - parameters: + - parent + - tag_template_id + - tag_template + required_fields: + - parent + - tag_template_id + - tag_template + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetTagTemplate + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: tag_template + timeout_millis: 60000 + - name: UpdateTagTemplate + flattening: + groups: + - parameters: + - tag_template + - update_mask + required_fields: + - tag_template + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + tag_template.name: tag_template + timeout_millis: 60000 + - name: DeleteTagTemplate + flattening: + groups: + - parameters: + - name + - force + required_fields: + - name + - force + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: tag_template + timeout_millis: 60000 + - name: CreateTagTemplateField + flattening: + groups: + - parameters: + - parent + - tag_template_field_id + - tag_template_field + required_fields: + - parent + - tag_template_field_id + - tag_template_field + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: tag_template + timeout_millis: 60000 + - name: UpdateTagTemplateField + flattening: + groups: + - parameters: + - name + - tag_template_field + - update_mask + required_fields: + - name + - tag_template_field + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: field + timeout_millis: 60000 + - name: RenameTagTemplateField + flattening: + groups: + - parameters: + - name + - new_tag_template_field_id + required_fields: + - name + - new_tag_template_field_id + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: field + timeout_millis: 60000 + - name: DeleteTagTemplateField + flattening: + groups: + - parameters: + - name + - force + required_fields: + - name + - force + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: field + timeout_millis: 60000 + - name: CreateTag + flattening: + groups: + - parameters: + - parent + - tag + required_fields: + - parent + - tag + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: entry + timeout_millis: 60000 + - name: UpdateTag + flattening: + groups: + - parameters: + - tag + - update_mask + required_fields: + - tag + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + tag.name: tag + timeout_millis: 60000 + - name: DeleteTag + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: tag + timeout_millis: 60000 + - name: ListTags + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: tags + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: entry + timeout_millis: 60000 + - name: SetIamPolicy + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: tag_template + timeout_millis: 60000 + - name: GetIamPolicy + flattening: + groups: + - parameters: + - resource + required_fields: + - resource + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: tag_template + timeout_millis: 60000 + - name: TestIamPermissions + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: tag_template + timeout_millis: 60000 diff --git a/google/cloud/datacatalog/v1beta1/datacatalog_gapic.yaml b/google/cloud/datacatalog/v1beta1/datacatalog_gapic.yaml index 5ceffbaef..f45b39515 100644 --- a/google/cloud/datacatalog/v1beta1/datacatalog_gapic.yaml +++ b/google/cloud/datacatalog/v1beta1/datacatalog_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -17,354 +17,130 @@ language_settings: nodejs: package_name: datacatalog.v1beta1 domain_layer_location: google-cloud - # A list of API interface configurations. interfaces: # The fully qualified name of the API interface. - name: google.cloud.datacatalog.v1beta1.DataCatalog - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/locations/{location} - entity_name: location - - name_pattern: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry} - entity_name: entry - - name_pattern: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag} - entity_name: tag - - name_pattern: projects/{project}/locations/{location}/tagTemplates/{tag_template} - entity_name: tag_template - - name_pattern: projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field} - entity_name: field - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: SearchCatalog - flattening: - groups: - - parameters: - - scope - - query - - order_by - required_fields: - - scope - - query - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: results - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: UpdateEntry - flattening: - groups: - - parameters: - - entry - - update_mask - required_fields: - - entry - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - entry.name: entry - timeout_millis: 60000 - - name: GetEntry - flattening: - groups: - - parameters: - - name - required_fields: - - name + samples: + standalone: + - value_sets: [datacatalog_search] + region_tag: datacatalog_search + sample_value_sets: + - id: datacatalog_search + description: Search Catalog + parameters: + defaults: + - scope.include_project_ids[0] = "[Google Cloud Project ID]" + - scope.include_gcp_public_datasets = false + - query = "[String in search query syntax]" + attributes: + - parameter: scope.include_project_ids[0] + description: Your Google Cloud project ID. + sample_argument_name: include_project_id + - parameter: scope.include_gcp_public_datasets + description: If true, include Google Cloud Platform (GCP) public datasets in the search results. + sample_argument_name: include_gcp_public_datasets + - parameter: query + description: | + Your query string. + See: https://cloud.google.com/data-catalog/docs/how-to/search-reference + Example: system=bigquery type=dataset + sample_argument_name: query + on_success: + - print: ["Result type: %s", $resp.search_result_type] + - print: ["Result subtype: %s", $resp.search_result_subtype] + - print: ["Relative resource name: %s", $resp.relative_resource_name] + - print: ["Linked resource: %s\n", $resp.linked_resource] + - name: DeleteEntryGroup retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: entry - timeout_millis: 60000 - - name: LookupEntry + - name: DeleteEntry retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - - name: CreateTagTemplate - flattening: - groups: - - parameters: - - parent - - tag_template_id - - tag_template - required_fields: - - parent - - tag_template_id - - tag_template - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - - name: GetTagTemplate - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: tag_template - timeout_millis: 60000 - - name: UpdateTagTemplate - flattening: - groups: - - parameters: - - tag_template - - update_mask - required_fields: - - tag_template - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - tag_template.name: tag_template - timeout_millis: 60000 + - name: GetEntry + samples: + standalone: + - region_tag: datacatalog_get_entry + value_sets: [datacatalog_get_entry] + sample_value_sets: + - id: datacatalog_get_entry + description: Get Entry + parameters: + defaults: + # The full "name" is of the format: "projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}" + # Each part of the name can be separated out into its own parameter using `name%[part name]` + - name%project = "[Google Cloud Project ID]" + - name%location = "[Google Cloud Location ID]" + - name%entry_group = "[Entry Group ID]" + - name%entry = "[Entry ID]" + attributes: + - parameter: name%project + description: "Your Google Cloud project ID" + sample_argument_name: project_id + - parameter: name%location + description: "Google Cloud region, e.g. us-central1" + sample_argument_name: location_id + - parameter: name%entry_group + description: "ID of the Entry Group, e.g. @bigquery, @pubsub, my_entry_group" + sample_argument_name: entry_group_id + - parameter: name%entry + description: "ID of the Entry" + sample_argument_name: entry_id + on_success: + - define: entry = $resp + - print: ["Entry name: %s", entry.name] + - print: ["Entry type: %s", entry.type] + - print: ["Linked resource: %s", entry.linked_resource] + - name: LookupEntry + samples: + standalone: + - region_tag: datacatalog_lookup_entry + value_sets: [datacatalog_lookup_entry] + - region_tag: datacatalog_lookup_entry_sql_resource + value_sets: [datacatalog_lookup_entry_sql_resource] + sample_value_sets: + - id: datacatalog_lookup_entry + description: Lookup Entry + parameters: + defaults: + - linked_resource = "[Full Resource Name]" + attributes: + - parameter: linked_resource + sample_argument_name: resource_name + description: | + The full name of the Google Cloud Platform resource the Data Catalog entry represents. + See: https://cloud.google.com/apis/design/resource_names#full_resource_name + Examples: + //bigquery.googleapis.com/projects/bigquery-public-data/datasets/new_york_taxi_trips/tables/taxi_zone_geom + //pubsub.googleapis.com/projects/pubsub-public-data/topics/taxirides-realtime + on_success: + - define: entry = $resp + - print: ["Entry name: %s", entry.name] + - print: ["Entry type: %s", entry.type] + - print: ["Linked resource: %s", entry.linked_resource] + - id: datacatalog_lookup_entry_sql_resource + description: Lookup Entry using SQL resource + parameters: + defaults: + - sql_resource = "[SQL Resource Name]" + attributes: + - parameter: sql_resource + sample_argument_name: sql_name + description: | + The SQL name of the Google Cloud Platform resource the Data Catalog entry represents. + Examples: + bigquery.table.`bigquery-public-data`.new_york_taxi_trips.taxi_zone_geom + pubsub.topic.`pubsub-public-data`.`taxirides-realtime` + on_success: + - define: entry = $resp + - print: ["Entry name: %s", entry.name] + - print: ["Entry type: %s", entry.type] + - print: ["Linked resource: %s", entry.linked_resource] - name: DeleteTagTemplate - flattening: - groups: - - parameters: - - name - - force - required_fields: - - name - - force retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: tag_template - timeout_millis: 60000 - - name: CreateTagTemplateField - flattening: - groups: - - parameters: - - parent - - tag_template_field_id - - tag_template_field - required_fields: - - parent - - tag_template_field_id - - tag_template_field - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: tag_template - timeout_millis: 60000 - - name: UpdateTagTemplateField - flattening: - groups: - - parameters: - - name - - tag_template_field - - update_mask - required_fields: - - name - - tag_template_field - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: field - timeout_millis: 60000 - - name: RenameTagTemplateField - flattening: - groups: - - parameters: - - name - - new_tag_template_field_id - required_fields: - - name - - new_tag_template_field_id - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: field - timeout_millis: 60000 - name: DeleteTagTemplateField - flattening: - groups: - - parameters: - - name - - force - required_fields: - - name - - force retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: field - timeout_millis: 60000 - - name: CreateTag - flattening: - groups: - - parameters: - - parent - - tag - required_fields: - - parent - - tag - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: entry - timeout_millis: 60000 - - name: UpdateTag - flattening: - groups: - - parameters: - - tag - - update_mask - required_fields: - - tag - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - tag.name: tag - timeout_millis: 60000 - name: DeleteTag - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: tag - timeout_millis: 60000 - - name: ListTags - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: tags retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: entry - timeout_millis: 60000 - - name: SetIamPolicy - flattening: - groups: - - parameters: - - resource - - policy - required_fields: - - resource - - policy - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: tag_template - timeout_millis: 60000 - name: GetIamPolicy - flattening: - groups: - - parameters: - - resource - required_fields: - - resource - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: tag_template - timeout_millis: 60000 - - name: TestIamPermissions - flattening: - groups: - - parameters: - - resource - - permissions - required_fields: - - resource - - permissions retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: tag_template - timeout_millis: 60000 diff --git a/google/cloud/datacatalog/v1beta1/datacatalog_grpc_service_config.json b/google/cloud/datacatalog/v1beta1/datacatalog_grpc_service_config.json new file mode 100755 index 000000000..3e39b464c --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/datacatalog_grpc_service_config.json @@ -0,0 +1,66 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.datacatalog.v1beta1.DataCatalog" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.datacatalog.v1beta1.DataCatalog", + "method": "GetEntryGroup" + }, + { + "service": "google.cloud.datacatalog.v1beta1.DataCatalog", + "method": "DeleteEntryGroup" + }, + { + "service": "google.cloud.datacatalog.v1beta1.DataCatalog", + "method": "DeleteEntry" + }, + { + "service": "google.cloud.datacatalog.v1beta1.DataCatalog", + "method": "GetEntry" + }, + { + "service": "google.cloud.datacatalog.v1beta1.DataCatalog", + "method": "LookupEntry" + }, + { + "service": "google.cloud.datacatalog.v1beta1.DataCatalog", + "method": "GetTagTemplate" + }, + { + "service": "google.cloud.datacatalog.v1beta1.DataCatalog", + "method": "DeleteTagTemplate" + }, + { + "service": "google.cloud.datacatalog.v1beta1.DataCatalog", + "method": "DeleteTagTemplateField" + }, + { + "service": "google.cloud.datacatalog.v1beta1.DataCatalog", + "method": "DeleteTag" + }, + { + "service": "google.cloud.datacatalog.v1beta1.DataCatalog", + "method": "ListTags" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/datacatalog/v1beta1/datacatalog_v1beta1.yaml b/google/cloud/datacatalog/v1beta1/datacatalog_v1beta1.yaml new file mode 100644 index 000000000..1a1d044bc --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/datacatalog_v1beta1.yaml @@ -0,0 +1,65 @@ +type: google.api.Service +config_version: 3 +name: datacatalog.googleapis.com +title: Google Cloud Data Catalog API + +apis: +- name: google.cloud.datacatalog.v1beta1.DataCatalog +- name: google.cloud.datacatalog.v1beta1.PolicyTagManager +- name: google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization + +documentation: + summary: |- + A fully managed and highly scalable data discovery and metadata management + service. + overview: |- + DataCatalog is a centralized and unified data catalog service for all your + Cloud resources, where users and systems can discover data, explore and + curate its semantics, understand how to act on it, and help govern its + usage. + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + description: |- + Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + description: |- + Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + description: |- + Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + +authentication: + rules: + - selector: 'google.cloud.datacatalog.v1beta1.DataCatalog.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.datacatalog.v1beta1.PolicyTagManager.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.iam.v1.IAMPolicy.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto b/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto new file mode 100644 index 000000000..57cdcdfab --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto @@ -0,0 +1,75 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/cloud/datacatalog/v1beta1/timestamps.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1beta1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; +option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; + +// Describes a Cloud Storage fileset entry. +message GcsFilesetSpec { + // Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud + // Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for + // more information. Note that bucket wildcards are currently not supported. + // + // Examples of valid file_patterns: + // + // * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir` + // directory. + // * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` + // spanning all subdirectories. + // * `gs://bucket_name/file*`: matches files prefixed by `file` in + // `bucket_name` + // * `gs://bucket_name/??.txt`: matches files with two characters followed by + // `.txt` in `bucket_name` + // * `gs://bucket_name/[aeiou].txt`: matches files that contain a single + // vowel character followed by `.txt` in + // `bucket_name` + // * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... + // or `m` followed by `.txt` in `bucket_name` + // * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match + // `a/*/b` pattern, such as `a/c/b`, `a/d/b` + // * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` + // + // You can combine wildcards to provide more powerful matches, for example: + // + // * `gs://bucket_name/[a-m]??.j*g` + repeated string file_patterns = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Sample files contained in this fileset, not all files contained in this + // fileset are represented here. + repeated GcsFileSpec sample_gcs_file_specs = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Specifications of a single file in Cloud Storage. +message GcsFileSpec { + // Required. The full file path. Example: `gs://bucket_name/a/b.txt`. + string file_path = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Timestamps about the Cloud Storage file. + SystemTimestamps gcs_timestamps = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The size of the file, in bytes. + int64 size_bytes = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/datacatalog/v1beta1/policytagmanager.proto b/google/cloud/datacatalog/v1beta1/policytagmanager.proto new file mode 100644 index 000000000..5602bcf16 --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/policytagmanager.proto @@ -0,0 +1,417 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/datacatalog/v1beta1/timestamps.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_outer_classname = "PolicyTagManagerProto"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; +option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; + +// The policy tag manager API service allows clients to manage their taxonomies +// and policy tags. +service PolicyTagManager { + option (google.api.default_host) = "datacatalog.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a taxonomy in the specified project. + rpc CreateTaxonomy(CreateTaxonomyRequest) returns (Taxonomy) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/taxonomies" + body: "taxonomy" + }; + option (google.api.method_signature) = "parent,taxonomy"; + } + + // Deletes a taxonomy. This operation will also delete all + // policy tags in this taxonomy along with their associated policies. + rpc DeleteTaxonomy(DeleteTaxonomyRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/taxonomies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a taxonomy. + rpc UpdateTaxonomy(UpdateTaxonomyRequest) returns (Taxonomy) { + option (google.api.http) = { + patch: "/v1beta1/{taxonomy.name=projects/*/locations/*/taxonomies/*}" + body: "taxonomy" + }; + option (google.api.method_signature) = "taxonomy"; + } + + // Lists all taxonomies in a project in a particular location that the caller + // has permission to view. + rpc ListTaxonomies(ListTaxonomiesRequest) returns (ListTaxonomiesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/taxonomies" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a taxonomy. + rpc GetTaxonomy(GetTaxonomyRequest) returns (Taxonomy) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/taxonomies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a policy tag in the specified taxonomy. + rpc CreatePolicyTag(CreatePolicyTagRequest) returns (PolicyTag) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/taxonomies/*}/policyTags" + body: "policy_tag" + }; + option (google.api.method_signature) = "parent,policy_tag"; + } + + // Deletes a policy tag. Also deletes all of its descendant policy tags. + rpc DeletePolicyTag(DeletePolicyTagRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a policy tag. + rpc UpdatePolicyTag(UpdatePolicyTagRequest) returns (PolicyTag) { + option (google.api.http) = { + patch: "/v1beta1/{policy_tag.name=projects/*/locations/*/taxonomies/*/policyTags/*}" + body: "policy_tag" + }; + option (google.api.method_signature) = "policy_tag"; + } + + // Lists all policy tags in a taxonomy. + rpc ListPolicyTags(ListPolicyTagsRequest) returns (ListPolicyTagsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/taxonomies/*}/policyTags" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a policy tag. + rpc GetPolicyTag(GetPolicyTagRequest) returns (PolicyTag) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the IAM policy for a taxonomy or a policy tag. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:getIamPolicy" + body: "*" + additional_bindings { + post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:getIamPolicy" + body: "*" + } + }; + } + + // Sets the IAM policy for a taxonomy or a policy tag. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:setIamPolicy" + body: "*" + additional_bindings { + post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:setIamPolicy" + body: "*" + } + }; + } + + // Returns the permissions that a caller has on the specified taxonomy or + // policy tag. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:testIamPermissions" + body: "*" + additional_bindings { + post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:testIamPermissions" + body: "*" + } + }; + } +} + +// A taxonomy is a collection of policy tags that classify data along a common +// axis. For instance a data *sensitivity* taxonomy could contain policy tags +// denoting PII such as age, zipcode, and SSN. A data *origin* taxonomy could +// contain policy tags to distinguish user data, employee data, partner data, +// public data. +message Taxonomy { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/Taxonomy" + pattern: "projects/{project}/locations/{location}/taxonomies/{taxonomy}" + }; + + // Defines policy types where policy tag can be used for. + enum PolicyType { + // Unspecified policy type. + POLICY_TYPE_UNSPECIFIED = 0; + + // Fine grained access control policy, which enables access control on + // tagged resources. + FINE_GRAINED_ACCESS_CONTROL = 1; + } + + // Output only. Resource name of this taxonomy, whose format is: + // "projects/{project_number}/locations/{location_id}/taxonomies/{id}". + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. User defined name of this taxonomy. It must: contain only unicode letters, + // numbers, underscores, dashes and spaces; not start or end with spaces; and + // be at most 200 bytes long when encoded in UTF-8. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Description of this taxonomy. It must: contain only unicode characters, + // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes + // long when encoded in UTF-8. If not set, defaults to an empty description. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of policy types that are activated for this taxonomy. If not set, + // defaults to an empty list. + repeated PolicyType activated_policy_types = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Denotes one policy tag in a taxonomy (e.g. ssn). Policy Tags can be defined +// in a hierarchy. For example, consider the following hierarchy: +// Geolocation -> (LatLong, City, ZipCode). PolicyTag "Geolocation" +// contains three child policy tags: "LatLong", "City", and "ZipCode". +message PolicyTag { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/PolicyTag" + pattern: "projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}" + }; + + // Output only. Resource name of this policy tag, whose format is: + // "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{id}". + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. User defined name of this policy tag. It must: be unique within the parent + // taxonomy; contain only unicode letters, numbers, underscores, dashes and + // spaces; not start or end with spaces; and be at most 200 bytes long when + // encoded in UTF-8. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Description of this policy tag. It must: contain only unicode characters, + // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes + // long when encoded in UTF-8. If not set, defaults to an empty description. + // If not set, defaults to an empty description. + string description = 3; + + // Resource name of this policy tag's parent policy tag (e.g. for the + // "LatLong" policy tag in the example above, this field contains the + // resource name of the "Geolocation" policy tag). If empty, it means this + // policy tag is a top level policy tag (e.g. this field is empty for the + // "Geolocation" policy tag in the example above). If not set, defaults to an + // empty string. + string parent_policy_tag = 4; + + // Output only. Resource names of child policy tags of this policy tag. + repeated string child_policy_tags = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for +// [CreateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomy]. +message CreateTaxonomyRequest { + // Required. Resource name of the project that the taxonomy will belong to. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // The taxonomy to be created. + Taxonomy taxonomy = 2; +} + +// Request message for +// [DeleteTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomy]. +message DeleteTaxonomyRequest { + // Required. Resource name of the taxonomy to be deleted. All policy tags in + // this taxonomy will also be deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Taxonomy" + } + ]; +} + +// Request message for +// [UpdateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomy]. +message UpdateTaxonomyRequest { + // The taxonomy to update. Only description, display_name, and activated + // policy types can be updated. + Taxonomy taxonomy = 1; + + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // If not set, defaults to all of the fields that are allowed to update. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. +message ListTaxonomiesRequest { + // Required. Resource name of the project to list the taxonomies of. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // The maximum number of items to return. Must be a value between 1 and 1000. + // If not set, defaults to 50. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. If + // not set, defaults to an empty string. + string page_token = 3; +} + +// Response message for +// [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. +message ListTaxonomiesResponse { + // Taxonomies that the project contains. + repeated Taxonomy taxonomies = 1; + + // Token used to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// Request message for +// [GetTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomy]. +message GetTaxonomyRequest { + // Required. Resource name of the requested taxonomy. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Taxonomy" + } + ]; +} + +// Request message for +// [CreatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTag]. +message CreatePolicyTagRequest { + // Required. Resource name of the taxonomy that the policy tag will belong to. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/PolicyTag" + } + ]; + + // The policy tag to be created. + PolicyTag policy_tag = 2; +} + +// Request message for +// [DeletePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTag]. +message DeletePolicyTagRequest { + // Required. Resource name of the policy tag to be deleted. All of its descendant + // policy tags will also be deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/PolicyTag" + } + ]; +} + +// Request message for +// [UpdatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTag]. +message UpdatePolicyTagRequest { + // The policy tag to update. Only the description, display_name, and + // parent_policy_tag fields can be updated. + PolicyTag policy_tag = 1; + + // The update mask applies to the resource. Only display_name, description and + // parent_policy_tag can be updated and thus can be listed in the mask. If + // update_mask is not provided, all allowed fields (i.e. display_name, + // description and parent) will be updated. For more information including the + // `FieldMask` definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // If not set, defaults to all of the fields that are allowed to update. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. +message ListPolicyTagsRequest { + // Required. Resource name of the taxonomy to list the policy tags of. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/PolicyTag" + } + ]; + + // The maximum number of items to return. Must be a value between 1 and 1000. + // If not set, defaults to 50. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. If + // not set, defaults to an empty string. + string page_token = 3; +} + +// Response message for +// [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. +message ListPolicyTagsResponse { + // The policy tags that are in the requested taxonomy. + repeated PolicyTag policy_tags = 1; + + // Token used to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// Request message for +// [GetPolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTag]. +message GetPolicyTagRequest { + // Required. Resource name of the requested policy tag. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/PolicyTag" + } + ]; +} diff --git a/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto b/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto new file mode 100644 index 000000000..b6e4fb320 --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto @@ -0,0 +1,157 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/datacatalog/v1beta1/policytagmanager.proto"; +import "google/iam/v1/policy.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_outer_classname = "PolicyTagManagerSerializationProto"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; +option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; + +// Policy tag manager serialization API service allows clients to manipulate +// their taxonomies and policy tags data with serialized format. +service PolicyTagManagerSerialization { + option (google.api.default_host) = "datacatalog.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Imports all taxonomies and their policy tags to a project as new + // taxonomies. + // + // This method provides a bulk taxonomy / policy tag creation using nested + // proto structure. + rpc ImportTaxonomies(ImportTaxonomiesRequest) returns (ImportTaxonomiesResponse) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/taxonomies:import" + body: "*" + }; + } + + // Exports all taxonomies and their policy tags in a project. + // + // This method generates SerializedTaxonomy protos with nested policy tags + // that can be used as an input for future ImportTaxonomies calls. + rpc ExportTaxonomies(ExportTaxonomiesRequest) returns (ExportTaxonomiesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/taxonomies:export" + }; + } +} + +// Message capturing a taxonomy and its policy tag hierarchy as a nested proto. +// Used for taxonomy import/export and mutation. +message SerializedTaxonomy { + // Required. Display name of the taxonomy. Max 200 bytes when encoded in UTF-8. + string display_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Description of the serialized taxonomy. The length of the + // description is limited to 2000 bytes when encoded in UTF-8. If not set, + // defaults to an empty description. + string description = 2; + + // Top level policy tags associated with the taxonomy if any. + repeated SerializedPolicyTag policy_tags = 3; +} + +// Message representing one policy tag when exported as a nested proto. +message SerializedPolicyTag { + // Required. Display name of the policy tag. Max 200 bytes when encoded in UTF-8. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Description of the serialized policy tag. The length of the + // description is limited to 2000 bytes when encoded in UTF-8. If not set, + // defaults to an empty description. + string description = 3; + + // Children of the policy tag if any. + repeated SerializedPolicyTag child_policy_tags = 4; +} + +// Request message for +// [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. +message ImportTaxonomiesRequest { + // Required. Resource name of project that the newly created taxonomies will + // belong to. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // Required. Source taxonomies to be imported in a tree structure. + oneof source { + // Inline source used for taxonomies import + InlineSource inline_source = 2; + } +} + +// Inline source used for taxonomies import. +message InlineSource { + // Required. Taxonomies to be imported. + repeated SerializedTaxonomy taxonomies = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. +message ImportTaxonomiesResponse { + // Taxonomies that were imported. + repeated Taxonomy taxonomies = 1; +} + +// Request message for +// [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. +message ExportTaxonomiesRequest { + // Required. Resource name of the project that taxonomies to be exported + // will share. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // Required. Resource names of the taxonomies to be exported. + repeated string taxonomies = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // Required. Taxonomies export destination. + oneof destination { + // Export taxonomies as serialized taxonomies. + bool serialized_taxonomies = 3; + } +} + +// Response message for +// [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. +message ExportTaxonomiesResponse { + // List of taxonomies and policy tags in a tree structure. + repeated SerializedTaxonomy taxonomies = 1; +} diff --git a/google/cloud/datacatalog/v1beta1/samples/datacatalog_get_entry.test.yaml b/google/cloud/datacatalog/v1beta1/samples/datacatalog_get_entry.test.yaml new file mode 100644 index 000000000..051b7f576 --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/samples/datacatalog_get_entry.test.yaml @@ -0,0 +1,39 @@ +test: + suites: + - name: Data Catalog v1beta1 Get Entry sample tests + setup: + - call: + sample: datacatalog_lookup_entry + params: + resource_name: + literal: //bigquery.googleapis.com/projects/bigquery-public-data/datasets/new_york_taxi_trips/tables/taxi_zone_geom + - extract_match: + pattern: projects/([\w-]+) + variable: project_id + - extract_match: + pattern: locations/([\w-]+) + variable: location_id + - extract_match: + pattern: entryGroups/(@[\w-]+|[\w-]+) + variable: entry_group_id + - extract_match: + pattern: entries/([\w-]+) + variable: entry_id + cases: + - name: Get Entry for a public BigQuery Table + spec: + - call: + sample: datacatalog_get_entry + params: + project_id: + variable: project_id + location_id: + variable: location_id + entry_group_id: + variable: entry_group_id + entry_id: + variable: entry_id + - assert_contains: + - literal: "Entry name: projects/bigquery-public-data" + - literal: "Entry type: TABLE" + - literal: "Linked resource: //bigquery.googleapis.com/projects/bigquery-public-data/datasets/new_york_taxi_trips/tables/taxi_zone_geom" diff --git a/google/cloud/datacatalog/v1beta1/samples/datacatalog_lookup_entry.test.yaml b/google/cloud/datacatalog/v1beta1/samples/datacatalog_lookup_entry.test.yaml new file mode 100644 index 000000000..e244cd70a --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/samples/datacatalog_lookup_entry.test.yaml @@ -0,0 +1,26 @@ +test: + suites: + - name: Data Catalog v1beta1 Lookup Entry sample tests + cases: + - name: Lookup Entry for a public BigQuery Table + spec: + - call: + sample: datacatalog_lookup_entry + params: + resource_name: + literal: //bigquery.googleapis.com/projects/bigquery-public-data/datasets/new_york_taxi_trips/tables/taxi_zone_geom + - assert_contains: + - literal: "Entry name: projects/bigquery-public-data" + - literal: "Entry type: TABLE" + - literal: "Linked resource: //bigquery.googleapis.com/projects/bigquery-public-data/datasets/new_york_taxi_trips/tables/taxi_zone_geom" + - name: Lookup Entry for a public PubSub Topic + spec: + - call: + sample: datacatalog_lookup_entry + params: + resource_name: + literal: //pubsub.googleapis.com/projects/pubsub-public-data/topics/taxirides-realtime + - assert_contains: + - literal: "Entry name: projects/pubsub-public-data" + - literal: "Entry type: DATA_STREAM" + - literal: "Linked resource: //pubsub.googleapis.com/projects/pubsub-public-data/topics/taxirides-realtime" diff --git a/google/cloud/datacatalog/v1beta1/samples/datacatalog_lookup_entry_sql_resource.test.yaml b/google/cloud/datacatalog/v1beta1/samples/datacatalog_lookup_entry_sql_resource.test.yaml new file mode 100644 index 000000000..36e50eead --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/samples/datacatalog_lookup_entry_sql_resource.test.yaml @@ -0,0 +1,26 @@ +test: + suites: + - name: Data Catalog v1beta1 Lookup Entry by SQL Resource sample tests + cases: + - name: Lookup Entry for a public BigQuery Table + spec: + - call: + sample: datacatalog_lookup_entry_sql_resource + params: + sql_name: + literal: bigquery.table.\`bigquery-public-data\`.new_york_taxi_trips.taxi_zone_geom + - assert_contains: + - literal: "Entry name: projects/bigquery-public-data" + - literal: "Entry type: TABLE" + - literal: "Linked resource: //bigquery.googleapis.com/projects/bigquery-public-data/datasets/new_york_taxi_trips/tables/taxi_zone_geom" + - name: Lookup Entry for a public PubSub Topic + spec: + - call: + sample: datacatalog_lookup_entry_sql_resource + params: + sql_name: + literal: pubsub.topic.\`pubsub-public-data\`.\`taxirides-realtime\` + - assert_contains: + - literal: "Entry name: projects/pubsub-public-data" + - literal: "Entry type: DATA_STREAM" + - literal: "Linked resource: //pubsub.googleapis.com/projects/pubsub-public-data/topics/taxirides-realtime" diff --git a/google/cloud/datacatalog/v1beta1/samples/datacatalog_search.test.yaml b/google/cloud/datacatalog/v1beta1/samples/datacatalog_search.test.yaml new file mode 100644 index 000000000..7877a0363 --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/samples/datacatalog_search.test.yaml @@ -0,0 +1,25 @@ +test: + suites: + - name: Data Catalog v1beta1 Search sample tests + setup: + # Get project ID from environment variable. + - env: + name: GOOGLE_PROJECT_ID + variable: project_id + cases: + - name: Search Catalog + spec: + - call: + sample: datacatalog_search + params: + include_project_id: + variable: project_id + include_gcp_public_datasets: + literal: "true" + query: + literal: "system=bigquery type=dataset name:trips" + - assert_contains: + - literal: "Result type: ENTRY" + - literal: "Result subtype: entry.dataset" + - literal: "Relative resource name: projects/bigquery-public-data" + - literal: "Linked resource: //bigquery.googleapis.com/projects/bigquery-public-data/datasets" diff --git a/google/cloud/datacatalog/v1beta1/schema.proto b/google/cloud/datacatalog/v1beta1/schema.proto index 839ef1d8c..d8e69fd46 100644 --- a/google/cloud/datacatalog/v1beta1/schema.proto +++ b/google/cloud/datacatalog/v1beta1/schema.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,42 +11,45 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.datacatalog.v1beta1; +import "google/api/field_behavior.proto"; + option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; +option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; // Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema). message Schema { - // Required. Schema of columns. A maximum of 10,000 columns and sub-columns - // can be specified. - repeated ColumnSchema columns = 2; + // Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be + // specified. + repeated ColumnSchema columns = 2 [(google.api.field_behavior) = REQUIRED]; } // Representation of a column within a schema. Columns could be nested inside // other columns. message ColumnSchema { // Required. Name of the column. - string column = 6; + string column = 6 [(google.api.field_behavior) = REQUIRED]; // Required. Type of the column. - string type = 1; + string type = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Description of the column. Default value is an empty string. - string description = 2; + string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A column's mode indicates whether the values in this column are - // required, nullable, etc. Only 'NULLABLE', 'REQUIRED' and 'REPEATED' are - // supported. Default mode is 'NULLABLE'. - string mode = 3; + // Optional. A column's mode indicates whether the values in this column are required, + // nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported. + // Default mode is `NULLABLE`. + string mode = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Schema of sub-columns. A column can have zero or more - // sub-columns. - repeated ColumnSchema subcolumns = 7; + // Optional. Schema of sub-columns. A column can have zero or more sub-columns. + repeated ColumnSchema subcolumns = 7 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/google/cloud/datacatalog/v1beta1/search.proto b/google/cloud/datacatalog/v1beta1/search.proto index 2a31dd945..c1f41412d 100644 --- a/google/cloud/datacatalog/v1beta1/search.proto +++ b/google/cloud/datacatalog/v1beta1/search.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,19 +11,22 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.datacatalog.v1beta1; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/datacatalog/v1beta1/common.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; +option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; // A result that appears in the response of a search request. Each result // captures details of one entry that matches the search. @@ -34,20 +37,22 @@ message SearchCatalogResult { // Sub-type of the search result. This is a dot-delimited description of the // resource's full type, and is the same as the value callers would provide in - // the "type" search facet. Examples: "entry.table", "entry.dataStream", - // "tagTemplate" + // the "type" search facet. Examples: `entry.table`, `entry.dataStream`, + // `tagTemplate`. string search_result_subtype = 2; // The relative resource name of the resource in URL format. // Examples: - // "projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}". - // "projects/{project_id}/tagTemplates/{tag_template_id}". + // + // * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}` + // * `projects/{project_id}/tagTemplates/{tag_template_id}` string relative_resource_name = 3; // The full name of the cloud resource the entry belongs to. See: - // https://cloud.google.com/apis/design/resource_names#full_resource_name + // https://cloud.google.com/apis/design/resource_names#full_resource_name. // Example: - // "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId". + // + // * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId` string linked_resource = 4; } diff --git a/google/cloud/datacatalog/v1beta1/table_spec.proto b/google/cloud/datacatalog/v1beta1/table_spec.proto index 8e9547fea..c08f43efd 100644 --- a/google/cloud/datacatalog/v1beta1/table_spec.proto +++ b/google/cloud/datacatalog/v1beta1/table_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,30 +11,35 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.datacatalog.v1beta1; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; +option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; // Describes a BigQuery table. message BigQueryTableSpec { // Output only. The table source type. - TableSourceType table_source_type = 1; + TableSourceType table_source_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. oneof type_spec { // Table view specification. This field should only be populated if - // table_source_type is BIGQUERY_VIEW. + // `table_source_type` is `BIGQUERY_VIEW`. ViewSpec view_spec = 2; // Spec of a BigQuery table. This field should only be populated if - // table_source_type is BIGQUERY_TABLE. + // `table_source_type` is `BIGQUERY_TABLE`. TableSpec table_spec = 3; } } @@ -54,35 +59,43 @@ enum TableSourceType { // Table view specification. message ViewSpec { // Output only. The query that defines the table view. - string view_query = 1; + string view_query = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Normal BigQuery table spec. message TableSpec { - // Output only. If the table is a dated shard, i.e. with name pattern - // [prefix]YYYYMMDD, grouped_entry is the Data Catalog resource name of the - // date sharded grouped entry, e.g. - // projects/{project_id}/locations/{location}/entrygroups/{entry_group_id} - // /entries/{entry_id}. - // Otherwise, grouped_entry will be empty. - string grouped_entry = 1; + // Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`, + // `grouped_entry` is the Data Catalog resource name of the date sharded + // grouped entry, for example, + // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. + // Otherwise, `grouped_entry` is empty. + string grouped_entry = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Entry" + } + ]; } -// Spec for a group of BigQuery tables with name pattern [prefix]YYYYMMDD. +// Spec for a group of BigQuery tables with name pattern `[prefix]YYYYMMDD`. // Context: // https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding message BigQueryDateShardedSpec { - // Output only. The Data Catalog resource name of the dataset entry the - // current table belongs to, e.g. - // projects/{project_id}/locations/{location}/entrygroups/{entry_group_id} - // /entries/{entry_id} - string dataset = 1; + // Output only. The Data Catalog resource name of the dataset entry the current table + // belongs to, for example, + // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. + string dataset = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Entry" + } + ]; - // Output only. The table name prefix of the shards. The name of any given - // shard is [table_prefix]YYYYMMDD, e.g. for shard MyTable20180101, the - // table_prefix is "MyTable" - string table_prefix = 2; + // Output only. The table name prefix of the shards. The name of any given shard is + // `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the + // `table_prefix` is `MyTable`. + string table_prefix = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Total number of shards. - int64 shard_count = 3; + int64 shard_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/cloud/datacatalog/v1beta1/tags.proto b/google/cloud/datacatalog/v1beta1/tags.proto index f01843c20..c15fb218a 100644 --- a/google/cloud/datacatalog/v1beta1/tags.proto +++ b/google/cloud/datacatalog/v1beta1/tags.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,56 +11,72 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.datacatalog.v1beta1; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; +option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; // Tags are used to attach custom metadata to Data Catalog resources. Tags // conform to the specifications within their tag template. +// +// See [Data Catalog +// IAM](https://cloud.google.com/data-catalog/docs/concepts/iam) for information +// on the permissions needed to create or view tags. message Tag { - // Required when used in - // [UpdateTagRequest][google.cloud.datacatalog.v1beta1.UpdateTagRequest]. The - // resource name of the tag in URL format. For example, - // projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}", - // where tag_id is a system-generated identifier. Note that this Tag may not - // actually be stored in the location in this name. + option (google.api.resource) = { + type: "datacatalog.googleapis.com/Tag" + pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}" + }; + + // The resource name of the tag in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + // + // where `tag_id` is a system-generated identifier. + // Note that this Tag may not actually be stored in the location in this name. string name = 1; - // Required. The resource name of the tag template that this tag uses. For - // example, - // projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}. + // Required. The resource name of the tag template that this tag uses. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + // // This field cannot be modified after creation. - string template = 2; + string template = 2 [(google.api.field_behavior) = REQUIRED]; // Output only. The display name of the tag template. - string template_display_name = 5; + string template_display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The scope within the parent resource that this tag is attached - // to. If not provided, the tag is attached to the parent resource itself. + // The scope within the parent resource that this tag is attached to. If not + // provided, the tag is attached to the parent resource itself. // Deleting the scope from the parent resource will delete all tags attached // to that scope. These fields cannot be updated after creation. oneof scope { // Resources like Entry can have schemas associated with them. This scope // allows users to attach tags to an individual column based on that schema. // - // For attaching a tag to a nested column, use '.' to separate the column - // names: "outer_column.inner_column". + // For attaching a tag to a nested column, use `.` to separate the column + // names. Example: + // + // * `outer_column.inner_column` string column = 4; } - // Required. This maps the id of a tag field to the value of & additional - // information about that field. Valid field IDs are defined by the tag's - // template. A tag must have at least 1 field and at most 500 fields. - map fields = 3; + // Required. This maps the ID of a tag field to the value of and additional information + // about that field. Valid field IDs are defined by the tag's template. A tag + // must have at least 1 field and at most 500 fields. + map fields = 3 [(google.api.field_behavior) = REQUIRED]; } // Contains the value and supporting information for a field within @@ -73,7 +89,7 @@ message TagField { } // Output only. The display name of this field. - string display_name = 1; + string display_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. The value of this field. oneof kind { @@ -93,59 +109,95 @@ message TagField { // one of the allowed values in the definition of this enum. EnumValue enum_value = 6; } + + // Output only. The order of this field with respect to other fields in this tag. It can be + // set in [Tag][google.cloud.datacatalog.v1beta1.TagTemplateField.order]. For + // example, a higher value can indicate a more important field. The value can + // be negative. Multiple fields can have the same order, and field orders + // within a tag do not have to be sequential. + int32 order = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Tag templates defines the schema of the tags used to attach to Data Catalog -// resources. It defines the mapping of accepted field names and types that can -// be used within the tag. The tag template also controls the access to the tag. +// A tag template defines a tag, which can have one or more typed fields. +// The template is used to create and attach the tag to GCP resources. +// [Tag template +// roles](https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) +// provide permissions to create, edit, and use the template. See, for example, +// the [TagTemplate +// User](https://cloud.google.com/data-catalog/docs/how-to/template-user) role, +// which includes permission to use the tag template to tag resources. message TagTemplate { - // Required when used in - // [UpdateTagTemplateRequest][google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest]. - // The resource name of the tag template in URL format. For example, - // projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}. + option (google.api.resource) = { + type: "datacatalog.googleapis.com/TagTemplate" + pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}" + }; + + // The resource name of the tag template in URL format. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + // // Note that this TagTemplate and its child resources may not actually be // stored in the location in this name. string name = 1; - // Optional. The display name for this template. Default value is an empty - // string. + // The display name for this template. Defaults to an empty string. string display_name = 2; - // Required. Map of tag template field ids to the settings for the field. + // Required. Map of tag template field IDs to the settings for the field. // This map is an exhaustive list of the allowed fields. This map must contain // at least one field and at most 500 fields. // // The keys to this map are tag template field IDs. Field IDs can contain // letters (both uppercase and lowercase), numbers (0-9) and underscores (_). - // Field IDs must be at least 1 character long and at most 64 characters long. - // Field IDs must start with a letter or underscore. - map fields = 3; + // Field IDs must be at least 1 character long and at most + // 64 characters long. Field IDs must start with a letter or underscore. + map fields = 3 [(google.api.field_behavior) = REQUIRED]; } // The template for an individual field within a tag template. message TagTemplateField { - // Optional. The display name for this field. Default value is an empty - // string. + option (google.api.resource) = { + type: "datacatalog.googleapis.com/TagTemplateField" + pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}" + }; + + // Output only. The resource name of the tag template field in URL format. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field} + // + // Note that this TagTemplateField may not actually be stored in the location + // in this name. + string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The display name for this field. Defaults to an empty string. string display_name = 1; // Required. The type of value this tag field can contain. - FieldType type = 2; + FieldType type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Whether this is a required field. Defaults to false. + bool is_required = 3; + + // The order of this field with respect to other fields in this tag + // template. A higher value indicates a more important field. The value can + // be negative. Multiple fields can have the same order, and field orders + // within a tag do not have to be sequential. + int32 order = 5; } message FieldType { message EnumType { message EnumValue { - // Required. The display name of the enum value. Must not be an empty - // string. - string display_name = 1; + // Required. The display name of the enum value. Must not be an empty string. + string display_name = 1 [(google.api.field_behavior) = REQUIRED]; } - // Required. The set of allowed values for this enum. This set must not be - // empty, the display names of the values in this set must not be empty and - // the display names of the values must be case-insensitively unique within - // this set. Currently, enum values can only be added to the list of allowed - // values. Deletion and renaming of enum values are not supported. Can have - // up to 500 allowed values. + // Required on create; optional on update. The set of allowed values for + // this enum. This set must not be empty, the display names of the values in + // this set must not be empty and the display names of the values must be + // case-insensitively unique within this set. Currently, enum values can + // only be added to the list of allowed values. Deletion and renaming of + // enum values are not supported. Can have up to 500 allowed values. repeated EnumValue allowed_values = 1; } diff --git a/google/cloud/datacatalog/v1beta1/timestamps.proto b/google/cloud/datacatalog/v1beta1/timestamps.proto index bb048b915..dc49c75cb 100644 --- a/google/cloud/datacatalog/v1beta1/timestamps.proto +++ b/google/cloud/datacatalog/v1beta1/timestamps.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,28 +11,31 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.datacatalog.v1beta1; +import "google/api/field_behavior.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; +option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; // Timestamps about this resource according to a particular system. message SystemTimestamps { - // Output only. The creation time of the resource within the given system. + // The creation time of the resource within the given system. google.protobuf.Timestamp create_time = 1; - // Output only. The last-modified time of the resource within the given - // system. + // The last-modified time of the resource within the given system. google.protobuf.Timestamp update_time = 2; // Output only. The expiration time of the resource within the given system. - google.protobuf.Timestamp expire_time = 3; + // Currently only apllicable to BigQuery resources. + google.protobuf.Timestamp expire_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/cloud/datalabeling/BUILD.bazel b/google/cloud/datalabeling/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/cloud/datalabeling/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/datalabeling/artman_datalabeling_v1beta1.yaml b/google/cloud/datalabeling/artman_datalabeling_v1beta1.yaml index 2d81d3c57..fede620c0 100644 --- a/google/cloud/datalabeling/artman_datalabeling_v1beta1.yaml +++ b/google/cloud/datalabeling/artman_datalabeling_v1beta1.yaml @@ -6,8 +6,9 @@ common: - name: google-common-protos src_proto_paths: - v1beta1 - service_yaml: datalabeling_v1beta1.yaml + service_yaml: v1beta1/datalabeling_v1beta1.yaml gapic_yaml: v1beta1/datalabeling_gapic.yaml + proto_package: google.cloud.datalabeling.v1beta1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/datalabeling/v1beta1/BUILD.bazel b/google/cloud/datalabeling/v1beta1/BUILD.bazel new file mode 100644 index 000000000..51e13936a --- /dev/null +++ b/google/cloud/datalabeling/v1beta1/BUILD.bazel @@ -0,0 +1,384 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "datalabeling_proto", + srcs = [ + "annotation.proto", + "annotation_spec_set.proto", + "data_labeling_service.proto", + "data_payloads.proto", + "dataset.proto", + "evaluation.proto", + "evaluation_job.proto", + "human_annotation_config.proto", + "instruction.proto", + "operations.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "datalabeling_proto_with_info", + deps = [ + ":datalabeling_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "datalabeling_java_proto", + deps = [":datalabeling_proto"], +) + +java_grpc_library( + name = "datalabeling_java_grpc", + srcs = [":datalabeling_proto"], + deps = [":datalabeling_java_proto"], +) + +java_gapic_library( + name = "datalabeling_java_gapic", + src = ":datalabeling_proto_with_info", + gapic_yaml = "datalabeling_gapic.yaml", + package = "google.cloud.datalabeling.v1beta1", + service_yaml = "datalabeling_v1beta1.yaml", + test_deps = [ + ":datalabeling_java_grpc", + ], + deps = [ + ":datalabeling_java_proto", + ], +) + +java_gapic_test( + name = "datalabeling_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClientTest", + ], + runtime_deps = [":datalabeling_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-datalabeling-v1beta1-java", + deps = [ + ":datalabeling_java_gapic", + ":datalabeling_java_grpc", + ":datalabeling_java_proto", + ":datalabeling_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "datalabeling_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1", + protos = [":datalabeling_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + "//google/rpc:status_go_proto", + ], +) + +go_gapic_library( + name = "datalabeling_go_gapic", + srcs = [":datalabeling_proto_with_info"], + grpc_service_config = "datalabeling_grpc_service_config.json", + importpath = "cloud.google.com/go/datalabeling/apiv1beta1;datalabeling", + service_yaml = "datalabeling_v1beta1.yaml", + deps = [ + ":datalabeling_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +go_test( + name = "datalabeling_go_gapic_test", + srcs = [":datalabeling_go_gapic_srcjar_test"], + embed = [":datalabeling_go_gapic"], + importpath = "cloud.google.com/go/datalabeling/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-datalabeling-v1beta1-go", + deps = [ + ":datalabeling_go_gapic", + ":datalabeling_go_gapic_srcjar-test.srcjar", + ":datalabeling_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "datalabeling_moved_proto", + srcs = [":datalabeling_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "datalabeling_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":datalabeling_moved_proto"], +) + +py_grpc_library( + name = "datalabeling_py_grpc", + srcs = [":datalabeling_moved_proto"], + deps = [":datalabeling_py_proto"], +) + +py_gapic_library( + name = "datalabeling_py_gapic", + src = ":datalabeling_proto_with_info", + gapic_yaml = "datalabeling_gapic.yaml", + package = "google.cloud.datalabeling.v1beta1", + service_yaml = "datalabeling_v1beta1.yaml", + deps = [ + ":datalabeling_py_grpc", + ":datalabeling_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "datalabeling-v1beta1-py", + deps = [ + ":datalabeling_py_gapic", + ":datalabeling_py_grpc", + ":datalabeling_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "datalabeling_php_proto", + deps = [":datalabeling_proto"], +) + +php_grpc_library( + name = "datalabeling_php_grpc", + srcs = [":datalabeling_proto"], + deps = [":datalabeling_php_proto"], +) + +php_gapic_library( + name = "datalabeling_php_gapic", + src = ":datalabeling_proto_with_info", + gapic_yaml = "datalabeling_gapic.yaml", + package = "google.cloud.datalabeling.v1beta1", + service_yaml = "datalabeling_v1beta1.yaml", + deps = [ + ":datalabeling_php_grpc", + ":datalabeling_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-datalabeling-v1beta1-php", + deps = [ + ":datalabeling_php_gapic", + ":datalabeling_php_grpc", + ":datalabeling_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "datalabeling_nodejs_gapic", + src = ":datalabeling_proto_with_info", + gapic_yaml = "datalabeling_gapic.yaml", + package = "google.cloud.datalabeling.v1beta1", + service_yaml = "datalabeling_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "datalabeling-v1beta1-nodejs", + deps = [ + ":datalabeling_nodejs_gapic", + ":datalabeling_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "datalabeling_ruby_proto", + deps = [":datalabeling_proto"], +) + +ruby_grpc_library( + name = "datalabeling_ruby_grpc", + srcs = [":datalabeling_proto"], + deps = [":datalabeling_ruby_proto"], +) + +ruby_gapic_library( + name = "datalabeling_ruby_gapic", + src = ":datalabeling_proto_with_info", + gapic_yaml = "datalabeling_gapic.yaml", + package = "google.cloud.datalabeling.v1beta1", + service_yaml = "datalabeling_v1beta1.yaml", + deps = [ + ":datalabeling_ruby_grpc", + ":datalabeling_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-datalabeling-v1beta1-ruby", + deps = [ + ":datalabeling_ruby_gapic", + ":datalabeling_ruby_grpc", + ":datalabeling_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "datalabeling_csharp_proto", + deps = [":datalabeling_proto"], +) + +csharp_grpc_library( + name = "datalabeling_csharp_grpc", + srcs = [":datalabeling_proto"], + deps = [":datalabeling_csharp_proto"], +) + +csharp_gapic_library( + name = "datalabeling_csharp_gapic", + src = ":datalabeling_proto_with_info", + gapic_yaml = "datalabeling_gapic.yaml", + package = "google.cloud.datalabeling.v1beta1", + service_yaml = "datalabeling_v1beta1.yaml", + deps = [ + ":datalabeling_csharp_grpc", + ":datalabeling_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-datalabeling-v1beta1-csharp", + deps = [ + ":datalabeling_csharp_gapic", + ":datalabeling_csharp_grpc", + ":datalabeling_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/datalabeling/v1beta1/annotation.proto b/google/cloud/datalabeling/v1beta1/annotation.proto index b71e45980..4750fdc3b 100644 --- a/google/cloud/datalabeling/v1beta1/annotation.proto +++ b/google/cloud/datalabeling/v1beta1/annotation.proto @@ -18,15 +18,16 @@ syntax = "proto3"; package google.cloud.datalabeling.v1beta1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/datalabeling/v1beta1/annotation_spec_set.proto"; -import "google/cloud/datalabeling/v1beta1/data_payloads.proto"; import "google/protobuf/duration.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling"; option java_multiple_files = true; option java_package = "com.google.cloud.datalabeling.v1beta1"; -// Specifies where is the answer from. +// Specifies where the annotation comes from (whether it was provided by a +// human labeler or a different source). enum AnnotationSource { ANNOTATION_SOURCE_UNSPECIFIED = 0; @@ -71,10 +72,11 @@ enum AnnotationSentiment { enum AnnotationType { ANNOTATION_TYPE_UNSPECIFIED = 0; - // Classification annotations in an image. + // Classification annotations in an image. Allowed for continuous evaluation. IMAGE_CLASSIFICATION_ANNOTATION = 1; - // Bounding box annotations in an image. + // Bounding box annotations in an image. A form of image object detection. + // Allowed for continuous evaluation. IMAGE_BOUNDING_BOX_ANNOTATION = 2; // Oriented bounding box. The box does not have to be parallel to horizontal @@ -102,13 +104,13 @@ enum AnnotationType { // Video event annotation. VIDEO_EVENT_ANNOTATION = 6; - // Classification for text. + // Classification for text. Allowed for continuous evaluation. TEXT_CLASSIFICATION_ANNOTATION = 8; // Entity extraction for text. TEXT_ENTITY_EXTRACTION_ANNOTATION = 9; - // General classification. + // General classification. Allowed for continuous evaluation. GENERAL_CLASSIFICATION_ANNOTATION = 14; } diff --git a/google/cloud/datalabeling/v1beta1/annotation_spec_set.proto b/google/cloud/datalabeling/v1beta1/annotation_spec_set.proto index bd5413dc7..71bc12a1a 100644 --- a/google/cloud/datalabeling/v1beta1/annotation_spec_set.proto +++ b/google/cloud/datalabeling/v1beta1/annotation_spec_set.proto @@ -18,28 +18,36 @@ syntax = "proto3"; package google.cloud.datalabeling.v1beta1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling"; option java_multiple_files = true; option java_package = "com.google.cloud.datalabeling.v1beta1"; -// AnnotationSpecSet is a collection of label definitions. For example, in -// image classification tasks, we define a set of labels, this set is called -// AnnotationSpecSet. AnnotationSpecSet is immutable upon creation. +// An AnnotationSpecSet is a collection of label definitions. For example, in +// image classification tasks, you define a set of possible labels for images as +// an AnnotationSpecSet. An AnnotationSpecSet is immutable upon creation. message AnnotationSpecSet { - // Output only. AnnotationSpecSet resource name, format: - // projects/{project_id}/annotationSpecSets/{annotation_spec_set_id} + option (google.api.resource) = { + type: "datalabeling.googleapis.com/AnnotationSpecSet" + pattern: "projects/{project}/annotationSpecSets/{annotation_spec_set}" + }; + + // Output only. The AnnotationSpecSet resource name in the following format: + // + // "projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}" string name = 1; - // Required. The display name for AnnotationSpecSet defined by user. - // Maximum of 64 characters. + // Required. The display name for AnnotationSpecSet that you define when you + // create it. Maximum of 64 characters. string display_name = 2; // Optional. User-provided description of the annotation specification set. - // The description can be up to 10000 characters long. + // The description can be up to 10,000 characters long. string description = 3; - // Required. The actual spec set defined by the users. + // Required. The array of AnnotationSpecs that you define when you create the + // AnnotationSpecSet. These are the possible labels for the labeling task. repeated AnnotationSpec annotation_specs = 4; // Output only. The names of any related resources that are blocking changes @@ -47,12 +55,15 @@ message AnnotationSpecSet { repeated string blocking_resources = 5; } -// Container of information related to one annotation spec. +// Container of information related to one possible annotation that can be used +// in a labeling task. For example, an image classification task where images +// are labeled as `dog` or `cat` must reference an AnnotationSpec for `dog` and +// an AnnotationSpec for `cat`. message AnnotationSpec { // Required. The display name of the AnnotationSpec. Maximum of 64 characters. string display_name = 1; // Optional. User-provided description of the annotation specification. - // The description can be up to 10000 characters long. + // The description can be up to 10,000 characters long. string description = 2; } diff --git a/google/cloud/datalabeling/v1beta1/data_labeling_service.proto b/google/cloud/datalabeling/v1beta1/data_labeling_service.proto index 8395206d9..7616bc2f7 100644 --- a/google/cloud/datalabeling/v1beta1/data_labeling_service.proto +++ b/google/cloud/datalabeling/v1beta1/data_labeling_service.proto @@ -19,14 +19,14 @@ package google.cloud.datalabeling.v1beta1; import "google/api/annotations.proto"; import "google/api/client.proto"; -import "google/cloud/datalabeling/v1beta1/annotation.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/datalabeling/v1beta1/annotation_spec_set.proto"; import "google/cloud/datalabeling/v1beta1/dataset.proto"; import "google/cloud/datalabeling/v1beta1/evaluation.proto"; import "google/cloud/datalabeling/v1beta1/evaluation_job.proto"; import "google/cloud/datalabeling/v1beta1/human_annotation_config.proto"; import "google/cloud/datalabeling/v1beta1/instruction.proto"; -import "google/cloud/datalabeling/v1beta1/operations.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -37,8 +37,7 @@ option java_package = "com.google.cloud.datalabeling.v1beta1"; service DataLabelingService { option (google.api.default_host) = "datalabeling.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; // Creates dataset. If success return a Dataset resource. rpc CreateDataset(CreateDatasetRequest) returns (Dataset) { @@ -46,6 +45,7 @@ service DataLabelingService { post: "/v1beta1/{parent=projects/*}/datasets" body: "*" }; + option (google.api.method_signature) = "parent,dataset"; } // Gets dataset by resource name. @@ -53,6 +53,7 @@ service DataLabelingService { option (google.api.http) = { get: "/v1beta1/{name=projects/*/datasets/*}" }; + option (google.api.method_signature) = "name"; } // Lists datasets under a project. Pagination is supported. @@ -60,6 +61,7 @@ service DataLabelingService { option (google.api.http) = { get: "/v1beta1/{parent=projects/*}/datasets" }; + option (google.api.method_signature) = "parent,filter"; } // Deletes a dataset by resource name. @@ -67,6 +69,7 @@ service DataLabelingService { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/datasets/*}" }; + option (google.api.method_signature) = "name"; } // Imports data into dataset based on source locations defined in request. @@ -79,6 +82,11 @@ service DataLabelingService { post: "/v1beta1/{name=projects/*/datasets/*}:importData" body: "*" }; + option (google.api.method_signature) = "name,input_config"; + option (google.longrunning.operation_info) = { + response_type: "ImportDataOperationResponse" + metadata_type: "ImportDataOperationMetadata" + }; } // Exports data and annotations from dataset. @@ -87,6 +95,11 @@ service DataLabelingService { post: "/v1beta1/{name=projects/*/datasets/*}:exportData" body: "*" }; + option (google.api.method_signature) = "name,annotated_dataset,filter,output_config"; + option (google.longrunning.operation_info) = { + response_type: "ExportDataOperationResponse" + metadata_type: "ExportDataOperationMetadata" + }; } // Gets a data item in a dataset by resource name. This API can be @@ -95,6 +108,7 @@ service DataLabelingService { option (google.api.http) = { get: "/v1beta1/{name=projects/*/datasets/*/dataItems/*}" }; + option (google.api.method_signature) = "name"; } // Lists data items in a dataset. This API can be called after data @@ -103,27 +117,27 @@ service DataLabelingService { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/datasets/*}/dataItems" }; + option (google.api.method_signature) = "parent,filter"; } // Gets an annotated dataset by resource name. - rpc GetAnnotatedDataset(GetAnnotatedDatasetRequest) - returns (AnnotatedDataset) { + rpc GetAnnotatedDataset(GetAnnotatedDatasetRequest) returns (AnnotatedDataset) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*}" }; + option (google.api.method_signature) = "name"; } // Lists annotated datasets for a dataset. Pagination is supported. - rpc ListAnnotatedDatasets(ListAnnotatedDatasetsRequest) - returns (ListAnnotatedDatasetsResponse) { + rpc ListAnnotatedDatasets(ListAnnotatedDatasetsRequest) returns (ListAnnotatedDatasetsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/datasets/*}/annotatedDatasets" }; + option (google.api.method_signature) = "parent,filter"; } // Deletes an annotated dataset by resource name. - rpc DeleteAnnotatedDataset(DeleteAnnotatedDatasetRequest) - returns (google.protobuf.Empty) { + rpc DeleteAnnotatedDataset(DeleteAnnotatedDatasetRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*}" }; @@ -136,6 +150,11 @@ service DataLabelingService { post: "/v1beta1/{parent=projects/*/datasets/*}/image:label" body: "*" }; + option (google.api.method_signature) = "parent,basic_config,feature"; + option (google.longrunning.operation_info) = { + response_type: "AnnotatedDataset" + metadata_type: "LabelOperationMetadata" + }; } // Starts a labeling task for video. The type of video labeling task is @@ -145,6 +164,11 @@ service DataLabelingService { post: "/v1beta1/{parent=projects/*/datasets/*}/video:label" body: "*" }; + option (google.api.method_signature) = "parent,basic_config,feature"; + option (google.longrunning.operation_info) = { + response_type: "AnnotatedDataset" + metadata_type: "LabelOperationMetadata" + }; } // Starts a labeling task for text. The type of text labeling task is @@ -154,6 +178,11 @@ service DataLabelingService { post: "/v1beta1/{parent=projects/*/datasets/*}/text:label" body: "*" }; + option (google.api.method_signature) = "parent,basic_config,feature"; + option (google.longrunning.operation_info) = { + response_type: "AnnotatedDataset" + metadata_type: "LabelOperationMetadata" + }; } // Gets an example by resource name, including both data and annotation. @@ -161,6 +190,7 @@ service DataLabelingService { option (google.api.http) = { get: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*/examples/*}" }; + option (google.api.method_signature) = "name,filter"; } // Lists examples in an annotated dataset. Pagination is supported. @@ -168,48 +198,53 @@ service DataLabelingService { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/datasets/*/annotatedDatasets/*}/examples" }; + option (google.api.method_signature) = "parent,filter"; } // Creates an annotation spec set by providing a set of labels. - rpc CreateAnnotationSpecSet(CreateAnnotationSpecSetRequest) - returns (AnnotationSpecSet) { + rpc CreateAnnotationSpecSet(CreateAnnotationSpecSetRequest) returns (AnnotationSpecSet) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*}/annotationSpecSets" body: "*" }; + option (google.api.method_signature) = "parent,annotation_spec_set"; } // Gets an annotation spec set by resource name. - rpc GetAnnotationSpecSet(GetAnnotationSpecSetRequest) - returns (AnnotationSpecSet) { + rpc GetAnnotationSpecSet(GetAnnotationSpecSetRequest) returns (AnnotationSpecSet) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/annotationSpecSets/*}" }; + option (google.api.method_signature) = "name"; } // Lists annotation spec sets for a project. Pagination is supported. - rpc ListAnnotationSpecSets(ListAnnotationSpecSetsRequest) - returns (ListAnnotationSpecSetsResponse) { + rpc ListAnnotationSpecSets(ListAnnotationSpecSetsRequest) returns (ListAnnotationSpecSetsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*}/annotationSpecSets" }; + option (google.api.method_signature) = "parent,filter"; } // Deletes an annotation spec set by resource name. - rpc DeleteAnnotationSpecSet(DeleteAnnotationSpecSetRequest) - returns (google.protobuf.Empty) { + rpc DeleteAnnotationSpecSet(DeleteAnnotationSpecSetRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/annotationSpecSets/*}" }; + option (google.api.method_signature) = "name"; } // Creates an instruction for how data should be labeled. - rpc CreateInstruction(CreateInstructionRequest) - returns (google.longrunning.Operation) { + rpc CreateInstruction(CreateInstructionRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*}/instructions" body: "*" }; + option (google.api.method_signature) = "parent,instruction"; + option (google.longrunning.operation_info) = { + response_type: "Instruction" + metadata_type: "CreateInstructionMetadata" + }; } // Gets an instruction by resource name. @@ -217,49 +252,51 @@ service DataLabelingService { option (google.api.http) = { get: "/v1beta1/{name=projects/*/instructions/*}" }; + option (google.api.method_signature) = "name"; } // Lists instructions for a project. Pagination is supported. - rpc ListInstructions(ListInstructionsRequest) - returns (ListInstructionsResponse) { + rpc ListInstructions(ListInstructionsRequest) returns (ListInstructionsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*}/instructions" }; + option (google.api.method_signature) = "parent,filter"; } // Deletes an instruction object by resource name. - rpc DeleteInstruction(DeleteInstructionRequest) - returns (google.protobuf.Empty) { + rpc DeleteInstruction(DeleteInstructionRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/instructions/*}" }; + option (google.api.method_signature) = "name"; } - // Gets an evaluation by resource name. + // Gets an evaluation by resource name (to search, use + // [projects.evaluations.search][google.cloud.datalabeling.v1beta1.DataLabelingService.SearchEvaluations]). rpc GetEvaluation(GetEvaluationRequest) returns (Evaluation) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/datasets/*/evaluations/*}" }; + option (google.api.method_signature) = "name"; } - // Searchs evaluations within a project. Supported filter: evaluation_job, - // evaluation_time. - rpc SearchEvaluations(SearchEvaluationsRequest) - returns (SearchEvaluationsResponse) { + // Searches [evaluations][google.cloud.datalabeling.v1beta1.Evaluation] within a project. + rpc SearchEvaluations(SearchEvaluationsRequest) returns (SearchEvaluationsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*}/evaluations:search" }; + option (google.api.method_signature) = "parent,filter"; } - // Searchs example comparisons in evaluation, in format of examples - // of both ground truth and prediction(s). It is represented as a search with - // evaluation id. - rpc SearchExampleComparisons(SearchExampleComparisonsRequest) - returns (SearchExampleComparisonsResponse) { + // Searches example comparisons from an evaluation. The return format is a + // list of example comparisons that show ground truth and prediction(s) for + // a single input. Search by providing an evaluation ID. + rpc SearchExampleComparisons(SearchExampleComparisonsRequest) returns (SearchExampleComparisonsResponse) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*/datasets/*/evaluations/*}/exampleComparisons:search" body: "*" }; + option (google.api.method_signature) = "parent"; } // Creates an evaluation job. @@ -268,14 +305,21 @@ service DataLabelingService { post: "/v1beta1/{parent=projects/*}/evaluationJobs" body: "*" }; + option (google.api.method_signature) = "parent,job"; } - // Updates an evaluation job. + // Updates an evaluation job. You can only update certain fields of the job's + // [EvaluationJobConfig][google.cloud.datalabeling.v1beta1.EvaluationJobConfig]: `humanAnnotationConfig.instruction`, + // `exampleCount`, and `exampleSamplePercentage`. + // + // If you want to change any other aspect of the evaluation job, you must + // delete the job and create a new one. rpc UpdateEvaluationJob(UpdateEvaluationJobRequest) returns (EvaluationJob) { option (google.api.http) = { patch: "/v1beta1/{evaluation_job.name=projects/*/evaluationJobs/*}" body: "evaluation_job" }; + option (google.api.method_signature) = "evaluation_job,update_mask"; } // Gets an evaluation job by resource name. @@ -283,43 +327,44 @@ service DataLabelingService { option (google.api.http) = { get: "/v1beta1/{name=projects/*/evaluationJobs/*}" }; + option (google.api.method_signature) = "name"; } - // Pauses an evaluation job. Pausing a evaluation job that is already in - // PAUSED state will be a no-op. - rpc PauseEvaluationJob(PauseEvaluationJobRequest) - returns (google.protobuf.Empty) { + // Pauses an evaluation job. Pausing an evaluation job that is already in a + // `PAUSED` state is a no-op. + rpc PauseEvaluationJob(PauseEvaluationJobRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/evaluationJobs/*}:pause" body: "*" }; + option (google.api.method_signature) = "name"; } - // Resumes a paused evaluation job. Deleted evaluation job can't be resumed. - // Resuming a running evaluation job will be a no-op. - rpc ResumeEvaluationJob(ResumeEvaluationJobRequest) - returns (google.protobuf.Empty) { + // Resumes a paused evaluation job. A deleted evaluation job can't be resumed. + // Resuming a running or scheduled evaluation job is a no-op. + rpc ResumeEvaluationJob(ResumeEvaluationJobRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/evaluationJobs/*}:resume" body: "*" }; + option (google.api.method_signature) = "name"; } // Stops and deletes an evaluation job. - rpc DeleteEvaluationJob(DeleteEvaluationJobRequest) - returns (google.protobuf.Empty) { + rpc DeleteEvaluationJob(DeleteEvaluationJobRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/evaluationJobs/*}" }; + option (google.api.method_signature) = "name"; } // Lists all evaluation jobs within a project with possible filters. // Pagination is supported. - rpc ListEvaluationJobs(ListEvaluationJobsRequest) - returns (ListEvaluationJobsResponse) { + rpc ListEvaluationJobs(ListEvaluationJobsRequest) returns (ListEvaluationJobsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*}/evaluationJobs" }; + option (google.api.method_signature) = "parent,filter"; } } @@ -327,38 +372,53 @@ service DataLabelingService { message CreateDatasetRequest { // Required. Dataset resource parent, format: // projects/{project_id} - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Required. The dataset to be created. - Dataset dataset = 2; + Dataset dataset = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for GetDataSet. message GetDatasetRequest { // Required. Dataset resource name, format: // projects/{project_id}/datasets/{dataset_id} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Dataset" + } + ]; } // Request message for ListDataset. message ListDatasetsRequest { // Required. Dataset resource parent, format: // projects/{project_id} - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Optional. Filter on dataset is not supported at this moment. - string filter = 2; + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Requested page size. Server may return fewer results than // requested. Default value is 100. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. A token identifying a page of results for the server to return. // Typically obtained by - // [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] - // of the previous [DataLabelingService.ListDatasets] call. Returns the first - // page if empty. - string page_token = 4; + // [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] of the previous + // [DataLabelingService.ListDatasets] call. + // Returns the first page if empty. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; } // Results of listing datasets within a project. @@ -374,17 +434,27 @@ message ListDatasetsResponse { message DeleteDatasetRequest { // Required. Dataset resource name, format: // projects/{project_id}/datasets/{dataset_id} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Dataset" + } + ]; } // Request message for ImportData API. message ImportDataRequest { // Required. Dataset resource name, format: // projects/{project_id}/datasets/{dataset_id} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Dataset" + } + ]; // Required. Specify the input source of the data. - InputConfig input_config = 2; + InputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED]; // Email of the user who started the import task and should be notified by // email. If empty no notification will be sent. @@ -395,20 +465,30 @@ message ImportDataRequest { message ExportDataRequest { // Required. Dataset resource name, format: // projects/{project_id}/datasets/{dataset_id} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Dataset" + } + ]; // Required. Annotated dataset resource name. DataItem in // Dataset and their annotations in specified annotated dataset will be // exported. It's in format of // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ // {annotated_dataset_id} - string annotated_dataset = 2; + string annotated_dataset = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/AnnotatedDataset" + } + ]; // Optional. Filter is not supported at this moment. - string filter = 3; + string filter = 3 [(google.api.field_behavior) = OPTIONAL]; // Required. Specify the output destination. - OutputConfig output_config = 4; + OutputConfig output_config = 4 [(google.api.field_behavior) = REQUIRED]; // Email of the user who started the export task and should be notified by // email. If empty no notification will be sent. @@ -419,28 +499,38 @@ message ExportDataRequest { message GetDataItemRequest { // Required. The name of the data item to get, format: // projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/DataItem" + } + ]; } // Request message for ListDataItems. message ListDataItemsRequest { // Required. Name of the dataset to list data items, format: // projects/{project_id}/datasets/{dataset_id} - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Dataset" + } + ]; // Optional. Filter is not supported at this moment. - string filter = 2; + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Requested page size. Server may return fewer results than // requested. Default value is 100. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. A token identifying a page of results for the server to return. // Typically obtained by - // [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] - // of the previous [DataLabelingService.ListDataItems] call. Return first page - // if empty. - string page_token = 4; + // [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] of the previous + // [DataLabelingService.ListDataItems] call. + // Return first page if empty. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; } // Results of listing data items in a dataset. @@ -457,28 +547,38 @@ message GetAnnotatedDatasetRequest { // Required. Name of the annotated dataset to get, format: // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ // {annotated_dataset_id} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/AnnotatedDataset" + } + ]; } // Request message for ListAnnotatedDatasets. message ListAnnotatedDatasetsRequest { // Required. Name of the dataset to list annotated datasets, format: // projects/{project_id}/datasets/{dataset_id} - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Dataset" + } + ]; // Optional. Filter is not supported at this moment. - string filter = 2; + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Requested page size. Server may return fewer results than // requested. Default value is 100. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. A token identifying a page of results for the server to return. // Typically obtained by - // [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] - // of the previous [DataLabelingService.ListAnnotatedDatasets] call. Return - // first page if empty. - string page_token = 4; + // [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] of the previous + // [DataLabelingService.ListAnnotatedDatasets] call. + // Return first page if empty. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; } // Results of listing annotated datasets for a dataset. @@ -495,7 +595,12 @@ message DeleteAnnotatedDatasetRequest { // Required. Name of the annotated dataset to delete, format: // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ // {annotated_dataset_id} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/AnnotatedDataset" + } + ]; } // Request message for starting an image labeling task. @@ -553,13 +658,18 @@ message LabelImageRequest { // Required. Name of the dataset to request labeling task, format: // projects/{project_id}/datasets/{dataset_id} - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Dataset" + } + ]; // Required. Basic human annotation config. - HumanAnnotationConfig basic_config = 2; + HumanAnnotationConfig basic_config = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The type of image labeling task. - Feature feature = 3; + Feature feature = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for LabelVideo. @@ -607,13 +717,18 @@ message LabelVideoRequest { // Required. Name of the dataset to request labeling task, format: // projects/{project_id}/datasets/{dataset_id} - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Dataset" + } + ]; // Required. Basic human annotation config. - HumanAnnotationConfig basic_config = 2; + HumanAnnotationConfig basic_config = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The type of video labeling task. - Feature feature = 3; + Feature feature = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for LabelText. @@ -645,13 +760,18 @@ message LabelTextRequest { // Required. Name of the data set to request labeling task, format: // projects/{project_id}/datasets/{dataset_id} - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Dataset" + } + ]; // Required. Basic human annotation config. - HumanAnnotationConfig basic_config = 2; + HumanAnnotationConfig basic_config = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The type of text labeling task. - Feature feature = 6; + Feature feature = 6 [(google.api.field_behavior) = REQUIRED]; } // Request message for GetExample @@ -659,35 +779,45 @@ message GetExampleRequest { // Required. Name of example, format: // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ // {annotated_dataset_id}/examples/{example_id} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Example" + } + ]; // Optional. An expression for filtering Examples. Filter by // annotation_spec.display_name is supported. Format // "annotation_spec.display_name = {display_name}" - string filter = 2; + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; } // Request message for ListExamples. message ListExamplesRequest { // Required. Example resource parent. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/AnnotatedDataset" + } + ]; // Optional. An expression for filtering Examples. For annotated datasets that // have annotation spec set, filter by // annotation_spec.display_name is supported. Format // "annotation_spec.display_name = {display_name}" - string filter = 2; + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Requested page size. Server may return fewer results than // requested. Default value is 100. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. A token identifying a page of results for the server to return. // Typically obtained by - // [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] - // of the previous [DataLabelingService.ListExamples] call. Return first page - // if empty. - string page_token = 4; + // [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] of the previous + // [DataLabelingService.ListExamples] call. + // Return first page if empty. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; } // Results of listing Examples in and annotated dataset. @@ -703,40 +833,55 @@ message ListExamplesResponse { message CreateAnnotationSpecSetRequest { // Required. AnnotationSpecSet resource parent, format: // projects/{project_id} - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Required. Annotation spec set to create. Annotation specs must be included. // Only one annotation spec will be accepted for annotation specs with same // display_name. - AnnotationSpecSet annotation_spec_set = 2; + AnnotationSpecSet annotation_spec_set = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for GetAnnotationSpecSet. message GetAnnotationSpecSetRequest { // Required. AnnotationSpecSet resource name, format: // projects/{project_id}/annotationSpecSets/{annotation_spec_set_id} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/AnnotationSpecSet" + } + ]; } // Request message for ListAnnotationSpecSets. message ListAnnotationSpecSetsRequest { // Required. Parent of AnnotationSpecSet resource, format: // projects/{project_id} - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Optional. Filter is not supported at this moment. - string filter = 2; + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Requested page size. Server may return fewer results than // requested. Default value is 100. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. A token identifying a page of results for the server to return. // Typically obtained by - // [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] - // of the previous [DataLabelingService.ListAnnotationSpecSets] call. Return - // first page if empty. - string page_token = 4; + // [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] of the previous + // [DataLabelingService.ListAnnotationSpecSets] call. + // Return first page if empty. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; } // Results of listing annotation spec set under a project. @@ -752,52 +897,77 @@ message ListAnnotationSpecSetsResponse { message DeleteAnnotationSpecSetRequest { // Required. AnnotationSpec resource name, format: // `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/AnnotationSpecSet" + } + ]; } // Request message for CreateInstruction. message CreateInstructionRequest { // Required. Instruction resource parent, format: // projects/{project_id} - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Required. Instruction of how to perform the labeling task. - Instruction instruction = 2; + Instruction instruction = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for GetInstruction. message GetInstructionRequest { // Required. Instruction resource name, format: // projects/{project_id}/instructions/{instruction_id} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Instruction" + } + ]; } // Request message for DeleteInstruction. message DeleteInstructionRequest { // Required. Instruction resource name, format: // projects/{project_id}/instructions/{instruction_id} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Instruction" + } + ]; } // Request message for ListInstructions. message ListInstructionsRequest { // Required. Instruction resource parent, format: // projects/{project_id} - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Optional. Filter is not supported at this moment. - string filter = 2; + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Requested page size. Server may return fewer results than // requested. Default value is 100. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. A token identifying a page of results for the server to return. // Typically obtained by - // [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] - // of the previous [DataLabelingService.ListInstructions] call. Return first - // page if empty. - string page_token = 4; + // [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] of the previous + // [DataLabelingService.ListInstructions] call. + // Return first page if empty. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; } // Results of listing instructions under a project. @@ -812,39 +982,77 @@ message ListInstructionsResponse { // Request message for GetEvaluation. message GetEvaluationRequest { // Required. Name of the evaluation. Format: - // 'projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}' - string name = 1; + // + // "projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Evaluation" + } + ]; } // Request message for SearchEvaluation. message SearchEvaluationsRequest { - // Required. Evaluation search parent. Format: - // projects/{project_id} - string parent = 1; - - // Optional. Support filtering by model id, job state, start and end time. - // Format: - // "evaluation_job.evaluation_job_id = {evaluation_job_id} AND - // evaluation_job.evaluation_job_run_time_start = {timestamp} AND - // evaluation_job.evaluation_job_run_time_end = {timestamp} AND - // annotation_spec.display_name = {display_name}" - string filter = 2; + // Required. Evaluation search parent (project ID). Format: + // "projects/{project_id}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Evaluation" + } + ]; + + // Optional. To search evaluations, you can filter by the following: + // + // * evaluation_job.evaluation_job_id (the last part of + // [EvaluationJob.name][google.cloud.datalabeling.v1beta1.EvaluationJob.name]) + // * evaluation_job.model_id (the {model_name} portion + // of [EvaluationJob.modelVersion][google.cloud.datalabeling.v1beta1.EvaluationJob.model_version]) + // * evaluation_job.evaluation_job_run_time_start (Minimum + // threshold for the + // [evaluationJobRunTime][google.cloud.datalabeling.v1beta1.Evaluation.evaluation_job_run_time] that created + // the evaluation) + // * evaluation_job.evaluation_job_run_time_end (Maximum + // threshold for the + // [evaluationJobRunTime][google.cloud.datalabeling.v1beta1.Evaluation.evaluation_job_run_time] that created + // the evaluation) + // * evaluation_job.job_state ([EvaluationJob.state][google.cloud.datalabeling.v1beta1.EvaluationJob.state]) + // * annotation_spec.display_name (the Evaluation contains a + // metric for the annotation spec with this + // [displayName][google.cloud.datalabeling.v1beta1.AnnotationSpec.display_name]) + // + // To filter by multiple critiera, use the `AND` operator or the `OR` + // operator. The following examples shows a string that filters by several + // critiera: + // + // "evaluation_job.evaluation_job_id = + // {evaluation_job_id} AND evaluation_job.model_id = + // {model_name} AND + // evaluation_job.evaluation_job_run_time_start = + // {timestamp_1} AND + // evaluation_job.evaluation_job_run_time_end = + // {timestamp_2} AND annotation_spec.display_name = + // {display_name}" + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Requested page size. Server may return fewer results than // requested. Default value is 100. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. A token identifying a page of results for the server to return. - // Typically obtained by - // [SearchEvaluationsResponse.next_page_token][google.cloud.datalabeling.v1beta1.SearchEvaluationsResponse.next_page_token] - // of the previous [DataLabelingService.SearchEvaluations] call. Return first - // page if empty. - string page_token = 4; + // Typically obtained by the + // [nextPageToken][google.cloud.datalabeling.v1beta1.SearchEvaluationsResponse.next_page_token] of the response + // to a previous search request. + // + // If you don't specify this field, the API call requests the first page of + // the search. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; } // Results of searching evaluations. message SearchEvaluationsResponse { - // The list of evaluations to return. + // The list of evaluations matching the search. repeated Evaluation evaluations = 1; // A token to retrieve next page of results. @@ -853,33 +1061,44 @@ message SearchEvaluationsResponse { // Request message of SearchExampleComparisons. message SearchExampleComparisonsRequest { - // Required. Name of the Evaluation resource to search example comparison - // from. Format: - // projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id} - string parent = 1; + // Required. Name of the [Evaluation][google.cloud.datalabeling.v1beta1.Evaluation] resource to search for example + // comparisons from. Format: + // + // "projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Evaluation" + } + ]; // Optional. Requested page size. Server may return fewer results than // requested. Default value is 100. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A token identifying a page of results for the server to return. - // Typically obtained by - // [SearchExampleComparisons.next_page_token][] of the previous - // [DataLabelingService.SearchExampleComparisons] call. - // Return first page if empty. - string page_token = 3; + // Typically obtained by the + // [nextPageToken][SearchExampleComparisons.next_page_token] of the response + // to a previous search rquest. + // + // If you don't specify this field, the API call requests the first page of + // the search. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Results of searching example comparisons. message SearchExampleComparisonsResponse { - // Example comparisons containing annotation comparison between groundtruth - // and predictions. + // Example comparisons comparing ground truth output and predictions for a + // specific input. message ExampleComparison { + // The ground truth output for the input. Example ground_truth_example = 1; + // Predictions by the model for the input. repeated Example model_created_examples = 2; } + // A list of example comparisons matching the search criteria. repeated ExampleComparison example_comparisons = 1; // A token to retrieve next page of results. @@ -888,72 +1107,119 @@ message SearchExampleComparisonsResponse { // Request message for CreateEvaluationJob. message CreateEvaluationJobRequest { - // Required. Evaluation job resource parent, format: - // projects/{project_id}. - string parent = 1; + // Required. Evaluation job resource parent. Format: + // "projects/{project_id}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Required. The evaluation job to create. - EvaluationJob job = 2; + EvaluationJob job = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for UpdateEvaluationJob. message UpdateEvaluationJobRequest { // Required. Evaluation job that is going to be updated. - EvaluationJob evaluation_job = 1; - - // Optional. Mask for which field in evaluation_job should be updated. - google.protobuf.FieldMask update_mask = 2; + EvaluationJob evaluation_job = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Mask for which fields to update. You can only provide the + // following fields: + // + // * `evaluationJobConfig.humanAnnotationConfig.instruction` + // * `evaluationJobConfig.exampleCount` + // * `evaluationJobConfig.exampleSamplePercentage` + // + // You can provide more than one of these fields by separating them with + // commas. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; } // Request message for GetEvaluationJob. message GetEvaluationJobRequest { // Required. Name of the evaluation job. Format: - // 'projects/{project_id}/evaluationJobs/{evaluation_job_id}' - string name = 1; + // + // "projects/{project_id}/evaluationJobs/{evaluation_job_id}" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/EvaluationJob" + } + ]; } // Request message for PauseEvaluationJob. message PauseEvaluationJobRequest { // Required. Name of the evaluation job that is going to be paused. Format: - // 'projects/{project_id}/evaluationJobs/{evaluation_job_id}' - string name = 1; + // + // "projects/{project_id}/evaluationJobs/{evaluation_job_id}" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/EvaluationJob" + } + ]; } // Request message ResumeEvaluationJob. message ResumeEvaluationJobRequest { // Required. Name of the evaluation job that is going to be resumed. Format: - // 'projects/{project_id}/evaluationJobs/{evaluation_job_id}' - string name = 1; + // + // "projects/{project_id}/evaluationJobs/{evaluation_job_id}" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/EvaluationJob" + } + ]; } // Request message DeleteEvaluationJob. message DeleteEvaluationJobRequest { // Required. Name of the evaluation job that is going to be deleted. Format: - // 'projects/{project_id}/evaluationJobs/{evaluation_job_id}' - string name = 1; + // + // "projects/{project_id}/evaluationJobs/{evaluation_job_id}" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/EvaluationJob" + } + ]; } // Request message for ListEvaluationJobs. message ListEvaluationJobsRequest { - // Required. Evaluation resource parent. Format: - // "projects/{project_id}" - string parent = 1; - - // Optional. Only support filter by model id and job state. Format: - // "evaluation_job.model_id = {model_id} AND evaluation_job.state = - // {EvaluationJob::State}" - string filter = 2; + // Required. Evaluation job resource parent. Format: + // "projects/{project_id}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Optional. You can filter the jobs to list by model_id (also known as + // model_name, as described in + // [EvaluationJob.modelVersion][google.cloud.datalabeling.v1beta1.EvaluationJob.model_version]) or by + // evaluation job state (as described in [EvaluationJob.state][google.cloud.datalabeling.v1beta1.EvaluationJob.state]). To filter + // by both criteria, use the `AND` operator or the `OR` operator. For example, + // you can use the following string for your filter: + // "evaluation_job.model_id = {model_name} AND + // evaluation_job.state = {evaluation_job_state}" + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Requested page size. Server may return fewer results than // requested. Default value is 100. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. A token identifying a page of results for the server to return. - // Typically obtained by - // [ListEvaluationJobs.next_page_token][] of the previous - // [DataLabelingService.ListEvaluationJobs] call. - // Return first page if empty. - string page_token = 4; + // Typically obtained by the + // [nextPageToken][google.cloud.datalabeling.v1beta1.ListEvaluationJobsResponse.next_page_token] in the response + // to the previous request. The request returns the first page if this is + // empty. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; } // Results for listing evaluation jobs. diff --git a/google/cloud/datalabeling/v1beta1/datalabeling_gapic.legacy.yaml b/google/cloud/datalabeling/v1beta1/datalabeling_gapic.legacy.yaml new file mode 100644 index 000000000..82caa70e0 --- /dev/null +++ b/google/cloud/datalabeling/v1beta1/datalabeling_gapic.legacy.yaml @@ -0,0 +1,669 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.datalabeling.v1beta1 + python: + package_name: google.cloud.datalabeling_v1beta1.gapic + go: + package_name: cloud.google.com/go/datalabeling/apiv1beta1 + csharp: + package_name: Google.Cloud.Datalabeling.V1beta1 + ruby: + package_name: Google::Cloud::Datalabeling::V1beta1 + php: + package_name: Google\Cloud\Datalabeling\V1beta1 + nodejs: + package_name: datalabeling.v1beta1 +# The configuration for the license header to put on generated files. +license_header: + # The file containing the raw license header without any copyright line(s). + license_file: license-header-apache-2.0.txt +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.datalabeling.v1beta1.DataLabelingService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + - name_pattern: projects/{project}/annotationSpecSets/{annotation_spec_set} + entity_name: annotation_spec_set + - name_pattern: projects/{project}/datasets/{dataset} + entity_name: dataset + - name_pattern: projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset} + entity_name: annotated_dataset + - name_pattern: projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example} + entity_name: example + - name_pattern: projects/{project}/datasets/{dataset}/dataItems/{data_item} + entity_name: data_item + - name_pattern: projects/{project}/instructions/{instruction} + entity_name: instruction + - name_pattern: projects/{project}/datasets/{dataset}/evaluations/{evaluation} + entity_name: evaluation + - name_pattern: projects/{project}/evaluationJobs/{evaluation_job} + entity_name: evaluation_job + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 30000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 300000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateDataset + flattening: + groups: + - parameters: + - parent + - dataset + required_fields: + - parent + - dataset + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + - name: GetDataset + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: dataset + timeout_millis: 30000 + - name: ListDatasets + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: datasets + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + - name: DeleteDataset + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: dataset + timeout_millis: 30000 + - name: ImportData + flattening: + groups: + - parameters: + - name + - input_config + required_fields: + - name + - input_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: dataset + long_running: + return_type: google.cloud.datalabeling.v1beta1.ImportDataOperationResponse + metadata_type: google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 30000 + - name: ExportData + flattening: + groups: + - parameters: + - name + - annotated_dataset + - filter + - output_config + required_fields: + - name + - annotated_dataset + - output_config + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: dataset + long_running: + return_type: google.cloud.datalabeling.v1beta1.ExportDataOperationResponse + metadata_type: google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 30000 + - name: GetDataItem + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: data_item + timeout_millis: 30000 + - name: ListDataItems + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: data_items + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: dataset + timeout_millis: 30000 + - name: GetAnnotatedDataset + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: annotated_dataset + timeout_millis: 30000 + - name: ListAnnotatedDatasets + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: annotated_datasets + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: dataset + timeout_millis: 30000 + - name: LabelImage + flattening: + groups: + - parameters: + - parent + - basic_config + - feature + required_fields: + - parent + - basic_config + - feature + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: dataset + long_running: + return_type: google.cloud.datalabeling.v1beta1.AnnotatedDataset + metadata_type: google.cloud.datalabeling.v1beta1.LabelOperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 30000 + - name: LabelVideo + flattening: + groups: + - parameters: + - parent + - basic_config + - feature + required_fields: + - parent + - basic_config + - feature + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: dataset + long_running: + return_type: google.cloud.datalabeling.v1beta1.AnnotatedDataset + metadata_type: google.cloud.datalabeling.v1beta1.LabelOperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 30000 + - name: LabelText + flattening: + groups: + - parameters: + - parent + - basic_config + - feature + required_fields: + - parent + - basic_config + - feature + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: dataset + long_running: + return_type: google.cloud.datalabeling.v1beta1.AnnotatedDataset + metadata_type: google.cloud.datalabeling.v1beta1.LabelOperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 30000 + - name: GetExample + flattening: + groups: + - parameters: + - name + - filter + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: example + timeout_millis: 30000 + - name: ListExamples + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: examples + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: annotated_dataset + timeout_millis: 30000 + - name: CreateAnnotationSpecSet + flattening: + groups: + - parameters: + - parent + - annotation_spec_set + required_fields: + - parent + - annotation_spec_set + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + - name: GetAnnotationSpecSet + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: annotation_spec_set + timeout_millis: 30000 + - name: ListAnnotationSpecSets + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: annotation_spec_sets + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + - name: DeleteAnnotationSpecSet + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: annotation_spec_set + timeout_millis: 30000 + - name: CreateInstruction + flattening: + groups: + - parameters: + - parent + - instruction + required_fields: + - parent + - instruction + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + long_running: + return_type: google.cloud.datalabeling.v1beta1.Instruction + metadata_type: google.cloud.datalabeling.v1beta1.CreateInstructionMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 30000 + - name: GetInstruction + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: instruction + timeout_millis: 30000 + - name: ListInstructions + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: instructions + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + - name: DeleteInstruction + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: instruction + timeout_millis: 30000 + - name: GetEvaluation + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: evaluation + timeout_millis: 60000 + - name: SearchEvaluations + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + - filter + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: evaluations + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: SearchExampleComparisons + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: example_comparisons + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: evaluation + timeout_millis: 60000 + - name: CreateEvaluationJob + flattening: + groups: + - parameters: + - parent + - job + required_fields: + - parent + - job + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: UpdateEvaluationJob + flattening: + groups: + - parameters: + - evaluation_job + - update_mask + required_fields: + - evaluation_job + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + evaluation_job.name: evaluation_job + timeout_millis: 60000 + - name: GetEvaluationJob + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: evaluation_job + timeout_millis: 60000 + - name: PauseEvaluationJob + # params. + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: evaluation_job + timeout_millis: 60000 + - name: ResumeEvaluationJob + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: evaluation_job + timeout_millis: 60000 + - name: DeleteEvaluationJob + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: evaluation_job + timeout_millis: 60000 + - name: ListEvaluationJobs + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + - filter + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: evaluation_jobs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 diff --git a/google/cloud/datalabeling/v1beta1/datalabeling_gapic.yaml b/google/cloud/datalabeling/v1beta1/datalabeling_gapic.yaml index 82caa70e0..0521c9536 100644 --- a/google/cloud/datalabeling/v1beta1/datalabeling_gapic.yaml +++ b/google/cloud/datalabeling/v1beta1/datalabeling_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -16,51 +16,8 @@ language_settings: package_name: Google\Cloud\Datalabeling\V1beta1 nodejs: package_name: datalabeling.v1beta1 -# The configuration for the license header to put on generated files. -license_header: - # The file containing the raw license header without any copyright line(s). - license_file: license-header-apache-2.0.txt -# A list of API interface configurations. interfaces: -# The fully qualified name of the API interface. - name: google.cloud.datalabeling.v1beta1.DataLabelingService - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - - name_pattern: projects/{project}/annotationSpecSets/{annotation_spec_set} - entity_name: annotation_spec_set - - name_pattern: projects/{project}/datasets/{dataset} - entity_name: dataset - - name_pattern: projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset} - entity_name: annotated_dataset - - name_pattern: projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example} - entity_name: example - - name_pattern: projects/{project}/datasets/{dataset}/dataItems/{data_item} - entity_name: data_item - - name_pattern: projects/{project}/instructions/{instruction} - entity_name: instruction - - name_pattern: projects/{project}/datasets/{dataset}/evaluations/{evaluation} - entity_name: evaluation - - name_pattern: projects/{project}/evaluationJobs/{evaluation_job} - entity_name: evaluation_job - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -70,600 +27,14 @@ interfaces: rpc_timeout_multiplier: 1 max_rpc_timeout_millis: 20000 total_timeout_millis: 300000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: CreateDataset - flattening: - groups: - - parameters: - - parent - - dataset - required_fields: - - parent - - dataset - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 30000 - - name: GetDataset - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: dataset - timeout_millis: 30000 - - name: ListDatasets - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: datasets - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 30000 - name: DeleteDataset - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: dataset - timeout_millis: 30000 - - name: ImportData - flattening: - groups: - - parameters: - - name - - input_config - required_fields: - - name - - input_config - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: dataset - long_running: - return_type: google.cloud.datalabeling.v1beta1.ImportDataOperationResponse - metadata_type: google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 30000 - name: ExportData - flattening: - groups: - - parameters: - - name - - annotated_dataset - - filter - - output_config - required_fields: - - name - - annotated_dataset - - output_config - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: dataset - long_running: - return_type: google.cloud.datalabeling.v1beta1.ExportDataOperationResponse - metadata_type: google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 30000 - - name: GetDataItem - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: data_item - timeout_millis: 30000 - - name: ListDataItems - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: data_items - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: dataset - timeout_millis: 30000 - - name: GetAnnotatedDataset - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: annotated_dataset - timeout_millis: 30000 - - name: ListAnnotatedDatasets - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: annotated_datasets - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: dataset - timeout_millis: 30000 - - name: LabelImage - flattening: - groups: - - parameters: - - parent - - basic_config - - feature - required_fields: - - parent - - basic_config - - feature - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: dataset - long_running: - return_type: google.cloud.datalabeling.v1beta1.AnnotatedDataset - metadata_type: google.cloud.datalabeling.v1beta1.LabelOperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 30000 - - name: LabelVideo - flattening: - groups: - - parameters: - - parent - - basic_config - - feature - required_fields: - - parent - - basic_config - - feature - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: dataset - long_running: - return_type: google.cloud.datalabeling.v1beta1.AnnotatedDataset - metadata_type: google.cloud.datalabeling.v1beta1.LabelOperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 30000 - - name: LabelText - flattening: - groups: - - parameters: - - parent - - basic_config - - feature - required_fields: - - parent - - basic_config - - feature - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: dataset - long_running: - return_type: google.cloud.datalabeling.v1beta1.AnnotatedDataset - metadata_type: google.cloud.datalabeling.v1beta1.LabelOperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 30000 - - name: GetExample - flattening: - groups: - - parameters: - - name - - filter - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: example - timeout_millis: 30000 - - name: ListExamples - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: examples retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: annotated_dataset - timeout_millis: 30000 - - name: CreateAnnotationSpecSet - flattening: - groups: - - parameters: - - parent - - annotation_spec_set - required_fields: - - parent - - annotation_spec_set - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 30000 - - name: GetAnnotationSpecSet - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: annotation_spec_set - timeout_millis: 30000 - - name: ListAnnotationSpecSets - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: annotation_spec_sets - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 30000 - name: DeleteAnnotationSpecSet - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: annotation_spec_set - timeout_millis: 30000 - - name: CreateInstruction - flattening: - groups: - - parameters: - - parent - - instruction - required_fields: - - parent - - instruction - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - long_running: - return_type: google.cloud.datalabeling.v1beta1.Instruction - metadata_type: google.cloud.datalabeling.v1beta1.CreateInstructionMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 30000 - - name: GetInstruction - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: instruction - timeout_millis: 30000 - - name: ListInstructions - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: instructions retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 30000 - name: DeleteInstruction - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: instruction - timeout_millis: 30000 - - name: GetEvaluation - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: evaluation - timeout_millis: 60000 - - name: SearchEvaluations - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - - parent - - filter - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: evaluations - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - - name: SearchExampleComparisons - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: example_comparisons - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: evaluation - timeout_millis: 60000 - - name: CreateEvaluationJob - flattening: - groups: - - parameters: - - parent - - job - required_fields: - - parent - - job - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - - name: UpdateEvaluationJob - flattening: - groups: - - parameters: - - evaluation_job - - update_mask - required_fields: - - evaluation_job - - update_mask - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - evaluation_job.name: evaluation_job - timeout_millis: 60000 - - name: GetEvaluationJob - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: evaluation_job - timeout_millis: 60000 - - name: PauseEvaluationJob - # params. - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: evaluation_job - timeout_millis: 60000 - - name: ResumeEvaluationJob - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: evaluation_job - timeout_millis: 60000 - name: DeleteEvaluationJob - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: evaluation_job - timeout_millis: 60000 - - name: ListEvaluationJobs - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - - parent - - filter - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: evaluation_jobs retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 diff --git a/google/cloud/datalabeling/v1beta1/datalabeling_grpc_service_config.json b/google/cloud/datalabeling/v1beta1/datalabeling_grpc_service_config.json new file mode 100755 index 000000000..a59fd83ac --- /dev/null +++ b/google/cloud/datalabeling/v1beta1/datalabeling_grpc_service_config.json @@ -0,0 +1,155 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "CreateDataset" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "ImportData" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "LabelImage" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "LabelVideo" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "LabelText" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "CreateAnnotationSpecSet" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "CreateInstruction" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "SearchExampleComparisons" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "CreateEvaluationJob" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "UpdateEvaluationJob" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "PauseEvaluationJob" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "ResumeEvaluationJob" + } + ], + "timeout": "30s" + }, + { + "name": [ + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "GetDataset" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "ListDatasets" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "DeleteDataset" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "ExportData" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "GetDataItem" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "ListDataItems" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "GetAnnotatedDataset" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "ListAnnotatedDatasets" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "GetExample" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "ListExamples" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "GetAnnotationSpecSet" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "ListAnnotationSpecSets" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "DeleteAnnotationSpecSet" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "GetInstruction" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "ListInstructions" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "DeleteInstruction" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "GetEvaluation" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "SearchEvaluations" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "GetEvaluationJob" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "DeleteEvaluationJob" + }, + { + "service": "google.cloud.datalabeling.v1beta1.DataLabelingService", + "method": "ListEvaluationJobs" + } + ], + "timeout": "30s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "30s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/datalabeling/datalabeling_v1beta1.yaml b/google/cloud/datalabeling/v1beta1/datalabeling_v1beta1.yaml similarity index 97% rename from google/cloud/datalabeling/datalabeling_v1beta1.yaml rename to google/cloud/datalabeling/v1beta1/datalabeling_v1beta1.yaml index 80f481c23..3814b2388 100644 --- a/google/cloud/datalabeling/datalabeling_v1beta1.yaml +++ b/google/cloud/datalabeling/v1beta1/datalabeling_v1beta1.yaml @@ -39,6 +39,9 @@ documentation: Sets the access control policy on the specified resource. Replaces any existing policy. + Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and + PERMISSION_DENIED + - selector: google.iam.v1.IAMPolicy.TestIamPermissions description: |- Returns permissions that a caller has on the specified resource. If the diff --git a/google/cloud/datalabeling/v1beta1/dataset.proto b/google/cloud/datalabeling/v1beta1/dataset.proto index 5289abcc9..a0bc9a433 100644 --- a/google/cloud/datalabeling/v1beta1/dataset.proto +++ b/google/cloud/datalabeling/v1beta1/dataset.proto @@ -18,7 +18,9 @@ syntax = "proto3"; package google.cloud.datalabeling.v1beta1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/datalabeling/v1beta1/annotation.proto"; +import "google/cloud/datalabeling/v1beta1/annotation_spec_set.proto"; import "google/cloud/datalabeling/v1beta1/data_payloads.proto"; import "google/cloud/datalabeling/v1beta1/human_annotation_config.proto"; import "google/protobuf/timestamp.proto"; @@ -30,18 +32,26 @@ option java_package = "com.google.cloud.datalabeling.v1beta1"; enum DataType { DATA_TYPE_UNSPECIFIED = 0; + // Allowed for continuous evaluation. IMAGE = 1; VIDEO = 2; + // Allowed for continuous evaluation. TEXT = 4; + // Allowed for continuous evaluation. GENERAL_DATA = 6; } // Dataset is the resource to hold your data. You can request multiple labeling // tasks for a dataset while each one will generate an AnnotatedDataset. message Dataset { + option (google.api.resource) = { + type: "datalabeling.googleapis.com/Dataset" + pattern: "projects/{project}/datasets/{dataset}" + }; + // Output only. Dataset resource name, format is: // projects/{project_id}/datasets/{dataset_id} string name = 1; @@ -82,20 +92,22 @@ message InputConfig { // Source located in Cloud Storage. GcsSource gcs_source = 2; + // Source located in BigQuery. You must specify this field if you are using + // this InputConfig in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob]. BigQuerySource bigquery_source = 5; } // Required. Data type must be specifed when user tries to import data. DataType data_type = 1; - // Optional. If input contains annotation, user needs to specify the - // type and metadata of the annotation when creating it as an annotated - // dataset. + // Optional. The type of annotation to be performed on this data. You must + // specify this field if you are using this InputConfig in an + // [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob]. AnnotationType annotation_type = 3; - // Optional. Metadata about annotations in the input. Each annotation type may - // have different metadata. - // Metadata for classification problem. + // Optional. Metadata about annotations for the input. You must specify this + // field if you are using this InputConfig in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob] for a + // model version that performs classification. ClassificationMetadata classification_metadata = 4; } @@ -123,10 +135,24 @@ message GcsSource { string mime_type = 2; } -// The BigQuery location for the input content. +// The BigQuery location for input data. If used in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob], this +// is where the service saves the prediction input and output sampled from the +// model version. message BigQuerySource { - // Required. BigQuery URI to a table, up to 2000 characters long. - // Accepted forms: BigQuery gs path e.g. bq://projectId.bqDatasetId.bqTableId + // Required. BigQuery URI to a table, up to 2,000 characters long. If you + // specify the URI of a table that does not exist, Data Labeling Service + // creates a table at the URI with the correct schema when you create your + // [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob]. If you specify the URI of a table that already exists, + // it must have the + // [correct + // schema](/ml-engine/docs/continuous-evaluation/create-job#table-schema). + // + // Provide the table URI in the following format: + // + // "bq://{your_project_id}/{your_dataset_name}/{your_table_name}" + // + // [Learn + // more](/ml-engine/docs/continuous-evaluation/create-job#table-schema). string input_uri = 1; } @@ -135,7 +161,7 @@ message OutputConfig { // Required. Location to output data to. oneof destination { // Output to a file in Cloud Storage. Should be used for labeling output - // other thanimage segmentation. + // other than image segmentation. GcsDestination gcs_destination = 1; // Output to a folder in Cloud Storage. Should be used for image @@ -164,6 +190,11 @@ message GcsFolderDestination { // DataItem is a piece of data, without annotation. For example, an image. message DataItem { + option (google.api.resource) = { + type: "datalabeling.googleapis.com/DataItem" + pattern: "projects/{project}/datasets/{dataset}/dataItems/{data_item}" + }; + // Output only. oneof payload { // The image payload, a container of the image bytes/uri. @@ -185,6 +216,11 @@ message DataItem { // labeling task will generate an AnnotatedDataset under the Dataset that the // task is requested for. message AnnotatedDataset { + option (google.api.resource) = { + type: "datalabeling.googleapis.com/AnnotatedDataset" + pattern: "projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}" + }; + // Output only. AnnotatedDataset resource name in format of: // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ // {annotated_dataset_id} @@ -281,6 +317,11 @@ message AnnotatedDatasetMetadata { // An Example is a piece of data and its annotation. For example, an image with // label "house". message Example { + option (google.api.resource) = { + type: "datalabeling.googleapis.com/Example" + pattern: "projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}" + }; + // Output only. The data part of Example. oneof payload { // The image payload, a container of the image bytes/uri. diff --git a/google/cloud/datalabeling/v1beta1/evaluation.proto b/google/cloud/datalabeling/v1beta1/evaluation.proto index ad1e975a3..fde0366d3 100644 --- a/google/cloud/datalabeling/v1beta1/evaluation.proto +++ b/google/cloud/datalabeling/v1beta1/evaluation.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package google.cloud.datalabeling.v1beta1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/datalabeling/v1beta1/annotation.proto"; import "google/cloud/datalabeling/v1beta1/annotation_spec_set.proto"; import "google/protobuf/timestamp.proto"; @@ -26,51 +27,72 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1 option java_multiple_files = true; option java_package = "com.google.cloud.datalabeling.v1beta1"; -// Describes an evaluation between 2 annotated datasets. Created by an -// evaluation plan. +// Describes an evaluation between a machine learning model's predictions and +// ground truth labels. Created when an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob] runs successfully. message Evaluation { - // Resource name of an evaluation. - // Format: - // 'projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}' + option (google.api.resource) = { + type: "datalabeling.googleapis.com/Evaluation" + pattern: "projects/{project}/datasets/{dataset}/evaluations/{evaluation}" + }; + + // Output only. Resource name of an evaluation. The name has the following + // format: + // + // "projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}' string name = 1; - // Options used in evaluation plan for creating the evaluation. + // Output only. Options used in the evaluation job that created this + // evaluation. EvaluationConfig config = 2; - // Output only. Timestamp when the evaluation plan triggered this evaluation - // flow. + // Output only. Timestamp for when the evaluation job that created this + // evaluation ran. google.protobuf.Timestamp evaluation_job_run_time = 3; - // Output only. Timestamp when this model evaluation was created. + // Output only. Timestamp for when this evaluation was created. google.protobuf.Timestamp create_time = 4; - // Output only. Metrics of the evaluation. + // Output only. Metrics comparing predictions to ground truth labels. EvaluationMetrics evaluation_metrics = 5; - // Type of the annotation to compute metrics for in the groundtruth and - // annotation labeled dataset. Required for creation. + // Output only. Type of task that the model version being evaluated performs, + // as defined in the + // + // [evaluationJobConfig.inputConfig.annotationType][google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config] + // field of the evaluation job that created this evaluation. AnnotationType annotation_type = 6; - // Output only. Count of items in groundtruth dataset included in this - // evaluation. Will be unset if annotation type is not applicable. + // Output only. The number of items in the ground truth dataset that were used + // for this evaluation. Only populated when the evaulation is for certain + // AnnotationTypes. int64 evaluated_item_count = 7; } +// Configuration details used for calculating evaluation metrics and creating an +// [Evaluation][google.cloud.datalabeling.v1beta1.Evaluation]. message EvaluationConfig { // Vertical specific options for general metrics. oneof vertical_option { + // Only specify this field if the related model performs image object + // detection (`IMAGE_BOUNDING_BOX_ANNOTATION`). Describes how to evaluate + // bounding boxes. BoundingBoxEvaluationOptions bounding_box_evaluation_options = 1; } } // Options regarding evaluation between bounding boxes. message BoundingBoxEvaluationOptions { - // Minimize IoU required to consider 2 bounding boxes are matched. + // Minimum + // [intersection-over-union + // + // (IOU)](/vision/automl/object-detection/docs/evaluate#intersection-over-union) + // required for 2 bounding boxes to be considered a match. This must be a + // number between 0 and 1. float iou_threshold = 1; } message EvaluationMetrics { - // Common metrics covering most genernal cases. + // Common metrics covering most general cases. oneof metrics { ClassificationMetrics classification_metrics = 1; @@ -78,13 +100,17 @@ message EvaluationMetrics { } } +// Metrics calculated for a classification model. message ClassificationMetrics { - // Precision-recall curve. + // Precision-recall curve based on ground truth labels, predicted labels, and + // scores for the predicted labels. PrCurve pr_curve = 1; + // Confusion matrix of predicted labels vs. ground truth labels. ConfusionMatrix confusion_matrix = 2; } +// Metrics calculated for an image object detection (bounding box) model. message ObjectDetectionMetrics { // Precision-recall curve. PrCurve pr_curve = 1; @@ -92,8 +118,18 @@ message ObjectDetectionMetrics { message PrCurve { message ConfidenceMetricsEntry { - // Threshold used for this entry, for example, IoU threshold for bounding - // box problem, or detection threshold for classification. + // Threshold used for this entry. + // + // For classification tasks, this is a classification threshold: a + // predicted label is categorized as positive or negative (in the context of + // this point on the PR curve) based on whether the label's score meets this + // threshold. + // + // For image object detection (bounding box) tasks, this is the + // [intersection-over-union + // + // (IOU)](/vision/automl/object-detection/docs/evaluate#intersection-over-union) + // threshold for the context of this point on the PR curve. float confidence_threshold = 1; // Recall value. @@ -111,10 +147,7 @@ message PrCurve { // Precision value for entries with label that has highest score. float precision_at1 = 6; - // The harmonic mean of - // [recall_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at1] - // and - // [precision_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at1]. + // The harmonic mean of [recall_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at1]. float f1_score_at1 = 7; // Recall value for entries with label that has highest 5 scores. @@ -123,43 +156,48 @@ message PrCurve { // Precision value for entries with label that has highest 5 scores. float precision_at5 = 9; - // The harmonic mean of - // [recall_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at5] - // and - // [precision_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at5]. + // The harmonic mean of [recall_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at5] and [precision_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at5]. float f1_score_at5 = 10; } - // PR curve against which annotation spec. Could be empty. + // The annotation spec of the label for which the precision-recall curve + // calculated. If this field is empty, that means the precision-recall curve + // is an aggregate curve for all labels. AnnotationSpec annotation_spec = 1; - // Area under precision recall curve. + // Area under the precision-recall curve. Not to be confused with area under + // a receiver operating characteristic (ROC) curve. float area_under_curve = 2; - // entries to draw PR graph. + // Entries that make up the precision-recall graph. Each entry is a "point" on + // the graph drawn for a different `confidence_threshold`. repeated ConfidenceMetricsEntry confidence_metrics_entries = 3; - // mean average prcision of this curve. + // Mean average prcision of this curve. float mean_average_precision = 4; } -// Confusion matrix of the model running the classification. Not applicable -// when label filtering is specified in evaluation option. +// Confusion matrix of the model running the classification. Only applicable +// when the metrics entry aggregates multiple labels. Not applicable when the +// entry is for a single label. message ConfusionMatrix { message ConfusionMatrixEntry { - // The predicted annotation spec. + // The annotation spec of a predicted label. AnnotationSpec annotation_spec = 1; - // Number of items being predicted as this label. + // Number of items predicted to have this label. (The ground truth label for + // these items is the `Row.annotationSpec` of this entry's parent.) int32 item_count = 2; } - // A row in the confusion matrix. + // A row in the confusion matrix. Each entry in this row has the same + // ground truth label. message Row { - // the original annotation spec of this row. + // The annotation spec of the ground truth label for this row. AnnotationSpec annotation_spec = 1; - // Info describing predicted label distribution. + // A list of the confusion matrix entries. One entry for each possible + // predicted label. repeated ConfusionMatrixEntry entries = 2; } diff --git a/google/cloud/datalabeling/v1beta1/evaluation_job.proto b/google/cloud/datalabeling/v1beta1/evaluation_job.proto index ad6424643..49270feea 100644 --- a/google/cloud/datalabeling/v1beta1/evaluation_job.proto +++ b/google/cloud/datalabeling/v1beta1/evaluation_job.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package google.cloud.datalabeling.v1beta1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/datalabeling/v1beta1/dataset.proto"; import "google/cloud/datalabeling/v1beta1/evaluation.proto"; import "google/cloud/datalabeling/v1beta1/human_annotation_config.proto"; @@ -28,124 +29,244 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1 option java_multiple_files = true; option java_package = "com.google.cloud.datalabeling.v1beta1"; -// Defines an evaluation job that is triggered periodically to generate -// evaluations. +// Defines an evaluation job that runs periodically to generate +// [Evaluations][google.cloud.datalabeling.v1beta1.Evaluation]. [Creating an evaluation +// job](/ml-engine/docs/continuous-evaluation/create-job) is the starting point +// for using continuous evaluation. message EvaluationJob { + option (google.api.resource) = { + type: "datalabeling.googleapis.com/EvaluationJob" + pattern: "projects/{project}/evaluationJobs/{evaluation_job}" + }; + // State of the job. enum State { STATE_UNSPECIFIED = 0; + // The job is scheduled to run at the [configured interval][google.cloud.datalabeling.v1beta1.EvaluationJob.schedule]. You + // can [pause][google.cloud.datalabeling.v1beta1.DataLabelingService.PauseEvaluationJob] or + // [delete][google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteEvaluationJob] the job. + // + // When the job is in this state, it samples prediction input and output + // from your model version into your BigQuery table as predictions occur. SCHEDULED = 1; + // The job is currently running. When the job runs, Data Labeling Service + // does several things: + // + // 1. If you have configured your job to use Data Labeling Service for + // ground truth labeling, the service creates a + // [Dataset][google.cloud.datalabeling.v1beta1.Dataset] and a labeling task for all data sampled + // since the last time the job ran. Human labelers provide ground truth + // labels for your data. Human labeling may take hours, or even days, + // depending on how much data has been sampled. The job remains in the + // `RUNNING` state during this time, and it can even be running multiple + // times in parallel if it gets triggered again (for example 24 hours + // later) before the earlier run has completed. When human labelers have + // finished labeling the data, the next step occurs. + //

          + // If you have configured your job to provide your own ground truth + // labels, Data Labeling Service still creates a [Dataset][google.cloud.datalabeling.v1beta1.Dataset] for newly + // sampled data, but it expects that you have already added ground truth + // labels to the BigQuery table by this time. The next step occurs + // immediately. + // + // 2. Data Labeling Service creates an [Evaluation][google.cloud.datalabeling.v1beta1.Evaluation] by comparing your + // model version's predictions with the ground truth labels. + // + // If the job remains in this state for a long time, it continues to sample + // prediction data into your BigQuery table and will run again at the next + // interval, even if it causes the job to run multiple times in parallel. RUNNING = 2; + // The job is not sampling prediction input and output into your BigQuery + // table and it will not run according to its schedule. You can + // [resume][google.cloud.datalabeling.v1beta1.DataLabelingService.ResumeEvaluationJob] the job. PAUSED = 3; + // The job has this state right before it is deleted. STOPPED = 4; } - // Format: 'projects/{project_id}/evaluationJobs/{evaluation_job_id}' + // Output only. After you create a job, Data Labeling Service assigns a name + // to the job with the following format: + // + // "projects/{project_id}/evaluationJobs/{evaluation_job_id}" string name = 1; - // Description of the job. The description can be up to - // 25000 characters long. + // Required. Description of the job. The description can be up to 25,000 + // characters long. string description = 2; + // Output only. Describes the current state of the job. State state = 3; - // Describes the schedule on which the job will be executed. Minimum schedule - // unit is 1 day. + // Required. Describes the interval at which the job runs. This interval must + // be at least 1 day, and it is rounded to the nearest day. For example, if + // you specify a 50-hour interval, the job runs every 2 days. // - // The schedule can be either of the following types: - // * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview) - // * English-like + // You can provide the schedule in + // [crontab format](/scheduler/docs/configuring/cron-job-schedules) or in an + // [English-like + // format](/appengine/docs/standard/python/config/cronref#schedule_format). // - // [schedule](https: - // //cloud.google.com/scheduler/docs/configuring/cron-job-schedules) + // Regardless of what you specify, the job will run at 10:00 AM UTC. Only the + // interval from this schedule is used, not the specific time of day. string schedule = 4; - // The versioned model that is being evaluated here. - // Only one job is allowed for each model name. - // Format: 'projects/*/models/*/versions/*' + // Required. The [AI Platform Prediction model + // version](/ml-engine/docs/prediction-overview) to be evaluated. Prediction + // input and output is sampled from this model version. When creating an + // evaluation job, specify the model version in the following format: + // + // "projects/{project_id}/models/{model_name}/versions/{version_name}" + // + // There can only be one evaluation job per model version. string model_version = 5; - // Detailed config for running this eval job. + // Required. Configuration details for the evaluation job. EvaluationJobConfig evaluation_job_config = 6; - // Name of the AnnotationSpecSet. + // Required. Name of the [AnnotationSpecSet][google.cloud.datalabeling.v1beta1.AnnotationSpecSet] describing all the + // labels that your machine learning model outputs. You must create this + // resource before you create an evaluation job and provide its name in the + // following format: + // + // "projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}" string annotation_spec_set = 7; - // If a human annotation should be requested when some data don't have ground - // truth. + // Required. Whether you want Data Labeling Service to provide ground truth + // labels for prediction input. If you want the service to assign human + // labelers to annotate your data, set this to `true`. If you want to provide + // your own ground truth labels in the evaluation job's BigQuery table, set + // this to `false`. bool label_missing_ground_truth = 8; - // Output only. Any attempts with errors happening in evaluation job runs each - // time will be recorded here incrementally. + // Output only. Every time the evaluation job runs and an error occurs, the + // failed attempt is appended to this array. repeated Attempt attempts = 9; - // Timestamp when this evaluation job was created. + // Output only. Timestamp of when this evaluation job was created. google.protobuf.Timestamp create_time = 10; } +// Configures specific details of how a continuous evaluation job works. Provide +// this configuration when you create an EvaluationJob. message EvaluationJobConfig { - // config specific to different supported human annotation use cases. + // Required. Details for how you want human reviewers to provide ground truth + // labels. oneof human_annotation_request_config { + // Specify this field if your model version performs image classification or + // general classification. + // + // `annotationSpecSet` in this configuration must match + // [EvaluationJob.annotationSpecSet][google.cloud.datalabeling.v1beta1.EvaluationJob.annotation_spec_set]. + // `allowMultiLabel` in this configuration must match + // `classificationMetadata.isMultiLabel` in [input_config][google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config]. ImageClassificationConfig image_classification_config = 4; + // Specify this field if your model version performs image object detection + // (bounding box detection). + // + // `annotationSpecSet` in this configuration must match + // [EvaluationJob.annotationSpecSet][google.cloud.datalabeling.v1beta1.EvaluationJob.annotation_spec_set]. BoundingPolyConfig bounding_poly_config = 5; - VideoClassificationConfig video_classification_config = 6; - - ObjectDetectionConfig object_detection_config = 7; - + // Specify this field if your model version performs text classification. + // + // `annotationSpecSet` in this configuration must match + // [EvaluationJob.annotationSpecSet][google.cloud.datalabeling.v1beta1.EvaluationJob.annotation_spec_set]. + // `allowMultiLabel` in this configuration must match + // `classificationMetadata.isMultiLabel` in [input_config][google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config]. TextClassificationConfig text_classification_config = 8; - - ObjectTrackingConfig object_tracking_config = 12; } - // Input config for data, gcs_source in the config will be the root path for - // data. Data should be organzied chronically under that path. + // Rquired. Details for the sampled prediction input. Within this + // configuration, there are requirements for several fields: + // + // * `dataType` must be one of `IMAGE`, `TEXT`, or `GENERAL_DATA`. + // * `annotationType` must be one of `IMAGE_CLASSIFICATION_ANNOTATION`, + // `TEXT_CLASSIFICATION_ANNOTATION`, `GENERAL_CLASSIFICATION_ANNOTATION`, + // or `IMAGE_BOUNDING_BOX_ANNOTATION` (image object detection). + // * If your machine learning model performs classification, you must specify + // `classificationMetadata.isMultiLabel`. + // * You must specify `bigquerySource` (not `gcsSource`). InputConfig input_config = 1; - // Config used to create evaluation. + // Required. Details for calculating evaluation metrics and creating + // [Evaulations][google.cloud.datalabeling.v1beta1.Evaluation]. If your model version performs image object + // detection, you must specify the `boundingBoxEvaluationOptions` field within + // this configuration. Otherwise, provide an empty object for this + // configuration. EvaluationConfig evaluation_config = 2; + // Optional. Details for human annotation of your data. If you set + // [labelMissingGroundTruth][google.cloud.datalabeling.v1beta1.EvaluationJob.label_missing_ground_truth] to + // `true` for this evaluation job, then you must specify this field. If you + // plan to provide your own ground truth labels, then omit this field. + // + // Note that you must create an [Instruction][google.cloud.datalabeling.v1beta1.Instruction] resource before you can + // specify this field. Provide the name of the instruction resource in the + // `instruction` field within this configuration. HumanAnnotationConfig human_annotation_config = 3; - // Mappings between reserved keys for bigquery import and customized tensor - // names. Key is the reserved key, value is tensor name in the bigquery table. - // Different annotation type has different required key mapping. See user - // manual for more details: + // Required. Prediction keys that tell Data Labeling Service where to find the + // data for evaluation in your BigQuery table. When the service samples + // prediction input and output from your model version and saves it to + // BigQuery, the data gets stored as JSON strings in the BigQuery table. These + // keys tell Data Labeling Service how to parse the JSON. + // + // You can provide the following entries in this field: + // + // * `data_json_key`: the data key for prediction input. You must provide + // either this key or `reference_json_key`. + // * `reference_json_key`: the data reference key for prediction input. You + // must provide either this key or `data_json_key`. + // * `label_json_key`: the label key for prediction output. Required. + // * `label_score_json_key`: the score key for prediction output. Required. + // * `bounding_box_json_key`: the bounding box key for prediction output. + // Required if your model version perform image object detection. // - // https: - // //docs.google.com/document/d/1bg1meMIBGY - // // 9I5QEoFoHSX6u9LsZQYBSmPt6E9SxqHZc/edit#heading=h.tfyjhxhvsqem + // Learn [how to configure prediction + // keys](/ml-engine/docs/continuous-evaluation/create-job#prediction-keys). map bigquery_import_keys = 9; - // Max number of examples to collect in each period. + // Required. The maximum number of predictions to sample and save to BigQuery + // during each [evaluation interval][google.cloud.datalabeling.v1beta1.EvaluationJob.schedule]. This limit + // overrides `example_sample_percentage`: even if the service has not sampled + // enough predictions to fulfill `example_sample_perecentage` during an + // interval, it stops sampling predictions when it meets this limit. int32 example_count = 10; - // Percentage of examples to collect in each period. 0.1 means 10% of total - // examples will be collected, and 0.0 means no collection. + // Required. Fraction of predictions to sample and save to BigQuery during + // each [evaluation interval][google.cloud.datalabeling.v1beta1.EvaluationJob.schedule]. For example, 0.1 means + // 10% of predictions served by your model version get saved to BigQuery. double example_sample_percentage = 11; - // Alert config for the evaluation job. The alert will be triggered when its - // criteria is met. + // Optional. Configuration details for evaluation job alerts. Specify this + // field if you want to receive email alerts if the evaluation job finds that + // your predictions have low mean average precision during a run. EvaluationJobAlertConfig evaluation_job_alert_config = 13; } +// Provides details for how an evaluation job sends email alerts based on the +// results of a run. message EvaluationJobAlertConfig { - // Required. Email of the user who will be receiving the alert. + // Required. An email address to send alerts to. string email = 1; - // If a single evaluation run's aggregate mean average precision is - // lower than this threshold, the alert will be triggered. + // Required. A number between 0 and 1 that describes a minimum mean average + // precision threshold. When the evaluation job runs, if it calculates that + // your model version's predictions from the recent interval have + // [meanAveragePrecision][google.cloud.datalabeling.v1beta1.PrCurve.mean_average_precision] below this + // threshold, then it sends an alert to your specified email. double min_acceptable_mean_average_precision = 2; } -// Records a failed attempt. +// Records a failed evaluation job run. message Attempt { google.protobuf.Timestamp attempt_time = 1; + // Details of errors that occurred. repeated google.rpc.Status partial_failures = 2; } diff --git a/google/cloud/datalabeling/v1beta1/human_annotation_config.proto b/google/cloud/datalabeling/v1beta1/human_annotation_config.proto index d392aca70..5658bb9b8 100644 --- a/google/cloud/datalabeling/v1beta1/human_annotation_config.proto +++ b/google/cloud/datalabeling/v1beta1/human_annotation_config.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package google.cloud.datalabeling.v1beta1; import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/duration.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling"; @@ -39,45 +40,45 @@ enum StringAggregationType { // Configuration for how human labeling task should be done. message HumanAnnotationConfig { - // Required except for LabelAudio case. Instruction resource name. - string instruction = 1; + // Required. Instruction resource name. + string instruction = 1 [(google.api.field_behavior) = REQUIRED]; // Required. A human-readable name for AnnotatedDataset defined by // users. Maximum of 64 characters // . - string annotated_dataset_display_name = 2; + string annotated_dataset_display_name = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. A human-readable description for AnnotatedDataset. // The description can be up to 10000 characters long. - string annotated_dataset_description = 3; + string annotated_dataset_description = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. A human-readable label used to logically group labeling tasks. // This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`. - string label_group = 4; + string label_group = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Language of this question, as a // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). // Default value is en-US. // Only need to set this when task is language related. For example, French - // text classification or Chinese audio transcription. - string language_code = 5; + // text classification. + string language_code = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. Replication of questions. Each question will be sent to up to // this number of contributors to label. Aggregated answers will be returned. // Default is set to 1. // For image related labeling, valid values are 1, 3, 5. - int32 replica_count = 6; + int32 replica_count = 6 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Maximum duration for contributors to answer a question. Default - // is 1800 seconds. - google.protobuf.Duration question_duration = 7; + // Optional. Maximum duration for contributors to answer a question. Maximum + // is 3600 seconds. Default is 3600 seconds. + google.protobuf.Duration question_duration = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. If you want your own labeling contributors to manage and work on // this labeling request, you can set these contributors here. We will give // them access to the question types in crowdcompute. Note that these // emails must be registered in crowdcompute worker UI: // https://crowd-compute.appspot.com/ - repeated string contributor_emails = 9; + repeated string contributor_emails = 9 [(google.api.field_behavior) = OPTIONAL]; // Email of the user who started the labeling task and should be notified by // email. If empty no notification will be sent. @@ -87,39 +88,39 @@ message HumanAnnotationConfig { // Config for image classification human labeling task. message ImageClassificationConfig { // Required. Annotation spec set resource name. - string annotation_spec_set = 1; + string annotation_spec_set = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. If allow_multi_label is true, contributors are able to choose // multiple labels for one image. - bool allow_multi_label = 2; + bool allow_multi_label = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The type of how to aggregate answers. - StringAggregationType answer_aggregation_type = 3; + StringAggregationType answer_aggregation_type = 3 [(google.api.field_behavior) = OPTIONAL]; } // Config for image bounding poly (and bounding box) human labeling task. message BoundingPolyConfig { // Required. Annotation spec set resource name. - string annotation_spec_set = 1; + string annotation_spec_set = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Instruction message showed on contributors UI. - string instruction_message = 2; + string instruction_message = 2 [(google.api.field_behavior) = OPTIONAL]; } // Config for image polyline human labeling task. message PolylineConfig { // Required. Annotation spec set resource name. - string annotation_spec_set = 1; + string annotation_spec_set = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Instruction message showed on contributors UI. - string instruction_message = 2; + string instruction_message = 2 [(google.api.field_behavior) = OPTIONAL]; } // Config for image segmentation message SegmentationConfig { // Required. Annotation spec set resource name. format: // projects/{project_id}/annotationSpecSets/{annotation_spec_set_id} - string annotation_spec_set = 1; + string annotation_spec_set = 1 [(google.api.field_behavior) = REQUIRED]; // Instruction message showed on labelers UI. string instruction_message = 2; @@ -134,11 +135,11 @@ message VideoClassificationConfig { // Annotation spec set with the setting of allowing multi labels or not. message AnnotationSpecSetConfig { // Required. Annotation spec set resource name. - string annotation_spec_set = 1; + string annotation_spec_set = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. If allow_multi_label is true, contributors are able to // choose multiple labels from one annotation spec set. - bool allow_multi_label = 2; + bool allow_multi_label = 2 [(google.api.field_behavior) = OPTIONAL]; } // Required. The list of annotation spec set configs. @@ -147,10 +148,10 @@ message VideoClassificationConfig { // in each AnnotationSpecSet will be shown in a group to contributors. // Contributors can select one or more (depending on whether to allow multi // label) from each group. - repeated AnnotationSpecSetConfig annotation_spec_set_configs = 1; + repeated AnnotationSpecSetConfig annotation_spec_set_configs = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Option to apply shot detection on the video. - bool apply_shot_detection = 2; + bool apply_shot_detection = 2 [(google.api.field_behavior) = OPTIONAL]; } // Config for video object detection human labeling task. @@ -160,16 +161,16 @@ message VideoClassificationConfig { // extraction frame rate. message ObjectDetectionConfig { // Required. Annotation spec set resource name. - string annotation_spec_set = 1; + string annotation_spec_set = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Number of frames per second to be extracted from the video. - double extraction_frame_rate = 3; + double extraction_frame_rate = 3 [(google.api.field_behavior) = REQUIRED]; } // Config for video object tracking human labeling task. message ObjectTrackingConfig { // Required. Annotation spec set resource name. - string annotation_spec_set = 1; + string annotation_spec_set = 1 [(google.api.field_behavior) = REQUIRED]; } // Config for video event human labeling task. @@ -177,20 +178,20 @@ message EventConfig { // Required. The list of annotation spec set resource name. Similar to video // classification, we support selecting event from multiple AnnotationSpecSet // at the same time. - repeated string annotation_spec_sets = 1; + repeated string annotation_spec_sets = 1 [(google.api.field_behavior) = REQUIRED]; } // Config for text classification human labeling task. message TextClassificationConfig { // Optional. If allow_multi_label is true, contributors are able to choose // multiple labels for one text segment. - bool allow_multi_label = 1; + bool allow_multi_label = 1 [(google.api.field_behavior) = OPTIONAL]; // Required. Annotation spec set resource name. - string annotation_spec_set = 2; + string annotation_spec_set = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Configs for sentiment selection. - SentimentConfig sentiment_config = 3; + SentimentConfig sentiment_config = 3 [(google.api.field_behavior) = OPTIONAL]; } // Config for setting up sentiments. @@ -204,5 +205,5 @@ message SentimentConfig { // Config for text entity extraction human labeling task. message TextEntityExtractionConfig { // Required. Annotation spec set resource name. - string annotation_spec_set = 1; + string annotation_spec_set = 1 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/cloud/datalabeling/v1beta1/instruction.proto b/google/cloud/datalabeling/v1beta1/instruction.proto index 6cb7b50f3..50839614a 100644 --- a/google/cloud/datalabeling/v1beta1/instruction.proto +++ b/google/cloud/datalabeling/v1beta1/instruction.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package google.cloud.datalabeling.v1beta1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/datalabeling/v1beta1/dataset.proto"; import "google/protobuf/timestamp.proto"; @@ -26,12 +27,13 @@ option java_multiple_files = true; option java_package = "com.google.cloud.datalabeling.v1beta1"; // Instruction of how to perform the labeling task for human operators. -// Currently two types of instruction are supported - CSV file and PDF. -// One of the two types instruction must be provided. -// CSV file is only supported for image classification task. Instructions for -// other task should be provided as PDF. -// For image classification, CSV and PDF can be provided at the same time. +// Currently only PDF instruction is supported. message Instruction { + option (google.api.resource) = { + type: "datalabeling.googleapis.com/Instruction" + pattern: "projects/{project}/instructions/{instruction}" + }; + // Output only. Instruction resource name, format: // projects/{project_id}/instructions/{instruction_id} string name = 1; @@ -52,15 +54,14 @@ message Instruction { // Required. The data type of this instruction. DataType data_type = 6; - // One of CSV or PDF instruction is required. + // Deprecated: this instruction format is not supported any more. // Instruction from a CSV file, such as for classification task. // The CSV file should have exact two columns, in the following format: // // * The first column is labeled data, such as an image reference, text. // * The second column is comma separated labels associated with data. - CsvInstruction csv_instruction = 7; + CsvInstruction csv_instruction = 7 [deprecated = true]; - // One of CSV or PDF instruction is required. // Instruction from a PDF document. The PDF should be in a Cloud Storage // bucket. PdfInstruction pdf_instruction = 9; @@ -70,6 +71,7 @@ message Instruction { repeated string blocking_resources = 10; } +// Deprecated: this instruction format is not supported any more. // Instruction from a CSV file. message CsvInstruction { // CSV file for the instruction. Only gcs path is allowed. diff --git a/google/cloud/datalabeling/v1beta1/operations.proto b/google/cloud/datalabeling/v1beta1/operations.proto index 80371d0e2..7f0692443 100644 --- a/google/cloud/datalabeling/v1beta1/operations.proto +++ b/google/cloud/datalabeling/v1beta1/operations.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package google.cloud.datalabeling.v1beta1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/datalabeling/v1beta1/dataset.proto"; import "google/cloud/datalabeling/v1beta1/human_annotation_config.proto"; import "google/protobuf/timestamp.proto"; @@ -42,7 +43,7 @@ message ImportDataOperationResponse { // Response used for ExportDataset longrunning operation. message ExportDataOperationResponse { // Ouptut only. The name of dataset. - // "projects/*/datasets/*/Datasets/*" + // "projects/*/datasets/*" string dataset = 1; // Output only. Total number of examples requested to export @@ -60,7 +61,7 @@ message ExportDataOperationResponse { // Metadata of an ImportData operation. message ImportDataOperationMetadata { - // Ouptut only. The name of imported dataset. + // Output only. The name of imported dataset. // "projects/*/datasets/*" string dataset = 1; @@ -76,7 +77,7 @@ message ImportDataOperationMetadata { // Metadata of an ExportData operation. message ExportDataOperationMetadata { // Output only. The name of dataset to be exported. - // "projects/*/datasets/*/Datasets/*" + // "projects/*/datasets/*" string dataset = 1; // Output only. Partial failures encountered. @@ -89,7 +90,7 @@ message ExportDataOperationMetadata { } // Metadata of a labeling operation, such as LabelImage or LabelVideo. -// Next tag: 18 +// Next tag: 20 message LabelOperationMetadata { // Ouptut only. Details of specific label operation. oneof details { @@ -103,8 +104,7 @@ message LabelOperationMetadata { LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; // Details of label image oriented bounding box operation. - LabelImageOrientedBoundingBoxOperationMetadata - image_oriented_bounding_box_details = 14; + LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; // Details of label image polyline operation. LabelImagePolylineOperationMetadata image_polyline_details = 12; @@ -116,8 +116,7 @@ message LabelOperationMetadata { LabelVideoClassificationOperationMetadata video_classification_details = 5; // Details of label video object detection operation. - LabelVideoObjectDetectionOperationMetadata video_object_detection_details = - 6; + LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; // Details of label video object tracking operation. LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; @@ -129,8 +128,7 @@ message LabelOperationMetadata { LabelTextClassificationOperationMetadata text_classification_details = 9; // Details of label text entity extraction operation. - LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = - 13; + LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; } // Output only. Progress of label operation. Range: [0, 100]. diff --git a/google/cloud/dataproc/artman_dataproc_v1.yaml b/google/cloud/dataproc/artman_dataproc_v1.yaml index 211938f79..38f3d9091 100644 --- a/google/cloud/dataproc/artman_dataproc_v1.yaml +++ b/google/cloud/dataproc/artman_dataproc_v1.yaml @@ -3,11 +3,12 @@ common: api_version: v1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1 service_yaml: v1/dataproc.yaml gapic_yaml: v1/dataproc_gapic.yaml + proto_package: google.cloud.dataproc.v1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/dataproc/artman_dataproc_v1beta2.yaml b/google/cloud/dataproc/artman_dataproc_v1beta2.yaml index e56bd8e9c..667fd85f5 100644 --- a/google/cloud/dataproc/artman_dataproc_v1beta2.yaml +++ b/google/cloud/dataproc/artman_dataproc_v1beta2.yaml @@ -8,6 +8,7 @@ common: - v1beta2 service_yaml: v1beta2/dataproc.yaml gapic_yaml: v1beta2/dataproc_gapic.yaml + proto_package: google.cloud.dataproc.v1beta2 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/dataproc/v1/BUILD.bazel b/google/cloud/dataproc/v1/BUILD.bazel index 391aaf6f2..33b9517ab 100644 --- a/google/cloud/dataproc/v1/BUILD.bazel +++ b/google/cloud/dataproc/v1/BUILD.bazel @@ -1,14 +1,18 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( name = "dataproc_proto", srcs = [ + "autoscaling_policies.proto", "clusters.proto", "jobs.proto", "operations.proto", @@ -17,6 +21,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/longrunning:operations_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:empty_proto", @@ -27,7 +34,10 @@ proto_library( proto_library_with_info( name = "dataproc_proto_with_info", - deps = [":dataproc_proto"], + deps = [ + ":dataproc_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -35,18 +45,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "dataproc_java_proto", deps = [":dataproc_proto"], @@ -55,53 +60,44 @@ java_proto_library( java_grpc_library( name = "dataproc_java_grpc", srcs = [":dataproc_proto"], - deps = [":dataproc_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "dataproc_resource_name_java_proto", - gapic_yaml = "dataproc_gapic.yaml", - deps = [":dataproc_proto"], + deps = [":dataproc_java_proto"], ) java_gapic_library( name = "dataproc_java_gapic", src = ":dataproc_proto_with_info", gapic_yaml = "dataproc_gapic.yaml", - service_yaml = "dataproc.yaml", - test_deps = [":dataproc_java_grpc"], + package = "google.cloud.dataproc.v1", + service_yaml = "dataproc_v1.yaml", + test_deps = [ + ":dataproc_java_grpc", + ], deps = [ ":dataproc_java_proto", - ":dataproc_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":dataproc_java_gapic_test", +java_gapic_test( + name = "dataproc_java_gapic_test_suite", + test_classes = [ + # Add AutoscalingPolicyService to gapic yaml + "com.google.cloud.dataproc.v1.AutoscalingPolicyServiceClientTest", + "com.google.cloud.dataproc.v1.ClusterControllerClientTest", + "com.google.cloud.dataproc.v1.JobControllerClientTest", + "com.google.cloud.dataproc.v1.WorkflowTemplateServiceClientTest", ], -) for test_name in [ - "com.google.cloud.dataproc.v1.ClusterControllerClientTest", - "com.google.cloud.dataproc.v1.JobControllerClientTest", - "com.google.cloud.dataproc.v1.WorkflowTemplateServiceClientTest", -]] + runtime_deps = [":dataproc_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-dataproc-v1-java", - client_deps = [":dataproc_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":dataproc_java_gapic_test"], - grpc_deps = [":dataproc_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":dataproc_java_gapic", + ":dataproc_java_grpc", ":dataproc_java_proto", ":dataproc_proto", - ":dataproc_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -109,10 +105,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -128,15 +124,17 @@ go_proto_library( go_gapic_library( name = "dataproc_go_gapic", - src = ":dataproc_proto_with_info", - gapic_yaml = "dataproc_gapic.yaml", - importpath = "cloud.google.com/go/dataproc/apiv1", - service_yaml = "dataproc.yaml", + srcs = [":dataproc_proto_with_info"], + grpc_service_config = "dataproc_grpc_service_config.json", + importpath = "cloud.google.com/go/dataproc/apiv1;dataproc", + service_yaml = "dataproc_v1.yaml", deps = [ ":dataproc_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", ], ) @@ -147,13 +145,237 @@ go_test( importpath = "cloud.google.com/go/dataproc/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-dataproc-v1-go", deps = [ ":dataproc_go_gapic", - ":dataproc_go_gapic_srcjar-smoke-test.srcjar", ":dataproc_go_gapic_srcjar-test.srcjar", ":dataproc_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "dataproc_moved_proto", + srcs = [":dataproc_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "dataproc_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":dataproc_moved_proto"], +) + +py_grpc_library( + name = "dataproc_py_grpc", + srcs = [":dataproc_moved_proto"], + deps = [":dataproc_py_proto"], +) + +py_gapic_library( + name = "dataproc_py_gapic", + src = ":dataproc_proto_with_info", + gapic_yaml = "dataproc_gapic.yaml", + package = "google.cloud.dataproc.v1", + service_yaml = "dataproc_v1.yaml", + deps = [ + ":dataproc_py_grpc", + ":dataproc_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "dataproc-v1-py", + deps = [ + ":dataproc_py_gapic", + ":dataproc_py_grpc", + ":dataproc_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "dataproc_php_proto", + deps = [":dataproc_proto"], +) + +php_grpc_library( + name = "dataproc_php_grpc", + srcs = [":dataproc_proto"], + deps = [":dataproc_php_proto"], +) + +php_gapic_library( + name = "dataproc_php_gapic", + src = ":dataproc_proto_with_info", + gapic_yaml = "dataproc_gapic.yaml", + package = "google.cloud.dataproc.v1", + service_yaml = "dataproc_v1.yaml", + deps = [ + ":dataproc_php_grpc", + ":dataproc_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-dataproc-v1-php", + deps = [ + ":dataproc_php_gapic", + ":dataproc_php_grpc", + ":dataproc_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "dataproc_nodejs_gapic", + src = ":dataproc_proto_with_info", + gapic_yaml = "dataproc_gapic.yaml", + package = "google.cloud.dataproc.v1", + service_yaml = "dataproc_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "dataproc-v1-nodejs", + deps = [ + ":dataproc_nodejs_gapic", + ":dataproc_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "dataproc_ruby_proto", + deps = [":dataproc_proto"], +) + +ruby_grpc_library( + name = "dataproc_ruby_grpc", + srcs = [":dataproc_proto"], + deps = [":dataproc_ruby_proto"], +) + +ruby_gapic_library( + name = "dataproc_ruby_gapic", + src = ":dataproc_proto_with_info", + gapic_yaml = "dataproc_gapic.yaml", + package = "google.cloud.dataproc.v1", + service_yaml = "dataproc_v1.yaml", + deps = [ + ":dataproc_ruby_grpc", + ":dataproc_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-dataproc-v1-ruby", + deps = [ + ":dataproc_ruby_gapic", + ":dataproc_ruby_grpc", + ":dataproc_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "dataproc_csharp_proto", + deps = [":dataproc_proto"], +) + +csharp_grpc_library( + name = "dataproc_csharp_grpc", + srcs = [":dataproc_proto"], + deps = [":dataproc_csharp_proto"], +) + +csharp_gapic_library( + name = "dataproc_csharp_gapic", + src = ":dataproc_proto_with_info", + gapic_yaml = "dataproc_gapic.yaml", + package = "google.cloud.dataproc.v1", + service_yaml = "dataproc_v1.yaml", + deps = [ + ":dataproc_csharp_grpc", + ":dataproc_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-dataproc-v1-csharp", + deps = [ + ":dataproc_csharp_gapic", + ":dataproc_csharp_grpc", + ":dataproc_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/dataproc/v1/autoscaling_policies.proto b/google/cloud/dataproc/v1/autoscaling_policies.proto new file mode 100644 index 000000000..4ce5868d0 --- /dev/null +++ b/google/cloud/dataproc/v1/autoscaling_policies.proto @@ -0,0 +1,349 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataproc.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc"; +option java_multiple_files = true; +option java_outer_classname = "AutoscalingPoliciesProto"; +option java_package = "com.google.cloud.dataproc.v1"; +option (google.api.resource_definition) = { + type: "dataproc.googleapis.com/Region" + pattern: "projects/{project}/regions/{region}" +}; + +// The API interface for managing autoscaling policies in the +// Dataproc API. +service AutoscalingPolicyService { + option (google.api.default_host) = "dataproc.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates new autoscaling policy. + rpc CreateAutoscalingPolicy(CreateAutoscalingPolicyRequest) returns (AutoscalingPolicy) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/autoscalingPolicies" + body: "policy" + additional_bindings { + post: "/v1/{parent=projects/*/regions/*}/autoscalingPolicies" + body: "policy" + } + }; + option (google.api.method_signature) = "parent,policy"; + } + + // Updates (replaces) autoscaling policy. + // + // Disabled check for update_mask, because all updates will be full + // replacements. + rpc UpdateAutoscalingPolicy(UpdateAutoscalingPolicyRequest) returns (AutoscalingPolicy) { + option (google.api.http) = { + put: "/v1/{policy.name=projects/*/locations/*/autoscalingPolicies/*}" + body: "policy" + additional_bindings { + put: "/v1/{policy.name=projects/*/regions/*/autoscalingPolicies/*}" + body: "policy" + } + }; + option (google.api.method_signature) = "policy"; + } + + // Retrieves autoscaling policy. + rpc GetAutoscalingPolicy(GetAutoscalingPolicyRequest) returns (AutoscalingPolicy) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/autoscalingPolicies/*}" + additional_bindings { + get: "/v1/{name=projects/*/regions/*/autoscalingPolicies/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists autoscaling policies in the project. + rpc ListAutoscalingPolicies(ListAutoscalingPoliciesRequest) returns (ListAutoscalingPoliciesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/autoscalingPolicies" + additional_bindings { + get: "/v1/{parent=projects/*/regions/*}/autoscalingPolicies" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes an autoscaling policy. It is an error to delete an autoscaling + // policy that is in use by one or more clusters. + rpc DeleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/autoscalingPolicies/*}" + additional_bindings { + delete: "/v1/{name=projects/*/regions/*/autoscalingPolicies/*}" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// Describes an autoscaling policy for Dataproc cluster autoscaler. +message AutoscalingPolicy { + option (google.api.resource) = { + type: "dataproc.googleapis.com/AutoscalingPolicy" + pattern: "projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}" + pattern: "projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy}" + }; + + // Required. The policy id. + // + // The id must contain only letters (a-z, A-Z), numbers (0-9), + // underscores (_), and hyphens (-). Cannot begin or end with underscore + // or hyphen. Must consist of between 3 and 50 characters. + // + string id = 1; + + // Output only. The "resource name" of the autoscaling policy, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.autoscalingPolicies`, the resource name of the + // policy has the following format: + // `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` + // + // * For `projects.locations.autoscalingPolicies`, the resource name of the + // policy has the following format: + // `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` + string name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Autoscaling algorithm for policy. + oneof algorithm { + BasicAutoscalingAlgorithm basic_algorithm = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. Describes how the autoscaler will operate for primary workers. + InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Describes how the autoscaler will operate for secondary workers. + InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Basic algorithm for autoscaling. +message BasicAutoscalingAlgorithm { + // Required. YARN autoscaling configuration. + BasicYarnAutoscalingConfig yarn_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Duration between scaling events. A scaling period starts after + // the update operation from the previous event has completed. + // + // Bounds: [2m, 1d]. Default: 2m. + google.protobuf.Duration cooldown_period = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Basic autoscaling configurations for YARN. +message BasicYarnAutoscalingConfig { + // Required. Timeout for YARN graceful decommissioning of Node Managers. + // Specifies the duration to wait for jobs to complete before forcefully + // removing workers (and potentially interrupting jobs). Only applicable to + // downscaling operations. + // + // Bounds: [0s, 1d]. + google.protobuf.Duration graceful_decommission_timeout = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Fraction of average pending memory in the last cooldown period + // for which to add workers. A scale-up factor of 1.0 will result in scaling + // up so that there is no pending memory remaining after the update (more + // aggressive scaling). A scale-up factor closer to 0 will result in a smaller + // magnitude of scaling up (less aggressive scaling). + // + // Bounds: [0.0, 1.0]. + double scale_up_factor = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Fraction of average pending memory in the last cooldown period + // for which to remove workers. A scale-down factor of 1 will result in + // scaling down so that there is no available memory remaining after the + // update (more aggressive scaling). A scale-down factor of 0 disables + // removing workers, which can be beneficial for autoscaling a single job. + // + // Bounds: [0.0, 1.0]. + double scale_down_factor = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Minimum scale-up threshold as a fraction of total cluster size + // before scaling occurs. For example, in a 20-worker cluster, a threshold of + // 0.1 means the autoscaler must recommend at least a 2-worker scale-up for + // the cluster to scale. A threshold of 0 means the autoscaler will scale up + // on any recommended change. + // + // Bounds: [0.0, 1.0]. Default: 0.0. + double scale_up_min_worker_fraction = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum scale-down threshold as a fraction of total cluster size + // before scaling occurs. For example, in a 20-worker cluster, a threshold of + // 0.1 means the autoscaler must recommend at least a 2 worker scale-down for + // the cluster to scale. A threshold of 0 means the autoscaler will scale down + // on any recommended change. + // + // Bounds: [0.0, 1.0]. Default: 0.0. + double scale_down_min_worker_fraction = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for the size bounds of an instance group, including its +// proportional size to other groups. +message InstanceGroupAutoscalingPolicyConfig { + // Optional. Minimum number of instances for this group. + // + // Primary workers - Bounds: [2, max_instances]. Default: 2. + // Secondary workers - Bounds: [0, max_instances]. Default: 0. + int32 min_instances = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Maximum number of instances for this group. Required for primary + // workers. Note that by default, clusters will not use secondary workers. + // Required for secondary workers if the minimum secondary instances is set. + // + // Primary workers - Bounds: [min_instances, ). + // Secondary workers - Bounds: [min_instances, ). Default: 0. + int32 max_instances = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Weight for the instance group, which is used to determine the + // fraction of total workers in the cluster from this instance group. + // For example, if primary workers have weight 2, and secondary workers have + // weight 1, the cluster will have approximately 2 primary workers for each + // secondary worker. + // + // The cluster may not reach the specified balance if constrained + // by min/max bounds or other autoscaling settings. For example, if + // `max_instances` for secondary workers is 0, then only primary workers will + // be added. The cluster can also be out of balance when created. + // + // If weight is not set on any instance group, the cluster will default to + // equal weight for all groups: the cluster will attempt to maintain an equal + // number of workers in each group within the configured size bounds for each + // group. If weight is set for one group only, the cluster will default to + // zero weight on the unset group. For example if weight is set only on + // primary workers, the cluster will use primary workers only and no + // secondary workers. + int32 weight = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to create an autoscaling policy. +message CreateAutoscalingPolicyRequest { + // Required. The "resource name" of the region or location, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.autoscalingPolicies.create`, the resource name + // of the region has the following format: + // `projects/{project_id}/regions/{region}` + // + // * For `projects.locations.autoscalingPolicies.create`, the resource name + // of the location has the following format: + // `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dataproc.googleapis.com/AutoscalingPolicy" + } + ]; + + // Required. The autoscaling policy to create. + AutoscalingPolicy policy = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A request to fetch an autoscaling policy. +message GetAutoscalingPolicyRequest { + // Required. The "resource name" of the autoscaling policy, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.autoscalingPolicies.get`, the resource name + // of the policy has the following format: + // `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` + // + // * For `projects.locations.autoscalingPolicies.get`, the resource name + // of the policy has the following format: + // `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataproc.googleapis.com/AutoscalingPolicy" + } + ]; +} + +// A request to update an autoscaling policy. +message UpdateAutoscalingPolicyRequest { + // Required. The updated autoscaling policy. + AutoscalingPolicy policy = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// A request to delete an autoscaling policy. +// +// Autoscaling policies in use by one or more clusters will not be deleted. +message DeleteAutoscalingPolicyRequest { + // Required. The "resource name" of the autoscaling policy, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.autoscalingPolicies.delete`, the resource name + // of the policy has the following format: + // `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` + // + // * For `projects.locations.autoscalingPolicies.delete`, the resource name + // of the policy has the following format: + // `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataproc.googleapis.com/AutoscalingPolicy" + } + ]; +} + +// A request to list autoscaling policies in a project. +message ListAutoscalingPoliciesRequest { + // Required. The "resource name" of the region or location, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.autoscalingPolicies.list`, the resource name + // of the region has the following format: + // `projects/{project_id}/regions/{region}` + // + // * For `projects.locations.autoscalingPolicies.list`, the resource name + // of the location has the following format: + // `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dataproc.googleapis.com/AutoscalingPolicy" + } + ]; + + // Optional. The maximum number of results to return in each response. + // Must be less than or equal to 1000. Defaults to 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page token, returned by a previous call, to request the + // next page of results. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response to a request to list autoscaling policies in a project. +message ListAutoscalingPoliciesResponse { + // Output only. Autoscaling policies list. + repeated AutoscalingPolicy policies = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This token is included in the response if there are more + // results to fetch. + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/dataproc/v1/clusters.proto b/google/cloud/dataproc/v1/clusters.proto index ab2cc2d02..fbaf9391e 100644 --- a/google/cloud/dataproc/v1/clusters.proto +++ b/google/cloud/dataproc/v1/clusters.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dataproc.v1; import "google/api/annotations.proto"; -import "google/cloud/dataproc/v1/operations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/cloud/dataproc/v1/shared.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; @@ -33,27 +33,51 @@ option java_package = "com.google.cloud.dataproc.v1"; // The ClusterControllerService provides methods to manage clusters // of Compute Engine instances. service ClusterController { - // Creates a cluster in a project. + option (google.api.default_host) = "dataproc.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a cluster in a project. The returned + // [Operation.metadata][google.longrunning.Operation.metadata] will be + // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). rpc CreateCluster(CreateClusterRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/projects/{project_id}/regions/{region}/clusters" body: "cluster" }; + option (google.api.method_signature) = "project_id,region,cluster"; + option (google.longrunning.operation_info) = { + response_type: "Cluster" + metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata" + }; } - // Updates a cluster in a project. + // Updates a cluster in a project. The returned + // [Operation.metadata][google.longrunning.Operation.metadata] will be + // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). rpc UpdateCluster(UpdateClusterRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}" body: "cluster" }; + option (google.api.method_signature) = "project_id,region,cluster_name,cluster,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Cluster" + metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata" + }; } - // Deletes a cluster in a project. + // Deletes a cluster in a project. The returned + // [Operation.metadata][google.longrunning.Operation.metadata] will be + // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). rpc DeleteCluster(DeleteClusterRequest) returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}" }; + option (google.api.method_signature) = "project_id,region,cluster_name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata" + }; } // Gets the resource representation for a cluster in a project. @@ -61,23 +85,35 @@ service ClusterController { option (google.api.http) = { get: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}" }; + option (google.api.method_signature) = "project_id,region,cluster_name"; } - // Lists all regions/{region}/clusters in a project. + // Lists all regions/{region}/clusters in a project alphabetically. rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { option (google.api.http) = { get: "/v1/projects/{project_id}/regions/{region}/clusters" }; + option (google.api.method_signature) = "project_id,region"; + option (google.api.method_signature) = "project_id,region,filter"; } - // Gets cluster diagnostic information. - // After the operation completes, the Operation.response field - // contains `DiagnoseClusterOutputLocation`. + // Gets cluster diagnostic information. The returned + // [Operation.metadata][google.longrunning.Operation.metadata] will be + // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). + // After the operation completes, + // [Operation.response][google.longrunning.Operation.response] + // contains + // [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). rpc DiagnoseCluster(DiagnoseClusterRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:diagnose" body: "*" }; + option (google.api.method_signature) = "project_id,region,cluster_name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DiagnoseClusterResults" + }; } } @@ -85,15 +121,15 @@ service ClusterController { // a cluster of Compute Engine instances. message Cluster { // Required. The Google Cloud Platform project ID that the cluster belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The cluster name. Cluster names within a project must be // unique. Names of deleted clusters can be reused. - string cluster_name = 2; + string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The cluster config. Note that Cloud Dataproc may set + // Required. The cluster config. Note that Dataproc may set // default values, and values may change when clusters are updated. - ClusterConfig config = 3; + ClusterConfig config = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. The labels to associate with this cluster. // Label **keys** must contain 1 to 63 characters, and must conform to @@ -102,56 +138,56 @@ message Cluster { // characters, and must conform to [RFC // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be // associated with a cluster. - map labels = 8; + map labels = 8 [(google.api.field_behavior) = OPTIONAL]; // Output only. Cluster status. - ClusterStatus status = 4; + ClusterStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The previous cluster status. - repeated ClusterStatus status_history = 7; + repeated ClusterStatus status_history = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc + // Output only. A cluster UUID (Unique Universal Identifier). Dataproc // generates this value when it creates the cluster. - string cluster_uuid = 6; + string cluster_uuid = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Contains cluster daemon metrics such as HDFS and YARN stats. + // Output only. Contains cluster daemon metrics such as HDFS and YARN stats. // // **Beta Feature**: This report is available for testing purposes only. It // may be changed before final release. - ClusterMetrics metrics = 9; + ClusterMetrics metrics = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The cluster config. message ClusterConfig { - // Optional. A Google Cloud Storage bucket used to stage job + // Optional. A Cloud Storage bucket used to stage job // dependencies, config files, and job driver console output. // If you do not specify a staging bucket, Cloud // Dataproc will determine a Cloud Storage location (US, - // ASIA, or EU) for your cluster's staging bucket according to the Google + // ASIA, or EU) for your cluster's staging bucket according to the // Compute Engine zone where your cluster is deployed, and then create // and manage this project-level, per-location bucket (see - // [Cloud Dataproc staging - // bucket](/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - string config_bucket = 1; + // [Dataproc staging + // bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). + string config_bucket = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The shared Compute Engine config settings for // all instances in a cluster. - GceClusterConfig gce_cluster_config = 8; + GceClusterConfig gce_cluster_config = 8 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine config settings for // the master instance in a cluster. - InstanceGroupConfig master_config = 9; + InstanceGroupConfig master_config = 9 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine config settings for // worker instances in a cluster. - InstanceGroupConfig worker_config = 10; + InstanceGroupConfig worker_config = 10 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine config settings for // additional worker instances in a cluster. - InstanceGroupConfig secondary_worker_config = 12; + InstanceGroupConfig secondary_worker_config = 12 [(google.api.field_behavior) = OPTIONAL]; // Optional. The config settings for software inside the cluster. - SoftwareConfig software_config = 13; + SoftwareConfig software_config = 13 [(google.api.field_behavior) = OPTIONAL]; // Optional. Commands to execute on each node after config is // completed. By default, executables are run on master and all worker nodes. @@ -166,17 +202,41 @@ message ClusterConfig { // else // ... worker specific actions ... // fi - repeated NodeInitializationAction initialization_actions = 11; + repeated NodeInitializationAction initialization_actions = 11 [(google.api.field_behavior) = OPTIONAL]; // Optional. Encryption settings for the cluster. - EncryptionConfig encryption_config = 15; + EncryptionConfig encryption_config = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Autoscaling config for the policy associated with the cluster. + // Cluster does not autoscale if this field is unset. + AutoscalingConfig autoscaling_config = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Security settings for the cluster. + SecurityConfig security_config = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Lifecycle setting for the cluster. + LifecycleConfig lifecycle_config = 17 [(google.api.field_behavior) = OPTIONAL]; +} + +// Autoscaling Policy config associated with the cluster. +message AutoscalingConfig { + // Optional. The autoscaling policy used by the cluster. + // + // Only resource names including projectid and location (region) are valid. + // Examples: + // + // * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]` + // * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]` + // + // Note that the policy must be in the same project and Dataproc region. + string policy_uri = 1 [(google.api.field_behavior) = OPTIONAL]; } // Encryption settings for the cluster. message EncryptionConfig { // Optional. The Cloud KMS key name to use for PD disk encryption for all // instances in the cluster. - string gce_pd_kms_key_name = 1; + string gce_pd_kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL]; } // Common config settings for resources of Compute Engine cluster @@ -184,7 +244,7 @@ message EncryptionConfig { message GceClusterConfig { // Optional. The zone where the Compute Engine cluster will be located. // On a create request, it is required in the "global" region. If omitted - // in a non-global Cloud Dataproc region, the service will pick a zone in the + // in a non-global Dataproc region, the service will pick a zone in the // corresponding Compute Engine region. On a get request, zone will // always be present. // @@ -193,20 +253,21 @@ message GceClusterConfig { // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]` // * `projects/[project_id]/zones/[zone]` // * `us-central1-f` - string zone_uri = 1; + string zone_uri = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine network to be used for machine // communications. Cannot be specified with subnetwork_uri. If neither // `network_uri` nor `subnetwork_uri` is specified, the "default" network of // the project is used, if it exists. Cannot be a "Custom Subnet Network" (see - // [Using Subnetworks](/compute/docs/subnetworks) for more information). + // [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for + // more information). // // A full URL, partial URI, or short name are valid. Examples: // // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default` // * `projects/[project_id]/regions/global/default` // * `default` - string network_uri = 2; + string network_uri = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine subnetwork to be used for machine // communications. Cannot be specified with network_uri. @@ -216,7 +277,7 @@ message GceClusterConfig { // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0` // * `projects/[project_id]/regions/us-east1/subnetworks/sub0` // * `sub0` - string subnetwork_uri = 6; + string subnetwork_uri = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. If true, all instances in the cluster will only have internal IP // addresses. By default, clusters are not restricted to internal IP @@ -224,20 +285,20 @@ message GceClusterConfig { // instance. This `internal_ip_only` restriction can only be enabled for // subnetwork enabled networks, and all off-cluster dependencies must be // configured to be accessible without external IP addresses. - bool internal_ip_only = 7; + bool internal_ip_only = 7 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The service account of the instances. Defaults to the default - // Compute Engine service account. Custom service accounts need - // permissions equivalent to the following IAM roles: + // Optional. The [Dataproc service + // account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_cloud_dataproc) + // (also see [VM Data Plane + // identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity)) + // used by Dataproc cluster VM instances to access Google Cloud Platform + // services. // - // * roles/logging.logWriter - // * roles/storage.objectAdmin - // - // (see - // https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts - // for more information). - // Example: `[account_id]@[project_id].iam.gserviceaccount.com` - string service_account = 8; + // If not specified, the + // [Compute Engine default service + // account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + // is used. + string service_account = 8 [(google.api.field_behavior) = OPTIONAL]; // Optional. The URIs of service account scopes to be included in // Compute Engine instances. The following base set of scopes is always @@ -253,33 +314,51 @@ message GceClusterConfig { // * https://www.googleapis.com/auth/bigtable.admin.table // * https://www.googleapis.com/auth/bigtable.data // * https://www.googleapis.com/auth/devstorage.full_control - repeated string service_account_scopes = 3; + repeated string service_account_scopes = 3 [(google.api.field_behavior) = OPTIONAL]; - // The Compute Engine tags to add to all instances (see - // [Tagging instances](/compute/docs/label-or-tag-resources#tags)). + // The Compute Engine tags to add to all instances (see [Tagging + // instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). repeated string tags = 4; // The Compute Engine metadata entries to add to all instances (see // [Project and instance // metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). map metadata = 5; + + // Optional. Reservation Affinity for consuming Zonal reservation. + ReservationAffinity reservation_affinity = 11 [(google.api.field_behavior) = OPTIONAL]; } -// Optional. The config settings for Compute Engine resources in +// The config settings for Compute Engine resources in // an instance group, such as a master or worker group. message InstanceGroupConfig { // Optional. The number of VM instances in the instance group. // For master instance groups, must be set to 1. - int32 num_instances = 1; + int32 num_instances = 1 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The list of instance names. Cloud Dataproc derives the names + // Output only. The list of instance names. Dataproc derives the names // from `cluster_name`, `num_instances`, and the instance group. - repeated string instance_names = 2; + repeated string instance_names = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The Compute Engine image resource used for cluster - // instances. It can be specified or may be inferred from - // `SoftwareConfig.image_version`. - string image_uri = 3; + // Optional. The Compute Engine image resource used for cluster instances. + // + // The URI can represent an image or image family. + // + // Image examples: + // + // * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]` + // * `projects/[project_id]/global/images/[image-id]` + // * `image-id` + // + // Image family examples. Dataproc will use the most recent + // image from the family: + // + // * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]` + // * `projects/[project_id]/global/images/family/[custom-image-family-name]` + // + // If the URI is unspecified, it will be inferred from + // `SoftwareConfig.image_version` or the system default. + string image_uri = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine machine type used for cluster instances. // @@ -289,50 +368,53 @@ message InstanceGroupConfig { // * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2` // * `n1-standard-2` // - // **Auto Zone Exception**: If you are using the Cloud Dataproc + // **Auto Zone Exception**: If you are using the Dataproc // [Auto Zone - // Placement](/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) + // Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) // feature, you must use the short name of the machine type // resource, for example, `n1-standard-2`. - string machine_type_uri = 4; + string machine_type_uri = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Disk option config settings. - DiskConfig disk_config = 5; + DiskConfig disk_config = 5 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Specifies that this instance group contains preemptible + // Output only. Specifies that this instance group contains preemptible // instances. - bool is_preemptible = 6; + bool is_preemptible = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The config for Compute Engine Instance Group // Manager that manages this group. // This is only used for preemptible instance groups. - ManagedGroupConfig managed_group_config = 7; + ManagedGroupConfig managed_group_config = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The Compute Engine accelerator configuration for these // instances. - // - // **Beta Feature**: This feature is still under development. It may be - // changed before final release. - repeated AcceleratorConfig accelerators = 8; + repeated AcceleratorConfig accelerators = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the minimum cpu platform for the Instance Group. + // See [Dataproc -> Minimum CPU + // Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu). + string min_cpu_platform = 9 [(google.api.field_behavior) = OPTIONAL]; } // Specifies the resources used to actively manage an instance group. message ManagedGroupConfig { // Output only. The name of the Instance Template used for the Managed // Instance Group. - string instance_template_name = 1; + string instance_template_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The name of the Instance Group Manager for this group. - string instance_group_manager_name = 2; + string instance_group_manager_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Specifies the type and number of accelerator cards attached to the instances -// of an instance. See [GPUs on Compute Engine](/compute/docs/gpus/). +// of an instance. See [GPUs on Compute +// Engine](https://cloud.google.com/compute/docs/gpus/). message AcceleratorConfig { // Full URL, partial URI, or short name of the accelerator type resource to // expose to this instance. See // [Compute Engine - // AcceleratorTypes](/compute/docs/reference/beta/acceleratorTypes). + // AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes). // // Examples: // @@ -340,9 +422,9 @@ message AcceleratorConfig { // * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80` // * `nvidia-tesla-k80` // - // **Auto Zone Exception**: If you are using the Cloud Dataproc + // **Auto Zone Exception**: If you are using the Dataproc // [Auto Zone - // Placement](/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) + // Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) // feature, you must use the short name of the accelerator type // resource, for example, `nvidia-tesla-k80`. string accelerator_type_uri = 1; @@ -356,10 +438,10 @@ message DiskConfig { // Optional. Type of the boot disk (default is "pd-standard"). // Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or // "pd-standard" (Persistent Disk Hard Disk Drive). - string boot_disk_type = 3; + string boot_disk_type = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Size in GB of the boot disk (default is 500GB). - int32 boot_disk_size_gb = 1; + int32 boot_disk_size_gb = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Number of attached SSDs, from 0 to 4 (default is 0). // If SSDs are not attached, the boot disk is used to store runtime logs and @@ -367,20 +449,23 @@ message DiskConfig { // If one or more SSDs are attached, this runtime bulk // data is spread across them, and the boot disk contains only basic // config and installed binaries. - int32 num_local_ssds = 2; + int32 num_local_ssds = 2 [(google.api.field_behavior) = OPTIONAL]; } // Specifies an executable to run on a fully configured node and a // timeout period for executable completion. message NodeInitializationAction { // Required. Cloud Storage URI of executable file. - string executable_file = 1; + string executable_file = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Amount of time executable has to complete. Default is - // 10 minutes. Cluster creation fails with an explanatory error message (the + // 10 minutes (see JSON representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). + // + // Cluster creation fails with an explanatory error message (the // name of the executable that caused the error and the exceeded timeout // period) if the executable is not completed at end of the timeout period. - google.protobuf.Duration execution_timeout = 2; + google.protobuf.Duration execution_timeout = 2 [(google.api.field_behavior) = OPTIONAL]; } // The status of a cluster and its instances. @@ -419,36 +504,116 @@ message ClusterStatus { UNHEALTHY = 1; // The agent-reported status is out of date (may occur if - // Cloud Dataproc loses communication with Agent). + // Dataproc loses communication with Agent). // // Applies to RUNNING state. STALE_STATUS = 2; } // Output only. The cluster's state. - State state = 1; + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Optional details of cluster's state. - string detail = 2; + // Optional. Output only. Details of cluster's state. + string detail = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; - // Output only. Time when this state was entered. - google.protobuf.Timestamp state_start_time = 3; + // Output only. Time when this state was entered (see JSON representation of + // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). + google.protobuf.Timestamp state_start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Additional state information that includes // status reported by the agent. - Substate substate = 4; + Substate substate = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Security related configuration, including Kerberos. +message SecurityConfig { + // Kerberos related configuration. + KerberosConfig kerberos_config = 1; +} + +// Specifies Kerberos related configuration. +message KerberosConfig { + // Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set + // this field to true to enable Kerberos on a cluster. + bool enable_kerberos = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The Cloud Storage URI of a KMS encrypted file containing the root + // principal password. + string root_principal_password_uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The uri of the KMS key used to encrypt various sensitive + // files. + string kms_key_uri = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The Cloud Storage URI of the keystore file used for SSL + // encryption. If not provided, Dataproc will provide a self-signed + // certificate. + string keystore_uri = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Storage URI of the truststore file used for SSL + // encryption. If not provided, Dataproc will provide a self-signed + // certificate. + string truststore_uri = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Storage URI of a KMS encrypted file containing the + // password to the user provided keystore. For the self-signed certificate, + // this password is generated by Dataproc. + string keystore_password_uri = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Storage URI of a KMS encrypted file containing the + // password to the user provided key. For the self-signed certificate, this + // password is generated by Dataproc. + string key_password_uri = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Storage URI of a KMS encrypted file containing the + // password to the user provided truststore. For the self-signed certificate, + // this password is generated by Dataproc. + string truststore_password_uri = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The remote realm the Dataproc on-cluster KDC will trust, should + // the user enable cross realm trust. + string cross_realm_trust_realm = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The KDC (IP or hostname) for the remote trusted realm in a cross + // realm trust relationship. + string cross_realm_trust_kdc = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The admin server (IP or hostname) for the remote trusted realm in + // a cross realm trust relationship. + string cross_realm_trust_admin_server = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Storage URI of a KMS encrypted file containing the + // shared password between the on-cluster Kerberos realm and the remote + // trusted realm, in a cross realm trust relationship. + string cross_realm_trust_shared_password_uri = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Storage URI of a KMS encrypted file containing the + // master key of the KDC database. + string kdc_db_key_uri = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The lifetime of the ticket granting ticket, in hours. + // If not specified, or user specifies 0, then default value 10 + // will be used. + int32 tgt_lifetime_hours = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the on-cluster Kerberos realm. + // If not specified, the uppercased domain of hostnames will be the realm. + string realm = 15 [(google.api.field_behavior) = OPTIONAL]; } // Specifies the selection and config of software inside the cluster. message SoftwareConfig { // Optional. The version of software inside the cluster. It must be one of the - // supported [Cloud Dataproc - // Versions](/dataproc/docs/concepts/versioning/dataproc-versions#supported_cloud_dataproc_versions), + // supported [Dataproc + // Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_cloud_dataproc_versions), // such as "1.2" (including a subminor version, such as "1.2.29"), or the // ["preview" - // version](/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). + // version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). // If unspecified, it defaults to the latest Debian version. - string image_version = 1; + string image_version = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The properties to set on daemon config files. // @@ -466,12 +631,42 @@ message SoftwareConfig { // * spark: `spark-defaults.conf` // * yarn: `yarn-site.xml` // - // For more information, see - // [Cluster properties](/dataproc/docs/concepts/cluster-properties). - map properties = 2; + // For more information, see [Cluster + // properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). + map properties = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The set of components to activate on the cluster. + repeated Component optional_components = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Specifies the cluster auto-delete schedule configuration. +message LifecycleConfig { + // Optional. The duration to keep the cluster alive while idling (when no jobs + // are running). Passing this threshold will cause the cluster to be + // deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON + // representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json). + google.protobuf.Duration idle_delete_ttl = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Either the exact time the cluster should be deleted at or + // the cluster maximum age. + oneof ttl { + // Optional. The time when cluster will be auto-deleted (see JSON representation of + // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). + google.protobuf.Timestamp auto_delete_time = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The lifetime duration of cluster. The cluster will be + // auto-deleted at the end of this period. Minimum value is 10 minutes; + // maximum value is 14 days (see JSON representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). + google.protobuf.Duration auto_delete_ttl = 3 [(google.api.field_behavior) = OPTIONAL]; + } - // The set of optional components to activate on the cluster. - repeated Component optional_components = 3; + // Output only. The time when cluster became idle (most recent job finished) + // and became eligible for deletion due to idleness (see JSON representation + // of + // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). + google.protobuf.Timestamp idle_start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Contains cluster daemon metrics, such as HDFS and YARN stats. @@ -490,13 +685,13 @@ message ClusterMetrics { message CreateClusterRequest { // Required. The ID of the Google Cloud Platform project that the cluster // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The cluster to create. - Cluster cluster = 2; + Cluster cluster = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. A unique id used to identify the request. If the server // receives two [CreateClusterRequest][google.cloud.dataproc.v1.CreateClusterRequest] requests with the same @@ -509,33 +704,34 @@ message CreateClusterRequest { // // The id must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 4; + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; } // A request to update a cluster. message UpdateClusterRequest { // Required. The ID of the Google Cloud Platform project the // cluster belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 5; + // Required. The Dataproc region in which to handle the request. + string region = 5 [(google.api.field_behavior) = REQUIRED]; // Required. The cluster name. - string cluster_name = 2; + string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The changes to the cluster. - Cluster cluster = 3; + Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. Timeout for graceful YARN decomissioning. Graceful // decommissioning allows removing nodes from the cluster without // interrupting jobs in progress. Timeout specifies how long to wait for jobs // in progress to finish before forcefully removing nodes (and potentially // interrupting jobs). Default timeout is 0 (for forceful decommission), and - // the maximum allowed timeout is 1 day. + // the maximum allowed timeout is 1 day. (see JSON representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). // // Only supported on Dataproc image versions 1.2 and higher. - google.protobuf.Duration graceful_decommission_timeout = 6; + google.protobuf.Duration graceful_decommission_timeout = 6 [(google.api.field_behavior) = OPTIONAL]; // Required. Specifies the path, relative to `Cluster`, of // the field to update. For example, to change the number of workers @@ -582,9 +778,13 @@ message UpdateClusterRequest { //
// // + // + // + // // //
config.secondary_worker_config.num_instancesResize secondary worker group
config.autoscaling_config.policy_uriUse, stop using, or + // change autoscaling policies
- google.protobuf.FieldMask update_mask = 4; + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; // Optional. A unique id used to identify the request. If the server // receives two [UpdateClusterRequest][google.cloud.dataproc.v1.UpdateClusterRequest] requests with the same @@ -597,24 +797,24 @@ message UpdateClusterRequest { // // The id must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 7; + string request_id = 7 [(google.api.field_behavior) = OPTIONAL]; } // A request to delete a cluster. message DeleteClusterRequest { // Required. The ID of the Google Cloud Platform project that the cluster // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The cluster name. - string cluster_name = 2; + string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Specifying the `cluster_uuid` means the RPC should fail // (with error NOT_FOUND) if cluster with specified UUID does not exist. - string cluster_uuid = 4; + string cluster_uuid = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. A unique id used to identify the request. If the server // receives two [DeleteClusterRequest][google.cloud.dataproc.v1.DeleteClusterRequest] requests with the same @@ -627,30 +827,30 @@ message DeleteClusterRequest { // // The id must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 5; + string request_id = 5 [(google.api.field_behavior) = OPTIONAL]; } // Request to get the resource representation for a cluster in a project. message GetClusterRequest { // Required. The ID of the Google Cloud Platform project that the cluster // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The cluster name. - string cluster_name = 2; + string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; } // A request to list the clusters in a project. message ListClustersRequest { // Required. The ID of the Google Cloud Platform project that the cluster // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 4; + // Required. The Dataproc region in which to handle the request. + string region = 4 [(google.api.field_behavior) = REQUIRED]; // Optional. A filter constraining the clusters to list. Filters are // case-sensitive and have the following syntax: @@ -671,37 +871,37 @@ message ListClustersRequest { // // status.state = ACTIVE AND clusterName = mycluster // AND labels.env = staging AND labels.starred = * - string filter = 5; + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. The standard List page size. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The standard List page token. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // The list of all clusters in a project. message ListClustersResponse { // Output only. The clusters in the project. - repeated Cluster clusters = 1; + repeated Cluster clusters = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. This token is included in the response if there are more // results to fetch. To fetch additional results, provide this value as the // `page_token` in a subsequent `ListClustersRequest`. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to collect cluster diagnostic information. message DiagnoseClusterRequest { // Required. The ID of the Google Cloud Platform project that the cluster // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The cluster name. - string cluster_name = 2; + string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; } // The location of diagnostic output. @@ -709,5 +909,32 @@ message DiagnoseClusterResults { // Output only. The Cloud Storage URI of the diagnostic output. // The output report is a plain text file with a summary of collected // diagnostics. - string output_uri = 1; + string output_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Reservation Affinity for consuming Zonal reservation. +message ReservationAffinity { + // Indicates whether to consume capacity from an reservation or not. + enum Type { + TYPE_UNSPECIFIED = 0; + + // Do not consume from any allocated capacity. + NO_RESERVATION = 1; + + // Consume any reservation available. + ANY_RESERVATION = 2; + + // Must consume from a specific reservation. Must specify key value fields + // for specifying the reservations. + SPECIFIC_RESERVATION = 3; + } + + // Optional. Type of reservation to consume + Type consume_reservation_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Corresponds to the label key of reservation resource. + string key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Corresponds to the label values of reservation resource. + repeated string values = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/google/cloud/dataproc/v1/dataproc.yaml b/google/cloud/dataproc/v1/dataproc.yaml index e6d36de27..75726da18 100644 --- a/google/cloud/dataproc/v1/dataproc.yaml +++ b/google/cloud/dataproc/v1/dataproc.yaml @@ -7,6 +7,7 @@ apis: - name: google.cloud.dataproc.v1.ClusterController - name: google.cloud.dataproc.v1.JobController - name: google.cloud.dataproc.v1.WorkflowTemplateService +- name: google.cloud.dataproc.v1.AutoscalingPolicyService types: - name: google.cloud.dataproc.v1.DiagnoseClusterResults diff --git a/google/cloud/dataproc/v1/dataproc_gapic.legacy.yaml b/google/cloud/dataproc/v1/dataproc_gapic.legacy.yaml new file mode 100644 index 000000000..63811e63b --- /dev/null +++ b/google/cloud/dataproc/v1/dataproc_gapic.legacy.yaml @@ -0,0 +1,778 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.dataproc.v1 + python: + package_name: google.cloud.dataproc_v1.gapic + go: + package_name: cloud.google.com/go/dataproc/apiv1 + csharp: + package_name: Google.Cloud.Dataproc.V1 + ruby: + package_name: Google::Cloud::Dataproc::V1 + php: + package_name: Google\Cloud\Dataproc\V1 + nodejs: + package_name: dataproc.v1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.dataproc.v1.AutoscalingPolicyService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/regions/{region} + entity_name: region + - name_pattern: projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy} + entity_name: autoscaling_policy + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateAutoscalingPolicy + flattening: + groups: + - parameters: + - parent + - policy + required_fields: + - parent + - policy + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: region + timeout_millis: 60000 + - name: UpdateAutoscalingPolicy + flattening: + groups: + - parameters: + - policy + required_fields: + - policy + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + policy.name: autoscaling_policy + timeout_millis: 60000 + - name: GetAutoscalingPolicy + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: autoscaling_policy + timeout_millis: 60000 + - name: ListAutoscalingPolicies + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: policies + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: region + timeout_millis: 60000 + - name: DeleteAutoscalingPolicy + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: autoscaling_policy + timeout_millis: 60000 +- name: google.cloud.dataproc.v1.ClusterController + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for smoke test. + smoke_test: + method: ListClusters + init_fields: + - project_id=$PROJECT_ID + - region="global" + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - INTERNAL + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: + - UNAVAILABLE + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 10000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 10000 + total_timeout_millis: 300000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateCluster + flattening: + groups: + - parameters: + - project_id + - region + - cluster + required_fields: + - project_id + - region + - cluster + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 30000 + long_running: + return_type: google.cloud.dataproc.v1.Cluster + metadata_type: google.cloud.dataproc.v1.ClusterOperationMetadata + implements_delete: false + implements_cancel: false + initial_poll_delay_millis: 1000 + poll_delay_multiplier: 2 + max_poll_delay_millis: 10000 + total_poll_timeout_millis: 900000 + - name: UpdateCluster + flattening: + groups: + - parameters: + - project_id + - region + - cluster_name + - cluster + - update_mask + required_fields: + - project_id + - region + - cluster_name + - cluster + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 30000 + long_running: + return_type: google.cloud.dataproc.v1.Cluster + metadata_type: google.cloud.dataproc.v1.ClusterOperationMetadata + implements_delete: false + implements_cancel: false + initial_poll_delay_millis: 1000 + poll_delay_multiplier: 2 + max_poll_delay_millis: 10000 + total_poll_timeout_millis: 900000 + - name: DeleteCluster + flattening: + groups: + - parameters: + - project_id + - region + - cluster_name + required_fields: + - project_id + - region + - cluster_name + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 30000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.dataproc.v1.ClusterOperationMetadata + implements_delete: false + implements_cancel: false + initial_poll_delay_millis: 1000 + poll_delay_multiplier: 2 + max_poll_delay_millis: 10000 + total_poll_timeout_millis: 900000 + - name: GetCluster + flattening: + groups: + - parameters: + - project_id + - region + - cluster_name + required_fields: + - project_id + - region + - cluster_name + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: ListClusters + flattening: + groups: + - parameters: + - project_id + - region + - parameters: + - project_id + - region + - filter + required_fields: + - project_id + - region + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: clusters + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: DiagnoseCluster + flattening: + groups: + - parameters: + - project_id + - region + - cluster_name + required_fields: + - project_id + - region + - cluster_name + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.dataproc.v1.DiagnoseClusterResults + implements_delete: false + implements_cancel: false + initial_poll_delay_millis: 1000 + poll_delay_multiplier: 2 + max_poll_delay_millis: 10000 + total_poll_timeout_millis: 30000 + # The fully qualified name of the API interface. +- name: google.cloud.dataproc.v1.JobController + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - INTERNAL + - UNAVAILABLE + - name: non_idempotent + retry_codes: + - UNAVAILABLE + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 30000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 30000 + total_timeout_millis: 900000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: SubmitJob + flattening: + groups: + - parameters: + - project_id + - region + - job + required_fields: + - project_id + - region + - job + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 30000 + - name: GetJob + flattening: + groups: + - parameters: + - project_id + - region + - job_id + required_fields: + - project_id + - region + - job_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 + - name: ListJobs + flattening: + groups: + - parameters: + - project_id + - region + - parameters: + - project_id + - region + - filter + required_fields: + - project_id + - region + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: jobs + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 + - name: UpdateJob + required_fields: + - project_id + - region + - job_id + - job + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 30000 + - name: CancelJob + flattening: + groups: + - parameters: + - project_id + - region + - job_id + required_fields: + - project_id + - region + - job_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 + - name: DeleteJob + flattening: + groups: + - parameters: + - project_id + - region + - job_id + required_fields: + - project_id + - region + - job_id + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 30000 + # The fully qualified name of the API interface. +- name: google.cloud.dataproc.v1.WorkflowTemplateService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/regions/{region} + entity_name: region + - name_pattern: projects/{project}/regions/{region}/workflowTemplates/{workflow_template} + entity_name: workflow_template + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - INTERNAL + - UNAVAILABLE + - name: non_idempotent + retry_codes: + - UNAVAILABLE + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateWorkflowTemplate + flattening: + groups: + - parameters: + - parent + - template + required_fields: + - parent + - template + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: region + timeout_millis: 30000 + - name: GetWorkflowTemplate + # params. + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: workflow_template + timeout_millis: 60000 + - name: InstantiateWorkflowTemplate + flattening: + groups: + - parameters: + - name + - parameters: + - name + - parameters + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: workflow_template + timeout_millis: 60000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.dataproc.v1.WorkflowMetadata + implements_delete: false + implements_cancel: false + initial_poll_delay_millis: 1000 + poll_delay_multiplier: 2 + max_poll_delay_millis: 10000 + total_poll_timeout_millis: 43200000 + - name: InstantiateInlineWorkflowTemplate + flattening: + groups: + - parameters: + - parent + - template + required_fields: + - parent + - template + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: region + timeout_millis: 60000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.dataproc.v1.WorkflowMetadata + implements_delete: false + implements_cancel: false + initial_poll_delay_millis: 1000 + poll_delay_multiplier: 2 + max_poll_delay_millis: 10000 + total_poll_timeout_millis: 43200000 + - name: UpdateWorkflowTemplate + flattening: + groups: + - parameters: + - template + required_fields: + - template + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + template.name: workflow_template + timeout_millis: 60000 + - name: ListWorkflowTemplates + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: templates + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: region + timeout_millis: 60000 + - name: DeleteWorkflowTemplate + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: workflow_template + timeout_millis: 60000 +resource_name_generation: +- message_name: WorkflowTemplate + field_entity_map: + name: workflow_template +- message_name: CreateWorkflowTemplateRequest + field_entity_map: + parent: region +- message_name: GetWorkflowTemplateRequest + field_entity_map: + name: workflow_template +- message_name: InstantiateWorkflowTemplateRequest + field_entity_map: + name: workflow_template +- message_name: InstantiateInlineWorkflowTemplateRequest + field_entity_map: + parent: region +- message_name: ListWorkflowTemplatesRequest + field_entity_map: + parent: region +- message_name: DeleteWorkflowTemplateRequest + field_entity_map: + name: workflow_template diff --git a/google/cloud/dataproc/v1/dataproc_gapic.yaml b/google/cloud/dataproc/v1/dataproc_gapic.yaml index 870972830..57861c84c 100644 --- a/google/cloud/dataproc/v1/dataproc_gapic.yaml +++ b/google/cloud/dataproc/v1/dataproc_gapic.yaml @@ -1,6 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 -# The settings of generated code in a specific language. +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.dataproc.v1 @@ -17,28 +16,17 @@ language_settings: nodejs: package_name: dataproc.v1 domain_layer_location: google-cloud -# A list of API interface configurations. interfaces: -# The fully qualified name of the API interface. +- name: google.cloud.dataproc.v1.AutoscalingPolicyService + methods: + - name: UpdateAutoscalingPolicy + retry_codes_name: idempotent - name: google.cloud.dataproc.v1.ClusterController - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: [] - # Definition for smoke test. smoke_test: method: ListClusters init_fields: - project_id=$PROJECT_ID - region="global" - # Definition for retryable codes. retry_codes_def: - name: idempotent retry_codes: @@ -48,7 +36,6 @@ interfaces: - name: non_idempotent retry_codes: - UNAVAILABLE - # Definition for retry/backoff parameters. retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -58,199 +45,20 @@ interfaces: rpc_timeout_multiplier: 1 max_rpc_timeout_millis: 10000 total_timeout_millis: 300000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: CreateCluster - flattening: - groups: - - parameters: - - project_id - - region - - cluster - required_fields: - - project_id - - region - - cluster retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 30000 - long_running: - return_type: google.cloud.dataproc.v1.Cluster - metadata_type: google.cloud.dataproc.v1.ClusterOperationMetadata - implements_delete: false - implements_cancel: false - initial_poll_delay_millis: 1000 - poll_delay_multiplier: 2 - max_poll_delay_millis: 10000 - total_poll_timeout_millis: 900000 - name: UpdateCluster - flattening: - groups: - - parameters: - - project_id - - region - - cluster_name - - cluster - - update_mask - required_fields: - - project_id - - region - - cluster_name - - cluster - - update_mask retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 30000 - long_running: - return_type: google.cloud.dataproc.v1.Cluster - metadata_type: google.cloud.dataproc.v1.ClusterOperationMetadata - implements_delete: false - implements_cancel: false - initial_poll_delay_millis: 1000 - poll_delay_multiplier: 2 - max_poll_delay_millis: 10000 - total_poll_timeout_millis: 900000 - name: DeleteCluster - flattening: - groups: - - parameters: - - project_id - - region - - cluster_name - required_fields: - - project_id - - region - - cluster_name retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 30000 - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.dataproc.v1.ClusterOperationMetadata - implements_delete: false - implements_cancel: false - initial_poll_delay_millis: 1000 - poll_delay_multiplier: 2 - max_poll_delay_millis: 10000 - total_poll_timeout_millis: 900000 - name: GetCluster - flattening: - groups: - - parameters: - - project_id - - region - - cluster_name - required_fields: - - project_id - - region - - cluster_name retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - name: ListClusters - flattening: - groups: - - parameters: - - project_id - - region - - parameters: - - project_id - - region - - filter - required_fields: - - project_id - - region - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: clusters retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - name: DiagnoseCluster - flattening: - groups: - - parameters: - - project_id - - region - - cluster_name - required_fields: - - project_id - - region - - cluster_name retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.dataproc.v1.DiagnoseClusterResults - implements_delete: false - implements_cancel: false - initial_poll_delay_millis: 1000 - poll_delay_multiplier: 2 - max_poll_delay_millis: 10000 - total_poll_timeout_millis: 30000 - # The fully qualified name of the API interface. - name: google.cloud.dataproc.v1.JobController - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: [] - # Definition for retryable codes. retry_codes_def: - name: idempotent retry_codes: @@ -260,7 +68,6 @@ interfaces: - name: non_idempotent retry_codes: - UNAVAILABLE - # Definition for retry/backoff parameters. retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -270,159 +77,20 @@ interfaces: rpc_timeout_multiplier: 1 max_rpc_timeout_millis: 30000 total_timeout_millis: 900000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: SubmitJob - flattening: - groups: - - parameters: - - project_id - - region - - job - required_fields: - - project_id - - region - - job retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 30000 - name: GetJob - flattening: - groups: - - parameters: - - project_id - - region - - job_id - required_fields: - - project_id - - region - - job_id retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 30000 - name: ListJobs - flattening: - groups: - - parameters: - - project_id - - region - - parameters: - - project_id - - region - - filter - required_fields: - - project_id - - region - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: jobs retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 30000 - name: UpdateJob - required_fields: - - project_id - - region - - job_id - - job - - update_mask retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 30000 - name: CancelJob - flattening: - groups: - - parameters: - - project_id - - region - - job_id - required_fields: - - project_id - - region - - job_id retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 30000 - name: DeleteJob - flattening: - groups: - - parameters: - - project_id - - region - - job_id - required_fields: - - project_id - - region - - job_id retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 30000 - # The fully qualified name of the API interface. - name: google.cloud.dataproc.v1.WorkflowTemplateService - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/regions/{region} - entity_name: region - - name_pattern: projects/{project}/regions/{region}/workflowTemplates/{workflow_template} - entity_name: workflow_template - # Definition for retryable codes. retry_codes_def: - name: idempotent retry_codes: @@ -432,198 +100,18 @@ interfaces: - name: non_idempotent retry_codes: - UNAVAILABLE - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: CreateWorkflowTemplate - flattening: - groups: - - parameters: - - parent - - template - required_fields: - - parent - - template retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: region - timeout_millis: 30000 - name: GetWorkflowTemplate - # params. - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: workflow_template - timeout_millis: 60000 - name: InstantiateWorkflowTemplate - flattening: - groups: - - parameters: - - name - - parameters: - - name - - parameters - required_fields: - - name retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: workflow_template - timeout_millis: 60000 - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.dataproc.v1.WorkflowMetadata - implements_delete: false - implements_cancel: false - initial_poll_delay_millis: 1000 - poll_delay_multiplier: 2 - max_poll_delay_millis: 10000 - total_poll_timeout_millis: 43200000 - name: InstantiateInlineWorkflowTemplate - flattening: - groups: - - parameters: - - parent - - template - required_fields: - - parent - - template retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: region - timeout_millis: 60000 - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.dataproc.v1.WorkflowMetadata - implements_delete: false - implements_cancel: false - initial_poll_delay_millis: 1000 - poll_delay_multiplier: 2 - max_poll_delay_millis: 10000 - total_poll_timeout_millis: 43200000 - name: UpdateWorkflowTemplate - flattening: - groups: - - parameters: - - template - required_fields: - - template retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - template.name: workflow_template - timeout_millis: 60000 - name: ListWorkflowTemplates - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: templates retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: region - timeout_millis: 60000 - name: DeleteWorkflowTemplate - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: workflow_template - timeout_millis: 60000 -resource_name_generation: -- message_name: WorkflowTemplate - field_entity_map: - name: workflow_template -- message_name: CreateWorkflowTemplateRequest - field_entity_map: - parent: region -- message_name: GetWorkflowTemplateRequest - field_entity_map: - name: workflow_template -- message_name: InstantiateWorkflowTemplateRequest - field_entity_map: - name: workflow_template -- message_name: InstantiateInlineWorkflowTemplateRequest - field_entity_map: - parent: region -- message_name: ListWorkflowTemplatesRequest - field_entity_map: - parent: region -- message_name: DeleteWorkflowTemplateRequest - field_entity_map: - name: workflow_template diff --git a/google/cloud/dataproc/v1/dataproc_grpc_service_config.json b/google/cloud/dataproc/v1/dataproc_grpc_service_config.json new file mode 100755 index 000000000..411b7bab7 --- /dev/null +++ b/google/cloud/dataproc/v1/dataproc_grpc_service_config.json @@ -0,0 +1,207 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.dataproc.v1.AutoscalingPolicyService", + "method": "CreateAutoscalingPolicy" + }, + { + "service": "google.cloud.dataproc.v1.AutoscalingPolicyService", + "method": "DeleteAutoscalingPolicy" + } + ], + "timeout": "600s" + }, + { + "name": [ + { + "service": "google.cloud.dataproc.v1.AutoscalingPolicyService", + "method": "UpdateAutoscalingPolicy" + }, + { + "service": "google.cloud.dataproc.v1.AutoscalingPolicyService", + "method": "GetAutoscalingPolicy" + }, + { + "service": "google.cloud.dataproc.v1.AutoscalingPolicyService", + "method": "ListAutoscalingPolicies" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dataproc.v1.JobController", + "method": "GetJob" + }, + { + "service": "google.cloud.dataproc.v1.JobController", + "method": "ListJobs" + }, + { + "service": "google.cloud.dataproc.v1.JobController", + "method": "CancelJob" + } + ], + "timeout": "900s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dataproc.v1.WorkflowTemplateService", + "method": "CreateWorkflowTemplate" + }, + { + "service": "google.cloud.dataproc.v1.WorkflowTemplateService", + "method": "InstantiateWorkflowTemplate" + }, + { + "service": "google.cloud.dataproc.v1.WorkflowTemplateService", + "method": "InstantiateInlineWorkflowTemplate" + }, + { + "service": "google.cloud.dataproc.v1.WorkflowTemplateService", + "method": "UpdateWorkflowTemplate" + }, + { + "service": "google.cloud.dataproc.v1.WorkflowTemplateService", + "method": "DeleteWorkflowTemplate" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dataproc.v1.WorkflowTemplateService", + "method": "GetWorkflowTemplate" + }, + { + "service": "google.cloud.dataproc.v1.WorkflowTemplateService", + "method": "ListWorkflowTemplates" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dataproc.v1.ClusterController", + "method": "CreateCluster" + }, + { + "service": "google.cloud.dataproc.v1.ClusterController", + "method": "UpdateCluster" + }, + { + "service": "google.cloud.dataproc.v1.ClusterController", + "method": "DeleteCluster" + }, + { + "service": "google.cloud.dataproc.v1.ClusterController", + "method": "DiagnoseCluster" + } + ], + "timeout": "300s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dataproc.v1.ClusterController", + "method": "GetCluster" + }, + { + "service": "google.cloud.dataproc.v1.ClusterController", + "method": "ListClusters" + } + ], + "timeout": "300s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "INTERNAL", + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dataproc.v1.JobController", + "method": "SubmitJob" + }, + { + "service": "google.cloud.dataproc.v1.JobController", + "method": "SubmitJobAsOperation" + }, + { + "service": "google.cloud.dataproc.v1.JobController", + "method": "UpdateJob" + }, + { + "service": "google.cloud.dataproc.v1.JobController", + "method": "DeleteJob" + } + ], + "timeout": "900s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/dataproc/v1/dataproc_v1.yaml b/google/cloud/dataproc/v1/dataproc_v1.yaml new file mode 100644 index 000000000..cb6dc5fc9 --- /dev/null +++ b/google/cloud/dataproc/v1/dataproc_v1.yaml @@ -0,0 +1,83 @@ +type: google.api.Service +config_version: 2 +name: dataproc.googleapis.com +title: Cloud Dataproc API + +apis: +- name: google.cloud.dataproc.v1.AutoscalingPolicyService +- name: google.cloud.dataproc.v1.ClusterController +- name: google.cloud.dataproc.v1.JobController +- name: google.cloud.dataproc.v1.WorkflowTemplateService + +types: +- name: google.cloud.dataproc.v1.ClusterOperationMetadata +- name: google.cloud.dataproc.v1.DiagnoseClusterResults +- name: google.cloud.dataproc.v1.JobMetadata +- name: google.cloud.dataproc.v1.WorkflowMetadata + +documentation: + summary: 'Manages Hadoop-based clusters and jobs on Google Cloud Platform.' + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + description: |- + Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + description: |- + Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and + PERMISSION_DENIED + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + description: |- + Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + +http: + rules: + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=projects/*/regions/*/operations}' + + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=projects/*/regions/*/operations/*}' + + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=projects/*/regions/*/operations/*}' + + - selector: google.longrunning.Operations.CancelOperation + post: '/v1/{name=projects/*/regions/*/operations/*}:cancel' + +authentication: + rules: + - selector: 'google.cloud.dataproc.v1.AutoscalingPolicyService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.dataproc.v1.ClusterController.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.dataproc.v1.JobController.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.dataproc.v1.WorkflowTemplateService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.iam.v1.IAMPolicy.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/dataproc/v1/jobs.proto b/google/cloud/dataproc/v1/jobs.proto index 7ead7bb95..0379c09dd 100644 --- a/google/cloud/dataproc/v1/jobs.proto +++ b/google/cloud/dataproc/v1/jobs.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dataproc.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -29,12 +31,29 @@ option java_package = "com.google.cloud.dataproc.v1"; // The JobController provides methods to manage jobs. service JobController { + option (google.api.default_host) = "dataproc.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Submits a job to a cluster. rpc SubmitJob(SubmitJobRequest) returns (Job) { option (google.api.http) = { post: "/v1/projects/{project_id}/regions/{region}/jobs:submit" body: "*" }; + option (google.api.method_signature) = "project_id,region,job"; + } + + // Submits job to a cluster. + rpc SubmitJobAsOperation(SubmitJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/projects/{project_id}/regions/{region}/jobs:submitAsOperation" + body: "*" + }; + option (google.api.method_signature) = "project_id, region, job"; + option (google.longrunning.operation_info) = { + response_type: "Job" + metadata_type: "JobMetadata" + }; } // Gets the resource representation for a job in a project. @@ -42,6 +61,7 @@ service JobController { option (google.api.http) = { get: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}" }; + option (google.api.method_signature) = "project_id,region,job_id"; } // Lists regions/{region}/jobs in a project. @@ -49,6 +69,8 @@ service JobController { option (google.api.http) = { get: "/v1/projects/{project_id}/regions/{region}/jobs" }; + option (google.api.method_signature) = "project_id,region"; + option (google.api.method_signature) = "project_id,region,filter"; } // Updates a job in a project. @@ -61,14 +83,15 @@ service JobController { // Starts a job cancellation request. To access the job resource // after cancellation, call - // [regions/{region}/jobs.list](/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) + // [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) // or - // [regions/{region}/jobs.get](/dataproc/docs/reference/rest/v1/projects.regions.jobs/get). + // [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get). rpc CancelJob(CancelJobRequest) returns (Job) { option (google.api.http) = { post: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}:cancel" body: "*" }; + option (google.api.method_signature) = "project_id,region,job_id"; } // Deletes the job from the project. If the job is active, the delete fails, @@ -77,6 +100,7 @@ service JobController { option (google.api.http) = { delete: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}" }; + option (google.api.method_signature) = "project_id,region,job_id"; } } @@ -121,7 +145,7 @@ message LoggingConfig { map driver_log_levels = 2; } -// A Cloud Dataproc job for running +// A Dataproc job for running // [Apache Hadoop // MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) // jobs on [Apache Hadoop @@ -148,33 +172,33 @@ message HadoopJob { // include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as // job properties, since a collision may occur that causes an incorrect job // submission. - repeated string args = 3; + repeated string args = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Jar file URIs to add to the CLASSPATHs of the // Hadoop driver and tasks. - repeated string jar_file_uris = 4; + repeated string jar_file_uris = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied // to the working directory of Hadoop drivers and distributed tasks. Useful // for naively parallel tasks. - repeated string file_uris = 5; + repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of archives to be extracted in the working directory of // Hadoop drivers and tasks. Supported file types: // .jar, .tar, .tar.gz, .tgz, or .zip. - repeated string archive_uris = 6; + repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names to values, used to configure Hadoop. - // Properties that conflict with values set by the Cloud Dataproc API may be + // Properties that conflict with values set by the Dataproc API may be // overwritten. Can include properties set in /etc/hadoop/conf/*-site and // classes in user code. - map properties = 7; + map properties = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 8; + LoggingConfig logging_config = 8 [(google.api.field_behavior) = OPTIONAL]; } -// A Cloud Dataproc job for running [Apache Spark](http://spark.apache.org/) +// A Dataproc job for running [Apache Spark](http://spark.apache.org/) // applications on YARN. message SparkJob { // Required. The specification of the main method to call to drive the job. @@ -194,69 +218,69 @@ message SparkJob { // Optional. The arguments to pass to the driver. Do not include arguments, // such as `--conf`, that can be set as job properties, since a collision may // occur that causes an incorrect job submission. - repeated string args = 3; + repeated string args = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of jar files to add to the CLASSPATHs of the // Spark driver and tasks. - repeated string jar_file_uris = 4; + repeated string jar_file_uris = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of files to be copied to the working directory of // Spark drivers and distributed tasks. Useful for naively parallel tasks. - repeated string file_uris = 5; + repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of archives to be extracted in the working directory // of Spark drivers and tasks. Supported file types: // .jar, .tar, .tar.gz, .tgz, and .zip. - repeated string archive_uris = 6; + repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names to values, used to configure Spark. - // Properties that conflict with values set by the Cloud Dataproc API may be + // Properties that conflict with values set by the Dataproc API may be // overwritten. Can include properties set in // /etc/spark/conf/spark-defaults.conf and classes in user code. - map properties = 7; + map properties = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 8; + LoggingConfig logging_config = 8 [(google.api.field_behavior) = OPTIONAL]; } -// A Cloud Dataproc job for running +// A Dataproc job for running // [Apache // PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html) // applications on YARN. message PySparkJob { // Required. The HCFS URI of the main Python file to use as the driver. Must // be a .py file. - string main_python_file_uri = 1; + string main_python_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The arguments to pass to the driver. Do not include arguments, // such as `--conf`, that can be set as job properties, since a collision may // occur that causes an incorrect job submission. - repeated string args = 2; + repeated string args = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS file URIs of Python files to pass to the PySpark // framework. Supported file types: .py, .egg, and .zip. - repeated string python_file_uris = 3; + repeated string python_file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of jar files to add to the CLASSPATHs of the // Python driver and tasks. - repeated string jar_file_uris = 4; + repeated string jar_file_uris = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of files to be copied to the working directory of // Python drivers and distributed tasks. Useful for naively parallel tasks. - repeated string file_uris = 5; + repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of archives to be extracted in the working directory of // .jar, .tar, .tar.gz, .tgz, and .zip. - repeated string archive_uris = 6; + repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names to values, used to configure PySpark. - // Properties that conflict with values set by the Cloud Dataproc API may be + // Properties that conflict with values set by the Dataproc API may be // overwritten. Can include properties set in // /etc/spark/conf/spark-defaults.conf and classes in user code. - map properties = 7; + map properties = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 8; + LoggingConfig logging_config = 8 [(google.api.field_behavior) = OPTIONAL]; } // A list of queries to run on a cluster. @@ -275,10 +299,10 @@ message QueryList { // ] // } // } - repeated string queries = 1; + repeated string queries = 1 [(google.api.field_behavior) = REQUIRED]; } -// A Cloud Dataproc job for running [Apache Hive](https://hive.apache.org/) +// A Dataproc job for running [Apache Hive](https://hive.apache.org/) // queries on YARN. message HiveJob { // Required. The sequence of Hive queries to execute, specified as either @@ -294,25 +318,25 @@ message HiveJob { // Optional. Whether to continue executing queries if a query fails. // The default value is `false`. Setting to `true` can be useful when // executing independent parallel queries. - bool continue_on_failure = 3; + bool continue_on_failure = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Mapping of query variable names to values (equivalent to the // Hive command: `SET name="value";`). - map script_variables = 4; + map script_variables = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names and values, used to configure Hive. - // Properties that conflict with values set by the Cloud Dataproc API may be + // Properties that conflict with values set by the Dataproc API may be // overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, // /etc/hive/conf/hive-site.xml, and classes in user code. - map properties = 5; + map properties = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of jar files to add to the CLASSPATH of the // Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes // and UDFs. - repeated string jar_file_uris = 6; + repeated string jar_file_uris = 6 [(google.api.field_behavior) = OPTIONAL]; } -// A Cloud Dataproc job for running [Apache Spark +// A Dataproc job for running [Apache Spark // SQL](http://spark.apache.org/sql/) queries. message SparkSqlJob { // Required. The sequence of Spark SQL queries to execute, specified as @@ -327,21 +351,21 @@ message SparkSqlJob { // Optional. Mapping of query variable names to values (equivalent to the // Spark SQL command: SET `name="value";`). - map script_variables = 3; + map script_variables = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names to values, used to configure // Spark SQL's SparkConf. Properties that conflict with values set by the - // Cloud Dataproc API may be overwritten. - map properties = 4; + // Dataproc API may be overwritten. + map properties = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. - repeated string jar_file_uris = 56; + repeated string jar_file_uris = 56 [(google.api.field_behavior) = OPTIONAL]; // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 6; + LoggingConfig logging_config = 6 [(google.api.field_behavior) = OPTIONAL]; } -// A Cloud Dataproc job for running [Apache Pig](https://pig.apache.org/) +// A Dataproc job for running [Apache Pig](https://pig.apache.org/) // queries on YARN. message PigJob { // Required. The sequence of Pig queries to execute, specified as an HCFS @@ -357,37 +381,105 @@ message PigJob { // Optional. Whether to continue executing queries if a query fails. // The default value is `false`. Setting to `true` can be useful when // executing independent parallel queries. - bool continue_on_failure = 3; + bool continue_on_failure = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Mapping of query variable names to values (equivalent to the Pig // command: `name=[value]`). - map script_variables = 4; + map script_variables = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names to values, used to configure Pig. - // Properties that conflict with values set by the Cloud Dataproc API may be + // Properties that conflict with values set by the Dataproc API may be // overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, // /etc/pig/conf/pig.properties, and classes in user code. - map properties = 5; + map properties = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of jar files to add to the CLASSPATH of // the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. - repeated string jar_file_uris = 6; + repeated string jar_file_uris = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The runtime log config for job execution. + LoggingConfig logging_config = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// A Dataproc job for running +// [Apache SparkR](https://spark.apache.org/docs/latest/sparkr.html) +// applications on YARN. +message SparkRJob { + // Required. The HCFS URI of the main R file to use as the driver. + // Must be a .R file. + string main_r_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The arguments to pass to the driver. Do not include arguments, + // such as `--conf`, that can be set as job properties, since a collision may + // occur that causes an incorrect job submission. + repeated string args = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. HCFS URIs of files to be copied to the working directory of + // R drivers and distributed tasks. Useful for naively parallel tasks. + repeated string file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. HCFS URIs of archives to be extracted in the working directory of + // Spark drivers and tasks. Supported file types: + // .jar, .tar, .tar.gz, .tgz, and .zip. + repeated string archive_uris = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A mapping of property names to values, used to configure SparkR. + // Properties that conflict with values set by the Dataproc API may be + // overwritten. Can include properties set in + // /etc/spark/conf/spark-defaults.conf and classes in user code. + map properties = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The runtime log config for job execution. + LoggingConfig logging_config = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A Dataproc job for running [Presto](https://prestosql.io/) queries. +// **IMPORTANT**: The [Dataproc Presto Optional +// Component](/dataproc/docs/concepts/components/presto) must be enabled when +// the cluster is created to submit a Presto job to the cluster. +message PrestoJob { + // Required. The sequence of Presto queries to execute, specified as + // either an HCFS file URI or as a list of queries. + oneof queries { + // The HCFS URI of the script that contains SQL queries. + string query_file_uri = 1; + + // A list of queries. + QueryList query_list = 2; + } + + // Optional. Whether to continue executing queries if a query fails. + // The default value is `false`. Setting to `true` can be useful when + // executing independent parallel queries. + bool continue_on_failure = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The format in which query output will be displayed. See the + // Presto documentation for supported output formats + string output_format = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Presto client tags to attach to this query + repeated string client_tags = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A mapping of property names to values. Used to set Presto + // [session properties](https://prestodb.io/docs/current/sql/set-session.html) + // Equivalent to using the --session flag in the Presto CLI + map properties = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 7; + LoggingConfig logging_config = 7 [(google.api.field_behavior) = OPTIONAL]; } -// Cloud Dataproc job config. +// Dataproc job config. message JobPlacement { // Required. The name of the cluster where the job will be submitted. - string cluster_name = 1; + string cluster_name = 1 [(google.api.field_behavior) = REQUIRED]; - // Output only. A cluster UUID generated by the Cloud Dataproc service when + // Output only. A cluster UUID generated by the Dataproc service when // the job is submitted. - string cluster_uuid = 2; + string cluster_uuid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Cloud Dataproc job status. +// Dataproc job status. message JobStatus { // The job state. enum State { @@ -445,7 +537,7 @@ message JobStatus { QUEUED = 2; // The agent-reported status is out of date, which may be caused by a - // loss of communication between the agent and Cloud Dataproc. If the + // loss of communication between the agent and Dataproc. If the // agent does not send a timely update, the job will fail. // // Applies to RUNNING state. @@ -453,25 +545,28 @@ message JobStatus { } // Output only. A state message specifying the overall job state. - State state = 1; + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Optional job state details, such as an error + // Optional. Output only. Job state details, such as an error // description if the state is ERROR. - string details = 2; + string details = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; // Output only. The time when this state was entered. - google.protobuf.Timestamp state_start_time = 6; + google.protobuf.Timestamp state_start_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Additional state information, which includes // status reported by the agent. - Substate substate = 7; + Substate substate = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Encapsulates the full scoping used to reference a job. message JobReference { // Required. The ID of the Google Cloud Platform project that the job // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The job ID, which must be unique within the project. // @@ -479,7 +574,7 @@ message JobReference { // underscores (_), or hyphens (-). The maximum length is 100 characters. // // If not specified by the caller, the job ID will be provided by the server. - string job_id = 2; + string job_id = 2 [(google.api.field_behavior) = OPTIONAL]; } // A YARN application created by a job. Application information is a subset of @@ -520,76 +615,82 @@ message YarnApplication { } // Required. The application name. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The application state. - State state = 2; + State state = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The numerical progress of the application, from 1 to 100. - float progress = 3; + float progress = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or // TimelineServer that provides application-specific information. The URL uses // the internal hostname, and requires a proxy server for resolution and, // possibly, access. - string tracking_url = 4; + string tracking_url = 4 [(google.api.field_behavior) = OPTIONAL]; } -// A Cloud Dataproc job resource. +// A Dataproc job resource. message Job { // Optional. The fully qualified reference to the job, which can be used to // obtain the equivalent REST path of the job resource. If this property // is not specified when a job is created, the server generates a // job_id. - JobReference reference = 1; + JobReference reference = 1 [(google.api.field_behavior) = OPTIONAL]; // Required. Job information, including how, when, and where to // run the job. - JobPlacement placement = 2; + JobPlacement placement = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The application/framework-specific portion of the job. oneof type_job { - // Job is a Hadoop job. - HadoopJob hadoop_job = 3; + // Optional. Job is a Hadoop job. + HadoopJob hadoop_job = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Job is a Spark job. + SparkJob spark_job = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Job is a PySpark job. + PySparkJob pyspark_job = 5 [(google.api.field_behavior) = OPTIONAL]; - // Job is a Spark job. - SparkJob spark_job = 4; + // Optional. Job is a Hive job. + HiveJob hive_job = 6 [(google.api.field_behavior) = OPTIONAL]; - // Job is a Pyspark job. - PySparkJob pyspark_job = 5; + // Optional. Job is a Pig job. + PigJob pig_job = 7 [(google.api.field_behavior) = OPTIONAL]; - // Job is a Hive job. - HiveJob hive_job = 6; + // Optional. Job is a SparkR job. + SparkRJob spark_r_job = 21 [(google.api.field_behavior) = OPTIONAL]; - // Job is a Pig job. - PigJob pig_job = 7; + // Optional. Job is a SparkSql job. + SparkSqlJob spark_sql_job = 12 [(google.api.field_behavior) = OPTIONAL]; - // Job is a SparkSql job. - SparkSqlJob spark_sql_job = 12; + // Optional. Job is a Presto job. + PrestoJob presto_job = 23 [(google.api.field_behavior) = OPTIONAL]; } // Output only. The job status. Additional application-specific // status information may be contained in the type_job // and yarn_applications fields. - JobStatus status = 8; + JobStatus status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The previous job status. - repeated JobStatus status_history = 13; + repeated JobStatus status_history = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The collection of YARN applications spun up by this job. // // **Beta** Feature: This report is available for testing purposes only. It // may be changed before final release. - repeated YarnApplication yarn_applications = 9; + repeated YarnApplication yarn_applications = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A URI pointing to the location of the stdout of the job's // driver program. - string driver_output_resource_uri = 17; + string driver_output_resource_uri = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. If present, the location of miscellaneous control files // which may be used as part of job setup and handling. If not present, // control files may be placed in the same location as `driver_output_uri`. - string driver_control_files_uri = 15; + string driver_control_files_uri = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The labels to associate with this job. // Label **keys** must contain 1 to 63 characters, and must conform to @@ -598,15 +699,21 @@ message Job { // characters, and must conform to [RFC // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be // associated with a job. - map labels = 18; + map labels = 18 [(google.api.field_behavior) = OPTIONAL]; // Optional. Job scheduling configuration. - JobScheduling scheduling = 20; + JobScheduling scheduling = 20 [(google.api.field_behavior) = OPTIONAL]; // Output only. A UUID that uniquely identifies a job within the project // over time. This is in contrast to a user-settable reference.job_id that // may be reused over time. - string job_uuid = 22; + string job_uuid = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether the job is completed. If the value is `false`, + // the job is still in progress. If `true`, the job is completed, and + // `status.state` field will indicate if it was successful, failed, + // or cancelled. + bool done = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Job scheduling options. @@ -619,20 +726,20 @@ message JobScheduling { // 4 times within 10 minute window. // // Maximum value is 10. - int32 max_failures_per_hour = 1; + int32 max_failures_per_hour = 1 [(google.api.field_behavior) = OPTIONAL]; } // A request to submit a job. message SubmitJobRequest { // Required. The ID of the Google Cloud Platform project that the job // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The job resource. - Job job = 2; + Job job = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. A unique id used to identify the request. If the server // receives two [SubmitJobRequest][google.cloud.dataproc.v1.SubmitJobRequest] requests with the same @@ -645,20 +752,35 @@ message SubmitJobRequest { // // The id must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 4; + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Job Operation metadata. +message JobMetadata { + // Output only. The job id. + string job_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Most recent job status. + JobStatus status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Operation type. + string operation_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Job submission time. + google.protobuf.Timestamp start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to get the resource representation for a job in a project. message GetJobRequest { // Required. The ID of the Google Cloud Platform project that the job // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The job ID. - string job_id = 2; + string job_id = 2 [(google.api.field_behavior) = REQUIRED]; } // A request to list jobs in a project. @@ -678,27 +800,27 @@ message ListJobsRequest { // Required. The ID of the Google Cloud Platform project that the job // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 6; + // Required. The Dataproc region in which to handle the request. + string region = 6 [(google.api.field_behavior) = REQUIRED]; // Optional. The number of results to return in each response. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The page token, returned by a previous call, to request the // next page of results. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. If set, the returned jobs list includes only jobs that were // submitted to the named cluster. - string cluster_name = 4; + string cluster_name = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Specifies enumerated categories of jobs to list. // (default = match ALL jobs). // // If `filter` is provided, `jobStateMatcher` will be ignored. - JobStateMatcher job_state_matcher = 5; + JobStateMatcher job_state_matcher = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. A filter constraining the jobs to list. Filters are // case-sensitive and have the following syntax: @@ -714,23 +836,23 @@ message ListJobsRequest { // Example filter: // // status.state = ACTIVE AND labels.env = staging AND labels.starred = * - string filter = 7; + string filter = 7 [(google.api.field_behavior) = OPTIONAL]; } // A request to update a job. message UpdateJobRequest { // Required. The ID of the Google Cloud Platform project that the job // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 2; + // Required. The Dataproc region in which to handle the request. + string region = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The job ID. - string job_id = 3; + string job_id = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The changes to the job. - Job job = 4; + Job job = 4 [(google.api.field_behavior) = REQUIRED]; // Required. Specifies the path, relative to Job, of // the field to update. For example, to update the labels of a Job the @@ -738,42 +860,42 @@ message UpdateJobRequest { // labels, and the `PATCH` request body would specify the new // value. Note: Currently, labels is the only // field that can be updated. - google.protobuf.FieldMask update_mask = 5; + google.protobuf.FieldMask update_mask = 5 [(google.api.field_behavior) = REQUIRED]; } // A list of jobs in a project. message ListJobsResponse { // Output only. Jobs list. - repeated Job jobs = 1; + repeated Job jobs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. This token is included in the response if there are more results // to fetch. To fetch additional results, provide this value as the // `page_token` in a subsequent ListJobsRequest. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; } // A request to cancel a job. message CancelJobRequest { // Required. The ID of the Google Cloud Platform project that the job // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The job ID. - string job_id = 2; + string job_id = 2 [(google.api.field_behavior) = REQUIRED]; } // A request to delete a job. message DeleteJobRequest { // Required. The ID of the Google Cloud Platform project that the job // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The job ID. - string job_id = 2; + string job_id = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/cloud/dataproc/v1/operations.proto b/google/cloud/dataproc/v1/operations.proto index c820cd8e6..724d2a895 100644 --- a/google/cloud/dataproc/v1/operations.proto +++ b/google/cloud/dataproc/v1/operations.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dataproc.v1; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc"; option java_multiple_files = true; @@ -43,41 +43,41 @@ message ClusterOperationStatus { } // Output only. A message containing the operation state. - State state = 1; + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A message containing the detailed operation state. - string inner_state = 2; + string inner_state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A message containing any operation metadata details. - string details = 3; + string details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time this state was entered. - google.protobuf.Timestamp state_start_time = 4; + google.protobuf.Timestamp state_start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Metadata describing the operation. message ClusterOperationMetadata { // Output only. Name of the cluster for the operation. - string cluster_name = 7; + string cluster_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Cluster UUID for the operation. - string cluster_uuid = 8; + string cluster_uuid = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Current operation status. - ClusterOperationStatus status = 9; + ClusterOperationStatus status = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The previous operation status. - repeated ClusterOperationStatus status_history = 10; + repeated ClusterOperationStatus status_history = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The operation type. - string operation_type = 11; + string operation_type = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Short description of operation. - string description = 12; + string description = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Labels associated with the operation - map labels = 13; + map labels = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Errors encountered during operation execution. - repeated string warnings = 14; + repeated string warnings = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/cloud/dataproc/v1/shared.proto b/google/cloud/dataproc/v1/shared.proto index 74bd56a80..99d6e7760 100644 --- a/google/cloud/dataproc/v1/shared.proto +++ b/google/cloud/dataproc/v1/shared.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -38,6 +37,12 @@ enum Component { // The Jupyter Notebook. JUPYTER = 1; + // The Presto query engine. + PRESTO = 6; + // The Zeppelin notebook. ZEPPELIN = 4; + + // The Zookeeper service. + ZOOKEEPER = 8; } diff --git a/google/cloud/dataproc/v1/workflow_templates.proto b/google/cloud/dataproc/v1/workflow_templates.proto index 61295a550..d1cfcc09f 100644 --- a/google/cloud/dataproc/v1/workflow_templates.proto +++ b/google/cloud/dataproc/v1/workflow_templates.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dataproc.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/dataproc/v1/clusters.proto"; import "google/cloud/dataproc/v1/jobs.proto"; import "google/longrunning/operations.proto"; @@ -30,8 +32,11 @@ option java_outer_classname = "WorkflowTemplatesProto"; option java_package = "com.google.cloud.dataproc.v1"; // The API interface for managing Workflow Templates in the -// Cloud Dataproc API. +// Dataproc API. service WorkflowTemplateService { + option (google.api.default_host) = "dataproc.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Creates new workflow template. rpc CreateWorkflowTemplate(CreateWorkflowTemplateRequest) returns (WorkflowTemplate) { option (google.api.http) = { @@ -42,6 +47,7 @@ service WorkflowTemplateService { body: "template" } }; + option (google.api.method_signature) = "parent,template"; } // Retrieves the latest workflow template. @@ -55,6 +61,7 @@ service WorkflowTemplateService { get: "/v1/{name=projects/*/regions/*/workflowTemplates/*}" } }; + option (google.api.method_signature) = "name"; } // Instantiates a template and begins execution. @@ -70,7 +77,9 @@ service WorkflowTemplateService { // clusters to be deleted. // // The [Operation.metadata][google.longrunning.Operation.metadata] will be - // [WorkflowMetadata][google.cloud.dataproc.v1.WorkflowMetadata]. + // [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). + // Also see [Using + // WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). // // On successful completion, // [Operation.response][google.longrunning.Operation.response] will be @@ -84,6 +93,12 @@ service WorkflowTemplateService { body: "*" } }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,parameters"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "WorkflowMetadata" + }; } // Instantiates a template and begins execution. @@ -103,7 +118,9 @@ service WorkflowTemplateService { // clusters to be deleted. // // The [Operation.metadata][google.longrunning.Operation.metadata] will be - // [WorkflowMetadata][google.cloud.dataproc.v1.WorkflowMetadata]. + // [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). + // Also see [Using + // WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). // // On successful completion, // [Operation.response][google.longrunning.Operation.response] will be @@ -117,6 +134,11 @@ service WorkflowTemplateService { body: "template" } }; + option (google.api.method_signature) = "parent,template"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "WorkflowMetadata" + }; } // Updates (replaces) workflow template. The updated template @@ -130,6 +152,7 @@ service WorkflowTemplateService { body: "template" } }; + option (google.api.method_signature) = "template"; } // Lists workflows that match the specified filter in the request. @@ -140,6 +163,7 @@ service WorkflowTemplateService { get: "/v1/{parent=projects/*/regions/*}/workflowTemplates" } }; + option (google.api.method_signature) = "parent"; } // Deletes a workflow template. It does not cancel in-progress workflows. @@ -150,22 +174,32 @@ service WorkflowTemplateService { delete: "/v1/{name=projects/*/regions/*/workflowTemplates/*}" } }; + option (google.api.method_signature) = "name"; } } -// A Cloud Dataproc workflow template resource. +// A Dataproc workflow template resource. message WorkflowTemplate { - // Required. The template id. - // - // The id must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), and hyphens (-). Cannot begin or end with underscore - // or hyphen. Must consist of between 3 and 50 characters. - string id = 2; + option (google.api.resource) = { + type: "dataproc.googleapis.com/WorkflowTemplate" + pattern: "projects/{project}/regions/{region}/workflowTemplates/{workflow_template}" + pattern: "projects/{project}/locations/{location}/workflowTemplates/{workflow_template}" + history: ORIGINALLY_SINGLE_PATTERN + }; - // Output only. The "resource name" of the template, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - string name = 1; + string id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The resource name of the workflow template, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates`, the resource name of the + // template has the following format: + // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` + // + // * For `projects.locations.workflowTemplates`, the resource name of the + // template has the following format: + // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. Used to perform a consistent read-modify-write. // @@ -176,13 +210,13 @@ message WorkflowTemplate { // the current template with the `version` field filled in with the // current server version. The user updates other fields in the template, // then returns it as part of the `UpdateWorkflowTemplate` request. - int32 version = 3; + int32 version = 3 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time template was created. - google.protobuf.Timestamp create_time = 4; + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time template was last updated. - google.protobuf.Timestamp update_time = 5; + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The labels to associate with this template. These labels // will be propagated to all jobs and clusters created by the workflow @@ -196,18 +230,18 @@ message WorkflowTemplate { // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). // // No more than 32 labels can be associated with a template. - map labels = 6; + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; // Required. WorkflowTemplate scheduling information. - WorkflowTemplatePlacement placement = 7; + WorkflowTemplatePlacement placement = 7 [(google.api.field_behavior) = REQUIRED]; // Required. The Directed Acyclic Graph of Jobs to submit. - repeated OrderedJob jobs = 8; + repeated OrderedJob jobs = 8 [(google.api.field_behavior) = REQUIRED]; - // Optional. Template parameters whose values are substituted into the + // Optional. emplate parameters whose values are substituted into the // template. Values for parameters must be provided when the template is // instantiated. - repeated TemplateParameter parameters = 9; + repeated TemplateParameter parameters = 9 [(google.api.field_behavior) = OPTIONAL]; } // Specifies workflow execution target. @@ -217,7 +251,7 @@ message WorkflowTemplatePlacement { // Required. Specifies where workflow executes; either on a managed // cluster or an existing cluster chosen by labels. oneof placement { - // Optional. A cluster that is managed by the workflow. + // A cluster that is managed by the workflow. ManagedCluster managed_cluster = 1; // Optional. A selector that chooses target cluster for jobs based @@ -236,10 +270,10 @@ message ManagedCluster { // The name must contain only lower-case letters (a-z), numbers (0-9), // and hyphens (-). Must begin with a letter. Cannot begin or end with // hyphen. Must consist of between 2 and 35 characters. - string cluster_name = 2; + string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The cluster configuration. - ClusterConfig config = 3; + ClusterConfig config = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. The labels to associate with this cluster. // @@ -251,7 +285,7 @@ message ManagedCluster { // the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} // // No more than 32 labels can be associated with a given cluster. - map labels = 4; + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; } // A selector that chooses target cluster for jobs based on metadata. @@ -261,11 +295,11 @@ message ClusterSelector { // // If unspecified, the zone of the first cluster matching the selector // is used. - string zone = 1; + string zone = 1 [(google.api.field_behavior) = OPTIONAL]; // Required. The cluster labels. Cluster must have all labels // to match. - map cluster_labels = 2; + map cluster_labels = 2 [(google.api.field_behavior) = REQUIRED]; } // A job executed by the workflow. @@ -281,27 +315,27 @@ message OrderedJob { // The id must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). Cannot begin or end with underscore // or hyphen. Must consist of between 3 and 50 characters. - string step_id = 1; + string step_id = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The job definition. oneof job_type { - // Job is a Hadoop job. HadoopJob hadoop_job = 2; - // Job is a Spark job. SparkJob spark_job = 3; - // Job is a Pyspark job. PySparkJob pyspark_job = 4; - // Job is a Hive job. HiveJob hive_job = 5; - // Job is a Pig job. PigJob pig_job = 6; - // Job is a SparkSql job. + // Spark R job + SparkRJob spark_r_job = 11; + SparkSqlJob spark_sql_job = 7; + + // Presto job + PrestoJob presto_job = 12; } // Optional. The labels to associate with this job. @@ -314,14 +348,14 @@ message OrderedJob { // the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} // // No more than 32 labels can be associated with a given job. - map labels = 8; + map labels = 8 [(google.api.field_behavior) = OPTIONAL]; // Optional. Job scheduling configuration. - JobScheduling scheduling = 9; + JobScheduling scheduling = 9 [(google.api.field_behavior) = OPTIONAL]; // Optional. The optional list of prerequisite job step_ids. // If not specified, the job will start at the beginning of workflow. - repeated string prerequisite_step_ids = 10; + repeated string prerequisite_step_ids = 10 [(google.api.field_behavior) = OPTIONAL]; } // A configurable parameter that replaces one or more fields in the template. @@ -334,14 +368,14 @@ message OrderedJob { // - Main class (in HadoopJob and SparkJob) // - Zone (in ClusterSelector) message TemplateParameter { - // Required. Parameter name. + // Required. Parameter name. // The parameter name is used as the key, and paired with the // parameter value, which are passed to the template when the template // is instantiated. // The name must contain only capital letters (A-Z), numbers (0-9), and // underscores (_), and must not start with a number. The maximum length is // 40 characters. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Paths to all fields that the parameter replaces. // A field is allowed to appear in at most one parameter's list of field @@ -387,14 +421,14 @@ message TemplateParameter { // // - placement.clusterSelector.clusterLabels // - jobs['step-id'].sparkJob.args - repeated string fields = 2; + repeated string fields = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Brief description of the parameter. // Must not exceed 1024 characters. - string description = 3; + string description = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Validation rules to be applied to this parameter's value. - ParameterValidation validation = 4; + ParameterValidation validation = 4 [(google.api.field_behavior) = OPTIONAL]; } // Configuration for parameter validation. @@ -414,16 +448,16 @@ message RegexValidation { // Required. RE2 regular expressions used to validate the parameter's value. // The value must match the regex in its entirety (substring // matches are not sufficient). - repeated string regexes = 1; + repeated string regexes = 1 [(google.api.field_behavior) = REQUIRED]; } // Validation based on a list of allowed values. message ValueValidation { // Required. List of allowed values for the parameter. - repeated string values = 1; + repeated string values = 1 [(google.api.field_behavior) = REQUIRED]; } -// A Cloud Dataproc workflow template resource. +// A Dataproc workflow template resource. message WorkflowMetadata { // The operation state. enum State { @@ -440,57 +474,66 @@ message WorkflowMetadata { DONE = 3; } - // Output only. The "resource name" of the template. - string template = 1; + // Output only. The resource name of the workflow template as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates`, the resource name of the + // template has the following format: + // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` + // + // * For `projects.locations.workflowTemplates`, the resource name of the + // template has the following format: + // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` + string template = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The version of template at the time of // workflow instantiation. - int32 version = 2; + int32 version = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The create cluster operation metadata. - ClusterOperation create_cluster = 3; + ClusterOperation create_cluster = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The workflow graph. - WorkflowGraph graph = 4; + WorkflowGraph graph = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The delete cluster operation metadata. - ClusterOperation delete_cluster = 5; + ClusterOperation delete_cluster = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The workflow state. - State state = 6; + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The name of the target cluster. - string cluster_name = 7; + string cluster_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Map from parameter names to values that were used for those parameters. map parameters = 8; // Output only. Workflow start time. - google.protobuf.Timestamp start_time = 9; + google.protobuf.Timestamp start_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Workflow end time. - google.protobuf.Timestamp end_time = 10; + google.protobuf.Timestamp end_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The UUID of target cluster. - string cluster_uuid = 11; + string cluster_uuid = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The cluster operation triggered by a workflow. message ClusterOperation { // Output only. The id of the cluster operation. - string operation_id = 1; + string operation_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Error, if operation failed. - string error = 2; + string error = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Indicates the operation is done. - bool done = 3; + bool done = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The workflow graph. message WorkflowGraph { // Output only. The workflow nodes. - repeated WorkflowNode nodes = 1; + repeated WorkflowNode nodes = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The workflow node. @@ -518,52 +561,88 @@ message WorkflowNode { } // Output only. The name of the node. - string step_id = 1; + string step_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Node's prerequisite nodes. - repeated string prerequisite_step_ids = 2; + repeated string prerequisite_step_ids = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The job id; populated after the node enters RUNNING state. - string job_id = 3; + string job_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The node state. - NodeState state = 5; + NodeState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The error detail. - string error = 6; + string error = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to create a workflow template. message CreateWorkflowTemplateRequest { - // Required. The "resource name" of the region, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}` - string parent = 1; + // Required. The resource name of the region or location, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates,create`, the resource name of the + // region has the following format: + // `projects/{project_id}/regions/{region}` + // + // * For `projects.locations.workflowTemplates.create`, the resource name of + // the location has the following format: + // `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dataproc.googleapis.com/WorkflowTemplate" + } + ]; // Required. The Dataproc workflow template to create. - WorkflowTemplate template = 2; + WorkflowTemplate template = 2 [(google.api.field_behavior) = REQUIRED]; } // A request to fetch a workflow template. message GetWorkflowTemplateRequest { - // Required. The "resource name" of the workflow template, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - string name = 1; + // Required. The resource name of the workflow template, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates.get`, the resource name of the + // template has the following format: + // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` + // + // * For `projects.locations.workflowTemplates.get`, the resource name of the + // template has the following format: + // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataproc.googleapis.com/WorkflowTemplate" + } + ]; // Optional. The version of workflow template to retrieve. Only previously - // instatiated versions can be retrieved. + // instantiated versions can be retrieved. // // If unspecified, retrieves the current version. - int32 version = 2; + int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; } // A request to instantiate a workflow template. message InstantiateWorkflowTemplateRequest { - // Required. The "resource name" of the workflow template, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - string name = 1; + // Required. The resource name of the workflow template, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates.instantiate`, the resource name + // of the template has the following format: + // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` + // + // * For `projects.locations.workflowTemplates.instantiate`, the resource name + // of the template has the following format: + // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataproc.googleapis.com/WorkflowTemplate" + } + ]; // Optional. The version of workflow template to instantiate. If specified, // the workflow will be instantiated only if the current version of @@ -571,7 +650,7 @@ message InstantiateWorkflowTemplateRequest { // // This option cannot be used to instantiate a previous version of // workflow template. - int32 version = 2; + int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A tag that prevents multiple concurrent workflow // instances with the same tag from running. This mitigates risk of @@ -582,22 +661,34 @@ message InstantiateWorkflowTemplateRequest { // // The tag must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 5; + string request_id = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. Map from parameter names to values that should be used for those // parameters. Values may not exceed 100 characters. - map parameters = 6; + map parameters = 6 [(google.api.field_behavior) = OPTIONAL]; } // A request to instantiate an inline workflow template. message InstantiateInlineWorkflowTemplateRequest { - // Required. The "resource name" of the workflow template region, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}` - string parent = 1; + // Required. The resource name of the region or location, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates,instantiateinline`, the resource + // name of the region has the following format: + // `projects/{project_id}/regions/{region}` + // + // * For `projects.locations.workflowTemplates.instantiateinline`, the + // resource name of the location has the following format: + // `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dataproc.googleapis.com/WorkflowTemplate" + } + ]; // Required. The workflow template to instantiate. - WorkflowTemplate template = 2; + WorkflowTemplate template = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. A tag that prevents multiple concurrent workflow // instances with the same tag from running. This mitigates risk of @@ -608,7 +699,7 @@ message InstantiateInlineWorkflowTemplateRequest { // // The tag must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 3; + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; } // A request to update a workflow template. @@ -616,46 +707,70 @@ message UpdateWorkflowTemplateRequest { // Required. The updated workflow template. // // The `template.version` field must match the current version. - WorkflowTemplate template = 1; + WorkflowTemplate template = 1 [(google.api.field_behavior) = REQUIRED]; } // A request to list workflow templates in a project. message ListWorkflowTemplatesRequest { - // Required. The "resource name" of the region, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}` - string parent = 1; + // Required. The resource name of the region or location, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates,list`, the resource + // name of the region has the following format: + // `projects/{project_id}/regions/{region}` + // + // * For `projects.locations.workflowTemplates.list`, the + // resource name of the location has the following format: + // `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dataproc.googleapis.com/WorkflowTemplate" + } + ]; // Optional. The maximum number of results to return in each response. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The page token, returned by a previous call, to request the // next page of results. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // A response to a request to list workflow templates in a project. message ListWorkflowTemplatesResponse { // Output only. WorkflowTemplates list. - repeated WorkflowTemplate templates = 1; + repeated WorkflowTemplate templates = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. This token is included in the response if there are more // results to fetch. To fetch additional results, provide this value as the // page_token in a subsequent ListWorkflowTemplatesRequest. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to delete a workflow template. // // Currently started workflows will remain running. message DeleteWorkflowTemplateRequest { - // Required. The "resource name" of the workflow template, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - string name = 1; + // Required. The resource name of the workflow template, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates.delete`, the resource name + // of the template has the following format: + // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` + // + // * For `projects.locations.workflowTemplates.instantiate`, the resource name + // of the template has the following format: + // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataproc.googleapis.com/WorkflowTemplate" + } + ]; // Optional. The version of workflow template to delete. If specified, // will only delete the template if the current server version matches // specified version. - int32 version = 2; + int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/google/cloud/dataproc/v1beta2/BUILD.bazel b/google/cloud/dataproc/v1beta2/BUILD.bazel index 9c73c96c8..62fa2a5a3 100644 --- a/google/cloud/dataproc/v1beta2/BUILD.bazel +++ b/google/cloud/dataproc/v1beta2/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -18,6 +21,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/longrunning:operations_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:empty_proto", @@ -28,7 +34,10 @@ proto_library( proto_library_with_info( name = "dataproc_proto_with_info", - deps = [":dataproc_proto"], + deps = [ + ":dataproc_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -36,18 +45,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "dataproc_java_proto", deps = [":dataproc_proto"], @@ -56,53 +60,43 @@ java_proto_library( java_grpc_library( name = "dataproc_java_grpc", srcs = [":dataproc_proto"], - deps = [":dataproc_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "dataproc_resource_name_java_proto", - gapic_yaml = "dataproc_gapic.yaml", - deps = [":dataproc_proto"], + deps = [":dataproc_java_proto"], ) java_gapic_library( name = "dataproc_java_gapic", src = ":dataproc_proto_with_info", gapic_yaml = "dataproc_gapic.yaml", - service_yaml = "dataproc.yaml", - test_deps = [":dataproc_java_grpc"], + package = "google.cloud.dataproc.v1beta2", + service_yaml = "dataproc_v1beta2.yaml", + test_deps = [ + ":dataproc_java_grpc", + ], deps = [ ":dataproc_java_proto", - ":dataproc_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":dataproc_java_gapic_test", +java_gapic_test( + name = "dataproc_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.dataproc.v1beta2.AutoscalingPolicyServiceClientTest", + "com.google.cloud.dataproc.v1beta2.ClusterControllerClientTest", + "com.google.cloud.dataproc.v1beta2.JobControllerClientTest", + "com.google.cloud.dataproc.v1beta2.WorkflowTemplateServiceClientTest", ], -) for test_name in [ - "com.google.cloud.dataproc.v1beta2.ClusterControllerClientTest", - "com.google.cloud.dataproc.v1beta2.JobControllerClientTest", - "com.google.cloud.dataproc.v1beta2.WorkflowTemplateServiceClientTest", -]] + runtime_deps = [":dataproc_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-dataproc-v1beta2-java", - client_deps = [":dataproc_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":dataproc_java_gapic_test"], - grpc_deps = [":dataproc_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":dataproc_java_gapic", + ":dataproc_java_grpc", ":dataproc_java_proto", ":dataproc_proto", - ":dataproc_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -110,10 +104,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -129,15 +123,17 @@ go_proto_library( go_gapic_library( name = "dataproc_go_gapic", - src = ":dataproc_proto_with_info", - gapic_yaml = "dataproc_gapic.yaml", - importpath = "cloud.google.com/go/dataproc/apiv1beta2", - service_yaml = "dataproc.yaml", + srcs = [":dataproc_proto_with_info"], + grpc_service_config = "dataproc_grpc_service_config.json", + importpath = "cloud.google.com/go/dataproc/apiv1beta2;dataproc", + service_yaml = "dataproc_v1beta2.yaml", deps = [ ":dataproc_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", ], ) @@ -148,13 +144,237 @@ go_test( importpath = "cloud.google.com/go/dataproc/apiv1beta2", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-dataproc-v1beta2-go", deps = [ ":dataproc_go_gapic", - ":dataproc_go_gapic_srcjar-smoke-test.srcjar", ":dataproc_go_gapic_srcjar-test.srcjar", ":dataproc_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "dataproc_moved_proto", + srcs = [":dataproc_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "dataproc_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":dataproc_moved_proto"], +) + +py_grpc_library( + name = "dataproc_py_grpc", + srcs = [":dataproc_moved_proto"], + deps = [":dataproc_py_proto"], +) + +py_gapic_library( + name = "dataproc_py_gapic", + src = ":dataproc_proto_with_info", + gapic_yaml = "dataproc_gapic.yaml", + package = "google.cloud.dataproc.v1beta2", + service_yaml = "dataproc_v1beta2.yaml", + deps = [ + ":dataproc_py_grpc", + ":dataproc_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "dataproc-v1beta2-py", + deps = [ + ":dataproc_py_gapic", + ":dataproc_py_grpc", + ":dataproc_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "dataproc_php_proto", + deps = [":dataproc_proto"], +) + +php_grpc_library( + name = "dataproc_php_grpc", + srcs = [":dataproc_proto"], + deps = [":dataproc_php_proto"], +) + +php_gapic_library( + name = "dataproc_php_gapic", + src = ":dataproc_proto_with_info", + gapic_yaml = "dataproc_gapic.yaml", + package = "google.cloud.dataproc.v1beta2", + service_yaml = "dataproc_v1beta2.yaml", + deps = [ + ":dataproc_php_grpc", + ":dataproc_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-dataproc-v1beta2-php", + deps = [ + ":dataproc_php_gapic", + ":dataproc_php_grpc", + ":dataproc_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "dataproc_nodejs_gapic", + src = ":dataproc_proto_with_info", + gapic_yaml = "dataproc_gapic.yaml", + package = "google.cloud.dataproc.v1beta2", + service_yaml = "dataproc_v1beta2.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "dataproc-v1beta2-nodejs", + deps = [ + ":dataproc_nodejs_gapic", + ":dataproc_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "dataproc_ruby_proto", + deps = [":dataproc_proto"], +) + +ruby_grpc_library( + name = "dataproc_ruby_grpc", + srcs = [":dataproc_proto"], + deps = [":dataproc_ruby_proto"], +) + +ruby_gapic_library( + name = "dataproc_ruby_gapic", + src = ":dataproc_proto_with_info", + gapic_yaml = "dataproc_gapic.yaml", + package = "google.cloud.dataproc.v1beta2", + service_yaml = "dataproc_v1beta2.yaml", + deps = [ + ":dataproc_ruby_grpc", + ":dataproc_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-dataproc-v1beta2-ruby", + deps = [ + ":dataproc_ruby_gapic", + ":dataproc_ruby_grpc", + ":dataproc_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "dataproc_csharp_proto", + deps = [":dataproc_proto"], +) + +csharp_grpc_library( + name = "dataproc_csharp_grpc", + srcs = [":dataproc_proto"], + deps = [":dataproc_csharp_proto"], +) + +csharp_gapic_library( + name = "dataproc_csharp_gapic", + src = ":dataproc_proto_with_info", + gapic_yaml = "dataproc_gapic.yaml", + package = "google.cloud.dataproc.v1beta2", + service_yaml = "dataproc_v1beta2.yaml", + deps = [ + ":dataproc_csharp_grpc", + ":dataproc_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-dataproc-v1beta2-csharp", + deps = [ + ":dataproc_csharp_gapic", + ":dataproc_csharp_grpc", + ":dataproc_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/dataproc/v1beta2/autoscaling_policies.proto b/google/cloud/dataproc/v1beta2/autoscaling_policies.proto index 0c3efbd06..a7d6376be 100644 --- a/google/cloud/dataproc/v1beta2/autoscaling_policies.proto +++ b/google/cloud/dataproc/v1beta2/autoscaling_policies.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,28 +11,33 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dataproc.v1beta2; import "google/api/annotations.proto"; -import "google/cloud/dataproc/v1beta2/clusters.proto"; -import "google/cloud/dataproc/v1beta2/jobs.proto"; -import "google/longrunning/operations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1beta2;dataproc"; option java_multiple_files = true; option java_outer_classname = "AutoscalingPoliciesProto"; option java_package = "com.google.cloud.dataproc.v1beta2"; +option (google.api.resource_definition) = { + type: "dataproc.googleapis.com/Region" + pattern: "projects/{project}/regions/{region}" +}; // The API interface for managing autoscaling policies in the -// Google Cloud Dataproc API. +// Cloud Dataproc API. service AutoscalingPolicyService { + option (google.api.default_host) = "dataproc.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Creates new autoscaling policy. rpc CreateAutoscalingPolicy(CreateAutoscalingPolicyRequest) returns (AutoscalingPolicy) { option (google.api.http) = { @@ -43,6 +48,7 @@ service AutoscalingPolicyService { body: "policy" } }; + option (google.api.method_signature) = "parent,policy"; } // Updates (replaces) autoscaling policy. @@ -58,6 +64,7 @@ service AutoscalingPolicyService { body: "policy" } }; + option (google.api.method_signature) = "policy"; } // Retrieves autoscaling policy. @@ -68,6 +75,7 @@ service AutoscalingPolicyService { get: "/v1beta2/{name=projects/*/regions/*/autoscalingPolicies/*}" } }; + option (google.api.method_signature) = "name"; } // Lists autoscaling policies in the project. @@ -78,6 +86,7 @@ service AutoscalingPolicyService { get: "/v1beta2/{parent=projects/*/regions/*}/autoscalingPolicies" } }; + option (google.api.method_signature) = "parent"; } // Deletes an autoscaling policy. It is an error to delete an autoscaling @@ -89,22 +98,37 @@ service AutoscalingPolicyService { delete: "/v1beta2/{name=projects/*/regions/*/autoscalingPolicies/*}" } }; + option (google.api.method_signature) = "name"; } } // Describes an autoscaling policy for Dataproc cluster autoscaler. message AutoscalingPolicy { + option (google.api.resource) = { + type: "dataproc.googleapis.com/AutoscalingPolicy" + pattern: "projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}" + pattern: "projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy}" + history: ORIGINALLY_SINGLE_PATTERN + }; + // Required. The policy id. // // The id must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). Cannot begin or end with underscore // or hyphen. Must consist of between 3 and 50 characters. - string id = 1; + string id = 1 [(google.api.field_behavior) = REQUIRED]; - // Output only. The "resource name" of the policy, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`. - string name = 2; + // Output only. The "resource name" of the autoscaling policy, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.autoscalingPolicies`, the resource name of the + // policy has the following format: + // `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` + // + // * For `projects.locations.autoscalingPolicies`, the resource name of the + // policy has the following format: + // `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` + string name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. Autoscaling algorithm for policy. oneof algorithm { @@ -112,22 +136,22 @@ message AutoscalingPolicy { } // Required. Describes how the autoscaler will operate for primary workers. - InstanceGroupAutoscalingPolicyConfig worker_config = 4; + InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(google.api.field_behavior) = REQUIRED]; // Optional. Describes how the autoscaler will operate for secondary workers. - InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5; + InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(google.api.field_behavior) = OPTIONAL]; } // Basic algorithm for autoscaling. message BasicAutoscalingAlgorithm { // Required. YARN autoscaling configuration. - BasicYarnAutoscalingConfig yarn_config = 1; + BasicYarnAutoscalingConfig yarn_config = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Duration between scaling events. A scaling period starts after // the update operation from the previous event has completed. // // Bounds: [2m, 1d]. Default: 2m. - google.protobuf.Duration cooldown_period = 2; + google.protobuf.Duration cooldown_period = 2 [(google.api.field_behavior) = OPTIONAL]; } // Basic autoscaling configurations for YARN. @@ -138,7 +162,7 @@ message BasicYarnAutoscalingConfig { // downscaling operations. // // Bounds: [0s, 1d]. - google.protobuf.Duration graceful_decommission_timeout = 5; + google.protobuf.Duration graceful_decommission_timeout = 5 [(google.api.field_behavior) = REQUIRED]; // Required. Fraction of average pending memory in the last cooldown period // for which to add workers. A scale-up factor of 1.0 will result in scaling @@ -147,7 +171,7 @@ message BasicYarnAutoscalingConfig { // magnitude of scaling up (less aggressive scaling). // // Bounds: [0.0, 1.0]. - double scale_up_factor = 1; + double scale_up_factor = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Fraction of average pending memory in the last cooldown period // for which to remove workers. A scale-down factor of 1 will result in @@ -156,7 +180,7 @@ message BasicYarnAutoscalingConfig { // removing workers, which can be beneficial for autoscaling a single job. // // Bounds: [0.0, 1.0]. - double scale_down_factor = 2; + double scale_down_factor = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Minimum scale-up threshold as a fraction of total cluster size // before scaling occurs. For example, in a 20-worker cluster, a threshold of @@ -165,7 +189,7 @@ message BasicYarnAutoscalingConfig { // on any recommended change. // // Bounds: [0.0, 1.0]. Default: 0.0. - double scale_up_min_worker_fraction = 3; + double scale_up_min_worker_fraction = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Minimum scale-down threshold as a fraction of total cluster size // before scaling occurs. For example, in a 20-worker cluster, a threshold of @@ -174,7 +198,7 @@ message BasicYarnAutoscalingConfig { // on any recommended change. // // Bounds: [0.0, 1.0]. Default: 0.0. - double scale_down_min_worker_fraction = 4; + double scale_down_min_worker_fraction = 4 [(google.api.field_behavior) = OPTIONAL]; } // Configuration for the size bounds of an instance group, including its @@ -184,7 +208,7 @@ message InstanceGroupAutoscalingPolicyConfig { // // Primary workers - Bounds: [2, max_instances]. Default: 2. // Secondary workers - Bounds: [0, max_instances]. Default: 0. - int32 min_instances = 1; + int32 min_instances = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Maximum number of instances for this group. Required for primary // workers. Note that by default, clusters will not use secondary workers. @@ -192,7 +216,7 @@ message InstanceGroupAutoscalingPolicyConfig { // // Primary workers - Bounds: [min_instances, ). Required. // Secondary workers - Bounds: [min_instances, ). Default: 0. - int32 max_instances = 2; + int32 max_instances = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Weight for the instance group, which is used to determine the // fraction of total workers in the cluster from this instance group. @@ -212,32 +236,56 @@ message InstanceGroupAutoscalingPolicyConfig { // zero weight on the unset group. For example if weight is set only on // primary workers, the cluster will use primary workers only and no // secondary workers. - int32 weight = 3; + int32 weight = 3 [(google.api.field_behavior) = OPTIONAL]; } // A request to create an autoscaling policy. message CreateAutoscalingPolicyRequest { - // Required. The "resource name" of the region, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}`. - string parent = 1; - - // The autoscaling policy to create. - AutoscalingPolicy policy = 2; + // Required. The "resource name" of the region or location, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.autoscalingPolicies.create`, the resource name + // has the following format: + // `projects/{project_id}/regions/{region}` + // + // * For `projects.locations.autoscalingPolicies.create`, the resource name + // has the following format: + // `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dataproc.googleapis.com/AutoscalingPolicy" + } + ]; + + // Required. The autoscaling policy to create. + AutoscalingPolicy policy = 2 [(google.api.field_behavior) = REQUIRED]; } // A request to fetch an autoscaling policy. message GetAutoscalingPolicyRequest { // Required. The "resource name" of the autoscaling policy, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`. - string name = 1; + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.autoscalingPolicies.get`, the resource name + // of the policy has the following format: + // `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` + // + // * For `projects.locations.autoscalingPolicies.get`, the resource name + // of the policy has the following format: + // `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataproc.googleapis.com/AutoscalingPolicy" + } + ]; } // A request to update an autoscaling policy. message UpdateAutoscalingPolicyRequest { // Required. The updated autoscaling policy. - AutoscalingPolicy policy = 1; + AutoscalingPolicy policy = 1 [(google.api.field_behavior) = REQUIRED]; } // A request to delete an autoscaling policy. @@ -245,32 +293,57 @@ message UpdateAutoscalingPolicyRequest { // Autoscaling policies in use by one or more clusters will not be deleted. message DeleteAutoscalingPolicyRequest { // Required. The "resource name" of the autoscaling policy, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`. - string name = 1; + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.autoscalingPolicies.delete`, the resource name + // of the policy has the following format: + // `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` + // + // * For `projects.locations.autoscalingPolicies.delete`, the resource name + // of the policy has the following format: + // `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataproc.googleapis.com/AutoscalingPolicy" + } + ]; } // A request to list autoscaling policies in a project. message ListAutoscalingPoliciesRequest { - // Required. The "resource name" of the region, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}` - string parent = 1; + // Required. The "resource name" of the region or location, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.autoscalingPolicies.list`, the resource name + // of the region has the following format: + // `projects/{project_id}/regions/{region}` + // + // * For `projects.locations.autoscalingPolicies.list`, the resource name + // of the location has the following format: + // `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dataproc.googleapis.com/AutoscalingPolicy" + } + ]; // Optional. The maximum number of results to return in each response. - int32 page_size = 2; + // Must be less than or equal to 1000. Defaults to 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The page token, returned by a previous call, to request the // next page of results. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // A response to a request to list autoscaling policies in a project. message ListAutoscalingPoliciesResponse { // Output only. Autoscaling policies list. - repeated AutoscalingPolicy policies = 1; + repeated AutoscalingPolicy policies = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. This token is included in the response if there are more // results to fetch. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/cloud/dataproc/v1beta2/clusters.proto b/google/cloud/dataproc/v1beta2/clusters.proto index d3bed6b3f..93e6fe79e 100644 --- a/google/cloud/dataproc/v1beta2/clusters.proto +++ b/google/cloud/dataproc/v1beta2/clusters.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dataproc.v1beta2; import "google/api/annotations.proto"; -import "google/cloud/dataproc/v1beta2/operations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/dataproc/v1beta2/shared.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; @@ -33,27 +34,51 @@ option java_package = "com.google.cloud.dataproc.v1beta2"; // The ClusterControllerService provides methods to manage clusters // of Compute Engine instances. service ClusterController { - // Creates a cluster in a project. + option (google.api.default_host) = "dataproc.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a cluster in a project. The returned + // [Operation.metadata][google.longrunning.Operation.metadata] will be + // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata). rpc CreateCluster(CreateClusterRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta2/projects/{project_id}/regions/{region}/clusters" body: "cluster" }; + option (google.api.method_signature) = "project_id, region, cluster"; + option (google.longrunning.operation_info) = { + response_type: "Cluster" + metadata_type: "google.cloud.dataproc.v1beta2.ClusterOperationMetadata" + }; } - // Updates a cluster in a project. + // Updates a cluster in a project. The returned + // [Operation.metadata][google.longrunning.Operation.metadata] will be + // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata). rpc UpdateCluster(UpdateClusterRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1beta2/projects/{project_id}/regions/{region}/clusters/{cluster_name}" body: "cluster" }; + option (google.api.method_signature) = "project_id, region, cluster_name, cluster, update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Cluster" + metadata_type: "google.cloud.dataproc.v1beta2.ClusterOperationMetadata" + }; } - // Deletes a cluster in a project. + // Deletes a cluster in a project. The returned + // [Operation.metadata][google.longrunning.Operation.metadata] will be + // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata). rpc DeleteCluster(DeleteClusterRequest) returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1beta2/projects/{project_id}/regions/{region}/clusters/{cluster_name}" }; + option (google.api.method_signature) = "project_id, region, cluster_name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.dataproc.v1beta2.ClusterOperationMetadata" + }; } // Gets the resource representation for a cluster in a project. @@ -61,23 +86,35 @@ service ClusterController { option (google.api.http) = { get: "/v1beta2/projects/{project_id}/regions/{region}/clusters/{cluster_name}" }; + option (google.api.method_signature) = "project_id, region, cluster_name"; } - // Lists all regions/{region}/clusters in a project. + // Lists all regions/{region}/clusters in a project alphabetically. rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { option (google.api.http) = { get: "/v1beta2/projects/{project_id}/regions/{region}/clusters" }; + option (google.api.method_signature) = "project_id, region"; + option (google.api.method_signature) = "project_id, region, filter"; } - // Gets cluster diagnostic information. - // After the operation completes, the Operation.response field - // contains `DiagnoseClusterOutputLocation`. + // Gets cluster diagnostic information. The returned + // [Operation.metadata][google.longrunning.Operation.metadata] will be + // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata). + // After the operation completes, + // [Operation.response][google.longrunning.Operation.response] + // contains + // [Empty][google.protobuf.Empty]. rpc DiagnoseCluster(DiagnoseClusterRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta2/projects/{project_id}/regions/{region}/clusters/{cluster_name}:diagnose" body: "*" }; + option (google.api.method_signature) = "project_id, region, cluster_name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.dataproc.v1beta2.ClusterOperationMetadata" + }; } } @@ -85,15 +122,15 @@ service ClusterController { // a cluster of Compute Engine instances. message Cluster { // Required. The Google Cloud Platform project ID that the cluster belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The cluster name. Cluster names within a project must be // unique. Names of deleted clusters can be reused. - string cluster_name = 2; + string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The cluster config. Note that Cloud Dataproc may set + // Required. The cluster config. Note that Dataproc may set // default values, and values may change when clusters are updated. - ClusterConfig config = 3; + ClusterConfig config = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. The labels to associate with this cluster. // Label **keys** must contain 1 to 63 characters, and must conform to @@ -102,59 +139,59 @@ message Cluster { // characters, and must conform to [RFC // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be // associated with a cluster. - map labels = 8; + map labels = 8 [(google.api.field_behavior) = OPTIONAL]; // Output only. Cluster status. - ClusterStatus status = 4; + ClusterStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The previous cluster status. - repeated ClusterStatus status_history = 7; + repeated ClusterStatus status_history = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc + // Output only. A cluster UUID (Unique Universal Identifier). Dataproc // generates this value when it creates the cluster. - string cluster_uuid = 6; + string cluster_uuid = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Contains cluster daemon metrics such as HDFS and YARN stats. // // **Beta Feature**: This report is available for testing purposes only. It // may be changed before final release. - ClusterMetrics metrics = 9; + ClusterMetrics metrics = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The cluster config. message ClusterConfig { - // Optional. A Google Cloud Storage bucket used to stage job + // Optional. A Cloud Storage bucket used to stage job // dependencies, config files, and job driver console output. // If you do not specify a staging bucket, Cloud // Dataproc will determine a Cloud Storage location (US, - // ASIA, or EU) for your cluster's staging bucket according to the Google + // ASIA, or EU) for your cluster's staging bucket according to the // Compute Engine zone where your cluster is deployed, and then create // and manage this project-level, per-location bucket (see - // [Cloud Dataproc staging - // bucket](/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - string config_bucket = 1; + // [Dataproc staging + // bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). + string config_bucket = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The shared Compute Engine config settings for // all instances in a cluster. - GceClusterConfig gce_cluster_config = 8; + GceClusterConfig gce_cluster_config = 8 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine config settings for // the master instance in a cluster. - InstanceGroupConfig master_config = 9; + InstanceGroupConfig master_config = 9 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine config settings for // worker instances in a cluster. - InstanceGroupConfig worker_config = 10; + InstanceGroupConfig worker_config = 10 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine config settings for // additional worker instances in a cluster. - InstanceGroupConfig secondary_worker_config = 12; + InstanceGroupConfig secondary_worker_config = 12 [(google.api.field_behavior) = OPTIONAL]; // Optional. The config settings for software inside the cluster. - SoftwareConfig software_config = 13; + SoftwareConfig software_config = 13 [(google.api.field_behavior) = OPTIONAL]; // Optional. The config setting for auto delete cluster schedule. - LifecycleConfig lifecycle_config = 14; + LifecycleConfig lifecycle_config = 14 [(google.api.field_behavior) = OPTIONAL]; // Optional. Commands to execute on each node after config is // completed. By default, executables are run on master and all worker nodes. @@ -169,31 +206,58 @@ message ClusterConfig { // else // ... worker specific actions ... // fi - repeated NodeInitializationAction initialization_actions = 11; + repeated NodeInitializationAction initialization_actions = 11 [(google.api.field_behavior) = OPTIONAL]; // Optional. Encryption settings for the cluster. - EncryptionConfig encryption_config = 15; + EncryptionConfig encryption_config = 15 [(google.api.field_behavior) = OPTIONAL]; // Optional. Autoscaling config for the policy associated with the cluster. // Cluster does not autoscale if this field is unset. - AutoscalingConfig autoscaling_config = 16; + AutoscalingConfig autoscaling_config = 16 [(google.api.field_behavior) = OPTIONAL]; // Optional. Port/endpoint configuration for this cluster - EndpointConfig endpoint_config = 17; + EndpointConfig endpoint_config = 17 [(google.api.field_behavior) = OPTIONAL]; // Optional. Security related configuration. - SecurityConfig security_config = 18; + SecurityConfig security_config = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes. + // Setting this is considered mutually exclusive with Compute Engine-based + // options such as `gce_cluster_config`, `master_config`, `worker_config`, + // `secondary_worker_config`, and `autoscaling_config`. + GkeClusterConfig gke_cluster_config = 19 [(google.api.field_behavior) = OPTIONAL]; +} + +// The GKE config for this cluster. +message GkeClusterConfig { + // A full, namespace-isolated deployment target for an existing GKE cluster. + message NamespacedGkeDeploymentTarget { + // Optional. The target GKE cluster to deploy to. + // Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}' + string target_gke_cluster = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "container.googleapis.com/Cluster" + } + ]; + + // Optional. A namespace within the GKE cluster to deploy into. + string cluster_namespace = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. A target for the deployment. + NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(google.api.field_behavior) = OPTIONAL]; } // Endpoint config for this cluster message EndpointConfig { // Output only. The map of port descriptions to URLs. Will only be populated // if enable_http_port_access is true. - map http_ports = 1; + map http_ports = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. If true, enable http access to specific ports on the cluster // from external sources. Defaults to false. - bool enable_http_port_access = 2; + bool enable_http_port_access = 2 [(google.api.field_behavior) = OPTIONAL]; } // Autoscaling Policy config associated with the cluster. @@ -206,15 +270,15 @@ message AutoscalingConfig { // * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]` // * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]` // - // Note that the policy must be in the same project and Cloud Dataproc region. - string policy_uri = 1; + // Note that the policy must be in the same project and Dataproc region. + string policy_uri = 1 [(google.api.field_behavior) = OPTIONAL]; } // Encryption settings for the cluster. message EncryptionConfig { // Optional. The Cloud KMS key name to use for PD disk encryption for all // instances in the cluster. - string gce_pd_kms_key_name = 1; + string gce_pd_kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL]; } // Common config settings for resources of Compute Engine cluster @@ -222,7 +286,7 @@ message EncryptionConfig { message GceClusterConfig { // Optional. The zone where the Compute Engine cluster will be located. // On a create request, it is required in the "global" region. If omitted - // in a non-global Cloud Dataproc region, the service will pick a zone in the + // in a non-global Dataproc region, the service will pick a zone in the // corresponding Compute Engine region. On a get request, zone will always be // present. // @@ -231,20 +295,21 @@ message GceClusterConfig { // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]` // * `projects/[project_id]/zones/[zone]` // * `us-central1-f` - string zone_uri = 1; + string zone_uri = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine network to be used for machine // communications. Cannot be specified with subnetwork_uri. If neither // `network_uri` nor `subnetwork_uri` is specified, the "default" network of // the project is used, if it exists. Cannot be a "Custom Subnet Network" (see - // [Using Subnetworks](/compute/docs/subnetworks) for more information). + // [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for + // more information). // // A full URL, partial URI, or short name are valid. Examples: // // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default` // * `projects/[project_id]/regions/global/default` // * `default` - string network_uri = 2; + string network_uri = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine subnetwork to be used for machine // communications. Cannot be specified with network_uri. @@ -254,7 +319,7 @@ message GceClusterConfig { // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0` // * `projects/[project_id]/regions/us-east1/subnetworks/sub0` // * `sub0` - string subnetwork_uri = 6; + string subnetwork_uri = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. If true, all instances in the cluster will only have internal IP // addresses. By default, clusters are not restricted to internal IP @@ -262,20 +327,20 @@ message GceClusterConfig { // instance. This `internal_ip_only` restriction can only be enabled for // subnetwork enabled networks, and all off-cluster dependencies must be // configured to be accessible without external IP addresses. - bool internal_ip_only = 7; + bool internal_ip_only = 7 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The service account of the instances. Defaults to the default - // Compute Engine service account. Custom service accounts need - // permissions equivalent to the following IAM roles: + // Optional. The [Dataproc service + // account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_cloud_dataproc) + // (also see [VM Data Plane + // identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity)) + // used by Dataproc cluster VM instances to access Google Cloud Platform + // services. // - // * roles/logging.logWriter - // * roles/storage.objectAdmin - // - // (see - // https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts - // for more information). - // Example: `[account_id]@[project_id].iam.gserviceaccount.com` - string service_account = 8; + // If not specified, the + // [Compute Engine default service + // account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + // is used. + string service_account = 8 [(google.api.field_behavior) = OPTIONAL]; // Optional. The URIs of service account scopes to be included in // Compute Engine instances. The following base set of scopes is always @@ -291,10 +356,10 @@ message GceClusterConfig { // * https://www.googleapis.com/auth/bigtable.admin.table // * https://www.googleapis.com/auth/bigtable.data // * https://www.googleapis.com/auth/devstorage.full_control - repeated string service_account_scopes = 3; + repeated string service_account_scopes = 3 [(google.api.field_behavior) = OPTIONAL]; - // The Compute Engine tags to add to all instances (see - // [Tagging instances](/compute/docs/label-or-tag-resources#tags)). + // The Compute Engine tags to add to all instances (see [Tagging + // instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). repeated string tags = 4; // The Compute Engine metadata entries to add to all instances (see @@ -303,24 +368,39 @@ message GceClusterConfig { map metadata = 5; // Optional. Reservation Affinity for consuming Zonal reservation. - ReservationAffinity reservation_affinity = 11; + ReservationAffinity reservation_affinity = 11 [(google.api.field_behavior) = OPTIONAL]; } -// Optional. The config settings for Compute Engine resources in +// The config settings for Compute Engine resources in // an instance group, such as a master or worker group. message InstanceGroupConfig { // Optional. The number of VM instances in the instance group. // For master instance groups, must be set to 1. - int32 num_instances = 1; + int32 num_instances = 1 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The list of instance names. Cloud Dataproc derives the names + // Output only. The list of instance names. Dataproc derives the names // from `cluster_name`, `num_instances`, and the instance group. - repeated string instance_names = 2; + repeated string instance_names = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The Compute Engine image resource used for cluster - // instances. It can be specified or may be inferred from - // `SoftwareConfig.image_version`. - string image_uri = 3; + // Optional. The Compute Engine image resource used for cluster instances. + // + // The URI can represent an image or image family. + // + // Image examples: + // + // * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]` + // * `projects/[project_id]/global/images/[image-id]` + // * `image-id` + // + // Image family examples. Dataproc will use the most recent + // image from the family: + // + // * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]` + // * `projects/[project_id]/global/images/family/[custom-image-family-name]` + // + // If the URI is unspecified, it will be inferred from + // `SoftwareConfig.image_version` or the system default. + string image_uri = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine machine type used for cluster instances. // @@ -330,35 +410,32 @@ message InstanceGroupConfig { // * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2` // * `n1-standard-2` // - // **Auto Zone Exception**: If you are using the Cloud Dataproc + // **Auto Zone Exception**: If you are using the Dataproc // [Auto Zone - // Placement](/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) + // Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) // feature, you must use the short name of the machine type // resource, for example, `n1-standard-2`. - string machine_type_uri = 4; + string machine_type_uri = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Disk option config settings. - DiskConfig disk_config = 5; + DiskConfig disk_config = 5 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Specifies that this instance group contains preemptible + // Output only. Specifies that this instance group contains preemptible // instances. - bool is_preemptible = 6; + bool is_preemptible = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The config for Compute Engine Instance Group // Manager that manages this group. // This is only used for preemptible instance groups. - ManagedGroupConfig managed_group_config = 7; + ManagedGroupConfig managed_group_config = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The Compute Engine accelerator configuration for these // instances. - // - // **Beta Feature**: This feature is still under development. It may be - // changed before final release. - repeated AcceleratorConfig accelerators = 8; + repeated AcceleratorConfig accelerators = 8 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Specifies the minimum cpu platform for the Instance Group. - // See [Cloud Dataproc→Minimum CPU Platform] - // (/dataproc/docs/concepts/compute/dataproc-min-cpu). + // Specifies the minimum cpu platform for the Instance Group. + // See [Dataproc -> Minimum CPU + // Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu). string min_cpu_platform = 9; } @@ -366,28 +443,29 @@ message InstanceGroupConfig { message ManagedGroupConfig { // Output only. The name of the Instance Template used for the Managed // Instance Group. - string instance_template_name = 1; + string instance_template_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The name of the Instance Group Manager for this group. - string instance_group_manager_name = 2; + string instance_group_manager_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Specifies the type and number of accelerator cards attached to the instances -// of an instance group (see [GPUs on Compute Engine](/compute/docs/gpus/)). +// of an instance group (see [GPUs on Compute +// Engine](https://cloud.google.com/compute/docs/gpus/)). message AcceleratorConfig { // Full URL, partial URI, or short name of the accelerator type resource to // expose to this instance. See // [Compute Engine - // AcceleratorTypes](/compute/docs/reference/beta/acceleratorTypes) + // AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes) // // Examples // * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80` // * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80` // * `nvidia-tesla-k80` // - // **Auto Zone Exception**: If you are using the Cloud Dataproc + // **Auto Zone Exception**: If you are using the Dataproc // [Auto Zone - // Placement](/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) + // Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) // feature, you must use the short name of the accelerator type // resource, for example, `nvidia-tesla-k80`. string accelerator_type_uri = 1; @@ -401,12 +479,12 @@ message DiskConfig { // Optional. Type of the boot disk (default is "pd-standard"). // Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or // "pd-standard" (Persistent Disk Hard Disk Drive). - string boot_disk_type = 3; + string boot_disk_type = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Size in GB of the boot disk (default is 500GB). - int32 boot_disk_size_gb = 1; + int32 boot_disk_size_gb = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Number of attached SSDs, from 0 to 4 (default is 0). + // Number of attached SSDs, from 0 to 4 (default is 0). // If SSDs are not attached, the boot disk is used to store runtime logs and // [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. // If one or more SSDs are attached, this runtime bulk @@ -417,26 +495,32 @@ message DiskConfig { // Specifies the cluster auto-delete schedule configuration. message LifecycleConfig { - // Optional. The duration to keep the cluster alive while idling. - // Passing this threshold will cause the cluster to be - // deleted. Valid range: **[10m, 14d]**. - // - // Example: **"10m"**, the minimum value, to delete the - // cluster when it has had no jobs running for 10 minutes. - google.protobuf.Duration idle_delete_ttl = 1; - - // Optional. Either the exact time the cluster should be deleted at or + // Optional. The duration to keep the cluster alive while idling (when no jobs + // are running). Passing this threshold will cause the cluster to be + // deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON + // representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json). + google.protobuf.Duration idle_delete_ttl = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Either the exact time the cluster should be deleted at or // the cluster maximum age. oneof ttl { - // Optional. The time when cluster will be auto-deleted. - google.protobuf.Timestamp auto_delete_time = 2; + // Optional. The time when cluster will be auto-deleted. (see JSON representation of + // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). + google.protobuf.Timestamp auto_delete_time = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The lifetime duration of cluster. The cluster will be - // auto-deleted at the end of this period. Valid range: **[10m, 14d]**. - // - // Example: **"1d"**, to delete the cluster 1 day after its creation.. - google.protobuf.Duration auto_delete_ttl = 3; + // auto-deleted at the end of this period. Minimum value is 10 minutes; + // maximum value is 14 days (see JSON representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). + google.protobuf.Duration auto_delete_ttl = 3 [(google.api.field_behavior) = OPTIONAL]; } + + // Output only. The time when cluster became idle (most recent job finished) + // and became eligible for deletion due to idleness (see JSON representation + // of + // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). + google.protobuf.Timestamp idle_start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Security related configuration, including encryption, Kerberos, etc. @@ -447,80 +531,88 @@ message SecurityConfig { // Specifies Kerberos related configuration. message KerberosConfig { - // Optional. Flag to indicate whether to Kerberize the cluster. - bool enable_kerberos = 1; + // Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set + // this field to true to enable Kerberos on a cluster. + bool enable_kerberos = 1 [(google.api.field_behavior) = OPTIONAL]; // Required. The Cloud Storage URI of a KMS encrypted file containing the root // principal password. - string root_principal_password_uri = 2; + string root_principal_password_uri = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The uri of the KMS key used to encrypt various sensitive // files. - string kms_key_uri = 3; + string kms_key_uri = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. The Cloud Storage URI of the keystore file used for SSL // encryption. If not provided, Dataproc will provide a self-signed // certificate. - string keystore_uri = 4; + string keystore_uri = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Cloud Storage URI of the truststore file used for SSL // encryption. If not provided, Dataproc will provide a self-signed // certificate. - string truststore_uri = 5; + string truststore_uri = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Cloud Storage URI of a KMS encrypted file containing the // password to the user provided keystore. For the self-signed certificate, // this password is generated by Dataproc. - string keystore_password_uri = 6; + string keystore_password_uri = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Cloud Storage URI of a KMS encrypted file containing the // password to the user provided key. For the self-signed certificate, this // password is generated by Dataproc. - string key_password_uri = 7; + string key_password_uri = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Cloud Storage URI of a KMS encrypted file containing the // password to the user provided truststore. For the self-signed certificate, // this password is generated by Dataproc. - string truststore_password_uri = 8; + string truststore_password_uri = 8 [(google.api.field_behavior) = OPTIONAL]; // Optional. The remote realm the Dataproc on-cluster KDC will trust, should // the user enable cross realm trust. - string cross_realm_trust_realm = 9; + string cross_realm_trust_realm = 9 [(google.api.field_behavior) = OPTIONAL]; // Optional. The KDC (IP or hostname) for the remote trusted realm in a cross // realm trust relationship. - string cross_realm_trust_kdc = 10; + string cross_realm_trust_kdc = 10 [(google.api.field_behavior) = OPTIONAL]; // Optional. The admin server (IP or hostname) for the remote trusted realm in // a cross realm trust relationship. - string cross_realm_trust_admin_server = 11; + string cross_realm_trust_admin_server = 11 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Cloud Storage URI of a KMS encrypted file containing the // shared password between the on-cluster Kerberos realm and the remote // trusted realm, in a cross realm trust relationship. - string cross_realm_trust_shared_password_uri = 12; + string cross_realm_trust_shared_password_uri = 12 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Cloud Storage URI of a KMS encrypted file containing the // master key of the KDC database. - string kdc_db_key_uri = 13; + string kdc_db_key_uri = 13 [(google.api.field_behavior) = OPTIONAL]; // Optional. The lifetime of the ticket granting ticket, in hours. // If not specified, or user specifies 0, then default value 10 // will be used. - int32 tgt_lifetime_hours = 14; + int32 tgt_lifetime_hours = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the on-cluster Kerberos realm. + // If not specified, the uppercased domain of hostnames will be the realm. + string realm = 15 [(google.api.field_behavior) = OPTIONAL]; } // Specifies an executable to run on a fully configured node and a // timeout period for executable completion. message NodeInitializationAction { // Required. Cloud Storage URI of executable file. - string executable_file = 1; + string executable_file = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Amount of time executable has to complete. Default is - // 10 minutes. Cluster creation fails with an explanatory error message (the + // 10 minutes (see JSON representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). + // + // Cluster creation fails with an explanatory error message (the // name of the executable that caused the error and the exceeded timeout // period) if the executable is not completed at end of the timeout period. - google.protobuf.Duration execution_timeout = 2; + google.protobuf.Duration execution_timeout = 2 [(google.api.field_behavior) = OPTIONAL]; } // The status of a cluster and its instances. @@ -544,6 +636,15 @@ message ClusterStatus { // The cluster is being updated. It continues to accept and process jobs. UPDATING = 5; + + // The cluster is being stopped. It cannot be used. + STOPPING = 6; + + // The cluster is currently stopped. It is not ready for use. + STOPPED = 7; + + // The cluster is being started. It is not ready for use. + STARTING = 8; } // The cluster substate. @@ -559,36 +660,37 @@ message ClusterStatus { UNHEALTHY = 1; // The agent-reported status is out of date (may occur if - // Cloud Dataproc loses communication with Agent). + // Dataproc loses communication with Agent). // // Applies to RUNNING state. STALE_STATUS = 2; } // Output only. The cluster's state. - State state = 1; + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Optional details of cluster's state. - string detail = 2; + string detail = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Time when this state was entered. - google.protobuf.Timestamp state_start_time = 3; + // Output only. Time when this state was entered (see JSON representation of + // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). + google.protobuf.Timestamp state_start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Additional state information that includes // status reported by the agent. - Substate substate = 4; + Substate substate = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Specifies the selection and config of software inside the cluster. message SoftwareConfig { // Optional. The version of software inside the cluster. It must be one of the - // supported [Cloud Dataproc - // Versions](/dataproc/docs/concepts/versioning/dataproc-versions#supported_cloud_dataproc_versions), + // supported [Dataproc + // Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_cloud_dataproc_versions), // such as "1.2" (including a subminor version, such as "1.2.29"), or the // ["preview" - // version](/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). + // version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). // If unspecified, it defaults to the latest Debian version. - string image_version = 1; + string image_version = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The properties to set on daemon config files. // @@ -606,9 +708,9 @@ message SoftwareConfig { // * spark: `spark-defaults.conf` // * yarn: `yarn-site.xml` // - // For more information, see - // [Cluster properties](/dataproc/docs/concepts/cluster-properties). - map properties = 2; + // For more information, see [Cluster + // properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). + map properties = 2 [(google.api.field_behavior) = OPTIONAL]; // The set of optional components to activate on the cluster. repeated Component optional_components = 3; @@ -630,13 +732,13 @@ message ClusterMetrics { message CreateClusterRequest { // Required. The ID of the Google Cloud Platform project that the cluster // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The cluster to create. - Cluster cluster = 2; + Cluster cluster = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. A unique id used to identify the request. If the server // receives two [CreateClusterRequest][google.cloud.dataproc.v1beta2.CreateClusterRequest] requests with the same @@ -649,33 +751,34 @@ message CreateClusterRequest { // // The id must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 4; + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; } // A request to update a cluster. message UpdateClusterRequest { // Required. The ID of the Google Cloud Platform project the // cluster belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 5; + // Required. The Dataproc region in which to handle the request. + string region = 5 [(google.api.field_behavior) = REQUIRED]; // Required. The cluster name. - string cluster_name = 2; + string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The changes to the cluster. - Cluster cluster = 3; + Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. Timeout for graceful YARN decomissioning. Graceful // decommissioning allows removing nodes from the cluster without // interrupting jobs in progress. Timeout specifies how long to wait for jobs // in progress to finish before forcefully removing nodes (and potentially // interrupting jobs). Default timeout is 0 (for forceful decommission), and - // the maximum allowed timeout is 1 day. + // the maximum allowed timeout is 1 day (see JSON representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). // // Only supported on Dataproc image versions 1.2 and higher. - google.protobuf.Duration graceful_decommission_timeout = 6; + google.protobuf.Duration graceful_decommission_timeout = 6 [(google.api.field_behavior) = OPTIONAL]; // Required. Specifies the path, relative to `Cluster`, of // the field to update. For example, to change the number of workers @@ -737,7 +840,7 @@ message UpdateClusterRequest { // autoscaling policies // // - google.protobuf.FieldMask update_mask = 4; + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; // Optional. A unique id used to identify the request. If the server // receives two [UpdateClusterRequest][google.cloud.dataproc.v1beta2.UpdateClusterRequest] requests with the same @@ -750,24 +853,24 @@ message UpdateClusterRequest { // // The id must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 7; + string request_id = 7 [(google.api.field_behavior) = OPTIONAL]; } // A request to delete a cluster. message DeleteClusterRequest { // Required. The ID of the Google Cloud Platform project that the cluster // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The cluster name. - string cluster_name = 2; + string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Specifying the `cluster_uuid` means the RPC should fail // (with error NOT_FOUND) if cluster with specified UUID does not exist. - string cluster_uuid = 4; + string cluster_uuid = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. A unique id used to identify the request. If the server // receives two [DeleteClusterRequest][google.cloud.dataproc.v1beta2.DeleteClusterRequest] requests with the same @@ -780,32 +883,32 @@ message DeleteClusterRequest { // // The id must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 5; + string request_id = 5 [(google.api.field_behavior) = OPTIONAL]; } // Request to get the resource representation for a cluster in a project. message GetClusterRequest { // Required. The ID of the Google Cloud Platform project that the cluster // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The cluster name. - string cluster_name = 2; + string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; } // A request to list the clusters in a project. message ListClustersRequest { // Required. The ID of the Google Cloud Platform project that the cluster // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 4; + // Required. The Dataproc region in which to handle the request. + string region = 4 [(google.api.field_behavior) = REQUIRED]; - // Optional. A filter constraining the clusters to list. Filters are + // Optional. A filter constraining the clusters to list. Filters are // case-sensitive and have the following syntax: // // field = value [AND [field = value]] ... @@ -824,37 +927,37 @@ message ListClustersRequest { // // status.state = ACTIVE AND clusterName = mycluster // AND labels.env = staging AND labels.starred = * - string filter = 5; + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. The standard List page size. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The standard List page token. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // The list of all clusters in a project. message ListClustersResponse { // Output only. The clusters in the project. - repeated Cluster clusters = 1; + repeated Cluster clusters = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. This token is included in the response if there are more // results to fetch. To fetch additional results, provide this value as the // `page_token` in a subsequent ListClustersRequest. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to collect cluster diagnostic information. message DiagnoseClusterRequest { // Required. The ID of the Google Cloud Platform project that the cluster // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The cluster name. - string cluster_name = 2; + string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; } // The location of diagnostic output. @@ -862,7 +965,7 @@ message DiagnoseClusterResults { // Output only. The Cloud Storage URI of the diagnostic output. // The output report is a plain text file with a summary of collected // diagnostics. - string output_uri = 1; + string output_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Reservation Affinity for consuming Zonal reservation. @@ -883,11 +986,11 @@ message ReservationAffinity { } // Optional. Type of reservation to consume - Type consume_reservation_type = 1; + Type consume_reservation_type = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Corresponds to the label key of reservation resource. - string key = 2; + string key = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Corresponds to the label values of reservation resource. - repeated string values = 3; + repeated string values = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/google/cloud/dataproc/v1beta2/dataproc_gapic.legacy.yaml b/google/cloud/dataproc/v1beta2/dataproc_gapic.legacy.yaml new file mode 100644 index 000000000..33ab4c380 --- /dev/null +++ b/google/cloud/dataproc/v1beta2/dataproc_gapic.legacy.yaml @@ -0,0 +1,96 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + java: + package_name: com.google.cloud.dataproc.v1beta2 + python: + package_name: google.cloud.dataproc_v1beta2.gapic + go: + package_name: cloud.google.com/go/dataproc/apiv1beta2 + csharp: + package_name: Google.Cloud.Dataproc.V1Beta2 + ruby: + package_name: Google::Cloud::Dataproc::V1beta2 + php: + package_name: Google\Cloud\Dataproc\V1beta2 + nodejs: + package_name: dataproc.v1beta2 + domain_layer_location: google-cloud +interfaces: +- name: google.cloud.dataproc.v1beta2.ClusterController + smoke_test: + method: ListClusters + init_fields: + - project_id=$PROJECT_ID + - region="global" + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - INTERNAL + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: + - UNAVAILABLE + methods: + - name: CreateCluster + retry_codes_name: non_idempotent + - name: UpdateCluster + retry_codes_name: non_idempotent + - name: DeleteCluster + retry_codes_name: non_idempotent + - name: GetCluster + retry_codes_name: idempotent + - name: ListClusters + retry_codes_name: idempotent + - name: DiagnoseCluster + retry_codes_name: non_idempotent +- name: google.cloud.dataproc.v1beta2.JobController + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - INTERNAL + - UNAVAILABLE + - name: non_idempotent + retry_codes: + - UNAVAILABLE + methods: + - name: SubmitJob + retry_codes_name: non_idempotent + - name: GetJob + retry_codes_name: idempotent + - name: ListJobs + retry_codes_name: idempotent + - name: UpdateJob + retry_codes_name: non_idempotent + - name: CancelJob + retry_codes_name: idempotent + - name: DeleteJob + retry_codes_name: non_idempotent +- name: google.cloud.dataproc.v1beta2.WorkflowTemplateService + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - INTERNAL + - UNAVAILABLE + - name: non_idempotent + retry_codes: + - UNAVAILABLE + methods: + - name: CreateWorkflowTemplate + retry_codes_name: non_idempotent + - name: GetWorkflowTemplate + retry_codes_name: idempotent + - name: InstantiateWorkflowTemplate + retry_codes_name: non_idempotent + - name: InstantiateInlineWorkflowTemplate + retry_codes_name: non_idempotent + - name: UpdateWorkflowTemplate + retry_codes_name: non_idempotent + - name: ListWorkflowTemplates + retry_codes_name: idempotent + - name: DeleteWorkflowTemplate + retry_codes_name: non_idempotent diff --git a/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml b/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml index 576bfc8e2..93c54d2d4 100644 --- a/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml +++ b/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml @@ -1,6 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 -# The settings of generated code in a specific language. +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.dataproc.v1beta2 @@ -17,172 +16,12 @@ language_settings: nodejs: package_name: dataproc.v1beta2 domain_layer_location: google-cloud -# A list of API interface configurations. interfaces: -# The fully qualified name of the API interface. -- name: google.cloud.dataproc.v1beta2.AutoscalingPolicyService - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/regions/{region} - entity_name: region - - name_pattern: projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy} - entity_name: autoscaling_policy - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. +- name: google.cloud.dataproc.v1.AutoscalingPolicyService methods: - - name: CreateAutoscalingPolicy - flattening: - groups: - - parameters: - - parent - - policy - required_fields: - - parent - - policy - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: region - timeout_millis: 60000 - name: UpdateAutoscalingPolicy - flattening: - groups: - - parameters: - - policy - required_fields: - - policy - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - policy.name: autoscaling_policy - timeout_millis: 60000 - - name: GetAutoscalingPolicy - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: autoscaling_policy - timeout_millis: 60000 - - name: ListAutoscalingPolicies - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: policies - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: region - timeout_millis: 60000 - - name: DeleteAutoscalingPolicy - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: autoscaling_policy - timeout_millis: 60000 -# The fully qualified name of the API interface. - name: google.cloud.dataproc.v1beta2.ClusterController - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: [] - # Definition for smoke test. smoke_test: method: ListClusters init_fields: @@ -198,209 +37,29 @@ interfaces: - name: non_idempotent retry_codes: - UNAVAILABLE - # Definition for retry/backoff parameters. retry_params_def: - name: default initial_retry_delay_millis: 100 retry_delay_multiplier: 1.3 max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 10000 + initial_rpc_timeout_millis: 20000 rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 10000 - total_timeout_millis: 300000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 methods: - name: CreateCluster - flattening: - groups: - - parameters: - - project_id - - region - - cluster - required_fields: - - project_id - - region - - cluster retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 30000 - long_running: - return_type: google.cloud.dataproc.v1beta2.Cluster - metadata_type: google.cloud.dataproc.v1beta2.ClusterOperationMetadata - implements_delete: false - implements_cancel: false - initial_poll_delay_millis: 1000 - poll_delay_multiplier: 2 - max_poll_delay_millis: 10000 - total_poll_timeout_millis: 900000 - name: UpdateCluster - flattening: - groups: - - parameters: - - project_id - - region - - cluster_name - - cluster - - update_mask - required_fields: - - project_id - - region - - cluster_name - - cluster - - update_mask retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 30000 - long_running: - return_type: google.cloud.dataproc.v1beta2.Cluster - metadata_type: google.cloud.dataproc.v1beta2.ClusterOperationMetadata - implements_delete: false - implements_cancel: false - initial_poll_delay_millis: 1000 - poll_delay_multiplier: 2 - max_poll_delay_millis: 10000 - total_poll_timeout_millis: 900000 - name: DeleteCluster - flattening: - groups: - - parameters: - - project_id - - region - - cluster_name - required_fields: - - project_id - - region - - cluster_name retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 30000 - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.dataproc.v1beta2.ClusterOperationMetadata - implements_delete: false - implements_cancel: false - initial_poll_delay_millis: 1000 - poll_delay_multiplier: 2 - max_poll_delay_millis: 10000 - total_poll_timeout_millis: 900000 - name: GetCluster - flattening: - groups: - - parameters: - - project_id - - region - - cluster_name - required_fields: - - project_id - - region - - cluster_name retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - name: ListClusters - flattening: - groups: - - parameters: - - project_id - - region - - parameters: - - project_id - - region - - filter - required_fields: - - project_id - - region - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: clusters retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - name: DiagnoseCluster - flattening: - groups: - - parameters: - - project_id - - region - - cluster_name - required_fields: - - project_id - - region - - cluster_name retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.dataproc.v1beta2.DiagnoseClusterResults - implements_delete: false - implements_cancel: false - initial_poll_delay_millis: 1000 - poll_delay_multiplier: 2 - max_poll_delay_millis: 10000 - total_poll_timeout_millis: 30000 - # The fully qualified name of the API interface. - name: google.cloud.dataproc.v1beta2.JobController - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: [] - # Definition for retryable codes. retry_codes_def: - name: idempotent retry_codes: @@ -410,169 +69,20 @@ interfaces: - name: non_idempotent retry_codes: - UNAVAILABLE - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 30000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 30000 - total_timeout_millis: 900000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: SubmitJob - flattening: - groups: - - parameters: - - project_id - - region - - job - required_fields: - - project_id - - region - - job retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 30000 - name: GetJob - flattening: - groups: - - parameters: - - project_id - - region - - job_id - required_fields: - - project_id - - region - - job_id retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 30000 - name: ListJobs - flattening: - groups: - - parameters: - - project_id - - region - - parameters: - - project_id - - region - - filter - required_fields: - - project_id - - region - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: jobs retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 30000 - name: UpdateJob - required_fields: - - project_id - - region - - job_id - - job - - update_mask retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 30000 - name: CancelJob - flattening: - groups: - - parameters: - - project_id - - region - - job_id - required_fields: - - project_id - - region - - job_id retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 30000 - name: DeleteJob - flattening: - groups: - - parameters: - - project_id - - region - - job_id - required_fields: - - project_id - - region - - job_id retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 30000 - # The fully qualified name of the API interface. - name: google.cloud.dataproc.v1beta2.WorkflowTemplateService - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/regions/{region} - entity_name: region - - name_pattern: projects/{project}/regions/{region}/workflowTemplates/{workflow_template} - entity_name: workflow_template - # Definition for retryable codes. retry_codes_def: - name: idempotent retry_codes: @@ -582,212 +92,18 @@ interfaces: - name: non_idempotent retry_codes: - UNAVAILABLE - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: CreateWorkflowTemplate - flattening: - groups: - - parameters: - - parent - - template - required_fields: - - parent - - template retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: region - timeout_millis: 30000 - name: GetWorkflowTemplate - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: workflow_template - timeout_millis: 60000 - name: InstantiateWorkflowTemplate - flattening: - groups: - - parameters: - - name - - parameters: - - name - - parameters - required_fields: - - name retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: workflow_template - timeout_millis: 60000 - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.dataproc.v1beta2.WorkflowMetadata - implements_delete: false - implements_cancel: false - initial_poll_delay_millis: 1000 - poll_delay_multiplier: 2 - max_poll_delay_millis: 10000 - total_poll_timeout_millis: 43200000 - name: InstantiateInlineWorkflowTemplate - flattening: - groups: - - parameters: - - parent - - template - required_fields: - - parent - - template retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: region - timeout_millis: 60000 - long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.dataproc.v1beta2.WorkflowMetadata - implements_delete: false - implements_cancel: false - initial_poll_delay_millis: 1000 - poll_delay_multiplier: 2 - max_poll_delay_millis: 10000 - total_poll_timeout_millis: 43200000 - name: UpdateWorkflowTemplate - flattening: - groups: - - parameters: - - template - required_fields: - - template retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - template.name: workflow_template - timeout_millis: 60000 - name: ListWorkflowTemplates - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: templates retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: region - timeout_millis: 60000 - name: DeleteWorkflowTemplate - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: workflow_template - timeout_millis: 60000 -resource_name_generation: -- message_name: AutoscalingPolicy - field_entity_map: - name: autoscaling_policy -- message_name: CreateAutoscalingPolicyRequest - field_entity_map: - parent: region -- message_name: GetAutoscalingPolicyRequest - field_entity_map: - name: autoscaling_policy -- message_name: ListAutoscalingPoliciesRequest - field_entity_map: - parent: region -- message_name: DeleteAutoscalingPolicyRequest - field_entity_map: - name: autoscaling_policy -- message_name: WorkflowTemplate - field_entity_map: - name: workflow_template -- message_name: CreateWorkflowTemplateRequest - field_entity_map: - parent: region -- message_name: GetWorkflowTemplateRequest - field_entity_map: - name: workflow_template -- message_name: InstantiateWorkflowTemplateRequest - field_entity_map: - name: workflow_template -- message_name: InstantiateInlineWorkflowTemplateRequest - field_entity_map: - parent: region -- message_name: ListWorkflowTemplatesRequest - field_entity_map: - parent: region -- message_name: DeleteWorkflowTemplateRequest - field_entity_map: - name: workflow_template diff --git a/google/cloud/dataproc/v1beta2/dataproc_grpc_service_config.json b/google/cloud/dataproc/v1beta2/dataproc_grpc_service_config.json new file mode 100755 index 000000000..89c3fb0d3 --- /dev/null +++ b/google/cloud/dataproc/v1beta2/dataproc_grpc_service_config.json @@ -0,0 +1,215 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.dataproc.v1beta2.AutoscalingPolicyService", + "method": "CreateAutoscalingPolicy" + }, + { + "service": "google.cloud.dataproc.v1beta2.AutoscalingPolicyService", + "method": "DeleteAutoscalingPolicy" + } + ], + "timeout": "600s" + }, + { + "name": [ + { + "service": "google.cloud.dataproc.v1beta2.AutoscalingPolicyService", + "method": "UpdateAutoscalingPolicy" + }, + { + "service": "google.cloud.dataproc.v1beta2.AutoscalingPolicyService", + "method": "GetAutoscalingPolicy" + }, + { + "service": "google.cloud.dataproc.v1beta2.AutoscalingPolicyService", + "method": "ListAutoscalingPolicies" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dataproc.v1beta2.ClusterController", + "method": "CreateCluster" + }, + { + "service": "google.cloud.dataproc.v1beta2.ClusterController", + "method": "UpdateCluster" + }, + { + "service": "google.cloud.dataproc.v1beta2.ClusterController", + "method": "DeleteCluster" + }, + { + "service": "google.cloud.dataproc.v1beta2.ClusterController", + "method": "DiagnoseCluster" + }, + { + "service": "google.cloud.dataproc.v1beta2.ClusterController", + "method": "StartCluster" + }, + { + "service": "google.cloud.dataproc.v1beta2.ClusterController", + "method": "StopCluster" + } + ], + "timeout": "300s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dataproc.v1beta2.ClusterController", + "method": "GetCluster" + }, + { + "service": "google.cloud.dataproc.v1beta2.ClusterController", + "method": "ListClusters" + } + ], + "timeout": "300s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "INTERNAL", + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dataproc.v1beta2.JobController", + "method": "SubmitJob" + }, + { + "service": "google.cloud.dataproc.v1beta2.JobController", + "method": "SubmitJobAsOperation" + }, + { + "service": "google.cloud.dataproc.v1beta2.JobController", + "method": "UpdateJob" + }, + { + "service": "google.cloud.dataproc.v1beta2.JobController", + "method": "DeleteJob" + } + ], + "timeout": "900s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dataproc.v1beta2.JobController", + "method": "GetJob" + }, + { + "service": "google.cloud.dataproc.v1beta2.JobController", + "method": "ListJobs" + }, + { + "service": "google.cloud.dataproc.v1beta2.JobController", + "method": "CancelJob" + } + ], + "timeout": "900s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dataproc.v1beta2.WorkflowTemplateService", + "method": "CreateWorkflowTemplate" + }, + { + "service": "google.cloud.dataproc.v1beta2.WorkflowTemplateService", + "method": "InstantiateWorkflowTemplate" + }, + { + "service": "google.cloud.dataproc.v1beta2.WorkflowTemplateService", + "method": "InstantiateInlineWorkflowTemplate" + }, + { + "service": "google.cloud.dataproc.v1beta2.WorkflowTemplateService", + "method": "UpdateWorkflowTemplate" + }, + { + "service": "google.cloud.dataproc.v1beta2.WorkflowTemplateService", + "method": "DeleteWorkflowTemplate" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dataproc.v1beta2.WorkflowTemplateService", + "method": "GetWorkflowTemplate" + }, + { + "service": "google.cloud.dataproc.v1beta2.WorkflowTemplateService", + "method": "ListWorkflowTemplates" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/dataproc/v1beta2/dataproc_v1beta2.yaml b/google/cloud/dataproc/v1beta2/dataproc_v1beta2.yaml new file mode 100644 index 000000000..c7b7a18da --- /dev/null +++ b/google/cloud/dataproc/v1beta2/dataproc_v1beta2.yaml @@ -0,0 +1,94 @@ +type: google.api.Service +config_version: 2 +name: dataproc.googleapis.com +title: Cloud Dataproc API + +apis: +- name: google.cloud.dataproc.v1beta2.AutoscalingPolicyService +- name: google.cloud.dataproc.v1beta2.ClusterController +- name: google.cloud.dataproc.v1beta2.JobController +- name: google.cloud.dataproc.v1beta2.WorkflowTemplateService + +types: +- name: google.cloud.dataproc.v1beta2.ClusterOperationMetadata +- name: google.cloud.dataproc.v1beta2.DiagnoseClusterResults +- name: google.cloud.dataproc.v1beta2.JobMetadata +- name: google.cloud.dataproc.v1beta2.WorkflowMetadata + +documentation: + summary: 'Manages Hadoop-based clusters and jobs on Google Cloud Platform.' + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + description: |- + Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + description: |- + Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and + PERMISSION_DENIED + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + description: |- + Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + +http: + rules: + - selector: google.longrunning.Operations.ListOperations + get: '/v1beta2/{name=projects/*/regions/*/operations}' + + - selector: google.longrunning.Operations.GetOperation + get: '/v1beta2/{name=projects/*/regions/*/operations/*}' + + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1beta2/{name=projects/*/regions/*/operations/*}' + + - selector: google.longrunning.Operations.CancelOperation + post: '/v1beta2/{name=projects/*/regions/*/operations/*}:cancel' + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + post: '/v1beta2/{resource=projects/*/regions/*/clusters/*}:setIamPolicy' + body: '*' + + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + get: '/v1beta2/{resource=projects/*/regions/*/clusters/*}:getIamPolicy' + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + post: '/v1beta2/{resource=projects/*/regions/*/clusters/*}:testIamPermissions' + body: '*' + +authentication: + rules: + - selector: 'google.cloud.dataproc.v1beta2.AutoscalingPolicyService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.dataproc.v1beta2.ClusterController.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.dataproc.v1beta2.JobController.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.dataproc.v1beta2.WorkflowTemplateService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.iam.v1.IAMPolicy.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/dataproc/v1beta2/jobs.proto b/google/cloud/dataproc/v1beta2/jobs.proto index 4d888dafc..325dc9e57 100644 --- a/google/cloud/dataproc/v1beta2/jobs.proto +++ b/google/cloud/dataproc/v1beta2/jobs.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dataproc.v1beta2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -29,12 +31,29 @@ option java_package = "com.google.cloud.dataproc.v1beta2"; // The JobController provides methods to manage jobs. service JobController { + option (google.api.default_host) = "dataproc.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Submits a job to a cluster. rpc SubmitJob(SubmitJobRequest) returns (Job) { option (google.api.http) = { post: "/v1beta2/projects/{project_id}/regions/{region}/jobs:submit" body: "*" }; + option (google.api.method_signature) = "project_id, region, job"; + } + + // Submits job to a cluster. + rpc SubmitJobAsOperation(SubmitJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta2/projects/{project_id}/regions/{region}/jobs:submitAsOperation" + body: "*" + }; + option (google.api.method_signature) = "project_id, region, job"; + option (google.longrunning.operation_info) = { + response_type: "Job" + metadata_type: "JobMetadata" + }; } // Gets the resource representation for a job in a project. @@ -42,6 +61,7 @@ service JobController { option (google.api.http) = { get: "/v1beta2/projects/{project_id}/regions/{region}/jobs/{job_id}" }; + option (google.api.method_signature) = "project_id, region, job_id"; } // Lists regions/{region}/jobs in a project. @@ -49,6 +69,8 @@ service JobController { option (google.api.http) = { get: "/v1beta2/projects/{project_id}/regions/{region}/jobs" }; + option (google.api.method_signature) = "project_id, region"; + option (google.api.method_signature) = "project_id, region, filter"; } // Updates a job in a project. @@ -61,14 +83,15 @@ service JobController { // Starts a job cancellation request. To access the job resource // after cancellation, call - // [regions/{region}/jobs.list](/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list) + // [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list) // or - // [regions/{region}/jobs.get](/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get). + // [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get). rpc CancelJob(CancelJobRequest) returns (Job) { option (google.api.http) = { post: "/v1beta2/projects/{project_id}/regions/{region}/jobs/{job_id}:cancel" body: "*" }; + option (google.api.method_signature) = "project_id, region, job_id"; } // Deletes the job from the project. If the job is active, the delete fails, @@ -77,6 +100,7 @@ service JobController { option (google.api.http) = { delete: "/v1beta2/projects/{project_id}/regions/{region}/jobs/{job_id}" }; + option (google.api.method_signature) = "project_id, region, job_id"; } } @@ -121,7 +145,7 @@ message LoggingConfig { map driver_log_levels = 2; } -// A Cloud Dataproc job for running +// A Dataproc job for running // [Apache Hadoop // MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) // jobs on [Apache Hadoop @@ -148,40 +172,40 @@ message HadoopJob { // include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as // job properties, since a collision may occur that causes an incorrect job // submission. - repeated string args = 3; + repeated string args = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Jar file URIs to add to the CLASSPATHs of the // Hadoop driver and tasks. - repeated string jar_file_uris = 4; + repeated string jar_file_uris = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied // to the working directory of Hadoop drivers and distributed tasks. Useful // for naively parallel tasks. - repeated string file_uris = 5; + repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of archives to be extracted in the working directory of // Hadoop drivers and tasks. Supported file types: // .jar, .tar, .tar.gz, .tgz, or .zip. - repeated string archive_uris = 6; + repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names to values, used to configure Hadoop. - // Properties that conflict with values set by the Cloud Dataproc API may be + // Properties that conflict with values set by the Dataproc API may be // overwritten. Can include properties set in /etc/hadoop/conf/*-site and // classes in user code. - map properties = 7; + map properties = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 8; + LoggingConfig logging_config = 8 [(google.api.field_behavior) = OPTIONAL]; } -// A Cloud Dataproc job for running [Apache Spark](http://spark.apache.org/) +// A Dataproc job for running [Apache Spark](http://spark.apache.org/) // applications on YARN. +// The specification of the main method to call to drive the job. +// Specify either the jar file that contains the main class or the main class +// name. To pass both a main jar and a main class in that jar, add the jar to +// `CommonJob.jar_file_uris`, and then specify the main class name in +// `main_class`. message SparkJob { - // Required. The specification of the main method to call to drive the job. - // Specify either the jar file that contains the main class or the main class - // name. To pass both a main jar and a main class in that jar, add the jar to - // `CommonJob.jar_file_uris`, and then specify the main class name in - // `main_class`. oneof driver { // The HCFS URI of the jar file that contains the main class. string main_jar_file_uri = 1; @@ -194,69 +218,69 @@ message SparkJob { // Optional. The arguments to pass to the driver. Do not include arguments, // such as `--conf`, that can be set as job properties, since a collision may // occur that causes an incorrect job submission. - repeated string args = 3; + repeated string args = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of jar files to add to the CLASSPATHs of the // Spark driver and tasks. - repeated string jar_file_uris = 4; + repeated string jar_file_uris = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of files to be copied to the working directory of // Spark drivers and distributed tasks. Useful for naively parallel tasks. - repeated string file_uris = 5; + repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of archives to be extracted in the working directory // of Spark drivers and tasks. Supported file types: // .jar, .tar, .tar.gz, .tgz, and .zip. - repeated string archive_uris = 6; + repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names to values, used to configure Spark. - // Properties that conflict with values set by the Cloud Dataproc API may be + // Properties that conflict with values set by the Dataproc API may be // overwritten. Can include properties set in // /etc/spark/conf/spark-defaults.conf and classes in user code. - map properties = 7; + map properties = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 8; + LoggingConfig logging_config = 8 [(google.api.field_behavior) = OPTIONAL]; } -// A Cloud Dataproc job for running +// A Dataproc job for running // [Apache // PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html) // applications on YARN. message PySparkJob { // Required. The HCFS URI of the main Python file to use as the driver. Must // be a .py file. - string main_python_file_uri = 1; + string main_python_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The arguments to pass to the driver. Do not include arguments, // such as `--conf`, that can be set as job properties, since a collision may // occur that causes an incorrect job submission. - repeated string args = 2; + repeated string args = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS file URIs of Python files to pass to the PySpark // framework. Supported file types: .py, .egg, and .zip. - repeated string python_file_uris = 3; + repeated string python_file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of jar files to add to the CLASSPATHs of the // Python driver and tasks. - repeated string jar_file_uris = 4; + repeated string jar_file_uris = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of files to be copied to the working directory of // Python drivers and distributed tasks. Useful for naively parallel tasks. - repeated string file_uris = 5; + repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of archives to be extracted in the working directory of // .jar, .tar, .tar.gz, .tgz, and .zip. - repeated string archive_uris = 6; + repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names to values, used to configure PySpark. - // Properties that conflict with values set by the Cloud Dataproc API may be + // Properties that conflict with values set by the Dataproc API may be // overwritten. Can include properties set in // /etc/spark/conf/spark-defaults.conf and classes in user code. - map properties = 7; + map properties = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 8; + LoggingConfig logging_config = 8 [(google.api.field_behavior) = OPTIONAL]; } // A list of queries to run on a cluster. @@ -275,10 +299,10 @@ message QueryList { // ] // } // } - repeated string queries = 1; + repeated string queries = 1 [(google.api.field_behavior) = REQUIRED]; } -// A Cloud Dataproc job for running [Apache Hive](https://hive.apache.org/) +// A Dataproc job for running [Apache Hive](https://hive.apache.org/) // queries on YARN. message HiveJob { // Required. The sequence of Hive queries to execute, specified as either @@ -294,25 +318,25 @@ message HiveJob { // Optional. Whether to continue executing queries if a query fails. // The default value is `false`. Setting to `true` can be useful when // executing independent parallel queries. - bool continue_on_failure = 3; + bool continue_on_failure = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Mapping of query variable names to values (equivalent to the // Hive command: `SET name="value";`). - map script_variables = 4; + map script_variables = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names and values, used to configure Hive. - // Properties that conflict with values set by the Cloud Dataproc API may be + // Properties that conflict with values set by the Dataproc API may be // overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, // /etc/hive/conf/hive-site.xml, and classes in user code. - map properties = 5; + map properties = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of jar files to add to the CLASSPATH of the // Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes // and UDFs. - repeated string jar_file_uris = 6; + repeated string jar_file_uris = 6 [(google.api.field_behavior) = OPTIONAL]; } -// A Cloud Dataproc job for running [Apache Spark +// A Dataproc job for running [Apache Spark // SQL](http://spark.apache.org/sql/) queries. message SparkSqlJob { // Required. The sequence of Spark SQL queries to execute, specified as @@ -327,21 +351,21 @@ message SparkSqlJob { // Optional. Mapping of query variable names to values (equivalent to the // Spark SQL command: SET `name="value";`). - map script_variables = 3; + map script_variables = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names to values, used to configure // Spark SQL's SparkConf. Properties that conflict with values set by the - // Cloud Dataproc API may be overwritten. - map properties = 4; + // Dataproc API may be overwritten. + map properties = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. - repeated string jar_file_uris = 56; + repeated string jar_file_uris = 56 [(google.api.field_behavior) = OPTIONAL]; // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 6; + LoggingConfig logging_config = 6 [(google.api.field_behavior) = OPTIONAL]; } -// A Cloud Dataproc job for running [Apache Pig](https://pig.apache.org/) +// A Dataproc job for running [Apache Pig](https://pig.apache.org/) // queries on YARN. message PigJob { // Required. The sequence of Pig queries to execute, specified as an HCFS @@ -357,69 +381,105 @@ message PigJob { // Optional. Whether to continue executing queries if a query fails. // The default value is `false`. Setting to `true` can be useful when // executing independent parallel queries. - bool continue_on_failure = 3; + bool continue_on_failure = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Mapping of query variable names to values (equivalent to the Pig // command: `name=[value]`). - map script_variables = 4; + map script_variables = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names to values, used to configure Pig. - // Properties that conflict with values set by the Cloud Dataproc API may be + // Properties that conflict with values set by the Dataproc API may be // overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, // /etc/pig/conf/pig.properties, and classes in user code. - map properties = 5; + map properties = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of jar files to add to the CLASSPATH of // the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. - repeated string jar_file_uris = 6; + repeated string jar_file_uris = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 7; + LoggingConfig logging_config = 7 [(google.api.field_behavior) = OPTIONAL]; } -// A Cloud Dataproc job for running +// A Dataproc job for running // [Apache SparkR](https://spark.apache.org/docs/latest/sparkr.html) // applications on YARN. message SparkRJob { // Required. The HCFS URI of the main R file to use as the driver. // Must be a .R file. - string main_r_file_uri = 1; + string main_r_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The arguments to pass to the driver. Do not include arguments, // such as `--conf`, that can be set as job properties, since a collision may // occur that causes an incorrect job submission. - repeated string args = 2; + repeated string args = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of files to be copied to the working directory of // R drivers and distributed tasks. Useful for naively parallel tasks. - repeated string file_uris = 3; + repeated string file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of archives to be extracted in the working directory of // Spark drivers and tasks. Supported file types: // .jar, .tar, .tar.gz, .tgz, and .zip. - repeated string archive_uris = 4; + repeated string archive_uris = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names to values, used to configure SparkR. - // Properties that conflict with values set by the Cloud Dataproc API may be + // Properties that conflict with values set by the Dataproc API may be // overwritten. Can include properties set in // /etc/spark/conf/spark-defaults.conf and classes in user code. - map properties = 5; + map properties = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 6; + LoggingConfig logging_config = 6 [(google.api.field_behavior) = OPTIONAL]; } -// Cloud Dataproc job config. +// A Dataproc job for running [Presto](https://prestosql.io/) queries. +// **IMPORTANT**: The [Dataproc Presto Optional +// Component](/dataproc/docs/concepts/components/presto) must be enabled when +// the cluster is created to submit a Presto job to the cluster. +message PrestoJob { + // Required. The sequence of Presto queries to execute, specified as + // either an HCFS file URI or as a list of queries. + oneof queries { + // The HCFS URI of the script that contains SQL queries. + string query_file_uri = 1; + + // A list of queries. + QueryList query_list = 2; + } + + // Optional. Whether to continue executing queries if a query fails. + // The default value is `false`. Setting to `true` can be useful when + // executing independent parallel queries. + bool continue_on_failure = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The format in which query output will be displayed. See the + // Presto documentation for supported output formats + string output_format = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Presto client tags to attach to this query + repeated string client_tags = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A mapping of property names to values. Used to set Presto + // [session properties](https://prestodb.io/docs/current/sql/set-session.html) + // Equivalent to using the --session flag in the Presto CLI + map properties = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The runtime log config for job execution. + LoggingConfig logging_config = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Dataproc job config. message JobPlacement { // Required. The name of the cluster where the job will be submitted. - string cluster_name = 1; + string cluster_name = 1 [(google.api.field_behavior) = REQUIRED]; - // Output only. A cluster UUID generated by the Cloud Dataproc service when + // Output only. A cluster UUID generated by the Dataproc service when // the job is submitted. - string cluster_uuid = 2; + string cluster_uuid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Cloud Dataproc job status. +// Dataproc job status. message JobStatus { // The job state. enum State { @@ -477,7 +537,7 @@ message JobStatus { QUEUED = 2; // The agent-reported status is out of date, which may be caused by a - // loss of communication between the agent and Cloud Dataproc. If the + // loss of communication between the agent and Dataproc. If the // agent does not send a timely update, the job will fail. // // Applies to RUNNING state. @@ -485,33 +545,32 @@ message JobStatus { } // Output only. A state message specifying the overall job state. - State state = 1; + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Optional job state details, such as an error + // Output only. Optional Job state details, such as an error // description if the state is ERROR. - string details = 2; + string details = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when this state was entered. - google.protobuf.Timestamp state_start_time = 6; + google.protobuf.Timestamp state_start_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Additional state information, which includes // status reported by the agent. - Substate substate = 7; + Substate substate = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Encapsulates the full scoping used to reference a job. message JobReference { // Required. The ID of the Google Cloud Platform project that the job // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The job ID, which must be unique within the project. - // // The ID must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), or hyphens (-). The maximum length is 100 characters. // // If not specified by the caller, the job ID will be provided by the server. - string job_id = 2; + string job_id = 2 [(google.api.field_behavior) = OPTIONAL]; } // A YARN application created by a job. Application information is a subset of @@ -551,84 +610,87 @@ message YarnApplication { KILLED = 8; } - // Required. The application name. - string name = 1; + // Output only. The application name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Required. The application state. - State state = 2; + // Output only. The application state. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Required. The numerical progress of the application, from 1 to 100. - float progress = 3; + // Output only. The numerical progress of the application, from 1 to 100. + float progress = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or + // Output only. The HTTP URL of the ApplicationMaster, HistoryServer, or // TimelineServer that provides application-specific information. The URL uses // the internal hostname, and requires a proxy server for resolution and, // possibly, access. - string tracking_url = 4; + string tracking_url = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// A Cloud Dataproc job resource. +// A Dataproc job resource. message Job { // Optional. The fully qualified reference to the job, which can be used to // obtain the equivalent REST path of the job resource. If this property // is not specified when a job is created, the server generates a // job_id. - JobReference reference = 1; + JobReference reference = 1 [(google.api.field_behavior) = OPTIONAL]; // Required. Job information, including how, when, and where to // run the job. - JobPlacement placement = 2; + JobPlacement placement = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The application/framework-specific portion of the job. oneof type_job { - // Job is a Hadoop job. - HadoopJob hadoop_job = 3; + // Optional. Job is a Hadoop job. + HadoopJob hadoop_job = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Job is a Spark job. + SparkJob spark_job = 4 [(google.api.field_behavior) = OPTIONAL]; - // Job is a Spark job. - SparkJob spark_job = 4; + // Optional. Job is a PySpark job. + PySparkJob pyspark_job = 5 [(google.api.field_behavior) = OPTIONAL]; - // Job is a Pyspark job. - PySparkJob pyspark_job = 5; + // Optional. Job is a Hive job. + HiveJob hive_job = 6 [(google.api.field_behavior) = OPTIONAL]; - // Job is a Hive job. - HiveJob hive_job = 6; + // Optional. Job is a Pig job. + PigJob pig_job = 7 [(google.api.field_behavior) = OPTIONAL]; - // Job is a Pig job. - PigJob pig_job = 7; + // Optional. Job is a SparkR job. + SparkRJob spark_r_job = 21 [(google.api.field_behavior) = OPTIONAL]; - // Job is a SparkR job. - SparkRJob spark_r_job = 21; + // Optional. Job is a SparkSql job. + SparkSqlJob spark_sql_job = 12 [(google.api.field_behavior) = OPTIONAL]; - // Job is a SparkSql job. - SparkSqlJob spark_sql_job = 12; + // Optional. Job is a Presto job. + PrestoJob presto_job = 23 [(google.api.field_behavior) = OPTIONAL]; } // Output only. The job status. Additional application-specific // status information may be contained in the type_job // and yarn_applications fields. - JobStatus status = 8; + JobStatus status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The previous job status. - repeated JobStatus status_history = 13; + repeated JobStatus status_history = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The collection of YARN applications spun up by this job. // // **Beta** Feature: This report is available for testing purposes only. It // may be changed before final release. - repeated YarnApplication yarn_applications = 9; + repeated YarnApplication yarn_applications = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The email address of the user submitting the job. For jobs // submitted on the cluster, the address is username@hostname. - string submitted_by = 10; + string submitted_by = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A URI pointing to the location of the stdout of the job's // driver program. - string driver_output_resource_uri = 17; + string driver_output_resource_uri = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. If present, the location of miscellaneous control files // which may be used as part of job setup and handling. If not present, // control files may be placed in the same location as `driver_output_uri`. - string driver_control_files_uri = 15; + string driver_control_files_uri = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The labels to associate with this job. // Label **keys** must contain 1 to 63 characters, and must conform to @@ -637,15 +699,21 @@ message Job { // characters, and must conform to [RFC // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be // associated with a job. - map labels = 18; + map labels = 18 [(google.api.field_behavior) = OPTIONAL]; // Optional. Job scheduling configuration. - JobScheduling scheduling = 20; + JobScheduling scheduling = 20 [(google.api.field_behavior) = OPTIONAL]; // Output only. A UUID that uniquely identifies a job within the project // over time. This is in contrast to a user-settable reference.job_id that // may be reused over time. - string job_uuid = 22; + string job_uuid = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether the job is completed. If the value is `false`, + // the job is still in progress. If `true`, the job is completed, and + // `status.state` field will indicate if it was successful, failed, + // or cancelled. + bool done = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Job scheduling options. @@ -658,20 +726,35 @@ message JobScheduling { // 4 times within 10 minute window. // // Maximum value is 10. - int32 max_failures_per_hour = 1; + int32 max_failures_per_hour = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Job Operation metadata. +message JobMetadata { + // Output only. The job id. + string job_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Most recent job status. + JobStatus status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Operation type. + string operation_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Job submission time. + google.protobuf.Timestamp start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to submit a job. message SubmitJobRequest { // Required. The ID of the Google Cloud Platform project that the job // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The job resource. - Job job = 2; + Job job = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. A unique id used to identify the request. If the server // receives two [SubmitJobRequest][google.cloud.dataproc.v1beta2.SubmitJobRequest] requests with the same @@ -684,20 +767,20 @@ message SubmitJobRequest { // // The id must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 4; + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; } // A request to get the resource representation for a job in a project. message GetJobRequest { // Required. The ID of the Google Cloud Platform project that the job // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The job ID. - string job_id = 2; + string job_id = 2 [(google.api.field_behavior) = REQUIRED]; } // A request to list jobs in a project. @@ -717,27 +800,27 @@ message ListJobsRequest { // Required. The ID of the Google Cloud Platform project that the job // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 6; + // Required. The Dataproc region in which to handle the request. + string region = 6 [(google.api.field_behavior) = REQUIRED]; // Optional. The number of results to return in each response. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The page token, returned by a previous call, to request the // next page of results. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. If set, the returned jobs list includes only jobs that were // submitted to the named cluster. - string cluster_name = 4; + string cluster_name = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Specifies enumerated categories of jobs to list. // (default = match ALL jobs). // // If `filter` is provided, `jobStateMatcher` will be ignored. - JobStateMatcher job_state_matcher = 5; + JobStateMatcher job_state_matcher = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. A filter constraining the jobs to list. Filters are // case-sensitive and have the following syntax: @@ -753,23 +836,23 @@ message ListJobsRequest { // Example filter: // // status.state = ACTIVE AND labels.env = staging AND labels.starred = * - string filter = 7; + string filter = 7 [(google.api.field_behavior) = OPTIONAL]; } // A request to update a job. message UpdateJobRequest { // Required. The ID of the Google Cloud Platform project that the job // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 2; + // Required. The Dataproc region in which to handle the request. + string region = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The job ID. - string job_id = 3; + string job_id = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The changes to the job. - Job job = 4; + Job job = 4 [(google.api.field_behavior) = REQUIRED]; // Required. Specifies the path, relative to Job, of // the field to update. For example, to update the labels of a Job the @@ -777,42 +860,42 @@ message UpdateJobRequest { // labels, and the `PATCH` request body would specify the new // value. Note: Currently, labels is the only // field that can be updated. - google.protobuf.FieldMask update_mask = 5; + google.protobuf.FieldMask update_mask = 5 [(google.api.field_behavior) = REQUIRED]; } // A list of jobs in a project. message ListJobsResponse { // Output only. Jobs list. - repeated Job jobs = 1; + repeated Job jobs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. This token is included in the response if there are more results // to fetch. To fetch additional results, provide this value as the // `page_token` in a subsequent ListJobsRequest. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; } // A request to cancel a job. message CancelJobRequest { // Required. The ID of the Google Cloud Platform project that the job // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The job ID. - string job_id = 2; + string job_id = 2 [(google.api.field_behavior) = REQUIRED]; } // A request to delete a job. message DeleteJobRequest { // Required. The ID of the Google Cloud Platform project that the job // belongs to. - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The Cloud Dataproc region in which to handle the request. - string region = 3; + // Required. The Dataproc region in which to handle the request. + string region = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The job ID. - string job_id = 2; + string job_id = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/cloud/dataproc/v1beta2/operations.proto b/google/cloud/dataproc/v1beta2/operations.proto index 8f9252a46..2e98fb82a 100644 --- a/google/cloud/dataproc/v1beta2/operations.proto +++ b/google/cloud/dataproc/v1beta2/operations.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dataproc.v1beta2; -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1beta2;dataproc"; option java_multiple_files = true; diff --git a/google/cloud/dataproc/v1beta2/shared.proto b/google/cloud/dataproc/v1beta2/shared.proto index de1130d9c..130ae554d 100644 --- a/google/cloud/dataproc/v1beta2/shared.proto +++ b/google/cloud/dataproc/v1beta2/shared.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -32,9 +31,15 @@ enum Component { // The Anaconda python distribution. ANACONDA = 5; + // Docker + DOCKER = 13; + // The Druid query engine. DRUID = 9; + // Flink + FLINK = 14; + // The Hive Web HCatalog (the REST service for accessing HCatalog). HIVE_WEBHCAT = 3; @@ -47,6 +52,12 @@ enum Component { // The Presto query engine. PRESTO = 6; + // The Ranger service. + RANGER = 12; + + // The Solr service. + SOLR = 10; + // The Zeppelin notebook. ZEPPELIN = 4; diff --git a/google/cloud/dataproc/v1beta2/workflow_templates.proto b/google/cloud/dataproc/v1beta2/workflow_templates.proto index edaf357cc..e5ef680bd 100644 --- a/google/cloud/dataproc/v1beta2/workflow_templates.proto +++ b/google/cloud/dataproc/v1beta2/workflow_templates.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dataproc.v1beta2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/dataproc/v1beta2/clusters.proto"; import "google/cloud/dataproc/v1beta2/jobs.proto"; import "google/longrunning/operations.proto"; @@ -30,8 +32,11 @@ option java_outer_classname = "WorkflowTemplatesProto"; option java_package = "com.google.cloud.dataproc.v1beta2"; // The API interface for managing Workflow Templates in the -// Cloud Dataproc API. +// Dataproc API. service WorkflowTemplateService { + option (google.api.default_host) = "dataproc.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Creates new workflow template. rpc CreateWorkflowTemplate(CreateWorkflowTemplateRequest) returns (WorkflowTemplate) { option (google.api.http) = { @@ -42,6 +47,7 @@ service WorkflowTemplateService { body: "template" } }; + option (google.api.method_signature) = "parent, template"; } // Retrieves the latest workflow template. @@ -55,6 +61,7 @@ service WorkflowTemplateService { get: "/v1beta2/{name=projects/*/locations/*/workflowTemplates/*}" } }; + option (google.api.method_signature) = "name"; } // Instantiates a template and begins execution. @@ -70,7 +77,9 @@ service WorkflowTemplateService { // clusters to be deleted. // // The [Operation.metadata][google.longrunning.Operation.metadata] will be - // [WorkflowMetadata][google.cloud.dataproc.v1beta2.WorkflowMetadata]. + // [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#workflowmetadata). + // Also see [Using + // WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). // // On successful completion, // [Operation.response][google.longrunning.Operation.response] will be @@ -84,6 +93,12 @@ service WorkflowTemplateService { body: "*" } }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name, parameters"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "WorkflowMetadata" + }; } // Instantiates a template and begins execution. @@ -103,7 +118,9 @@ service WorkflowTemplateService { // clusters to be deleted. // // The [Operation.metadata][google.longrunning.Operation.metadata] will be - // [WorkflowMetadata][google.cloud.dataproc.v1beta2.WorkflowMetadata]. + // [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). + // Also see [Using + // WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). // // On successful completion, // [Operation.response][google.longrunning.Operation.response] will be @@ -117,6 +134,11 @@ service WorkflowTemplateService { body: "template" } }; + option (google.api.method_signature) = "parent, template"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "WorkflowMetadata" + }; } // Updates (replaces) workflow template. The updated template @@ -130,6 +152,7 @@ service WorkflowTemplateService { body: "template" } }; + option (google.api.method_signature) = "template"; } // Lists workflows that match the specified filter in the request. @@ -140,6 +163,7 @@ service WorkflowTemplateService { get: "/v1beta2/{parent=projects/*/locations/*}/workflowTemplates" } }; + option (google.api.method_signature) = "parent"; } // Deletes a workflow template. It does not cancel in-progress workflows. @@ -150,11 +174,19 @@ service WorkflowTemplateService { delete: "/v1beta2/{name=projects/*/locations/*/workflowTemplates/*}" } }; + option (google.api.method_signature) = "name"; } } -// A Cloud Dataproc workflow template resource. +// A Dataproc workflow template resource. message WorkflowTemplate { + option (google.api.resource) = { + type: "dataproc.googleapis.com/WorkflowTemplate" + pattern: "projects/{project}/regions/{region}/workflowTemplates/{workflow_template}" + pattern: "projects/{project}/locations/{location}/workflowTemplates/{workflow_template}" + history: ORIGINALLY_SINGLE_PATTERN + }; + // Required. The template id. // // The id must contain only letters (a-z, A-Z), numbers (0-9), @@ -162,12 +194,19 @@ message WorkflowTemplate { // or hyphen. Must consist of between 3 and 50 characters. // // . - string id = 2; + string id = 2 [(google.api.field_behavior) = REQUIRED]; - // Output only. The "resource name" of the template, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - string name = 1; + // Output only. The resource name of the workflow template, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates`, the resource name of the + // template has the following format: + // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` + // + // * For `projects.locations.workflowTemplates`, the resource name of the + // template has the following format: + // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. Used to perform a consistent read-modify-write. // @@ -178,13 +217,13 @@ message WorkflowTemplate { // the current template with the `version` field filled in with the // current server version. The user updates other fields in the template, // then returns it as part of the `UpdateWorkflowTemplate` request. - int32 version = 3; + int32 version = 3 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time template was created. - google.protobuf.Timestamp create_time = 4; + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time template was last updated. - google.protobuf.Timestamp update_time = 5; + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The labels to associate with this template. These labels // will be propagated to all jobs and clusters created by the workflow @@ -198,7 +237,7 @@ message WorkflowTemplate { // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). // // No more than 32 labels can be associated with a template. - map labels = 6; + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; // Required. WorkflowTemplate scheduling information. WorkflowTemplatePlacement placement = 7; @@ -209,7 +248,7 @@ message WorkflowTemplate { // Optional. Template parameters whose values are substituted into the // template. Values for parameters must be provided when the template is // instantiated. - repeated TemplateParameter parameters = 9; + repeated TemplateParameter parameters = 9 [(google.api.field_behavior) = OPTIONAL]; } // Specifies workflow execution target. @@ -283,27 +322,27 @@ message OrderedJob { // The id must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). Cannot begin or end with underscore // or hyphen. Must consist of between 3 and 50 characters. - string step_id = 1; + string step_id = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The job definition. oneof job_type { - // Job is a Hadoop job. HadoopJob hadoop_job = 2; - // Job is a Spark job. SparkJob spark_job = 3; - // Job is a Pyspark job. PySparkJob pyspark_job = 4; - // Job is a Hive job. HiveJob hive_job = 5; - // Job is a Pig job. PigJob pig_job = 6; - // Job is a SparkSql job. + // Spark R job + SparkRJob spark_r_job = 11; + SparkSqlJob spark_sql_job = 7; + + // Presto job + PrestoJob presto_job = 12; } // Optional. The labels to associate with this job. @@ -316,14 +355,14 @@ message OrderedJob { // the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} // // No more than 32 labels can be associated with a given job. - map labels = 8; + map labels = 8 [(google.api.field_behavior) = OPTIONAL]; // Optional. Job scheduling configuration. - JobScheduling scheduling = 9; + JobScheduling scheduling = 9 [(google.api.field_behavior) = OPTIONAL]; // Optional. The optional list of prerequisite job step_ids. // If not specified, the job will start at the beginning of workflow. - repeated string prerequisite_step_ids = 10; + repeated string prerequisite_step_ids = 10 [(google.api.field_behavior) = OPTIONAL]; } // A configurable parameter that replaces one or more fields in the template. @@ -336,7 +375,7 @@ message OrderedJob { // - Main class (in HadoopJob and SparkJob) // - Zone (in ClusterSelector) message TemplateParameter { - // Required. Parameter name. + // Required. Parameter name. // The parameter name is used as the key, and paired with the // parameter value, which are passed to the template when the template // is instantiated. @@ -425,7 +464,7 @@ message ValueValidation { repeated string values = 1; } -// A Cloud Dataproc workflow template resource. +// A Dataproc workflow template resource. message WorkflowMetadata { // The operation state. enum State { @@ -442,57 +481,66 @@ message WorkflowMetadata { DONE = 3; } - // Output only. The "resource name" of the template. - string template = 1; + // Output only. The resource name of the workflow template as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates`, the resource name of the + // template has the following format: + // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` + // + // * For `projects.locations.workflowTemplates`, the resource name of the + // template has the following format: + // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` + string template = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The version of template at the time of // workflow instantiation. - int32 version = 2; + int32 version = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The create cluster operation metadata. - ClusterOperation create_cluster = 3; + ClusterOperation create_cluster = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The workflow graph. - WorkflowGraph graph = 4; + WorkflowGraph graph = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The delete cluster operation metadata. - ClusterOperation delete_cluster = 5; + ClusterOperation delete_cluster = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The workflow state. - State state = 6; + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The name of the target cluster. - string cluster_name = 7; + string cluster_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Map from parameter names to values that were used for those parameters. map parameters = 8; // Output only. Workflow start time. - google.protobuf.Timestamp start_time = 9; + google.protobuf.Timestamp start_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Workflow end time. - google.protobuf.Timestamp end_time = 10; + google.protobuf.Timestamp end_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The UUID of target cluster. - string cluster_uuid = 11; + string cluster_uuid = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The cluster operation triggered by a workflow. message ClusterOperation { // Output only. The id of the cluster operation. - string operation_id = 1; + string operation_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Error, if operation failed. - string error = 2; + string error = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Indicates the operation is done. - bool done = 3; + bool done = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The workflow graph. message WorkflowGraph { // Output only. The workflow nodes. - repeated WorkflowNode nodes = 1; + repeated WorkflowNode nodes = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The workflow node. @@ -520,41 +568,65 @@ message WorkflowNode { } // Output only. The name of the node. - string step_id = 1; + string step_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Node's prerequisite nodes. - repeated string prerequisite_step_ids = 2; + repeated string prerequisite_step_ids = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The job id; populated after the node enters RUNNING state. - string job_id = 3; + string job_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The node state. - NodeState state = 5; + NodeState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The error detail. - string error = 6; + string error = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to create a workflow template. message CreateWorkflowTemplateRequest { - // Required. The "resource name" of the region, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}` - string parent = 1; + // Required. The resource name of the region or location, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates,create`, the resource name of the + // region has the following format: + // `projects/{project_id}/regions/{region}` + // + // * For `projects.locations.workflowTemplates.create`, the resource name of + // the location has the following format: + // `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dataproc.googleapis.com/WorkflowTemplate" + } + ]; // Required. The Dataproc workflow template to create. - WorkflowTemplate template = 2; + WorkflowTemplate template = 2 [(google.api.field_behavior) = REQUIRED]; } // A request to fetch a workflow template. message GetWorkflowTemplateRequest { - // Required. The "resource name" of the workflow template, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - string name = 1; + // Required. The resource name of the workflow template, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates.get`, the resource name of the + // template has the following format: + // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` + // + // * For `projects.locations.workflowTemplates.get`, the resource name of the + // template has the following format: + // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataproc.googleapis.com/WorkflowTemplate" + } + ]; // Optional. The version of workflow template to retrieve. Only previously - // instatiated versions can be retrieved. + // instantiated versions can be retrieved. // // If unspecified, retrieves the current version. int32 version = 2; @@ -562,10 +634,22 @@ message GetWorkflowTemplateRequest { // A request to instantiate a workflow template. message InstantiateWorkflowTemplateRequest { - // Required. The "resource name" of the workflow template, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - string name = 1; + // Required. The resource name of the workflow template, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates.instantiate`, the resource name + // of the template has the following format: + // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` + // + // * For `projects.locations.workflowTemplates.instantiate`, the resource name + // of the template has the following format: + // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataproc.googleapis.com/WorkflowTemplate" + } + ]; // Optional. The version of workflow template to instantiate. If specified, // the workflow will be instantiated only if the current version of @@ -596,13 +680,25 @@ message InstantiateWorkflowTemplateRequest { // A request to instantiate an inline workflow template. message InstantiateInlineWorkflowTemplateRequest { - // Required. The "resource name" of the workflow template region, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}` - string parent = 1; + // Required. The resource name of the region or location, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates,instantiateinline`, the resource + // name of the region has the following format: + // `projects/{project_id}/regions/{region}` + // + // * For `projects.locations.workflowTemplates.instantiateinline`, the + // resource name of the location has the following format: + // `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dataproc.googleapis.com/WorkflowTemplate" + } + ]; // Required. The workflow template to instantiate. - WorkflowTemplate template = 2; + WorkflowTemplate template = 2 [(google.api.field_behavior) = REQUIRED]; // Deprecated. Please use `request_id` field instead. string instance_id = 3; @@ -624,15 +720,27 @@ message UpdateWorkflowTemplateRequest { // Required. The updated workflow template. // // The `template.version` field must match the current version. - WorkflowTemplate template = 1; + WorkflowTemplate template = 1 [(google.api.field_behavior) = REQUIRED]; } // A request to list workflow templates in a project. message ListWorkflowTemplatesRequest { - // Required. The "resource name" of the region, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}` - string parent = 1; + // Required. The resource name of the region or location, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates,list`, the resource + // name of the region has the following format: + // `projects/{project_id}/regions/{region}` + // + // * For `projects.locations.workflowTemplates.list`, the + // resource name of the location has the following format: + // `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dataproc.googleapis.com/WorkflowTemplate" + } + ]; // Optional. The maximum number of results to return in each response. int32 page_size = 2; @@ -645,22 +753,34 @@ message ListWorkflowTemplatesRequest { // A response to a request to list workflow templates in a project. message ListWorkflowTemplatesResponse { // Output only. WorkflowTemplates list. - repeated WorkflowTemplate templates = 1; + repeated WorkflowTemplate templates = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. This token is included in the response if there are more // results to fetch. To fetch additional results, provide this value as the // page_token in a subsequent ListWorkflowTemplatesRequest. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to delete a workflow template. // // Currently started workflows will remain running. message DeleteWorkflowTemplateRequest { - // Required. The "resource name" of the workflow template, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - string name = 1; + // Required. The resource name of the workflow template, as described + // in https://cloud.google.com/apis/design/resource_names. + // + // * For `projects.regions.workflowTemplates.delete`, the resource name + // of the template has the following format: + // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` + // + // * For `projects.locations.workflowTemplates.instantiate`, the resource name + // of the template has the following format: + // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataproc.googleapis.com/WorkflowTemplate" + } + ]; // Optional. The version of workflow template to delete. If specified, // will only delete the template if the current server version matches diff --git a/google/cloud/dialogflow/BUILD.bazel b/google/cloud/dialogflow/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/cloud/dialogflow/BUILD.bazel +++ b/google/cloud/dialogflow/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/dialogflow/v2/BUILD.bazel b/google/cloud/dialogflow/v2/BUILD.bazel index dffd1c7b1..3bdb813b1 100644 --- a/google/cloud/dialogflow/v2/BUILD.bazel +++ b/google/cloud/dialogflow/v2/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -13,14 +16,17 @@ proto_library( "audio_config.proto", "context.proto", "entity_type.proto", + "environment.proto", "intent.proto", "session.proto", "session_entity_type.proto", + "validation_result.proto", "webhook.proto", ], deps = [ "//google/api:annotations_proto", "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/api:resource_proto", "//google/longrunning:operations_proto", "//google/rpc:status_proto", @@ -35,7 +41,10 @@ proto_library( proto_library_with_info( name = "dialogflow_proto_with_info", - deps = [":dialogflow_proto"], + deps = [ + ":dialogflow_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -43,18 +52,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "dialogflow_java_proto", deps = [":dialogflow_proto"], @@ -63,56 +67,46 @@ java_proto_library( java_grpc_library( name = "dialogflow_java_grpc", srcs = [":dialogflow_proto"], - deps = [":dialogflow_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "dialogflow_resource_name_java_proto", - gapic_yaml = "dialogflow_gapic.yaml", - deps = [":dialogflow_proto"], + deps = [":dialogflow_java_proto"], ) java_gapic_library( name = "dialogflow_java_gapic", src = ":dialogflow_proto_with_info", gapic_yaml = "dialogflow_gapic.yaml", - service_yaml = "//google/cloud/dialogflow:dialogflow_v2.yaml", - test_deps = [":dialogflow_java_grpc"], + package = "google.cloud.dialogflow.v2", + service_yaml = "dialogflow_v2.yaml", + test_deps = [ + ":dialogflow_java_grpc", + ], deps = [ ":dialogflow_java_proto", - ":dialogflow_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, -) - -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":dialogflow_java_gapic_test", - ], -) for test_name in [ - "com.google.cloud.dialogflow.v2.AgentsClientTest", - "com.google.cloud.dialogflow.v2.ContextsClientTest", - "com.google.cloud.dialogflow.v2.EntityTypesClientTest", - "com.google.cloud.dialogflow.v2.IntentsClientTest", - "com.google.cloud.dialogflow.v2.SessionEntityTypesClientTest", - "com.google.cloud.dialogflow.v2.SessionsClientTest", -]] - -# Opensource Packages + ], +) + +java_gapic_test( + name = "dialogflow_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.dialogflow.v2.AgentsClientTest", + "com.google.cloud.dialogflow.v2.ContextsClientTest", + "com.google.cloud.dialogflow.v2.EntityTypesClientTest", + "com.google.cloud.dialogflow.v2.EnvironmentsClientTest", + "com.google.cloud.dialogflow.v2.IntentsClientTest", + "com.google.cloud.dialogflow.v2.SessionEntityTypesClientTest", + "com.google.cloud.dialogflow.v2.SessionsClientTest", + ], + runtime_deps = [":dialogflow_java_gapic_test"], +) + +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-dialogflow-v2-java", - client_deps = [":dialogflow_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":dialogflow_java_gapic_test"], - grpc_deps = [":dialogflow_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":dialogflow_java_gapic", + ":dialogflow_java_grpc", ":dialogflow_java_proto", ":dialogflow_proto", - ":dialogflow_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -120,10 +114,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -141,15 +135,17 @@ go_proto_library( go_gapic_library( name = "dialogflow_go_gapic", - src = ":dialogflow_proto_with_info", - gapic_yaml = "dialogflow_gapic.yaml", - importpath = "cloud.google.com/go/dialogflow/apiv2", - service_yaml = "//google/cloud/dialogflow:dialogflow_v2.yaml", + srcs = [":dialogflow_proto_with_info"], + grpc_service_config = "dialogflow_grpc_service_config.json", + importpath = "cloud.google.com/go/dialogflow/apiv2;dialogflow", + service_yaml = "dialogflow_v2.yaml", deps = [ ":dialogflow_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", "@io_bazel_rules_go//proto/wkt:struct_go_proto", ], ) @@ -161,26 +157,90 @@ go_test( importpath = "cloud.google.com/go/dialogflow/apiv2", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-dialogflow-v2-go", deps = [ ":dialogflow_go_gapic", - ":dialogflow_go_gapic_srcjar-smoke-test.srcjar", ":dialogflow_go_gapic_srcjar-test.srcjar", ":dialogflow_go_proto", ], ) +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "dialogflow_moved_proto", + srcs = [":dialogflow_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "dialogflow_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":dialogflow_moved_proto"], +) + +py_grpc_library( + name = "dialogflow_py_grpc", + srcs = [":dialogflow_moved_proto"], + deps = [":dialogflow_py_proto"], +) + +py_gapic_library( + name = "dialogflow_py_gapic", + src = ":dialogflow_proto_with_info", + gapic_yaml = "dialogflow_gapic.yaml", + package = "google.cloud.dialogflow.v2", + service_yaml = "dialogflow_v2.yaml", + deps = [ + ":dialogflow_py_grpc", + ":dialogflow_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "dialogflow-v2-py", + deps = [ + ":dialogflow_py_gapic", + ":dialogflow_py_grpc", + ":dialogflow_py_proto", + ], +) + ############################################################################## # PHP ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "php_proto_library", - "php_grpc_library", - "php_gapic_library", "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", ) php_proto_library( @@ -198,14 +258,15 @@ php_gapic_library( name = "dialogflow_php_gapic", src = ":dialogflow_proto_with_info", gapic_yaml = "dialogflow_gapic.yaml", - service_yaml = "//google/cloud/dialogflow:dialogflow_v2.yaml", + package = "google.cloud.dialogflow.v2", + service_yaml = "dialogflow_v2.yaml", deps = [ ":dialogflow_php_grpc", ":dialogflow_php_proto", ], ) -# Opensource Packages +# Open Source Packages php_gapic_assembly_pkg( name = "google-cloud-dialogflow-v2-php", deps = [ @@ -220,15 +281,16 @@ php_gapic_assembly_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "nodejs_gapic_library", "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", ) nodejs_gapic_library( name = "dialogflow_nodejs_gapic", src = ":dialogflow_proto_with_info", gapic_yaml = "dialogflow_gapic.yaml", - service_yaml = "//google/cloud/dialogflow:dialogflow_v2.yaml", + package = "google.cloud.dialogflow.v2", + service_yaml = "dialogflow_v2.yaml", deps = [], ) @@ -239,3 +301,96 @@ nodejs_gapic_assembly_pkg( ":dialogflow_proto", ], ) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "dialogflow_ruby_proto", + deps = [":dialogflow_proto"], +) + +ruby_grpc_library( + name = "dialogflow_ruby_grpc", + srcs = [":dialogflow_proto"], + deps = [":dialogflow_ruby_proto"], +) + +ruby_gapic_library( + name = "dialogflow_ruby_gapic", + src = ":dialogflow_proto_with_info", + gapic_yaml = "dialogflow_gapic.yaml", + package = "google.cloud.dialogflow.v2", + service_yaml = "dialogflow_v2.yaml", + deps = [ + ":dialogflow_ruby_grpc", + ":dialogflow_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-dialogflow-v2-ruby", + deps = [ + ":dialogflow_ruby_gapic", + ":dialogflow_ruby_grpc", + ":dialogflow_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "dialogflow_csharp_proto", + deps = [":dialogflow_proto"], +) + +csharp_grpc_library( + name = "dialogflow_csharp_grpc", + srcs = [":dialogflow_proto"], + deps = [":dialogflow_csharp_proto"], +) + +csharp_gapic_library( + name = "dialogflow_csharp_gapic", + src = ":dialogflow_proto_with_info", + gapic_yaml = "dialogflow_gapic.yaml", + package = "google.cloud.dialogflow.v2", + service_yaml = "dialogflow_v2.yaml", + deps = [ + ":dialogflow_csharp_grpc", + ":dialogflow_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-dialogflow-v2-csharp", + deps = [ + ":dialogflow_csharp_gapic", + ":dialogflow_csharp_grpc", + ":dialogflow_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/dialogflow/v2/agent.proto b/google/cloud/dialogflow/v2/agent.proto index 0ec81e436..23a3d44f0 100644 --- a/google/cloud/dialogflow/v2/agent.proto +++ b/google/cloud/dialogflow/v2/agent.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,17 +11,19 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dialogflow.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2/validation_result.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2"; @@ -70,6 +72,7 @@ service Agents { option (google.api.http) = { get: "/v2/{parent=projects/*}/agent" }; + option (google.api.method_signature) = "parent"; } // Creates/updates the specified agent. @@ -78,6 +81,7 @@ service Agents { post: "/v2/{agent.parent=projects/*}/agent" body: "agent" }; + option (google.api.method_signature) = "agent"; } // Deletes the specified agent. @@ -85,6 +89,7 @@ service Agents { option (google.api.http) = { delete: "/v2/{parent=projects/*}/agent" }; + option (google.api.method_signature) = "parent"; } // Returns the list of agents. @@ -98,6 +103,7 @@ service Agents { option (google.api.http) = { get: "/v2/{parent=projects/*}/agent:search" }; + option (google.api.method_signature) = "parent"; } // Trains the specified agent. @@ -108,6 +114,11 @@ service Agents { post: "/v2/{parent=projects/*}/agent:train" body: "*" }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; } // Exports the specified agent to a ZIP file. @@ -118,6 +129,11 @@ service Agents { post: "/v2/{parent=projects/*}/agent:export" body: "*" }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.dialogflow.v2.ExportAgentResponse" + metadata_type: "google.protobuf.Struct" + }; } // Imports the specified agent from a ZIP file. @@ -132,6 +148,10 @@ service Agents { post: "/v2/{parent=projects/*}/agent:import" body: "*" }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; } // Restores the specified agent from a ZIP file. @@ -145,11 +165,28 @@ service Agents { post: "/v2/{parent=projects/*}/agent:restore" body: "*" }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Gets agent validation result. Agent validation is performed during + // training time and is updated automatically when training is completed. + rpc GetValidationResult(GetValidationResultRequest) returns (ValidationResult) { + option (google.api.http) = { + get: "/v2/{parent=projects/*}/agent/validationResult" + }; } } // Represents a conversational agent. message Agent { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Agent" + pattern: "projects/{project}/agent" + }; + // Match mode determines how intents are detected from user queries. enum MatchMode { // Not specified. @@ -160,7 +197,7 @@ message Agent { MATCH_MODE_HYBRID = 1; // Can be used for agents with a large number of examples in intents, - // especially the ones using @sys.any or very large developer entities. + // especially the ones using @sys.any or very large custom entities. MATCH_MODE_ML_ONLY = 2; } @@ -196,43 +233,48 @@ message Agent { // Required. The project of this agent. // Format: `projects/`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Required. The name of this agent. - string display_name = 2; + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The default language of the agent as a language tag. See // [Language // Support](https://cloud.google.com/dialogflow/docs/reference/language) // for a list of the currently supported language codes. This field cannot be // set by the `Update` method. - string default_language_code = 3; + string default_language_code = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. The list of all languages supported by this agent (except for the // `default_language_code`). - repeated string supported_language_codes = 4; + repeated string supported_language_codes = 4 [(google.api.field_behavior) = OPTIONAL]; // Required. The time zone of this agent from the // [time zone database](https://www.iana.org/time-zones), e.g., // America/New_York, Europe/Paris. - string time_zone = 5; + string time_zone = 5 [(google.api.field_behavior) = REQUIRED]; // Optional. The description of this agent. // The maximum length is 500 characters. If exceeded, the request is rejected. - string description = 6; + string description = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. The URI of the agent's avatar. // Avatars are used throughout the Dialogflow console and in the self-hosted // [Web // Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) // integration. - string avatar_uri = 7; + string avatar_uri = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. Determines whether this agent should log conversation queries. - bool enable_logging = 8; + bool enable_logging = 8 [(google.api.field_behavior) = OPTIONAL]; // Optional. Determines how intents are detected from user queries. - MatchMode match_mode = 9; + MatchMode match_mode = 9 [(google.api.field_behavior) = OPTIONAL]; // Optional. To filter out false positive results and still get variety in // matched natural language inputs for your agent, you can tune the machine @@ -241,52 +283,67 @@ message Agent { // are no fallback intents defined, no intent will be triggered. The score // values range from 0.0 (completely uncertain) to 1.0 (completely certain). // If set to 0.0, the default of 0.3 is used. - float classification_threshold = 10; + float classification_threshold = 10 [(google.api.field_behavior) = OPTIONAL]; // Optional. API version displayed in Dialogflow console. If not specified, // V2 API is assumed. Clients are free to query different service endpoints // for different API versions. However, bots connectors and webhook calls will // follow the specified API version. - ApiVersion api_version = 14; + ApiVersion api_version = 14 [(google.api.field_behavior) = OPTIONAL]; // Optional. The agent tier. If not specified, TIER_STANDARD is assumed. - Tier tier = 15; + Tier tier = 15 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent]. message GetAgentRequest { // Required. The project that the agent to fetch is associated with. // Format: `projects/`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; } // The request message for [Agents.SetAgent][google.cloud.dialogflow.v2.Agents.SetAgent]. message SetAgentRequest { // Required. The agent to update. - Agent agent = 1; + Agent agent = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [Agents.DeleteAgent][google.cloud.dialogflow.v2.Agents.DeleteAgent]. message DeleteAgentRequest { // Required. The project that the agent to delete is associated with. // Format: `projects/`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; } // The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents]. message SearchAgentsRequest { // Required. The project to list agents from. // Format: `projects/`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; // Optional. The maximum number of items to return in a single page. By // default 100 and at most 1000. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The next_page_token value returned from a previous list request. + // The next_page_token value returned from a previous list request. string page_token = 3; } @@ -305,45 +362,41 @@ message SearchAgentsResponse { message TrainAgentRequest { // Required. The project that the agent to train is associated with. // Format: `projects/`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; } // The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent]. message ExportAgentRequest { // Required. The project that the agent to export is associated with. // Format: `projects/`. - string parent = 1; - - // Optional. The - // [Google Cloud Storage](https://cloud.google.com/storage/docs/) + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Required. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) // URI to export the agent to. // The format of this URI must be `gs:///`. // If left unspecified, the serialized agent is returned inline. - string agent_uri = 2; + string agent_uri = 2 [(google.api.field_behavior) = REQUIRED]; } // The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent]. message ExportAgentResponse { - // Required. The exported agent. + // The exported agent. oneof agent { // The URI to a file containing the exported agent. This field is populated // only if `agent_uri` is specified in `ExportAgentRequest`. string agent_uri = 1; - // The exported agent. - // - // Example for how to export an agent to a zip file via a command line: - //
curl \
-    //   'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:export'\
-    //   -X POST \
-    //   -H 'Authorization: Bearer '$(gcloud auth application-default
-    //   print-access-token) \
-    //   -H 'Accept: application/json' \
-    //   -H 'Content-Type: application/json' \
-    //   --compressed \
-    //   --data-binary '{}' \
-    // | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*/\1/' \
-    // | base64 --decode > <agent zip file>
+ // Zip compressed raw byte content for agent. bytes agent_content = 2; } } @@ -352,7 +405,12 @@ message ExportAgentResponse { message ImportAgentRequest { // Required. The project that the agent to import is associated with. // Format: `projects/`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; // Required. The agent to import. oneof agent { @@ -360,20 +418,7 @@ message ImportAgentRequest { // Note: The URI must start with "gs://". string agent_uri = 2; - // The agent to import. - // - // Example for how to import an agent via the command line: - //
curl \
-    //   'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:import\
-    //    -X POST \
-    //    -H 'Authorization: Bearer '$(gcloud auth application-default
-    //    print-access-token) \
-    //    -H 'Accept: application/json' \
-    //    -H 'Content-Type: application/json' \
-    //    --compressed \
-    //    --data-binary "{
-    //       'agentContent': '$(cat <agent zip file> | base64 -w 0)'
-    //    }"
+ // Zip compressed raw byte content for agent. bytes agent_content = 3; } } @@ -382,7 +427,12 @@ message ImportAgentRequest { message RestoreAgentRequest { // Required. The project that the agent to restore is associated with. // Format: `projects/`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; // Required. The agent to restore. oneof agent { @@ -390,20 +440,26 @@ message RestoreAgentRequest { // Note: The URI must start with "gs://". string agent_uri = 2; - // The agent to restore. - // - // Example for how to restore an agent via the command line: - //
curl \
-    //   'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:restore\
-    //    -X POST \
-    //    -H 'Authorization: Bearer '$(gcloud auth application-default
-    //    print-access-token) \
-    //    -H 'Accept: application/json' \
-    //    -H 'Content-Type: application/json' \
-    //    --compressed \
-    //    --data-binary "{
-    //        'agentContent': '$(cat <agent zip file> | base64 -w 0)'
-    //    }"
+ // Zip compressed raw byte content for agent. bytes agent_content = 3; } } + +// The request message for [Agents.GetValidationResult][google.cloud.dialogflow.v2.Agents.GetValidationResult]. +message GetValidationResultRequest { + // Required. The project that the agent is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Optional. The language for which you want a validation result. If not + // specified, the agent's default language is used. [Many + // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // are supported. Note: languages must be enabled in the agent before they can + // be used. + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/google/cloud/dialogflow/artman_dialogflow_v2.yaml b/google/cloud/dialogflow/v2/artman_dialogflow_v2.yaml similarity index 92% rename from google/cloud/dialogflow/artman_dialogflow_v2.yaml rename to google/cloud/dialogflow/v2/artman_dialogflow_v2.yaml index c3c4c92c1..66b7b21bf 100644 --- a/google/cloud/dialogflow/artman_dialogflow_v2.yaml +++ b/google/cloud/dialogflow/v2/artman_dialogflow_v2.yaml @@ -5,9 +5,9 @@ common: proto_deps: - name: google-common-protos src_proto_paths: - - v2 + - . service_yaml: dialogflow_v2.yaml - gapic_yaml: v2/dialogflow_gapic.yaml + gapic_yaml: dialogflow_gapic.yaml artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/dialogflow/v2/audio_config.proto b/google/cloud/dialogflow/v2/audio_config.proto index 3a1c600c5..975ea69a6 100644 --- a/google/cloud/dialogflow/v2/audio_config.proto +++ b/google/cloud/dialogflow/v2/audio_config.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dialogflow.v2; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/api/annotations.proto"; @@ -77,47 +78,33 @@ enum AudioEncoding { AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; } -// Instructs the speech recognizer how to process the audio content. -message InputAudioConfig { - // Required. Audio encoding of the audio content to process. - AudioEncoding audio_encoding = 1; - - // Required. Sample rate (in Hertz) of the audio content sent in the query. - // Refer to - // [Cloud Speech API - // documentation](https://cloud.google.com/speech-to-text/docs/basics) for - // more details. - int32 sample_rate_hertz = 2; - - // Required. The language of the supplied audio. Dialogflow does not do - // translations. See [Language - // Support](https://cloud.google.com/dialogflow/docs/reference/language) - // for a list of the currently supported language codes. Note that queries in - // the same session do not necessarily need to specify the same language. - string language_code = 3; - +// Hints for the speech recognizer to help with recognition in a specific +// conversation state. +message SpeechContext { // Optional. A list of strings containing words and phrases that the speech // recognizer should recognize with higher likelihood. // - // See [the Cloud Speech - // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) - // for more details. - repeated string phrase_hints = 4; - - // Optional. Which variant of the [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. - SpeechModelVariant model_variant = 10; + // This list can be used to: + // * improve accuracy for words and phrases you expect the user to say, + // e.g. typical commands for your Dialogflow agent + // * add additional words to the speech recognizer vocabulary + // * ... + // + // See the [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/quotas) for usage + // limits. + repeated string phrases = 1; - // Optional. If `false` (default), recognition does not cease until the - // client closes the stream. - // If `true`, the recognizer will detect a single spoken utterance in input - // audio. Recognition ceases when it detects the audio's voice has - // stopped or paused. In this case, once a detected intent is received, the - // client should close the stream and start a new request with a new stream as - // needed. - // Note: This setting is relevant only for streaming methods. - // Note: When specified, InputAudioConfig.single_utterance takes precedence - // over StreamingDetectIntentRequest.single_utterance. - bool single_utterance = 8; + // Optional. Boost for this context compared to other contexts: + // + // * If the boost is positive, Dialogflow will increase the probability that + // the phrases in this context are recognized over similar sounding phrases. + // * If the boost is unspecified or non-positive, Dialogflow will not apply + // any boost. + // + // Dialogflow recommends that you use boosts in the range (0, 20] and that you + // find a value that fits your use case with binary search. + float boost = 2; } // Variant of the specified [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. @@ -163,15 +150,131 @@ enum SpeechModelVariant { USE_ENHANCED = 3; } +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // Time offset relative to the beginning of the audio that corresponds to the + // start of the spoken word. This is an experimental feature and the accuracy + // of the time offset can vary. + google.protobuf.Duration start_offset = 1; + + // Time offset relative to the beginning of the audio that corresponds to the + // end of the spoken word. This is an experimental feature and the accuracy of + // the time offset can vary. + google.protobuf.Duration end_offset = 2; + + // The Speech confidence between 0.0 and 1.0 for this word. A higher number + // indicates an estimated greater likelihood that the recognized word is + // correct. The default of 0.0 is a sentinel value indicating that confidence + // was not set. + // + // This field is not guaranteed to be fully stable over time for the same + // audio input. Users should also not rely on it to always be provided. + float confidence = 4; +} + +// Instructs the speech recognizer how to process the audio content. +message InputAudioConfig { + // Required. Audio encoding of the audio content to process. + AudioEncoding audio_encoding = 1; + + // Required. Sample rate (in Hertz) of the audio content sent in the query. + // Refer to + // [Cloud Speech API + // documentation](https://cloud.google.com/speech-to-text/docs/basics) for + // more details. + int32 sample_rate_hertz = 2; + + // Required. The language of the supplied audio. Dialogflow does not do + // translations. See [Language + // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // for a list of the currently supported language codes. Note that queries in + // the same session do not necessarily need to specify the same language. + string language_code = 3; + + // If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in + // [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] with information about the recognized speech + // words, e.g. start and end time offsets. If false or unspecified, Speech + // doesn't return any word-level information. + bool enable_word_info = 13; + + // A list of strings containing words and phrases that the speech + // recognizer should recognize with higher likelihood. + // + // See [the Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + // for more details. + // + // This field is deprecated. Please use [speech_contexts]() instead. If you + // specify both [phrase_hints]() and [speech_contexts](), Dialogflow will + // treat the [phrase_hints]() as a single additional [SpeechContext](). + repeated string phrase_hints = 4 [deprecated = true]; + + // Context information to assist speech recognition. + // + // See [the Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + // for more details. + repeated SpeechContext speech_contexts = 11; + + // Which Speech model to select for the given request. Select the + // model best suited to your domain to get best results. If a model is not + // explicitly specified, then we auto-select a model based on the parameters + // in the InputAudioConfig. + // If enhanced speech model is enabled for the agent and an enhanced + // version of the specified model for the language does not exist, then the + // speech is recognized using the standard version of the specified model. + // Refer to + // [Cloud Speech API + // documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) + // for more details. + string model = 7; + + // Which variant of the [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. + SpeechModelVariant model_variant = 10; + + // If `false` (default), recognition does not cease until the + // client closes the stream. + // If `true`, the recognizer will detect a single spoken utterance in input + // audio. Recognition ceases when it detects the audio's voice has + // stopped or paused. In this case, once a detected intent is received, the + // client should close the stream and start a new request with a new stream as + // needed. + // Note: This setting is relevant only for streaming methods. + // Note: When specified, InputAudioConfig.single_utterance takes precedence + // over StreamingDetectIntentRequest.single_utterance. + bool single_utterance = 8; +} + +// Gender of the voice as described in +// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). +enum SsmlVoiceGender { + // An unspecified gender, which means that the client doesn't care which + // gender the selected voice will have. + SSML_VOICE_GENDER_UNSPECIFIED = 0; + + // A male voice. + SSML_VOICE_GENDER_MALE = 1; + + // A female voice. + SSML_VOICE_GENDER_FEMALE = 2; + + // A gender-neutral voice. + SSML_VOICE_GENDER_NEUTRAL = 3; +} + // Description of which voice to use for speech synthesis. message VoiceSelectionParams { // Optional. The name of the voice. If not set, the service will choose a - // voice based on the other parameters such as language_code and gender. + // voice based on the other parameters such as language_code and + // [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender]. string name = 1; // Optional. The preferred gender of the voice. If not set, the service will // choose a voice based on the other parameters such as language_code and - // name. Note that this is only a preference, not requirement. If a + // [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that this is only a preference, not requirement. If a // voice of the appropriate gender is not available, the synthesizer should // substitute a voice with a different gender rather than failing the request. SsmlVoiceGender ssml_gender = 2; @@ -209,39 +312,6 @@ message SynthesizeSpeechConfig { VoiceSelectionParams voice = 4; } -// Gender of the voice as described in -// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). -enum SsmlVoiceGender { - // An unspecified gender, which means that the client doesn't care which - // gender the selected voice will have. - SSML_VOICE_GENDER_UNSPECIFIED = 0; - - // A male voice. - SSML_VOICE_GENDER_MALE = 1; - - // A female voice. - SSML_VOICE_GENDER_FEMALE = 2; - - // A gender-neutral voice. - SSML_VOICE_GENDER_NEUTRAL = 3; -} - -// Instructs the speech synthesizer on how to generate the output audio content. -message OutputAudioConfig { - // Required. Audio encoding of the synthesized audio content. - OutputAudioEncoding audio_encoding = 1; - - // Optional. The synthesis sample rate (in hertz) for this audio. If not - // provided, then the synthesizer will use the default sample rate based on - // the audio encoding. If this is different from the voice's natural sample - // rate, then the synthesizer will honor this request by converting to the - // desired sample rate (which might result in worse audio quality). - int32 sample_rate_hertz = 2; - - // Optional. Configuration of how speech should be synthesized. - SynthesizeSpeechConfig synthesize_speech_config = 3; -} - // Audio encoding of the output audio format in Text-To-Speech. enum OutputAudioEncoding { // Not specified. @@ -251,7 +321,7 @@ enum OutputAudioEncoding { // Audio content returned as LINEAR16 also contains a WAV header. OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; - // MP3 audio. + // MP3 audio at 32kbps. OUTPUT_AUDIO_ENCODING_MP3 = 2; // Opus encoded audio wrapped in an ogg container. The result will be a @@ -260,3 +330,21 @@ enum OutputAudioEncoding { // than MP3 while using approximately the same bitrate. OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3; } + +// Instructs the speech synthesizer on how to generate the output audio content. +// If this audio config is supplied in a request, it overrides all existing +// text-to-speech settings applied to the agent. +message OutputAudioConfig { + // Required. Audio encoding of the synthesized audio content. + OutputAudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; + + // The synthesis sample rate (in hertz) for this audio. If not + // provided, then the synthesizer will use the default sample rate based on + // the audio encoding. If this is different from the voice's natural sample + // rate, then the synthesizer will honor this request by converting to the + // desired sample rate (which might result in worse audio quality). + int32 sample_rate_hertz = 2; + + // Configuration of how speech should be synthesized. + SynthesizeSpeechConfig synthesize_speech_config = 3; +} diff --git a/google/cloud/dialogflow/v2/context.proto b/google/cloud/dialogflow/v2/context.proto index 1df6f7695..e647c4ff9 100644 --- a/google/cloud/dialogflow/v2/context.proto +++ b/google/cloud/dialogflow/v2/context.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,17 +11,18 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dialogflow.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; -import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2"; @@ -59,14 +60,22 @@ service Contexts { rpc ListContexts(ListContextsRequest) returns (ListContextsResponse) { option (google.api.http) = { get: "/v2/{parent=projects/*/agent/sessions/*}/contexts" + additional_bindings { + get: "/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" + } }; + option (google.api.method_signature) = "parent"; } // Retrieves the specified context. rpc GetContext(GetContextRequest) returns (Context) { option (google.api.http) = { get: "/v2/{name=projects/*/agent/sessions/*/contexts/*}" + additional_bindings { + get: "/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" + } }; + option (google.api.method_signature) = "name"; } // Creates a context. @@ -76,7 +85,12 @@ service Contexts { option (google.api.http) = { post: "/v2/{parent=projects/*/agent/sessions/*}/contexts" body: "context" + additional_bindings { + post: "/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" + body: "context" + } }; + option (google.api.method_signature) = "parent,context"; } // Updates the specified context. @@ -84,58 +98,109 @@ service Contexts { option (google.api.http) = { patch: "/v2/{context.name=projects/*/agent/sessions/*/contexts/*}" body: "context" + additional_bindings { + patch: "/v2/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" + body: "context" + } }; + option (google.api.method_signature) = "context,update_mask"; } // Deletes the specified context. rpc DeleteContext(DeleteContextRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=projects/*/agent/sessions/*/contexts/*}" + additional_bindings { + delete: "/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" + } }; + option (google.api.method_signature) = "name"; } // Deletes all active contexts in the specified session. rpc DeleteAllContexts(DeleteAllContextsRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{parent=projects/*/agent/sessions/*}/contexts" + additional_bindings { + delete: "/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" + } }; + option (google.api.method_signature) = "parent"; } } // Represents a context. message Context { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Context" + pattern: "projects/{project}/agent/sessions/{session}/contexts/{context}" + pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}" + }; + // Required. The unique identifier of the context. Format: - // `projects//agent/sessions//contexts/`. + // `projects//agent/sessions//contexts/`, + // or `projects//agent/environments//users//sessions//contexts/`. // // The `Context ID` is always converted to lowercase, may only contain - // characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long. - string name = 1; + // characters in a-zA-Z0-9_-% and may be at most 250 bytes long. + // + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + // + // The following context names are reserved for internal use by Dialogflow. + // You should not use these contexts or create contexts with these names: + // + // * `__system_counters__` + // * `*_id_dialog_context` + // * `*_dialog_params_size` + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The number of conversational query requests after which the - // context expires. If set to `0` (the default) the context expires + // context expires. The default is `0`. If set to `0`, the context expires // immediately. Contexts expire automatically after 20 minutes if there // are no matching queries. - int32 lifespan_count = 2; + int32 lifespan_count = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The collection of parameters associated with this context. - // Refer to [this - // doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters) - // for syntax. - google.protobuf.Struct parameters = 3; + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value + google.protobuf.Struct parameters = 3 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts]. message ListContextsRequest { // Required. The session to list all contexts from. - // Format: `projects//agent/sessions/`. - string parent = 1; + // Format: `projects//agent/sessions/` or + // `projects//agent/environments//users//sessions/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Context" + } + ]; // Optional. The maximum number of items to return in a single page. By // default 100 and at most 1000. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The next_page_token value returned from a previous list request. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // The response message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts]. @@ -152,39 +217,75 @@ message ListContextsResponse { // The request message for [Contexts.GetContext][google.cloud.dialogflow.v2.Contexts.GetContext]. message GetContextRequest { // Required. The name of the context. Format: - // `projects//agent/sessions//contexts/`. - string name = 1; + // `projects//agent/sessions//contexts/` + // or `projects//agent/environments//users//sessions//contexts/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Context" + } + ]; } // The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2.Contexts.CreateContext]. message CreateContextRequest { // Required. The session to create a context for. - // Format: `projects//agent/sessions/`. - string parent = 1; + // Format: `projects//agent/sessions/` or + // `projects//agent/environments//users//sessions/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Context" + } + ]; // Required. The context to create. - Context context = 2; + Context context = 2 [(google.api.field_behavior) = REQUIRED]; } // The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2.Contexts.UpdateContext]. message UpdateContextRequest { // Required. The context to update. - Context context = 1; + Context context = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2.Contexts.DeleteContext]. message DeleteContextRequest { // Required. The name of the context to delete. Format: - // `projects//agent/sessions//contexts/`. - string name = 1; + // `projects//agent/sessions//contexts/` + // or `projects//agent/environments//users//sessions//contexts/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Context" + } + ]; } // The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2.Contexts.DeleteAllContexts]. message DeleteAllContextsRequest { // Required. The name of the session to delete all contexts from. Format: - // `projects//agent/sessions/`. - string parent = 1; + // `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. + // If `Environment ID` is not specified we assume default 'draft' environment. + // If `User ID` is not specified, we assume default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Context" + } + ]; } diff --git a/google/cloud/dialogflow/v2/dialogflow_gapic.legacy.yaml b/google/cloud/dialogflow/v2/dialogflow_gapic.legacy.yaml new file mode 100644 index 000000000..fa25d16a5 --- /dev/null +++ b/google/cloud/dialogflow/v2/dialogflow_gapic.legacy.yaml @@ -0,0 +1,1359 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.dialogflow.v2 + python: + package_name: google.cloud.dialogflow_v2.gapic + go: + package_name: cloud.google.com/go/dialogflow/apiv2 + release_level: GA + csharp: + package_name: Google.Cloud.Dialogflow.V2 + ruby: + package_name: Google::Cloud::Dialogflow::V2 + php: + package_name: Google\Cloud\Dialogflow\V2 + nodejs: + package_name: dialogflow.v2 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.dialogflow.v2.Agents + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # name - The simple name of the method. + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce + # method overloads which allow a client to directly pass request message + # fields as method parameters. This information may or may not be used, + # depending on the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request + # message. + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a + # paging list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It + # defines which fields match the paging pattern in the request. The + # request consists of a page_size_field and a token_field. The + # page_size_field is the name of the optional field specifying the + # maximum number of elements to be returned in the response. The + # token_field is the name of the field in the request containing the + # page token. + # The response specifies response information of the list method. It + # defines which fields match the paging pattern in the response. The + # response consists of a token_field and a resources_field. The + # token_field is the name of the field in the response containing the + # next page token. The resources_field is the name of the field in the + # response containing the list of resources belonging to the page. + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: SetAgent + flattening: + groups: + - parameters: + - agent + required_fields: + - agent + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + agent.parent: project + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: DeleteAgent + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: GetAgent + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: SearchAgents + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: agents + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: TrainAgent + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + long_running: + # LINT.IfChange(train_agent_long_running_operation) + return_type: google.protobuf.Empty + metadata_type: google.protobuf.Struct + # LINT.ThenChange() + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + resource_name_treatment: STATIC_TYPES + - name: ExportAgent + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + long_running: + # LINT.IfChange(export_agent_long_running_operation) + return_type: google.cloud.dialogflow.v2.ExportAgentResponse + metadata_type: google.protobuf.Struct + # LINT.ThenChange() + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + resource_name_treatment: STATIC_TYPES + - name: ImportAgent + required_fields: + - parent + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + long_running: + # LINT.IfChange(import_agent_long_running_operation) + return_type: google.protobuf.Empty + metadata_type: google.protobuf.Struct + # LINT.ThenChange() + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + resource_name_treatment: STATIC_TYPES + - name: RestoreAgent + + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + long_running: + # LINT.IfChange(restore_agent_long_running_operation) + return_type: google.protobuf.Empty + metadata_type: google.protobuf.Struct + # LINT.ThenChange() + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + resource_name_treatment: STATIC_TYPES +# The fully qualified name of the API interface. +- name: google.cloud.dialogflow.v2.Contexts + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/agent/sessions/{session} + entity_name: session + - name_pattern: projects/{project}/agent/sessions/{session}/contexts/{context} + entity_name: context + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # name - The simple name of the method. + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce + # method overloads which allow a client to directly pass request message + # fields as method parameters. This information may or may not be used, + # depending on the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request + # message. + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a + # paging list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It + # defines which fields match the paging pattern in the request. The + # request consists of a page_size_field and a token_field. The + # page_size_field is the name of the optional field specifying the + # maximum number of elements to be returned in the response. The + # token_field is the name of the field in the request containing the + # page token. + # The response specifies response information of the list method. It + # defines which fields match the paging pattern in the response. The + # response consists of a token_field and a resources_field. The + # token_field is the name of the field in the response containing the + # next page token. The resources_field is the name of the field in the + # response containing the list of resources belonging to the page. + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListContexts + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: contexts + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: session + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: GetContext + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: context + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: CreateContext + flattening: + groups: + - parameters: + - parent + - context + required_fields: + - parent + - context + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: session + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: UpdateContext + flattening: + groups: + - parameters: + - context + required_fields: + - context + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + context.name: context + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: DeleteContext + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: context + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: DeleteAllContexts + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: session + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES +# The fully qualified name of the API interface. +- name: google.cloud.dialogflow.v2.EntityTypes + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/agent + entity_name: project_agent + - name_pattern: projects/{project}/agent/entityTypes/{entity_type} + entity_name: entity_type + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # name - The simple name of the method. + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce + # method overloads which allow a client to directly pass request message + # fields as method parameters. This information may or may not be used, + # depending on the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request + # message. + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a + # paging list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It + # defines which fields match the paging pattern in the request. The + # request consists of a page_size_field and a token_field. The + # page_size_field is the name of the optional field specifying the + # maximum number of elements to be returned in the response. The + # token_field is the name of the field in the request containing the + # page token. + # The response specifies response information of the list method. It + # defines which fields match the paging pattern in the response. The + # response consists of a token_field and a resources_field. The + # token_field is the name of the field in the response containing the + # next page token. The resources_field is the name of the field in the + # response containing the list of resources belonging to the page. + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListEntityTypes + flattening: + groups: + - parameters: + - parent + - parameters: + - parent + - language_code + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: entity_types + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project_agent + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: GetEntityType + flattening: + groups: + - parameters: + - name + - parameters: + - name + - language_code + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: entity_type + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: CreateEntityType + flattening: + groups: + - parameters: + - parent + - entity_type + - parameters: + - parent + - entity_type + - language_code + required_fields: + - parent + - entity_type + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project_agent + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: UpdateEntityType + flattening: + groups: + - parameters: + - entity_type + - parameters: + - entity_type + - language_code + required_fields: + - entity_type + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + entity_type.name: entity_type + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: DeleteEntityType + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: entity_type + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: BatchUpdateEntityTypes + required_fields: + - parent + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project_agent + timeout_millis: 60000 + long_running: + # LINT.IfChange(batch_update_entity_types_long_running_operation) + return_type: google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse + metadata_type: google.protobuf.Struct + # LINT.ThenChange() + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + resource_name_treatment: STATIC_TYPES + - name: BatchDeleteEntityTypes + flattening: + groups: + - parameters: + - parent + - entity_type_names + required_fields: + - parent + - entity_type_names + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project_agent + timeout_millis: 60000 + long_running: + # LINT.IfChange(batch_delete_entity_types_long_running_operation) + return_type: google.protobuf.Empty + metadata_type: google.protobuf.Struct + # LINT.ThenChange() + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + resource_name_treatment: STATIC_TYPES + - name: BatchCreateEntities + flattening: + groups: + - parameters: + - parent + - entities + - parameters: + - parent + - entities + - language_code + required_fields: + - parent + - entities + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: entity_type + timeout_millis: 60000 + long_running: + # LINT.IfChange(batch_create_entities_long_running_operation) + return_type: google.protobuf.Empty + metadata_type: google.protobuf.Struct + # LINT.ThenChange() + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + resource_name_treatment: STATIC_TYPES + - name: BatchUpdateEntities + flattening: + groups: + - parameters: + - parent + - entities + - parameters: + - parent + - entities + - language_code + required_fields: + - parent + - entities + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: entity_type + timeout_millis: 60000 + long_running: + # LINT.IfChange(batch_update_entities_long_running_operation) + return_type: google.protobuf.Empty + metadata_type: google.protobuf.Struct + # LINT.ThenChange() + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + resource_name_treatment: STATIC_TYPES + - name: BatchDeleteEntities + flattening: + groups: + - parameters: + - parent + - entity_values + - parameters: + - parent + - entity_values + - language_code + required_fields: + - parent + - entity_values + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: entity_type + timeout_millis: 60000 + long_running: + # LINT.IfChange(batch_delete_entities_long_running_operation) + return_type: google.protobuf.Empty + metadata_type: google.protobuf.Struct + # LINT.ThenChange() + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + resource_name_treatment: STATIC_TYPES +# The fully qualified name of the API interface. +- name: google.cloud.dialogflow.v2.Intents + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/agent + entity_name: project_agent + - name_pattern: projects/{project}/agent/intents/{intent} + entity_name: intent + - name_pattern: projects/{project}/agents/{agent} + entity_name: agent + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # name - The simple name of the method. + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce + # method overloads which allow a client to directly pass request message + # fields as method parameters. This information may or may not be used, + # depending on the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request + # message. + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a + # paging list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It + # defines which fields match the paging pattern in the request. The + # request consists of a page_size_field and a token_field. The + # page_size_field is the name of the optional field specifying the + # maximum number of elements to be returned in the response. The + # token_field is the name of the field in the request containing the + # page token. + # The response specifies response information of the list method. It + # defines which fields match the paging pattern in the response. The + # response consists of a token_field and a resources_field. The + # token_field is the name of the field in the response containing the + # next page token. The resources_field is the name of the field in the + # response containing the list of resources belonging to the page. + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListIntents + flattening: + groups: + - parameters: + - parent + - parameters: + - parent + - language_code + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: intents + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project_agent + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: GetIntent + flattening: + groups: + - parameters: + - name + - parameters: + - name + - language_code + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: intent + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: CreateIntent + flattening: + groups: + - parameters: + - parent + - intent + - parameters: + - parent + - intent + - language_code + required_fields: + - parent + - intent + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project_agent + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: UpdateIntent + flattening: + groups: + - parameters: + - intent + - language_code + - parameters: + - intent + - language_code + - update_mask + required_fields: + - intent + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + intent.name: intent + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: DeleteIntent + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: intent + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: BatchUpdateIntents + required_fields: + - parent + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project_agent + timeout_millis: 60000 + long_running: + # LINT.IfChange(batch_update_intents_long_running_operation) + return_type: google.cloud.dialogflow.v2.BatchUpdateIntentsResponse + metadata_type: google.protobuf.Struct + # LINT.ThenChange() + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + resource_name_treatment: STATIC_TYPES + - name: BatchDeleteIntents + flattening: + groups: + - parameters: + - parent + - intents + required_fields: + - parent + - intents + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project_agent + timeout_millis: 60000 + long_running: + # LINT.IfChange(batch_delete_intents_long_running_operation) + return_type: google.protobuf.Empty + metadata_type: google.protobuf.Struct + # LINT.ThenChange() + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + resource_name_treatment: STATIC_TYPES +# The fully qualified name of the API interface. +- name: google.cloud.dialogflow.v2.SessionEntityTypes + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/agent/sessions/{session} + entity_name: session + - name_pattern: projects/{project}/agent/sessions/{session}/entityTypes/{entity_type} + entity_name: session_entity_type + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # name - The simple name of the method. + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce + # method overloads which allow a client to directly pass request message + # fields as method parameters. This information may or may not be used, + # depending on the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request + # message. + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a + # paging list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It + # defines which fields match the paging pattern in the request. The + # request consists of a page_size_field and a token_field. The + # page_size_field is the name of the optional field specifying the + # maximum number of elements to be returned in the response. The + # token_field is the name of the field in the request containing the + # page token. + # The response specifies response information of the list method. It + # defines which fields match the paging pattern in the response. The + # response consists of a token_field and a resources_field. The + # token_field is the name of the field in the response containing the + # next page token. The resources_field is the name of the field in the + # response containing the list of resources belonging to the page. + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListSessionEntityTypes + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: session_entity_types + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: session + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: GetSessionEntityType + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: session_entity_type + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: CreateSessionEntityType + flattening: + groups: + - parameters: + - parent + - session_entity_type + required_fields: + - parent + - session_entity_type + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: session + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: UpdateSessionEntityType + flattening: + groups: + - parameters: + - session_entity_type + required_fields: + - session_entity_type + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + session_entity_type.name: session_entity_type + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: DeleteSessionEntityType + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: session_entity_type + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES +# The fully qualified name of the API interface. +- name: google.cloud.dialogflow.v2.Sessions + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/agent/sessions/{session} + entity_name: session + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # name - The simple name of the method. + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce + # method overloads which allow a client to directly pass request message + # fields as method parameters. This information may or may not be used, + # depending on the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request + # message. + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a + # paging list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It + # defines which fields match the paging pattern in the request. The + # request consists of a page_size_field and a token_field. The + # page_size_field is the name of the optional field specifying the + # maximum number of elements to be returned in the response. The + # token_field is the name of the field in the request containing the + # page token. + # The response specifies response information of the list method. It + # defines which fields match the paging pattern in the response. The + # response consists of a token_field and a resources_field. The + # token_field is the name of the field in the response containing the + # next page token. The resources_field is the name of the field in the + # response containing the list of resources belonging to the page. + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: DetectIntent + flattening: + groups: + - parameters: + - session + - query_input + required_fields: + - session + - query_input + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + session: session + timeout_millis: 220000 + resource_name_treatment: STATIC_TYPES + - name: StreamingDetectIntent + required_fields: + - session + - query_input + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 220000 +# The fully qualified name of the API interface. +- name: google.cloud.dialogflow.v2.Environments + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/agent + entity_name: project_agent + - name_pattern: projects/{project}/agent/environments/{environment} + entity_name: environment + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - INTERNAL + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # name - The simple name of the method. + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce + # method overloads which allow a client to directly pass request message + # fields as method parameters. This information may or may not be used, + # depending on the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request + # message. + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a + # paging list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It + # defines which fields match the paging pattern in the request. The + # request consists of a page_size_field and a token_field. The + # page_size_field is the name of the optional field specifying the + # maximum number of elements to be returned in the response. The + # token_field is the name of the field in the request containing the + # page token. + # The response specifies response information of the list method. It + # defines which fields match the paging pattern in the response. The + # response consists of a token_field and a resources_field. The + # token_field is the name of the field in the response containing the + # next page token. The resources_field is the name of the field in the + # response containing the list of resources belonging to the page. + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListEnvironments + flattening: + groups: + - parameters: + - parent + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: environments + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project_agent + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES +resource_name_generation: +- message_name: SetAgentRequest + field_entity_map: + agent.parent: project +- message_name: DeleteAgentRequest + field_entity_map: + parent: project +- message_name: GetAgentRequest + field_entity_map: + parent: project +- message_name: SearchAgentsRequest + field_entity_map: + parent: project +- message_name: TrainAgentRequest + field_entity_map: + parent: project +- message_name: ExportAgentRequest + field_entity_map: + parent: project +- message_name: ImportAgentRequest + field_entity_map: + parent: project +- message_name: RestoreAgentRequest + field_entity_map: + parent: project +- message_name: ListContextsRequest + field_entity_map: + parent: session +- message_name: GetContextRequest + field_entity_map: + name: context +- message_name: CreateContextRequest + field_entity_map: + parent: session +- message_name: Context + field_entity_map: + name: context +- message_name: DeleteContextRequest + field_entity_map: + name: context +- message_name: DeleteAllContextsRequest + field_entity_map: + parent: session +- message_name: ListEntityTypesRequest + field_entity_map: + parent: project_agent +- message_name: GetEntityTypeRequest + field_entity_map: + name: entity_type +- message_name: CreateEntityTypeRequest + field_entity_map: + parent: project_agent +- message_name: EntityType + field_entity_map: + name: entity_type +- message_name: DeleteEntityTypeRequest + field_entity_map: + name: entity_type +- message_name: BatchUpdateEntityTypesRequest + field_entity_map: + parent: project_agent +- message_name: BatchDeleteEntityTypesRequest + field_entity_map: + parent: project_agent +- message_name: BatchCreateEntitiesRequest + field_entity_map: + parent: entity_type +- message_name: BatchUpdateEntitiesRequest + field_entity_map: + parent: entity_type +- message_name: BatchDeleteEntitiesRequest + field_entity_map: + parent: entity_type +- message_name: ListIntentsRequest + field_entity_map: + parent: project_agent +- message_name: GetIntentRequest + field_entity_map: + name: intent +- message_name: CreateIntentRequest + field_entity_map: + parent: project_agent +- message_name: Intent + field_entity_map: + name: intent +- message_name: DeleteIntentRequest + field_entity_map: + name: intent +- message_name: BatchUpdateIntentsRequest + field_entity_map: + parent: project_agent +- message_name: BatchDeleteIntentsRequest + field_entity_map: + parent: project_agent +- message_name: ListSessionEntityTypesRequest + field_entity_map: + parent: session +- message_name: GetSessionEntityTypeRequest + field_entity_map: + name: session_entity_type +- message_name: CreateSessionEntityTypeRequest + field_entity_map: + parent: session +- message_name: SessionEntityType + field_entity_map: + name: session_entity_type +- message_name: DeleteSessionEntityTypeRequest + field_entity_map: + name: session_entity_type +- message_name: DetectIntentRequest + field_entity_map: + session: session +- message_name: ListEnvironmentsRequest + field_entity_map: + parent: project_agent diff --git a/google/cloud/dialogflow/v2/dialogflow_gapic.yaml b/google/cloud/dialogflow/v2/dialogflow_gapic.yaml index 0c9077039..b110289ba 100644 --- a/google/cloud/dialogflow/v2/dialogflow_gapic.yaml +++ b/google/cloud/dialogflow/v2/dialogflow_gapic.yaml @@ -1,6 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 -# The settings of generated code in a specific language. +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.dialogflow.v2 @@ -8,6 +7,7 @@ language_settings: package_name: google.cloud.dialogflow_v2.gapic go: package_name: cloud.google.com/go/dialogflow/apiv2 + release_level: GA csharp: package_name: Google.Cloud.Dialogflow.V2 ruby: @@ -17,1243 +17,48 @@ language_settings: nodejs: package_name: dialogflow.v2 domain_layer_location: google-cloud -# A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.cloud.dialogflow.v2.Agents - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # name - The simple name of the method. - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce - # method overloads which allow a client to directly pass request message - # fields as method parameters. This information may or may not be used, - # depending on the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request - # message. - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a - # paging list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It - # defines which fields match the paging pattern in the request. The - # request consists of a page_size_field and a token_field. The - # page_size_field is the name of the optional field specifying the - # maximum number of elements to be returned in the response. The - # token_field is the name of the field in the request containing the - # page token. - # The response specifies response information of the list method. It - # defines which fields match the paging pattern in the response. The - # response consists of a token_field and a resources_field. The - # token_field is the name of the field in the response containing the - # next page token. The resources_field is the name of the field in the - # response containing the list of resources belonging to the page. - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: SetAgent - flattening: - groups: - - parameters: - - agent - required_fields: - - agent retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - agent.parent: project - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: DeleteAgent - flattening: - groups: - - parameters: - - parent - required_fields: - - parent retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: GetAgent - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: SearchAgents - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: agents retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: TrainAgent - flattening: - groups: - - parameters: - - parent - required_fields: - - parent retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - long_running: - # LINT.IfChange(train_agent_long_running_operation) - return_type: google.protobuf.Empty - metadata_type: google.protobuf.Struct - # LINT.ThenChange() - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - resource_name_treatment: STATIC_TYPES - name: ExportAgent - flattening: - groups: - - parameters: - - parent - required_fields: - - parent retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - long_running: - # LINT.IfChange(export_agent_long_running_operation) - return_type: google.cloud.dialogflow.v2.ExportAgentResponse - metadata_type: google.protobuf.Struct - # LINT.ThenChange() - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - resource_name_treatment: STATIC_TYPES - - name: ImportAgent - required_fields: - - parent - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - long_running: - # LINT.IfChange(import_agent_long_running_operation) - return_type: google.protobuf.Empty - metadata_type: google.protobuf.Struct - # LINT.ThenChange() - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - resource_name_treatment: STATIC_TYPES - name: RestoreAgent - - required_fields: - - parent retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - long_running: - # LINT.IfChange(restore_agent_long_running_operation) - return_type: google.protobuf.Empty - metadata_type: google.protobuf.Struct - # LINT.ThenChange() - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - resource_name_treatment: STATIC_TYPES - # The fully qualified name of the API interface. - name: google.cloud.dialogflow.v2.Contexts - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/agent/sessions/{session} - entity_name: session - - name_pattern: projects/{project}/agent/sessions/{session}/contexts/{context} - entity_name: context - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # name - The simple name of the method. - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce - # method overloads which allow a client to directly pass request message - # fields as method parameters. This information may or may not be used, - # depending on the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request - # message. - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a - # paging list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It - # defines which fields match the paging pattern in the request. The - # request consists of a page_size_field and a token_field. The - # page_size_field is the name of the optional field specifying the - # maximum number of elements to be returned in the response. The - # token_field is the name of the field in the request containing the - # page token. - # The response specifies response information of the list method. It - # defines which fields match the paging pattern in the response. The - # response consists of a token_field and a resources_field. The - # token_field is the name of the field in the response containing the - # next page token. The resources_field is the name of the field in the - # response containing the list of resources belonging to the page. - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: ListContexts - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: contexts - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: session - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: GetContext - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: context - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: CreateContext - flattening: - groups: - - parameters: - - parent - - context - required_fields: - - parent - - context - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: session - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: UpdateContext - flattening: - groups: - - parameters: - - context - required_fields: - - context - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - context.name: context - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: DeleteContext - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: context - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: DeleteAllContexts - flattening: - groups: - - parameters: - - parent - required_fields: - - parent retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: session - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - # The fully qualified name of the API interface. - name: google.cloud.dialogflow.v2.EntityTypes - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/agent - entity_name: project_agent - - name_pattern: projects/{project}/agent/entityTypes/{entity_type} - entity_name: entity_type - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # name - The simple name of the method. - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce - # method overloads which allow a client to directly pass request message - # fields as method parameters. This information may or may not be used, - # depending on the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request - # message. - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a - # paging list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It - # defines which fields match the paging pattern in the request. The - # request consists of a page_size_field and a token_field. The - # page_size_field is the name of the optional field specifying the - # maximum number of elements to be returned in the response. The - # token_field is the name of the field in the request containing the - # page token. - # The response specifies response information of the list method. It - # defines which fields match the paging pattern in the response. The - # response consists of a token_field and a resources_field. The - # token_field is the name of the field in the response containing the - # next page token. The resources_field is the name of the field in the - # response containing the list of resources belonging to the page. - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: ListEntityTypes - flattening: - groups: - - parameters: - - parent - - parameters: - - parent - - language_code - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: entity_types - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project_agent - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: GetEntityType - flattening: - groups: - - parameters: - - name - - parameters: - - name - - language_code - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: entity_type - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: CreateEntityType - flattening: - groups: - - parameters: - - parent - - entity_type - - parameters: - - parent - - entity_type - - language_code - required_fields: - - parent - - entity_type - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project_agent - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: UpdateEntityType - flattening: - groups: - - parameters: - - entity_type - - parameters: - - entity_type - - language_code - required_fields: - - entity_type - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - entity_type.name: entity_type - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: DeleteEntityType - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: entity_type - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: BatchUpdateEntityTypes - required_fields: - - parent - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project_agent - timeout_millis: 60000 - long_running: - # LINT.IfChange(batch_update_entity_types_long_running_operation) - return_type: google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse - metadata_type: google.protobuf.Struct - # LINT.ThenChange() - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - resource_name_treatment: STATIC_TYPES - name: BatchDeleteEntityTypes - flattening: - groups: - - parameters: - - parent - - entity_type_names - required_fields: - - parent - - entity_type_names retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project_agent - timeout_millis: 60000 - long_running: - # LINT.IfChange(batch_delete_entity_types_long_running_operation) - return_type: google.protobuf.Empty - metadata_type: google.protobuf.Struct - # LINT.ThenChange() - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - resource_name_treatment: STATIC_TYPES - - name: BatchCreateEntities - flattening: - groups: - - parameters: - - parent - - entities - - parameters: - - parent - - entities - - language_code - required_fields: - - parent - - entities - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: entity_type - timeout_millis: 60000 - long_running: - # LINT.IfChange(batch_create_entities_long_running_operation) - return_type: google.protobuf.Empty - metadata_type: google.protobuf.Struct - # LINT.ThenChange() - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - resource_name_treatment: STATIC_TYPES - - name: BatchUpdateEntities - flattening: - groups: - - parameters: - - parent - - entities - - parameters: - - parent - - entities - - language_code - required_fields: - - parent - - entities - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: entity_type - timeout_millis: 60000 - long_running: - # LINT.IfChange(batch_update_entities_long_running_operation) - return_type: google.protobuf.Empty - metadata_type: google.protobuf.Struct - # LINT.ThenChange() - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - resource_name_treatment: STATIC_TYPES - name: BatchDeleteEntities - flattening: - groups: - - parameters: - - parent - - entity_values - - parameters: - - parent - - entity_values - - language_code - required_fields: - - parent - - entity_values retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: entity_type - timeout_millis: 60000 - long_running: - # LINT.IfChange(batch_delete_entities_long_running_operation) - return_type: google.protobuf.Empty - metadata_type: google.protobuf.Struct - # LINT.ThenChange() - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - resource_name_treatment: STATIC_TYPES - # The fully qualified name of the API interface. -- name: google.cloud.dialogflow.v2.Intents - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/agent - entity_name: project_agent - - name_pattern: projects/{project}/agent/intents/{intent} - entity_name: intent - - name_pattern: projects/{project}/agents/{agent} - entity_name: agent - # Definition for retryable codes. +- name: google.cloud.dialogflow.v2.Environments retry_codes_def: - name: idempotent retry_codes: - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # name - The simple name of the method. - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce - # method overloads which allow a client to directly pass request message - # fields as method parameters. This information may or may not be used, - # depending on the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request - # message. - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a - # paging list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It - # defines which fields match the paging pattern in the request. The - # request consists of a page_size_field and a token_field. The - # page_size_field is the name of the optional field specifying the - # maximum number of elements to be returned in the response. The - # token_field is the name of the field in the request containing the - # page token. - # The response specifies response information of the list method. It - # defines which fields match the paging pattern in the response. The - # response consists of a token_field and a resources_field. The - # token_field is the name of the field in the response containing the - # next page token. The resources_field is the name of the field in the - # response containing the list of resources belonging to the page. - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. + - INTERNAL +- name: google.cloud.dialogflow.v2.Intents methods: - - name: ListIntents - flattening: - groups: - - parameters: - - parent - - parameters: - - parent - - language_code - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: intents - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project_agent - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: GetIntent - flattening: - groups: - - parameters: - - name - - parameters: - - name - - language_code - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: intent - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: CreateIntent - flattening: - groups: - - parameters: - - parent - - intent - - parameters: - - parent - - intent - - language_code - required_fields: - - parent - - intent - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project_agent - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: UpdateIntent - flattening: - groups: - - parameters: - - intent - - language_code - - parameters: - - intent - - language_code - - update_mask - required_fields: - - intent - - language_code - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - intent.name: intent - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: DeleteIntent - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: intent - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: BatchUpdateIntents - required_fields: - - parent - - language_code - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project_agent - timeout_millis: 60000 - long_running: - # LINT.IfChange(batch_update_intents_long_running_operation) - return_type: google.cloud.dialogflow.v2.BatchUpdateIntentsResponse - metadata_type: google.protobuf.Struct - # LINT.ThenChange() - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - resource_name_treatment: STATIC_TYPES - name: BatchDeleteIntents - flattening: - groups: - - parameters: - - parent - - intents - required_fields: - - parent - - intents retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project_agent - timeout_millis: 60000 - long_running: - # LINT.IfChange(batch_delete_intents_long_running_operation) - return_type: google.protobuf.Empty - metadata_type: google.protobuf.Struct - # LINT.ThenChange() - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - resource_name_treatment: STATIC_TYPES - # The fully qualified name of the API interface. - name: google.cloud.dialogflow.v2.SessionEntityTypes - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/agent/sessions/{session} - entity_name: session - - name_pattern: projects/{project}/agent/sessions/{session}/entityTypes/{entity_type} - entity_name: session_entity_type - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # name - The simple name of the method. - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce - # method overloads which allow a client to directly pass request message - # fields as method parameters. This information may or may not be used, - # depending on the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request - # message. - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a - # paging list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It - # defines which fields match the paging pattern in the request. The - # request consists of a page_size_field and a token_field. The - # page_size_field is the name of the optional field specifying the - # maximum number of elements to be returned in the response. The - # token_field is the name of the field in the request containing the - # page token. - # The response specifies response information of the list method. It - # defines which fields match the paging pattern in the response. The - # response consists of a token_field and a resources_field. The - # token_field is the name of the field in the response containing the - # next page token. The resources_field is the name of the field in the - # response containing the list of resources belonging to the page. - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: ListSessionEntityTypes - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: session_entity_types - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: session - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: GetSessionEntityType - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: session_entity_type - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: CreateSessionEntityType - flattening: - groups: - - parameters: - - parent - - session_entity_type - required_fields: - - parent - - session_entity_type - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: session - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: UpdateSessionEntityType - flattening: - groups: - - parameters: - - session_entity_type - required_fields: - - session_entity_type - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - session_entity_type.name: session_entity_type - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: DeleteSessionEntityType - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: session_entity_type - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - # The fully qualified name of the API interface. -- name: google.cloud.dialogflow.v2.Sessions - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/agent/sessions/{session} - entity_name: session - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # name - The simple name of the method. - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce - # method overloads which allow a client to directly pass request message - # fields as method parameters. This information may or may not be used, - # depending on the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request - # message. - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a - # paging list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It - # defines which fields match the paging pattern in the request. The - # request consists of a page_size_field and a token_field. The - # page_size_field is the name of the optional field specifying the - # maximum number of elements to be returned in the response. The - # token_field is the name of the field in the request containing the - # page token. - # The response specifies response information of the list method. It - # defines which fields match the paging pattern in the response. The - # response consists of a token_field and a resources_field. The - # token_field is the name of the field in the response containing the - # next page token. The resources_field is the name of the field in the - # response containing the list of resources belonging to the page. - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: DetectIntent - flattening: - groups: - - parameters: - - session - - query_input - required_fields: - - session - - query_input - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - session: session - timeout_millis: 220000 - resource_name_treatment: STATIC_TYPES - - name: StreamingDetectIntent - required_fields: - - session - - query_input - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 220000 -resource_name_generation: -- message_name: SetAgentRequest - field_entity_map: - agent.parent: project -- message_name: DeleteAgentRequest - field_entity_map: - parent: project -- message_name: GetAgentRequest - field_entity_map: - parent: project -- message_name: SearchAgentsRequest - field_entity_map: - parent: project -- message_name: TrainAgentRequest - field_entity_map: - parent: project -- message_name: ExportAgentRequest - field_entity_map: - parent: project -- message_name: ImportAgentRequest - field_entity_map: - parent: project -- message_name: RestoreAgentRequest - field_entity_map: - parent: project -- message_name: ListContextsRequest - field_entity_map: - parent: session -- message_name: GetContextRequest - field_entity_map: - name: context -- message_name: CreateContextRequest - field_entity_map: - parent: session -- message_name: Context - field_entity_map: - name: context -- message_name: DeleteContextRequest - field_entity_map: - name: context -- message_name: DeleteAllContextsRequest - field_entity_map: - parent: session -- message_name: ListEntityTypesRequest - field_entity_map: - parent: project_agent -- message_name: GetEntityTypeRequest - field_entity_map: - name: entity_type -- message_name: CreateEntityTypeRequest - field_entity_map: - parent: project_agent -- message_name: EntityType - field_entity_map: - name: entity_type -- message_name: DeleteEntityTypeRequest - field_entity_map: - name: entity_type -- message_name: BatchUpdateEntityTypesRequest - field_entity_map: - parent: project_agent -- message_name: BatchDeleteEntityTypesRequest - field_entity_map: - parent: project_agent -- message_name: BatchCreateEntitiesRequest - field_entity_map: - parent: entity_type -- message_name: BatchUpdateEntitiesRequest - field_entity_map: - parent: entity_type -- message_name: BatchDeleteEntitiesRequest - field_entity_map: - parent: entity_type -- message_name: ListIntentsRequest - field_entity_map: - parent: project_agent -- message_name: GetIntentRequest - field_entity_map: - name: intent -- message_name: CreateIntentRequest - field_entity_map: - parent: project_agent -- message_name: Intent - field_entity_map: - name: intent -- message_name: DeleteIntentRequest - field_entity_map: - name: intent -- message_name: BatchUpdateIntentsRequest - field_entity_map: - parent: project_agent -- message_name: BatchDeleteIntentsRequest - field_entity_map: - parent: project_agent -- message_name: ListSessionEntityTypesRequest - field_entity_map: - parent: session -- message_name: GetSessionEntityTypeRequest - field_entity_map: - name: session_entity_type -- message_name: CreateSessionEntityTypeRequest - field_entity_map: - parent: session -- message_name: SessionEntityType - field_entity_map: - name: session_entity_type -- message_name: DeleteSessionEntityTypeRequest - field_entity_map: - name: session_entity_type -- message_name: DetectIntentRequest - field_entity_map: - session: session diff --git a/google/cloud/dialogflow/v2/dialogflow_grpc_service_config.json b/google/cloud/dialogflow/v2/dialogflow_grpc_service_config.json new file mode 100755 index 000000000..10cc1d83a --- /dev/null +++ b/google/cloud/dialogflow/v2/dialogflow_grpc_service_config.json @@ -0,0 +1,580 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.EntityTypes", + "method": "ListEntityTypes" + }, + { + "service": "google.cloud.dialogflow.v2.EntityTypes", + "method": "GetEntityType" + }, + { + "service": "google.cloud.dialogflow.v2.EntityTypes", + "method": "DeleteEntityType" + }, + { + "service": "google.cloud.dialogflow.v2.EntityTypes", + "method": "BatchDeleteEntityTypes" + }, + { + "service": "google.cloud.dialogflow.v2.EntityTypes", + "method": "BatchDeleteEntities" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.Intents", + "method": "ListIntents" + }, + { + "service": "google.cloud.dialogflow.v2.Intents", + "method": "GetIntent" + }, + { + "service": "google.cloud.dialogflow.v2.Intents", + "method": "DeleteIntent" + }, + { + "service": "google.cloud.dialogflow.v2.Intents", + "method": "BatchDeleteIntents" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.SessionEntityTypes", + "method": "ListSessionEntityTypes" + }, + { + "service": "google.cloud.dialogflow.v2.SessionEntityTypes", + "method": "GetSessionEntityType" + }, + { + "service": "google.cloud.dialogflow.v2.SessionEntityTypes", + "method": "DeleteSessionEntityType" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.SessionEntityTypes", + "method": "CreateSessionEntityType" + }, + { + "service": "google.cloud.dialogflow.v2.SessionEntityTypes", + "method": "UpdateSessionEntityType" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.Sessions", + "method": "DetectIntent" + }, + { + "service": "google.cloud.dialogflow.v2.Sessions", + "method": "StreamingDetectIntent" + } + ], + "timeout": "220s" + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.Contexts", + "method": "ListContexts" + }, + { + "service": "google.cloud.dialogflow.v2.Contexts", + "method": "GetContext" + }, + { + "service": "google.cloud.dialogflow.v2.Contexts", + "method": "DeleteContext" + }, + { + "service": "google.cloud.dialogflow.v2.Contexts", + "method": "DeleteAllContexts" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.Contexts", + "method": "CreateContext" + }, + { + "service": "google.cloud.dialogflow.v2.Contexts", + "method": "UpdateContext" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.EntityTypes", + "method": "CreateEntityType" + }, + { + "service": "google.cloud.dialogflow.v2.EntityTypes", + "method": "UpdateEntityType" + }, + { + "service": "google.cloud.dialogflow.v2.EntityTypes", + "method": "BatchUpdateEntityTypes" + }, + { + "service": "google.cloud.dialogflow.v2.EntityTypes", + "method": "BatchCreateEntities" + }, + { + "service": "google.cloud.dialogflow.v2.EntityTypes", + "method": "BatchUpdateEntities" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.Intents", + "method": "CreateIntent" + }, + { + "service": "google.cloud.dialogflow.v2.Intents", + "method": "UpdateIntent" + }, + { + "service": "google.cloud.dialogflow.v2.Intents", + "method": "BatchUpdateIntents" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.Agents", + "method": "SetAgent" + }, + { + "service": "google.cloud.dialogflow.v2.Agents", + "method": "DeleteAgent" + }, + { + "service": "google.cloud.dialogflow.v2.Agents", + "method": "GetAgent" + }, + { + "service": "google.cloud.dialogflow.v2.Agents", + "method": "SearchAgents" + }, + { + "service": "google.cloud.dialogflow.v2.Agents", + "method": "TrainAgent" + }, + { + "service": "google.cloud.dialogflow.v2.Agents", + "method": "ExportAgent" + }, + { + "service": "google.cloud.dialogflow.v2.Agents", + "method": "RestoreAgent" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.Agents", + "method": "ImportAgent" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.AnswerRecords", + "method": "ListAnswerRecords" + }, + { + "service": "google.cloud.dialogflow.v2.AnswerRecords", + "method": "UpdateAnswerRecord" + }, + { + "service": "google.cloud.dialogflow.v2.AnswerRecords", + "method": "DeleteAnswerRecord" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.Conversations", + "method": "CreateConversation" + }, + { + "service": "google.cloud.dialogflow.v2.Conversations", + "method": "ListConversations" + }, + { + "service": "google.cloud.dialogflow.v2.Conversations", + "method": "GetConversation" + }, + { + "service": "google.cloud.dialogflow.v2.Conversations", + "method": "AddConversationPhoneNumber" + }, + { + "service": "google.cloud.dialogflow.v2.Conversations", + "method": "CompleteConversation" + }, + { + "service": "google.cloud.dialogflow.v2.Conversations", + "method": "CreateCallMatcher" + }, + { + "service": "google.cloud.dialogflow.v2.Conversations", + "method": "ListCallMatchers" + }, + { + "service": "google.cloud.dialogflow.v2.Conversations", + "method": "ListCallMatchers" + }, + { + "service": "google.cloud.dialogflow.v2.Conversations", + "method": "ListMessages" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.ConversationProfiles", + "method": "ListConversationProfiles" + }, + { + "service": "google.cloud.dialogflow.v2.ConversationProfiles", + "method": "GetConversationProfile" + }, + { + "service": "google.cloud.dialogflow.v2.ConversationProfiles", + "method": "CreateConversationProfile" + }, + { + "service": "google.cloud.dialogflow.v2.ConversationProfiles", + "method": "UpdateConversationProfile" + }, + { + "service": "google.cloud.dialogflow.v2.ConversationProfiles", + "method": "DeleteConversationProfile" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.Documents", + "method": "ListDocuments" + }, + { + "service": "google.cloud.dialogflow.v2.Documents", + "method": "GetDocument" + }, + { + "service": "google.cloud.dialogflow.v2.Documents", + "method": "CreateDocument" + }, + { + "service": "google.cloud.dialogflow.v2.Documents", + "method": "DeleteDocument" + }, + { + "service": "google.cloud.dialogflow.v2.Documents", + "method": "UpdateDocument" + }, + { + "service": "google.cloud.dialogflow.v2.Documents", + "method": "ReloadDocument" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.KnowledgeBases", + "method": "ListKnowledgeBases" + }, + { + "service": "google.cloud.dialogflow.v2.KnowledgeBases", + "method": "GetKnowledgeBase" + }, + { + "service": "google.cloud.dialogflow.v2.KnowledgeBases", + "method": "CreateKnowledgeBase" + }, + { + "service": "google.cloud.dialogflow.v2.KnowledgeBases", + "method": "DeleteKnowledgeBase" + }, + { + "service": "google.cloud.dialogflow.v2.KnowledgeBases", + "method": "UpdateKnowledgeBase" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.PhoneNumbers", + "method": "ListPhoneNumbers" + }, + { + "service": "google.cloud.dialogflow.v2.PhoneNumbers", + "method": "UpdatePhoneNumber" + }, + { + "service": "google.cloud.dialogflow.v2.PhoneNumbers", + "method": "DeletePhoneNumber" + }, + { + "service": "google.cloud.dialogflow.v2.PhoneNumbers", + "method": "UndeletePhoneNumber" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.PhoneNumberOrders", + "method": "CreatePhoneNumberOrder" + }, + { + "service": "google.cloud.dialogflow.v2.PhoneNumberOrders", + "method": "GetPhoneNumberOrder" + }, + { + "service": "google.cloud.dialogflow.v2.PhoneNumberOrders", + "method": "ListPhoneNumberOrders" + }, + { + "service": "google.cloud.dialogflow.v2.PhoneNumberOrders", + "method": "UpdatePhoneNumberOrder" + }, + { + "service": "google.cloud.dialogflow.v2.PhoneNumberOrders", + "method": "CancelPhoneNumberOrder" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.Participants", + "method": "CreateParticipant" + }, + { + "service": "google.cloud.dialogflow.v2.Participants", + "method": "GetParticipant" + }, + { + "service": "google.cloud.dialogflow.v2.Participants", + "method": "ListParticipants" + }, + { + "service": "google.cloud.dialogflow.v2.Participants", + "method": "UpdateParticipant" + }, + { + "service": "google.cloud.dialogflow.v2.Participants", + "method": "AnalyzeContent" + }, + { + "service": "google.cloud.dialogflow.v2.Participants", + "method": "SuggestArticles" + }, + { + "service": "google.cloud.dialogflow.v2.Participants", + "method": "SuggestFaqAnswers" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.Participants", + "method": "StreamingAnalyzeContent" + } + ], + "timeout": "1800s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.Environments", + "method": "ListEnvironments" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "INTERNAL" + ] + } + } + ] +} diff --git a/google/cloud/dialogflow/dialogflow_v2.yaml b/google/cloud/dialogflow/v2/dialogflow_v2.yaml similarity index 59% rename from google/cloud/dialogflow/dialogflow_v2.yaml rename to google/cloud/dialogflow/v2/dialogflow_v2.yaml index 2efbd3fef..a8d105e43 100644 --- a/google/cloud/dialogflow/dialogflow_v2.yaml +++ b/google/cloud/dialogflow/v2/dialogflow_v2.yaml @@ -7,6 +7,7 @@ apis: - name: google.cloud.dialogflow.v2.Agents - name: google.cloud.dialogflow.v2.Contexts - name: google.cloud.dialogflow.v2.EntityTypes +- name: google.cloud.dialogflow.v2.Environments - name: google.cloud.dialogflow.v2.Intents - name: google.cloud.dialogflow.v2.SessionEntityTypes - name: google.cloud.dialogflow.v2.Sessions @@ -24,46 +25,20 @@ documentation: Builds conversational interfaces (for example, chatbots, and voice-powered apps and devices). overview: |- - [Dialogflow](http://dialogflow.com/) is a natural language - understanding platform that makes it easy for you to design and integrate - a conversational user interface into your mobile app, web application, - device, bot, and so on. Using Dialogflow you can provide users new and - engaging ways to interact with your product using both voice recognition - and text input. + Dialogflow is + a natural language understanding platform that makes it easy + to design and integrate a conversational user interface into your mobile + app, web application, device, bot, interactive voice response system, and + so on. Using Dialogflow, you can provide new and engaging ways for + users to interact with your product. - For information on how Dialogflow agents, intents, entities, and so on - work, see the [Dialogflow getting - started - guide](https://dialogflow.com/docs/getting-started/basics) in the - dialogflow.com documentation. + Dialogflow can analyze multiple types of input from your customers, + including text or audio inputs (like from a phone or voice recording). + It can also respond to your customers in a couple of ways, either through + text or with synthetic speech. - ## Dialogflow Editions - - Dialogflow is available in two editions: Standard and Enterprise. For - information on the difference in Dialogflow editions, see [Dialogflow - Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions). - - ## The Dialogflow API - - The Dialogflow API provides a REST and gRPC API that you can use to - incorporate the Dialogflow into your product. After you have created a - Google Cloud project and a Dialogflow agent, you can use the API to create - intents, entities, and so on, and then pass user input to your Dialogflow - agent to determine user intent using - the - [detectIntent](https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/v2beta1/projects.agent.sessions/detectIntent) REST - API, or the - [StreamingDetectIntentRequest](https://cloud.google.com/dialogflow-enterprise/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest) gRPC - API. - - ## Getting Started - - * For information on setting up a Google Cloud Platform project and - creating an agent using the Dialogflow Enterprise Edition, see - [Quickstart](https://cloud.google.com/dialogflow-enterprise/docs/quickstart). * - For information on creating an agent using the Dialogflow Standard - Edition, see [Building Your First - Agent](https://dialogflow.com/docs/getting-started/building-your-first-agent) + For more information, see the + [Dialogflow documentation](https://cloud.google.com/dialogflow/docs). backend: rules: @@ -73,14 +48,16 @@ backend: deadline: 60.0 - selector: 'google.cloud.dialogflow.v2.EntityTypes.*' deadline: 60.0 + - selector: google.cloud.dialogflow.v2.Environments.ListEnvironments + deadline: 60.0 - selector: 'google.cloud.dialogflow.v2.Intents.*' deadline: 60.0 - selector: 'google.cloud.dialogflow.v2.SessionEntityTypes.*' deadline: 60.0 - selector: google.cloud.dialogflow.v2.Sessions.DetectIntent - deadline: 230.0 + deadline: 220.0 - selector: google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent - deadline: 230.0 + deadline: 220.0 - selector: 'google.longrunning.Operations.*' deadline: 60.0 @@ -101,6 +78,11 @@ authentication: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/dialogflow + - selector: google.cloud.dialogflow.v2.Environments.ListEnvironments + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow - selector: 'google.cloud.dialogflow.v2.Intents.*' oauth: canonical_scopes: |- diff --git a/google/cloud/dialogflow/v2/entity_type.proto b/google/cloud/dialogflow/v2/entity_type.proto index c694a0c2a..5c0273724 100644 --- a/google/cloud/dialogflow/v2/entity_type.proto +++ b/google/cloud/dialogflow/v2/entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,17 +11,18 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dialogflow.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2"; @@ -45,11 +46,11 @@ option objc_class_prefix = "DF"; // data types such as date, time, currency, and so on. A system entity is // represented by the `EntityType` type. // -// * **Developer** - entities that are defined by you that represent +// * **Custom** - entities that are defined by you that represent // actionable data that is meaningful to your application. For example, // you could define a `pizza.sauce` entity for red or white pizza sauce, // a `pizza.cheese` entity for the different types of cheese on a pizza, -// a `pizza.topping` entity for different toppings, and so on. A developer +// a `pizza.topping` entity for different toppings, and so on. A custom // entity is represented by the `EntityType` type. // // * **User** - entities that are built for an individual user such as @@ -70,6 +71,8 @@ service EntityTypes { option (google.api.http) = { get: "/v2/{parent=projects/*/agent}/entityTypes" }; + option (google.api.method_signature) = "parent"; + option (google.api.method_signature) = "parent,language_code"; } // Retrieves the specified entity type. @@ -77,6 +80,8 @@ service EntityTypes { option (google.api.http) = { get: "/v2/{name=projects/*/agent/entityTypes/*}" }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,language_code"; } // Creates an entity type in the specified agent. @@ -85,6 +90,8 @@ service EntityTypes { post: "/v2/{parent=projects/*/agent}/entityTypes" body: "entity_type" }; + option (google.api.method_signature) = "parent,entity_type"; + option (google.api.method_signature) = "parent,entity_type,language_code"; } // Updates the specified entity type. @@ -93,6 +100,8 @@ service EntityTypes { patch: "/v2/{entity_type.name=projects/*/agent/entityTypes/*}" body: "entity_type" }; + option (google.api.method_signature) = "entity_type"; + option (google.api.method_signature) = "entity_type,language_code"; } // Deletes the specified entity type. @@ -100,6 +109,7 @@ service EntityTypes { option (google.api.http) = { delete: "/v2/{name=projects/*/agent/entityTypes/*}" }; + option (google.api.method_signature) = "name"; } // Updates/Creates multiple entity types in the specified agent. @@ -110,6 +120,10 @@ service EntityTypes { post: "/v2/{parent=projects/*/agent}/entityTypes:batchUpdate" body: "*" }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse" + metadata_type: "google.protobuf.Struct" + }; } // Deletes entity types in the specified agent. @@ -120,6 +134,11 @@ service EntityTypes { post: "/v2/{parent=projects/*/agent}/entityTypes:batchDelete" body: "*" }; + option (google.api.method_signature) = "parent,entity_type_names"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; } // Creates multiple new entities in the specified entity type. @@ -130,28 +149,48 @@ service EntityTypes { post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate" body: "*" }; + option (google.api.method_signature) = "parent,entities"; + option (google.api.method_signature) = "parent,entities,language_code"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; } // Updates or creates multiple entities in the specified entity type. This // method does not affect entities in the entity type that aren't explicitly // specified in the request. // + // // Operation rpc BatchUpdateEntities(BatchUpdateEntitiesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate" body: "*" }; + option (google.api.method_signature) = "parent,entities"; + option (google.api.method_signature) = "parent,entities,language_code"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; } // Deletes entities in the specified entity type. // + // // Operation rpc BatchDeleteEntities(BatchDeleteEntitiesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete" body: "*" }; + option (google.api.method_signature) = "parent,entity_values"; + option (google.api.method_signature) = "parent,entity_values,language_code"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; } } @@ -159,6 +198,11 @@ service EntityTypes { // Entity types serve as a tool for extracting parameter values from natural // language queries. message EntityType { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/EntityType" + pattern: "projects/{project}/agent/entityTypes/{entity_type}" + }; + // An **entity entry** for an associated entity type. message Entity { // Required. The primary value associated with this entity entry. @@ -167,13 +211,13 @@ message EntityType { // // For `KIND_MAP` entity types: // - // * A canonical value to be used in place of synonyms. + // * A reference value to be used in place of synonyms. // // For `KIND_LIST` entity types: // // * A string that can contain references to other entity types (with or // without aliases). - string value = 1; + string value = 1 [(google.api.field_behavior) = REQUIRED]; // Required. A collection of value synonyms. For example, if the entity type // is *vegetable*, and `value` is *scallions*, a synonym could be *green @@ -182,7 +226,7 @@ message EntityType { // For `KIND_LIST` entity types: // // * This collection must contain exactly one synonym equal to `value`. - repeated string synonyms = 2; + repeated string synonyms = 2 [(google.api.field_behavior) = REQUIRED]; } // Represents kinds of entities. @@ -190,14 +234,18 @@ message EntityType { // Not specified. This value should be never used. KIND_UNSPECIFIED = 0; - // Map entity types allow mapping of a group of synonyms to a canonical + // Map entity types allow mapping of a group of synonyms to a reference // value. KIND_MAP = 1; - // List entity types contain a set of entries that do not map to canonical + // List entity types contain a set of entries that do not map to reference // values. However, list entity types can contain references to other entity // types (with or without aliases). KIND_LIST = 2; + + // Regexp entity types allow to specify regular expressions in entries + // values. + KIND_REGEXP = 3; } // Represents different entity type expansion modes. Automated expansion @@ -219,39 +267,46 @@ message EntityType { string name = 1; // Required. The name of the entity type. - string display_name = 2; + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; // Required. Indicates the kind of entity type. - Kind kind = 3; + Kind kind = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. Indicates whether the entity type can be automatically // expanded. - AutoExpansionMode auto_expansion_mode = 4; + AutoExpansionMode auto_expansion_mode = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. The collection of entity entries associated with the entity type. - repeated Entity entities = 6; + repeated Entity entities = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Enables fuzzy entity extraction during classification. + bool enable_fuzzy_extraction = 7 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes]. message ListEntityTypesRequest { // Required. The agent to list all entity types from. // Format: `projects//agent`. - string parent = 1; - - // Optional. The language to list entity synonyms for. If not specified, - // the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of items to return in a single page. By // default 100 and at most 1000. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The next_page_token value returned from a previous list request. - string page_token = 4; + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; } // The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes]. @@ -269,66 +324,83 @@ message ListEntityTypesResponse { message GetEntityTypeRequest { // Required. The name of the entity type. // Format: `projects//agent/entityTypes/`. - string name = 1; - - // Optional. The language to retrieve entity synonyms for. If not specified, - // the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2.EntityTypes.CreateEntityType]. message CreateEntityTypeRequest { // Required. The agent to create a entity type for. // Format: `projects//agent`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; // Required. The entity type to create. - EntityType entity_type = 2; - - // Optional. The language of entity synonyms defined in `entity_type`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; + EntityType entity_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType]. message UpdateEntityTypeRequest { // Required. The entity type to update. - EntityType entity_type = 1; + EntityType entity_type = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The language of entity synonyms defined in `entity_type`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 3; + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2.EntityTypes.DeleteEntityType]. message DeleteEntityTypeRequest { // Required. The name of the entity type to delete. // Format: `projects//agent/entityTypes/`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; } // The request message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. message BatchUpdateEntityTypesRequest { // Required. The name of the agent to update or create entity types in. // Format: `projects//agent`. - string parent = 1; - - // Required. The source of the entity type batch. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // The source of the entity type batch. // // For each entity type in the batch: // @@ -345,16 +417,15 @@ message BatchUpdateEntityTypesRequest { EntityTypeBatch entity_type_batch_inline = 3; } - // Optional. The language of entity synonyms defined in `entity_types`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 4; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 5; + google.protobuf.FieldMask update_mask = 5 [(google.api.field_behavior) = OPTIONAL]; } // The response message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. @@ -367,70 +438,87 @@ message BatchUpdateEntityTypesResponse { message BatchDeleteEntityTypesRequest { // Required. The name of the agent to delete all entities types for. Format: // `projects//agent`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; // Required. The names entity types to delete. All names must point to the // same agent as `parent`. - repeated string entity_type_names = 2; + repeated string entity_type_names = 2 [(google.api.field_behavior) = REQUIRED]; } // The request message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities]. message BatchCreateEntitiesRequest { // Required. The name of the entity type to create entities in. Format: // `projects//agent/entityTypes/`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; // Required. The entities to create. - repeated EntityType.Entity entities = 2; - - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; + repeated EntityType.Entity entities = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities]. message BatchUpdateEntitiesRequest { // Required. The name of the entity type to update or create entities in. // Format: `projects//agent/entityTypes/`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; // Required. The entities to update or create. - repeated EntityType.Entity entities = 2; + repeated EntityType.Entity entities = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 4; + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntities]. message BatchDeleteEntitiesRequest { // Required. The name of the entity type to delete entries for. Format: // `projects//agent/entityTypes/`. - string parent = 1; - - // Required. The canonical `values` of the entities to delete. Note that + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The reference `values` of the entities to delete. Note that // these are not fully-qualified names, i.e. they don't start with // `projects/`. - repeated string entity_values = 2; - - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; + repeated string entity_values = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; } // This message is a wrapper around a collection of entity types. diff --git a/google/cloud/dialogflow/v2/environment.proto b/google/cloud/dialogflow/v2/environment.proto new file mode 100644 index 000000000..5bb7413f6 --- /dev/null +++ b/google/cloud/dialogflow/v2/environment.proto @@ -0,0 +1,126 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "EnvironmentProto"; +option java_package = "com.google.cloud.dialogflow.v2"; +option objc_class_prefix = "DF"; + +// Manages agent environments. +service Environments { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all non-draft environments of the specified agent. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/agent}/environments" + }; + } +} + +// Represents an agent environment. +message Environment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Environment" + pattern: "projects/{project}/agent/environments/{environment}" + }; + + // Represents an environment state. When an environment is pointed to a new + // agent version, the environment is temporarily set to the `LOADING` state. + // During that time, the environment keeps on serving the previous version of + // the agent. After the new agent version is done loading, the environment is + // set back to the `RUNNING` state. + enum State { + // Not specified. This value is not used. + STATE_UNSPECIFIED = 0; + + // Stopped. + STOPPED = 1; + + // Loading. + LOADING = 2; + + // Running. + RUNNING = 3; + } + + // Output only. The unique identifier of this agent environment. + // Format: `projects//agent/environments/`. + // For Environment ID, "-" is reserved for 'draft' environment. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The developer-provided description for this environment. + // The maximum length is 500 characters. If exceeded, the request is rejected. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The agent version loaded into this environment. + // Format: `projects//agent/versions/`. + string agent_version = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The state of this environment. This field is read-only, i.e., it cannot be + // set by create and update methods. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update time of this environment. This field is read-only, i.e., it + // cannot be set by create and update methods. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. +message ListEnvironmentsRequest { + // Required. The agent to list all environments from. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Environment" + } + ]; + + // Optional. The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. +message ListEnvironmentsResponse { + // The list of agent environments. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated Environment environments = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} diff --git a/google/cloud/dialogflow/v2/intent.proto b/google/cloud/dialogflow/v2/intent.proto index 6cdcd73ec..6a176c35c 100644 --- a/google/cloud/dialogflow/v2/intent.proto +++ b/google/cloud/dialogflow/v2/intent.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dialogflow.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/dialogflow/v2/audio_config.proto"; import "google/cloud/dialogflow/v2/context.proto"; import "google/longrunning/operations.proto"; @@ -25,7 +27,6 @@ import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; -import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2"; @@ -78,6 +79,8 @@ service Intents { option (google.api.http) = { get: "/v2/{parent=projects/*/agent}/intents" }; + option (google.api.method_signature) = "parent"; + option (google.api.method_signature) = "parent,language_code"; } // Retrieves the specified intent. @@ -85,6 +88,8 @@ service Intents { option (google.api.http) = { get: "/v2/{name=projects/*/agent/intents/*}" }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,language_code"; } // Creates an intent in the specified agent. @@ -93,6 +98,8 @@ service Intents { post: "/v2/{parent=projects/*/agent}/intents" body: "intent" }; + option (google.api.method_signature) = "parent,intent"; + option (google.api.method_signature) = "parent,intent,language_code"; } // Updates the specified intent. @@ -101,6 +108,8 @@ service Intents { patch: "/v2/{intent.name=projects/*/agent/intents/*}" body: "intent" }; + option (google.api.method_signature) = "intent,language_code"; + option (google.api.method_signature) = "intent,language_code,update_mask"; } // Deletes the specified intent and its direct or indirect followup intents. @@ -108,6 +117,7 @@ service Intents { option (google.api.http) = { delete: "/v2/{name=projects/*/agent/intents/*}" }; + option (google.api.method_signature) = "name"; } // Updates/Creates multiple intents in the specified agent. @@ -118,6 +128,12 @@ service Intents { post: "/v2/{parent=projects/*/agent}/intents:batchUpdate" body: "*" }; + option (google.api.method_signature) = "parent,intent_batch_uri"; + option (google.api.method_signature) = "parent,intent_batch_inline"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.dialogflow.v2.BatchUpdateIntentsResponse" + metadata_type: "google.protobuf.Struct" + }; } // Deletes intents in the specified agent. @@ -128,6 +144,11 @@ service Intents { post: "/v2/{parent=projects/*/agent}/intents:batchDelete" body: "*" }; + option (google.api.method_signature) = "parent,intents"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; } } @@ -135,6 +156,11 @@ service Intents { // Intents convert a number of user expressions or patterns into an action. An // action is an extraction of a user command or sentence semantics. message Intent { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Intent" + pattern: "projects/{project}/agent/intents/{intent}" + }; + // Represents an example that the agent is trained on. message TrainingPhrase { // Represents a part of a training phrase. @@ -144,18 +170,18 @@ message Intent { // Optional. The entity type name prefixed with `@`. // This field is required for annotated parts of the training phrase. - string entity_type = 2; + string entity_type = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The parameter name for the value extracted from the // annotated part of the example. // This field is required for annotated parts of the training phrase. - string alias = 3; + string alias = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Indicates whether the text was manually annotated. // This field is set to true when the Dialogflow Console is used to // manually annotate the part. When creating an annotated part with the // API, you must set this to true. - bool user_defined = 4; + bool user_defined = 4 [(google.api.field_behavior) = OPTIONAL]; } // Represents different types of training phrases. @@ -180,7 +206,7 @@ message Intent { string name = 1; // Required. The type of the training phrase. - Type type = 2; + Type type = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The ordered list of training phrase parts. // The parts are concatenated in order to form the training phrase. @@ -201,12 +227,12 @@ message Intent { // - `Part.text` is set to a part of the phrase that you want to annotate, // and the `entity_type`, `alias`, and `user_defined` fields are all // set. - repeated Part parts = 3; + repeated Part parts = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. Indicates how many times this example was added to // the intent. Each time a developer adds an existing sample by editing an // intent or training, this counter is increased. - int32 times_added_count = 4; + int32 times_added_count = 4 [(google.api.field_behavior) = OPTIONAL]; } // Represents intent parameters. @@ -218,87 +244,92 @@ message Intent { string display_name = 2; // Optional. The definition of the parameter value. It can be: + // // - a constant string, // - a parameter value defined as `$parameter_name`, // - an original parameter value defined as `$parameter_name.original`, // - a parameter value from some context defined as // `#context_name.parameter_name`. - string value = 3; + string value = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The default value to use when the `value` yields an empty // result. // Default values can be extracted from contexts by using the following // syntax: `#context_name.parameter_name`. - string default_value = 4; + string default_value = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. The name of the entity type, prefixed with `@`, that // describes values of the parameter. If the parameter is // required, this must be provided. - string entity_type_display_name = 5; + string entity_type_display_name = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. Indicates whether the parameter is required. That is, // whether the intent cannot be completed without collecting the parameter // value. - bool mandatory = 6; + bool mandatory = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. The collection of prompts that the agent can present to the // user in order to collect a value for the parameter. - repeated string prompts = 7; + repeated string prompts = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. Indicates whether the parameter represents a list of values. - bool is_list = 8; + bool is_list = 8 [(google.api.field_behavior) = OPTIONAL]; } - // Corresponds to the `Response` field in the Dialogflow console. + // A rich response message. + // Corresponds to the intent `Response` field in the Dialogflow console. + // For more information, see + // [Rich response + // messages](https://cloud.google.com/dialogflow/docs/intents-rich-messages). message Message { // The text response message. message Text { // Optional. The collection of the agent's responses. - repeated string text = 1; + repeated string text = 1 [(google.api.field_behavior) = OPTIONAL]; } // The image response message. message Image { // Optional. The public URI to an image file. - string image_uri = 1; + string image_uri = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. A text description of the image to be used for accessibility, // e.g., screen readers. - string accessibility_text = 2; + string accessibility_text = 2 [(google.api.field_behavior) = OPTIONAL]; } // The quick replies response message. message QuickReplies { // Optional. The title of the collection of quick replies. - string title = 1; + string title = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The collection of quick replies. - repeated string quick_replies = 2; + repeated string quick_replies = 2 [(google.api.field_behavior) = OPTIONAL]; } // The card response message. message Card { - // Optional. Contains information about a button. + // Contains information about a button. message Button { // Optional. The text to show on the button. - string text = 1; + string text = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The text to send back to the Dialogflow API or a URI to // open. - string postback = 2; + string postback = 2 [(google.api.field_behavior) = OPTIONAL]; } // Optional. The title of the card. - string title = 1; + string title = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The subtitle of the card. - string subtitle = 2; + string subtitle = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The public URI to an image file for the card. - string image_uri = 3; + string image_uri = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The collection of card buttons. - repeated Button buttons = 4; + repeated Button buttons = 4 [(google.api.field_behavior) = OPTIONAL]; } // The simple response message containing speech or text. @@ -313,7 +344,7 @@ message Intent { string ssml = 2; // Optional. The text to display. - string display_text = 3; + string display_text = 3 [(google.api.field_behavior) = OPTIONAL]; } // The collection of simple response candidates. @@ -322,7 +353,7 @@ message Intent { // `SimpleResponse`. message SimpleResponses { // Required. The list of simple responses. - repeated SimpleResponse simple_responses = 1; + repeated SimpleResponse simple_responses = 1 [(google.api.field_behavior) = REQUIRED]; } // The basic card message. Useful for displaying information. @@ -339,47 +370,47 @@ message Intent { string title = 1; // Required. Action to take when a user taps on the button. - OpenUriAction open_uri_action = 2; + OpenUriAction open_uri_action = 2 [(google.api.field_behavior) = REQUIRED]; } // Optional. The title of the card. - string title = 1; + string title = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The subtitle of the card. - string subtitle = 2; + string subtitle = 2 [(google.api.field_behavior) = OPTIONAL]; // Required, unless image is present. The body text of the card. string formatted_text = 3; // Optional. The image for the card. - Image image = 4; + Image image = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. The collection of card buttons. - repeated Button buttons = 5; + repeated Button buttons = 5 [(google.api.field_behavior) = OPTIONAL]; } // The suggestion chip message that the user can tap to quickly post a reply // to the conversation. message Suggestion { // Required. The text shown the in the suggestion chip. - string title = 1; + string title = 1 [(google.api.field_behavior) = REQUIRED]; } // The collection of suggestions. message Suggestions { // Required. The list of suggested replies. - repeated Suggestion suggestions = 1; + repeated Suggestion suggestions = 1 [(google.api.field_behavior) = REQUIRED]; } // The suggestion chip message that allows the user to jump out to the app // or website associated with this agent. message LinkOutSuggestion { // Required. The name of the app or site this chip is linking to. - string destination_name = 1; + string destination_name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The URI of the app or site to open when the user taps the // suggestion chip. - string uri = 2; + string uri = 2 [(google.api.field_behavior) = REQUIRED]; } // The card for presenting a list of options to select from. @@ -387,23 +418,26 @@ message Intent { // An item in the list. message Item { // Required. Additional information about this option. - SelectItemInfo info = 1; + SelectItemInfo info = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The title of the list item. - string title = 2; + string title = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. The main text describing the item. - string description = 3; + string description = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The image to display. - Image image = 4; + Image image = 4 [(google.api.field_behavior) = OPTIONAL]; } // Optional. The overall title of the list. - string title = 1; + string title = 1 [(google.api.field_behavior) = OPTIONAL]; // Required. List items. - repeated Item items = 2; + repeated Item items = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Subtitle of the list. + string subtitle = 3 [(google.api.field_behavior) = OPTIONAL]; } // The card for presenting a carousel of options to select from. @@ -411,20 +445,20 @@ message Intent { // An item in the carousel. message Item { // Required. Additional info about the option item. - SelectItemInfo info = 1; + SelectItemInfo info = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Title of the carousel item. - string title = 2; + string title = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. The body text of the card. - string description = 3; + string description = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The image to display. - Image image = 4; + Image image = 4 [(google.api.field_behavior) = OPTIONAL]; } // Required. Carousel items. - repeated Item items = 1; + repeated Item items = 1 [(google.api.field_behavior) = REQUIRED]; } // Additional info about the select item for when it is triggered in a @@ -432,16 +466,200 @@ message Intent { message SelectItemInfo { // Required. A unique key that will be sent back to the agent if this // response is given. - string key = 1; + string key = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A list of synonyms that can also be used to trigger this // item in dialog. - repeated string synonyms = 2; + repeated string synonyms = 2 [(google.api.field_behavior) = OPTIONAL]; } - // Represents different platforms that a rich message can be intended for. + // The media content card for Actions on Google. + message MediaContent { + // Response media object for media content card. + message ResponseMediaObject { + // Required. Name of media card. + string name = 1; + + // Optional. Description of media card. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Image to show with the media card. + oneof image { + // Optional. Image to display above media content. + Image large_image = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Icon to display above media content. + Image icon = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Url where the media is stored. + string content_url = 5; + } + + // Format of response media type. + enum ResponseMediaType { + // Unspecified. + RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0; + + // Response media type is audio. + AUDIO = 1; + } + + // Optional. What type of media is the content (ie "audio"). + ResponseMediaType media_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. List of media objects. + repeated ResponseMediaObject media_objects = 2; + } + + // Browse Carousel Card for Actions on Google. + // https://developers.google.com/actions/assistant/responses#browsing_carousel + message BrowseCarouselCard { + // Browsing carousel tile + message BrowseCarouselCardItem { + // Actions on Google action to open a given url. + message OpenUrlAction { + // Type of the URI. + enum UrlTypeHint { + // Unspecified + URL_TYPE_HINT_UNSPECIFIED = 0; + + // Url would be an amp action + AMP_ACTION = 1; + + // URL that points directly to AMP content, or to a canonical URL + // which refers to AMP content via . + AMP_CONTENT = 2; + } + + // Required. URL + string url = 1; + + // Optional. Specifies the type of viewer that is used when opening + // the URL. Defaults to opening via web browser. + UrlTypeHint url_type_hint = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Action to present to the user. + OpenUrlAction open_uri_action = 1; + + // Required. Title of the carousel item. Maximum of two lines of text. + string title = 2; + + // Optional. Description of the carousel item. Maximum of four lines of + // text. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hero image for the carousel item. + Image image = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Text that appears at the bottom of the Browse Carousel + // Card. Maximum of one line of text. + string footer = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // Image display options for Actions on Google. This should be used for + // when the image's aspect ratio does not match the image container's + // aspect ratio. + enum ImageDisplayOptions { + // Fill the gaps between the image and the image container with gray + // bars. + IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0; + + // Fill the gaps between the image and the image container with gray + // bars. + GRAY = 1; + + // Fill the gaps between the image and the image container with white + // bars. + WHITE = 2; + + // Image is scaled such that the image width and height match or exceed + // the container dimensions. This may crop the top and bottom of the + // image if the scaled image height is greater than the container + // height, or crop the left and right of the image if the scaled image + // width is greater than the container width. This is similar to "Zoom + // Mode" on a widescreen TV when playing a 4:3 video. + CROPPED = 3; + + // Pad the gaps between image and image frame with a blurred copy of the + // same image. + BLURRED_BACKGROUND = 4; + } + + // Required. List of items in the Browse Carousel Card. Minimum of two + // items, maximum of ten. + repeated BrowseCarouselCardItem items = 1; + + // Optional. Settings for displaying the image. Applies to every image in + // [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items]. + ImageDisplayOptions image_display_options = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Table card for Actions on Google. + message TableCard { + // Required. Title of the card. + string title = 1; + + // Optional. Subtitle to the title. + string subtitle = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Image which should be displayed on the card. + Image image = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Display properties for the columns in this table. + repeated ColumnProperties column_properties = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Rows in this table of data. + repeated TableCardRow rows = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of buttons for the card. + repeated BasicCard.Button buttons = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Column properties for [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard]. + message ColumnProperties { + // Text alignments within a cell. + enum HorizontalAlignment { + // Text is aligned to the leading edge of the column. + HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; + + // Text is aligned to the leading edge of the column. + LEADING = 1; + + // Text is centered in the column. + CENTER = 2; + + // Text is aligned to the trailing edge of the column. + TRAILING = 3; + } + + // Required. Column heading. + string header = 1; + + // Optional. Defines text alignment for all cells in this column. + HorizontalAlignment horizontal_alignment = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Row of [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard]. + message TableCardRow { + // Optional. List of cells that make up this row. + repeated TableCardCell cells = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to add a visual divider after this row. + bool divider_after = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Cell of [TableCardRow][google.cloud.dialogflow.v2.Intent.Message.TableCardRow]. + message TableCardCell { + // Required. Text in this cell. + string text = 1; + } + + // The rich response message integration platform. See + // [Integrations](https://cloud.google.com/dialogflow/docs/integrations). enum Platform { - // Not specified. + // Default platform. PLATFORM_UNSPECIFIED = 0; // Facebook. @@ -465,67 +683,9 @@ message Intent { // Viber. VIBER = 7; - // Actions on Google. - // When using Actions on Google, you can choose one of the specific - // Intent.Message types that mention support for Actions on Google, - // or you can use the advanced Intent.Message.payload field. - // The payload field provides access to AoG features not available in the - // specific message types. - // If using the Intent.Message.payload field, it should have a structure - // similar to the JSON message shown here. For more information, see - // [Actions on Google Webhook - // Format](https://developers.google.com/actions/dialogflow/webhook) - //
{
-      //   "expectUserResponse": true,
-      //   "isSsml": false,
-      //   "noInputPrompts": [],
-      //   "richResponse": {
-      //     "items": [
-      //       {
-      //         "simpleResponse": {
-      //           "displayText": "hi",
-      //           "textToSpeech": "hello"
-      //         }
-      //       }
-      //     ],
-      //     "suggestions": [
-      //       {
-      //         "title": "Say this"
-      //       },
-      //       {
-      //         "title": "or this"
-      //       }
-      //     ]
-      //   },
-      //   "systemIntent": {
-      //     "data": {
-      //       "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
-      //       "listSelect": {
-      //         "items": [
-      //           {
-      //             "optionInfo": {
-      //               "key": "key1",
-      //               "synonyms": [
-      //                 "key one"
-      //               ]
-      //             },
-      //             "title": "must not be empty, but unique"
-      //           },
-      //           {
-      //             "optionInfo": {
-      //               "key": "key2",
-      //               "synonyms": [
-      //                 "key two"
-      //               ]
-      //             },
-      //             "title": "must not be empty, but unique"
-      //           }
-      //         ]
-      //       }
-      //     },
-      //     "intent": "actions.intent.OPTION"
-      //   }
-      // }
+ // Google Assistant + // See [Dialogflow webhook + // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) ACTIONS_ON_GOOGLE = 8; // Google Hangouts. @@ -546,9 +706,7 @@ message Intent { // The card response. Card card = 4; - // Returns a response containing a custom, platform-specific payload. - // See the Intent.Message.Platform type for a description of the - // structure that may be required for your platform. + // A custom platform-specific response. google.protobuf.Struct payload = 5; // The voice and text-only responses for Actions on Google. @@ -568,10 +726,19 @@ message Intent { // The carousel card response for Actions on Google. CarouselSelect carousel_select = 12; + + // Browse carousel card for Actions on Google. + BrowseCarouselCard browse_carousel_card = 22; + + // Table card for Actions on Google. + TableCard table_card = 23; + + // The media content card for Actions on Google. + MediaContent media_content = 24; } // Optional. The platform that this message is intended for. - Platform platform = 6; + Platform platform = 6 [(google.api.field_behavior) = OPTIONAL]; } // Represents a single followup intent in the chain. @@ -598,73 +765,77 @@ message Intent { WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; } - // The unique identifier of this intent. + // Optional. The unique identifier of this intent. // Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] // methods. // Format: `projects//agent/intents/`. - string name = 1; + string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Required. The name of this intent. - string display_name = 2; + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Indicates whether webhooks are enabled for the intent. - WebhookState webhook_state = 6; + WebhookState webhook_state = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. The priority of this intent. Higher numbers represent higher - // priorities. If this is zero or unspecified, we use the default - // priority 500000. + // priorities. // - // Negative numbers mean that the intent is disabled. - int32 priority = 3; + // - If the supplied value is unspecified or 0, the service + // translates the value to 500,000, which corresponds to the + // `Normal` priority in the console. + // - If the supplied value is negative, the intent is ignored + // in runtime detect intent requests. + int32 priority = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Indicates whether this is a fallback intent. - bool is_fallback = 4; + bool is_fallback = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Indicates whether Machine Learning is disabled for the intent. - // Note: If `ml_diabled` setting is set to true, then this intent is not + // Note: If `ml_disabled` setting is set to true, then this intent is not // taken into account during inference in `ML ONLY` match mode. Also, // auto-markup in the UI is turned off. - bool ml_disabled = 19; + bool ml_disabled = 19 [(google.api.field_behavior) = OPTIONAL]; // Optional. The list of context names required for this intent to be // triggered. // Format: `projects//agent/sessions/-/contexts/`. - repeated string input_context_names = 7; + repeated string input_context_names = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The collection of event names that trigger the intent. // If the collection of input contexts is not empty, all of the contexts must // be present in the active user session for an event to trigger this intent. - repeated string events = 8; + // Event names are limited to 150 characters. + repeated string events = 8 [(google.api.field_behavior) = OPTIONAL]; // Optional. The collection of examples that the agent is // trained on. - repeated TrainingPhrase training_phrases = 9; + repeated TrainingPhrase training_phrases = 9 [(google.api.field_behavior) = OPTIONAL]; // Optional. The name of the action associated with the intent. // Note: The action name must not contain whitespaces. - string action = 10; + string action = 10 [(google.api.field_behavior) = OPTIONAL]; // Optional. The collection of contexts that are activated when the intent // is matched. Context messages in this collection should not set the // parameters field. Setting the `lifespan_count` to 0 will reset the context // when the intent is matched. // Format: `projects//agent/sessions/-/contexts/`. - repeated Context output_contexts = 11; + repeated Context output_contexts = 11 [(google.api.field_behavior) = OPTIONAL]; // Optional. Indicates whether to delete all contexts in the current // session when this intent is matched. - bool reset_contexts = 12; + bool reset_contexts = 12 [(google.api.field_behavior) = OPTIONAL]; // Optional. The collection of parameters associated with the intent. - repeated Parameter parameters = 13; + repeated Parameter parameters = 13 [(google.api.field_behavior) = OPTIONAL]; // Optional. The collection of rich messages corresponding to the // `Response` field in the Dialogflow console. - repeated Message messages = 14; + repeated Message messages = 14 [(google.api.field_behavior) = OPTIONAL]; // Optional. The list of platforms for which the first responses will be // copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). - repeated Message.Platform default_response_platforms = 15; + repeated Message.Platform default_response_platforms = 15 [(google.api.field_behavior) = OPTIONAL]; // Read-only. The unique identifier of the root intent in the chain of // followup intents. It identifies the correct followup intents chain for @@ -675,8 +846,9 @@ message Intent { // Read-only after creation. The unique identifier of the parent intent in the // chain of followup intents. You can set this field when creating an intent, - // for example with [CreateIntent][] or [BatchUpdateIntents][], in order to - // make this intent a followup intent. + // for example with [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or + // [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], in order to make this + // intent a followup intent. // // It identifies the parent followup intent. // Format: `projects//agent/intents/`. @@ -691,25 +863,29 @@ message Intent { message ListIntentsRequest { // Required. The agent to list all intents from. // Format: `projects//agent`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; - // Optional. The language to list training phrases, parameters and rich - // messages for. If not specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 3; + IntentView intent_view = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of items to return in a single page. By // default 100 and at most 1000. - int32 page_size = 4; + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. The next_page_token value returned from a previous list request. - string page_token = 5; + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; } // The response message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents]. @@ -727,59 +903,66 @@ message ListIntentsResponse { message GetIntentRequest { // Required. The name of the intent. // Format: `projects//agent/intents/`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Intent" + } + ]; - // Optional. The language to retrieve training phrases, parameters and rich - // messages for. If not specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 3; + IntentView intent_view = 3 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [Intents.CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent]. message CreateIntentRequest { // Required. The agent to create a intent for. // Format: `projects//agent`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; // Required. The intent to create. - Intent intent = 2; + Intent intent = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. The language of training phrases, parameters and rich messages - // defined in `intent`. If not specified, the agent's default language is - // used. [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 4; + IntentView intent_view = 4 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent]. message UpdateIntentRequest { // Required. The intent to update. - Intent intent = 1; + Intent intent = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The language of training phrases, parameters and rich messages - // defined in `intent`. If not specified, the agent's default language is - // used. [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 3; + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 4; + IntentView intent_view = 4 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2.Intents.DeleteIntent]. @@ -787,16 +970,25 @@ message DeleteIntentRequest { // Required. The name of the intent to delete. If this intent has direct or // indirect followup intents, we also delete them. // Format: `projects//agent/intents/`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Intent" + } + ]; } -// The request message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents]. message BatchUpdateIntentsRequest { // Required. The name of the agent to update or create intents in. // Format: `projects//agent`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; - // Required. The source of the intent batch. + // The source of the intent batch. oneof intent_batch { // The URI to a Google Cloud Storage file containing intents to update or // create. The file format can either be a serialized proto (of IntentBatch @@ -807,19 +999,18 @@ message BatchUpdateIntentsRequest { IntentBatch intent_batch_inline = 3; } - // Optional. The language of training phrases, parameters and rich messages - // defined in `intents`. If not specified, the agent's default language is - // used. [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 4; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 5; + google.protobuf.FieldMask update_mask = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 6; + IntentView intent_view = 6 [(google.api.field_behavior) = OPTIONAL]; } // The response message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents]. @@ -832,11 +1023,16 @@ message BatchUpdateIntentsResponse { message BatchDeleteIntentsRequest { // Required. The name of the agent to delete all entities types for. Format: // `projects//agent`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; // Required. The collection of intents to delete. Only intent `name` must be // filled in. - repeated Intent intents = 2; + repeated Intent intents = 2 [(google.api.field_behavior) = REQUIRED]; } // This message is a wrapper around a collection of intents. diff --git a/google/cloud/dialogflow/v2/session.proto b/google/cloud/dialogflow/v2/session.proto index 815b40878..9e3d9442d 100644 --- a/google/cloud/dialogflow/v2/session.proto +++ b/google/cloud/dialogflow/v2/session.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,22 +11,24 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dialogflow.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/dialogflow/v2/audio_config.proto"; import "google/cloud/dialogflow/v2/context.proto"; import "google/cloud/dialogflow/v2/intent.proto"; import "google/cloud/dialogflow/v2/session_entity_type.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; import "google/rpc/status.proto"; import "google/type/latlng.proto"; -import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2"; @@ -35,6 +37,11 @@ option java_multiple_files = true; option java_outer_classname = "SessionProto"; option java_package = "com.google.cloud.dialogflow.v2"; option objc_class_prefix = "DF"; +option (google.api.resource_definition) = { + type: "dialogflow.googleapis.com/Session" + pattern: "projects/{project}/agent/sessions/{session}" + pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}" +}; // A session represents an interaction with a user. You retrieve user input // and pass it to the [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or @@ -54,7 +61,12 @@ service Sessions { option (google.api.http) = { post: "/v2/{session=projects/*/agent/sessions/*}:detectIntent" body: "*" + additional_bindings { + post: "/v2/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent" + body: "*" + } }; + option (google.api.method_signature) = "session,query_input"; } // Processes a natural language query in audio format in a streaming fashion @@ -67,13 +79,22 @@ service Sessions { // The request to detect user's intent. message DetectIntentRequest { // Required. The name of the session this query is sent to. Format: - // `projects//agent/sessions/`. It's up to the API - // caller to choose an appropriate session ID. It can be a random number or - // some type of user identifier (preferably hashed). The length of the session - // ID must not exceed 36 bytes. - string session = 1; - - // Optional. The parameters of this query. + // `projects//agent/sessions/`, or + // `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + // default 'draft' environment. If `User ID` is not specified, we are using + // "-". It's up to the API caller to choose an appropriate `Session ID` and + // `User Id`. They can be a random number or some type of user and session + // identifiers (preferably hashed). The length of the `Session ID` and + // `User ID` must not exceed 36 characters. + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Session" + } + ]; + + // The parameters of this query. QueryParameters query_params = 2; // Required. The input specification. It can be set to: @@ -84,14 +105,22 @@ message DetectIntentRequest { // 2. a conversational query in the form of text, or // // 3. an event that specifies which intent to trigger. - QueryInput query_input = 3; + QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. Instructs the speech synthesizer how to generate the output + // Instructs the speech synthesizer how to generate the output // audio. If this field is not set and agent-level speech synthesizer is not // configured, no output audio is generated. OutputAudioConfig output_audio_config = 4; - // Optional. The natural language speech audio to be processed. This field + // Mask for [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] indicating which settings in this + // request-level config should override speech synthesizer settings defined at + // agent-level. + // + // If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] replaces the agent-level + // config in its entirety. + google.protobuf.FieldMask output_audio_config_mask = 7; + + // The natural language speech audio to be processed. This field // should be populated iff `query_input` is set to an input audio config. // A single request can contain up to 1 minute of speech audio data. bytes input_audio = 5; @@ -116,6 +145,10 @@ message DetectIntentResponse { // multiple default text responses exist, they will be concatenated when // generating audio. If no default platform text responses exist, the // generated audio content will be empty. + // + // In some scenarios, multiple output audio fields may be present in the + // response structure. In these cases, only the top-most-level audio output + // has content. bytes output_audio = 4; // The config used by the speech synthesizer to generate the output audio. @@ -124,33 +157,36 @@ message DetectIntentResponse { // Represents the parameters of the conversational query. message QueryParameters { - // Optional. The time zone of this conversational query from the + // The time zone of this conversational query from the // [time zone database](https://www.iana.org/time-zones), e.g., // America/New_York, Europe/Paris. If not provided, the time zone specified in // agent settings is used. string time_zone = 1; - // Optional. The geo location of this conversational query. + // The geo location of this conversational query. google.type.LatLng geo_location = 2; - // Optional. The collection of contexts to be activated before this query is + // The collection of contexts to be activated before this query is // executed. repeated Context contexts = 3; - // Optional. Specifies whether to delete all contexts in the current session + // Specifies whether to delete all contexts in the current session // before the new ones are activated. bool reset_contexts = 4; - // Optional. Additional session entity types to replace or extend developer + // Additional session entity types to replace or extend developer // entity types with. The entity synonyms apply to all languages and persist // for the session of this query. repeated SessionEntityType session_entity_types = 5; - // Optional. This field can be used to pass custom data into the webhook - // associated with the agent. Arbitrary JSON objects are supported. + // This field can be used to pass custom data to your webhook. + // Arbitrary JSON objects are supported. + // If supplied, the value is used to populate the + // `WebhookRequest.original_detect_intent_request.payload` + // field sent to your webhook. google.protobuf.Struct payload = 6; - // Optional. Configures the type of sentiment analysis to perform. If not + // Configures the type of sentiment analysis to perform. If not // provided, sentiment analysis is not performed. SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10; } @@ -211,6 +247,20 @@ message QueryResult { string action = 3; // The collection of extracted parameters. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value google.protobuf.Struct parameters = 4; // This field is set to: @@ -244,7 +294,7 @@ message QueryResult { // The intent that matched the conversational query. Some, not // all fields are filled in this message, including but not limited to: - // `name`, `display_name` and `webhook_state`. + // `name`, `display_name`, `end_interaction` and `is_fallback`. Intent intent = 11; // The intent detection confidence. Values range from 0.0 @@ -257,9 +307,13 @@ message QueryResult { // the greatest `knowledgeAnswers.match_confidence` value in the list. float intent_detection_confidence = 12; - // The free-form diagnostic info. For example, this field could contain - // webhook call latency. The string keys of the Struct's fields map can change - // without notice. + // Free-form diagnostic information for the associated detect intent request. + // The fields of this data can change without notice, so you should not write + // code that depends on its structure. + // The data may contain: + // + // - webhook call latency + // - webhook errors google.protobuf.Struct diagnostic_info = 14; // The sentiment analysis result, which depends on the @@ -268,26 +322,54 @@ message QueryResult { } // The top-level message sent by the client to the -// `StreamingDetectIntent` method. +// [Sessions.StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent] method. // // Multiple request messages should be sent in order: // -// 1. The first message must contain `session`, `query_input` plus optionally -// `query_params`. The message must not contain `input_audio`. +// 1. The first message must contain +// [session][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.session], +// [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] plus optionally +// [query_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_params]. If the client +// wants to receive an audio response, it should also contain +// [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config]. +// The message must not contain +// [input_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio]. +// 2. If [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] was set to +// [query_input.audio_config][google.cloud.dialogflow.v2.InputAudioConfig], all subsequent +// messages must contain +// [input_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio] to continue with +// Speech recognition. +// If you decide to rather detect an intent from text input after you +// already started Speech recognition, please send a message with +// [query_input.text][google.cloud.dialogflow.v2.QueryInput.text]. // -// 2. If `query_input` was set to a streaming input audio config, -// all subsequent messages must contain only `input_audio`. -// Otherwise, finish the request stream. +// However, note that: +// +// * Dialogflow will bill you for the audio duration so far. +// * Dialogflow discards all Speech recognition results in favor of the +// input text. +// * Dialogflow will use the language code from the first message. +// +// After you sent all input, you must half-close or abort the request stream. message StreamingDetectIntentRequest { // Required. The name of the session the query is sent to. // Format of the session name: - // `projects//agent/sessions/`. It's up to the API - // caller to choose an appropriate `Session ID`. It can be a random number or - // some type of user identifier (preferably hashed). The length of the session - // ID must not exceed 36 characters. - string session = 1; - - // Optional. The parameters of this query. + // `projects//agent/sessions/`, or + // `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + // default 'draft' environment. If `User ID` is not specified, we are using + // "-". It's up to the API caller to choose an appropriate `Session ID` and + // `User Id`. They can be a random number or some type of user and session + // identifiers (preferably hashed). The length of the `Session ID` and + // `User ID` must not exceed 36 characters. + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Session" + } + ]; + + // The parameters of this query. QueryParameters query_params = 2; // Required. The input specification. It can be set to: @@ -298,10 +380,10 @@ message StreamingDetectIntentRequest { // 2. a conversational query in the form of text, or // // 3. an event that specifies which intent to trigger. - QueryInput query_input = 3; + QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED]; - // DEPRECATED. Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] instead. - // Optional. If `false` (default), recognition does not cease until + // Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] instead. + // If `false` (default), recognition does not cease until // the client closes the stream. If `true`, the recognizer will detect a // single spoken utterance in input audio. Recognition ceases when it detects // the audio's voice has stopped or paused. In this case, once a detected @@ -310,12 +392,20 @@ message StreamingDetectIntentRequest { // This setting is ignored when `query_input` is a piece of text or an event. bool single_utterance = 4 [deprecated = true]; - // Optional. Instructs the speech synthesizer how to generate the output + // Instructs the speech synthesizer how to generate the output // audio. If this field is not set and agent-level speech synthesizer is not // configured, no output audio is generated. OutputAudioConfig output_audio_config = 5; - // Optional. The input audio content to be recognized. Must be sent if + // Mask for [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] indicating which settings in this + // request-level config should override speech synthesizer settings defined at + // agent-level. + // + // If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] replaces the agent-level + // config in its entirety. + google.protobuf.FieldMask output_audio_config_mask = 7; + + // The input audio content to be recognized. Must be sent if // `query_input` was set to a streaming input audio config. The complete audio // over all streaming messages must not exceed 1 minute. bytes input_audio = 6; @@ -353,6 +443,10 @@ message StreamingDetectIntentResponse { // multiple default text responses exist, they will be concatenated when // generating audio. If no default platform text responses exist, the // generated audio content will be empty. + // + // In some scenarios, multiple output audio fields may be present in the + // response structure. In these cases, only the top-most-level audio output + // has content. bytes output_audio = 5; // The config used by the speech synthesizer to generate the output audio. @@ -432,19 +526,28 @@ message StreamingRecognitionResult { // This field is typically only provided if `is_final` is true and you should // not rely on it being accurate or even set. float confidence = 4; + + // Word-specific information for the words recognized by Speech in + // [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. Populated if and only if `message_type` = `TRANSCRIPT` and + // [InputAudioConfig.enable_word_info] is set. + repeated SpeechWordInfo speech_word_info = 7; + + // Time offset of the end of this Speech recognition result relative to the + // beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`. + google.protobuf.Duration speech_end_offset = 8; } // Represents the natural language text to be processed. message TextInput { // Required. The UTF-8 encoded natural language text to be processed. // Text length must not exceed 256 characters. - string text = 1; + string text = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The language of this conversational query. See [Language // Support](https://cloud.google.com/dialogflow/docs/reference/language) // for a list of the currently supported language codes. Note that queries in // the same session do not necessarily need to specify the same language. - string language_code = 2; + string language_code = 2 [(google.api.field_behavior) = REQUIRED]; } // Events allow for matching intents by event name instead of the natural @@ -454,21 +557,35 @@ message TextInput { // `"Hello #welcome_event.name! What can I do for you today?"`. message EventInput { // Required. The unique identifier of the event. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The collection of parameters associated with the event. + // The collection of parameters associated with the event. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value google.protobuf.Struct parameters = 2; // Required. The language of this query. See [Language // Support](https://cloud.google.com/dialogflow/docs/reference/language) // for a list of the currently supported language codes. Note that queries in // the same session do not necessarily need to specify the same language. - string language_code = 3; + string language_code = 3 [(google.api.field_behavior) = REQUIRED]; } // Configures the types of sentiment analysis to perform. message SentimentAnalysisRequestConfig { - // Optional. Instructs the service to perform sentiment analysis on + // Instructs the service to perform sentiment analysis on // `query_text`. If not provided, sentiment analysis is not performed on // `query_text`. bool analyze_query_text_sentiment = 1; diff --git a/google/cloud/dialogflow/v2/session_entity_type.proto b/google/cloud/dialogflow/v2/session_entity_type.proto index 8714152aa..9a16a5583 100644 --- a/google/cloud/dialogflow/v2/session_entity_type.proto +++ b/google/cloud/dialogflow/v2/session_entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,17 +11,18 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dialogflow.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/dialogflow/v2/entity_type.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2"; @@ -41,6 +42,10 @@ option objc_class_prefix = "DF"; // favorites, preferences, playlists, and so on. You can redefine a session // entity type at the session level. // +// Session entity methods do not work with Google Assistant integration. +// Contact Dialogflow support if you need to use session entities +// with Google Assistant integration. +// // For more information about entity types, see the // [Dialogflow // documentation](https://cloud.google.com/dialogflow/docs/entities-overview). @@ -51,104 +56,166 @@ service SessionEntityTypes { "https://www.googleapis.com/auth/dialogflow"; // Returns the list of all session entity types in the specified session. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. rpc ListSessionEntityTypes(ListSessionEntityTypesRequest) returns (ListSessionEntityTypesResponse) { option (google.api.http) = { get: "/v2/{parent=projects/*/agent/sessions/*}/entityTypes" + additional_bindings { + get: "/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes" + } }; + option (google.api.method_signature) = "parent"; } // Retrieves the specified session entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. rpc GetSessionEntityType(GetSessionEntityTypeRequest) returns (SessionEntityType) { option (google.api.http) = { get: "/v2/{name=projects/*/agent/sessions/*/entityTypes/*}" + additional_bindings { + get: "/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + } }; + option (google.api.method_signature) = "name"; } // Creates a session entity type. // // If the specified session entity type already exists, overrides the session // entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) { option (google.api.http) = { post: "/v2/{parent=projects/*/agent/sessions/*}/entityTypes" body: "session_entity_type" + additional_bindings { + post: "/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes" + body: "session_entity_type" + } }; + option (google.api.method_signature) = "parent,session_entity_type"; } // Updates the specified session entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. rpc UpdateSessionEntityType(UpdateSessionEntityTypeRequest) returns (SessionEntityType) { option (google.api.http) = { patch: "/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}" body: "session_entity_type" + additional_bindings { + patch: "/v2/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + body: "session_entity_type" + } }; + option (google.api.method_signature) = "session_entity_type"; + option (google.api.method_signature) = "session_entity_type,update_mask"; } // Deletes the specified session entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. rpc DeleteSessionEntityType(DeleteSessionEntityTypeRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=projects/*/agent/sessions/*/entityTypes/*}" + additional_bindings { + delete: "/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + } }; + option (google.api.method_signature) = "name"; } } // Represents a session entity type. // -// Extends or replaces a developer entity type at the user session level (we -// refer to the entity types defined at the agent level as "developer entity +// Extends or replaces a custom entity type at the user session level (we +// refer to the entity types defined at the agent level as "custom entity // types"). // // Note: session entity types apply to all queries, regardless of the language. message SessionEntityType { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/SessionEntityType" + pattern: "projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}" + pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}" + }; + // The types of modifications for a session entity type. enum EntityOverrideMode { // Not specified. This value should be never used. ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0; // The collection of session entities overrides the collection of entities - // in the corresponding developer entity type. + // in the corresponding custom entity type. ENTITY_OVERRIDE_MODE_OVERRIDE = 1; // The collection of session entities extends the collection of entities in - // the corresponding developer entity type. + // the corresponding custom entity type. // // Note: Even in this override mode calls to `ListSessionEntityTypes`, // `GetSessionEntityType`, `CreateSessionEntityType` and // `UpdateSessionEntityType` only return the additional entities added in // this session entity type. If you want to get the supplemented list, - // please call [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType] on the developer entity type + // please call [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType] on the custom entity type // and merge. ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; } // Required. The unique identifier of this session entity type. Format: // `projects//agent/sessions//entityTypes/`. + // Display Name>`, or `projects//agent/environments//users//sessions//entityTypes/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. // // `` must be the display name of an existing entity // type in the same agent that will be overridden or supplemented. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Indicates whether the additional data should override or - // supplement the developer entity type definition. - EntityOverrideMode entity_override_mode = 2; + // supplement the custom entity type definition. + EntityOverrideMode entity_override_mode = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The collection of entities associated with this session entity // type. - repeated EntityType.Entity entities = 3; + repeated EntityType.Entity entities = 3 [(google.api.field_behavior) = REQUIRED]; } // The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. message ListSessionEntityTypesRequest { // Required. The session to list all session entity types from. - // Format: `projects//agent/sessions/`. - string parent = 1; + // Format: `projects//agent/sessions/` or + // `projects//agent/environments//users// + // sessions/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/SessionEntityType" + } + ]; // Optional. The maximum number of items to return in a single page. By // default 100 and at most 1000. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The next_page_token value returned from a previous list request. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // The response message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. @@ -166,35 +233,60 @@ message ListSessionEntityTypesResponse { message GetSessionEntityTypeRequest { // Required. The name of the session entity type. Format: // `projects//agent/sessions//entityTypes/`. - string name = 1; + // Display Name>` or `projects//agent/environments//users//sessions//entityTypes/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/SessionEntityType" + } + ]; } // The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType]. message CreateSessionEntityTypeRequest { // Required. The session to create a session entity type for. - // Format: `projects//agent/sessions/`. - string parent = 1; + // Format: `projects//agent/sessions/` or + // `projects//agent/environments//users// + // sessions/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/SessionEntityType" + } + ]; // Required. The session entity type to create. - SessionEntityType session_entity_type = 2; + SessionEntityType session_entity_type = 2 [(google.api.field_behavior) = REQUIRED]; } // The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType]. message UpdateSessionEntityTypeRequest { - // Required. The entity type to update. Format: - // `projects//agent/sessions//entityTypes/`. - SessionEntityType session_entity_type = 1; + // Required. The session entity type to update. + SessionEntityType session_entity_type = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType]. message DeleteSessionEntityTypeRequest { // Required. The name of the entity type to delete. Format: // `projects//agent/sessions//entityTypes/`. - string name = 1; + // Display Name>` or `projects//agent/environments//users//sessions//entityTypes/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/SessionEntityType" + } + ]; } diff --git a/google/cloud/dialogflow/v2/validation_result.proto b/google/cloud/dialogflow/v2/validation_result.proto new file mode 100644 index 000000000..e499c1462 --- /dev/null +++ b/google/cloud/dialogflow/v2/validation_result.proto @@ -0,0 +1,76 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2; + +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "ValidationResultProto"; +option java_package = "com.google.cloud.dialogflow.v2"; +option objc_class_prefix = "DF"; + +// Represents a single validation error. +message ValidationError { + // Represents a level of severity. + enum Severity { + // Not specified. This value should never be used. + SEVERITY_UNSPECIFIED = 0; + + // The agent doesn't follow Dialogflow best practicies. + INFO = 1; + + // The agent may not behave as expected. + WARNING = 2; + + // The agent may experience partial failures. + ERROR = 3; + + // The agent may completely fail. + CRITICAL = 4; + } + + // The severity of the error. + Severity severity = 1; + + // The names of the entries that the error is associated with. + // Format: + // + // - "projects//agent", if the error is associated with the entire + // agent. + // - "projects//agent/intents/", if the error is + // associated with certain intents. + // - "projects//agent/intents//trainingPhrases/", if the + // error is associated with certain intent training phrases. + // - "projects//agent/intents//parameters/", if the error is associated with certain intent parameters. + // - "projects//agent/entities/", if the error is + // associated with certain entities. + repeated string entries = 3; + + // The detailed error messsage. + string error_message = 4; +} + +// Represents the output of agent validation. +message ValidationResult { + // Contains all validation errors. + repeated ValidationError validation_errors = 1; +} diff --git a/google/cloud/dialogflow/v2/webhook.proto b/google/cloud/dialogflow/v2/webhook.proto index 056f4615c..509649a74 100644 --- a/google/cloud/dialogflow/v2/webhook.proto +++ b/google/cloud/dialogflow/v2/webhook.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -55,52 +54,66 @@ message WebhookRequest { } // The response message for a webhook call. +// +// This response is validated by the Dialogflow server. If validation fails, +// an error will be returned in the [QueryResult.diagnostic_info][google.cloud.dialogflow.v2.QueryResult.diagnostic_info] field. +// Setting JSON fields to an empty value with the wrong type is a common error. +// To avoid this error: +// +// - Use `""` for empty strings +// - Use `{}` or `null` for empty objects +// - Use `[]` or `null` for empty arrays +// +// For more information, see the +// [Protocol Buffers Language +// Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). message WebhookResponse { - // Optional. The text to be shown on the screen. This value is passed directly - // to `QueryResult.fulfillment_text`. + // Optional. The text response message intended for the end-user. + // It is recommended to use `fulfillment_messages.text.text[0]` instead. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller. string fulfillment_text = 1; - // Optional. The collection of rich messages to present to the user. This - // value is passed directly to `QueryResult.fulfillment_messages`. + // Optional. The rich response messages intended for the end-user. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller. repeated Intent.Message fulfillment_messages = 2; - // Optional. This value is passed directly to `QueryResult.webhook_source`. + // Optional. A custom field used to identify the webhook source. + // Arbitrary strings are supported. + // When provided, Dialogflow uses this field to populate + // [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller. string source = 3; - // Optional. This value is passed directly to `QueryResult.webhook_payload`. - // See the related `fulfillment_messages[i].payload field`, which may be used - // as an alternative to this field. - // - // This field can be used for Actions on Google responses. - // It should have a structure similar to the JSON message shown here. For more - // information, see - // [Actions on Google Webhook - // Format](https://developers.google.com/actions/dialogflow/webhook) - //
{
-  //   "google": {
-  //     "expectUserResponse": true,
-  //     "richResponse": {
-  //       "items": [
-  //         {
-  //           "simpleResponse": {
-  //             "textToSpeech": "this is a simple response"
-  //           }
-  //         }
-  //       ]
-  //     }
-  //   }
-  // }
+ // Optional. This field can be used to pass custom data from your webhook to the + // integration or API caller. Arbitrary JSON objects are supported. + // When provided, Dialogflow uses this field to populate + // [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller. + // This field is also used by the + // [Google Assistant + // integration](https://cloud.google.com/dialogflow/docs/integrations/aog) + // for rich response messages. + // See the format definition at [Google Assistant Dialogflow webhook + // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) google.protobuf.Struct payload = 4; - // Optional. The collection of output contexts. This value is passed directly - // to `QueryResult.output_contexts`. + // Optional. The collection of output contexts that will overwrite currently + // active contexts for the session and reset their lifespans. + // When provided, Dialogflow uses this field to populate + // [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller. repeated Context output_contexts = 5; - // Optional. Makes the platform immediately invoke another `DetectIntent` call - // internally with the specified event as input. + // Optional. Invokes the supplied events. // When this field is set, Dialogflow ignores the `fulfillment_text`, // `fulfillment_messages`, and `payload` fields. EventInput followup_event_input = 6; + + // Optional. Additional session entity types to replace or extend developer + // entity types with. The entity synonyms apply to all languages and persist + // for the session. Setting this data from a webhook overwrites + // the session entity types that have been set using `detectIntent`, + // `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods. + repeated SessionEntityType session_entity_types = 10; } // Represents the contents of the original request that was passed to @@ -118,7 +131,8 @@ message OriginalDetectIntentRequest { // field passed in the request. Some integrations that query a Dialogflow // agent may provide additional information in the payload. // - // In particular for the Telephony Gateway this field has the form: + // In particular, for the Dialogflow Phone Gateway integration, this field has + // the form: //
{
   //  "telephony": {
   //    "caller_id": "+18558363987"
diff --git a/google/cloud/dialogflow/v2beta1/BUILD.bazel b/google/cloud/dialogflow/v2beta1/BUILD.bazel
index 336995642..424bf53b2 100644
--- a/google/cloud/dialogflow/v2beta1/BUILD.bazel
+++ b/google/cloud/dialogflow/v2beta1/BUILD.bazel
@@ -1,9 +1,12 @@
+# This file was automatically generated by BuildFileGenerator
+
 # This is an API workspace, having public visibility by default makes perfect sense.
 package(default_visibility = ["//visibility:public"])
 
 ##############################################################################
 # Common
 ##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
 load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
 
 proto_library(
@@ -14,15 +17,19 @@ proto_library(
         "context.proto",
         "document.proto",
         "entity_type.proto",
+        "environment.proto",
+        "gcs.proto",
         "intent.proto",
         "knowledge_base.proto",
         "session.proto",
         "session_entity_type.proto",
+        "validation_result.proto",
         "webhook.proto",
     ],
     deps = [
         "//google/api:annotations_proto",
         "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
         "//google/api:resource_proto",
         "//google/longrunning:operations_proto",
         "//google/rpc:status_proto",
@@ -37,7 +44,10 @@ proto_library(
 
 proto_library_with_info(
     name = "dialogflow_proto_with_info",
-    deps = [":dialogflow_proto"],
+    deps = [
+        ":dialogflow_proto",
+        "//google/cloud:common_resources_proto",
+    ],
 )
 
 ##############################################################################
@@ -45,18 +55,13 @@ proto_library_with_info(
 ##############################################################################
 load(
     "@com_google_googleapis_imports//:imports.bzl",
-    "java_grpc_library",
-    "java_gapic_library",
     "java_gapic_assembly_gradle_pkg",
+    "java_gapic_library",
+    "java_gapic_test",
+    "java_grpc_library",
     "java_proto_library",
-    "java_resource_name_proto_library",
-    "java_test",
 )
 
-_JAVA_GRPC_DEPS = [
-    "@com_google_api_grpc_proto_google_common_protos//jar",
-]
-
 java_proto_library(
     name = "dialogflow_java_proto",
     deps = [":dialogflow_proto"],
@@ -65,58 +70,48 @@ java_proto_library(
 java_grpc_library(
     name = "dialogflow_java_grpc",
     srcs = [":dialogflow_proto"],
-    deps = [":dialogflow_java_proto"] + _JAVA_GRPC_DEPS,
-)
-
-java_resource_name_proto_library(
-    name = "dialogflow_resource_name_java_proto",
-    gapic_yaml = "dialogflow_gapic.yaml",
-    deps = [":dialogflow_proto"],
+    deps = [":dialogflow_java_proto"],
 )
 
 java_gapic_library(
     name = "dialogflow_java_gapic",
     src = ":dialogflow_proto_with_info",
     gapic_yaml = "dialogflow_gapic.yaml",
-    service_yaml = "//google/cloud/dialogflow:dialogflow_v2beta1.yaml",
-    test_deps = [":dialogflow_java_grpc"],
+    package = "google.cloud.dialogflow.v2beta1",
+    service_yaml = "dialogflow_v2beta1.yaml",
+    test_deps = [
+        ":dialogflow_java_grpc",
+    ],
     deps = [
         ":dialogflow_java_proto",
-        ":dialogflow_resource_name_java_proto",
-    ] + _JAVA_GRPC_DEPS,
-)
-
-[java_test(
-    name = test_name,
-    test_class = test_name,
-    runtime_deps = [
-        ":dialogflow_java_gapic_test",
-    ],
-) for test_name in [
-    "com.google.cloud.dialogflow.v2beta1.AgentsClientTest",
-    "com.google.cloud.dialogflow.v2beta1.ContextsClientTest",
-    "com.google.cloud.dialogflow.v2beta1.EntityTypesClientTest",
-    "com.google.cloud.dialogflow.v2beta1.DocumentsClientTest",
-    "com.google.cloud.dialogflow.v2beta1.IntentsClientTest",
-    "com.google.cloud.dialogflow.v2beta1.SessionEntityTypesClientTest",
-    "com.google.cloud.dialogflow.v2beta1.SessionsClientTest",
-    "com.google.cloud.dialogflow.v2beta1.KnowledgeBasesClientTest",
-]]
-
-# Opensource Packages
+    ],
+)
+
+java_gapic_test(
+    name = "dialogflow_java_gapic_test_suite",
+    test_classes = [
+        "com.google.cloud.dialogflow.v2beta1.AgentsClientTest",
+        "com.google.cloud.dialogflow.v2beta1.ContextsClientTest",
+        "com.google.cloud.dialogflow.v2beta1.DocumentsClientTest",
+        "com.google.cloud.dialogflow.v2beta1.EntityTypesClientTest",
+        "com.google.cloud.dialogflow.v2beta1.EnvironmentsClientTest",
+        "com.google.cloud.dialogflow.v2beta1.IntentsClientTest",
+        "com.google.cloud.dialogflow.v2beta1.KnowledgeBasesClientTest",
+        "com.google.cloud.dialogflow.v2beta1.SessionEntityTypesClientTest",
+        "com.google.cloud.dialogflow.v2beta1.SessionsClientTest",
+    ],
+    runtime_deps = [":dialogflow_java_gapic_test"],
+)
+
+# Open Source Packages
 java_gapic_assembly_gradle_pkg(
     name = "google-cloud-dialogflow-v2beta1-java",
-    client_deps = [":dialogflow_java_gapic"],
-    client_group = "com.google.cloud",
-    client_test_deps = [":dialogflow_java_gapic_test"],
-    grpc_deps = [":dialogflow_java_grpc"],
-    grpc_group = "com.google.api.grpc",
-    proto_deps = [
+    deps = [
+        ":dialogflow_java_gapic",
+        ":dialogflow_java_grpc",
         ":dialogflow_java_proto",
         ":dialogflow_proto",
-        ":dialogflow_resource_name_java_proto",
-    ] + _JAVA_GRPC_DEPS,
-    version = "0.0.0-SNAPSHOT",
+    ],
 )
 
 ##############################################################################
@@ -124,10 +119,10 @@ java_gapic_assembly_gradle_pkg(
 ##############################################################################
 load(
     "@com_google_googleapis_imports//:imports.bzl",
+    "go_gapic_assembly_pkg",
+    "go_gapic_library",
     "go_proto_library",
     "go_test",
-    "go_gapic_library",
-    "go_gapic_assembly_pkg",
 )
 
 go_proto_library(
@@ -143,35 +138,264 @@ go_proto_library(
     ],
 )
 
-go_gapic_library(
-    name = "dialogflow_go_gapic",
+# go_gapic_library(
+#     name = "dialogflow_go_gapic",
+#     srcs = [":dialogflow_proto_with_info"],
+#     grpc_service_config = "dialogflow_grpc_service_config.json",
+#     importpath = "cloud.google.com/go/cloud/dialogflow/apiv2beta1;dialogflow",
+#     service_yaml = "dialogflow_v2beta1.yaml",
+#     deps = [
+#         ":dialogflow_go_proto",
+#         "//google/longrunning:longrunning_go_gapic",
+#         "//google/longrunning:longrunning_go_proto",
+#         "@com_google_cloud_go//longrunning:go_default_library",
+#         "@com_google_cloud_go//longrunning/autogen:go_default_library",
+#         "@io_bazel_rules_go//proto/wkt:duration_go_proto",
+#         "@io_bazel_rules_go//proto/wkt:struct_go_proto",
+#     ],
+# )
+#
+# go_test(
+#     name = "dialogflow_go_gapic_test",
+#     srcs = [":dialogflow_go_gapic_srcjar_test"],
+#     embed = [":dialogflow_go_gapic"],
+#     importpath = "cloud.google.com/go/cloud/dialogflow/apiv2beta1",
+# )
+#
+# # Open Source Packages
+# go_gapic_assembly_pkg(
+#     name = "gapi-cloud-dialogflow-v2beta1-go",
+#     deps = [
+#         ":dialogflow_go_gapic",
+#         ":dialogflow_go_gapic_srcjar-test.srcjar",
+#         ":dialogflow_go_proto",
+#     ],
+# )
+
+##############################################################################
+# Python
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "moved_proto_library",
+    "py_gapic_assembly_pkg",
+    "py_gapic_library",
+    "py_grpc_library",
+    "py_proto_library",
+)
+
+moved_proto_library(
+    name = "dialogflow_moved_proto",
+    srcs = [":dialogflow_proto"],
+    deps = [
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/api:resource_proto",
+        "//google/longrunning:operations_proto",
+        "//google/rpc:status_proto",
+        "//google/type:latlng_proto",
+        "@com_google_protobuf//:duration_proto",
+        "@com_google_protobuf//:empty_proto",
+        "@com_google_protobuf//:field_mask_proto",
+        "@com_google_protobuf//:struct_proto",
+        "@com_google_protobuf//:timestamp_proto",
+    ],
+)
+
+py_proto_library(
+    name = "dialogflow_py_proto",
+    plugin = "@protoc_docs_plugin//:docs_plugin",
+    deps = [":dialogflow_moved_proto"],
+)
+
+py_grpc_library(
+    name = "dialogflow_py_grpc",
+    srcs = [":dialogflow_moved_proto"],
+    deps = [":dialogflow_py_proto"],
+)
+
+py_gapic_library(
+    name = "dialogflow_py_gapic",
     src = ":dialogflow_proto_with_info",
     gapic_yaml = "dialogflow_gapic.yaml",
-    importpath = "cloud.google.com/go/cloud/dialogflow/apiv2beta1",
-    service_yaml = "//google/cloud/dialogflow:dialogflow_v2beta1.yaml",
+    package = "google.cloud.dialogflow.v2beta1",
+    service_yaml = "dialogflow_v2beta1.yaml",
     deps = [
-        ":dialogflow_go_proto",
-        "//google/longrunning:longrunning_go_gapic",
-        "//google/longrunning:longrunning_go_proto",
-        "@com_google_cloud_go//longrunning:go_default_library",
-        "@io_bazel_rules_go//proto/wkt:struct_go_proto",
+        ":dialogflow_py_grpc",
+        ":dialogflow_py_proto",
     ],
 )
 
-go_test(
-    name = "dialogflow_go_gapic_test",
-    srcs = [":dialogflow_go_gapic_srcjar_test"],
-    embed = [":dialogflow_go_gapic"],
-    importpath = "cloud.google.com/go/cloud/dialogflow/apiv2beta1",
+# Open Source Packages
+py_gapic_assembly_pkg(
+    name = "dialogflow-v2beta1-py",
+    deps = [
+        ":dialogflow_py_gapic",
+        ":dialogflow_py_grpc",
+        ":dialogflow_py_proto",
+    ],
+)
+
+##############################################################################
+# PHP
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "php_gapic_assembly_pkg",
+    "php_gapic_library",
+    "php_grpc_library",
+    "php_proto_library",
+)
+
+php_proto_library(
+    name = "dialogflow_php_proto",
+    deps = [":dialogflow_proto"],
+)
+
+php_grpc_library(
+    name = "dialogflow_php_grpc",
+    srcs = [":dialogflow_proto"],
+    deps = [":dialogflow_php_proto"],
 )
 
-# Opensource Packages
-go_gapic_assembly_pkg(
-    name = "gapi-cloud-dialogflow-v2beta1-go",
+php_gapic_library(
+    name = "dialogflow_php_gapic",
+    src = ":dialogflow_proto_with_info",
+    gapic_yaml = "dialogflow_gapic.yaml",
+    package = "google.cloud.dialogflow.v2beta1",
+    service_yaml = "dialogflow_v2beta1.yaml",
+    deps = [
+        ":dialogflow_php_grpc",
+        ":dialogflow_php_proto",
+    ],
+)
+
+# Open Source Packages
+php_gapic_assembly_pkg(
+    name = "google-cloud-dialogflow-v2beta1-php",
+    deps = [
+        ":dialogflow_php_gapic",
+        ":dialogflow_php_grpc",
+        ":dialogflow_php_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)
+
+nodejs_gapic_library(
+    name = "dialogflow_nodejs_gapic",
+    src = ":dialogflow_proto_with_info",
+    gapic_yaml = "dialogflow_gapic.yaml",
+    package = "google.cloud.dialogflow.v2beta1",
+    service_yaml = "dialogflow_v2beta1.yaml",
+    deps = [],
+)
+
+nodejs_gapic_assembly_pkg(
+    name = "dialogflow-v2beta1-nodejs",
+    deps = [
+        ":dialogflow_nodejs_gapic",
+        ":dialogflow_proto",
+    ],
+)
+
+##############################################################################
+# Ruby
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "ruby_gapic_assembly_pkg",
+    "ruby_gapic_library",
+    "ruby_grpc_library",
+    "ruby_proto_library",
+)
+
+ruby_proto_library(
+    name = "dialogflow_ruby_proto",
+    deps = [":dialogflow_proto"],
+)
+
+ruby_grpc_library(
+    name = "dialogflow_ruby_grpc",
+    srcs = [":dialogflow_proto"],
+    deps = [":dialogflow_ruby_proto"],
+)
+
+ruby_gapic_library(
+    name = "dialogflow_ruby_gapic",
+    src = ":dialogflow_proto_with_info",
+    gapic_yaml = "dialogflow_gapic.yaml",
+    package = "google.cloud.dialogflow.v2beta1",
+    service_yaml = "dialogflow_v2beta1.yaml",
+    deps = [
+        ":dialogflow_ruby_grpc",
+        ":dialogflow_ruby_proto",
+    ],
+)
+
+# Open Source Packages
+ruby_gapic_assembly_pkg(
+    name = "google-cloud-dialogflow-v2beta1-ruby",
+    deps = [
+        ":dialogflow_ruby_gapic",
+        ":dialogflow_ruby_grpc",
+        ":dialogflow_ruby_proto",
+    ],
+)
+
+##############################################################################
+# C#
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "csharp_gapic_assembly_pkg",
+    "csharp_gapic_library",
+    "csharp_grpc_library",
+    "csharp_proto_library",
+)
+
+csharp_proto_library(
+    name = "dialogflow_csharp_proto",
+    deps = [":dialogflow_proto"],
+)
+
+csharp_grpc_library(
+    name = "dialogflow_csharp_grpc",
+    srcs = [":dialogflow_proto"],
+    deps = [":dialogflow_csharp_proto"],
+)
+
+csharp_gapic_library(
+    name = "dialogflow_csharp_gapic",
+    src = ":dialogflow_proto_with_info",
+    gapic_yaml = "dialogflow_gapic.yaml",
+    package = "google.cloud.dialogflow.v2beta1",
+    service_yaml = "dialogflow_v2beta1.yaml",
+    deps = [
+        ":dialogflow_csharp_grpc",
+        ":dialogflow_csharp_proto",
+    ],
+)
+
+# Open Source Packages
+csharp_gapic_assembly_pkg(
+    name = "google-cloud-dialogflow-v2beta1-csharp",
     deps = [
-        ":dialogflow_go_gapic",
-        ":dialogflow_go_gapic_srcjar-smoke-test.srcjar",
-        ":dialogflow_go_gapic_srcjar-test.srcjar",
-        ":dialogflow_go_proto",
+        ":dialogflow_csharp_gapic",
+        ":dialogflow_csharp_grpc",
+        ":dialogflow_csharp_proto",
     ],
 )
+
+##############################################################################
+# C++
+##############################################################################
+# Put your C++ rules here
diff --git a/google/cloud/dialogflow/v2beta1/agent.proto b/google/cloud/dialogflow/v2beta1/agent.proto
index b1a1fb6c2..7bfedab4f 100644
--- a/google/cloud/dialogflow/v2beta1/agent.proto
+++ b/google/cloud/dialogflow/v2beta1/agent.proto
@@ -1,4 +1,4 @@
-// Copyright 2019 Google LLC.
+// Copyright 2020 Google LLC
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -11,13 +11,16 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-//
 
 syntax = "proto3";
 
 package google.cloud.dialogflow.v2beta1;
 
 import "google/api/annotations.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/cloud/dialogflow/v2beta1/environment.proto";
+import "google/cloud/dialogflow/v2beta1/validation_result.proto";
 import "google/longrunning/operations.proto";
 import "google/protobuf/empty.proto";
 import "google/protobuf/field_mask.proto";
@@ -69,6 +72,9 @@ service Agents {
   rpc GetAgent(GetAgentRequest) returns (Agent) {
     option (google.api.http) = {
       get: "/v2beta1/{parent=projects/*}/agent"
+      additional_bindings {
+        get: "/v2beta1/{parent=projects/*/locations/*}/agent"
+      }
     };
   }
 
@@ -77,6 +83,10 @@ service Agents {
     option (google.api.http) = {
       post: "/v2beta1/{agent.parent=projects/*}/agent"
       body: "agent"
+      additional_bindings {
+        post: "/v2beta1/{agent.parent=projects/*/locations/*}/agent"
+        body: "agent"
+      }
     };
   }
 
@@ -84,6 +94,9 @@ service Agents {
   rpc DeleteAgent(DeleteAgentRequest) returns (google.protobuf.Empty) {
     option (google.api.http) = {
       delete: "/v2beta1/{parent=projects/*}/agent"
+      additional_bindings {
+        delete: "/v2beta1/{parent=projects/*/locations/*}/agent"
+      }
     };
   }
 
@@ -108,6 +121,10 @@ service Agents {
     option (google.api.http) = {
       post: "/v2beta1/{parent=projects/*}/agent:train"
       body: "*"
+      additional_bindings {
+        post: "/v2beta1/{parent=projects/*/locations/*}/agent:train"
+        body: "*"
+      }
     };
   }
 
@@ -119,6 +136,10 @@ service Agents {
     option (google.api.http) = {
       post: "/v2beta1/{parent=projects/*}/agent:export"
       body: "*"
+      additional_bindings {
+        post: "/v2beta1/{parent=projects/*/locations/*}/agent:export"
+        body: "*"
+      }
     };
   }
 
@@ -134,6 +155,10 @@ service Agents {
     option (google.api.http) = {
       post: "/v2beta1/{parent=projects/*}/agent:import"
       body: "*"
+      additional_bindings {
+        post: "/v2beta1/{parent=projects/*/locations/*}/agent:import"
+        body: "*"
+      }
     };
   }
 
@@ -148,12 +173,30 @@ service Agents {
     option (google.api.http) = {
       post: "/v2beta1/{parent=projects/*}/agent:restore"
       body: "*"
+      additional_bindings {
+        post: "/v2beta1/{parent=projects/*/locations/*}/agent:restore"
+        body: "*"
+      }
+    };
+  }
+
+  // Gets agent validation result. Agent validation is performed during
+  // training time and is updated automatically when training is completed.
+  rpc GetValidationResult(GetValidationResultRequest) returns (ValidationResult) {
+    option (google.api.http) = {
+      get: "/v2beta1/{parent=projects/*}/agent/validationResult"
     };
   }
 }
 
 // Represents a conversational agent.
 message Agent {
+  option (google.api.resource) = {
+    type: "dialogflow.googleapis.com/Agent"
+    pattern: "projects/{project}/agent"
+    pattern: "projects/{project}/locations/{location}/agent"
+  };
+
   // Match mode determines how intents are detected from user queries.
   enum MatchMode {
     // Not specified.
@@ -164,7 +207,7 @@ message Agent {
     MATCH_MODE_HYBRID = 1;
 
     // Can be used for agents with a large number of examples in intents,
-    // especially the ones using @sys.any or very large developer entities.
+    // especially the ones using @sys.any or very large custom entities.
     MATCH_MODE_ML_ONLY = 2;
   }
 
@@ -280,6 +323,18 @@ message DeleteAgentRequest {
   string parent = 1;
 }
 
+// Contains basic configuration for a sub-agent.
+message SubAgent {
+  // Required. The project of this agent.
+  // Format: `projects/`.
+  string project = 1;
+
+  // Optional. The unique identifier (`environment name` in dialogflow console)
+  // of this sub-agent environment. Assumes draft environment if `environment`
+  // is not set.
+  string environment = 2;
+}
+
 // The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents].
 message SearchAgentsRequest {
   // Required. The project to list agents from.
@@ -328,26 +383,13 @@ message ExportAgentRequest {
 
 // The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent].
 message ExportAgentResponse {
-  // Required. The exported agent.
+  // The exported agent.
   oneof agent {
     // The URI to a file containing the exported agent. This field is populated
     // only if `agent_uri` is specified in `ExportAgentRequest`.
     string agent_uri = 1;
 
-    // The exported agent.
-    //
-    // Example for how to export an agent to a zip file via a command line:
-    // 
curl \
-    //   'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:export'\
-    //   -X POST \
-    //   -H 'Authorization: Bearer '$(gcloud auth application-default
-    //   print-access-token) \
-    //   -H 'Accept: application/json' \
-    //   -H 'Content-Type: application/json' \
-    //   --compressed \
-    //   --data-binary '{}' \
-    // | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*/\1/' \
-    // | base64 --decode > <agent zip file>
+ // Zip compressed raw byte content for agent. bytes agent_content = 2; } } @@ -364,20 +406,7 @@ message ImportAgentRequest { // Note: The URI must start with "gs://". string agent_uri = 2; - // The agent to import. - // - // Example for how to import an agent via the command line: - //
curl \
-    //   'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:import\
-    //    -X POST \
-    //    -H 'Authorization: Bearer '$(gcloud auth application-default
-    //    print-access-token) \
-    //    -H 'Accept: application/json' \
-    //    -H 'Content-Type: application/json' \
-    //    --compressed \
-    //    --data-binary "{
-    //       'agentContent': '$(cat <agent zip file> | base64 -w 0)'
-    //    }"
+ // Zip compressed raw byte content for agent. bytes agent_content = 3; } } @@ -394,20 +423,21 @@ message RestoreAgentRequest { // Note: The URI must start with "gs://". string agent_uri = 2; - // The agent to restore. - // - // Example for how to restore an agent via the command line: - //
curl \
-    //   'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:restore\
-    //    -X POST \
-    //    -H 'Authorization: Bearer '$(gcloud auth application-default
-    //    print-access-token) \
-    //    -H 'Accept: application/json' \
-    //    -H 'Content-Type: application/json' \
-    //    --compressed \
-    //    --data-binary "{
-    //        'agentContent': '$(cat <agent zip file> | base64 -w 0)'
-    //    }"
+ // Zip compressed raw byte content for agent. bytes agent_content = 3; } } + +// The request message for [Agents.GetValidationResult][google.cloud.dialogflow.v2beta1.Agents.GetValidationResult]. +message GetValidationResultRequest { + // Required. The project that the agent is associated with. + // Format: `projects/`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language for which you want a validation result. If not + // specified, the agent's default language is used. [Many + // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // are supported. Note: languages must be enabled in the agent before they can + // be used. + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/google/cloud/dialogflow/artman_dialogflow_v2beta1.yaml b/google/cloud/dialogflow/v2beta1/artman_dialogflow_v2beta1.yaml similarity index 90% rename from google/cloud/dialogflow/artman_dialogflow_v2beta1.yaml rename to google/cloud/dialogflow/v2beta1/artman_dialogflow_v2beta1.yaml index 4a94bb0aa..c1a6a555f 100644 --- a/google/cloud/dialogflow/artman_dialogflow_v2beta1.yaml +++ b/google/cloud/dialogflow/v2beta1/artman_dialogflow_v2beta1.yaml @@ -4,9 +4,9 @@ common: proto_deps: - name: google-common-protos src_proto_paths: - - v2beta1 + - . service_yaml: dialogflow_v2beta1.yaml - gapic_yaml: v2beta1/dialogflow_gapic.yaml + gapic_yaml: dialogflow_gapic.yaml artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml b/google/cloud/dialogflow/v2beta1/artman_dialogflow_v2beta1_java.yaml similarity index 83% rename from google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml rename to google/cloud/dialogflow/v2beta1/artman_dialogflow_v2beta1_java.yaml index 9f13a0416..05fc9bc91 100644 --- a/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml +++ b/google/cloud/dialogflow/v2beta1/artman_dialogflow_v2beta1_java.yaml @@ -5,9 +5,9 @@ common: proto_deps: - name: google-common-protos src_proto_paths: - - v2beta1 + - . service_yaml: dialogflow_v2beta1.yaml - gapic_yaml: v2beta1/dialogflow_gapic.yaml + gapic_yaml: dialogflow_gapic.yaml artifacts: - name: java_gapic type: GAPIC diff --git a/google/cloud/dialogflow/v2beta1/audio_config.proto b/google/cloud/dialogflow/v2beta1/audio_config.proto index 3de27b941..15ac78d21 100644 --- a/google/cloud/dialogflow/v2beta1/audio_config.proto +++ b/google/cloud/dialogflow/v2beta1/audio_config.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dialogflow.v2beta1; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; import "google/api/annotations.proto"; option cc_enable_arenas = true; @@ -77,29 +79,32 @@ enum AudioEncoding { AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; } -// Information for a word recognized by the speech recognizer. -message SpeechWordInfo { - // The word this info is for. - string word = 3; - - // Time offset relative to the beginning of the audio that corresponds to the - // start of the spoken word. This is an experimental feature and the accuracy - // of the time offset can vary. - google.protobuf.Duration start_offset = 1; - - // Time offset relative to the beginning of the audio that corresponds to the - // end of the spoken word. This is an experimental feature and the accuracy of - // the time offset can vary. - google.protobuf.Duration end_offset = 2; - - // The Speech confidence between 0.0 and 1.0 for this word. A higher number - // indicates an estimated greater likelihood that the recognized word is - // correct. The default of 0.0 is a sentinel value indicating that confidence - // was not set. +// Hints for the speech recognizer to help with recognition in a specific +// conversation state. +message SpeechContext { + // Optional. A list of strings containing words and phrases that the speech + // recognizer should recognize with higher likelihood. // - // This field is not guaranteed to be fully stable over time for the same - // audio input. Users should also not rely on it to always be provided. - float confidence = 4; + // This list can be used to: + // * improve accuracy for words and phrases you expect the user to say, + // e.g. typical commands for your Dialogflow agent + // * add additional words to the speech recognizer vocabulary + // * ... + // + // See the [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/quotas) for usage + // limits. + repeated string phrases = 1; + + // Optional. Boost for this context compared to other contexts: + // * If the boost is positive, Dialogflow will increase the probability that + // the phrases in this context are recognized over similar sounding phrases. + // * If the boost is unspecified or non-positive, Dialogflow will not apply + // any boost. + // + // Dialogflow recommends that you use boosts in the range (0, 20] and that you + // find a value that fits your use case with binary search. + float boost = 2; } // Variant of the specified [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use. @@ -145,6 +150,31 @@ enum SpeechModelVariant { USE_ENHANCED = 3; } +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // Time offset relative to the beginning of the audio that corresponds to the + // start of the spoken word. This is an experimental feature and the accuracy + // of the time offset can vary. + google.protobuf.Duration start_offset = 1; + + // Time offset relative to the beginning of the audio that corresponds to the + // end of the spoken word. This is an experimental feature and the accuracy of + // the time offset can vary. + google.protobuf.Duration end_offset = 2; + + // The Speech confidence between 0.0 and 1.0 for this word. A higher number + // indicates an estimated greater likelihood that the recognized word is + // correct. The default of 0.0 is a sentinel value indicating that confidence + // was not set. + // + // This field is not guaranteed to be fully stable over time for the same + // audio input. Users should also not rely on it to always be provided. + float confidence = 4; +} + // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. @@ -164,21 +194,32 @@ message InputAudioConfig { // the same session do not necessarily need to specify the same language. string language_code = 3; - // Optional. If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in + // If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in // [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult] with information about the recognized speech // words, e.g. start and end time offsets. If false or unspecified, Speech // doesn't return any word-level information. bool enable_word_info = 13; - // Optional. A list of strings containing words and phrases that the speech + // A list of strings containing words and phrases that the speech // recognizer should recognize with higher likelihood. // // See [the Cloud Speech // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) // for more details. - repeated string phrase_hints = 4; + // + // This field is deprecated. Please use [speech_contexts]() instead. If you + // specify both [phrase_hints]() and [speech_contexts](), Dialogflow will + // treat the [phrase_hints]() as a single additional [SpeechContext](). + repeated string phrase_hints = 4 [deprecated = true]; - // Optional. Which Speech model to select for the given request. Select the + // Context information to assist speech recognition. + // + // See [the Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + // for more details. + repeated SpeechContext speech_contexts = 11; + + // Which Speech model to select for the given request. Select the // model best suited to your domain to get best results. If a model is not // explicitly specified, then we auto-select a model based on the parameters // in the InputAudioConfig. @@ -191,10 +232,10 @@ message InputAudioConfig { // for more details. string model = 7; - // Optional. Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use. + // Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use. SpeechModelVariant model_variant = 10; - // Optional. If `false` (default), recognition does not cease until the + // If `false` (default), recognition does not cease until the // client closes the stream. // If `true`, the recognizer will detect a single spoken utterance in input // audio. Recognition ceases when it detects the audio's voice has @@ -207,20 +248,6 @@ message InputAudioConfig { bool single_utterance = 8; } -// Description of which voice to use for speech synthesis. -message VoiceSelectionParams { - // Optional. The name of the voice. If not set, the service will choose a - // voice based on the other parameters such as language_code and gender. - string name = 1; - - // Optional. The preferred gender of the voice. If not set, the service will - // choose a voice based on the other parameters such as language_code and - // name. Note that this is only a preference, not requirement. If a - // voice of the appropriate gender is not available, the synthesizer should - // substitute a voice with a different gender rather than failing the request. - SsmlVoiceGender ssml_gender = 2; -} - // Gender of the voice as described in // [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). enum SsmlVoiceGender { @@ -238,6 +265,21 @@ enum SsmlVoiceGender { SSML_VOICE_GENDER_NEUTRAL = 3; } +// Description of which voice to use for speech synthesis. +message VoiceSelectionParams { + // Optional. The name of the voice. If not set, the service will choose a + // voice based on the other parameters such as language_code and + // [ssml_gender][google.cloud.dialogflow.v2beta1.VoiceSelectionParams.ssml_gender]. + string name = 1; + + // Optional. The preferred gender of the voice. If not set, the service will + // choose a voice based on the other parameters such as language_code and + // [name][google.cloud.dialogflow.v2beta1.VoiceSelectionParams.name]. Note that this is only a preference, not requirement. If a + // voice of the appropriate gender is not available, the synthesizer should + // substitute a voice with a different gender rather than failing the request. + SsmlVoiceGender ssml_gender = 2; +} + // Configuration of how speech should be synthesized. message SynthesizeSpeechConfig { // Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal @@ -270,22 +312,6 @@ message SynthesizeSpeechConfig { VoiceSelectionParams voice = 4; } -// Instructs the speech synthesizer how to generate the output audio content. -message OutputAudioConfig { - // Required. Audio encoding of the synthesized audio content. - OutputAudioEncoding audio_encoding = 1; - - // Optional. The synthesis sample rate (in hertz) for this audio. If not - // provided, then the synthesizer will use the default sample rate based on - // the audio encoding. If this is different from the voice's natural sample - // rate, then the synthesizer will honor this request by converting to the - // desired sample rate (which might result in worse audio quality). - int32 sample_rate_hertz = 2; - - // Optional. Configuration of how speech should be synthesized. - SynthesizeSpeechConfig synthesize_speech_config = 3; -} - // Audio encoding of the output audio format in Text-To-Speech. enum OutputAudioEncoding { // Not specified. @@ -295,7 +321,7 @@ enum OutputAudioEncoding { // Audio content returned as LINEAR16 also contains a WAV header. OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; - // MP3 audio. + // MP3 audio at 32kbps. OUTPUT_AUDIO_ENCODING_MP3 = 2; // Opus encoded audio wrapped in an ogg container. The result will be a @@ -304,3 +330,21 @@ enum OutputAudioEncoding { // than MP3 while using approximately the same bitrate. OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3; } + +// Instructs the speech synthesizer how to generate the output audio content. +// If this audio config is supplied in a request, it overrides all existing +// text-to-speech settings applied to the agent. +message OutputAudioConfig { + // Required. Audio encoding of the synthesized audio content. + OutputAudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; + + // The synthesis sample rate (in hertz) for this audio. If not + // provided, then the synthesizer will use the default sample rate based on + // the audio encoding. If this is different from the voice's natural sample + // rate, then the synthesizer will honor this request by converting to the + // desired sample rate (which might result in worse audio quality). + int32 sample_rate_hertz = 2; + + // Configuration of how speech should be synthesized. + SynthesizeSpeechConfig synthesize_speech_config = 3; +} diff --git a/google/cloud/dialogflow/v2beta1/context.proto b/google/cloud/dialogflow/v2beta1/context.proto index 97db7c0fe..fb1c3cee3 100644 --- a/google/cloud/dialogflow/v2beta1/context.proto +++ b/google/cloud/dialogflow/v2beta1/context.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -62,6 +61,12 @@ service Contexts { additional_bindings { get: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" } + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contexts" + } + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts" + } }; } @@ -72,6 +77,12 @@ service Contexts { additional_bindings { get: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" } + additional_bindings { + get: "/v2beta1/{name=projects/*/locations/*/agent/sessions/*/contexts/*}" + } + additional_bindings { + get: "/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}" + } }; } @@ -86,6 +97,14 @@ service Contexts { post: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" body: "context" } + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contexts" + body: "context" + } + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts" + body: "context" + } }; } @@ -98,6 +117,14 @@ service Contexts { patch: "/v2beta1/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" body: "context" } + additional_bindings { + patch: "/v2beta1/{context.name=projects/*/locations/*/agent/sessions/*/contexts/*}" + body: "context" + } + additional_bindings { + patch: "/v2beta1/{context.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}" + body: "context" + } }; } @@ -108,6 +135,12 @@ service Contexts { additional_bindings { delete: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" } + additional_bindings { + delete: "/v2beta1/{name=projects/*/locations/*/agent/sessions/*/contexts/*}" + } + additional_bindings { + delete: "/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}" + } }; } @@ -118,6 +151,12 @@ service Contexts { additional_bindings { delete: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" } + additional_bindings { + delete: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contexts" + } + additional_bindings { + delete: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts" + } }; } } @@ -134,18 +173,36 @@ message Context { // // If `Environment ID` is not specified, we assume default 'draft' // environment. If `User ID` is not specified, we assume default '-' user. + // + // The following context names are reserved for internal use by Dialogflow. + // You should not use these contexts or create contexts with these names: + // + // * `__system_counters__` + // * `*_id_dialog_context` + // * `*_dialog_params_size` string name = 1; // Optional. The number of conversational query requests after which the - // context expires. If set to `0` (the default) the context expires + // context expires. The default is `0`. If set to `0`, the context expires // immediately. Contexts expire automatically after 20 minutes if there // are no matching queries. int32 lifespan_count = 2; // Optional. The collection of parameters associated with this context. - // Refer to [this - // doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters) - // for syntax. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value google.protobuf.Struct parameters = 3; } diff --git a/google/cloud/dialogflow/v2beta1/dialogflow_gapic.yaml b/google/cloud/dialogflow/v2beta1/dialogflow_gapic.yaml index ae0f269b1..0c46cf3e2 100644 --- a/google/cloud/dialogflow/v2beta1/dialogflow_gapic.yaml +++ b/google/cloud/dialogflow/v2beta1/dialogflow_gapic.yaml @@ -20,7 +20,7 @@ language_settings: domain_layer_location: google-cloud # A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. +# The fully qualified name of the API interface. - name: google.cloud.dialogflow.v2beta1.Agents # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. @@ -233,7 +233,7 @@ interfaces: max_poll_delay_millis: 5000 total_poll_timeout_millis: 300000 resource_name_treatment: STATIC_TYPES - # The fully qualified name of the API interface. +# The fully qualified name of the API interface. - name: google.cloud.dialogflow.v2beta1.Contexts # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. @@ -400,7 +400,7 @@ interfaces: parent: session timeout_millis: 60000 resource_name_treatment: STATIC_TYPES - # The fully qualified name of the API interface. +# The fully qualified name of the API interface. - name: google.cloud.dialogflow.v2beta1.EntityTypes # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. @@ -689,7 +689,7 @@ interfaces: max_poll_delay_millis: 5000 total_poll_timeout_millis: 300000 resource_name_treatment: STATIC_TYPES - # The fully qualified name of the API interface. +# The fully qualified name of the API interface. - name: google.cloud.dialogflow.v2beta1.Intents # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. @@ -835,7 +835,6 @@ interfaces: - update_mask required_fields: - intent - - language_code retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -858,7 +857,6 @@ interfaces: - name: BatchUpdateIntents required_fields: - parent - - language_code retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -898,7 +896,7 @@ interfaces: max_poll_delay_millis: 5000 total_poll_timeout_millis: 300000 resource_name_treatment: STATIC_TYPES - # The fully qualified name of the API interface. +# The fully qualified name of the API interface. - name: google.cloud.dialogflow.v2beta1.SessionEntityTypes # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. @@ -1052,7 +1050,7 @@ interfaces: name: session_entity_type timeout_millis: 60000 resource_name_treatment: STATIC_TYPES - # The fully qualified name of the API interface. +# The fully qualified name of the API interface. - name: google.cloud.dialogflow.v2beta1.Sessions # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. @@ -1150,7 +1148,7 @@ interfaces: retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 220000 - # The fully qualified name of the API interface. +# The fully qualified name of the API interface. - name: google.cloud.dialogflow.v2beta1.KnowledgeBases # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. @@ -1314,7 +1312,7 @@ interfaces: knowledge_base.name: knowledge_base timeout_millis: 60000 resource_name_treatment: STATIC_TYPES - # The fully qualified name of the API interface. +# The fully qualified name of the API interface. - name: google.cloud.dialogflow.v2beta1.Documents # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. @@ -1505,6 +1503,104 @@ interfaces: max_poll_delay_millis: 5000 total_poll_timeout_millis: 300000 resource_name_treatment: STATIC_TYPES +# The fully qualified name of the API interface. +- name: google.cloud.dialogflow.v2beta1.Environments + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/agent + entity_name: project_agent + - name_pattern: projects/{project}/agent/environments/{environment} + entity_name: environment + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - INTERNAL + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # name - The simple name of the method. + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce + # method overloads which allow a client to directly pass request message + # fields as method parameters. This information may or may not be used, + # depending on the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request + # message. + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a + # paging list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It + # defines which fields match the paging pattern in the request. The + # request consists of a page_size_field and a token_field. The + # page_size_field is the name of the optional field specifying the + # maximum number of elements to be returned in the response. The + # token_field is the name of the field in the request containing the + # page token. + # The response specifies response information of the list method. It + # defines which fields match the paging pattern in the response. The + # response consists of a token_field and a resources_field. The + # token_field is the name of the field in the response containing the + # next page token. The resources_field is the name of the field in the + # response containing the list of resources belonging to the page. + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListEnvironments + flattening: + groups: + - parameters: + - parent + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: environments + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project_agent + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES resource_name_generation: - message_name: SetAgentRequest field_entity_map: @@ -1653,3 +1749,6 @@ resource_name_generation: - message_name: DeleteDocumentRequest field_entity_map: name: document +- message_name: ListEnvironmentsRequest + field_entity_map: + parent: project_agent diff --git a/google/cloud/dialogflow/v2beta1/dialogflow_grpc_service_config.json b/google/cloud/dialogflow/v2beta1/dialogflow_grpc_service_config.json new file mode 100755 index 000000000..dcf6791c0 --- /dev/null +++ b/google/cloud/dialogflow/v2beta1/dialogflow_grpc_service_config.json @@ -0,0 +1,680 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.EntityTypes", + "method": "ListEntityTypes" + }, + { + "service": "google.cloud.dialogflow.v2beta1.EntityTypes", + "method": "GetEntityType" + }, + { + "service": "google.cloud.dialogflow.v2beta1.EntityTypes", + "method": "DeleteEntityType" + }, + { + "service": "google.cloud.dialogflow.v2beta1.EntityTypes", + "method": "BatchDeleteEntityTypes" + }, + { + "service": "google.cloud.dialogflow.v2beta1.EntityTypes", + "method": "BatchDeleteEntities" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.Intents", + "method": "ListIntents" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Intents", + "method": "GetIntent" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Intents", + "method": "DeleteIntent" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Intents", + "method": "BatchDeleteIntents" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.SessionEntityTypes", + "method": "ListSessionEntityTypes" + }, + { + "service": "google.cloud.dialogflow.v2beta1.SessionEntityTypes", + "method": "GetSessionEntityType" + }, + { + "service": "google.cloud.dialogflow.v2beta1.SessionEntityTypes", + "method": "DeleteSessionEntityType" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.SessionEntityTypes", + "method": "CreateSessionEntityType" + }, + { + "service": "google.cloud.dialogflow.v2beta1.SessionEntityTypes", + "method": "UpdateSessionEntityType" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.Sessions", + "method": "DetectIntent" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Sessions", + "method": "StreamingDetectIntent" + } + ], + "timeout": "220s" + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.Contexts", + "method": "ListContexts" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Contexts", + "method": "GetContext" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Contexts", + "method": "DeleteContext" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Contexts", + "method": "DeleteAllContexts" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.Contexts", + "method": "CreateContext" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Contexts", + "method": "UpdateContext" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.EntityTypes", + "method": "CreateEntityType" + }, + { + "service": "google.cloud.dialogflow.v2beta1.EntityTypes", + "method": "UpdateEntityType" + }, + { + "service": "google.cloud.dialogflow.v2beta1.EntityTypes", + "method": "BatchUpdateEntityTypes" + }, + { + "service": "google.cloud.dialogflow.v2beta1.EntityTypes", + "method": "BatchCreateEntities" + }, + { + "service": "google.cloud.dialogflow.v2beta1.EntityTypes", + "method": "BatchUpdateEntities" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.Intents", + "method": "CreateIntent" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Intents", + "method": "UpdateIntent" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Intents", + "method": "BatchUpdateIntents" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.Agents", + "method": "SetAgent" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Agents", + "method": "DeleteAgent" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Agents", + "method": "GetAgent" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Agents", + "method": "SearchAgents" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Agents", + "method": "TrainAgent" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Agents", + "method": "ExportAgent" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Agents", + "method": "RestoreAgent" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.Agents", + "method": "ImportAgent" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.AnswerRecords", + "method": "ListAnswerRecords" + }, + { + "service": "google.cloud.dialogflow.v2beta1.AnswerRecords", + "method": "UpdateAnswerRecord" + }, + { + "service": "google.cloud.dialogflow.v2beta1.AnswerRecords", + "method": "DeleteAnswerRecord" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.Conversations", + "method": "CreateConversation" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Conversations", + "method": "ListConversations" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Conversations", + "method": "GetConversation" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Conversations", + "method": "AddConversationPhoneNumber" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Conversations", + "method": "CompleteConversation" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Conversations", + "method": "CreateCallMatcher" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Conversations", + "method": "ListCallMatchers" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Conversations", + "method": "ListCallMatchers" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Conversations", + "method": "ListMessages" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.ConversationDatasets", + "method": "CreateConversationDataset" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationDatasets", + "method": "GetConversationDataset" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationDatasets", + "method": "ListConversationDatasets" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationDatasets", + "method": "DeleteConversationDataset" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationDatasets", + "method": "GetAnnotatedConversationDataset" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationDatasets", + "method": "GetAnnotatedConversationDataset" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationDatasets", + "method": "ListAnnotatedConversationDatasets" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationDatasets", + "method": "DeleteAnnotatedConversationDataset" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationDatasets", + "method": "ImportConversationData" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationDatasets", + "method": "LabelConversation" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.ConversationModels", + "method": "CreateConversationModel" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationModels", + "method": "GetConversationModel" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationModels", + "method": "ListConversationModels" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationModels", + "method": "DeleteConversationModel" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationModels", + "method": "DeployConversationModel" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationModels", + "method": "UndeployConversationModel" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationModels", + "method": "GetConversationModelEvaluation" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationModels", + "method": "ListConversationModelEvaluations" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.ConversationProfiles", + "method": "ListConversationProfiles" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationProfiles", + "method": "GetConversationProfile" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationProfiles", + "method": "CreateConversationProfile" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationProfiles", + "method": "UpdateConversationProfile" + }, + { + "service": "google.cloud.dialogflow.v2beta1.ConversationProfiles", + "method": "DeleteConversationProfile" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.Documents", + "method": "ListDocuments" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Documents", + "method": "GetDocument" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Documents", + "method": "CreateDocument" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Documents", + "method": "DeleteDocument" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Documents", + "method": "UpdateDocument" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Documents", + "method": "ReloadDocument" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.KnowledgeBases", + "method": "ListKnowledgeBases" + }, + { + "service": "google.cloud.dialogflow.v2beta1.KnowledgeBases", + "method": "GetKnowledgeBase" + }, + { + "service": "google.cloud.dialogflow.v2beta1.KnowledgeBases", + "method": "CreateKnowledgeBase" + }, + { + "service": "google.cloud.dialogflow.v2beta1.KnowledgeBases", + "method": "DeleteKnowledgeBase" + }, + { + "service": "google.cloud.dialogflow.v2beta1.KnowledgeBases", + "method": "UpdateKnowledgeBase" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.PhoneNumbers", + "method": "ListPhoneNumbers" + }, + { + "service": "google.cloud.dialogflow.v2beta1.PhoneNumbers", + "method": "UpdatePhoneNumber" + }, + { + "service": "google.cloud.dialogflow.v2beta1.PhoneNumbers", + "method": "DeletePhoneNumber" + }, + { + "service": "google.cloud.dialogflow.v2beta1.PhoneNumbers", + "method": "UndeletePhoneNumber" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.PhoneNumberOrders", + "method": "CreatePhoneNumberOrder" + }, + { + "service": "google.cloud.dialogflow.v2beta1.PhoneNumberOrders", + "method": "GetPhoneNumberOrder" + }, + { + "service": "google.cloud.dialogflow.v2beta1.PhoneNumberOrders", + "method": "ListPhoneNumberOrders" + }, + { + "service": "google.cloud.dialogflow.v2beta1.PhoneNumberOrders", + "method": "UpdatePhoneNumberOrder" + }, + { + "service": "google.cloud.dialogflow.v2beta1.PhoneNumberOrders", + "method": "CancelPhoneNumberOrder" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.Participants", + "method": "CreateParticipant" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Participants", + "method": "GetParticipant" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Participants", + "method": "ListParticipants" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Participants", + "method": "UpdateParticipant" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Participants", + "method": "AnalyzeContent" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Participants", + "method": "SuggestArticles" + }, + { + "service": "google.cloud.dialogflow.v2beta1.Participants", + "method": "SuggestFaqAnswers" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.Participants", + "method": "StreamingAnalyzeContent" + } + ], + "timeout": "1800s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.Environments", + "method": "ListEnvironments" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "INTERNAL" + ] + } + } + ] +} diff --git a/google/cloud/dialogflow/dialogflow_v2beta1.yaml b/google/cloud/dialogflow/v2beta1/dialogflow_v2beta1.yaml similarity index 66% rename from google/cloud/dialogflow/dialogflow_v2beta1.yaml rename to google/cloud/dialogflow/v2beta1/dialogflow_v2beta1.yaml index c526f7614..64c2b6172 100644 --- a/google/cloud/dialogflow/dialogflow_v2beta1.yaml +++ b/google/cloud/dialogflow/v2beta1/dialogflow_v2beta1.yaml @@ -8,6 +8,7 @@ apis: - name: google.cloud.dialogflow.v2beta1.Contexts - name: google.cloud.dialogflow.v2beta1.Documents - name: google.cloud.dialogflow.v2beta1.EntityTypes +- name: google.cloud.dialogflow.v2beta1.Environments - name: google.cloud.dialogflow.v2beta1.Intents - name: google.cloud.dialogflow.v2beta1.KnowledgeBases - name: google.cloud.dialogflow.v2beta1.SessionEntityTypes @@ -27,46 +28,20 @@ documentation: Builds conversational interfaces (for example, chatbots, and voice-powered apps and devices). overview: |- - [Dialogflow](http://dialogflow.com/) is a natural language - understanding platform that makes it easy for you to design and integrate - a conversational user interface into your mobile app, web application, - device, bot, and so on. Using Dialogflow you can provide users new and - engaging ways to interact with your product using both voice recognition - and text input. + Dialogflow is + a natural language understanding platform that makes it easy + to design and integrate a conversational user interface into your mobile + app, web application, device, bot, interactive voice response system, and + so on. Using Dialogflow, you can provide new and engaging ways for + users to interact with your product. - For information on how Dialogflow agents, intents, entities, and so on - work, see the [Dialogflow getting - started - guide](https://dialogflow.com/docs/getting-started/basics) in the - dialogflow.com documentation. + Dialogflow can analyze multiple types of input from your customers, + including text or audio inputs (like from a phone or voice recording). + It can also respond to your customers in a couple of ways, either through + text or with synthetic speech. - ## Dialogflow Editions - - Dialogflow is available in two editions: Standard and Enterprise. For - information on the difference in Dialogflow editions, see [Dialogflow - Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions). - - ## The Dialogflow API - - The Dialogflow API provides a REST and gRPC API that you can use to - incorporate the Dialogflow into your product. After you have created a - Google Cloud project and a Dialogflow agent, you can use the API to create - intents, entities, and so on, and then pass user input to your Dialogflow - agent to determine user intent using - the - [detectIntent](https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/v2beta1/projects.agent.sessions/detectIntent) REST - API, or the - [StreamingDetectIntentRequest](https://cloud.google.com/dialogflow-enterprise/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest) gRPC - API. - - ## Getting Started - - * For information on setting up a Google Cloud Platform project and - creating an agent using the Dialogflow Enterprise Edition, see - [Quickstart](https://cloud.google.com/dialogflow-enterprise/docs/quickstart). * - For information on creating an agent using the Dialogflow Standard - Edition, see [Building Your First - Agent](https://dialogflow.com/docs/getting-started/building-your-first-agent) + For more information, see the + [Dialogflow documentation](https://cloud.google.com/dialogflow/docs). backend: rules: @@ -78,6 +53,8 @@ backend: deadline: 60.0 - selector: 'google.cloud.dialogflow.v2beta1.EntityTypes.*' deadline: 60.0 + - selector: google.cloud.dialogflow.v2beta1.Environments.ListEnvironments + deadline: 60.0 - selector: 'google.cloud.dialogflow.v2beta1.Intents.*' deadline: 60.0 - selector: 'google.cloud.dialogflow.v2beta1.KnowledgeBases.*' @@ -85,18 +62,26 @@ backend: - selector: 'google.cloud.dialogflow.v2beta1.SessionEntityTypes.*' deadline: 60.0 - selector: google.cloud.dialogflow.v2beta1.Sessions.DetectIntent - deadline: 230.0 + deadline: 220.0 - selector: google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent - deadline: 230.0 + deadline: 220.0 - selector: 'google.longrunning.Operations.*' deadline: 60.0 http: rules: + - selector: google.longrunning.Operations.CancelOperation + post: '/v2beta1/{name=projects/*/operations/*}:cancel' + additional_bindings: + - post: '/v2beta1/{name=projects/*/locations/*/operations/*}:cancel' - selector: google.longrunning.Operations.GetOperation get: '/v2beta1/{name=projects/*/operations/*}' + additional_bindings: + - get: '/v2beta1/{name=projects/*/locations/*/operations/*}' - selector: google.longrunning.Operations.ListOperations get: '/v2beta1/{name=projects/*}/operations' + additional_bindings: + - get: '/v2beta1/{name=projects/*/locations/*}/operations' authentication: rules: @@ -120,6 +105,11 @@ authentication: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/dialogflow + - selector: google.cloud.dialogflow.v2beta1.Environments.ListEnvironments + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow - selector: 'google.cloud.dialogflow.v2beta1.Intents.*' oauth: canonical_scopes: |- diff --git a/google/cloud/dialogflow/v2beta1/document.proto b/google/cloud/dialogflow/v2beta1/document.proto index 5daf85593..02b6e4e81 100644 --- a/google/cloud/dialogflow/v2beta1/document.proto +++ b/google/cloud/dialogflow/v2beta1/document.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dialogflow.v2beta1; import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/dialogflow/v2beta1/gcs.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -70,9 +71,6 @@ service Documents { // // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; // only use `projects.knowledgeBases.documents`. - // - // Operation rpc CreateDocument(CreateDocumentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents" @@ -82,15 +80,16 @@ service Documents { body: "document" } }; + option (google.longrunning.operation_info) = { + response_type: "Document" + metadata_type: "KnowledgeOperationMetadata" + }; } // Deletes the specified document. // // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; // only use `projects.knowledgeBases.documents`. - // - // Operation rpc DeleteDocument(DeleteDocumentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}" @@ -98,15 +97,16 @@ service Documents { delete: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" } }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "KnowledgeOperationMetadata" + }; } // Updates the specified document. // // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; // only use `projects.knowledgeBases.documents`. - // - // Operation rpc UpdateDocument(UpdateDocumentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v2beta1/{document.name=projects/*/knowledgeBases/*/documents/*}" @@ -116,6 +116,10 @@ service Documents { body: "document" } }; + option (google.longrunning.operation_info) = { + response_type: "Document" + metadata_type: "KnowledgeOperationMetadata" + }; } // Reloads the specified document from its specified source, content_uri or @@ -125,9 +129,6 @@ service Documents { // // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; // only use `projects.knowledgeBases.documents`. - // - // Operation rpc ReloadDocument(ReloadDocumentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}:reload" @@ -137,6 +138,10 @@ service Documents { body: "*" } }; + option (google.longrunning.operation_info) = { + response_type: "Document" + metadata_type: "KnowledgeOperationMetadata" + }; } } @@ -293,4 +298,13 @@ message ReloadDocumentRequest { // Format: `projects//knowledgeBases//documents/` string name = 1; + + // The source for document reloading. + // Optional. If provided, the service will load the contents from the source + // and update document in the knowledge base. + oneof source { + // Optional. The path for a Cloud Storage source file for reloading document content. + // If not provided, the Document's existing source will be reloaded. + GcsSource gcs_source = 3; + } } diff --git a/google/cloud/dialogflow/v2beta1/entity_type.proto b/google/cloud/dialogflow/v2beta1/entity_type.proto index 0ef132062..0f0932d2d 100644 --- a/google/cloud/dialogflow/v2beta1/entity_type.proto +++ b/google/cloud/dialogflow/v2beta1/entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dialogflow.v2beta1; import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -45,11 +46,11 @@ option objc_class_prefix = "DF"; // data types such as date, time, currency, and so on. A system entity is // represented by the `EntityType` type. // -// * **Developer** - entities that are defined by you that represent +// * **Custom** - entities that are defined by you that represent // actionable data that is meaningful to your application. For example, // you could define a `pizza.sauce` entity for red or white pizza sauce, // a `pizza.cheese` entity for the different types of cheese on a pizza, -// a `pizza.topping` entity for different toppings, and so on. A developer +// a `pizza.topping` entity for different toppings, and so on. A custom // entity is represented by the `EntityType` type. // // * **User** - entities that are built for an individual user such as @@ -69,6 +70,9 @@ service EntityTypes { rpc ListEntityTypes(ListEntityTypesRequest) returns (ListEntityTypesResponse) { option (google.api.http) = { get: "/v2beta1/{parent=projects/*/agent}/entityTypes" + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes" + } }; } @@ -76,6 +80,9 @@ service EntityTypes { rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) { option (google.api.http) = { get: "/v2beta1/{name=projects/*/agent/entityTypes/*}" + additional_bindings { + get: "/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}" + } }; } @@ -84,6 +91,10 @@ service EntityTypes { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent}/entityTypes" body: "entity_type" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes" + body: "entity_type" + } }; } @@ -92,6 +103,10 @@ service EntityTypes { option (google.api.http) = { patch: "/v2beta1/{entity_type.name=projects/*/agent/entityTypes/*}" body: "entity_type" + additional_bindings { + patch: "/v2beta1/{entity_type.name=projects/*/locations/*/agent/entityTypes/*}" + body: "entity_type" + } }; } @@ -99,6 +114,9 @@ service EntityTypes { rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2beta1/{name=projects/*/agent/entityTypes/*}" + additional_bindings { + delete: "/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}" + } }; } @@ -109,6 +127,10 @@ service EntityTypes { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent}/entityTypes:batchUpdate" body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchUpdate" + body: "*" + } }; } @@ -119,6 +141,10 @@ service EntityTypes { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent}/entityTypes:batchDelete" body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchDelete" + body: "*" + } }; } @@ -129,6 +155,10 @@ service EntityTypes { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate" body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchCreate" + body: "*" + } }; } @@ -141,6 +171,10 @@ service EntityTypes { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate" body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchUpdate" + body: "*" + } }; } @@ -151,6 +185,10 @@ service EntityTypes { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete" body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchDelete" + body: "*" + } }; } } @@ -167,7 +205,7 @@ message EntityType { // // For `KIND_MAP` entity types: // - // * A canonical value to be used in place of synonyms. + // * A reference value to be used in place of synonyms. // // For `KIND_LIST` entity types: // @@ -190,14 +228,18 @@ message EntityType { // Not specified. This value should be never used. KIND_UNSPECIFIED = 0; - // Map entity types allow mapping of a group of synonyms to a canonical + // Map entity types allow mapping of a group of synonyms to a reference // value. KIND_MAP = 1; - // List entity types contain a set of entries that do not map to canonical + // List entity types contain a set of entries that do not map to reference // values. However, list entity types can contain references to other entity // types (with or without aliases). KIND_LIST = 2; + + // Regexp entity types allow to specify regular expressions in entries + // values. + KIND_REGEXP = 3; } // Represents different entity type expansion modes. Automated expansion @@ -230,6 +272,9 @@ message EntityType { // Optional. The collection of entity entries associated with the entity type. repeated Entity entities = 6; + + // Optional. Enables fuzzy entity extraction during classification. + bool enable_fuzzy_extraction = 7; } // The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes]. @@ -238,13 +283,12 @@ message ListEntityTypesRequest { // Format: `projects//agent`. string parent = 1; - // Optional. The language to list entity synonyms for. If not specified, - // the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of items to return in a single page. By // default 100 and at most 1000. @@ -271,13 +315,12 @@ message GetEntityTypeRequest { // Format: `projects//agent/entityTypes/`. string name = 1; - // Optional. The language to retrieve entity synonyms for. If not specified, - // the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.CreateEntityType]. @@ -289,13 +332,12 @@ message CreateEntityTypeRequest { // Required. The entity type to create. EntityType entity_type = 2; - // Optional. The language of entity synonyms defined in `entity_type`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType]. @@ -303,13 +345,12 @@ message UpdateEntityTypeRequest { // Required. The entity type to update. EntityType entity_type = 1; - // Optional. The language of entity synonyms defined in `entity_type`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. google.protobuf.FieldMask update_mask = 3; @@ -345,13 +386,12 @@ message BatchUpdateEntityTypesRequest { EntityTypeBatch entity_type_batch_inline = 3; } - // Optional. The language of entity synonyms defined in `entity_types`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 4; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. google.protobuf.FieldMask update_mask = 5; @@ -383,13 +423,12 @@ message BatchCreateEntitiesRequest { // Required. The entities to create. repeated EntityType.Entity entities = 2; - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntities]. @@ -401,13 +440,12 @@ message BatchUpdateEntitiesRequest { // Required. The entities to update or create. repeated EntityType.Entity entities = 2; - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. google.protobuf.FieldMask update_mask = 4; @@ -419,18 +457,17 @@ message BatchDeleteEntitiesRequest { // `projects//agent/entityTypes/`. string parent = 1; - // Required. The canonical `values` of the entities to delete. Note that + // Required. The reference `values` of the entities to delete. Note that // these are not fully-qualified names, i.e. they don't start with // `projects/`. repeated string entity_values = 2; - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; } // This message is a wrapper around a collection of entity types. diff --git a/google/cloud/dialogflow/v2beta1/environment.proto b/google/cloud/dialogflow/v2beta1/environment.proto new file mode 100644 index 000000000..386c014d6 --- /dev/null +++ b/google/cloud/dialogflow/v2beta1/environment.proto @@ -0,0 +1,135 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2beta1/audio_config.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "EnvironmentProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Manages agent environments. +service Environments { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all non-draft environments of the specified agent. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*/agent}/environments" + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent}/environments" + } + }; + } +} + +// Represents an agent environment. +message Environment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Environment" + pattern: "projects/{project}/agent/environments/{environment}" + }; + + // Represents an environment state. When a environment is pointed to a new + // agent version, the environment is temporarily set to the `LOADING` state. + // During that time, the environment keeps on serving the previous version of + // the agent. After the new agent version is done loading, the environment is + // set back to the `RUNNING` state. + enum State { + // Not specified. This value is not used. + STATE_UNSPECIFIED = 0; + + // Stopped. + STOPPED = 1; + + // Loading. + LOADING = 2; + + // Running. + RUNNING = 3; + } + + // Output only. The unique identifier of this agent environment. + // Format: `projects//agent/environments/`. + // For Environment ID, "-" is reserved for 'draft' environment. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The developer-provided description for this environment. + // The maximum length is 500 characters. If exceeded, the request is rejected. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The agent version loaded into this environment. + // Format: `projects//agent/versions/`. + string agent_version = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Version" + } + ]; + + // Output only. The state of this environment. This field is read-only, i.e., it cannot be + // set by create and update methods. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update time of this environment. This field is read-only, i.e., it + // cannot be set by create and update methods. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments]. +message ListEnvironmentsRequest { + // Required. The agent to list all environments from. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Environment" + } + ]; + + // Optional. The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments]. +message ListEnvironmentsResponse { + // The list of agent environments. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated Environment environments = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} diff --git a/google/cloud/dialogflow/v2beta1/gcs.proto b/google/cloud/dialogflow/v2beta1/gcs.proto new file mode 100644 index 000000000..866b81cb0 --- /dev/null +++ b/google/cloud/dialogflow/v2beta1/gcs.proto @@ -0,0 +1,36 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "GcsProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Google Cloud Storage location for single input. +message GcsSource { + // Required. The Google Cloud Storage URIs for the inputs. A URI is of the + // form: + // gs://bucket/object-prefix-or-name + // Whether a prefix or name is used depends on the use case. + string uri = 1; +} diff --git a/google/cloud/dialogflow/v2beta1/intent.proto b/google/cloud/dialogflow/v2beta1/intent.proto index ddd1234b1..1b1687262 100644 --- a/google/cloud/dialogflow/v2beta1/intent.proto +++ b/google/cloud/dialogflow/v2beta1/intent.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dialogflow.v2beta1; import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/dialogflow/v2beta1/audio_config.proto"; import "google/cloud/dialogflow/v2beta1/context.proto"; import "google/longrunning/operations.proto"; @@ -77,6 +78,9 @@ service Intents { rpc ListIntents(ListIntentsRequest) returns (ListIntentsResponse) { option (google.api.http) = { get: "/v2beta1/{parent=projects/*/agent}/intents" + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent}/intents" + } }; } @@ -84,6 +88,9 @@ service Intents { rpc GetIntent(GetIntentRequest) returns (Intent) { option (google.api.http) = { get: "/v2beta1/{name=projects/*/agent/intents/*}" + additional_bindings { + get: "/v2beta1/{name=projects/*/locations/*/agent/intents/*}" + } }; } @@ -92,6 +99,10 @@ service Intents { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent}/intents" body: "intent" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent}/intents" + body: "intent" + } }; } @@ -100,6 +111,10 @@ service Intents { option (google.api.http) = { patch: "/v2beta1/{intent.name=projects/*/agent/intents/*}" body: "intent" + additional_bindings { + patch: "/v2beta1/{intent.name=projects/*/locations/*/agent/intents/*}" + body: "intent" + } }; } @@ -107,6 +122,9 @@ service Intents { rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2beta1/{name=projects/*/agent/intents/*}" + additional_bindings { + delete: "/v2beta1/{name=projects/*/locations/*/agent/intents/*}" + } }; } @@ -117,6 +135,10 @@ service Intents { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent}/intents:batchUpdate" body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchUpdate" + body: "*" + } }; } @@ -127,6 +149,10 @@ service Intents { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent}/intents:batchDelete" body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchDelete" + body: "*" + } }; } } @@ -135,6 +161,12 @@ service Intents { // Intents convert a number of user expressions or patterns into an action. An // action is an extraction of a user command or sentence semantics. message Intent { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Intent" + pattern: "projects/{project}/agent/intents/{intent}" + pattern: "projects/{project}/locations/{location}/agent/intents/{intent}" + }; + // Represents an example that the agent is trained on. message TrainingPhrase { // Represents a part of a training phrase. @@ -404,6 +436,9 @@ message Intent { // Required. List items. repeated Item items = 2; + + // Optional. Subtitle of the list. + string subtitle = 3 [(google.api.field_behavior) = OPTIONAL]; } // The card for presenting a carousel of options to select from. @@ -574,21 +609,21 @@ message Intent { // Rich Business Messaging (RBM) Media displayed in Cards // The following media-types are currently supported: // - // ## Image Types + // Image Types // - // image/jpeg - // image/jpg' - // image/gif - // image/png + // * image/jpeg + // * image/jpg' + // * image/gif + // * image/png // - // ## Video Types + // Video Types // - // video/h263 - // video/m4v - // video/mp4 - // video/mpeg - // video/mpeg4 - // video/webm + // * video/h263 + // * video/m4v + // * video/mp4 + // * video/mpeg + // * video/mpeg4 + // * video/webm message RbmMedia { // Media height enum Height { @@ -719,6 +754,189 @@ message Intent { } } + // The media content card for Actions on Google. + message MediaContent { + // Response media object for media content card. + message ResponseMediaObject { + // Required. Name of media card. + string name = 1; + + // Optional. Description of media card. + string description = 2; + + // Image to show with the media card. + oneof image { + // Optional. Image to display above media content. + Image large_image = 3; + + // Optional. Icon to display above media content. + Image icon = 4; + } + + // Required. Url where the media is stored. + string content_url = 5; + } + + // Format of response media type. + enum ResponseMediaType { + // Unspecified. + RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0; + + // Response media type is audio. + AUDIO = 1; + } + + // Optional. What type of media is the content (ie "audio"). + ResponseMediaType media_type = 1; + + // Required. List of media objects. + repeated ResponseMediaObject media_objects = 2; + } + + // Browse Carousel Card for Actions on Google. + // https://developers.google.com/actions/assistant/responses#browsing_carousel + message BrowseCarouselCard { + // Browsing carousel tile + message BrowseCarouselCardItem { + // Actions on Google action to open a given url. + message OpenUrlAction { + // Type of the URI. + enum UrlTypeHint { + // Unspecified + URL_TYPE_HINT_UNSPECIFIED = 0; + + // Url would be an amp action + AMP_ACTION = 1; + + // URL that points directly to AMP content, or to a canonical URL + // which refers to AMP content via . + AMP_CONTENT = 2; + } + + // Required. URL + string url = 1; + + // Optional. Specifies the type of viewer that is used when opening + // the URL. Defaults to opening via web browser. + UrlTypeHint url_type_hint = 3; + } + + // Required. Action to present to the user. + OpenUrlAction open_uri_action = 1; + + // Required. Title of the carousel item. Maximum of two lines of text. + string title = 2; + + // Optional. Description of the carousel item. Maximum of four lines of + // text. + string description = 3; + + // Optional. Hero image for the carousel item. + Image image = 4; + + // Optional. Text that appears at the bottom of the Browse Carousel + // Card. Maximum of one line of text. + string footer = 5; + } + + // Image display options for Actions on Google. This should be used for + // when the image's aspect ratio does not match the image container's + // aspect ratio. + enum ImageDisplayOptions { + // Fill the gaps between the image and the image container with gray + // bars. + IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0; + + // Fill the gaps between the image and the image container with gray + // bars. + GRAY = 1; + + // Fill the gaps between the image and the image container with white + // bars. + WHITE = 2; + + // Image is scaled such that the image width and height match or exceed + // the container dimensions. This may crop the top and bottom of the + // image if the scaled image height is greater than the container + // height, or crop the left and right of the image if the scaled image + // width is greater than the container width. This is similar to "Zoom + // Mode" on a widescreen TV when playing a 4:3 video. + CROPPED = 3; + + // Pad the gaps between image and image frame with a blurred copy of the + // same image. + BLURRED_BACKGROUND = 4; + } + + // Required. List of items in the Browse Carousel Card. Minimum of two + // items, maximum of ten. + repeated BrowseCarouselCardItem items = 1; + + // Optional. Settings for displaying the image. Applies to every image in + // [items][google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.items]. + ImageDisplayOptions image_display_options = 2; + } + + // Table card for Actions on Google. + message TableCard { + // Required. Title of the card. + string title = 1; + + // Optional. Subtitle to the title. + string subtitle = 2; + + // Optional. Image which should be displayed on the card. + Image image = 3; + + // Optional. Display properties for the columns in this table. + repeated ColumnProperties column_properties = 4; + + // Optional. Rows in this table of data. + repeated TableCardRow rows = 5; + + // Optional. List of buttons for the card. + repeated BasicCard.Button buttons = 6; + } + + // Column properties for [TableCard][google.cloud.dialogflow.v2beta1.Intent.Message.TableCard]. + message ColumnProperties { + // Text alignments within a cell. + enum HorizontalAlignment { + // Text is aligned to the leading edge of the column. + HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; + + // Text is aligned to the leading edge of the column. + LEADING = 1; + + // Text is centered in the column. + CENTER = 2; + + // Text is aligned to the trailing edge of the column. + TRAILING = 3; + } + + // Required. Column heading. + string header = 1; + + // Optional. Defines text alignment for all cells in this column. + HorizontalAlignment horizontal_alignment = 2; + } + + // Row of [TableCard][google.cloud.dialogflow.v2beta1.Intent.Message.TableCard]. + message TableCardRow { + // Optional. List of cells that make up this row. + repeated TableCardCell cells = 1; + + // Optional. Whether to add a visual divider after this row. + bool divider_after = 2; + } + + // Cell of [TableCardRow][google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow]. + message TableCardCell { + // Required. Text in this cell. + string text = 1; + } + // Represents different platforms that a rich message can be intended for. enum Platform { // Not specified. @@ -745,67 +963,9 @@ message Intent { // Viber. VIBER = 7; - // Actions on Google. - // When using Actions on Google, you can choose one of the specific - // Intent.Message types that mention support for Actions on Google, - // or you can use the advanced Intent.Message.payload field. - // The payload field provides access to AoG features not available in the - // specific message types. - // If using the Intent.Message.payload field, it should have a structure - // similar to the JSON message shown here. For more information, see - // [Actions on Google Webhook - // Format](https://developers.google.com/actions/dialogflow/webhook) - //
{
-      //   "expectUserResponse": true,
-      //   "isSsml": false,
-      //   "noInputPrompts": [],
-      //   "richResponse": {
-      //     "items": [
-      //       {
-      //         "simpleResponse": {
-      //           "displayText": "hi",
-      //           "textToSpeech": "hello"
-      //         }
-      //       }
-      //     ],
-      //     "suggestions": [
-      //       {
-      //         "title": "Say this"
-      //       },
-      //       {
-      //         "title": "or this"
-      //       }
-      //     ]
-      //   },
-      //   "systemIntent": {
-      //     "data": {
-      //       "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
-      //       "listSelect": {
-      //         "items": [
-      //           {
-      //             "optionInfo": {
-      //               "key": "key1",
-      //               "synonyms": [
-      //                 "key one"
-      //               ]
-      //             },
-      //             "title": "must not be empty, but unique"
-      //           },
-      //           {
-      //             "optionInfo": {
-      //               "key": "key2",
-      //               "synonyms": [
-      //                 "key two"
-      //               ]
-      //             },
-      //             "title": "must not be empty, but unique"
-      //           }
-      //         ]
-      //       }
-      //     },
-      //     "intent": "actions.intent.OPTION"
-      //   }
-      // }
+ // Google Assistant + // See [Dialogflow webhook + // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) ACTIONS_ON_GOOGLE = 8; // Telephony Gateway. @@ -829,9 +989,7 @@ message Intent { // Displays a card. Card card = 4; - // Returns a response containing a custom, platform-specific payload. - // See the Intent.Message.Platform type for a description of the - // structure that may be required for your platform. + // A custom platform-specific response. google.protobuf.Struct payload = 5; // Returns a voice or text-only response for Actions on Google. @@ -872,6 +1030,15 @@ message Intent { // Rich Business Messaging (RBM) carousel rich card response. RbmCarouselCard rbm_carousel_rich_card = 20; + + // Browse carousel card for Actions on Google. + BrowseCarouselCard browse_carousel_card = 22; + + // Table card for Actions on Google. + TableCard table_card = 23; + + // The media content card for Actions on Google. + MediaContent media_content = 24; } // Optional. The platform that this message is intended for. @@ -914,11 +1081,14 @@ message Intent { // Optional. Indicates whether webhooks are enabled for the intent. WebhookState webhook_state = 6; - // Optional. The priority of this intent. Higher numbers represent higher - // priorities. If this is zero or unspecified, we use the default - // priority 500000. + // The priority of this intent. Higher numbers represent higher + // priorities. // - // Negative numbers mean that the intent is disabled. + // - If the supplied value is unspecified or 0, the service + // translates the value to 500,000, which corresponds to the + // `Normal` priority in the console. + // - If the supplied value is negative, the intent is ignored + // in runtime detect intent requests. int32 priority = 3; // Optional. Indicates whether this is a fallback intent. @@ -956,6 +1126,7 @@ message Intent { // Optional. The collection of event names that trigger the intent. // If the collection of input contexts is not empty, all of the contexts must // be present in the active user session for an event to trigger this intent. + // Event names are limited to 150 characters. repeated string events = 8; // Optional. The collection of examples that the agent is @@ -997,8 +1168,9 @@ message Intent { // Read-only after creation. The unique identifier of the parent intent in the // chain of followup intents. You can set this field when creating an intent, - // for example with [CreateIntent][] or [BatchUpdateIntents][], in order to - // make this intent a followup intent. + // for example with [CreateIntent][google.cloud.dialogflow.v2beta1.Intents.CreateIntent] or + // [BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents], in order to make this + // intent a followup intent. // // It identifies the parent followup intent. // Format: `projects//agent/intents/`. @@ -1015,13 +1187,12 @@ message ListIntentsRequest { // Format: `projects//agent`. string parent = 1; - // Optional. The language to list training phrases, parameters and rich - // messages for. If not specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The resource view to apply to the returned intent. IntentView intent_view = 3; @@ -1051,13 +1222,12 @@ message GetIntentRequest { // Format: `projects//agent/intents/`. string name = 1; - // Optional. The language to retrieve training phrases, parameters and rich - // messages for. If not specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The resource view to apply to the returned intent. IntentView intent_view = 3; @@ -1072,13 +1242,12 @@ message CreateIntentRequest { // Required. The intent to create. Intent intent = 2; - // Optional. The language of training phrases, parameters and rich messages - // defined in `intent`. If not specified, the agent's default language is - // used. [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The resource view to apply to the returned intent. IntentView intent_view = 4; @@ -1089,13 +1258,12 @@ message UpdateIntentRequest { // Required. The intent to update. Intent intent = 1; - // Optional. The language of training phrases, parameters and rich messages - // defined in `intent`. If not specified, the agent's default language is - // used. [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. google.protobuf.FieldMask update_mask = 3; @@ -1120,6 +1288,11 @@ message BatchUpdateIntentsRequest { string parent = 1; // Required. The source of the intent batch. + // + // For each intent in the batch: + // + // * If `name` is specified, we update an existing intent. + // * If `name` is not specified, we create a new intent. oneof intent_batch { // The URI to a Google Cloud Storage file containing intents to update or // create. The file format can either be a serialized proto (of IntentBatch @@ -1130,13 +1303,12 @@ message BatchUpdateIntentsRequest { IntentBatch intent_batch_inline = 3; } - // Optional. The language of training phrases, parameters and rich messages - // defined in `intents`. If not specified, the agent's default language is - // used. [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 4; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. google.protobuf.FieldMask update_mask = 5; diff --git a/google/cloud/dialogflow/v2beta1/knowledge_base.proto b/google/cloud/dialogflow/v2beta1/knowledge_base.proto index ce992dde4..fa6d32698 100644 --- a/google/cloud/dialogflow/v2beta1/knowledge_base.proto +++ b/google/cloud/dialogflow/v2beta1/knowledge_base.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -122,6 +121,11 @@ message KnowledgeBase { // Required. The display name of the knowledge base. The name must be 1024 // bytes or less; otherwise, the creation request fails. string display_name = 2; + + // Language which represents the KnowledgeBase. When the KnowledgeBase is + // created/updated, this is populated for all non en-us languages. If not + // populated, the default language en-us applies. + string language_code = 4; } // Request message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases]. @@ -148,7 +152,7 @@ message ListKnowledgeBasesResponse { string next_page_token = 2; } -// Request message for [KnowledgeBase.GetDocument][]. +// Request message for [KnowledgeBases.GetKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.GetKnowledgeBase]. message GetKnowledgeBaseRequest { // Required. The name of the knowledge base to retrieve. // Format `projects//knowledgeBases/`. diff --git a/google/cloud/dialogflow/v2beta1/session.proto b/google/cloud/dialogflow/v2beta1/session.proto index 8d0f91f45..ae25c967d 100644 --- a/google/cloud/dialogflow/v2beta1/session.proto +++ b/google/cloud/dialogflow/v2beta1/session.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,19 +11,21 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.dialogflow.v2beta1; import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/dialogflow/v2beta1/agent.proto"; import "google/cloud/dialogflow/v2beta1/audio_config.proto"; import "google/cloud/dialogflow/v2beta1/context.proto"; import "google/cloud/dialogflow/v2beta1/intent.proto"; import "google/cloud/dialogflow/v2beta1/session_entity_type.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; import "google/rpc/status.proto"; import "google/type/latlng.proto"; @@ -36,6 +38,11 @@ option java_multiple_files = true; option java_outer_classname = "SessionProto"; option java_package = "com.google.cloud.dialogflow.v2beta1"; option objc_class_prefix = "DF"; +option (google.api.resource_definition) = { + type: "dialogflow.googleapis.com/Session" + pattern: "projects/{project}/locations/{location}/agent/sessions/{session}" + pattern: "projects/{project}/agent/sessions/{session}" +}; // A session represents an interaction with a user. You retrieve user input // and pass it to the [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or @@ -59,6 +66,14 @@ service Sessions { post: "/v2beta1/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent" body: "*" } + additional_bindings { + post: "/v2beta1/{session=projects/*/locations/*/agent/sessions/*}:detectIntent" + body: "*" + } + additional_bindings { + post: "/v2beta1/{session=projects/*/locations/*/agent/environments/*/users/*/sessions/*}:detectIntent" + body: "*" + } }; } @@ -80,9 +95,11 @@ message DetectIntentRequest { // `User Id`. They can be a random number or some type of user and session // identifiers (preferably hashed). The length of the `Session ID` and // `User ID` must not exceed 36 characters. - string session = 1; + string session = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Session" + }]; - // Optional. The parameters of this query. + // The parameters of this query. QueryParameters query_params = 2; // Required. The input specification. It can be set to: @@ -95,12 +112,20 @@ message DetectIntentRequest { // 3. an event that specifies which intent to trigger. QueryInput query_input = 3; - // Optional. Instructs the speech synthesizer how to generate the output + // Instructs the speech synthesizer how to generate the output // audio. If this field is not set and agent-level speech synthesizer is not // configured, no output audio is generated. OutputAudioConfig output_audio_config = 4; - // Optional. The natural language speech audio to be processed. This field + // Mask for [output_audio_config][google.cloud.dialogflow.v2beta1.DetectIntentRequest.output_audio_config] indicating which settings in this + // request-level config should override speech synthesizer settings defined at + // agent-level. + // + // If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2beta1.DetectIntentRequest.output_audio_config] replaces the agent-level + // config in its entirety. + google.protobuf.FieldMask output_audio_config_mask = 7; + + // The natural language speech audio to be processed. This field // should be populated iff `query_input` is set to an input audio config. // A single request can contain up to 1 minute of speech audio data. bytes input_audio = 5; @@ -143,42 +168,61 @@ message DetectIntentResponse { // Represents the parameters of the conversational query. message QueryParameters { - // Optional. The time zone of this conversational query from the + // The time zone of this conversational query from the // [time zone database](https://www.iana.org/time-zones), e.g., // America/New_York, Europe/Paris. If not provided, the time zone specified in // agent settings is used. string time_zone = 1; - // Optional. The geo location of this conversational query. + // The geo location of this conversational query. google.type.LatLng geo_location = 2; - // Optional. The collection of contexts to be activated before this query is + // The collection of contexts to be activated before this query is // executed. repeated Context contexts = 3; - // Optional. Specifies whether to delete all contexts in the current session + // Specifies whether to delete all contexts in the current session // before the new ones are activated. bool reset_contexts = 4; - // Optional. Additional session entity types to replace or extend developer + // Additional session entity types to replace or extend developer // entity types with. The entity synonyms apply to all languages and persist // for the session of this query. repeated SessionEntityType session_entity_types = 5; - // Optional. This field can be used to pass custom data into the webhook - // associated with the agent. Arbitrary JSON objects are supported. + // This field can be used to pass custom data to your webhook. + // Arbitrary JSON objects are supported. + // If supplied, the value is used to populate the + // `WebhookRequest.original_detect_intent_request.payload` + // field sent to your webhook. google.protobuf.Struct payload = 6; - // Optional. KnowledgeBases to get alternative results from. If not set, the + // KnowledgeBases to get alternative results from. If not set, the // KnowledgeBases enabled in the agent (through UI) will be used. // Format: `projects//knowledgeBases/`. repeated string knowledge_base_names = 12; - // Optional. Configures the type of sentiment analysis to perform. If not + // Configures the type of sentiment analysis to perform. If not // provided, sentiment analysis is not performed. // Note: Sentiment Analysis is only currently available for Enterprise Edition // agents. SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10; + + // For mega agent query, directly specify which sub agents to query. + // If any specified sub agent is not linked to the mega agent, an error will + // be returned. If empty, Dialogflow will decide which sub agents to query. + // If specified for a non-mega-agent query, will be silently ignored. + repeated SubAgent sub_agents = 13; + + // This field can be used to pass HTTP headers for a webhook + // call. These headers will be sent to webhook alone with the headers that + // have been configured through Dialogflow web console. The headers defined + // within this field will overwrite the headers configured through Dialogflow + // console if there is a conflict. Header names are case-insensitive. + // Google's specified headers are not allowed. Including: "Host", + // "Content-Length", "Connection", "From", "User-Agent", "Accept-Encoding", + // "If-Modified-Since", "If-None-Match", "X-Forwarded-For", etc. + map webhook_headers = 14; } // Represents the query input. It can contain either: @@ -237,6 +281,20 @@ message QueryResult { string action = 3; // The collection of extracted parameters. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value google.protobuf.Struct parameters = 4; // This field is set to: @@ -270,7 +328,7 @@ message QueryResult { // The intent that matched the conversational query. Some, not // all fields are filled in this message, including but not limited to: - // `name`, `display_name` and `webhook_state`. + // `name`, `display_name`, `end_interaction` and `is_fallback`. Intent intent = 11; // The intent detection confidence. Values range from 0.0 @@ -283,9 +341,13 @@ message QueryResult { // the greatest `knowledgeAnswers.match_confidence` value in the list. float intent_detection_confidence = 12; - // The free-form diagnostic info. For example, this field could contain - // webhook call latency. The string keys of the Struct's fields map can change - // without notice. + // Free-form diagnostic information for the associated detect intent request. + // The fields of this data can change without notice, so you should not write + // code that depends on its structure. + // The data may contain: + // + // - webhook call latency + // - webhook errors google.protobuf.Struct diagnostic_info = 14; // The sentiment analysis result, which depends on the @@ -320,7 +382,9 @@ message KnowledgeAnswers { // Indicates which Knowledge Document this answer was extracted from. // Format: `projects//knowledgeBases//documents/`. - string source = 1; + string source = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Document" + }]; // The corresponding FAQ question if the answer was extracted from a FAQ // Document, empty otherwise. @@ -354,16 +418,35 @@ message KnowledgeAnswers { } // The top-level message sent by the client to the -// `StreamingDetectIntent` method. +// [Sessions.StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent] method. // // Multiple request messages should be sent in order: // -// 1. The first message must contain `session`, `query_input` plus optionally -// `query_params`. If the client wants to receive an audio response, it -// should also contain `output_audio_config`. The message must not contain -// `input_audio`. -// 2. If `query_input` was set to a streaming input audio config, -// all subsequent messages must contain `input_audio`. Otherwise, finish the request stream. +// 1. The first message must contain +// [session][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.session], +// [query_input][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_input] plus optionally +// [query_params][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_params]. If the client +// wants to receive an audio response, it should also contain +// [output_audio_config][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.output_audio_config]. +// The message must not contain +// [input_audio][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.input_audio]. +// 2. If [query_input][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_input] was set to +// [query_input.audio_config][google.cloud.dialogflow.v2beta1.InputAudioConfig], all subsequent +// messages must contain +// [input_audio][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.input_audio] to continue with +// Speech recognition. +// If you decide to rather detect an intent from text input after you +// already started Speech recognition, please send a message with +// [query_input.text][google.cloud.dialogflow.v2beta1.QueryInput.text]. +// +// However, note that: +// +// * Dialogflow will bill you for the audio duration so far. +// * Dialogflow discards all Speech recognition results in favor of the +// input text. +// * Dialogflow will use the language code from the first message. +// +// After you sent all input, you must half-close or abort the request stream. message StreamingDetectIntentRequest { // Required. The name of the session the query is sent to. // Format of the session name: @@ -377,7 +460,7 @@ message StreamingDetectIntentRequest { // `User ID` must not exceed 36 characters. string session = 1; - // Optional. The parameters of this query. + // The parameters of this query. QueryParameters query_params = 2; // Required. The input specification. It can be set to: @@ -391,7 +474,7 @@ message StreamingDetectIntentRequest { QueryInput query_input = 3; // DEPRECATED. Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2beta1.InputAudioConfig.single_utterance] instead. - // Optional. If `false` (default), recognition does not cease until the + // If `false` (default), recognition does not cease until the // client closes the stream. // If `true`, the recognizer will detect a single spoken utterance in input // audio. Recognition ceases when it detects the audio's voice has @@ -401,12 +484,20 @@ message StreamingDetectIntentRequest { // This setting is ignored when `query_input` is a piece of text or an event. bool single_utterance = 4; - // Optional. Instructs the speech synthesizer how to generate the output + // Instructs the speech synthesizer how to generate the output // audio. If this field is not set and agent-level speech synthesizer is not // configured, no output audio is generated. OutputAudioConfig output_audio_config = 5; - // Optional. The input audio content to be recognized. Must be sent if + // Mask for [output_audio_config][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.output_audio_config] indicating which settings in this + // request-level config should override speech synthesizer settings defined at + // agent-level. + // + // If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.output_audio_config] replaces the agent-level + // config in its entirety. + google.protobuf.FieldMask output_audio_config_mask = 7; + + // The input audio content to be recognized. Must be sent if // `query_input` was set to a streaming input audio config. The complete audio // over all streaming messages must not exceed 1 minute. bytes input_audio = 6; @@ -581,7 +672,21 @@ message EventInput { // Required. The unique identifier of the event. string name = 1; - // Optional. The collection of parameters associated with the event. + // The collection of parameters associated with the event. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value google.protobuf.Struct parameters = 2; // Required. The language of this query. See [Language @@ -593,7 +698,7 @@ message EventInput { // Configures the types of sentiment analysis to perform. message SentimentAnalysisRequestConfig { - // Optional. Instructs the service to perform sentiment analysis on + // Instructs the service to perform sentiment analysis on // `query_text`. If not provided, sentiment analysis is not performed on // `query_text`. bool analyze_query_text_sentiment = 1; diff --git a/google/cloud/dialogflow/v2beta1/session_entity_type.proto b/google/cloud/dialogflow/v2beta1/session_entity_type.proto index a8bd153e4..90b8849a6 100644 --- a/google/cloud/dialogflow/v2beta1/session_entity_type.proto +++ b/google/cloud/dialogflow/v2beta1/session_entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -41,6 +40,10 @@ option objc_class_prefix = "DF"; // favorites, preferences, playlists, and so on. You can redefine a session // entity type at the session level. // +// Session entity methods do not work with Google Assistant integration. +// Contact Dialogflow support if you need to use session entities +// with Google Assistant integration. +// // For more information about entity types, see the // [Dialogflow // documentation](https://cloud.google.com/dialogflow/docs/entities-overview). @@ -51,22 +54,42 @@ service SessionEntityTypes { "https://www.googleapis.com/auth/dialogflow"; // Returns the list of all session entity types in the specified session. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. rpc ListSessionEntityTypes(ListSessionEntityTypesRequest) returns (ListSessionEntityTypesResponse) { option (google.api.http) = { get: "/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes" additional_bindings { get: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes" } + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes" + } + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes" + } }; } // Retrieves the specified session entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. rpc GetSessionEntityType(GetSessionEntityTypeRequest) returns (SessionEntityType) { option (google.api.http) = { get: "/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}" additional_bindings { get: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" } + additional_bindings { + get: "/v2beta1/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}" + } + additional_bindings { + get: "/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + } }; } @@ -74,6 +97,10 @@ service SessionEntityTypes { // // If the specified session entity type already exists, overrides the // session entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes" @@ -82,10 +109,22 @@ service SessionEntityTypes { post: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes" body: "session_entity_type" } + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes" + body: "session_entity_type" + } + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes" + body: "session_entity_type" + } }; } // Updates the specified session entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. rpc UpdateSessionEntityType(UpdateSessionEntityTypeRequest) returns (SessionEntityType) { option (google.api.http) = { patch: "/v2beta1/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}" @@ -94,24 +133,42 @@ service SessionEntityTypes { patch: "/v2beta1/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" body: "session_entity_type" } + additional_bindings { + patch: "/v2beta1/{session_entity_type.name=projects/*/locations/*/agent/sessions/*/entityTypes/*}" + body: "session_entity_type" + } + additional_bindings { + patch: "/v2beta1/{session_entity_type.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + body: "session_entity_type" + } }; } // Deletes the specified session entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. rpc DeleteSessionEntityType(DeleteSessionEntityTypeRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}" additional_bindings { delete: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" } + additional_bindings { + delete: "/v2beta1/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}" + } + additional_bindings { + delete: "/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + } }; } } // Represents a session entity type. // -// Extends or replaces a developer entity type at the user session level (we -// refer to the entity types defined at the agent level as "developer entity +// Extends or replaces a custom entity type at the user session level (we +// refer to the entity types defined at the agent level as "custom entity // types"). // // Note: session entity types apply to all queries, regardless of the language. @@ -122,17 +179,17 @@ message SessionEntityType { ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0; // The collection of session entities overrides the collection of entities - // in the corresponding developer entity type. + // in the corresponding custom entity type. ENTITY_OVERRIDE_MODE_OVERRIDE = 1; // The collection of session entities extends the collection of entities in - // the corresponding developer entity type. + // the corresponding custom entity type. // // Note: Even in this override mode calls to `ListSessionEntityTypes`, // `GetSessionEntityType`, `CreateSessionEntityType` and // `UpdateSessionEntityType` only return the additional entities added in // this session entity type. If you want to get the supplemented list, - // please call [EntityTypes.GetEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType] on the developer entity type + // please call [EntityTypes.GetEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType] on the custom entity type // and merge. ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; } @@ -150,7 +207,7 @@ message SessionEntityType { string name = 1; // Required. Indicates whether the additional data should override or - // supplement the developer entity type definition. + // supplement the custom entity type definition. EntityOverrideMode entity_override_mode = 2; // Required. The collection of entities associated with this session entity @@ -214,12 +271,7 @@ message CreateSessionEntityTypeRequest { // The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityType]. message UpdateSessionEntityTypeRequest { - // Required. The entity type to update. Format: - // `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' - // environment. If `User ID` is not specified, we assume default '-' user. + // Required. The session entity type to update. SessionEntityType session_entity_type = 1; // Optional. The mask to control which fields get updated. diff --git a/google/cloud/dialogflow/v2beta1/validation_result.proto b/google/cloud/dialogflow/v2beta1/validation_result.proto new file mode 100644 index 000000000..9ab491f7b --- /dev/null +++ b/google/cloud/dialogflow/v2beta1/validation_result.proto @@ -0,0 +1,76 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "ValidationResultProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Represents a single validation error. +message ValidationError { + // Represents a level of severity. + enum Severity { + // Not specified. This value should never be used. + SEVERITY_UNSPECIFIED = 0; + + // The agent doesn't follow Dialogflow best practicies. + INFO = 1; + + // The agent may not behave as expected. + WARNING = 2; + + // The agent may experience partial failures. + ERROR = 3; + + // The agent may completely fail. + CRITICAL = 4; + } + + // The severity of the error. + Severity severity = 1; + + // The names of the entries that the error is associated with. + // Format: + // + // - "projects//agent", if the error is associated with the entire + // agent. + // - "projects//agent/intents/", if the error is + // associated with certain intents. + // - "projects//agent/intents//trainingPhrases/", if the + // error is associated with certain intent training phrases. + // - "projects//agent/intents//parameters/", if the error is associated with certain intent parameters. + // - "projects//agent/entities/", if the error is + // associated with certain entities. + repeated string entries = 3; + + // The detailed error messsage. + string error_message = 4; +} + +// Represents the output of agent validation. +message ValidationResult { + // Contains all validation errors. + repeated ValidationError validation_errors = 1; +} diff --git a/google/cloud/dialogflow/v2beta1/webhook.proto b/google/cloud/dialogflow/v2beta1/webhook.proto index cdf630102..9e5d2a4c4 100644 --- a/google/cloud/dialogflow/v2beta1/webhook.proto +++ b/google/cloud/dialogflow/v2beta1/webhook.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -58,49 +57,56 @@ message WebhookRequest { } // The response message for a webhook call. +// +// This response is validated by the Dialogflow server. If validation fails, +// an error will be returned in the [QueryResult.diagnostic_info][google.cloud.dialogflow.v2beta1.QueryResult.diagnostic_info] field. +// Setting JSON fields to an empty value with the wrong type is a common error. +// To avoid this error: +// +// - Use `""` for empty strings +// - Use `{}` or `null` for empty objects +// - Use `[]` or `null` for empty arrays +// +// For more information, see the +// [Protocol Buffers Language +// Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). message WebhookResponse { - // Optional. The text to be shown on the screen. This value is passed directly - // to `QueryResult.fulfillment_text`. + // Optional. The text response message intended for the end-user. + // It is recommended to use `fulfillment_messages.text.text[0]` instead. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller. string fulfillment_text = 1; - // Optional. The collection of rich messages to present to the user. This - // value is passed directly to `QueryResult.fulfillment_messages`. + // Optional. The rich response messages intended for the end-user. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller. repeated Intent.Message fulfillment_messages = 2; - // Optional. This value is passed directly to `QueryResult.webhook_source`. + // Optional. A custom field used to identify the webhook source. + // Arbitrary strings are supported. + // When provided, Dialogflow uses this field to populate + // [QueryResult.webhook_source][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller. string source = 3; - // Optional. This value is passed directly to `QueryResult.webhook_payload`. - // See the related `fulfillment_messages[i].payload field`, which may be used - // as an alternative to this field. - // - // This field can be used for Actions on Google responses. - // It should have a structure similar to the JSON message shown here. For more - // information, see - // [Actions on Google Webhook - // Format](https://developers.google.com/actions/dialogflow/webhook) - //
{
-  //   "google": {
-  //     "expectUserResponse": true,
-  //     "richResponse": {
-  //       "items": [
-  //         {
-  //           "simpleResponse": {
-  //             "textToSpeech": "this is a simple response"
-  //           }
-  //         }
-  //       ]
-  //     }
-  //   }
-  // }
+ // Optional. This field can be used to pass custom data from your webhook to the + // integration or API caller. Arbitrary JSON objects are supported. + // When provided, Dialogflow uses this field to populate + // [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller. + // This field is also used by the + // [Google Assistant + // integration](https://cloud.google.com/dialogflow/docs/integrations/aog) + // for rich response messages. + // See the format definition at [Google Assistant Dialogflow webhook + // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) google.protobuf.Struct payload = 4; - // Optional. The collection of output contexts. This value is passed directly - // to `QueryResult.output_contexts`. + // Optional. The collection of output contexts that will overwrite currently + // active contexts for the session and reset their lifespans. + // When provided, Dialogflow uses this field to populate + // [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller. repeated Context output_contexts = 5; - // Optional. Makes the platform immediately invoke another `DetectIntent` call - // internally with the specified event as input. + // Optional. Invokes the supplied events. // When this field is set, Dialogflow ignores the `fulfillment_text`, // `fulfillment_messages`, and `payload` fields. EventInput followup_event_input = 6; @@ -109,6 +115,13 @@ message WebhookResponse { // (e.g., Actions on Google or Dialogflow phone gateway) use this information // to close interaction with an end user. Default is false. bool end_interaction = 8; + + // Optional. Additional session entity types to replace or extend developer + // entity types with. The entity synonyms apply to all languages and persist + // for the session. Setting this data from a webhook overwrites + // the session entity types that have been set using `detectIntent`, + // `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods. + repeated SessionEntityType session_entity_types = 10; } // Represents the contents of the original request that was passed to @@ -126,7 +139,8 @@ message OriginalDetectIntentRequest { // field passed in the request. Some integrations that query a Dialogflow // agent may provide additional information in the payload. // - // In particular for the Telephony Gateway this field has the form: + // In particular, for the Dialogflow Phone Gateway integration, this field has + // the form: //
{
   //  "telephony": {
   //    "caller_id": "+18558363987"
diff --git a/google/cloud/documentai/BUILD.bazel b/google/cloud/documentai/BUILD.bazel
new file mode 100644
index 000000000..a87c57fec
--- /dev/null
+++ b/google/cloud/documentai/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"]))
diff --git a/google/cloud/texttospeech/artman_texttospeech.yaml b/google/cloud/documentai/artman_documentai_v1beta1.yaml
similarity index 78%
rename from google/cloud/texttospeech/artman_texttospeech.yaml
rename to google/cloud/documentai/artman_documentai_v1beta1.yaml
index 83b8d2fd2..ae8ab02fc 100644
--- a/google/cloud/texttospeech/artman_texttospeech.yaml
+++ b/google/cloud/documentai/artman_documentai_v1beta1.yaml
@@ -1,13 +1,13 @@
 common:
-  api_name: texttospeech
+  api_name: documentai
   api_version: v1beta1
   organization_name: google-cloud
   proto_deps:
-    - name: google-common-protos
+  - name: google-common-protos
   src_proto_paths:
   - v1beta1
-  service_yaml: tts.yaml
-  gapic_yaml: v1beta1/texttospeech_gapic.yaml
+  service_yaml: documentai_v1beta1.yaml
+  gapic_yaml: v1beta1/documentai_gapic.yaml
 artifacts:
 - name: gapic_config
   type: GAPIC_CONFIG
diff --git a/google/cloud/documentai/documentai_v1beta1.yaml b/google/cloud/documentai/documentai_v1beta1.yaml
new file mode 100644
index 000000000..78865689c
--- /dev/null
+++ b/google/cloud/documentai/documentai_v1beta1.yaml
@@ -0,0 +1,29 @@
+type: google.api.Service
+config_version: 3
+name: documentai.googleapis.com
+title: Cloud Document AI API
+
+apis:
+- name: google.cloud.documentai.v1beta1.DocumentUnderstandingService
+
+types:
+- name: google.cloud.documentai.v1beta1.BatchProcessDocumentsResponse
+- name: google.cloud.documentai.v1beta1.Document
+- name: google.cloud.documentai.v1beta1.OperationMetadata
+
+documentation:
+  summary: |-
+    Service to parse structured information from unstructured or
+    semi-structured documents using state-of-the-art Google AI such as natural
+    language, computer vision, translation, and AutoML.
+
+authentication:
+  rules:
+  - selector: google.cloud.documentai.v1beta1.DocumentUnderstandingService.BatchProcessDocuments
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
+  - selector: 'google.longrunning.Operations.*'
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/documentai/v1beta1/BUILD.bazel b/google/cloud/documentai/v1beta1/BUILD.bazel
new file mode 100644
index 000000000..2c499ccd4
--- /dev/null
+++ b/google/cloud/documentai/v1beta1/BUILD.bazel
@@ -0,0 +1,371 @@
+# This file was automatically generated by BuildFileGenerator
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
+
+proto_library(
+    name = "documentai_proto",
+    srcs = [
+        "document.proto",
+        "document_understanding.proto",
+        "geometry.proto",
+    ],
+    deps = [
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/longrunning:operations_proto",
+        "//google/rpc:status_proto",
+        "//google/type:color_proto",
+        "@com_google_protobuf//:timestamp_proto",
+    ],
+)
+
+proto_library_with_info(
+    name = "documentai_proto_with_info",
+    deps = [
+        ":documentai_proto",
+        "//google/cloud:common_resources_proto",
+    ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "java_gapic_assembly_gradle_pkg",
+    "java_gapic_library",
+    "java_gapic_test",
+    "java_grpc_library",
+    "java_proto_library",
+)
+
+java_proto_library(
+    name = "documentai_java_proto",
+    deps = [":documentai_proto"],
+)
+
+java_grpc_library(
+    name = "documentai_java_grpc",
+    srcs = [":documentai_proto"],
+    deps = [":documentai_java_proto"],
+)
+
+java_gapic_library(
+    name = "documentai_java_gapic",
+    src = ":documentai_proto_with_info",
+    gapic_yaml = "documentai_gapic.yaml",
+    package = "google.cloud.documentai.v1beta1",
+    service_yaml = "//google/cloud/documentai:documentai_v1beta1.yaml",
+    test_deps = [
+        ":documentai_java_grpc",
+    ],
+    deps = [
+        ":documentai_java_proto",
+    ],
+)
+
+java_gapic_test(
+    name = "documentai_java_gapic_test_suite",
+    test_classes = [
+        "com.google.cloud.documentai.v1beta1.DocumentUnderstandingServiceClientTest",
+    ],
+    runtime_deps = [":documentai_java_gapic_test"],
+)
+
+# Open Source Packages
+java_gapic_assembly_gradle_pkg(
+    name = "google-cloud-documentai-v1beta1-java",
+    deps = [
+        ":documentai_java_gapic",
+        ":documentai_java_grpc",
+        ":documentai_java_proto",
+        ":documentai_proto",
+    ],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "go_gapic_assembly_pkg",
+    "go_gapic_library",
+    "go_proto_library",
+    "go_test",
+)
+
+go_proto_library(
+    name = "documentai_go_proto",
+    compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+    importpath = "google.golang.org/genproto/googleapis/cloud/documentai/v1beta1",
+    protos = [":documentai_proto"],
+    deps = [
+        "//google/api:annotations_go_proto",
+        "//google/longrunning:longrunning_go_proto",
+        "//google/rpc:status_go_proto",
+        "//google/type:color_go_proto",
+    ],
+)
+
+go_gapic_library(
+    name = "documentai_go_gapic",
+    srcs = [":documentai_proto_with_info"],
+    grpc_service_config = "documentai_grpc_service_config.json",
+    importpath = "cloud.google.com/go/documentai/apiv1beta1;documentai",
+    service_yaml = "//google/cloud/documentai:documentai_v1beta1.yaml",
+    deps = [
+        ":documentai_go_proto",
+        "//google/longrunning:longrunning_go_gapic",
+        "//google/longrunning:longrunning_go_proto",
+        "@com_google_cloud_go//longrunning:go_default_library",
+        "@com_google_cloud_go//longrunning/autogen:go_default_library",
+    ],
+)
+
+go_test(
+    name = "documentai_go_gapic_test",
+    srcs = [":documentai_go_gapic_srcjar_test"],
+    embed = [":documentai_go_gapic"],
+    importpath = "cloud.google.com/go/documentai/apiv1beta1",
+)
+
+# Open Source Packages
+go_gapic_assembly_pkg(
+    name = "gapi-cloud-documentai-v1beta1-go",
+    deps = [
+        ":documentai_go_gapic",
+        ":documentai_go_gapic_srcjar-test.srcjar",
+        ":documentai_go_proto",
+    ],
+)
+
+##############################################################################
+# Python
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "moved_proto_library",
+    "py_gapic_assembly_pkg",
+    "py_gapic_library",
+    "py_grpc_library",
+    "py_proto_library",
+)
+
+moved_proto_library(
+    name = "documentai_moved_proto",
+    srcs = [":documentai_proto"],
+    deps = [
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/longrunning:operations_proto",
+        "//google/rpc:status_proto",
+        "//google/type:color_proto",
+        "@com_google_protobuf//:timestamp_proto",
+    ],
+)
+
+py_proto_library(
+    name = "documentai_py_proto",
+    plugin = "@protoc_docs_plugin//:docs_plugin",
+    deps = [":documentai_moved_proto"],
+)
+
+py_grpc_library(
+    name = "documentai_py_grpc",
+    srcs = [":documentai_moved_proto"],
+    deps = [":documentai_py_proto"],
+)
+
+py_gapic_library(
+    name = "documentai_py_gapic",
+    src = ":documentai_proto_with_info",
+    gapic_yaml = "documentai_gapic.yaml",
+    package = "google.cloud.documentai.v1beta1",
+    service_yaml = "//google/cloud/documentai:documentai_v1beta1.yaml",
+    deps = [
+        ":documentai_py_grpc",
+        ":documentai_py_proto",
+    ],
+)
+
+# Open Source Packages
+py_gapic_assembly_pkg(
+    name = "documentai-v1beta1-py",
+    deps = [
+        ":documentai_py_gapic",
+        ":documentai_py_grpc",
+        ":documentai_py_proto",
+    ],
+)
+
+##############################################################################
+# PHP
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "php_gapic_assembly_pkg",
+    "php_gapic_library",
+    "php_grpc_library",
+    "php_proto_library",
+)
+
+php_proto_library(
+    name = "documentai_php_proto",
+    deps = [":documentai_proto"],
+)
+
+php_grpc_library(
+    name = "documentai_php_grpc",
+    srcs = [":documentai_proto"],
+    deps = [":documentai_php_proto"],
+)
+
+php_gapic_library(
+    name = "documentai_php_gapic",
+    src = ":documentai_proto_with_info",
+    gapic_yaml = "documentai_gapic.yaml",
+    package = "google.cloud.documentai.v1beta1",
+    service_yaml = "//google/cloud/documentai:documentai_v1beta1.yaml",
+    deps = [
+        ":documentai_php_grpc",
+        ":documentai_php_proto",
+    ],
+)
+
+# Open Source Packages
+php_gapic_assembly_pkg(
+    name = "google-cloud-documentai-v1beta1-php",
+    deps = [
+        ":documentai_php_gapic",
+        ":documentai_php_grpc",
+        ":documentai_php_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)
+
+nodejs_gapic_library(
+    name = "documentai_nodejs_gapic",
+    src = ":documentai_proto_with_info",
+    gapic_yaml = "documentai_gapic.yaml",
+    package = "google.cloud.documentai.v1beta1",
+    service_yaml = "//google/cloud/documentai:documentai_v1beta1.yaml",
+    deps = [],
+)
+
+nodejs_gapic_assembly_pkg(
+    name = "documentai-v1beta1-nodejs",
+    deps = [
+        ":documentai_nodejs_gapic",
+        ":documentai_proto",
+    ],
+)
+
+##############################################################################
+# Ruby
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "ruby_gapic_assembly_pkg",
+    "ruby_gapic_library",
+    "ruby_grpc_library",
+    "ruby_proto_library",
+)
+
+ruby_proto_library(
+    name = "documentai_ruby_proto",
+    deps = [":documentai_proto"],
+)
+
+ruby_grpc_library(
+    name = "documentai_ruby_grpc",
+    srcs = [":documentai_proto"],
+    deps = [":documentai_ruby_proto"],
+)
+
+ruby_gapic_library(
+    name = "documentai_ruby_gapic",
+    src = ":documentai_proto_with_info",
+    gapic_yaml = "documentai_gapic.yaml",
+    package = "google.cloud.documentai.v1beta1",
+    service_yaml = "//google/cloud/documentai:documentai_v1beta1.yaml",
+    deps = [
+        ":documentai_ruby_grpc",
+        ":documentai_ruby_proto",
+    ],
+)
+
+# Open Source Packages
+ruby_gapic_assembly_pkg(
+    name = "google-cloud-documentai-v1beta1-ruby",
+    deps = [
+        ":documentai_ruby_gapic",
+        ":documentai_ruby_grpc",
+        ":documentai_ruby_proto",
+    ],
+)
+
+##############################################################################
+# C#
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "csharp_gapic_assembly_pkg",
+    "csharp_gapic_library",
+    "csharp_grpc_library",
+    "csharp_proto_library",
+)
+
+csharp_proto_library(
+    name = "documentai_csharp_proto",
+    deps = [":documentai_proto"],
+)
+
+csharp_grpc_library(
+    name = "documentai_csharp_grpc",
+    srcs = [":documentai_proto"],
+    deps = [":documentai_csharp_proto"],
+)
+
+csharp_gapic_library(
+    name = "documentai_csharp_gapic",
+    src = ":documentai_proto_with_info",
+    gapic_yaml = "documentai_gapic.yaml",
+    package = "google.cloud.documentai.v1beta1",
+    service_yaml = "//google/cloud/documentai:documentai_v1beta1.yaml",
+    deps = [
+        ":documentai_csharp_grpc",
+        ":documentai_csharp_proto",
+    ],
+)
+
+# Open Source Packages
+csharp_gapic_assembly_pkg(
+    name = "google-cloud-documentai-v1beta1-csharp",
+    deps = [
+        ":documentai_csharp_gapic",
+        ":documentai_csharp_grpc",
+        ":documentai_csharp_proto",
+    ],
+)
+
+##############################################################################
+# C++
+##############################################################################
+# Put your C++ rules here
diff --git a/google/cloud/documentai/v1beta1/document.proto b/google/cloud/documentai/v1beta1/document.proto
new file mode 100644
index 000000000..1303c32dd
--- /dev/null
+++ b/google/cloud/documentai/v1beta1/document.proto
@@ -0,0 +1,446 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.documentai.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/documentai/v1beta1/geometry.proto";
+import "google/rpc/status.proto";
+import "google/type/color.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/documentai/v1beta1;documentai";
+option java_multiple_files = true;
+option java_outer_classname = "DocumentProto";
+option java_package = "com.google.cloud.documentai.v1beta1";
+
+// Document represents the canonical document resource in Document Understanding
+// AI.
+// It is an interchange format that provides insights into documents and allows
+// for collaboration between users and Document Understanding AI to iterate and
+// optimize for quality.
+message Document {
+  // For a large document, sharding may be performed to produce several
+  // document shards. Each document shard contains this field to detail which
+  // shard it is.
+  message ShardInfo {
+    // The 0-based index of this shard.
+    int64 shard_index = 1;
+
+    // Total number of shards.
+    int64 shard_count = 2;
+
+    // The index of the first character in
+    // [Document.text][google.cloud.documentai.v1beta1.Document.text] in the
+    // overall document global text.
+    int64 text_offset = 3;
+  }
+
+  // Annotation for common text style attributes. This adheres to CSS
+  // conventions as much as possible.
+  message Style {
+    // Font size with unit.
+    message FontSize {
+      // Font size for the text.
+      float size = 1;
+
+      // Unit for the font size. Follows CSS naming (in, px, pt, etc.).
+      string unit = 2;
+    }
+
+    // Text anchor indexing into the
+    // [Document.text][google.cloud.documentai.v1beta1.Document.text].
+    TextAnchor text_anchor = 1;
+
+    // Text color.
+    google.type.Color color = 2;
+
+    // Text background color.
+    google.type.Color background_color = 3;
+
+    // Font weight. Possible values are normal, bold, bolder, and lighter.
+    // https://www.w3schools.com/cssref/pr_font_weight.asp
+    string font_weight = 4;
+
+    // Text style. Possible values are normal, italic, and oblique.
+    // https://www.w3schools.com/cssref/pr_font_font-style.asp
+    string text_style = 5;
+
+    // Text decoration. Follows CSS standard.
+    //   
+    // https://www.w3schools.com/cssref/pr_text_text-decoration.asp
+    string text_decoration = 6;
+
+    // Font size.
+    FontSize font_size = 7;
+  }
+
+  // A page in a [Document][google.cloud.documentai.v1beta1.Document].
+  message Page {
+    // Dimension for the page.
+    message Dimension {
+      // Page width.
+      float width = 1;
+
+      // Page height.
+      float height = 2;
+
+      // Dimension unit.
+      string unit = 3;
+    }
+
+    // Visual element describing a layout unit on a page.
+    message Layout {
+      // Detected human reading orientation.
+      enum Orientation {
+        // Unspecified orientation.
+        ORIENTATION_UNSPECIFIED = 0;
+
+        // Orientation is aligned with page up.
+        PAGE_UP = 1;
+
+        // Orientation is aligned with page right.
+        // Turn the head 90 degrees clockwise from upright to read.
+        PAGE_RIGHT = 2;
+
+        // Orientation is aligned with page down.
+        // Turn the head 180 degrees from upright to read.
+        PAGE_DOWN = 3;
+
+        // Orientation is aligned with page left.
+        // Turn the head 90 degrees counterclockwise from upright to read.
+        PAGE_LEFT = 4;
+      }
+
+      // Text anchor indexing into the
+      // [Document.text][google.cloud.documentai.v1beta1.Document.text].
+      TextAnchor text_anchor = 1;
+
+      // Confidence of the current
+      // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] within
+      // context of the object this layout is for. e.g. confidence can be for a
+      // single token, a table, a visual element, etc. depending on context.
+      // Range [0, 1].
+      float confidence = 2;
+
+      // The bounding polygon for the
+      // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout].
+      BoundingPoly bounding_poly = 3;
+
+      // Detected orientation for the
+      // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout].
+      Orientation orientation = 4;
+    }
+
+    // A block has a set of lines (collected into paragraphs) that have a
+    // common line-spacing and orientation.
+    message Block {
+      // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for
+      // [Block][google.cloud.documentai.v1beta1.Document.Page.Block].
+      Layout layout = 1;
+
+      // A list of detected languages together with confidence.
+      repeated DetectedLanguage detected_languages = 2;
+    }
+
+    // A collection of lines that a human would perceive as a paragraph.
+    message Paragraph {
+      // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for
+      // [Paragraph][google.cloud.documentai.v1beta1.Document.Page.Paragraph].
+      Layout layout = 1;
+
+      // A list of detected languages together with confidence.
+      repeated DetectedLanguage detected_languages = 2;
+    }
+
+    // A collection of tokens that a human would perceive as a line.
+    // Does not cross column boundaries, can be horizontal, vertical, etc.
+    message Line {
+      // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for
+      // [Line][google.cloud.documentai.v1beta1.Document.Page.Line].
+      Layout layout = 1;
+
+      // A list of detected languages together with confidence.
+      repeated DetectedLanguage detected_languages = 2;
+    }
+
+    // A detected token.
+    message Token {
+      // Detected break at the end of a
+      // [Token][google.cloud.documentai.v1beta1.Document.Page.Token].
+      message DetectedBreak {
+        // Enum to denote the type of break found.
+        enum Type {
+          // Unspecified break type.
+          TYPE_UNSPECIFIED = 0;
+
+          // A single whitespace.
+          SPACE = 1;
+
+          // A wider whitespace.
+          WIDE_SPACE = 2;
+
+          // A hyphen that indicates that a token has been split across lines.
+          HYPHEN = 3;
+        }
+
+        // Detected break type.
+        Type type = 1;
+      }
+
+      // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for
+      // [Token][google.cloud.documentai.v1beta1.Document.Page.Token].
+      Layout layout = 1;
+
+      // Detected break at the end of a
+      // [Token][google.cloud.documentai.v1beta1.Document.Page.Token].
+      DetectedBreak detected_break = 2;
+
+      // A list of detected languages together with confidence.
+      repeated DetectedLanguage detected_languages = 3;
+    }
+
+    // Detected non-text visual elements e.g. checkbox, signature etc. on the
+    // page.
+    message VisualElement {
+      // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for
+      // [Token][google.cloud.documentai.v1beta1.Document.Page.Token].
+      Layout layout = 1;
+
+      // Type of the
+      // [VisualElement][google.cloud.documentai.v1beta1.Document.Page.VisualElement].
+      string type = 2;
+
+      // A list of detected languages together with confidence.
+      repeated DetectedLanguage detected_languages = 3;
+    }
+
+    // A table representation similar to HTML table structure.
+    message Table {
+      // A row of table cells.
+      message TableRow {
+        // Cells that make up this row.
+        repeated TableCell cells = 1;
+      }
+
+      // A cell representation inside the table.
+      message TableCell {
+        // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for
+        // [TableCell][google.cloud.documentai.v1beta1.Document.Page.Table.TableCell].
+        Layout layout = 1;
+
+        // How many rows this cell spans.
+        int32 row_span = 2;
+
+        // How many columns this cell spans.
+        int32 col_span = 3;
+
+        // A list of detected languages together with confidence.
+        repeated DetectedLanguage detected_languages = 4;
+      }
+
+      // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for
+      // [Table][google.cloud.documentai.v1beta1.Document.Page.Table].
+      Layout layout = 1;
+
+      // Header rows of the table.
+      repeated TableRow header_rows = 2;
+
+      // Body rows of the table.
+      repeated TableRow body_rows = 3;
+
+      // A list of detected languages together with confidence.
+      repeated DetectedLanguage detected_languages = 4;
+    }
+
+    // A form field detected on the page.
+    message FormField {
+      // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for the
+      // [FormField][google.cloud.documentai.v1beta1.Document.Page.FormField]
+      // name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+      Layout field_name = 1;
+
+      // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for the
+      // [FormField][google.cloud.documentai.v1beta1.Document.Page.FormField]
+      // value.
+      Layout field_value = 2;
+
+      // A list of detected languages for name together with confidence.
+      repeated DetectedLanguage name_detected_languages = 3;
+
+      // A list of detected languages for value together with confidence.
+      repeated DetectedLanguage value_detected_languages = 4;
+    }
+
+    // Detected language for a structural component.
+    message DetectedLanguage {
+      // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+      // information, see
+      // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+      string language_code = 1;
+
+      // Confidence of detected language. Range [0, 1].
+      float confidence = 2;
+    }
+
+    // 1-based index for current
+    // [Page][google.cloud.documentai.v1beta1.Document.Page] in a parent
+    // [Document][google.cloud.documentai.v1beta1.Document]. Useful when a page
+    // is taken out of a [Document][google.cloud.documentai.v1beta1.Document]
+    // for individual processing.
+    int32 page_number = 1;
+
+    // Physical dimension of the page.
+    Dimension dimension = 2;
+
+    // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for the
+    // page.
+    Layout layout = 3;
+
+    // A list of detected languages together with confidence.
+    repeated DetectedLanguage detected_languages = 4;
+
+    // A list of visually detected text blocks on the page.
+    // A block has a set of lines (collected into paragraphs) that have a common
+    // line-spacing and orientation.
+    repeated Block blocks = 5;
+
+    // A list of visually detected text paragraphs on the page.
+    // A collection of lines that a human would perceive as a paragraph.
+    repeated Paragraph paragraphs = 6;
+
+    // A list of visually detected text lines on the page.
+    // A collection of tokens that a human would perceive as a line.
+    repeated Line lines = 7;
+
+    // A list of visually detected tokens on the page.
+    repeated Token tokens = 8;
+
+    // A list of detected non-text visual elements e.g. checkbox,
+    // signature etc. on the page.
+    repeated VisualElement visual_elements = 9;
+
+    // A list of visually detected tables on the page.
+    repeated Table tables = 10;
+
+    // A list of visually detected form fields on the page.
+    repeated FormField form_fields = 11;
+  }
+
+  // A phrase in the text that is a known entity type, such as a person, an
+  // organization, or location.
+  message Entity {
+    // Provenance of the entity.
+    // Text anchor indexing into the
+    // [Document.text][google.cloud.documentai.v1beta1.Document.text].
+    TextAnchor text_anchor = 1;
+
+    // Entity type from a schema e.g. `Address`.
+    string type = 2;
+
+    // Text value in the document e.g. `1600 Amphitheatre Pkwy`.
+    string mention_text = 3;
+
+    // Canonical mention name. This will be a unique value in the entity list
+    // for this document.
+    string mention_id = 4;
+  }
+
+  // Relationship between
+  // [Entities][google.cloud.documentai.v1beta1.Document.Entity].
+  message EntityRelation {
+    // Subject entity mention_id.
+    string subject_id = 1;
+
+    // Object entity mention_id.
+    string object_id = 2;
+
+    // Relationship description.
+    string relation = 3;
+  }
+
+  // Text reference indexing into the
+  // [Document.text][google.cloud.documentai.v1beta1.Document.text].
+  message TextAnchor {
+    // A text segment in the
+    // [Document.text][google.cloud.documentai.v1beta1.Document.text]. The
+    // indices may be out of bounds which indicate that the text extends into
+    // another document shard for large sharded documents. See
+    // [ShardInfo.text_offset][google.cloud.documentai.v1beta1.Document.ShardInfo.text_offset]
+    message TextSegment {
+      // [TextSegment][google.cloud.documentai.v1beta1.Document.TextAnchor.TextSegment]
+      // start UTF-8 char index in the
+      // [Document.text][google.cloud.documentai.v1beta1.Document.text].
+      int64 start_index = 1;
+
+      // [TextSegment][google.cloud.documentai.v1beta1.Document.TextAnchor.TextSegment]
+      // half open end UTF-8 char index in the
+      // [Document.text][google.cloud.documentai.v1beta1.Document.text].
+      int64 end_index = 2;
+    }
+
+    // The text segments from the
+    // [Document.text][google.cloud.documentai.v1beta1.Document.text].
+    repeated TextSegment text_segments = 1;
+  }
+
+  // Original source document from the user.
+  oneof source {
+    // Currently supports Google Cloud Storage URI of the form
+    //    `gs://bucket_name/object_name`. Object versioning is not supported.
+    //    See [Google Cloud Storage Request
+    //    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+    //    info.
+    string uri = 1;
+
+    // Inline document content, represented as a stream of bytes.
+    // Note: As with all `bytes` fields, protobuffers use a pure binary
+    // representation, whereas JSON representations use base64.
+    bytes content = 2;
+  }
+
+  // An IANA published MIME type (also referred to as media type). For more
+  // information, see
+  // https://www.iana.org/assignments/media-types/media-types.xhtml.
+  string mime_type = 3;
+
+  // UTF-8 encoded text in reading order from the document.
+  string text = 4;
+
+  // Styles for the
+  // [Document.text][google.cloud.documentai.v1beta1.Document.text].
+  repeated Style text_styles = 5;
+
+  // Visual page layout for the
+  // [Document][google.cloud.documentai.v1beta1.Document].
+  repeated Page pages = 6;
+
+  // A list of entities detected on
+  // [Document.text][google.cloud.documentai.v1beta1.Document.text]. For
+  // document shards, entities in this list may cross shard boundaries.
+  repeated Entity entities = 7;
+
+  // Relationship among
+  // [Document.entities][google.cloud.documentai.v1beta1.Document.entities].
+  repeated EntityRelation entity_relations = 8;
+
+  // Information about the sharding if this document is sharded part of a larger
+  // document. If the document is not sharded, this message is not specified.
+  ShardInfo shard_info = 9;
+
+  // Any error that occurred while processing this document.
+  google.rpc.Status error = 10;
+}
diff --git a/google/cloud/documentai/v1beta1/document_understanding.proto b/google/cloud/documentai/v1beta1/document_understanding.proto
new file mode 100644
index 000000000..4f8dfb722
--- /dev/null
+++ b/google/cloud/documentai/v1beta1/document_understanding.proto
@@ -0,0 +1,299 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.documentai.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/cloud/documentai/v1beta1/geometry.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/documentai/v1beta1;documentai";
+option java_multiple_files = true;
+option java_outer_classname = "DocumentAiProto";
+option java_package = "com.google.cloud.documentai.v1beta1";
+
+// Service to parse structured information from unstructured or semi-structured
+// documents using state-of-the-art Google AI such as natural language,
+// computer vision, and translation.
+service DocumentUnderstandingService {
+  option (google.api.default_host) = "documentai.googleapis.com";
+  option (google.api.oauth_scopes) =
+      "https://www.googleapis.com/auth/cloud-platform";
+
+  // LRO endpoint to batch process many documents.
+  rpc BatchProcessDocuments(BatchProcessDocumentsRequest)
+      returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      post: "/v1beta1/{parent=projects/*/locations/*}/documents:batchProcess"
+      body: "*"
+      additional_bindings {
+        post: "/v1beta1/{parent=projects/*}/documents:batchProcess"
+        body: "*"
+      }
+    };
+    option (google.api.method_signature) = "requests";
+    option (google.longrunning.operation_info) = {
+      response_type: "BatchProcessDocumentsResponse"
+      metadata_type: "OperationMetadata"
+    };
+  }
+}
+
+// Request to batch process documents as an asynchronous operation.
+message BatchProcessDocumentsRequest {
+  // Required. Individual requests for each document.
+  repeated ProcessDocumentRequest requests = 1
+      [(google.api.field_behavior) = REQUIRED];
+
+  // Target project and location to make a call.
+  //
+  // Format: `projects/{project-id}/locations/{location-id}`.
+  //
+  // If no location is specified, a region will be chosen automatically.
+  string parent = 2;
+}
+
+// Request to process one document.
+message ProcessDocumentRequest {
+  // Required. Information about the input file.
+  InputConfig input_config = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The desired output location.
+  OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Specifies a known document type for deeper structure detection. Valid
+  // values are currently "general" and "invoice". If not provided, "general"\
+  // is used as default. If any other value is given, the request is rejected.
+  string document_type = 3;
+
+  // Controls table extraction behavior. If not specified, the system will
+  // decide reasonable defaults.
+  TableExtractionParams table_extraction_params = 4;
+
+  // Controls form extraction behavior. If not specified, the system will
+  // decide reasonable defaults.
+  FormExtractionParams form_extraction_params = 5;
+
+  // Controls entity extraction behavior. If not specified, the system will
+  // decide reasonable defaults.
+  EntityExtractionParams entity_extraction_params = 6;
+
+  // Controls OCR behavior. If not specified, the system will decide reasonable
+  // defaults.
+  OcrParams ocr_params = 7;
+}
+
+// Response to an batch document processing request. This is returned in
+// the LRO Operation after the operation is complete.
+message BatchProcessDocumentsResponse {
+  // Responses for each individual document.
+  repeated ProcessDocumentResponse responses = 1;
+}
+
+// Response to a single document processing request.
+message ProcessDocumentResponse {
+  // Information about the input file. This is the same as the corresponding
+  // input config in the request.
+  InputConfig input_config = 1;
+
+  // The output location of the parsed responses. The responses are written to
+  // this location as JSON-serialized `Document` objects.
+  OutputConfig output_config = 2;
+}
+
+// Parameters to control Optical Character Recognition (OCR) behavior.
+message OcrParams {
+  // List of languages to use for OCR. In most cases, an empty value
+  // yields the best results since it enables automatic language detection. For
+  // languages based on the Latin alphabet, setting `language_hints` is not
+  // needed. In rare cases, when the language of the text in the image is known,
+  // setting a hint will help get better results (although it will be a
+  // significant hindrance if the hint is wrong). Document processing returns an
+  // error if one or more of the specified languages is not one of the
+  // supported languages.
+  repeated string language_hints = 1;
+}
+
+// Parameters to control table extraction behavior.
+message TableExtractionParams {
+  // Whether to enable table extraction.
+  bool enabled = 1;
+
+  // Optional. Table bounding box hints that can be provided to complex cases
+  // which our algorithm cannot locate the table(s) in.
+  repeated TableBoundHint table_bound_hints = 2
+      [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Table header hints. The extraction will bias towards producing
+  // these terms as table headers, which may improve accuracy.
+  repeated string header_hints = 3 [(google.api.field_behavior) = OPTIONAL];
+
+  // Model version of the table extraction system. Default is "builtin/stable".
+  // Specify "builtin/latest" for the latest model.
+  string model_version = 4;
+}
+
+// A hint for a table bounding box on the page for table parsing.
+message TableBoundHint {
+  // Optional. Page number for multi-paged inputs this hint applies to. If not
+  // provided, this hint will apply to all pages by default. This value is
+  // 1-based.
+  int32 page_number = 1 [(google.api.field_behavior) = OPTIONAL];
+
+  // Bounding box hint for a table on this page. The coordinates must be
+  // normalized to [0,1] and the bounding box must be an axis-aligned rectangle.
+  BoundingPoly bounding_box = 2;
+}
+
+// Parameters to control form extraction behavior.
+message FormExtractionParams {
+  // Whether to enable form extraction.
+  bool enabled = 1;
+
+  // User can provide pairs of (key text, value type) to improve the parsing
+  // result.
+  //
+  // For example, if a document has a field called "Date" that holds a date
+  // value and a field called "Amount" that may hold either a currency value
+  // (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
+  // following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
+  // "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
+  //
+  // If the value type is unknown, but you want to provide hints for the keys,
+  // you can leave the value_types field blank. e.g. {"key": "Date",
+  // "value_types": []}
+  repeated KeyValuePairHint key_value_pair_hints = 2;
+
+  // Model version of the form extraction system. Default is
+  // "builtin/stable". Specify "builtin/latest" for the latest model.
+  string model_version = 3;
+}
+
+// User-provided hint for key value pair.
+message KeyValuePairHint {
+  // The key text for the hint.
+  string key = 1;
+
+  // Type of the value. This is case-insensitive, and could be one of:
+  // ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER,
+  // ID, NUMBER, EMAIL, PRICE, TERMS, DATE, NAME. Types not in this list will
+  // be ignored.
+  repeated string value_types = 2;
+}
+
+// Parameters to control entity extraction behavior.
+message EntityExtractionParams {
+  // Whether to enable entity extraction.
+  bool enabled = 1;
+
+  // Model version of the entity extraction. Default is
+  // "builtin/stable". Specify "builtin/latest" for the latest model.
+  string model_version = 2;
+}
+
+// The desired input location and metadata.
+message InputConfig {
+  // Required.
+  oneof source {
+    // The Google Cloud Storage location to read the input from. This must be a
+    // single file.
+    GcsSource gcs_source = 1;
+  }
+
+  // Required. Mimetype of the input. Current supported mimetypes are
+  // application/pdf, image/tiff, and image/gif.
+  string mime_type = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// The desired output location and metadata.
+message OutputConfig {
+  // Required.
+  oneof destination {
+    // The Google Cloud Storage location to write the output to.
+    GcsDestination gcs_destination = 1;
+  }
+
+  // The max number of pages to include into each output Document shard JSON on
+  // Google Cloud Storage.
+  //
+  // The valid range is [1, 100]. If not specified, the default value is 20.
+  //
+  // For example, for one pdf file with 100 pages, 100 parsed pages will be
+  // produced. If `pages_per_shard` = 20, then 5 Document shard JSON files each
+  // containing 20 parsed pages will be written under the prefix
+  // [OutputConfig.gcs_destination.uri][] and suffix pages-x-to-y.json where
+  // x and y are 1-indexed page numbers.
+  //
+  // Example GCS outputs with 157 pages and pages_per_shard = 50:
+  //
+  // pages-001-to-050.json
+  // pages-051-to-100.json
+  // pages-101-to-150.json
+  // pages-151-to-157.json
+  int32 pages_per_shard = 2;
+}
+
+// The Google Cloud Storage location where the input file will be read from.
+message GcsSource {
+  string uri = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+// The Google Cloud Storage location where the output file will be written to.
+message GcsDestination {
+  string uri = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Contains metadata for the BatchProcessDocuments operation.
+message OperationMetadata {
+  enum State {
+    // The default value. This value is used if the state is omitted.
+    STATE_UNSPECIFIED = 0;
+
+    // Request is received.
+    ACCEPTED = 1;
+
+    // Request operation is waiting for scheduling.
+    WAITING = 2;
+
+    // Request is being processed.
+    RUNNING = 3;
+
+    // The batch processing completed successfully.
+    SUCCEEDED = 4;
+
+    // The batch processing was cancelled.
+    CANCELLED = 5;
+
+    // The batch processing has failed.
+    FAILED = 6;
+  }
+
+  // The state of the current batch processing.
+  State state = 1;
+
+  // A message providing more details about the current state of processing.
+  string state_message = 2;
+
+  // The creation time of the operation.
+  google.protobuf.Timestamp create_time = 3;
+
+  // The last update time of the operation.
+  google.protobuf.Timestamp update_time = 4;
+}
diff --git a/google/cloud/documentai/v1beta1/documentai_gapic.legacy.yaml b/google/cloud/documentai/v1beta1/documentai_gapic.legacy.yaml
new file mode 100644
index 000000000..7da3881ac
--- /dev/null
+++ b/google/cloud/documentai/v1beta1/documentai_gapic.legacy.yaml
@@ -0,0 +1,115 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+  java:
+    package_name: com.google.cloud.documentai.v1beta1
+  python:
+    package_name: google.cloud.documentai_v1beta1.gapic
+  go:
+    package_name: cloud.google.com/go/documentai/apiv1beta1
+  csharp:
+    package_name: Google.Cloud.DocumentAi.V1beta1
+  ruby:
+    package_name: Google::Cloud::DocumentAi::V1beta1
+  php:
+    package_name: Google\Cloud\DocumentAi\V1beta1
+  nodejs:
+    package_name: documentai.v1beta1
+    domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.cloud.documentai.v1beta1.DocumentUnderstandingService
+  # A list of resource collection configurations.
+  # Consists of a name_pattern and an entity_name.
+  # The name_pattern is a pattern to describe the names of the resources of this
+  # collection, using the platform's conventions for URI patterns. A generator
+  # may use this to generate methods to compose and decompose such names. The
+  # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+  # those will be taken as hints for the parameter names of the generated
+  # methods. If empty, no name methods are generated.
+  # The entity_name is the name to be used as a basis for generated methods and
+  # classes.
+  collections: []
+  # Definition for retryable codes.
+  retry_codes_def:
+  - name: idempotent
+    retry_codes:
+    - DEADLINE_EXCEEDED
+    - UNAVAILABLE
+  - name: non_idempotent
+    retry_codes: []
+  # Definition for retry/backoff parameters.
+  retry_params_def:
+  - name: default
+    initial_retry_delay_millis: 100
+    retry_delay_multiplier: 1.3
+    max_retry_delay_millis: 60000
+    initial_rpc_timeout_millis: 20000
+    rpc_timeout_multiplier: 1
+    max_rpc_timeout_millis: 20000
+    total_timeout_millis: 600000
+  # A list of method configurations.
+  # Common properties:
+  #
+  #   name - The simple name of the method.
+  #
+  #   flattening - Specifies the configuration for parameter flattening.
+  #   Describes the parameter groups for which a generator should produce method
+  #   overloads which allow a client to directly pass request message fields as
+  #   method parameters. This information may or may not be used, depending on
+  #   the target language.
+  #   Consists of groups, which each represent a list of parameters to be
+  #   flattened. Each parameter listed must be a field of the request message.
+  #
+  #   required_fields - Fields that are always required for a request to be
+  #   valid.
+  #
+  #   page_streaming - Specifies the configuration for paging.
+  #   Describes information for generating a method which transforms a paging
+  #   list RPC into a stream of resources.
+  #   Consists of a request and a response.
+  #   The request specifies request information of the list method. It defines
+  #   which fields match the paging pattern in the request. The request consists
+  #   of a page_size_field and a token_field. The page_size_field is the name of
+  #   the optional field specifying the maximum number of elements to be
+  #   returned in the response. The token_field is the name of the field in the
+  #   request containing the page token.
+  #   The response specifies response information of the list method. It defines
+  #   which fields match the paging pattern in the response. The response
+  #   consists of a token_field and a resources_field. The token_field is the
+  #   name of the field in the response containing the next page token. The
+  #   resources_field is the name of the field in the response containing the
+  #   list of resources belonging to the page.
+  #
+  #   retry_codes_name - Specifies the configuration for retryable codes. The
+  #   name must be defined in interfaces.retry_codes_def.
+  #
+  #   retry_params_name - Specifies the configuration for retry/backoff
+  #   parameters. The name must be defined in interfaces.retry_params_def.
+  #
+  #   field_name_patterns - Maps the field name of the request type to
+  #   entity_name of interfaces.collections.
+  #   Specifies the string pattern that the field must follow.
+  #
+  #   timeout_millis - Specifies the default timeout for a non-retrying call. If
+  #   the call is retrying, refer to retry_params_name instead.
+  methods:
+  - name: BatchProcessDocuments
+    flattening:
+      groups:
+      - parameters:
+        - requests
+    required_fields:
+    - requests
+    retry_codes_name: idempotent
+    retry_params_name: default
+    long_running:
+      return_type: google.cloud.documentai.v1beta1.BatchProcessDocumentsResponse
+      metadata_type: google.cloud.documentai.v1beta1.OperationMetadata
+      initial_poll_delay_millis: 20000
+      poll_delay_multiplier: 1.5
+      max_poll_delay_millis: 45000
+      total_poll_timeout_millis: 86400000
+    timeout_millis: 60000
diff --git a/google/cloud/documentai/v1beta1/documentai_gapic.yaml b/google/cloud/documentai/v1beta1/documentai_gapic.yaml
new file mode 100644
index 000000000..99f20ce18
--- /dev/null
+++ b/google/cloud/documentai/v1beta1/documentai_gapic.yaml
@@ -0,0 +1,45 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 2.0.0
+# The settings of generated code in a specific language.
+language_settings:
+  java:
+    package_name: com.google.cloud.documentai.v1beta1
+  python:
+    package_name: google.cloud.documentai_v1beta1.gapic
+  go:
+    package_name: cloud.google.com/go/documentai/apiv1beta1
+  csharp:
+    package_name: Google.Cloud.DocumentAi.V1beta1
+  ruby:
+    package_name: Google::Cloud::DocumentAi::V1beta1
+  php:
+    package_name: Google\Cloud\DocumentAi\V1beta1
+  nodejs:
+    package_name: documentai.v1beta1
+    domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.cloud.documentai.v1beta1.DocumentUnderstandingService
+  # A list of resource collection configurations.
+  # Consists of a name_pattern and an entity_name.
+  # The name_pattern is a pattern to describe the names of the resources of this
+  # collection, using the platform's conventions for URI patterns. A generator
+  # may use this to generate methods to compose and decompose such names. The
+  # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+  # those will be taken as hints for the parameter names of the generated
+  # methods. If empty, no name methods are generated.
+  # The entity_name is the name to be used as a basis for generated methods and
+  # classes.
+
+  # A list of method configurations.
+  # Common properties:
+  #
+  #   name - The simple name of the method.
+  #
+  #   retry_codes_name - Specifies the configuration for retryable codes. The
+  #   name must be defined in interfaces.retry_codes_def.
+
+  methods:
+  - name: BatchProcessDocuments
+    retry_codes_name: idempotent
diff --git a/google/cloud/documentai/v1beta1/documentai_grpc_service_config.json b/google/cloud/documentai/v1beta1/documentai_grpc_service_config.json
new file mode 100755
index 000000000..00e77aa3c
--- /dev/null
+++ b/google/cloud/documentai/v1beta1/documentai_grpc_service_config.json
@@ -0,0 +1,22 @@
+{
+  "methodConfig": [
+    {
+      "name": [
+        {
+          "service": "google.cloud.documentai.v1beta1.DocumentUnderstandingService",
+          "method": "BatchProcessDocuments"
+        }
+      ],
+      "timeout": "60s",
+      "retryPolicy": {
+        "initialBackoff": "0.100s",
+        "maxBackoff": "60s",
+        "backoffMultiplier": 1.3,
+        "retryableStatusCodes": [
+          "DEADLINE_EXCEEDED",
+          "UNAVAILABLE"
+        ]
+      }
+    }
+  ]
+}
diff --git a/google/cloud/documentai/v1beta1/geometry.proto b/google/cloud/documentai/v1beta1/geometry.proto
new file mode 100644
index 000000000..9dbe2b78b
--- /dev/null
+++ b/google/cloud/documentai/v1beta1/geometry.proto
@@ -0,0 +1,55 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.documentai.v1beta1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/documentai/v1beta1;documentai";
+option java_multiple_files = true;
+option java_outer_classname = "GeometryProto";
+option java_package = "com.google.cloud.documentai.v1beta1";
+
+// A vertex represents a 2D point in the image.
+// NOTE: the vertex coordinates are in the same scale as the original image.
+message Vertex {
+  // X coordinate.
+  int32 x = 1;
+
+  // Y coordinate.
+  int32 y = 2;
+}
+
+// A vertex represents a 2D point in the image.
+// NOTE: the normalized vertex coordinates are relative to the original image
+// and range from 0 to 1.
+message NormalizedVertex {
+  // X coordinate.
+  float x = 1;
+
+  // Y coordinate.
+  float y = 2;
+}
+
+// A bounding polygon for the detected image annotation.
+message BoundingPoly {
+  // The bounding polygon vertices.
+  repeated Vertex vertices = 1;
+
+  // The bounding polygon normalized vertices.
+  repeated NormalizedVertex normalized_vertices = 2;
+}
diff --git a/google/cloud/documentai/v1beta2/BUILD.bazel b/google/cloud/documentai/v1beta2/BUILD.bazel
new file mode 100644
index 000000000..85970d3ee
--- /dev/null
+++ b/google/cloud/documentai/v1beta2/BUILD.bazel
@@ -0,0 +1,334 @@
+# This file was automatically generated by BuildFileGenerator
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
+
+proto_library(
+    name = "documentai_proto",
+    srcs = [
+        "document.proto",
+        "document_understanding.proto",
+        "geometry.proto",
+    ],
+    deps = [
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/longrunning:operations_proto",
+        "//google/rpc:status_proto",
+        "//google/type:color_proto",
+        "@com_google_protobuf//:timestamp_proto",
+    ],
+)
+
+proto_library_with_info(
+    name = "documentai_proto_with_info",
+    deps = [
+        ":documentai_proto",
+        "//google/cloud:common_resources_proto",
+    ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "java_gapic_assembly_gradle_pkg",
+    "java_gapic_library",
+    "java_gapic_test",
+    "java_grpc_library",
+    "java_proto_library",
+)
+
+java_proto_library(
+    name = "documentai_java_proto",
+    deps = [":documentai_proto"],
+)
+
+java_grpc_library(
+    name = "documentai_java_grpc",
+    srcs = [":documentai_proto"],
+    deps = [":documentai_java_proto"],
+)
+
+java_gapic_library(
+    name = "documentai_java_gapic",
+    src = ":documentai_proto_with_info",
+    gapic_yaml = "documentai_gapic.yaml",
+    package = "google.cloud.documentai.v1beta2",
+    service_yaml = "documentai_v1beta2.yaml",
+    test_deps = [
+        ":documentai_java_grpc",
+    ],
+    deps = [
+        ":documentai_java_proto",
+    ],
+)
+
+java_gapic_test(
+    name = "documentai_java_gapic_test_suite",
+    test_classes = [
+        "com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClientTest",
+    ],
+    runtime_deps = [":documentai_java_gapic_test"],
+)
+
+# Open Source Packages
+java_gapic_assembly_gradle_pkg(
+    name = "google-cloud-documentai-v1beta2-java",
+    deps = [
+        ":documentai_java_gapic",
+        ":documentai_java_grpc",
+        ":documentai_java_proto",
+        ":documentai_proto",
+    ],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "go_gapic_assembly_pkg",
+    "go_gapic_library",
+    "go_proto_library",
+    "go_test",
+)
+
+go_proto_library(
+    name = "documentai_go_proto",
+    compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+    importpath = "google.golang.org/genproto/googleapis/cloud/documentai/v1beta2",
+    protos = [":documentai_proto"],
+    deps = [
+        "//google/api:annotations_go_proto",
+        "//google/longrunning:longrunning_go_proto",
+        "//google/rpc:status_go_proto",
+        "//google/type:color_go_proto",
+    ],
+)
+
+go_gapic_library(
+    name = "documentai_go_gapic",
+    srcs = [":documentai_proto_with_info"],
+    grpc_service_config = "documentai_v1beta2_grpc_service_config.json",
+    importpath = "cloud.google.com/go/documentai/apiv1beta2;documentai",
+    service_yaml = "documentai_v1beta2.yaml",
+    deps = [
+        ":documentai_go_proto",
+        "//google/longrunning:longrunning_go_gapic",
+        "//google/longrunning:longrunning_go_proto",
+        "@com_google_cloud_go//longrunning:go_default_library",
+        "@com_google_cloud_go//longrunning/autogen:go_default_library",
+    ],
+)
+
+go_test(
+    name = "documentai_go_gapic_test",
+    srcs = [":documentai_go_gapic_srcjar_test"],
+    embed = [":documentai_go_gapic"],
+    importpath = "cloud.google.com/go/documentai/apiv1beta2",
+)
+
+# Open Source Packages
+go_gapic_assembly_pkg(
+    name = "gapi-cloud-documentai-v1beta2-go",
+    deps = [
+        ":documentai_go_gapic",
+        ":documentai_go_gapic_srcjar-test.srcjar",
+        ":documentai_go_proto",
+    ],
+)
+
+##############################################################################
+# Python
+##############################################################################
+# This library is using Python microgenerator.
+# DO NOT OVERRIDE this Python section with autogenerated rules.
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    py_gapic_assembly_pkg = "py_gapic_assembly_pkg2",
+    py_gapic_library = "py_gapic_library2",
+)
+
+py_gapic_library(
+    name = "documentai_py_gapic",
+    srcs = [":documentai_proto"],
+)
+
+py_gapic_assembly_pkg(
+    name = "documentai-v1beta2-py",
+    deps = [
+        ":documentai_py_gapic",
+    ],
+)
+
+##############################################################################
+# PHP
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "php_gapic_assembly_pkg",
+    "php_gapic_library",
+    "php_grpc_library",
+    "php_proto_library",
+)
+
+php_proto_library(
+    name = "documentai_php_proto",
+    deps = [":documentai_proto"],
+)
+
+php_grpc_library(
+    name = "documentai_php_grpc",
+    srcs = [":documentai_proto"],
+    deps = [":documentai_php_proto"],
+)
+
+php_gapic_library(
+    name = "documentai_php_gapic",
+    src = ":documentai_proto_with_info",
+    gapic_yaml = "documentai_gapic.yaml",
+    package = "google.cloud.documentai.v1beta2",
+    service_yaml = "documentai_v1beta2.yaml",
+    deps = [
+        ":documentai_php_grpc",
+        ":documentai_php_proto",
+    ],
+)
+
+# Open Source Packages
+php_gapic_assembly_pkg(
+    name = "google-cloud-documentai-v1beta2-php",
+    deps = [
+        ":documentai_php_gapic",
+        ":documentai_php_grpc",
+        ":documentai_php_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)
+
+nodejs_gapic_library(
+    name = "documentai_nodejs_gapic",
+    src = ":documentai_proto_with_info",
+    gapic_yaml = "documentai_gapic.yaml",
+    package = "google.cloud.documentai.v1beta2",
+    service_yaml = "documentai_v1beta2.yaml",
+    deps = [],
+)
+
+nodejs_gapic_assembly_pkg(
+    name = "documentai-v1beta2-nodejs",
+    deps = [
+        ":documentai_nodejs_gapic",
+        ":documentai_proto",
+    ],
+)
+
+##############################################################################
+# Ruby
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "ruby_gapic_assembly_pkg",
+    "ruby_gapic_library",
+    "ruby_grpc_library",
+    "ruby_proto_library",
+)
+
+ruby_proto_library(
+    name = "documentai_ruby_proto",
+    deps = [":documentai_proto"],
+)
+
+ruby_grpc_library(
+    name = "documentai_ruby_grpc",
+    srcs = [":documentai_proto"],
+    deps = [":documentai_ruby_proto"],
+)
+
+ruby_gapic_library(
+    name = "documentai_ruby_gapic",
+    src = ":documentai_proto_with_info",
+    gapic_yaml = "documentai_gapic.yaml",
+    package = "google.cloud.documentai.v1beta2",
+    service_yaml = "documentai_v1beta2.yaml",
+    deps = [
+        ":documentai_ruby_grpc",
+        ":documentai_ruby_proto",
+    ],
+)
+
+# Open Source Packages
+ruby_gapic_assembly_pkg(
+    name = "google-cloud-documentai-v1beta2-ruby",
+    deps = [
+        ":documentai_ruby_gapic",
+        ":documentai_ruby_grpc",
+        ":documentai_ruby_proto",
+    ],
+)
+
+##############################################################################
+# C#
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "csharp_gapic_assembly_pkg",
+    "csharp_gapic_library",
+    "csharp_grpc_library",
+    "csharp_proto_library",
+)
+
+csharp_proto_library(
+    name = "documentai_csharp_proto",
+    deps = [":documentai_proto"],
+)
+
+csharp_grpc_library(
+    name = "documentai_csharp_grpc",
+    srcs = [":documentai_proto"],
+    deps = [":documentai_csharp_proto"],
+)
+
+csharp_gapic_library(
+    name = "documentai_csharp_gapic",
+    src = ":documentai_proto_with_info",
+    gapic_yaml = "documentai_gapic.yaml",
+    package = "google.cloud.documentai.v1beta2",
+    service_yaml = "documentai_v1beta2.yaml",
+    deps = [
+        ":documentai_csharp_grpc",
+        ":documentai_csharp_proto",
+    ],
+)
+
+# Open Source Packages
+csharp_gapic_assembly_pkg(
+    name = "google-cloud-documentai-v1beta2-csharp",
+    deps = [
+        ":documentai_csharp_gapic",
+        ":documentai_csharp_grpc",
+        ":documentai_csharp_proto",
+    ],
+)
+
+##############################################################################
+# C++
+##############################################################################
+# Put your C++ rules here
diff --git a/google/cloud/documentai/v1beta2/document.proto b/google/cloud/documentai/v1beta2/document.proto
new file mode 100644
index 000000000..d50320b12
--- /dev/null
+++ b/google/cloud/documentai/v1beta2/document.proto
@@ -0,0 +1,516 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.documentai.v1beta2;
+
+import "google/api/field_behavior.proto";
+import "google/cloud/documentai/v1beta2/geometry.proto";
+import "google/rpc/status.proto";
+import "google/type/color.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/documentai/v1beta2;documentai";
+option java_multiple_files = true;
+option java_outer_classname = "DocumentProto";
+option java_package = "com.google.cloud.documentai.v1beta2";
+
+// Document represents the canonical document resource in Document Understanding
+// AI.
+// It is an interchange format that provides insights into documents and allows
+// for collaboration between users and Document Understanding AI to iterate and
+// optimize for quality.
+message Document {
+  // For a large document, sharding may be performed to produce several
+  // document shards. Each document shard contains this field to detail which
+  // shard it is.
+  message ShardInfo {
+    // The 0-based index of this shard.
+    int64 shard_index = 1;
+
+    // Total number of shards.
+    int64 shard_count = 2;
+
+    // The index of the first character in [Document.text][google.cloud.documentai.v1beta2.Document.text] in the overall
+    // document global text.
+    int64 text_offset = 3;
+  }
+
+  // Label attaches schema information and/or other metadata to segments within
+  // a [Document][google.cloud.documentai.v1beta2.Document]. Multiple [Label][google.cloud.documentai.v1beta2.Document.Label]s on a single field can denote either
+  // different labels, different instances of the same label created at
+  // different times, or some combination of both.
+  message Label {
+    // Provenance of the label.
+    oneof source {
+      // Label is generated AutoML model. This field stores the full resource
+      // name of the AutoML model.
+      //
+      // Format:
+      // `projects/{project-id}/locations/{location-id}/models/{model-id}`
+      string automl_model = 2;
+    }
+
+    // Name of the label.
+    //
+    // When the label is generated from AutoML Text Classification model, this
+    // field represents the name of the category.
+    string name = 1;
+
+    // Confidence score between 0 and 1 for label assignment.
+    float confidence = 3;
+  }
+
+  // Annotation for common text style attributes. This adheres to CSS
+  // conventions as much as possible.
+  message Style {
+    // Font size with unit.
+    message FontSize {
+      // Font size for the text.
+      float size = 1;
+
+      // Unit for the font size. Follows CSS naming (in, px, pt, etc.).
+      string unit = 2;
+    }
+
+    // Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+    TextAnchor text_anchor = 1;
+
+    // Text color.
+    google.type.Color color = 2;
+
+    // Text background color.
+    google.type.Color background_color = 3;
+
+    // Font weight. Possible values are normal, bold, bolder, and lighter.
+    // https://www.w3schools.com/cssref/pr_font_weight.asp
+    string font_weight = 4;
+
+    // Text style. Possible values are normal, italic, and oblique.
+    // https://www.w3schools.com/cssref/pr_font_font-style.asp
+    string text_style = 5;
+
+    // Text decoration. Follows CSS standard.
+    //   
+    // https://www.w3schools.com/cssref/pr_text_text-decoration.asp
+    string text_decoration = 6;
+
+    // Font size.
+    FontSize font_size = 7;
+  }
+
+  // A page in a [Document][google.cloud.documentai.v1beta2.Document].
+  message Page {
+    // Dimension for the page.
+    message Dimension {
+      // Page width.
+      float width = 1;
+
+      // Page height.
+      float height = 2;
+
+      // Dimension unit.
+      string unit = 3;
+    }
+
+    // Visual element describing a layout unit on a page.
+    message Layout {
+      // Detected human reading orientation.
+      enum Orientation {
+        // Unspecified orientation.
+        ORIENTATION_UNSPECIFIED = 0;
+
+        // Orientation is aligned with page up.
+        PAGE_UP = 1;
+
+        // Orientation is aligned with page right.
+        // Turn the head 90 degrees clockwise from upright to read.
+        PAGE_RIGHT = 2;
+
+        // Orientation is aligned with page down.
+        // Turn the head 180 degrees from upright to read.
+        PAGE_DOWN = 3;
+
+        // Orientation is aligned with page left.
+        // Turn the head 90 degrees counterclockwise from upright to read.
+        PAGE_LEFT = 4;
+      }
+
+      // Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+      TextAnchor text_anchor = 1;
+
+      // Confidence of the current [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] within context of the object this
+      // layout is for. e.g. confidence can be for a single token, a table,
+      // a visual element, etc. depending on context. Range [0, 1].
+      float confidence = 2;
+
+      // The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+      BoundingPoly bounding_poly = 3;
+
+      // Detected orientation for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+      Orientation orientation = 4;
+
+      // Optional. This is the identifier used by referencing [PageAnchor][google.cloud.documentai.v1beta2.Document.PageAnchor]s.
+      string id = 5 [(google.api.field_behavior) = OPTIONAL];
+    }
+
+    // A block has a set of lines (collected into paragraphs) that have a
+    // common line-spacing and orientation.
+    message Block {
+      // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
+      Layout layout = 1;
+
+      // A list of detected languages together with confidence.
+      repeated DetectedLanguage detected_languages = 2;
+    }
+
+    // A collection of lines that a human would perceive as a paragraph.
+    message Paragraph {
+      // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+      Layout layout = 1;
+
+      // A list of detected languages together with confidence.
+      repeated DetectedLanguage detected_languages = 2;
+    }
+
+    // A collection of tokens that a human would perceive as a line.
+    // Does not cross column boundaries, can be horizontal, vertical, etc.
+    message Line {
+      // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+      Layout layout = 1;
+
+      // A list of detected languages together with confidence.
+      repeated DetectedLanguage detected_languages = 2;
+    }
+
+    // A detected token.
+    message Token {
+      // Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+      message DetectedBreak {
+        // Enum to denote the type of break found.
+        enum Type {
+          // Unspecified break type.
+          TYPE_UNSPECIFIED = 0;
+
+          // A single whitespace.
+          SPACE = 1;
+
+          // A wider whitespace.
+          WIDE_SPACE = 2;
+
+          // A hyphen that indicates that a token has been split across lines.
+          HYPHEN = 3;
+        }
+
+        // Detected break type.
+        Type type = 1;
+      }
+
+      // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+      Layout layout = 1;
+
+      // Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+      DetectedBreak detected_break = 2;
+
+      // A list of detected languages together with confidence.
+      repeated DetectedLanguage detected_languages = 3;
+    }
+
+    // Detected non-text visual elements e.g. checkbox, signature etc. on the
+    // page.
+    message VisualElement {
+      // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+      Layout layout = 1;
+
+      // Type of the [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+      string type = 2;
+
+      // A list of detected languages together with confidence.
+      repeated DetectedLanguage detected_languages = 3;
+    }
+
+    // A table representation similar to HTML table structure.
+    message Table {
+      // A row of table cells.
+      message TableRow {
+        // Cells that make up this row.
+        repeated TableCell cells = 1;
+      }
+
+      // A cell representation inside the table.
+      message TableCell {
+        // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+        Layout layout = 1;
+
+        // How many rows this cell spans.
+        int32 row_span = 2;
+
+        // How many columns this cell spans.
+        int32 col_span = 3;
+
+        // A list of detected languages together with confidence.
+        repeated DetectedLanguage detected_languages = 4;
+      }
+
+      // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+      Layout layout = 1;
+
+      // Header rows of the table.
+      repeated TableRow header_rows = 2;
+
+      // Body rows of the table.
+      repeated TableRow body_rows = 3;
+
+      // A list of detected languages together with confidence.
+      repeated DetectedLanguage detected_languages = 4;
+    }
+
+    // A form field detected on the page.
+    message FormField {
+      // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
+      // `Grand total`, `Phone number`, etc.
+      Layout field_name = 1;
+
+      // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
+      Layout field_value = 2;
+
+      // A list of detected languages for name together with confidence.
+      repeated DetectedLanguage name_detected_languages = 3;
+
+      // A list of detected languages for value together with confidence.
+      repeated DetectedLanguage value_detected_languages = 4;
+
+      // If the value is non-textual, this field represents the type. Current
+      // valid values are:
+      // - blank (this indicates the field_value is normal text)
+      // - "unfilled_checkbox"
+      // - "filled_checkbox"
+      string value_type = 5;
+
+      // An internal field, created for Labeling UI to export key text.
+      string corrected_key_text = 6;
+
+      // An internal field, created for Labeling UI to export value text.
+      string corrected_value_text = 7;
+    }
+
+    // Detected language for a structural component.
+    message DetectedLanguage {
+      // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+      // information, see
+      // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+      string language_code = 1;
+
+      // Confidence of detected language. Range [0, 1].
+      float confidence = 2;
+    }
+
+    // 1-based index for current [Page][google.cloud.documentai.v1beta2.Document.Page] in a parent [Document][google.cloud.documentai.v1beta2.Document].
+    // Useful when a page is taken out of a [Document][google.cloud.documentai.v1beta2.Document] for individual
+    // processing.
+    int32 page_number = 1;
+
+    // Physical dimension of the page.
+    Dimension dimension = 2;
+
+    // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
+    Layout layout = 3;
+
+    // A list of detected languages together with confidence.
+    repeated DetectedLanguage detected_languages = 4;
+
+    // A list of visually detected text blocks on the page.
+    // A block has a set of lines (collected into paragraphs) that have a common
+    // line-spacing and orientation.
+    repeated Block blocks = 5;
+
+    // A list of visually detected text paragraphs on the page.
+    // A collection of lines that a human would perceive as a paragraph.
+    repeated Paragraph paragraphs = 6;
+
+    // A list of visually detected text lines on the page.
+    // A collection of tokens that a human would perceive as a line.
+    repeated Line lines = 7;
+
+    // A list of visually detected tokens on the page.
+    repeated Token tokens = 8;
+
+    // A list of detected non-text visual elements e.g. checkbox,
+    // signature etc. on the page.
+    repeated VisualElement visual_elements = 9;
+
+    // A list of visually detected tables on the page.
+    repeated Table tables = 10;
+
+    // A list of visually detected form fields on the page.
+    repeated FormField form_fields = 11;
+  }
+
+  // A phrase in the text that is a known entity type, such as a person, an
+  // organization, or location.
+  message Entity {
+    // Provenance of the entity.
+    // Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+    TextAnchor text_anchor = 1;
+
+    // Entity type from a schema e.g. `Address`.
+    string type = 2;
+
+    // Text value in the document e.g. `1600 Amphitheatre Pkwy`.
+    string mention_text = 3;
+
+    // Deprecated.  Use `id` field instead.
+    string mention_id = 4;
+
+    // Optional. Confidence of detected Schema entity. Range [0, 1].
+    float confidence = 5 [(google.api.field_behavior) = OPTIONAL];
+
+    // Optional. Represents the provenance of this entity wrt. the location on the
+    // page where it was found.
+    PageAnchor page_anchor = 6 [(google.api.field_behavior) = OPTIONAL];
+
+    // Optional. Canonical id. This will be a unique value in the entity list
+    // for this document.
+    string id = 7 [(google.api.field_behavior) = OPTIONAL];
+
+    // Optional. Temporary field to store the bounding poly for short-term POCs. Used by
+    // the frontend only. Do not use before you talk to ybo@ and lukasr@.
+    BoundingPoly bounding_poly_for_demo_frontend = 8 [(google.api.field_behavior) = OPTIONAL];
+  }
+
+  // Relationship between [Entities][google.cloud.documentai.v1beta2.Document.Entity].
+  message EntityRelation {
+    // Subject entity id.
+    string subject_id = 1;
+
+    // Object entity id.
+    string object_id = 2;
+
+    // Relationship description.
+    string relation = 3;
+  }
+
+  // Text reference indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+  message TextAnchor {
+    // A text segment in the [Document.text][google.cloud.documentai.v1beta2.Document.text]. The indices may be out of bounds
+    // which indicate that the text extends into another document shard for
+    // large sharded documents. See [ShardInfo.text_offset][google.cloud.documentai.v1beta2.Document.ShardInfo.text_offset]
+    message TextSegment {
+      // [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+      int64 start_index = 1;
+
+      // [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the
+      // [Document.text][google.cloud.documentai.v1beta2.Document.text].
+      int64 end_index = 2;
+    }
+
+    // The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+    repeated TextSegment text_segments = 1;
+  }
+
+  // Referencing elements in [Document.pages][google.cloud.documentai.v1beta2.Document.pages].
+  message PageAnchor {
+    // Represents a weak reference to a page element within a document.
+    message PageRef {
+      // The type of layout that is being referenced.
+      enum LayoutType {
+        // Layout Unspecified.
+        LAYOUT_TYPE_UNSPECIFIED = 0;
+
+        // References a [Page.blocks][google.cloud.documentai.v1beta2.Document.Page.blocks] element.
+        BLOCK = 1;
+
+        // References a [Page.paragraphs][google.cloud.documentai.v1beta2.Document.Page.paragraphs] element.
+        PARAGRAPH = 2;
+
+        // References a [Page.lines][google.cloud.documentai.v1beta2.Document.Page.lines] element.
+        LINE = 3;
+
+        // References a [Page.tokens][google.cloud.documentai.v1beta2.Document.Page.tokens] element.
+        TOKEN = 4;
+
+        // References a [Page.visual_elements][google.cloud.documentai.v1beta2.Document.Page.visual_elements] element.
+        VISUAL_ELEMENT = 5;
+
+        // Refrrences a [Page.tables][google.cloud.documentai.v1beta2.Document.Page.tables] element.
+        TABLE = 6;
+
+        // References a [Page.form_fields][google.cloud.documentai.v1beta2.Document.Page.form_fields] element.
+        FORM_FIELD = 7;
+      }
+
+      // Required. Index into the [Document.pages][google.cloud.documentai.v1beta2.Document.pages] element
+      int64 page = 1 [(google.api.field_behavior) = REQUIRED];
+
+      // Optional. The type of the layout element that is being referenced.  If not
+      // specified the whole page is assumed to be referenced.
+      LayoutType layout_type = 2 [(google.api.field_behavior) = OPTIONAL];
+
+      // Optional. The [Page.Layout.id][google.cloud.documentai.v1beta2.Document.Page.Layout.id] on the page that this element
+      // references.  If [LayoutRef.type][] is specified this id must also be
+      // specified.
+      string layout_id = 3 [(google.api.field_behavior) = OPTIONAL];
+    }
+
+    // One or more references to visual page elements
+    repeated PageRef page_refs = 1;
+  }
+
+  // Original source document from the user.
+  oneof source {
+    // Currently supports Google Cloud Storage URI of the form
+    //    `gs://bucket_name/object_name`. Object versioning is not supported.
+    //    See [Google Cloud Storage Request
+    //    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+    //    info.
+    string uri = 1;
+
+    // Inline document content, represented as a stream of bytes.
+    // Note: As with all `bytes` fields, protobuffers use a pure binary
+    // representation, whereas JSON representations use base64.
+    bytes content = 2;
+  }
+
+  // An IANA published MIME type (also referred to as media type). For more
+  // information, see
+  // https://www.iana.org/assignments/media-types/media-types.xhtml.
+  string mime_type = 3;
+
+  // UTF-8 encoded text in reading order from the document.
+  string text = 4;
+
+  // Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+  repeated Style text_styles = 5;
+
+  // Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+  repeated Page pages = 6;
+
+  // A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
+  // entities in this list may cross shard boundaries.
+  repeated Entity entities = 7;
+
+  // Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+  repeated EntityRelation entity_relations = 8;
+
+  // Information about the sharding if this document is sharded part of a larger
+  // document. If the document is not sharded, this message is not specified.
+  ShardInfo shard_info = 9;
+
+  // [Label][google.cloud.documentai.v1beta2.Document.Label]s for this document.
+  repeated Label labels = 11;
+
+  // Any error that occurred while processing this document.
+  google.rpc.Status error = 10;
+}
diff --git a/google/cloud/documentai/v1beta2/document_understanding.proto b/google/cloud/documentai/v1beta2/document_understanding.proto
new file mode 100644
index 000000000..e0f94aa22
--- /dev/null
+++ b/google/cloud/documentai/v1beta2/document_understanding.proto
@@ -0,0 +1,343 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.documentai.v1beta2;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/cloud/documentai/v1beta2/document.proto";
+import "google/cloud/documentai/v1beta2/geometry.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/documentai/v1beta2;documentai";
+option java_multiple_files = true;
+option java_outer_classname = "DocumentAiProto";
+option java_package = "com.google.cloud.documentai.v1beta2";
+
+// Service to parse structured information from unstructured or semi-structured
+// documents using state-of-the-art Google AI such as natural language,
+// computer vision, and translation.
+service DocumentUnderstandingService {
+  option (google.api.default_host) = "us-documentai.googleapis.com";
+  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
+
+  // LRO endpoint to batch process many documents. The output is written
+  // to Cloud Storage as JSON in the [Document] format.
+  rpc BatchProcessDocuments(BatchProcessDocumentsRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      post: "/v1beta2/{parent=projects/*/locations/*}/documents:batchProcess"
+      body: "*"
+      additional_bindings {
+        post: "/v1beta2/{parent=projects/*}/documents:batchProcess"
+        body: "*"
+      }
+    };
+    option (google.api.method_signature) = "requests";
+    option (google.longrunning.operation_info) = {
+      response_type: "BatchProcessDocumentsResponse"
+      metadata_type: "OperationMetadata"
+    };
+  }
+
+  // Processes a single document.
+  rpc ProcessDocument(ProcessDocumentRequest) returns (Document) {
+    option (google.api.http) = {
+      post: "/v1beta2/{parent=projects/*/locations/*}/documents:process"
+      body: "*"
+      additional_bindings {
+        post: "/v1beta2/{parent=projects/*}/documents:process"
+        body: "*"
+      }
+    };
+  }
+}
+
+// Request to batch process documents as an asynchronous operation. The output
+// is written to Cloud Storage as JSON in the [Document] format.
+message BatchProcessDocumentsRequest {
+  // Required. Individual requests for each document.
+  repeated ProcessDocumentRequest requests = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Target project and location to make a call.
+  //
+  // Format: `projects/{project-id}/locations/{location-id}`.
+  //
+  // If no location is specified, a region will be chosen automatically.
+  string parent = 2;
+}
+
+// Request to process one document.
+message ProcessDocumentRequest {
+  // Target project and location to make a call.
+  //
+  // Format: `projects/{project-id}/locations/{location-id}`.
+  //
+  // If no location is specified, a region will be chosen automatically.
+  // This field is only populated when used in ProcessDocument method.
+  string parent = 9;
+
+  // Required. Information about the input file.
+  InputConfig input_config = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. The desired output location. This field is only needed in
+  // BatchProcessDocumentsRequest.
+  OutputConfig output_config = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Specifies a known document type for deeper structure detection. Valid
+  // values are currently "general" and "invoice". If not provided, "general"\
+  // is used as default. If any other value is given, the request is rejected.
+  string document_type = 3;
+
+  // Controls table extraction behavior. If not specified, the system will
+  // decide reasonable defaults.
+  TableExtractionParams table_extraction_params = 4;
+
+  // Controls form extraction behavior. If not specified, the system will
+  // decide reasonable defaults.
+  FormExtractionParams form_extraction_params = 5;
+
+  // Controls entity extraction behavior. If not specified, the system will
+  // decide reasonable defaults.
+  EntityExtractionParams entity_extraction_params = 6;
+
+  // Controls OCR behavior. If not specified, the system will decide reasonable
+  // defaults.
+  OcrParams ocr_params = 7;
+
+  // Controls AutoML model prediction behavior. AutoMlParams cannot be used
+  // together with other Params.
+  AutoMlParams automl_params = 8;
+}
+
+// Response to an batch document processing request. This is returned in
+// the LRO Operation after the operation is complete.
+message BatchProcessDocumentsResponse {
+  // Responses for each individual document.
+  repeated ProcessDocumentResponse responses = 1;
+}
+
+// Response to a single document processing request.
+message ProcessDocumentResponse {
+  // Information about the input file. This is the same as the corresponding
+  // input config in the request.
+  InputConfig input_config = 1;
+
+  // The output location of the parsed responses. The responses are written to
+  // this location as JSON-serialized `Document` objects.
+  OutputConfig output_config = 2;
+}
+
+// Parameters to control Optical Character Recognition (OCR) behavior.
+message OcrParams {
+  // List of languages to use for OCR. In most cases, an empty value
+  // yields the best results since it enables automatic language detection. For
+  // languages based on the Latin alphabet, setting `language_hints` is not
+  // needed. In rare cases, when the language of the text in the image is known,
+  // setting a hint will help get better results (although it will be a
+  // significant hindrance if the hint is wrong). Document processing returns an
+  // error if one or more of the specified languages is not one of the
+  // supported languages.
+  repeated string language_hints = 1;
+}
+
+// Parameters to control table extraction behavior.
+message TableExtractionParams {
+  // Whether to enable table extraction.
+  bool enabled = 1;
+
+  // Optional. Table bounding box hints that can be provided to complex cases
+  // which our algorithm cannot locate the table(s) in.
+  repeated TableBoundHint table_bound_hints = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Table header hints. The extraction will bias towards producing
+  // these terms as table headers, which may improve accuracy.
+  repeated string header_hints = 3 [(google.api.field_behavior) = OPTIONAL];
+
+  // Model version of the table extraction system. Default is "builtin/stable".
+  // Specify "builtin/latest" for the latest model.
+  string model_version = 4;
+}
+
+// A hint for a table bounding box on the page for table parsing.
+message TableBoundHint {
+  // Optional. Page number for multi-paged inputs this hint applies to. If not
+  // provided, this hint will apply to all pages by default. This value is
+  // 1-based.
+  int32 page_number = 1 [(google.api.field_behavior) = OPTIONAL];
+
+  // Bounding box hint for a table on this page. The coordinates must be
+  // normalized to [0,1] and the bounding box must be an axis-aligned rectangle.
+  BoundingPoly bounding_box = 2;
+}
+
+// Parameters to control form extraction behavior.
+message FormExtractionParams {
+  // Whether to enable form extraction.
+  bool enabled = 1;
+
+  // User can provide pairs of (key text, value type) to improve the parsing
+  // result.
+  //
+  // For example, if a document has a field called "Date" that holds a date
+  // value and a field called "Amount" that may hold either a currency value
+  // (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
+  // following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
+  // "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
+  //
+  // If the value type is unknown, but you want to provide hints for the keys,
+  // you can leave the value_types field blank. e.g. {"key": "Date",
+  // "value_types": []}
+  repeated KeyValuePairHint key_value_pair_hints = 2;
+
+  // Model version of the form extraction system. Default is
+  // "builtin/stable". Specify "builtin/latest" for the latest model.
+  // For custom form models, specify: “custom/{model_name}". Model name
+  // format is "bucket_name/path/to/modeldir" corresponding to
+  // "gs://bucket_name/path/to/modeldir" where annotated examples are stored.
+  string model_version = 3;
+}
+
+// User-provided hint for key value pair.
+message KeyValuePairHint {
+  // The key text for the hint.
+  string key = 1;
+
+  // Type of the value. This is case-insensitive, and could be one of:
+  // ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER,
+  // ID, NUMBER, EMAIL, PRICE, TERMS, DATE, NAME. Types not in this list will
+  // be ignored.
+  repeated string value_types = 2;
+}
+
+// Parameters to control entity extraction behavior.
+message EntityExtractionParams {
+  // Whether to enable entity extraction.
+  bool enabled = 1;
+
+  // Model version of the entity extraction. Default is
+  // "builtin/stable". Specify "builtin/latest" for the latest model.
+  string model_version = 2;
+}
+
+// Parameters to control AutoML model prediction behavior.
+message AutoMlParams {
+  // Resource name of the AutoML model.
+  //
+  // Format: `projects/{project-id}/locations/{location-id}/models/{model-id}`.
+  string model = 1;
+}
+
+// The desired input location and metadata.
+message InputConfig {
+  // Required.
+  oneof source {
+    // The Google Cloud Storage location to read the input from. This must be a
+    // single file.
+    GcsSource gcs_source = 1;
+
+    // Content in bytes, represented as a stream of bytes.
+    // Note: As with all `bytes` fields, proto buffer messages use a pure binary
+    // representation, whereas JSON representations use base64.
+    //
+    // This field only works for synchronous ProcessDocument method.
+    bytes contents = 3;
+  }
+
+  // Required. Mimetype of the input. Current supported mimetypes are application/pdf,
+  // image/tiff, and image/gif.
+  // In addition, application/json type is supported for requests with
+  // [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params] field set. The JSON file needs to
+  // be in [Document][google.cloud.documentai.v1beta2.Document] format.
+  string mime_type = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// The desired output location and metadata.
+message OutputConfig {
+  // Required.
+  oneof destination {
+    // The Google Cloud Storage location to write the output to.
+    GcsDestination gcs_destination = 1;
+  }
+
+  // The max number of pages to include into each output Document shard JSON on
+  // Google Cloud Storage.
+  //
+  // The valid range is [1, 100]. If not specified, the default value is 20.
+  //
+  // For example, for one pdf file with 100 pages, 100 parsed pages will be
+  // produced. If `pages_per_shard` = 20, then 5 Document shard JSON files each
+  // containing 20 parsed pages will be written under the prefix
+  // [OutputConfig.gcs_destination.uri][] and suffix pages-x-to-y.json where
+  // x and y are 1-indexed page numbers.
+  //
+  // Example GCS outputs with 157 pages and pages_per_shard = 50:
+  //
+  // pages-001-to-050.json
+  // pages-051-to-100.json
+  // pages-101-to-150.json
+  // pages-151-to-157.json
+  int32 pages_per_shard = 2;
+}
+
+// The Google Cloud Storage location where the input file will be read from.
+message GcsSource {
+  string uri = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+// The Google Cloud Storage location where the output file will be written to.
+message GcsDestination {
+  string uri = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Contains metadata for the BatchProcessDocuments operation.
+message OperationMetadata {
+  enum State {
+    // The default value. This value is used if the state is omitted.
+    STATE_UNSPECIFIED = 0;
+
+    // Request is received.
+    ACCEPTED = 1;
+
+    // Request operation is waiting for scheduling.
+    WAITING = 2;
+
+    // Request is being processed.
+    RUNNING = 3;
+
+    // The batch processing completed successfully.
+    SUCCEEDED = 4;
+
+    // The batch processing was cancelled.
+    CANCELLED = 5;
+
+    // The batch processing has failed.
+    FAILED = 6;
+  }
+
+  // The state of the current batch processing.
+  State state = 1;
+
+  // A message providing more details about the current state of processing.
+  string state_message = 2;
+
+  // The creation time of the operation.
+  google.protobuf.Timestamp create_time = 3;
+
+  // The last update time of the operation.
+  google.protobuf.Timestamp update_time = 4;
+}
diff --git a/google/cloud/documentai/v1beta2/documentai_gapic.legacy.yaml b/google/cloud/documentai/v1beta2/documentai_gapic.legacy.yaml
new file mode 100644
index 000000000..fe7f7e2d9
--- /dev/null
+++ b/google/cloud/documentai/v1beta2/documentai_gapic.legacy.yaml
@@ -0,0 +1,118 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+  java:
+    package_name: com.google.cloud.documentai.v1beta2
+  python:
+    package_name: google.cloud.documentai_v1beta2.gapic
+  go:
+    package_name: cloud.google.com/go/documentai/apiv1beta2
+  csharp:
+    package_name: Google.Cloud.DocumentAi.V1beta2
+  ruby:
+    package_name: Google::Cloud::DocumentAi::V1beta2
+  php:
+    package_name: Google\Cloud\DocumentAi\V1beta2
+  nodejs:
+    package_name: documentai.v1beta2
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.cloud.documentai.v1beta2.DocumentUnderstandingService
+  # A list of resource collection configurations.
+  # Consists of a name_pattern and an entity_name.
+  # The name_pattern is a pattern to describe the names of the resources of this
+  # collection, using the platform's conventions for URI patterns. A generator
+  # may use this to generate methods to compose and decompose such names. The
+  # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+  # those will be taken as hints for the parameter names of the generated
+  # methods. If empty, no name methods are generated.
+  # The entity_name is the name to be used as a basis for generated methods and
+  # classes.
+  collections: []
+  # Definition for retryable codes.
+  retry_codes_def:
+  - name: idempotent
+    retry_codes:
+    - DEADLINE_EXCEEDED
+    - UNAVAILABLE
+  - name: non_idempotent
+    retry_codes: []
+  # Definition for retry/backoff parameters.
+  retry_params_def:
+  - name: default
+    initial_retry_delay_millis: 100
+    retry_delay_multiplier: 1.3
+    max_retry_delay_millis: 60000
+    initial_rpc_timeout_millis: 20000
+    rpc_timeout_multiplier: 1
+    max_rpc_timeout_millis: 20000
+    total_timeout_millis: 600000
+  # A list of method configurations.
+  # Common properties:
+  #
+  #   name - The simple name of the method.
+  #
+  #   flattening - Specifies the configuration for parameter flattening.
+  #   Describes the parameter groups for which a generator should produce method
+  #   overloads which allow a client to directly pass request message fields as
+  #   method parameters. This information may or may not be used, depending on
+  #   the target language.
+  #   Consists of groups, which each represent a list of parameters to be
+  #   flattened. Each parameter listed must be a field of the request message.
+  #
+  #   required_fields - Fields that are always required for a request to be
+  #   valid.
+  #
+  #   page_streaming - Specifies the configuration for paging.
+  #   Describes information for generating a method which transforms a paging
+  #   list RPC into a stream of resources.
+  #   Consists of a request and a response.
+  #   The request specifies request information of the list method. It defines
+  #   which fields match the paging pattern in the request. The request consists
+  #   of a page_size_field and a token_field. The page_size_field is the name of
+  #   the optional field specifying the maximum number of elements to be
+  #   returned in the response. The token_field is the name of the field in the
+  #   request containing the page token.
+  #   The response specifies response information of the list method. It defines
+  #   which fields match the paging pattern in the response. The response
+  #   consists of a token_field and a resources_field. The token_field is the
+  #   name of the field in the response containing the next page token. The
+  #   resources_field is the name of the field in the response containing the
+  #   list of resources belonging to the page.
+  #
+  #   retry_codes_name - Specifies the configuration for retryable codes. The
+  #   name must be defined in interfaces.retry_codes_def.
+  #
+  #   retry_params_name - Specifies the configuration for retry/backoff
+  #   parameters. The name must be defined in interfaces.retry_params_def.
+  #
+  #   field_name_patterns - Maps the field name of the request type to
+  #   entity_name of interfaces.collections.
+  #   Specifies the string pattern that the field must follow.
+  #
+  #   timeout_millis - Specifies the default timeout for a non-retrying call. If
+  #   the call is retrying, refer to retry_params_name instead.
+  methods:
+  - name: BatchProcessDocuments
+    flattening:
+      groups:
+      - parameters:
+        - requests
+    required_fields:
+    - requests
+    retry_codes_name: idempotent
+    retry_params_name: default
+    long_running:
+      return_type: google.cloud.documentai.v1beta2.BatchProcessDocumentsResponse
+      metadata_type: google.cloud.documentai.v1beta2.OperationMetadata
+      initial_poll_delay_millis: 20000
+      poll_delay_multiplier: 1.5
+      max_poll_delay_millis: 45000
+      total_poll_timeout_millis: 86400000
+    timeout_millis: 60000
+  - name: ProcessDocument
+    retry_codes_name: idempotent
+    retry_params_name: default
+    timeout_millis: 60000
diff --git a/google/cloud/documentai/v1beta2/documentai_gapic.yaml b/google/cloud/documentai/v1beta2/documentai_gapic.yaml
new file mode 100644
index 000000000..fe23b39d6
--- /dev/null
+++ b/google/cloud/documentai/v1beta2/documentai_gapic.yaml
@@ -0,0 +1,47 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 2.0.0
+# The settings of generated code in a specific language.
+language_settings:
+  java:
+    package_name: com.google.cloud.documentai.v1beta2
+  python:
+    package_name: google.cloud.documentai_v1beta2.gapic
+  go:
+    package_name: cloud.google.com/go/documentai/apiv1beta2
+  csharp:
+    package_name: Google.Cloud.DocumentAi.V1beta2
+  ruby:
+    package_name: Google::Cloud::DocumentAi::V1beta2
+  php:
+    package_name: Google\Cloud\DocumentAi\V1beta2
+  nodejs:
+    package_name: documentai.v1beta2
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.cloud.documentai.v1beta2.DocumentUnderstandingService
+  # A list of resource collection configurations.
+  # Consists of a name_pattern and an entity_name.
+  # The name_pattern is a pattern to describe the names of the resources of this
+  # collection, using the platform's conventions for URI patterns. A generator
+  # may use this to generate methods to compose and decompose such names. The
+  # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+  # those will be taken as hints for the parameter names of the generated
+  # methods. If empty, no name methods are generated.
+  # The entity_name is the name to be used as a basis for generated methods and
+  # classes.
+
+  # A list of method configurations.
+  # Common properties:
+  #
+  #   name - The simple name of the method.
+  #
+  #   retry_codes_name - Specifies the configuration for retryable codes. The
+  #   name must be defined in interfaces.retry_codes_def.
+
+
+  methods:
+  - name: BatchProcessDocuments
+    retry_codes_name: idempotent
+  - name: ProcessDocument
+    retry_codes_name: idempotent
diff --git a/google/cloud/documentai/v1beta2/documentai_v1beta2.yaml b/google/cloud/documentai/v1beta2/documentai_v1beta2.yaml
new file mode 100644
index 000000000..1b068dcbc
--- /dev/null
+++ b/google/cloud/documentai/v1beta2/documentai_v1beta2.yaml
@@ -0,0 +1,33 @@
+type: google.api.Service
+config_version: 3
+name: documentai.googleapis.com
+title: Cloud Document AI API
+
+apis:
+- name: google.cloud.documentai.v1beta2.DocumentUnderstandingService
+
+types:
+- name: google.cloud.documentai.v1beta2.BatchProcessDocumentsResponse
+- name: google.cloud.documentai.v1beta2.Document
+- name: google.cloud.documentai.v1beta2.OperationMetadata
+
+documentation:
+  summary: |-
+    Service to parse structured information from unstructured or
+    semi-structured documents using state-of-the-art Google AI such as natural
+    language, computer vision, translation, and AutoML.
+
+authentication:
+  rules:
+  - selector: google.cloud.documentai.v1beta2.DocumentUnderstandingService.BatchProcessDocuments
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
+  - selector: google.cloud.documentai.v1beta2.DocumentUnderstandingService.ProcessDocument
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
+  - selector: 'google.longrunning.Operations.*'
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/documentai/v1beta2/documentai_v1beta2_grpc_service_config.json b/google/cloud/documentai/v1beta2/documentai_v1beta2_grpc_service_config.json
new file mode 100644
index 000000000..f7f137863
--- /dev/null
+++ b/google/cloud/documentai/v1beta2/documentai_v1beta2_grpc_service_config.json
@@ -0,0 +1,26 @@
+{
+  "methodConfig": [
+    {
+      "name": [
+        {
+          "service": "google.cloud.documentai.v1beta2.DocumentUnderstandingService",
+          "method": "BatchProcessDocuments"
+        },
+        {
+          "service": "google.cloud.documentai.v1beta2.DocumentUnderstandingService",
+          "method": "ProcessDocument"
+        }
+      ],
+      "timeout": "60s",
+      "retryPolicy": {
+        "initialBackoff": "0.100s",
+        "maxBackoff": "60s",
+        "backoffMultiplier": 1.3,
+        "retryableStatusCodes": [
+          "DEADLINE_EXCEEDED",
+          "UNAVAILABLE"
+        ]
+      }
+    }
+  ]
+}
diff --git a/google/cloud/documentai/v1beta2/geometry.proto b/google/cloud/documentai/v1beta2/geometry.proto
new file mode 100644
index 000000000..7f53217fe
--- /dev/null
+++ b/google/cloud/documentai/v1beta2/geometry.proto
@@ -0,0 +1,54 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.documentai.v1beta2;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/documentai/v1beta2;documentai";
+option java_multiple_files = true;
+option java_outer_classname = "GeometryProto";
+option java_package = "com.google.cloud.documentai.v1beta2";
+
+// A vertex represents a 2D point in the image.
+// NOTE: the vertex coordinates are in the same scale as the original image.
+message Vertex {
+  // X coordinate.
+  int32 x = 1;
+
+  // Y coordinate.
+  int32 y = 2;
+}
+
+// A vertex represents a 2D point in the image.
+// NOTE: the normalized vertex coordinates are relative to the original image
+// and range from 0 to 1.
+message NormalizedVertex {
+  // X coordinate.
+  float x = 1;
+
+  // Y coordinate.
+  float y = 2;
+}
+
+// A bounding polygon for the detected image annotation.
+message BoundingPoly {
+  // The bounding polygon vertices.
+  repeated Vertex vertices = 1;
+
+  // The bounding polygon normalized vertices.
+  repeated NormalizedVertex normalized_vertices = 2;
+}
diff --git a/google/cloud/functions/artman_functions.yaml b/google/cloud/functions/artman_functions.yaml
index d23f76de3..24385f291 100644
--- a/google/cloud/functions/artman_functions.yaml
+++ b/google/cloud/functions/artman_functions.yaml
@@ -2,8 +2,9 @@ common:
   api_name: functions
   api_version: v1beta2
   organization_name: google-cloud
-  service_yaml: functions.yaml
+  service_yaml: v1beta2/cloudfunctions_v1beta2.yaml
   gapic_yaml: v1beta2/functions_gapic.yaml
+  proto_package: google.cloud.functions.v1beta2
   src_proto_paths:
   - v1beta2
   proto_deps:
diff --git a/google/cloud/functions/functions.yaml b/google/cloud/functions/functions.yaml
deleted file mode 100644
index 01c703bcd..000000000
--- a/google/cloud/functions/functions.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
-type: google.api.Service
-config_version: 0
-name: cloudfunctions.googleapis.com
-title: Google Cloud Functions API
-
-apis:
-- name: google.cloud.functions.v1beta2.CloudFunctionsService
-
-documentation:
-  summary:
-    'Google Cloud Functions is a lightweight, event-based, asynchronous compute
-    solution that allows you to create small, single-purpose functions that
-    respond to cloud events without the need to manage a server or a runtime
-    environment.'
-
-authentication:
-  rules:
-    - selector: '*'
-      oauth:
-        canonical_scopes: https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/functions/v1beta2/BUILD.bazel b/google/cloud/functions/v1beta2/BUILD.bazel
new file mode 100644
index 000000000..4b4c5d778
--- /dev/null
+++ b/google/cloud/functions/v1beta2/BUILD.bazel
@@ -0,0 +1,372 @@
+# This file was automatically generated by BuildFileGenerator
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
+
+proto_library(
+    name = "functions_proto",
+    srcs = [
+        "functions.proto",
+        "operations.proto",
+    ],
+    deps = [
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/api:resource_proto",
+        "//google/longrunning:operations_proto",
+        "@com_google_protobuf//:any_proto",
+        "@com_google_protobuf//:duration_proto",
+        "@com_google_protobuf//:timestamp_proto",
+    ],
+)
+
+proto_library_with_info(
+    name = "functions_proto_with_info",
+    deps = [
+        ":functions_proto",
+        "//google/cloud:common_resources_proto",
+    ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "java_gapic_assembly_gradle_pkg",
+    "java_gapic_library",
+    "java_gapic_test",
+    "java_grpc_library",
+    "java_proto_library",
+)
+
+java_proto_library(
+    name = "functions_java_proto",
+    deps = [":functions_proto"],
+)
+
+java_grpc_library(
+    name = "functions_java_grpc",
+    srcs = [":functions_proto"],
+    deps = [":functions_java_proto"],
+)
+
+java_gapic_library(
+    name = "functions_java_gapic",
+    src = ":functions_proto_with_info",
+    gapic_yaml = "functions_gapic.yaml",
+    package = "google.cloud.functions.v1beta2",
+    service_yaml = "cloudfunctions_v1beta2.yaml",
+    test_deps = [
+        ":functions_java_grpc",
+    ],
+    deps = [
+        ":functions_java_proto",
+    ],
+)
+
+java_gapic_test(
+    name = "functions_java_gapic_test_suite",
+    test_classes = [
+        "com.google.cloud.functions.v1beta2.CloudFunctionsServiceClientTest",
+    ],
+    runtime_deps = [":functions_java_gapic_test"],
+)
+
+# Open Source Packages
+java_gapic_assembly_gradle_pkg(
+    name = "google-cloud-functions-v1beta2-java",
+    deps = [
+        ":functions_java_gapic",
+        ":functions_java_grpc",
+        ":functions_java_proto",
+        ":functions_proto",
+    ],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "go_gapic_assembly_pkg",
+    "go_gapic_library",
+    "go_proto_library",
+    "go_test",
+)
+
+go_proto_library(
+    name = "functions_go_proto",
+    compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+    importpath = "google.golang.org/genproto/googleapis/cloud/functions/v1beta2",
+    protos = [":functions_proto"],
+    deps = [
+        "//google/api:annotations_go_proto",
+        "//google/longrunning:longrunning_go_proto",
+    ],
+)
+
+go_gapic_library(
+    name = "functions_go_gapic",
+    srcs = [":functions_proto_with_info"],
+    grpc_service_config = "functions_grpc_service_config.json",
+    importpath = "cloud.google.com/go/cloud/functions/apiv1beta2;functions",
+    service_yaml = "cloudfunctions_v1beta2.yaml",
+    deps = [
+        ":functions_go_proto",
+        "//google/longrunning:longrunning_go_gapic",
+        "//google/longrunning:longrunning_go_proto",
+        "@com_google_cloud_go//longrunning:go_default_library",
+        "@com_google_cloud_go//longrunning/autogen:go_default_library",
+        "@io_bazel_rules_go//proto/wkt:any_go_proto",
+        "@io_bazel_rules_go//proto/wkt:duration_go_proto",
+    ],
+)
+
+go_test(
+    name = "functions_go_gapic_test",
+    srcs = [":functions_go_gapic_srcjar_test"],
+    embed = [":functions_go_gapic"],
+    importpath = "cloud.google.com/go/cloud/functions/apiv1beta2",
+)
+
+# Open Source Packages
+go_gapic_assembly_pkg(
+    name = "gapi-cloud-functions-v1beta2-go",
+    deps = [
+        ":functions_go_gapic",
+        ":functions_go_gapic_srcjar-test.srcjar",
+        ":functions_go_proto",
+    ],
+)
+
+##############################################################################
+# Python
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "moved_proto_library",
+    "py_gapic_assembly_pkg",
+    "py_gapic_library",
+    "py_grpc_library",
+    "py_proto_library",
+)
+
+moved_proto_library(
+    name = "functions_moved_proto",
+    srcs = [":functions_proto"],
+    deps = [
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/api:resource_proto",
+        "//google/longrunning:operations_proto",
+        "@com_google_protobuf//:any_proto",
+        "@com_google_protobuf//:duration_proto",
+        "@com_google_protobuf//:timestamp_proto",
+    ],
+)
+
+py_proto_library(
+    name = "functions_py_proto",
+    plugin = "@protoc_docs_plugin//:docs_plugin",
+    deps = [":functions_moved_proto"],
+)
+
+py_grpc_library(
+    name = "functions_py_grpc",
+    srcs = [":functions_moved_proto"],
+    deps = [":functions_py_proto"],
+)
+
+py_gapic_library(
+    name = "functions_py_gapic",
+    src = ":functions_proto_with_info",
+    gapic_yaml = "functions_gapic.yaml",
+    package = "google.cloud.functions.v1beta2",
+    service_yaml = "cloudfunctions_v1beta2.yaml",
+    deps = [
+        ":functions_py_grpc",
+        ":functions_py_proto",
+    ],
+)
+
+# Open Source Packages
+py_gapic_assembly_pkg(
+    name = "functions-v1beta2-py",
+    deps = [
+        ":functions_py_gapic",
+        ":functions_py_grpc",
+        ":functions_py_proto",
+    ],
+)
+
+##############################################################################
+# PHP
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "php_gapic_assembly_pkg",
+    "php_gapic_library",
+    "php_grpc_library",
+    "php_proto_library",
+)
+
+php_proto_library(
+    name = "functions_php_proto",
+    deps = [":functions_proto"],
+)
+
+php_grpc_library(
+    name = "functions_php_grpc",
+    srcs = [":functions_proto"],
+    deps = [":functions_php_proto"],
+)
+
+php_gapic_library(
+    name = "functions_php_gapic",
+    src = ":functions_proto_with_info",
+    gapic_yaml = "functions_gapic.yaml",
+    package = "google.cloud.functions.v1beta2",
+    service_yaml = "cloudfunctions_v1beta2.yaml",
+    deps = [
+        ":functions_php_grpc",
+        ":functions_php_proto",
+    ],
+)
+
+# Open Source Packages
+php_gapic_assembly_pkg(
+    name = "google-cloud-functions-v1beta2-php",
+    deps = [
+        ":functions_php_gapic",
+        ":functions_php_grpc",
+        ":functions_php_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)
+
+nodejs_gapic_library(
+    name = "functions_nodejs_gapic",
+    src = ":functions_proto_with_info",
+    gapic_yaml = "functions_gapic.yaml",
+    package = "google.cloud.functions.v1beta2",
+    service_yaml = "cloudfunctions_v1beta2.yaml",
+    deps = [],
+)
+
+nodejs_gapic_assembly_pkg(
+    name = "functions-v1beta2-nodejs",
+    deps = [
+        ":functions_nodejs_gapic",
+        ":functions_proto",
+    ],
+)
+
+##############################################################################
+# Ruby
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "ruby_gapic_assembly_pkg",
+    "ruby_gapic_library",
+    "ruby_grpc_library",
+    "ruby_proto_library",
+)
+
+ruby_proto_library(
+    name = "functions_ruby_proto",
+    deps = [":functions_proto"],
+)
+
+ruby_grpc_library(
+    name = "functions_ruby_grpc",
+    srcs = [":functions_proto"],
+    deps = [":functions_ruby_proto"],
+)
+
+ruby_gapic_library(
+    name = "functions_ruby_gapic",
+    src = ":functions_proto_with_info",
+    gapic_yaml = "functions_gapic.yaml",
+    package = "google.cloud.functions.v1beta2",
+    service_yaml = "cloudfunctions_v1beta2.yaml",
+    deps = [
+        ":functions_ruby_grpc",
+        ":functions_ruby_proto",
+    ],
+)
+
+# Open Source Packages
+ruby_gapic_assembly_pkg(
+    name = "google-cloud-functions-v1beta2-ruby",
+    deps = [
+        ":functions_ruby_gapic",
+        ":functions_ruby_grpc",
+        ":functions_ruby_proto",
+    ],
+)
+
+##############################################################################
+# C#
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "csharp_gapic_assembly_pkg",
+    "csharp_gapic_library",
+    "csharp_grpc_library",
+    "csharp_proto_library",
+)
+
+csharp_proto_library(
+    name = "functions_csharp_proto",
+    deps = [":functions_proto"],
+)
+
+csharp_grpc_library(
+    name = "functions_csharp_grpc",
+    srcs = [":functions_proto"],
+    deps = [":functions_csharp_proto"],
+)
+
+csharp_gapic_library(
+    name = "functions_csharp_gapic",
+    src = ":functions_proto_with_info",
+    gapic_yaml = "functions_gapic.yaml",
+    package = "google.cloud.functions.v1beta2",
+    service_yaml = "cloudfunctions_v1beta2.yaml",
+    deps = [
+        ":functions_csharp_grpc",
+        ":functions_csharp_proto",
+    ],
+)
+
+# Open Source Packages
+csharp_gapic_assembly_pkg(
+    name = "google-cloud-functions-v1beta2-csharp",
+    deps = [
+        ":functions_csharp_gapic",
+        ":functions_csharp_grpc",
+        ":functions_csharp_proto",
+    ],
+)
+
+##############################################################################
+# C++
+##############################################################################
+# Put your C++ rules here
diff --git a/google/cloud/functions/v1beta2/cloudfunctions_v1beta2.yaml b/google/cloud/functions/v1beta2/cloudfunctions_v1beta2.yaml
new file mode 100644
index 000000000..3c243186a
--- /dev/null
+++ b/google/cloud/functions/v1beta2/cloudfunctions_v1beta2.yaml
@@ -0,0 +1,73 @@
+type: google.api.Service
+config_version: 3
+name: cloudfunctions.googleapis.com
+title: Cloud Functions API
+
+apis:
+- name: google.cloud.functions.v1beta2.CloudFunctionsService
+
+types:
+- name: google.cloud.functions.v1beta2.OperationMetadataV1Beta2
+
+documentation:
+  summary: 'Manages lightweight user-provided functions executed in response to events.'
+  overview: 'Manages lightweight user-provided functions executed in response to
+events.'
+  rules:
+  - selector: google.iam.v1.IAMPolicy.GetIamPolicy
+    description: |-
+      Gets the access control policy for a resource. Returns an empty policy
+      if the resource exists and does not have a policy set.
+
+  - selector: google.iam.v1.IAMPolicy.SetIamPolicy
+    description: |-
+      Sets the access control policy on the specified resource. Replaces
+      any existing policy.
+
+      Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and
+      PERMISSION_DENIED
+
+  - selector: google.iam.v1.IAMPolicy.TestIamPermissions
+    description: |-
+      Returns permissions that a caller has on the specified resource. If the
+      resource does not exist, this will return an empty set of
+      permissions, not a NOT_FOUND error.
+
+      Note: This operation is designed to be used for building
+      permission-aware UIs and command-line tools, not for authorization
+      checking. This operation may "fail open" without warning.
+
+backend:
+  rules:
+  - selector: 'google.cloud.functions.v1beta2.CloudFunctionsService.*'
+    deadline: 30.0
+  - selector: google.cloud.functions.v1beta2.CloudFunctionsService.CallFunction
+    deadline: 600.0
+  - selector: google.cloud.functions.v1beta2.CloudFunctionsService.GenerateUploadUrl
+    deadline: 120.0
+  - selector: 'google.iam.v1.IAMPolicy.*'
+    deadline: 30.0
+  - selector: 'google.longrunning.Operations.*'
+    deadline: 30.0
+
+http:
+  rules:
+  - selector: google.longrunning.Operations.GetOperation
+    get: '/v1beta2/{name=operations/*}'
+  - selector: google.longrunning.Operations.ListOperations
+    get: /v1beta2/operations
+
+authentication:
+  rules:
+  - selector: 'google.cloud.functions.v1beta2.CloudFunctionsService.*'
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
+  - selector: 'google.iam.v1.IAMPolicy.*'
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
+  - selector: 'google.longrunning.Operations.*'
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/functions/v1beta2/functions.proto b/google/cloud/functions/v1beta2/functions.proto
index 77a66841a..4d07ed1e5 100644
--- a/google/cloud/functions/v1beta2/functions.proto
+++ b/google/cloud/functions/v1beta2/functions.proto
@@ -1,4 +1,4 @@
-// Copyright 2017 Google Inc.
+// Copyright 2019 Google LLC.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -11,14 +11,16 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
+//
 
 syntax = "proto3";
 
 package google.cloud.functions.v1beta2;
 
 import "google/api/annotations.proto";
-import "google/api/auth.proto";
-import "google/cloud/functions/v1beta2/operations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
 import "google/longrunning/operations.proto";
 import "google/protobuf/duration.proto";
 import "google/protobuf/timestamp.proto";
@@ -31,11 +33,15 @@ option objc_class_prefix = "GCF";
 
 // A service that application uses to manipulate triggers and functions.
 service CloudFunctionsService {
+  option (google.api.default_host) = "cloudfunctions.googleapis.com";
+  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
+
   // Returns a list of functions that belong to the requested project.
   rpc ListFunctions(ListFunctionsRequest) returns (ListFunctionsResponse) {
     option (google.api.http) = {
       get: "/v1beta2/{location=projects/*/locations/*}/functions"
     };
+    option (google.api.method_signature) = "location";
   }
 
   // Returns a function with the given name from the requested project.
@@ -43,63 +49,147 @@ service CloudFunctionsService {
     option (google.api.http) = {
       get: "/v1beta2/{name=projects/*/locations/*/functions/*}"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Creates a new function. If a function with the given name already exists in
   // the specified project, the long running operation will return
   // `ALREADY_EXISTS` error.
-  rpc CreateFunction(CreateFunctionRequest)
-      returns (google.longrunning.Operation) {
+  rpc CreateFunction(CreateFunctionRequest) returns (google.longrunning.Operation) {
     option (google.api.http) = {
       post: "/v1beta2/{location=projects/*/locations/*}/functions"
       body: "function"
     };
+    option (google.api.method_signature) = "location,function";
+    option (google.longrunning.operation_info) = {
+      response_type: "CloudFunction"
+      metadata_type: "OperationMetadataV1Beta2"
+    };
   }
 
   // Updates existing function.
-  rpc UpdateFunction(UpdateFunctionRequest)
-      returns (google.longrunning.Operation) {
+  rpc UpdateFunction(UpdateFunctionRequest) returns (google.longrunning.Operation) {
     option (google.api.http) = {
       put: "/v1beta2/{name=projects/*/locations/*/functions/*}"
       body: "function"
     };
+    option (google.api.method_signature) = "name,function";
+    option (google.longrunning.operation_info) = {
+      response_type: "CloudFunction"
+      metadata_type: "OperationMetadataV1Beta2"
+    };
   }
 
   // Deletes a function with the given name from the specified project. If the
   // given function is used by some trigger, the trigger will be updated to
   // remove this function.
-  rpc DeleteFunction(DeleteFunctionRequest)
-      returns (google.longrunning.Operation) {
+  rpc DeleteFunction(DeleteFunctionRequest) returns (google.longrunning.Operation) {
     option (google.api.http) = {
       delete: "/v1beta2/{name=projects/*/locations/*/functions/*}"
     };
+    option (google.api.method_signature) = "name";
+    option (google.longrunning.operation_info) = {
+      response_type: "google.protobuf.Empty"
+      metadata_type: "OperationMetadataV1Beta2"
+    };
   }
 
-  // Invokes synchronously deployed function. To be used for testing, very
-  // limited traffic allowed.
+  // Synchronously invokes a deployed Cloud Function. To be used for testing
+  // purposes as very limited traffic is allowed. For more information on
+  // the actual limits refer to [API Calls](
+  // https://cloud.google.com/functions/quotas#rate_limits).
   rpc CallFunction(CallFunctionRequest) returns (CallFunctionResponse) {
     option (google.api.http) = {
       post: "/v1beta2/{name=projects/*/locations/*/functions/*}:call"
       body: "*"
     };
+    option (google.api.method_signature) = "name,data";
+  }
+
+  // Returns a signed URL for uploading a function source code.
+  // For more information about the signed URL usage see:
+  // https://cloud.google.com/storage/docs/access-control/signed-urls
+  // Once the function source code upload is complete, the used signed
+  // URL should be provided in CreateFunction or UpdateFunction request
+  // as a reference to the function source code.
+  //
+  // When uploading source code to the generated signed URL, please follow
+  // these restrictions:
+  //
+  // * Source file type should be a zip file.
+  // * Source file size should not exceed 100MB limit.
+  // * No credentials should be attached - the signed URLs provide access to the
+  //   target bucket using internal service identity; if credentials were
+  //   attached, the identity from the credentials would be used, but that
+  //   identity does not have permissions to upload files to the URL.
+  //
+  // When making a HTTP PUT request, these two headers need to be specified:
+  //
+  // * `content-type: application/zip`
+  // * `x-goog-content-length-range: 0,104857600`
+  //
+  // And this header SHOULD NOT be specified:
+  //
+  // * `Authorization: Bearer YOUR_TOKEN`
+  rpc GenerateUploadUrl(GenerateUploadUrlRequest) returns (GenerateUploadUrlResponse) {
+    option (google.api.http) = {
+      post: "/v1beta2/{parent=projects/*/locations/*}/functions:generateUploadUrl"
+      body: "*"
+    };
+  }
+
+  // Returns a signed URL for downloading deployed function source code.
+  // The URL is only valid for a limited period and should be used within
+  // minutes after generation.
+  // For more information about the signed URL usage see:
+  // https://cloud.google.com/storage/docs/access-control/signed-urls
+  rpc GenerateDownloadUrl(GenerateDownloadUrlRequest) returns (GenerateDownloadUrlResponse) {
+    option (google.api.http) = {
+      post: "/v1beta2/{name=projects/*/locations/*/functions/*}:generateDownloadUrl"
+      body: "*"
+    };
   }
 }
 
 // Describes a Cloud Function that contains user computation executed in
 // response to an event. It encapsulate function and triggers configurations.
 message CloudFunction {
+  option (google.api.resource) = {
+    type: "cloudfunctions.googleapis.com/CloudFunction"
+    pattern: "projects/{project}/locations/{location}/functions/{function}"
+  };
+
   // A user-defined name of the function. Function names must be unique
   // globally and match pattern `projects/*/locations/*/functions/*`
   string name = 1;
 
   // The location of the function source code.
   oneof source_code {
-    // The URL, starting with gs://, pointing to the zip archive which contains
-    // the function.
+    // The Google Cloud Storage URL, starting with gs://, pointing to the zip
+    // archive which contains the function.
     string source_archive_url = 14;
 
     // The hosted repository where the function is defined.
     SourceRepository source_repository = 3;
+
+    // The URL pointing to the hosted repository where the function is defined.
+    // There are supported Cloud Source Repository URLs in the following
+    // formats:
+    //
+    // To refer to a specific commit:
+    // `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
+    // To refer to a moveable alias (branch):
+    // `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
+    // In particular, to refer to HEAD use `master` moveable alias.
+    // To refer to a specific fixed alias (tag):
+    // `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
+    //
+    // You may omit `paths/*` if you want to use the main directory.
+    string source_repository_url = 18;
+
+    // The Google Cloud Storage signed URL used for source uploading, generated
+    // by [google.cloud.functions.v1beta2.GenerateUploadUrl][]
+    string source_upload_url = 16;
   }
 
   // An event that triggers the function.
@@ -112,12 +202,12 @@ message CloudFunction {
   }
 
   // Output only. Status of the function deployment.
-  CloudFunctionStatus status = 7;
+  CloudFunctionStatus status = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. Name of the most recent operation modifying the function. If
   // the function status is `DEPLOYING` or `DELETING`, then it points to the
   // active operation.
-  string latest_operation = 8;
+  string latest_operation = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // The name of the function (as defined in source code) that will be
   // executed. Defaults to the resource name suffix, if not specified. For
@@ -127,6 +217,13 @@ message CloudFunction {
   // in `source_location`.
   string entry_point = 9;
 
+  // The runtime in which to run the function. Required when deploying a new
+  // function, optional when updating an existing function. For a complete
+  // list of possible choices, see the
+  // [`gcloud` command
+  // reference](/sdk/gcloud/reference/functions/deploy#--runtime).
+  string runtime = 23;
+
   // The function execution timeout. Execution is considered failed and
   // can be terminated if the function is not completed at the end of the
   // timeout period. Defaults to 60 seconds.
@@ -136,17 +233,60 @@ message CloudFunction {
   // Defaults to 256MB.
   int32 available_memory_mb = 11;
 
-  // Output only. The service account of the function.
+  // The email of the function's service account. If empty, defaults to
+  // `{project_id}@appspot.gserviceaccount.com`.
   string service_account = 13;
 
   // Output only. The last update timestamp of a Cloud Function.
-  google.protobuf.Timestamp update_time = 15;
+  google.protobuf.Timestamp update_time = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The version identifier of the Cloud Function. Each deployment attempt
+  // results in a new version of a function being created.
+  int64 version_id = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Labels associated with this Cloud Function.
+  map labels = 21;
+
+  // Environment variables that shall be available during function execution.
+  map environment_variables = 22;
+
+  // The limit on the maximum number of function instances that may coexist at a
+  // given time.
+  int32 max_instances = 24;
+
+  // The VPC Network that this cloud function can connect to. It can be
+  // either the fully-qualified URI, or the short name of the network resource.
+  // If the short network name is used, the network must belong to the same
+  // project. Otherwise, it must belong to a project within the same
+  // organization. The format of this field is either
+  // `projects/{project}/global/networks/{network}` or `{network}`, where
+  // {project} is a project id where the network is defined, and {network} is
+  // the short name of the network.
+  //
+  // This field is mutually exclusive with `vpc_connector` and will be replaced
+  // by it.
+  //
+  // See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
+  // more information on connecting Cloud projects.
+  string network = 25;
+
+  // The VPC Network Connector that this cloud function can connect to. It can
+  // be either the fully-qualified URI, or the short name of the network
+  // connector resource. The format of this field is
+  // `projects/*/locations/*/connectors/*`
+  //
+  // This field is mutually exclusive with `network` field and will eventually
+  // replace it.
+  //
+  // See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
+  // more information on connecting Cloud projects.
+  string vpc_connector = 26;
 }
 
 // Describes HTTPSTrigger, could be used to connect web hooks to function.
 message HTTPSTrigger {
   // Output only. The deployed url for the function.
-  string url = 1;
+  string url = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
 }
 
 // Describes EventTrigger, used to request events be sent from another
@@ -155,13 +295,13 @@ message EventTrigger {
   // `event_type` names contain the service that is sending an event and the
   // kind of event that was fired. Must be of the form
   // `providers/*/eventTypes/*` e.g. Directly handle a Message published to
-  // Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`
+  // Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`.
   //
-  //      Handle an object changing in Google Cloud Storage
-  //      `providers/cloud.storage/eventTypes/object.change`
+  // Handle an object changing in Google Cloud Storage:
+  // `providers/cloud.storage/eventTypes/object.change`
   //
-  //      Handle a write to the Firebase Realtime Database
-  //      `providers/firebase.database/eventTypes/data.write`
+  // Handle a write to the Firebase Realtime Database:
+  // `providers/google.firebase.database/eventTypes/ref.write`
   string event_type = 1;
 
   // Which instance of the source's service should send events. E.g. for Pub/Sub
@@ -170,6 +310,16 @@ message EventTrigger {
   // that only supports one instance per-project, this should be the name of the
   // project (`projects/*`)
   string resource = 2;
+
+  // The hostname of the service that should be observed.
+  //
+  // If no string is provided, the default service implementing the API will
+  // be used. For example, `storage.googleapis.com` is the default for all
+  // event types in the `google.storage` namespace.
+  string service = 6;
+
+  // Specifies policy for failed executions.
+  FailurePolicy failure_policy = 5;
 }
 
 // Describes the location of the function source in a remote repository.
@@ -205,41 +355,100 @@ message SourceRepository {
   // branch, it will be the revision id of the latest change on this branch at
   // that time. If user deployed from revision then this value will be always
   // equal to the revision specified by the user.
-  string deployed_revision = 6;
+  string deployed_revision = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+// Describes the policy in case of function's execution failure.
+// If empty, then defaults to ignoring failures (i.e. not retrying them).
+message FailurePolicy {
+  // Describes the retry policy in case of function's execution failure.
+  // A function execution will be retried on any failure.
+  // A failed execution will be retried up to 7 days with an exponential backoff
+  // (capped at 10 seconds).
+  // Retried execution is charged as any other execution.
+  message Retry {
+
+  }
+
+  // Defines the action taken in case of a function execution failure.
+  oneof action {
+    // If specified, then the function will be retried in case of a failure.
+    Retry retry = 1;
+  }
 }
 
 // Request for the `CreateFunction` method.
 message CreateFunctionRequest {
-  // The project and location in which the function should be created, specified
+  // Required. The project and location in which the function should be created, specified
   // in the format `projects/*/locations/*`
-  string location = 1;
-
-  // Function to be created.
-  CloudFunction function = 2;
+  string location = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "locations.googleapis.com/Location"
+    }
+  ];
+
+  // Required. Function to be created.
+  CloudFunction function = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request for the `UpdateFunction` method.
 message UpdateFunctionRequest {
-  // The name of the function to be updated.
-  string name = 1;
+  // Required. The name of the function to be updated.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudfunctions.googleapis.com/CloudFunction"
+    }];
+
+  // Required. New version of the function.
+  CloudFunction function = 2 [(google.api.field_behavior) = REQUIRED];
+}
 
-  // New version of the function.
-  CloudFunction function = 2;
+// Describes the current stage of a deployment.
+enum CloudFunctionStatus {
+  // Status not specified.
+  STATUS_UNSPECIFIED = 0;
+
+  // Successfully deployed.
+  READY = 1;
+
+  // Not deployed correctly - behavior is undefined. The item should be updated
+  // or deleted to move it out of this state.
+  FAILED = 2;
+
+  // Creation or update in progress.
+  DEPLOYING = 3;
+
+  // Deletion in progress.
+  DELETING = 4;
 }
 
 // Request for the `GetFunction` method.
 message GetFunctionRequest {
-  // The name of the function which details should be obtained.
-  string name = 1;
+  // Required. The name of the function which details should be obtained.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudfunctions.googleapis.com/CloudFunction"
+    }
+  ];
 }
 
 // Request for the `ListFunctions` method.
 message ListFunctionsRequest {
-  // The project and location from which the function should be listed,
+  // Required. The project and location from which the function should be listed,
   // specified in the format `projects/*/locations/*`
   // If you want to list functions in all locations, use "-" in place of a
-  // location.
-  string location = 1;
+  // location. When listing functions in all locations, if one or more
+  // location(s) are unreachable, the response will contain functions from all
+  // reachable locations along with the names of any unreachable locations.
+  string location = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "locations.googleapis.com/Location"
+    }
+  ];
 
   // Maximum number of functions to return per call.
   int32 page_size = 2;
@@ -258,24 +467,38 @@ message ListFunctionsResponse {
 
   // If not empty, indicates that there may be more functions that match
   // the request; this value should be passed in a new
-  // [google.cloud.functions.v1beta2.ListFunctionsRequest][]
+  // [google.cloud.functions.v1beta2.ListFunctionsRequest][google.cloud.functions.v1beta2.ListFunctionsRequest]
   // to get more functions.
   string next_page_token = 2;
+
+  // Locations that could not be reached. The response does not include any
+  // functions from these locations.
+  repeated string unreachable = 3;
 }
 
 // Request for the `DeleteFunction` method.
 message DeleteFunctionRequest {
-  // The name of the function which should be deleted.
-  string name = 1;
+  // Required. The name of the function which should be deleted.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudfunctions.googleapis.com/CloudFunction"
+    }
+  ];
 }
 
 // Request for the `CallFunction` method.
 message CallFunctionRequest {
-  // The name of the function to be called.
-  string name = 1;
-
-  // Input to be passed to the function.
-  string data = 2;
+  // Required. The name of the function to be called.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudfunctions.googleapis.com/CloudFunction"
+    }
+  ];
+
+  // Required. Input to be passed to the function.
+  string data = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Response of `CallFunction` method.
@@ -292,21 +515,34 @@ message CallFunctionResponse {
   string error = 3;
 }
 
-// Describes the current stage of a deployment.
-enum CloudFunctionStatus {
-  // Status not specified.
-  STATUS_UNSPECIFIED = 0;
+// Request of `GenerateUploadUrl` method.
+message GenerateUploadUrlRequest {
+  // The project and location in which the Google Cloud Storage signed URL
+  // should be generated, specified in the format `projects/*/locations/*`.
+  string parent = 1;
+}
 
-  // Successfully deployed.
-  READY = 1;
+// Response of `GenerateUploadUrl` method.
+message GenerateUploadUrlResponse {
+  // The generated Google Cloud Storage signed URL that should be used for a
+  // function source code upload. The uploaded file should be a zip archive
+  // which contains a function.
+  string upload_url = 1;
+}
 
-  // Not deployed correctly - behavior is undefined. The item should be updated
-  // or deleted to move it out of this state.
-  FAILED = 2;
+// Request of `GenerateDownloadUrl` method.
+message GenerateDownloadUrlRequest {
+  // The name of function for which source code Google Cloud Storage signed
+  // URL should be generated.
+  string name = 1;
 
-  // Creation or update in progress.
-  DEPLOYING = 3;
+  // The optional version of function.
+  uint64 version_id = 2;
+}
 
-  // Deletion in progress.
-  DELETING = 4;
+// Response of `GenerateDownloadUrl` method.
+message GenerateDownloadUrlResponse {
+  // The generated Google Cloud Storage signed URL that should be used for
+  // function source code download.
+  string download_url = 1;
 }
diff --git a/google/cloud/functions/v1beta2/functions_gapic.legacy.yaml b/google/cloud/functions/v1beta2/functions_gapic.legacy.yaml
new file mode 100644
index 000000000..3f7e53ade
--- /dev/null
+++ b/google/cloud/functions/v1beta2/functions_gapic.legacy.yaml
@@ -0,0 +1,148 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+  java:
+    package_name: com.google.cloud.functions.v1beta2
+  python:
+    package_name: google.cloud.functions_v1beta2.gapic
+  go:
+    package_name: cloud.google.com/go/cloud/functions/apiv1beta2
+  csharp:
+    package_name: Google.Cloud.Functions.V1Beta2
+  ruby:
+    package_name: Google::Cloud::Functions::V1beta2
+  php:
+    package_name: Google\Cloud\Functions\V1beta2
+  nodejs:
+    package_name: functions.v1beta2
+    domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.functions.v1beta2.CloudFunctionsService
+  collections:
+  - name_pattern: projects/{project}/locations/{location}
+    entity_name: location
+  - name_pattern: projects/{project}/locations/{location}/functions/{function}
+    entity_name: function
+  retry_codes_def:
+  - name: idempotent
+    retry_codes:
+    - UNAVAILABLE
+    - DEADLINE_EXCEEDED
+  - name: non_idempotent
+    retry_codes: []
+  retry_params_def:
+  - name: default
+    initial_retry_delay_millis: 100
+    retry_delay_multiplier: 1.3
+    max_retry_delay_millis: 60000
+    initial_rpc_timeout_millis: 20000
+    rpc_timeout_multiplier: 1
+    max_rpc_timeout_millis: 20000
+    total_timeout_millis: 600000
+  methods:
+  - name: ListFunctions
+    flattening:
+      groups:
+      - parameters:
+        - location
+    required_fields:
+    - location
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: functions
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      location: location
+    timeout_millis: 60000
+  - name: GetFunction
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: function
+    timeout_millis: 60000
+  - name: CreateFunction
+    flattening:
+      groups:
+      - parameters:
+        - location
+        - function
+    required_fields:
+    - location
+    - function
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      location: location
+    timeout_millis: 60000
+    long_running:
+      return_type: google.cloud.functions.v1beta2.CloudFunction
+      metadata_type: google.cloud.functions.v1beta2.OperationMetadataV1Beta2
+      initial_poll_delay_millis: 20000
+      poll_delay_multiplier: 1.5
+      max_poll_delay_millis: 45000
+      total_poll_timeout_millis: 86400000
+  - name: UpdateFunction
+    flattening:
+      groups:
+      - parameters:
+        - name
+        - function
+    required_fields:
+    - name
+    - function
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: function
+    timeout_millis: 60000
+    long_running:
+      return_type: google.cloud.functions.v1beta2.CloudFunction
+      metadata_type: google.cloud.functions.v1beta2.OperationMetadataV1Beta2
+      initial_poll_delay_millis: 20000
+      poll_delay_multiplier: 1.5
+      max_poll_delay_millis: 45000
+      total_poll_timeout_millis: 86400000
+  - name: DeleteFunction
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: function
+    timeout_millis: 60000
+    long_running:
+      return_type: google.protobuf.Empty
+      metadata_type: google.cloud.functions.v1beta2.OperationMetadataV1Beta2
+      initial_poll_delay_millis: 20000
+      poll_delay_multiplier: 1.5
+      max_poll_delay_millis: 45000
+      total_poll_timeout_millis: 86400000
+  - name: CallFunction
+    flattening:
+      groups:
+      - parameters:
+        - name
+        - data
+    required_fields:
+    - name
+    - data
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: function
+    timeout_millis: 60000
diff --git a/google/cloud/functions/v1beta2/functions_gapic.yaml b/google/cloud/functions/v1beta2/functions_gapic.yaml
index 3f7e53ade..2a3cf0075 100644
--- a/google/cloud/functions/v1beta2/functions_gapic.yaml
+++ b/google/cloud/functions/v1beta2/functions_gapic.yaml
@@ -1,5 +1,5 @@
 type: com.google.api.codegen.ConfigProto
-config_schema_version: 1.0.0
+config_schema_version: 2.0.0
 language_settings:
   java:
     package_name: com.google.cloud.functions.v1beta2
@@ -16,133 +16,3 @@ language_settings:
   nodejs:
     package_name: functions.v1beta2
     domain_layer_location: google-cloud
-interfaces:
-- name: google.cloud.functions.v1beta2.CloudFunctionsService
-  collections:
-  - name_pattern: projects/{project}/locations/{location}
-    entity_name: location
-  - name_pattern: projects/{project}/locations/{location}/functions/{function}
-    entity_name: function
-  retry_codes_def:
-  - name: idempotent
-    retry_codes:
-    - UNAVAILABLE
-    - DEADLINE_EXCEEDED
-  - name: non_idempotent
-    retry_codes: []
-  retry_params_def:
-  - name: default
-    initial_retry_delay_millis: 100
-    retry_delay_multiplier: 1.3
-    max_retry_delay_millis: 60000
-    initial_rpc_timeout_millis: 20000
-    rpc_timeout_multiplier: 1
-    max_rpc_timeout_millis: 20000
-    total_timeout_millis: 600000
-  methods:
-  - name: ListFunctions
-    flattening:
-      groups:
-      - parameters:
-        - location
-    required_fields:
-    - location
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: functions
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      location: location
-    timeout_millis: 60000
-  - name: GetFunction
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: function
-    timeout_millis: 60000
-  - name: CreateFunction
-    flattening:
-      groups:
-      - parameters:
-        - location
-        - function
-    required_fields:
-    - location
-    - function
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      location: location
-    timeout_millis: 60000
-    long_running:
-      return_type: google.cloud.functions.v1beta2.CloudFunction
-      metadata_type: google.cloud.functions.v1beta2.OperationMetadataV1Beta2
-      initial_poll_delay_millis: 20000
-      poll_delay_multiplier: 1.5
-      max_poll_delay_millis: 45000
-      total_poll_timeout_millis: 86400000
-  - name: UpdateFunction
-    flattening:
-      groups:
-      - parameters:
-        - name
-        - function
-    required_fields:
-    - name
-    - function
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: function
-    timeout_millis: 60000
-    long_running:
-      return_type: google.cloud.functions.v1beta2.CloudFunction
-      metadata_type: google.cloud.functions.v1beta2.OperationMetadataV1Beta2
-      initial_poll_delay_millis: 20000
-      poll_delay_multiplier: 1.5
-      max_poll_delay_millis: 45000
-      total_poll_timeout_millis: 86400000
-  - name: DeleteFunction
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: function
-    timeout_millis: 60000
-    long_running:
-      return_type: google.protobuf.Empty
-      metadata_type: google.cloud.functions.v1beta2.OperationMetadataV1Beta2
-      initial_poll_delay_millis: 20000
-      poll_delay_multiplier: 1.5
-      max_poll_delay_millis: 45000
-      total_poll_timeout_millis: 86400000
-  - name: CallFunction
-    flattening:
-      groups:
-      - parameters:
-        - name
-        - data
-    required_fields:
-    - name
-    - data
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: function
-    timeout_millis: 60000
diff --git a/google/cloud/functions/v1beta2/functions_grpc_service_config.json b/google/cloud/functions/v1beta2/functions_grpc_service_config.json
new file mode 100755
index 000000000..1def2eb5b
--- /dev/null
+++ b/google/cloud/functions/v1beta2/functions_grpc_service_config.json
@@ -0,0 +1,47 @@
+{
+  "methodConfig": [
+    {
+      "name": [
+        {
+          "service": "google.cloud.functions.v1beta2.CloudFunctionsService",
+          "method": "ListFunctions"
+        },
+        {
+          "service": "google.cloud.functions.v1beta2.CloudFunctionsService",
+          "method": "GetFunction"
+        },
+        {
+          "service": "google.cloud.functions.v1beta2.CloudFunctionsService",
+          "method": "UpdateFunction"
+        },
+        {
+          "service": "google.cloud.functions.v1beta2.CloudFunctionsService",
+          "method": "DeleteFunction"
+        }
+      ],
+      "timeout": "600s",
+      "retryPolicy": {
+        "initialBackoff": "0.100s",
+        "maxBackoff": "60s",
+        "backoffMultiplier": 1.3,
+        "retryableStatusCodes": [
+          "UNAVAILABLE",
+          "DEADLINE_EXCEEDED"
+        ]
+      }
+    },
+    {
+      "name": [
+        {
+          "service": "google.cloud.functions.v1beta2.CloudFunctionsService",
+          "method": "CreateFunction"
+        },
+        {
+          "service": "google.cloud.functions.v1beta2.CloudFunctionsService",
+          "method": "CallFunction"
+        }
+      ],
+      "timeout": "600s"
+    }
+  ]
+}
diff --git a/google/cloud/functions/v1beta2/operations.proto b/google/cloud/functions/v1beta2/operations.proto
index 1456a924e..222f2828b 100644
--- a/google/cloud/functions/v1beta2/operations.proto
+++ b/google/cloud/functions/v1beta2/operations.proto
@@ -1,4 +1,4 @@
-// Copyright 2017 Google Inc.
+// Copyright 2019 Google LLC.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -11,32 +11,21 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
+//
 
 syntax = "proto3";
 
 package google.cloud.functions.v1beta2;
 
-import "google/api/annotations.proto";
 import "google/protobuf/any.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
 
 option go_package = "google.golang.org/genproto/googleapis/cloud/functions/v1beta2;functions";
 option java_multiple_files = true;
 option java_outer_classname = "FunctionsOperationsProto";
 option java_package = "com.google.cloud.functions.v1beta2";
 
-// Metadata describing an [Operation][google.longrunning.Operation]
-message OperationMetadataV1Beta2 {
-  // Target of the operation - for example
-  // projects/project-1/locations/region-1/functions/function-1
-  string target = 1;
-
-  // Type of operation.
-  OperationType type = 2;
-
-  // The original request that started the operation.
-  google.protobuf.Any request = 3;
-}
-
 // A type of an operation.
 enum OperationType {
   // Unknown operation type.
@@ -51,3 +40,23 @@ enum OperationType {
   // Triggered by DeleteFunction call.
   DELETE_FUNCTION = 3;
 }
+
+// Metadata describing an [Operation][google.longrunning.Operation]
+message OperationMetadataV1Beta2 {
+  // Target of the operation - for example
+  // projects/project-1/locations/region-1/functions/function-1
+  string target = 1;
+
+  // Type of operation.
+  OperationType type = 2;
+
+  // The original request that started the operation.
+  google.protobuf.Any request = 3;
+
+  // Version id of the function created or updated by an API call.
+  // This field is only populated for Create and Update operations.
+  int64 version_id = 4;
+
+  // The last update timestamp of the operation.
+  google.protobuf.Timestamp update_time = 5;
+}
diff --git a/google/cloud/gaming/v1beta/BUILD.bazel b/google/cloud/gaming/v1beta/BUILD.bazel
new file mode 100644
index 000000000..cce3a1e8d
--- /dev/null
+++ b/google/cloud/gaming/v1beta/BUILD.bazel
@@ -0,0 +1,381 @@
+# This file was automatically generated by BuildFileGenerator
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
+
+proto_library(
+    name = "gaming_proto",
+    srcs = [
+        "common.proto",
+        "game_server_clusters.proto",
+        "game_server_clusters_service.proto",
+        "game_server_configs.proto",
+        "game_server_configs_service.proto",
+        "game_server_deployments.proto",
+        "game_server_deployments_service.proto",
+        "realms.proto",
+        "realms_service.proto",
+    ],
+    deps = [
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/api:resource_proto",
+        "//google/longrunning:operations_proto",
+        "@com_google_protobuf//:duration_proto",
+        "@com_google_protobuf//:field_mask_proto",
+        "@com_google_protobuf//:timestamp_proto",
+    ],
+)
+
+proto_library_with_info(
+    name = "gaming_proto_with_info",
+    deps = [
+        ":gaming_proto",
+        "//google/cloud:common_resources_proto",
+    ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "java_gapic_assembly_gradle_pkg",
+    "java_gapic_library",
+    "java_gapic_test",
+    "java_grpc_library",
+    "java_proto_library",
+)
+
+java_proto_library(
+    name = "gaming_java_proto",
+    deps = [":gaming_proto"],
+)
+
+java_grpc_library(
+    name = "gaming_java_grpc",
+    srcs = [":gaming_proto"],
+    deps = [":gaming_java_proto"],
+)
+
+java_gapic_library(
+    name = "gaming_java_gapic",
+    src = ":gaming_proto_with_info",
+    gapic_yaml = "gaming_gapic.yaml",
+    package = "google.cloud.gaming.v1beta",
+    service_yaml = "gameservices_v1beta.yaml",
+    test_deps = [
+        ":gaming_java_grpc",
+    ],
+    deps = [
+        ":gaming_java_proto",
+    ],
+)
+
+java_gapic_test(
+    name = "gaming_java_gapic_test_suite",
+    test_classes = [
+        "com.google.cloud.gaming.v1beta.GameServerClustersServiceClientTest",
+        "com.google.cloud.gaming.v1beta.GameServerConfigsServiceClientTest",
+        "com.google.cloud.gaming.v1beta.GameServerDeploymentsServiceClientTest",
+        "com.google.cloud.gaming.v1beta.RealmsServiceClientTest",
+    ],
+    runtime_deps = [":gaming_java_gapic_test"],
+)
+
+# Open Source Packages
+java_gapic_assembly_gradle_pkg(
+    name = "google-cloud-gaming-v1beta-java",
+    deps = [
+        ":gaming_java_gapic",
+        ":gaming_java_grpc",
+        ":gaming_java_proto",
+        ":gaming_proto",
+    ],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "go_gapic_assembly_pkg",
+    "go_gapic_library",
+    "go_proto_library",
+    "go_test",
+)
+
+go_proto_library(
+    name = "gaming_go_proto",
+    compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+    importpath = "google.golang.org/genproto/googleapis/cloud/gaming/v1beta",
+    protos = [":gaming_proto"],
+    deps = [
+        "//google/api:annotations_go_proto",
+        "//google/longrunning:longrunning_go_proto",
+    ],
+)
+
+go_gapic_library(
+    name = "gaming_go_gapic",
+    srcs = [":gaming_proto_with_info"],
+    grpc_service_config = "",
+    importpath = "cloud.google.com/go/gaming/apiv1beta;gaming",
+    service_yaml = "gameservices_v1beta.yaml",
+    deps = [
+        ":gaming_go_proto",
+        "//google/longrunning:longrunning_go_gapic",
+        "//google/longrunning:longrunning_go_proto",
+        "@com_google_cloud_go//longrunning:go_default_library",
+        "@com_google_cloud_go//longrunning/autogen:go_default_library",
+        "@io_bazel_rules_go//proto/wkt:duration_go_proto",
+    ],
+)
+
+go_test(
+    name = "gaming_go_gapic_test",
+    srcs = [":gaming_go_gapic_srcjar_test"],
+    embed = [":gaming_go_gapic"],
+    importpath = "cloud.google.com/go/gaming/apiv1beta",
+)
+
+# Open Source Packages
+go_gapic_assembly_pkg(
+    name = "gapi-cloud-gaming-v1beta-go",
+    deps = [
+        ":gaming_go_gapic",
+        ":gaming_go_gapic_srcjar-test.srcjar",
+        ":gaming_go_proto",
+    ],
+)
+
+##############################################################################
+# Python
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "moved_proto_library",
+    "py_gapic_assembly_pkg",
+    "py_gapic_library",
+    "py_grpc_library",
+    "py_proto_library",
+)
+
+moved_proto_library(
+    name = "gaming_moved_proto",
+    srcs = [":gaming_proto"],
+    deps = [
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/api:resource_proto",
+        "//google/longrunning:operations_proto",
+        "@com_google_protobuf//:duration_proto",
+        "@com_google_protobuf//:field_mask_proto",
+        "@com_google_protobuf//:timestamp_proto",
+    ],
+)
+
+py_proto_library(
+    name = "gaming_py_proto",
+    plugin = "@protoc_docs_plugin//:docs_plugin",
+    deps = [":gaming_moved_proto"],
+)
+
+py_grpc_library(
+    name = "gaming_py_grpc",
+    srcs = [":gaming_moved_proto"],
+    deps = [":gaming_py_proto"],
+)
+
+py_gapic_library(
+    name = "gaming_py_gapic",
+    src = ":gaming_proto_with_info",
+    gapic_yaml = "gaming_gapic.yaml",
+    package = "google.cloud.gaming.v1beta",
+    service_yaml = "gameservices_v1beta.yaml",
+    deps = [
+        ":gaming_py_grpc",
+        ":gaming_py_proto",
+    ],
+)
+
+# Open Source Packages
+py_gapic_assembly_pkg(
+    name = "gaming-v1beta-py",
+    deps = [
+        ":gaming_py_gapic",
+        ":gaming_py_grpc",
+        ":gaming_py_proto",
+    ],
+)
+
+##############################################################################
+# PHP
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "php_gapic_assembly_pkg",
+    "php_gapic_library",
+    "php_grpc_library",
+    "php_proto_library",
+)
+
+php_proto_library(
+    name = "gaming_php_proto",
+    deps = [":gaming_proto"],
+)
+
+php_grpc_library(
+    name = "gaming_php_grpc",
+    srcs = [":gaming_proto"],
+    deps = [":gaming_php_proto"],
+)
+
+php_gapic_library(
+    name = "gaming_php_gapic",
+    src = ":gaming_proto_with_info",
+    gapic_yaml = "gaming_gapic.yaml",
+    package = "google.cloud.gaming.v1beta",
+    service_yaml = "gameservices_v1beta.yaml",
+    deps = [
+        ":gaming_php_grpc",
+        ":gaming_php_proto",
+    ],
+)
+
+# Open Source Packages
+php_gapic_assembly_pkg(
+    name = "google-cloud-gaming-v1beta-php",
+    deps = [
+        ":gaming_php_gapic",
+        ":gaming_php_grpc",
+        ":gaming_php_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)
+
+nodejs_gapic_library(
+    name = "gaming_nodejs_gapic",
+    src = ":gaming_proto_with_info",
+    gapic_yaml = "gaming_gapic.yaml",
+    package = "google.cloud.gaming.v1beta",
+    service_yaml = "gameservices_v1beta.yaml",
+    deps = [],
+)
+
+nodejs_gapic_assembly_pkg(
+    name = "gaming-v1beta-nodejs",
+    deps = [
+        ":gaming_nodejs_gapic",
+        ":gaming_proto",
+    ],
+)
+
+##############################################################################
+# Ruby
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "ruby_gapic_assembly_pkg",
+    "ruby_gapic_library",
+    "ruby_grpc_library",
+    "ruby_proto_library",
+)
+
+ruby_proto_library(
+    name = "gaming_ruby_proto",
+    deps = [":gaming_proto"],
+)
+
+ruby_grpc_library(
+    name = "gaming_ruby_grpc",
+    srcs = [":gaming_proto"],
+    deps = [":gaming_ruby_proto"],
+)
+
+ruby_gapic_library(
+    name = "gaming_ruby_gapic",
+    src = ":gaming_proto_with_info",
+    gapic_yaml = "gaming_gapic.yaml",
+    package = "google.cloud.gaming.v1beta",
+    service_yaml = "gameservices_v1beta.yaml",
+    deps = [
+        ":gaming_ruby_grpc",
+        ":gaming_ruby_proto",
+    ],
+)
+
+# Open Source Packages
+ruby_gapic_assembly_pkg(
+    name = "google-cloud-gaming-v1beta-ruby",
+    deps = [
+        ":gaming_ruby_gapic",
+        ":gaming_ruby_grpc",
+        ":gaming_ruby_proto",
+    ],
+)
+
+##############################################################################
+# C#
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "csharp_gapic_assembly_pkg",
+    "csharp_gapic_library",
+    "csharp_grpc_library",
+    "csharp_proto_library",
+)
+
+csharp_proto_library(
+    name = "gaming_csharp_proto",
+    deps = [":gaming_proto"],
+)
+
+csharp_grpc_library(
+    name = "gaming_csharp_grpc",
+    srcs = [":gaming_proto"],
+    deps = [":gaming_csharp_proto"],
+)
+
+csharp_gapic_library(
+    name = "gaming_csharp_gapic",
+    src = ":gaming_proto_with_info",
+    gapic_yaml = "gaming_gapic.yaml",
+    package = "google.cloud.gaming.v1beta",
+    service_yaml = "gameservices_v1beta.yaml",
+    deps = [
+        ":gaming_csharp_grpc",
+        ":gaming_csharp_proto",
+    ],
+)
+
+# Open Source Packages
+csharp_gapic_assembly_pkg(
+    name = "google-cloud-gaming-v1beta-csharp",
+    deps = [
+        ":gaming_csharp_gapic",
+        ":gaming_csharp_grpc",
+        ":gaming_csharp_proto",
+    ],
+)
+
+##############################################################################
+# C++
+##############################################################################
+# Put your C++ rules here
diff --git a/google/cloud/gaming/v1beta/common.proto b/google/cloud/gaming/v1beta/common.proto
new file mode 100644
index 000000000..027272cf3
--- /dev/null
+++ b/google/cloud/gaming/v1beta/common.proto
@@ -0,0 +1,241 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.gaming.v1beta;
+
+import "google/api/field_behavior.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1beta;gaming";
+
+option java_multiple_files = true;
+option java_package = "com.google.cloud.gaming.v1beta";
+
+// Represents the metadata of the long-running operation.
+message OperationMetadata {
+  // Output only. The time the operation was created.
+  google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The time the operation finished running.
+  google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. Server-defined resource path for the target of the operation.
+  string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. Name of the verb executed by the operation.
+  string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. Human-readable status of the operation, if any.
+  string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. Identifies whether the user has requested cancellation
+  // of the operation. Operations that have successfully been cancelled
+  // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+  // corresponding to `Code.CANCELLED`.
+  bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. API version used to start the operation.
+  string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. List of Locations that could not be reached.
+  repeated string unreachable = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. Operation status for gameservices API operations. Operation status is in
+  // the form of key-value pairs where keys are resource IDs and the values show
+  // the status of the operation. In case of failures, the value includes an
+  // error code and error message.
+  map operation_status = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+message OperationStatus {
+  enum ErrorCode {
+    ERROR_CODE_UNSPECIFIED = 0;
+
+    INTERNAL_ERROR = 1;
+
+    PERMISSION_DENIED = 2;
+
+    CLUSTER_CONNECTION = 3;
+  }
+
+  // Output only. Whether the operation is done or still in progress.
+  bool done = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // The error code in case of failures.
+  ErrorCode error_code = 2;
+
+  // The human-readable error message.
+  string error_message = 3;
+}
+
+// The label selector, used to group labels on the resources.
+message LabelSelector {
+  // Resource labels for this selector.
+  map labels = 1;
+}
+
+// The Realm selector, used to match Realm resources.
+message RealmSelector {
+  // List of Realms to match.
+  repeated string realms = 1;
+}
+
+// The schedule of a recurring or one time event. The event's time span is
+// specified by start_time and end_time. If the scheduled event's timespan is
+// larger than the cron_spec + cron_job_duration, the event will be recurring.
+// If only cron_spec + cron_job_duration are specified, the event is effective
+// starting at the local time specified by cron_spec, and is recurring.
+//
+//   start_time|-------[cron job]-------[cron job]-------[cron job]---|end_time
+//   cron job: cron spec start time + duration
+message Schedule {
+  // The start time of the event.
+  google.protobuf.Timestamp start_time = 1;
+
+  // The end time of the event.
+  google.protobuf.Timestamp end_time = 2;
+
+  // The duration for the cron job event. The duration of the event is effective
+  // after the cron job's start time.
+  google.protobuf.Duration cron_job_duration = 3;
+
+  // The cron definition of the scheduled event. See
+  // https://en.wikipedia.org/wiki/Cron. Cron spec specifies the local time as
+  // defined by the Realm.
+  string cron_spec = 4;
+}
+
+// Encapsulates Agones fleet spec and Agones autoscaler spec sources.
+message SpecSource {
+  // The Game Server Config resource. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`.
+  string game_server_config_name = 1;
+
+  // The name of the Agones leet config or Agones scaling config used to derive
+  // the Agones fleet or Agones autoscaler spec.
+  string name = 2;
+}
+
+// Details about the Agones resources.
+message TargetDetails {
+  // Details of the target Agones fleet.
+  message TargetFleetDetails {
+    // Target Agones fleet specification.
+    message TargetFleet {
+      // The name of the Agones fleet.
+      string name = 1;
+
+      // Encapsulates the source of the Agones fleet spec.
+      // The Agones fleet spec source.
+      SpecSource spec_source = 2;
+    }
+
+    // Target Agones autoscaler policy reference.
+    message TargetFleetAutoscaler {
+      // The name of the Agones autoscaler.
+      string name = 1;
+
+      // Encapsulates the source of the Agones fleet spec.
+      // Details about the Agones autoscaler spec.
+      SpecSource spec_source = 2;
+    }
+
+    // Reference to target Agones fleet.
+    TargetFleet fleet = 1;
+
+    // Reference to target Agones fleet autoscaling policy.
+    TargetFleetAutoscaler autoscaler = 2;
+  }
+
+  // The Game Server Cluster name. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`.
+  string game_server_cluster_name = 1;
+
+  // The Game Server Deployment name. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}`.
+  string game_server_deployment_name = 2;
+
+  // Agones fleet details for Game Server Clusters and Game Server Deployments.
+  repeated TargetFleetDetails fleet_details = 3;
+}
+
+// Encapsulates the Target state.
+message TargetState {
+  // Details about Agones fleets.
+  repeated TargetDetails details = 1;
+}
+
+// Details of the deployed Agones fleet.
+message DeployedFleetDetails {
+  // Agones fleet specification and details.
+  message DeployedFleet {
+    // DeployedFleetStatus has details about the Agones fleets such as how many
+    // are running, how many allocated, and so on.
+    message DeployedFleetStatus {
+      // The number of GameServer replicas in the READY state in this fleet.
+      int64 ready_replicas = 1;
+
+      // The number of GameServer replicas in the ALLOCATED state in this fleet.
+      int64 allocated_replicas = 2;
+
+      // The number of GameServer replicas in the RESERVED state in this fleet.
+      // Reserved instances won't be deleted on scale down, but won't cause
+      // an autoscaler to scale up.
+      int64 reserved_replicas = 3;
+
+      // The total number of current GameServer replicas in this fleet.
+      int64 replicas = 4;
+    }
+
+    // The name of the Agones fleet.
+    string fleet = 1;
+
+    // The fleet spec retrieved from the Agones fleet.
+    string fleet_spec = 2;
+
+    // The source spec that is used to create the Agones fleet.
+    // The GameServerConfig resource may no longer exist in the system.
+    SpecSource spec_source = 3;
+
+    // The current status of the Agones fleet.
+    // Includes count of game servers in various states.
+    DeployedFleetStatus status = 5;
+  }
+
+  // Details about the Agones autoscaler.
+  message DeployedFleetAutoscaler {
+    // The name of the Agones autoscaler.
+    string autoscaler = 1;
+
+    // The source spec that is used to create the autoscaler.
+    // The GameServerConfig resource may no longer exist in the system.
+    SpecSource spec_source = 4;
+
+    // The autoscaler spec retrieved from Agones.
+    string fleet_autoscaler_spec = 3;
+  }
+
+  // Information about the Agones fleet.
+  DeployedFleet deployed_fleet = 1;
+
+  // Information about the Agones autoscaler for that fleet.
+  DeployedFleetAutoscaler deployed_autoscaler = 2;
+}
diff --git a/google/cloud/gaming/v1beta/game_server_clusters.proto b/google/cloud/gaming/v1beta/game_server_clusters.proto
new file mode 100644
index 000000000..fd67a112b
--- /dev/null
+++ b/google/cloud/gaming/v1beta/game_server_clusters.proto
@@ -0,0 +1,275 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.gaming.v1beta;
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/cloud/gaming/v1beta/common.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1beta;gaming";
+
+option java_multiple_files = true;
+option java_package = "com.google.cloud.gaming.v1beta";
+
+// Request message for GameServerClustersService.ListGameServerClusters.
+message ListGameServerClustersRequest {
+  // Required. The parent resource name. Uses the form:
+  // "projects/{project}/locations/{location}/realms/{realm}".
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      child_type: "gameservices.googleapis.com/GameServerCluster"
+    }
+  ];
+
+  // Optional. The maximum number of items to return.  If unspecified, server
+  // will pick an appropriate default. Server may return fewer items than
+  // requested. A caller should only rely on response's
+  // [next_page_token][google.cloud.gaming.v1beta.ListGameServerClustersResponse.next_page_token] to
+  // determine if there are more GameServerClusters left to be queried.
+  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. The next_page_token value returned from a previous List request, if any.
+  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. The filter to apply to list results.
+  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Specifies the ordering of results following syntax at
+  // https://cloud.google.com/apis/design/design_patterns#sorting_order.
+  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Response message for GameServerClustersService.ListGameServerClusters.
+message ListGameServerClustersResponse {
+  // The list of Game Server Clusters.
+  repeated GameServerCluster game_server_clusters = 1;
+
+  // Token to retrieve the next page of results, or empty if there are no more
+  // results in the list.
+  string next_page_token = 2;
+
+  // List of Locations that could not be reached.
+  repeated string unreachable = 4;
+}
+
+// Request message for GameServerClustersService.GetGameServerCluster.
+message GetGameServerClusterRequest {
+  // Required. The name of the Game Server Cluster to retrieve. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "gameservices.googleapis.com/GameServerCluster"
+    }
+  ];
+}
+
+// Request message for GameServerClustersService.CreateGameServerCluster.
+message CreateGameServerClusterRequest {
+  // Required. The parent resource name. Uses the form:
+  // `projects/{project}/locations/{location}/realms/{realm-id}`.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      child_type: "gameservices.googleapis.com/GameServerCluster"
+    }
+  ];
+
+  // Required. The ID of the Game Server Cluster resource to be created.
+  string game_server_cluster_id = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The Game Server Cluster resource to be created.
+  GameServerCluster game_server_cluster = 3 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for GameServerClustersService.PreviewCreateGameServerCluster.
+message PreviewCreateGameServerClusterRequest {
+  // Required. The parent resource name. Uses the form:
+  // `projects/{project}/locations/{location}/realms/{realm}`.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      child_type: "gameservices.googleapis.com/GameServerCluster"
+    }
+  ];
+
+  // Required. The ID of the Game Server Cluster resource to be created.
+  string game_server_cluster_id = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The Game Server Cluster resource to be created.
+  GameServerCluster game_server_cluster = 3 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. The target timestamp to compute the preview.
+  google.protobuf.Timestamp preview_time = 4 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Response message for
+// GameServerClustersService.PreviewCreateGameServerCluster.
+message PreviewCreateGameServerClusterResponse {
+  // The ETag of the game server cluster.
+  string etag = 2;
+
+  // The target state.
+  TargetState target_state = 3;
+}
+
+// Request message for GameServerClustersService.DeleteGameServerCluster.
+message DeleteGameServerClusterRequest {
+  // Required. The name of the Game Server Cluster to delete. Uses the form:
+  // `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "gameservices.googleapis.com/GameServerCluster"
+    }
+  ];
+}
+
+// Request message for GameServerClustersService.PreviewDeleteGameServerCluster.
+message PreviewDeleteGameServerClusterRequest {
+  // Required. The name of the Game Server Cluster to delete. Uses the form:
+  // `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "gameservices.googleapis.com/GameServerCluster"
+    }
+  ];
+
+  // Optional. The target timestamp to compute the preview.
+  google.protobuf.Timestamp preview_time = 2 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Response message for
+// GameServerClustersService.PreviewDeleteGameServerCluster.
+message PreviewDeleteGameServerClusterResponse {
+  // The ETag of the game server cluster.
+  string etag = 2;
+
+  // The target state.
+  TargetState target_state = 3;
+}
+
+// Request message for GameServerClustersService.UpdateGameServerCluster.
+message UpdateGameServerClusterRequest {
+  // Required. The Game Server Cluster to be updated.
+  // Only fields specified in update_mask are updated.
+  GameServerCluster game_server_cluster = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Mask of fields to update. At least one path must be supplied in
+  // this field. For the `FieldMask` definition, see
+  //
+  // https:
+  // //developers.google.com/protocol-buffers
+  // // /docs/reference/google.protobuf#fieldmask
+  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for GameServerClustersService.UpdateGameServerCluster.
+message PreviewUpdateGameServerClusterRequest {
+  // Required. The Game Server Cluster to be updated.
+  // Only fields specified in update_mask are updated.
+  GameServerCluster game_server_cluster = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Mask of fields to update. At least one path must be supplied in
+  // this field. For the `FieldMask` definition, see
+  //
+  // https:
+  // //developers.google.com/protocol-buffers
+  // // /docs/reference/google.protobuf#fieldmask
+  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. The target timestamp to compute the preview.
+  google.protobuf.Timestamp preview_time = 3 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Response message for GameServerClustersService.PreviewUpdateGameServerCluster
+message PreviewUpdateGameServerClusterResponse {
+  // The ETag of the game server cluster.
+  string etag = 2;
+
+  // The target state.
+  TargetState target_state = 3;
+}
+
+// The Game Server Cluster connection information.
+message GameServerClusterConnectionInfo {
+  // The location of the Kubernetes cluster.
+  oneof cluster_reference {
+    // Reference to the GKE cluster where the game servers are installed.
+    GkeClusterReference gke_cluster_reference = 7;
+  }
+
+  // Namespace designated on the Game Server Cluster where the Agones game
+  // server instances will be created. Existence of the namespace will be
+  // validated during creation.
+  string namespace = 5;
+}
+
+// A reference to a GKE cluster.
+message GkeClusterReference {
+  // The full or partial name of a GKE cluster, using one of the following
+  // forms:
+  //  * `projects/{project}/locations/{location}/clusters/{cluster}`
+  //  * `locations/{location}/clusters/{cluster}`
+  //  * `{cluster}`
+  // If project and location are not specified, the project and location of the
+  // GameServerCluster resource are used to generate the full name of the
+  // GKE cluster.
+  string cluster = 1;
+}
+
+// A Game Server Cluster resource.
+message GameServerCluster {
+  option (google.api.resource) = {
+    type: "gameservices.googleapis.com/GameServerCluster"
+    pattern: "projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}"
+  };
+
+  // Required. The resource name of the Game Server Cluster. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`.
+  // For example,
+  //
+  // `projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`.
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Output only. The creation time.
+  google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The last-modified time.
+  google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // The labels associated with this Game Server Cluster. Each label is a
+  // key-value pair.
+  map labels = 4;
+
+  // Game Server Cluster connection information. This information is used to
+  // manage Game Server Clusters.
+  GameServerClusterConnectionInfo connection_info = 5;
+
+  // ETag of the resource.
+  string etag = 6;
+
+  // Human readable description of the cluster.
+  string description = 7;
+}
diff --git a/google/cloud/gaming/v1beta/game_server_clusters_service.proto b/google/cloud/gaming/v1beta/game_server_clusters_service.proto
new file mode 100644
index 000000000..2d81c4382
--- /dev/null
+++ b/google/cloud/gaming/v1beta/game_server_clusters_service.proto
@@ -0,0 +1,112 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.gaming.v1beta;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/cloud/gaming/v1beta/game_server_clusters.proto";
+import "google/longrunning/operations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1beta;gaming";
+
+option java_multiple_files = true;
+option java_package = "com.google.cloud.gaming.v1beta";
+
+// The game server cluster maps to Kubernetes clusters running Agones and is
+// used to manage fleets within clusters.
+service GameServerClustersService {
+  option (google.api.default_host) = "gameservices.googleapis.com";
+  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
+
+  // Lists Game Server Clusters in a given project and location.
+  rpc ListGameServerClusters(ListGameServerClustersRequest) returns (ListGameServerClustersResponse) {
+    option (google.api.http) = {
+      get: "/v1beta/{parent=projects/*/locations/*/realms/*}/gameServerClusters"
+    };
+    option (google.api.method_signature) = "parent";
+  }
+
+  // Gets details of a single game server cluster.
+  rpc GetGameServerCluster(GetGameServerClusterRequest) returns (GameServerCluster) {
+    option (google.api.http) = {
+      get: "/v1beta/{name=projects/*/locations/*/realms/*/gameServerClusters/*}"
+    };
+    option (google.api.method_signature) = "name";
+  }
+
+  // Creates a new game server cluster in a given project and location.
+  rpc CreateGameServerCluster(CreateGameServerClusterRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      post: "/v1beta/{parent=projects/*/locations/*/realms/*}/gameServerClusters"
+      body: "game_server_cluster"
+    };
+    option (google.api.method_signature) = "parent,game_server_cluster,game_server_cluster_id";
+    option (google.longrunning.operation_info) = {
+      response_type: "GameServerCluster"
+      metadata_type: "OperationMetadata"
+    };
+  }
+
+  // Previews creation of a new game server cluster in a given project and
+  // location.
+  rpc PreviewCreateGameServerCluster(PreviewCreateGameServerClusterRequest) returns (PreviewCreateGameServerClusterResponse) {
+    option (google.api.http) = {
+      post: "/v1beta/{parent=projects/*/locations/*/realms/*}/gameServerClusters:previewCreate"
+      body: "game_server_cluster"
+    };
+  }
+
+  // Deletes a single game server cluster.
+  rpc DeleteGameServerCluster(DeleteGameServerClusterRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      delete: "/v1beta/{name=projects/*/locations/*/realms/*/gameServerClusters/*}"
+    };
+    option (google.api.method_signature) = "name";
+    option (google.longrunning.operation_info) = {
+      response_type: "GameServerCluster"
+      metadata_type: "OperationMetadata"
+    };
+  }
+
+  // Previews deletion of a single game server cluster.
+  rpc PreviewDeleteGameServerCluster(PreviewDeleteGameServerClusterRequest) returns (PreviewDeleteGameServerClusterResponse) {
+    option (google.api.http) = {
+      delete: "/v1beta/{name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewDelete"
+    };
+  }
+
+  // Patches a single game server cluster.
+  rpc UpdateGameServerCluster(UpdateGameServerClusterRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      patch: "/v1beta/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}"
+      body: "game_server_cluster"
+    };
+    option (google.api.method_signature) = "game_server_cluster,update_mask";
+    option (google.longrunning.operation_info) = {
+      response_type: "GameServerCluster"
+      metadata_type: "OperationMetadata"
+    };
+  }
+
+  // Previews updating a GameServerCluster.
+  rpc PreviewUpdateGameServerCluster(PreviewUpdateGameServerClusterRequest) returns (PreviewUpdateGameServerClusterResponse) {
+    option (google.api.http) = {
+      patch: "/v1beta/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewUpdate"
+      body: "game_server_cluster"
+    };
+  }
+}
diff --git a/google/cloud/gaming/v1beta/game_server_configs.proto b/google/cloud/gaming/v1beta/game_server_configs.proto
new file mode 100644
index 000000000..ea0820bd7
--- /dev/null
+++ b/google/cloud/gaming/v1beta/game_server_configs.proto
@@ -0,0 +1,180 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.gaming.v1beta;
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/cloud/gaming/v1beta/common.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1beta;gaming";
+
+option java_multiple_files = true;
+option java_package = "com.google.cloud.gaming.v1beta";
+
+// Request message for GameServerConfigsService.ListGameServerConfigs.
+message ListGameServerConfigsRequest {
+  // Required. The parent resource name. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      child_type: "gameservices.googleapis.com/GameServerConfig"
+    }
+  ];
+
+  // Optional. The maximum number of items to return.  If unspecified, server
+  // will pick an appropriate default. Server may return fewer items than
+  // requested. A caller should only rely on response's
+  // [next_page_token][google.cloud.gaming.v1beta.ListGameServerConfigsResponse.next_page_token] to
+  // determine if there are more GameServerConfigs left to be queried.
+  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. The next_page_token value returned from a previous List request, if any.
+  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. The filter to apply to list results.
+  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Specifies the ordering of results following syntax at
+  // https://cloud.google.com/apis/design/design_patterns#sorting_order.
+  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Response message for GameServerConfigsService.ListGameServerConfigs.
+message ListGameServerConfigsResponse {
+  // The list of Game Server Configs.
+  repeated GameServerConfig game_server_configs = 1;
+
+  // Token to retrieve the next page of results, or empty if there are no more
+  // results in the list.
+  string next_page_token = 2;
+
+  // List of Locations that could not be reached.
+  repeated string unreachable = 4;
+}
+
+// Request message for GameServerConfigsService.GetGameServerConfig.
+message GetGameServerConfigRequest {
+  // Required. The name of the Game Server Config to retrieve. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "gameservices.googleapis.com/GameServerConfig"
+    }
+  ];
+}
+
+// Request message for GameServerConfigsService.CreateGameServerConfig.
+message CreateGameServerConfigRequest {
+  // Required. The parent resource name. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      child_type: "gameservices.googleapis.com/GameServerConfig"
+    }
+  ];
+
+  // Required. The ID of the Game Server Config resource to be created.
+  string config_id = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The Game Server Config resource to be created.
+  GameServerConfig game_server_config = 3 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for GameServerConfigsService.DeleteGameServerConfig.
+message DeleteGameServerConfigRequest {
+  // Required. The name of the Game Server Config to delete. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "gameservices.googleapis.com/GameServerConfig"
+    }
+  ];
+}
+
+// Autoscaling config for an Agones fleet.
+message ScalingConfig {
+  // Required. The name of the Scaling Config
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Agones fleet autoscaler spec. Example spec:
+  // https://agones.dev/site/docs/reference/fleetautoscaler/
+  string fleet_autoscaler_spec = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Labels used to identify the Game Server Clusters to which this Agones
+  // scaling config applies. A Game Server Cluster is subject to this Agones
+  // scaling config if its labels match any of the selector entries.
+  repeated LabelSelector selectors = 4;
+
+  // The schedules to which this Scaling Config applies.
+  repeated Schedule schedules = 5;
+}
+
+// Fleet configs for Agones.
+message FleetConfig {
+  // Agones fleet spec. Example spec:
+  // `https://agones.dev/site/docs/reference/fleet/`.
+  string fleet_spec = 1;
+
+  // The name of the FleetConfig.
+  string name = 2;
+}
+
+// A Game Server Config resource.
+message GameServerConfig {
+  option (google.api.resource) = {
+    type: "gameservices.googleapis.com/GameServerConfig"
+    pattern: "projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}"
+  };
+
+  // The resource name of the Game Server Config. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
+  // For example,
+  //
+  // `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`.
+  string name = 1;
+
+  // Output only. The creation time.
+  google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The last-modified time.
+  google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // The labels associated with this Game Server Config. Each label is a
+  // key-value pair.
+  map labels = 4;
+
+  // FleetConfig contains a list of Agones fleet specs. Only one FleetConfig
+  // is allowed.
+  repeated FleetConfig fleet_configs = 5;
+
+  // The autoscaling settings.
+  repeated ScalingConfig scaling_configs = 6;
+
+  // The description of the Game Server Config.
+  string description = 7;
+}
diff --git a/google/cloud/gaming/v1beta/game_server_configs_service.proto b/google/cloud/gaming/v1beta/game_server_configs_service.proto
new file mode 100644
index 000000000..29e886c50
--- /dev/null
+++ b/google/cloud/gaming/v1beta/game_server_configs_service.proto
@@ -0,0 +1,78 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.gaming.v1beta;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/cloud/gaming/v1beta/game_server_configs.proto";
+import "google/longrunning/operations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1beta;gaming";
+
+option java_multiple_files = true;
+option java_package = "com.google.cloud.gaming.v1beta";
+
+// The Game Server Config configures the game servers in an Agones fleet.
+service GameServerConfigsService {
+  option (google.api.default_host) = "gameservices.googleapis.com";
+  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
+
+  // Lists Game Server Configs in a given project, Location, and Game Server
+  // Deployment.
+  rpc ListGameServerConfigs(ListGameServerConfigsRequest) returns (ListGameServerConfigsResponse) {
+    option (google.api.http) = {
+      get: "/v1beta/{parent=projects/*/locations/*/gameServerDeployments/*}/configs"
+    };
+    option (google.api.method_signature) = "parent";
+  }
+
+  // Gets details of a single Game Server Config.
+  rpc GetGameServerConfig(GetGameServerConfigRequest) returns (GameServerConfig) {
+    option (google.api.http) = {
+      get: "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}"
+    };
+    option (google.api.method_signature) = "name";
+  }
+
+  // Creates a new Game Server Config in a given project, Location, and Game
+  // Server Deployment. Game Server Configs are immutable, and are not applied
+  // until referenced in the Game Server Deployment Rollout resource.
+  rpc CreateGameServerConfig(CreateGameServerConfigRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      post: "/v1beta/{parent=projects/*/locations/*/gameServerDeployments/*}/configs"
+      body: "game_server_config"
+    };
+    option (google.api.method_signature) = "parent,game_server_config";
+    option (google.longrunning.operation_info) = {
+      response_type: "GameServerConfig"
+      metadata_type: "OperationMetadata"
+    };
+  }
+
+  // Deletes a single Game Server Config. The deletion will fail if the Game
+  // Server Config is referenced in a Game Server Deployment Rollout.
+  rpc DeleteGameServerConfig(DeleteGameServerConfigRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      delete: "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}"
+    };
+    option (google.api.method_signature) = "name";
+    option (google.longrunning.operation_info) = {
+      response_type: "GameServerConfig"
+      metadata_type: "OperationMetadata"
+    };
+  }
+}
diff --git a/google/cloud/gaming/v1beta/game_server_deployments.proto b/google/cloud/gaming/v1beta/game_server_deployments.proto
new file mode 100644
index 000000000..2e87e386c
--- /dev/null
+++ b/google/cloud/gaming/v1beta/game_server_deployments.proto
@@ -0,0 +1,305 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.gaming.v1beta;
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/cloud/gaming/v1beta/common.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1beta;gaming";
+
+option java_multiple_files = true;
+option java_package = "com.google.cloud.gaming.v1beta";
+
+// Request message for GameServerDeploymentsService.ListGameServerDeployments.
+message ListGameServerDeploymentsRequest {
+  // Required. The parent resource name. Uses the form:
+  // `projects/{project}/locations/{location}`.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      child_type: "gameservices.googleapis.com/GameServerDeployment"
+    }
+  ];
+
+  // Optional. The maximum number of items to return.  If unspecified, server
+  // will pick an appropriate default. Server may return fewer items than
+  // requested. A caller should only rely on response's
+  // [next_page_token][google.cloud.gaming.v1beta.ListGameServerDeploymentsResponse.next_page_token] to
+  // determine if there are more GameServerDeployments left to be queried.
+  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. The next_page_token value returned from a previous List request,
+  // if any.
+  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. The filter to apply to list results.
+  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Specifies the ordering of results following syntax at
+  // https://cloud.google.com/apis/design/design_patterns#sorting_order.
+  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Response message for GameServerDeploymentsService.ListGameServerDeployments.
+message ListGameServerDeploymentsResponse {
+  // The list of Game Server Delpoyments.
+  repeated GameServerDeployment game_server_deployments = 1;
+
+  // Token to retrieve the next page of results, or empty if there are no more
+  // results in the list.
+  string next_page_token = 2;
+
+  // List of Locations that could not be reached.
+  repeated string unreachable = 4;
+}
+
+// Request message for GameServerDeploymentsService.GetGameServerDeployment.
+message GetGameServerDeploymentRequest {
+  // Required. The name of the Game Server Deployment to retrieve. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "gameservices.googleapis.com/GameServerDeployment"
+    }
+  ];
+}
+
+// Request message for
+// GameServerDeploymentsService.GetGameServerDeploymentRollout.
+message GetGameServerDeploymentRolloutRequest {
+  // Required. The name of the Game Server Deployment to retrieve. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "gameservices.googleapis.com/GameServerDeployment"
+    }
+  ];
+}
+
+// Request message for GameServerDeploymentsService.CreateGameServerDeployment.
+message CreateGameServerDeploymentRequest {
+  // Required. The parent resource name. Uses the form:
+  // `projects/{project}/locations/{location}`.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      child_type: "gameservices.googleapis.com/GameServerDeployment"
+    }
+  ];
+
+  // Required. The ID of the Game Server Deployment resource to be created.
+  string deployment_id = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The Game Server Deployment resource to be created.
+  GameServerDeployment game_server_deployment = 3 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for GameServerDeploymentsService.DeleteGameServerDeployment.
+message DeleteGameServerDeploymentRequest {
+  // Required. The name of the Game Server Deployment to delete. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "gameservices.googleapis.com/GameServerDeployment"
+    }
+  ];
+}
+
+// Request message for GameServerDeploymentsService.UpdateGameServerDeployment.
+// Only allows updates for labels.
+message UpdateGameServerDeploymentRequest {
+  // Required. The Game Server Deployment to be updated.
+  // Only fields specified in update_mask are updated.
+  GameServerDeployment game_server_deployment = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Mask of fields to update. At least one path must be supplied in
+  // this field. For the `FieldMask` definition, see
+  //
+  // https:
+  // //developers.google.com/protocol-buffers
+  // // /docs/reference/google.protobuf#fieldmask
+  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for
+// GameServerDeploymentsService.UpdateGameServerRolloutDeployment.
+message UpdateGameServerDeploymentRolloutRequest {
+  // Required. The Game Server Deployment Rollout to be updated.
+  // Only fields specified in update_mask are updated.
+  GameServerDeploymentRollout rollout = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Mask of fields to update. At least one path must be supplied in
+  // this field. For the `FieldMask` definition, see
+  //
+  // https:
+  // //developers.google.com/protocol-buffers
+  // // /docs/reference/google.protobuf#fieldmask
+  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for GameServerDeploymentsService.FetchDeploymentState.
+message FetchDeploymentStateRequest {
+  // Required. The name of the Game Server Deployment. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Response message for GameServerDeploymentsService.FetchDeploymentState.
+message FetchDeploymentStateResponse {
+  // The Game Server Cluster changes made by the Game Server Deployment.
+  message DeployedClusterState {
+    // The name of the cluster.
+    string cluster = 1;
+
+    // The details about the Agones fleets and autoscalers created in the
+    // Game Server Cluster.
+    repeated DeployedFleetDetails fleet_details = 2;
+  }
+
+  // The state of the Game Server Deployment in each Game Server Cluster.
+  repeated DeployedClusterState cluster_state = 1;
+
+  // List of Locations that could not be reached.
+  repeated string unavailable = 2;
+}
+
+// A Game Server Deployment resource.
+message GameServerDeployment {
+  option (google.api.resource) = {
+    type: "gameservices.googleapis.com/GameServerDeployment"
+    pattern: "projects/{project}/locations/{location}/gameServerDeployments/{deployment}"
+  };
+
+  // The resource name of the Game Server Deployment. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
+  // For example,
+  //
+  // `projects/my-project/locations/{location}/gameServerDeployments/my-deployment`.
+  string name = 1;
+
+  // Output only. The creation time.
+  google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The last-modified time.
+  google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // The labels associated with this Game Server Deployment. Each label is a
+  // key-value pair.
+  map labels = 4;
+
+  // ETag of the resource.
+  string etag = 7;
+
+  // Human readable description of the Game Server Deployment.
+  string description = 8;
+}
+
+// A Game Server Config override.
+message GameServerConfigOverride {
+  // Selector chooses the Game Server Config targets.
+  oneof selector {
+    // Selector for choosing applicable realms.
+    RealmSelector realms_selector = 1;
+  }
+
+  // Selects the Game Server Config and how it should be applied.
+  oneof change {
+    // The game server config for this override.
+    string config_version = 100;
+  }
+}
+
+// The Game Server Deployment Rollout which represents the desired rollout
+// state.
+message GameServerDeploymentRollout {
+  option (google.api.resource) = {
+    type: "gameservices.googleapis.com/GameServerDeploymentRollout"
+    pattern: "projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout"
+  };
+
+  // The resource name of the Game Server Deployment Rollout. Uses the form:
+  //
+  // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`.
+  // For example,
+  //
+  // `projects/my-project/locations/{location}/gameServerDeployments/my-deployment/rollout`.
+  string name = 1;
+
+  // Output only. The creation time.
+  google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The last-modified time.
+  google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // The default Game Server Config is applied to all Realms unless overridden
+  // in the Rollout. For example,
+  //
+  // `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`.
+  string default_game_server_config = 4;
+
+  // Contains the Game Server Config Rollout overrides. Overrides are processed
+  // in the order they are listed. Once a match is found for a Realm, the rest
+  // of the list is not processed.
+  repeated GameServerConfigOverride game_server_config_overrides = 5;
+
+  // ETag of the resource.
+  string etag = 6;
+}
+
+// Request message for PreviewGameServerDeploymentRollout.
+message PreviewGameServerDeploymentRolloutRequest {
+  // Required. The Game Server Deployment Rollout to be updated.
+  // Only fields specified in update_mask are updated.
+  GameServerDeploymentRollout rollout = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. Mask of fields to update. At least one path must be supplied in
+  // this field. For the `FieldMask` definition, see
+  //
+  // https:
+  // //developers.google.com/protocol-buffers
+  // // /docs/reference/google.protobuf#fieldmask
+  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. The target timestamp to compute the preview. Defaults to the immediately
+  // after the proposed Rollout completes.
+  google.protobuf.Timestamp preview_time = 3 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Response message for PreviewGameServerDeploymentRollout.
+// This has details about the Agones fleet and autoscaler to be actuated.
+message PreviewGameServerDeploymentRolloutResponse {
+  // Locations that could not be reached on this request.
+  repeated string unavailable = 2;
+
+  // ETag of the Game Server Deployment.
+  string etag = 3;
+
+  // The target state.
+  TargetState target_state = 4;
+}
diff --git a/google/cloud/gaming/v1beta/game_server_deployments_service.proto b/google/cloud/gaming/v1beta/game_server_deployments_service.proto
new file mode 100644
index 000000000..ccacfbacd
--- /dev/null
+++ b/google/cloud/gaming/v1beta/game_server_deployments_service.proto
@@ -0,0 +1,133 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.gaming.v1beta;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/cloud/gaming/v1beta/game_server_deployments.proto";
+import "google/longrunning/operations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1beta;gaming";
+
+option java_multiple_files = true;
+option java_package = "com.google.cloud.gaming.v1beta";
+
+// The Game Server Deployment is used to control the deployment of Agones
+// fleets.
+service GameServerDeploymentsService {
+  option (google.api.default_host) = "gameservices.googleapis.com";
+  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
+
+  // Lists Game Server Deployments in a given project and Location.
+  rpc ListGameServerDeployments(ListGameServerDeploymentsRequest) returns (ListGameServerDeploymentsResponse) {
+    option (google.api.http) = {
+      get: "/v1beta/{parent=projects/*/locations/*}/gameServerDeployments"
+    };
+    option (google.api.method_signature) = "parent";
+  }
+
+  // Gets details of a single Game Server Deployment.
+  rpc GetGameServerDeployment(GetGameServerDeploymentRequest) returns (GameServerDeployment) {
+    option (google.api.http) = {
+      get: "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*}"
+    };
+    option (google.api.method_signature) = "name";
+  }
+
+  // Creates a new Game Server Deployment in a given project and Location.
+  rpc CreateGameServerDeployment(CreateGameServerDeploymentRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      post: "/v1beta/{parent=projects/*/locations/*}/gameServerDeployments"
+      body: "game_server_deployment"
+    };
+    option (google.api.method_signature) = "parent,game_server_deployment";
+    option (google.longrunning.operation_info) = {
+      response_type: "GameServerDeployment"
+      metadata_type: "OperationMetadata"
+    };
+  }
+
+  // Deletes a single Game Server Deployment.
+  rpc DeleteGameServerDeployment(DeleteGameServerDeploymentRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      delete: "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*}"
+    };
+    option (google.api.method_signature) = "name";
+    option (google.longrunning.operation_info) = {
+      response_type: "GameServerDeployment"
+      metadata_type: "OperationMetadata"
+    };
+  }
+
+  // Patches a Game Server Deployment.
+  rpc UpdateGameServerDeployment(UpdateGameServerDeploymentRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      patch: "/v1beta/{game_server_deployment.name=projects/*/locations/*/gameServerDeployments/*}"
+      body: "game_server_deployment"
+    };
+    option (google.api.method_signature) = "game_server_deployment,update_mask";
+    option (google.longrunning.operation_info) = {
+      response_type: "GameServerDeployment"
+      metadata_type: "OperationMetadata"
+    };
+  }
+
+  // Gets details a single Game Server Deployment Rollout.
+  rpc GetGameServerDeploymentRollout(GetGameServerDeploymentRolloutRequest) returns (GameServerDeploymentRollout) {
+    option (google.api.http) = {
+      get: "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*}/rollout"
+    };
+    option (google.api.method_signature) = "name";
+  }
+
+  // Patches a single Game Server Deployment Rollout.
+  // The method will not return an error if the update does not affect any
+  // existing realms. For example - if the default_game_server_config is changed
+  // but all existing realms use the override, that is valid. Similarly, if a
+  // non existing realm is explicitly called out in game_server_config_overrides
+  // field, that will also not result in an error.
+  rpc UpdateGameServerDeploymentRollout(UpdateGameServerDeploymentRolloutRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      patch: "/v1beta/{rollout.name=projects/*/locations/*/gameServerDeployments/*}/rollout"
+      body: "rollout"
+    };
+    option (google.api.method_signature) = "rollout,update_mask";
+    option (google.longrunning.operation_info) = {
+      response_type: "GameServerDeployment"
+      metadata_type: "OperationMetadata"
+    };
+  }
+
+  // Previews the Game Server Deployment Rollout. This API does not mutate the
+  // Rollout resource.
+  rpc PreviewGameServerDeploymentRollout(PreviewGameServerDeploymentRolloutRequest) returns (PreviewGameServerDeploymentRolloutResponse) {
+    option (google.api.http) = {
+      patch: "/v1beta/{rollout.name=projects/*/locations/*/gameServerDeployments/*}/rollout:preview"
+      body: "rollout"
+    };
+  }
+
+  // Retrieves information about the current state of the Game Server
+  // Ddeployment. Gathers all the Agones fleets and Agones autoscalers,
+  // including fleets running an older version of the Game Server Deployment.
+  rpc FetchDeploymentState(FetchDeploymentStateRequest) returns (FetchDeploymentStateResponse) {
+    option (google.api.http) = {
+      post: "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*}:fetchDeploymentState"
+      body: "*"
+    };
+  }
+}
diff --git a/google/cloud/gaming/v1beta/gameservices_v1beta.yaml b/google/cloud/gaming/v1beta/gameservices_v1beta.yaml
new file mode 100644
index 000000000..dd3360396
--- /dev/null
+++ b/google/cloud/gaming/v1beta/gameservices_v1beta.yaml
@@ -0,0 +1,85 @@
+type: google.api.Service
+config_version: 3
+name: gameservices.googleapis.com
+title: Game Servers API
+
+apis:
+- name: google.cloud.gaming.v1beta.GameServerClustersService
+- name: google.cloud.gaming.v1beta.GameServerConfigsService
+- name: google.cloud.gaming.v1beta.GameServerDeploymentsService
+- name: google.cloud.gaming.v1beta.RealmsService
+
+types:
+- name: google.cloud.gaming.v1beta.LabelSelector
+- name: google.cloud.gaming.v1beta.OperationMetadata
+- name: google.cloud.gaming.v1beta.Schedule
+
+documentation:
+  summary: Deploy and manage infrastructure for global multiplayer gaming experiences.
+  rules:
+  - selector: google.iam.v1.IAMPolicy.GetIamPolicy
+    description: |-
+      Gets the access control policy for a resource. Returns an empty policy
+      if the resource exists and does not have a policy set.
+
+  - selector: google.iam.v1.IAMPolicy.SetIamPolicy
+    description: |-
+      Sets the access control policy on the specified resource. Replaces
+      any existing policy.
+
+      Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and
+      PERMISSION_DENIED
+
+  - selector: google.iam.v1.IAMPolicy.TestIamPermissions
+    description: |-
+      Returns permissions that a caller has on the specified resource. If the
+      resource does not exist, this will return an empty set of
+      permissions, not a NOT_FOUND error.
+
+      Note: This operation is designed to be used for building
+      permission-aware UIs and command-line tools, not for authorization
+      checking. This operation may "fail open" without warning.
+
+backend:
+  rules:
+  - selector: 'google.cloud.gaming.v1beta.GameServerClustersService.*'
+    deadline: 60.0
+  - selector: 'google.cloud.gaming.v1beta.GameServerConfigsService.*'
+    deadline: 60.0
+  - selector: 'google.cloud.gaming.v1beta.GameServerDeploymentsService.*'
+    deadline: 60.0
+  - selector: 'google.cloud.gaming.v1beta.RealmsService.*'
+    deadline: 60.0
+  - selector: 'google.iam.v1.IAMPolicy.*'
+    deadline: 60.0
+  - selector: 'google.longrunning.Operations.*'
+    deadline: 60.0
+  - selector: google.longrunning.Operations.GetOperation
+    deadline: 5.0
+
+authentication:
+  rules:
+  - selector: 'google.cloud.gaming.v1beta.GameServerClustersService.*'
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
+  - selector: 'google.cloud.gaming.v1beta.GameServerConfigsService.*'
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
+  - selector: 'google.cloud.gaming.v1beta.GameServerDeploymentsService.*'
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
+  - selector: 'google.cloud.gaming.v1beta.RealmsService.*'
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
+  - selector: 'google.iam.v1.IAMPolicy.*'
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
+  - selector: 'google.longrunning.Operations.*'
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/gaming/v1beta/gaming_gapic.yaml b/google/cloud/gaming/v1beta/gaming_gapic.yaml
new file mode 100644
index 000000000..ae7bbe0a4
--- /dev/null
+++ b/google/cloud/gaming/v1beta/gaming_gapic.yaml
@@ -0,0 +1,19 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 2.0.0
+# The settings of generated code in a specific language.
+language_settings:
+  java:
+    package_name: com.google.cloud.gaming.v1beta
+  python:
+    package_name: google.cloud.gaming_v1beta.gapic
+  ruby:
+    package_name: Google::Cloud::Gaming::V1Beta
+  php:
+    package_name: Google\Cloud\Gaming\V1Beta
+  go:
+    package_name: cloud.google.com/go/gaming/apiv1beta
+  csharp:
+    package_name: Google.Cloud.Gaming.V1Beta
+  nodejs:
+    package_name: gaming.v1beta
+    domain_layer_location: google-cloud
diff --git a/google/cloud/gaming/v1beta/realms.proto b/google/cloud/gaming/v1beta/realms.proto
new file mode 100644
index 000000000..c1fa9982f
--- /dev/null
+++ b/google/cloud/gaming/v1beta/realms.proto
@@ -0,0 +1,189 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.gaming.v1beta;
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/cloud/gaming/v1beta/common.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1beta;gaming";
+
+option java_multiple_files = true;
+option java_package = "com.google.cloud.gaming.v1beta";
+
+// Request message for RealmsService.ListRealms.
+message ListRealmsRequest {
+  // Required. The parent resource name. Uses the form:
+  // `projects/{project}/locations/{location}`.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      child_type: "gameservices.googleapis.com/Realm"
+    }
+  ];
+
+  // Optional. The maximum number of items to return.  If unspecified, server
+  // will pick an appropriate default. Server may return fewer items than
+  // requested. A caller should only rely on response's
+  // [next_page_token][google.cloud.gaming.v1beta.ListRealmsResponse.next_page_token] to
+  // determine if there are more Realms left to be queried.
+  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. The next_page_token value returned from a previous List request,
+  // if any.
+  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. The filter to apply to list results.
+  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Specifies the ordering of results following syntax at
+  // https://cloud.google.com/apis/design/design_patterns#sorting_order.
+  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Response message for RealmsService.ListRealms.
+message ListRealmsResponse {
+  // The list of Realms.
+  repeated Realm realms = 1;
+
+  // Token to retrieve the next page of results, or empty if there are no more
+  // results in the list.
+  string next_page_token = 2;
+
+  // List of Locations that could not be reached.
+  repeated string unreachable = 3;
+}
+
+// Request message for RealmsService.GetRealm.
+message GetRealmRequest {
+  // Required. The name of the Realm to retrieve. Uses the form:
+  // `projects/{project}/locations/{location}/realms/{realm}`.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "gameservices.googleapis.com/Realm"
+    }
+  ];
+}
+
+// Request message for RealmsService.CreateRealm.
+message CreateRealmRequest {
+  // Required. The parent resource name. Uses the form:
+  // `projects/{project}/locations/{location}`.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      child_type: "gameservices.googleapis.com/Realm"
+    }
+  ];
+
+  // Required. The ID of the Realm resource to be created.
+  string realm_id = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The Realm resource to be created.
+  Realm realm = 3 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for RealmsService.DeleteRealm.
+message DeleteRealmRequest {
+  // Required. The name of the Realm to delete. Uses the form:
+  // `projects/{project}/locations/{location}/realms/{realm}`.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "gameservices.googleapis.com/Realm"
+    }
+  ];
+}
+
+// Request message for RealmsService.UpdateRealm.
+message UpdateRealmRequest {
+  // Required. The Realm to be updated.
+  // Only fields specified in update_mask are updated.
+  Realm realm = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The update mask applies to the resource. For the `FieldMask`
+  // definition, see
+  //
+  // https:
+  // //developers.google.com/protocol-buffers
+  // // /docs/reference/google.protobuf#fieldmask
+  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for RealmsService.PreviewRealmUpdate.
+message PreviewRealmUpdateRequest {
+  // Required. The Realm to be updated.
+  // Only fields specified in update_mask are updated.
+  Realm realm = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The update mask applies to the resource. For the `FieldMask`
+  // definition, see
+  //
+  // https:
+  // //developers.google.com/protocol-buffers
+  // // /docs/reference/google.protobuf#fieldmask
+  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. The target timestamp to compute the preview.
+  google.protobuf.Timestamp preview_time = 3 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Response message for RealmsService.PreviewRealmUpdate.
+message PreviewRealmUpdateResponse {
+  // ETag of the realm.
+  string etag = 2;
+
+  // The target state.
+  TargetState target_state = 3;
+}
+
+// A Realm resource.
+message Realm {
+  option (google.api.resource) = {
+    type: "gameservices.googleapis.com/Realm"
+    pattern: "projects/{project}/locations/{location}/realms/{realm}"
+  };
+
+  // The resource name of the Realm. Uses the form:
+  // `projects/{project}/locations/{location}/realms/{realm}`. For
+  // example, `projects/my-project/locations/{location}/realms/my-realm`.
+  string name = 1;
+
+  // Output only. The creation time.
+  google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The last-modified time.
+  google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // The labels associated with this Realm. Each label is a key-value pair.
+  map labels = 4;
+
+  // Required. Time zone where all policies targeting this Realm are evaluated. The value
+  // of this field must be from the IANA time zone database:
+  // https://www.iana.org/time-zones.
+  string time_zone = 6 [(google.api.field_behavior) = REQUIRED];
+
+  // ETag of the resource.
+  string etag = 7;
+
+  // Human readable description of the Realm.
+  string description = 8;
+}
diff --git a/google/cloud/gaming/v1beta/realms_service.proto b/google/cloud/gaming/v1beta/realms_service.proto
new file mode 100644
index 000000000..4c87cac3d
--- /dev/null
+++ b/google/cloud/gaming/v1beta/realms_service.proto
@@ -0,0 +1,96 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.gaming.v1beta;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/cloud/gaming/v1beta/realms.proto";
+import "google/longrunning/operations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1beta;gaming";
+
+option java_multiple_files = true;
+option java_package = "com.google.cloud.gaming.v1beta";
+
+// A Realm is a grouping of Game Server Clusters that are considered
+// interchangeable.
+service RealmsService {
+  option (google.api.default_host) = "gameservices.googleapis.com";
+  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
+
+  // Lists Realms in a given project and Location.
+  rpc ListRealms(ListRealmsRequest) returns (ListRealmsResponse) {
+    option (google.api.http) = {
+      get: "/v1beta/{parent=projects/*/locations/*}/realms"
+    };
+    option (google.api.method_signature) = "parent";
+  }
+
+  // Gets details of a single Realm.
+  rpc GetRealm(GetRealmRequest) returns (Realm) {
+    option (google.api.http) = {
+      get: "/v1beta/{name=projects/*/locations/*/realms/*}"
+    };
+    option (google.api.method_signature) = "name";
+  }
+
+  // Creates a new Realm in a given project and Location.
+  rpc CreateRealm(CreateRealmRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      post: "/v1beta/{parent=projects/*/locations/*}/realms"
+      body: "realm"
+    };
+    option (google.api.method_signature) = "parent,realm,realm_id";
+    option (google.longrunning.operation_info) = {
+      response_type: "Realm"
+      metadata_type: "OperationMetadata"
+    };
+  }
+
+  // Deletes a single Realm.
+  rpc DeleteRealm(DeleteRealmRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      delete: "/v1beta/{name=projects/*/locations/*/realms/*}"
+    };
+    option (google.api.method_signature) = "name";
+    option (google.longrunning.operation_info) = {
+      response_type: "Realm"
+      metadata_type: "OperationMetadata"
+    };
+  }
+
+  // Patches a single Realm.
+  rpc UpdateRealm(UpdateRealmRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      patch: "/v1beta/{realm.name=projects/*/locations/*/realms/*}"
+      body: "realm"
+    };
+    option (google.api.method_signature) = "realm,update_mask";
+    option (google.longrunning.operation_info) = {
+      response_type: "Realm"
+      metadata_type: "OperationMetadata"
+    };
+  }
+
+  // Previews patches to a single Realm.
+  rpc PreviewRealmUpdate(PreviewRealmUpdateRequest) returns (PreviewRealmUpdateResponse) {
+    option (google.api.http) = {
+      patch: "/v1beta/{realm.name=projects/*/locations/*/realms/*}:previewUpdate"
+      body: "realm"
+    };
+  }
+}
diff --git a/google/cloud/iot/BUILD.bazel b/google/cloud/iot/BUILD.bazel
index 1e5b8c2af..a87c57fec 100644
--- a/google/cloud/iot/BUILD.bazel
+++ b/google/cloud/iot/BUILD.bazel
@@ -1 +1 @@
-exports_files(glob(["*.yaml"]))
\ No newline at end of file
+exports_files(glob(["*.yaml"]))
diff --git a/google/cloud/iot/artman_cloudiot.yaml b/google/cloud/iot/artman_cloudiot.yaml
index 4ff6d9a40..a52a9a284 100644
--- a/google/cloud/iot/artman_cloudiot.yaml
+++ b/google/cloud/iot/artman_cloudiot.yaml
@@ -3,13 +3,14 @@ common:
   api_version: v1
   organization_name: google-cloud
   proto_deps:
-    - name: google-common-protos
-    - name: google-iam-v1
-      proto_path: google/iam/v1
+  - name: google-common-protos
+  - name: google-iam-v1
+    proto_path: google/iam/v1
   src_proto_paths:
   - v1
-  service_yaml: cloudiot.yaml
+  service_yaml: v1/cloudiot_v1.yaml
   gapic_yaml: v1/cloudiot_gapic.yaml
+  proto_package: google.cloud.iot.v1
 artifacts:
 - name: gapic_config
   type: GAPIC_CONFIG
diff --git a/google/cloud/iot/v1/BUILD.bazel b/google/cloud/iot/v1/BUILD.bazel
index b7a137950..4e582b59d 100644
--- a/google/cloud/iot/v1/BUILD.bazel
+++ b/google/cloud/iot/v1/BUILD.bazel
@@ -1,9 +1,12 @@
+# This file was automatically generated by BuildFileGenerator
+
 # This is an API workspace, having public visibility by default makes perfect sense.
 package(default_visibility = ["//visibility:public"])
 
 ##############################################################################
 # Common
 ##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
 load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
 
 proto_library(
@@ -14,10 +17,12 @@ proto_library(
     ],
     deps = [
         "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/api:resource_proto",
         "//google/iam/v1:iam_policy_proto",
         "//google/iam/v1:policy_proto",
         "//google/rpc:status_proto",
-        "@com_google_protobuf//:duration_proto",
         "@com_google_protobuf//:empty_proto",
         "@com_google_protobuf//:field_mask_proto",
         "@com_google_protobuf//:timestamp_proto",
@@ -26,7 +31,10 @@ proto_library(
 
 proto_library_with_info(
     name = "iot_proto_with_info",
-    deps = [":iot_proto"],
+    deps = [
+        ":iot_proto",
+        "//google/cloud:common_resources_proto",
+    ],
 )
 
 ##############################################################################
@@ -34,19 +42,13 @@ proto_library_with_info(
 ##############################################################################
 load(
     "@com_google_googleapis_imports//:imports.bzl",
-    "java_grpc_library",
-    "java_gapic_library",
     "java_gapic_assembly_gradle_pkg",
+    "java_gapic_library",
+    "java_gapic_test",
+    "java_grpc_library",
     "java_proto_library",
-    "java_resource_name_proto_library",
-    "java_test",
 )
 
-_JAVA_GRPC_DEPS = [
-    "@com_google_api_grpc_proto_google_common_protos//jar",
-    "@com_google_api_grpc_proto_google_iam_v1//jar",
-]
-
 java_proto_library(
     name = "iot_java_proto",
     deps = [":iot_proto"],
@@ -55,51 +57,42 @@ java_proto_library(
 java_grpc_library(
     name = "iot_java_grpc",
     srcs = [":iot_proto"],
-    deps = [":iot_java_proto"] + _JAVA_GRPC_DEPS,
-)
-
-java_resource_name_proto_library(
-    name = "iot_resource_name_java_proto",
-    gapic_yaml = "cloudiot_gapic.yaml",
-    deps = [":iot_proto"],
+    deps = [":iot_java_proto"],
 )
 
 java_gapic_library(
     name = "iot_java_gapic",
     src = ":iot_proto_with_info",
     gapic_yaml = "cloudiot_gapic.yaml",
-    service_yaml = "//google/cloud/iot:cloudiot.yaml",
-    test_deps = [":iot_java_grpc"],
+    package = "google.cloud.iot.v1",
+    service_yaml = "cloudiot_v1.yaml",
+    test_deps = [
+        ":iot_java_grpc",
+        "//google/iam/v1:iam_java_grpc",
+    ],
     deps = [
         ":iot_java_proto",
-        ":iot_resource_name_java_proto",
-    ] + _JAVA_GRPC_DEPS,
+        "//google/iam/v1:iam_java_proto",
+    ],
 )
 
-[java_test(
-    name = test_name,
-    test_class = test_name,
-    runtime_deps = [
-        ":iot_java_gapic_test",
+java_gapic_test(
+    name = "iot_java_gapic_test_suite",
+    test_classes = [
+        "com.google.cloud.iot.v1.DeviceManagerClientTest",
     ],
-) for test_name in [
-    "com.google.cloud.iot.v1.DeviceManagerClientTest",
-]]
+    runtime_deps = [":iot_java_gapic_test"],
+)
 
-# Opensource Packages
+# Open Source Packages
 java_gapic_assembly_gradle_pkg(
     name = "google-cloud-iot-v1-java",
-    client_deps = [":iot_java_gapic"],
-    client_group = "com.google.cloud",
-    client_test_deps = [":iot_java_gapic_test"],
-    grpc_deps = [":iot_java_grpc"],
-    grpc_group = "com.google.api.grpc",
-    proto_deps = [
+    deps = [
+        ":iot_java_gapic",
+        ":iot_java_grpc",
         ":iot_java_proto",
         ":iot_proto",
-        ":iot_resource_name_java_proto",
-    ] + _JAVA_GRPC_DEPS,
-    version = "0.0.0-SNAPSHOT",
+    ],
 )
 
 ##############################################################################
@@ -107,10 +100,10 @@ java_gapic_assembly_gradle_pkg(
 ##############################################################################
 load(
     "@com_google_googleapis_imports//:imports.bzl",
+    "go_gapic_assembly_pkg",
+    "go_gapic_library",
     "go_proto_library",
     "go_test",
-    "go_gapic_library",
-    "go_gapic_assembly_pkg",
 )
 
 go_proto_library(
@@ -127,10 +120,10 @@ go_proto_library(
 
 go_gapic_library(
     name = "iot_go_gapic",
-    src = ":iot_proto_with_info",
-    gapic_yaml = "cloudiot_gapic.yaml",
-    importpath = "cloud.google.com/go/iot/apiv1",
-    service_yaml = "//google/cloud/iot:cloudiot.yaml",
+    srcs = [":iot_proto_with_info"],
+    grpc_service_config = "cloudiot_grpc_service_config.json",
+    importpath = "cloud.google.com/go/iot/apiv1;iot",
+    service_yaml = "cloudiot_v1.yaml",
     deps = [
         ":iot_go_proto",
         "//google/iam/v1:iam_go_proto",
@@ -144,13 +137,238 @@ go_test(
     importpath = "cloud.google.com/go/iot/apiv1",
 )
 
-# Opensource Packages
+# Open Source Packages
 go_gapic_assembly_pkg(
     name = "gapi-cloud-iot-v1-go",
     deps = [
         ":iot_go_gapic",
-        ":iot_go_gapic_srcjar-smoke-test.srcjar",
         ":iot_go_gapic_srcjar-test.srcjar",
         ":iot_go_proto",
     ],
 )
+
+##############################################################################
+# Python
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "moved_proto_library",
+    "py_gapic_assembly_pkg",
+    "py_gapic_library",
+    "py_grpc_library",
+    "py_proto_library",
+)
+
+moved_proto_library(
+    name = "iot_moved_proto",
+    srcs = [":iot_proto"],
+    deps = [
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/api:resource_proto",
+        "//google/iam/v1:iam_policy_proto",
+        "//google/iam/v1:policy_proto",
+        "//google/rpc:status_proto",
+        "@com_google_protobuf//:empty_proto",
+        "@com_google_protobuf//:field_mask_proto",
+        "@com_google_protobuf//:timestamp_proto",
+    ],
+)
+
+py_proto_library(
+    name = "iot_py_proto",
+    plugin = "@protoc_docs_plugin//:docs_plugin",
+    deps = [":iot_moved_proto"],
+)
+
+py_grpc_library(
+    name = "iot_py_grpc",
+    srcs = [":iot_moved_proto"],
+    deps = [":iot_py_proto"],
+)
+
+py_gapic_library(
+    name = "iot_py_gapic",
+    src = ":iot_proto_with_info",
+    gapic_yaml = "cloudiot_gapic.yaml",
+    package = "google.cloud.iot.v1",
+    service_yaml = "cloudiot_v1.yaml",
+    deps = [
+        ":iot_py_grpc",
+        ":iot_py_proto",
+    ],
+)
+
+# Open Source Packages
+py_gapic_assembly_pkg(
+    name = "iot-v1-py",
+    deps = [
+        ":iot_py_gapic",
+        ":iot_py_grpc",
+        ":iot_py_proto",
+    ],
+)
+
+##############################################################################
+# PHP
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "php_gapic_assembly_pkg",
+    "php_gapic_library",
+    "php_grpc_library",
+    "php_proto_library",
+)
+
+php_proto_library(
+    name = "iot_php_proto",
+    deps = [":iot_proto"],
+)
+
+php_grpc_library(
+    name = "iot_php_grpc",
+    srcs = [":iot_proto"],
+    deps = [":iot_php_proto"],
+)
+
+php_gapic_library(
+    name = "iot_php_gapic",
+    src = ":iot_proto_with_info",
+    gapic_yaml = "cloudiot_gapic.yaml",
+    package = "google.cloud.iot.v1",
+    service_yaml = "cloudiot_v1.yaml",
+    deps = [
+        ":iot_php_grpc",
+        ":iot_php_proto",
+    ],
+)
+
+# Open Source Packages
+php_gapic_assembly_pkg(
+    name = "google-cloud-iot-v1-php",
+    deps = [
+        ":iot_php_gapic",
+        ":iot_php_grpc",
+        ":iot_php_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)
+
+nodejs_gapic_library(
+    name = "iot_nodejs_gapic",
+    src = ":iot_proto_with_info",
+    gapic_yaml = "cloudiot_gapic.yaml",
+    package = "google.cloud.iot.v1",
+    service_yaml = "cloudiot_v1.yaml",
+    deps = [],
+)
+
+nodejs_gapic_assembly_pkg(
+    name = "iot-v1-nodejs",
+    deps = [
+        ":iot_nodejs_gapic",
+        ":iot_proto",
+    ],
+)
+
+##############################################################################
+# Ruby
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "ruby_gapic_assembly_pkg",
+    "ruby_gapic_library",
+    "ruby_grpc_library",
+    "ruby_proto_library",
+)
+
+ruby_proto_library(
+    name = "iot_ruby_proto",
+    deps = [":iot_proto"],
+)
+
+ruby_grpc_library(
+    name = "iot_ruby_grpc",
+    srcs = [":iot_proto"],
+    deps = [":iot_ruby_proto"],
+)
+
+ruby_gapic_library(
+    name = "iot_ruby_gapic",
+    src = ":iot_proto_with_info",
+    gapic_yaml = "cloudiot_gapic.yaml",
+    package = "google.cloud.iot.v1",
+    service_yaml = "cloudiot_v1.yaml",
+    deps = [
+        ":iot_ruby_grpc",
+        ":iot_ruby_proto",
+    ],
+)
+
+# Open Source Packages
+ruby_gapic_assembly_pkg(
+    name = "google-cloud-iot-v1-ruby",
+    deps = [
+        ":iot_ruby_gapic",
+        ":iot_ruby_grpc",
+        ":iot_ruby_proto",
+    ],
+)
+
+##############################################################################
+# C#
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "csharp_gapic_assembly_pkg",
+    "csharp_gapic_library",
+    "csharp_grpc_library",
+    "csharp_proto_library",
+)
+
+csharp_proto_library(
+    name = "iot_csharp_proto",
+    deps = [":iot_proto"],
+)
+
+csharp_grpc_library(
+    name = "iot_csharp_grpc",
+    srcs = [":iot_proto"],
+    deps = [":iot_csharp_proto"],
+)
+
+csharp_gapic_library(
+    name = "iot_csharp_gapic",
+    src = ":iot_proto_with_info",
+    gapic_yaml = "cloudiot_gapic.yaml",
+    package = "google.cloud.iot.v1",
+    service_yaml = "cloudiot_v1.yaml",
+    deps = [
+        ":iot_csharp_grpc",
+        ":iot_csharp_proto",
+    ],
+)
+
+# Open Source Packages
+csharp_gapic_assembly_pkg(
+    name = "google-cloud-iot-v1-csharp",
+    deps = [
+        ":iot_csharp_gapic",
+        ":iot_csharp_grpc",
+        ":iot_csharp_proto",
+    ],
+)
+
+##############################################################################
+# C++
+##############################################################################
+# Put your C++ rules here
diff --git a/google/cloud/iot/v1/cloudiot_gapic.legacy.yaml b/google/cloud/iot/v1/cloudiot_gapic.legacy.yaml
new file mode 100644
index 000000000..56a230dfe
--- /dev/null
+++ b/google/cloud/iot/v1/cloudiot_gapic.legacy.yaml
@@ -0,0 +1,513 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+  java:
+    package_name: com.google.cloud.iot.v1
+  python:
+    package_name: google.cloud.iot_v1.gapic
+  go:
+    package_name: cloud.google.com/go/iot/apiv1
+  csharp:
+    package_name: Google.Cloud.Iot.V1
+  ruby:
+    package_name: Google::Cloud::Iot::V1
+  php:
+    package_name: Google\Cloud\Iot\V1
+  nodejs:
+    package_name: iot.v1
+    domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+- name: google.cloud.iot.v1.DeviceManager
+  # A list of resource collection configurations.
+  # Consists of a name_pattern and an entity_name.
+  # The name_pattern is a pattern to describe the names of the resources of this
+  # collection, using the platform's conventions for URI patterns. A generator
+  # may use this to generate methods to compose and decompose such names. The
+  # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+  # those will be taken as hints for the parameter names of the generated
+  # methods. If empty, no name methods are generated.
+  # The entity_name is the name to be used as a basis for generated methods and
+  # classes.
+  collections:
+  - name_pattern: projects/{project}/locations/{location}
+    entity_name: location
+  - name_pattern: projects/{project}/locations/{location}/registries/{registry}
+    entity_name: registry
+  - name_pattern: projects/{project}/locations/{location}/registries/{registry}/devices/{device}
+    entity_name: device
+  # Definition for smoke test.
+  smoke_test:
+    method: ListDeviceRegistries
+    init_fields:
+    - parent%project=$PROJECT_ID
+    - parent%location="us-central1"
+  # Definition for retryable codes.
+  retry_codes_def:
+  - name: idempotent
+    retry_codes:
+    - UNAVAILABLE
+    - DEADLINE_EXCEEDED
+  - name: non_idempotent
+    retry_codes: []
+  - name: rate_limited_aware
+    retry_codes:
+    - UNAVAILABLE
+    - DEADLINE_EXCEEDED
+    - RESOURCE_EXHAUSTED
+  # Definition for retry/backoff parameters.
+  retry_params_def:
+  - name: default
+    initial_retry_delay_millis: 100
+    retry_delay_multiplier: 1.3
+    max_retry_delay_millis: 60000
+    initial_rpc_timeout_millis: 20000
+    rpc_timeout_multiplier: 1
+    max_rpc_timeout_millis: 20000
+    total_timeout_millis: 120000
+  - name: rate_limited_aware
+    initial_retry_delay_millis: 1000
+    retry_delay_multiplier: 1.3
+    max_retry_delay_millis: 60000
+    initial_rpc_timeout_millis: 20000
+    rpc_timeout_multiplier: 1
+    max_rpc_timeout_millis: 20000
+    total_timeout_millis: 120000
+  # A list of method configurations.
+  # Common properties:
+  #
+  #   name - The simple name of the method.
+  #
+  #   flattening - Specifies the configuration for parameter flattening.
+  #   Describes the parameter groups for which a generator should produce method
+  #   overloads which allow a client to directly pass request message fields as
+  #   method parameters. This information may or may not be used, depending on
+  #   the target language.
+  #   Consists of groups, which each represent a list of parameters to be
+  #   flattened. Each parameter listed must be a field of the request message.
+  #
+  #   required_fields - Fields that are always required for a request to be
+  #   valid.
+  #
+  #   resource_name_treatment - An enum that specifies how to treat the resource
+  #   name formats defined in the field_name_patterns and
+  #   response_field_name_patterns fields.
+  #   UNSET: default value
+  #   NONE: the collection configs will not be used by the generated code.
+  #   VALIDATE: string fields will be validated by the client against the
+  #   specified resource name formats.
+  #   STATIC_TYPES: the client will use generated types for resource names.
+  #
+  #   page_streaming - Specifies the configuration for paging.
+  #   Describes information for generating a method which transforms a paging
+  #   list RPC into a stream of resources.
+  #   Consists of a request and a response.
+  #   The request specifies request information of the list method. It defines
+  #   which fields match the paging pattern in the request. The request consists
+  #   of a page_size_field and a token_field. The page_size_field is the name of
+  #   the optional field specifying the maximum number of elements to be
+  #   returned in the response. The token_field is the name of the field in the
+  #   request containing the page token.
+  #   The response specifies response information of the list method. It defines
+  #   which fields match the paging pattern in the response. The response
+  #   consists of a token_field and a resources_field. The token_field is the
+  #   name of the field in the response containing the next page token. The
+  #   resources_field is the name of the field in the response containing the
+  #   list of resources belonging to the page.
+  #
+  #   retry_codes_name - Specifies the configuration for retryable codes. The
+  #   name must be defined in interfaces.retry_codes_def.
+  #
+  #   retry_params_name - Specifies the configuration for retry/backoff
+  #   parameters. The name must be defined in interfaces.retry_params_def.
+  #
+  #   field_name_patterns - Maps the field name of the request type to
+  #   entity_name of interfaces.collections.
+  #   Specifies the string pattern that the field must follow.
+  #
+  #   timeout_millis - Specifies the default timeout for a non-retrying call. If
+  #   the call is retrying, refer to retry_params_name instead.
+  methods:
+  - name: CreateDeviceRegistry
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - device_registry
+    required_fields:
+    - parent
+    - device_registry
+    header_request_params:
+    - parent
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: location
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: GetDeviceRegistry
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    header_request_params:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: registry
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: UpdateDeviceRegistry
+    flattening:
+      groups:
+      - parameters:
+        - device_registry
+        - update_mask
+    required_fields:
+    - device_registry
+    - update_mask
+    header_request_params:
+    - device_registry.name
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      device_registry.name: registry
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: DeleteDeviceRegistry
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    header_request_params:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: registry
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: ListDeviceRegistries
+    flattening:
+      groups:
+      - parameters:
+        - parent
+    required_fields:
+    - parent
+    header_request_params:
+    - parent
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: device_registries
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: location
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: CreateDevice
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - device
+    required_fields:
+    - parent
+    - device
+    header_request_params:
+    - parent
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: registry
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: GetDevice
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    header_request_params:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: device
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: UpdateDevice
+    flattening:
+      groups:
+      - parameters:
+        - device
+        - update_mask
+    required_fields:
+    - device
+    - update_mask
+    header_request_params:
+    - device.name
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      device.name: device
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: DeleteDevice
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    header_request_params:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: device
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: ListDevices
+    flattening:
+      groups:
+      - parameters:
+        - parent
+    required_fields:
+    - parent
+    header_request_params:
+    - parent
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: devices
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: registry
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: ModifyCloudToDeviceConfig
+    flattening:
+      groups:
+      - parameters:
+        - name
+        - binary_data
+    required_fields:
+    - name
+    - binary_data
+    header_request_params:
+    - name
+    retry_codes_name: rate_limited_aware
+    retry_params_name: rate_limited_aware
+    field_name_patterns:
+      name: device
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: ListDeviceConfigVersions
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    header_request_params:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: device
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: ListDeviceStates
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    header_request_params:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: device
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: SetIamPolicy
+    flattening:
+      groups:
+      - parameters:
+        - resource
+        - policy
+    required_fields:
+    - resource
+    - policy
+    header_request_params:
+    - resource
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      resource: registry
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: GetIamPolicy
+    flattening:
+      groups:
+      - parameters:
+        - resource
+    required_fields:
+    - resource
+    header_request_params:
+    - resource
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      resource: registry
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: TestIamPermissions
+    flattening:
+      groups:
+      - parameters:
+        - resource
+        - permissions
+    required_fields:
+    - resource
+    - permissions
+    header_request_params:
+    - resource
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      resource: registry
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: SendCommandToDevice
+    flattening:
+      groups:
+      - parameters:
+        - name
+        - binary_data
+        - subfolder
+    required_fields:
+    - name
+    - binary_data
+    header_request_params:
+    - name
+    retry_codes_name: rate_limited_aware
+    retry_params_name: rate_limited_aware
+    field_name_patterns:
+      name: device
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: BindDeviceToGateway
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - gateway_id
+        - device_id
+    required_fields:
+    - parent
+    - gateway_id
+    - device_id
+    header_request_params:
+    - parent
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: registry
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: UnbindDeviceFromGateway
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - gateway_id
+        - device_id
+    required_fields:
+    - parent
+    - gateway_id
+    - device_id
+    header_request_params:
+    - parent
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: registry
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+resource_name_generation:
+- message_name: google.iam.v1.SetIamPolicyRequest
+  field_entity_map:
+    resource: "*"
+- message_name: google.iam.v1.GetIamPolicyRequest
+  field_entity_map:
+    resource: "*"
+- message_name: google.iam.v1.TestIamPermissionsRequest
+  field_entity_map:
+    resource: "*"
+- message_name: CreateDeviceRegistryRequest
+  field_entity_map:
+    parent: location
+- message_name: GetDeviceRegistryRequest
+  field_entity_map:
+    name: registry
+- message_name: DeleteDeviceRegistryRequest
+  field_entity_map:
+    name: registry
+- message_name: ListDeviceRegistriesRequest
+  field_entity_map:
+    parent: location
+- message_name: CreateDeviceRequest
+  field_entity_map:
+    parent: registry
+- message_name: GetDeviceRequest
+  field_entity_map:
+    name: device
+- message_name: DeleteDeviceRequest
+  field_entity_map:
+    name: device
+- message_name: ListDevicesRequest
+  field_entity_map:
+    parent: registry
+- message_name: ModifyCloudToDeviceConfigRequest
+  field_entity_map:
+    name: device
+- message_name: ListDeviceConfigVersionsRequest
+  field_entity_map:
+    name: device
+- message_name: ListDeviceStatesRequest
+  field_entity_map:
+    name: device
+- message_name: SendCommandToDeviceRequest
+  field_entity_map:
+    name: device
+- message_name: BindDeviceToGatewayRequest
+  field_entity_map:
+    parent: registry
+- message_name: UnbindDeviceFromGatewayRequest
+  field_entity_map:
+    parent: registry
+- message_name: Device
+  field_entity_map:
+    name: device
+- message_name: DeviceRegistry
+  field_entity_map:
+    name: registry
diff --git a/google/cloud/iot/v1/cloudiot_gapic.yaml b/google/cloud/iot/v1/cloudiot_gapic.yaml
index 72ed2c09b..37fef5cac 100644
--- a/google/cloud/iot/v1/cloudiot_gapic.yaml
+++ b/google/cloud/iot/v1/cloudiot_gapic.yaml
@@ -1,5 +1,5 @@
 type: com.google.api.codegen.ConfigProto
-config_schema_version: 1.0.0
+config_schema_version: 2.0.0
 # The settings of generated code in a specific language.
 language_settings:
   java:
@@ -8,6 +8,7 @@ language_settings:
     package_name: google.cloud.iot_v1.gapic
   go:
     package_name: cloud.google.com/go/iot/apiv1
+    release_level: GA
   csharp:
     package_name: Google.Cloud.Iot.V1
   ruby:
@@ -17,41 +18,14 @@ language_settings:
   nodejs:
     package_name: iot.v1
     domain_layer_location: google-cloud
-# A list of API interface configurations.
 interfaces:
-  # The fully qualified name of the API interface.
 - name: google.cloud.iot.v1.DeviceManager
-  # A list of resource collection configurations.
-  # Consists of a name_pattern and an entity_name.
-  # The name_pattern is a pattern to describe the names of the resources of this
-  # collection, using the platform's conventions for URI patterns. A generator
-  # may use this to generate methods to compose and decompose such names. The
-  # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
-  # those will be taken as hints for the parameter names of the generated
-  # methods. If empty, no name methods are generated.
-  # The entity_name is the name to be used as a basis for generated methods and
-  # classes.
-  collections:
-  - name_pattern: projects/{project}/locations/{location}
-    entity_name: location
-  - name_pattern: projects/{project}/locations/{location}/registries/{registry}
-    entity_name: registry
-  - name_pattern: projects/{project}/locations/{location}/registries/{registry}/devices/{device}
-    entity_name: device
-  # Definition for smoke test.
   smoke_test:
     method: ListDeviceRegistries
     init_fields:
     - parent%project=$PROJECT_ID
     - parent%location="us-central1"
-  # Definition for retryable codes.
   retry_codes_def:
-  - name: idempotent
-    retry_codes:
-    - UNAVAILABLE
-    - DEADLINE_EXCEEDED
-  - name: non_idempotent
-    retry_codes: []
   - name: rate_limited_aware
     retry_codes:
     - UNAVAILABLE
@@ -75,440 +49,14 @@ interfaces:
     rpc_timeout_multiplier: 1
     max_rpc_timeout_millis: 20000
     total_timeout_millis: 120000
-  # A list of method configurations.
-  # Common properties:
-  #
-  #   name - The simple name of the method.
-  #
-  #   flattening - Specifies the configuration for parameter flattening.
-  #   Describes the parameter groups for which a generator should produce method
-  #   overloads which allow a client to directly pass request message fields as
-  #   method parameters. This information may or may not be used, depending on
-  #   the target language.
-  #   Consists of groups, which each represent a list of parameters to be
-  #   flattened. Each parameter listed must be a field of the request message.
-  #
-  #   required_fields - Fields that are always required for a request to be
-  #   valid.
-  #
-  #   resource_name_treatment - An enum that specifies how to treat the resource
-  #   name formats defined in the field_name_patterns and
-  #   response_field_name_patterns fields.
-  #   UNSET: default value
-  #   NONE: the collection configs will not be used by the generated code.
-  #   VALIDATE: string fields will be validated by the client against the
-  #   specified resource name formats.
-  #   STATIC_TYPES: the client will use generated types for resource names.
-  #
-  #   page_streaming - Specifies the configuration for paging.
-  #   Describes information for generating a method which transforms a paging
-  #   list RPC into a stream of resources.
-  #   Consists of a request and a response.
-  #   The request specifies request information of the list method. It defines
-  #   which fields match the paging pattern in the request. The request consists
-  #   of a page_size_field and a token_field. The page_size_field is the name of
-  #   the optional field specifying the maximum number of elements to be
-  #   returned in the response. The token_field is the name of the field in the
-  #   request containing the page token.
-  #   The response specifies response information of the list method. It defines
-  #   which fields match the paging pattern in the response. The response
-  #   consists of a token_field and a resources_field. The token_field is the
-  #   name of the field in the response containing the next page token. The
-  #   resources_field is the name of the field in the response containing the
-  #   list of resources belonging to the page.
-  #
-  #   retry_codes_name - Specifies the configuration for retryable codes. The
-  #   name must be defined in interfaces.retry_codes_def.
-  #
-  #   retry_params_name - Specifies the configuration for retry/backoff
-  #   parameters. The name must be defined in interfaces.retry_params_def.
-  #
-  #   field_name_patterns - Maps the field name of the request type to
-  #   entity_name of interfaces.collections.
-  #   Specifies the string pattern that the field must follow.
-  #
-  #   timeout_millis - Specifies the default timeout for a non-retrying call. If
-  #   the call is retrying, refer to retry_params_name instead.
   methods:
-  - name: CreateDeviceRegistry
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - device_registry
-    required_fields:
-    - parent
-    - device_registry
-    header_request_params:
-    - parent
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: location
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-  - name: GetDeviceRegistry
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: registry
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-  - name: UpdateDeviceRegistry
-    flattening:
-      groups:
-      - parameters:
-        - device_registry
-        - update_mask
-    required_fields:
-    - device_registry
-    - update_mask
-    header_request_params:
-    - device_registry.name
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      device_registry.name: registry
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
   - name: DeleteDeviceRegistry
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: registry
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-  - name: ListDeviceRegistries
-    flattening:
-      groups:
-      - parameters:
-        - parent
-    required_fields:
-    - parent
-    header_request_params:
-    - parent
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: device_registries
     retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: location
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-  - name: CreateDevice
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - device
-    required_fields:
-    - parent
-    - device
-    header_request_params:
-    - parent
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: registry
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-  - name: GetDevice
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: device
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-  - name: UpdateDevice
-    flattening:
-      groups:
-      - parameters:
-        - device
-        - update_mask
-    required_fields:
-    - device
-    - update_mask
-    header_request_params:
-    - device.name
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      device.name: device
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
   - name: DeleteDevice
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: device
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-  - name: ListDevices
-    flattening:
-      groups:
-      - parameters:
-        - parent
-    required_fields:
-    - parent
-    header_request_params:
-    - parent
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: devices
     retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: registry
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
   - name: ModifyCloudToDeviceConfig
-    flattening:
-      groups:
-      - parameters:
-        - name
-        - binary_data
-    required_fields:
-    - name
-    - binary_data
-    header_request_params:
-    - name
     retry_codes_name: rate_limited_aware
     retry_params_name: rate_limited_aware
-    field_name_patterns:
-      name: device
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-  - name: ListDeviceConfigVersions
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: device
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-  - name: ListDeviceStates
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: device
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-  - name: SetIamPolicy
-    flattening:
-      groups:
-      - parameters:
-        - resource
-        - policy
-    required_fields:
-    - resource
-    - policy
-    header_request_params:
-    - resource
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      resource: registry
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-  - name: GetIamPolicy
-    flattening:
-      groups:
-      - parameters:
-        - resource
-    required_fields:
-    - resource
-    header_request_params:
-    - resource
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      resource: registry
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-  - name: TestIamPermissions
-    flattening:
-      groups:
-      - parameters:
-        - resource
-        - permissions
-    required_fields:
-    - resource
-    - permissions
-    header_request_params:
-    - resource
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      resource: registry
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
   - name: SendCommandToDevice
-    flattening:
-      groups:
-      - parameters:
-        - name
-        - binary_data
-        - subfolder
-    required_fields:
-    - name
-    - binary_data
-    header_request_params:
-    - name
     retry_codes_name: rate_limited_aware
     retry_params_name: rate_limited_aware
-    field_name_patterns:
-      name: device
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-  - name: BindDeviceToGateway
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - gateway_id
-        - device_id
-    required_fields:
-    - parent
-    - gateway_id
-    - device_id
-    header_request_params:
-    - parent
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: registry
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-  - name: UnbindDeviceFromGateway
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - gateway_id
-        - device_id
-    required_fields:
-    - parent
-    - gateway_id
-    - device_id
-    header_request_params:
-    - parent
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: registry
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
-resource_name_generation:
-- message_name: google.iam.v1.SetIamPolicyRequest
-  field_entity_map:
-    resource: "*"
-- message_name: google.iam.v1.GetIamPolicyRequest
-  field_entity_map:
-    resource: "*"
-- message_name: google.iam.v1.TestIamPermissionsRequest
-  field_entity_map:
-    resource: "*"
-- message_name: CreateDeviceRegistryRequest
-  field_entity_map:
-    parent: location
-- message_name: GetDeviceRegistryRequest
-  field_entity_map:
-    name: registry
-- message_name: DeleteDeviceRegistryRequest
-  field_entity_map:
-    name: registry
-- message_name: ListDeviceRegistriesRequest
-  field_entity_map:
-    parent: location
-- message_name: CreateDeviceRequest
-  field_entity_map:
-    parent: registry
-- message_name: GetDeviceRequest
-  field_entity_map:
-    name: device
-- message_name: DeleteDeviceRequest
-  field_entity_map:
-    name: device
-- message_name: ListDevicesRequest
-  field_entity_map:
-    parent: registry
-- message_name: ModifyCloudToDeviceConfigRequest
-  field_entity_map:
-    name: device
-- message_name: ListDeviceConfigVersionsRequest
-  field_entity_map:
-    name: device
-- message_name: ListDeviceStatesRequest
-  field_entity_map:
-    name: device
-- message_name: SendCommandToDeviceRequest
-  field_entity_map:
-    name: device
-- message_name: BindDeviceToGatewayRequest
-  field_entity_map:
-    parent: registry
-- message_name: UnbindDeviceFromGatewayRequest
-  field_entity_map:
-    parent: registry
-- message_name: Device
-  field_entity_map:
-    name: device
-- message_name: DeviceRegistry
-  field_entity_map:
-    name: registry
diff --git a/google/cloud/iot/v1/cloudiot_grpc_service_config.json b/google/cloud/iot/v1/cloudiot_grpc_service_config.json
new file mode 100755
index 000000000..29a978646
--- /dev/null
+++ b/google/cloud/iot/v1/cloudiot_grpc_service_config.json
@@ -0,0 +1,114 @@
+{
+  "methodConfig": [
+    {
+      "name": [
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "CreateDeviceRegistry"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "UpdateDeviceRegistry"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "CreateDevice"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "UpdateDevice"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "SetIamPolicy"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "GetIamPolicy"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "TestIamPermissions"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "BindDeviceToGateway"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "UnbindDeviceFromGateway"
+        }
+      ],
+      "timeout": "120s"
+    },
+    {
+      "name": [
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "GetDeviceRegistry"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "DeleteDeviceRegistry"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "ListDeviceRegistries"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "GetDevice"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "DeleteDevice"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "ListDevices"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "ListDeviceConfigVersions"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "ListDeviceStates"
+        }
+      ],
+      "timeout": "120s",
+      "retryPolicy": {
+        "initialBackoff": "0.100s",
+        "maxBackoff": "60s",
+        "backoffMultiplier": 1.3,
+        "retryableStatusCodes": [
+          "UNAVAILABLE",
+          "DEADLINE_EXCEEDED"
+        ]
+      }
+    },
+    {
+      "name": [
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "ModifyCloudToDeviceConfig"
+        },
+        {
+          "service": "google.cloud.iot.v1.DeviceManager",
+          "method": "SendCommandToDevice"
+        }
+      ],
+      "timeout": "120s",
+      "retryPolicy": {
+        "initialBackoff": "1s",
+        "maxBackoff": "60s",
+        "backoffMultiplier": 1.3,
+        "retryableStatusCodes": [
+          "UNAVAILABLE",
+          "DEADLINE_EXCEEDED",
+          "RESOURCE_EXHAUSTED"
+        ]
+      }
+    }
+  ]
+}
diff --git a/google/cloud/iot/cloudiot.yaml b/google/cloud/iot/v1/cloudiot_v1.yaml
similarity index 73%
rename from google/cloud/iot/cloudiot.yaml
rename to google/cloud/iot/v1/cloudiot_v1.yaml
index 2529f622a..efb20dbd3 100644
--- a/google/cloud/iot/cloudiot.yaml
+++ b/google/cloud/iot/v1/cloudiot_v1.yaml
@@ -11,9 +11,14 @@ documentation:
     Registers and manages IoT (Internet of Things) devices that connect to the
     Google Cloud Platform.
 
+backend:
+  rules:
+  - selector: google.cloud.iot.v1.DeviceManager.SendCommandToDevice
+    deadline: 60.0
+
 authentication:
   rules:
-  - selector: '*'
+  - selector: 'google.cloud.iot.v1.DeviceManager.*'
     oauth:
       canonical_scopes: |-
         https://www.googleapis.com/auth/cloud-platform,
diff --git a/google/cloud/iot/v1/device_manager.proto b/google/cloud/iot/v1/device_manager.proto
index 27ec0f030..44d11afe6 100644
--- a/google/cloud/iot/v1/device_manager.proto
+++ b/google/cloud/iot/v1/device_manager.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google LLC.
+// Copyright 2019 Google LLC.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -18,13 +18,14 @@ syntax = "proto3";
 package google.cloud.iot.v1;
 
 import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
 import "google/cloud/iot/v1/resources.proto";
 import "google/iam/v1/iam_policy.proto";
 import "google/iam/v1/policy.proto";
-import "google/protobuf/duration.proto";
 import "google/protobuf/empty.proto";
 import "google/protobuf/field_mask.proto";
-import "google/protobuf/timestamp.proto";
 import "google/rpc/status.proto";
 
 option cc_enable_arenas = true;
@@ -35,13 +36,18 @@ option java_package = "com.google.cloud.iot.v1";
 
 // Internet of Things (IoT) service. Securely connect and manage IoT devices.
 service DeviceManager {
+  option (google.api.default_host) = "cloudiot.googleapis.com";
+  option (google.api.oauth_scopes) =
+      "https://www.googleapis.com/auth/cloud-platform,"
+      "https://www.googleapis.com/auth/cloudiot";
+
   // Creates a device registry that contains devices.
-  rpc CreateDeviceRegistry(CreateDeviceRegistryRequest)
-      returns (DeviceRegistry) {
+  rpc CreateDeviceRegistry(CreateDeviceRegistryRequest) returns (DeviceRegistry) {
     option (google.api.http) = {
       post: "/v1/{parent=projects/*/locations/*}/registries"
       body: "device_registry"
     };
+    option (google.api.method_signature) = "parent,device_registry";
   }
 
   // Gets a device registry configuration.
@@ -49,31 +55,32 @@ service DeviceManager {
     option (google.api.http) = {
       get: "/v1/{name=projects/*/locations/*/registries/*}"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Updates a device registry configuration.
-  rpc UpdateDeviceRegistry(UpdateDeviceRegistryRequest)
-      returns (DeviceRegistry) {
+  rpc UpdateDeviceRegistry(UpdateDeviceRegistryRequest) returns (DeviceRegistry) {
     option (google.api.http) = {
       patch: "/v1/{device_registry.name=projects/*/locations/*/registries/*}"
       body: "device_registry"
     };
+    option (google.api.method_signature) = "device_registry,update_mask";
   }
 
   // Deletes a device registry configuration.
-  rpc DeleteDeviceRegistry(DeleteDeviceRegistryRequest)
-      returns (google.protobuf.Empty) {
+  rpc DeleteDeviceRegistry(DeleteDeviceRegistryRequest) returns (google.protobuf.Empty) {
     option (google.api.http) = {
       delete: "/v1/{name=projects/*/locations/*/registries/*}"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Lists device registries.
-  rpc ListDeviceRegistries(ListDeviceRegistriesRequest)
-      returns (ListDeviceRegistriesResponse) {
+  rpc ListDeviceRegistries(ListDeviceRegistriesRequest) returns (ListDeviceRegistriesResponse) {
     option (google.api.http) = {
       get: "/v1/{parent=projects/*/locations/*}/registries"
     };
+    option (google.api.method_signature) = "parent";
   }
 
   // Creates a device in a device registry.
@@ -82,6 +89,7 @@ service DeviceManager {
       post: "/v1/{parent=projects/*/locations/*/registries/*}/devices"
       body: "device"
     };
+    option (google.api.method_signature) = "parent,device";
   }
 
   // Gets details about a device.
@@ -92,6 +100,7 @@ service DeviceManager {
         get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}"
       }
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Updates a device.
@@ -104,6 +113,7 @@ service DeviceManager {
         body: "device"
       }
     };
+    option (google.api.method_signature) = "device,update_mask";
   }
 
   // Deletes a device.
@@ -111,6 +121,7 @@ service DeviceManager {
     option (google.api.http) = {
       delete: "/v1/{name=projects/*/locations/*/registries/*/devices/*}"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // List devices in a device registry.
@@ -121,13 +132,13 @@ service DeviceManager {
         get: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices"
       }
     };
+    option (google.api.method_signature) = "parent";
   }
 
   // Modifies the configuration for the device, which is eventually sent from
   // the Cloud IoT Core servers. Returns the modified configuration version and
   // its metadata.
-  rpc ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest)
-      returns (DeviceConfig) {
+  rpc ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest) returns (DeviceConfig) {
     option (google.api.http) = {
       post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig"
       body: "*"
@@ -136,36 +147,36 @@ service DeviceManager {
         body: "*"
       }
     };
+    option (google.api.method_signature) = "name,binary_data";
   }
 
   // Lists the last few versions of the device configuration in descending
   // order (i.e.: newest first).
-  rpc ListDeviceConfigVersions(ListDeviceConfigVersionsRequest)
-      returns (ListDeviceConfigVersionsResponse) {
+  rpc ListDeviceConfigVersions(ListDeviceConfigVersionsRequest) returns (ListDeviceConfigVersionsResponse) {
     option (google.api.http) = {
       get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions"
       additional_bindings {
         get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions"
       }
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Lists the last few versions of the device state in descending order (i.e.:
   // newest first).
-  rpc ListDeviceStates(ListDeviceStatesRequest)
-      returns (ListDeviceStatesResponse) {
+  rpc ListDeviceStates(ListDeviceStatesRequest) returns (ListDeviceStatesResponse) {
     option (google.api.http) = {
       get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}/states"
       additional_bindings {
         get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states"
       }
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Sets the access control policy on the specified resource. Replaces any
   // existing policy.
-  rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
-      returns (google.iam.v1.Policy) {
+  rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
     option (google.api.http) = {
       post: "/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy"
       body: "*"
@@ -174,13 +185,13 @@ service DeviceManager {
         body: "*"
       }
     };
+    option (google.api.method_signature) = "resource,policy";
   }
 
   // Gets the access control policy for a resource.
   // Returns an empty policy if the resource exists and does not have a policy
   // set.
-  rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
-      returns (google.iam.v1.Policy) {
+  rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
     option (google.api.http) = {
       post: "/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy"
       body: "*"
@@ -189,13 +200,13 @@ service DeviceManager {
         body: "*"
       }
     };
+    option (google.api.method_signature) = "resource";
   }
 
   // Returns permissions that a caller has on the specified resource.
   // If the resource does not exist, this will return an empty set of
   // permissions, not a NOT_FOUND error.
-  rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
-      returns (google.iam.v1.TestIamPermissionsResponse) {
+  rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
     option (google.api.http) = {
       post: "/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions"
       body: "*"
@@ -204,6 +215,7 @@ service DeviceManager {
         body: "*"
       }
     };
+    option (google.api.method_signature) = "resource,permissions";
   }
 
   // Sends a command to the specified device. In order for a device to be able
@@ -219,8 +231,7 @@ service DeviceManager {
   // method will return FAILED_PRECONDITION. Otherwise, this method will
   // return OK. If the subscription is QoS 1, at least once delivery will be
   // guaranteed; for QoS 0, no acknowledgment will be expected from the device.
-  rpc SendCommandToDevice(SendCommandToDeviceRequest)
-      returns (SendCommandToDeviceResponse) {
+  rpc SendCommandToDevice(SendCommandToDeviceRequest) returns (SendCommandToDeviceResponse) {
     option (google.api.http) = {
       post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice"
       body: "*"
@@ -229,11 +240,12 @@ service DeviceManager {
         body: "*"
       }
     };
+    option (google.api.method_signature) = "name,binary_data";
+    option (google.api.method_signature) = "name,binary_data,subfolder";
   }
 
   // Associates the device with the gateway.
-  rpc BindDeviceToGateway(BindDeviceToGatewayRequest)
-      returns (BindDeviceToGatewayResponse) {
+  rpc BindDeviceToGateway(BindDeviceToGatewayRequest) returns (BindDeviceToGatewayResponse) {
     option (google.api.http) = {
       post: "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway"
       body: "*"
@@ -242,11 +254,11 @@ service DeviceManager {
         body: "*"
       }
     };
+    option (google.api.method_signature) = "parent,gateway_id,device_id";
   }
 
   // Deletes the association between the device and the gateway.
-  rpc UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest)
-      returns (UnbindDeviceFromGatewayResponse) {
+  rpc UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest) returns (UnbindDeviceFromGatewayResponse) {
     option (google.api.http) = {
       post: "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway"
       body: "*"
@@ -255,55 +267,76 @@ service DeviceManager {
         body: "*"
       }
     };
+    option (google.api.method_signature) = "parent,gateway_id,device_id";
   }
 }
 
 // Request for `CreateDeviceRegistry`.
 message CreateDeviceRegistryRequest {
-  // The project and cloud region where this device registry must be created.
+  // Required. The project and cloud region where this device registry must be created.
   // For example, `projects/example-project/locations/us-central1`.
-  string parent = 1;
-
-  // The device registry. The field `name` must be empty. The server will
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "locations.googleapis.com/Location"
+    }
+  ];
+
+  // Required. The device registry. The field `name` must be empty. The server will
   // generate that field from the device registry `id` provided and the
   // `parent` field.
-  DeviceRegistry device_registry = 2;
+  DeviceRegistry device_registry = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request for `GetDeviceRegistry`.
 message GetDeviceRegistryRequest {
-  // The name of the device registry. For example,
+  // Required. The name of the device registry. For example,
   // `projects/example-project/locations/us-central1/registries/my-registry`.
-  string name = 1;
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudiot.googleapis.com/Registry"
+    }
+  ];
 }
 
 // Request for `DeleteDeviceRegistry`.
 message DeleteDeviceRegistryRequest {
-  // The name of the device registry. For example,
+  // Required. The name of the device registry. For example,
   // `projects/example-project/locations/us-central1/registries/my-registry`.
-  string name = 1;
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudiot.googleapis.com/Registry"
+    }
+  ];
 }
 
 // Request for `UpdateDeviceRegistry`.
 message UpdateDeviceRegistryRequest {
-  // The new values for the device registry. The `id` field must be empty, and
+  // Required. The new values for the device registry. The `id` field must be empty, and
   // the `name` field must indicate the path of the resource. For example,
   // `projects/example-project/locations/us-central1/registries/my-registry`.
-  DeviceRegistry device_registry = 1;
+  DeviceRegistry device_registry = 1 [(google.api.field_behavior) = REQUIRED];
 
-  // Only updates the `device_registry` fields indicated by this mask.
+  // Required. Only updates the `device_registry` fields indicated by this mask.
   // The field mask must not be empty, and it must not contain fields that
   // are immutable or only set by the server.
   // Mutable top-level fields: `event_notification_config`, `http_config`,
   // `mqtt_config`, and `state_notification_config`.
-  google.protobuf.FieldMask update_mask = 2;
+  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request for `ListDeviceRegistries`.
 message ListDeviceRegistriesRequest {
-  // The project and cloud region path. For example,
+  // Required. The project and cloud region path. For example,
   // `projects/example-project/locations/us-central1`.
-  string parent = 1;
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "locations.googleapis.com/Location"
+    }
+  ];
 
   // The maximum number of registries to return in the response. If this value
   // is zero, the service will select a default size. A call may return fewer
@@ -330,23 +363,33 @@ message ListDeviceRegistriesResponse {
 
 // Request for `CreateDevice`.
 message CreateDeviceRequest {
-  // The name of the device registry where this device should be created.
+  // Required. The name of the device registry where this device should be created.
   // For example,
   // `projects/example-project/locations/us-central1/registries/my-registry`.
-  string parent = 1;
-
-  // The device registration details. The field `name` must be empty. The server
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudiot.googleapis.com/Registry"
+    }
+  ];
+
+  // Required. The device registration details. The field `name` must be empty. The server
   // generates `name` from the device registry `id` and the
   // `parent` field.
-  Device device = 2;
+  Device device = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request for `GetDevice`.
 message GetDeviceRequest {
-  // The name of the device. For example,
+  // Required. The name of the device. For example,
   // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
   // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
-  string name = 1;
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudiot.googleapis.com/Device"
+    }
+  ];
 
   // The fields of the `Device` resource to be returned in the response. If the
   // field mask is unset or empty, all fields are returned.
@@ -355,32 +398,42 @@ message GetDeviceRequest {
 
 // Request for `UpdateDevice`.
 message UpdateDeviceRequest {
-  // The new values for the device. The `id` and `num_id` fields must
+  // Required. The new values for the device. The `id` and `num_id` fields must
   // be empty, and the field `name` must specify the name path. For example,
   // `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
   // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
-  Device device = 2;
+  Device device = 2 [(google.api.field_behavior) = REQUIRED];
 
-  // Only updates the `device` fields indicated by this mask.
+  // Required. Only updates the `device` fields indicated by this mask.
   // The field mask must not be empty, and it must not contain fields that
   // are immutable or only set by the server.
   // Mutable top-level fields: `credentials`, `blocked`, and `metadata`
-  google.protobuf.FieldMask update_mask = 3;
+  google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request for `DeleteDevice`.
 message DeleteDeviceRequest {
-  // The name of the device. For example,
+  // Required. The name of the device. For example,
   // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
   // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
-  string name = 1;
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudiot.googleapis.com/Device"
+    }
+  ];
 }
 
 // Request for `ListDevices`.
 message ListDevicesRequest {
-  // The device registry path. Required. For example,
+  // Required. The device registry path. Required. For example,
   // `projects/my-project/locations/us-central1/registries/my-registry`.
-  string parent = 1;
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudiot.googleapis.com/Registry"
+    }
+  ];
 
   // A list of device numeric IDs. If empty, this field is ignored. Maximum
   // IDs: 10,000.
@@ -446,10 +499,15 @@ message ListDevicesResponse {
 
 // Request for `ModifyCloudToDeviceConfig`.
 message ModifyCloudToDeviceConfigRequest {
-  // The name of the device. For example,
+  // Required. The name of the device. For example,
   // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
   // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
-  string name = 1;
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudiot.googleapis.com/Device"
+    }
+  ];
 
   // The version number to update. If this value is zero, it will not check the
   // version number of the server and will always update the current version;
@@ -458,16 +516,21 @@ message ModifyCloudToDeviceConfigRequest {
   // simultaneous updates without losing data.
   int64 version_to_update = 2;
 
-  // The configuration data for the device.
-  bytes binary_data = 3;
+  // Required. The configuration data for the device.
+  bytes binary_data = 3 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request for `ListDeviceConfigVersions`.
 message ListDeviceConfigVersionsRequest {
-  // The name of the device. For example,
+  // Required. The name of the device. For example,
   // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
   // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
-  string name = 1;
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudiot.googleapis.com/Device"
+    }
+  ];
 
   // The number of versions to list. Versions are listed in decreasing order of
   // the version number. The maximum number of versions retained is 10. If this
@@ -484,10 +547,15 @@ message ListDeviceConfigVersionsResponse {
 
 // Request for `ListDeviceStates`.
 message ListDeviceStatesRequest {
-  // The name of the device. For example,
+  // Required. The name of the device. For example,
   // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
   // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
-  string name = 1;
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudiot.googleapis.com/Device"
+    }
+  ];
 
   // The number of states to list. States are listed in descending order of
   // update time. The maximum number of states retained is 10. If this
@@ -504,13 +572,18 @@ message ListDeviceStatesResponse {
 
 // Request for `SendCommandToDevice`.
 message SendCommandToDeviceRequest {
-  // The name of the device. For example,
+  // Required. The name of the device. For example,
   // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
   // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
-  string name = 1;
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudiot.googleapis.com/Device"
+    }
+  ];
 
-  // The command data to send to the device.
-  bytes binary_data = 2;
+  // Required. The command data to send to the device.
+  bytes binary_data = 2 [(google.api.field_behavior) = REQUIRED];
 
   // Optional subfolder for the command. If empty, the command will be delivered
   // to the /devices/{device-id}/commands topic, otherwise it will be delivered
@@ -521,42 +594,58 @@ message SendCommandToDeviceRequest {
 }
 
 // Response for `SendCommandToDevice`.
-message SendCommandToDeviceResponse {}
+message SendCommandToDeviceResponse {
+
+}
 
 // Request for `BindDeviceToGateway`.
 message BindDeviceToGatewayRequest {
-  // The name of the registry. For example,
+  // Required. The name of the registry. For example,
   // `projects/example-project/locations/us-central1/registries/my-registry`.
-  string parent = 1;
-
-  // The value of `gateway_id` can be either the device numeric ID or the
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudiot.googleapis.com/Registry"
+    }
+  ];
+
+  // Required. The value of `gateway_id` can be either the device numeric ID or the
   // user-defined device identifier.
-  string gateway_id = 2;
+  string gateway_id = 2 [(google.api.field_behavior) = REQUIRED];
 
-  // The device to associate with the specified gateway. The value of
+  // Required. The device to associate with the specified gateway. The value of
   // `device_id` can be either the device numeric ID or the user-defined device
   // identifier.
-  string device_id = 3;
+  string device_id = 3 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Response for `BindDeviceToGateway`.
-message BindDeviceToGatewayResponse {}
+message BindDeviceToGatewayResponse {
+
+}
 
 // Request for `UnbindDeviceFromGateway`.
 message UnbindDeviceFromGatewayRequest {
-  // The name of the registry. For example,
+  // Required. The name of the registry. For example,
   // `projects/example-project/locations/us-central1/registries/my-registry`.
-  string parent = 1;
-
-  // The value of `gateway_id` can be either the device numeric ID or the
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudiot.googleapis.com/Registry"
+    }
+  ];
+
+  // Required. The value of `gateway_id` can be either the device numeric ID or the
   // user-defined device identifier.
-  string gateway_id = 2;
+  string gateway_id = 2 [(google.api.field_behavior) = REQUIRED];
 
-  // The device to disassociate from the specified gateway. The value of
+  // Required. The device to disassociate from the specified gateway. The value of
   // `device_id` can be either the device numeric ID or the user-defined device
   // identifier.
-  string device_id = 3;
+  string device_id = 3 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Response for `UnbindDeviceFromGateway`.
-message UnbindDeviceFromGatewayResponse {}
+message UnbindDeviceFromGatewayResponse {
+
+}
diff --git a/google/cloud/iot/v1/resources.proto b/google/cloud/iot/v1/resources.proto
index 2a91e989e..2201d3302 100644
--- a/google/cloud/iot/v1/resources.proto
+++ b/google/cloud/iot/v1/resources.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google LLC.
+// Copyright 2019 Google LLC.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@ syntax = "proto3";
 
 package google.cloud.iot.v1;
 
-import "google/api/annotations.proto";
+import "google/api/resource.proto";
 import "google/protobuf/timestamp.proto";
 import "google/rpc/status.proto";
 
@@ -29,6 +29,11 @@ option java_package = "com.google.cloud.iot.v1";
 
 // The device resource.
 message Device {
+  option (google.api.resource) = {
+    type: "cloudiot.googleapis.com/Device"
+    pattern: "projects/{project}/locations/{location}/registries/{registry}/devices/{device}"
+  };
+
   // The user-defined device identifier. The device ID must be unique
   // within a device registry.
   string id = 1;
@@ -149,6 +154,11 @@ message GatewayConfig {
 
 // A container for a group of devices.
 message DeviceRegistry {
+  option (google.api.resource) = {
+    type: "cloudiot.googleapis.com/Registry"
+    pattern: "projects/{project}/locations/{location}/registries/{registry}"
+  };
+
   // The identifier of this device registry. For example, `myRegistry`.
   string id = 1;
 
@@ -208,6 +218,19 @@ message MqttConfig {
   MqttState mqtt_enabled_state = 1;
 }
 
+// Indicates whether an MQTT connection is enabled or disabled. See the field
+// description for details.
+enum MqttState {
+  // No MQTT state specified. If not specified, MQTT will be enabled by default.
+  MQTT_STATE_UNSPECIFIED = 0;
+
+  // Enables a MQTT connection.
+  MQTT_ENABLED = 1;
+
+  // Disables a MQTT connection.
+  MQTT_DISABLED = 2;
+}
+
 // The configuration of the HTTP bridge for a device registry.
 message HttpConfig {
   // If enabled, allows devices to use DeviceService via the HTTP protocol.
@@ -215,6 +238,77 @@ message HttpConfig {
   HttpState http_enabled_state = 1;
 }
 
+// Indicates whether DeviceService (HTTP) is enabled or disabled for the
+// registry. See the field description for details.
+enum HttpState {
+  // No HTTP state specified. If not specified, DeviceService will be
+  // enabled by default.
+  HTTP_STATE_UNSPECIFIED = 0;
+
+  // Enables DeviceService (HTTP) service for the registry.
+  HTTP_ENABLED = 1;
+
+  // Disables DeviceService (HTTP) service for the registry.
+  HTTP_DISABLED = 2;
+}
+
+// **Beta Feature**
+//
+// The logging verbosity for device activity. Specifies which events should be
+// written to logs. For example, if the LogLevel is ERROR, only events that
+// terminate in errors will be logged. LogLevel is inclusive; enabling INFO
+// logging will also enable ERROR logging.
+enum LogLevel {
+  // No logging specified. If not specified, logging will be disabled.
+  LOG_LEVEL_UNSPECIFIED = 0;
+
+  // Disables logging.
+  NONE = 10;
+
+  // Error events will be logged.
+  ERROR = 20;
+
+  // Informational events will be logged, such as connections and
+  // disconnections.
+  INFO = 30;
+
+  // All events will be logged.
+  DEBUG = 40;
+}
+
+// Gateway type.
+enum GatewayType {
+  // If unspecified, the device is considered a non-gateway device.
+  GATEWAY_TYPE_UNSPECIFIED = 0;
+
+  // The device is a gateway.
+  GATEWAY = 1;
+
+  // The device is not a gateway.
+  NON_GATEWAY = 2;
+}
+
+// The gateway authorization/authentication method. This setting determines how
+// Cloud IoT Core authorizes/authenticate devices to access the gateway.
+enum GatewayAuthMethod {
+  // No authentication/authorization method specified. No devices are allowed to
+  // access the gateway.
+  GATEWAY_AUTH_METHOD_UNSPECIFIED = 0;
+
+  // The device is authenticated through the gateway association only. Device
+  // credentials are ignored even if provided.
+  ASSOCIATION_ONLY = 1;
+
+  // The device is authenticated through its own credentials. Gateway
+  // association is not checked.
+  DEVICE_AUTH_TOKEN_ONLY = 2;
+
+  // The device is authenticated through both device credentials and gateway
+  // association. The device must be bound to the gateway and must provide its
+  // own credentials.
+  ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3;
+}
+
 // The configuration for forwarding telemetry events.
 message EventNotificationConfig {
   // If the subfolder name matches this string exactly, this configuration will
@@ -277,6 +371,18 @@ message PublicKeyCertificate {
   X509CertificateDetails x509_details = 3;
 }
 
+// The supported formats for the public key.
+enum PublicKeyCertificateFormat {
+  // The format has not been specified. This is an invalid default value and
+  // must not be used.
+  UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0;
+
+  // An X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)),
+  // encoded in base64, and wrapped by `-----BEGIN CERTIFICATE-----` and
+  // `-----END CERTIFICATE-----`.
+  X509_CERTIFICATE_PEM = 1;
+}
+
 // A server-stored device credential used for authentication.
 message DeviceCredential {
   // The credential data. Reserved for expansion in the future.
@@ -310,6 +416,36 @@ message PublicKeyCredential {
   string key = 2;
 }
 
+// The supported formats for the public key.
+enum PublicKeyFormat {
+  // The format has not been specified. This is an invalid default value and
+  // must not be used.
+  UNSPECIFIED_PUBLIC_KEY_FORMAT = 0;
+
+  // An RSA public key encoded in base64, and wrapped by
+  // `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`. This can be
+  // used to verify `RS256` signatures in JWT tokens ([RFC7518](
+  // https://www.ietf.org/rfc/rfc7518.txt)).
+  RSA_PEM = 3;
+
+  // As RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280](
+  // https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by
+  // `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`.
+  RSA_X509_PEM = 1;
+
+  // Public key for the ECDSA algorithm using P-256 and SHA-256, encoded in
+  // base64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END
+  // PUBLIC KEY-----`. This can be used to verify JWT tokens with the `ES256`
+  // algorithm ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). This curve is
+  // defined in [OpenSSL](https://www.openssl.org/) as the `prime256v1` curve.
+  ES256_PEM = 2;
+
+  // As ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280](
+  // https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by
+  // `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`.
+  ES256_X509_PEM = 4;
+}
+
 // The device configuration. Eventually delivered to devices.
 message DeviceConfig {
   // [Output only] The version of this update. The version number is assigned by
@@ -346,129 +482,3 @@ message DeviceState {
   // The device state data.
   bytes binary_data = 2;
 }
-
-// Indicates whether an MQTT connection is enabled or disabled. See the field
-// description for details.
-enum MqttState {
-  // No MQTT state specified. If not specified, MQTT will be enabled by default.
-  MQTT_STATE_UNSPECIFIED = 0;
-
-  // Enables a MQTT connection.
-  MQTT_ENABLED = 1;
-
-  // Disables a MQTT connection.
-  MQTT_DISABLED = 2;
-}
-
-// Indicates whether DeviceService (HTTP) is enabled or disabled for the
-// registry. See the field description for details.
-enum HttpState {
-  // No HTTP state specified. If not specified, DeviceService will be
-  // enabled by default.
-  HTTP_STATE_UNSPECIFIED = 0;
-
-  // Enables DeviceService (HTTP) service for the registry.
-  HTTP_ENABLED = 1;
-
-  // Disables DeviceService (HTTP) service for the registry.
-  HTTP_DISABLED = 2;
-}
-
-// **Beta Feature**
-//
-// The logging verbosity for device activity. Specifies which events should be
-// written to logs. For example, if the LogLevel is ERROR, only events that
-// terminate in errors will be logged. LogLevel is inclusive; enabling INFO
-// logging will also enable ERROR logging.
-enum LogLevel {
-  // No logging specified. If not specified, logging will be disabled.
-  LOG_LEVEL_UNSPECIFIED = 0;
-
-  // Disables logging.
-  NONE = 10;
-
-  // Error events will be logged.
-  ERROR = 20;
-
-  // Informational events will be logged, such as connections and
-  // disconnections.
-  INFO = 30;
-
-  // All events will be logged.
-  DEBUG = 40;
-}
-
-// Gateway type.
-enum GatewayType {
-  // If unspecified, the device is considered a non-gateway device.
-  GATEWAY_TYPE_UNSPECIFIED = 0;
-
-  // The device is a gateway.
-  GATEWAY = 1;
-
-  // The device is not a gateway.
-  NON_GATEWAY = 2;
-}
-
-// The gateway authorization/authentication method. This setting determines how
-// Cloud IoT Core authorizes/authenticate devices to access the gateway.
-enum GatewayAuthMethod {
-  // No authentication/authorization method specified. No devices are allowed to
-  // access the gateway.
-  GATEWAY_AUTH_METHOD_UNSPECIFIED = 0;
-
-  // The device is authenticated through the gateway association only. Device
-  // credentials are ignored even if provided.
-  ASSOCIATION_ONLY = 1;
-
-  // The device is authenticated through its own credentials. Gateway
-  // association is not checked.
-  DEVICE_AUTH_TOKEN_ONLY = 2;
-
-  // The device is authenticated through both device credentials and gateway
-  // association. The device must be bound to the gateway and must provide its
-  // own credentials.
-  ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3;
-}
-
-// The supported formats for the public key.
-enum PublicKeyCertificateFormat {
-  // The format has not been specified. This is an invalid default value and
-  // must not be used.
-  UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0;
-
-  // An X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)),
-  // encoded in base64, and wrapped by `-----BEGIN CERTIFICATE-----` and
-  // `-----END CERTIFICATE-----`.
-  X509_CERTIFICATE_PEM = 1;
-}
-
-// The supported formats for the public key.
-enum PublicKeyFormat {
-  // The format has not been specified. This is an invalid default value and
-  // must not be used.
-  UNSPECIFIED_PUBLIC_KEY_FORMAT = 0;
-
-  // An RSA public key encoded in base64, and wrapped by
-  // `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`. This can be
-  // used to verify `RS256` signatures in JWT tokens ([RFC7518](
-  // https://www.ietf.org/rfc/rfc7518.txt)).
-  RSA_PEM = 3;
-
-  // As RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280](
-  // https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by
-  // `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`.
-  RSA_X509_PEM = 1;
-
-  // Public key for the ECDSA algorithm using P-256 and SHA-256, encoded in
-  // base64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END
-  // PUBLIC KEY-----`. This can be used to verify JWT tokens with the `ES256`
-  // algorithm ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). This curve is
-  // defined in [OpenSSL](https://www.openssl.org/) as the `prime256v1` curve.
-  ES256_PEM = 2;
-
-  // As ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280](
-  // https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by
-  // `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`.
-  ES256_X509_PEM = 4;
-}
diff --git a/google/cloud/irm/BUILD.bazel b/google/cloud/irm/BUILD.bazel
new file mode 100644
index 000000000..a87c57fec
--- /dev/null
+++ b/google/cloud/irm/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"]))
diff --git a/google/cloud/irm/v1alpha2/BUILD.bazel b/google/cloud/irm/v1alpha2/BUILD.bazel
new file mode 100644
index 000000000..a39af0fa1
--- /dev/null
+++ b/google/cloud/irm/v1alpha2/BUILD.bazel
@@ -0,0 +1,363 @@
+# This file was automatically generated by BuildFileGenerator
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
+
+proto_library(
+    name = "irm_proto",
+    srcs = [
+        "incidents.proto",
+        "incidents_service.proto",
+    ],
+    deps = [
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/api:resource_proto",
+        "@com_google_protobuf//:empty_proto",
+        "@com_google_protobuf//:field_mask_proto",
+        "@com_google_protobuf//:timestamp_proto",
+    ],
+)
+
+proto_library_with_info(
+    name = "irm_proto_with_info",
+    deps = [
+        ":irm_proto",
+        "//google/cloud:common_resources_proto",
+    ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "java_gapic_assembly_gradle_pkg",
+    "java_gapic_library",
+    "java_gapic_test",
+    "java_grpc_library",
+    "java_proto_library",
+)
+
+java_proto_library(
+    name = "irm_java_proto",
+    deps = [":irm_proto"],
+)
+
+java_grpc_library(
+    name = "irm_java_grpc",
+    srcs = [":irm_proto"],
+    deps = [":irm_java_proto"],
+)
+
+java_gapic_library(
+    name = "irm_java_gapic",
+    src = ":irm_proto_with_info",
+    gapic_yaml = "irm_gapic.yaml",
+    package = "google.cloud.irm.v1alpha2",
+    service_yaml = "//google/cloud/irm:irm_v1alpha2.yaml",
+    test_deps = [
+        ":irm_java_grpc",
+    ],
+    deps = [
+        ":irm_java_proto",
+    ],
+)
+
+java_gapic_test(
+    name = "irm_java_gapic_test_suite",
+    test_classes = [
+        "com.google.cloud.irm.v1alpha2.IncidentServiceClientTest",
+    ],
+    runtime_deps = [":irm_java_gapic_test"],
+)
+
+# Open Source Packages
+java_gapic_assembly_gradle_pkg(
+    name = "google-cloud-irm-v1alpha2-java",
+    deps = [
+        ":irm_java_gapic",
+        ":irm_java_grpc",
+        ":irm_java_proto",
+        ":irm_proto",
+    ],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "go_gapic_assembly_pkg",
+    "go_gapic_library",
+    "go_proto_library",
+    "go_test",
+)
+
+go_proto_library(
+    name = "irm_go_proto",
+    compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+    importpath = "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2",
+    protos = [":irm_proto"],
+    deps = [
+        "//google/api:annotations_go_proto",
+    ],
+)
+
+go_gapic_library(
+    name = "irm_go_gapic",
+    srcs = [":irm_proto_with_info"],
+    grpc_service_config = "irm_grpc_service_config.json",
+    importpath = "cloud.google.com/go/irm/apiv1alpha2;irm",
+    service_yaml = "//google/cloud/irm:irm_v1alpha2.yaml",
+    deps = [
+        ":irm_go_proto",
+    ],
+)
+
+go_test(
+    name = "irm_go_gapic_test",
+    srcs = [":irm_go_gapic_srcjar_test"],
+    embed = [":irm_go_gapic"],
+    importpath = "cloud.google.com/go/irm/apiv1alpha2",
+)
+
+# Open Source Packages
+go_gapic_assembly_pkg(
+    name = "gapi-cloud-irm-v1alpha2-go",
+    deps = [
+        ":irm_go_gapic",
+        ":irm_go_gapic_srcjar-test.srcjar",
+        ":irm_go_proto",
+    ],
+)
+
+##############################################################################
+# Python
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "moved_proto_library",
+    "py_gapic_assembly_pkg",
+    "py_gapic_library",
+    "py_grpc_library",
+    "py_proto_library",
+)
+
+moved_proto_library(
+    name = "irm_moved_proto",
+    srcs = [":irm_proto"],
+    deps = [
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/api:resource_proto",
+        "@com_google_protobuf//:empty_proto",
+        "@com_google_protobuf//:field_mask_proto",
+        "@com_google_protobuf//:timestamp_proto",
+    ],
+)
+
+py_proto_library(
+    name = "irm_py_proto",
+    plugin = "@protoc_docs_plugin//:docs_plugin",
+    deps = [":irm_moved_proto"],
+)
+
+py_grpc_library(
+    name = "irm_py_grpc",
+    srcs = [":irm_moved_proto"],
+    deps = [":irm_py_proto"],
+)
+
+py_gapic_library(
+    name = "irm_py_gapic",
+    src = ":irm_proto_with_info",
+    gapic_yaml = "irm_gapic.yaml",
+    package = "google.cloud.irm.v1alpha2",
+    service_yaml = "//google/cloud/irm:irm_v1alpha2.yaml",
+    deps = [
+        ":irm_py_grpc",
+        ":irm_py_proto",
+    ],
+)
+
+# Open Source Packages
+py_gapic_assembly_pkg(
+    name = "irm-v1alpha2-py",
+    deps = [
+        ":irm_py_gapic",
+        ":irm_py_grpc",
+        ":irm_py_proto",
+    ],
+)
+
+##############################################################################
+# PHP
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "php_gapic_assembly_pkg",
+    "php_gapic_library",
+    "php_grpc_library",
+    "php_proto_library",
+)
+
+php_proto_library(
+    name = "irm_php_proto",
+    deps = [":irm_proto"],
+)
+
+php_grpc_library(
+    name = "irm_php_grpc",
+    srcs = [":irm_proto"],
+    deps = [":irm_php_proto"],
+)
+
+php_gapic_library(
+    name = "irm_php_gapic",
+    src = ":irm_proto_with_info",
+    gapic_yaml = "irm_gapic.yaml",
+    package = "google.cloud.irm.v1alpha2",
+    service_yaml = "//google/cloud/irm:irm_v1alpha2.yaml",
+    deps = [
+        ":irm_php_grpc",
+        ":irm_php_proto",
+    ],
+)
+
+# Open Source Packages
+php_gapic_assembly_pkg(
+    name = "google-cloud-irm-v1alpha2-php",
+    deps = [
+        ":irm_php_gapic",
+        ":irm_php_grpc",
+        ":irm_php_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)
+
+nodejs_gapic_library(
+    name = "irm_nodejs_gapic",
+    src = ":irm_proto_with_info",
+    gapic_yaml = "irm_gapic.yaml",
+    package = "google.cloud.irm.v1alpha2",
+    service_yaml = "//google/cloud/irm:irm_v1alpha2.yaml",
+    deps = [],
+)
+
+nodejs_gapic_assembly_pkg(
+    name = "irm-v1alpha2-nodejs",
+    deps = [
+        ":irm_nodejs_gapic",
+        ":irm_proto",
+    ],
+)
+
+##############################################################################
+# Ruby
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "ruby_gapic_assembly_pkg",
+    "ruby_gapic_library",
+    "ruby_grpc_library",
+    "ruby_proto_library",
+)
+
+ruby_proto_library(
+    name = "irm_ruby_proto",
+    deps = [":irm_proto"],
+)
+
+ruby_grpc_library(
+    name = "irm_ruby_grpc",
+    srcs = [":irm_proto"],
+    deps = [":irm_ruby_proto"],
+)
+
+ruby_gapic_library(
+    name = "irm_ruby_gapic",
+    src = ":irm_proto_with_info",
+    gapic_yaml = "irm_gapic.yaml",
+    package = "google.cloud.irm.v1alpha2",
+    service_yaml = "//google/cloud/irm:irm_v1alpha2.yaml",
+    deps = [
+        ":irm_ruby_grpc",
+        ":irm_ruby_proto",
+    ],
+)
+
+# Open Source Packages
+ruby_gapic_assembly_pkg(
+    name = "google-cloud-irm-v1alpha2-ruby",
+    deps = [
+        ":irm_ruby_gapic",
+        ":irm_ruby_grpc",
+        ":irm_ruby_proto",
+    ],
+)
+
+##############################################################################
+# C#
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "csharp_gapic_assembly_pkg",
+    "csharp_gapic_library",
+    "csharp_grpc_library",
+    "csharp_proto_library",
+)
+
+csharp_proto_library(
+    name = "irm_csharp_proto",
+    deps = [":irm_proto"],
+)
+
+csharp_grpc_library(
+    name = "irm_csharp_grpc",
+    srcs = [":irm_proto"],
+    deps = [":irm_csharp_proto"],
+)
+
+csharp_gapic_library(
+    name = "irm_csharp_gapic",
+    src = ":irm_proto_with_info",
+    gapic_yaml = "irm_gapic.yaml",
+    package = "google.cloud.irm.v1alpha2",
+    service_yaml = "//google/cloud/irm:irm_v1alpha2.yaml",
+    deps = [
+        ":irm_csharp_grpc",
+        ":irm_csharp_proto",
+    ],
+)
+
+# Open Source Packages
+csharp_gapic_assembly_pkg(
+    name = "google-cloud-irm-v1alpha2-csharp",
+    deps = [
+        ":irm_csharp_gapic",
+        ":irm_csharp_grpc",
+        ":irm_csharp_proto",
+    ],
+)
+
+##############################################################################
+# C++
+##############################################################################
+# Put your C++ rules here
diff --git a/google/cloud/irm/v1alpha2/incidents.proto b/google/cloud/irm/v1alpha2/incidents.proto
index 78972ae03..e4eb3b30f 100644
--- a/google/cloud/irm/v1alpha2/incidents.proto
+++ b/google/cloud/irm/v1alpha2/incidents.proto
@@ -18,6 +18,8 @@ syntax = "proto3";
 package google.cloud.irm.v1alpha2;
 
 import "google/api/annotations.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
 import "google/protobuf/timestamp.proto";
 
 option cc_enable_arenas = true;
@@ -45,6 +47,11 @@ message User {
 // A signal is a message calling attention to a (potential) incident. An example
 // is a page based on a Stackdriver Alerting policy.
 message Signal {
+  option (google.api.resource) = {
+    type: "irm.googleapis.com/Signal"
+    pattern: "projects/{project}/signals/{signal}"
+  };
+
   // An artifact associated with the Signal.
   message SignalArtifact {
     // The type of resource linked to
@@ -70,7 +77,7 @@ message Signal {
   }
 
   // Resource name of the signal, for example,
-  // "projects/{project_id}/signals/{signal_id}".
+  // "projects/{project_id_or_number}/signals/{signal_id}".
   string name = 1;
 
   // Etag to validate the object is unchanged for a read-modify-write operation.
@@ -123,8 +130,13 @@ message Signal {
 
 // A text annotation by a user.
 message Annotation {
+  option (google.api.resource) = {
+    type: "irm.googleapis.com/Annotation"
+    pattern: "projects/{project}/incidents/{incident}/annotations/{annotation}"
+  };
+
   // Resource name of the annotation, for example,
-  // "projects/{project_id}/incidents/{incident_id}/annotations/{annotation_id}".
+  // "projects/{project_id_or_number}/incidents/{incident_id}/annotations/{annotation_id}".
   string name = 1;
 
   // Output only. Author of the annotation.
@@ -133,18 +145,23 @@ message Annotation {
   // Output only. Time the annotation was created.
   google.protobuf.Timestamp create_time = 3;
 
-  // Content of the annotation. Immutable.
+  // Content of the annotation.
   string content = 4;
 
   // Content type of the annotation, for example, 'text/plain'
-  // or 'text/markdown'. Immutable.
+  // or 'text/markdown'.
   string content_type = 5;
 }
 
 // A tag by a user.
 message Tag {
+  option (google.api.resource) = {
+    type: "irm.googleapis.com/Tag"
+    pattern: "projects/{project}/incidents/{incident}/tags/{tag}"
+  };
+
   // Resource name of a tag, for example,
-  // "projects/{project_id}/incidents/{incident_id}/tags/{tag_id}"
+  // "projects/{project_id_or_number}/incidents/{incident_id}/tags/{tag_id}"
   string name = 1;
 
   // Display name of the resource (for example, "cause:rollout"). Immutable.
@@ -170,6 +187,11 @@ message Synopsis {
 
 // Representation of an incident.
 message Incident {
+  option (google.api.resource) = {
+    type: "irm.googleapis.com/Incident"
+    pattern: "projects/{project}/incidents/{incident}"
+  };
+
   // CommunicationVenue is a record of where conversations about an incident
   // are happening.
   message CommunicationVenue {
@@ -259,8 +281,8 @@ message Incident {
   }
 
   // Output only. Resource name of the incident, for example,
-  // "projects/{project_id}/incidents/{incident_id}".
-  string name = 1;
+  // "projects/{project_id_or_number}/incidents/{incident_id}".
+  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // One-line summary of the incident.
   string title = 2;
@@ -338,18 +360,23 @@ message IncidentRole {
   // type can only be used once per incident, except for TYPE_OTHER.
   Type type = 1;
 
-  // Output only unless TYPE_OTHER is used. Title of the role. For TYPE_OTHER,
-  // must be unique within an incident.
+  // Output only and empty unless TYPE_OTHER is used. Title of the role. For
+  // TYPE_OTHER, must be unique within an incident.
   string title = 2;
 
-  // Output only unless TYPE_OTHER is used. Description of the role.
+  // Output only and empty unless TYPE_OTHER is used. Description of the role.
   string description = 3;
 }
 
 // Stores the assignee of a role as well as the proposed next assignee.
 message IncidentRoleAssignment {
+  option (google.api.resource) = {
+    type: "irm.googleapis.com/IncidentRoleAssignment"
+    pattern: "projects/{project_id_or_number}/incidents/{incident_id}/role_assignments/{role_id}"
+  };
+
   // Output only. Resource name such as
-  // "projects/{project_id}/incidents/{incident_id}/role_assignments/{role_id}".
+  // "projects/{project_id_or_number}/incidents/{incident_id}/role_assignments/{role_id}".
   string name = 1;
 
   // Output only. Etag for this version of the resource. Must be specified in
@@ -390,6 +417,11 @@ message IncidentRoleAssignment {
 
 // External artifact associated to an incident.
 message Artifact {
+  option (google.api.resource) = {
+    type: "irm.googleapis.com/Artifact"
+    pattern: "projects/{project}/incidents/{incident}/artifacts/{artifact}"
+  };
+
   // Possible types of an artifact.
   enum Type {
     // External type is unspecified.
@@ -403,7 +435,7 @@ message Artifact {
   }
 
   // Output only. Resource name such as
-  // "projects/{project_id}/incidents/{incident_id}/artifacts/{artifact_id}".
+  // "projects/{project_id_or_number}/incidents/{incident_id}/artifacts/{artifact_id}".
   string name = 1;
 
   // User provided name of an artifact.
@@ -450,6 +482,11 @@ message CommunicationChannel {
 // A subscription allows users to get notifications about changes to
 // an incident.
 message Subscription {
+  option (google.api.resource) = {
+    type: "irm.googleapis.com/Subscription"
+    pattern: "projects/{project}/incidents/{incident}/subscriptions/{subscription}"
+  };
+
   // Types of changes that users can subscribe to in an incident.
   enum EventType {
     // An event_type that's not specified is an error.
@@ -475,7 +512,7 @@ message Subscription {
   }
 
   // Output only. Resource name such as
-  // "projects/{project_id}/incidents/{incident_id}/subscriptions/{subscription_id}".
+  // "projects/{project_id_or_number}/incidents/{incident_id}/subscriptions/{subscription_id}".
   string name = 1;
 
   // Output only. Etag for this version of the resource. Must be specified in
diff --git a/google/cloud/irm/v1alpha2/incidents_service.proto b/google/cloud/irm/v1alpha2/incidents_service.proto
index 76cc3ae38..8546d42b6 100644
--- a/google/cloud/irm/v1alpha2/incidents_service.proto
+++ b/google/cloud/irm/v1alpha2/incidents_service.proto
@@ -19,6 +19,8 @@ package google.cloud.irm.v1alpha2;
 
 import "google/api/annotations.proto";
 import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
 import "google/cloud/irm/v1alpha2/incidents.proto";
 import "google/protobuf/empty.proto";
 import "google/protobuf/field_mask.proto";
@@ -32,8 +34,7 @@ option java_package = "com.google.irm.service.v1alpha2.api";
 // The Incident API for Incident Response & Management.
 service IncidentService {
   option (google.api.default_host) = "irm.googleapis.com";
-  option (google.api.oauth_scopes) =
-      "https://www.googleapis.com/auth/cloud-platform";
+  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
 
   // Creates a new incident.
   rpc CreateIncident(CreateIncidentRequest) returns (Incident) {
@@ -41,6 +42,7 @@ service IncidentService {
       post: "/v1alpha2/{parent=projects/*}/incidents"
       body: "incident"
     };
+    option (google.api.method_signature) = "incident,parent";
   }
 
   // Returns an incident by name.
@@ -48,6 +50,7 @@ service IncidentService {
     option (google.api.http) = {
       get: "/v1alpha2/{name=projects/*/incidents/*}"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Returns a list of incidents.
@@ -57,6 +60,7 @@ service IncidentService {
     option (google.api.http) = {
       get: "/v1alpha2/{parent=projects/*}/incidents:search"
     };
+    option (google.api.method_signature) = "parent,query,time_zone";
   }
 
   // Updates an existing incident.
@@ -65,19 +69,20 @@ service IncidentService {
       patch: "/v1alpha2/{incident.name=projects/*/incidents/*}"
       body: "incident"
     };
+    option (google.api.method_signature) = "incident,update_mask";
   }
 
   // Returns a list of incidents that are "similar" to the specified incident
   // or signal. This functionality is provided on a best-effort basis and the
   // definition of "similar" is subject to change.
-  rpc SearchSimilarIncidents(SearchSimilarIncidentsRequest)
-      returns (SearchSimilarIncidentsResponse) {
+  rpc SearchSimilarIncidents(SearchSimilarIncidentsRequest) returns (SearchSimilarIncidentsResponse) {
     option (google.api.http) = {
       get: "/v1alpha2/{name=projects/*/incidents/*}:searchSimilar"
       additional_bindings {
         get: "/v1alpha2/{name=projects/*/signals/*}:searchSimilarIncidents"
       }
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Creates an annotation on an existing incident. Only 'text/plain' and
@@ -87,15 +92,16 @@ service IncidentService {
       post: "/v1alpha2/{parent=projects/*/incidents/*}/annotations"
       body: "annotation"
     };
+    option (google.api.method_signature) = "parent,annotation";
   }
 
   // Lists annotations that are part of an incident. No assumptions should be
   // made on the content-type of the annotation returned.
-  rpc ListAnnotations(ListAnnotationsRequest)
-      returns (ListAnnotationsResponse) {
+  rpc ListAnnotations(ListAnnotationsRequest) returns (ListAnnotationsResponse) {
     option (google.api.http) = {
       get: "/v1alpha2/{parent=projects/*/incidents/*}/annotations"
     };
+    option (google.api.method_signature) = "parent";
   }
 
   // Creates a tag on an existing incident.
@@ -104,6 +110,7 @@ service IncidentService {
       post: "/v1alpha2/{parent=projects/*/incidents/*}/tags"
       body: "tag"
     };
+    option (google.api.method_signature) = "parent,tag";
   }
 
   // Deletes an existing tag.
@@ -111,6 +118,7 @@ service IncidentService {
     option (google.api.http) = {
       delete: "/v1alpha2/{name=projects/*/incidents/*/tags/*}"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Lists tags that are part of an incident.
@@ -118,6 +126,7 @@ service IncidentService {
     option (google.api.http) = {
       get: "/v1alpha2/{parent=projects/*/incidents/*}/tags"
     };
+    option (google.api.method_signature) = "parent";
   }
 
   // Creates a new signal.
@@ -126,14 +135,19 @@ service IncidentService {
       post: "/v1alpha2/{parent=projects/*}/signals"
       body: "signal"
     };
+    option (google.api.method_signature) = "parent,signal";
   }
 
   // Lists signals that are part of an incident.
   // Signals are returned in reverse chronological order.
+  // Note that search should not be relied on for critical functionality.  It
+  // has lower availability guarantees and might fail to return valid results.
+  // Returned results might include stale or extraneous entries.
   rpc SearchSignals(SearchSignalsRequest) returns (SearchSignalsResponse) {
     option (google.api.http) = {
       get: "/v1alpha2/{parent=projects/*}/signals:search"
     };
+    option (google.api.method_signature) = "parent,query";
   }
 
   // Finds a signal by other unique IDs.
@@ -148,6 +162,7 @@ service IncidentService {
     option (google.api.http) = {
       get: "/v1alpha2/{name=projects/*/signals/*}"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Updates an existing signal (for example, to assign/unassign it to an
@@ -157,11 +172,11 @@ service IncidentService {
       patch: "/v1alpha2/{signal.name=projects/*/signals/*}"
       body: "signal"
     };
+    option (google.api.method_signature) = "signal,update_mask";
   }
 
   // Escalates an incident.
-  rpc EscalateIncident(EscalateIncidentRequest)
-      returns (EscalateIncidentResponse) {
+  rpc EscalateIncident(EscalateIncidentRequest) returns (EscalateIncidentResponse) {
     option (google.api.http) = {
       post: "/v1alpha2/{incident.name=projects/*/incidents/*}:escalate"
       body: "*"
@@ -174,6 +189,7 @@ service IncidentService {
       post: "/v1alpha2/{parent=projects/*/incidents/*}/artifacts"
       body: "artifact"
     };
+    option (google.api.method_signature) = "parent,artifact";
   }
 
   // Returns a list of artifacts for an incident.
@@ -181,6 +197,7 @@ service IncidentService {
     option (google.api.http) = {
       get: "/v1alpha2/{parent=projects/*/incidents/*}/artifacts"
     };
+    option (google.api.method_signature) = "parent";
   }
 
   // Updates an existing artifact.
@@ -189,6 +206,7 @@ service IncidentService {
       patch: "/v1alpha2/{artifact.name=projects/*/incidents/*/artifacts/*}"
       body: "artifact"
     };
+    option (google.api.method_signature) = "artifact,update_mask";
   }
 
   // Deletes an existing artifact.
@@ -196,11 +214,11 @@ service IncidentService {
     option (google.api.http) = {
       delete: "/v1alpha2/{name=projects/*/incidents/*/artifacts/*}"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Sends a summary of the shift for oncall handoff.
-  rpc SendShiftHandoff(SendShiftHandoffRequest)
-      returns (SendShiftHandoffResponse) {
+  rpc SendShiftHandoff(SendShiftHandoffRequest) returns (SendShiftHandoffResponse) {
     option (google.api.http) = {
       post: "/v1alpha2/{parent=projects/*}/shiftHandoff:send"
       body: "*"
@@ -216,6 +234,7 @@ service IncidentService {
       post: "/v1alpha2/{parent=projects/*/incidents/*}/subscriptions"
       body: "subscription"
     };
+    option (google.api.method_signature) = "parent,subscription";
   }
 
   // Updates a subscription.
@@ -224,22 +243,23 @@ service IncidentService {
       patch: "/v1alpha2/{subscription.name=projects/*/incidents/*/subscriptions/*}"
       body: "subscription"
     };
+    option (google.api.method_signature) = "subscription,update_mask";
   }
 
   // Returns a list of subscriptions for an incident.
-  rpc ListSubscriptions(ListSubscriptionsRequest)
-      returns (ListSubscriptionsResponse) {
+  rpc ListSubscriptions(ListSubscriptionsRequest) returns (ListSubscriptionsResponse) {
     option (google.api.http) = {
       get: "/v1alpha2/{parent=projects/*/incidents/*}/subscriptions"
     };
+    option (google.api.method_signature) = "parent";
   }
 
   // Deletes an existing subscription.
-  rpc DeleteSubscription(DeleteSubscriptionRequest)
-      returns (google.protobuf.Empty) {
+  rpc DeleteSubscription(DeleteSubscriptionRequest) returns (google.protobuf.Empty) {
     option (google.api.http) = {
       delete: "/v1alpha2/{name=projects/*/incidents/*/subscriptions/*}"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Creates a role assignment on an existing incident. Normally, the user field
@@ -247,100 +267,112 @@ service IncidentService {
   // set when proposing another user as the assignee. Setting the next field
   // directly to a user other than oneself is equivalent to proposing and
   // force-assigning the role to the user.
-  rpc CreateIncidentRoleAssignment(CreateIncidentRoleAssignmentRequest)
-      returns (IncidentRoleAssignment) {
+  rpc CreateIncidentRoleAssignment(CreateIncidentRoleAssignmentRequest) returns (IncidentRoleAssignment) {
     option (google.api.http) = {
       post: "/v1alpha2/{parent=projects/*/incidents/*}/roleAssignments"
       body: "*"
     };
+    option (google.api.method_signature) = "parent,incident_role_assignment";
   }
 
   // Deletes an existing role assignment.
-  rpc DeleteIncidentRoleAssignment(DeleteIncidentRoleAssignmentRequest)
-      returns (google.protobuf.Empty) {
+  rpc DeleteIncidentRoleAssignment(DeleteIncidentRoleAssignmentRequest) returns (google.protobuf.Empty) {
     option (google.api.http) = {
       delete: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Lists role assignments that are part of an incident.
-  rpc ListIncidentRoleAssignments(ListIncidentRoleAssignmentsRequest)
-      returns (ListIncidentRoleAssignmentsResponse) {
+  rpc ListIncidentRoleAssignments(ListIncidentRoleAssignmentsRequest) returns (ListIncidentRoleAssignmentsResponse) {
     option (google.api.http) = {
       get: "/v1alpha2/{parent=projects/*/incidents/*}/roleAssignments"
     };
+    option (google.api.method_signature) = "parent";
   }
 
   // Starts a role handover. The proposed assignee will receive an email
   // notifying them of the assignment. This will fail if a role handover is
   // already pending.
-  rpc RequestIncidentRoleHandover(RequestIncidentRoleHandoverRequest)
-      returns (IncidentRoleAssignment) {
+  // Handover to an oncall ladder is not permitted. Use
+  // CreateIncidentRoleAssignment instead.
+  rpc RequestIncidentRoleHandover(RequestIncidentRoleHandoverRequest) returns (IncidentRoleAssignment) {
     option (google.api.http) = {
       post: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}:requestHandover"
       body: "*"
     };
+    option (google.api.method_signature) = "name,new_assignee";
   }
 
   // Confirms a role handover. This will fail if the 'proposed_assignee' field
   // of the IncidentRoleAssignment is not equal to the 'new_assignee' field of
   // the request. If the caller is not the new_assignee,
   // ForceIncidentRoleHandover should be used instead.
-  rpc ConfirmIncidentRoleHandover(ConfirmIncidentRoleHandoverRequest)
-      returns (IncidentRoleAssignment) {
+  rpc ConfirmIncidentRoleHandover(ConfirmIncidentRoleHandoverRequest) returns (IncidentRoleAssignment) {
     option (google.api.http) = {
       post: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}:confirmHandover"
       body: "*"
     };
+    option (google.api.method_signature) = "name,new_assignee";
   }
 
   // Forces a role handover. This will fail if the 'proposed_assignee' field of
   // the IncidentRoleAssignment is not equal to the 'new_assignee' field of the
   // request. If the caller is the new_assignee, ConfirmIncidentRoleHandover
   // should be used instead.
-  rpc ForceIncidentRoleHandover(ForceIncidentRoleHandoverRequest)
-      returns (IncidentRoleAssignment) {
+  rpc ForceIncidentRoleHandover(ForceIncidentRoleHandoverRequest) returns (IncidentRoleAssignment) {
     option (google.api.http) = {
       post: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}:forceHandover"
       body: "*"
     };
+    option (google.api.method_signature) = "name,new_assignee";
   }
 
   // Cancels a role handover. This will fail if the 'proposed_assignee' field of
   // the IncidentRoleAssignment is not equal to the 'new_assignee' field of the
   // request.
-  rpc CancelIncidentRoleHandover(CancelIncidentRoleHandoverRequest)
-      returns (IncidentRoleAssignment) {
+  rpc CancelIncidentRoleHandover(CancelIncidentRoleHandoverRequest) returns (IncidentRoleAssignment) {
     option (google.api.http) = {
       post: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}:cancelHandover"
       body: "*"
     };
+    option (google.api.method_signature) = "name,new_assignee";
   }
 }
 
 // Request for the CreateIncident method.
 message CreateIncidentRequest {
-  // The incident to create.
-  Incident incident = 1;
+  // Required. The incident to create.
+  Incident incident = 1 [(google.api.field_behavior) = REQUIRED];
 
-  // The resource name of the hosting Stackdriver project which the incident
+  // Required. The resource name of the hosting Stackdriver project which the incident
   // belongs to.
   // The name is of the form `projects/{project_id_or_number}`
   // .
-  string parent = 2;
+  string parent = 2 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudresourcemanager.googleapis.com/Project"
+    }
+  ];
 }
 
 // Request for the GetIncident method.
 message GetIncidentRequest {
-  // Resource name of the incident, for example,
-  // "projects/{project_id}/incidents/{incident_id}".
-  string name = 1;
+  // Required. Resource name of the incident, for example,
+  // "projects/{project_id_or_number}/incidents/{incident_id}".
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Incident"
+    }
+  ];
 }
 
 // Request for the UpdateIncident method.
 message UpdateIncidentRequest {
-  // The incident to update with the new values.
-  Incident incident = 1;
+  // Required. The incident to update with the new values.
+  Incident incident = 1 [(google.api.field_behavior) = REQUIRED];
 
   // List of fields that should be updated.
   google.protobuf.FieldMask update_mask = 2;
@@ -348,9 +380,14 @@ message UpdateIncidentRequest {
 
 // Request for the SearchSimilarIncidents method.
 message SearchSimilarIncidentsRequest {
-  // Resource name of the incident or signal, for example,
-  // "projects/{project_id}/incidents/{incident_id}".
-  string name = 1;
+  // Required. Resource name of the incident or signal, for example,
+  // "projects/{project_id_or_number}/incidents/{incident_id}".
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Incident"
+    }
+  ];
 
   // Number of similar incidents to return.
   int32 page_size = 2;
@@ -378,19 +415,30 @@ message SearchSimilarIncidentsResponse {
 
 // Request for the CreateAnnotation method.
 message CreateAnnotationRequest {
-  // Resource name of the incident, for example,
-  // "projects/{project_id}/incidents/{incident_id}".
-  string parent = 1;
-
-  // Only annotation.content is an input argument.
-  Annotation annotation = 2;
+  // Required. Resource name of the incident, for example,
+  // "projects/{project_id_or_number}/incidents/{incident_id}".
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Incident"
+    }
+  ];
+
+  // Required. Only annotation.content is an input argument.
+  Annotation annotation = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
+
 // Request for the ListAnnotations method.
 message ListAnnotationsRequest {
-  // Resource name of the incident, for example,
-  // "projects/{project_id}/incidents/{incident_id}".
-  string parent = 1;
+  // Required. Resource name of the incident, for example,
+  // "projects/{project_id_or_number}/incidents/{incident_id}".
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Incident"
+    }
+  ];
 
   // Number of annotations to return.
   int32 page_size = 2;
@@ -410,25 +458,40 @@ message ListAnnotationsResponse {
 
 // Request for the CreateTag method.
 message CreateTagRequest {
-  // Resource name of the incident, for example,
-  // "projects/{project_id}/incidents/{incident_id}".
-  string parent = 1;
-
-  // Tag to create. Only tag.display_name is an input argument.
-  Tag tag = 2;
+  // Required. Resource name of the incident, for example,
+  // "projects/{project_id_or_number}/incidents/{incident_id}".
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Incident"
+    }
+  ];
+
+  // Required. Tag to create. Only tag.display_name is an input argument.
+  Tag tag = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request for the DeleteTag method.
 message DeleteTagRequest {
-  // Resource name of the tag.
-  string name = 1;
+  // Required. Resource name of the tag.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Tag"
+    }
+  ];
 }
 
 // Request for the ListTagsForIncident method.
 message ListTagsRequest {
-  // Resource name of the incident, for example,
-  // "projects/{project_id}/incidents/{incident_id}".
-  string parent = 1;
+  // Required. Resource name of the incident, for example,
+  // "projects/{project_id_or_number}/incidents/{incident_id}".
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Incident"
+    }
+  ];
 
   // Number of tags to return.
   int32 page_size = 2;
@@ -448,19 +511,29 @@ message ListTagsResponse {
 
 // Request for the CreateSignal method.
 message CreateSignalRequest {
-  // The resource name of the hosting Stackdriver project which requested
+  // Required. The resource name of the hosting Stackdriver project which requested
   // signal belongs to.
-  string parent = 1;
-
-  // The signal to create.
-  Signal signal = 2;
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudresourcemanager.googleapis.com/Project"
+    }
+  ];
+
+  // Required. The signal to create.
+  Signal signal = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request for the SearchSignals method.
 message SearchSignalsRequest {
-  // The resource name of the hosting Stackdriver project which requested
+  // Required. The resource name of the hosting Stackdriver project which requested
   // incidents belong to.
-  string parent = 1;
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudresourcemanager.googleapis.com/Project"
+    }
+  ];
 
   // An expression that defines which signals to return.
   //
@@ -542,16 +615,21 @@ message SearchSignalsResponse {
 
 // Request for the GetSignal method.
 message GetSignalRequest {
-  // Resource name of the Signal resource, for example,
-  // "projects/{project_id}/signals/{signal_id}".
-  string name = 1;
+  // Required. Resource name of the Signal resource, for example,
+  // "projects/{project_id_or_number}/signals/{signal_id}".
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Signal"
+    }
+  ];
 }
 
 // Request for the LookupSignal method.
 message LookupSignalRequest {
-  // Required. The ID to use for lookup.
+  // The ID to use for lookup.
   oneof alternate_id {
-    // Full resource name of the CSCC finding id this signal refers to (e.g.
+    // Required. Full resource name of the CSCC finding id this signal refers to (e.g.
     // "organizations/abc/sources/123/findings/xyz")
     string cscc_finding = 2;
 
@@ -562,8 +640,8 @@ message LookupSignalRequest {
 
 // Request for the UpdateSignal method.
 message UpdateSignalRequest {
-  // The signal to update with the new values.
-  Signal signal = 1;
+  // Required. The signal to update with the new values.
+  Signal signal = 1 [(google.api.field_behavior) = REQUIRED];
 
   // List of fields that should be updated.
   google.protobuf.FieldMask update_mask = 2;
@@ -571,9 +649,14 @@ message UpdateSignalRequest {
 
 // Request for the SearchIncidents method.
 message SearchIncidentsRequest {
-  // The resource name of the hosting Stackdriver project which requested
+  // Required. The resource name of the hosting Stackdriver project which requested
   // incidents belong to.
-  string parent = 1;
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudresourcemanager.googleapis.com/Project"
+    }
+  ];
 
   // An expression that defines which incidents to return.
   //
@@ -652,8 +735,8 @@ message SearchIncidentsResponse {
 
 // Request to escalate an incident.
 message EscalateIncidentRequest {
-  // The incident to escalate with the new values.
-  Incident incident = 1;
+  // Required. The incident to escalate with the new values.
+  Incident incident = 1 [(google.api.field_behavior) = REQUIRED];
 
   // List of fields that should be updated.
   google.protobuf.FieldMask update_mask = 2;
@@ -693,19 +776,29 @@ message EscalateIncidentResponse {
 
 // Request for the CreateArtifact method.
 message CreateArtifactRequest {
-  // Resource name of the incident, for example,
-  // "projects/{project_id}/incidents/{incident_id}".
-  string parent = 1;
-
-  // The artifact to create.
-  Artifact artifact = 2;
+  // Required. Resource name of the incident, for example,
+  // "projects/{project_id_or_number}/incidents/{incident_id}".
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Incident"
+    }
+  ];
+
+  // Required. The artifact to create.
+  Artifact artifact = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request for the ListArtifacts method.
 message ListArtifactsRequest {
-  // Resource name of the incident, for example,
-  // "projects/{project_id}/incidents/{incident_id}".
-  string parent = 1;
+  // Required. Resource name of the incident, for example,
+  // "projects/{project_id_or_number}/incidents/{incident_id}".
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Incident"
+    }
+  ];
 
   // Number of artifacts to return.
   int32 page_size = 2;
@@ -725,8 +818,8 @@ message ListArtifactsResponse {
 
 // Request for the UpdateArtifact method.
 message UpdateArtifactRequest {
-  // The artifact to update with the new values.
-  Artifact artifact = 1;
+  // Required. The artifact to update with the new values.
+  Artifact artifact = 1 [(google.api.field_behavior) = REQUIRED];
 
   // List of fields that should be updated.
   google.protobuf.FieldMask update_mask = 2;
@@ -734,8 +827,13 @@ message UpdateArtifactRequest {
 
 // Request for deleting an artifact.
 message DeleteArtifactRequest {
-  // Resource name of the artifact.
-  string name = 1;
+  // Required. Resource name of the artifact.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Artifact"
+    }
+  ];
 }
 
 // SendShiftHandoff and PreviewShiftHandoff RPC request.
@@ -745,32 +843,39 @@ message SendShiftHandoffRequest {
   // attaching additional data to each incident in the future.
   message Incident {
     // Resource name of the incident, for example,
-    // "projects/{project_id}/incidents/{incident_id}".
-    string name = 1;
+    // "projects/{project_id_or_number}/incidents/{incident_id}".
+    string name = 1 [(google.api.resource_reference) = {
+                       type: "irm.googleapis.com/Incident"
+                     }];
   }
 
-  // The resource name of the Stackdriver project that the handoff is being sent
-  // from. for example, `projects/{project_id}`
-  string parent = 1;
+  // Required. The resource name of the Stackdriver project that the handoff is being sent
+  // from. for example, `projects/{project_id_or_number}`
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudresourcemanager.googleapis.com/Project"
+    }
+  ];
 
-  // Email addresses of the recipients of the handoff, for example,
+  // Required. Email addresses of the recipients of the handoff, for example,
   // "user@example.com". Must contain at least one entry.
-  repeated string recipients = 2;
+  repeated string recipients = 2 [(google.api.field_behavior) = REQUIRED];
 
-  // Email addresses that should be CC'd on the handoff. Optional.
-  repeated string cc = 3;
+  // Optional. Email addresses that should be CC'd on the handoff.
+  repeated string cc = 3 [(google.api.field_behavior) = OPTIONAL];
 
-  // The subject of the email. Required.
-  string subject = 4;
+  // Required. The subject of the email.
+  string subject = 4 [(google.api.field_behavior) = REQUIRED];
 
   // Content type string, for example, 'text/plain' or 'text/html'.
   string notes_content_type = 5;
 
-  // Additional notes to be included in the handoff. Optional.
-  string notes_content = 6;
+  // Optional. Additional notes to be included in the handoff.
+  string notes_content = 6 [(google.api.field_behavior) = OPTIONAL];
 
-  // The set of incidents that should be included in the handoff. Optional.
-  repeated Incident incidents = 7;
+  // Optional. The set of incidents that should be included in the handoff.
+  repeated Incident incidents = 7 [(google.api.field_behavior) = OPTIONAL];
 
   // If set to true a ShiftHandoffResponse will be returned but the handoff
   // will not actually be sent.
@@ -790,18 +895,23 @@ message SendShiftHandoffResponse {
 
 // Request for the CreateSubscription method.
 message CreateSubscriptionRequest {
-  // Resource name of the incident, for example,
-  // "projects/{project_id}/incidents/{incident_id}".
-  string parent = 1;
-
-  // The subscription to create.
-  Subscription subscription = 2;
+  // Required. Resource name of the incident, for example,
+  // "projects/{project_id_or_number}/incidents/{incident_id}".
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Incident"
+    }
+  ];
+
+  // Required. The subscription to create.
+  Subscription subscription = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request for the UpdateSubscription method.
 message UpdateSubscriptionRequest {
-  // The subscription to update, with new values.
-  Subscription subscription = 1;
+  // Required. The subscription to update, with new values.
+  Subscription subscription = 1 [(google.api.field_behavior) = REQUIRED];
 
   // List of fields that should be updated.
   google.protobuf.FieldMask update_mask = 2;
@@ -809,9 +919,14 @@ message UpdateSubscriptionRequest {
 
 // Request for the ListSubscriptions method.
 message ListSubscriptionsRequest {
-  // Resource name of the incident, for example,
-  // "projects/{project_id}/incidents/{incident_id}".
-  string parent = 1;
+  // Required. Resource name of the incident, for example,
+  // "projects/{project_id_or_number}/incidents/{incident_id}".
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Incident"
+    }
+  ];
 
   // Number of subscriptions to return.
   int32 page_size = 2;
@@ -831,31 +946,51 @@ message ListSubscriptionsResponse {
 
 // Request for deleting a subscription.
 message DeleteSubscriptionRequest {
-  // Resource name of the subscription.
-  string name = 1;
+  // Required. Resource name of the subscription.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Subscription"
+    }
+  ];
 }
 
 // Request for creating a role assignment.
 message CreateIncidentRoleAssignmentRequest {
-  // Resource name of the incident, for example,
-  // "projects/{project_id}/incidents/{incident_id}".
-  string parent = 1;
-
-  // Role assignment to create.
-  IncidentRoleAssignment incident_role_assignment = 2;
+  // Required. Resource name of the incident, for example,
+  // "projects/{project_id_or_number}/incidents/{incident_id}".
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Incident"
+    }
+  ];
+
+  // Required. Role assignment to create.
+  IncidentRoleAssignment incident_role_assignment = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request for deleting a role assignment.
 message DeleteIncidentRoleAssignmentRequest {
-  // Resource name of the role assignment.
-  string name = 1;
+  // Required. Resource name of the role assignment.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Incident"
+    }
+  ];
 }
 
 // Request to list role assignments of an incident.
 message ListIncidentRoleAssignmentsRequest {
-  // Resource name of the incident, for example,
-  // "projects/{project_id}/incidents/{incident_id}".
-  string parent = 1;
+  // Required. Resource name of the incident, for example,
+  // "projects/{project_id_or_number}/incidents/{incident_id}".
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/Incident"
+    }
+  ];
 
   // Number of assignments to return.
   int32 page_size = 2;
@@ -875,40 +1010,55 @@ message ListIncidentRoleAssignmentsResponse {
 
 // Request to start a role handover.
 message RequestIncidentRoleHandoverRequest {
-  // Resource name of the role assignment.
-  string name = 1;
+  // Required. Resource name of the role assignment.
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
 
-  // The proposed assignee.
-  User new_assignee = 2;
+  // Required. The proposed assignee.
+  User new_assignee = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request to confirm a role handover.
 message ConfirmIncidentRoleHandoverRequest {
-  // Resource name of the role assignment.
-  string name = 1;
-
-  // The proposed assignee, who will now be the assignee. This should be the
+  // Required. Resource name of the role assignment.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/IncidentRoleAssignment"
+    }
+  ];
+
+  // Required. The proposed assignee, who will now be the assignee. This should be the
   // current user; otherwise ForceRoleHandover should be called.
-  User new_assignee = 2;
+   User new_assignee = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request to force a role handover.
 message ForceIncidentRoleHandoverRequest {
-  // Resource name of the role assignment.
-  string name = 1;
-
-  // The proposed assignee, who will now be the assignee. This should not be
+  // Required. Resource name of the role assignment.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/IncidentRoleAssignment"
+    }
+  ];
+
+  // Required. The proposed assignee, who will now be the assignee. This should not be
   // the current user; otherwise ConfirmRoleHandover should be called.
-  User new_assignee = 2;
+  User new_assignee = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request to cancel a role handover.
 message CancelIncidentRoleHandoverRequest {
-  // Resource name of the role assignment.
-  string name = 1;
-
-  // Person who was proposed as the next assignee (i.e.
+  // Required. Resource name of the role assignment.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "irm.googleapis.com/IncidentRoleAssignment"
+    }
+  ];
+
+  // Required. Person who was proposed as the next assignee (i.e.
   // IncidentRoleAssignment.proposed_assignee) and whose proposal is being
   // cancelled.
-  User new_assignee = 2;
+  User new_assignee = 2 [(google.api.field_behavior) = REQUIRED];
 }
diff --git a/google/cloud/irm/v1alpha2/irm_gapic.legacy.yaml b/google/cloud/irm/v1alpha2/irm_gapic.legacy.yaml
new file mode 100644
index 000000000..f09e8e415
--- /dev/null
+++ b/google/cloud/irm/v1alpha2/irm_gapic.legacy.yaml
@@ -0,0 +1,723 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+  java:
+    package_name: com.google.cloud.irm.v1alpha2
+  python:
+    package_name: google.cloud.irm_v1alpha2.gapic
+  go:
+    package_name: cloud.google.com/go/irm/apiv1alpha2
+  csharp:
+    package_name: Google.Cloud.Irm.V1Alpha2
+  ruby:
+    package_name: Google::Cloud::Irm::V1alpha2
+  php:
+    package_name: Google\Cloud\Irm\V1alpha2
+  nodejs:
+    package_name: irm.v1alpha2
+    domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+  # The fully qualified name of the API interface.
+- name: google.cloud.irm.v1alpha2.IncidentService
+  # A list of resource collection configurations.
+  # Consists of a name_pattern and an entity_name.
+  # The name_pattern is a pattern to describe the names of the resources of this
+  # collection, using the platform's conventions for URI patterns. A generator
+  # may use this to generate methods to compose and decompose such names. The
+  # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+  # those will be taken as hints for the parameter names of the generated
+  # methods. If empty, no name methods are generated.
+  # The entity_name is the name to be used as a basis for generated methods and
+  # classes.
+  collections:
+  - name_pattern: projects/{project}
+    entity_name: project
+    language_overrides:
+    - language: csharp
+      common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+  - name_pattern: projects/{project}/incidents/{incident}
+    entity_name: incident
+  - name_pattern: projects/{project}/incidents/{incident}/annotations/{annotation}
+    entity_name: annotation
+  - name_pattern: projects/{project}/incidents/{incident}/artifacts/{artifact}
+    entity_name: artifact
+  - name_pattern: projects/{project}/incidents/{incident}/roleAssignments/{role_assignment}
+    entity_name: role_assignment
+  - name_pattern: projects/{project}/incidents/{incident}/subscriptions/{subscription}
+    entity_name: subscription
+  - name_pattern: projects/{project}/incidents/{incident}/tags/{tag}
+    entity_name: tag
+  - name_pattern: projects/{project}/signals/{signal}
+    entity_name: signal
+  # Definition for retryable codes.
+  retry_codes_def:
+  - name: idempotent
+    retry_codes:
+    - DEADLINE_EXCEEDED
+    - UNAVAILABLE
+  - name: non_idempotent
+    retry_codes: []
+  # Definition for retry/backoff parameters.
+  retry_params_def:
+  - name: default
+    initial_retry_delay_millis: 100
+    retry_delay_multiplier: 1.3
+    max_retry_delay_millis: 60000
+    initial_rpc_timeout_millis: 20000
+    rpc_timeout_multiplier: 1
+    max_rpc_timeout_millis: 20000
+    total_timeout_millis: 600000
+  # A list of method configurations.
+  # Common properties:
+  #
+  #   name - The simple name of the method.
+  #
+  #   flattening - Specifies the configuration for parameter flattening.
+  #   Describes the parameter groups for which a generator should produce method
+  #   overloads which allow a client to directly pass request message fields as
+  #   method parameters. This information may or may not be used, depending on
+  #   the target language.
+  #   Consists of groups, which each represent a list of parameters to be
+  #   flattened. Each parameter listed must be a field of the request message.
+  #
+  #   required_fields - Fields that are always required for a request to be
+  #   valid.
+  #
+  #   resource_name_treatment - An enum that specifies how to treat the resource
+  #   name formats defined in the field_name_patterns and
+  #   response_field_name_patterns fields.
+  #   UNSET: default value
+  #   NONE: the collection configs will not be used by the generated code.
+  #   VALIDATE: string fields will be validated by the client against the
+  #   specified resource name formats.
+  #   STATIC_TYPES: the client will use generated types for resource names.
+  #
+  #   page_streaming - Specifies the configuration for paging.
+  #   Describes information for generating a method which transforms a paging
+  #   list RPC into a stream of resources.
+  #   Consists of a request and a response.
+  #   The request specifies request information of the list method. It defines
+  #   which fields match the paging pattern in the request. The request consists
+  #   of a page_size_field and a token_field. The page_size_field is the name of
+  #   the optional field specifying the maximum number of elements to be
+  #   returned in the response. The token_field is the name of the field in the
+  #   request containing the page token.
+  #   The response specifies response information of the list method. It defines
+  #   which fields match the paging pattern in the response. The response
+  #   consists of a token_field and a resources_field. The token_field is the
+  #   name of the field in the response containing the next page token. The
+  #   resources_field is the name of the field in the response containing the
+  #   list of resources belonging to the page.
+  #
+  #   retry_codes_name - Specifies the configuration for retryable codes. The
+  #   name must be defined in interfaces.retry_codes_def.
+  #
+  #   retry_params_name - Specifies the configuration for retry/backoff
+  #   parameters. The name must be defined in interfaces.retry_params_def.
+  #
+  #   field_name_patterns - Maps the field name of the request type to
+  #   entity_name of interfaces.collections.
+  #   Specifies the string pattern that the field must follow.
+  #
+  #   timeout_millis - Specifies the default timeout for a non-retrying call. If
+  #   the call is retrying, refer to retry_params_name instead.
+  methods:
+  - name: CreateIncident
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - incident
+        - parent
+    required_fields:
+    - incident
+    - parent
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: project
+    timeout_millis: 60000
+  - name: GetIncident
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: incident
+    timeout_millis: 60000
+  - name: SearchIncidents
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - query
+        - time_zone
+    required_fields:
+    - parent
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: incidents
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: project
+    timeout_millis: 60000
+  - name: UpdateIncident
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - incident
+        - update_mask
+    required_fields:
+    - incident
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      incident.name: incident
+    timeout_millis: 60000
+  - name: SearchSimilarIncidents
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: results
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: incident
+    timeout_millis: 60000
+  - name: CreateAnnotation
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - annotation
+    required_fields:
+    - parent
+    - annotation
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: incident
+    timeout_millis: 60000
+  - name: ListAnnotations
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - parent
+    required_fields:
+    - parent
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: annotations
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: incident
+    timeout_millis: 60000
+  - name: CreateTag
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - tag
+    required_fields:
+    - parent
+    - tag
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: incident
+    timeout_millis: 60000
+  - name: DeleteTag
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: tag
+    timeout_millis: 60000
+  - name: ListTags
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - parent
+    required_fields:
+    - parent
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: tags
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: incident
+    timeout_millis: 60000
+  - name: CreateSignal
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - signal
+    required_fields:
+    - parent
+    - signal
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: project
+    timeout_millis: 60000
+  - name: SearchSignals
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - query
+    required_fields:
+    - parent
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: signals
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: project
+    timeout_millis: 60000
+  - name: GetSignal
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: signal
+    timeout_millis: 60000
+  - name: LookupSignal
+    retry_codes_name: idempotent
+    retry_params_name: default
+    timeout_millis: 60000
+  - name: UpdateSignal
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - signal
+        - update_mask
+    required_fields:
+    - signal
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      signal.name: signal
+    timeout_millis: 60000
+  - name: EscalateIncident
+    resource_name_treatment: STATIC_TYPES
+    required_fields:
+    - incident
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      incident.name: incident
+    timeout_millis: 60000
+  - name: CreateArtifact
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - artifact
+    required_fields:
+    - parent
+    - artifact
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: incident
+    timeout_millis: 60000
+  - name: ListArtifacts
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - parent
+    required_fields:
+    - parent
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: artifacts
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: incident
+    timeout_millis: 60000
+  - name: UpdateArtifact
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - artifact
+        - update_mask
+    required_fields:
+    - artifact
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      artifact.name: artifact
+    timeout_millis: 60000
+  - name: DeleteArtifact
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: artifact
+    timeout_millis: 60000
+  - name: SendShiftHandoff
+    resource_name_treatment: STATIC_TYPES
+    required_fields:
+    - parent
+    - recipients
+    - subject
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: project
+    timeout_millis: 60000
+  - name: CreateSubscription
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - subscription
+    required_fields:
+    - parent
+    - subscription
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: incident
+    timeout_millis: 60000
+  - name: UpdateSubscription
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - subscription
+        - update_mask
+    required_fields:
+    - subscription
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      subscription.name: subscription
+    timeout_millis: 60000
+  - name: ListSubscriptions
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - parent
+    required_fields:
+    - parent
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: subscriptions
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: incident
+    timeout_millis: 60000
+  - name: DeleteSubscription
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: subscription
+    timeout_millis: 60000
+  - name: CreateIncidentRoleAssignment
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - incident_role_assignment
+    required_fields:
+    - parent
+    - incident_role_assignment
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: incident
+    timeout_millis: 60000
+  - name: DeleteIncidentRoleAssignment
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: role_assignment
+    timeout_millis: 60000
+  - name: ListIncidentRoleAssignments
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - parent
+    required_fields:
+    - parent
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: incident_role_assignments
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: incident
+    timeout_millis: 60000
+  - name: RequestIncidentRoleHandover
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - name
+        - new_assignee
+    required_fields:
+    - name
+    - new_assignee
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: role_assignment
+    timeout_millis: 60000
+  - name: ConfirmIncidentRoleHandover
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - name
+        - new_assignee
+    required_fields:
+    - name
+    - new_assignee
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: role_assignment
+    timeout_millis: 60000
+  - name: ForceIncidentRoleHandover
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - name
+        - new_assignee
+    required_fields:
+    - name
+    - new_assignee
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: role_assignment
+    timeout_millis: 60000
+  - name: CancelIncidentRoleHandover
+    resource_name_treatment: STATIC_TYPES
+    flattening:
+      groups:
+      - parameters:
+        - name
+        - new_assignee
+    required_fields:
+    - name
+    - new_assignee
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: role_assignment
+    timeout_millis: 60000
+resource_name_generation:
+- message_name: Annotation
+  field_entity_map:
+    name: annotation
+- message_name: Artifact
+  field_entity_map:
+    name: artifact
+- message_name: Incident
+  field_entity_map:
+    name: incident
+- message_name: IncidentRoleAssignment
+  field_entity_map:
+    name: role_assignment
+- message_name: Signal
+  field_entity_map:
+    name: signal
+- message_name: Subscription
+  field_entity_map:
+    name: subscription
+- message_name: Tag
+  field_entity_map:
+    name: tag
+- message_name: CreateIncidentRequest
+  field_entity_map:
+    parent: project
+- message_name: GetIncidentRequest
+  field_entity_map:
+    name: incident
+- message_name: SearchIncidentsRequest
+  field_entity_map:
+    parent: project
+- message_name: UpdateIncidentRequest
+  field_entity_map:
+    incident.name: incident
+- message_name: EscalateIncidentRequest
+  field_entity_map:
+    incident.name: incident
+- message_name: CreateSignalRequest
+  field_entity_map:
+    parent: project
+- message_name: GetSignalRequest
+  field_entity_map:
+    name: signal
+- message_name: SearchSignalsRequest
+  field_entity_map:
+    parent: project
+- message_name: UpdateSignalRequest
+  field_entity_map:
+    signal.name: signal
+- message_name: CreateArtifactRequest
+  field_entity_map:
+    parent: incident
+- message_name: ListArtifactsRequest
+  field_entity_map:
+    parent: incident
+- message_name: UpdateArtifactRequest
+  field_entity_map:
+    artifact.name: artifact
+- message_name: DeleteArtifactRequest
+  field_entity_map:
+    name: artifact
+- message_name: CreateIncidentRoleAssignmentRequest
+  field_entity_map:
+    parent: incident
+- message_name: ListIncidentRoleAssignmentsRequest
+  field_entity_map:
+    parent: incident
+- message_name: DeleteIncidentRoleAssignmentRequest
+  field_entity_map:
+    name: role_assignment
+- message_name: RequestIncidentRoleHandoverRequest
+  field_entity_map:
+    name: role_assignment
+- message_name: ConfirmIncidentRoleHandoverRequest
+  field_entity_map:
+    name: role_assignment
+- message_name: ForceIncidentRoleHandoverRequest
+  field_entity_map:
+    name: role_assignment
+- message_name: CancelIncidentRoleHandoverRequest
+  field_entity_map:
+    name: role_assignment
+- message_name: CreateSubscriptionRequest
+  field_entity_map:
+    parent: incident
+- message_name: ListSubscriptionsRequest
+  field_entity_map:
+    parent: incident
+- message_name: UpdateSubscriptionRequest
+  field_entity_map:
+    subscription.name: subscription
+- message_name: DeleteSubscriptionRequest
+  field_entity_map:
+    name: subscription
+- message_name: CreateTagRequest
+  field_entity_map:
+    parent: incident
+- message_name: ListTagsRequest
+  field_entity_map:
+    parent: incident
+- message_name: DeleteTagRequest
+  field_entity_map:
+    name: tag
+- message_name: CreateAnnotationRequest
+  field_entity_map:
+    parent: incident
+- message_name: ListAnnotationsRequest
+  field_entity_map:
+    parent: incident
+- message_name: SendShiftHandoffRequest
+  field_entity_map:
+    parent: project
diff --git a/google/cloud/irm/v1alpha2/irm_gapic.yaml b/google/cloud/irm/v1alpha2/irm_gapic.yaml
index f09e8e415..969e9d2ab 100644
--- a/google/cloud/irm/v1alpha2/irm_gapic.yaml
+++ b/google/cloud/irm/v1alpha2/irm_gapic.yaml
@@ -1,5 +1,5 @@
 type: com.google.api.codegen.ConfigProto
-config_schema_version: 1.0.0
+config_schema_version: 2.0.0
 # The settings of generated code in a specific language.
 language_settings:
   java:
@@ -21,54 +21,6 @@ language_settings:
 interfaces:
   # The fully qualified name of the API interface.
 - name: google.cloud.irm.v1alpha2.IncidentService
-  # A list of resource collection configurations.
-  # Consists of a name_pattern and an entity_name.
-  # The name_pattern is a pattern to describe the names of the resources of this
-  # collection, using the platform's conventions for URI patterns. A generator
-  # may use this to generate methods to compose and decompose such names. The
-  # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
-  # those will be taken as hints for the parameter names of the generated
-  # methods. If empty, no name methods are generated.
-  # The entity_name is the name to be used as a basis for generated methods and
-  # classes.
-  collections:
-  - name_pattern: projects/{project}
-    entity_name: project
-    language_overrides:
-    - language: csharp
-      common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
-  - name_pattern: projects/{project}/incidents/{incident}
-    entity_name: incident
-  - name_pattern: projects/{project}/incidents/{incident}/annotations/{annotation}
-    entity_name: annotation
-  - name_pattern: projects/{project}/incidents/{incident}/artifacts/{artifact}
-    entity_name: artifact
-  - name_pattern: projects/{project}/incidents/{incident}/roleAssignments/{role_assignment}
-    entity_name: role_assignment
-  - name_pattern: projects/{project}/incidents/{incident}/subscriptions/{subscription}
-    entity_name: subscription
-  - name_pattern: projects/{project}/incidents/{incident}/tags/{tag}
-    entity_name: tag
-  - name_pattern: projects/{project}/signals/{signal}
-    entity_name: signal
-  # Definition for retryable codes.
-  retry_codes_def:
-  - name: idempotent
-    retry_codes:
-    - DEADLINE_EXCEEDED
-    - UNAVAILABLE
-  - name: non_idempotent
-    retry_codes: []
-  # Definition for retry/backoff parameters.
-  retry_params_def:
-  - name: default
-    initial_retry_delay_millis: 100
-    retry_delay_multiplier: 1.3
-    max_retry_delay_millis: 60000
-    initial_rpc_timeout_millis: 20000
-    rpc_timeout_multiplier: 1
-    max_rpc_timeout_millis: 20000
-    total_timeout_millis: 600000
   # A list of method configurations.
   # Common properties:
   #
@@ -124,600 +76,11 @@ interfaces:
   #   timeout_millis - Specifies the default timeout for a non-retrying call. If
   #   the call is retrying, refer to retry_params_name instead.
   methods:
-  - name: CreateIncident
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - incident
-        - parent
-    required_fields:
-    - incident
-    - parent
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: project
-    timeout_millis: 60000
-  - name: GetIncident
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: incident
-    timeout_millis: 60000
-  - name: SearchIncidents
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - query
-        - time_zone
-    required_fields:
-    - parent
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: incidents
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: project
-    timeout_millis: 60000
-  - name: UpdateIncident
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - incident
-        - update_mask
-    required_fields:
-    - incident
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      incident.name: incident
-    timeout_millis: 60000
-  - name: SearchSimilarIncidents
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: results
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: incident
-    timeout_millis: 60000
-  - name: CreateAnnotation
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - annotation
-    required_fields:
-    - parent
-    - annotation
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: incident
-    timeout_millis: 60000
-  - name: ListAnnotations
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - parent
-    required_fields:
-    - parent
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: annotations
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: incident
-    timeout_millis: 60000
-  - name: CreateTag
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - tag
-    required_fields:
-    - parent
-    - tag
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: incident
-    timeout_millis: 60000
-  - name: DeleteTag
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: tag
-    timeout_millis: 60000
-  - name: ListTags
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - parent
-    required_fields:
-    - parent
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: tags
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: incident
-    timeout_millis: 60000
-  - name: CreateSignal
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - signal
-    required_fields:
-    - parent
-    - signal
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: project
-    timeout_millis: 60000
-  - name: SearchSignals
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - query
-    required_fields:
-    - parent
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: signals
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: project
-    timeout_millis: 60000
-  - name: GetSignal
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: signal
-    timeout_millis: 60000
-  - name: LookupSignal
-    retry_codes_name: idempotent
-    retry_params_name: default
-    timeout_millis: 60000
-  - name: UpdateSignal
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - signal
-        - update_mask
-    required_fields:
-    - signal
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      signal.name: signal
-    timeout_millis: 60000
-  - name: EscalateIncident
-    resource_name_treatment: STATIC_TYPES
-    required_fields:
-    - incident
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      incident.name: incident
-    timeout_millis: 60000
-  - name: CreateArtifact
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - artifact
-    required_fields:
-    - parent
-    - artifact
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: incident
-    timeout_millis: 60000
-  - name: ListArtifacts
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - parent
-    required_fields:
-    - parent
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: artifacts
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: incident
-    timeout_millis: 60000
-  - name: UpdateArtifact
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - artifact
-        - update_mask
-    required_fields:
-    - artifact
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      artifact.name: artifact
-    timeout_millis: 60000
   - name: DeleteArtifact
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: artifact
-    timeout_millis: 60000
-  - name: SendShiftHandoff
-    resource_name_treatment: STATIC_TYPES
-    required_fields:
-    - parent
-    - recipients
-    - subject
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: project
-    timeout_millis: 60000
-  - name: CreateSubscription
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - subscription
-    required_fields:
-    - parent
-    - subscription
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: incident
-    timeout_millis: 60000
-  - name: UpdateSubscription
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - subscription
-        - update_mask
-    required_fields:
-    - subscription
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      subscription.name: subscription
-    timeout_millis: 60000
-  - name: ListSubscriptions
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - parent
-    required_fields:
-    - parent
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: subscriptions
     retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: incident
-    timeout_millis: 60000
-  - name: DeleteSubscription
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: subscription
-    timeout_millis: 60000
-  - name: CreateIncidentRoleAssignment
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - incident_role_assignment
-    required_fields:
-    - parent
-    - incident_role_assignment
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: incident
-    timeout_millis: 60000
-  - name: DeleteIncidentRoleAssignment
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: role_assignment
-    timeout_millis: 60000
-  - name: ListIncidentRoleAssignments
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - parent
-    required_fields:
-    - parent
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: incident_role_assignments
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: incident
-    timeout_millis: 60000
   - name: RequestIncidentRoleHandover
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - name
-        - new_assignee
-    required_fields:
-    - name
-    - new_assignee
     retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: role_assignment
-    timeout_millis: 60000
   - name: ConfirmIncidentRoleHandover
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - name
-        - new_assignee
-    required_fields:
-    - name
-    - new_assignee
     retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: role_assignment
-    timeout_millis: 60000
   - name: ForceIncidentRoleHandover
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - name
-        - new_assignee
-    required_fields:
-    - name
-    - new_assignee
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: role_assignment
-    timeout_millis: 60000
-  - name: CancelIncidentRoleHandover
-    resource_name_treatment: STATIC_TYPES
-    flattening:
-      groups:
-      - parameters:
-        - name
-        - new_assignee
-    required_fields:
-    - name
-    - new_assignee
     retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: role_assignment
-    timeout_millis: 60000
-resource_name_generation:
-- message_name: Annotation
-  field_entity_map:
-    name: annotation
-- message_name: Artifact
-  field_entity_map:
-    name: artifact
-- message_name: Incident
-  field_entity_map:
-    name: incident
-- message_name: IncidentRoleAssignment
-  field_entity_map:
-    name: role_assignment
-- message_name: Signal
-  field_entity_map:
-    name: signal
-- message_name: Subscription
-  field_entity_map:
-    name: subscription
-- message_name: Tag
-  field_entity_map:
-    name: tag
-- message_name: CreateIncidentRequest
-  field_entity_map:
-    parent: project
-- message_name: GetIncidentRequest
-  field_entity_map:
-    name: incident
-- message_name: SearchIncidentsRequest
-  field_entity_map:
-    parent: project
-- message_name: UpdateIncidentRequest
-  field_entity_map:
-    incident.name: incident
-- message_name: EscalateIncidentRequest
-  field_entity_map:
-    incident.name: incident
-- message_name: CreateSignalRequest
-  field_entity_map:
-    parent: project
-- message_name: GetSignalRequest
-  field_entity_map:
-    name: signal
-- message_name: SearchSignalsRequest
-  field_entity_map:
-    parent: project
-- message_name: UpdateSignalRequest
-  field_entity_map:
-    signal.name: signal
-- message_name: CreateArtifactRequest
-  field_entity_map:
-    parent: incident
-- message_name: ListArtifactsRequest
-  field_entity_map:
-    parent: incident
-- message_name: UpdateArtifactRequest
-  field_entity_map:
-    artifact.name: artifact
-- message_name: DeleteArtifactRequest
-  field_entity_map:
-    name: artifact
-- message_name: CreateIncidentRoleAssignmentRequest
-  field_entity_map:
-    parent: incident
-- message_name: ListIncidentRoleAssignmentsRequest
-  field_entity_map:
-    parent: incident
-- message_name: DeleteIncidentRoleAssignmentRequest
-  field_entity_map:
-    name: role_assignment
-- message_name: RequestIncidentRoleHandoverRequest
-  field_entity_map:
-    name: role_assignment
-- message_name: ConfirmIncidentRoleHandoverRequest
-  field_entity_map:
-    name: role_assignment
-- message_name: ForceIncidentRoleHandoverRequest
-  field_entity_map:
-    name: role_assignment
-- message_name: CancelIncidentRoleHandoverRequest
-  field_entity_map:
-    name: role_assignment
-- message_name: CreateSubscriptionRequest
-  field_entity_map:
-    parent: incident
-- message_name: ListSubscriptionsRequest
-  field_entity_map:
-    parent: incident
-- message_name: UpdateSubscriptionRequest
-  field_entity_map:
-    subscription.name: subscription
-- message_name: DeleteSubscriptionRequest
-  field_entity_map:
-    name: subscription
-- message_name: CreateTagRequest
-  field_entity_map:
-    parent: incident
-- message_name: ListTagsRequest
-  field_entity_map:
-    parent: incident
-- message_name: DeleteTagRequest
-  field_entity_map:
-    name: tag
-- message_name: CreateAnnotationRequest
-  field_entity_map:
-    parent: incident
-- message_name: ListAnnotationsRequest
-  field_entity_map:
-    parent: incident
-- message_name: SendShiftHandoffRequest
-  field_entity_map:
-    parent: project
diff --git a/google/cloud/irm/v1alpha2/irm_grpc_service_config.json b/google/cloud/irm/v1alpha2/irm_grpc_service_config.json
new file mode 100755
index 000000000..bbc4d9582
--- /dev/null
+++ b/google/cloud/irm/v1alpha2/irm_grpc_service_config.json
@@ -0,0 +1,151 @@
+{
+  "methodConfig": [
+    {
+      "name": [
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "CreateIncident"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "UpdateIncident"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "CreateAnnotation"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "CreateTag"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "CreateSignal"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "UpdateSignal"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "EscalateIncident"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "CreateArtifact"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "UpdateArtifact"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "SendShiftHandoff"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "CreateSubscription"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "UpdateSubscription"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "CreateIncidentRoleAssignment"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "RequestIncidentRoleHandover"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "ConfirmIncidentRoleHandover"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "ForceIncidentRoleHandover"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "CancelIncidentRoleHandover"
+        }
+      ],
+      "timeout": "600s"
+    },
+    {
+      "name": [
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "GetIncident"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "SearchIncidents"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "SearchSimilarIncidents"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "ListAnnotations"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "DeleteTag"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "ListTags"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "SearchSignals"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "GetSignal"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "LookupSignal"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "ListArtifacts"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "DeleteArtifact"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "ListSubscriptions"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "DeleteSubscription"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "DeleteIncidentRoleAssignment"
+        },
+        {
+          "service": "google.cloud.irm.v1alpha2.IncidentService",
+          "method": "ListIncidentRoleAssignments"
+        }
+      ],
+      "timeout": "600s",
+      "retryPolicy": {
+        "initialBackoff": "0.100s",
+        "maxBackoff": "60s",
+        "backoffMultiplier": 1.3,
+        "retryableStatusCodes": [
+          "DEADLINE_EXCEEDED",
+          "UNAVAILABLE"
+        ]
+      }
+    }
+  ]
+}
diff --git a/google/cloud/irm/v1alpha2/irm_v1alpha2.yaml b/google/cloud/irm/v1alpha2/irm_v1alpha2.yaml
new file mode 100644
index 000000000..361cfff60
--- /dev/null
+++ b/google/cloud/irm/v1alpha2/irm_v1alpha2.yaml
@@ -0,0 +1,23 @@
+type: google.api.Service
+config_version: 3
+name: irm.googleapis.com
+title: Stackdriver Incident Response & Management API
+
+apis:
+- name: google.cloud.irm.v1alpha2.IncidentService
+
+documentation:
+  overview: |-
+    The Stackdriver Incident Response & Management API allows users of
+    Stackdriver to retrieve their signals, group signals into incidents,
+    retrieve and modify existing incidents, and manage user roles. It also
+    provides access to functionality related to the incident management
+    process such as escalating incidents and performing handoffs at the end of
+    an oncall shift.
+
+authentication:
+  rules:
+  - selector: 'google.cloud.irm.v1alpha2.IncidentService.*'
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/kms/BUILD.bazel b/google/cloud/kms/BUILD.bazel
index 1e5b8c2af..a87c57fec 100644
--- a/google/cloud/kms/BUILD.bazel
+++ b/google/cloud/kms/BUILD.bazel
@@ -1 +1 @@
-exports_files(glob(["*.yaml"]))
\ No newline at end of file
+exports_files(glob(["*.yaml"]))
diff --git a/google/cloud/kms/artman_cloudkms.yaml b/google/cloud/kms/artman_cloudkms.yaml
index 4e2192ac1..26c2f2b91 100644
--- a/google/cloud/kms/artman_cloudkms.yaml
+++ b/google/cloud/kms/artman_cloudkms.yaml
@@ -2,8 +2,9 @@ common:
   api_name: kms
   api_version: v1
   organization_name: google-cloud
-  service_yaml: cloudkms.yaml
+  service_yaml: v1/cloudkms_v1.yaml
   gapic_yaml: v1/cloudkms_gapic.yaml
+  proto_package: google.cloud.kms.v1
   src_proto_paths:
   - v1
   proto_deps:
diff --git a/google/cloud/kms/v1/BUILD.bazel b/google/cloud/kms/v1/BUILD.bazel
index 88fd22db5..704a79fd3 100644
--- a/google/cloud/kms/v1/BUILD.bazel
+++ b/google/cloud/kms/v1/BUILD.bazel
@@ -1,3 +1,5 @@
+load("@rules_proto//proto:defs.bzl", "proto_library")
+
 # This is an API workspace, having public visibility by default makes perfect sense.
 package(default_visibility = ["//visibility:public"])
 
@@ -15,6 +17,8 @@ proto_library(
     deps = [
         "//google/api:annotations_proto",
         "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/api:resource_proto",
         "@com_google_protobuf//:duration_proto",
         "@com_google_protobuf//:field_mask_proto",
         "@com_google_protobuf//:struct_proto",
@@ -27,6 +31,7 @@ proto_library_with_info(
     name = "kms_proto_with_info",
     deps = [
         ":kms_proto",
+        "//google/cloud:common_resources_proto",
         "//google/iam/v1:iam_policy_proto",
         "//google/iam/v1:policy_proto",
     ],
@@ -37,19 +42,14 @@ proto_library_with_info(
 ##############################################################################
 load(
     "@com_google_googleapis_imports//:imports.bzl",
-    "java_grpc_library",
-    "java_gapic_library",
     "java_gapic_assembly_gradle_pkg",
+    "java_gapic_library",
+    "java_gapic_test",
+    "java_grpc_library",
     "java_proto_library",
     "java_resource_name_proto_library",
-    "java_test",
 )
 
-_JAVA_GRPC_DEPS = [
-    "@com_google_api_grpc_proto_google_common_protos//jar",
-    "@com_google_api_grpc_proto_google_iam_v1//jar",
-]
-
 java_proto_library(
     name = "kms_java_proto",
     deps = [":kms_proto"],
@@ -58,54 +58,54 @@ java_proto_library(
 java_grpc_library(
     name = "kms_java_grpc",
     srcs = [":kms_proto"],
-    deps = [":kms_java_proto"] + _JAVA_GRPC_DEPS,
+    deps = [":kms_java_proto"],
 )
 
 java_resource_name_proto_library(
-    name = "kms_resource_name_java_proto",
+    name = "kms_java_gapic_resource_name",
     gapic_yaml = "cloudkms_gapic.yaml",
-    deps = [":kms_proto"],
+    deps = [
+        ":kms_proto",
+        "//google/cloud:common_resources_proto",
+    ],
 )
 
 java_gapic_library(
     name = "kms_java_gapic",
     src = ":kms_proto_with_info",
     gapic_yaml = "cloudkms_gapic.yaml",
-    service_yaml = "//google/cloud/kms:cloudkms.yaml",
+    gen_resource_name = False,
+    package = "google.cloud.kms.v1",
+    service_yaml = "cloudkms_v1.yaml",
     test_deps = [
         ":kms_java_grpc",
-        "@com_google_api_grpc_grpc_google_iam_v1//jar",
+        "//google/iam/v1:iam_java_grpc",
     ],
     deps = [
+        ":kms_java_gapic_resource_name",
         ":kms_java_proto",
-        ":kms_resource_name_java_proto",
-    ] + _JAVA_GRPC_DEPS,
+        "//google/iam/v1:iam_java_proto",
+    ],
 )
 
-[java_test(
-    name = test_name,
-    test_class = test_name,
-    runtime_deps = [
-        ":kms_java_gapic_test",
+java_gapic_test(
+    name = "kms_java_gapic_test_suite",
+    test_classes = [
+        "com.google.cloud.kms.v1.KeyManagementServiceClientTest",
     ],
-) for test_name in [
-    "com.google.cloud.kms.v1.KeyManagementServiceClientTest",
-]]
+    runtime_deps = [":kms_java_gapic_test"],
+)
 
-# Opensource Packages
+# Open Source Packages
 java_gapic_assembly_gradle_pkg(
     name = "google-cloud-kms-v1-java",
-    client_deps = [":kms_java_gapic"],
-    client_group = "com.google.cloud",
-    client_test_deps = [":kms_java_gapic_test"],
-    grpc_deps = [":kms_java_grpc"],
-    grpc_group = "com.google.api.grpc",
-    proto_deps = [
+    deps = [
+        ":kms_java_gapic",
+        ":kms_java_gapic_resource_name",
+        ":kms_java_grpc",
         ":kms_java_proto",
         ":kms_proto",
-        ":kms_resource_name_java_proto",
-    ] + _JAVA_GRPC_DEPS,
-    version = "0.0.0-SNAPSHOT",
+    ],
 )
 
 ##############################################################################
@@ -113,10 +113,10 @@ java_gapic_assembly_gradle_pkg(
 ##############################################################################
 load(
     "@com_google_googleapis_imports//:imports.bzl",
+    "go_gapic_assembly_pkg",
+    "go_gapic_library",
     "go_proto_library",
     "go_test",
-    "go_gapic_library",
-    "go_gapic_assembly_pkg",
 )
 
 go_proto_library(
@@ -132,10 +132,10 @@ go_proto_library(
 
 go_gapic_library(
     name = "kms_go_gapic",
-    src = ":kms_proto_with_info",
-    gapic_yaml = "cloudkms_gapic.yaml",
-    importpath = "cloud.google.com/go/kms/apiv1",
-    service_yaml = "//google/cloud/kms:cloudkms.yaml",
+    srcs = [":kms_proto_with_info"],
+    grpc_service_config = "cloudkms_grpc_service_config.json",
+    importpath = "cloud.google.com/go/kms/apiv1;kms",
+    service_yaml = "cloudkms_v1.yaml",
     deps = [
         ":kms_go_proto",
         "//google/iam/v1:iam_go_proto",
@@ -150,13 +150,251 @@ go_test(
     importpath = "cloud.google.com/go/kms/apiv1",
 )
 
-# Opensource Packages
+# Open Source Packages
 go_gapic_assembly_pkg(
     name = "gapi-cloud-kms-v1-go",
     deps = [
         ":kms_go_gapic",
-        ":kms_go_gapic_srcjar-smoke-test.srcjar",
         ":kms_go_gapic_srcjar-test.srcjar",
         ":kms_go_proto",
     ],
 )
+
+##############################################################################
+# Python
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "moved_proto_library",
+    "py_gapic_assembly_pkg",
+    "py_gapic_library",
+    "py_grpc_library",
+    "py_proto_library",
+)
+
+moved_proto_library(
+    name = "kms_moved_proto",
+    srcs = [":kms_proto"],
+    deps = [
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/api:resource_proto",
+        "@com_google_protobuf//:duration_proto",
+        "@com_google_protobuf//:field_mask_proto",
+        "@com_google_protobuf//:timestamp_proto",
+    ],
+)
+
+py_proto_library(
+    name = "kms_py_proto",
+    plugin = "@protoc_docs_plugin//:docs_plugin",
+    deps = [":kms_moved_proto"],
+)
+
+py_grpc_library(
+    name = "kms_py_grpc",
+    srcs = [":kms_moved_proto"],
+    deps = [":kms_py_proto"],
+)
+
+py_gapic_library(
+    name = "kms_py_gapic",
+    src = ":kms_proto_with_info",
+    gapic_yaml = "cloudkms_gapic.yaml",
+    package = "google.cloud.kms.v1",
+    service_yaml = "cloudkms_v1.yaml",
+    deps = [
+        ":kms_py_grpc",
+        ":kms_py_proto",
+    ],
+)
+
+# Open Source Packages
+py_gapic_assembly_pkg(
+    name = "kms-v1-py",
+    deps = [
+        ":kms_py_gapic",
+        ":kms_py_grpc",
+        ":kms_py_proto",
+    ],
+)
+
+##############################################################################
+# PHP
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "php_gapic_assembly_pkg",
+    "php_gapic_library",
+    "php_grpc_library",
+    "php_proto_library",
+)
+
+php_proto_library(
+    name = "kms_php_proto",
+    deps = [":kms_proto"],
+)
+
+php_grpc_library(
+    name = "kms_php_grpc",
+    srcs = [":kms_proto"],
+    deps = [":kms_php_proto"],
+)
+
+php_gapic_library(
+    name = "kms_php_gapic",
+    src = ":kms_proto_with_info",
+    gapic_yaml = "cloudkms_gapic.legacy.yaml",
+    package = "google.cloud.kms.v1",
+    service_yaml = "cloudkms_v1.yaml",
+    deps = [
+        ":kms_php_grpc",
+        ":kms_php_proto",
+    ],
+)
+
+# Open Source Packages
+php_gapic_assembly_pkg(
+    name = "google-cloud-kms-v1-php",
+    deps = [
+        ":kms_php_gapic",
+        ":kms_php_grpc",
+        ":kms_php_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)
+
+nodejs_gapic_library(
+    name = "kms_nodejs_gapic",
+    src = ":kms_proto_with_info",
+    gapic_yaml = "cloudkms_gapic.yaml",
+    package = "google.cloud.kms.v1",
+    service_yaml = "cloudkms_v1.yaml",
+    deps = [],
+)
+
+nodejs_gapic_assembly_pkg(
+    name = "kms-v1-nodejs",
+    deps = [
+        ":kms_nodejs_gapic",
+        ":kms_proto",
+    ],
+)
+
+##############################################################################
+# Ruby
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "ruby_gapic_assembly_pkg",
+    "ruby_gapic_library",
+    "ruby_grpc_library",
+    "ruby_proto_library",
+)
+
+ruby_proto_library(
+    name = "kms_ruby_proto",
+    deps = [":kms_proto"],
+)
+
+ruby_grpc_library(
+    name = "kms_ruby_grpc",
+    srcs = [":kms_proto"],
+    deps = [":kms_ruby_proto"],
+)
+
+ruby_gapic_library(
+    name = "kms_ruby_gapic",
+    src = ":kms_proto_with_info",
+    gapic_yaml = "cloudkms_gapic.yaml",
+    package = "google.cloud.kms.v1",
+    service_yaml = "cloudkms_v1.yaml",
+    deps = [
+        ":kms_ruby_grpc",
+        ":kms_ruby_proto",
+    ],
+)
+
+# Open Source Packages
+ruby_gapic_assembly_pkg(
+    name = "google-cloud-kms-v1-ruby",
+    deps = [
+        ":kms_ruby_gapic",
+        ":kms_ruby_grpc",
+        ":kms_ruby_proto",
+    ],
+)
+
+##############################################################################
+# C#
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "csharp_gapic_assembly_pkg",
+    "csharp_gapic_library",
+    "csharp_grpc_library",
+    "csharp_proto_library",
+)
+
+csharp_proto_library(
+    name = "kms_csharp_proto",
+    deps = [":kms_proto"],
+)
+
+csharp_grpc_library(
+    name = "kms_csharp_grpc",
+    srcs = [":kms_proto"],
+    deps = [":kms_csharp_proto"],
+)
+
+csharp_gapic_library(
+    name = "kms_csharp_gapic",
+    src = ":kms_proto_with_info",
+    gapic_yaml = "cloudkms_gapic.yaml",
+    package = "google.cloud.kms.v1",
+    service_yaml = "cloudkms_v1.yaml",
+    deps = [
+        ":kms_csharp_grpc",
+        ":kms_csharp_proto",
+    ],
+)
+
+# Open Source Packages
+csharp_gapic_assembly_pkg(
+    name = "google-cloud-kms-v1-csharp",
+    deps = [
+        ":kms_csharp_gapic",
+        ":kms_csharp_grpc",
+        ":kms_csharp_proto",
+    ],
+)
+
+##############################################################################
+# C++
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "cc_grpc_library",
+    "cc_proto_library",
+)
+
+cc_proto_library(
+    name = "kms_cc_proto",
+    deps = [":kms_proto"],
+)
+
+cc_grpc_library(
+    name = "kms_cc_grpc",
+    srcs = [":kms_proto"],
+    grpc_only = True,
+    deps = [":kms_cc_proto"],
+)
diff --git a/google/cloud/kms/v1/cloudkms_gapic.legacy.yaml b/google/cloud/kms/v1/cloudkms_gapic.legacy.yaml
new file mode 100644
index 000000000..e459cacd7
--- /dev/null
+++ b/google/cloud/kms/v1/cloudkms_gapic.legacy.yaml
@@ -0,0 +1,683 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+  java:
+    package_name: com.google.cloud.kms.v1
+  python:
+    package_name: google.cloud.kms_v1.gapic
+  go:
+    package_name: cloud.google.com/go/kms/apiv1
+    release_level: GA
+  csharp:
+    package_name: Google.Cloud.Kms.V1
+  ruby:
+    package_name: Google::Cloud::Kms::V1
+    release_level: GA
+  php:
+    package_name: Google\Cloud\Kms\V1
+  nodejs:
+    package_name: kms.v1
+    domain_layer_location: google-cloud
+collection_oneofs:
+- oneof_name: key_oneof
+  collection_names:
+  - key_ring
+  - crypto_key
+interfaces:
+  # The fully qualified name of the API interface.
+- name: google.cloud.kms.v1.KeyManagementService
+  # A list of resource collection configurations.
+  # Consists of a name_pattern and an entity_name.
+  # The name_pattern is a pattern to describe the names of the resources of this
+  # collection, using the platform's conventions for URI patterns. A generator
+  # may use this to generate methods to compose and decompose such names. The
+  # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+  # those will be taken as hints for the parameter names of the generated
+  # methods. If empty, no name methods are generated.
+  # The entity_name is the name to be used as a basis for generated methods and
+  # classes.
+  collections:
+  - name_pattern: projects/{project}/locations/{location}/keyRings/{key_ring}
+    entity_name: key_ring
+  - name_pattern: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key_path=**}
+    entity_name: crypto_key_path
+  - name_pattern: projects/{project}/locations/{location}
+    entity_name: location
+  - name_pattern: projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}
+    entity_name: import_job
+  - name_pattern: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
+    entity_name: crypto_key
+  - name_pattern: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}
+    entity_name: crypto_key_version
+  # Definition for retryable codes.
+  # The only operations that should not be retried are those where retrying
+  # could result in a system state that the caller did not intend (for example,
+  # duplicate resources created). See go/gapic-retry-guidance.
+  retry_codes_def:
+  - name: retryable
+    retry_codes:
+    - INTERNAL
+    - UNAVAILABLE
+    - DEADLINE_EXCEEDED
+  - name: non_retryable
+    retry_codes: []
+  # Definition for retry/backoff parameters.
+  retry_params_def:
+  - name: default
+    initial_retry_delay_millis: 100
+    retry_delay_multiplier: 1.3
+    max_retry_delay_millis: 60000
+    initial_rpc_timeout_millis: 20000
+    rpc_timeout_multiplier: 1
+    max_rpc_timeout_millis: 20000
+    total_timeout_millis: 600000
+    # A list of method configurations.
+    # Common properties:
+    #
+    #   name - The simple name of the method.
+    #
+    #   flattening - Specifies the configuration for parameter flattening.
+    #   Describes the parameter groups for which a generator should produce method
+    #   overloads which allow a client to directly pass request message fields as
+    #   method parameters. This information may or may not be used, depending on
+    #   the target language.
+    #   Consists of groups, which each represent a list of parameters to be
+    #   flattened. Each parameter listed must be a field of the request message.
+    #
+    #   required_fields - Fields that are always required for a request to be
+    #   valid.
+    #
+    #   resource_name_treatment - An enum that specifies how to treat the resource
+    #   name formats defined in the field_name_patterns and
+    #   response_field_name_patterns fields.
+    #   UNSET: default value
+    #   NONE: the collection configs will not be used by the generated code.
+    #   VALIDATE: string fields will be validated by the client against the
+    #   specified resource name formats.
+    #   STATIC_TYPES: the client will use generated types for resource names.
+    #
+    #   page_streaming - Specifies the configuration for paging.
+    #   Describes information for generating a method which transforms a paging
+    #   list RPC into a stream of resources.
+    #   Consists of a request and a response.
+    #   The request specifies request information of the list method. It defines
+    #   which fields match the paging pattern in the request. The request consists
+    #   of a page_size_field and a token_field. The page_size_field is the name of
+    #   the optional field specifying the maximum number of elements to be
+    #   returned in the response. The token_field is the name of the field in the
+    #   request containing the page token.
+    #   The response specifies response information of the list method. It defines
+    #   which fields match the paging pattern in the response. The response
+    #   consists of a token_field and a resources_field. The token_field is the
+    #   name of the field in the response containing the next page token. The
+    #   resources_field is the name of the field in the response containing the
+    #   list of resources belonging to the page.
+    #
+    #   retry_codes_name - Specifies the configuration for retryable codes. The
+    #   name must be defined in interfaces.retry_codes_def.
+    #
+    #   retry_params_name - Specifies the configuration for retry/backoff
+    #   parameters. The name must be defined in interfaces.retry_params_def.
+    #
+    #   field_name_patterns - Maps the field name of the request type to
+    #   entity_name of interfaces.collections.
+    #   Specifies the string pattern that the field must follow.
+    #
+    #   timeout_millis - Specifies the default timeout for a non-retrying call. If
+    #   the call is retrying, refer to retry_params_name instead.
+  methods:
+  - name: ListKeyRings
+    flattening:
+      groups:
+      - parameters:
+        - parent
+    required_fields:
+    - parent
+    header_request_params:
+    - parent
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: key_rings
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      parent: location
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: ListImportJobs
+    flattening:
+      groups:
+      - parameters:
+        - parent
+    required_fields:
+    - parent
+    header_request_params:
+    - parent
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: import_jobs
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      parent: key_ring
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: ListCryptoKeys
+    flattening:
+      groups:
+      - parameters:
+        - parent
+    required_fields:
+    - parent
+    header_request_params:
+    - parent
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: crypto_keys
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      parent: key_ring
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: ListCryptoKeyVersions
+    flattening:
+      groups:
+      - parameters:
+        - parent
+    required_fields:
+    - parent
+    header_request_params:
+    - parent
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: crypto_key_versions
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      parent: crypto_key
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: GetKeyRing
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    header_request_params:
+    - name
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      name: key_ring
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: GetImportJob
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    header_request_params:
+    - name
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      name: import_job
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: GetCryptoKey
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    header_request_params:
+    - name
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      name: crypto_key
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: GetCryptoKeyVersion
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    header_request_params:
+    - name
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      name: crypto_key_version
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: CreateKeyRing
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - key_ring_id
+        - key_ring
+    required_fields:
+    - parent
+    - key_ring_id
+    - key_ring
+    header_request_params:
+    - parent
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      parent: location
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: CreateImportJob
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - import_job_id
+        - import_job
+    required_fields:
+    - parent
+    - import_job_id
+    - import_job
+    header_request_params:
+    - parent
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      parent: key_ring
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+    sample_code_init_fields:
+    - import_job_id=my-import-job
+    - import_job.import_method=RSA_OAEP_3072_SHA1_AES_256
+    - import_job.protection_level=HSM
+  - name: CreateCryptoKey
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - crypto_key_id
+        - crypto_key
+    required_fields:
+    - parent
+    - crypto_key_id
+    - crypto_key
+    header_request_params:
+    - parent
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      parent: key_ring
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+    sample_code_init_fields:
+    - crypto_key_id=my-app-key
+    - crypto_key.purpose=ENCRYPT_DECRYPT
+    - crypto_key.next_rotation_time.seconds=2147483647
+    - crypto_key.rotation_period.seconds=604800
+  - name: CreateCryptoKeyVersion
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - crypto_key_version
+    required_fields:
+    - parent
+    - crypto_key_version
+    header_request_params:
+    - parent
+    retry_codes_name: non_retryable
+    retry_params_name: default
+    field_name_patterns:
+      parent: crypto_key
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: ImportCryptoKeyVersion
+    required_fields:
+    - parent
+    - algorithm
+    - import_job
+    header_request_params:
+    - parent
+    retry_codes_name: non_retryable
+    retry_params_name: default
+    field_name_patterns:
+      parent: crypto_key
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: UpdateCryptoKey
+    flattening:
+      groups:
+      - parameters:
+        - crypto_key
+        - update_mask
+    required_fields:
+    - crypto_key
+    - update_mask
+    header_request_params:
+    - crypto_key.name
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      crypto_key.name: crypto_key
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: UpdateCryptoKeyVersion
+    flattening:
+      groups:
+      - parameters:
+        - crypto_key_version
+        - update_mask
+    required_fields:
+    - crypto_key_version
+    - update_mask
+    header_request_params:
+    - crypto_key_version.name
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      crypto_key_version.name: crypto_key_version
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: Encrypt
+    flattening:
+      groups:
+      - parameters:
+        - name
+        - plaintext
+    required_fields:
+    - name
+    - plaintext
+    header_request_params:
+    - name
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      name: crypto_key_path
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: Decrypt
+    flattening:
+      groups:
+      - parameters:
+        - name
+        - ciphertext
+    required_fields:
+    - name
+    - ciphertext
+    header_request_params:
+    - name
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      name: crypto_key
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: UpdateCryptoKeyPrimaryVersion
+    flattening:
+      groups:
+      - parameters:
+        - name
+        - crypto_key_version_id
+    required_fields:
+    - name
+    - crypto_key_version_id
+    header_request_params:
+    - name
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      name: crypto_key
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: DestroyCryptoKeyVersion
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    header_request_params:
+    - name
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      name: crypto_key_version
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: RestoreCryptoKeyVersion
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    header_request_params:
+    - name
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      name: crypto_key_version
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: GetPublicKey
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    header_request_params:
+    - name
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      name: crypto_key_version
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: AsymmetricDecrypt
+    flattening:
+      groups:
+      - parameters:
+        - name
+        - ciphertext
+    required_fields:
+    - name
+    - ciphertext
+    header_request_params:
+    - name
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      name: crypto_key_version
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: AsymmetricSign
+    flattening:
+      groups:
+      - parameters:
+        - name
+        - digest
+    required_fields:
+    - name
+    - digest
+    header_request_params:
+    - name
+    retry_codes_name: retryable
+    retry_params_name: default
+    field_name_patterns:
+      name: crypto_key_version
+    resource_name_treatment: STATIC_TYPES
+    timeout_millis: 60000
+  - name: SetIamPolicy
+    flattening:
+      groups:
+      - parameters:
+        - resource
+        - policy
+    required_fields:
+    - resource
+    - policy
+    header_request_params:
+    - resource
+    field_name_patterns:
+      resource: key_oneof
+    resource_name_treatment: STATIC_TYPES
+    retry_codes_name: retryable
+    retry_params_name: default
+    timeout_millis: 60000
+    reroute_to_grpc_interface: google.iam.v1.IAMPolicy
+    surface_treatments:
+    - include_languages:
+      - go
+      visibility: DISABLED
+  - name: GetIamPolicy
+    flattening:
+      groups:
+      - parameters:
+        - resource
+    required_fields:
+    - resource
+    header_request_params:
+    - resource
+    field_name_patterns:
+      resource: key_oneof
+    resource_name_treatment: STATIC_TYPES
+    retry_codes_name: retryable
+    retry_params_name: default
+    timeout_millis: 60000
+    reroute_to_grpc_interface: google.iam.v1.IAMPolicy
+    surface_treatments:
+    - include_languages:
+      - go
+      visibility: DISABLED
+  - name: TestIamPermissions
+    flattening:
+      groups:
+      - parameters:
+        - resource
+        - permissions
+    required_fields:
+    - resource
+    - permissions
+    header_request_params:
+    - resource
+    field_name_patterns:
+      resource: key_oneof
+    resource_name_treatment: STATIC_TYPES
+    retry_codes_name: retryable
+    retry_params_name: default
+    timeout_millis: 60000
+    reroute_to_grpc_interface: google.iam.v1.IAMPolicy
+    surface_treatments:
+    - include_languages:
+      - go
+      visibility: DISABLED
+resource_name_generation:
+- message_name: google.iam.v1.SetIamPolicyRequest
+  field_entity_map:
+    resource: "*"
+- message_name: google.iam.v1.GetIamPolicyRequest
+  field_entity_map:
+    resource: "*"
+- message_name: google.iam.v1.TestIamPermissionsRequest
+  field_entity_map:
+    resource: "*"
+- message_name: KeyRing
+  field_entity_map:
+    name: key_ring
+- message_name: CryptoKey #UpdateCryptoKeyRequest
+  field_entity_map:
+    name: crypto_key
+- message_name: CryptoKeyVersion #UpdateCryptoKeyVersionRequest
+  field_entity_map:
+    name: crypto_key_version
+- message_name: ListKeyRingsRequest
+  field_entity_map:
+    parent: location
+- message_name: ListImportJobsRequest
+  field_entity_map:
+    parent: key_ring
+- message_name: ListCryptoKeysRequest
+  field_entity_map:
+    parent: key_ring
+- message_name: ListCryptoKeyVersionsRequest
+  field_entity_map:
+    parent: crypto_key
+- message_name: GetKeyRingRequest
+  field_entity_map:
+    name: key_ring
+- message_name: GetImportJobRequest
+  field_entity_map:
+    name: import_job
+- message_name: GetCryptoKeyRequest
+  field_entity_map:
+    name: crypto_key
+- message_name: GetCryptoKeyVersionRequest
+  field_entity_map:
+    name: crypto_key_version
+- message_name: CreateKeyRingRequest
+  field_entity_map:
+    parent: location
+- message_name: CreateImportJobRequest
+  field_entity_map:
+    parent: key_ring
+- message_name: CreateCryptoKeyRequest
+  field_entity_map:
+    parent: key_ring
+- message_name: CreateCryptoKeyVersionRequest
+  field_entity_map:
+    parent: crypto_key
+- message_name: ImportCryptoKeyVersionRequest
+  field_entity_map:
+    parent: crypto_key
+- message_name: EncryptRequest
+  field_entity_map:
+    name: crypto_key_path
+- message_name: DecryptRequest
+  field_entity_map:
+    name: crypto_key
+- message_name: UpdateCryptoKeyPrimaryVersionRequest
+  field_entity_map:
+    name: crypto_key
+- message_name: DestroyCryptoKeyVersionRequest
+  field_entity_map:
+    name: crypto_key_version
+- message_name: RestoreCryptoKeyVersionRequest
+  field_entity_map:
+    name: crypto_key_version
+- message_name: GetPublicKeyRequest
+  field_entity_map:
+    name: crypto_key_version
+- message_name: AsymmetricSignRequest
+  field_entity_map:
+    name: crypto_key_version
+- message_name: AsymmetricDecryptRequest
+  field_entity_map:
+    name: crypto_key_version
diff --git a/google/cloud/kms/v1/cloudkms_gapic.yaml b/google/cloud/kms/v1/cloudkms_gapic.yaml
index c0211a9af..9e2703d41 100644
--- a/google/cloud/kms/v1/cloudkms_gapic.yaml
+++ b/google/cloud/kms/v1/cloudkms_gapic.yaml
@@ -1,5 +1,5 @@
 type: com.google.api.codegen.ConfigProto
-config_schema_version: 1.0.0
+config_schema_version: 2.0.0
 # The settings of generated code in a specific language.
 language_settings:
   java:
@@ -19,661 +19,91 @@ language_settings:
   nodejs:
     package_name: kms.v1
     domain_layer_location: google-cloud
-collection_oneofs:
-- oneof_name: key_oneof
-  collection_names:
-  - key_ring
-  - crypto_key
 interfaces:
   # The fully qualified name of the API interface.
 - name: google.cloud.kms.v1.KeyManagementService
-  # A list of resource collection configurations.
-  # Consists of a name_pattern and an entity_name.
-  # The name_pattern is a pattern to describe the names of the resources of this
-  # collection, using the platform's conventions for URI patterns. A generator
-  # may use this to generate methods to compose and decompose such names. The
-  # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
-  # those will be taken as hints for the parameter names of the generated
-  # methods. If empty, no name methods are generated.
-  # The entity_name is the name to be used as a basis for generated methods and
-  # classes.
-  collections:
-  - name_pattern: projects/{project}/locations/{location}/keyRings/{key_ring}
-    entity_name: key_ring
-  - name_pattern: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key_path=**}
-    entity_name: crypto_key_path
-  - name_pattern: projects/{project}/locations/{location}
-    entity_name: location
-  - name_pattern: projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}
-    entity_name: import_job
-  - name_pattern: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
-    entity_name: crypto_key
-  - name_pattern: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}
-    entity_name: crypto_key_version
-  # Definition for retryable codes.
   retry_codes_def:
-  - name: idempotent
+  - name: retryable
     retry_codes:
+    - INTERNAL
     - UNAVAILABLE
     - DEADLINE_EXCEEDED
-  - name: non_idempotent
+  - name: non_retryable
     retry_codes: []
-  # Definition for retry/backoff parameters.
-  retry_params_def:
-  - name: default
-    initial_retry_delay_millis: 100
-    retry_delay_multiplier: 1.3
-    max_retry_delay_millis: 60000
-    initial_rpc_timeout_millis: 20000
-    rpc_timeout_multiplier: 1
-    max_rpc_timeout_millis: 20000
-    total_timeout_millis: 600000
-    # A list of method configurations.
-    # Common properties:
-    #
-    #   name - The simple name of the method.
-    #
-    #   flattening - Specifies the configuration for parameter flattening.
-    #   Describes the parameter groups for which a generator should produce method
-    #   overloads which allow a client to directly pass request message fields as
-    #   method parameters. This information may or may not be used, depending on
-    #   the target language.
-    #   Consists of groups, which each represent a list of parameters to be
-    #   flattened. Each parameter listed must be a field of the request message.
-    #
-    #   required_fields - Fields that are always required for a request to be
-    #   valid.
-    #
-    #   resource_name_treatment - An enum that specifies how to treat the resource
-    #   name formats defined in the field_name_patterns and
-    #   response_field_name_patterns fields.
-    #   UNSET: default value
-    #   NONE: the collection configs will not be used by the generated code.
-    #   VALIDATE: string fields will be validated by the client against the
-    #   specified resource name formats.
-    #   STATIC_TYPES: the client will use generated types for resource names.
-    #
-    #   page_streaming - Specifies the configuration for paging.
-    #   Describes information for generating a method which transforms a paging
-    #   list RPC into a stream of resources.
-    #   Consists of a request and a response.
-    #   The request specifies request information of the list method. It defines
-    #   which fields match the paging pattern in the request. The request consists
-    #   of a page_size_field and a token_field. The page_size_field is the name of
-    #   the optional field specifying the maximum number of elements to be
-    #   returned in the response. The token_field is the name of the field in the
-    #   request containing the page token.
-    #   The response specifies response information of the list method. It defines
-    #   which fields match the paging pattern in the response. The response
-    #   consists of a token_field and a resources_field. The token_field is the
-    #   name of the field in the response containing the next page token. The
-    #   resources_field is the name of the field in the response containing the
-    #   list of resources belonging to the page.
-    #
-    #   retry_codes_name - Specifies the configuration for retryable codes. The
-    #   name must be defined in interfaces.retry_codes_def.
-    #
-    #   retry_params_name - Specifies the configuration for retry/backoff
-    #   parameters. The name must be defined in interfaces.retry_params_def.
-    #
-    #   field_name_patterns - Maps the field name of the request type to
-    #   entity_name of interfaces.collections.
-    #   Specifies the string pattern that the field must follow.
-    #
-    #   timeout_millis - Specifies the default timeout for a non-retrying call. If
-    #   the call is retrying, refer to retry_params_name instead.
   methods:
   - name: ListKeyRings
-    flattening:
-      groups:
-      - parameters:
-        - parent
-    required_fields:
-    - parent
-    header_request_params:
-    - parent
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: key_rings
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: location
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: ListImportJobs
-    flattening:
-      groups:
-      - parameters:
-        - parent
-    required_fields:
-    - parent
-    header_request_params:
-    - parent
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: import_jobs
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: key_ring
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: ListCryptoKeys
-    flattening:
-      groups:
-      - parameters:
-        - parent
-    required_fields:
-    - parent
-    header_request_params:
-    - parent
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: crypto_keys
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: key_ring
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: ListCryptoKeyVersions
-    flattening:
-      groups:
-      - parameters:
-        - parent
-    required_fields:
-    - parent
-    header_request_params:
-    - parent
-    page_streaming:
-      request:
-        page_size_field: page_size
-        token_field: page_token
-      response:
-        token_field: next_page_token
-        resources_field: crypto_key_versions
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: crypto_key
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: GetKeyRing
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: key_ring
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: GetImportJob
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: import_job
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: GetCryptoKey
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: crypto_key
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: GetCryptoKeyVersion
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: crypto_key_version
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: CreateKeyRing
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - key_ring_id
-        - key_ring
-    required_fields:
-    - parent
-    - key_ring_id
-    - key_ring
-    header_request_params:
-    - parent
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: location
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: CreateImportJob
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - import_job_id
-        - import_job
-    required_fields:
-    - parent
-    - import_job_id
-    - import_job
-    header_request_params:
-    - parent
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: key_ring
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
     sample_code_init_fields:
     - import_job_id=my-import-job
     - import_job.import_method=RSA_OAEP_3072_SHA1_AES_256
     - import_job.protection_level=HSM
   - name: CreateCryptoKey
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - crypto_key_id
-        - crypto_key
-    required_fields:
-    - parent
-    - crypto_key_id
-    - crypto_key
-    header_request_params:
-    - parent
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: key_ring
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
     sample_code_init_fields:
     - crypto_key_id=my-app-key
     - crypto_key.purpose=ENCRYPT_DECRYPT
     - crypto_key.next_rotation_time.seconds=2147483647
     - crypto_key.rotation_period.seconds=604800
   - name: CreateCryptoKeyVersion
-    flattening:
-      groups:
-      - parameters:
-        - parent
-        - crypto_key_version
-    required_fields:
-    - parent
-    - crypto_key_version
-    header_request_params:
-    - parent
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: crypto_key
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: non_retryable
   - name: ImportCryptoKeyVersion
-    required_fields:
-    - parent
-    - algorithm
-    - import_job
-    header_request_params:
-    - parent
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      parent: crypto_key
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: non_retryable
   - name: UpdateCryptoKey
-    flattening:
-      groups:
-      - parameters:
-        - crypto_key
-        - update_mask
-    required_fields:
-    - crypto_key
-    - update_mask
-    header_request_params:
-    - crypto_key.name
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      crypto_key.name: crypto_key
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: UpdateCryptoKeyVersion
-    flattening:
-      groups:
-      - parameters:
-        - crypto_key_version
-        - update_mask
-    required_fields:
-    - crypto_key_version
-    - update_mask
-    header_request_params:
-    - crypto_key_version.name
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      crypto_key_version.name: crypto_key_version
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: Encrypt
-    flattening:
-      groups:
-      - parameters:
-        - name
-        - plaintext
-    required_fields:
-    - name
-    - plaintext
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: crypto_key_path
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: Decrypt
-    flattening:
-      groups:
-      - parameters:
-        - name
-        - ciphertext
-    required_fields:
-    - name
-    - ciphertext
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: crypto_key
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: UpdateCryptoKeyPrimaryVersion
-    flattening:
-      groups:
-      - parameters:
-        - name
-        - crypto_key_version_id
-    required_fields:
-    - name
-    - crypto_key_version_id
-    header_request_params:
-    - name
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: crypto_key
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: DestroyCryptoKeyVersion
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    header_request_params:
-    - name
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: crypto_key_version
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: RestoreCryptoKeyVersion
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    header_request_params:
-    - name
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: crypto_key_version
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: GetPublicKey
-    flattening:
-      groups:
-      - parameters:
-        - name
-    required_fields:
-    - name
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: crypto_key_version
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: AsymmetricDecrypt
-    flattening:
-      groups:
-      - parameters:
-        - name
-        - ciphertext
-    required_fields:
-    - name
-    - ciphertext
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: crypto_key_version
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: AsymmetricSign
-    flattening:
-      groups:
-      - parameters:
-        - name
-        - digest
-    required_fields:
-    - name
-    - digest
-    header_request_params:
-    - name
-    retry_codes_name: idempotent
-    retry_params_name: default
-    field_name_patterns:
-      name: crypto_key_version
-    resource_name_treatment: STATIC_TYPES
-    timeout_millis: 60000
+    retry_codes_name: retryable
   - name: SetIamPolicy
-    flattening:
-      groups:
-      - parameters:
-        - resource
-        - policy
-    required_fields:
-    - resource
-    - policy
-    header_request_params:
-    - resource
-    field_name_patterns:
-      resource: key_oneof
-    resource_name_treatment: STATIC_TYPES
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    timeout_millis: 60000
+    retry_codes_name: retryable
     reroute_to_grpc_interface: google.iam.v1.IAMPolicy
     surface_treatments:
     - include_languages:
       - go
       visibility: DISABLED
   - name: GetIamPolicy
-    flattening:
-      groups:
-      - parameters:
-        - resource
-    required_fields:
-    - resource
-    header_request_params:
-    - resource
-    field_name_patterns:
-      resource: key_oneof
-    resource_name_treatment: STATIC_TYPES
-    retry_codes_name: idempotent
-    retry_params_name: default
-    timeout_millis: 60000
+    retry_codes_name: retryable
     reroute_to_grpc_interface: google.iam.v1.IAMPolicy
     surface_treatments:
     - include_languages:
       - go
       visibility: DISABLED
   - name: TestIamPermissions
-    flattening:
-      groups:
-      - parameters:
-        - resource
-        - permissions
-    required_fields:
-    - resource
-    - permissions
-    header_request_params:
-    - resource
-    field_name_patterns:
-      resource: key_oneof
-    resource_name_treatment: STATIC_TYPES
-    retry_codes_name: non_idempotent
-    retry_params_name: default
-    timeout_millis: 60000
+    retry_codes_name: retryable
     reroute_to_grpc_interface: google.iam.v1.IAMPolicy
     surface_treatments:
     - include_languages:
       - go
       visibility: DISABLED
-resource_name_generation:
-- message_name: google.iam.v1.SetIamPolicyRequest
-  field_entity_map:
-    resource: "*"
-- message_name: google.iam.v1.GetIamPolicyRequest
-  field_entity_map:
-    resource: "*"
-- message_name: google.iam.v1.TestIamPermissionsRequest
-  field_entity_map:
-    resource: "*"
-- message_name: KeyRing
-  field_entity_map:
-    name: key_ring
-- message_name: CryptoKey #UpdateCryptoKeyRequest
-  field_entity_map:
-    name: crypto_key
-- message_name: CryptoKeyVersion #UpdateCryptoKeyVersionRequest
-  field_entity_map:
-    name: crypto_key_version
-- message_name: ListKeyRingsRequest
-  field_entity_map:
-    parent: location
-- message_name: ListImportJobsRequest
-  field_entity_map:
-    parent: key_ring
-- message_name: ListCryptoKeysRequest
-  field_entity_map:
-    parent: key_ring
-- message_name: ListCryptoKeyVersionsRequest
-  field_entity_map:
-    parent: crypto_key
-- message_name: GetKeyRingRequest
-  field_entity_map:
-    name: key_ring
-- message_name: GetImportJobRequest
-  field_entity_map:
-    name: import_job
-- message_name: GetCryptoKeyRequest
-  field_entity_map:
-    name: crypto_key
-- message_name: GetCryptoKeyVersionRequest
-  field_entity_map:
-    name: crypto_key_version
-- message_name: CreateKeyRingRequest
-  field_entity_map:
-    parent: location
-- message_name: CreateImportJobRequest
-  field_entity_map:
-    parent: key_ring
-- message_name: CreateCryptoKeyRequest
-  field_entity_map:
-    parent: key_ring
-- message_name: CreateCryptoKeyVersionRequest
-  field_entity_map:
-    parent: crypto_key
-- message_name: ImportCryptoKeyVersionRequest
-  field_entity_map:
-    parent: crypto_key
-- message_name: EncryptRequest
-  field_entity_map:
-    name: crypto_key_path
-- message_name: DecryptRequest
-  field_entity_map:
-    name: crypto_key
-- message_name: UpdateCryptoKeyPrimaryVersionRequest
-  field_entity_map:
-    name: crypto_key
-- message_name: DestroyCryptoKeyVersionRequest
-  field_entity_map:
-    name: crypto_key_version
-- message_name: RestoreCryptoKeyVersionRequest
-  field_entity_map:
-    name: crypto_key_version
-- message_name: GetPublicKeyRequest
-  field_entity_map:
-    name: crypto_key_version
-- message_name: AsymmetricSignRequest
-  field_entity_map:
-    name: crypto_key_version
-- message_name: AsymmetricDecryptRequest
-  field_entity_map:
-    name: crypto_key_version
diff --git a/google/cloud/kms/v1/cloudkms_grpc_service_config.json b/google/cloud/kms/v1/cloudkms_grpc_service_config.json
new file mode 100755
index 000000000..e65ebb1ee
--- /dev/null
+++ b/google/cloud/kms/v1/cloudkms_grpc_service_config.json
@@ -0,0 +1,128 @@
+{
+  "methodConfig": [
+    {
+      "name": [
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "CreateCryptoKeyVersion"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "ImportCryptoKeyVersion"
+        }
+      ],
+      "timeout": "60s"
+    },
+    {
+      "name": [
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "ListKeyRings"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "ListImportJobs"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "ListCryptoKeys"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "ListCryptoKeyVersions"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "GetKeyRing"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "GetImportJob"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "GetCryptoKey"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "GetCryptoKeyVersion"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "CreateKeyRing"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "CreateImportJob"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "CreateCryptoKey"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "UpdateCryptoKey"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "UpdateCryptoKeyVersion"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "Encrypt"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "Decrypt"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "UpdateCryptoKeyPrimaryVersion"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "DestroyCryptoKeyVersion"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "RestoreCryptoKeyVersion"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "GetPublicKey"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "AsymmetricDecrypt"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "AsymmetricSign"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "SetIamPolicy"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "GetIamPolicy"
+        },
+        {
+          "service": "google.cloud.kms.v1.KeyManagementService",
+          "method": "TestIamPermissions"
+        }
+      ],
+      "timeout": "60s",
+      "retryPolicy": {
+        "initialBackoff": "0.100s",
+        "maxBackoff": "60s",
+        "backoffMultiplier": 1.3,
+        "retryableStatusCodes": [
+          "INTERNAL",
+          "UNAVAILABLE",
+          "DEADLINE_EXCEEDED"
+        ]
+      }
+    }
+  ]
+}
diff --git a/google/cloud/kms/cloudkms.yaml b/google/cloud/kms/v1/cloudkms_v1.yaml
similarity index 96%
rename from google/cloud/kms/cloudkms.yaml
rename to google/cloud/kms/v1/cloudkms_v1.yaml
index 3a4c2360e..502026406 100644
--- a/google/cloud/kms/cloudkms.yaml
+++ b/google/cloud/kms/v1/cloudkms_v1.yaml
@@ -24,6 +24,9 @@ documentation:
       Sets the access control policy on the specified resource. Replaces
       any existing policy.
 
+      Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and
+      PERMISSION_DENIED
+
   - selector: google.iam.v1.IAMPolicy.TestIamPermissions
     description: |-
       Returns permissions that a caller has on the specified resource. If the
diff --git a/google/cloud/kms/v1/resources.proto b/google/cloud/kms/v1/resources.proto
index 09baaf1be..b2b7ab919 100644
--- a/google/cloud/kms/v1/resources.proto
+++ b/google/cloud/kms/v1/resources.proto
@@ -1,4 +1,4 @@
-// Copyright 2019 Google LLC.
+// Copyright 2020 Google LLC
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -11,15 +11,16 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-//
 
 syntax = "proto3";
 
 package google.cloud.kms.v1;
 
-import "google/api/annotations.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
 import "google/protobuf/duration.proto";
 import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
 
 option cc_enable_arenas = true;
 option csharp_namespace = "Google.Cloud.Kms.V1";
@@ -31,12 +32,17 @@ option php_namespace = "Google\\Cloud\\Kms\\V1";
 
 // A [KeyRing][google.cloud.kms.v1.KeyRing] is a toplevel logical grouping of [CryptoKeys][google.cloud.kms.v1.CryptoKey].
 message KeyRing {
+  option (google.api.resource) = {
+    type: "cloudkms.googleapis.com/KeyRing"
+    pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}"
+  };
+
   // Output only. The resource name for the [KeyRing][google.cloud.kms.v1.KeyRing] in the format
   // `projects/*/locations/*/keyRings/*`.
-  string name = 1;
+  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] was created.
-  google.protobuf.Timestamp create_time = 2;
+  google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
 }
 
 // A [CryptoKey][google.cloud.kms.v1.CryptoKey] represents a logical key that can be used for cryptographic
@@ -45,6 +51,11 @@ message KeyRing {
 // A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of one or more [versions][google.cloud.kms.v1.CryptoKeyVersion], which
 // represent the actual key material used in cryptographic operations.
 message CryptoKey {
+  option (google.api.resource) = {
+    type: "cloudkms.googleapis.com/CryptoKey"
+    pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
+  };
+
   // [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] describes the cryptographic capabilities of a
   // [CryptoKey][google.cloud.kms.v1.CryptoKey]. A given key can only be used for the operations allowed by
   // its purpose. For more information, see
@@ -71,7 +82,7 @@ message CryptoKey {
 
   // Output only. The resource name for this [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format
   // `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
-  string name = 1;
+  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. A copy of the "primary" [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
   // by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this [CryptoKey][google.cloud.kms.v1.CryptoKey] is given
@@ -80,16 +91,16 @@ message CryptoKey {
   // The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be updated via
   // [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
   //
-  // All keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
-  // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] have a
+  // Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
+  // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] may have a
   // primary. For other keys, this field will be omitted.
-  CryptoKeyVersion primary = 2;
+  CryptoKeyVersion primary = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
 
-  // The immutable purpose of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
-  CryptoKeyPurpose purpose = 3;
+  // Immutable. The immutable purpose of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
+  CryptoKeyPurpose purpose = 3 [(google.api.field_behavior) = IMMUTABLE];
 
   // Output only. The time at which this [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
-  google.protobuf.Timestamp create_time = 5;
+  google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], the Key Management Service will automatically:
   //
@@ -109,7 +120,8 @@ message CryptoKey {
   // Controls the rate of automatic rotation.
   oneof rotation_schedule {
     // [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] will be advanced by this period when the service
-    // automatically rotates a key. Must be at least one day.
+    // automatically rotates a key. Must be at least 24 hours and at most
+    // 876,000 hours.
     //
     // If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is set, [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] must also be set.
     //
@@ -145,7 +157,7 @@ message CryptoKeyVersionTemplate {
   // For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both
   // this field is omitted and [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is
   // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
-  CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3;
+  CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Contains an HSM-generated attestation about a key operation. For more
@@ -167,11 +179,11 @@ message KeyOperationAttestation {
   }
 
   // Output only. The format of the attestation data.
-  AttestationFormat format = 4;
+  AttestationFormat format = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The attestation data provided by the HSM when the key
   // operation was performed.
-  bytes content = 5;
+  bytes content = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
 }
 
 // A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents an individual cryptographic key, and the
@@ -185,6 +197,11 @@ message KeyOperationAttestation {
 // encrypt, decrypt, or sign data when an authorized user or application invokes
 // Cloud KMS.
 message CryptoKeyVersion {
+  option (google.api.resource) = {
+    type: "cloudkms.googleapis.com/CryptoKeyVersion"
+    pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}"
+  };
+
   // The algorithm of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating what
   // parameters must be used for each cryptographic operation.
   //
@@ -267,6 +284,9 @@ message CryptoKeyVersion {
 
     // ECDSA on the NIST P-384 curve with a SHA384 digest.
     EC_SIGN_P384_SHA384 = 13;
+
+    // Algorithm representing symmetric encryption by an external key manager.
+    EXTERNAL_SYMMETRIC_ENCRYPTION = 18;
   }
 
   // The state of a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating if it can be used.
@@ -324,60 +344,70 @@ message CryptoKeyVersion {
 
   // Output only. The resource name for this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format
   // `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
-  string name = 1;
+  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // The current state of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
   CryptoKeyVersionState state = 3;
 
   // Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] describing how crypto operations are
   // performed with this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
-  ProtectionLevel protection_level = 7;
+  ProtectionLevel protection_level = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] that this
   // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] supports.
-  CryptoKeyVersionAlgorithm algorithm = 10;
+  CryptoKeyVersionAlgorithm algorithm = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. Statement that was generated and signed by the HSM at key
   // creation time. Use this statement to verify attributes of the key as stored
   // on the HSM, independently of Google. Only provided for key versions with
   // [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level] [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
-  KeyOperationAttestation attestation = 8;
+  KeyOperationAttestation attestation = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The time at which this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
-  google.protobuf.Timestamp create_time = 4;
+  google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The time this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
   // generated.
-  google.protobuf.Timestamp generate_time = 11;
+  google.protobuf.Timestamp generate_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The time this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is scheduled
   // for destruction. Only present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
   // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
-  google.protobuf.Timestamp destroy_time = 5;
+  google.protobuf.Timestamp destroy_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The time this CryptoKeyVersion's key material was
   // destroyed. Only present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
   // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
-  google.protobuf.Timestamp destroy_event_time = 6;
+  google.protobuf.Timestamp destroy_event_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] used to import this
   // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if the underlying key material was
   // imported.
-  string import_job = 14;
+  string import_job = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The time at which this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material
   // was imported.
-  google.protobuf.Timestamp import_time = 15;
+  google.protobuf.Timestamp import_time = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The root cause of an import failure. Only present if
   // [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
   // [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED].
-  string import_failure_reason = 16;
+  string import_failure_reason = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // ExternalProtectionLevelOptions stores a group of additional fields for
+  // configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+  // [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+  ExternalProtectionLevelOptions external_protection_level_options = 17;
 }
 
 // The public key for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Obtained via
 // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
 message PublicKey {
+  option (google.api.resource) = {
+    type: "cloudkms.googleapis.com/PublicKey"
+    pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/publicKey"
+  };
+
   // The public key, encoded in PEM format. For more information, see the
   // [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for
   // [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
@@ -390,20 +420,6 @@ message PublicKey {
   CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2;
 }
 
-// [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] specifies how cryptographic operations are performed.
-// For more information, see [Protection levels]
-// (https://cloud.google.com/kms/docs/algorithms#protection_levels).
-enum ProtectionLevel {
-  // Not specified.
-  PROTECTION_LEVEL_UNSPECIFIED = 0;
-
-  // Crypto operations are performed in software.
-  SOFTWARE = 1;
-
-  // Crypto operations are performed in a Hardware Security Module.
-  HSM = 2;
-}
-
 // An [ImportJob][google.cloud.kms.v1.ImportJob] can be used to create [CryptoKeys][google.cloud.kms.v1.CryptoKey] and
 // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] using pre-existing key material,
 // generated outside of Cloud KMS.
@@ -432,6 +448,11 @@ enum ProtectionLevel {
 // For more information, see
 // [Importing a key](https://cloud.google.com/kms/docs/importing-a-key).
 message ImportJob {
+  option (google.api.resource) = {
+    type: "cloudkms.googleapis.com/ImportJob"
+    pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}"
+  };
+
   // The public key component of the wrapping key. For details of the type of
   // key this public key corresponds to, see the [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod].
   message WrappingPublicKey {
@@ -488,46 +509,75 @@ message ImportJob {
 
   // Output only. The resource name for this [ImportJob][google.cloud.kms.v1.ImportJob] in the format
   // `projects/*/locations/*/keyRings/*/importJobs/*`.
-  string name = 1;
+  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
 
-  // Required and immutable. The wrapping method to be used for incoming
-  // key material.
-  ImportMethod import_method = 2;
+  // Required. Immutable. The wrapping method to be used for incoming key material.
+  ImportMethod import_method = 2 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.field_behavior) = IMMUTABLE
+  ];
 
-  // Required and immutable. The protection level of the [ImportJob][google.cloud.kms.v1.ImportJob]. This
-  // must match the
+  // Required. Immutable. The protection level of the [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
   // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] of the
   // [version_template][google.cloud.kms.v1.CryptoKey.version_template] on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you
   // attempt to import into.
-  ProtectionLevel protection_level = 9;
+  ProtectionLevel protection_level = 9 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.field_behavior) = IMMUTABLE
+  ];
 
   // Output only. The time at which this [ImportJob][google.cloud.kms.v1.ImportJob] was created.
-  google.protobuf.Timestamp create_time = 3;
+  google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key material was generated.
-  google.protobuf.Timestamp generate_time = 4;
+  google.protobuf.Timestamp generate_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The time at which this [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for
   // expiration and can no longer be used to import key material.
-  google.protobuf.Timestamp expire_time = 5;
+  google.protobuf.Timestamp expire_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] expired. Only present if
   // [state][google.cloud.kms.v1.ImportJob.state] is [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
-  google.protobuf.Timestamp expire_event_time = 10;
+  google.protobuf.Timestamp expire_event_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The current state of the [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can
   // be used.
-  ImportJobState state = 6;
+  ImportJobState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The public key with which to wrap key material prior to
   // import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
   // [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
-  WrappingPublicKey public_key = 7;
+  WrappingPublicKey public_key = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. Statement that was generated and signed by the key creator
   // (for example, an HSM) at key creation time. Use this statement to verify
   // attributes of the key as stored on the HSM, independently of Google.
   // Only present if the chosen [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a protection
   // level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
-  KeyOperationAttestation attestation = 8;
+  KeyOperationAttestation attestation = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+// [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] specifies how cryptographic operations are performed.
+// For more information, see [Protection levels]
+// (https://cloud.google.com/kms/docs/algorithms#protection_levels).
+enum ProtectionLevel {
+  // Not specified.
+  PROTECTION_LEVEL_UNSPECIFIED = 0;
+
+  // Crypto operations are performed in software.
+  SOFTWARE = 1;
+
+  // Crypto operations are performed in a Hardware Security Module.
+  HSM = 2;
+
+  // Crypto operations are performed by an external key manager.
+  EXTERNAL = 3;
+}
+
+// ExternalProtectionLevelOptions stores a group of additional fields for
+// configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+// [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+message ExternalProtectionLevelOptions {
+  // The URI for an external resource that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents.
+  string external_key_uri = 1;
 }
diff --git a/google/cloud/kms/v1/service.proto b/google/cloud/kms/v1/service.proto
index 0f1266dfe..d0c8949cb 100644
--- a/google/cloud/kms/v1/service.proto
+++ b/google/cloud/kms/v1/service.proto
@@ -1,4 +1,4 @@
-// Copyright 2019 Google LLC.
+// Copyright 2020 Google LLC
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -11,16 +11,17 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-//
 
 syntax = "proto3";
 
 package google.cloud.kms.v1;
 
 import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
 import "google/cloud/kms/v1/resources.proto";
 import "google/protobuf/field_mask.proto";
-import "google/api/client.proto";
 
 option cc_enable_arenas = true;
 option csharp_namespace = "Google.Cloud.Kms.V1";
@@ -38,6 +39,7 @@ option php_namespace = "Google\\Cloud\\Kms\\V1";
 // * [KeyRing][google.cloud.kms.v1.KeyRing]
 // * [CryptoKey][google.cloud.kms.v1.CryptoKey]
 // * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
+// * [ImportJob][google.cloud.kms.v1.ImportJob]
 //
 // If you are using manual gRPC libraries, see
 // [Using gRPC with Cloud KMS](https://cloud.google.com/kms/docs/grpc).
@@ -52,6 +54,7 @@ service KeyManagementService {
     option (google.api.http) = {
       get: "/v1/{parent=projects/*/locations/*}/keyRings"
     };
+    option (google.api.method_signature) = "parent";
   }
 
   // Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey].
@@ -59,6 +62,7 @@ service KeyManagementService {
     option (google.api.http) = {
       get: "/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys"
     };
+    option (google.api.method_signature) = "parent";
   }
 
   // Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].
@@ -66,6 +70,7 @@ service KeyManagementService {
     option (google.api.http) = {
       get: "/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions"
     };
+    option (google.api.method_signature) = "parent";
   }
 
   // Lists [ImportJobs][google.cloud.kms.v1.ImportJob].
@@ -73,6 +78,7 @@ service KeyManagementService {
     option (google.api.http) = {
       get: "/v1/{parent=projects/*/locations/*/keyRings/*}/importJobs"
     };
+    option (google.api.method_signature) = "parent";
   }
 
   // Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing].
@@ -80,6 +86,7 @@ service KeyManagementService {
     option (google.api.http) = {
       get: "/v1/{name=projects/*/locations/*/keyRings/*}"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as well as its
@@ -88,6 +95,7 @@ service KeyManagementService {
     option (google.api.http) = {
       get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Returns metadata for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
@@ -95,6 +103,7 @@ service KeyManagementService {
     option (google.api.http) = {
       get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Returns the public key for the given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The
@@ -105,6 +114,7 @@ service KeyManagementService {
     option (google.api.http) = {
       get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}/publicKey"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob].
@@ -112,6 +122,7 @@ service KeyManagementService {
     option (google.api.http) = {
       get: "/v1/{name=projects/*/locations/*/keyRings/*/importJobs/*}"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location.
@@ -120,6 +131,7 @@ service KeyManagementService {
       post: "/v1/{parent=projects/*/locations/*}/keyRings"
       body: "key_ring"
     };
+    option (google.api.method_signature) = "parent,key_ring_id,key_ring";
   }
 
   // Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a [KeyRing][google.cloud.kms.v1.KeyRing].
@@ -132,6 +144,7 @@ service KeyManagementService {
       post: "/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys"
       body: "crypto_key"
     };
+    option (google.api.method_signature) = "parent,crypto_key_id,crypto_key";
   }
 
   // Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a [CryptoKey][google.cloud.kms.v1.CryptoKey].
@@ -144,6 +157,7 @@ service KeyManagementService {
       post: "/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions"
       body: "crypto_key_version"
     };
+    option (google.api.method_signature) = "parent,crypto_key_version";
   }
 
   // Imports a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] into an existing [CryptoKey][google.cloud.kms.v1.CryptoKey] using the
@@ -166,6 +180,7 @@ service KeyManagementService {
       post: "/v1/{parent=projects/*/locations/*/keyRings/*}/importJobs"
       body: "import_job"
     };
+    option (google.api.method_signature) = "parent,import_job_id,import_job";
   }
 
   // Update a [CryptoKey][google.cloud.kms.v1.CryptoKey].
@@ -174,6 +189,7 @@ service KeyManagementService {
       patch: "/v1/{crypto_key.name=projects/*/locations/*/keyRings/*/cryptoKeys/*}"
       body: "crypto_key"
     };
+    option (google.api.method_signature) = "crypto_key,update_mask";
   }
 
   // Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s metadata.
@@ -188,6 +204,7 @@ service KeyManagementService {
       patch: "/v1/{crypto_key_version.name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}"
       body: "crypto_key_version"
     };
+    option (google.api.method_signature) = "crypto_key_version,update_mask";
   }
 
   // Encrypts data, so that it can only be recovered by a call to [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
@@ -198,6 +215,7 @@ service KeyManagementService {
       post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/**}:encrypt"
       body: "*"
     };
+    option (google.api.method_signature) = "name,plaintext";
   }
 
   // Decrypts data that was protected by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
@@ -207,6 +225,7 @@ service KeyManagementService {
       post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:decrypt"
       body: "*"
     };
+    option (google.api.method_signature) = "name,ciphertext";
   }
 
   // Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
@@ -217,6 +236,7 @@ service KeyManagementService {
       post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricSign"
       body: "*"
     };
+    option (google.api.method_signature) = "name,digest";
   }
 
   // Decrypts data that was encrypted with a public key retrieved from
@@ -227,6 +247,7 @@ service KeyManagementService {
       post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricDecrypt"
       body: "*"
     };
+    option (google.api.method_signature) = "name,ciphertext";
   }
 
   // Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that will be used in [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
@@ -237,6 +258,7 @@ service KeyManagementService {
       post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:updatePrimaryVersion"
       body: "*"
     };
+    option (google.api.method_signature) = "name,crypto_key_version_id";
   }
 
   // Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for destruction.
@@ -256,6 +278,7 @@ service KeyManagementService {
       post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:destroy"
       body: "*"
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the
@@ -270,6 +293,7 @@ service KeyManagementService {
       post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:restore"
       body: "*"
     };
+    option (google.api.method_signature) = "name";
   }
 }
 
@@ -277,103 +301,143 @@ service KeyManagementService {
 message ListKeyRingsRequest {
   // Required. The resource name of the location associated with the
   // [KeyRings][google.cloud.kms.v1.KeyRing], in the format `projects/*/locations/*`.
-  string parent = 1;
-
-  // Optional limit on the number of [KeyRings][google.cloud.kms.v1.KeyRing] to include in the
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "locations.googleapis.com/Location"
+    }
+  ];
+
+  // Optional. Optional limit on the number of [KeyRings][google.cloud.kms.v1.KeyRing] to include in the
   // response.  Further [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by
   // including the [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] in a subsequent
   // request.  If unspecified, the server will pick an appropriate default.
-  int32 page_size = 2;
+  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
 
-  // Optional pagination token, returned earlier via
+  // Optional. Optional pagination token, returned earlier via
   // [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token].
-  string page_token = 3;
+  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
 
-  // Optional. Only include resources that match the filter in the response.
-  string filter = 4;
+  // Optional. Only include resources that match the filter in the response. For
+  // more information, see
+  // [Sorting and filtering list
+  // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
 
   // Optional. Specify how the results should be sorted. If not specified, the
-  // results will be sorted in the default order.
-  string order_by = 5;
+  // results will be sorted in the default order.  For more information, see
+  // [Sorting and filtering list
+  // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
 }
 
 // Request message for [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys].
 message ListCryptoKeysRequest {
   // Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to list, in the format
   // `projects/*/locations/*/keyRings/*`.
-  string parent = 1;
-
-  // Optional limit on the number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/KeyRing"
+    }
+  ];
+
+  // Optional. Optional limit on the number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the
   // response.  Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be obtained by
   // including the [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] in a subsequent
   // request.  If unspecified, the server will pick an appropriate default.
-  int32 page_size = 2;
+  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
 
-  // Optional pagination token, returned earlier via
+  // Optional. Optional pagination token, returned earlier via
   // [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token].
-  string page_token = 3;
+  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
 
   // The fields of the primary version to include in the response.
   CryptoKeyVersion.CryptoKeyVersionView version_view = 4;
 
-  // Optional. Only include resources that match the filter in the response.
-  string filter = 5;
+  // Optional. Only include resources that match the filter in the response. For
+  // more information, see
+  // [Sorting and filtering list
+  // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+  string filter = 5 [(google.api.field_behavior) = OPTIONAL];
 
   // Optional. Specify how the results should be sorted. If not specified, the
-  // results will be sorted in the default order.
-  string order_by = 6;
+  // results will be sorted in the default order. For more information, see
+  // [Sorting and filtering list
+  // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+  string order_by = 6 [(google.api.field_behavior) = OPTIONAL];
 }
 
 // Request message for [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions].
 message ListCryptoKeyVersionsRequest {
   // Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format
   // `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
-  string parent = 1;
-
-  // Optional limit on the number of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/CryptoKey"
+    }
+  ];
+
+  // Optional. Optional limit on the number of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to
   // include in the response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] can
   // subsequently be obtained by including the
   // [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] in a subsequent request.
   // If unspecified, the server will pick an appropriate default.
-  int32 page_size = 2;
+  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
 
-  // Optional pagination token, returned earlier via
+  // Optional. Optional pagination token, returned earlier via
   // [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token].
-  string page_token = 3;
+  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
 
   // The fields to include in the response.
   CryptoKeyVersion.CryptoKeyVersionView view = 4;
 
-  // Optional. Only include resources that match the filter in the response.
-  string filter = 5;
+  // Optional. Only include resources that match the filter in the response. For
+  // more information, see
+  // [Sorting and filtering list
+  // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+  string filter = 5 [(google.api.field_behavior) = OPTIONAL];
 
   // Optional. Specify how the results should be sorted. If not specified, the
-  // results will be sorted in the default order.
-  string order_by = 6;
+  // results will be sorted in the default order. For more information, see
+  // [Sorting and filtering list
+  // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+  string order_by = 6 [(google.api.field_behavior) = OPTIONAL];
 }
 
 // Request message for [KeyManagementService.ListImportJobs][google.cloud.kms.v1.KeyManagementService.ListImportJobs].
 message ListImportJobsRequest {
   // Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to list, in the format
   // `projects/*/locations/*/keyRings/*`.
-  string parent = 1;
-
-  // Optional limit on the number of [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/KeyRing"
+    }
+  ];
+
+  // Optional. Optional limit on the number of [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the
   // response. Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be obtained by
   // including the [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] in a subsequent
   // request. If unspecified, the server will pick an appropriate default.
-  int32 page_size = 2;
+  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
 
-  // Optional pagination token, returned earlier via
+  // Optional. Optional pagination token, returned earlier via
   // [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token].
-  string page_token = 3;
+  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
 
-  // Optional. Only include resources that match the filter in the response.
-  string filter = 4;
+  // Optional. Only include resources that match the filter in the response. For
+  // more information, see
+  // [Sorting and filtering list
+  // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
 
   // Optional. Specify how the results should be sorted. If not specified, the
-  // results will be sorted in the default order.
-  string order_by = 5;
+  // results will be sorted in the default order. For more information, see
+  // [Sorting and filtering list
+  // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
 }
 
 // Response message for [KeyManagementService.ListKeyRings][google.cloud.kms.v1.KeyManagementService.ListKeyRings].
@@ -432,61 +496,96 @@ message ListImportJobsResponse {
 
 // Request message for [KeyManagementService.GetKeyRing][google.cloud.kms.v1.KeyManagementService.GetKeyRing].
 message GetKeyRingRequest {
-  // The [name][google.cloud.kms.v1.KeyRing.name] of the [KeyRing][google.cloud.kms.v1.KeyRing] to get.
-  string name = 1;
+  // Required. The [name][google.cloud.kms.v1.KeyRing.name] of the [KeyRing][google.cloud.kms.v1.KeyRing] to get.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/KeyRing"
+    }
+  ];
 }
 
 // Request message for [KeyManagementService.GetCryptoKey][google.cloud.kms.v1.KeyManagementService.GetCryptoKey].
 message GetCryptoKeyRequest {
-  // The [name][google.cloud.kms.v1.CryptoKey.name] of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to get.
-  string name = 1;
+  // Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to get.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/CryptoKey"
+    }
+  ];
 }
 
 // Request message for [KeyManagementService.GetCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.GetCryptoKeyVersion].
 message GetCryptoKeyVersionRequest {
-  // The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get.
-  string name = 1;
+  // Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/CryptoKeyVersion"
+    }
+  ];
 }
 
 // Request message for [KeyManagementService.GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
 message GetPublicKeyRequest {
-  // The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to
+  // Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to
   // get.
-  string name = 1;
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/CryptoKeyVersion"
+    }
+  ];
 }
 
 // Request message for [KeyManagementService.GetImportJob][google.cloud.kms.v1.KeyManagementService.GetImportJob].
 message GetImportJobRequest {
-  // The [name][google.cloud.kms.v1.ImportJob.name] of the [ImportJob][google.cloud.kms.v1.ImportJob] to get.
-  string name = 1;
+  // Required. The [name][google.cloud.kms.v1.ImportJob.name] of the [ImportJob][google.cloud.kms.v1.ImportJob] to get.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/ImportJob"
+    }
+  ];
 }
 
 // Request message for [KeyManagementService.CreateKeyRing][google.cloud.kms.v1.KeyManagementService.CreateKeyRing].
 message CreateKeyRingRequest {
   // Required. The resource name of the location associated with the
   // [KeyRings][google.cloud.kms.v1.KeyRing], in the format `projects/*/locations/*`.
-  string parent = 1;
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "locations.googleapis.com/Location"
+    }
+  ];
 
   // Required. It must be unique within a location and match the regular
   // expression `[a-zA-Z0-9_-]{1,63}`
-  string key_ring_id = 2;
+  string key_ring_id = 2 [(google.api.field_behavior) = REQUIRED];
 
-  // A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values.
-  KeyRing key_ring = 3;
+  // Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values.
+  KeyRing key_ring = 3 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request message for [KeyManagementService.CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey].
 message CreateCryptoKeyRequest {
   // Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing associated with the
   // [CryptoKeys][google.cloud.kms.v1.CryptoKey].
-  string parent = 1;
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/KeyRing"
+    }
+  ];
 
   // Required. It must be unique within a KeyRing and match the regular
   // expression `[a-zA-Z0-9_-]{1,63}`
-  string crypto_key_id = 2;
+  string crypto_key_id = 2 [(google.api.field_behavior) = REQUIRED];
 
-  // A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field values.
-  CryptoKey crypto_key = 3;
+  // Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field values.
+  CryptoKey crypto_key = 3 [(google.api.field_behavior) = REQUIRED];
 
   // If set to true, the request will create a [CryptoKey][google.cloud.kms.v1.CryptoKey] without any
   // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must manually call
@@ -500,27 +599,37 @@ message CreateCryptoKeyRequest {
 message CreateCryptoKeyVersionRequest {
   // Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with
   // the [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].
-  string parent = 1;
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/CryptoKey"
+    }
+  ];
 
-  // A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with initial field values.
-  CryptoKeyVersion crypto_key_version = 2;
+  // Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with initial field values.
+  CryptoKeyVersion crypto_key_version = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request message for [KeyManagementService.ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion].
 message ImportCryptoKeyVersionRequest {
   // Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to
   // be imported into.
-  string parent = 1;
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/CryptoKey"
+    }
+  ];
 
   // Required. The [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] of
   // the key being imported. This does not need to match the
   // [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the [CryptoKey][google.cloud.kms.v1.CryptoKey] this
   // version imports into.
-  CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2;
+  CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(google.api.field_behavior) = REQUIRED];
 
   // Required. The [name][google.cloud.kms.v1.ImportJob.name] of the [ImportJob][google.cloud.kms.v1.ImportJob] that was used to
   // wrap this key material.
-  string import_job = 4;
+  string import_job = 4 [(google.api.field_behavior) = REQUIRED];
 
   // Required. The incoming wrapped key material that is to be imported.
   oneof wrapped_key_material {
@@ -540,6 +649,11 @@ message ImportCryptoKeyVersionRequest {
     //   
     // 
     //
+    // If importing symmetric key material, it is expected that the unwrapped
+    // key contains plain bytes. If importing asymmetric key material, it is
+    // expected that the unwrapped key is in PKCS#8-encoded DER format (the
+    // PrivateKeyInfo structure from RFC 5208).
+    //
     // This format is the same as the format produced by PKCS#11 mechanism
     // CKM_RSA_AES_KEY_WRAP.
     bytes rsa_aes_wrapped_key = 5;
@@ -550,32 +664,37 @@ message ImportCryptoKeyVersionRequest {
 message CreateImportJobRequest {
   // Required. The [name][google.cloud.kms.v1.KeyRing.name] of the [KeyRing][google.cloud.kms.v1.KeyRing] associated with the
   // [ImportJobs][google.cloud.kms.v1.ImportJob].
-  string parent = 1;
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/KeyRing"
+    }
+  ];
 
   // Required. It must be unique within a KeyRing and match the regular
   // expression `[a-zA-Z0-9_-]{1,63}`
-  string import_job_id = 2;
+  string import_job_id = 2 [(google.api.field_behavior) = REQUIRED];
 
   // Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field values.
-  ImportJob import_job = 3;
+  ImportJob import_job = 3 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request message for [KeyManagementService.UpdateCryptoKey][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKey].
 message UpdateCryptoKeyRequest {
-  // [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values.
-  CryptoKey crypto_key = 1;
+  // Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values.
+  CryptoKey crypto_key = 1 [(google.api.field_behavior) = REQUIRED];
 
-  // Required list of fields to be updated in this request.
-  google.protobuf.FieldMask update_mask = 2;
+  // Required. List of fields to be updated in this request.
+  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request message for [KeyManagementService.UpdateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyVersion].
 message UpdateCryptoKeyVersionRequest {
-  // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with updated values.
-  CryptoKeyVersion crypto_key_version = 1;
+  // Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with updated values.
+  CryptoKeyVersion crypto_key_version = 1 [(google.api.field_behavior) = REQUIRED];
 
-  // Required list of fields to be updated in this request.
-  google.protobuf.FieldMask update_mask = 2;
+  // Required. List of fields to be updated in this request.
+  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request message for [KeyManagementService.Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
@@ -585,7 +704,12 @@ message EncryptRequest {
   //
   // If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server will use its
   // [primary version][google.cloud.kms.v1.CryptoKey.primary].
-  string name = 1;
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "*"
+    }
+  ];
 
   // Required. The data to encrypt. Must be no larger than 64KiB.
   //
@@ -595,9 +719,9 @@ message EncryptRequest {
   // than 64KiB. For [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of the
   // plaintext and additional_authenticated_data fields must be no larger than
   // 8KiB.
-  bytes plaintext = 2;
+  bytes plaintext = 2 [(google.api.field_behavior) = REQUIRED];
 
-  // Optional data that, if specified, must also be provided during decryption
+  // Optional. Optional data that, if specified, must also be provided during decryption
   // through [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data].
   //
   // The maximum size depends on the key version's
@@ -606,44 +730,59 @@ message EncryptRequest {
   // 64KiB. For [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of the
   // plaintext and additional_authenticated_data fields must be no larger than
   // 8KiB.
-  bytes additional_authenticated_data = 3;
+  bytes additional_authenticated_data = 3 [(google.api.field_behavior) = OPTIONAL];
 }
 
 // Request message for [KeyManagementService.Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
 message DecryptRequest {
   // Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption.
   // The server will choose the appropriate version.
-  string name = 1;
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/CryptoKey"
+    }
+  ];
 
   // Required. The encrypted data originally returned in
   // [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext].
-  bytes ciphertext = 2;
+  bytes ciphertext = 2 [(google.api.field_behavior) = REQUIRED];
 
-  // Optional data that must match the data originally supplied in
+  // Optional. Optional data that must match the data originally supplied in
   // [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data].
-  bytes additional_authenticated_data = 3;
+  bytes additional_authenticated_data = 3 [(google.api.field_behavior) = OPTIONAL];
 }
 
 // Request message for [KeyManagementService.AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign].
 message AsymmetricSignRequest {
   // Required. The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for signing.
-  string name = 1;
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/CryptoKeyVersion"
+    }
+  ];
 
   // Required. The digest of the data to sign. The digest must be produced with
   // the same digest algorithm as specified by the key version's
   // [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm].
-  Digest digest = 3;
+  Digest digest = 3 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request message for [KeyManagementService.AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt].
 message AsymmetricDecryptRequest {
   // Required. The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for
   // decryption.
-  string name = 1;
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/CryptoKeyVersion"
+    }
+  ];
 
   // Required. The data encrypted with the named [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public
   // key using OAEP.
-  bytes ciphertext = 3;
+  bytes ciphertext = 3 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Response message for [KeyManagementService.Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
@@ -654,7 +793,8 @@ message DecryptResponse {
 
 // Response message for [KeyManagementService.Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
 message EncryptResponse {
-  // The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in encryption.
+  // The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in encryption. Check
+  // this field to verify that the intended resource was used for encryption.
   string name = 1;
 
   // The encrypted data.
@@ -675,23 +815,38 @@ message AsymmetricDecryptResponse {
 
 // Request message for [KeyManagementService.UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
 message UpdateCryptoKeyPrimaryVersionRequest {
-  // The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to update.
-  string name = 1;
+  // Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to update.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/CryptoKey"
+    }
+  ];
 
-  // The id of the child [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary.
-  string crypto_key_version_id = 2;
+  // Required. The id of the child [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary.
+  string crypto_key_version_id = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request message for [KeyManagementService.DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion].
 message DestroyCryptoKeyVersionRequest {
-  // The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy.
-  string name = 1;
+  // Required. The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/CryptoKeyVersion"
+    }
+  ];
 }
 
 // Request message for [KeyManagementService.RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion].
 message RestoreCryptoKeyVersionRequest {
-  // The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore.
-  string name = 1;
+  // Required. The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "cloudkms.googleapis.com/CryptoKeyVersion"
+    }
+  ];
 }
 
 // A [Digest][google.cloud.kms.v1.Digest] holds a cryptographic message digest.
@@ -715,4 +870,9 @@ message LocationMetadata {
   // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
   // [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this location.
   bool hsm_available = 1;
+
+  // Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with
+  // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
+  // [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in this location.
+  bool ekm_available = 2;
 }
diff --git a/google/cloud/language/artman_language_v1.yaml b/google/cloud/language/artman_language_v1.yaml
index 56c301dd1..199014460 100644
--- a/google/cloud/language/artman_language_v1.yaml
+++ b/google/cloud/language/artman_language_v1.yaml
@@ -3,11 +3,12 @@ common:
   api_version: v1
   organization_name: google-cloud
   proto_deps:
-    - name: google-common-protos
+  - name: google-common-protos
   src_proto_paths:
   - v1
   service_yaml: language_v1.yaml
   gapic_yaml: v1/language_gapic.yaml
+  samples: v1/samples
 artifacts:
 - name: gapic_config
   type: GAPIC_CONFIG
diff --git a/google/cloud/language/v1/BUILD.bazel b/google/cloud/language/v1/BUILD.bazel
index 5766b6440..23f50c44c 100644
--- a/google/cloud/language/v1/BUILD.bazel
+++ b/google/cloud/language/v1/BUILD.bazel
@@ -1,14 +1,19 @@
+# This file was automatically generated by BuildFileGenerator
+
 # This is an API workspace, having public visibility by default makes perfect sense.
 package(default_visibility = ["//visibility:public"])
 
 ##############################################################################
 # Common
 ##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
 load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
 
 proto_library(
     name = "language_proto",
-    srcs = ["language_service.proto"],
+    srcs = [
+        "language_service.proto",
+    ],
     deps = [
         "//google/api:annotations_proto",
         "//google/api:client_proto",
@@ -18,7 +23,10 @@ proto_library(
 
 proto_library_with_info(
     name = "language_proto_with_info",
-    deps = [":language_proto"],
+    deps = [
+        ":language_proto",
+        "//google/cloud:common_resources_proto",
+    ],
 )
 
 ##############################################################################
@@ -26,17 +34,13 @@ proto_library_with_info(
 ##############################################################################
 load(
     "@com_google_googleapis_imports//:imports.bzl",
-    "java_grpc_library",
-    "java_gapic_library",
     "java_gapic_assembly_gradle_pkg",
+    "java_gapic_library",
+    "java_gapic_test",
+    "java_grpc_library",
     "java_proto_library",
-    "java_test",
 )
 
-_JAVA_GRPC_DEPS = [
-    "@com_google_api_grpc_proto_google_common_protos//jar",
-]
-
 java_proto_library(
     name = "language_java_proto",
     deps = [":language_proto"],
@@ -45,39 +49,40 @@ java_proto_library(
 java_grpc_library(
     name = "language_java_grpc",
     srcs = [":language_proto"],
-    deps = [":language_java_proto"] + _JAVA_GRPC_DEPS,
+    deps = [":language_java_proto"],
 )
 
 java_gapic_library(
     name = "language_java_gapic",
     src = ":language_proto_with_info",
     gapic_yaml = "language_gapic.yaml",
+    package = "google.cloud.language.v1",
     service_yaml = "//google/cloud/language:language_v1.yaml",
-    test_deps = [":language_java_grpc"],
-    deps = [":language_java_proto"] + _JAVA_GRPC_DEPS,
+    test_deps = [
+        ":language_java_grpc",
+    ],
+    deps = [
+        ":language_java_proto",
+    ],
 )
 
-[java_test(
-    name = test_name,
-    test_class = test_name,
+java_gapic_test(
+    name = "language_java_gapic_test_suite",
+    test_classes = [
+        "com.google.cloud.language.v1.LanguageServiceClientTest",
+    ],
     runtime_deps = [":language_java_gapic_test"],
-) for test_name in [
-    "com.google.cloud.language.v1.LanguageServiceClientTest",
-]]
+)
 
-# Opensource Packages
+# Open Source Packages
 java_gapic_assembly_gradle_pkg(
     name = "google-cloud-language-v1-java",
-    client_deps = [":language_java_gapic"],
-    client_group = "com.google.cloud",
-    client_test_deps = [":language_java_gapic_test"],
-    grpc_deps = [":language_java_grpc"],
-    grpc_group = "com.google.api.grpc",
-    proto_deps = [
+    deps = [
+        ":language_java_gapic",
+        ":language_java_grpc",
         ":language_java_proto",
         ":language_proto",
-    ] + _JAVA_GRPC_DEPS,
-    version = "0.0.0-SNAPSHOT",
+    ],
 )
 
 ##############################################################################
@@ -85,10 +90,10 @@ java_gapic_assembly_gradle_pkg(
 ##############################################################################
 load(
     "@com_google_googleapis_imports//:imports.bzl",
+    "go_gapic_assembly_pkg",
+    "go_gapic_library",
     "go_proto_library",
     "go_test",
-    "go_gapic_library",
-    "go_gapic_assembly_pkg",
 )
 
 go_proto_library(
@@ -96,16 +101,20 @@ go_proto_library(
     compilers = ["@io_bazel_rules_go//proto:go_grpc"],
     importpath = "google.golang.org/genproto/googleapis/cloud/language/v1",
     protos = [":language_proto"],
-    deps = ["//google/api:annotations_go_proto"],
+    deps = [
+        "//google/api:annotations_go_proto",
+    ],
 )
 
 go_gapic_library(
     name = "language_go_gapic",
-    src = ":language_proto_with_info",
-    gapic_yaml = "language_gapic.yaml",
-    importpath = "cloud.google.com/go/language/apiv1",
+    srcs = [":language_proto_with_info"],
+    grpc_service_config = "language_grpc_service_config.json",
+    importpath = "cloud.google.com/go/language/apiv1;language",
     service_yaml = "//google/cloud/language:language_v1.yaml",
-    deps = [":language_go_proto"],
+    deps = [
+        ":language_go_proto",
+    ],
 )
 
 go_test(
@@ -115,26 +124,81 @@ go_test(
     importpath = "cloud.google.com/go/language/apiv1",
 )
 
-# Opensource Packages
+# Open Source Packages
 go_gapic_assembly_pkg(
     name = "gapi-cloud-language-v1-go",
     deps = [
         ":language_go_gapic",
-        ":language_go_gapic_srcjar-smoke-test.srcjar",
         ":language_go_gapic_srcjar-test.srcjar",
         ":language_go_proto",
     ],
 )
 
+##############################################################################
+# Python
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "moved_proto_library",
+    "py_gapic_assembly_pkg",
+    "py_gapic_library",
+    "py_grpc_library",
+    "py_proto_library",
+)
+
+moved_proto_library(
+    name = "language_moved_proto",
+    srcs = [":language_proto"],
+    deps = [
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+    ],
+)
+
+py_proto_library(
+    name = "language_py_proto",
+    plugin = "@protoc_docs_plugin//:docs_plugin",
+    deps = [":language_moved_proto"],
+)
+
+py_grpc_library(
+    name = "language_py_grpc",
+    srcs = [":language_moved_proto"],
+    deps = [":language_py_proto"],
+)
+
+py_gapic_library(
+    name = "language_py_gapic",
+    src = ":language_proto_with_info",
+    gapic_yaml = "language_gapic.yaml",
+    package = "google.cloud.language.v1",
+    service_yaml = "//google/cloud/language:language_v1.yaml",
+    deps = [
+        ":language_py_grpc",
+        ":language_py_proto",
+    ],
+)
+
+# Open Source Packages
+py_gapic_assembly_pkg(
+    name = "language-v1-py",
+    deps = [
+        ":language_py_gapic",
+        ":language_py_grpc",
+        ":language_py_proto",
+    ],
+)
+
 ##############################################################################
 # PHP
 ##############################################################################
 load(
     "@com_google_googleapis_imports//:imports.bzl",
-    "php_proto_library",
-    "php_grpc_library",
-    "php_gapic_library",
     "php_gapic_assembly_pkg",
+    "php_gapic_library",
+    "php_grpc_library",
+    "php_proto_library",
 )
 
 php_proto_library(
@@ -152,14 +216,15 @@ php_gapic_library(
     name = "language_php_gapic",
     src = ":language_proto_with_info",
     gapic_yaml = "language_gapic.yaml",
+    package = "google.cloud.language.v1",
     service_yaml = "//google/cloud/language:language_v1.yaml",
     deps = [
-        ":langauge_php_grpc",
+        ":language_php_grpc",
         ":language_php_proto",
     ],
 )
 
-# Opensource Packages
+# Open Source Packages
 php_gapic_assembly_pkg(
     name = "google-cloud-language-v1-php",
     deps = [
@@ -174,14 +239,15 @@ php_gapic_assembly_pkg(
 ##############################################################################
 load(
     "@com_google_googleapis_imports//:imports.bzl",
-    "nodejs_gapic_library",
     "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
 )
 
 nodejs_gapic_library(
     name = "language_nodejs_gapic",
     src = ":language_proto_with_info",
     gapic_yaml = "language_gapic.yaml",
+    package = "google.cloud.language.v1",
     service_yaml = "//google/cloud/language:language_v1.yaml",
     deps = [],
 )
@@ -194,3 +260,95 @@ nodejs_gapic_assembly_pkg(
     ],
 )
 
+##############################################################################
+# Ruby
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "ruby_gapic_assembly_pkg",
+    "ruby_gapic_library",
+    "ruby_grpc_library",
+    "ruby_proto_library",
+)
+
+ruby_proto_library(
+    name = "language_ruby_proto",
+    deps = [":language_proto"],
+)
+
+ruby_grpc_library(
+    name = "language_ruby_grpc",
+    srcs = [":language_proto"],
+    deps = [":language_ruby_proto"],
+)
+
+ruby_gapic_library(
+    name = "language_ruby_gapic",
+    src = ":language_proto_with_info",
+    gapic_yaml = "language_gapic.yaml",
+    package = "google.cloud.language.v1",
+    service_yaml = "//google/cloud/language:language_v1.yaml",
+    deps = [
+        ":language_ruby_grpc",
+        ":language_ruby_proto",
+    ],
+)
+
+# Open Source Packages
+ruby_gapic_assembly_pkg(
+    name = "google-cloud-language-v1-ruby",
+    deps = [
+        ":language_ruby_gapic",
+        ":language_ruby_grpc",
+        ":language_ruby_proto",
+    ],
+)
+
+##############################################################################
+# C#
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "csharp_gapic_assembly_pkg",
+    "csharp_gapic_library",
+    "csharp_grpc_library",
+    "csharp_proto_library",
+)
+
+csharp_proto_library(
+    name = "language_csharp_proto",
+    deps = [":language_proto"],
+)
+
+csharp_grpc_library(
+    name = "language_csharp_grpc",
+    srcs = [":language_proto"],
+    deps = [":language_csharp_proto"],
+)
+
+csharp_gapic_library(
+    name = "language_csharp_gapic",
+    src = ":language_proto_with_info",
+    gapic_yaml = "language_gapic.yaml",
+    package = "google.cloud.language.v1",
+    service_yaml = "//google/cloud/language:language_v1.yaml",
+    deps = [
+        ":language_csharp_grpc",
+        ":language_csharp_proto",
+    ],
+)
+
+# Open Source Packages
+csharp_gapic_assembly_pkg(
+    name = "google-cloud-language-v1-csharp",
+    deps = [
+        ":language_csharp_gapic",
+        ":language_csharp_grpc",
+        ":language_csharp_proto",
+    ],
+)
+
+##############################################################################
+# C++
+##############################################################################
+# Put your C++ rules here
diff --git a/google/cloud/language/v1/language.tests.yaml b/google/cloud/language/v1/language.tests.yaml
deleted file mode 100644
index d133b04f6..000000000
--- a/google/cloud/language/v1/language.tests.yaml
+++ /dev/null
@@ -1,123 +0,0 @@
-test:
-  suites:
-  - name: Natural Language V1
-    cases:
-
-    - name: Analyze Syntax
-      spec:
-      - call: {sample: language_syntax_text}
-      - assert_contains:
-        - literal: "Text: This"
-        - literal: "Text: is"
-        - literal: "Text: short"
-        - literal: "Text: sentence"
-        - literal: "Text: ."
-
-    - name: Analyze Syntax – GCS
-      spec:
-      - call:
-          sample: language_syntax_gcs
-      - assert_contains:
-        - literal: "Text: This"
-        - literal: "Text: is"
-        - literal: "Text: short"
-        - literal: "Text: sentence"
-        - literal: "Text: ."
-
-    - name: Analyze Sentiment
-      spec:
-      - call: {sample: language_sentiment_text}
-      - assert_contains:
-        # Default message should return positive: 'I am so happy and joyful'
-        - literal: "Sentiment score: 0."
-        - literal: "Magnitude: 0."
-
-    - name: Analyze Sentiment – Negative
-      spec:
-      - call:
-          sample: language_sentiment_text
-          params:
-            text_content:
-              literal: "I am so sad and upset."
-      - assert_contains:
-        - literal: "Sentiment score: -0."
-        - literal: "Magnitude: 0."
-
-    - name: Analyze Sentiment – GCS
-      spec:
-      - call: {sample: language_sentiment_gcs}
-      - assert_contains:
-        # Default message should return positive: 'I am so happy and joyful'
-        - literal: "Sentiment score: 0."
-        - literal: "Magnitude: 0."
-
-    - name: Analyze Sentiment – GCS – Negative
-      spec:
-      - call:
-          sample: language_sentiment_gcs
-          params:
-            gcs_uri:
-              literal: "gs://cloud-samples-data/language/sentiment-negative.txt"
-      - assert_contains:
-        - literal: "Sentiment score: -0."
-        - literal: "Magnitude: 0."
-
-    - name: Analyze Entities
-      spec:
-      - call: {sample: language_entities_text}
-      - assert_contains:
-        - literal: "Entity name: California"
-        - literal: "Entity salience score: 1"
-        - literal: "Mention: California"
-        - literal: "Mention: state"
-
-    - name: Analyze Entities – GCS
-      spec:
-      - call: {sample: language_entities_gcs}
-      - assert_contains:
-        - literal: "Entity name: California"
-        - literal: "Entity salience score: 1"
-        - literal: "Mention: California"
-        - literal: "Mention: state"
-
-    - name: Analyze Entity Sentiment
-      spec:
-      - call: {sample: language_entity_sentiment_text}
-      - assert_contains:
-        - literal: "Entity name: Grapes"
-        - literal: "Entity sentiment score: 0."
-        - literal: "Mention: Grapes"
-        - literal: "Mention sentiment score: 0."
-        - literal: "Mention sentiment magnitude: 0."
-        - literal: "Entity name: Bananas"
-        - literal: "Entity sentiment score: -0."
-        - literal: "Mention: Bananas"
-        - literal: "Mention sentiment score: -0."
-
-    - name: Analyze Entity Sentiment – GCS
-      spec:
-      - call: {sample: language_entity_sentiment_gcs}
-      - assert_contains:
-        - literal: "Entity name: Grapes"
-        - literal: "Entity sentiment score: 0."
-        - literal: "Mention: Grapes"
-        - literal: "Mention sentiment score: 0."
-        - literal: "Mention sentiment magnitude: 0."
-        - literal: "Entity name: Bananas"
-        - literal: "Entity sentiment score: -0."
-        - literal: "Mention: Bananas"
-        - literal: "Mention sentiment score: -0."
-
-    - name: Classify Text
-      spec:
-      - call: {sample: language_classify_text}
-      - assert_contains:
-        - literal: "Category name: /Arts & Entertainment"
-        - literal: "Confidence: 0."
-
-    - name: Classify Text – GCS
-      spec:
-      - call: {sample: language_classify_gcs}
-      - assert_contains:
-        - literal: "Category name: /Arts & Entertainment"
-        - literal: "Confidence: 0."
diff --git a/google/cloud/language/v1/language_gapic.legacy.yaml b/google/cloud/language/v1/language_gapic.legacy.yaml
new file mode 100644
index 000000000..2b05e8be2
--- /dev/null
+++ b/google/cloud/language/v1/language_gapic.legacy.yaml
@@ -0,0 +1,185 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+  java:
+    package_name: com.google.cloud.language.v1
+  python:
+    package_name: google.cloud.language_v1.gapic
+  go:
+    package_name: cloud.google.com/go/language/apiv1
+  csharp:
+    package_name: Google.Cloud.Language.V1
+  ruby:
+    package_name: Google::Cloud::Language::V1
+  php:
+    package_name: Google\Cloud\Language\V1
+  nodejs:
+    package_name: language.v1
+    domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+  # The fully qualified name of the API interface.
+- name: google.cloud.language.v1.LanguageService
+  # A list of resource collection configurations.
+  # Consists of a name_pattern and an entity_name.
+  # The name_pattern is a pattern to describe the names of the resources of this
+  # collection, using the platform's conventions for URI patterns. A generator
+  # may use this to generate methods to compose and decompose such names. The
+  # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+  # those will be taken as hints for the parameter names of the generated
+  # methods. If empty, no name methods are generated.
+  # The entity_name is the name to be used as a basis for generated methods and
+  # classes.
+  collections: []
+  # Definition for retryable codes.
+  retry_codes_def:
+  - name: idempotent
+    retry_codes:
+    - DEADLINE_EXCEEDED
+    - UNAVAILABLE
+  - name: non_idempotent
+    retry_codes: []
+  # Definition for retry/backoff parameters.
+  retry_params_def:
+  - name: default
+    initial_retry_delay_millis: 100
+    retry_delay_multiplier: 1.3
+    max_retry_delay_millis: 60000
+    initial_rpc_timeout_millis: 20000
+    rpc_timeout_multiplier: 1
+    max_rpc_timeout_millis: 20000
+    total_timeout_millis: 600000
+  # A list of method configurations.
+  # Common properties:
+  #
+  #   name - The simple name of the method.
+  #
+  #   flattening - Specifies the configuration for parameter flattening.
+  #   Describes the parameter groups for which a generator should produce method
+  #   overloads which allow a client to directly pass request message fields as
+  #   method parameters. This information may or may not be used, depending on
+  #   the target language.
+  #   Consists of groups, which each represent a list of parameters to be
+  #   flattened. Each parameter listed must be a field of the request message.
+  #
+  #   required_fields - Fields that are always required for a request to be
+  #   valid.
+  #
+  #   resource_name_treatment - An enum that specifies how to treat the resource
+  #   name formats defined in the field_name_patterns and
+  #   response_field_name_patterns fields.
+  #   UNSET: default value
+  #   NONE: the collection configs will not be used by the generated code.
+  #   VALIDATE: string fields will be validated by the client against the
+  #   specified resource name formats.
+  #   STATIC_TYPES: the client will use generated types for resource names.
+  #
+  #   page_streaming - Specifies the configuration for paging.
+  #   Describes information for generating a method which transforms a paging
+  #   list RPC into a stream of resources.
+  #   Consists of a request and a response.
+  #   The request specifies request information of the list method. It defines
+  #   which fields match the paging pattern in the request. The request consists
+  #   of a page_size_field and a token_field. The page_size_field is the name of
+  #   the optional field specifying the maximum number of elements to be
+  #   returned in the response. The token_field is the name of the field in the
+  #   request containing the page token.
+  #   The response specifies response information of the list method. It defines
+  #   which fields match the paging pattern in the response. The response
+  #   consists of a token_field and a resources_field. The token_field is the
+  #   name of the field in the response containing the next page token. The
+  #   resources_field is the name of the field in the response containing the
+  #   list of resources belonging to the page.
+  #
+  #   retry_codes_name - Specifies the configuration for retryable codes. The
+  #   name must be defined in interfaces.retry_codes_def.
+  #
+  #   retry_params_name - Specifies the configuration for retry/backoff
+  #   parameters. The name must be defined in interfaces.retry_params_def.
+  #
+  #   field_name_patterns - Maps the field name of the request type to
+  #   entity_name of interfaces.collections.
+  #   Specifies the string pattern that the field must follow.
+  #
+  #   timeout_millis - Specifies the default timeout for a non-retrying call. If
+  #   the call is retrying, refer to retry_params_name instead.
+  methods:
+  - name: AnalyzeSentiment
+    flattening:
+      groups:
+      - parameters:
+        - document
+        - encoding_type
+      - parameters:
+        - document
+    required_fields:
+    - document
+    retry_codes_name: idempotent
+    retry_params_name: default
+    timeout_millis: 60000
+  - name: AnalyzeEntities
+    flattening:
+      groups:
+      - parameters:
+        - document
+        - encoding_type
+      - parameters:
+        - document
+    required_fields:
+    - document
+    retry_codes_name: idempotent
+    retry_params_name: default
+    timeout_millis: 60000
+  - name: AnalyzeEntitySentiment
+    flattening:
+      groups:
+      - parameters:
+        - document
+        - encoding_type
+      - parameters:
+        - document
+    required_fields:
+    - document
+    retry_codes_name: idempotent
+    retry_params_name: default
+    timeout_millis: 60000
+  - name: AnalyzeSyntax
+    flattening:
+      groups:
+      - parameters:
+        - document
+        - encoding_type
+      - parameters:
+        - document
+    required_fields:
+    - document
+    retry_codes_name: idempotent
+    retry_params_name: default
+    timeout_millis: 60000
+  - name: ClassifyText
+    flattening:
+      groups:
+      - parameters:
+        - document
+    required_fields:
+    - document
+    retry_codes_name: idempotent
+    retry_params_name: default
+    timeout_millis: 60000
+  - name: AnnotateText
+    flattening:
+      groups:
+      - parameters:
+        - document
+        - features
+        - encoding_type
+      - parameters:
+        - document
+        - features
+    required_fields:
+    - document
+    - features
+    retry_codes_name: idempotent
+    retry_params_name: default
+    timeout_millis: 60000
diff --git a/google/cloud/language/v1/language_gapic.yaml b/google/cloud/language/v1/language_gapic.yaml
index a3796fc94..bf6b0bf7a 100644
--- a/google/cloud/language/v1/language_gapic.yaml
+++ b/google/cloud/language/v1/language_gapic.yaml
@@ -1,5 +1,5 @@
 type: com.google.api.codegen.ConfigProto
-config_schema_version: 1.0.0
+config_schema_version: 2.0.0
 # The settings of generated code in a specific language.
 language_settings:
   java:
@@ -21,25 +21,6 @@ language_settings:
 interfaces:
   # The fully qualified name of the API interface.
 - name: google.cloud.language.v1.LanguageService
-  # A list of resource collection configurations.
-  # Consists of a name_pattern and an entity_name.
-  # The name_pattern is a pattern to describe the names of the resources of this
-  # collection, using the platform's conventions for URI patterns. A generator
-  # may use this to generate methods to compose and decompose such names. The
-  # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
-  # those will be taken as hints for the parameter names of the generated
-  # methods. If empty, no name methods are generated.
-  # The entity_name is the name to be used as a basis for generated methods and
-  # classes.
-  collections: []
-  # Definition for retryable codes.
-  retry_codes_def:
-  - name: idempotent
-    retry_codes:
-    - DEADLINE_EXCEEDED
-    - UNAVAILABLE
-  - name: non_idempotent
-    retry_codes: []
   # Definition for retry/backoff parameters.
   retry_params_def:
   - name: default
@@ -55,364 +36,30 @@ interfaces:
   #
   #   name - The simple name of the method.
   #
-  #   flattening - Specifies the configuration for parameter flattening.
-  #   Describes the parameter groups for which a generator should produce method
-  #   overloads which allow a client to directly pass request message fields as
-  #   method parameters. This information may or may not be used, depending on
-  #   the target language.
-  #   Consists of groups, which each represent a list of parameters to be
-  #   flattened. Each parameter listed must be a field of the request message.
-  #
-  #   required_fields - Fields that are always required for a request to be
-  #   valid.
-  #
-  #   resource_name_treatment - An enum that specifies how to treat the resource
-  #   name formats defined in the field_name_patterns and
-  #   response_field_name_patterns fields.
-  #   UNSET: default value
-  #   NONE: the collection configs will not be used by the generated code.
-  #   VALIDATE: string fields will be validated by the client against the
-  #   specified resource name formats.
-  #   STATIC_TYPES: the client will use generated types for resource names.
-  #
-  #   page_streaming - Specifies the configuration for paging.
-  #   Describes information for generating a method which transforms a paging
-  #   list RPC into a stream of resources.
-  #   Consists of a request and a response.
-  #   The request specifies request information of the list method. It defines
-  #   which fields match the paging pattern in the request. The request consists
-  #   of a page_size_field and a token_field. The page_size_field is the name of
-  #   the optional field specifying the maximum number of elements to be
-  #   returned in the response. The token_field is the name of the field in the
-  #   request containing the page token.
-  #   The response specifies response information of the list method. It defines
-  #   which fields match the paging pattern in the response. The response
-  #   consists of a token_field and a resources_field. The token_field is the
-  #   name of the field in the response containing the next page token. The
-  #   resources_field is the name of the field in the response containing the
-  #   list of resources belonging to the page.
-  #
   #   retry_codes_name - Specifies the configuration for retryable codes. The
   #   name must be defined in interfaces.retry_codes_def.
   #
   #   retry_params_name - Specifies the configuration for retry/backoff
   #   parameters. The name must be defined in interfaces.retry_params_def.
   #
-  #   field_name_patterns - Maps the field name of the request type to
-  #   entity_name of interfaces.collections.
-  #   Specifies the string pattern that the field must follow.
-  #
   #   timeout_millis - Specifies the default timeout for a non-retrying call. If
   #   the call is retrying, refer to retry_params_name instead.
   methods:
   - name: AnalyzeSentiment
-    flattening:
-      groups:
-      - parameters:
-        - document
-        - encoding_type
-      - parameters:
-        - document
-    required_fields:
-    - document
     retry_codes_name: idempotent
     retry_params_name: default
-    timeout_millis: 60000
-    samples:
-      standalone:
-      - value_sets: [language_sentiment_text]
-        region_tag: language_sentiment_text
-      - value_sets: [language_sentiment_gcs]
-        region_tag: language_sentiment_gcs
-      - region_tag: analyze_text_sentiment
-        value_sets: [analyze_text_sentiment]
-    sample_value_sets:
-    - id: analyze_text_sentiment
-      description: This sample demonstrates analyzing the sentiment of text
-      parameters:
-        defaults:
-        - document.type=PLAIN_TEXT
-        - document.content="I am so happy"
-    - id: language_sentiment_text
-      description: "Analyze sentiment of text"
-      parameters:
-        defaults:
-        - document.type=PLAIN_TEXT
-        - document.content="I am so happy and joyful."
-        attributes:
-        - parameter: document.content
-          sample_argument_name: text_content
-      on_success:
-      - define: sentiment=$resp.document_sentiment
-      - print: ["Sentiment score: %s", sentiment.score]
-      - print: ["Magnitude: %s", sentiment.magnitude]
-    - id: language_sentiment_gcs
-      description: "Analyze sentiment of text stored in GCS"
-      parameters:
-        defaults:
-        - document.type=PLAIN_TEXT
-        - document.gcs_content_uri="gs://cloud-samples-data/language/sentiment-positive.txt"
-        attributes:
-        - parameter: document.gcs_content_uri
-          sample_argument_name: gcs_uri
-      on_success:
-      - define: sentiment=$resp.document_sentiment
-      - print: ["Sentiment score: %s", sentiment.score]
-      - print: ["Magnitude: %s", sentiment.magnitude]
   - name: AnalyzeEntities
-    flattening:
-      groups:
-      - parameters:
-        - document
-        - encoding_type
-      - parameters:
-        - document
-    required_fields:
-    - document
     retry_codes_name: idempotent
     retry_params_name: default
-    timeout_millis: 60000
-    samples:
-      standalone:
-      - value_sets: [language_entities_text]
-        region_tag: language_entities_text
-      - value_sets: [language_entities_gcs]
-        region_tag: language_entities_gcs
-    sample_value_sets:
-    - id: language_entities_text
-      description: "Analyze entities in text"
-      parameters:
-        defaults:
-        - document.type=PLAIN_TEXT
-        - document.content="California is a state."
-        attributes:
-        - parameter: document.content
-          sample_argument_name: text_content
-      on_success:
-      - loop:
-          collection: $resp.entities
-          variable: entity
-          body:
-          - print: ["Entity name: %s", entity.name]
-          - print: ["Entity type: %s", entity.type]
-          - print: ["Entity salience score: %s", entity.salience]
-          - loop:
-              collection: entity.mentions
-              variable: mention
-              body:
-              - print: ["Mention: %s", mention.text.content]
-              - print: ["Mention type: %s", mention.type]
-    - id: language_entities_gcs
-      description: "Analyze entities in text stored in GCS"
-      parameters:
-        defaults:
-        - document.type=PLAIN_TEXT
-        - document.gcs_content_uri="gs://cloud-samples-data/language/entity.txt"
-        attributes:
-        - parameter: document.gcs_content_uri
-          sample_argument_name: gcs_ur
-      on_success:
-      - loop:
-          collection: $resp.entities
-          variable: entity
-          body:
-          - print: ["Entity name: %s", entity.name]
-          - print: ["Entity type: %s", entity.type]
-          - print: ["Entity salience score: %s", entity.salience]
-          - loop:
-              collection: entity.mentions
-              variable: mention
-              body:
-              - print: ["Mention: %s", mention.text.content]
-              - print: ["Mention type: %s", mention.type]
   - name: AnalyzeEntitySentiment
-    flattening:
-      groups:
-      - parameters:
-        - document
-        - encoding_type
-      - parameters:
-        - document
-    required_fields:
-    - document
     retry_codes_name: idempotent
     retry_params_name: default
-    timeout_millis: 60000
-    samples:
-      standalone:
-      - value_sets: [language_entity_sentiment_text]
-        region_tag: language_entity_sentiment_text
-      - value_sets: [language_entity_sentiment_gcs]
-        region_tag: language_entity_sentiment_gcs
-    sample_value_sets:
-    - id: language_entity_sentiment_text
-      description: "Analyze Sentiment of Entities in Text"
-      parameters:
-        defaults:
-        - document.type=PLAIN_TEXT
-        - document.content="Grapes are good. Bananas are bad."
-        attributes:
-        - parameter: document.content
-          sample_argument_name: text_content
-      on_success:
-      - loop:
-          collection: $resp.entities
-          variable: entity
-          body:
-          - print: ["Entity name: %s", entity.name]
-          - print: ["Entity sentiment score: %s", entity.sentiment.score]
-          - loop:
-              collection: entity.mentions
-              variable: mention
-              body:
-              - print: ["Mention: %s", mention.text.content]
-              - print: ["Mention type: %s", mention.type]
-              - print: ["Mention sentiment score: %s", mention.sentiment.score]
-              - print:
-                - "Mention sentiment magnitude: %s"
-                - mention.sentiment.magnitude
-    - id: language_entity_sentiment_gcs
-      description: "Analyze Sentiment of Entities in Text stored in GCS"
-      parameters:
-        defaults:
-        - document.type=PLAIN_TEXT
-        - document.gcs_content_uri="gs://cloud-samples-data/language/entity-sentiment.txt"
-        attributes:
-        - parameter: document.gcs_content_uri
-          sample_argument_name: gcs_ur
-      on_success:
-      - loop:
-          collection: $resp.entities
-          variable: entity
-          body:
-          - print: ["Entity name: %s", entity.name]
-          - print: ["Entity sentiment score: %s", entity.sentiment.score]
-          - loop:
-              collection: entity.mentions
-              variable: mention
-              body:
-              - print: ["Mention: %s", mention.text.content]
-              - print: ["Mention type: %s", mention.type]
-              - print: ["Mention sentiment score: %s", mention.sentiment.score]
-              - print:
-                - "Mention sentiment magnitude: %s"
-                - mention.sentiment.magnitude
   - name: AnalyzeSyntax
-    flattening:
-      groups:
-      - parameters:
-        - document
-        - encoding_type
-      - parameters:
-        - document
-    required_fields:
-    - document
     retry_codes_name: idempotent
     retry_params_name: default
-    timeout_millis: 60000
-    samples:
-      standalone:
-      - value_sets: [language_syntax_text]
-        region_tag: language_syntax_text
-      - value_sets: [language_syntax_gcs]
-        region_tag: language_syntax_gcs
-    sample_value_sets:
-    - id: language_syntax_text
-      description: "Analyze syntax of text"
-      parameters:
-        defaults:
-        - document.type=PLAIN_TEXT
-        - document.content="This is a short sentence."
-        attributes:
-        - parameter: document.content
-          sample_argument_name: text_content
-      on_success:
-      - define: tokens=$resp.tokens
-      - loop:
-          variable: token
-          collection: tokens
-          body:
-          - print: ["Part of speech: %s", token.part_of_speech.tag]
-          - print: ["Text: %s", token.text.content]
-    - id: language_syntax_gcs
-      description: "Analyze syntax of text in GCS"
-      parameters:
-        defaults:
-        - document.type=PLAIN_TEXT
-        - document.gcs_content_uri="gs://cloud-samples-data/language/syntax-sentence.txt"
-        attributes:
-        - parameter: document.gcs_content_uri
-          sample_argument_name: gcs_urs
-      on_success:
-      - define: tokens=$resp.tokens
-      - loop:
-          variable: token
-          collection: tokens
-          body:
-          - print: ["Part of speech: %s", token.part_of_speech.tag]
-          - print: ["Text: %s", token.text.content]
   - name: ClassifyText
-    flattening:
-      groups:
-      - parameters:
-        - document
-    required_fields:
-    - document
     retry_codes_name: idempotent
     retry_params_name: default
-    timeout_millis: 60000
-    samples:
-      standalone:
-      - value_sets: [language_classify_text]
-        region_tag: language_classify_text
-      - value_sets: [language_classify_gcs]
-        region_tag: language_classify_gcs
-    sample_value_sets:
-    - id: language_classify_text
-      description: "Classify text"
-      parameters:
-        defaults:
-        - document.type=PLAIN_TEXT
-        - document.content="This is about film and movies and television and acting and movie theatres and theatre and drama and entertainment and the arts."
-        attributes:
-        - parameter: document.content
-          sample_argument_name: text_content
-      on_success:
-      - loop:
-          collection: $resp.categories
-          variable: category
-          body:
-          - print: ["Category name: %s", category.name]
-          - print: ["Confidence: %s", category.confidence]
-    - id: language_classify_gcs
-      description: "Classify text in GCS"
-      parameters:
-        defaults:
-        - document.type=PLAIN_TEXT
-        - document.gcs_content_uri="gs://cloud-samples-data/language/classify-entertainment.txt"
-        attributes:
-        - parameter: document.gcs_content_uri
-          sample_argument_name: gcs_urs
-      on_success:
-      - loop:
-          collection: $resp.categories
-          variable: category
-          body:
-          - print: ["Category name: %s", category.name]
-          - print: ["Confidence: %s", category.confidence]
   - name: AnnotateText
-    flattening:
-      groups:
-      - parameters:
-        - document
-        - features
-        - encoding_type
-      - parameters:
-        - document
-        - features
-    required_fields:
-    - document
-    - features
     retry_codes_name: idempotent
     retry_params_name: default
-    timeout_millis: 60000
diff --git a/google/cloud/language/v1/language_grpc_service_config.json b/google/cloud/language/v1/language_grpc_service_config.json
new file mode 100755
index 000000000..83786e8f0
--- /dev/null
+++ b/google/cloud/language/v1/language_grpc_service_config.json
@@ -0,0 +1,42 @@
+{
+  "methodConfig": [
+    {
+      "name": [
+        {
+          "service": "google.cloud.language.v1.LanguageService",
+          "method": "AnalyzeSentiment"
+        },
+        {
+          "service": "google.cloud.language.v1.LanguageService",
+          "method": "AnalyzeEntities"
+        },
+        {
+          "service": "google.cloud.language.v1.LanguageService",
+          "method": "AnalyzeEntitySentiment"
+        },
+        {
+          "service": "google.cloud.language.v1.LanguageService",
+          "method": "AnalyzeSyntax"
+        },
+        {
+          "service": "google.cloud.language.v1.LanguageService",
+          "method": "ClassifyText"
+        },
+        {
+          "service": "google.cloud.language.v1.LanguageService",
+          "method": "AnnotateText"
+        }
+      ],
+      "timeout": "600s",
+      "retryPolicy": {
+        "initialBackoff": "0.100s",
+        "maxBackoff": "60s",
+        "backoffMultiplier": 1.3,
+        "retryableStatusCodes": [
+          "DEADLINE_EXCEEDED",
+          "UNAVAILABLE"
+        ]
+      }
+    }
+  ]
+}
\ No newline at end of file
diff --git a/google/cloud/language/v1/language_service.proto b/google/cloud/language/v1/language_service.proto
index 41d92f344..e8e4fd8d0 100644
--- a/google/cloud/language/v1/language_service.proto
+++ b/google/cloud/language/v1/language_service.proto
@@ -137,11 +137,11 @@ message Document {
   // The language of the document (if not specified, the language is
   // automatically detected). Both ISO and BCP-47 language codes are
   // accepted.
- // [Language Support](/natural-language/docs/languages) - // lists currently supported languages for each API method. - // If the language (either specified by the caller or automatically detected) - // is not supported by the called API method, an `INVALID_ARGUMENT` error - // is returned. + // [Language + // Support](https://cloud.google.com/natural-language/docs/languages) lists + // currently supported languages for each API method. If the language (either + // specified by the caller or automatically detected) is not supported by the + // called API method, an `INVALID_ARGUMENT` error is returned. string language = 4; } @@ -954,7 +954,7 @@ message TextSpan { // Represents a category returned from the text classifier. message ClassificationCategory { // The name of the category representing the document, from the [predefined - // taxonomy](/natural-language/docs/categories). + // taxonomy](https://cloud.google.com/natural-language/docs/categories). string name = 1; // The classifier's confidence of the category. Number represents how certain diff --git a/google/cloud/language/v1/samples/language_classify_gcs.yaml b/google/cloud/language/v1/samples/language_classify_gcs.yaml new file mode 100644 index 000000000..a542d8485 --- /dev/null +++ b/google/cloud/language/v1/samples/language_classify_gcs.yaml @@ -0,0 +1,42 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 +samples: +- region_tag: language_classify_gcs + title: Classify Content (GCS) + description: Classifying Content in text file stored in Cloud Storage + service: google.cloud.language.v1.LanguageService + rpc: ClassifyText + request: + - field: document.gcs_content_uri + value: gs://cloud-samples-data/language/classify-entertainment.txt + comment: | + Google Cloud Storage URI where the file content is located. + e.g. gs://[Your Bucket]/[Path to File] + The text file must include at least 20 words. + input_parameter: gcs_content_uri + - field: document.type + value: PLAIN_TEXT + comment: "Available types: PLAIN_TEXT, HTML" + - field: document.language + value: en + comment: | + Optional. If not specified, the language is automatically detected. + For list of supported languages: + https://cloud.google.com/natural-language/docs/languages + response: + - comment: ["Loop through classified categories returned from the API"] + - loop: + collection: $resp.categories + variable: category + body: + - comment: + - | + Get the name of the category representing the document. + See the predefined taxonomy of categories: + https://cloud.google.com/natural-language/docs/categories + - print: ["Category name: %s", category.name] + - comment: + - | + Get the confidence. Number representing how certain the classifier + is that this category represents the provided text. + - print: ["Confidence: %s", category.confidence] diff --git a/google/cloud/language/v1/samples/language_classify_text.yaml b/google/cloud/language/v1/samples/language_classify_text.yaml new file mode 100644 index 000000000..e53e85585 --- /dev/null +++ b/google/cloud/language/v1/samples/language_classify_text.yaml @@ -0,0 +1,39 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 +samples: +- region_tag: language_classify_text + title: Classify Content + description: Classifying Content in a String + service: google.cloud.language.v1.LanguageService + rpc: ClassifyText + request: + - field: document.content + value: "That actor on TV makes movies in Hollywood and also stars in a variety of popular new TV shows." + comment: The text content to analyze. Must include at least 20 words. + input_parameter: text_content + - field: document.type + value: PLAIN_TEXT + comment: "Available types: PLAIN_TEXT, HTML" + - field: document.language + value: en + comment: | + Optional. If not specified, the language is automatically detected. + For list of supported languages: + https://cloud.google.com/natural-language/docs/languages + response: + - comment: ["Loop through classified categories returned from the API"] + - loop: + collection: $resp.categories + variable: category + body: + - comment: + - | + Get the name of the category representing the document. + See the predefined taxonomy of categories: + https://cloud.google.com/natural-language/docs/categories + - print: ["Category name: %s", category.name] + - comment: + - | + Get the confidence. Number representing how certain the classifier + is that this category represents the provided text. + - print: ["Confidence: %s", category.confidence] diff --git a/google/cloud/language/v1/samples/language_entities_gcs.yaml b/google/cloud/language/v1/samples/language_entities_gcs.yaml new file mode 100644 index 000000000..b914c3bd5 --- /dev/null +++ b/google/cloud/language/v1/samples/language_entities_gcs.yaml @@ -0,0 +1,67 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 +samples: +- region_tag: language_entities_gcs + title: Analyzing Entities (GCS) + description: Analyzing Entities in text file stored in Cloud Storage + service: google.cloud.language.v1.LanguageService + rpc: AnalyzeEntities + request: + - field: document.gcs_content_uri + value: gs://cloud-samples-data/language/entity.txt + comment: | + Google Cloud Storage URI where the file content is located. + e.g. gs://[Your Bucket]/[Path to File] + input_parameter: gcs_content_uri + - field: document.type + value: PLAIN_TEXT + comment: "Available types: PLAIN_TEXT, HTML" + - field: document.language + value: en + comment: | + Optional. If not specified, the language is automatically detected. + For list of supported languages: + https://cloud.google.com/natural-language/docs/languages + - field: encoding_type + value: UTF8 + comment: "Available values: NONE, UTF8, UTF16, UTF32" + response: + - comment: ["Loop through entitites returned from the API"] + - loop: + collection: $resp.entities + variable: entity + body: + - print: ["Representative name for the entity: %s", entity.name] + - comment: ["Get entity type, e.g. PERSON, LOCATION, ADDRESS, NUMBER, et al"] + - print: ["Entity type: %s", entity.type] + - comment: ["Get the salience score associated with the entity in the [0, 1.0] range"] + - print: ["Salience score: %s", entity.salience] + - comment: + - | + Loop over the metadata associated with entity. For many known entities, + the metadata is a Wikipedia URL (wikipedia_url) and Knowledge Graph MID (mid). + Some entity types may have additional metadata, e.g. ADDRESS entities + may have metadata for the address street_name, postal_code, et al. + - loop: + map: entity.metadata + key: metadata_name + value: metadata_value + body: + - print: ["%s: %s", metadata_name, metadata_value] + - comment: + - | + Loop over the mentions of this entity in the input document. + The API currently supports proper noun mentions. + - loop: + collection: entity.mentions + variable: mention + body: + - print: ["Mention text: %s", mention.text.content] + - comment: ["Get the mention type, e.g. PROPER for proper noun"] + - print: ["Mention type: %s", mention.type] + - comment: + - | + Get the language of the text, which will be the same as + the language specified in the request or, if not specified, + the automatically-detected language. + - print: ["Language of the text: %s", $resp.language] diff --git a/google/cloud/language/v1/samples/language_entities_text.yaml b/google/cloud/language/v1/samples/language_entities_text.yaml new file mode 100644 index 000000000..ad39c42c5 --- /dev/null +++ b/google/cloud/language/v1/samples/language_entities_text.yaml @@ -0,0 +1,65 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 +samples: +- region_tag: language_entities_text + title: Analyzing Entities + description: Analyzing Entities in a String + service: google.cloud.language.v1.LanguageService + rpc: AnalyzeEntities + request: + - field: document.content + value: "California is a state." + comment: The text content to analyze + input_parameter: text_content + - field: document.type + value: PLAIN_TEXT + comment: "Available types: PLAIN_TEXT, HTML" + - field: document.language + value: en + comment: | + Optional. If not specified, the language is automatically detected. + For list of supported languages: + https://cloud.google.com/natural-language/docs/languages + - field: encoding_type + value: UTF8 + comment: "Available values: NONE, UTF8, UTF16, UTF32" + response: + - comment: ["Loop through entitites returned from the API"] + - loop: + collection: $resp.entities + variable: entity + body: + - print: ["Representative name for the entity: %s", entity.name] + - comment: ["Get entity type, e.g. PERSON, LOCATION, ADDRESS, NUMBER, et al"] + - print: ["Entity type: %s", entity.type] + - comment: ["Get the salience score associated with the entity in the [0, 1.0] range"] + - print: ["Salience score: %s", entity.salience] + - comment: + - | + Loop over the metadata associated with entity. For many known entities, + the metadata is a Wikipedia URL (wikipedia_url) and Knowledge Graph MID (mid). + Some entity types may have additional metadata, e.g. ADDRESS entities + may have metadata for the address street_name, postal_code, et al. + - loop: + map: entity.metadata + key: metadata_name + value: metadata_value + body: + - print: ["%s: %s", metadata_name, metadata_value] + - comment: + - | + Loop over the mentions of this entity in the input document. + The API currently supports proper noun mentions. + - loop: + collection: entity.mentions + variable: mention + body: + - print: ["Mention text: %s", mention.text.content] + - comment: ["Get the mention type, e.g. PROPER for proper noun"] + - print: ["Mention type: %s", mention.type] + - comment: + - | + Get the language of the text, which will be the same as + the language specified in the request or, if not specified, + the automatically-detected language. + - print: ["Language of the text: %s", $resp.language] diff --git a/google/cloud/language/v1/samples/language_entity_sentiment_gcs.yaml b/google/cloud/language/v1/samples/language_entity_sentiment_gcs.yaml new file mode 100644 index 000000000..358a1d515 --- /dev/null +++ b/google/cloud/language/v1/samples/language_entity_sentiment_gcs.yaml @@ -0,0 +1,71 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 +samples: +- region_tag: language_entity_sentiment_gcs + title: Analyzing Entity Sentiment (GCS) + description: Analyzing Entity Sentiment in text file stored in Cloud Storage + service: google.cloud.language.v1.LanguageService + rpc: AnalyzeEntitySentiment + request: + - field: document.gcs_content_uri + value: gs://cloud-samples-data/language/entity-sentiment.txt + comment: | + Google Cloud Storage URI where the file content is located. + e.g. gs://[Your Bucket]/[Path to File] + input_parameter: gcs_content_uri + - field: document.type + value: PLAIN_TEXT + comment: "Available types: PLAIN_TEXT, HTML" + - field: document.language + value: en + comment: | + Optional. If not specified, the language is automatically detected. + For list of supported languages: + https://cloud.google.com/natural-language/docs/languages + - field: encoding_type + value: UTF8 + comment: "Available values: NONE, UTF8, UTF16, UTF32" + response: + - comment: Loop through entitites returned from the API + - loop: + collection: $resp.entities + variable: entity + body: + - print: ["Representative name for the entity: %s", entity.name] + - comment: ["Get entity type, e.g. PERSON, LOCATION, ADDRESS, NUMBER, et al"] + - print: ["Entity type: %s", entity.type] + - comment: ["Get the salience score associated with the entity in the [0, 1.0] range"] + - print: ["Salience score: %s", entity.salience] + - comment: ["Get the aggregate sentiment expressed for this entity in the provided document."] + - define: sentiment = entity.sentiment + - print: ["Entity sentiment score: %s", sentiment.score] + - print: ["Entity sentiment magnitude: %s", sentiment.magnitude] + - comment: + - | + Loop over the metadata associated with entity. For many known entities, + the metadata is a Wikipedia URL (wikipedia_url) and Knowledge Graph MID (mid). + Some entity types may have additional metadata, e.g. ADDRESS entities + may have metadata for the address street_name, postal_code, et al. + - loop: + map: entity.metadata + key: metadata_name + value: metadata_value + body: + - print: ["%s = %s", metadata_name, metadata_value] + - comment: + - | + Loop over the mentions of this entity in the input document. + The API currently supports proper noun mentions. + - loop: + collection: entity.mentions + variable: mention + body: + - print: ["Mention text: %s", mention.text.content] + - comment: ["Get the mention type, e.g. PROPER for proper noun"] + - print: ["Mention type: %s", mention.type] + - comment: + - | + Get the language of the text, which will be the same as + the language specified in the request or, if not specified, + the automatically-detected language. + - print: ["Language of the text: %s", $resp.language] diff --git a/google/cloud/language/v1/samples/language_entity_sentiment_text.yaml b/google/cloud/language/v1/samples/language_entity_sentiment_text.yaml new file mode 100644 index 000000000..25b344f6a --- /dev/null +++ b/google/cloud/language/v1/samples/language_entity_sentiment_text.yaml @@ -0,0 +1,69 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 +samples: +- region_tag: language_entity_sentiment_text + title: Analyzing Entity Sentiment + description: Analyzing Entity Sentiment in a String + service: google.cloud.language.v1.LanguageService + rpc: AnalyzeEntitySentiment + request: + - field: document.content + value: "Grapes are good. Bananas are bad." + comment: The text content to analyze + input_parameter: text_content + - field: document.type + value: PLAIN_TEXT + comment: "Available types: PLAIN_TEXT, HTML" + - field: document.language + value: en + comment: | + Optional. If not specified, the language is automatically detected. + For list of supported languages: + https://cloud.google.com/natural-language/docs/languages + - field: encoding_type + value: UTF8 + comment: "Available values: NONE, UTF8, UTF16, UTF32" + response: + - comment: ["Loop through entitites returned from the API"] + - loop: + collection: $resp.entities + variable: entity + body: + - print: ["Representative name for the entity: %s", entity.name] + - comment: ["Get entity type, e.g. PERSON, LOCATION, ADDRESS, NUMBER, et al"] + - print: ["Entity type: %s", entity.type] + - comment: ["Get the salience score associated with the entity in the [0, 1.0] range"] + - print: ["Salience score: %s", entity.salience] + - comment: ["Get the aggregate sentiment expressed for this entity in the provided document."] + - define: sentiment = entity.sentiment + - print: ["Entity sentiment score: %s", sentiment.score] + - print: ["Entity sentiment magnitude: %s", sentiment.magnitude] + - comment: + - | + Loop over the metadata associated with entity. For many known entities, + the metadata is a Wikipedia URL (wikipedia_url) and Knowledge Graph MID (mid). + Some entity types may have additional metadata, e.g. ADDRESS entities + may have metadata for the address street_name, postal_code, et al. + - loop: + map: entity.metadata + key: metadata_name + value: metadata_value + body: + - print: ["%s = %s", metadata_name, metadata_value] + - comment: + - | + Loop over the mentions of this entity in the input document. + The API currently supports proper noun mentions. + - loop: + collection: entity.mentions + variable: mention + body: + - print: ["Mention text: %s", mention.text.content] + - comment: ["Get the mention type, e.g. PROPER for proper noun"] + - print: ["Mention type: %s", mention.type] + - comment: + - | + Get the language of the text, which will be the same as + the language specified in the request or, if not specified, + the automatically-detected language. + - print: ["Language of the text: %s", $resp.language] diff --git a/google/cloud/language/v1/samples/language_sentiment_gcs.yaml b/google/cloud/language/v1/samples/language_sentiment_gcs.yaml new file mode 100644 index 000000000..ad85c30aa --- /dev/null +++ b/google/cloud/language/v1/samples/language_sentiment_gcs.yaml @@ -0,0 +1,45 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 +samples: +- region_tag: language_sentiment_gcs + title: Analyzing Sentiment (GCS) + description: Analyzing Sentiment in text file stored in Cloud Storage + service: google.cloud.language.v1.LanguageService + rpc: AnalyzeSentiment + request: + - field: document.gcs_content_uri + value: gs://cloud-samples-data/language/sentiment-positive.txt + comment: | + Google Cloud Storage URI where the file content is located. + e.g. gs://[Your Bucket]/[Path to File] + input_parameter: gcs_content_uri + - field: document.type + value: PLAIN_TEXT + comment: "Available types: PLAIN_TEXT, HTML" + - field: document.language + value: en + comment: | + Optional. If not specified, the language is automatically detected. + For list of supported languages: + https://cloud.google.com/natural-language/docs/languages + - field: encoding_type + value: UTF8 + comment: "Available values: NONE, UTF8, UTF16, UTF32" + response: + - comment: ["Get overall sentiment of the input document"] + - print: ["Document sentiment score: %s", $resp.document_sentiment.score] + - print: ["Document sentiment magnitude: %s", $resp.document_sentiment.magnitude] + - comment: ["Get sentiment for all sentences in the document"] + - loop: + collection: $resp.sentences + variable: sentence + body: + - print: ["Sentence text: %s", sentence.text.content] + - print: ["Sentence sentiment score: %s", sentence.sentiment.score] + - print: ["Sentence sentiment magnitude: %s", sentence.sentiment.magnitude] + - comment: + - | + Get the language of the text, which will be the same as + the language specified in the request or, if not specified, + the automatically-detected language. + - print: ["Language of the text: %s", $resp.language] diff --git a/google/cloud/language/v1/samples/language_sentiment_text.yaml b/google/cloud/language/v1/samples/language_sentiment_text.yaml new file mode 100644 index 000000000..08d1114ec --- /dev/null +++ b/google/cloud/language/v1/samples/language_sentiment_text.yaml @@ -0,0 +1,43 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 +samples: +- region_tag: language_sentiment_text + title: Analyzing Sentiment + description: Analyzing Sentiment in a String + service: google.cloud.language.v1.LanguageService + rpc: AnalyzeSentiment + request: + - field: document.content + value: "I am so happy and joyful." + comment: The text content to analyze + input_parameter: text_content + - field: document.type + value: PLAIN_TEXT + comment: "Available types: PLAIN_TEXT, HTML" + - field: document.language + value: en + comment: | + Optional. If not specified, the language is automatically detected. + For list of supported languages: + https://cloud.google.com/natural-language/docs/languages + - field: encoding_type + value: UTF8 + comment: "Available values: NONE, UTF8, UTF16, UTF32" + response: + - comment: ["Get overall sentiment of the input document"] + - print: ["Document sentiment score: %s", $resp.document_sentiment.score] + - print: ["Document sentiment magnitude: %s", $resp.document_sentiment.magnitude] + - comment: ["Get sentiment for all sentences in the document"] + - loop: + collection: $resp.sentences + variable: sentence + body: + - print: ["Sentence text: %s", sentence.text.content] + - print: ["Sentence sentiment score: %s", sentence.sentiment.score] + - print: ["Sentence sentiment magnitude: %s", sentence.sentiment.magnitude] + - comment: + - | + Get the language of the text, which will be the same as + the language specified in the request or, if not specified, + the automatically-detected language. + - print: ["Language of the text: %s", $resp.language] diff --git a/google/cloud/language/v1/samples/language_syntax_gcs.yaml b/google/cloud/language/v1/samples/language_syntax_gcs.yaml new file mode 100644 index 000000000..58ae881ad --- /dev/null +++ b/google/cloud/language/v1/samples/language_syntax_gcs.yaml @@ -0,0 +1,69 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 +samples: +- region_tag: language_syntax_gcs + title: Analyzing Syntax (GCS) + description: Analyzing Syntax in text file stored in Cloud Storage + service: google.cloud.language.v1.LanguageService + rpc: AnalyzeSyntax + request: + - field: document.gcs_content_uri + value: gs://cloud-samples-data/language/syntax-sentence.txt + comment: | + Google Cloud Storage URI where the file content is located. + e.g. gs://[Your Bucket]/[Path to File] + input_parameter: gcs_content_uri + - field: document.type + value: PLAIN_TEXT + comment: "Available types: PLAIN_TEXT, HTML" + - field: document.language + value: en + comment: | + Optional. If not specified, the language is automatically detected. + For list of supported languages: + https://cloud.google.com/natural-language/docs/languages + - field: encoding_type + value: UTF8 + comment: "Available values: NONE, UTF8, UTF16, UTF32" + response: + - comment: ["Loop through tokens returned from the API"] + - loop: + collection: $resp.tokens + variable: token + body: + - comment: ["Get the text content of this token. Usually a word or punctuation."] + - define: text = token.text + - print: ["Token text: %s", text.content] + - print: ["Location of this token in overall document: %s", text.begin_offset] + - comment: + - | + Get the part of speech information for this token. + Parts of spech are as defined in: + http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf + - define: part_of_speech = token.part_of_speech + - comment: ["Get the tag, e.g. NOUN, ADJ for Adjective, et al."] + - print: ["Part of Speech tag: %s", part_of_speech.tag] + - comment: ["Get the voice, e.g. ACTIVE or PASSIVE"] + - print: ["Voice: %s", part_of_speech.voice] + - comment: ["Get the tense, e.g. PAST, FUTURE, PRESENT, et al."] + - print: ["Tense: %s", part_of_speech.tense] + - comment: ["See API reference for additional Part of Speech information available"] + - comment: + - | + Get the lemma of the token. Wikipedia lemma description + https://en.wikipedia.org/wiki/Lemma_(morphology) + - print: ["Lemma: %s", token.lemma] + - comment: + - | + Get the dependency tree parse information for this token. + For more information on dependency labels: + http://www.aclweb.org/anthology/P13-2017 + - define: dependency_edge = token.dependency_edge + - print: ["Head token index: %s", dependency_edge.head_token_index] + - print: ["Label: %s", dependency_edge.label] + - comment: + - | + Get the language of the text, which will be the same as + the language specified in the request or, if not specified, + the automatically-detected language. + - print: ["Language of the text: %s", $resp.language] diff --git a/google/cloud/language/v1/samples/language_syntax_text.yaml b/google/cloud/language/v1/samples/language_syntax_text.yaml new file mode 100644 index 000000000..0e7de5bcd --- /dev/null +++ b/google/cloud/language/v1/samples/language_syntax_text.yaml @@ -0,0 +1,67 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 +samples: +- region_tag: language_syntax_text + title: Analyzing Syntax + description: Analyzing Syntax in a String + service: google.cloud.language.v1.LanguageService + rpc: AnalyzeSyntax + request: + - field: document.content + value: "This is a short sentence." + comment: The text content to analyze + input_parameter: text_content + - field: document.type + value: PLAIN_TEXT + comment: "Available types: PLAIN_TEXT, HTML" + - field: document.language + value: en + comment: | + Optional. If not specified, the language is automatically detected. + For list of supported languages: + https://cloud.google.com/natural-language/docs/languages + - field: encoding_type + value: UTF8 + comment: "Available values: NONE, UTF8, UTF16, UTF32" + response: + - comment: ["Loop through tokens returned from the API"] + - loop: + collection: $resp.tokens + variable: token + body: + - comment: ["Get the text content of this token. Usually a word or punctuation."] + - define: text = token.text + - print: ["Token text: %s", text.content] + - print: ["Location of this token in overall document: %s", text.begin_offset] + - comment: + - | + Get the part of speech information for this token. + Parts of spech are as defined in: + http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf + - define: part_of_speech = token.part_of_speech + - comment: ["Get the tag, e.g. NOUN, ADJ for Adjective, et al."] + - print: ["Part of Speech tag: %s", part_of_speech.tag] + - comment: ["Get the voice, e.g. ACTIVE or PASSIVE"] + - print: ["Voice: %s", part_of_speech.voice] + - comment: ["Get the tense, e.g. PAST, FUTURE, PRESENT, et al."] + - print: ["Tense: %s", part_of_speech.tense] + - comment: ["See API reference for additional Part of Speech information available"] + - comment: + - | + Get the lemma of the token. Wikipedia lemma description + https://en.wikipedia.org/wiki/Lemma_(morphology) + - print: ["Lemma: %s", token.lemma] + - comment: + - | + Get the dependency tree parse information for this token. + For more information on dependency labels: + http://www.aclweb.org/anthology/P13-2017 + - define: dependency_edge = token.dependency_edge + - print: ["Head token index: %s", dependency_edge.head_token_index] + - print: ["Label: %s", dependency_edge.label] + - comment: + - | + Get the language of the text, which will be the same as + the language specified in the request or, if not specified, + the automatically-detected language. + - print: ["Language of the text: %s", $resp.language] diff --git a/google/cloud/language/v1/samples/test/analyzing_entities.test.yaml b/google/cloud/language/v1/samples/test/analyzing_entities.test.yaml new file mode 100644 index 000000000..5fafd01ea --- /dev/null +++ b/google/cloud/language/v1/samples/test/analyzing_entities.test.yaml @@ -0,0 +1,101 @@ +type: test/samples +schema_version: 1 +test: + suites: + - name: "Analyzing Entities [code sample tests]" + cases: + + - name: language_entities_text - Analyzing the Entities of a text string (default value) + spec: + # Default value: "California is a state." + - call: {sample: language_entities_text} + - assert_contains: + - {literal: "Representative name for the entity: California"} + - {literal: "Entity type: LOCATION"} + - {literal: "Salience score:"} + - {literal: "wikipedia_url: https://en.wikipedia.org/wiki/California"} + - {literal: "mid: /m/01n7q"} + - {literal: "Mention text: California"} + - {literal: "Mention type: PROPER"} + - {literal: "Mention text: state"} + - {literal: "Mention type: COMMON"} + - {literal: "Language of the text: en"} + + - name: language_entities_text - Analyzing the Entities of a text string (*custom value*) + spec: + # Custom value: "Alice is a person. She lives in California." + - call: + sample: language_entities_text + params: + text_content: {literal: "Alice is a person. She lives in California."} + - assert_contains: + - {literal: "Representative name for the entity: Alice"} + - {literal: "Entity type: PERSON"} + - {literal: "Mention text: Alice"} + - {literal: "Mention type: PROPER"} + - {literal: "Mention text: person"} + - {literal: "Mention type: COMMON"} + - {literal: "Representative name for the entity: California"} + - {literal: "Entity type: LOCATION"} + - {literal: "wikipedia_url: https://en.wikipedia.org/wiki/California"} + - {literal: "mid: /m/01n7q"} + - {literal: "Language of the text: en"} + + - name: language_entities_text - Analyzing the Entities of a text string (*metadata attributes*) + spec: + # Try out some of the metadata attributes which should be available for dates, addresses, etc. + # In case fake (555) area code numbers don't work, using United States Naval Observatory number. + # Custom value: "I called 202-762-1401 on January 31, 2019 from 1600 Amphitheatre Parkway, Mountain View, CA." + - call: + sample: language_entities_text + params: + text_content: + literal: "I called 202-762-1401 on January 31, 2019 from 1600 Amphitheatre Parkway, Mountain View, CA." + # The results may change, but it's fair to say that at least one of the following types were detected: + - assert_contains_any: + - literal: "Entity type: DATE" + - literal: "Entity type: ADDRESS" + - literal: "Entity type: PHONE_NUMBER" + # Check that at least some of the supporting metadata for an entity was present in the response + - assert_contains_any: + - literal: "month: 1" + - literal: "day: 31" + - literal: "year: 2019" + - literal: "street_number: 1600" + - literal: "street_name: Amphitheatre Parkway" + - literal: "area_code: 202" + - literal: "number: 7621401" + + - name: language_entities_gcs - Analyzing the Entities of text file in GCS (default value) + spec: + # Default value: gs://cloud-samples-data/language/entity.txt + # => "California is a state." + - call: {sample: language_entities_gcs} + - assert_contains: + - {literal: "Representative name for the entity: California"} + - {literal: "Entity type: LOCATION"} + - {literal: "Salience score:"} + - {literal: "wikipedia_url: https://en.wikipedia.org/wiki/California"} + - {literal: "mid: /m/01n7q"} + - {literal: "Mention text: California"} + - {literal: "Mention type: PROPER"} + - {literal: "Mention text: state"} + - {literal: "Mention type: COMMON"} + - {literal: "Language of the text: en"} + + - name: language_entities_gcs - Analyzing the Entities of text file in GCS (*custom value*) + spec: + # Use different file: gs://cloud-samples-data/language/entity-sentiment.txt + # => "Grapes are good. Bananas are bad." + - call: + sample: language_entities_gcs + params: + gcs_content_uri: + literal: "gs://cloud-samples-data/language/entity-sentiment.txt" + - assert_contains: + - {literal: "Representative name for the entity: Grapes"} + - {literal: "Mention text: Grapes"} + - {literal: "Mention type: COMMON"} + - {literal: "Representative name for the entity: Bananas"} + - {literal: "Mention text: Bananas"} + - {literal: "Language of the text: en"} diff --git a/google/cloud/language/v1/samples/test/analyzing_entity_sentiment.test.yaml b/google/cloud/language/v1/samples/test/analyzing_entity_sentiment.test.yaml new file mode 100644 index 000000000..beb8fb4a8 --- /dev/null +++ b/google/cloud/language/v1/samples/test/analyzing_entity_sentiment.test.yaml @@ -0,0 +1,63 @@ +type: test/samples +schema_version: 1 +test: + suites: + - name: "Analyzing Entity Sentiment [code sample tests]" + cases: + + - name: language_entity_sentiment_text - Analyzing Entity Sentiment of a text string (default value) + spec: + # Default value: "Grapes are good. Bananas are bad." + - call: {sample: language_entity_sentiment_text} + - assert_contains: + - {literal: "Representative name for the entity: Grapes"} + - {literal: "Entity sentiment score: 0."} + - {literal: "Representative name for the entity: Bananas"} + - {literal: "Entity sentiment score: -0."} + - {literal: "Entity sentiment magnitude: 0."} + - {literal: "Language of the text: en"} + + - name: language_entity_sentiment_text - Analyzing Entity Sentiment of a text string (*custom value*) + spec: + # Custom value: "Grapes are actually not very good. But Bananas are great." + - call: + sample: language_entity_sentiment_text + params: + text_content: {literal: "Grapes are actually not very good. But Bananas are great."} + - assert_contains: + - {literal: "Representative name for the entity: Grapes"} + - {literal: "Entity sentiment score: -0."} + - {literal: "Representative name for the entity: Bananas"} + - {literal: "Entity sentiment score: 0."} + - {literal: "Entity sentiment magnitude: 0."} + - {literal: "Language of the text: en"} + + - name: language_entity_sentiment_gcs - Analyzing Entity Sentiment of text file in GCS (default value) + spec: + # Default value: gs://cloud-samples-data/language/entity-sentiment.txt + # => "Grapes are good. Bananas are bad." + - call: {sample: language_entity_sentiment_gcs} + - assert_contains: + - {literal: "Representative name for the entity: Grapes"} + - {literal: "Entity sentiment score: -0."} + - {literal: "Representative name for the entity: Bananas"} + - {literal: "Entity sentiment score: 0."} + - {literal: "Entity sentiment magnitude: 0."} + - {literal: "Language of the text: en"} + + - name: language_entity_sentiment_gcs - Analyzing Entity Sentiment of text file in GCS (*custom value*) + spec: + # Use different file: gs://cloud-samples-data/language/entity-sentiment-reverse.txt + # => "Grapes are actually not very good. But Bananas are great." + - call: + sample: language_entity_sentiment_gcs + params: + gcs_content_uri: + literal: "gs://cloud-samples-data/language/entity-sentiment-reverse.txt" + - assert_contains: + - {literal: "Representative name for the entity: Grapes"} + - {literal: "Entity sentiment score: -0."} + - {literal: "Representative name for the entity: Bananas"} + - {literal: "Entity sentiment score: 0."} + - {literal: "Entity sentiment magnitude: 0."} + - {literal: "Language of the text: en"} diff --git a/google/cloud/language/v1/samples/test/analyzing_sentiment.test.yaml b/google/cloud/language/v1/samples/test/analyzing_sentiment.test.yaml new file mode 100644 index 000000000..55b5fdcb2 --- /dev/null +++ b/google/cloud/language/v1/samples/test/analyzing_sentiment.test.yaml @@ -0,0 +1,74 @@ +type: test/samples +schema_version: 1 +test: + suites: + - name: "Analyzing Sentiment [code sample tests]" + cases: + + - name: language_sentiment_text - Analyzing the sentiment of a text string (default value) + spec: + # Default value: "I am so happy and joyful." + - call: {sample: language_sentiment_text} + - assert_contains: + - {literal: "Document sentiment score: 0."} + - {literal: "Document sentiment magnitude: 0."} + - {literal: "Sentence text: I am so happy and joyful."} + - {literal: "Sentence sentiment score: 0."} + - {literal: "Sentence sentiment magnitude: 0."} + - {literal: "Language of the text: en"} + # There should be no negative sentiment scores for this value. + - assert_not_contains: + - {literal: "Document sentiment score: -0."} + - {literal: "Sentence sentiment score: -0."} + + - name: language_sentiment_text - Analyzing the sentiment of a text string (*custom value*) + spec: + # Custom value: "I am very happy. I am angry and sad." + - call: + sample: language_sentiment_text + params: + text_content: {literal: "I am very happy. I am angry and sad."} + - assert_contains: + - {literal: "Sentence text: I am very happy"} + - {literal: "Sentence sentiment score: 0."} + - {literal: "Sentence text: I am angry and sad"} + - {literal: "Sentence sentiment score: -0."} + - {literal: "Language of the text: en"} + + - name: language_sentiment_gcs - Analyzing the sentiment of text file in GCS (default value) + spec: + # Default value: gs://cloud-samples-data/language/sentiment-positive.txt + # => "I am so happy and joyful." + - call: {sample: language_sentiment_gcs} + - assert_contains: + - {literal: "Document sentiment score: 0."} + - {literal: "Document sentiment magnitude: 0."} + - {literal: "Sentence text: I am so happy and joyful."} + - {literal: "Sentence sentiment score: 0."} + - {literal: "Sentence sentiment magnitude: 0."} + - {literal: "Language of the text: en"} + # There should be no negative sentiment scores for this value. + - assert_not_contains: + - {literal: "Document sentiment score: -0."} + - {literal: "Sentence sentiment score: -0."} + + - name: language_sentiment_gcs - Analyzing the sentiment of text file in GCS (*custom value*) + spec: + # Use different file: gs://cloud-samples-data/language/sentiment-negative.txt + # => "I am so sad and upset." + - call: + sample: language_sentiment_gcs + params: + gcs_content_uri: + literal: "gs://cloud-samples-data/language/sentiment-negative.txt" + - assert_contains: + - {literal: "Document sentiment score: -0."} + - {literal: "Document sentiment magnitude: 0."} + - {literal: "Sentence text: I am so sad and upset."} + - {literal: "Sentence sentiment score: -0."} + - {literal: "Sentence sentiment magnitude: 0."} + - {literal: "Language of the text: en"} + # There should be no positive sentiment scores for this value. + - assert_not_contains: + - {literal: "Document sentiment score: 0."} + - {literal: "Sentence sentiment score: 0."} diff --git a/google/cloud/language/v1/samples/test/analyzing_syntax.test.yaml b/google/cloud/language/v1/samples/test/analyzing_syntax.test.yaml new file mode 100644 index 000000000..e89d465c1 --- /dev/null +++ b/google/cloud/language/v1/samples/test/analyzing_syntax.test.yaml @@ -0,0 +1,72 @@ +type: test/samples +schema_version: 1 +test: + suites: + - name: "Analyzing Syntax [code sample tests]" + cases: + + - name: language_syntax_text - Analyzing the syntax of a text string (default value) + spec: + # Default value: "This is a short sentence." + - call: {sample: language_syntax_text} + - assert_contains: + - {literal: "Token text: is"} + - {literal: "Part of Speech tag: VERB"} + - {literal: "Tense: PRESENT"} + - {literal: "Lemma: be"} + - {literal: "Token text: short"} + - {literal: "Part of Speech tag: ADJ"} + - {literal: "Lemma: short"} + - {literal: "Language of the text: en"} + + - name: language_syntax_text - Analyzing the syntax of a text string (*custom value*) + spec: + # Custom value: "Alice runs. Bob ran." + - call: + sample: language_syntax_text + params: + text_content: {literal: "Alice runs. Bob ran."} + - assert_contains: + - {literal: "Token text: Alice"} + - {literal: "Location of this token in overall document: 0"} + - {literal: "Part of Speech tag: NOUN"} + - {literal: "Label: NSUBJ"} + - {literal: "Token text: runs"} + - {literal: "Part of Speech tag: VERB"} + - {literal: "Tense: PRESENT"} + - {literal: "Lemma: run"} + - {literal: "Token text: ran"} + - {literal: "Tense: PAST"} + - {literal: "Language of the text: en"} + + - name: language_syntax_gcs - Analyzing the syntax of text file in GCS (default value) + spec: + # Default value: gs://cloud-samples-data/language/syntax-sentence.txt + # => "This is a short sentence." + - call: {sample: language_syntax_gcs} + - assert_contains: + - {literal: "Token text: is"} + - {literal: "Part of Speech tag: VERB"} + - {literal: "Tense: PRESENT"} + - {literal: "Lemma: be"} + - {literal: "Token text: short"} + - {literal: "Part of Speech tag: ADJ"} + - {literal: "Lemma: short"} + - {literal: "Language of the text: en"} + + - name: language_syntax_gcs - Analyzing the syntax of text file in GCS (*custom value*) + spec: + # Use different file: gs://cloud-samples-data/language/hello.txt + # => "Hello, world!" + - call: + sample: language_syntax_gcs + params: + gcs_content_uri: + literal: "gs://cloud-samples-data/language/hello.txt" + - assert_contains: + - {literal: "Token text: Hello"} + - {literal: "Token text: World"} + - {literal: "Part of Speech tag: NOUN"} + - {literal: "Token text: !"} + - {literal: "Part of Speech tag: PUNCT"} + - {literal: "Language of the text: en"} diff --git a/google/cloud/language/v1/samples/test/classifying_content.test.yaml b/google/cloud/language/v1/samples/test/classifying_content.test.yaml new file mode 100644 index 000000000..5cfc76696 --- /dev/null +++ b/google/cloud/language/v1/samples/test/classifying_content.test.yaml @@ -0,0 +1,51 @@ +type: test/samples +schema_version: 1 +test: + suites: + - name: "Classifying Content [code sample tests]" + cases: + + - name: language_classify_text - Classifying Content of a text string (default value) + spec: + # Default value: "That actor on TV makes movies in Hollywood and also stars in a variety of popular new TV shows." + - call: {sample: language_classify_text} + - assert_contains_any: + - {literal: "TV"} + - {literal: "Movies"} + - {literal: "Entertainment"} + + - name: language_classify_text - Classifying Content of a text string (*custom value*) + spec: + # Custom value: "Let's drink coffee and eat bagels at a coffee shop. I want muffins, croisants, coffee and baked goods." + - call: + sample: language_classify_text + params: + text_content: {literal: "Let's drink coffee and eat bagels at a coffee shop. I want muffins, croisants, coffee and baked goods."} + - assert_contains_any: + - {literal: "Food"} + - {literal: "Drink"} + - {literal: "Coffee"} + + - name: language_classify_gcs - Classifying Content of text file in GCS (default value) + spec: + # Default value: gs://cloud-samples-data/language/classify-entertainment.txt + # => "This is about film and movies and television and acting and movie theatres and theatre and drama and entertainment and the arts." + - call: {sample: language_classify_gcs} + - assert_contains_any: + - {literal: "TV"} + - {literal: "Movies"} + - {literal: "Entertainment"} + + - name: language_classify_gcs - Classifying Content of text file in GCS (*custom value*) + spec: + # Use different file: gs://cloud-samples-data/language/android.txt + # => "Android is a mobile operating system developed by Google, based on the Linux kernel and..." + - call: + sample: language_classify_gcs + params: + gcs_content_uri: + literal: "gs://cloud-samples-data/language/android.txt" + - assert_contains_any: + - {literal: "Mobile"} + - {literal: "Phone"} + - {literal: "Internet"} diff --git a/google/cloud/language/v1beta1/language_gapic.yaml b/google/cloud/language/v1beta1/language_gapic.legacy.yaml similarity index 100% rename from google/cloud/language/v1beta1/language_gapic.yaml rename to google/cloud/language/v1beta1/language_gapic.legacy.yaml diff --git a/google/cloud/language/v1beta2/BUILD.bazel b/google/cloud/language/v1beta2/BUILD.bazel index 1ce9261d4..cb3e79e86 100644 --- a/google/cloud/language/v1beta2/BUILD.bazel +++ b/google/cloud/language/v1beta2/BUILD.bazel @@ -1,25 +1,33 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( name = "language_proto", - srcs = ["language_service.proto"], + srcs = [ + "language_service.proto", + ], deps = [ "//google/api:annotations_proto", - "//google/longrunning:operations_proto", - "//google/rpc:status_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "@com_google_protobuf//:timestamp_proto", ], ) proto_library_with_info( name = "language_proto_with_info", - deps = [":language_proto"], + deps = [ + ":language_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -27,17 +35,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "language_java_proto", deps = [":language_proto"], @@ -46,39 +50,40 @@ java_proto_library( java_grpc_library( name = "language_java_grpc", srcs = [":language_proto"], - deps = [":language_java_proto"] + _JAVA_GRPC_DEPS, + deps = [":language_java_proto"], ) java_gapic_library( name = "language_java_gapic", src = ":language_proto_with_info", gapic_yaml = "language_gapic.yaml", - service_yaml = "//google/cloud/language:language_v1beta2.yaml", - test_deps = [":language_java_grpc"], - deps = [":language_java_proto"] + _JAVA_GRPC_DEPS, + package = "google.cloud.language.v1beta2", + service_yaml = "language_v1beta2.yaml", + test_deps = [ + ":language_java_grpc", + ], + deps = [ + ":language_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, +java_gapic_test( + name = "language_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.language.v1beta2.LanguageServiceClientTest", + ], runtime_deps = [":language_java_gapic_test"], -) for test_name in [ - "com.google.cloud.language.v1beta2.LanguageServiceClientTest", -]] +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-language-v1beta2-java", - client_deps = [":language_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":language_java_gapic_test"], - grpc_deps = [":language_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":language_java_gapic", + ":language_java_grpc", ":language_java_proto", ":language_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -86,10 +91,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -99,18 +104,18 @@ go_proto_library( protos = [":language_proto"], deps = [ "//google/api:annotations_go_proto", - "//google/longrunning:longrunning_go_proto", - "//google/rpc:status_go_proto", ], ) go_gapic_library( name = "language_go_gapic", - src = ":language_proto_with_info", - gapic_yaml = "language_gapic.yaml", - importpath = "cloud.google.com/go/language/apiv1beta2", - service_yaml = "//google/cloud/language:language_v1beta2.yaml", - deps = [":language_go_proto"], + srcs = [":language_proto_with_info"], + grpc_service_config = "language_grpc_service_config.json", + importpath = "cloud.google.com/go/language/apiv1beta2;language", + service_yaml = "language_v1beta2.yaml", + deps = [ + ":language_go_proto", + ], ) go_test( @@ -120,13 +125,232 @@ go_test( importpath = "cloud.google.com/go/language/apiv1beta2", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-language-v1beta2-go", deps = [ ":language_go_gapic", - ":language_go_gapic_srcjar-smoke-test.srcjar", ":language_go_gapic_srcjar-test.srcjar", ":language_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "language_moved_proto", + srcs = [":language_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "language_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":language_moved_proto"], +) + +py_grpc_library( + name = "language_py_grpc", + srcs = [":language_moved_proto"], + deps = [":language_py_proto"], +) + +py_gapic_library( + name = "language_py_gapic", + src = ":language_proto_with_info", + gapic_yaml = "language_gapic.yaml", + package = "google.cloud.language.v1beta2", + service_yaml = "language_v1beta2.yaml", + deps = [ + ":language_py_grpc", + ":language_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "language-v1beta2-py", + deps = [ + ":language_py_gapic", + ":language_py_grpc", + ":language_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "language_php_proto", + deps = [":language_proto"], +) + +php_grpc_library( + name = "language_php_grpc", + srcs = [":language_proto"], + deps = [":language_php_proto"], +) + +php_gapic_library( + name = "language_php_gapic", + src = ":language_proto_with_info", + gapic_yaml = "language_gapic.yaml", + package = "google.cloud.language.v1beta2", + service_yaml = "language_v1beta2.yaml", + deps = [ + ":language_php_grpc", + ":language_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-language-v1beta2-php", + deps = [ + ":language_php_gapic", + ":language_php_grpc", + ":language_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "language_nodejs_gapic", + src = ":language_proto_with_info", + gapic_yaml = "language_gapic.yaml", + package = "google.cloud.language.v1beta2", + service_yaml = "language_v1beta2.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "language-v1beta2-nodejs", + deps = [ + ":language_nodejs_gapic", + ":language_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "language_ruby_proto", + deps = [":language_proto"], +) + +ruby_grpc_library( + name = "language_ruby_grpc", + srcs = [":language_proto"], + deps = [":language_ruby_proto"], +) + +ruby_gapic_library( + name = "language_ruby_gapic", + src = ":language_proto_with_info", + gapic_yaml = "language_gapic.yaml", + package = "google.cloud.language.v1beta2", + service_yaml = "language_v1beta2.yaml", + deps = [ + ":language_ruby_grpc", + ":language_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-language-v1beta2-ruby", + deps = [ + ":language_ruby_gapic", + ":language_ruby_grpc", + ":language_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "language_csharp_proto", + deps = [":language_proto"], +) + +csharp_grpc_library( + name = "language_csharp_grpc", + srcs = [":language_proto"], + deps = [":language_csharp_proto"], +) + +csharp_gapic_library( + name = "language_csharp_gapic", + src = ":language_proto_with_info", + gapic_yaml = "language_gapic.yaml", + package = "google.cloud.language.v1beta2", + service_yaml = "language_v1beta2.yaml", + deps = [ + ":language_csharp_grpc", + ":language_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-language-v1beta2-csharp", + deps = [ + ":language_csharp_gapic", + ":language_csharp_grpc", + ":language_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/language/v1beta2/language_gapic.legacy.yaml b/google/cloud/language/v1beta2/language_gapic.legacy.yaml new file mode 100644 index 000000000..7fcf68f14 --- /dev/null +++ b/google/cloud/language/v1beta2/language_gapic.legacy.yaml @@ -0,0 +1,109 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.language.v1beta2 + python: + package_name: google.cloud.language_v1beta2.gapic + go: + package_name: cloud.google.com/go/language/apiv1beta2 + csharp: + package_name: Google.Cloud.Language.V1Beta2 + ruby: + package_name: Google::Cloud::Language::V1beta2 + php: + package_name: Google\Cloud\Language\V1beta2 + nodejs: + package_name: language.v1beta2 + domain_layer_location: google-cloud +interfaces: +- name: google.cloud.language.v1beta2.LanguageService + smoke_test: + method: AnalyzeSentiment + init_fields: + - document.content="Hello, world!" + - document.type=PLAIN_TEXT + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: AnalyzeSentiment + flattening: + groups: + - parameters: + - document + required_fields: + - document + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 + - name: AnalyzeEntities + flattening: + groups: + - parameters: + - document + - encoding_type + required_fields: + - document + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 + - name: AnalyzeEntitySentiment + flattening: + groups: + - parameters: + - document + - encoding_type + required_fields: + - document + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 + - name: AnalyzeSyntax + flattening: + groups: + - parameters: + - document + - encoding_type + required_fields: + - document + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 + - name: ClassifyText + flattening: + groups: + - parameters: + - document + required_fields: + - document + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 + - name: AnnotateText + flattening: + groups: + - parameters: + - document + - features + - encoding_type + required_fields: + - document + - features + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 diff --git a/google/cloud/language/v1beta2/language_gapic.yaml b/google/cloud/language/v1beta2/language_gapic.yaml index 7fcf68f14..c1c1afd1b 100644 --- a/google/cloud/language/v1beta2/language_gapic.yaml +++ b/google/cloud/language/v1beta2/language_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.language.v1beta2 @@ -23,14 +23,6 @@ interfaces: init_fields: - document.content="Hello, world!" - document.type=PLAIN_TEXT - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -42,68 +34,20 @@ interfaces: total_timeout_millis: 600000 methods: - name: AnalyzeSentiment - flattening: - groups: - - parameters: - - document - required_fields: - - document retry_codes_name: idempotent retry_params_name: default - timeout_millis: 30000 - name: AnalyzeEntities - flattening: - groups: - - parameters: - - document - - encoding_type - required_fields: - - document retry_codes_name: idempotent retry_params_name: default - timeout_millis: 30000 - name: AnalyzeEntitySentiment - flattening: - groups: - - parameters: - - document - - encoding_type - required_fields: - - document retry_codes_name: idempotent retry_params_name: default - timeout_millis: 30000 - name: AnalyzeSyntax - flattening: - groups: - - parameters: - - document - - encoding_type - required_fields: - - document retry_codes_name: idempotent retry_params_name: default - timeout_millis: 30000 - name: ClassifyText - flattening: - groups: - - parameters: - - document - required_fields: - - document retry_codes_name: idempotent retry_params_name: default - timeout_millis: 30000 - name: AnnotateText - flattening: - groups: - - parameters: - - document - - features - - encoding_type - required_fields: - - document - - features retry_codes_name: idempotent retry_params_name: default - timeout_millis: 30000 diff --git a/google/cloud/language/v1beta2/language_grpc_service_config.json b/google/cloud/language/v1beta2/language_grpc_service_config.json new file mode 100755 index 000000000..13406d73d --- /dev/null +++ b/google/cloud/language/v1beta2/language_grpc_service_config.json @@ -0,0 +1,42 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.language.v1beta2.LanguageService", + "method": "AnalyzeSentiment" + }, + { + "service": "google.cloud.language.v1beta2.LanguageService", + "method": "AnalyzeEntities" + }, + { + "service": "google.cloud.language.v1beta2.LanguageService", + "method": "AnalyzeEntitySentiment" + }, + { + "service": "google.cloud.language.v1beta2.LanguageService", + "method": "AnalyzeSyntax" + }, + { + "service": "google.cloud.language.v1beta2.LanguageService", + "method": "ClassifyText" + }, + { + "service": "google.cloud.language.v1beta2.LanguageService", + "method": "AnnotateText" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} \ No newline at end of file diff --git a/google/cloud/language/v1beta2/language_service.proto b/google/cloud/language/v1beta2/language_service.proto index 0263be04a..afca1205c 100644 --- a/google/cloud/language/v1beta2/language_service.proto +++ b/google/cloud/language/v1beta2/language_service.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.language.v1beta2; import "google/api/annotations.proto"; -import "google/longrunning/operations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/language/v1beta2;language"; option java_multiple_files = true; @@ -29,46 +30,54 @@ option java_package = "com.google.cloud.language.v1beta2"; // Provides text analysis operations such as sentiment analysis and entity // recognition. service LanguageService { + option (google.api.default_host) = "language.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-language," + "https://www.googleapis.com/auth/cloud-platform"; + // Analyzes the sentiment of the provided text. - rpc AnalyzeSentiment(AnalyzeSentimentRequest) - returns (AnalyzeSentimentResponse) { + rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) { option (google.api.http) = { post: "/v1beta2/documents:analyzeSentiment" body: "*" }; + option (google.api.method_signature) = "document,encoding_type"; + option (google.api.method_signature) = "document"; } // Finds named entities (currently proper names and common nouns) in the text // along with entity types, salience, mentions for each entity, and // other properties. - rpc AnalyzeEntities(AnalyzeEntitiesRequest) - returns (AnalyzeEntitiesResponse) { + rpc AnalyzeEntities(AnalyzeEntitiesRequest) returns (AnalyzeEntitiesResponse) { option (google.api.http) = { post: "/v1beta2/documents:analyzeEntities" body: "*" }; + option (google.api.method_signature) = "document,encoding_type"; + option (google.api.method_signature) = "document"; } - // Finds entities, similar to - // [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] - // in the text and analyzes sentiment associated with each entity and its - // mentions. - rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) - returns (AnalyzeEntitySentimentResponse) { + // Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes + // sentiment associated with each entity and its mentions. + rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) returns (AnalyzeEntitySentimentResponse) { option (google.api.http) = { post: "/v1beta2/documents:analyzeEntitySentiment" body: "*" }; + option (google.api.method_signature) = "document,encoding_type"; + option (google.api.method_signature) = "document"; } // Analyzes the syntax of the text and provides sentence boundaries and - // tokenization along with part of speech tags, dependency trees, and other + // tokenization along with part-of-speech tags, dependency trees, and other // properties. rpc AnalyzeSyntax(AnalyzeSyntaxRequest) returns (AnalyzeSyntaxResponse) { option (google.api.http) = { post: "/v1beta2/documents:analyzeSyntax" body: "*" }; + option (google.api.method_signature) = "document,encoding_type"; + option (google.api.method_signature) = "document"; } // Classifies a document into categories. @@ -77,6 +86,7 @@ service LanguageService { post: "/v1beta2/documents:classifyText" body: "*" }; + option (google.api.method_signature) = "document"; } // A convenience method that provides all syntax, sentiment, entity, and @@ -86,6 +96,8 @@ service LanguageService { post: "/v1beta2/documents:annotateText" body: "*" }; + option (google.api.method_signature) = "document,features,encoding_type"; + option (google.api.method_signature) = "document,features"; } } @@ -113,6 +125,7 @@ message Document { // Google Cloud Storage URI. oneof source { // The content of the input in string format. + // Cloud audit logging exempt since it is based on user data. string content = 2; // The Google Cloud Storage URI where the file content is located. @@ -125,11 +138,11 @@ message Document { // The language of the document (if not specified, the language is // automatically detected). Both ISO and BCP-47 language codes are // accepted.
- // [Language Support](/natural-language/docs/languages) - // lists currently supported languages for each API method. - // If the language (either specified by the caller or automatically detected) - // is not supported by the called API method, an `INVALID_ARGUMENT` error - // is returned. + // [Language + // Support](https://cloud.google.com/natural-language/docs/languages) lists + // currently supported languages for each API method. If the language (either + // specified by the caller or automatically detected) is not supported by the + // called API method, an `INVALID_ARGUMENT` error is returned. string language = 4; } @@ -139,8 +152,8 @@ message Sentence { TextSpan text = 1; // For calls to [AnalyzeSentiment][] or if - // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] - // is set to true, this field will contain the sentiment for the sentence. + // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to + // true, this field will contain the sentiment for the sentence. Sentiment sentiment = 2; } @@ -148,7 +161,10 @@ message Sentence { // a person, an organization, or location. The API associates information, such // as salience and mentions, with entities. message Entity { - // The type of the entity. + // The type of the entity. For most entity types, the associated metadata is a + // Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table + // below lists the associated fields for entities that have different + // metadata. enum Type { // Unknown UNKNOWN = 0; @@ -165,14 +181,63 @@ message Entity { // Event EVENT = 4; - // Work of art + // Artwork WORK_OF_ART = 5; - // Consumer goods + // Consumer product CONSUMER_GOOD = 6; - // Other types + // Other types of entities OTHER = 7; + + // Phone number + // + // The metadata lists the phone number, formatted according to local + // convention, plus whichever additional elements appear in the text: + // + // * `number` - the actual number, broken down into sections as per local + // convention + // * `national_prefix` - country code, if detected + // * `area_code` - region or area code, if detected + // * `extension` - phone extension (to be dialed after connection), if + // detected + PHONE_NUMBER = 9; + + // Address + // + // The metadata identifies the street number and locality plus whichever + // additional elements appear in the text: + // + // * `street_number` - street number + // * `locality` - city or town + // * `street_name` - street/route name, if detected + // * `postal_code` - postal code, if detected + // * `country` - country, if detected< + // * `broad_region` - administrative area, such as the state, if detected + // * `narrow_region` - smaller administrative area, such as county, if + // detected + // * `sublocality` - used in Asian addresses to demark a district within a + // city, if detected + ADDRESS = 10; + + // Date + // + // The metadata identifies the components of the date: + // + // * `year` - four digit year, if detected + // * `month` - two digit month number, if detected + // * `day` - two digit day number, if detected + DATE = 11; + + // Number + // + // The metadata is the number itself. + NUMBER = 12; + + // Price + // + // The metadata identifies the `value` and `currency`. + PRICE = 13; } // The representative name for the entity. @@ -183,8 +248,9 @@ message Entity { // Metadata associated with the entity. // - // Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if - // available. The associated keys are "wikipedia_url" and "mid", respectively. + // For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + // and Knowledge Graph MID (`mid`), if they are available. For the metadata + // associated with other entity types, see the Type table below. map metadata = 3; // The salience score associated with the entity in the [0, 1.0] range. @@ -200,9 +266,9 @@ message Entity { repeated EntityMention mentions = 5; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] - // is set to true, this field will contain the aggregate sentiment expressed - // for this entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + // true, this field will contain the aggregate sentiment expressed for this + // entity in the provided document. Sentiment sentiment = 6; } @@ -221,8 +287,35 @@ message Token { string lemma = 4; } +// Represents the text encoding that the caller uses to process the output. +// Providing an `EncodingType` is recommended because the API provides the +// beginning offsets for various outputs, such as tokens and mentions, and +// languages that natively use different text encodings may access offsets +// differently. +enum EncodingType { + // If `EncodingType` is not specified, encoding-dependent information (such as + // `begin_offset`) will be set at `-1`. + NONE = 0; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-8 encoding of the input. C++ and Go are examples of languages + // that use this encoding natively. + UTF8 = 1; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-16 encoding of the input. Java and JavaScript are examples of + // languages that use this encoding natively. + UTF16 = 2; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-32 encoding of the input. Python is an example of a language + // that uses this encoding natively. + UTF32 = 3; +} + // Represents the feeling associated with the entire text or entities in // the text. +// Next ID: 6 message Sentiment { // A non-negative number in the [0, +inf) range, which represents // the absolute magnitude of sentiment regardless of score (positive or @@ -849,9 +942,9 @@ message EntityMention { Type type = 2; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] - // is set to true, this field will contain the sentiment expressed for this - // mention of the entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + // true, this field will contain the sentiment expressed for this mention of + // the entity in the provided document. Sentiment sentiment = 3; } @@ -861,15 +954,14 @@ message TextSpan { string content = 1; // The API calculates the beginning offset of the content in the original - // document according to the - // [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the - // API request. + // document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request. int32 begin_offset = 2; } // Represents a category returned from the text classifier. message ClassificationCategory { - // The name of the category representing the document. + // The name of the category representing the document, from the [predefined + // taxonomy](https://cloud.google.com/natural-language/docs/categories). string name = 1; // The classifier's confidence of the category. Number represents how certain @@ -879,8 +971,8 @@ message ClassificationCategory { // The sentiment analysis request message. message AnalyzeSentimentRequest { - // Input document. - Document document = 1; + // Required. Input document. + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate sentence offsets for the // sentence sentiment. @@ -894,8 +986,7 @@ message AnalyzeSentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] - // field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. string language = 2; // The sentiment for all the sentences in the document. @@ -904,8 +995,8 @@ message AnalyzeSentimentResponse { // The entity-level sentiment analysis request message. message AnalyzeEntitySentimentRequest { - // Input document. - Document document = 1; + // Required. Input document. + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 2; @@ -918,15 +1009,14 @@ message AnalyzeEntitySentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] - // field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. string language = 2; } // The entity analysis request message. message AnalyzeEntitiesRequest { - // Input document. - Document document = 1; + // Required. Input document. + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 2; @@ -939,15 +1029,14 @@ message AnalyzeEntitiesResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] - // field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. string language = 2; } // The syntax analysis request message. message AnalyzeSyntaxRequest { - // Input document. - Document document = 1; + // Required. Input document. + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 2; @@ -963,15 +1052,14 @@ message AnalyzeSyntaxResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] - // field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. string language = 3; } // The document classification request message. message ClassifyTextRequest { - // Input document. - Document document = 1; + // Required. Input document. + Document document = 1 [(google.api.field_behavior) = REQUIRED]; } // The document classification response message. @@ -985,6 +1073,7 @@ message ClassifyTextResponse { message AnnotateTextRequest { // All available features for sentiment, syntax, and semantic analysis. // Setting each one to true will enable that specific analysis for the input. + // Next ID: 10 message Features { // Extract syntax information. bool extract_syntax = 1; @@ -998,15 +1087,18 @@ message AnnotateTextRequest { // Extract entities and their associated sentiment. bool extract_entity_sentiment = 4; - // Classify the full document into categories. + // Classify the full document into categories. If this is true, + // the API will use the default model which classifies into a + // [predefined + // taxonomy](https://cloud.google.com/natural-language/docs/categories). bool classify_text = 6; } - // Input document. - Document document = 1; + // Required. Input document. + Document document = 1 [(google.api.field_behavior) = REQUIRED]; - // The enabled features. - Features features = 2; + // Required. The enabled features. + Features features = 2 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 3; @@ -1034,36 +1126,9 @@ message AnnotateTextResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] - // field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. string language = 5; // Categories identified in the input document. repeated ClassificationCategory categories = 6; } - -// Represents the text encoding that the caller uses to process the output. -// Providing an `EncodingType` is recommended because the API provides the -// beginning offsets for various outputs, such as tokens and mentions, and -// languages that natively use different text encodings may access offsets -// differently. -enum EncodingType { - // If `EncodingType` is not specified, encoding-dependent information (such as - // `begin_offset`) will be set at `-1`. - NONE = 0; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-8 encoding of the input. C++ and Go are examples of languages - // that use this encoding natively. - UTF8 = 1; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-16 encoding of the input. Java and Javascript are examples of - // languages that use this encoding natively. - UTF16 = 2; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-32 encoding of the input. Python is an example of a language - // that uses this encoding natively. - UTF32 = 3; -} diff --git a/google/cloud/language/v1beta2/language_v1beta2.yaml b/google/cloud/language/v1beta2/language_v1beta2.yaml new file mode 100644 index 000000000..bb383eb0a --- /dev/null +++ b/google/cloud/language/v1beta2/language_v1beta2.yaml @@ -0,0 +1,21 @@ +type: google.api.Service +config_version: 3 +name: language.googleapis.com +title: Cloud Natural Language API + +apis: +- name: google.cloud.language.v1beta2.LanguageService + +documentation: + summary: |- + Provides natural language understanding technologies, such as sentiment + analysis, entity recognition, entity sentiment analysis, and other text + annotations, to developers. + +authentication: + rules: + - selector: 'google.cloud.language.v1beta2.LanguageService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-language, + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/managedidentities/v1/BUILD.bazel b/google/cloud/managedidentities/v1/BUILD.bazel new file mode 100644 index 000000000..f6d9664cc --- /dev/null +++ b/google/cloud/managedidentities/v1/BUILD.bazel @@ -0,0 +1,368 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "managedidentities_proto", + srcs = [ + "managed_identities_service.proto", + "resource.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "managedidentities_proto_with_info", + deps = [ + ":managedidentities_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "managedidentities_java_proto", + deps = [":managedidentities_proto"], +) + +java_grpc_library( + name = "managedidentities_java_grpc", + srcs = [":managedidentities_proto"], + deps = [":managedidentities_java_proto"], +) + +java_gapic_library( + name = "managedidentities_java_gapic", + src = ":managedidentities_proto_with_info", + gapic_yaml = "managedidentities_gapic.yaml", + package = "google.cloud.managedidentities.v1", + service_yaml = "managedidentities_v1.yaml", + test_deps = [ + ":managedidentities_java_grpc", + ], + deps = [ + ":managedidentities_java_proto", + ], +) + +java_gapic_test( + name = "managedidentities_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.managedidentities.v1.ManagedIdentitiesServiceClientTest", + ], + runtime_deps = [":managedidentities_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-managedidentities-v1-java", + deps = [ + ":managedidentities_java_gapic", + ":managedidentities_java_grpc", + ":managedidentities_java_proto", + ":managedidentities_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "managedidentities_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/managedidentities/v1", + protos = [":managedidentities_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "managedidentities_go_gapic", + srcs = [":managedidentities_proto_with_info"], + grpc_service_config = "managedidentities_grpc_service_config.json", + importpath = "cloud.google.com/go/managedidentities/apiv1;managedidentities", + service_yaml = "managedidentities_v1.yaml", + deps = [ + ":managedidentities_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + ], +) + +go_test( + name = "managedidentities_go_gapic_test", + srcs = [":managedidentities_go_gapic_srcjar_test"], + embed = [":managedidentities_go_gapic"], + importpath = "cloud.google.com/go/managedidentities/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-managedidentities-v1-go", + deps = [ + ":managedidentities_go_gapic", + ":managedidentities_go_gapic_srcjar-test.srcjar", + ":managedidentities_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "managedidentities_moved_proto", + srcs = [":managedidentities_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "managedidentities_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":managedidentities_moved_proto"], +) + +py_grpc_library( + name = "managedidentities_py_grpc", + srcs = [":managedidentities_moved_proto"], + deps = [":managedidentities_py_proto"], +) + +py_gapic_library( + name = "managedidentities_py_gapic", + src = ":managedidentities_proto_with_info", + gapic_yaml = "managedidentities_gapic.yaml", + package = "google.cloud.managedidentities.v1", + service_yaml = "managedidentities_v1.yaml", + deps = [ + ":managedidentities_py_grpc", + ":managedidentities_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "managedidentities-v1-py", + deps = [ + ":managedidentities_py_gapic", + ":managedidentities_py_grpc", + ":managedidentities_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "managedidentities_php_proto", + deps = [":managedidentities_proto"], +) + +php_grpc_library( + name = "managedidentities_php_grpc", + srcs = [":managedidentities_proto"], + deps = [":managedidentities_php_proto"], +) + +php_gapic_library( + name = "managedidentities_php_gapic", + src = ":managedidentities_proto_with_info", + gapic_yaml = "managedidentities_gapic.yaml", + package = "google.cloud.managedidentities.v1", + service_yaml = "managedidentities_v1.yaml", + deps = [ + ":managedidentities_php_grpc", + ":managedidentities_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-managedidentities-v1-php", + deps = [ + ":managedidentities_php_gapic", + ":managedidentities_php_grpc", + ":managedidentities_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "managedidentities_nodejs_gapic", + src = ":managedidentities_proto_with_info", + gapic_yaml = "managedidentities_gapic.yaml", + package = "google.cloud.managedidentities.v1", + service_yaml = "managedidentities_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "managedidentities-v1-nodejs", + deps = [ + ":managedidentities_nodejs_gapic", + ":managedidentities_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "managedidentities_ruby_proto", + deps = [":managedidentities_proto"], +) + +ruby_grpc_library( + name = "managedidentities_ruby_grpc", + srcs = [":managedidentities_proto"], + deps = [":managedidentities_ruby_proto"], +) + +ruby_gapic_library( + name = "managedidentities_ruby_gapic", + src = ":managedidentities_proto_with_info", + gapic_yaml = "managedidentities_gapic.yaml", + package = "google.cloud.managedidentities.v1", + service_yaml = "managedidentities_v1.yaml", + deps = [ + ":managedidentities_ruby_grpc", + ":managedidentities_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-managedidentities-v1-ruby", + deps = [ + ":managedidentities_ruby_gapic", + ":managedidentities_ruby_grpc", + ":managedidentities_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "managedidentities_csharp_proto", + deps = [":managedidentities_proto"], +) + +csharp_grpc_library( + name = "managedidentities_csharp_grpc", + srcs = [":managedidentities_proto"], + deps = [":managedidentities_csharp_proto"], +) + +csharp_gapic_library( + name = "managedidentities_csharp_gapic", + src = ":managedidentities_proto_with_info", + gapic_yaml = "managedidentities_gapic.yaml", + package = "google.cloud.managedidentities.v1", + service_yaml = "managedidentities_v1.yaml", + deps = [ + ":managedidentities_csharp_grpc", + ":managedidentities_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-managedidentities-v1-csharp", + deps = [ + ":managedidentities_csharp_gapic", + ":managedidentities_csharp_grpc", + ":managedidentities_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/managedidentities/v1/artman_managedidentities_v1.yaml b/google/cloud/managedidentities/v1/artman_managedidentities_v1.yaml new file mode 100644 index 000000000..baab530ed --- /dev/null +++ b/google/cloud/managedidentities/v1/artman_managedidentities_v1.yaml @@ -0,0 +1,35 @@ +common: + api_name: managedidentities + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - . + service_yaml: managedidentities_v1.yaml + gapic_yaml: managedidentities_gapic.yaml + proto_package: google.cloud.managedidentities.v1 +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: php_gapic + type: GAPIC + language: PHP +- name: go_gapic + type: GAPIC + language: GO +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: csharp_gapic + type: GAPIC + language: CSHARP diff --git a/google/cloud/managedidentities/v1/managed_identities_service.proto b/google/cloud/managedidentities/v1/managed_identities_service.proto new file mode 100644 index 000000000..06ffa3f38 --- /dev/null +++ b/google/cloud/managedidentities/v1/managed_identities_service.proto @@ -0,0 +1,421 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.managedidentities.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/managedidentities/v1/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ManagedIdentities.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/managedidentities/v1;managedidentities"; +option java_multiple_files = true; +option java_outer_classname = "ManagedIdentitiesServiceProto"; +option java_package = "com.google.cloud.managedidentities.v1"; +option objc_class_prefix = "GCMI"; +option php_namespace = "Google\\Cloud\\ManagedIdentities\\V1"; + +// ## API Overview +// +// The `managedidentites.googleapis.com` service implements the Google Cloud +// Managed Identites API for identity services +// (e.g. Microsoft Active Directory). +// +// The Managed Identities service provides methods to manage +// (create/read/update/delete) domains, reset managed identities admin password, +// add/remove domain controllers in GCP regions and add/remove VPC peering. +// +// ## Data Model +// +// The Managed Identities service exposes the following resources: +// +// * Locations as global, named as follows: +// `projects/{project_id}/locations/global`. +// +// * Domains, named as follows: +// `/projects/{project_id}/locations/global/domain/{domain_name}`. +// +// The `{domain_name}` refers to fully qualified domain name in the customer +// project e.g. mydomain.myorganization.com, with the following restrictions: +// +// * Must contain only lowercase letters, numbers, periods and hyphens. +// * Must start with a letter. +// * Must contain between 2-64 characters. +// * Must end with a number or a letter. +// * Must not start with period. +// * First segement length (mydomain form example above) shouldn't exceed +// 15 chars. +// * The last segment cannot be fully numeric. +// * Must be unique within the customer project. +service ManagedIdentitiesService { + option (google.api.default_host) = "managedidentities.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a Microsoft AD domain. + rpc CreateMicrosoftAdDomain(CreateMicrosoftAdDomainRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/global}/domains" + body: "domain" + }; + option (google.api.method_signature) = "parent,domain_name,domain"; + option (google.longrunning.operation_info) = { + response_type: "Domain" + metadata_type: "OpMetadata" + }; + } + + // Resets a domain's administrator password. + rpc ResetAdminPassword(ResetAdminPasswordRequest) returns (ResetAdminPasswordResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/global/domains/*}:resetAdminPassword" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lists domains in a project. + rpc ListDomains(ListDomainsRequest) returns (ListDomainsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/global}/domains" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets information about a domain. + rpc GetDomain(GetDomainRequest) returns (Domain) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/global/domains/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the metadata and configuration of a domain. + rpc UpdateDomain(UpdateDomainRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{domain.name=projects/*/locations/global/domains/*}" + body: "domain" + }; + option (google.api.method_signature) = "domain,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Domain" + metadata_type: "OpMetadata" + }; + } + + // Deletes a domain. + rpc DeleteDomain(DeleteDomainRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/global/domains/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OpMetadata" + }; + } + + // Adds an AD trust to a domain. + rpc AttachTrust(AttachTrustRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/global/domains/*}:attachTrust" + body: "*" + }; + option (google.api.method_signature) = "name,trust"; + option (google.longrunning.operation_info) = { + response_type: "Domain" + metadata_type: "OpMetadata" + }; + } + + // Updates the DNS conditional forwarder. + rpc ReconfigureTrust(ReconfigureTrustRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/global/domains/*}:reconfigureTrust" + body: "*" + }; + option (google.api.method_signature) = "name,target_domain_name,target_dns_ip_addresses"; + option (google.longrunning.operation_info) = { + response_type: "Domain" + metadata_type: "OpMetadata" + }; + } + + // Removes an AD trust. + rpc DetachTrust(DetachTrustRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/global/domains/*}:detachTrust" + body: "*" + }; + option (google.api.method_signature) = "name,trust"; + option (google.longrunning.operation_info) = { + response_type: "Domain" + metadata_type: "OpMetadata" + }; + } + + // Validates a trust state, that the target domain is reachable, and that the + // target domain is able to accept incoming trust requests. + rpc ValidateTrust(ValidateTrustRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/global/domains/*}:validateTrust" + body: "*" + }; + option (google.api.method_signature) = "name,trust"; + option (google.longrunning.operation_info) = { + response_type: "Domain" + metadata_type: "OpMetadata" + }; + } +} + +// Represents the metadata of the long-running operation. +message OpMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for +// [CreateMicrosoftAdDomain][google.cloud.managedidentities.v1.CreateMicrosoftAdDomain] +message CreateMicrosoftAdDomainRequest { + // Required. The resource project name and location using the form: + // `projects/{project_id}/locations/global` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "managedidentities.googleapis.com/Domain" + } + ]; + + // Required. The fully qualified domain name. + // e.g. mydomain.myorganization.com, with the following restrictions: + // + // * Must contain only lowercase letters, numbers, periods and hyphens. + // * Must start with a letter. + // * Must contain between 2-64 characters. + // * Must end with a number or a letter. + // * Must not start with period. + // * First segement length (mydomain form example above) shouldn't exceed + // 15 chars. + // * The last segment cannot be fully numeric. + // * Must be unique within the customer project. + string domain_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A Managed Identity domain resource. + Domain domain = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [ResetAdminPassword][google.cloud.managedidentities.v1.ResetAdminPassword] +message ResetAdminPasswordRequest { + // Required. The domain resource name using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedidentities.googleapis.com/Domain" + } + ]; +} + +// Response message for +// [ResetAdminPassword][google.cloud.managedidentities.v1.ResetAdminPassword] +message ResetAdminPasswordResponse { + // A random password. See [admin][google.cloud.managedidentities.v1.Domain.admin] for more information. + string password = 1; +} + +// Request message for +// [ListDomains][google.cloud.managedidentities.v1.ListDomains] +message ListDomainsRequest { + // Required. The resource name of the domain location using the form: + // `projects/{project_id}/locations/global` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "managedidentities.googleapis.com/Domain" + } + ]; + + // Optional. The maximum number of items to return. + // If not specified, a default value of 1000 will be used. + // Regardless of the page_size value, the response may include a partial list. + // Callers should rely on a response's + // [next_page_token][google.cloud.managedidentities.v1.ListDomainsResponse.next_page_token] + // to determine if there are additional results to list. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `next_page_token` value returned from a previous ListDomainsRequest + // request, if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter specifying constraints of a list operation. + // For example, `Domain.fqdn="mydomain.myorginization"`. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the ordering of results. See + // [Sorting + // order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + // for more information. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [ListDomains][google.cloud.managedidentities.v1.ListDomains] +message ListDomainsResponse { + // A list of Managed Identities Service domains in the project. + repeated Domain domains = 1; + + // A token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // A list of locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for [GetDomain][google.cloud.managedidentities.v1.GetDomain] +message GetDomainRequest { + // Required. The domain resource name using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedidentities.googleapis.com/Domain" + } + ]; +} + +// Request message for +// [UpdateDomain][google.cloud.managedidentities.v1.UpdateDomain] +message UpdateDomainRequest { + // Required. Mask of fields to update. At least one path must be supplied in this + // field. The elements of the repeated paths field may only include + // fields from [Domain][google.cloud.managedidentities.v1.Domain]: + // * `labels` + // * `locations` + // * `authorized_networks` + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Domain message with updated fields. Only supported fields specified in + // update_mask are updated. + Domain domain = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [DeleteDomain][google.cloud.managedidentities.v1.DeleteDomain] +message DeleteDomainRequest { + // Required. The domain resource name using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedidentities.googleapis.com/Domain" + } + ]; +} + +// Request message for +// [AttachTrust][google.cloud.managedidentities.v1.AttachTrust] +message AttachTrustRequest { + // Required. The resource domain name, project name and location using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedidentities.googleapis.com/Domain" + } + ]; + + // Required. The domain trust resource. + Trust trust = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [ReconfigureTrust][google.cloud.managedidentities.v1.ReconfigureTrust] +message ReconfigureTrustRequest { + // Required. The resource domain name, project name and location using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedidentities.googleapis.com/Domain" + } + ]; + + // Required. The fully-qualified target domain name which will be in trust with current + // domain. + string target_domain_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The target DNS server IP addresses to resolve the remote domain involved + // in the trust. + repeated string target_dns_ip_addresses = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [DetachTrust][google.cloud.managedidentities.v1.DetachTrust] +message DetachTrustRequest { + // Required. The resource domain name, project name, and location using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedidentities.googleapis.com/Domain" + } + ]; + + // Required. The domain trust resource to removed. + Trust trust = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [ValidateTrust][google.cloud.managedidentities.v1.ValidateTrust] +message ValidateTrustRequest { + // Required. The resource domain name, project name, and location using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedidentities.googleapis.com/Domain" + } + ]; + + // Required. The domain trust to validate trust state for. + Trust trust = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/google/cloud/managedidentities/v1/managedidentities_gapic.yaml b/google/cloud/managedidentities/v1/managedidentities_gapic.yaml new file mode 100644 index 000000000..307c02c58 --- /dev/null +++ b/google/cloud/managedidentities/v1/managedidentities_gapic.yaml @@ -0,0 +1,18 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.managedidentities.v1 + python: + package_name: google.cloud.managedidentities_v1.gapic + go: + package_name: cloud.google.com/go/managedidentities/apiv1 + csharp: + package_name: Google.Cloud.ManagedIdentities.V1 + ruby: + package_name: Google::Cloud::ManagedIdentities::V1 + php: + package_name: Google\Cloud\ManagedIdentities\V1 + nodejs: + package_name: managedidentities.v1 diff --git a/google/cloud/managedidentities/v1/managedidentities_grpc_service_config.json b/google/cloud/managedidentities/v1/managedidentities_grpc_service_config.json new file mode 100644 index 000000000..53a941b01 --- /dev/null +++ b/google/cloud/managedidentities/v1/managedidentities_grpc_service_config.json @@ -0,0 +1,49 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "method": "CreateMicrosoftAdDomain" + }, + { + "service": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "method": "ResetAdminPassword" + }, + { + "service": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "method": "ListDomains" + }, + { + "service": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "method": "GetDomain" + }, + { + "service": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "method": "UpdateDomain" + }, + { + "service": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "method": "DeleteDomain" + }, + { + "service": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "method": "AttachTrust" + }, + { + "service": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "method": "ReconfigureTrust" + }, + { + "service": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "method": "DetachTrust" + }, + { + "service": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "method": "ValidateTrust" + } + ], + "timeout": "60s" + } + ] +} diff --git a/google/cloud/managedidentities/v1/managedidentities_v1.yaml b/google/cloud/managedidentities/v1/managedidentities_v1.yaml new file mode 100644 index 000000000..eac6504ab --- /dev/null +++ b/google/cloud/managedidentities/v1/managedidentities_v1.yaml @@ -0,0 +1,65 @@ +type: google.api.Service +config_version: 3 +name: managedidentities.googleapis.com +title: Managed Service for Microsoft Active Directory API + +apis: +- name: google.cloud.managedidentities.v1.ManagedIdentitiesService + +types: +- name: google.cloud.managedidentities.v1.OpMetadata + +documentation: + summary: |- + The Managed Service for Microsoft Active Directory API is used for managing + a highly available, hardened service running Microsoft Active Directory + (AD). + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + description: |- + Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + description: |- + Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and + PERMISSION_DENIED + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + description: |- + Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + +backend: + rules: + - selector: 'google.cloud.managedidentities.v1.ManagedIdentitiesService.*' + deadline: 60.0 + - selector: 'google.iam.v1.IAMPolicy.*' + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + - selector: google.longrunning.Operations.GetOperation + deadline: 5.0 + +authentication: + rules: + - selector: 'google.cloud.managedidentities.v1.ManagedIdentitiesService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.iam.v1.IAMPolicy.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/managedidentities/v1/resource.proto b/google/cloud/managedidentities/v1/resource.proto new file mode 100644 index 000000000..8fc5f9384 --- /dev/null +++ b/google/cloud/managedidentities/v1/resource.proto @@ -0,0 +1,211 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.managedidentities.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.ManagedIdentities.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/managedidentities/v1;managedidentities"; +option java_multiple_files = true; +option java_outer_classname = "ResourceProto"; +option java_package = "com.google.cloud.managedidentities.v1"; + +// Represents a managed Microsoft Active Directory domain. +message Domain { + option (google.api.resource) = { + type: "managedidentities.googleapis.com/Domain" + pattern: "projects/{project}/locations/{location}/domains/{domain}" + }; + + // Represents the different states of a managed domain. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The domain is being created. + CREATING = 1; + + // The domain has been created and is fully usable. + READY = 2; + + // The domain's configuration is being updated. + UPDATING = 3; + + // The domain is being deleted. + DELETING = 4; + + // The domain is being repaired and may be unusable. Details + // can be found in the `status_message` field. + REPAIRING = 5; + + // The domain is undergoing maintenance. + PERFORMING_MAINTENANCE = 6; + + // The domain is not serving requests. + UNAVAILABLE = 7; + } + + // Required. The unique name of the domain using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Resource labels that can contain user-provided metadata. + map labels = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The full names of the Google Compute Engine + // [networks](/compute/docs/networks-and-firewalls#networks) the domain + // instance is connected to. Networks can be added using UpdateDomain. + // The domain is only available on networks listed in `authorized_networks`. + // If CIDR subnets overlap between networks, domain creation will fail. + repeated string authorized_networks = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The CIDR range of internal addresses that are reserved for this + // domain. Reserved networks must be /24 or larger. Ranges must be + // unique and non-overlapping with existing subnets in + // [Domain].[authorized_networks]. + string reserved_ip_range = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Locations where domain needs to be provisioned. + // [regions][compute/docs/regions-zones/] + // e.g. us-west1 or us-east4 + // Service supports up to 4 locations at once. Each location will use a /26 + // block. + repeated string locations = 5 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The name of delegated administrator account used to perform + // Active Directory operations. If not specified, `setupadmin` will be used. + string admin = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The fully-qualified domain name of the exposed domain used by + // clients to connect to the service. Similar to what would be chosen for an + // Active Directory set up on an internal network. + string fqdn = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the instance was created. + google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update time. + google.protobuf.Timestamp update_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of this domain. + State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current status of this + // domain, if available. + string status_message = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current trusts associated with the domain. + repeated Trust trusts = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents a relationship between two domains. This allows a controller in +// one domain to authenticate a user in another domain. +message Trust { + // Represents the different states of a domain trust. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The domain trust is being created. + CREATING = 1; + + // The domain trust is being updated. + UPDATING = 2; + + // The domain trust is being deleted. + DELETING = 3; + + // The domain trust is connected. + CONNECTED = 4; + + // The domain trust is disconnected. + DISCONNECTED = 5; + } + + // Represents the different inter-forest trust types. + enum TrustType { + // Not set. + TRUST_TYPE_UNSPECIFIED = 0; + + // The forest trust. + FOREST = 1; + + // The external domain trust. + EXTERNAL = 2; + } + + // Represents the direction of trust. + // See + // [System.DirectoryServices.ActiveDirectory.TrustDirection](https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.activedirectory.trustdirection?view=netframework-4.7.2) + // for more information. + enum TrustDirection { + // Not set. + TRUST_DIRECTION_UNSPECIFIED = 0; + + // The inbound direction represents the trusting side. + INBOUND = 1; + + // The outboud direction represents the trusted side. + OUTBOUND = 2; + + // The bidirectional direction represents the trusted / trusting side. + BIDIRECTIONAL = 3; + } + + // Required. The fully qualified target domain name which will be in trust with the + // current domain. + string target_domain_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of trust represented by the trust resource. + TrustType trust_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The trust direction, which decides if the current domain is trusted, + // trusting, or both. + TrustDirection trust_direction = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The trust authentication type, which decides whether the trusted side has + // forest/domain wide access or selective access to an approved set of + // resources. + bool selective_authentication = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The target DNS server IP addresses which can resolve the remote domain + // involved in the trust. + repeated string target_dns_ip_addresses = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. The trust secret used for the handshake with the target domain. This will + // not be stored. + string trust_handshake_secret = 6 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The time the instance was created. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update time. + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the trust. + State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state of the trust, if available. + string state_description = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last heartbeat time when the trust was known to be connected. + google.protobuf.Timestamp last_trust_heartbeat_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/managedidentities/v1beta1/BUILD.bazel b/google/cloud/managedidentities/v1beta1/BUILD.bazel new file mode 100644 index 000000000..7d26d9b3d --- /dev/null +++ b/google/cloud/managedidentities/v1beta1/BUILD.bazel @@ -0,0 +1,366 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "managedidentities_proto", + srcs = [ + "managed_identities_service.proto", + "resource.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "managedidentities_proto_with_info", + deps = [ + ":managedidentities_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "managedidentities_java_proto", + deps = [":managedidentities_proto"], +) + +java_grpc_library( + name = "managedidentities_java_grpc", + srcs = [":managedidentities_proto"], + deps = [":managedidentities_java_proto"], +) + +java_gapic_library( + name = "managedidentities_java_gapic", + src = ":managedidentities_proto_with_info", + gapic_yaml = "managedidentities_gapic.yaml", + package = "google.cloud.managedidentities.v1beta1", + service_yaml = "managedidentities_v1beta1.yaml", + test_deps = [ + ":managedidentities_java_grpc", + ], + deps = [ + ":managedidentities_java_proto", + ], +) + +java_gapic_test( + name = "managedidentities_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.managedidentities.v1beta1.ManagedIdentitiesServiceClientTest", + ], + runtime_deps = [":managedidentities_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-managedidentities-v1beta1-java", + deps = [ + ":managedidentities_java_gapic", + ":managedidentities_java_grpc", + ":managedidentities_java_proto", + ":managedidentities_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "managedidentities_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/managedidentities/v1beta1", + protos = [":managedidentities_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "managedidentities_go_gapic", + srcs = [":managedidentities_proto_with_info"], + grpc_service_config = "", + importpath = "cloud.google.com/go/managedidentities/apiv1beta1;managedidentities", + service_yaml = "managedidentities_v1beta1.yaml", + deps = [ + ":managedidentities_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + ], +) + +go_test( + name = "managedidentities_go_gapic_test", + srcs = [":managedidentities_go_gapic_srcjar_test"], + embed = [":managedidentities_go_gapic"], + importpath = "cloud.google.com/go/managedidentities/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-managedidentities-v1beta1-go", + deps = [ + ":managedidentities_go_gapic", + ":managedidentities_go_gapic_srcjar-test.srcjar", + ":managedidentities_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "managedidentities_moved_proto", + srcs = [":managedidentities_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "managedidentities_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":managedidentities_moved_proto"], +) + +py_grpc_library( + name = "managedidentities_py_grpc", + srcs = [":managedidentities_moved_proto"], + deps = [":managedidentities_py_proto"], +) + +py_gapic_library( + name = "managedidentities_py_gapic", + src = ":managedidentities_proto_with_info", + gapic_yaml = "managedidentities_gapic.yaml", + package = "google.cloud.managedidentities.v1beta1", + service_yaml = "managedidentities_v1beta1.yaml", + deps = [ + ":managedidentities_py_grpc", + ":managedidentities_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "managedidentities-v1beta1-py", + deps = [ + ":managedidentities_py_gapic", + ":managedidentities_py_grpc", + ":managedidentities_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "managedidentities_php_proto", + deps = [":managedidentities_proto"], +) + +php_grpc_library( + name = "managedidentities_php_grpc", + srcs = [":managedidentities_proto"], + deps = [":managedidentities_php_proto"], +) + +php_gapic_library( + name = "managedidentities_php_gapic", + src = ":managedidentities_proto_with_info", + gapic_yaml = "managedidentities_gapic.yaml", + package = "google.cloud.managedidentities.v1beta1", + service_yaml = "managedidentities_v1beta1.yaml", + deps = [ + ":managedidentities_php_grpc", + ":managedidentities_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-managedidentities-v1beta1-php", + deps = [ + ":managedidentities_php_gapic", + ":managedidentities_php_grpc", + ":managedidentities_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "managedidentities_nodejs_gapic", + src = ":managedidentities_proto_with_info", + gapic_yaml = "managedidentities_gapic.yaml", + package = "google.cloud.managedidentities.v1beta1", + service_yaml = "managedidentities_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "managedidentities-v1beta1-nodejs", + deps = [ + ":managedidentities_nodejs_gapic", + ":managedidentities_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "managedidentities_ruby_proto", + deps = [":managedidentities_proto"], +) + +ruby_grpc_library( + name = "managedidentities_ruby_grpc", + srcs = [":managedidentities_proto"], + deps = [":managedidentities_ruby_proto"], +) + +ruby_gapic_library( + name = "managedidentities_ruby_gapic", + src = ":managedidentities_proto_with_info", + gapic_yaml = "managedidentities_gapic.yaml", + package = "google.cloud.managedidentities.v1beta1", + service_yaml = "managedidentities_v1beta1.yaml", + deps = [ + ":managedidentities_ruby_grpc", + ":managedidentities_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-managedidentities-v1beta1-ruby", + deps = [ + ":managedidentities_ruby_gapic", + ":managedidentities_ruby_grpc", + ":managedidentities_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "managedidentities_csharp_proto", + deps = [":managedidentities_proto"], +) + +csharp_grpc_library( + name = "managedidentities_csharp_grpc", + srcs = [":managedidentities_proto"], + deps = [":managedidentities_csharp_proto"], +) + +csharp_gapic_library( + name = "managedidentities_csharp_gapic", + src = ":managedidentities_proto_with_info", + gapic_yaml = "managedidentities_gapic.yaml", + package = "google.cloud.managedidentities.v1beta1", + service_yaml = "managedidentities_v1beta1.yaml", + deps = [ + ":managedidentities_csharp_grpc", + ":managedidentities_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-managedidentities-v1beta1-csharp", + deps = [ + ":managedidentities_csharp_gapic", + ":managedidentities_csharp_grpc", + ":managedidentities_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/managedidentities/v1beta1/artman_managedidentities_v1beta1.yaml b/google/cloud/managedidentities/v1beta1/artman_managedidentities_v1beta1.yaml new file mode 100644 index 000000000..3b1ef2d30 --- /dev/null +++ b/google/cloud/managedidentities/v1beta1/artman_managedidentities_v1beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: managedidentities + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - . + service_yaml: managedidentities_v1beta1.yaml + gapic_yaml: managedidentities_gapic.yaml +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: php_gapic + type: GAPIC + language: PHP +- name: go_gapic + type: GAPIC + language: GO +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: csharp_gapic + type: GAPIC + language: CSHARP diff --git a/google/cloud/managedidentities/v1beta1/managed_identities_service.proto b/google/cloud/managedidentities/v1beta1/managed_identities_service.proto new file mode 100644 index 000000000..e67e55e47 --- /dev/null +++ b/google/cloud/managedidentities/v1beta1/managed_identities_service.proto @@ -0,0 +1,332 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.managedidentities.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/managedidentities/v1beta1/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/client.proto"; + +option csharp_namespace = "Google.Cloud.ManagedIdentities.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/managedidentities/v1beta1;managedidentities"; +option java_multiple_files = true; +option java_outer_classname = "ManagedIdentitiesServiceProto"; +option java_package = "com.google.cloud.managedidentities.v1beta1"; +option objc_class_prefix = "GCMI"; +option php_namespace = "Google\\Cloud\\ManagedIdentities\\V1beta1"; + +service ManagedIdentitiesService { + option (google.api.default_host) = "managedidentities.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a Microsoft AD domain. + rpc CreateMicrosoftAdDomain(CreateMicrosoftAdDomainRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/global}/domains" + body: "domain" + }; + option (google.longrunning.operation_info) = { + response_type: "Domain" + metadata_type: "OpMetadata" + }; + } + + // Resets a domain's administrator password. + rpc ResetAdminPassword(ResetAdminPasswordRequest) returns (ResetAdminPasswordResponse) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/global/domains/*}:resetAdminPassword" + body: "*" + }; + } + + // Lists domains in a project. + rpc ListDomains(ListDomainsRequest) returns (ListDomainsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/global}/domains" + }; + } + + // Gets information about a domain. + rpc GetDomain(GetDomainRequest) returns (Domain) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/global/domains/*}" + }; + } + + // Updates the metadata and configuration of a domain. + rpc UpdateDomain(UpdateDomainRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{domain.name=projects/*/locations/global/domains/*}" + body: "domain" + }; + option (google.longrunning.operation_info) = { + response_type: "Domain" + metadata_type: "OpMetadata" + }; + } + + // Deletes a domain. + rpc DeleteDomain(DeleteDomainRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/global/domains/*}" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OpMetadata" + }; + } + + // Adds an AD trust to a domain. + rpc AttachTrust(AttachTrustRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/global/domains/*}:attachTrust" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Domain" + metadata_type: "OpMetadata" + }; + } + + // Updates the DNS conditional forwarder. + rpc ReconfigureTrust(ReconfigureTrustRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/global/domains/*}:reconfigureTrust" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Domain" + metadata_type: "OpMetadata" + }; + } + + // Removes an AD trust. + rpc DetachTrust(DetachTrustRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/global/domains/*}:detachTrust" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Domain" + metadata_type: "OpMetadata" + }; + } + + // Validates a trust state, that the target domain is reachable, and that the + // target domain is able to accept incoming trust requests. + rpc ValidateTrust(ValidateTrustRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/global/domains/*}:validateTrust" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Domain" + metadata_type: "OpMetadata" + }; + } +} + +// Represents the metadata of the long-running operation. +message OpMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for +// [CreateMicrosoftAdDomain][google.cloud.managedidentities.v1beta1.CreateMicrosoftAdDomain] +message CreateMicrosoftAdDomainRequest { + // The resource project name and location using the form: + // `projects/{project_id}/locations/global` + string parent = 1; + + // A domain name, e.g. mydomain.myorg.com, with the following restrictions: + // * Must contain only lowercase letters, numbers, periods and hyphens. + // * Must start with a letter. + // * Must contain between 2-64 characters. + // * Must end with a number or a letter. + // * Must not start with period. + // * First segement length (mydomain form example above) shouldn't exceed + // 15 chars. + // * The last segment cannot be fully numeric. + // * Must be unique within the customer project. + string domain_name = 2; + + // A Managed Identity domain resource. + Domain domain = 3; +} + +// Request message for +// [ResetAdminPassword][google.cloud.managedidentities.v1beta1.ResetAdminPassword] +message ResetAdminPasswordRequest { + // The domain resource name using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}` + string name = 1; +} + +// Response message for +// [ResetAdminPassword][google.cloud.managedidentities.v1beta1.ResetAdminPassword] +message ResetAdminPasswordResponse { + // A random password. See [admin][google.cloud.managedidentities.v1beta1.Domain.admin] for more information. + string password = 1; +} + +// Request message for +// [ListDomains][google.cloud.managedidentities.v1beta1.ListDomains] +message ListDomainsRequest { + // Required. The resource name of the domain location using the form: + // `projects/{project_id}/locations/global` + string parent = 1; + + // Optional. The maximum number of items to return. + // If not specified, a default value of 1000 will be used. + // Regardless of the page_size value, the response may include a partial list. + // Callers should rely on a response's + // [next_page_token][google.cloud.managedidentities.v1beta1.ListDomainsResponse.next_page_token] + // to determine if there are additional results to list. + int32 page_size = 2; + + // The `next_page_token` value returned from a previous ListDomainsRequest + // request, if any. + string page_token = 3; + + // Optional. A filter specifying constraints of a list operation. + // For example, `Domain.fqdn="mydomain.myorginization"`. + string filter = 4; + + // Optional. Specifies the ordering of results. See + // [Sorting + // order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + // for more information. + string order_by = 5; +} + +// Response message for +// [ListDomains][google.cloud.managedidentities.v1beta1.ListDomains] +message ListDomainsResponse { + // A list of Managed Identities Service domains in the project. + repeated Domain domains = 1; + + // A token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // A list of locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [GetDomain][google.cloud.managedidentities.v1beta1.GetDomain] +message GetDomainRequest { + // The domain resource name using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}` + string name = 1; +} + +// Request message for +// [UpdateDomain][google.cloud.managedidentities.v1beta1.UpdateDomain] +message UpdateDomainRequest { + // Mask of fields to update. At least one path must be supplied in this + // field. The elements of the repeated paths field may only include + // fields from [Domain][google.cloud.managedidentities.v1beta1.Domain]: + // * `labels` + // * `locations` + // * `authorized_networks` + google.protobuf.FieldMask update_mask = 1; + + // Domain message with updated fields. Only supported fields specified in + // update_mask are updated. + Domain domain = 2; +} + +// Request message for +// [DeleteDomain][google.cloud.managedidentities.v1beta1.DeleteDomain] +message DeleteDomainRequest { + // The domain resource name using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}` + string name = 1; +} + +// Request message for +// [AttachTrust][google.cloud.managedidentities.v1beta1.AttachTrust] +message AttachTrustRequest { + // The resource domain name, project name and location using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}` + string name = 1; + + // The domain trust resource. + Trust trust = 2; +} + +// Request message for +// [ReconfigureTrust][google.cloud.managedidentities.v1beta1.ReconfigureTrust] +message ReconfigureTrustRequest { + // The resource domain name, project name and location using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}` + string name = 1; + + // The fully-qualified target domain name which will be in trust with current + // domain. + string target_domain_name = 2; + + // The target DNS server IP addresses to resolve the remote domain involved + // in the trust. + repeated string target_dns_ip_addresses = 3; +} + +// Request message for +// [DetachTrust][google.cloud.managedidentities.v1beta1.DetachTrust] +message DetachTrustRequest { + // The resource domain name, project name, and location using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}` + string name = 1; + + // The domain trust resource to removed. + Trust trust = 2; +} + +// Request message for +// [ValidateTrust][google.cloud.managedidentities.v1beta1.ValidateTrust] +message ValidateTrustRequest { + // The resource domain name, project name, and location using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}` + string name = 1; + + // The domain trust to validate trust state for. + Trust trust = 2; +} diff --git a/google/cloud/managedidentities/v1beta1/managedidentities_gapic.legacy.yaml b/google/cloud/managedidentities/v1beta1/managedidentities_gapic.legacy.yaml new file mode 100644 index 000000000..7c234ad3c --- /dev/null +++ b/google/cloud/managedidentities/v1beta1/managedidentities_gapic.legacy.yaml @@ -0,0 +1,295 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.managedidentities.v1beta1 + python: + package_name: google.cloud.managedidentities_v1beta1.gapic + go: + package_name: cloud.google.com/go/managedidentities/apiv1beta1 + csharp: + package_name: Google.Cloud.Managedidentities.V1Beta1 + ruby: + package_name: Google::Cloud::Managedidentities::V1beta1 + php: + package_name: Google\Cloud\Managedidentities\V1beta1 + nodejs: + package_name: managedidentities.v1beta1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.managedidentities.v1beta1.ManagedIdentitiesService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/global + entity_name: project_locations + - name_pattern: projects/{project}/locations/global/domains/{domain} + entity_name: domain + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateMicrosoftAdDomain + flattening: + groups: + - parameters: + - parent + - domain_name + - domain + required_fields: + - parent + - domain_name + - domain + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project_locations + long_running: + return_type: google.cloud.managedidentities.v1beta1.Domain + metadata_type: google.cloud.managedidentities.v1beta1.OpMetadata + initial_poll_delay_millis: 60000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 + total_poll_timeout_millis: 54000000 + timeout_millis: 60000 + - name: ResetAdminPassword + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: domain + timeout_millis: 60000 + - name: ListDomains + flattening: + groups: + - parameters: + - parent + - filter + - order_by + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: domains + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project_locations + timeout_millis: 60000 + - name: GetDomain + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: domain + timeout_millis: 60000 + - name: UpdateDomain + flattening: + groups: + - parameters: + - domain + - update_mask + required_fields: + - domain + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + domain.name: domain + long_running: + return_type: google.cloud.managedidentities.v1beta1.Domain + metadata_type: google.cloud.managedidentities.v1beta1.OpMetadata + initial_poll_delay_millis: 60000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 + total_poll_timeout_millis: 54000000 + timeout_millis: 60000 + - name: DeleteDomain + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: domain + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.managedidentities.v1beta1.OpMetadata + initial_poll_delay_millis: 10000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 60000 + total_poll_timeout_millis: 900000 + timeout_millis: 60000 + - name: AttachTrust + flattening: + groups: + - parameters: + - name + - trust + required_fields: + - name + - trust + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: domain + long_running: + return_type: google.cloud.managedidentities.v1beta1.Domain + metadata_type: google.cloud.managedidentities.v1beta1.OpMetadata + initial_poll_delay_millis: 10000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 60000 + total_poll_timeout_millis: 600000 + timeout_millis: 60000 + - name: ReconfigureTrust + flattening: + groups: + - parameters: + - name + - target_domain_name + - target_dns_ip_addresses + required_fields: + - name + - target_domain_name + - target_dns_ip_addresses + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: domain + long_running: + return_type: google.cloud.managedidentities.v1beta1.Domain + metadata_type: google.cloud.managedidentities.v1beta1.OpMetadata + initial_poll_delay_millis: 10000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 60000 + total_poll_timeout_millis: 600000 + timeout_millis: 60000 + - name: DetachTrust + flattening: + groups: + - parameters: + - name + - trust + required_fields: + - name + - trust + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: domain + long_running: + return_type: google.cloud.managedidentities.v1beta1.Domain + metadata_type: google.cloud.managedidentities.v1beta1.OpMetadata + initial_poll_delay_millis: 10000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 60000 + total_poll_timeout_millis: 600000 + timeout_millis: 60000 + - name: ValidateTrust + flattening: + groups: + - parameters: + - name + - trust + required_fields: + - name + - trust + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: domain + long_running: + return_type: google.cloud.managedidentities.v1beta1.Domain + metadata_type: google.cloud.managedidentities.v1beta1.OpMetadata + initial_poll_delay_millis: 10000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 60000 + total_poll_timeout_millis: 600000 + timeout_millis: 60000 diff --git a/google/cloud/managedidentities/v1beta1/managedidentities_gapic.yaml b/google/cloud/managedidentities/v1beta1/managedidentities_gapic.yaml new file mode 100644 index 000000000..7134da6f1 --- /dev/null +++ b/google/cloud/managedidentities/v1beta1/managedidentities_gapic.yaml @@ -0,0 +1,35 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.managedidentities.v1beta1 + python: + package_name: google.cloud.managedidentities_v1beta1.gapic + go: + package_name: cloud.google.com/go/managedidentities/apiv1beta1 + csharp: + package_name: Google.Cloud.Managedidentities.V1Beta1 + ruby: + package_name: Google::Cloud::Managedidentities::V1beta1 + php: + package_name: Google\Cloud\Managedidentities\V1beta1 + nodejs: + package_name: managedidentities.v1beta1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.managedidentities.v1beta1.ManagedIdentitiesService + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + methods: + - name: DeleteDomain + retry_codes_name: idempotent diff --git a/google/cloud/managedidentities/v1beta1/managedidentities_v1beta1.yaml b/google/cloud/managedidentities/v1beta1/managedidentities_v1beta1.yaml new file mode 100644 index 000000000..464c64f17 --- /dev/null +++ b/google/cloud/managedidentities/v1beta1/managedidentities_v1beta1.yaml @@ -0,0 +1,65 @@ +type: google.api.Service +config_version: 3 +name: managedidentities.googleapis.com +title: Managed Service for Microsoft Active Directory API + +apis: +- name: google.cloud.managedidentities.v1beta1.ManagedIdentitiesService + +types: +- name: google.cloud.managedidentities.v1beta1.OpMetadata + +documentation: + summary: |- + The Managed Service for Microsoft Active Directory API is used for managing + a highly available, hardened service running Microsoft Active Directory + (AD). + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + description: |- + Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + description: |- + Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and + PERMISSION_DENIED + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + description: |- + Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + +backend: + rules: + - selector: 'google.cloud.managedidentities.v1beta1.ManagedIdentitiesService.*' + deadline: 60.0 + - selector: 'google.iam.v1.IAMPolicy.*' + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + - selector: google.longrunning.Operations.GetOperation + deadline: 5.0 + +authentication: + rules: + - selector: 'google.cloud.managedidentities.v1beta1.ManagedIdentitiesService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.iam.v1.IAMPolicy.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/managedidentities/v1beta1/resource.proto b/google/cloud/managedidentities/v1beta1/resource.proto new file mode 100644 index 000000000..deee9eb82 --- /dev/null +++ b/google/cloud/managedidentities/v1beta1/resource.proto @@ -0,0 +1,206 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.managedidentities.v1beta1; + +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.ManagedIdentities.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/managedidentities/v1beta1;managedidentities"; +option java_multiple_files = true; +option java_outer_classname = "ResourceProto"; +option java_package = "com.google.cloud.managedidentities.v1beta1"; + +// Represents a managed Microsoft Active Directory domain. +message Domain { + // Represents the different states of a managed domain. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The domain is being created. + CREATING = 1; + + // The domain has been created and is fully usable. + READY = 2; + + // The domain's configuration is being updated. + UPDATING = 3; + + // The domain is being deleted. + DELETING = 4; + + // The domain is being repaired and may be unusable. Details + // can be found in the `status_message` field. + REPAIRING = 5; + + // The domain is undergoing maintenance. + PERFORMING_MAINTENANCE = 6; + + // The domain is not serving requests. + UNAVAILABLE = 7; + } + + // Output only. The unique name of the domain using the form: + // `projects/{project_id}/locations/global/domains/{domain_name}`. + string name = 1; + + // Optional. Resource labels that can contain user-provided metadata. + map labels = 2; + + // Optional. The full names of the Google Compute Engine + // [networks](/compute/docs/networks-and-firewalls#networks) the domain + // instance is connected to. Networks can be added using UpdateDomain. + // The domain is only available on networks listed in `authorized_networks`. + // If CIDR subnets overlap between networks, domain creation will fail. + repeated string authorized_networks = 3; + + // Required. The CIDR range of internal addresses that are reserved for this + // domain. Reserved networks must be /24 or larger. Ranges must be + // unique and non-overlapping with existing subnets in + // [Domain].[authorized_networks]. + string reserved_ip_range = 4; + + // Required. Locations where domain needs to be provisioned. + // [regions][compute/docs/regions-zones/] + // e.g. us-west1 or us-east4 + // Service supports up to 4 locations at once. Each location will use a /26 + // block. + repeated string locations = 5; + + // Optional. The name of delegated administrator account used to perform + // Active Directory operations. If not specified, `setupadmin` will be used. + string admin = 6; + + // Output only. The fully-qualified domain name of the exposed domain used by + // clients to connect to the service. Similar to what would be chosen for an + // Active Directory set up on an internal network. + string fqdn = 10; + + // Output only. The time the instance was created. + google.protobuf.Timestamp create_time = 11; + + // Output only. The last update time. + google.protobuf.Timestamp update_time = 12; + + // Output only. The current state of this domain. + State state = 13; + + // Output only. Additional information about the current status of this + // domain, if available. + string status_message = 14; + + // Output only. The current trusts associated with the domain. + repeated Trust trusts = 15; +} + +// Represents a relationship between two domains. This allows a controller in +// one domain to authenticate a user in another domain. +message Trust { + // Represents the different states of a domain trust. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The domain trust is being created. + CREATING = 1; + + // The domain trust is being updated. + UPDATING = 2; + + // The domain trust is being deleted. + DELETING = 3; + + // The domain trust is connected. + CONNECTED = 4; + + // The domain trust is disconnected. + DISCONNECTED = 5; + } + + // Represents the different inter-forest trust types. + enum TrustType { + // Not set. + TRUST_TYPE_UNSPECIFIED = 0; + + // The forest trust. + FOREST = 1; + + // The external domain trust. + EXTERNAL = 2; + } + + // Represents the direction of trust. + // See + // [System.DirectoryServices.ActiveDirectory.TrustDirection](https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.activedirectory.trustdirection?view=netframework-4.7.2) + // for more information. + enum TrustDirection { + // Not set. + TRUST_DIRECTION_UNSPECIFIED = 0; + + // The inbound direction represents the trusting side. + INBOUND = 1; + + // The outboud direction represents the trusted side. + OUTBOUND = 2; + + // The bidirectional direction represents the trusted / trusting side. + BIDIRECTIONAL = 3; + } + + // The fully qualified target domain name which will be in trust with the + // current domain. + string target_domain_name = 1; + + // The type of trust represented by the trust resource. + TrustType trust_type = 2; + + // The trust direction, which decides if the current domain is trusted, + // trusting, or both. + TrustDirection trust_direction = 3; + + // The trust authentication type, which decides whether the trusted side has + // forest/domain wide access or selective access to an approved set of + // resources. + bool selective_authentication = 4; + + // The target DNS server IP addresses which can resolve the remote domain + // involved in the trust. + repeated string target_dns_ip_addresses = 5; + + // Input only, and will not be stored. The trust secret used for the handshake + // with the target domain. + string trust_handshake_secret = 6; + + // Output only. The time the instance was created. + google.protobuf.Timestamp create_time = 7; + + // Output only. The last update time. + google.protobuf.Timestamp update_time = 8; + + // Output only. The current state of the trust. + State state = 9; + + // Output only. Additional information about the current state of the + // trust, if available. + string state_description = 11; + + // Output only. The last heartbeat time when the trust was known to be + // connected. + google.protobuf.Timestamp last_trust_heartbeat_time = 12; +} diff --git a/google/cloud/mediatranslation/v1beta1/BUILD.bazel b/google/cloud/mediatranslation/v1beta1/BUILD.bazel new file mode 100644 index 000000000..4ccba1e41 --- /dev/null +++ b/google/cloud/mediatranslation/v1beta1/BUILD.bazel @@ -0,0 +1,355 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "mediatranslation_proto", + srcs = [ + "media_translation.proto", + ], + deps = [ + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/rpc:status_proto", + ], +) + +proto_library_with_info( + name = "mediatranslation_proto_with_info", + deps = [ + ":mediatranslation_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "mediatranslation_java_proto", + deps = [":mediatranslation_proto"], +) + +java_grpc_library( + name = "mediatranslation_java_grpc", + srcs = [":mediatranslation_proto"], + deps = [":mediatranslation_java_proto"], +) + +java_gapic_library( + name = "mediatranslation_java_gapic", + src = ":mediatranslation_proto_with_info", + gapic_yaml = "mediatranslation_gapic.yaml", + package = "google.cloud.mediatranslation.v1beta1", + service_yaml = "mediatranslation_v1beta1.yaml", + test_deps = [ + ":mediatranslation_java_grpc", + ], + deps = [ + ":mediatranslation_java_proto", + ], +) + +java_gapic_test( + name = "mediatranslation_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.mediatranslation.v1beta1.SpeechTranslationServiceClientTest", + ], + runtime_deps = [":mediatranslation_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-mediatranslation-v1beta1-java", + deps = [ + ":mediatranslation_java_gapic", + ":mediatranslation_java_grpc", + ":mediatranslation_java_proto", + ":mediatranslation_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "mediatranslation_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/mediatranslation/v1beta1", + protos = [":mediatranslation_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + ], +) + +go_gapic_library( + name = "mediatranslation_go_gapic", + srcs = [":mediatranslation_proto_with_info"], + grpc_service_config = "mediatranslation_grpc_service_config.json", + importpath = "cloud.google.com/go/mediatranslation/apiv1beta1;mediatranslation", + service_yaml = "mediatranslation_v1beta1.yaml", + deps = [ + ":mediatranslation_go_proto", + ], +) + +go_test( + name = "mediatranslation_go_gapic_test", + srcs = [":mediatranslation_go_gapic_srcjar_test"], + embed = [":mediatranslation_go_gapic"], + importpath = "cloud.google.com/go/mediatranslation/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-mediatranslation-v1beta1-go", + deps = [ + ":mediatranslation_go_gapic", + ":mediatranslation_go_gapic_srcjar-test.srcjar", + ":mediatranslation_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "mediatranslation_moved_proto", + srcs = [":mediatranslation_proto"], + deps = [ + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/rpc:status_proto", + ], +) + +py_proto_library( + name = "mediatranslation_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":mediatranslation_moved_proto"], +) + +py_grpc_library( + name = "mediatranslation_py_grpc", + srcs = [":mediatranslation_moved_proto"], + deps = [":mediatranslation_py_proto"], +) + +py_gapic_library( + name = "mediatranslation_py_gapic", + src = ":mediatranslation_proto_with_info", + gapic_yaml = "mediatranslation_gapic.yaml", + package = "google.cloud.mediatranslation.v1beta1", + service_yaml = "mediatranslation_v1beta1.yaml", + deps = [ + ":mediatranslation_py_grpc", + ":mediatranslation_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "mediatranslation-v1beta1-py", + deps = [ + ":mediatranslation_py_gapic", + ":mediatranslation_py_grpc", + ":mediatranslation_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "mediatranslation_php_proto", + deps = [":mediatranslation_proto"], +) + +php_grpc_library( + name = "mediatranslation_php_grpc", + srcs = [":mediatranslation_proto"], + deps = [":mediatranslation_php_proto"], +) + +php_gapic_library( + name = "mediatranslation_php_gapic", + src = ":mediatranslation_proto_with_info", + gapic_yaml = "mediatranslation_gapic.yaml", + package = "google.cloud.mediatranslation.v1beta1", + service_yaml = "mediatranslation_v1beta1.yaml", + deps = [ + ":mediatranslation_php_grpc", + ":mediatranslation_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-mediatranslation-v1beta1-php", + deps = [ + ":mediatranslation_php_gapic", + ":mediatranslation_php_grpc", + ":mediatranslation_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "mediatranslation_nodejs_gapic", + src = ":mediatranslation_proto_with_info", + gapic_yaml = "mediatranslation_gapic.yaml", + package = "google.cloud.mediatranslation.v1beta1", + service_yaml = "mediatranslation_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "mediatranslation-v1beta1-nodejs", + deps = [ + ":mediatranslation_nodejs_gapic", + ":mediatranslation_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "mediatranslation_ruby_proto", + deps = [":mediatranslation_proto"], +) + +ruby_grpc_library( + name = "mediatranslation_ruby_grpc", + srcs = [":mediatranslation_proto"], + deps = [":mediatranslation_ruby_proto"], +) + +ruby_gapic_library( + name = "mediatranslation_ruby_gapic", + src = ":mediatranslation_proto_with_info", + gapic_yaml = "mediatranslation_gapic.yaml", + package = "google.cloud.mediatranslation.v1beta1", + service_yaml = "mediatranslation_v1beta1.yaml", + deps = [ + ":mediatranslation_ruby_grpc", + ":mediatranslation_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-mediatranslation-v1beta1-ruby", + deps = [ + ":mediatranslation_ruby_gapic", + ":mediatranslation_ruby_grpc", + ":mediatranslation_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "mediatranslation_csharp_proto", + deps = [":mediatranslation_proto"], +) + +csharp_grpc_library( + name = "mediatranslation_csharp_grpc", + srcs = [":mediatranslation_proto"], + deps = [":mediatranslation_csharp_proto"], +) + +csharp_gapic_library( + name = "mediatranslation_csharp_gapic", + src = ":mediatranslation_proto_with_info", + gapic_yaml = "mediatranslation_gapic.yaml", + package = "google.cloud.mediatranslation.v1beta1", + service_yaml = "mediatranslation_v1beta1.yaml", + deps = [ + ":mediatranslation_csharp_grpc", + ":mediatranslation_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-mediatranslation-v1beta1-csharp", + deps = [ + ":mediatranslation_csharp_gapic", + ":mediatranslation_csharp_grpc", + ":mediatranslation_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/mediatranslation/v1beta1/media_translation.proto b/google/cloud/mediatranslation/v1beta1/media_translation.proto new file mode 100644 index 000000000..88eed82ab --- /dev/null +++ b/google/cloud/mediatranslation/v1beta1/media_translation.proto @@ -0,0 +1,197 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.mediatranslation.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/rpc/status.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/mediatranslation/v1beta1;mediatranslation"; +option java_multiple_files = true; +option java_outer_classname = "MediaTranslationProto"; +option java_package = "com.google.cloud.mediatranslation.v1beta1"; +option csharp_namespace = "Google.Cloud.MediaTranslation.V1Beta1"; +option ruby_package = "Google::Cloud::MediaTranslation::V1beta1"; +option php_namespace = "Google\\Cloud\\MediaTranslation\\V1beta1"; + +// Provides translation from/to media types. +service SpeechTranslationService { + option (google.api.default_host) = "mediatranslation.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Performs bidirectional streaming speech translation: receive results while + // sending audio. This method is only available via the gRPC API (not REST). + rpc StreamingTranslateSpeech(stream StreamingTranslateSpeechRequest) returns (stream StreamingTranslateSpeechResponse) { + } +} + +// Provides information to the speech translation that specifies how to process +// the request. +message TranslateSpeechConfig { + // Required. Encoding of audio data. + // Supported formats: + // + // - `linear16` + // + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + // + // + string audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Source language code (BCP-47) of the input audio. + string source_language_code = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A list of up to 3 additional language codes (BCP-47), listing possible + // alternative languages of the supplied audio. If alternative source + // languages are listed, speech translation result will translate in the most + // likely language detected including the main source_language_code. The + // translated result will include the language code of the language detected + // in the audio. + repeated string alternative_source_language_codes = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Target language code (BCP-47) of the output. + string target_language_code = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Sample rate in Hertz of the audio data. Valid values are: + // 8000-48000. 16000 is optimal. For best results, set the sampling rate of + // the audio source to 16000 Hz. If that's not possible, use the native sample + // rate of the audio source (instead of re-sampling). This field can only be + // omitted for `FLAC` and `WAV` audio files. + int32 sample_rate_hertz = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. + string model = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Config used for streaming translation. +message StreamingTranslateSpeechConfig { + // Required. The common config for all the following audio contents. + TranslateSpeechConfig audio_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If `false` or omitted, the system performs + // continuous translation (continuing to wait for and process audio even if + // the user pauses speaking) until the client closes the input stream (gRPC + // API) or until the maximum time limit has been reached. May return multiple + // `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`. + // + // If `true`, the speech translator will detect a single spoken utterance. + // When it detects that the user has paused or stopped speaking, it will + // return an `END_OF_SINGLE_UTTERANCE` event and cease translation. + // When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should + // stop sending the requests. However, clients should keep receiving remaining + // responses until the stream is terminated. To construct the complete + // sentence in a streaming way, one should override (if 'is_final' of previous + // response is false), or append (if 'is_final' of previous response is true). + bool single_utterance = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The top-level message sent by the client for the `StreamingTranslateSpeech` +// method. Multiple `StreamingTranslateSpeechRequest` messages are sent. The +// first message must contain a `streaming_config` message and must not contain +// `audio_content` data. All subsequent messages must contain `audio_content` +// data and must not contain a `streaming_config` message. +message StreamingTranslateSpeechRequest { + // The streaming request, which is either a streaming config or content. + oneof streaming_request { + // Provides information to the recognizer that specifies how to process the + // request. The first `StreamingTranslateSpeechRequest` message must contain + // a `streaming_config` message. + StreamingTranslateSpeechConfig streaming_config = 1; + + // The audio data to be translated. Sequential chunks of audio data are sent + // in sequential `StreamingTranslateSpeechRequest` messages. The first + // `StreamingTranslateSpeechRequest` message must not contain + // `audio_content` data and all subsequent `StreamingTranslateSpeechRequest` + // messages must contain `audio_content` data. The audio bytes must be + // encoded as specified in `StreamingTranslateSpeechConfig`. Note: as with + // all bytes fields, protobuffers use a pure binary representation (not + // base64). + bytes audio_content = 2; + } +} + +// A streaming speech translation result corresponding to a portion of the audio +// that is currently being processed. +message StreamingTranslateSpeechResult { + // Text translation result. + message TextTranslationResult { + // Output only. The translated sentence. + string translation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If `false`, this `StreamingTranslateSpeechResult` represents + // an interim result that may change. If `true`, this is the final time the + // translation service will return this particular + // `StreamingTranslateSpeechResult`, the streaming translator will not + // return any further hypotheses for this portion of the transcript and + // corresponding audio. + bool is_final = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The source language code (BCP-47) detected in the audio. Speech + // translation result will translate in the most likely language detected + // including the alternative source languages and main source_language_code. + string detected_source_language_code = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Translation result. + // + // Use oneof field to reserve for future tts result. + oneof result { + // Text translation result. + TextTranslationResult text_translation_result = 1; + } + + // Output only. The debug only recognition result in original language. This field is debug + // only and will be set to empty string if not available. + // This is implementation detail and will not be backward compatible. + // + // Still need to decide whether to expose this field by default. + string recognition_result = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A streaming speech translation response corresponding to a portion of +// the audio currently processed. +message StreamingTranslateSpeechResponse { + // Indicates the type of speech event. + enum SpeechEventType { + // No speech event specified. + SPEECH_EVENT_TYPE_UNSPECIFIED = 0; + + // This event indicates that the server has detected the end of the user's + // speech utterance and expects no additional speech. Therefore, the server + // will not process additional audio (although it may subsequently return + // additional results). When the client receives 'END_OF_SINGLE_UTTERANCE' + // event, the client should stop sending the requests. However, clients + // should keep receiving remaining responses until the stream is terminated. + // To construct the complete sentence in a streaming way, one should + // override (if 'is_final' of previous response is false), or append (if + // 'is_final' of previous response is true). This event is only sent if + // `single_utterance` was set to `true`, and is not used otherwise. + END_OF_SINGLE_UTTERANCE = 1; + } + + // Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that + // specifies the error for the operation. + google.rpc.Status error = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The translation result that is currently being processed (is_final could be + // true or false). + StreamingTranslateSpeechResult result = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates the type of speech event. + SpeechEventType speech_event_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/mediatranslation/v1beta1/mediatranslation_gapic.yaml b/google/cloud/mediatranslation/v1beta1/mediatranslation_gapic.yaml new file mode 100644 index 000000000..16eefc404 --- /dev/null +++ b/google/cloud/mediatranslation/v1beta1/mediatranslation_gapic.yaml @@ -0,0 +1,18 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + java: + package_name: com.google.cloud.mediatranslation.v1beta1 + python: + package_name: google.cloud.mediatranslation_v1beta1.gapic + go: + package_name: cloud.google.com/go/mediatranslation/apiv1beta1 + csharp: + package_name: Google.Cloud.MediaTranslation.V1Beta1 + ruby: + package_name: Google::Cloud::MediaTranslation::V1beta1 + php: + package_name: Google\Cloud\MediaTranslation\V1beta1 + nodejs: + package_name: mediatranslation.v1beta1 + domain_layer_location: google-cloud diff --git a/google/cloud/mediatranslation/v1beta1/mediatranslation_grpc_service_config.json b/google/cloud/mediatranslation/v1beta1/mediatranslation_grpc_service_config.json new file mode 100644 index 000000000..beb0dde71 --- /dev/null +++ b/google/cloud/mediatranslation/v1beta1/mediatranslation_grpc_service_config.json @@ -0,0 +1,19 @@ +{ + "methodConfig": [{ + "name": [{ "service": "google.cloud.mediatranslation.v1beta1.SpeechTranslationService" }], + "timeout": "400s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE", "UNKNOWN", "DEADLINE_EXCEEDED"] + } + }, + { + "name": [ + { "service": "google.cloud.mediatranslation.v1beta1.SpeechTranslationService", "method": "StreamingTranslateSpeech" } + ], + "timeout": "400s" + }] +} diff --git a/google/cloud/mediatranslation/v1beta1/mediatranslation_v1beta1.yaml b/google/cloud/mediatranslation/v1beta1/mediatranslation_v1beta1.yaml new file mode 100644 index 000000000..f4f9a37ab --- /dev/null +++ b/google/cloud/mediatranslation/v1beta1/mediatranslation_v1beta1.yaml @@ -0,0 +1,19 @@ +type: google.api.Service +config_version: 3 +name: mediatranslation.googleapis.com +title: Media Translation API + +apis: +- name: google.cloud.mediatranslation.v1beta1.SpeechTranslationService + +backend: + rules: + - selector: google.cloud.mediatranslation.v1beta1.SpeechTranslationService.StreamingTranslateSpeech + deadline: 355.0 + +authentication: + rules: + - selector: google.cloud.mediatranslation.v1beta1.SpeechTranslationService.StreamingTranslateSpeech + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/memcache/v1beta2/BUILD.bazel b/google/cloud/memcache/v1beta2/BUILD.bazel new file mode 100644 index 000000000..e95cb420e --- /dev/null +++ b/google/cloud/memcache/v1beta2/BUILD.bazel @@ -0,0 +1,367 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "memcache_proto", + srcs = [ + "cloud_memcache.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "memcache_proto_with_info", + deps = [ + ":memcache_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "memcache_java_proto", + deps = [":memcache_proto"], +) + +java_grpc_library( + name = "memcache_java_grpc", + srcs = [":memcache_proto"], + deps = [":memcache_java_proto"], +) + +java_gapic_library( + name = "memcache_java_gapic", + src = ":memcache_proto_with_info", + gapic_yaml = "memcache_gapic.yaml", + package = "google.cloud.memcache.v1beta2", + service_yaml = "memcache_v1beta2.yaml", + test_deps = [ + ":memcache_java_grpc", + ], + deps = [ + ":memcache_java_proto", + ], +) + +java_gapic_test( + name = "memcache_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.memcache.v1beta2.CloudMemcacheClientTest", + ], + runtime_deps = [":memcache_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-memcache-v1beta2-java", + deps = [ + ":memcache_java_gapic", + ":memcache_java_grpc", + ":memcache_java_proto", + ":memcache_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "memcache_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/memcache/v1beta2", + protos = [":memcache_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "memcache_go_gapic", + srcs = [":memcache_proto_with_info"], + grpc_service_config = "memcache_grpc_service_config.json", + importpath = "cloud.google.com/go/memcache/apiv1beta2;memcache", + service_yaml = "memcache_v1beta2.yaml", + deps = [ + ":memcache_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + ], +) + +go_test( + name = "memcache_go_gapic_test", + srcs = [":memcache_go_gapic_srcjar_test"], + embed = [":memcache_go_gapic"], + importpath = "cloud.google.com/go/memcache/apiv1beta2", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-memcache-v1beta2-go", + deps = [ + ":memcache_go_gapic", + ":memcache_go_gapic_srcjar-test.srcjar", + ":memcache_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "memcache_moved_proto", + srcs = [":memcache_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "memcache_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":memcache_moved_proto"], +) + +py_grpc_library( + name = "memcache_py_grpc", + srcs = [":memcache_moved_proto"], + deps = [":memcache_py_proto"], +) + +py_gapic_library( + name = "memcache_py_gapic", + src = ":memcache_proto_with_info", + gapic_yaml = "memcache_gapic.yaml", + package = "google.cloud.memcache.v1beta2", + service_yaml = "memcache_v1beta2.yaml", + deps = [ + ":memcache_py_grpc", + ":memcache_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "memcache-v1beta2-py", + deps = [ + ":memcache_py_gapic", + ":memcache_py_grpc", + ":memcache_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "memcache_php_proto", + deps = [":memcache_proto"], +) + +php_grpc_library( + name = "memcache_php_grpc", + srcs = [":memcache_proto"], + deps = [":memcache_php_proto"], +) + +php_gapic_library( + name = "memcache_php_gapic", + src = ":memcache_proto_with_info", + gapic_yaml = "memcache_gapic.yaml", + package = "google.cloud.memcache.v1beta2", + service_yaml = "memcache_v1beta2.yaml", + deps = [ + ":memcache_php_grpc", + ":memcache_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-memcache-v1beta2-php", + deps = [ + ":memcache_php_gapic", + ":memcache_php_grpc", + ":memcache_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "memcache_nodejs_gapic", + src = ":memcache_proto_with_info", + gapic_yaml = "memcache_gapic.yaml", + package = "google.cloud.memcache.v1beta2", + service_yaml = "memcache_v1beta2.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "memcache-v1beta2-nodejs", + deps = [ + ":memcache_nodejs_gapic", + ":memcache_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "memcache_ruby_proto", + deps = [":memcache_proto"], +) + +ruby_grpc_library( + name = "memcache_ruby_grpc", + srcs = [":memcache_proto"], + deps = [":memcache_ruby_proto"], +) + +ruby_gapic_library( + name = "memcache_ruby_gapic", + src = ":memcache_proto_with_info", + gapic_yaml = "memcache_gapic.yaml", + package = "google.cloud.memcache.v1beta2", + service_yaml = "memcache_v1beta2.yaml", + deps = [ + ":memcache_ruby_grpc", + ":memcache_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-memcache-v1beta2-ruby", + deps = [ + ":memcache_ruby_gapic", + ":memcache_ruby_grpc", + ":memcache_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "memcache_csharp_proto", + deps = [":memcache_proto"], +) + +csharp_grpc_library( + name = "memcache_csharp_grpc", + srcs = [":memcache_proto"], + deps = [":memcache_csharp_proto"], +) + +csharp_gapic_library( + name = "memcache_csharp_gapic", + src = ":memcache_proto_with_info", + gapic_yaml = "memcache_gapic.yaml", + package = "google.cloud.memcache.v1beta2", + service_yaml = "memcache_v1beta2.yaml", + deps = [ + ":memcache_csharp_grpc", + ":memcache_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-memcache-v1beta2-csharp", + deps = [ + ":memcache_csharp_gapic", + ":memcache_csharp_grpc", + ":memcache_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/memcache/v1beta2/cloud_memcache.proto b/google/cloud/memcache/v1beta2/cloud_memcache.proto new file mode 100644 index 000000000..5d75ae49e --- /dev/null +++ b/google/cloud/memcache/v1beta2/cloud_memcache.proto @@ -0,0 +1,503 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.memcache.v1beta2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/memcache/v1beta2;memcache"; +option java_multiple_files = true; +option java_outer_classname = "CloudMemcacheProto"; +option java_package = "com.google.cloud.memcache.v1beta2"; + +// Configures and manages Cloud Memorystore for Memcached instances. +// +// +// The `memcache.googleapis.com` service implements the Google Cloud Memorystore +// for Memcached API and defines the following resource model for managing +// Memorystore Memcached (also called Memcached below) instances: +// * The service works with a collection of cloud projects, named: `/projects/*` +// * Each project has a collection of available locations, named: `/locations/*` +// * Each location has a collection of Memcached instances, named: +// `/instances/*` +// * As such, Memcached instances are resources of the form: +// `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` +// +// Note that location_id must be refering to a GCP `region`; for example: +// * `projects/my-memcached-project/locations/us-central1/instances/my-memcached` +service CloudMemcache { + option (google.api.default_host) = "memcache.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists Instances in a given project and location. + rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { + option (google.api.http) = { + get: "/v1beta2/{parent=projects/*/locations/*}/instances" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Instance. + rpc GetInstance(GetInstanceRequest) returns (Instance) { + option (google.api.http) = { + get: "/v1beta2/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Instance in a given project and location. + rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta2/{parent=projects/*/locations/*}/instances" + body: "resource" + }; + option (google.api.method_signature) = "parent,instance_id,resource"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.memcache.v1beta2.Instance" + metadata_type: "google.cloud.memcache.v1beta2.OperationMetadata" + }; + } + + // Updates an existing Instance in a given project and location. + rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta2/{resource.name=projects/*/locations/*/instances/*}" + body: "resource" + }; + option (google.api.method_signature) = "update_mask,resource"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.memcache.v1beta2.Instance" + metadata_type: "google.cloud.memcache.v1beta2.OperationMetadata" + }; + } + + // Updates the defined Memcached Parameters for an existing Instance. + // This method only stages the parameters, it must be followed by + // ApplyParameters to apply the parameters to nodes of the Memcached Instance. + rpc UpdateParameters(UpdateParametersRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta2/{name=projects/*/locations/*/instances/*}:updateParameters" + body: "*" + }; + option (google.api.method_signature) = "name,update_mask,parameters"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.memcache.v1beta2.Instance" + metadata_type: "google.cloud.memcache.v1beta2.OperationMetadata" + }; + } + + // Deletes a single Instance. + rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta2/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.memcache.v1beta2.OperationMetadata" + }; + } + + // ApplyParameters will update current set of Parameters to the set of + // specified nodes of the Memcached Instance. + rpc ApplyParameters(ApplyParametersRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta2/{name=projects/*/locations/*/instances/*}:applyParameters" + body: "*" + }; + option (google.api.method_signature) = "name,node_ids,apply_all"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.memcache.v1beta2.Instance" + metadata_type: "google.cloud.memcache.v1beta2.OperationMetadata" + }; + } +} + +message Instance { + option (google.api.resource) = { + type: "memcache.googleapis.com/Instance" + pattern: "projects/{project}/locations/{location}/instances/{instance}" + }; + + // Configuration for a Memcached Node. + message NodeConfig { + // Required. Number of cpus per Memcached node. + int32 cpu_count = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Memory size in MiB for each Memcached node. + int32 memory_size_mb = 2 [(google.api.field_behavior) = REQUIRED]; + } + + message Node { + // Different states of a Memcached node. + // LINT.IfChange + enum State { + // Node state is not set. + STATE_UNSPECIFIED = 0; + + // Node is being created. + CREATING = 1; + + // Node has been created and ready to be used. + READY = 2; + + // Node is being deleted. + DELETING = 3; + + // Node is being updated. + UPDATING = 4; + } + + // Output only. Identifier of the Memcached node. The node id does not + // include project or location like the Memcached instance name. + string node_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location (GCP Zone) for the Memcached node. + string zone = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the Memcached node. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Hostname or IP address of the Memcached node used by the + // clients to connect to the Memcached server on this node. + string host = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The port number of the Memcached server on this node. + int32 port = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User defined parameters currently applied to the node. + MemcacheParameters parameters = 6; + } + + message InstanceMessage { + enum Code { + // Message Code not set. + CODE_UNSPECIFIED = 0; + + // Memcached nodes are distributed unevenly. + ZONE_DISTRIBUTION_UNBALANCED = 1; + } + + // A code that correspond to one type of user-facing message. + Code code = 1; + + // Message on memcached instance which will be exposed to users. + string message = 2; + } + + // Different states of a Memcached instance. + // LINT.IfChange + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // Memcached instance is being created. + CREATING = 1; + + // Memcached instance has been created and ready to be used. + READY = 2; + + // Memcached instance is being deleted. + DELETING = 4; + + // Memcached instance is going through maintenance, e.g. data plane rollout. + PERFORMING_MAINTENANCE = 5; + } + + // Required. Unique name of the resource in this scope including project and + // location using the form: + // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + // + // Note: Memcached instances are managed and addressed at regional level so + // location_id here refers to a GCP region; however, users may choose which + // zones Memcached nodes within an instances should be provisioned in. + // Refer to [zones] field for more details. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. User provided name for the instance only used for display + // purposes. Cannot be more than 80 characters. + string display_name = 2; + + // Optional. Resource labels to represent user-provided metadata. + // Refer to cloud documentation on labels for more details. + // https://cloud.google.com/compute/docs/labeling-resources + map labels = 3; + + // Optional. The full name of the Google Compute Engine + // [network](/compute/docs/networks-and-firewalls#networks) to which the + // instance is connected. If left unspecified, the `default` network + // will be used. + string authorized_network = 4; + + // Optional. Zones where Memcached nodes should be provisioned in. + // Memcached nodes will be equally distributed across these zones. If not + // provided, the service will by default create nodes in all zones in the + // region for the instance. + repeated string zones = 5; + + // Required. Number of nodes in the Memcached instance. + int32 node_count = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Configuration for Memcached nodes. + NodeConfig node_config = 7 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The major version of Memcached software. + // If not provided, latest supported version will be used. Currently the + // latest supported major version is MEMCACHE_1_5. + // The minor version will be automatically determined by our system based on + // the latest supported minor version. + MemcacheVersion memcache_version = 9; + + // Optional: User defined parameters to apply to the memcached process + // on each node. + MemcacheParameters parameters = 11; + + // Output only. List of Memcached nodes. + // Refer to [Node] message for more details. + repeated Node memcache_nodes = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the instance was created. + google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the instance was updated. + google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The state of this Memcached instance. + State state = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The full version of memcached server running on this instance. + // System automatically determines the full memcached version for an instance + // based on the input MemcacheVersion. + // The full version format will be "memcached-1.5.16". + string memcache_full_version = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // List of messages that describe current statuses of memcached instance. + repeated InstanceMessage instance_messages = 19; + + // Output only. Endpoint for Discovery API + string discovery_endpoint = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request for [ListInstances][google.cloud.memcache.v1beta2.CloudMemcache.ListInstances]. +message ListInstancesRequest { + // Required. The resource name of the instance location using the form: + // `projects/{project_id}/locations/{location_id}` + // where `location_id` refers to a GCP region + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 1000 will be used by the service. + // Regardless of the page_size value, the response may include a partial list + // and a caller should only rely on response's + // [next_page_token][CloudMemcache.ListInstancesResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, + // if any. + string page_token = 3; + + // List filter. For example, exclude all Memcached instances with name as + // my-instance by specifying "name != my-instance". + string filter = 4; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 5; +} + +// Response for [ListInstances][google.cloud.memcache.v1beta2.CloudMemcache.ListInstances]. +message ListInstancesResponse { + // A list of Memcached instances in the project in the specified location, + // or across all locations. + // + // If the `location_id` in the parent field of the request is "-", all regions + // available to the project are queried, and the results aggregated. + repeated Instance resources = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for [GetInstance][google.cloud.memcache.v1beta2.CloudMemcache.GetInstance]. +message GetInstanceRequest { + // Required. Memcached instance resource name in the format: + // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + // where `location_id` refers to a GCP region + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "memcache.googleapis.com/Instance" + } + ]; +} + +// Request for [CreateInstance][google.cloud.memcache.v1beta2.CloudMemcache.CreateInstance]. +message CreateInstanceRequest { + // Required. The resource name of the instance location using the form: + // `projects/{project_id}/locations/{location_id}` + // where `location_id` refers to a GCP region + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The logical name of the Memcached instance in the user + // project with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-40 characters. + // * Must end with a number or a letter. + // * Must be unique within the user project / location + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A Memcached [Instance] resource + Instance resource = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for [UpdateInstance][google.cloud.memcache.v1beta2.CloudMemcache.UpdateInstance]. +message UpdateInstanceRequest { + // Required. Mask of fields to update. + // * `displayName` + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A Memcached [Instance] resource. + // Only fields specified in update_mask are updated. + Instance resource = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for [DeleteInstance][google.cloud.memcache.v1beta2.CloudMemcache.DeleteInstance]. +message DeleteInstanceRequest { + // Memcached instance resource name in the format: + // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + // where `location_id` refers to a GCP region + string name = 1; +} + +// Request for [ApplyParameters][google.cloud.memcache.v1beta2.CloudMemcache.ApplyParameters]. +message ApplyParametersRequest { + // Required. Resource name of the Memcached instance for which parameter group updates + // should be applied. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "memcache.googleapis.com/Instance" + } + ]; + + // Nodes to which we should apply the instance-level parameter group. + repeated string node_ids = 2; + + // Whether to apply instance-level parameter group to all nodes. If set to + // true, will explicitly restrict users from specifying any nodes, and apply + // parameter group updates to all nodes within the instance. + bool apply_all = 3; +} + +// Request for [UpdateParameters][google.cloud.memcache.v1beta2.CloudMemcache.UpdateParameters]. +message UpdateParametersRequest { + // Required. Resource name of the Memcached instance for which the parameters should be + // updated. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "memcache.googleapis.com/Instance" + } + ]; + + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + + // The parameters to apply to the instance. + MemcacheParameters parameters = 3; +} + +message MemcacheParameters { + // Output only. The unique ID associated with this set of parameters. Users + // can use this id to determine if the parameters associated with the instance + // differ from the parameters associated with the nodes and any action needs + // to be taken to apply parameters on nodes. + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User defined set of parameters to use in the memcached process. + map params = 3; +} + +// Represents the metadata of a long-running operation. +message OperationMetadata { + // Time when the operation was created. + google.protobuf.Timestamp create_time = 1; + + // Time when the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Server-defined resource path for the target of the operation. + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation, if any. + string status_detail = 5; + + // Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool cancel_requested = 6; + + // API version used to start the operation. + string api_version = 7; +} + +// Memcached versions supported by our service. +enum MemcacheVersion { + MEMCACHE_VERSION_UNSPECIFIED = 0; + + // Memcached 1.5 version. + MEMCACHE_1_5 = 1; +} + +// Metadata for the given [google.cloud.location.Location][google.cloud.location.Location]. +message LocationMetadata { + // Output only. The set of available zones in the location. The map is keyed + // by the lowercase ID of each zone, as defined by GCE. These keys can be + // specified in the `zones` field when creating a Memcached instance. + map available_zones = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +message ZoneMetadata { + +} diff --git a/google/cloud/memcache/v1beta2/memcache_gapic.yaml b/google/cloud/memcache/v1beta2/memcache_gapic.yaml new file mode 100644 index 000000000..87a6dbdab --- /dev/null +++ b/google/cloud/memcache/v1beta2/memcache_gapic.yaml @@ -0,0 +1,19 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.memcache.v1beta2 + python: + package_name: google.cloud.memcache_v1beta2.gapic + go: + package_name: cloud.google.com/go/memcache/apiv1beta2 + csharp: + package_name: Google.Cloud.Memcache.V1Beta2 + ruby: + package_name: Google::Cloud::Memcache::V1beta2 + php: + package_name: Google\Cloud\Memcache\V1beta2 + nodejs: + package_name: memcache.v1beta2 + domain_layer_location: google-cloud diff --git a/google/cloud/memcache/v1beta2/memcache_grpc_service_config.json b/google/cloud/memcache/v1beta2/memcache_grpc_service_config.json new file mode 100644 index 000000000..6817c8b4f --- /dev/null +++ b/google/cloud/memcache/v1beta2/memcache_grpc_service_config.json @@ -0,0 +1,37 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.memcache.v1beta2.CloudMemcache", + "method": "ListInstances" + }, + { + "service": "google.cloud.memcache.v1beta2.CloudMemcache", + "method": "GetInstance" + }, + { + "service": "google.cloud.memcache.v1beta2.CloudMemcache", + "method": "CreateInstance" + }, + { + "service": "google.cloud.memcache.v1beta2.CloudMemcache", + "method": "UpdateInstance" + }, + { + "service": "google.cloud.memcache.v1beta2.CloudMemcache", + "method": "UpdateParameters" + }, + { + "service": "google.cloud.memcache.v1beta2.CloudMemcache", + "method": "ApplyParameters" + }, + { + "service": "google.cloud.memcache.v1beta2.CloudMemcache", + "method": "DeleteInstance" + } + ], + "timeout": "1200s" + } + ] +} diff --git a/google/cloud/memcache/v1beta2/memcache_v1beta2.yaml b/google/cloud/memcache/v1beta2/memcache_v1beta2.yaml new file mode 100644 index 000000000..ae598c6a6 --- /dev/null +++ b/google/cloud/memcache/v1beta2/memcache_v1beta2.yaml @@ -0,0 +1,87 @@ +type: google.api.Service +config_version: 3 +name: memcache.googleapis.com +title: Cloud Memorystore for Memcached API + +apis: +- name: google.cloud.memcache.v1beta2.CloudMemcache + +types: +- name: google.cloud.memcache.v1beta2.LocationMetadata +- name: google.cloud.memcache.v1beta2.OperationMetadata + +documentation: + summary: |- + Google Cloud Memorystore for Memcached API is used for creating and + managing Memcached instances in GCP. + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + description: |- + Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + description: |- + Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and + PERMISSION_DENIED + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + description: |- + Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + +backend: + rules: + - selector: google.cloud.memcache.v1beta2.CloudMemcache.GetInstance + deadline: 60.0 + - selector: google.cloud.memcache.v1beta2.CloudMemcache.ListInstances + deadline: 60.0 + - selector: 'google.iam.v1.IAMPolicy.*' + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + - selector: google.longrunning.Operations.GetOperation + deadline: 5.0 + +http: + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + get: '/v1beta2/{resource=projects/*/locations/*/instances/*}:getIamPolicy' + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + post: '/v1beta2/{resource=projects/*/locations/*/instances/*}:setIamPolicy' + body: '*' + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + post: '/v1beta2/{resource=projects/*/locations/*/instances/*}:testIamPermissions' + body: '*' + - selector: google.longrunning.Operations.CancelOperation + post: '/v1beta2/{name=projects/*/locations/*/operations/*}:cancel' + body: '*' + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1beta2/{name=projects/*/locations/*/operations/*}' + - selector: google.longrunning.Operations.GetOperation + get: '/v1beta2/{name=projects/*/locations/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1beta2/{name=projects/*/locations/*}/operations' + +authentication: + rules: + - selector: 'google.cloud.memcache.v1beta2.CloudMemcache.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.iam.v1.IAMPolicy.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/orgpolicy/v1/BUILD.bazel b/google/cloud/orgpolicy/v1/BUILD.bazel new file mode 100644 index 000000000..35ac2f458 --- /dev/null +++ b/google/cloud/orgpolicy/v1/BUILD.bazel @@ -0,0 +1,189 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "orgpolicy_proto", + srcs = [ + "orgpolicy.proto", + ], + deps = [ + "//google/api:annotations_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", + "java_gapic_assembly_gradle_pkg", +) + +java_proto_library( + name = "orgpolicy_java_proto", + deps = [":orgpolicy_proto"], +) + +java_grpc_library( + name = "orgpolicy_java_grpc", + srcs = [":orgpolicy_proto"], + deps = [":orgpolicy_java_proto"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-orgpolicy-v1-java", + deps = [ + ":orgpolicy_java_grpc", + ":orgpolicy_java_proto", + ":orgpolicy_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", +) + +go_proto_library( + name = "orgpolicy_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/orgpolicy/v1", + protos = [":orgpolicy_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", + "py_gapic_assembly_pkg", +) + +moved_proto_library( + name = "orgpolicy_moved_proto", + srcs = [":orgpolicy_proto"], + deps = [ + "//google/api:annotations_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "orgpolicy_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":orgpolicy_moved_proto"], +) + +py_grpc_library( + name = "orgpolicy_py_grpc", + srcs = [":orgpolicy_moved_proto"], + deps = [":orgpolicy_py_proto"], +) + +# Open Source Packages +# DO NOT REMOVE, this is needed to generate a Python package +# with the orgpolicy protos. +py_gapic_assembly_pkg( + name = "orgpolicy-v1-py", + deps = [ + ":orgpolicy_py_grpc", + ":orgpolicy_py_proto", + ":orgpolicy_proto", + ], +) +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "orgpolicy_php_proto", + deps = [":orgpolicy_proto"], +) + +php_grpc_library( + name = "orgpolicy_php_grpc", + srcs = [":orgpolicy_proto"], + deps = [":orgpolicy_php_proto"], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "orgpolicy_ruby_proto", + deps = [":orgpolicy_proto"], +) + +ruby_grpc_library( + name = "orgpolicy_ruby_grpc", + srcs = [":orgpolicy_proto"], + deps = [":orgpolicy_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "orgpolicy_csharp_proto", + deps = [":orgpolicy_proto"], +) + +csharp_grpc_library( + name = "orgpolicy_csharp_grpc", + srcs = [":orgpolicy_proto"], + deps = [":orgpolicy_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ code here diff --git a/google/cloud/orgpolicy/v1/orgpolicy.proto b/google/cloud/orgpolicy/v1/orgpolicy.proto new file mode 100644 index 000000000..fbd62df6f --- /dev/null +++ b/google/cloud/orgpolicy/v1/orgpolicy.proto @@ -0,0 +1,315 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.orgpolicy.v1; + +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.OrgPolicy.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/orgpolicy/v1;orgpolicy"; +option java_multiple_files = true; +option java_outer_classname = "OrgPolicyProto"; +option java_package = "com.google.cloud.orgpolicy.v1"; +option php_namespace = "Google\\Cloud\\OrgPolicy\\V1"; +option ruby_package = "Google::Cloud::OrgPolicy::V1"; + +// Defines a Cloud Organization `Policy` which is used to specify `Constraints` +// for configurations of Cloud Platform resources. +message Policy { + // Used in `policy_type` to specify how `list_policy` behaves at this + // resource. + // + // `ListPolicy` can define specific values and subtrees of Cloud Resource + // Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that + // are allowed or denied by setting the `allowed_values` and `denied_values` + // fields. This is achieved by using the `under:` and optional `is:` prefixes. + // The `under:` prefix is used to denote resource subtree values. + // The `is:` prefix is used to denote specific values, and is required only + // if the value contains a ":". Values prefixed with "is:" are treated the + // same as values with no prefix. + // Ancestry subtrees must be in one of the following formats: + // - "projects/", e.g. "projects/tokyo-rain-123" + // - "folders/", e.g. "folders/1234" + // - "organizations/", e.g. "organizations/1234" + // The `supports_under` field of the associated `Constraint` defines whether + // ancestry prefixes can be used. You can set `allowed_values` and + // `denied_values` in the same `Policy` if `all_values` is + // `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all + // values. If `all_values` is set to either `ALLOW` or `DENY`, + // `allowed_values` and `denied_values` must be unset. + message ListPolicy { + // This enum can be used to set `Policies` that apply to all possible + // configuration values rather than specific values in `allowed_values` or + // `denied_values`. + // + // Settting this to `ALLOW` will mean this `Policy` allows all values. + // Similarly, setting it to `DENY` will mean no values are allowed. If + // set to either `ALLOW` or `DENY, `allowed_values` and `denied_values` + // must be unset. Setting this to `ALL_VALUES_UNSPECIFIED` allows for + // setting `allowed_values` and `denied_values`. + enum AllValues { + // Indicates that allowed_values or denied_values must be set. + ALL_VALUES_UNSPECIFIED = 0; + + // A policy with this set allows all values. + ALLOW = 1; + + // A policy with this set denies all values. + DENY = 2; + } + + // List of values allowed at this resource. Can only be set if `all_values` + // is set to `ALL_VALUES_UNSPECIFIED`. + repeated string allowed_values = 1; + + // List of values denied at this resource. Can only be set if `all_values` + // is set to `ALL_VALUES_UNSPECIFIED`. + repeated string denied_values = 2; + + // The policy all_values state. + AllValues all_values = 3; + + // Optional. The Google Cloud Console will try to default to a configuration + // that matches the value specified in this `Policy`. If `suggested_value` + // is not set, it will inherit the value specified higher in the hierarchy, + // unless `inherit_from_parent` is `false`. + string suggested_value = 4; + + // Determines the inheritance behavior for this `Policy`. + // + // By default, a `ListPolicy` set at a resource supercedes any `Policy` set + // anywhere up the resource hierarchy. However, if `inherit_from_parent` is + // set to `true`, then the values from the effective `Policy` of the parent + // resource are inherited, meaning the values set in this `Policy` are + // added to the values inherited up the hierarchy. + // + // Setting `Policy` hierarchies that inherit both allowed values and denied + // values isn't recommended in most circumstances to keep the configuration + // simple and understandable. However, it is possible to set a `Policy` with + // `allowed_values` set that inherits a `Policy` with `denied_values` set. + // In this case, the values that are allowed must be in `allowed_values` and + // not present in `denied_values`. + // + // For example, suppose you have a `Constraint` + // `constraints/serviceuser.services`, which has a `constraint_type` of + // `list_constraint`, and with `constraint_default` set to `ALLOW`. + // Suppose that at the Organization level, a `Policy` is applied that + // restricts the allowed API activations to {`E1`, `E2`}. Then, if a + // `Policy` is applied to a project below the Organization that has + // `inherit_from_parent` set to `false` and field all_values set to DENY, + // then an attempt to activate any API will be denied. + // + // The following examples demonstrate different possible layerings for + // `projects/bar` parented by `organizations/foo`: + // + // Example 1 (no inherited values): + // `organizations/foo` has a `Policy` with values: + // {allowed_values: "E1" allowed_values:"E2"} + // `projects/bar` has `inherit_from_parent` `false` and values: + // {allowed_values: "E3" allowed_values: "E4"} + // The accepted values at `organizations/foo` are `E1`, `E2`. + // The accepted values at `projects/bar` are `E3`, and `E4`. + // + // Example 2 (inherited values): + // `organizations/foo` has a `Policy` with values: + // {allowed_values: "E1" allowed_values:"E2"} + // `projects/bar` has a `Policy` with values: + // {value: "E3" value: "E4" inherit_from_parent: true} + // The accepted values at `organizations/foo` are `E1`, `E2`. + // The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`. + // + // Example 3 (inheriting both allowed and denied values): + // `organizations/foo` has a `Policy` with values: + // {allowed_values: "E1" allowed_values: "E2"} + // `projects/bar` has a `Policy` with: + // {denied_values: "E1"} + // The accepted values at `organizations/foo` are `E1`, `E2`. + // The value accepted at `projects/bar` is `E2`. + // + // Example 4 (RestoreDefault): + // `organizations/foo` has a `Policy` with values: + // {allowed_values: "E1" allowed_values:"E2"} + // `projects/bar` has a `Policy` with values: + // {RestoreDefault: {}} + // The accepted values at `organizations/foo` are `E1`, `E2`. + // The accepted values at `projects/bar` are either all or none depending on + // the value of `constraint_default` (if `ALLOW`, all; if + // `DENY`, none). + // + // Example 5 (no policy inherits parent policy): + // `organizations/foo` has no `Policy` set. + // `projects/bar` has no `Policy` set. + // The accepted values at both levels are either all or none depending on + // the value of `constraint_default` (if `ALLOW`, all; if + // `DENY`, none). + // + // Example 6 (ListConstraint allowing all): + // `organizations/foo` has a `Policy` with values: + // {allowed_values: "E1" allowed_values: "E2"} + // `projects/bar` has a `Policy` with: + // {all: ALLOW} + // The accepted values at `organizations/foo` are `E1`, E2`. + // Any value is accepted at `projects/bar`. + // + // Example 7 (ListConstraint allowing none): + // `organizations/foo` has a `Policy` with values: + // {allowed_values: "E1" allowed_values: "E2"} + // `projects/bar` has a `Policy` with: + // {all: DENY} + // The accepted values at `organizations/foo` are `E1`, E2`. + // No value is accepted at `projects/bar`. + // + // Example 10 (allowed and denied subtrees of Resource Manager hierarchy): + // Given the following resource hierarchy + // O1->{F1, F2}; F1->{P1}; F2->{P2, P3}, + // `organizations/foo` has a `Policy` with values: + // {allowed_values: "under:organizations/O1"} + // `projects/bar` has a `Policy` with: + // {allowed_values: "under:projects/P3"} + // {denied_values: "under:folders/F2"} + // The accepted values at `organizations/foo` are `organizations/O1`, + // `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`, + // `projects/P3`. + // The accepted values at `projects/bar` are `organizations/O1`, + // `folders/F1`, `projects/P1`. + bool inherit_from_parent = 5; + } + + // Used in `policy_type` to specify how `boolean_policy` will behave at this + // resource. + message BooleanPolicy { + // If `true`, then the `Policy` is enforced. If `false`, then any + // configuration is acceptable. + // + // Suppose you have a `Constraint` + // `constraints/compute.disableSerialPortAccess` with `constraint_default` + // set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following + // behavior: + // - If the `Policy` at this resource has enforced set to `false`, serial + // port connection attempts will be allowed. + // - If the `Policy` at this resource has enforced set to `true`, serial + // port connection attempts will be refused. + // - If the `Policy` at this resource is `RestoreDefault`, serial port + // connection attempts will be allowed. + // - If no `Policy` is set at this resource or anywhere higher in the + // resource hierarchy, serial port connection attempts will be allowed. + // - If no `Policy` is set at this resource, but one exists higher in the + // resource hierarchy, the behavior is as if the`Policy` were set at + // this resource. + // + // The following examples demonstrate the different possible layerings: + // + // Example 1 (nearest `Constraint` wins): + // `organizations/foo` has a `Policy` with: + // {enforced: false} + // `projects/bar` has no `Policy` set. + // The constraint at `projects/bar` and `organizations/foo` will not be + // enforced. + // + // Example 2 (enforcement gets replaced): + // `organizations/foo` has a `Policy` with: + // {enforced: false} + // `projects/bar` has a `Policy` with: + // {enforced: true} + // The constraint at `organizations/foo` is not enforced. + // The constraint at `projects/bar` is enforced. + // + // Example 3 (RestoreDefault): + // `organizations/foo` has a `Policy` with: + // {enforced: true} + // `projects/bar` has a `Policy` with: + // {RestoreDefault: {}} + // The constraint at `organizations/foo` is enforced. + // The constraint at `projects/bar` is not enforced, because + // `constraint_default` for the `Constraint` is `ALLOW`. + bool enforced = 1; + } + + // Ignores policies set above this resource and restores the + // `constraint_default` enforcement behavior of the specific `Constraint` at + // this resource. + // + // Suppose that `constraint_default` is set to `ALLOW` for the + // `Constraint` `constraints/serviceuser.services`. Suppose that organization + // foo.com sets a `Policy` at their Organization resource node that restricts + // the allowed service activations to deny all service activations. They + // could then set a `Policy` with the `policy_type` `restore_default` on + // several experimental projects, restoring the `constraint_default` + // enforcement of the `Constraint` for only those projects, allowing those + // projects to have all services activated. + message RestoreDefault { + + } + + // Version of the `Policy`. Default version is 0; + int32 version = 1; + + // The name of the `Constraint` the `Policy` is configuring, for example, + // `constraints/serviceuser.services`. + // + // Immutable after creation. + string constraint = 2; + + // An opaque tag indicating the current version of the `Policy`, used for + // concurrency control. + // + // When the `Policy` is returned from either a `GetPolicy` or a + // `ListOrgPolicy` request, this `etag` indicates the version of the current + // `Policy` to use when executing a read-modify-write loop. + // + // When the `Policy` is returned from a `GetEffectivePolicy` request, the + // `etag` will be unset. + // + // When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value + // that was returned from a `GetOrgPolicy` request as part of a + // read-modify-write loop for concurrency control. Not setting the `etag`in a + // `SetOrgPolicy` request will result in an unconditional write of the + // `Policy`. + bytes etag = 3; + + // The time stamp the `Policy` was previously updated. This is set by the + // server, not specified by the caller, and represents the last time a call to + // `SetOrgPolicy` was made for that `Policy`. Any value set by the client will + // be ignored. + google.protobuf.Timestamp update_time = 4; + + // The field to populate is based on the `constraint_type` value in the + // `Constraint`. + // `list_constraint` => `list_policy` + // `boolean_constraint` => `boolean_policy` + // + // A `restore_default` message may be used with any `Constraint` type. + // + // Providing a *_policy that is incompatible with the `constraint_type` will + // result in an `invalid_argument` error. + // + // Attempting to set a `Policy` with a `policy_type` not set will result in an + // `invalid_argument` error. + oneof policy_type { + // List of values either allowed or disallowed. + ListPolicy list_policy = 5; + + // For boolean `Constraints`, whether to enforce the `Constraint` or not. + BooleanPolicy boolean_policy = 6; + + // Restores the default behavior of the constraint; independent of + // `Constraint` type. + RestoreDefault restore_default = 7; + } +} diff --git a/google/cloud/osconfig/agentendpoint/v1/BUILD.bazel b/google/cloud/osconfig/agentendpoint/v1/BUILD.bazel new file mode 100644 index 000000000..bcd5045e3 --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1/BUILD.bazel @@ -0,0 +1,354 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "agentendpoint_proto", + srcs = [ + "agentendpoint.proto", + "patch_jobs.proto", + "tasks.proto", + ], + deps = [ + "//google/api:client_proto", + "//google/api:field_behavior_proto", + ], +) + +proto_library_with_info( + name = "agentendpoint_proto_with_info", + deps = [ + ":agentendpoint_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "agentendpoint_java_proto", + deps = [":agentendpoint_proto"], +) + +java_grpc_library( + name = "agentendpoint_java_grpc", + srcs = [":agentendpoint_proto"], + deps = [":agentendpoint_java_proto"], +) + +java_gapic_library( + name = "agentendpoint_java_gapic", + src = ":agentendpoint_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.agentendpoint.v1", + service_yaml = "osconfig_v1.yaml", + test_deps = [ + ":agentendpoint_java_grpc", + ], + deps = [ + ":agentendpoint_java_proto", + ], +) + +java_gapic_test( + name = "agentendpoint_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.osconfig.agentendpoint.v1.AgentEndpointServiceClientTest", + ], + runtime_deps = [":agentendpoint_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-osconfig-agentendpoint-v1-java", + deps = [ + ":agentendpoint_java_gapic", + ":agentendpoint_java_grpc", + ":agentendpoint_java_proto", + ":agentendpoint_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "agentendpoint_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/osconfig/agentendpoint/v1", + protos = [":agentendpoint_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "agentendpoint_go_gapic", + srcs = [":agentendpoint_proto_with_info"], + grpc_service_config = "agentendpoint_grpc_service_config.json", + importpath = "cloud.google.com/go/osconfig/agentendpoint/apiv1;agentendpoint", + service_yaml = "osconfig_v1.yaml", + deps = [ + ":agentendpoint_go_proto", + ], +) + +go_test( + name = "agentendpoint_go_gapic_test", + srcs = [":agentendpoint_go_gapic_srcjar_test"], + embed = [":agentendpoint_go_gapic"], + importpath = "cloud.google.com/go/osconfig/agentendpoint/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-osconfig-agentendpoint-v1-go", + deps = [ + ":agentendpoint_go_gapic", + ":agentendpoint_go_gapic_srcjar-test.srcjar", + ":agentendpoint_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "agentendpoint_moved_proto", + srcs = [":agentendpoint_proto"], + deps = [ + "//google/api:client_proto", + "//google/api:field_behavior_proto", + ], +) + +py_proto_library( + name = "agentendpoint_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":agentendpoint_moved_proto"], +) + +py_grpc_library( + name = "agentendpoint_py_grpc", + srcs = [":agentendpoint_moved_proto"], + deps = [":agentendpoint_py_proto"], +) + +py_gapic_library( + name = "agentendpoint_py_gapic", + src = ":agentendpoint_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.agentendpoint.v1", + service_yaml = "osconfig_v1.yaml", + deps = [ + ":agentendpoint_py_grpc", + ":agentendpoint_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "osconfig-agentendpoint-v1-py", + deps = [ + ":agentendpoint_py_gapic", + ":agentendpoint_py_grpc", + ":agentendpoint_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +# load( +# "@com_google_googleapis_imports//:imports.bzl", +# "php_gapic_assembly_pkg", +# "php_gapic_library", +# "php_grpc_library", +# "php_proto_library", +# ) +# +# php_proto_library( +# name = "agentendpoint_php_proto", +# deps = [":agentendpoint_proto"], +# ) +# +# php_grpc_library( +# name = "agentendpoint_php_grpc", +# srcs = [":agentendpoint_proto"], +# deps = [":agentendpoint_php_proto"], +# ) +# +# php_gapic_library( +# name = "agentendpoint_php_gapic", +# src = ":agentendpoint_proto_with_info", +# gapic_yaml = "osconfig_gapic.yaml", +# package = "google.cloud.osconfig.agentendpoint.v1", +# service_yaml = "osconfig_v1.yaml", +# deps = [ +# ":agentendpoint_php_grpc", +# ":agentendpoint_php_proto", +# ], +# ) +# +# # Open Source Packages +# php_gapic_assembly_pkg( +# name = "google-cloud-osconfig-agentendpoint-v1-php", +# deps = [ +# ":agentendpoint_php_gapic", +# ":agentendpoint_php_grpc", +# ":agentendpoint_php_proto", +# ], +# ) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "agentendpoint_nodejs_gapic", + src = ":agentendpoint_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.agentendpoint.v1", + service_yaml = "osconfig_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "osconfig-agentendpoint-v1-nodejs", + deps = [ + ":agentendpoint_nodejs_gapic", + ":agentendpoint_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "agentendpoint_ruby_proto", + deps = [":agentendpoint_proto"], +) + +ruby_grpc_library( + name = "agentendpoint_ruby_grpc", + srcs = [":agentendpoint_proto"], + deps = [":agentendpoint_ruby_proto"], +) + +ruby_gapic_library( + name = "agentendpoint_ruby_gapic", + src = ":agentendpoint_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.agentendpoint.v1", + service_yaml = "osconfig_v1.yaml", + deps = [ + ":agentendpoint_ruby_grpc", + ":agentendpoint_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-osconfig-agentendpoint-v1-ruby", + deps = [ + ":agentendpoint_ruby_gapic", + ":agentendpoint_ruby_grpc", + ":agentendpoint_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "agentendpoint_csharp_proto", + deps = [":agentendpoint_proto"], +) + +csharp_grpc_library( + name = "agentendpoint_csharp_grpc", + srcs = [":agentendpoint_proto"], + deps = [":agentendpoint_csharp_proto"], +) + +csharp_gapic_library( + name = "agentendpoint_csharp_gapic", + src = ":agentendpoint_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.agentendpoint.v1", + service_yaml = "osconfig_v1.yaml", + deps = [ + ":agentendpoint_csharp_grpc", + ":agentendpoint_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-osconfig-agentendpoint-v1-csharp", + deps = [ + ":agentendpoint_csharp_gapic", + ":agentendpoint_csharp_grpc", + ":agentendpoint_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto b/google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto new file mode 100644 index 000000000..58b9cb4d6 --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto @@ -0,0 +1,180 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.agentendpoint.v1; + +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/osconfig/agentendpoint/v1/tasks.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/agentendpoint/v1;agentendpoint"; +option java_multiple_files = true; +option java_outer_classname = "AgentEndpointProto"; +option java_package = "com.google.cloud.osconfig.agentendpoint.v1"; + +// OS Config agent endpoint API. +service AgentEndpointService { + option (google.api.default_host) = "osconfig.googleapis.com"; + + // Stream established by client to receive Task notifications. + rpc ReceiveTaskNotification(ReceiveTaskNotificationRequest) returns (stream ReceiveTaskNotificationResponse) { + option (google.api.method_signature) = "instance_id_token,agent_version"; + } + + // Signals the start of a task execution and returns the task info. + rpc StartNextTask(StartNextTaskRequest) returns (StartNextTaskResponse) { + option (google.api.method_signature) = "instance_id_token"; + } + + // Signals an intermediary progress checkpoint in task execution. + rpc ReportTaskProgress(ReportTaskProgressRequest) returns (ReportTaskProgressResponse) { + option (google.api.method_signature) = "instance_id_token,task_id,task_type"; + } + + // Signals that the task execution is complete and optionally returns the next + // task. + rpc ReportTaskComplete(ReportTaskCompleteRequest) returns (ReportTaskCompleteResponse) { + option (google.api.method_signature) = "instance_id_token,task_id,task_type,error_message"; + } + + // Registers the agent running on the VM. + rpc RegisterAgent(RegisterAgentRequest) returns (RegisterAgentResponse) { + option (google.api.method_signature) = "instance_id_token,agent_version,supported_capabilities"; + } +} + +// A request message to receive task notifications. +message ReceiveTaskNotificationRequest { + // Required. This is the Compute Engine instance identity token described in + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + // where the audience is 'osconfig.googleapis.com' and the format is 'full'. + string instance_id_token = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The version of the agent making the request. + string agent_version = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The streaming rpc message that notifies the agent when it has a task +// that it needs to perform on the VM instance. +message ReceiveTaskNotificationResponse { + +} + +// A request message for signaling the start of a task execution. +message StartNextTaskRequest { + // Required. This is the Compute Engine instance identity token described in + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + // where the audience is 'osconfig.googleapis.com' and the format is 'full'. + string instance_id_token = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// A response message that contains the details of the task to work on. +message StartNextTaskResponse { + // The details of the task that should be worked on. Can be empty if there + // is no new task to work on. + Task task = 1; +} + +// A request message for reporting the progress of current task. +message ReportTaskProgressRequest { + // Required. This is the Compute Engine instance identity token described in + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + // where the audience is 'osconfig.googleapis.com' and the format is 'full'. + string instance_id_token = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Unique identifier of the task this applies to. + string task_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of task to report progress on. + // + // Progress must include the appropriate message based on this enum as + // specified below: + // APPLY_PATCHES = ApplyPatchesTaskProgress + // EXEC_STEP = Progress not supported for this type. + TaskType task_type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Intermediate progress of the current task. + oneof progress { + // Details about the progress of the apply patches task. + ApplyPatchesTaskProgress apply_patches_task_progress = 4; + + // Details about the progress of the exec step task. + ExecStepTaskProgress exec_step_task_progress = 5; + } +} + +// The response message after the agent reported the current task progress. +message ReportTaskProgressResponse { + // Instructs agent to continue or not. + TaskDirective task_directive = 1; +} + +// A request message for signaling the completion of a task execution. +message ReportTaskCompleteRequest { + // Required. This is the Compute Engine instance identity token described in + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + // where the audience is 'osconfig.googleapis.com' and the format is 'full'. + string instance_id_token = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Unique identifier of the task this applies to. + string task_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of task to report completed. + // + // The output must include the appropriate message based on the following + // enum values: + // APPLY_PATCHES = ApplyPatchesTaskOutput + // EXEC_STEP = ExecStepTaskOutput + TaskType task_type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Descriptive error message if the task execution ended in error. + string error_message = 4; + + // Final output details of the current task. + oneof output { + // Final output details of the apply patches task; + ApplyPatchesTaskOutput apply_patches_task_output = 5; + + // Final output details of the exec step task; + ExecStepTaskOutput exec_step_task_output = 6; + } +} + +// The response message after the agent signaled the current task complete. +message ReportTaskCompleteResponse { + +} + +// The request message for registering the agent. +message RegisterAgentRequest { + // Required. This is the Compute Engine instance identity token described in + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + // where the audience is 'osconfig.googleapis.com' and the format is 'full'. + string instance_id_token = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The version of the agent. + string agent_version = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The capabilities supported by the agent. Supported values are: + // PATCH_GA + // GUEST_POLICY_BETA + repeated string supported_capabilities = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The response message after the agent registered. +message RegisterAgentResponse { + +} diff --git a/google/cloud/osconfig/agentendpoint/v1/agentendpoint_grpc_service_config.json b/google/cloud/osconfig/agentendpoint/v1/agentendpoint_grpc_service_config.json new file mode 100644 index 000000000..38756d46e --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1/agentendpoint_grpc_service_config.json @@ -0,0 +1,34 @@ +{ + "methodConfig": [{ + "name": [{ "service": "google.cloud.osconfig.agentendpoint.v1.AgentEndpointService" }], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE"] + } + },{ + "name": [ + { + "service": "google.cloud.osconfig.agentendpoint.v1.AgentEndpointService", + "method": "ReceiveTaskNotification" + } + ], + "timeout": "3600s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "CANCELLED", + "ABORTED", + "INTERNAL", + "UNAVAILABLE" + ] + } + }] +} diff --git a/google/cloud/osconfig/agentendpoint/v1/osconfig_gapic.legacy.yaml b/google/cloud/osconfig/agentendpoint/v1/osconfig_gapic.legacy.yaml new file mode 100644 index 000000000..6e6362512 --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1/osconfig_gapic.legacy.yaml @@ -0,0 +1,148 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.osconfig.agentendpoint.v1 + python: + package_name: google.cloud.osconfig.agentendpoint_v1.gapic + go: + package_name: cloud.google.com/go/osconfig/agentendpoint/apiv1 + csharp: + package_name: Google.Cloud.OsConfig.Agentendpoint.V1 + ruby: + package_name: Google::Cloud::OsConfig::Agentendpoint::V1 + php: + package_name: Google\Cloud\OsConfig\Agentendpoint\V1 + nodejs: + package_name: agentendpoint.v1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.osconfig.agentendpoint.v1.AgentEndpointService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ReceiveTaskNotification + flattening: + groups: + - parameters: + - instance_id_token + - agent_version + required_fields: + - instance_id_token + - agent_version + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: StartNextTask + flattening: + groups: + - parameters: + - instance_id_token + required_fields: + - instance_id_token + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: ReportTaskProgress + flattening: + groups: + - parameters: + - instance_id_token + - task_id + - task_type + required_fields: + - instance_id_token + - task_id + - task_type + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: ReportTaskComplete + flattening: + groups: + - parameters: + - instance_id_token + - task_id + - task_type + - error_message + required_fields: + - instance_id_token + - task_id + - task_type + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/cloud/osconfig/agentendpoint/v1/osconfig_gapic.yaml b/google/cloud/osconfig/agentendpoint/v1/osconfig_gapic.yaml new file mode 100644 index 000000000..40ddcf764 --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1/osconfig_gapic.yaml @@ -0,0 +1,22 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.osconfig.agentendpoint.v1 + python: + package_name: google.cloud.osconfig.agentendpoint_v1.gapic + go: + package_name: cloud.google.com/go/osconfig/agentendpoint/apiv1 + csharp: + package_name: Google.Cloud.OsConfig.Agentendpoint.V1 + ruby: + package_name: Google::Cloud::OsConfig::Agentendpoint::V1 + php: + package_name: Google\Cloud\OsConfig\Agentendpoint\V1 + nodejs: + package_name: agentendpoint.v1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.osconfig.agentendpoint.v1.AgentEndpointService diff --git a/google/cloud/osconfig/agentendpoint/v1/osconfig_v1.yaml b/google/cloud/osconfig/agentendpoint/v1/osconfig_v1.yaml new file mode 100644 index 000000000..f3f7d4432 --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1/osconfig_v1.yaml @@ -0,0 +1,19 @@ +type: google.api.Service +config_version: 3 +name: osconfig.googleapis.com +title: Cloud OS Config API + +apis: +- name: google.cloud.osconfig.agentendpoint.v1.AgentEndpointService + +documentation: + summary: |- + OS management tools that can be used for patch management, patch + compliance, and configuration management on VM instances. + +backend: + rules: + - selector: 'google.cloud.osconfig.agentendpoint.v1.AgentEndpointService.*' + deadline: 30.0 + - selector: google.cloud.osconfig.agentendpoint.v1.AgentEndpointService.ReceiveTaskNotification + deadline: 3600.0 diff --git a/google/cloud/osconfig/agentendpoint/v1/patch_jobs.proto b/google/cloud/osconfig/agentendpoint/v1/patch_jobs.proto new file mode 100644 index 000000000..8f37db3f8 --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1/patch_jobs.proto @@ -0,0 +1,288 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.agentendpoint.v1; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/agentendpoint/v1;agentendpoint"; +option java_outer_classname = "PatchJobs"; +option java_package = "com.google.cloud.osconfig.agentendpoint.v1"; + +// Patch configuration specifications. Contains details on how to +// apply patches to a VM instance. +message PatchConfig { + // Post-patch reboot settings. + enum RebootConfig { + // The default behavior is DEFAULT. + REBOOT_CONFIG_UNSPECIFIED = 0; + + // The agent decides if a reboot is necessary by checking + // signals such as registry keys on Windows or `/var/run/reboot-required` on + // APT based systems. On RPM based systems, a set of core system package + // install times are compared with system boot time. + DEFAULT = 1; + + // Always reboot the machine after the update completes. + ALWAYS = 2; + + // Never reboot the machine after the update completes. + NEVER = 3; + } + + // Post-patch reboot settings. + RebootConfig reboot_config = 1; + + // Retry strategy can be defined to have the agent retry patching + // during the window if patching fails. If omitted, the agent will use its + // default retry strategy. + RetryStrategy retry_strategy = 2; + + // Apt update settings. Use this override the default apt patch rules. + AptSettings apt = 3; + + // Yum update settings. Use this override the default yum patch rules. + YumSettings yum = 4; + + // Goo update settings. Use this override the default goo patch rules. + GooSettings goo = 5; + + // Zypper update settings. Use this override the default zypper patch rules. + ZypperSettings zypper = 6; + + // Windows update settings. Use this override the default windows patch rules. + WindowsUpdateSettings windows_update = 7; + + // The ExecStep to run before the patch update. + ExecStep pre_step = 8; + + // The ExecStep to run after the patch update. + ExecStep post_step = 9; +} + +// Apt patching will be performed by executing `apt-get update && apt-get +// upgrade`. Additional options can be set to control how this is executed. +message AptSettings { + // Apt patch type. + enum Type { + // By default, upgrade will be performed. + TYPE_UNSPECIFIED = 0; + + // Runs `apt-get dist-upgrade`. + DIST = 1; + + // Runs `apt-get upgrade`. + UPGRADE = 2; + } + + // By changing the type to DIST, the patching will be performed + // using `apt-get dist-upgrade` instead. + Type type = 1; + + // List of packages to exclude from update. + repeated string excludes = 2; + + // An exclusive list of packages to be updated. These are the only packages + // that will be updated. If these packages are not installed, they will be + // ignored. This field cannot be specified with any other patch configuration + // fields. + repeated string exclusive_packages = 3; +} + +// Yum patching will be performed by executing `yum update`. Additional options +// can be set to control how this is executed. +// +// Note that not all settings are supported on all platforms. +message YumSettings { + // Adds the `--security` flag to `yum update`. Not supported on + // all platforms. + bool security = 1; + + // Will cause patch to run `yum update-minimal` instead. + bool minimal = 2; + + // List of packages to exclude from update. These packages will be excluded by + // using the yum `--exclude` flag. + repeated string excludes = 3; + + // An exclusive list of packages to be updated. These are the only packages + // that will be updated. If these packages are not installed, they will be + // ignored. This field must not be specified with any other patch + // configuration fields. + repeated string exclusive_packages = 4; +} + +// Googet patching is performed by running `googet update`. +message GooSettings { + +} + +// Zypper patching is performed by running `zypper patch`. +// See also https://en.opensuse.org/SDB:Zypper_manual. +message ZypperSettings { + // Adds the `--with-optional` flag to `zypper patch`. + bool with_optional = 1; + + // Adds the `--with-update` flag, to `zypper patch`. + bool with_update = 2; + + // Install only patches with these categories. + // Common categories include security, recommended, and feature. + repeated string categories = 3; + + // Install only patches with these severities. + // Common severities include critical, important, moderate, and low. + repeated string severities = 4; + + // List of patches to exclude from update. + repeated string excludes = 5; + + // An exclusive list of patches to be updated. These are the only patches + // that will be installed using 'zypper patch patch:' command. + // This field must not be used with any other patch configuration fields. + repeated string exclusive_patches = 6; +} + +// Windows patching is performed using the Windows Update Agent. +message WindowsUpdateSettings { + // Microsoft Windows update classifications as defined in + // [1] + // https://support.microsoft.com/en-us/help/824684/description-of-the-standard-terminology-that-is-used-to-describe-micro + enum Classification { + // Invalid. If classifications are included, they must be specified. + CLASSIFICATION_UNSPECIFIED = 0; + + // "A widely released fix for a specific problem that addresses a critical, + // non-security-related bug." [1] + CRITICAL = 1; + + // "A widely released fix for a product-specific, security-related + // vulnerability. Security vulnerabilities are rated by their severity. The + // severity rating is indicated in the Microsoft security bulletin as + // critical, important, moderate, or low." [1] + SECURITY = 2; + + // "A widely released and frequent software update that contains additions + // to a product’s definition database. Definition databases are often used + // to detect objects that have specific attributes, such as malicious code, + // phishing websites, or junk mail." [1] + DEFINITION = 3; + + // "Software that controls the input and output of a device." [1] + DRIVER = 4; + + // "New product functionality that is first distributed outside the context + // of a product release and that is typically included in the next full + // product release." [1] + FEATURE_PACK = 5; + + // "A tested, cumulative set of all hotfixes, security updates, critical + // updates, and updates. Additionally, service packs may contain additional + // fixes for problems that are found internally since the release of the + // product. Service packs my also contain a limited number of + // customer-requested design changes or features." [1] + SERVICE_PACK = 6; + + // "A utility or feature that helps complete a task or set of tasks." [1] + TOOL = 7; + + // "A tested, cumulative set of hotfixes, security updates, critical + // updates, and updates that are packaged together for easy deployment. A + // rollup generally targets a specific area, such as security, or a + // component of a product, such as Internet Information Services (IIS)." [1] + UPDATE_ROLLUP = 8; + + // "A widely released fix for a specific problem. An update addresses a + // noncritical, non-security-related bug." [1] + UPDATE = 9; + } + + // Only apply updates of these windows update classifications. If empty, all + // updates will be applied. + repeated Classification classifications = 1; + + // List of KBs to exclude from update. + repeated string excludes = 2; + + // An exclusive list of kbs to be updated. These are the only patches + // that will be updated. This field must not be used with other + // patch configurations. + repeated string exclusive_patches = 3; +} + +// The strategy for retrying failed patches during the patch window. +message RetryStrategy { + // If true, the agent will continue to try and patch until the window has + // ended. + bool enabled = 1; +} + +// A step that runs an executable for a PatchJob. +message ExecStep { + // The ExecStepConfig for all Linux VMs targeted by the PatchJob. + ExecStepConfig linux_exec_step_config = 1; + + // The ExecStepConfig for all Windows VMs targeted by the PatchJob. + ExecStepConfig windows_exec_step_config = 2; +} + +// Common configurations for an ExecStep. +message ExecStepConfig { + // The interpreter used to execute the a file. + enum Interpreter { + // Invalid for a Windows ExecStepConfig. For a Linux ExecStepConfig, the + // interpreter will be parsed from the shebang line of the script if + // unspecified. + INTERPRETER_UNSPECIFIED = 0; + + // Indicates that the script will be run with /bin/sh on Linux and cmd + // on windows. + SHELL = 1; + + // Indicates that the file will be run with PowerShell. + POWERSHELL = 2; + } + + // Location of the executable. + oneof executable { + // An absolute path to the executable on the VM. + string local_path = 1; + + // A GCS object containing the executable. + GcsObject gcs_object = 2; + } + + // Defaults to [0]. A list of possible return values that the + // execution can return to indicate a success. + repeated int32 allowed_success_codes = 3; + + // The script interpreter to use to run the script. If no interpreter is + // specified the script will be executed directly, which will likely + // only succeed for scripts with shebang lines. + // [Wikipedia shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)). + Interpreter interpreter = 4; +} + +// GCS object representation. +message GcsObject { + // Bucket of the GCS object. + string bucket = 1; + + // Name of the GCS object. + string object = 2; + + // Generation number of the GCS object. This is used to ensure that the + // ExecStep specified by this PatchJob does not change. + int64 generation_number = 3; +} diff --git a/google/cloud/osconfig/agentendpoint/v1/tasks.proto b/google/cloud/osconfig/agentendpoint/v1/tasks.proto new file mode 100644 index 000000000..426dc22f1 --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1/tasks.proto @@ -0,0 +1,179 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.agentendpoint.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/osconfig/agentendpoint/v1/patch_jobs.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/agentendpoint/v1;agentendpoint"; +option java_outer_classname = "Tasks"; +option java_package = "com.google.cloud.osconfig.agentendpoint.v1"; + +// Specifies the current agent behavior. +enum TaskDirective { + // Unspecified is invalid. + TASK_DIRECTIVE_UNSPECIFIED = 0; + + // The task should continue to progress. + CONTINUE = 1; + + // Task should not be started, or if already in progress, should stop + // at first safe stopping point. Task should be considered done and will + // never repeat. + STOP = 2; +} + +// Specifies the type of task to perform. +enum TaskType { + // Unspecified is invalid. + TASK_TYPE_UNSPECIFIED = 0; + + // The apply patches task. + APPLY_PATCHES = 1; + + // The exec step task. + EXEC_STEP_TASK = 2; +} + +// A unit of work to be performed by the agent. +message Task { + // Unique task id. + string task_id = 1; + + // The type of task to perform. + // + // Task details must include the appropriate message based on this enum as + // specified below: + // APPLY_PATCHES = ApplyPatchesTask + // EXEC_STEP = ExecStepTask; + TaskType task_type = 2; + + // Current directive to the agent. + TaskDirective task_directive = 3; + + // Specific details about the current task to perform. + oneof task_details { + // Details about the apply patches task to perform. + ApplyPatchesTask apply_patches_task = 4; + + // Details about the exec step task to perform. + ExecStepTask exec_step_task = 5; + } + + // Labels describing the task. Used for logging by the agent. + map service_labels = 6; +} + +// Message which instructs agent to apply patches. +message ApplyPatchesTask { + // Specific information about how patches should be applied. + PatchConfig patch_config = 1; + + // If true, the agent will report its status as it goes through the motions + // but won't actually run any updates or perform any reboots. + bool dry_run = 3; +} + +// Information reported from the agent about applying patches execution. +message ApplyPatchesTaskProgress { + // The intermediate states of applying patches. + enum State { + // Unspecified is invalid. + STATE_UNSPECIFIED = 0; + + // The agent has started the patch task. + STARTED = 4; + + // The agent is currently downloading patches. + DOWNLOADING_PATCHES = 1; + + // The agent is currently applying patches. + APPLYING_PATCHES = 2; + + // The agent is currently rebooting the VM instance. + REBOOTING = 3; + } + + // Required. The current state of this patch execution. + State state = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Information reported from the agent about applying patches execution. +message ApplyPatchesTaskOutput { + // The final states of applying patches. + enum State { + // Unspecified is invalid. + STATE_UNSPECIFIED = 0; + + // Applying patches completed successfully. + SUCCEEDED = 1; + + // Applying patches completed successfully, but a reboot is required. + SUCCEEDED_REBOOT_REQUIRED = 2; + + // Applying patches failed. + FAILED = 3; + } + + // Required. The final state of this task. + State state = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Message which instructs agent to execute the following command. +message ExecStepTask { + // Details of the exec step to run. + ExecStep exec_step = 1; +} + +// Information reported from the agent about the exec step execution. +message ExecStepTaskProgress { + // The intermediate states of exec steps. + enum State { + // Unspecified is invalid. + STATE_UNSPECIFIED = 0; + + // The agent has started the exec step task. + STARTED = 1; + } + + // Required. The current state of this exec step. + State state = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Information reported from the agent about the exec step execution. +message ExecStepTaskOutput { + // The final states of exec steps. + enum State { + // Unspecified is invalid. + STATE_UNSPECIFIED = 0; + + // The exec step completed normally. + COMPLETED = 1; + + // The exec step was terminated because it took too long. + TIMED_OUT = 2; + + // The exec step task was cancelled before it started. + CANCELLED = 3; + } + + // Required. The final state of the exec step. + State state = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The exit code received from the script which ran as part of the exec step. + int32 exit_code = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/google/cloud/osconfig/agentendpoint/v1beta/BUILD.bazel b/google/cloud/osconfig/agentendpoint/v1beta/BUILD.bazel new file mode 100644 index 000000000..f1d590e9b --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1beta/BUILD.bazel @@ -0,0 +1,357 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "agentendpoint_proto", + srcs = [ + "agentendpoint.proto", + "guest_policies.proto", + "patch_jobs.proto", + "tasks.proto", + ], + deps = [ + "//google/api:client_proto", + "//google/api:field_behavior_proto", + ], +) + +proto_library_with_info( + name = "agentendpoint_proto_with_info", + deps = [ + ":agentendpoint_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "agentendpoint_java_proto", + deps = [":agentendpoint_proto"], +) + +java_grpc_library( + name = "agentendpoint_java_grpc", + srcs = [":agentendpoint_proto"], + deps = [":agentendpoint_java_proto"], +) + +java_gapic_library( + name = "agentendpoint_java_gapic", + src = ":agentendpoint_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.agentendpoint.v1beta", + service_yaml = "osconfig_v1beta.yaml", + test_deps = [ + ":agentendpoint_java_grpc", + ], + deps = [ + ":agentendpoint_java_proto", + ], +) + +java_gapic_test( + name = "agentendpoint_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.osconfig.agentendpoint.v1beta.AgentEndpointServiceClientTest", + ], + runtime_deps = [":agentendpoint_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-osconfig-agentendpoint-v1beta-java", + deps = [ + ":agentendpoint_java_gapic", + ":agentendpoint_java_grpc", + ":agentendpoint_java_proto", + ":agentendpoint_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "agentendpoint_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/osconfig/agentendpoint/v1beta", + protos = [":agentendpoint_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "agentendpoint_go_gapic", + srcs = [":agentendpoint_proto_with_info"], + grpc_service_config = "agentendpoint_grpc_service_config.json", + importpath = "cloud.google.com/go/osconfig/agentendpoint/apiv1beta;agentendpoint", + service_yaml = "osconfig_v1beta.yaml", + deps = [ + ":agentendpoint_go_proto", + ], +) + +go_test( + name = "agentendpoint_go_gapic_test", + srcs = [":agentendpoint_go_gapic_srcjar_test"], + embed = [":agentendpoint_go_gapic"], + importpath = "cloud.google.com/go/osconfig/agentendpoint/apiv1beta", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-osconfig-agentendpoint-v1beta-go", + deps = [ + ":agentendpoint_go_gapic", + ":agentendpoint_go_gapic_srcjar-test.srcjar", + ":agentendpoint_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "agentendpoint_moved_proto", + srcs = [":agentendpoint_proto"], + deps = [ + "//google/api:client_proto", + "//google/api:field_behavior_proto", + ], +) + +py_proto_library( + name = "agentendpoint_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":agentendpoint_moved_proto"], +) + +py_grpc_library( + name = "agentendpoint_py_grpc", + srcs = [":agentendpoint_moved_proto"], + deps = [":agentendpoint_py_proto"], +) + +py_gapic_library( + name = "agentendpoint_py_gapic", + src = ":agentendpoint_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.agentendpoint.v1beta", + service_yaml = "osconfig_v1beta.yaml", + deps = [ + ":agentendpoint_py_grpc", + ":agentendpoint_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "osconfig-agentendpoint-v1beta-py", + deps = [ + ":agentendpoint_py_gapic", + ":agentendpoint_py_grpc", + ":agentendpoint_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "agentendpoint_php_proto", + deps = [":agentendpoint_proto"], +) + +php_grpc_library( + name = "agentendpoint_php_grpc", + srcs = [":agentendpoint_proto"], + deps = [":agentendpoint_php_proto"], +) + +# Add api.http options to all RPCs in the services to enable PHP GAPIC +# generation +#php_gapic_library( +# name = "agentendpoint_php_gapic", +# src = ":agentendpoint_proto_with_info", +# gapic_yaml = "osconfig_gapic.yaml", +# package = "google.cloud.osconfig.agentendpoint.v1beta", +# service_yaml = "osconfig_v1beta.yaml", +# deps = [ +# ":agentendpoint_php_grpc", +# ":agentendpoint_php_proto", +# ], +#) +# +## Open Source Packages +#php_gapic_assembly_pkg( +# name = "google-cloud-osconfig-agentendpoint-v1beta-php", +# deps = [ +# ":agentendpoint_php_gapic", +# ":agentendpoint_php_grpc", +# ":agentendpoint_php_proto", +# ], +#) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "agentendpoint_nodejs_gapic", + src = ":agentendpoint_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.agentendpoint.v1beta", + service_yaml = "osconfig_v1beta.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "osconfig-agentendpoint-v1beta-nodejs", + deps = [ + ":agentendpoint_nodejs_gapic", + ":agentendpoint_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "agentendpoint_ruby_proto", + deps = [":agentendpoint_proto"], +) + +ruby_grpc_library( + name = "agentendpoint_ruby_grpc", + srcs = [":agentendpoint_proto"], + deps = [":agentendpoint_ruby_proto"], +) + +ruby_gapic_library( + name = "agentendpoint_ruby_gapic", + src = ":agentendpoint_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.agentendpoint.v1beta", + service_yaml = "osconfig_v1beta.yaml", + deps = [ + ":agentendpoint_ruby_grpc", + ":agentendpoint_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-osconfig-agentendpoint-v1beta-ruby", + deps = [ + ":agentendpoint_ruby_gapic", + ":agentendpoint_ruby_grpc", + ":agentendpoint_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "agentendpoint_csharp_proto", + deps = [":agentendpoint_proto"], +) + +csharp_grpc_library( + name = "agentendpoint_csharp_grpc", + srcs = [":agentendpoint_proto"], + deps = [":agentendpoint_csharp_proto"], +) + +csharp_gapic_library( + name = "agentendpoint_csharp_gapic", + src = ":agentendpoint_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.agentendpoint.v1beta", + service_yaml = "osconfig_v1beta.yaml", + deps = [ + ":agentendpoint_csharp_grpc", + ":agentendpoint_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-osconfig-agentendpoint-v1beta-csharp", + deps = [ + ":agentendpoint_csharp_gapic", + ":agentendpoint_csharp_grpc", + ":agentendpoint_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/osconfig/agentendpoint/v1beta/agentendpoint.proto b/google/cloud/osconfig/agentendpoint/v1beta/agentendpoint.proto new file mode 100644 index 000000000..88982c7c2 --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1beta/agentendpoint.proto @@ -0,0 +1,187 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.agentendpoint.v1beta; + +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/osconfig/agentendpoint/v1beta/guest_policies.proto"; +import "google/cloud/osconfig/agentendpoint/v1beta/tasks.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/agentendpoint/v1beta;agentendpoint"; +option java_multiple_files = true; +option java_outer_classname = "AgentEndpointProto"; +option java_package = "com.google.cloud.osconfig.agentendpoint.v1beta"; + +// OS Config agent endpoint API. +service AgentEndpointService { + option (google.api.default_host) = "osconfig.googleapis.com"; + + // Stream established by client to receive Task notifications. + rpc ReceiveTaskNotification(ReceiveTaskNotificationRequest) returns (stream ReceiveTaskNotificationResponse) { + option (google.api.method_signature) = "instance_id_token,agent_version"; + } + + // Signals the start of a task execution and returns the task info. + rpc StartNextTask(StartNextTaskRequest) returns (StartNextTaskResponse) { + option (google.api.method_signature) = "instance_id_token"; + } + + // Signals an intermediary progress checkpoint in task execution. + rpc ReportTaskProgress(ReportTaskProgressRequest) returns (ReportTaskProgressResponse) { + option (google.api.method_signature) = "instance_id_token,task_id,task_type"; + } + + // Signals that the task execution is complete and optionally returns the next + // task. + rpc ReportTaskComplete(ReportTaskCompleteRequest) returns (ReportTaskCompleteResponse) { + option (google.api.method_signature) = "instance_id_token,task_id,task_type,error_message"; + } + + // Lookup the effective guest policy that applies to a VM instance. This + // lookup merges all policies that are assigned to the instance ancestry. + rpc LookupEffectiveGuestPolicy(LookupEffectiveGuestPolicyRequest) returns (EffectiveGuestPolicy) { + option (google.api.method_signature) = "instance_id_token,os_short_name,os_version,os_architecture"; + } + + // Registers the agent running on the VM. + rpc RegisterAgent(RegisterAgentRequest) returns (RegisterAgentResponse) { + option (google.api.method_signature) = "instance_id_token,agent_version,supported_capabilities"; + } +} + +// A request message to receive task notifications. +message ReceiveTaskNotificationRequest { + // Required. This is the Compute Engine instance identity token described in + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + // where the audience is 'osconfig.googleapis.com' and the format is 'full'. + string instance_id_token = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The version of the agent making the request. + string agent_version = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The streaming rpc message that notifies the agent when it has a task +// that it needs to perform on the VM instance. +message ReceiveTaskNotificationResponse { + +} + +// A request message for signaling the start of a task execution. +message StartNextTaskRequest { + // Required. This is the Compute Engine instance identity token described in + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + // where the audience is 'osconfig.googleapis.com' and the format is 'full'. + string instance_id_token = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// A response message that contains the details of the task to work on. +message StartNextTaskResponse { + // The details of the task that should be worked on. Can be empty if there + // is no new task to work on. + Task task = 1; +} + +// A request message for reporting the progress of current task. +message ReportTaskProgressRequest { + // Required. This is the Compute Engine instance identity token described in + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + // where the audience is 'osconfig.googleapis.com' and the format is 'full'. + string instance_id_token = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Unique identifier of the task this applies to. + string task_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of task to report progress on. + // + // Progress must include the appropriate message based on this enum as + // specified below: + // APPLY_PATCHES = ApplyPatchesTaskProgress + // EXEC_STEP = Progress not supported for this type. + TaskType task_type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Intermediate progress of the current task. + oneof progress { + // Details about the progress of the apply patches task. + ApplyPatchesTaskProgress apply_patches_task_progress = 4; + + // Details about the progress of the exec step task. + ExecStepTaskProgress exec_step_task_progress = 5; + } +} + +// The response message after the agent reported the current task progress. +message ReportTaskProgressResponse { + // Instructs agent to continue or not. + TaskDirective task_directive = 1; +} + +// A request message for signaling the completion of a task execution. +message ReportTaskCompleteRequest { + // Required. This is the Compute Engine instance identity token described in + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + // where the audience is 'osconfig.googleapis.com' and the format is 'full'. + string instance_id_token = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Unique identifier of the task this applies to. + string task_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of task to report completed. + // + // The output must include the appropriate message based on the following + // enum values: + // APPLY_PATCHES = ApplyPatchesTaskOutput + // EXEC_STEP = ExecStepTaskOutput + TaskType task_type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Descriptive error message if the task execution ended in error. + string error_message = 4; + + // Final output details of the current task. + oneof output { + // Final output details of the apply patches task; + ApplyPatchesTaskOutput apply_patches_task_output = 5; + + // Final output details of the exec step task; + ExecStepTaskOutput exec_step_task_output = 6; + } +} + +// The response message after the agent signaled the current task complete. +message ReportTaskCompleteResponse { + +} + +// The request message for registering the agent. +message RegisterAgentRequest { + // Required. This is the Compute Engine instance identity token described in + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + // where the audience is 'osconfig.googleapis.com' and the format is 'full'. + string instance_id_token = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The version of the agent. + string agent_version = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The capabilities supported by the agent. Supported values are: + // PATCH_GA + // GUEST_POLICY_BETA + repeated string supported_capabilities = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The response message after the agent registered. +message RegisterAgentResponse { + +} diff --git a/google/cloud/osconfig/agentendpoint/v1beta/agentendpoint_grpc_service_config.json b/google/cloud/osconfig/agentendpoint/v1beta/agentendpoint_grpc_service_config.json new file mode 100644 index 000000000..0831402de --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1beta/agentendpoint_grpc_service_config.json @@ -0,0 +1,34 @@ +{ + "methodConfig": [{ + "name": [{ "service": "google.cloud.osconfig.agentendpoint.v1beta.AgentEndpointService" }], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE"] + } + },{ + "name": [ + { + "service": "google.cloud.osconfig.agentendpoint.v1beta.AgentEndpointService", + "method": "ReceiveTaskNotification" + } + ], + "timeout": "3600s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "CANCELLED", + "ABORTED", + "INTERNAL", + "UNAVAILABLE" + ] + } + }] +} diff --git a/google/cloud/osconfig/agentendpoint/v1beta/artman_osconfig_v1beta.yaml b/google/cloud/osconfig/agentendpoint/v1beta/artman_osconfig_v1beta.yaml new file mode 100644 index 000000000..383d1f242 --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1beta/artman_osconfig_v1beta.yaml @@ -0,0 +1,16 @@ +common: + api_name: osconfig + api_version: v1beta + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - . + service_yaml: osconfig_v1beta.yaml + gapic_yaml: osconfig_gapic.yaml +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: go_gapic + type: GAPIC + language: GO diff --git a/google/cloud/osconfig/agentendpoint/v1beta/guest_policies.proto b/google/cloud/osconfig/agentendpoint/v1beta/guest_policies.proto new file mode 100644 index 000000000..cb0d2fe83 --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1beta/guest_policies.proto @@ -0,0 +1,561 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.agentendpoint.v1beta; + +import "google/api/field_behavior.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/agentendpoint/v1beta;agentendpoint"; +option java_outer_classname = "GuestPolicies"; +option java_package = "com.google.cloud.osconfig.agentendpoint.v1beta"; + +// The desired state that the OS Config agent will maintain on the VM. +enum DesiredState { + // The default is to ensure the package is installed. + DESIRED_STATE_UNSPECIFIED = 0; + + // The agent ensures that the package is installed. + INSTALLED = 1; + + // The agent ensures that the package is installed and + // periodically checks for and install any updates. + UPDATED = 2; + + // The agent ensures that the package is not installed and uninstall it + // if detected. + REMOVED = 3; +} + +// Package is a reference to the software package to be installed or removed. +// The agent on the VM instance uses the system package manager to apply the +// config. +// +// +// These are the commands that the agent uses to install or remove +// packages. +// +// Apt +// install: `apt-get update && apt-get -y install package1 package2 package3` +// remove: `apt-get -y remove package1 package2 package3` +// +// Yum +// install: `yum -y install package1 package2 package3` +// remove: `yum -y remove package1 package2 package3` +// +// Zypper +// install: `zypper install package1 package2 package3` +// remove: `zypper rm package1 package2` +// +// Googet +// install: `googet -noconfirm install package1 package2 package3` +// remove: `googet -noconfirm remove package1 package2 package3` +message Package { + // Types of package managers that may be used to manage this package. + enum Manager { + // The default behavior is ANY. + MANAGER_UNSPECIFIED = 0; + + // Apply this package config using the default system package manager. + ANY = 1; + + // Apply this package config only if Apt is available on the system. + APT = 2; + + // Apply this package config only if Yum is available on the system. + YUM = 3; + + // Apply this package config only if Zypper is available on the system. + ZYPPER = 4; + + // Apply this package config only if GooGet is available on the system. + GOO = 5; + } + + // The name of the package. A package is uniquely identified for conflict + // validation by checking the package name and the manager(s) that the + // package targets. + string name = 1; + + // The desired_state the agent should maintain for this package. The + // default is to ensure the package is installed. + DesiredState desired_state = 2; + + // Type of package manager that can be used to install this package. + // If a system does not have the package manager, the package is not + // installed or removed no error message is returned. By default, + // or if you specify `ANY`, + // the agent attempts to install and remove this package using the default + // package manager. This is useful when creating a policy that applies to + // different types of systems. + // + // The default behavior is ANY. + Manager manager = 3; +} + +// Represents a single Apt package repository. This repository is added to +// a repo file that is stored at +// `/etc/apt/sources.list.d/google_osconfig.list`. +message AptRepository { + // Type of archive. + enum ArchiveType { + // Unspecified. + ARCHIVE_TYPE_UNSPECIFIED = 0; + + // DEB indicates that the archive contains binary files. + DEB = 1; + + // DEB_SRC indicates that the archive contains source files. + DEB_SRC = 2; + } + + // Type of archive files in this repository. The default behavior is DEB. + ArchiveType archive_type = 1; + + // URI for this repository. + string uri = 2; + + // Distribution of this repository. + string distribution = 3; + + // List of components for this repository. Must contain at least one item. + repeated string components = 4; + + // URI of the key file for this repository. The agent maintains + // a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing + // all the keys in any applied guest policy. + string gpg_key = 5; +} + +// Represents a single Yum package repository. This repository is added to a +// repo file that is stored at `/etc/yum.repos.d/google_osconfig.repo`. +message YumRepository { + // A one word, unique name for this repository. This is + // the `repo id` in the Yum config file and also the `display_name` if + // `display_name` is omitted. This id is also used as the unique identifier + // when checking for guest policy conflicts. + string id = 1; + + // The display name of the repository. + string display_name = 2; + + // The location of the repository directory. + string base_url = 3; + + // URIs of GPG keys. + repeated string gpg_keys = 4; +} + +// Represents a single Zypper package repository. This repository is added to a +// repo file that is stored at `/etc/zypp/repos.d/google_osconfig.repo`. +message ZypperRepository { + // A one word, unique name for this repository. This is + // the `repo id` in the zypper config file and also the `display_name` if + // `display_name` is omitted. This id is also used as the unique identifier + // when checking for guest policy conflicts. + string id = 1; + + // The display name of the repository. + string display_name = 2; + + // The location of the repository directory. + string base_url = 3; + + // URIs of GPG keys. + repeated string gpg_keys = 4; +} + +// Represents a Goo package repository. These is added to a repo file +// that is stored at C:/ProgramData/GooGet/repos/google_osconfig.repo. +message GooRepository { + // The name of the repository. + string name = 1; + + // The url of the repository. + string url = 2; +} + +// A package repository. +message PackageRepository { + // A specific type of repository. + oneof repository { + // An Apt Repository. + AptRepository apt = 1; + + // A Yum Repository. + YumRepository yum = 2; + + // A Zypper Repository. + ZypperRepository zypper = 3; + + // A Goo Repository. + GooRepository goo = 4; + } +} + +// A software recipe is a set of instructions for installing and configuring a +// piece of software. It consists of a set of artifacts that are +// downloaded, and a set of steps that install, configure, and/or update the +// software. +// +// Recipes support installing and updating software from artifacts in the +// following formats: +// Zip archive, Tar archive, Windows MSI, Debian package, and RPM package. +// +// Additionally, recipes support executing a script (either defined in a file or +// directly in this api) in bash, sh, cmd, and powershell. +// +// Updating a software recipe +// +// If a recipe is assigned to an instance and there is a recipe with the same +// name but a lower version already installed and the assigned state +// of the recipe is `INSTALLED_KEEP_UPDATED`, then the recipe is updated to +// the new version. +// +// Script Working Directories +// +// Each script or execution step is run in its own temporary directory which +// is deleted after completing the step. +message SoftwareRecipe { + // Specifies a resource to be used in the recipe. + message Artifact { + // Specifies an artifact available via some URI. + message Remote { + // URI from which to fetch the object. It should contain both the protocol + // and path following the format {protocol}://{location}. + string uri = 1; + + // Must be provided if `allow_insecure` is `false`. + // SHA256 checksum in hex format, to compare to the checksum of the + // artifact. If the checksum is not empty and it doesn't match the + // artifact then the recipe installation fails before running any of the + // steps. + string checksum = 2; + } + + // Specifies an artifact available as a Cloud Storage object. + message Gcs { + // Bucket of the Cloud Storage object. + // Given an example URL: + // `https://storage.googleapis.com/my-bucket/foo/bar#1234567` + // this value would be `my-bucket`. + string bucket = 1; + + // Name of the Cloud Storage object. + // As specified [here] + // (https://cloud.google.com/storage/docs/naming#objectnames) + // Given an example URL: + // `https://storage.googleapis.com/my-bucket/foo/bar#1234567` + // this value would be `foo/bar`. + string object = 2; + + // Must be provided if allow_insecure is false. + // Generation number of the Cloud Storage object. + // `https://storage.googleapis.com/my-bucket/foo/bar#1234567` + // this value would be `1234567`. + int64 generation = 3; + } + + // Id of the artifact, which the installation and update steps of this + // recipe can reference. Artifacts in a recipe cannot have the same id. + string id = 1; + + // A specific type of artifact. + oneof artifact { + // A generic remote artifact. + Remote remote = 2; + + // A Cloud Storage artifact. + Gcs gcs = 3; + } + + // Defaults to false. When false, recipes are subject to validations + // based on the artifact type: + // + // Remote: A checksum must be specified, and only protocols with + // transport-layer security are permitted. + // GCS: An object generation number must be specified. + bool allow_insecure = 4; + } + + // An action that can be taken as part of installing or updating a recipe. + message Step { + // Copies the artifact to the specified path on the instance. + message CopyFile { + // The id of the relevant artifact in the recipe. + string artifact_id = 1; + + // The absolute path on the instance to put the file. + string destination = 2; + + // Whether to allow this step to overwrite existing files. If this is + // false and the file already exists the file is not overwritten + // and the step is considered a success. Defaults to false. + bool overwrite = 3; + + // Consists of three octal digits which represent, in + // order, the permissions of the owner, group, and other users for the + // file (similarly to the numeric mode used in the linux chmod utility). + // Each digit represents a three bit number with the 4 bit + // corresponding to the read permissions, the 2 bit corresponds to the + // write bit, and the one bit corresponds to the execute permission. + // Default behavior is 755. + // + // Below are some examples of permissions and their associated values: + // read, write, and execute: 7 + // read and execute: 5 + // read and write: 6 + // read only: 4 + string permissions = 4; + } + + // Extracts an archive of the type specified in the specified directory. + message ExtractArchive { + // Specifying the type of archive. + enum ArchiveType { + // Indicates that the archive type isn't specified. + ARCHIVE_TYPE_UNSPECIFIED = 0; + + // Indicates that the archive is a tar archive with no encryption. + TAR = 1; + + // Indicates that the archive is a tar archive with gzip encryption. + TAR_GZIP = 2; + + // Indicates that the archive is a tar archive with bzip encryption. + TAR_BZIP = 3; + + // Indicates that the archive is a tar archive with lzma encryption. + TAR_LZMA = 4; + + // Indicates that the archive is a tar archive with xz encryption. + TAR_XZ = 5; + + // Indicates that the archive is a zip archive. + ZIP = 11; + } + + // The id of the relevant artifact in the recipe. + string artifact_id = 1; + + // Directory to extract archive to. + // Defaults to `/` on Linux or `C:\` on Windows. + string destination = 2; + + // The type of the archive to extract. + ArchiveType type = 3; + } + + // Installs an MSI file. + message InstallMsi { + // The id of the relevant artifact in the recipe. + string artifact_id = 1; + + // The flags to use when installing the MSI + // defaults to ["/i"] (i.e. the install flag). + repeated string flags = 2; + + // Return codes that indicate that the software installed or updated + // successfully. Behaviour defaults to [0] + repeated int32 allowed_exit_codes = 3; + } + + // Installs a deb via dpkg. + message InstallDpkg { + // The id of the relevant artifact in the recipe. + string artifact_id = 1; + } + + // Installs an rpm file via the rpm utility. + message InstallRpm { + // The id of the relevant artifact in the recipe. + string artifact_id = 1; + } + + // Executes an artifact or local file. + message ExecFile { + // Location of the file to execute. + oneof location_type { + // The id of the relevant artifact in the recipe. + string artifact_id = 1; + + // The absolute path of the file on the local filesystem. + string local_path = 2; + } + + // Arguments to be passed to the provided executable. + repeated string args = 3; + + // Defaults to [0]. A list of possible return values that the program + // can return to indicate a success. + repeated int32 allowed_exit_codes = 4; + } + + // Runs a script through an interpreter. + message RunScript { + // The interpreter used to execute a script. + enum Interpreter { + // Default value for ScriptType. + INTERPRETER_UNSPECIFIED = 0; + + // Indicates that the script is run with `/bin/sh` on Linux and `cmd` + // on windows. + SHELL = 1; + + // Indicates that the script is run with powershell. + POWERSHELL = 3; + } + + // The shell script to be executed. + string script = 1; + + // Return codes that indicate that the software installed or updated + // successfully. Behaviour defaults to [0] + repeated int32 allowed_exit_codes = 2; + + // The script interpreter to use to run the script. If no interpreter is + // specified the script is executed directly, which likely + // only succeed for scripts with + // [shebang lines](https://en.wikipedia.org/wiki/Shebang_(Unix)). + Interpreter interpreter = 3; + } + + // A specific type of step. + oneof step { + // Copies a file onto the instance. + CopyFile file_copy = 1; + + // Extracts an archive into the specified directory. + ExtractArchive archive_extraction = 2; + + // Installs an MSI file. + InstallMsi msi_installation = 3; + + // Installs a deb file via dpkg. + InstallDpkg dpkg_installation = 4; + + // Installs an rpm file via the rpm utility. + InstallRpm rpm_installation = 5; + + // Executes an artifact or local file. + ExecFile file_exec = 6; + + // Runs commands in a shell. + RunScript script_run = 7; + } + } + + // Unique identifier for the recipe. Only one recipe with a given name is + // installed on an instance. + // + // Names are also used to identify resources which helps to determine whether + // guest policies have conflicts. This means that requests to create multiple + // recipes with the same name and version are rejected since they + // could potentially have conflicting assignments. + string name = 1; + + // The version of this software recipe. Version can be up to 4 period + // separated numbers (e.g. 12.34.56.78). + string version = 2; + + // Resources available to be used in the steps in the recipe. + repeated Artifact artifacts = 3; + + // Actions to be taken for installing this recipe. On failure it stops + // executing steps and does not attempt another installation. Any steps taken + // (including partially completed steps) are not rolled back. Install steps + // must be specified and are used on first installation. + repeated Step install_steps = 4; + + // Actions to be taken for updating this recipe. On failure it stops + // executing steps and does not attempt another update for this recipe. Any + // steps taken (including partially completed steps) are not rolled back. + // Upgrade steps are not mandatory and are only used when upgrading. + repeated Step update_steps = 5; + + // Default is INSTALLED. The desired state the agent should maintain for this + // recipe. + // + // INSTALLED: The software recipe is installed on the instance but won't be + // updated to new versions. + // UPDATED: The software recipe is installed on the instance. The recipe is + // updated to a higher version, if a higher version of + // the recipe is assigned to this instance. + // REMOVE: Remove is unsupported for software recipes and attempts to + // create or update a recipe to the REMOVE state is rejected. + DesiredState desired_state = 6; +} + +// A request message for getting effective policy assigned to the instance. +message LookupEffectiveGuestPolicyRequest { + // Required. This is the GCE instance identity token described in + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + // where the audience is 'osconfig.googleapis.com' and the format is 'full'. + string instance_id_token = 1 [(google.api.field_behavior) = REQUIRED]; + + // Short name of the OS running on the instance. The OS Config agent only + // provideS this field for targeting if OS Inventory is enabled for that + // instance. + string os_short_name = 2; + + // Version of the OS running on the instance. The OS Config agent only + // provide this field for targeting if OS Inventory is enabled for that + // VM instance. + string os_version = 3; + + // Architecture of OS running on the instance. The OS Config agent only + // provide this field for targeting if OS Inventory is enabled for that + // instance. + string os_architecture = 4; +} + +// The effective guest policy assigned to the instance. +message EffectiveGuestPolicy { + // A guest policy package including its source. + message SourcedPackage { + // Name of the guest policy providing this config. + string source = 1; + + // A software package to configure on the VM instance. + Package package = 2; + } + + // A guest policy package repository including its source. + message SourcedPackageRepository { + // Name of the guest policy providing this config. + string source = 1; + + // A software package repository to configure on the VM instance. + PackageRepository package_repository = 2; + } + + // A guest policy recipe including its source. + message SourcedSoftwareRecipe { + // Name of the guest policy providing this config. + string source = 1; + + // A software recipe to configure on the VM instance. + SoftwareRecipe software_recipe = 2; + } + + // List of package configurations assigned to the VM instance. + repeated SourcedPackage packages = 1; + + // List of package repository configurations assigned to the VM instance. + repeated SourcedPackageRepository package_repositories = 2; + + // List of recipes assigned to the VM instance. + repeated SourcedSoftwareRecipe software_recipes = 3; +} diff --git a/google/cloud/osconfig/agentendpoint/v1beta/osconfig_gapic.legacy.yaml b/google/cloud/osconfig/agentendpoint/v1beta/osconfig_gapic.legacy.yaml new file mode 100644 index 000000000..08c8ca3ba --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1beta/osconfig_gapic.legacy.yaml @@ -0,0 +1,148 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.osconfig.agentendpoint.v1beta + python: + package_name: google.cloud.osconfig.agentendpoint_v1beta.gapic + go: + package_name: cloud.google.com/go/osconfig/agentendpoint/apiv1beta + csharp: + package_name: Google.Cloud.OsConfig.Agentendpoint.V1beta + ruby: + package_name: Google::Cloud::OsConfig::Agentendpoint::V1beta + php: + package_name: Google\Cloud\OsConfig\Agentendpoint\V1beta + nodejs: + package_name: agentendpoint.v1beta +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.osconfig.agentendpoint.v1beta.AgentEndpointService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ReceiveTaskNotification + flattening: + groups: + - parameters: + - instance_id_token + - agent_version + required_fields: + - instance_id_token + - agent_version + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: StartNextTask + flattening: + groups: + - parameters: + - instance_id_token + required_fields: + - instance_id_token + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: ReportTaskProgress + flattening: + groups: + - parameters: + - instance_id_token + - task_id + - task_type + required_fields: + - instance_id_token + - task_id + - task_type + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: ReportTaskComplete + flattening: + groups: + - parameters: + - instance_id_token + - task_id + - task_type + - error_message + required_fields: + - instance_id_token + - task_id + - task_type + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/cloud/osconfig/agentendpoint/v1beta/osconfig_gapic.yaml b/google/cloud/osconfig/agentendpoint/v1beta/osconfig_gapic.yaml new file mode 100644 index 000000000..d7beb5840 --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1beta/osconfig_gapic.yaml @@ -0,0 +1,42 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.osconfig.agentendpoint.v1beta + python: + package_name: google.cloud.osconfig.agentendpoint_v1beta.gapic + go: + package_name: cloud.google.com/go/osconfig/agentendpoint/apiv1beta + csharp: + package_name: Google.Cloud.OsConfig.Agentendpoint.V1beta + ruby: + package_name: Google::Cloud::OsConfig::Agentendpoint::V1beta + php: + package_name: Google\Cloud\OsConfig\Agentendpoint\V1beta + nodejs: + package_name: agentendpoint.v1beta +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.osconfig.agentendpoint.v1beta.AgentEndpointService + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + methods: + - name: ReceiveTaskNotification + retry_codes_name: idempotent + - name: StartNextTask + retry_codes_name: idempotent + - name: ReportTaskProgress + retry_codes_name: idempotent + - name: ReportTaskComplete + retry_codes_name: idempotent + - name: LookupEffectiveGuestPolicy + retry_codes_name: idempotent + - name: RegisterAgent + retry_codes_name: idempotent diff --git a/google/cloud/osconfig/agentendpoint/v1beta/osconfig_v1beta.yaml b/google/cloud/osconfig/agentendpoint/v1beta/osconfig_v1beta.yaml new file mode 100644 index 000000000..18814a339 --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1beta/osconfig_v1beta.yaml @@ -0,0 +1,19 @@ +type: google.api.Service +config_version: 3 +name: osconfig.googleapis.com +title: Cloud OS Config API + +apis: +- name: google.cloud.osconfig.agentendpoint.v1beta.AgentEndpointService + +documentation: + summary: |- + OS management tools that can be used for patch management, patch + compliance, and configuration management on VM instances. + +backend: + rules: + - selector: 'google.cloud.osconfig.agentendpoint.v1beta.AgentEndpointService.*' + deadline: 30.0 + - selector: google.cloud.osconfig.agentendpoint.v1beta.AgentEndpointService.ReceiveTaskNotification + deadline: 3600.0 diff --git a/google/cloud/osconfig/agentendpoint/v1beta/patch_jobs.proto b/google/cloud/osconfig/agentendpoint/v1beta/patch_jobs.proto new file mode 100644 index 000000000..73d67305a --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1beta/patch_jobs.proto @@ -0,0 +1,288 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.agentendpoint.v1beta; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/agentendpoint/v1beta;agentendpoint"; +option java_outer_classname = "PatchJobs"; +option java_package = "com.google.cloud.osconfig.agentendpoint.v1beta"; + +// Patch configuration specifications. Contains details on how to +// apply patches to a VM instance. +message PatchConfig { + // Post-patch reboot settings. + enum RebootConfig { + // The default behavior is DEFAULT. + REBOOT_CONFIG_UNSPECIFIED = 0; + + // The agent decides if a reboot is necessary by checking + // signals such as registry keys on Windows or `/var/run/reboot-required` on + // APT based systems. On RPM based systems, a set of core system package + // install times are compared with system boot time. + DEFAULT = 1; + + // Always reboot the machine after the update completes. + ALWAYS = 2; + + // Never reboot the machine after the update completes. + NEVER = 3; + } + + // Post-patch reboot settings. + RebootConfig reboot_config = 1; + + // Retry strategy can be defined to have the agent retry patching + // during the window if patching fails. If omitted, the agent will use its + // default retry strategy. + RetryStrategy retry_strategy = 2; + + // Apt update settings. Use this override the default apt patch rules. + AptSettings apt = 3; + + // Yum update settings. Use this override the default yum patch rules. + YumSettings yum = 4; + + // Goo update settings. Use this override the default goo patch rules. + GooSettings goo = 5; + + // Zypper update settings. Use this override the default zypper patch rules. + ZypperSettings zypper = 6; + + // Windows update settings. Use this override the default windows patch rules. + WindowsUpdateSettings windows_update = 7; + + // The ExecStep to run before the patch update. + ExecStep pre_step = 8; + + // The ExecStep to run after the patch update. + ExecStep post_step = 9; +} + +// Apt patching will be performed by executing `apt-get update && apt-get +// upgrade`. Additional options can be set to control how this is executed. +message AptSettings { + // Apt patch type. + enum Type { + // By default, upgrade will be performed. + TYPE_UNSPECIFIED = 0; + + // Runs `apt-get dist-upgrade`. + DIST = 1; + + // Runs `apt-get upgrade`. + UPGRADE = 2; + } + + // By changing the type to DIST, the patching will be performed + // using `apt-get dist-upgrade` instead. + Type type = 1; + + // List of packages to exclude from update. + repeated string excludes = 2; + + // An exclusive list of packages to be updated. These are the only packages + // that will be updated. If these packages are not installed, they will be + // ignored. This field cannot be specified with any other patch configuration + // fields. + repeated string exclusive_packages = 3; +} + +// Yum patching will be performed by executing `yum update`. Additional options +// can be set to control how this is executed. +// +// Note that not all settings are supported on all platforms. +message YumSettings { + // Adds the `--security` flag to `yum update`. Not supported on + // all platforms. + bool security = 1; + + // Will cause patch to run `yum update-minimal` instead. + bool minimal = 2; + + // List of packages to exclude from update. These packages will be excluded by + // using the yum `--exclude` flag. + repeated string excludes = 3; + + // An exclusive list of packages to be updated. These are the only packages + // that will be updated. If these packages are not installed, they will be + // ignored. This field must not be specified with any other patch + // configuration fields. + repeated string exclusive_packages = 4; +} + +// Googet patching is performed by running `googet update`. +message GooSettings { + +} + +// Zypper patching is performed by running `zypper patch`. +// See also https://en.opensuse.org/SDB:Zypper_manual. +message ZypperSettings { + // Adds the `--with-optional` flag to `zypper patch`. + bool with_optional = 1; + + // Adds the `--with-update` flag, to `zypper patch`. + bool with_update = 2; + + // Install only patches with these categories. + // Common categories include security, recommended, and feature. + repeated string categories = 3; + + // Install only patches with these severities. + // Common severities include critical, important, moderate, and low. + repeated string severities = 4; + + // List of patches to exclude from update. + repeated string excludes = 5; + + // An exclusive list of patches to be updated. These are the only patches + // that will be installed using 'zypper patch patch:' command. + // This field must not be used with any other patch configuration fields. + repeated string exclusive_patches = 6; +} + +// Windows patching is performed using the Windows Update Agent. +message WindowsUpdateSettings { + // Microsoft Windows update classifications as defined in + // [1] + // https://support.microsoft.com/en-us/help/824684/description-of-the-standard-terminology-that-is-used-to-describe-micro + enum Classification { + // Invalid. If classifications are included, they must be specified. + CLASSIFICATION_UNSPECIFIED = 0; + + // "A widely released fix for a specific problem that addresses a critical, + // non-security-related bug." [1] + CRITICAL = 1; + + // "A widely released fix for a product-specific, security-related + // vulnerability. Security vulnerabilities are rated by their severity. The + // severity rating is indicated in the Microsoft security bulletin as + // critical, important, moderate, or low." [1] + SECURITY = 2; + + // "A widely released and frequent software update that contains additions + // to a product’s definition database. Definition databases are often used + // to detect objects that have specific attributes, such as malicious code, + // phishing websites, or junk mail." [1] + DEFINITION = 3; + + // "Software that controls the input and output of a device." [1] + DRIVER = 4; + + // "New product functionality that is first distributed outside the context + // of a product release and that is typically included in the next full + // product release." [1] + FEATURE_PACK = 5; + + // "A tested, cumulative set of all hotfixes, security updates, critical + // updates, and updates. Additionally, service packs may contain additional + // fixes for problems that are found internally since the release of the + // product. Service packs my also contain a limited number of + // customer-requested design changes or features." [1] + SERVICE_PACK = 6; + + // "A utility or feature that helps complete a task or set of tasks." [1] + TOOL = 7; + + // "A tested, cumulative set of hotfixes, security updates, critical + // updates, and updates that are packaged together for easy deployment. A + // rollup generally targets a specific area, such as security, or a + // component of a product, such as Internet Information Services (IIS)." [1] + UPDATE_ROLLUP = 8; + + // "A widely released fix for a specific problem. An update addresses a + // noncritical, non-security-related bug." [1] + UPDATE = 9; + } + + // Only apply updates of these windows update classifications. If empty, all + // updates will be applied. + repeated Classification classifications = 1; + + // List of KBs to exclude from update. + repeated string excludes = 2; + + // An exclusive list of kbs to be updated. These are the only patches + // that will be updated. This field must not be used with other + // patch configurations. + repeated string exclusive_patches = 3; +} + +// The strategy for retrying failed patches during the patch window. +message RetryStrategy { + // If true, the agent will continue to try and patch until the window has + // ended. + bool enabled = 1; +} + +// A step that runs an executable for a PatchJob. +message ExecStep { + // The ExecStepConfig for all Linux VMs targeted by the PatchJob. + ExecStepConfig linux_exec_step_config = 1; + + // The ExecStepConfig for all Windows VMs targeted by the PatchJob. + ExecStepConfig windows_exec_step_config = 2; +} + +// Common configurations for an ExecStep. +message ExecStepConfig { + // The interpreter used to execute the a file. + enum Interpreter { + // Invalid for a Windows ExecStepConfig. For a Linux ExecStepConfig, the + // interpreter will be parsed from the shebang line of the script if + // unspecified. + INTERPRETER_UNSPECIFIED = 0; + + // Indicates that the script will be run with /bin/sh on Linux and cmd + // on windows. + SHELL = 1; + + // Indicates that the file will be run with PowerShell. + POWERSHELL = 2; + } + + // Location of the executable. + oneof executable { + // An absolute path to the executable on the VM. + string local_path = 1; + + // A GCS object containing the executable. + GcsObject gcs_object = 2; + } + + // Defaults to [0]. A list of possible return values that the + // execution can return to indicate a success. + repeated int32 allowed_success_codes = 3; + + // The script interpreter to use to run the script. If no interpreter is + // specified the script will be executed directly, which will likely + // only succeed for scripts with shebang lines. + // [Wikipedia shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)). + Interpreter interpreter = 4; +} + +// GCS object representation. +message GcsObject { + // Bucket of the GCS object. + string bucket = 1; + + // Name of the GCS object. + string object = 2; + + // Generation number of the GCS object. This is used to ensure that the + // ExecStep specified by this PatchJob does not change. + int64 generation_number = 3; +} diff --git a/google/cloud/osconfig/agentendpoint/v1beta/tasks.proto b/google/cloud/osconfig/agentendpoint/v1beta/tasks.proto new file mode 100644 index 000000000..e5ad39f83 --- /dev/null +++ b/google/cloud/osconfig/agentendpoint/v1beta/tasks.proto @@ -0,0 +1,179 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.agentendpoint.v1beta; + +import "google/api/field_behavior.proto"; +import "google/cloud/osconfig/agentendpoint/v1beta/patch_jobs.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/agentendpoint/v1beta;agentendpoint"; +option java_outer_classname = "Tasks"; +option java_package = "com.google.cloud.osconfig.agentendpoint.v1beta"; + +// Specifies the current agent behavior. +enum TaskDirective { + // Unspecified is invalid. + TASK_DIRECTIVE_UNSPECIFIED = 0; + + // The task should continue to progress. + CONTINUE = 1; + + // Task should not be started, or if already in progress, should stop + // at first safe stopping point. Task should be considered done and will + // never repeat. + STOP = 2; +} + +// Specifies the type of task to perform. +enum TaskType { + // Unspecified is invalid. + TASK_TYPE_UNSPECIFIED = 0; + + // The apply patches task. + APPLY_PATCHES = 1; + + // The exec step task. + EXEC_STEP_TASK = 2; +} + +// A unit of work to be performed by the agent. +message Task { + // Unique task id. + string task_id = 1; + + // The type of task to perform. + // + // Task details must include the appropriate message based on this enum as + // specified below: + // APPLY_PATCHES = ApplyPatchesTask + // EXEC_STEP = ExecStepTask; + TaskType task_type = 2; + + // Current directive to the agent. + TaskDirective task_directive = 3; + + // Specific details about the current task to perform. + oneof task_details { + // Details about the apply patches task to perform. + ApplyPatchesTask apply_patches_task = 4; + + // Details about the exec step task to perform. + ExecStepTask exec_step_task = 5; + } + + // Labels describing the task. Used for logging by the agent. + map service_labels = 6; +} + +// Message which instructs agent to apply patches. +message ApplyPatchesTask { + // Specific information about how patches should be applied. + PatchConfig patch_config = 1; + + // If true, the agent will report its status as it goes through the motions + // but won't actually run any updates or perform any reboots. + bool dry_run = 3; +} + +// Information reported from the agent about applying patches execution. +message ApplyPatchesTaskProgress { + // The intermediate states of applying patches. + enum State { + // Unspecified is invalid. + STATE_UNSPECIFIED = 0; + + // The agent has started the patch task. + STARTED = 4; + + // The agent is currently downloading patches. + DOWNLOADING_PATCHES = 1; + + // The agent is currently applying patches. + APPLYING_PATCHES = 2; + + // The agent is currently rebooting the VM instance. + REBOOTING = 3; + } + + // Required. The current state of this patch execution. + State state = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Information reported from the agent about applying patches execution. +message ApplyPatchesTaskOutput { + // The final states of applying patches. + enum State { + // Unspecified is invalid. + STATE_UNSPECIFIED = 0; + + // Applying patches completed successfully. + SUCCEEDED = 1; + + // Applying patches completed successfully, but a reboot is required. + SUCCEEDED_REBOOT_REQUIRED = 2; + + // Applying patches failed. + FAILED = 3; + } + + // Required. The final state of this task. + State state = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Message which instructs agent to execute the following command. +message ExecStepTask { + // Details of the exec step to run. + ExecStep exec_step = 1; +} + +// Information reported from the agent about the exec step execution. +message ExecStepTaskProgress { + // The intermediate states of exec steps. + enum State { + // Unspecified is invalid. + STATE_UNSPECIFIED = 0; + + // The agent has started the exec step task. + STARTED = 1; + } + + // Required. The current state of this exec step. + State state = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Information reported from the agent about the exec step execution. +message ExecStepTaskOutput { + // The final states of exec steps. + enum State { + // Unspecified is invalid. + STATE_UNSPECIFIED = 0; + + // The exec step completed normally. + COMPLETED = 1; + + // The exec step was terminated because it took too long. + TIMED_OUT = 2; + + // The exec step task was cancelled before it started. + CANCELLED = 3; + } + + // Required. The final state of the exec step. + State state = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The exit code received from the script which ran as part of the exec step. + int32 exit_code = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/google/cloud/osconfig/v1/BUILD.bazel b/google/cloud/osconfig/v1/BUILD.bazel new file mode 100644 index 000000000..6dc29a2c0 --- /dev/null +++ b/google/cloud/osconfig/v1/BUILD.bazel @@ -0,0 +1,374 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "osconfig_proto", + srcs = [ + "osconfig_service.proto", + "patch_deployments.proto", + "patch_jobs.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/type:datetime_proto", + "//google/type:dayofweek_proto", + "//google/type:timeofday_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "osconfig_proto_with_info", + deps = [ + ":osconfig_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "osconfig_java_proto", + deps = [":osconfig_proto"], +) + +java_grpc_library( + name = "osconfig_java_grpc", + srcs = [":osconfig_proto"], + deps = [":osconfig_java_proto"], +) + +java_gapic_library( + name = "osconfig_java_gapic", + src = ":osconfig_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.v1", + service_yaml = "osconfig_v1.yaml", + test_deps = [ + ":osconfig_java_grpc", + ], + deps = [ + ":osconfig_java_proto", + ], +) + +java_gapic_test( + name = "osconfig_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.osconfig.v1.OsConfigServiceClientTest", + ], + runtime_deps = [":osconfig_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-osconfig-v1-java", + deps = [ + ":osconfig_java_gapic", + ":osconfig_java_grpc", + ":osconfig_java_proto", + ":osconfig_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "osconfig_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/osconfig/v1", + protos = [":osconfig_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/type:datetime_go_proto", + "//google/type:dayofweek_go_proto", + "//google/type:timeofday_go_proto", + ], +) + +go_gapic_library( + name = "osconfig_go_gapic", + srcs = [":osconfig_proto_with_info"], + grpc_service_config = "osconfig_grpc_service_config.json", + importpath = "cloud.google.com/go/osconfig/apiv1;osconfig", + service_yaml = "osconfig_v1.yaml", + deps = [ + ":osconfig_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +go_test( + name = "osconfig_go_gapic_test", + srcs = [":osconfig_go_gapic_srcjar_test"], + embed = [":osconfig_go_gapic"], + importpath = "cloud.google.com/go/osconfig/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-osconfig-v1-go", + deps = [ + ":osconfig_go_gapic", + ":osconfig_go_gapic_srcjar-test.srcjar", + ":osconfig_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "osconfig_moved_proto", + srcs = [":osconfig_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/type:datetime_proto", + "//google/type:dayofweek_proto", + "//google/type:timeofday_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "osconfig_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":osconfig_moved_proto"], +) + +py_grpc_library( + name = "osconfig_py_grpc", + srcs = [":osconfig_moved_proto"], + deps = [":osconfig_py_proto"], +) + +py_gapic_library( + name = "osconfig_py_gapic", + src = ":osconfig_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.v1", + service_yaml = "osconfig_v1.yaml", + deps = [ + ":osconfig_py_grpc", + ":osconfig_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "osconfig-v1-py", + deps = [ + ":osconfig_py_gapic", + ":osconfig_py_grpc", + ":osconfig_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "osconfig_php_proto", + deps = [":osconfig_proto"], +) + +php_grpc_library( + name = "osconfig_php_grpc", + srcs = [":osconfig_proto"], + deps = [":osconfig_php_proto"], +) + +php_gapic_library( + name = "osconfig_php_gapic", + src = ":osconfig_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.v1", + service_yaml = "osconfig_v1.yaml", + deps = [ + ":osconfig_php_grpc", + ":osconfig_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-osconfig-v1-php", + deps = [ + ":osconfig_php_gapic", + ":osconfig_php_grpc", + ":osconfig_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "osconfig_nodejs_gapic", + src = ":osconfig_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.v1", + service_yaml = "osconfig_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "osconfig-v1-nodejs", + deps = [ + ":osconfig_nodejs_gapic", + ":osconfig_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "osconfig_ruby_proto", + deps = [":osconfig_proto"], +) + +ruby_grpc_library( + name = "osconfig_ruby_grpc", + srcs = [":osconfig_proto"], + deps = [":osconfig_ruby_proto"], +) + +ruby_gapic_library( + name = "osconfig_ruby_gapic", + src = ":osconfig_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.v1", + service_yaml = "osconfig_v1.yaml", + deps = [ + ":osconfig_ruby_grpc", + ":osconfig_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-osconfig-v1-ruby", + deps = [ + ":osconfig_ruby_gapic", + ":osconfig_ruby_grpc", + ":osconfig_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "osconfig_csharp_proto", + deps = [":osconfig_proto"], +) + +csharp_grpc_library( + name = "osconfig_csharp_grpc", + srcs = [":osconfig_proto"], + deps = [":osconfig_csharp_proto"], +) + +csharp_gapic_library( + name = "osconfig_csharp_gapic", + src = ":osconfig_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.v1", + service_yaml = "osconfig_v1.yaml", + deps = [ + ":osconfig_csharp_grpc", + ":osconfig_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-osconfig-v1-csharp", + deps = [ + ":osconfig_csharp_gapic", + ":osconfig_csharp_grpc", + ":osconfig_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/osconfig/v1/osconfig_gapic.legacy.yaml b/google/cloud/osconfig/v1/osconfig_gapic.legacy.yaml new file mode 100644 index 000000000..099916fbe --- /dev/null +++ b/google/cloud/osconfig/v1/osconfig_gapic.legacy.yaml @@ -0,0 +1,19 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.osconfig.v1 + python: + package_name: google.cloud.osconfig_v1.gapic + go: + package_name: cloud.google.com/go/osconfig/apiv1 + csharp: + package_name: Google.Cloud.OsConfig.V1 + ruby: + package_name: Google::Cloud::OsConfig::V1 + php: + package_name: Google\Cloud\OsConfig\V1 + nodejs: + package_name: osconfig.v1 + domain_layer_location: google-cloud diff --git a/google/cloud/osconfig/v1/osconfig_gapic.yaml b/google/cloud/osconfig/v1/osconfig_gapic.yaml new file mode 100644 index 000000000..dd81d6a9d --- /dev/null +++ b/google/cloud/osconfig/v1/osconfig_gapic.yaml @@ -0,0 +1,19 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.osconfig.v1 + python: + package_name: google.cloud.osconfig_v1.gapic + go: + package_name: cloud.google.com/go/osconfig/apiv1 + csharp: + package_name: Google.Cloud.OsConfig.V1 + ruby: + package_name: Google::Cloud::OsConfig::V1 + php: + package_name: Google\Cloud\OsConfig\V1 + nodejs: + package_name: osconfig.v1 + domain_layer_location: google-cloud diff --git a/google/cloud/osconfig/v1/osconfig_grpc_service_config.json b/google/cloud/osconfig/v1/osconfig_grpc_service_config.json new file mode 100644 index 000000000..4e198ad14 --- /dev/null +++ b/google/cloud/osconfig/v1/osconfig_grpc_service_config.json @@ -0,0 +1,13 @@ +{ + "methodConfig": [{ + "name": [{ "service": "google.cloud.osconfig.v1.OsConfigService" }], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE"] + } + }] +} diff --git a/google/cloud/osconfig/v1/osconfig_service.proto b/google/cloud/osconfig/v1/osconfig_service.proto new file mode 100644 index 000000000..2a654eaa2 --- /dev/null +++ b/google/cloud/osconfig/v1/osconfig_service.proto @@ -0,0 +1,119 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1/patch_deployments.proto"; +import "google/cloud/osconfig/v1/patch_jobs.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_outer_classname = "OsConfigProto"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Instance" + pattern: "projects/{project}/zones/{zone}/instances/{instance}" +}; + +// OS Config API +// +// The OS Config service is a server-side component that you can use to +// manage package installations and patch jobs for virtual machine instances. +service OsConfigService { + option (google.api.default_host) = "osconfig.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Patch VM instances by creating and running a patch job. + rpc ExecutePatchJob(ExecutePatchJobRequest) returns (PatchJob) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/patchJobs:execute" + body: "*" + }; + } + + // Get the patch job. This can be used to track the progress of an + // ongoing patch job or review the details of completed jobs. + rpc GetPatchJob(GetPatchJobRequest) returns (PatchJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/patchJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Cancel a patch job. The patch job must be active. Canceled patch jobs + // cannot be restarted. + rpc CancelPatchJob(CancelPatchJobRequest) returns (PatchJob) { + option (google.api.http) = { + post: "/v1/{name=projects/*/patchJobs/*}:cancel" + body: "*" + }; + } + + // Get a list of patch jobs. + rpc ListPatchJobs(ListPatchJobsRequest) returns (ListPatchJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/patchJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Get a list of instance details for a given patch job. + rpc ListPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest) returns (ListPatchJobInstanceDetailsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/patchJobs/*}/instanceDetails" + }; + option (google.api.method_signature) = "parent"; + } + + // Create an OS Config patch deployment. + rpc CreatePatchDeployment(CreatePatchDeploymentRequest) returns (PatchDeployment) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/patchDeployments" + body: "patch_deployment" + }; + option (google.api.method_signature) = "parent,patch_deployment,patch_deployment_id"; + } + + // Get an OS Config patch deployment. + rpc GetPatchDeployment(GetPatchDeploymentRequest) returns (PatchDeployment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/patchDeployments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get a page of OS Config patch deployments. + rpc ListPatchDeployments(ListPatchDeploymentsRequest) returns (ListPatchDeploymentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/patchDeployments" + }; + option (google.api.method_signature) = "parent"; + } + + // Delete an OS Config patch deployment. + rpc DeletePatchDeployment(DeletePatchDeploymentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/patchDeployments/*}" + }; + option (google.api.method_signature) = "name"; + } +} diff --git a/google/cloud/osconfig/v1/osconfig_v1.yaml b/google/cloud/osconfig/v1/osconfig_v1.yaml new file mode 100644 index 000000000..32fa1aeaa --- /dev/null +++ b/google/cloud/osconfig/v1/osconfig_v1.yaml @@ -0,0 +1,24 @@ +type: google.api.Service +config_version: 3 +name: osconfig.googleapis.com +title: Cloud OS Config API + +apis: +- name: google.cloud.osconfig.v1.OsConfigService + +documentation: + summary: |- + OS management tools that can be used for patch management, patch + compliance, and configuration management on VM instances. + +backend: + rules: + - selector: 'google.cloud.osconfig.v1.OsConfigService.*' + deadline: 30.0 + +authentication: + rules: + - selector: 'google.cloud.osconfig.v1.OsConfigService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/osconfig/v1/patch_deployments.proto b/google/cloud/osconfig/v1/patch_deployments.proto new file mode 100644 index 000000000..7d6992222 --- /dev/null +++ b/google/cloud/osconfig/v1/patch_deployments.proto @@ -0,0 +1,251 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1/patch_jobs.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/datetime.proto"; +import "google/type/dayofweek.proto"; +import "google/type/timeofday.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_outer_classname = "PatchDeployments"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; + +// Patch deployments are configurations that individual patch jobs use to +// complete a patch. These configurations include instance filter, package +// repository settings, and a schedule. For more information about creating and +// managing patch deployments, see [Scheduling patch +// jobs](https://cloud.google.com/compute/docs/os-patch-management/schedule-patch-jobs). +message PatchDeployment { + option (google.api.resource) = { + type: "osconfig.googleapis.com/PatchDeployment" + pattern: "projects/{project}/patchDeployments/{patch_deployment}" + }; + + // Unique name for the patch deployment resource in a project. The patch + // deployment name is in the form: + // `projects/{project_id}/patchDeployments/{patch_deployment_id}`. + // This field is ignored when you create a new patch deployment. + string name = 1; + + // Optional. Description of the patch deployment. Length of the description is limited + // to 1024 characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. VM instances to patch. + PatchInstanceFilter instance_filter = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Patch configuration that is applied. + PatchConfig patch_config = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Duration of the patch. After the duration ends, the patch times out. + google.protobuf.Duration duration = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Schedule for the patch. + oneof schedule { + // Required. Schedule a one-time execution. + OneTimeSchedule one_time_schedule = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Schedule recurring executions. + RecurringSchedule recurring_schedule = 7 [(google.api.field_behavior) = REQUIRED]; + } + + // Output only. Time the patch deployment was created. Timestamp is in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the patch deployment was last updated. Timestamp is in + // [RFC3339]("https://www.ietf.org/rfc/rfc3339.txt) text format. + google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last time a patch job was started by this deployment. + // Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text + // format. + google.protobuf.Timestamp last_execute_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Sets the time for a one time patch deployment. Timestamp is in +// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. +message OneTimeSchedule { + // Required. The desired patch job execution time. + google.protobuf.Timestamp execute_time = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Sets the time for recurring patch deployments. +message RecurringSchedule { + // Specifies the frequency of the recurring patch deployments. + enum Frequency { + // Invalid. A frequency must be specified. + FREQUENCY_UNSPECIFIED = 0; + + // Indicates that the frequency should be expressed in terms of + // weeks. + WEEKLY = 1; + + // Indicates that the frequency should be expressed in terms of + // months. + MONTHLY = 2; + } + + // Required. Defines the time zone that `time_of_day` is relative to. + // The rules for daylight saving time are determined by the chosen time zone. + google.type.TimeZone time_zone = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The time that the recurring schedule becomes effective. + // Defaults to `create_time` of the patch deployment. + google.protobuf.Timestamp start_time = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The end time at which a recurring patch deployment schedule is no longer + // active. + google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Time of the day to run a recurring deployment. + google.type.TimeOfDay time_of_day = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The frequency unit of this recurring schedule. + Frequency frequency = 5 [(google.api.field_behavior) = REQUIRED]; + + // Configurations for this recurring schedule. + // Configurations must match frequency. + oneof schedule_config { + // Required. Schedule with weekly executions. + WeeklySchedule weekly = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Schedule with monthly executions. + MonthlySchedule monthly = 7 [(google.api.field_behavior) = REQUIRED]; + } + + // Output only. The time the last patch job ran successfully. + google.protobuf.Timestamp last_execute_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the next patch job is scheduled to run. + google.protobuf.Timestamp next_execute_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents a weekly schedule. +message WeeklySchedule { + // Required. Day of the week. + google.type.DayOfWeek day_of_week = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents a monthly schedule. An example of a valid monthly schedule is +// "on the third Tuesday of the month" or "on the 15th of the month". +message MonthlySchedule { + // One day in a month. + oneof day_of_month { + // Required. Week day in a month. + WeekDayOfMonth week_day_of_month = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1 + // indicates the last day of the month. + // Months without the target day will be skipped. For example, a schedule to + // run "every month on the 31st" will not run in February, April, June, etc. + int32 month_day = 2 [(google.api.field_behavior) = REQUIRED]; + } +} + +// Represents one week day in a month. An example is "the 4th Sunday". +message WeekDayOfMonth { + // Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1 + // indicates the last week of the month. + int32 week_ordinal = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A day of the week. + google.type.DayOfWeek day_of_week = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A request message for creating a patch deployment. +message CreatePatchDeploymentRequest { + // Required. The project to apply this patch deployment to in the form `projects/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. A name for the patch deployment in the project. When creating a name + // the following rules apply: + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the project. + string patch_deployment_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The patch deployment to create. + PatchDeployment patch_deployment = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A request message for retrieving a patch deployment. +message GetPatchDeploymentRequest { + // Required. The resource name of the patch deployment in the form + // `projects/*/patchDeployments/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchDeployment" + } + ]; +} + +// A request message for listing patch deployments. +message ListPatchDeploymentsRequest { + // Required. The resource name of the parent in the form `projects/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Optional. The maximum number of patch deployments to return. Default is 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous call to ListPatchDeployments + // that indicates where this listing should continue from. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response message for listing patch deployments. +message ListPatchDeploymentsResponse { + // The list of patch deployments. + repeated PatchDeployment patch_deployments = 1; + + // A pagination token that can be used to get the next page of patch + // deployments. + string next_page_token = 2; +} + +// A request message for deleting a patch deployment. +message DeletePatchDeploymentRequest { + // Required. The resource name of the patch deployment in the form + // `projects/*/patchDeployments/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchDeployment" + } + ]; +} diff --git a/google/cloud/osconfig/v1/patch_jobs.proto b/google/cloud/osconfig/v1/patch_jobs.proto new file mode 100644 index 000000000..cd274d646 --- /dev/null +++ b/google/cloud/osconfig/v1/patch_jobs.proto @@ -0,0 +1,685 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_outer_classname = "PatchJobs"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; + +// A request message to initiate patching across Compute Engine +// instances. +message ExecutePatchJobRequest { + // Required. The project in which to run this patch in the form `projects/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Description of the patch job. Length of the description is limited + // to 1024 characters. + string description = 2; + + // Required. Instances to patch, either explicitly or filtered by some criteria such + // as zone or labels. + PatchInstanceFilter instance_filter = 7 [(google.api.field_behavior) = REQUIRED]; + + // Patch configuration being applied. If omitted, instances are + // patched using the default configurations. + PatchConfig patch_config = 4; + + // Duration of the patch job. After the duration ends, the patch job + // times out. + google.protobuf.Duration duration = 5; + + // If this patch is a dry-run only, instances are contacted but + // will do nothing. + bool dry_run = 6; + + // Display name for this patch job. This does not have to be unique. + string display_name = 8; +} + +// Request to get an active or completed patch job. +message GetPatchJobRequest { + // Required. Name of the patch in the form `projects/*/patchJobs/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchJob" + } + ]; +} + +// Request to list details for all instances that are part of a patch job. +message ListPatchJobInstanceDetailsRequest { + // Required. The parent for the instances are in the form of `projects/*/patchJobs/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchJob" + } + ]; + + // The maximum number of instance details records to return. Default is 100. + int32 page_size = 2; + + // A pagination token returned from a previous call + // that indicates where this listing should continue from. + string page_token = 3; + + // A filter expression that filters results listed in the response. This + // field supports filtering results by instance zone, name, state, or + // `failure_reason`. + string filter = 4; +} + +// A response message for listing the instances details for a patch job. +message ListPatchJobInstanceDetailsResponse { + // A list of instance status. + repeated PatchJobInstanceDetails patch_job_instance_details = 1; + + // A pagination token that can be used to get the next page of results. + string next_page_token = 2; +} + +// Patch details for a VM instance. For more information about reviewing VM +// instance details, see +// [Listing all VM instance details for a specific patch +// job](https://cloud.google.com/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details). +message PatchJobInstanceDetails { + // The instance name in the form `projects/*/zones/*/instances/*` + string name = 1 [(google.api.resource_reference) = { + type: "compute.googleapis.com/Instance" + }]; + + // The unique identifier for the instance. This identifier is + // defined by the server. + string instance_system_id = 2; + + // Current state of instance patch. + Instance.PatchState state = 3; + + // If the patch fails, this field provides the reason. + string failure_reason = 4; + + // The number of times the agent that the agent attempts to apply the patch. + int64 attempt_count = 5; +} + +// A request message for listing patch jobs. +message ListPatchJobsRequest { + // Required. In the form of `projects/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // The maximum number of instance status to return. + int32 page_size = 2; + + // A pagination token returned from a previous call + // that indicates where this listing should continue from. + string page_token = 3; + + // If provided, this field specifies the criteria that must be met by patch + // jobs to be included in the response. + // Currently, filtering is only available on the patch_deployment field. + string filter = 4; +} + +// A response message for listing patch jobs. +message ListPatchJobsResponse { + // The list of patch jobs. + repeated PatchJob patch_jobs = 1; + + // A pagination token that can be used to get the next page of results. + string next_page_token = 2; +} + +// A high level representation of a patch job that is either in progress +// or has completed. +// +// Instances details are not included in the job. To paginate through instance +// details, use ListPatchJobInstanceDetails. +// +// For more information about patch jobs, see +// [Creating patch +// jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job). +message PatchJob { + option (google.api.resource) = { + type: "osconfig.googleapis.com/PatchJob" + pattern: "projects/{project}/patchJobs/{patch_job}" + }; + + // A summary of the current patch state across all instances that this patch + // job affects. Contains counts of instances in different states. These states + // map to `InstancePatchState`. List patch job instance details to see the + // specific states of each instance. + message InstanceDetailsSummary { + // Number of instances pending patch job. + int64 pending_instance_count = 1; + + // Number of instances that are inactive. + int64 inactive_instance_count = 2; + + // Number of instances notified about patch job. + int64 notified_instance_count = 3; + + // Number of instances that have started. + int64 started_instance_count = 4; + + // Number of instances that are downloading patches. + int64 downloading_patches_instance_count = 5; + + // Number of instances that are applying patches. + int64 applying_patches_instance_count = 6; + + // Number of instances rebooting. + int64 rebooting_instance_count = 7; + + // Number of instances that have completed successfully. + int64 succeeded_instance_count = 8; + + // Number of instances that require reboot. + int64 succeeded_reboot_required_instance_count = 9; + + // Number of instances that failed. + int64 failed_instance_count = 10; + + // Number of instances that have acked and will start shortly. + int64 acked_instance_count = 11; + + // Number of instances that exceeded the time out while applying the patch. + int64 timed_out_instance_count = 12; + + // Number of instances that are running the pre-patch step. + int64 pre_patch_step_instance_count = 13; + + // Number of instances that are running the post-patch step. + int64 post_patch_step_instance_count = 14; + + // Number of instances that do not appear to be running the agent. Check to + // ensure that the agent is installed, running, and able to communicate with + // the service. + int64 no_agent_detected_instance_count = 15; + } + + // Enumeration of the various states a patch job passes through as it + // executes. + enum State { + // State must be specified. + STATE_UNSPECIFIED = 0; + + // The patch job was successfully initiated. + STARTED = 1; + + // The patch job is looking up instances to run the patch on. + INSTANCE_LOOKUP = 2; + + // Instances are being patched. + PATCHING = 3; + + // Patch job completed successfully. + SUCCEEDED = 4; + + // Patch job completed but there were errors. + COMPLETED_WITH_ERRORS = 5; + + // The patch job was canceled. + CANCELED = 6; + + // The patch job timed out. + TIMED_OUT = 7; + } + + // Unique identifier for this patch job in the form + // `projects/*/patchJobs/*` + string name = 1; + + // Display name for this patch job. This is not a unique identifier. + string display_name = 14; + + // Description of the patch job. Length of the description is limited + // to 1024 characters. + string description = 2; + + // Time this patch job was created. + google.protobuf.Timestamp create_time = 3; + + // Last time this patch job was updated. + google.protobuf.Timestamp update_time = 4; + + // The current state of the PatchJob . + State state = 5; + + // Instances to patch. + PatchInstanceFilter instance_filter = 13; + + // Patch configuration being applied. + PatchConfig patch_config = 7; + + // Duration of the patch job. After the duration ends, the + // patch job times out. + google.protobuf.Duration duration = 8; + + // Summary of instance details. + InstanceDetailsSummary instance_details_summary = 9; + + // If this patch job is a dry run, the agent reports that it has + // finished without running any updates on the VM instance. + bool dry_run = 10; + + // If this patch job failed, this message provides information about the + // failure. + string error_message = 11; + + // Reflects the overall progress of the patch job in the range of + // 0.0 being no progress to 100.0 being complete. + double percent_complete = 12; + + // Output only. Name of the patch deployment that created this patch job. + string patch_deployment = 15 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchDeployment" + } + ]; +} + +// Patch configuration specifications. Contains details on how to apply the +// patch(es) to a VM instance. +message PatchConfig { + // Post-patch reboot settings. + enum RebootConfig { + // The default behavior is DEFAULT. + REBOOT_CONFIG_UNSPECIFIED = 0; + + // The agent decides if a reboot is necessary by checking signals such as + // registry keys on Windows or `/var/run/reboot-required` on APT based + // systems. On RPM based systems, a set of core system package install times + // are compared with system boot time. + DEFAULT = 1; + + // Always reboot the machine after the update completes. + ALWAYS = 2; + + // Never reboot the machine after the update completes. + NEVER = 3; + } + + // Post-patch reboot settings. + RebootConfig reboot_config = 1; + + // Apt update settings. Use this setting to override the default `apt` patch + // rules. + AptSettings apt = 3; + + // Yum update settings. Use this setting to override the default `yum` patch + // rules. + YumSettings yum = 4; + + // Goo update settings. Use this setting to override the default `goo` patch + // rules. + GooSettings goo = 5; + + // Zypper update settings. Use this setting to override the default `zypper` + // patch rules. + ZypperSettings zypper = 6; + + // Windows update settings. Use this override the default windows patch rules. + WindowsUpdateSettings windows_update = 7; + + // The `ExecStep` to run before the patch update. + ExecStep pre_step = 8; + + // The `ExecStep` to run after the patch update. + ExecStep post_step = 9; +} + +// Namespace for instance state enums. +message Instance { + // Patch state of an instance. + enum PatchState { + // Unspecified. + PATCH_STATE_UNSPECIFIED = 0; + + // The instance is not yet notified. + PENDING = 1; + + // Instance is inactive and cannot be patched. + INACTIVE = 2; + + // The instance is notified that it should be patched. + NOTIFIED = 3; + + // The instance has started the patching process. + STARTED = 4; + + // The instance is downloading patches. + DOWNLOADING_PATCHES = 5; + + // The instance is applying patches. + APPLYING_PATCHES = 6; + + // The instance is rebooting. + REBOOTING = 7; + + // The instance has completed applying patches. + SUCCEEDED = 8; + + // The instance has completed applying patches but a reboot is required. + SUCCEEDED_REBOOT_REQUIRED = 9; + + // The instance has failed to apply the patch. + FAILED = 10; + + // The instance acked the notification and will start shortly. + ACKED = 11; + + // The instance exceeded the time out while applying the patch. + TIMED_OUT = 12; + + // The instance is running the pre-patch step. + RUNNING_PRE_PATCH_STEP = 13; + + // The instance is running the post-patch step. + RUNNING_POST_PATCH_STEP = 14; + + // The service could not detect the presence of the agent. Check to ensure + // that the agent is installed, running, and able to communicate with the + // service. + NO_AGENT_DETECTED = 15; + } + + +} + +// Message for canceling a patch job. +message CancelPatchJobRequest { + // Required. Name of the patch in the form `projects/*/patchJobs/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchJob" + } + ]; +} + +// Apt patching is completed by executing `apt-get update && apt-get +// upgrade`. Additional options can be set to control how this is executed. +message AptSettings { + // Apt patch type. + enum Type { + // By default, upgrade will be performed. + TYPE_UNSPECIFIED = 0; + + // Runs `apt-get dist-upgrade`. + DIST = 1; + + // Runs `apt-get upgrade`. + UPGRADE = 2; + } + + // By changing the type to DIST, the patching is performed + // using `apt-get dist-upgrade` instead. + Type type = 1; + + // List of packages to exclude from update. These packages will be excluded + repeated string excludes = 2; + + // An exclusive list of packages to be updated. These are the only packages + // that will be updated. If these packages are not installed, they will be + // ignored. This field cannot be specified with any other patch configuration + // fields. + repeated string exclusive_packages = 3; +} + +// Yum patching is performed by executing `yum update`. Additional options +// can be set to control how this is executed. +// +// Note that not all settings are supported on all platforms. +message YumSettings { + // Adds the `--security` flag to `yum update`. Not supported on + // all platforms. + bool security = 1; + + // Will cause patch to run `yum update-minimal` instead. + bool minimal = 2; + + // List of packages to exclude from update. These packages are excluded by + // using the yum `--exclude` flag. + repeated string excludes = 3; + + // An exclusive list of packages to be updated. These are the only packages + // that will be updated. If these packages are not installed, they will be + // ignored. This field must not be specified with any other patch + // configuration fields. + repeated string exclusive_packages = 4; +} + +// Googet patching is performed by running `googet update`. +message GooSettings { + +} + +// Zypper patching is performed by running `zypper patch`. +// See also https://en.opensuse.org/SDB:Zypper_manual. +message ZypperSettings { + // Adds the `--with-optional` flag to `zypper patch`. + bool with_optional = 1; + + // Adds the `--with-update` flag, to `zypper patch`. + bool with_update = 2; + + // Install only patches with these categories. + // Common categories include security, recommended, and feature. + repeated string categories = 3; + + // Install only patches with these severities. + // Common severities include critical, important, moderate, and low. + repeated string severities = 4; + + // List of patches to exclude from update. + repeated string excludes = 5; + + // An exclusive list of patches to be updated. These are the only patches + // that will be installed using 'zypper patch patch:' command. + // This field must not be used with any other patch configuration fields. + repeated string exclusive_patches = 6; +} + +// Windows patching is performed using the Windows Update Agent. +message WindowsUpdateSettings { + // Microsoft Windows update classifications as defined in + // [1] + // https://support.microsoft.com/en-us/help/824684/description-of-the-standard-terminology-that-is-used-to-describe-micro + enum Classification { + // Invalid. If classifications are included, they must be specified. + CLASSIFICATION_UNSPECIFIED = 0; + + // "A widely released fix for a specific problem that addresses a critical, + // non-security-related bug." [1] + CRITICAL = 1; + + // "A widely released fix for a product-specific, security-related + // vulnerability. Security vulnerabilities are rated by their severity. The + // severity rating is indicated in the Microsoft security bulletin as + // critical, important, moderate, or low." [1] + SECURITY = 2; + + // "A widely released and frequent software update that contains additions + // to a product's definition database. Definition databases are often used + // to detect objects that have specific attributes, such as malicious code, + // phishing websites, or junk mail." [1] + DEFINITION = 3; + + // "Software that controls the input and output of a device." [1] + DRIVER = 4; + + // "New product functionality that is first distributed outside the context + // of a product release and that is typically included in the next full + // product release." [1] + FEATURE_PACK = 5; + + // "A tested, cumulative set of all hotfixes, security updates, critical + // updates, and updates. Additionally, service packs may contain additional + // fixes for problems that are found internally since the release of the + // product. Service packs my also contain a limited number of + // customer-requested design changes or features." [1] + SERVICE_PACK = 6; + + // "A utility or feature that helps complete a task or set of tasks." [1] + TOOL = 7; + + // "A tested, cumulative set of hotfixes, security updates, critical + // updates, and updates that are packaged together for easy deployment. A + // rollup generally targets a specific area, such as security, or a + // component of a product, such as Internet Information Services (IIS)." [1] + UPDATE_ROLLUP = 8; + + // "A widely released fix for a specific problem. An update addresses a + // noncritical, non-security-related bug." [1] + UPDATE = 9; + } + + // Only apply updates of these windows update classifications. If empty, all + // updates are applied. + repeated Classification classifications = 1; + + // List of KBs to exclude from update. + repeated string excludes = 2; + + // An exclusive list of kbs to be updated. These are the only patches + // that will be updated. This field must not be used with other + // patch configurations. + repeated string exclusive_patches = 3; +} + +// A step that runs an executable for a PatchJob. +message ExecStep { + // The ExecStepConfig for all Linux VMs targeted by the PatchJob. + ExecStepConfig linux_exec_step_config = 1; + + // The ExecStepConfig for all Windows VMs targeted by the PatchJob. + ExecStepConfig windows_exec_step_config = 2; +} + +// Common configurations for an ExecStep. +message ExecStepConfig { + // The interpreter used to execute the a file. + enum Interpreter { + // Invalid for a Windows ExecStepConfig. For a Linux ExecStepConfig, the + // interpreter will be parsed from the shebang line of the script if + // unspecified. + INTERPRETER_UNSPECIFIED = 0; + + // Indicates that the script is run with `/bin/sh` on Linux and `cmd` + // on Windows. + SHELL = 1; + + // Indicates that the file is run with PowerShell flags + // `-NonInteractive`, `-NoProfile`, and `-ExecutionPolicy Bypass`. + POWERSHELL = 2; + } + + // Location of the executable. + oneof executable { + // An absolute path to the executable on the VM. + string local_path = 1; + + // A Cloud Storage object containing the executable. + GcsObject gcs_object = 2; + } + + // Defaults to [0]. A list of possible return values that the + // execution can return to indicate a success. + repeated int32 allowed_success_codes = 3; + + // The script interpreter to use to run the script. If no interpreter is + // specified the script will be executed directly, which will likely + // only succeed for scripts with [shebang lines] + // (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). + Interpreter interpreter = 4; +} + +// Cloud Storage object representation. +message GcsObject { + // Required. Bucket of the Cloud Storage object. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the Cloud Storage object. + string object = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Generation number of the Cloud Storage object. This is used to + // ensure that the ExecStep specified by this PatchJob does not change. + int64 generation_number = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A filter to target VM instances for patching. The targeted +// VMs must meet all criteria specified. So if both labels and zones are +// specified, the patch job targets only VMs with those labels and in those +// zones. +message PatchInstanceFilter { + // Targets a group of VM instances by using their [assigned + // labels](https://cloud.google.com/compute/docs/labeling-resources). Labels + // are key-value pairs. A `GroupLabel` is a combination of labels + // that is used to target VMs for a patch job. + // + // For example, a patch job can target VMs that have the following + // `GroupLabel`: `{"env":"test", "app":"web"}`. This means that the patch job + // is applied to VMs that have both the labels `env=test` and `app=web`. + message GroupLabel { + // Compute Engine instance labels that must be present for a VM + // instance to be targeted by this filter. + map labels = 1; + } + + // Target all VM instances in the project. If true, no other criteria is + // permitted. + bool all = 1; + + // Targets VM instances matching ANY of these GroupLabels. This allows + // targeting of disparate groups of VM instances. + repeated GroupLabel group_labels = 2; + + // Targets VM instances in ANY of these zones. Leave empty to target VM + // instances in any zone. + repeated string zones = 3; + + // Targets any of the VM instances specified. Instances are specified by their + // URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME], + // `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or + // `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` + repeated string instances = 4; + + // Targets VMs whose name starts with one of these prefixes. Similar to + // labels, this is another way to group VMs when targeting configs, for + // example prefix="prod-". + repeated string instance_name_prefixes = 5; +} diff --git a/google/cloud/osconfig/v1beta/BUILD.bazel b/google/cloud/osconfig/v1beta/BUILD.bazel new file mode 100644 index 000000000..5fed2fba8 --- /dev/null +++ b/google/cloud/osconfig/v1beta/BUILD.bazel @@ -0,0 +1,377 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "osconfig_proto", + srcs = [ + "guest_policies.proto", + "osconfig_service.proto", + "patch_deployments.proto", + "patch_jobs.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/type:datetime_proto", + "//google/type:dayofweek_proto", + "//google/type:timeofday_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "osconfig_proto_with_info", + deps = [ + ":osconfig_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "osconfig_java_proto", + deps = [":osconfig_proto"], +) + +java_grpc_library( + name = "osconfig_java_grpc", + srcs = [":osconfig_proto"], + deps = [":osconfig_java_proto"], +) + +java_gapic_library( + name = "osconfig_java_gapic", + src = ":osconfig_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.v1beta", + service_yaml = "osconfig_v1beta.yaml", + test_deps = [ + ":osconfig_java_grpc", + ], + deps = [ + ":osconfig_java_proto", + ], +) + +java_gapic_test( + name = "osconfig_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.osconfig.v1beta.OsConfigServiceClientTest", + ], + runtime_deps = [":osconfig_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-osconfig-v1beta-java", + deps = [ + ":osconfig_java_gapic", + ":osconfig_java_grpc", + ":osconfig_java_proto", + ":osconfig_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "osconfig_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/osconfig/v1beta", + protos = [":osconfig_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/type:datetime_go_proto", + "//google/type:dayofweek_go_proto", + "//google/type:timeofday_go_proto", + ], +) + +go_gapic_library( + name = "osconfig_go_gapic", + srcs = [":osconfig_proto_with_info"], + grpc_service_config = "osconfig_grpc_service_config.json", + importpath = "cloud.google.com/go/osconfig/apiv1beta;osconfig", + service_yaml = "osconfig_v1beta.yaml", + deps = [ + ":osconfig_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +go_test( + name = "osconfig_go_gapic_test", + srcs = [":osconfig_go_gapic_srcjar_test"], + embed = [":osconfig_go_gapic"], + importpath = "cloud.google.com/go/osconfig/apiv1beta", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-osconfig-v1beta-go", + deps = [ + ":osconfig_go_gapic", + ":osconfig_go_gapic_srcjar-test.srcjar", + ":osconfig_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "osconfig_moved_proto", + srcs = [":osconfig_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/type:datetime_proto", + "//google/type:dayofweek_proto", + "//google/type:timeofday_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "osconfig_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":osconfig_moved_proto"], +) + +py_grpc_library( + name = "osconfig_py_grpc", + srcs = [":osconfig_moved_proto"], + deps = [":osconfig_py_proto"], +) + +py_gapic_library( + name = "osconfig_py_gapic", + src = ":osconfig_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.v1beta", + service_yaml = "osconfig_v1beta.yaml", + deps = [ + ":osconfig_py_grpc", + ":osconfig_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "osconfig-v1beta-py", + deps = [ + ":osconfig_py_gapic", + ":osconfig_py_grpc", + ":osconfig_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "osconfig_php_proto", + deps = [":osconfig_proto"], +) + +php_grpc_library( + name = "osconfig_php_grpc", + srcs = [":osconfig_proto"], + deps = [":osconfig_php_proto"], +) + +php_gapic_library( + name = "osconfig_php_gapic", + src = ":osconfig_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.v1beta", + service_yaml = "osconfig_v1beta.yaml", + deps = [ + ":osconfig_php_grpc", + ":osconfig_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-osconfig-v1beta-php", + deps = [ + ":osconfig_php_gapic", + ":osconfig_php_grpc", + ":osconfig_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "osconfig_nodejs_gapic", + src = ":osconfig_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.v1beta", + service_yaml = "osconfig_v1beta.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "osconfig-v1beta-nodejs", + deps = [ + ":osconfig_nodejs_gapic", + ":osconfig_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "osconfig_ruby_proto", + deps = [":osconfig_proto"], +) + +ruby_grpc_library( + name = "osconfig_ruby_grpc", + srcs = [":osconfig_proto"], + deps = [":osconfig_ruby_proto"], +) + +ruby_gapic_library( + name = "osconfig_ruby_gapic", + src = ":osconfig_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.v1beta", + service_yaml = "osconfig_v1beta.yaml", + deps = [ + ":osconfig_ruby_grpc", + ":osconfig_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-osconfig-v1beta-ruby", + deps = [ + ":osconfig_ruby_gapic", + ":osconfig_ruby_grpc", + ":osconfig_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "osconfig_csharp_proto", + deps = [":osconfig_proto"], +) + +csharp_grpc_library( + name = "osconfig_csharp_grpc", + srcs = [":osconfig_proto"], + deps = [":osconfig_csharp_proto"], +) + +csharp_gapic_library( + name = "osconfig_csharp_gapic", + src = ":osconfig_proto_with_info", + gapic_yaml = "osconfig_gapic.yaml", + package = "google.cloud.osconfig.v1beta", + service_yaml = "osconfig_v1beta.yaml", + deps = [ + ":osconfig_csharp_grpc", + ":osconfig_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-osconfig-v1beta-csharp", + deps = [ + ":osconfig_csharp_gapic", + ":osconfig_csharp_grpc", + ":osconfig_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/osconfig/v1beta/artman_osconfig_v1beta.yaml b/google/cloud/osconfig/v1beta/artman_osconfig_v1beta.yaml new file mode 100644 index 000000000..54e44bbaf --- /dev/null +++ b/google/cloud/osconfig/v1beta/artman_osconfig_v1beta.yaml @@ -0,0 +1,34 @@ +common: + api_name: osconfig + api_version: v1beta + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - . + service_yaml: osconfig_v1beta.yaml + gapic_yaml: osconfig_gapic.yaml +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: php_gapic + type: GAPIC + language: PHP +- name: go_gapic + type: GAPIC + language: GO +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: csharp_gapic + type: GAPIC + language: CSHARP diff --git a/google/cloud/osconfig/v1beta/guest_policies.proto b/google/cloud/osconfig/v1beta/guest_policies.proto new file mode 100644 index 000000000..f7fd0747d --- /dev/null +++ b/google/cloud/osconfig/v1beta/guest_policies.proto @@ -0,0 +1,773 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1beta;osconfig"; +option java_outer_classname = "GuestPolicies"; +option java_package = "com.google.cloud.osconfig.v1beta"; + +// An OS Config resource representing a guest configuration policy. These +// policies represent the desired state for VM instance guest environments +// including packages to install or remove, package repository configurations, +// and software to install. +message GuestPolicy { + option (google.api.resource) = { + type: "osconfig.googleapis.com/GuestPolicy" + pattern: "projects/{project}/guestPolicies/{guest_policy}" + }; + + // Required. Unique name of the resource in this project using one of the following + // forms: + // `projects/{project_number}/guestPolicies/{guest_policy_id}`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Description of the guest policy. Length of the description is limited + // to 1024 characters. + string description = 2; + + // Output only. Time this guest policy was created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last time this guest policy was updated. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Specifies the VM instances that are assigned to this policy. This allows + // you to target sets or groups of VM instances by different parameters such + // as labels, names, OS, or zones. + // + // If left empty, all VM instances underneath this policy are targeted. + // + // At the same level in the resource hierarchy (that is within a project), the + // service prevents the creation of multiple policies that conflict with + // each other. For more information, see how the service [handles assignment + // conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts). + Assignment assignment = 6 [(google.api.field_behavior) = REQUIRED]; + + // The software packages to be managed by this policy. + repeated Package packages = 7; + + // A list of package repositories to configure on the VM instance. This is + // done before any other configs are applied so they can use these repos. + // Package repositories are only configured if the corresponding package + // manager(s) are available. + repeated PackageRepository package_repositories = 8; + + // A list of Recipes to install on the VM instance. + repeated SoftwareRecipe recipes = 9; + + // The etag for this guest policy. + // If this is provided on update, it must match the server's etag. + string etag = 10; +} + +// An assignment represents the group or groups of VM instances that the policy +// applies to. +// +// If an assignment is empty, it applies to all VM instances. Otherwise, the +// targeted VM instances must meet all the criteria specified. So if both +// labels and zones are specified, the policy applies to VM instances with those +// labels and in those zones. +message Assignment { + // Represents a group of VM intances that can be identified as having all + // these labels, for example "env=prod and app=web". + message GroupLabel { + // Google Compute Engine instance labels that must be present for an + // instance to be included in this assignment group. + map labels = 1; + } + + // Defines the criteria for selecting VM Instances by OS type. + message OsType { + // Targets VM instances with OS Inventory enabled and having the following + // OS short name, for example "debian" or "windows". + string os_short_name = 1; + + // Targets VM instances with OS Inventory enabled and having the following + // following OS version. + string os_version = 2; + + // Targets VM instances with OS Inventory enabled and having the following + // OS architecture. + string os_architecture = 3; + } + + // Targets instances matching at least one of these label sets. This allows + // an assignment to target disparate groups, for example "env=prod or + // env=staging". + repeated GroupLabel group_labels = 1; + + // Targets instances in any of these zones. Leave empty to target instances + // in any zone. + // + // Zonal targeting is uncommon and is supported to facilitate the management + // of changes by zone. + repeated string zones = 2; + + // Targets any of the instances specified. Instances are specified by their + // URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`. + // + // Instance targeting is uncommon and is supported to facilitate the + // management of changes by the instance or to target specific VM instances + // for development and testing. + // + // Only supported for project-level policies and must reference instances + // within this project. + repeated string instances = 3; + + // Targets VM instances whose name starts with one of these prefixes. + // + // Like labels, this is another way to group VM instances when targeting + // configs, for example prefix="prod-". + // + // Only supported for project-level policies. + repeated string instance_name_prefixes = 4; + + // Targets VM instances matching at least one of the following OS types. + // + // VM instances must match all supplied criteria for a given OsType to be + // included. + repeated OsType os_types = 5; +} + +// Package is a reference to the software package to be installed or removed. +// The agent on the VM instance uses the system package manager to apply the +// config. +// +// +// These are the commands that the agent uses to install or remove +// packages. +// +// Apt +// install: `apt-get update && apt-get -y install package1 package2 package3` +// remove: `apt-get -y remove package1 package2 package3` +// +// Yum +// install: `yum -y install package1 package2 package3` +// remove: `yum -y remove package1 package2 package3` +// +// Zypper +// install: `zypper install package1 package2 package3` +// remove: `zypper rm package1 package2` +// +// Googet +// install: `googet -noconfirm install package1 package2 package3` +// remove: `googet -noconfirm remove package1 package2 package3` +message Package { + // Types of package managers that may be used to manage this package. + enum Manager { + // The default behavior is ANY. + MANAGER_UNSPECIFIED = 0; + + // Apply this package config using the default system package manager. + ANY = 1; + + // Apply this package config only if Apt is available on the system. + APT = 2; + + // Apply this package config only if Yum is available on the system. + YUM = 3; + + // Apply this package config only if Zypper is available on the system. + ZYPPER = 4; + + // Apply this package config only if GooGet is available on the system. + GOO = 5; + } + + // Required. The name of the package. A package is uniquely identified for conflict + // validation by checking the package name and the manager(s) that the + // package targets. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The desired_state the agent should maintain for this package. The + // default is to ensure the package is installed. + DesiredState desired_state = 2; + + // Type of package manager that can be used to install this package. + // If a system does not have the package manager, the package is not + // installed or removed no error message is returned. By default, + // or if you specify `ANY`, + // the agent attempts to install and remove this package using the default + // package manager. This is useful when creating a policy that applies to + // different types of systems. + // + // The default behavior is ANY. + Manager manager = 3; +} + +// Represents a single Apt package repository. This repository is added to +// a repo file that is stored at +// `/etc/apt/sources.list.d/google_osconfig.list`. +message AptRepository { + // Type of archive. + enum ArchiveType { + // Unspecified. + ARCHIVE_TYPE_UNSPECIFIED = 0; + + // DEB indicates that the archive contains binary files. + DEB = 1; + + // DEB_SRC indicates that the archive contains source files. + DEB_SRC = 2; + } + + // Type of archive files in this repository. The default behavior is DEB. + ArchiveType archive_type = 1; + + // Required. URI for this repository. + string uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Distribution of this repository. + string distribution = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of components for this repository. Must contain at least one item. + repeated string components = 4 [(google.api.field_behavior) = REQUIRED]; + + // URI of the key file for this repository. The agent maintains + // a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing + // all the keys in any applied guest policy. + string gpg_key = 5; +} + +// Represents a single Yum package repository. This repository is added to a +// repo file that is stored at `/etc/yum.repos.d/google_osconfig.repo`. +message YumRepository { + // Required. A one word, unique name for this repository. This is + // the `repo id` in the Yum config file and also the `display_name` if + // `display_name` is omitted. This id is also used as the unique identifier + // when checking for guest policy conflicts. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The display name of the repository. + string display_name = 2; + + // Required. The location of the repository directory. + string base_url = 3 [(google.api.field_behavior) = REQUIRED]; + + // URIs of GPG keys. + repeated string gpg_keys = 4; +} + +// Represents a single Zypper package repository. This repository is added to a +// repo file that is stored at `/etc/zypp/repos.d/google_osconfig.repo`. +message ZypperRepository { + // Required. A one word, unique name for this repository. This is + // the `repo id` in the zypper config file and also the `display_name` if + // `display_name` is omitted. This id is also used as the unique identifier + // when checking for guest policy conflicts. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The display name of the repository. + string display_name = 2; + + // Required. The location of the repository directory. + string base_url = 3 [(google.api.field_behavior) = REQUIRED]; + + // URIs of GPG keys. + repeated string gpg_keys = 4; +} + +// Represents a Goo package repository. These is added to a repo file +// that is stored at C:/ProgramData/GooGet/repos/google_osconfig.repo. +message GooRepository { + // Required. The name of the repository. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The url of the repository. + string url = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The desired state that the OS Config agent maintains on the VM instance. +enum DesiredState { + // The default is to ensure the package is installed. + DESIRED_STATE_UNSPECIFIED = 0; + + // The agent ensures that the package is installed. + INSTALLED = 1; + + // The agent ensures that the package is installed and + // periodically checks for and install any updates. + UPDATED = 2; + + // The agent ensures that the package is not installed and uninstall it + // if detected. + REMOVED = 3; +} + +// A package repository. +message PackageRepository { + // A specific type of repository. + oneof repository { + // An Apt Repository. + AptRepository apt = 1; + + // A Yum Repository. + YumRepository yum = 2; + + // A Zypper Repository. + ZypperRepository zypper = 3; + + // A Goo Repository. + GooRepository goo = 4; + } +} + +// A software recipe is a set of instructions for installing and configuring a +// piece of software. It consists of a set of artifacts that are +// downloaded, and a set of steps that install, configure, and/or update the +// software. +// +// Recipes support installing and updating software from artifacts in the +// following formats: +// Zip archive, Tar archive, Windows MSI, Debian package, and RPM package. +// +// Additionally, recipes support executing a script (either defined in a file or +// directly in this api) in bash, sh, cmd, and powershell. +// +// Updating a software recipe +// +// If a recipe is assigned to an instance and there is a recipe with the same +// name but a lower version already installed and the assigned state +// of the recipe is `INSTALLED_KEEP_UPDATED`, then the recipe is updated to +// the new version. +// +// Script Working Directories +// +// Each script or execution step is run in its own temporary directory which +// is deleted after completing the step. +message SoftwareRecipe { + // Specifies a resource to be used in the recipe. + message Artifact { + // Specifies an artifact available via some URI. + message Remote { + // URI from which to fetch the object. It should contain both the protocol + // and path following the format {protocol}://{location}. + string uri = 1; + + // Must be provided if `allow_insecure` is `false`. + // SHA256 checksum in hex format, to compare to the checksum of the + // artifact. If the checksum is not empty and it doesn't match the + // artifact then the recipe installation fails before running any of the + // steps. + string checksum = 2; + } + + // Specifies an artifact available as a Google Cloud Storage object. + message Gcs { + // Bucket of the Google Cloud Storage object. + // Given an example URL: + // `https://storage.googleapis.com/my-bucket/foo/bar#1234567` + // this value would be `my-bucket`. + string bucket = 1; + + // Name of the Google Cloud Storage object. + // As specified [here] + // (https://cloud.google.com/storage/docs/naming#objectnames) + // Given an example URL: + // `https://storage.googleapis.com/my-bucket/foo/bar#1234567` + // this value would be `foo/bar`. + string object = 2; + + // Must be provided if allow_insecure is false. + // Generation number of the Google Cloud Storage object. + // `https://storage.googleapis.com/my-bucket/foo/bar#1234567` + // this value would be `1234567`. + int64 generation = 3; + } + + // Required. Id of the artifact, which the installation and update steps of this + // recipe can reference. Artifacts in a recipe cannot have the same id. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // A specific type of artifact. + oneof artifact { + // A generic remote artifact. + Remote remote = 2; + + // A Google Cloud Storage artifact. + Gcs gcs = 3; + } + + // Defaults to false. When false, recipes are subject to validations + // based on the artifact type: + // + // Remote: A checksum must be specified, and only protocols with + // transport-layer security are permitted. + // GCS: An object generation number must be specified. + bool allow_insecure = 4; + } + + // An action that can be taken as part of installing or updating a recipe. + message Step { + // Copies the artifact to the specified path on the instance. + message CopyFile { + // Required. The id of the relevant artifact in the recipe. + string artifact_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The absolute path on the instance to put the file. + string destination = 2 [(google.api.field_behavior) = REQUIRED]; + + // Whether to allow this step to overwrite existing files. If this is + // false and the file already exists the file is not overwritten + // and the step is considered a success. Defaults to false. + bool overwrite = 3; + + // Consists of three octal digits which represent, in + // order, the permissions of the owner, group, and other users for the + // file (similarly to the numeric mode used in the linux chmod utility). + // Each digit represents a three bit number with the 4 bit + // corresponding to the read permissions, the 2 bit corresponds to the + // write bit, and the one bit corresponds to the execute permission. + // Default behavior is 755. + // + // Below are some examples of permissions and their associated values: + // read, write, and execute: 7 + // read and execute: 5 + // read and write: 6 + // read only: 4 + string permissions = 4; + } + + // Extracts an archive of the type specified in the specified directory. + message ExtractArchive { + // Specifying the type of archive. + enum ArchiveType { + // Indicates that the archive type isn't specified. + ARCHIVE_TYPE_UNSPECIFIED = 0; + + // Indicates that the archive is a tar archive with no encryption. + TAR = 1; + + // Indicates that the archive is a tar archive with gzip encryption. + TAR_GZIP = 2; + + // Indicates that the archive is a tar archive with bzip encryption. + TAR_BZIP = 3; + + // Indicates that the archive is a tar archive with lzma encryption. + TAR_LZMA = 4; + + // Indicates that the archive is a tar archive with xz encryption. + TAR_XZ = 5; + + // Indicates that the archive is a zip archive. + ZIP = 11; + } + + // Required. The id of the relevant artifact in the recipe. + string artifact_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Directory to extract archive to. + // Defaults to `/` on Linux or `C:\` on Windows. + string destination = 2; + + // Required. The type of the archive to extract. + ArchiveType type = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Installs an MSI file. + message InstallMsi { + // Required. The id of the relevant artifact in the recipe. + string artifact_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The flags to use when installing the MSI + // defaults to ["/i"] (i.e. the install flag). + repeated string flags = 2; + + // Return codes that indicate that the software installed or updated + // successfully. Behaviour defaults to [0] + repeated int32 allowed_exit_codes = 3; + } + + // Installs a deb via dpkg. + message InstallDpkg { + // Required. The id of the relevant artifact in the recipe. + string artifact_id = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Installs an rpm file via the rpm utility. + message InstallRpm { + // Required. The id of the relevant artifact in the recipe. + string artifact_id = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Executes an artifact or local file. + message ExecFile { + // Location of the file to execute. + oneof location_type { + // The id of the relevant artifact in the recipe. + string artifact_id = 1; + + // The absolute path of the file on the local filesystem. + string local_path = 2; + } + + // Arguments to be passed to the provided executable. + repeated string args = 3; + + // Defaults to [0]. A list of possible return values that the program + // can return to indicate a success. + repeated int32 allowed_exit_codes = 4; + } + + // Runs a script through an interpreter. + message RunScript { + // The interpreter used to execute a script. + enum Interpreter { + // Default value for ScriptType. + INTERPRETER_UNSPECIFIED = 0; + + // Indicates that the script is run with `/bin/sh` on Linux and `cmd` + // on windows. + SHELL = 1; + + // Indicates that the script is run with powershell. + POWERSHELL = 3; + } + + // Required. The shell script to be executed. + string script = 1 [(google.api.field_behavior) = REQUIRED]; + + // Return codes that indicate that the software installed or updated + // successfully. Behaviour defaults to [0] + repeated int32 allowed_exit_codes = 2; + + // The script interpreter to use to run the script. If no interpreter is + // specified the script is executed directly, which likely + // only succeed for scripts with + // [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)). + Interpreter interpreter = 3; + } + + // A specific type of step. + oneof step { + // Copies a file onto the instance. + CopyFile file_copy = 1; + + // Extracts an archive into the specified directory. + ExtractArchive archive_extraction = 2; + + // Installs an MSI file. + InstallMsi msi_installation = 3; + + // Installs a deb file via dpkg. + InstallDpkg dpkg_installation = 4; + + // Installs an rpm file via the rpm utility. + InstallRpm rpm_installation = 5; + + // Executes an artifact or local file. + ExecFile file_exec = 6; + + // Runs commands in a shell. + RunScript script_run = 7; + } + } + + // Required. Unique identifier for the recipe. Only one recipe with a given name is + // installed on an instance. + // + // Names are also used to identify resources which helps to determine whether + // guest policies have conflicts. This means that requests to create multiple + // recipes with the same name and version are rejected since they + // could potentially have conflicting assignments. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The version of this software recipe. Version can be up to 4 period + // separated numbers (e.g. 12.34.56.78). + string version = 2; + + // Resources available to be used in the steps in the recipe. + repeated Artifact artifacts = 3; + + // Actions to be taken for installing this recipe. On failure it stops + // executing steps and does not attempt another installation. Any steps taken + // (including partially completed steps) are not rolled back. + repeated Step install_steps = 4; + + // Actions to be taken for updating this recipe. On failure it stops + // executing steps and does not attempt another update for this recipe. Any + // steps taken (including partially completed steps) are not rolled back. + repeated Step update_steps = 5; + + // Default is INSTALLED. The desired state the agent should maintain for this + // recipe. + // + // INSTALLED: The software recipe is installed on the instance but + // won't be updated to new versions. + // INSTALLED_KEEP_UPDATED: The software recipe is installed on the + // instance. The recipe is updated to a higher + // version, if a higher version of the recipe is + // assigned to this instance. + // REMOVE: Remove is unsupported for software recipes and attempts to + // create or update a recipe to the REMOVE state is rejected. + DesiredState desired_state = 6; +} + +// A request message for creating a guest policy. +message CreateGuestPolicyRequest { + // Required. The resource name of the parent using one of the following forms: + // `projects/{project_number}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "osconfig.googleapis.com/GuestPolicy" + } + ]; + + // Required. The logical name of the guest policy in the project + // with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the project. + string guest_policy_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The GuestPolicy to create. + GuestPolicy guest_policy = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A request message for retrieving a guest policy. +message GetGuestPolicyRequest { + // Required. The resource name of the guest policy using one of the following forms: + // `projects/{project_number}/guestPolicies/{guest_policy_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/GuestPolicy" + } + ]; +} + +// A request message for listing guest policies. +message ListGuestPoliciesRequest { + // Required. The resource name of the parent using one of the following forms: + // `projects/{project_number}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "osconfig.googleapis.com/GuestPolicy" + } + ]; + + // The maximum number of guest policies to return. + int32 page_size = 2; + + // A pagination token returned from a previous call to `ListGuestPolicies` + // that indicates where this listing should continue from. + string page_token = 3; +} + +// A response message for listing guest policies. +message ListGuestPoliciesResponse { + // The list of GuestPolicies. + repeated GuestPolicy guest_policies = 1; + + // A pagination token that can be used to get the next page + // of guest policies. + string next_page_token = 2; +} + +// A request message for updating a guest policy. +message UpdateGuestPolicyRequest { + // Required. The updated GuestPolicy. + GuestPolicy guest_policy = 1 [(google.api.field_behavior) = REQUIRED]; + + // Field mask that controls which fields of the guest policy should be + // updated. + google.protobuf.FieldMask update_mask = 2; +} + +// A request message for deleting a guest policy. +message DeleteGuestPolicyRequest { + // Required. The resource name of the guest policy using one of the following forms: + // `projects/{project_number}/guestPolicies/{guest_policy_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/GuestPolicy" + } + ]; +} + +// A request message for getting the effective guest policy assigned to the +// instance. +message LookupEffectiveGuestPolicyRequest { + // Required. The VM instance whose policies are being looked up. + string instance = 1 [(google.api.field_behavior) = REQUIRED]; + + // Short name of the OS running on the instance. The OS Config agent only + // provides this field for targeting if OS Inventory is enabled for that + // instance. + string os_short_name = 2; + + // Version of the OS running on the instance. The OS Config agent only + // provides this field for targeting if OS Inventory is enabled for that + // VM instance. + string os_version = 3; + + // Architecture of OS running on the instance. The OS Config agent only + // provides this field for targeting if OS Inventory is enabled for that + // instance. + string os_architecture = 4; +} + +// The effective guest policy that applies to a VM instance. +message EffectiveGuestPolicy { + // A guest policy package including its source. + message SourcedPackage { + // Name of the guest policy providing this config. + string source = 1; + + // A software package to configure on the VM instance. + Package package = 2; + } + + // A guest policy package repository including its source. + message SourcedPackageRepository { + // Name of the guest policy providing this config. + string source = 1; + + // A software package repository to configure on the VM instance. + PackageRepository package_repository = 2; + } + + // A guest policy recipe including its source. + message SourcedSoftwareRecipe { + // Name of the guest policy providing this config. + string source = 1; + + // A software recipe to configure on the VM instance. + SoftwareRecipe software_recipe = 2; + } + + // List of package configurations assigned to the VM instance. + repeated SourcedPackage packages = 1; + + // List of package repository configurations assigned to the VM instance. + repeated SourcedPackageRepository package_repositories = 2; + + // List of recipes assigned to the VM instance. + repeated SourcedSoftwareRecipe software_recipes = 3; +} diff --git a/google/cloud/osconfig/v1beta/osconfig_gapic.legacy.yaml b/google/cloud/osconfig/v1beta/osconfig_gapic.legacy.yaml new file mode 100644 index 000000000..2f000180f --- /dev/null +++ b/google/cloud/osconfig/v1beta/osconfig_gapic.legacy.yaml @@ -0,0 +1,337 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.osconfig.v1beta + python: + package_name: google.cloud.osconfig_v1beta.gapic + go: + package_name: cloud.google.com/go/osconfig/apiv1beta + csharp: + package_name: Google.Cloud.OsConfig.V1beta + ruby: + package_name: Google::Cloud::OsConfig::V1beta + php: + package_name: Google\Cloud\OsConfig\V1beta + nodejs: + package_name: osconfig.v1beta +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.osconfig.v1beta.OsConfigService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + - name_pattern: projects/{project}/guestPolicies/{guest_policy} + entity_name: guest_policy + - name_pattern: projects/{project}/patchDeployments/{patch_deployment} + entity_name: patch_deployment + - name_pattern: projects/{project}/patchJobs/{patch_job} + entity_name: patch_job + - name_pattern: projects/{project}/zones/{zone}/instances/{instance} + entity_name: instance + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ExecutePatchJob + required_fields: + - parent + - description + - instance_filter + - patch_config + - duration + - dry_run + - display_name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: GetPatchJob + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: patch_job + timeout_millis: 60000 + - name: CancelPatchJob + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: patch_job + timeout_millis: 60000 + - name: ListPatchJobs + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + - filter + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: patch_jobs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: ListPatchJobInstanceDetails + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + - filter + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: patch_job_instance_details + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: patch_job + timeout_millis: 60000 + - name: CreatePatchDeployment + flattening: + groups: + - parameters: + - parent + - patch_deployment_id + - patch_deployment + required_fields: + - parent + - patch_deployment_id + - patch_deployment + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: GetPatchDeployment + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: patch_deployment + timeout_millis: 60000 + - name: ListPatchDeployments + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: patch_deployments + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: DeletePatchDeployment + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: patch_deployment + timeout_millis: 60000 + - name: CreateGuestPolicy + flattening: + groups: + - parameters: + - parent + - guest_policy_id + - guest_policy + required_fields: + - parent + - guest_policy_id + - guest_policy + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: GetGuestPolicy + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: guest_policy + timeout_millis: 60000 + - name: ListGuestPolicies + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: guest_policies + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: UpdateGuestPolicy + flattening: + groups: + - parameters: + - guest_policy + - update_mask + required_fields: + - guest_policy + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + guest_policy.name: guest_policy + timeout_millis: 60000 + - name: DeleteGuestPolicy + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: guest_policy + timeout_millis: 60000 + - name: LookupEffectiveGuestPolicy + flattening: + groups: + - parameters: + - instance + - os_short_name + - os_version + - os_architecture + required_fields: + - instance + - os_short_name + - os_version + - os_architecture + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + instance: instance + timeout_millis: 60000 diff --git a/google/cloud/osconfig/v1beta/osconfig_gapic.yaml b/google/cloud/osconfig/v1beta/osconfig_gapic.yaml new file mode 100644 index 000000000..56e155e7a --- /dev/null +++ b/google/cloud/osconfig/v1beta/osconfig_gapic.yaml @@ -0,0 +1,33 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.osconfig.v1beta + python: + package_name: google.cloud.osconfig_v1beta.gapic + go: + package_name: cloud.google.com/go/osconfig/apiv1beta + csharp: + package_name: Google.Cloud.OsConfig.V1beta + ruby: + package_name: Google::Cloud::OsConfig::V1beta + php: + package_name: Google\Cloud\OsConfig\V1beta + nodejs: + package_name: osconfig.v1beta +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.osconfig.v1beta.OsConfigService + # A list of method configurations. + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + methods: + - name: DeletePatchDeployment + retry_codes_name: idempotent + - name: DeleteGuestPolicy + retry_codes_name: idempotent diff --git a/google/cloud/osconfig/v1beta/osconfig_grpc_service_config.json b/google/cloud/osconfig/v1beta/osconfig_grpc_service_config.json new file mode 100644 index 000000000..72072c4c1 --- /dev/null +++ b/google/cloud/osconfig/v1beta/osconfig_grpc_service_config.json @@ -0,0 +1,13 @@ +{ + "methodConfig": [{ + "name": [{ "service": "google.cloud.osconfig.v1beta.OsConfigService" }], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE"] + } + }] +} diff --git a/google/cloud/osconfig/v1beta/osconfig_service.proto b/google/cloud/osconfig/v1beta/osconfig_service.proto new file mode 100644 index 000000000..2211d8350 --- /dev/null +++ b/google/cloud/osconfig/v1beta/osconfig_service.proto @@ -0,0 +1,157 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/cloud/osconfig/v1beta/guest_policies.proto"; +import "google/cloud/osconfig/v1beta/patch_deployments.proto"; +import "google/cloud/osconfig/v1beta/patch_jobs.proto"; +import "google/protobuf/empty.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1beta;osconfig"; +option java_outer_classname = "OsConfigProto"; +option java_package = "com.google.cloud.osconfig.v1beta"; + +// OS Config API +// +// The OS Config service is a server-side component that you can use to +// manage package installations and patch jobs for virtual machine instances. +service OsConfigService { + option (google.api.default_host) = "osconfig.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Patch VM instances by creating and running a patch job. + rpc ExecutePatchJob(ExecutePatchJobRequest) returns (PatchJob) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*}/patchJobs:execute" + body: "*" + }; + } + + // Get the patch job. This can be used to track the progress of an + // ongoing patch job or review the details of completed jobs. + rpc GetPatchJob(GetPatchJobRequest) returns (PatchJob) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/patchJobs/*}" + }; + } + + // Cancel a patch job. The patch job must be active. Canceled patch jobs + // cannot be restarted. + rpc CancelPatchJob(CancelPatchJobRequest) returns (PatchJob) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/patchJobs/*}:cancel" + body: "*" + }; + } + + // Get a list of patch jobs. + rpc ListPatchJobs(ListPatchJobsRequest) returns (ListPatchJobsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*}/patchJobs" + }; + } + + // Get a list of instance details for a given patch job. + rpc ListPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest) returns (ListPatchJobInstanceDetailsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/patchJobs/*}/instanceDetails" + }; + option (google.api.method_signature) = "parent"; + } + + // Create an OS Config patch deployment. + rpc CreatePatchDeployment(CreatePatchDeploymentRequest) returns (PatchDeployment) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*}/patchDeployments" + body: "patch_deployment" + }; + } + + // Get an OS Config patch deployment. + rpc GetPatchDeployment(GetPatchDeploymentRequest) returns (PatchDeployment) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/patchDeployments/*}" + }; + } + + // Get a page of OS Config patch deployments. + rpc ListPatchDeployments(ListPatchDeploymentsRequest) returns (ListPatchDeploymentsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*}/patchDeployments" + }; + } + + // Delete an OS Config patch deployment. + rpc DeletePatchDeployment(DeletePatchDeploymentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/patchDeployments/*}" + }; + } + + // Create an OS Config guest policy. + rpc CreateGuestPolicy(CreateGuestPolicyRequest) returns (GuestPolicy) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*}/guestPolicies" + body: "guest_policy" + }; + option (google.api.method_signature) = "parent, guest_policy"; + } + + // Get an OS Config guest policy. + rpc GetGuestPolicy(GetGuestPolicyRequest) returns (GuestPolicy) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/guestPolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get a page of OS Config guest policies. + rpc ListGuestPolicies(ListGuestPoliciesRequest) returns (ListGuestPoliciesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*}/guestPolicies" + }; + option (google.api.method_signature) = "parent"; + } + + // Update an OS Config guest policy. + rpc UpdateGuestPolicy(UpdateGuestPolicyRequest) returns (GuestPolicy) { + option (google.api.http) = { + patch: "/v1beta/{guest_policy.name=projects/*/guestPolicies/*}" + body: "guest_policy" + }; + option (google.api.method_signature) = "guest_policy,update_mask"; + } + + // Delete an OS Config guest policy. + rpc DeleteGuestPolicy(DeleteGuestPolicyRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/guestPolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lookup the effective guest policy that applies to a VM instance. This + // lookup merges all policies that are assigned to the instance ancestry. + rpc LookupEffectiveGuestPolicy(LookupEffectiveGuestPolicyRequest) returns (EffectiveGuestPolicy) { + option (google.api.http) = { + post: "/v1beta/{instance=projects/*/zones/*/instances/*}:lookupEffectiveGuestPolicy" + body: "*" + }; + } +} diff --git a/google/cloud/osconfig/v1beta/osconfig_v1beta.yaml b/google/cloud/osconfig/v1beta/osconfig_v1beta.yaml new file mode 100644 index 000000000..cfe6e7bb7 --- /dev/null +++ b/google/cloud/osconfig/v1beta/osconfig_v1beta.yaml @@ -0,0 +1,24 @@ +type: google.api.Service +config_version: 3 +name: osconfig.googleapis.com +title: Cloud OS Config API + +apis: +- name: google.cloud.osconfig.v1beta.OsConfigService + +documentation: + summary: |- + OS management tools that can be used for patch management, patch + compliance, and configuration management on VM instances. + +backend: + rules: + - selector: 'google.cloud.osconfig.v1beta.OsConfigService.*' + deadline: 30.0 + +authentication: + rules: + - selector: 'google.cloud.osconfig.v1beta.OsConfigService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/osconfig/v1beta/patch_deployments.proto b/google/cloud/osconfig/v1beta/patch_deployments.proto new file mode 100644 index 000000000..a98f4b3ff --- /dev/null +++ b/google/cloud/osconfig/v1beta/patch_deployments.proto @@ -0,0 +1,227 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1beta/patch_jobs.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/datetime.proto"; +import "google/type/dayofweek.proto"; +import "google/type/timeofday.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1beta;osconfig"; +option java_outer_classname = "PatchDeployments"; +option java_package = "com.google.cloud.osconfig.v1beta"; + +// Patch deployments are configurations that individual patch jobs use to +// complete a patch. These configurations include instance filter, package +// repository settings, and a schedule. For more information about creating and +// managing patch deployments, see [Scheduling patch +// jobs](/compute/docs/os-patch-management/schedule-patch-jobs). +message PatchDeployment { + // Unique name for the patch deployment resource in a project. The patch + // deployment name is in the form: + // `projects/{project_id}/patchDeployments/{patch_deployment_id}`. + // This field is ignored when you create a new patch deployment. + string name = 1; + + // Optional. Description of the patch deployment. Length of the description is limited + // to 1024 characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. VM instances to patch. + PatchInstanceFilter instance_filter = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Patch configuration that is applied. + PatchConfig patch_config = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Duration of the patch. After the duration ends, the patch times out. + google.protobuf.Duration duration = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Schedule for the patch. + oneof schedule { + // Required. Schedule a one-time execution. + OneTimeSchedule one_time_schedule = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Schedule recurring executions. + RecurringSchedule recurring_schedule = 7 [(google.api.field_behavior) = REQUIRED]; + } + + // Output only. Time the patch deployment was created. Timestamp is in + // RFC3339 + // text format. + google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the patch deployment was last updated. Timestamp is in + // RFC3339 + // text format. + google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last time a patch job was started by this deployment. + // Timestamp is in + // RFC3339 + // text format. + google.protobuf.Timestamp last_execute_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Sets the time for a one time patch deployment. Timestamp is in +// RFC3339 +// text format. +message OneTimeSchedule { + // Required. The desired patch job execution time. + google.protobuf.Timestamp execute_time = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Sets the time for recurring patch deployments. +message RecurringSchedule { + // Specifies the frequency of the recurring patch deployments. + enum Frequency { + // Invalid. A frequency must be specified. + FREQUENCY_UNSPECIFIED = 0; + + // Indicates that the frequency should be expressed in terms of + // weeks. + WEEKLY = 1; + + // Indicates that the frequency should be expressed in terms of + // months. + MONTHLY = 2; + } + + // Required. Defines the time zone that `time_of_day` is relative to. + // The rules for daylight saving time are determined by the chosen time zone. + google.type.TimeZone time_zone = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The time that the recurring schedule becomes effective. + // Defaults to `create_time` of the patch deployment. + google.protobuf.Timestamp start_time = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The end time at which a recurring patch deployment schedule is no longer + // active. + google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Time of the day to run a recurring deployment. + google.type.TimeOfDay time_of_day = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The frequency unit of this recurring schedule. + Frequency frequency = 5 [(google.api.field_behavior) = REQUIRED]; + + // Configurations for this recurring schedule. + // Configurations must match frequency. + oneof schedule_config { + // Required. Schedule with weekly executions. + WeeklySchedule weekly = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Schedule with monthly executions. + MonthlySchedule monthly = 7 [(google.api.field_behavior) = REQUIRED]; + } + + // Output only. The time the last patch job ran successfully. + google.protobuf.Timestamp last_execute_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the next patch job is scheduled to run. + google.protobuf.Timestamp next_execute_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents a weekly schedule. +message WeeklySchedule { + // Required. Day of the week. + google.type.DayOfWeek day_of_week = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents a monthly schedule. An example of a valid monthly schedule is +// "on the third Tuesday of the month" or "on the 15th of the month". +message MonthlySchedule { + // One day in a month. + oneof day_of_month { + // Required. Week day in a month. + WeekDayOfMonth week_day_of_month = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1 + // indicates the last day of the month. + // Months without the target day will be skipped. For example, a schedule to + // run "every month on the 31st" will not run in February, April, June, etc. + int32 month_day = 2 [(google.api.field_behavior) = REQUIRED]; + } +} + +// Represents one week day in a month. An example is "the 4th Sunday". +message WeekDayOfMonth { + // Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1 + // indicates the last week of the month. + int32 week_ordinal = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A day of the week. + google.type.DayOfWeek day_of_week = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A request message for creating a patch deployment. +message CreatePatchDeploymentRequest { + // Required. The project to apply this patch deployment to in the form `projects/*`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A name for the patch deployment in the project. When creating a name + // the following rules apply: + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the project. + string patch_deployment_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The patch deployment to create. + PatchDeployment patch_deployment = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A request message for retrieving a patch deployment. +message GetPatchDeploymentRequest { + // Required. The resource name of the patch deployment in the form + // `projects/*/patchDeployments/*`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// A request message for listing patch deployments. +message ListPatchDeploymentsRequest { + // Required. The resource name of the parent in the form `projects/*`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of patch deployments to return. Default is 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous call to ListPatchDeployments + // that indicates where this listing should continue from. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response message for listing patch deployments. +message ListPatchDeploymentsResponse { + // The list of patch deployments. + repeated PatchDeployment patch_deployments = 1; + + // A pagination token that can be used to get the next page of patch + // deployments. + string next_page_token = 2; +} + +// A request message for deleting a patch deployment. +message DeletePatchDeploymentRequest { + // Required. The resource name of the patch deployment in the form + // `projects/*/patchDeployments/*`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/google/cloud/osconfig/v1beta/patch_jobs.proto b/google/cloud/osconfig/v1beta/patch_jobs.proto new file mode 100644 index 000000000..b7263b0f7 --- /dev/null +++ b/google/cloud/osconfig/v1beta/patch_jobs.proto @@ -0,0 +1,638 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1beta;osconfig"; +option java_outer_classname = "PatchJobs"; +option java_package = "com.google.cloud.osconfig.v1beta"; + +// A request message to initiate patching across Google Compute Engine +// instances. +message ExecutePatchJobRequest { + // Required. The project in which to run this patch in the form `projects/*` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Description of the patch job. Length of the description is limited + // to 1024 characters. + string description = 2; + + // Required. Instances to patch, either explicitly or filtered by some criteria such + // as zone or labels. + PatchInstanceFilter instance_filter = 7 [(google.api.field_behavior) = REQUIRED]; + + // Patch configuration being applied. If omitted, instances are + // patched using the default configurations. + PatchConfig patch_config = 4; + + // Duration of the patch job. After the duration ends, the patch job + // times out. + google.protobuf.Duration duration = 5; + + // If this patch is a dry-run only, instances are contacted but + // will do nothing. + bool dry_run = 6; + + // Display name for this patch job. This does not have to be unique. + string display_name = 8; +} + +// Request to get an active or completed patch job. +message GetPatchJobRequest { + // Required. Name of the patch in the form `projects/*/patchJobs/*` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to list details for all instances that are part of a patch job. +message ListPatchJobInstanceDetailsRequest { + // Required. The parent for the instances are in the form of `projects/*/patchJobs/*`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of instance details records to return. Default is 100. + int32 page_size = 2; + + // A pagination token returned from a previous call + // that indicates where this listing should continue from. + string page_token = 3; + + // A filter expression that filters results listed in the response. This + // field supports filtering results by instance zone, name, state, or + // `failure_reason`. + string filter = 4; +} + +// A response message for listing the instances details for a patch job. +message ListPatchJobInstanceDetailsResponse { + // A list of instance status. + repeated PatchJobInstanceDetails patch_job_instance_details = 1; + + // A pagination token that can be used to get the next page of results. + string next_page_token = 2; +} + +// Patch details for a VM instance. For more information about reviewing VM +// instance details, see +// [Listing all VM instance details for a specific patch +// job](/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details). +message PatchJobInstanceDetails { + // The instance name in the form `projects/*/zones/*/instances/*` + string name = 1; + + // The unique identifier for the instance. This identifier is + // defined by the server. + string instance_system_id = 2; + + // Current state of instance patch. + Instance.PatchState state = 3; + + // If the patch fails, this field provides the reason. + string failure_reason = 4; + + // The number of times the agent that the agent attempts to apply the patch. + int64 attempt_count = 5; +} + +// A request message for listing patch jobs. +message ListPatchJobsRequest { + // Required. In the form of `projects/*` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of instance status to return. + int32 page_size = 2; + + // A pagination token returned from a previous call + // that indicates where this listing should continue from. + string page_token = 3; + + // If provided, this field specifies the criteria that must be met by patch + // jobs to be included in the response. + // Currently, filtering is only available on the patch_deployment field. + string filter = 4; +} + +// A response message for listing patch jobs. +message ListPatchJobsResponse { + // The list of patch jobs. + repeated PatchJob patch_jobs = 1; + + // A pagination token that can be used to get the next page of results. + string next_page_token = 2; +} + +// A high level representation of a patch job that is either in progress +// or has completed. +// +// Instances details are not included in the job. To paginate through instance +// details, use ListPatchJobInstanceDetails. +// +// For more information about patch jobs, see +// [Creating patch jobs](/compute/docs/os-patch-management/create-patch-job). +message PatchJob { + // A summary of the current patch state across all instances that this patch + // job affects. Contains counts of instances in different states. These states + // map to `InstancePatchState`. List patch job instance details to see the + // specific states of each instance. + message InstanceDetailsSummary { + // Number of instances pending patch job. + int64 pending_instance_count = 1; + + // Number of instances that are inactive. + int64 inactive_instance_count = 2; + + // Number of instances notified about patch job. + int64 notified_instance_count = 3; + + // Number of instances that have started. + int64 started_instance_count = 4; + + // Number of instances that are downloading patches. + int64 downloading_patches_instance_count = 5; + + // Number of instances that are applying patches. + int64 applying_patches_instance_count = 6; + + // Number of instances rebooting. + int64 rebooting_instance_count = 7; + + // Number of instances that have completed successfully. + int64 succeeded_instance_count = 8; + + // Number of instances that require reboot. + int64 succeeded_reboot_required_instance_count = 9; + + // Number of instances that failed. + int64 failed_instance_count = 10; + + // Number of instances that have acked and will start shortly. + int64 acked_instance_count = 11; + + // Number of instances that exceeded the time out while applying the patch. + int64 timed_out_instance_count = 12; + + // Number of instances that are running the pre-patch step. + int64 pre_patch_step_instance_count = 13; + + // Number of instances that are running the post-patch step. + int64 post_patch_step_instance_count = 14; + + // Number of instances that do not appear to be running the agent. Check to + // ensure that the agent is installed, running, and able to communicate with + // the service. + int64 no_agent_detected_instance_count = 15; + } + + // Enumeration of the various states a patch job passes through as it + // executes. + enum State { + // State must be specified. + STATE_UNSPECIFIED = 0; + + // The patch job was successfully initiated. + STARTED = 1; + + // The patch job is looking up instances to run the patch on. + INSTANCE_LOOKUP = 2; + + // Instances are being patched. + PATCHING = 3; + + // Patch job completed successfully. + SUCCEEDED = 4; + + // Patch job completed but there were errors. + COMPLETED_WITH_ERRORS = 5; + + // The patch job was canceled. + CANCELED = 6; + + // The patch job timed out. + TIMED_OUT = 7; + } + + // Unique identifier for this patch job in the form + // `projects/*/patchJobs/*` + string name = 1; + + // Display name for this patch job. This is not a unique identifier. + string display_name = 14; + + // Description of the patch job. Length of the description is limited + // to 1024 characters. + string description = 2; + + // Time this patch job was created. + google.protobuf.Timestamp create_time = 3; + + // Last time this patch job was updated. + google.protobuf.Timestamp update_time = 4; + + // The current state of the PatchJob . + State state = 5; + + // Instances to patch. + PatchInstanceFilter instance_filter = 13; + + // Patch configuration being applied. + PatchConfig patch_config = 7; + + // Duration of the patch job. After the duration ends, the + // patch job times out. + google.protobuf.Duration duration = 8; + + // Summary of instance details. + InstanceDetailsSummary instance_details_summary = 9; + + // If this patch job is a dry run, the agent reports that it has + // finished without running any updates on the VM instance. + bool dry_run = 10; + + // If this patch job failed, this message provides information about the + // failure. + string error_message = 11; + + // Reflects the overall progress of the patch job in the range of + // 0.0 being no progress to 100.0 being complete. + double percent_complete = 12; + + // Output only. Name of the patch deployment that created this patch job. + string patch_deployment = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Patch configuration specifications. Contains details on how to apply the +// patch(es) to a VM instance. +message PatchConfig { + // Post-patch reboot settings. + enum RebootConfig { + // The default behavior is DEFAULT. + REBOOT_CONFIG_UNSPECIFIED = 0; + + // The agent decides if a reboot is necessary by checking signals such as + // registry keys on Windows or `/var/run/reboot-required` on APT based + // systems. On RPM based systems, a set of core system package install times + // are compared with system boot time. + DEFAULT = 1; + + // Always reboot the machine after the update completes. + ALWAYS = 2; + + // Never reboot the machine after the update completes. + NEVER = 3; + } + + // Post-patch reboot settings. + RebootConfig reboot_config = 1; + + // Apt update settings. Use this setting to override the default `apt` patch + // rules. + AptSettings apt = 3; + + // Yum update settings. Use this setting to override the default `yum` patch + // rules. + YumSettings yum = 4; + + // Goo update settings. Use this setting to override the default `goo` patch + // rules. + GooSettings goo = 5; + + // Zypper update settings. Use this setting to override the default `zypper` + // patch rules. + ZypperSettings zypper = 6; + + // Windows update settings. Use this override the default windows patch rules. + WindowsUpdateSettings windows_update = 7; + + // The `ExecStep` to run before the patch update. + ExecStep pre_step = 8; + + // The `ExecStep` to run after the patch update. + ExecStep post_step = 9; +} + +// Namespace for instance state enums. +message Instance { + // Patch state of an instance. + enum PatchState { + // Unspecified. + PATCH_STATE_UNSPECIFIED = 0; + + // The instance is not yet notified. + PENDING = 1; + + // Instance is inactive and cannot be patched. + INACTIVE = 2; + + // The instance is notified that it should be patched. + NOTIFIED = 3; + + // The instance has started the patching process. + STARTED = 4; + + // The instance is downloading patches. + DOWNLOADING_PATCHES = 5; + + // The instance is applying patches. + APPLYING_PATCHES = 6; + + // The instance is rebooting. + REBOOTING = 7; + + // The instance has completed applying patches. + SUCCEEDED = 8; + + // The instance has completed applying patches but a reboot is required. + SUCCEEDED_REBOOT_REQUIRED = 9; + + // The instance has failed to apply the patch. + FAILED = 10; + + // The instance acked the notification and will start shortly. + ACKED = 11; + + // The instance exceeded the time out while applying the patch. + TIMED_OUT = 12; + + // The instance is running the pre-patch step. + RUNNING_PRE_PATCH_STEP = 13; + + // The instance is running the post-patch step. + RUNNING_POST_PATCH_STEP = 14; + + // The service could not detect the presence of the agent. Check to ensure + // that the agent is installed, running, and able to communicate with the + // service. + NO_AGENT_DETECTED = 15; + } + + +} + +// Message for canceling a patch job. +message CancelPatchJobRequest { + // Required. Name of the patch in the form `projects/*/patchJobs/*` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Apt patching is completed by executing `apt-get update && apt-get +// upgrade`. Additional options can be set to control how this is executed. +message AptSettings { + // Apt patch type. + enum Type { + // By default, upgrade will be performed. + TYPE_UNSPECIFIED = 0; + + // Runs `apt-get dist-upgrade`. + DIST = 1; + + // Runs `apt-get upgrade`. + UPGRADE = 2; + } + + // By changing the type to DIST, the patching is performed + // using `apt-get dist-upgrade` instead. + Type type = 1; + + // List of packages to exclude from update. These packages will be excluded + repeated string excludes = 2; + + // An exclusive list of packages to be updated. These are the only packages + // that will be updated. If these packages are not installed, they will be + // ignored. This field cannot be specified with any other patch configuration + // fields. + repeated string exclusive_packages = 3; +} + +// Yum patching is performed by executing `yum update`. Additional options +// can be set to control how this is executed. +// +// Note that not all settings are supported on all platforms. +message YumSettings { + // Adds the `--security` flag to `yum update`. Not supported on + // all platforms. + bool security = 1; + + // Will cause patch to run `yum update-minimal` instead. + bool minimal = 2; + + // List of packages to exclude from update. These packages are excluded by + // using the yum `--exclude` flag. + repeated string excludes = 3; + + // An exclusive list of packages to be updated. These are the only packages + // that will be updated. If these packages are not installed, they will be + // ignored. This field must not be specified with any other patch + // configuration fields. + repeated string exclusive_packages = 4; +} + +// Googet patching is performed by running `googet update`. +message GooSettings { + +} + +// Zypper patching is performed by running `zypper patch`. +// See also https://en.opensuse.org/SDB:Zypper_manual. +message ZypperSettings { + // Adds the `--with-optional` flag to `zypper patch`. + bool with_optional = 1; + + // Adds the `--with-update` flag, to `zypper patch`. + bool with_update = 2; + + // Install only patches with these categories. + // Common categories include security, recommended, and feature. + repeated string categories = 3; + + // Install only patches with these severities. + // Common severities include critical, important, moderate, and low. + repeated string severities = 4; + + // List of patches to exclude from update. + repeated string excludes = 5; + + // An exclusive list of patches to be updated. These are the only patches + // that will be installed using 'zypper patch patch:' command. + // This field must not be used with any other patch configuration fields. + repeated string exclusive_patches = 6; +} + +// Windows patching is performed using the Windows Update Agent. +message WindowsUpdateSettings { + // Microsoft Windows update classifications as defined in + // [1] + // https://support.microsoft.com/en-us/help/824684/description-of-the-standard-terminology-that-is-used-to-describe-micro + enum Classification { + // Invalid. If classifications are included, they must be specified. + CLASSIFICATION_UNSPECIFIED = 0; + + // "A widely released fix for a specific problem that addresses a critical, + // non-security-related bug." [1] + CRITICAL = 1; + + // "A widely released fix for a product-specific, security-related + // vulnerability. Security vulnerabilities are rated by their severity. The + // severity rating is indicated in the Microsoft security bulletin as + // critical, important, moderate, or low." [1] + SECURITY = 2; + + // "A widely released and frequent software update that contains additions + // to a product's definition database. Definition databases are often used + // to detect objects that have specific attributes, such as malicious code, + // phishing websites, or junk mail." [1] + DEFINITION = 3; + + // "Software that controls the input and output of a device." [1] + DRIVER = 4; + + // "New product functionality that is first distributed outside the context + // of a product release and that is typically included in the next full + // product release." [1] + FEATURE_PACK = 5; + + // "A tested, cumulative set of all hotfixes, security updates, critical + // updates, and updates. Additionally, service packs may contain additional + // fixes for problems that are found internally since the release of the + // product. Service packs my also contain a limited number of + // customer-requested design changes or features." [1] + SERVICE_PACK = 6; + + // "A utility or feature that helps complete a task or set of tasks." [1] + TOOL = 7; + + // "A tested, cumulative set of hotfixes, security updates, critical + // updates, and updates that are packaged together for easy deployment. A + // rollup generally targets a specific area, such as security, or a + // component of a product, such as Internet Information Services (IIS)." [1] + UPDATE_ROLLUP = 8; + + // "A widely released fix for a specific problem. An update addresses a + // noncritical, non-security-related bug." [1] + UPDATE = 9; + } + + // Only apply updates of these windows update classifications. If empty, all + // updates are applied. + repeated Classification classifications = 1; + + // List of KBs to exclude from update. + repeated string excludes = 2; + + // An exclusive list of kbs to be updated. These are the only patches + // that will be updated. This field must not be used with other + // patch configurations. + repeated string exclusive_patches = 3; +} + +// A step that runs an executable for a PatchJob. +message ExecStep { + // The ExecStepConfig for all Linux VMs targeted by the PatchJob. + ExecStepConfig linux_exec_step_config = 1; + + // The ExecStepConfig for all Windows VMs targeted by the PatchJob. + ExecStepConfig windows_exec_step_config = 2; +} + +// Common configurations for an ExecStep. +message ExecStepConfig { + // The interpreter used to execute the a file. + enum Interpreter { + // Invalid for a Windows ExecStepConfig. For a Linux ExecStepConfig, the + // interpreter will be parsed from the shebang line of the script if + // unspecified. + INTERPRETER_UNSPECIFIED = 0; + + // Indicates that the script is run with `/bin/sh` on Linux and `cmd` + // on Windows. + SHELL = 1; + + // Indicates that the file is run with PowerShell flags + // `-NonInteractive`, `-NoProfile`, and `-ExecutionPolicy Bypass`. + POWERSHELL = 2; + } + + // Location of the executable. + oneof executable { + // An absolute path to the executable on the VM. + string local_path = 1; + + // A Google Cloud Storage object containing the executable. + GcsObject gcs_object = 2; + } + + // Defaults to [0]. A list of possible return values that the + // execution can return to indicate a success. + repeated int32 allowed_success_codes = 3; + + // The script interpreter to use to run the script. If no interpreter is + // specified the script will be executed directly, which will likely + // only succeed for scripts with [shebang lines] + // (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). + Interpreter interpreter = 4; +} + +// Google Cloud Storage object representation. +message GcsObject { + // Required. Bucket of the Google Cloud Storage object. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the Google Cloud Storage object. + string object = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Generation number of the Google Cloud Storage object. This is used to + // ensure that the ExecStep specified by this PatchJob does not change. + int64 generation_number = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A filter to target VM instances for patching. The targeted +// VMs must meet all criteria specified. So if both labels and zones are +// specified, the patch job targets only VMs with those labels and in those +// zones. +message PatchInstanceFilter { + // Represents a group of VMs that can be identified as having all these + // labels, for example "env=prod and app=web". + message GroupLabel { + // Google Compute Engine instance labels that must be present for a VM + // instance to be targeted by this filter. + map labels = 1; + } + + // Target all VM instances in the project. If true, no other criteria is + // permitted. + bool all = 1; + + // Targets VM instances matching at least one of these label sets. This allows + // targeting of disparate groups, for example "env=prod or env=staging". + repeated GroupLabel group_labels = 2; + + // Targets VM instances in ANY of these zones. Leave empty to target VM + // instances in any zone. + repeated string zones = 3; + + // Targets any of the VM instances specified. Instances are specified by their + // URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME], + // `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or + // `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` + repeated string instances = 4; + + // Targets VMs whose name starts with one of these prefixes. Similar to + // labels, this is another way to group VMs when targeting configs, for + // example prefix="prod-". + repeated string instance_name_prefixes = 5; +} diff --git a/google/cloud/oslogin/artman_oslogin_v1.yaml b/google/cloud/oslogin/artman_oslogin_v1.yaml index 70e9022e2..6903dfc27 100644 --- a/google/cloud/oslogin/artman_oslogin_v1.yaml +++ b/google/cloud/oslogin/artman_oslogin_v1.yaml @@ -7,8 +7,9 @@ common: src_proto_paths: - common - v1 - service_yaml: oslogin_v1.yaml + service_yaml: v1/oslogin_v1.yaml gapic_yaml: v1/oslogin_gapic.yaml + proto_package: google.cloud.oslogin.v1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/oslogin/common/BUILD.bazel b/google/cloud/oslogin/common/BUILD.bazel index 8b02bf5ff..32e6e8c73 100644 --- a/google/cloud/oslogin/common/BUILD.bazel +++ b/google/cloud/oslogin/common/BUILD.bazel @@ -1,3 +1,5 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -12,13 +14,16 @@ proto_library( "common.proto", ], deps = [ - "//google/api:annotations_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", ], ) proto_library_with_info( name = "common_proto_with_info", - deps = [":common_proto"], + deps = [ + ":common_proto", + ], ) ############################################################################## @@ -27,7 +32,7 @@ proto_library_with_info( load( "@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", - "java_resource_name_proto_library", + "java_proto_library", ) java_proto_library( @@ -41,21 +46,128 @@ java_grpc_library( deps = [":common_java_proto"], ) -java_resource_name_proto_library( - name = "common_resource_name_java_proto", - gapic_yaml = "//google/logging/v2:logging_gapic.yaml", - deps = [":common_proto"], -) - ############################################################################## # Go ############################################################################## -load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", +) go_proto_library( name = "common_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/cloud/oslogin/common", protos = [":common_proto"], - deps = ["//google/api:annotations_go_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "common_moved_proto", + srcs = [":common_proto"], + strip_import_prefix = "google/cloud/oslogin/common", + import_prefix = "google/cloud/oslogin/common", + deps = [ + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + ], +) + +py_proto_library( + name = "common_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":common_moved_proto"], +) + +py_grpc_library( + name = "common_py_grpc", + srcs = [":common_moved_proto"], + deps = [":common_py_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "common_php_proto", + deps = [":common_proto"], +) + +php_grpc_library( + name = "common_php_grpc", + srcs = [":common_proto"], + deps = [":common_php_proto"], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "common_ruby_proto", + deps = [":common_proto"], +) + +ruby_grpc_library( + name = "common_ruby_grpc", + srcs = [":common_proto"], + deps = [":common_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "common_csharp_proto", + deps = [":common_proto"], +) + +csharp_grpc_library( + name = "common_csharp_grpc", + srcs = [":common_proto"], + deps = [":common_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ code here diff --git a/google/cloud/oslogin/common/common.proto b/google/cloud/oslogin/common/common.proto index 6c45ebb6d..4d9755f0d 100644 --- a/google/cloud/oslogin/common/common.proto +++ b/google/cloud/oslogin/common/common.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,21 +11,48 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.oslogin.common; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Cloud.OsLogin.Common"; option go_package = "google.golang.org/genproto/googleapis/cloud/oslogin/common;common"; option java_outer_classname = "OsLoginProto"; option java_package = "com.google.cloud.oslogin.common"; option php_namespace = "Google\\Cloud\\OsLogin\\Common"; +option ruby_package = "Google::Cloud::OsLogin::Common"; + +// Define a "User" resource owned by OS Login. +option (google.api.resource_definition) = { + type: "oslogin.googleapis.com/User" + pattern: "users/{user}" +}; + +// The operating system options for account entries. +enum OperatingSystemType { + // The operating system type associated with the user account information is + // unspecified. + OPERATING_SYSTEM_TYPE_UNSPECIFIED = 0; + + // Linux user account information. + LINUX = 1; + + // Windows user account information. + WINDOWS = 2; +} // The POSIX account information associated with a Google account. message PosixAccount { + option (google.api.resource) = { + type: "oslogin.googleapis.com/PosixAccount" + pattern: "users/{user}/projects/{project}" + }; + // Only one POSIX account can be marked as primary. bool primary = 1; @@ -52,11 +79,22 @@ message PosixAccount { string system_id = 8; // Output only. A POSIX account identifier. - string account_id = 9; + string account_id = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The operating system type where this account applies. + OperatingSystemType operating_system_type = 10; + + // Output only. The canonical resource name. + string name = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The SSH public key information associated with a Google account. message SshPublicKey { + option (google.api.resource) = { + type: "oslogin.googleapis.com/SshPublicKey" + pattern: "users/{user}/sshPublicKeys/{fingerprint}" + }; + // Public key text in SSH format, defined by // RFC4253 // section 6.6. @@ -66,5 +104,8 @@ message SshPublicKey { int64 expiration_time_usec = 2; // Output only. The SHA-256 fingerprint of the SSH public key. - string fingerprint = 3; + string fingerprint = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The canonical resource name. + string name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/cloud/oslogin/oslogin_v1.yaml b/google/cloud/oslogin/oslogin_v1.yaml deleted file mode 100644 index ae1e989cf..000000000 --- a/google/cloud/oslogin/oslogin_v1.yaml +++ /dev/null @@ -1,40 +0,0 @@ -type: google.api.Service -config_version: 3 -name: oslogin.googleapis.com -title: Google Cloud OS Login API - -apis: -- name: google.cloud.oslogin.v1.OsLoginService - -documentation: - summary: Manages OS login configuration for Google account users. - -backend: - rules: - - selector: google.cloud.oslogin.v1.OsLoginService.DeletePosixAccount - deadline: 10.0 - - selector: google.cloud.oslogin.v1.OsLoginService.DeleteSshPublicKey - deadline: 10.0 - - selector: google.cloud.oslogin.v1.OsLoginService.GetLoginProfile - deadline: 10.0 - - selector: google.cloud.oslogin.v1.OsLoginService.GetSshPublicKey - deadline: 10.0 - - selector: google.cloud.oslogin.v1.OsLoginService.ImportSshPublicKey - deadline: 10.0 - - selector: google.cloud.oslogin.v1.OsLoginService.UpdateSshPublicKey - deadline: 10.0 - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/compute - - selector: google.cloud.oslogin.v1.OsLoginService.GetLoginProfile - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/cloud-platform.read-only, - https://www.googleapis.com/auth/compute, - https://www.googleapis.com/auth/compute.readonly diff --git a/google/cloud/oslogin/v1/BUILD.bazel b/google/cloud/oslogin/v1/BUILD.bazel index bcee7033f..ba92c5804 100644 --- a/google/cloud/oslogin/v1/BUILD.bazel +++ b/google/cloud/oslogin/v1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") _PROTO_SUBPACKAGE_DEPS = [ @@ -17,6 +20,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:field_mask_proto", ] + _PROTO_SUBPACKAGE_DEPS, @@ -24,7 +30,10 @@ proto_library( proto_library_with_info( name = "oslogin_proto_with_info", - deps = [":oslogin_proto"], + deps = [ + ":oslogin_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -32,18 +41,14 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - _JAVA_PROTO_SUBPACKAGE_DEPS = [ "//google/cloud/oslogin/common:common_java_proto", ] @@ -52,10 +57,6 @@ _JAVA_GRPC_SUBPACKAGE_DEPS = [ "//google/cloud/oslogin/common:common_java_grpc", ] -_RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS = [ - "//google/cloud/oslogin/common:common_resource_name_java_proto", -] - java_proto_library( name = "oslogin_java_proto", deps = [":oslogin_proto"], @@ -64,51 +65,52 @@ java_proto_library( java_grpc_library( name = "oslogin_java_grpc", srcs = [":oslogin_proto"], - deps = [":oslogin_java_proto"] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS, + deps = [":oslogin_java_proto"] + _JAVA_PROTO_SUBPACKAGE_DEPS, ) java_resource_name_proto_library( - name = "oslogin_resource_name_java_proto", - gapic_yaml = "oslogin_gapic.yaml", - deps = [":oslogin_proto"], + name = "oslogin_java_gapic_resource_name", + gapic_yaml = "//google/cloud/oslogin/v1:oslogin_gapic.yaml", + deps = [ + ":oslogin_proto", + "//google/cloud:common_resources_proto", + ] + _PROTO_SUBPACKAGE_DEPS, ) java_gapic_library( name = "oslogin_java_gapic", src = ":oslogin_proto_with_info", gapic_yaml = "oslogin_gapic.yaml", - service_yaml = "//google/cloud/oslogin:oslogin_v1.yaml", + gen_resource_name = False, + package = "google.cloud.oslogin.v1", + service_yaml = ":oslogin_v1.yaml", test_deps = [ ":oslogin_java_grpc", ] + _JAVA_GRPC_SUBPACKAGE_DEPS, deps = [ ":oslogin_java_proto", - ":oslogin_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS, + ":oslogin_java_gapic_resource_name", + ] + _JAVA_PROTO_SUBPACKAGE_DEPS, ) -[java_test( - name = test_name, - test_class = test_name, +java_gapic_test( + name = "oslogin_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.oslogin.v1.OsLoginServiceClientTest", + ], runtime_deps = [":oslogin_java_gapic_test"], -) for test_name in [ - "com.google.cloud.oslogin.v1.OsLoginServiceClientTest", -]] +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-oslogin-v1-java", - client_deps = [":oslogin_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":oslogin_java_gapic_test"], - grpc_deps = [":oslogin_java_grpc"] + _JAVA_GRPC_SUBPACKAGE_DEPS, - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":oslogin_java_gapic", + ":oslogin_java_grpc", ":oslogin_java_proto", ":oslogin_proto", - ":oslogin_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS + _PROTO_SUBPACKAGE_DEPS + _RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS, - version = "0.0.0-SNAPSHOT", + ":oslogin_java_gapic_resource_name", + ] + _JAVA_PROTO_SUBPACKAGE_DEPS + _PROTO_SUBPACKAGE_DEPS + _JAVA_GRPC_SUBPACKAGE_DEPS, ) ############################################################################## @@ -116,10 +118,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -135,10 +137,10 @@ go_proto_library( go_gapic_library( name = "oslogin_go_gapic", - src = ":oslogin_proto_with_info", - gapic_yaml = "oslogin_gapic.yaml", - importpath = "cloud.google.com/go/oslogin/apiv1", - service_yaml = "//google/cloud/oslogin:oslogin_v1.yaml", + srcs = [":oslogin_proto_with_info"], + grpc_service_config = "oslogin_grpc_service_config.json", + importpath = "cloud.google.com/go/oslogin/apiv1;oslogin", + service_yaml = "oslogin_v1.yaml", deps = [ ":oslogin_go_proto", "//google/cloud/oslogin/common:common_go_proto", @@ -152,14 +154,255 @@ go_test( importpath = "cloud.google.com/go/oslogin/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-oslogin-v1-go", deps = [ ":oslogin_go_gapic", - ":oslogin_go_gapic_srcjar-smoke-test.srcjar", ":oslogin_go_gapic_srcjar-test.srcjar", ":oslogin_go_proto", "//google/cloud/oslogin/common:common_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +_PY_SUBPACKAGE_DEPS = [ + "//google/cloud/oslogin/common:common_py_proto", + "//google/cloud/oslogin/common:common_py_grpc", +] + +moved_proto_library( + name = "oslogin_moved_proto", + srcs = [":oslogin_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + ] + _PROTO_SUBPACKAGE_DEPS, +) + +py_proto_library( + name = "oslogin_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":oslogin_moved_proto"], +) + +py_grpc_library( + name = "oslogin_py_grpc", + srcs = [":oslogin_moved_proto"], + deps = [":oslogin_py_proto"], +) + +py_gapic_library( + name = "oslogin_py_gapic", + src = ":oslogin_proto_with_info", + gapic_yaml = "oslogin_gapic.yaml", + package = "google.cloud.oslogin.v1", + service_yaml = "oslogin_v1.yaml", + deps = [ + ":oslogin_py_grpc", + ":oslogin_py_proto", + ] + _PY_SUBPACKAGE_DEPS, +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "oslogin-v1-py", + deps = [ + ":oslogin_py_gapic", + ":oslogin_py_grpc", + ":oslogin_py_proto", + ] + _PY_SUBPACKAGE_DEPS, +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +_PHP_SUBPACKAGE_DEPS = [ + "//google/cloud/oslogin/common:common_php_proto", + "//google/cloud/oslogin/common:common_php_grpc", +] + +php_proto_library( + name = "oslogin_php_proto", + deps = [":oslogin_proto"], +) + +php_grpc_library( + name = "oslogin_php_grpc", + srcs = [":oslogin_proto"], + deps = [":oslogin_php_proto"], +) + +php_gapic_library( + name = "oslogin_php_gapic", + src = ":oslogin_proto_with_info", + gapic_yaml = "oslogin_gapic.yaml", + package = "google.cloud.oslogin.v1", + service_yaml = "oslogin_v1.yaml", + deps = [ + ":oslogin_php_grpc", + ":oslogin_php_proto", + ] + _PHP_SUBPACKAGE_DEPS, +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-oslogin-v1-php", + deps = [ + ":oslogin_php_gapic", + ":oslogin_php_grpc", + ":oslogin_php_proto", + ] + _PHP_SUBPACKAGE_DEPS, +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "oslogin_nodejs_gapic", + src = ":oslogin_proto_with_info", + gapic_yaml = "oslogin_gapic.yaml", + package = "google.cloud.oslogin.v1", + service_yaml = "oslogin_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "oslogin-v1-nodejs", + deps = [ + ":oslogin_nodejs_gapic", + ":oslogin_proto", + ] + _PROTO_SUBPACKAGE_DEPS, +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +_RUBY_SUBPACKAGE_DEPS = [ + "//google/cloud/oslogin/common:common_ruby_proto", + "//google/cloud/oslogin/common:common_ruby_grpc", +] + +ruby_proto_library( + name = "oslogin_ruby_proto", + deps = [":oslogin_proto"], +) + +ruby_grpc_library( + name = "oslogin_ruby_grpc", + srcs = [":oslogin_proto"], + deps = [":oslogin_ruby_proto"], +) + +ruby_gapic_library( + name = "oslogin_ruby_gapic", + src = ":oslogin_proto_with_info", + gapic_yaml = "oslogin_gapic.yaml", + package = "google.cloud.oslogin.v1", + service_yaml = "oslogin_v1.yaml", + deps = [ + ":oslogin_ruby_grpc", + ":oslogin_ruby_proto", + ] + _RUBY_SUBPACKAGE_DEPS, +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-oslogin-v1-ruby", + deps = [ + ":oslogin_ruby_gapic", + ":oslogin_ruby_grpc", + ":oslogin_ruby_proto", + ] + _RUBY_SUBPACKAGE_DEPS, +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +_CSHARP_SUBPACKAGE_DEPS = [ + "//google/cloud/oslogin/common:common_csharp_proto", + "//google/cloud/oslogin/common:common_csharp_grpc", +] + +csharp_proto_library( + name = "oslogin_csharp_proto", + deps = [":oslogin_proto"], +) + +csharp_grpc_library( + name = "oslogin_csharp_grpc", + srcs = [":oslogin_proto"], + deps = [":oslogin_csharp_proto"], +) + +csharp_gapic_library( + name = "oslogin_csharp_gapic", + src = ":oslogin_proto_with_info", + gapic_yaml = "oslogin_gapic.yaml", + package = "google.cloud.oslogin.v1", + service_yaml = "oslogin_v1.yaml", + deps = [ + ":oslogin_csharp_grpc", + ":oslogin_csharp_proto", + ] + _CSHARP_SUBPACKAGE_DEPS, +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-oslogin-v1-csharp", + deps = [ + ":oslogin_csharp_gapic", + ":oslogin_csharp_grpc", + ":oslogin_csharp_proto", + ] + _CSHARP_SUBPACKAGE_DEPS, +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/oslogin/v1/oslogin.proto b/google/cloud/oslogin/v1/oslogin.proto index d76bd47e6..25e9be0a0 100644 --- a/google/cloud/oslogin/v1/oslogin.proto +++ b/google/cloud/oslogin/v1/oslogin.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.oslogin.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/oslogin/common/common.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -27,26 +31,32 @@ option java_multiple_files = true; option java_outer_classname = "OsLoginProto"; option java_package = "com.google.cloud.oslogin.v1"; option php_namespace = "Google\\Cloud\\OsLogin\\V1"; +option ruby_package = "Google::Cloud::OsLogin::V1"; // Cloud OS Login API // // The Cloud OS Login API allows you to manage users and their associated SSH // public keys for logging into virtual machines on Google Cloud Platform. service OsLoginService { + option (google.api.default_host) = "oslogin.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/compute"; + // Deletes a POSIX account. - rpc DeletePosixAccount(DeletePosixAccountRequest) - returns (google.protobuf.Empty) { + rpc DeletePosixAccount(DeletePosixAccountRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=users/*/projects/*}" }; + option (google.api.method_signature) = "name"; } // Deletes an SSH public key. - rpc DeleteSshPublicKey(DeleteSshPublicKeyRequest) - returns (google.protobuf.Empty) { + rpc DeleteSshPublicKey(DeleteSshPublicKeyRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=users/*/sshPublicKeys/*}" }; + option (google.api.method_signature) = "name"; } // Retrieves the profile information used for logging in to a virtual machine @@ -55,92 +65,122 @@ service OsLoginService { option (google.api.http) = { get: "/v1/{name=users/*}/loginProfile" }; + option (google.api.method_signature) = "name"; } // Retrieves an SSH public key. - rpc GetSshPublicKey(GetSshPublicKeyRequest) - returns (google.cloud.oslogin.common.SshPublicKey) { + rpc GetSshPublicKey(GetSshPublicKeyRequest) returns (google.cloud.oslogin.common.SshPublicKey) { option (google.api.http) = { get: "/v1/{name=users/*/sshPublicKeys/*}" }; + option (google.api.method_signature) = "name"; } // Adds an SSH public key and returns the profile information. Default POSIX // account information is set when no username and UID exist as part of the // login profile. - rpc ImportSshPublicKey(ImportSshPublicKeyRequest) - returns (ImportSshPublicKeyResponse) { + rpc ImportSshPublicKey(ImportSshPublicKeyRequest) returns (ImportSshPublicKeyResponse) { option (google.api.http) = { post: "/v1/{parent=users/*}:importSshPublicKey" body: "ssh_public_key" }; + option (google.api.method_signature) = "parent,ssh_public_key"; + option (google.api.method_signature) = "parent,ssh_public_key,project_id"; } // Updates an SSH public key and returns the profile information. This method // supports patch semantics. - rpc UpdateSshPublicKey(UpdateSshPublicKeyRequest) - returns (google.cloud.oslogin.common.SshPublicKey) { + rpc UpdateSshPublicKey(UpdateSshPublicKeyRequest) returns (google.cloud.oslogin.common.SshPublicKey) { option (google.api.http) = { patch: "/v1/{name=users/*/sshPublicKeys/*}" body: "ssh_public_key" }; + option (google.api.method_signature) = "name,ssh_public_key"; + option (google.api.method_signature) = "name,ssh_public_key,update_mask"; } } // The user profile information used for logging in to a virtual machine on // Google Compute Engine. message LoginProfile { - // The primary email address that uniquely identifies the user. - string name = 1; + // Required. A unique user ID. + string name = 1 [(google.api.field_behavior) = REQUIRED]; // The list of POSIX accounts associated with the user. repeated google.cloud.oslogin.common.PosixAccount posix_accounts = 2; // A map from SSH public key fingerprint to the associated key object. map ssh_public_keys = 3; - - // Indicates if the user is suspended. A suspended user cannot log in but - // their profile information is retained. - bool suspended = 4; } // A request message for deleting a POSIX account entry. message DeletePosixAccountRequest { - // A reference to the POSIX account to update. POSIX accounts are identified + // Required. A reference to the POSIX account to update. POSIX accounts are identified // by the project ID they are associated with. A reference to the POSIX // account is in format `users/{user}/projects/{project}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "oslogin.googleapis.com/PosixAccount" + } + ]; } // A request message for deleting an SSH public key. message DeleteSshPublicKeyRequest { - // The fingerprint of the public key to update. Public keys are identified by + // Required. The fingerprint of the public key to update. Public keys are identified by // their SHA-256 fingerprint. The fingerprint of the public key is in format // `users/{user}/sshPublicKeys/{fingerprint}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "oslogin.googleapis.com/SshPublicKey" + } + ]; } // A request message for retrieving the login profile information for a user. message GetLoginProfileRequest { - // The unique ID for the user in format `users/{user}`. - string name = 1; + // Required. The unique ID for the user in format `users/{user}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "oslogin.googleapis.com/PosixAccount" + } + ]; + + // The project ID of the Google Cloud Platform project. + string project_id = 2; + + // A system ID for filtering the results of the request. + string system_id = 3; } // A request message for retrieving an SSH public key. message GetSshPublicKeyRequest { - // The fingerprint of the public key to retrieve. Public keys are identified + // Required. The fingerprint of the public key to retrieve. Public keys are identified // by their SHA-256 fingerprint. The fingerprint of the public key is in // format `users/{user}/sshPublicKeys/{fingerprint}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "oslogin.googleapis.com/SshPublicKey" + } + ]; } // A request message for importing an SSH public key. message ImportSshPublicKeyRequest { - // The unique ID for the user in format `users/{user}`. - string parent = 1; + // Required. The unique ID for the user in format `users/{user}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "oslogin.googleapis.com/SshPublicKey" + } + ]; - // The SSH public key and expiration time. - google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2; + // Optional. The SSH public key and expiration time. + google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(google.api.field_behavior) = OPTIONAL]; // The project ID of the Google Cloud Platform project. string project_id = 3; @@ -154,13 +194,18 @@ message ImportSshPublicKeyResponse { // A request message for updating an SSH public key. message UpdateSshPublicKeyRequest { - // The fingerprint of the public key to update. Public keys are identified by + // Required. The fingerprint of the public key to update. Public keys are identified by // their SHA-256 fingerprint. The fingerprint of the public key is in format // `users/{user}/sshPublicKeys/{fingerprint}`. - string name = 1; - - // The SSH public key and expiration time. - google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "oslogin.googleapis.com/SshPublicKey" + } + ]; + + // Required. The SSH public key and expiration time. + google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(google.api.field_behavior) = REQUIRED]; // Mask to control which fields get updated. Updates all if not present. google.protobuf.FieldMask update_mask = 3; diff --git a/google/cloud/oslogin/v1/oslogin_gapic.legacy.yaml b/google/cloud/oslogin/v1/oslogin_gapic.legacy.yaml new file mode 100644 index 000000000..3aff8851c --- /dev/null +++ b/google/cloud/oslogin/v1/oslogin_gapic.legacy.yaml @@ -0,0 +1,221 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.oslogin.v1 + python: + package_name: google.cloud.oslogin_v1.gapic + go: + package_name: cloud.google.com/go/oslogin/apiv1 + csharp: + package_name: Google.Cloud.OsLogin.V1 + ruby: + package_name: Google::Cloud::OsLogin::V1 + php: + package_name: Google\Cloud\OsLogin\V1 + nodejs: + package_name: os-login.v1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: +- name: google.cloud.oslogin.v1.OsLoginService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: users/{user} + entity_name: user + - name_pattern: users/{user}/projects/{project} + entity_name: project + - name_pattern: users/{user}/sshPublicKeys/{fingerprint} + entity_name: fingerprint + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 10000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 10000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: DeletePosixAccount + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 10000 + - name: DeleteSshPublicKey + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: fingerprint + resource_name_treatment: STATIC_TYPES + timeout_millis: 10000 + - name: GetLoginProfile + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: user + resource_name_treatment: STATIC_TYPES + timeout_millis: 10000 + - name: GetSshPublicKey + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: fingerprint + resource_name_treatment: STATIC_TYPES + timeout_millis: 10000 + - name: ImportSshPublicKey + flattening: + groups: + - parameters: + - parent + - ssh_public_key + - parameters: + - parent + - ssh_public_key + - project_id + required_fields: + - parent + - ssh_public_key + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: user + resource_name_treatment: STATIC_TYPES + timeout_millis: 10000 + - name: UpdateSshPublicKey + flattening: + groups: + - parameters: + - name + - ssh_public_key + - parameters: + - name + - ssh_public_key + - update_mask + required_fields: + - name + - ssh_public_key + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: fingerprint + resource_name_treatment: STATIC_TYPES + timeout_millis: 10000 +resource_name_generation: +- message_name: DeletePosixAccountRequest + field_entity_map: + name: project +- message_name: DeleteSshPublicKeyRequest + field_entity_map: + name: fingerprint +- message_name: GetLoginProfileRequest + field_entity_map: + name: user +- message_name: GetSshPublicKeyRequest + field_entity_map: + name: fingerprint +- message_name: ImportSshPublicKeyRequest + field_entity_map: + parent: user +- message_name: UpdateSshPublicKeyRequest + field_entity_map: + name: fingerprint diff --git a/google/cloud/oslogin/v1/oslogin_gapic.yaml b/google/cloud/oslogin/v1/oslogin_gapic.yaml index 167c821f3..fc163107c 100644 --- a/google/cloud/oslogin/v1/oslogin_gapic.yaml +++ b/google/cloud/oslogin/v1/oslogin_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -17,36 +17,8 @@ language_settings: nodejs: package_name: os-login.v1 domain_layer_location: google-cloud -# A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.cloud.oslogin.v1.OsLoginService - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: users/{user} - entity_name: user - - name_pattern: users/{user}/projects/{project} - entity_name: project - - name_pattern: users/{user}/sshPublicKeys/{fingerprint} - entity_name: fingerprint - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -56,167 +28,12 @@ interfaces: rpc_timeout_multiplier: 1 max_rpc_timeout_millis: 10000 total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: DeletePosixAccount - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 10000 - name: DeleteSshPublicKey - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: fingerprint - resource_name_treatment: STATIC_TYPES - timeout_millis: 10000 - - name: GetLoginProfile - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: user - resource_name_treatment: STATIC_TYPES - timeout_millis: 10000 - - name: GetSshPublicKey - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: fingerprint - resource_name_treatment: STATIC_TYPES - timeout_millis: 10000 - name: ImportSshPublicKey - flattening: - groups: - - parameters: - - parent - - ssh_public_key - - parameters: - - parent - - ssh_public_key - - project_id - required_fields: - - parent - - ssh_public_key retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: user - resource_name_treatment: STATIC_TYPES - timeout_millis: 10000 - name: UpdateSshPublicKey - flattening: - groups: - - parameters: - - name - - ssh_public_key - - parameters: - - name - - ssh_public_key - - update_mask - required_fields: - - name - - ssh_public_key retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: fingerprint - resource_name_treatment: STATIC_TYPES - timeout_millis: 10000 -resource_name_generation: -- message_name: DeletePosixAccountRequest - field_entity_map: - name: project -- message_name: DeleteSshPublicKeyRequest - field_entity_map: - name: fingerprint -- message_name: GetLoginProfileRequest - field_entity_map: - name: user -- message_name: GetSshPublicKeyRequest - field_entity_map: - name: fingerprint -- message_name: ImportSshPublicKeyRequest - field_entity_map: - parent: user -- message_name: UpdateSshPublicKeyRequest - field_entity_map: - name: fingerprint diff --git a/google/cloud/oslogin/v1/oslogin_grpc_service_config.json b/google/cloud/oslogin/v1/oslogin_grpc_service_config.json new file mode 100644 index 000000000..b574fcaad --- /dev/null +++ b/google/cloud/oslogin/v1/oslogin_grpc_service_config.json @@ -0,0 +1,42 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.oslogin.v1.OsLoginService", + "method": "DeletePosixAccount" + }, + { + "service": "google.cloud.oslogin.v1.OsLoginService", + "method": "DeleteSshPublicKey" + }, + { + "service": "google.cloud.oslogin.v1.OsLoginService", + "method": "GetLoginProfile" + }, + { + "service": "google.cloud.oslogin.v1.OsLoginService", + "method": "GetSshPublicKey" + }, + { + "service": "google.cloud.oslogin.v1.OsLoginService", + "method": "ImportSshPublicKey" + }, + { + "service": "google.cloud.oslogin.v1.OsLoginService", + "method": "UpdateSshPublicKey" + } + ], + "timeout": "10s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/oslogin/v1/oslogin_v1.yaml b/google/cloud/oslogin/v1/oslogin_v1.yaml new file mode 100644 index 000000000..8d345ed2b --- /dev/null +++ b/google/cloud/oslogin/v1/oslogin_v1.yaml @@ -0,0 +1,23 @@ +type: google.api.Service +config_version: 3 +name: oslogin.googleapis.com +title: Cloud OS Login API + +apis: +- name: google.cloud.oslogin.v1.OsLoginService + +documentation: + summary: You can use OS Login to manage access to your VM instances using IAM roles. + +backend: + rules: + - selector: 'google.cloud.oslogin.v1.OsLoginService.*' + deadline: 10.0 + +authentication: + rules: + - selector: 'google.cloud.oslogin.v1.OsLoginService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/compute diff --git a/google/cloud/oslogin/v1beta/BUILD.bazel b/google/cloud/oslogin/v1beta/BUILD.bazel index b93768497..ff1e42d5e 100644 --- a/google/cloud/oslogin/v1beta/BUILD.bazel +++ b/google/cloud/oslogin/v1beta/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -17,6 +19,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:field_mask_proto", ] + _PROTO_SUBPACKAGE_DEPS, @@ -24,7 +29,10 @@ proto_library( proto_library_with_info( name = "oslogin_proto_with_info", - deps = [":oslogin_proto"], + deps = [ + ":oslogin_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -32,18 +40,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - _JAVA_PROTO_SUBPACKAGE_DEPS = [ "//google/cloud/oslogin/common:common_java_proto", ] @@ -52,10 +55,6 @@ _JAVA_GRPC_SUBPACKAGE_DEPS = [ "//google/cloud/oslogin/common:common_java_grpc", ] -_RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS = [ - "//google/cloud/oslogin/common:common_resource_name_java_proto", -] - java_proto_library( name = "oslogin_java_proto", deps = [":oslogin_proto"], @@ -64,13 +63,7 @@ java_proto_library( java_grpc_library( name = "oslogin_java_grpc", srcs = [":oslogin_proto"], - deps = [":oslogin_java_proto"] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS, -) - -java_resource_name_proto_library( - name = "oslogin_resource_name_java_proto", - gapic_yaml = "oslogin_gapic.yaml", - deps = [":oslogin_proto"], + deps = [":oslogin_java_proto"] + _JAVA_PROTO_SUBPACKAGE_DEPS, ) java_gapic_library( @@ -78,37 +71,29 @@ java_gapic_library( src = ":oslogin_proto_with_info", gapic_yaml = "oslogin_gapic.yaml", service_yaml = "//google/cloud/oslogin:oslogin_v1beta.yaml", - test_deps = [ - ":oslogin_java_grpc", - ] + _JAVA_GRPC_SUBPACKAGE_DEPS, + test_deps = [":oslogin_java_grpc"], deps = [ ":oslogin_java_proto", - ":oslogin_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS, + ] + _JAVA_PROTO_SUBPACKAGE_DEPS, ) -[java_test( - name = test_name, - test_class = test_name, +java_gapic_test( + name = "oslogin_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.oslogin.v1beta.OsLoginServiceClientTest", + ], runtime_deps = [":oslogin_java_gapic_test"], -) for test_name in [ - "com.google.cloud.oslogin.v1beta.OsLoginServiceClientTest", -]] +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-oslogin-v1beta-java", - client_deps = [":oslogin_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":oslogin_java_gapic_test"], - grpc_deps = [":oslogin_java_grpc"] + _JAVA_GRPC_SUBPACKAGE_DEPS, - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":oslogin_java_gapic", + ":oslogin_java_grpc", ":oslogin_java_proto", ":oslogin_proto", - ":oslogin_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS + _PROTO_SUBPACKAGE_DEPS + _RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS, - version = "0.0.0-SNAPSHOT", + ] + _JAVA_PROTO_SUBPACKAGE_DEPS + _PROTO_SUBPACKAGE_DEPS, ) ############################################################################## @@ -116,10 +101,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -135,9 +120,9 @@ go_proto_library( go_gapic_library( name = "oslogin_go_gapic", - src = ":oslogin_proto_with_info", - gapic_yaml = "oslogin_gapic.yaml", - importpath = "cloud.google.com/go/oslogin/apiv1beta", + srcs = [":oslogin_proto_with_info"], + grpc_service_config = "oslogin_grpc_service_config.json", + importpath = "cloud.google.com/go/oslogin/apiv1beta;oslogin", service_yaml = "//google/cloud/oslogin:oslogin_v1beta.yaml", deps = [ ":oslogin_go_proto", @@ -152,14 +137,255 @@ go_test( importpath = "cloud.google.com/go/oslogin/apiv1beta", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-oslogin-v1beta-go", deps = [ ":oslogin_go_gapic", - ":oslogin_go_gapic_srcjar-smoke-test.srcjar", ":oslogin_go_gapic_srcjar-test.srcjar", ":oslogin_go_proto", "//google/cloud/oslogin/common:common_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +_PY_SUBPACKAGE_DEPS = [ + "//google/cloud/oslogin/common:common_py_proto", + "//google/cloud/oslogin/common:common_py_grpc", +] + +moved_proto_library( + name = "oslogin_moved_proto", + srcs = [":oslogin_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + ] + _PROTO_SUBPACKAGE_DEPS, +) + +py_proto_library( + name = "oslogin_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":oslogin_moved_proto"], +) + +py_grpc_library( + name = "oslogin_py_grpc", + srcs = [":oslogin_moved_proto"], + deps = [":oslogin_py_proto"], +) + +py_gapic_library( + name = "oslogin_py_gapic", + src = ":oslogin_proto_with_info", + gapic_yaml = "oslogin_gapic.yaml", + package = "google.cloud.oslogin.v1beta", + service_yaml = "oslogin_v1beta.yaml", + deps = [ + ":oslogin_py_grpc", + ":oslogin_py_proto", + ] + _PY_SUBPACKAGE_DEPS, +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "oslogin-v1beta-py", + deps = [ + ":oslogin_py_gapic", + ":oslogin_py_grpc", + ":oslogin_py_proto", + ] + _PY_SUBPACKAGE_DEPS, +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +_PHP_SUBPACKAGE_DEPS = [ + "//google/cloud/oslogin/common:common_php_proto", + "//google/cloud/oslogin/common:common_php_grpc", +] + +php_proto_library( + name = "oslogin_php_proto", + deps = [":oslogin_proto"], +) + +php_grpc_library( + name = "oslogin_php_grpc", + srcs = [":oslogin_proto"], + deps = [":oslogin_php_proto"], +) + +php_gapic_library( + name = "oslogin_php_gapic", + src = ":oslogin_proto_with_info", + gapic_yaml = "oslogin_gapic.yaml", + package = "google.cloud.oslogin.v1beta", + service_yaml = "oslogin_v1beta.yaml", + deps = [ + ":oslogin_php_grpc", + ":oslogin_php_proto", + ] + _PHP_SUBPACKAGE_DEPS, +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-oslogin-v1beta-php", + deps = [ + ":oslogin_php_gapic", + ":oslogin_php_grpc", + ":oslogin_php_proto", + ] + _PHP_SUBPACKAGE_DEPS, +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "oslogin_nodejs_gapic", + src = ":oslogin_proto_with_info", + gapic_yaml = "oslogin_gapic.yaml", + package = "google.cloud.oslogin.v1beta", + service_yaml = "oslogin_v1beta.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "oslogin-v1beta-nodejs", + deps = [ + ":oslogin_nodejs_gapic", + ":oslogin_proto", + ] + _PROTO_SUBPACKAGE_DEPS, +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +_RUBY_SUBPACKAGE_DEPS = [ + "//google/cloud/oslogin/common:common_ruby_proto", + "//google/cloud/oslogin/common:common_ruby_grpc", +] + +ruby_proto_library( + name = "oslogin_ruby_proto", + deps = [":oslogin_proto"], +) + +ruby_grpc_library( + name = "oslogin_ruby_grpc", + srcs = [":oslogin_proto"], + deps = [":oslogin_ruby_proto"], +) + +ruby_gapic_library( + name = "oslogin_ruby_gapic", + src = ":oslogin_proto_with_info", + gapic_yaml = "oslogin_gapic.yaml", + package = "google.cloud.oslogin.v1beta", + service_yaml = "oslogin_v1beta.yaml", + deps = [ + ":oslogin_ruby_grpc", + ":oslogin_ruby_proto", + ] + _RUBY_SUBPACKAGE_DEPS, +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-oslogin-v1beta-ruby", + deps = [ + ":oslogin_ruby_gapic", + ":oslogin_ruby_grpc", + ":oslogin_ruby_proto", + ] + _RUBY_SUBPACKAGE_DEPS, +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +_CSHARP_SUBPACKAGE_DEPS = [ + "//google/cloud/oslogin/common:common_csharp_proto", + "//google/cloud/oslogin/common:common_csharp_grpc", +] + +csharp_proto_library( + name = "oslogin_csharp_proto", + deps = [":oslogin_proto"], +) + +csharp_grpc_library( + name = "oslogin_csharp_grpc", + srcs = [":oslogin_proto"], + deps = [":oslogin_csharp_proto"], +) + +csharp_gapic_library( + name = "oslogin_csharp_gapic", + src = ":oslogin_proto_with_info", + gapic_yaml = "oslogin_gapic.yaml", + package = "google.cloud.oslogin.v1beta", + service_yaml = "oslogin_v1beta.yaml", + deps = [ + ":oslogin_csharp_grpc", + ":oslogin_csharp_proto", + ] + _CSHARP_SUBPACKAGE_DEPS, +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-oslogin-v1beta-csharp", + deps = [ + ":oslogin_csharp_gapic", + ":oslogin_csharp_grpc", + ":oslogin_csharp_proto", + ] + _CSHARP_SUBPACKAGE_DEPS, +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/oslogin/v1beta/oslogin.proto b/google/cloud/oslogin/v1beta/oslogin.proto index 304c4d9f6..a5d784746 100644 --- a/google/cloud/oslogin/v1beta/oslogin.proto +++ b/google/cloud/oslogin/v1beta/oslogin.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.oslogin.v1beta; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/oslogin/common/common.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -27,26 +31,34 @@ option java_multiple_files = true; option java_outer_classname = "OsLoginProto"; option java_package = "com.google.cloud.oslogin.v1beta"; option php_namespace = "Google\\Cloud\\OsLogin\\V1beta"; +option ruby_package = "Google::Cloud::OsLogin::V1beta"; // Cloud OS Login API // // The Cloud OS Login API allows you to manage users and their associated SSH // public keys for logging into virtual machines on Google Cloud Platform. service OsLoginService { + option (google.api.default_host) = "oslogin.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only," + "https://www.googleapis.com/auth/compute," + "https://www.googleapis.com/auth/compute.readonly"; + // Deletes a POSIX account. - rpc DeletePosixAccount(DeletePosixAccountRequest) - returns (google.protobuf.Empty) { + rpc DeletePosixAccount(DeletePosixAccountRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta/{name=users/*/projects/*}" }; + option (google.api.method_signature) = "name"; } // Deletes an SSH public key. - rpc DeleteSshPublicKey(DeleteSshPublicKeyRequest) - returns (google.protobuf.Empty) { + rpc DeleteSshPublicKey(DeleteSshPublicKeyRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta/{name=users/*/sshPublicKeys/*}" }; + option (google.api.method_signature) = "name"; } // Retrieves the profile information used for logging in to a virtual machine @@ -55,92 +67,116 @@ service OsLoginService { option (google.api.http) = { get: "/v1beta/{name=users/*}/loginProfile" }; + option (google.api.method_signature) = "name"; } // Retrieves an SSH public key. - rpc GetSshPublicKey(GetSshPublicKeyRequest) - returns (google.cloud.oslogin.common.SshPublicKey) { + rpc GetSshPublicKey(GetSshPublicKeyRequest) returns (google.cloud.oslogin.common.SshPublicKey) { option (google.api.http) = { get: "/v1beta/{name=users/*/sshPublicKeys/*}" }; + option (google.api.method_signature) = "name"; } // Adds an SSH public key and returns the profile information. Default POSIX // account information is set when no username and UID exist as part of the // login profile. - rpc ImportSshPublicKey(ImportSshPublicKeyRequest) - returns (ImportSshPublicKeyResponse) { + rpc ImportSshPublicKey(ImportSshPublicKeyRequest) returns (ImportSshPublicKeyResponse) { option (google.api.http) = { post: "/v1beta/{parent=users/*}:importSshPublicKey" body: "ssh_public_key" }; + option (google.api.method_signature) = "parent,ssh_public_key"; + option (google.api.method_signature) = "parent,ssh_public_key,project_id"; } // Updates an SSH public key and returns the profile information. This method // supports patch semantics. - rpc UpdateSshPublicKey(UpdateSshPublicKeyRequest) - returns (google.cloud.oslogin.common.SshPublicKey) { + rpc UpdateSshPublicKey(UpdateSshPublicKeyRequest) returns (google.cloud.oslogin.common.SshPublicKey) { option (google.api.http) = { patch: "/v1beta/{name=users/*/sshPublicKeys/*}" body: "ssh_public_key" }; + option (google.api.method_signature) = "name,ssh_public_key"; + option (google.api.method_signature) = "name,ssh_public_key,update_mask"; } } // The user profile information used for logging in to a virtual machine on // Google Compute Engine. message LoginProfile { - // The primary email address that uniquely identifies the user. - string name = 1; + // Required. A unique user ID. + string name = 1 [(google.api.field_behavior) = REQUIRED]; // The list of POSIX accounts associated with the user. repeated google.cloud.oslogin.common.PosixAccount posix_accounts = 2; // A map from SSH public key fingerprint to the associated key object. map ssh_public_keys = 3; - - // Indicates if the user is suspended. A suspended user cannot log in but - // their profile information is retained. - bool suspended = 4; } // A request message for deleting a POSIX account entry. message DeletePosixAccountRequest { - // A reference to the POSIX account to update. POSIX accounts are identified + // Required. A reference to the POSIX account to update. POSIX accounts are identified // by the project ID they are associated with. A reference to the POSIX // account is in format `users/{user}/projects/{project}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "oslogin.googleapis.com/PosixAccount" + } + ]; } // A request message for deleting an SSH public key. message DeleteSshPublicKeyRequest { - // The fingerprint of the public key to update. Public keys are identified by + // Required. The fingerprint of the public key to update. Public keys are identified by // their SHA-256 fingerprint. The fingerprint of the public key is in format // `users/{user}/sshPublicKeys/{fingerprint}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "oslogin.googleapis.com/SshPublicKey" + } + ]; } // A request message for retrieving the login profile information for a user. message GetLoginProfileRequest { - // The unique ID for the user in format `users/{user}`. - string name = 1; + // Required. The unique ID for the user in format `users/{user}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "oslogin.googleapis.com/User"]; + + // The project ID of the Google Cloud Platform project. + string project_id = 2; + + // A system ID for filtering the results of the request. + string system_id = 3; } // A request message for retrieving an SSH public key. message GetSshPublicKeyRequest { - // The fingerprint of the public key to retrieve. Public keys are identified + // Required. The fingerprint of the public key to retrieve. Public keys are identified // by their SHA-256 fingerprint. The fingerprint of the public key is in // format `users/{user}/sshPublicKeys/{fingerprint}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "oslogin.googleapis.com/SshPublicKey" + } + ]; } // A request message for importing an SSH public key. message ImportSshPublicKeyRequest { // The unique ID for the user in format `users/{user}`. - string parent = 1; + string parent = 1 [(google.api.resource_reference) = { + child_type: "oslogin.googleapis.com/SshPublicKey" + }]; - // The SSH public key and expiration time. - google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2; + // Required. The SSH public key and expiration time. + google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(google.api.field_behavior) = REQUIRED]; // The project ID of the Google Cloud Platform project. string project_id = 3; @@ -154,13 +190,18 @@ message ImportSshPublicKeyResponse { // A request message for updating an SSH public key. message UpdateSshPublicKeyRequest { - // The fingerprint of the public key to update. Public keys are identified by + // Required. The fingerprint of the public key to update. Public keys are identified by // their SHA-256 fingerprint. The fingerprint of the public key is in format // `users/{user}/sshPublicKeys/{fingerprint}`. - string name = 1; - - // The SSH public key and expiration time. - google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "oslogin.googleapis.com/SshPublicKey" + } + ]; + + // Required. The SSH public key and expiration time. + google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(google.api.field_behavior) = REQUIRED]; // Mask to control which fields get updated. Updates all if not present. google.protobuf.FieldMask update_mask = 3; diff --git a/google/cloud/oslogin/v1beta/oslogin_grpc_service_config.json b/google/cloud/oslogin/v1beta/oslogin_grpc_service_config.json new file mode 100644 index 000000000..6ef06eb9f --- /dev/null +++ b/google/cloud/oslogin/v1beta/oslogin_grpc_service_config.json @@ -0,0 +1,42 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.oslogin.v1beta.OsLoginService", + "method": "DeletePosixAccount" + }, + { + "service": "google.cloud.oslogin.v1beta.OsLoginService", + "method": "DeleteSshPublicKey" + }, + { + "service": "google.cloud.oslogin.v1beta.OsLoginService", + "method": "GetLoginProfile" + }, + { + "service": "google.cloud.oslogin.v1beta.OsLoginService", + "method": "GetSshPublicKey" + }, + { + "service": "google.cloud.oslogin.v1beta.OsLoginService", + "method": "ImportSshPublicKey" + }, + { + "service": "google.cloud.oslogin.v1beta.OsLoginService", + "method": "UpdateSshPublicKey" + } + ], + "timeout": "10s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/oslogin/v1beta/oslogin_v1beta.yaml b/google/cloud/oslogin/v1beta/oslogin_v1beta.yaml new file mode 100644 index 000000000..eea7d547a --- /dev/null +++ b/google/cloud/oslogin/v1beta/oslogin_v1beta.yaml @@ -0,0 +1,23 @@ +type: google.api.Service +config_version: 3 +name: oslogin.googleapis.com +title: Cloud OS Login API + +apis: +- name: google.cloud.oslogin.v1beta.OsLoginService + +documentation: + summary: You can use OS Login to manage access to your VM instances using IAM roles. + +backend: + rules: + - selector: 'google.cloud.oslogin.v1beta.OsLoginService.*' + deadline: 10.0 + +authentication: + rules: + - selector: 'google.cloud.oslogin.v1beta.OsLoginService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/compute diff --git a/google/cloud/phishingprotection/artman_phishingprotection_v1beta1.yaml b/google/cloud/phishingprotection/artman_phishingprotection_v1beta1.yaml index 547e0fa99..b2727a765 100644 --- a/google/cloud/phishingprotection/artman_phishingprotection_v1beta1.yaml +++ b/google/cloud/phishingprotection/artman_phishingprotection_v1beta1.yaml @@ -6,8 +6,9 @@ common: - name: google-common-protos src_proto_paths: - v1beta1 - service_yaml: phishingprotection.yaml + service_yaml: v1beta1/phishingprotection_v1beta1.yaml gapic_yaml: v1beta1/phishingprotection_gapic.yaml + proto_package: google.cloud.phishingprotection.v1beta1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/phishingprotection/v1beta1/BUILD.bazel b/google/cloud/phishingprotection/v1beta1/BUILD.bazel new file mode 100644 index 000000000..8daf4df24 --- /dev/null +++ b/google/cloud/phishingprotection/v1beta1/BUILD.bazel @@ -0,0 +1,356 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "phishingprotection_proto", + srcs = [ + "phishingprotection.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + ], +) + +proto_library_with_info( + name = "phishingprotection_proto_with_info", + deps = [ + ":phishingprotection_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "phishingprotection_java_proto", + deps = [":phishingprotection_proto"], +) + +java_grpc_library( + name = "phishingprotection_java_grpc", + srcs = [":phishingprotection_proto"], + deps = [":phishingprotection_java_proto"], +) + +java_gapic_library( + name = "phishingprotection_java_gapic", + src = ":phishingprotection_proto_with_info", + gapic_yaml = "phishingprotection_gapic.yaml", + package = "google.cloud.phishingprotection.v1beta1", + service_yaml = "phishingprotection_v1beta1.yaml", + test_deps = [ + ":phishingprotection_java_grpc", + ], + deps = [ + ":phishingprotection_java_proto", + ], +) + +java_gapic_test( + name = "phishingprotection_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1ClientTest", + ], + runtime_deps = [":phishingprotection_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-phishingprotection-v1beta1-java", + deps = [ + ":phishingprotection_java_gapic", + ":phishingprotection_java_grpc", + ":phishingprotection_java_proto", + ":phishingprotection_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "phishingprotection_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/phishingprotection/v1beta1", + protos = [":phishingprotection_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "phishingprotection_go_gapic", + srcs = [":phishingprotection_proto_with_info"], + grpc_service_config = "phishingprotection_grpc_service_config.json", + importpath = "cloud.google.com/go/phishingprotection/apiv1beta1;phishingprotection", + service_yaml = "phishingprotection_v1beta1.yaml", + deps = [ + ":phishingprotection_go_proto", + ], +) + +go_test( + name = "phishingprotection_go_gapic_test", + srcs = [":phishingprotection_go_gapic_srcjar_test"], + embed = [":phishingprotection_go_gapic"], + importpath = "cloud.google.com/go/phishingprotection/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-phishingprotection-v1beta1-go", + deps = [ + ":phishingprotection_go_gapic", + ":phishingprotection_go_gapic_srcjar-test.srcjar", + ":phishingprotection_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "phishingprotection_moved_proto", + srcs = [":phishingprotection_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + ], +) + +py_proto_library( + name = "phishingprotection_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":phishingprotection_moved_proto"], +) + +py_grpc_library( + name = "phishingprotection_py_grpc", + srcs = [":phishingprotection_moved_proto"], + deps = [":phishingprotection_py_proto"], +) + +py_gapic_library( + name = "phishingprotection_py_gapic", + src = ":phishingprotection_proto_with_info", + gapic_yaml = "phishingprotection_gapic.yaml", + package = "google.cloud.phishingprotection.v1beta1", + service_yaml = "phishingprotection_v1beta1.yaml", + deps = [ + ":phishingprotection_py_grpc", + ":phishingprotection_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "phishingprotection-v1beta1-py", + deps = [ + ":phishingprotection_py_gapic", + ":phishingprotection_py_grpc", + ":phishingprotection_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "phishingprotection_php_proto", + deps = [":phishingprotection_proto"], +) + +php_grpc_library( + name = "phishingprotection_php_grpc", + srcs = [":phishingprotection_proto"], + deps = [":phishingprotection_php_proto"], +) + +php_gapic_library( + name = "phishingprotection_php_gapic", + src = ":phishingprotection_proto_with_info", + gapic_yaml = "phishingprotection_gapic.yaml", + package = "google.cloud.phishingprotection.v1beta1", + service_yaml = "phishingprotection_v1beta1.yaml", + deps = [ + ":phishingprotection_php_grpc", + ":phishingprotection_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-phishingprotection-v1beta1-php", + deps = [ + ":phishingprotection_php_gapic", + ":phishingprotection_php_grpc", + ":phishingprotection_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "phishingprotection_nodejs_gapic", + src = ":phishingprotection_proto_with_info", + gapic_yaml = "phishingprotection_gapic.yaml", + package = "google.cloud.phishingprotection.v1beta1", + service_yaml = "phishingprotection_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "phishingprotection-v1beta1-nodejs", + deps = [ + ":phishingprotection_nodejs_gapic", + ":phishingprotection_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "phishingprotection_ruby_proto", + deps = [":phishingprotection_proto"], +) + +ruby_grpc_library( + name = "phishingprotection_ruby_grpc", + srcs = [":phishingprotection_proto"], + deps = [":phishingprotection_ruby_proto"], +) + +ruby_gapic_library( + name = "phishingprotection_ruby_gapic", + src = ":phishingprotection_proto_with_info", + gapic_yaml = "phishingprotection_gapic.yaml", + package = "google.cloud.phishingprotection.v1beta1", + service_yaml = "phishingprotection_v1beta1.yaml", + deps = [ + ":phishingprotection_ruby_grpc", + ":phishingprotection_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-phishingprotection-v1beta1-ruby", + deps = [ + ":phishingprotection_ruby_gapic", + ":phishingprotection_ruby_grpc", + ":phishingprotection_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "phishingprotection_csharp_proto", + deps = [":phishingprotection_proto"], +) + +csharp_grpc_library( + name = "phishingprotection_csharp_grpc", + srcs = [":phishingprotection_proto"], + deps = [":phishingprotection_csharp_proto"], +) + +csharp_gapic_library( + name = "phishingprotection_csharp_gapic", + src = ":phishingprotection_proto_with_info", + gapic_yaml = "phishingprotection_gapic.yaml", + package = "google.cloud.phishingprotection.v1beta1", + service_yaml = "phishingprotection_v1beta1.yaml", + deps = [ + ":phishingprotection_csharp_grpc", + ":phishingprotection_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-phishingprotection-v1beta1-csharp", + deps = [ + ":phishingprotection_csharp_gapic", + ":phishingprotection_csharp_grpc", + ":phishingprotection_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/phishingprotection/v1beta1/phishingprotection.proto b/google/cloud/phishingprotection/v1beta1/phishingprotection.proto index 62a9fd03e..01a89ec2b 100644 --- a/google/cloud/phishingprotection/v1beta1/phishingprotection.proto +++ b/google/cloud/phishingprotection/v1beta1/phishingprotection.proto @@ -18,6 +18,9 @@ syntax = "proto3"; package google.cloud.phishingprotection.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Cloud.PhishingProtection.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/phishingprotection/v1beta1;phishingprotection"; @@ -26,20 +29,26 @@ option java_outer_classname = "PhishingProtectionProto"; option java_package = "com.google.phishingprotection.v1beta1"; option objc_class_prefix = "GCPP"; option php_namespace = "Google\\Cloud\\PhishingProtection\\V1beta1"; +option ruby_package = "Google::Cloud::PhishingProtection::V1beta1"; // Service to report phishing URIs. service PhishingProtectionServiceV1Beta1 { + option (google.api.default_host) = "phishingprotection.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Reports a URI suspected of containing phishing content to be reviewed. Once - // the report review is completed, if its result verifies the existince of - // malicious phishing content, the site will be added the to [Google's Social - // Engineering lists](https://support.google.com/webmasters/answer/6350487/) - // in order to protect users that could get exposed to this threat in - // the future. + // the report review is complete, its result can be found in the Cloud + // Security Command Center findings dashboard for Phishing Protection. If the + // result verifies the existence of malicious phishing content, the site will + // be added the to [Google's Social Engineering + // lists](https://support.google.com/webmasters/answer/6350487/) in order to + // protect users that could get exposed to this threat in the future. rpc ReportPhishing(ReportPhishingRequest) returns (ReportPhishingResponse) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*}/phishing:report" body: "*" }; + option (google.api.method_signature) = "parent,uri"; } } @@ -47,11 +56,18 @@ service PhishingProtectionServiceV1Beta1 { message ReportPhishingRequest { // Required. The name of the project for which the report will be created, // in the format "projects/{project_number}". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; - // The URI that is being reported for phishing content to be analyzed. - string uri = 2; + // Required. The URI that is being reported for phishing content to be analyzed. + string uri = 2 [(google.api.field_behavior) = REQUIRED]; } // The ReportPhishing (empty) response message. -message ReportPhishingResponse {} +message ReportPhishingResponse { + +} diff --git a/google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.legacy.yaml b/google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.legacy.yaml new file mode 100644 index 000000000..02d430412 --- /dev/null +++ b/google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.legacy.yaml @@ -0,0 +1,135 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.phishingprotection.v1beta1 + python: + package_name: google.cloud.phishingprotection_v1beta1.gapic + go: + package_name: cloud.google.com/go/phishingprotection/apiv1beta1 + csharp: + package_name: Google.Cloud.PhishingProtection.V1Beta1 + ruby: + package_name: Google::Cloud::PhishingProtection::V1beta1 + php: + package_name: Google\Cloud\PhishingProtection\V1beta1 + nodejs: + package_name: phishingprotection.v1beta1 +# The configuration for the license header to put on generated files. +license_header: + # The file containing the copyright line(s). + copyright_file: copyright-google.txt + # The file containing the raw license header without any copyright line(s). + license_file: license-header-apache-2.0.txt +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1 + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ReportPhishing + flattening: + groups: + - parameters: + - parent + - uri + required_fields: + - parent + - uri + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 +resource_name_generation: +- message_name: ReportPhishingRequest + field_entity_map: + parent: project diff --git a/google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.yaml b/google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.yaml index 02d430412..a029ac350 100644 --- a/google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.yaml +++ b/google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -16,120 +16,7 @@ language_settings: package_name: Google\Cloud\PhishingProtection\V1beta1 nodejs: package_name: phishingprotection.v1beta1 -# The configuration for the license header to put on generated files. -license_header: - # The file containing the copyright line(s). - copyright_file: copyright-google.txt - # The file containing the raw license header without any copyright line(s). - license_file: license-header-apache-2.0.txt # A list of API interface configurations. interfaces: # The fully qualified name of the API interface. - name: google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1 - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: ReportPhishing - flattening: - groups: - - parameters: - - parent - - uri - required_fields: - - parent - - uri - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 -resource_name_generation: -- message_name: ReportPhishingRequest - field_entity_map: - parent: project diff --git a/google/cloud/phishingprotection/v1beta1/phishingprotection_grpc_service_config.json b/google/cloud/phishingprotection/v1beta1/phishingprotection_grpc_service_config.json new file mode 100755 index 000000000..cd1c5d40f --- /dev/null +++ b/google/cloud/phishingprotection/v1beta1/phishingprotection_grpc_service_config.json @@ -0,0 +1,13 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1", + "method": "ReportPhishing" + } + ], + "timeout": "600s" + } + ] +} diff --git a/google/cloud/phishingprotection/phishingprotection.yaml b/google/cloud/phishingprotection/v1beta1/phishingprotection_v1beta1.yaml similarity index 75% rename from google/cloud/phishingprotection/phishingprotection.yaml rename to google/cloud/phishingprotection/v1beta1/phishingprotection_v1beta1.yaml index 7adec2ebb..6f56340ca 100644 --- a/google/cloud/phishingprotection/phishingprotection.yaml +++ b/google/cloud/phishingprotection/v1beta1/phishingprotection_v1beta1.yaml @@ -8,7 +8,7 @@ apis: authentication: rules: - - selector: '*' + - selector: google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1.ReportPhishing oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/policytroubleshooter/v1/checker.proto b/google/cloud/policytroubleshooter/v1/checker.proto new file mode 100644 index 000000000..6fae32d15 --- /dev/null +++ b/google/cloud/policytroubleshooter/v1/checker.proto @@ -0,0 +1,71 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.policytroubleshooter.v1; + +import public "google/cloud/policytroubleshooter/v1/explanations.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/policytroubleshooter/v1;policytroubleshooter"; +option java_multiple_files = true; +option java_outer_classname = "IAMCheckerProto"; +option java_package = "com.google.cloud.policytroubleshooter.v1"; + +// IAM Policy Troubleshooter service. +// +// This service helps you troubleshoot access issues for Google Cloud resources. +service IamChecker { + option (google.api.default_host) = "policytroubleshooter.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Checks whether a member has a specific permission for a specific resource, + // and explains why the member does or does not have that permission. + rpc TroubleshootIamPolicy(TroubleshootIamPolicyRequest) returns (TroubleshootIamPolicyResponse) { + option (google.api.http) = { + post: "/v1/iam:troubleshoot" + body: "*" + }; + } +} + +// Request for [TroubleshootIamPolicy][google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy]. +message TroubleshootIamPolicyRequest { + // The information to use for checking whether a member has a permission for a + // resource. + AccessTuple access_tuple = 1; +} + +// Response for [TroubleshootIamPolicy][google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy]. +message TroubleshootIamPolicyResponse { + // Indicates whether the member has the specified permission for the specified + // resource, based on evaluating all of the applicable IAM policies. + AccessState access = 1; + + // List of IAM policies that were evaluated to check the member's permissions, + // with annotations to indicate how each policy contributed to the final + // result. + // + // The list of policies can include the policy for the resource itself. It can + // also include policies that are inherited from higher levels of the resource + // hierarchy, including the organization, the folder, and the project. + // + // To learn more about the resource hierarchy, see + // https://cloud.google.com/iam/help/resource-hierarchy. + repeated ExplainedPolicy explained_policies = 2; +} diff --git a/google/cloud/policytroubleshooter/v1/checker_grpc_service_config.json b/google/cloud/policytroubleshooter/v1/checker_grpc_service_config.json new file mode 100644 index 000000000..10d589ba5 --- /dev/null +++ b/google/cloud/policytroubleshooter/v1/checker_grpc_service_config.json @@ -0,0 +1,19 @@ +{ + "methodConfig": [{ + "name": [{ "service": "google.cloud.policytroubleshooter.v1.IamChecker" }], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE", "UNKNOWN"] + } + }, + { + "name": [ + { "service": "google.cloud.policytroubleshooter.v1.IamChecker", "method": "TroubleshootIamPolicy" } + ], + "timeout": "60s" + }] +} diff --git a/google/cloud/policytroubleshooter/v1/explanations.proto b/google/cloud/policytroubleshooter/v1/explanations.proto new file mode 100644 index 000000000..7fe736897 --- /dev/null +++ b/google/cloud/policytroubleshooter/v1/explanations.proto @@ -0,0 +1,242 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.policytroubleshooter.v1; + +import "google/api/field_behavior.proto"; +import "google/iam/v1/policy.proto"; +import "google/type/expr.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/policytroubleshooter/v1;policytroubleshooter"; + +// Information about the member, resource, and permission to check. +message AccessTuple { + // Required. The member, or principal, whose access you want to check, in the form of + // the email address that represents that member. For example, + // `alice@example.com` or + // `my-service-account@my-project.iam.gserviceaccount.com`. + // + // The member must be a Google Account or a service account. Other types of + // members are not supported. + string principal = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The full resource name that identifies the resource. For example, + // `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. + // + // For examples of full resource names for Google Cloud services, see + // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. + string full_resource_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The IAM permission to check for the specified member and resource. + // + // For a complete list of IAM permissions, see + // https://cloud.google.com/iam/help/permissions/reference. + // + // For a complete list of predefined IAM roles and the permissions in each + // role, see https://cloud.google.com/iam/help/roles/reference. + string permission = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Details about how a specific IAM [Policy][google.iam.v1.Policy] contributed +// to the access check. +message ExplainedPolicy { + // Indicates whether _this policy_ provides the specified permission to the + // specified member for the specified resource. + // + // This field does _not_ indicate whether the member actually has the + // permission for the resource. There might be another policy that overrides + // this policy. To determine whether the member actually has the permission, + // use the `access` field in the + // [TroubleshootIamPolicyResponse][IamChecker.TroubleshootIamPolicyResponse]. + AccessState access = 1; + + // The full resource name that identifies the resource. For example, + // `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. + // + // If the sender of the request does not have access to the policy, this field + // is omitted. + // + // For examples of full resource names for Google Cloud services, see + // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. + string full_resource_name = 2; + + // The IAM policy attached to the resource. + // + // If the sender of the request does not have access to the policy, this field + // is empty. + google.iam.v1.Policy policy = 3; + + // Details about how each binding in the policy affects the member's ability, + // or inability, to use the permission for the resource. + // + // If the sender of the request does not have access to the policy, this field + // is omitted. + repeated BindingExplanation binding_explanations = 4; + + // The relevance of this policy to the overall determination in the + // [TroubleshootIamPolicyResponse][IamChecker.TroubleshootIamPolicyResponse]. + // + // If the sender of the request does not have access to the policy, this field + // is omitted. + HeuristicRelevance relevance = 5; +} + +// Details about how a binding in a policy affects a member's ability to use a +// permission. +message BindingExplanation { + // Details about whether the binding includes the member. + message AnnotatedMembership { + // Indicates whether the binding includes the member. + Membership membership = 1; + + // The relevance of the member's status to the overall determination for the + // binding. + HeuristicRelevance relevance = 2; + } + + // Whether a role includes a specific permission. + enum RolePermission { + // Reserved for future use. + ROLE_PERMISSION_UNSPECIFIED = 0; + + // The permission is included in the role. + ROLE_PERMISSION_INCLUDED = 1; + + // The permission is not included in the role. + ROLE_PERMISSION_NOT_INCLUDED = 2; + + // The sender of the request is not allowed to access the binding. + ROLE_PERMISSION_UNKNOWN_INFO_DENIED = 3; + } + + // Whether the binding includes the member. + enum Membership { + // Reserved for future use. + MEMBERSHIP_UNSPECIFIED = 0; + + // The binding includes the member. The member can be included directly + // or indirectly. For example: + // + // * A member is included directly if that member is listed in the binding. + // * A member is included indirectly if that member is in a Google group or + // G Suite domain that is listed in the binding. + MEMBERSHIP_INCLUDED = 1; + + // The binding does not include the member. + MEMBERSHIP_NOT_INCLUDED = 2; + + // The sender of the request is not allowed to access the binding. + MEMBERSHIP_UNKNOWN_INFO_DENIED = 3; + + // The member is an unsupported type. Only Google Accounts and service + // accounts are supported. + MEMBERSHIP_UNKNOWN_UNSUPPORTED = 4; + } + + // Required. Indicates whether _this binding_ provides the specified permission to the + // specified member for the specified resource. + // + // This field does _not_ indicate whether the member actually has the + // permission for the resource. There might be another binding that overrides + // this binding. To determine whether the member actually has the permission, + // use the `access` field in the + // [TroubleshootIamPolicyResponse][IamChecker.TroubleshootIamPolicyResponse]. + AccessState access = 1 [(google.api.field_behavior) = REQUIRED]; + + // The role that this binding grants. For example, + // `roles/compute.serviceAgent`. + // + // For a complete list of predefined IAM roles, as well as the permissions in + // each role, see https://cloud.google.com/iam/help/roles/reference. + string role = 2; + + // Indicates whether the role granted by this binding contains the specified + // permission. + RolePermission role_permission = 3; + + // The relevance of the permission's existence, or nonexistence, in the role + // to the overall determination for the entire policy. + HeuristicRelevance role_permission_relevance = 4; + + // Indicates whether each member in the binding includes the member specified + // in the request, either directly or indirectly. Each key identifies a member + // in the binding, and each value indicates whether the member in the binding + // includes the member in the request. + // + // For example, suppose that a binding includes the following members: + // + // * `user:alice@example.com` + // * `group:product-eng@example.com` + // + // You want to troubleshoot access for `user:bob@example.com`. This user is a + // member of the group `group:product-eng@example.com`. + // + // For the first member in the binding, the key is `user:alice@example.com`, + // and the `membership` field in the value is set to + // `MEMBERSHIP_NOT_INCLUDED`. + // + // For the second member in the binding, the key is + // `group:product-eng@example.com`, and the `membership` field in the value is + // set to `MEMBERSHIP_INCLUDED`. + map memberships = 5; + + // The relevance of this binding to the overall determination for the entire + // policy. + HeuristicRelevance relevance = 6; + + // A condition expression that prevents access unless the expression evaluates + // to `true`. + // + // To learn about IAM Conditions, see + // http://cloud.google.com/iam/help/conditions/overview. + google.type.Expr condition = 7; +} + +// Whether a member has a permission for a resource. +enum AccessState { + // Reserved for future use. + ACCESS_STATE_UNSPECIFIED = 0; + + // The member has the permission. + GRANTED = 1; + + // The member does not have the permission. + NOT_GRANTED = 2; + + // The member has the permission only if a condition expression evaluates to + // `true`. + UNKNOWN_CONDITIONAL = 3; + + // The sender of the request does not have access to all of the policies that + // Policy Troubleshooter needs to evaluate. + UNKNOWN_INFO_DENIED = 4; +} + +// The extent to which a single data point contributes to an overall +// determination. +enum HeuristicRelevance { + // Reserved for future use. + HEURISTIC_RELEVANCE_UNSPECIFIED = 0; + + // The data point has a limited effect on the result. Changing the data point + // is unlikely to affect the overall determination. + NORMAL = 1; + + // The data point has a strong effect on the result. Changing the data point + // is likely to affect the overall determination. + HIGH = 2; +} diff --git a/google/cloud/policytroubleshooter/v1/policytroubleshooter_v1.yaml b/google/cloud/policytroubleshooter/v1/policytroubleshooter_v1.yaml new file mode 100644 index 000000000..ea5bbb479 --- /dev/null +++ b/google/cloud/policytroubleshooter/v1/policytroubleshooter_v1.yaml @@ -0,0 +1,19 @@ +type: google.api.Service +config_version: 3 +name: policytroubleshooter.googleapis.com +title: Policy Troubleshooter API + +apis: +- name: google.cloud.policytroubleshooter.v1.IamChecker + +backend: + rules: + - selector: google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy + deadline: 20.0 + +authentication: + rules: + - selector: google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/recaptchaenterprise/BUILD.bazel b/google/cloud/recaptchaenterprise/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/cloud/recaptchaenterprise/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/recaptchaenterprise/artman_recaptchaenterprise_v1beta1.yaml b/google/cloud/recaptchaenterprise/artman_recaptchaenterprise_v1beta1.yaml index 9303e71b4..03b0ba9ac 100644 --- a/google/cloud/recaptchaenterprise/artman_recaptchaenterprise_v1beta1.yaml +++ b/google/cloud/recaptchaenterprise/artman_recaptchaenterprise_v1beta1.yaml @@ -6,8 +6,9 @@ common: - name: google-common-protos src_proto_paths: - v1beta1 - service_yaml: recaptchaenterprise_v1beta1.yaml + service_yaml: v1beta1/recaptchaenterprise_v1beta1.yaml gapic_yaml: v1beta1/recaptchaenterprise_gapic.yaml + proto_package: google.cloud.recaptchaenterprise.v1beta1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/recaptchaenterprise/v1/BUILD.bazel b/google/cloud/recaptchaenterprise/v1/BUILD.bazel new file mode 100644 index 000000000..965399a66 --- /dev/null +++ b/google/cloud/recaptchaenterprise/v1/BUILD.bazel @@ -0,0 +1,362 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "recaptchaenterprise_proto", + srcs = [ + "recaptchaenterprise.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "recaptchaenterprise_proto_with_info", + deps = [ + ":recaptchaenterprise_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "recaptchaenterprise_java_proto", + deps = [":recaptchaenterprise_proto"], +) + +java_grpc_library( + name = "recaptchaenterprise_java_grpc", + srcs = [":recaptchaenterprise_proto"], + deps = [":recaptchaenterprise_java_proto"], +) + +java_gapic_library( + name = "recaptchaenterprise_java_gapic", + src = ":recaptchaenterprise_proto_with_info", + gapic_yaml = "recaptchaenterprise_gapic.yaml", + package = "google.cloud.recaptchaenterprise.v1", + service_yaml = "recaptchaenterprise_v1.yaml", + test_deps = [ + ":recaptchaenterprise_java_grpc", + ], + deps = [ + ":recaptchaenterprise_java_proto", + ], +) + +java_gapic_test( + name = "recaptchaenterprise_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClientTest", + ], + runtime_deps = [":recaptchaenterprise_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-recaptchaenterprise-v1-java", + deps = [ + ":recaptchaenterprise_java_gapic", + ":recaptchaenterprise_java_grpc", + ":recaptchaenterprise_java_proto", + ":recaptchaenterprise_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "recaptchaenterprise_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1", + protos = [":recaptchaenterprise_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "recaptchaenterprise_go_gapic", + srcs = [":recaptchaenterprise_proto_with_info"], + grpc_service_config = "recaptchaenterprise_grpc_service_config.json", + importpath = "cloud.google.com/go/recaptchaenterprise/apiv1;recaptchaenterprise", + service_yaml = "recaptchaenterprise_v1.yaml", + deps = [ + ":recaptchaenterprise_go_proto", + ], +) + +go_test( + name = "recaptchaenterprise_go_gapic_test", + srcs = [":recaptchaenterprise_go_gapic_srcjar_test"], + embed = [":recaptchaenterprise_go_gapic"], + importpath = "cloud.google.com/go/recaptchaenterprise/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-recaptchaenterprise-v1-go", + deps = [ + ":recaptchaenterprise_go_gapic", + ":recaptchaenterprise_go_gapic_srcjar-test.srcjar", + ":recaptchaenterprise_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "recaptchaenterprise_moved_proto", + srcs = [":recaptchaenterprise_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "recaptchaenterprise_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":recaptchaenterprise_moved_proto"], +) + +py_grpc_library( + name = "recaptchaenterprise_py_grpc", + srcs = [":recaptchaenterprise_moved_proto"], + deps = [":recaptchaenterprise_py_proto"], +) + +py_gapic_library( + name = "recaptchaenterprise_py_gapic", + src = ":recaptchaenterprise_proto_with_info", + gapic_yaml = "recaptchaenterprise_gapic.yaml", + package = "google.cloud.recaptchaenterprise.v1", + service_yaml = "recaptchaenterprise_v1.yaml", + deps = [ + ":recaptchaenterprise_py_grpc", + ":recaptchaenterprise_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "recaptchaenterprise-v1-py", + deps = [ + ":recaptchaenterprise_py_gapic", + ":recaptchaenterprise_py_grpc", + ":recaptchaenterprise_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "recaptchaenterprise_php_proto", + deps = [":recaptchaenterprise_proto"], +) + +php_grpc_library( + name = "recaptchaenterprise_php_grpc", + srcs = [":recaptchaenterprise_proto"], + deps = [":recaptchaenterprise_php_proto"], +) + +php_gapic_library( + name = "recaptchaenterprise_php_gapic", + src = ":recaptchaenterprise_proto_with_info", + gapic_yaml = "recaptchaenterprise_gapic.yaml", + package = "google.cloud.recaptchaenterprise.v1", + service_yaml = "recaptchaenterprise_v1.yaml", + deps = [ + ":recaptchaenterprise_php_grpc", + ":recaptchaenterprise_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-recaptchaenterprise-v1-php", + deps = [ + ":recaptchaenterprise_php_gapic", + ":recaptchaenterprise_php_grpc", + ":recaptchaenterprise_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "recaptchaenterprise_nodejs_gapic", + src = ":recaptchaenterprise_proto_with_info", + gapic_yaml = "recaptchaenterprise_gapic.yaml", + package = "google.cloud.recaptchaenterprise.v1", + service_yaml = "recaptchaenterprise_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "recaptchaenterprise-v1-nodejs", + deps = [ + ":recaptchaenterprise_nodejs_gapic", + ":recaptchaenterprise_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "recaptchaenterprise_ruby_proto", + deps = [":recaptchaenterprise_proto"], +) + +ruby_grpc_library( + name = "recaptchaenterprise_ruby_grpc", + srcs = [":recaptchaenterprise_proto"], + deps = [":recaptchaenterprise_ruby_proto"], +) + +ruby_gapic_library( + name = "recaptchaenterprise_ruby_gapic", + src = ":recaptchaenterprise_proto_with_info", + gapic_yaml = "recaptchaenterprise_gapic.yaml", + package = "google.cloud.recaptchaenterprise.v1", + service_yaml = "recaptchaenterprise_v1.yaml", + deps = [ + ":recaptchaenterprise_ruby_grpc", + ":recaptchaenterprise_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-recaptchaenterprise-v1-ruby", + deps = [ + ":recaptchaenterprise_ruby_gapic", + ":recaptchaenterprise_ruby_grpc", + ":recaptchaenterprise_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "recaptchaenterprise_csharp_proto", + deps = [":recaptchaenterprise_proto"], +) + +csharp_grpc_library( + name = "recaptchaenterprise_csharp_grpc", + srcs = [":recaptchaenterprise_proto"], + deps = [":recaptchaenterprise_csharp_proto"], +) + +csharp_gapic_library( + name = "recaptchaenterprise_csharp_gapic", + src = ":recaptchaenterprise_proto_with_info", + gapic_yaml = "recaptchaenterprise_gapic.yaml", + package = "google.cloud.recaptchaenterprise.v1", + service_yaml = "recaptchaenterprise_v1.yaml", + deps = [ + ":recaptchaenterprise_csharp_grpc", + ":recaptchaenterprise_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-recaptchaenterprise-v1-csharp", + deps = [ + ":recaptchaenterprise_csharp_gapic", + ":recaptchaenterprise_csharp_grpc", + ":recaptchaenterprise_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto b/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto new file mode 100644 index 000000000..9b60fcef7 --- /dev/null +++ b/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto @@ -0,0 +1,460 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.recaptchaenterprise.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.RecaptchaEnterprise.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1;recaptchaenterprise"; +option java_multiple_files = true; +option java_outer_classname = "RecaptchaEnterpriseProto"; +option java_package = "com.google.recaptchaenterprise.v1"; +option objc_class_prefix = "GCRE"; +option php_namespace = "Google\\Cloud\\RecaptchaEnterprise\\V1"; +option ruby_package = "Google::Cloud::RecaptchaEnterprise::V1"; + +// Service to determine the likelihood an event is legitimate. +service RecaptchaEnterpriseService { + option (google.api.default_host) = "recaptchaenterprise.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates an Assessment of the likelihood an event is legitimate. + rpc CreateAssessment(CreateAssessmentRequest) returns (Assessment) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/assessments" + body: "assessment" + }; + option (google.api.method_signature) = "parent,assessment"; + } + + // Annotates a previously created Assessment to provide additional information + // on whether the event turned out to be authentic or fradulent. + rpc AnnotateAssessment(AnnotateAssessmentRequest) returns (AnnotateAssessmentResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/assessments/*}:annotate" + body: "*" + }; + option (google.api.method_signature) = "name,annotation"; + } + + // Creates a new reCAPTCHA Enterprise key. + rpc CreateKey(CreateKeyRequest) returns (Key) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/keys" + body: "key" + }; + } + + // Returns the list of all keys that belong to a project. + rpc ListKeys(ListKeysRequest) returns (ListKeysResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/keys" + }; + } + + // Returns the specified key. + rpc GetKey(GetKeyRequest) returns (Key) { + option (google.api.http) = { + get: "/v1/{name=projects/*/keys/*}" + }; + } + + // Updates the specified key. + rpc UpdateKey(UpdateKeyRequest) returns (Key) { + option (google.api.http) = { + patch: "/v1/{key.name=projects/*/keys/*}" + body: "key" + }; + } + + // Deletes the specified key. + rpc DeleteKey(DeleteKeyRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/keys/*}" + }; + } +} + +// The create assessment request message. +message CreateAssessmentRequest { + // Required. The name of the project in which the assessment will be created, + // in the format "projects/{project}". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The assessment details. + Assessment assessment = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message to annotate an Assessment. +message AnnotateAssessmentRequest { + // Enum that reprensents the types of annotations. + enum Annotation { + // Default unspecified type. + ANNOTATION_UNSPECIFIED = 0; + + // Provides information that the event turned out to be legitimate. + LEGITIMATE = 1; + + // Provides information that the event turned out to be fraudulent. + FRAUDULENT = 2; + + // Provides information that the event was related to a login event in which + // the user typed the correct password. + PASSWORD_CORRECT = 3; + + // Provides information that the event was related to a login event in which + // the user typed the incorrect password. + PASSWORD_INCORRECT = 4; + } + + // Required. The resource name of the Assessment, in the format + // "projects/{project}/assessments/{assessment}". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recaptchaenterprise.googleapis.com/Assessment" + } + ]; + + // Required. The annotation that will be assigned to the Event. + Annotation annotation = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Empty response for AnnotateAssessment. +message AnnotateAssessmentResponse { + +} + +// A recaptcha assessment resource. +message Assessment { + option (google.api.resource) = { + type: "recaptchaenterprise.googleapis.com/Assessment" + pattern: "projects/{project}/assessments/{assessment}" + }; + + // Output only. The resource name for the Assessment in the format + // "projects/{project}/assessments/{assessment}". + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The event being assessed. + Event event = 2; + + // Output only. The risk analysis result for the event being assessed. + RiskAnalysis risk_analysis = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Properties of the provided event token. + TokenProperties token_properties = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +message Event { + // Optional. The user response token provided by the reCAPTCHA client-side integration + // on your site. + string token = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The site key that was used to invoke reCAPTCHA on your site and generate + // the token. + string site_key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The user agent present in the request from the user's device related to + // this event. + string user_agent = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address in the request from the user's device related to this event. + string user_ip_address = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The expected action for this type of event. This should be the same action + // provided at token generation time on client-side platforms already + // integrated with recaptcha enterprise. + string expected_action = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Risk analysis result for an event. +message RiskAnalysis { + // LINT.IfChange(classification_reason) + // Reasons contributing to the risk analysis verdict. + enum ClassificationReason { + // Default unspecified type. + CLASSIFICATION_REASON_UNSPECIFIED = 0; + + // Interactions matched the behavior of an automated agent. + AUTOMATION = 1; + + // The event originated from an illegitimate environment. + UNEXPECTED_ENVIRONMENT = 2; + + // Traffic volume from the event source is higher than normal. + TOO_MUCH_TRAFFIC = 3; + + // Interactions with the site were significantly different than expected + // patterns. + UNEXPECTED_USAGE_PATTERNS = 4; + + // Too little traffic has been received from this site thus far to generate + // quality risk analysis. + LOW_CONFIDENCE_SCORE = 5; + } + + // Legitimate event score from 0.0 to 1.0. + // (1.0 means very likely legitimate traffic while 0.0 means very likely + // non-legitimate traffic). + float score = 1; + + // Reasons contributing to the risk analysis verdict. + repeated ClassificationReason reasons = 2; +} + +message TokenProperties { + // LINT.IfChange + // Enum that represents the types of invalid token reasons. + enum InvalidReason { + // Default unspecified type. + INVALID_REASON_UNSPECIFIED = 0; + + // If the failure reason was not accounted for. + UNKNOWN_INVALID_REASON = 1; + + // The provided user verification token was malformed. + MALFORMED = 2; + + // The user verification token had expired. + EXPIRED = 3; + + // The user verification had already been seen. + DUPE = 4; + + // The user verification token was not present. + MISSING = 5; + } + + // Whether the provided user response token is valid. When valid = false, the + // reason could be specified in invalid_reason or it could also be due to + // a user failing to solve a challenge or a sitekey mismatch (i.e the sitekey + // used to generate the token was different than the one specified in the + // assessment). + bool valid = 1; + + // Reason associated with the response when valid = false. + InvalidReason invalid_reason = 2; + + // The timestamp corresponding to the generation of the token. + google.protobuf.Timestamp create_time = 3; + + // The hostname of the page on which the token was generated. + string hostname = 4; + + // Action name provided at token generation. + string action = 5; +} + +// The create key request message. +message CreateKeyRequest { + // Required. The name of the project in which the key will be created, in the + // format "projects/{project}". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. Information to create a reCAPTCHA Enterprise key. + Key key = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The list keys request message. +message ListKeysRequest { + // Required. The name of the project that contains the keys that will be + // listed, in the format "projects/{project}". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Optional. The maximum number of keys to return. Default is 10. Max limit is + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous. + // ListKeysRequest, if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response to request to list keys in a project. +message ListKeysResponse { + // Key details. + repeated Key keys = 1; + + // Token to retrieve the next page of results. It is set to empty if no keys + // remain in results. + string next_page_token = 2; +} + +// The get key request message. +message GetKeyRequest { + // Required. The name of the requested key, in the format + // "projects/{project}/keys/{key}". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recaptchaenterprise.googleapis.com/Key" + } + ]; +} + +// The update key request message. +message UpdateKeyRequest { + // Required. The key to update. + Key key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which field of the key get updated. If the mask is not + // present, all fields will be updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The delete key request message. +message DeleteKeyRequest { + // Required. The name of the key to be deleted, in the format + // "projects/{project}/keys/{key}". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recaptchaenterprise.googleapis.com/Key" + } + ]; +} + +// A key used to identify and configure applications (web and/or mobile) that +// use reCAPTCHA Enterprise. +message Key { + option (google.api.resource) = { + type: "recaptchaenterprise.googleapis.com/Key" + pattern: "projects/{project}/keys/{key}" + }; + + // The resource name for the Key in the format + // "projects/{project}/keys/{key}". + string name = 1; + + // Human-readable display name of this key. Modifiable by user. + string display_name = 2; + + // Platform specific settings for this key. The key can only be used on one + // platform, the one it has settings for. + oneof platform_settings { + // Settings for keys that can be used by websites. + WebKeySettings web_settings = 3; + + // Settings for keys that can be used by Android apps. + AndroidKeySettings android_settings = 4; + + // Settings for keys that can be used by iOS apps. + IOSKeySettings ios_settings = 5; + } + + // Optional. See + // Creating and managing labels. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // The timestamp corresponding to the creation of this Key. + google.protobuf.Timestamp create_time = 7; +} + +// Settings specific to keys that can be used by websites. +message WebKeySettings { + // Enum that represents the integration types for web keys. + enum IntegrationType { + // Default type that indicates this enum hasn't been specified. This is not + // a valid IntegrationType, one of the other types must be specified + // instead. + INTEGRATION_TYPE_UNSPECIFIED = 0; + + // Only used to produce scores. It doesn't display the "I'm not a robot" + // checkbox and never shows captcha challenges. + SCORE = 1; + + // Displays the "I'm not a robot" checkbox and may show captcha challenges + // after it is checked. + CHECKBOX = 2; + + // Doesn't display the "I'm not a robot" checkbox, but may show captcha + // challenges after risk analysis. + INVISIBLE = 3; + } + + // Enum that represents the possible challenge frequency and difficulty + // configurations for a web key. + enum ChallengeSecurityPreference { + // Default type that indicates this enum hasn't been specified. + CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0; + + // Key tends to show fewer and easier challenges. + USABILITY = 1; + + // Key tends to show balanced (in amount and difficulty) challenges. + BALANCE = 2; + + // Key tends to show more and harder challenges. + SECURITY = 3; + } + + // If set to true, it means allowed_domains will not be enforced. + bool allow_all_domains = 3; + + // Domains or subdomains of websites allowed to use the key. All subdomains + // of an allowed domain are automatically allowed. A valid domain requires a + // host and must not include any path, port, query or fragment. + // Examples: 'example.com' or 'subdomain.example.com' + repeated string allowed_domains = 1; + + // Required. Whether this key can be used on AMP (Accelerated Mobile Pages) websites. + bool allow_amp_traffic = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Describes how this key is integrated with the website. + IntegrationType integration_type = 4 [(google.api.field_behavior) = REQUIRED]; + + // Settings for the frequency and difficulty at which this key triggers + // captcha challenges. This should only be specified for IntegrationTypes + // CHECKBOX and INVISIBLE. + ChallengeSecurityPreference challenge_security_preference = 5; +} + +// Settings specific to keys that can be used by Android apps. +message AndroidKeySettings { + // Android package names of apps allowed to use the key. + // Example: 'com.companyname.appname' + repeated string allowed_package_names = 1; +} + +// Settings specific to keys that can be used by iOS apps. +message IOSKeySettings { + // iOS bundle ids of apps allowed to use the key. + // Example: 'com.companyname.productname.appname' + repeated string allowed_bundle_ids = 1; +} diff --git a/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_gapic.yaml b/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_gapic.yaml new file mode 100644 index 000000000..b2efd3cad --- /dev/null +++ b/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_gapic.yaml @@ -0,0 +1,24 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.recaptchaenterprise.v1 + python: + package_name: google.cloud.recaptcha_enterprise_v1.gapic + go: + package_name: cloud.google.com/go/recaptchaenterprise/apiv1 + csharp: + package_name: Google.Cloud.RecaptchaEnterprise.V1 + ruby: + package_name: Google::Cloud::RecaptchaEnterprise::V1 + php: + package_name: Google\Cloud\RecaptchaEnterprise\V1 + nodejs: + package_name: recaptchaenterprise.v1 + domain_layer_location: google-cloud +collections: +- entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName diff --git a/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_grpc_service_config.json b/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_grpc_service_config.json new file mode 100755 index 000000000..edd0c8e6c --- /dev/null +++ b/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_grpc_service_config.json @@ -0,0 +1,37 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "method": "CreateAssessment" + }, + { + "service": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "method": "AnnotateAssessment" + }, + { + "service": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "method": "CreateKey" + }, + { + "service": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "method": "ListKeys" + }, + { + "service": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "method": "GetKey" + }, + { + "service": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "method": "DeleteKey" + }, + { + "service": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService", + "method": "UpdateKey" + } + ], + "timeout": "600s" + } + ] +} diff --git a/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_v1.yaml b/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_v1.yaml new file mode 100644 index 000000000..aa45595c8 --- /dev/null +++ b/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_v1.yaml @@ -0,0 +1,14 @@ +type: google.api.Service +config_version: 3 +name: recaptchaenterprise.googleapis.com +title: reCAPTCHA Enterprise API + +apis: +- name: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService + +authentication: + rules: + - selector: 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/recaptchaenterprise/v1beta1/BUILD.bazel b/google/cloud/recaptchaenterprise/v1beta1/BUILD.bazel new file mode 100644 index 000000000..3586a8443 --- /dev/null +++ b/google/cloud/recaptchaenterprise/v1beta1/BUILD.bazel @@ -0,0 +1,362 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "recaptchaenterprise_proto", + srcs = [ + "recaptchaenterprise.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "recaptchaenterprise_proto_with_info", + deps = [ + ":recaptchaenterprise_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "recaptchaenterprise_java_proto", + deps = [":recaptchaenterprise_proto"], +) + +java_grpc_library( + name = "recaptchaenterprise_java_grpc", + srcs = [":recaptchaenterprise_proto"], + deps = [":recaptchaenterprise_java_proto"], +) + +java_gapic_library( + name = "recaptchaenterprise_java_gapic", + src = ":recaptchaenterprise_proto_with_info", + gapic_yaml = "recaptchaenterprise_gapic.yaml", + package = "google.cloud.recaptchaenterprise.v1beta1", + service_yaml = "recaptchaenterprise_v1beta1.yaml", + test_deps = [ + ":recaptchaenterprise_java_grpc", + ], + deps = [ + ":recaptchaenterprise_java_proto", + ], +) + +java_gapic_test( + name = "recaptchaenterprise_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1ClientTest", + ], + runtime_deps = [":recaptchaenterprise_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-recaptchaenterprise-v1beta1-java", + deps = [ + ":recaptchaenterprise_java_gapic", + ":recaptchaenterprise_java_grpc", + ":recaptchaenterprise_java_proto", + ":recaptchaenterprise_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "recaptchaenterprise_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1beta1", + protos = [":recaptchaenterprise_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "recaptchaenterprise_go_gapic", + srcs = [":recaptchaenterprise_proto_with_info"], + grpc_service_config = "recaptchaenterprise_grpc_service_config.json", + importpath = "cloud.google.com/go/recaptchaenterprise/apiv1beta1;recaptchaenterprise", + service_yaml = "recaptchaenterprise_v1beta1.yaml", + deps = [ + ":recaptchaenterprise_go_proto", + ], +) + +go_test( + name = "recaptchaenterprise_go_gapic_test", + srcs = [":recaptchaenterprise_go_gapic_srcjar_test"], + embed = [":recaptchaenterprise_go_gapic"], + importpath = "cloud.google.com/go/recaptchaenterprise/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-recaptchaenterprise-v1beta1-go", + deps = [ + ":recaptchaenterprise_go_gapic", + ":recaptchaenterprise_go_gapic_srcjar-test.srcjar", + ":recaptchaenterprise_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "recaptchaenterprise_moved_proto", + srcs = [":recaptchaenterprise_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "recaptchaenterprise_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":recaptchaenterprise_moved_proto"], +) + +py_grpc_library( + name = "recaptchaenterprise_py_grpc", + srcs = [":recaptchaenterprise_moved_proto"], + deps = [":recaptchaenterprise_py_proto"], +) + +py_gapic_library( + name = "recaptchaenterprise_py_gapic", + src = ":recaptchaenterprise_proto_with_info", + gapic_yaml = "recaptchaenterprise_gapic.yaml", + package = "google.cloud.recaptchaenterprise.v1beta1", + service_yaml = "recaptchaenterprise_v1beta1.yaml", + deps = [ + ":recaptchaenterprise_py_grpc", + ":recaptchaenterprise_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "recaptchaenterprise-v1beta1-py", + deps = [ + ":recaptchaenterprise_py_gapic", + ":recaptchaenterprise_py_grpc", + ":recaptchaenterprise_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "recaptchaenterprise_php_proto", + deps = [":recaptchaenterprise_proto"], +) + +php_grpc_library( + name = "recaptchaenterprise_php_grpc", + srcs = [":recaptchaenterprise_proto"], + deps = [":recaptchaenterprise_php_proto"], +) + +php_gapic_library( + name = "recaptchaenterprise_php_gapic", + src = ":recaptchaenterprise_proto_with_info", + gapic_yaml = "recaptchaenterprise_gapic.yaml", + package = "google.cloud.recaptchaenterprise.v1beta1", + service_yaml = "recaptchaenterprise_v1beta1.yaml", + deps = [ + ":recaptchaenterprise_php_grpc", + ":recaptchaenterprise_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-recaptchaenterprise-v1beta1-php", + deps = [ + ":recaptchaenterprise_php_gapic", + ":recaptchaenterprise_php_grpc", + ":recaptchaenterprise_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "recaptchaenterprise_nodejs_gapic", + src = ":recaptchaenterprise_proto_with_info", + gapic_yaml = "recaptchaenterprise_gapic.yaml", + package = "google.cloud.recaptchaenterprise.v1beta1", + service_yaml = "recaptchaenterprise_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "recaptchaenterprise-v1beta1-nodejs", + deps = [ + ":recaptchaenterprise_nodejs_gapic", + ":recaptchaenterprise_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "recaptchaenterprise_ruby_proto", + deps = [":recaptchaenterprise_proto"], +) + +ruby_grpc_library( + name = "recaptchaenterprise_ruby_grpc", + srcs = [":recaptchaenterprise_proto"], + deps = [":recaptchaenterprise_ruby_proto"], +) + +ruby_gapic_library( + name = "recaptchaenterprise_ruby_gapic", + src = ":recaptchaenterprise_proto_with_info", + gapic_yaml = "recaptchaenterprise_gapic.yaml", + package = "google.cloud.recaptchaenterprise.v1beta1", + service_yaml = "recaptchaenterprise_v1beta1.yaml", + deps = [ + ":recaptchaenterprise_ruby_grpc", + ":recaptchaenterprise_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-recaptchaenterprise-v1beta1-ruby", + deps = [ + ":recaptchaenterprise_ruby_gapic", + ":recaptchaenterprise_ruby_grpc", + ":recaptchaenterprise_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "recaptchaenterprise_csharp_proto", + deps = [":recaptchaenterprise_proto"], +) + +csharp_grpc_library( + name = "recaptchaenterprise_csharp_grpc", + srcs = [":recaptchaenterprise_proto"], + deps = [":recaptchaenterprise_csharp_proto"], +) + +csharp_gapic_library( + name = "recaptchaenterprise_csharp_gapic", + src = ":recaptchaenterprise_proto_with_info", + gapic_yaml = "recaptchaenterprise_gapic.yaml", + package = "google.cloud.recaptchaenterprise.v1beta1", + service_yaml = "recaptchaenterprise_v1beta1.yaml", + deps = [ + ":recaptchaenterprise_csharp_grpc", + ":recaptchaenterprise_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-recaptchaenterprise-v1beta1-csharp", + deps = [ + ":recaptchaenterprise_csharp_gapic", + ":recaptchaenterprise_csharp_grpc", + ":recaptchaenterprise_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto index 188f99f6f..099d3041f 100644 --- a/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto +++ b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto @@ -18,6 +18,11 @@ syntax = "proto3"; package google.cloud.recaptchaenterprise.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.RecaptchaEnterprise.V1Beta1"; @@ -27,16 +32,20 @@ option java_outer_classname = "RecaptchaEnterpriseProto"; option java_package = "com.google.recaptchaenterprise.v1beta1"; option objc_class_prefix = "GCRE"; option php_namespace = "Google\\Cloud\\RecaptchaEnterprise\\V1beta1"; - +option ruby_package = "Google::Cloud::RecaptchaEnterprise::V1beta1"; // Service to determine the likelihood an event is legitimate. service RecaptchaEnterpriseServiceV1Beta1 { + option (google.api.default_host) = "recaptchaenterprise.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Creates an Assessment of the likelihood an event is legitimate. rpc CreateAssessment(CreateAssessmentRequest) returns (Assessment) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*}/assessments" body: "assessment" }; + option (google.api.method_signature) = "parent,assessment"; } // Annotates a previously created Assessment to provide additional information @@ -46,6 +55,44 @@ service RecaptchaEnterpriseServiceV1Beta1 { post: "/v1beta1/{name=projects/*/assessments/*}:annotate" body: "*" }; + option (google.api.method_signature) = "name,annotation"; + } + + // Creates a new reCAPTCHA Enterprise key. + rpc CreateKey(CreateKeyRequest) returns (Key) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/keys" + body: "key" + }; + } + + // Returns the list of all keys that belong to a project. + rpc ListKeys(ListKeysRequest) returns (ListKeysResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/keys" + }; + } + + // Returns the specified key. + rpc GetKey(GetKeyRequest) returns (Key) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/keys/*}" + }; + } + + // Updates the specified key. + rpc UpdateKey(UpdateKeyRequest) returns (Key) { + option (google.api.http) = { + patch: "/v1beta1/{key.name=projects/*/keys/*}" + body: "key" + }; + } + + // Deletes the specified key. + rpc DeleteKey(DeleteKeyRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/keys/*}" + }; } } @@ -53,10 +100,15 @@ service RecaptchaEnterpriseServiceV1Beta1 { message CreateAssessmentRequest { // Required. The name of the project in which the assessment will be created, // in the format "projects/{project_number}". - string parent = 1; - - // The asessment details. - Assessment assessment = 2; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The assessment details. + Assessment assessment = 2 [(google.api.field_behavior) = REQUIRED]; } // The request message to annotate an Assessment. @@ -75,10 +127,15 @@ message AnnotateAssessmentRequest { // Required. The resource name of the Assessment, in the format // "projects/{project_number}/assessments/{assessment_id}". - string name = 1; - - // The annotation that will be assigned to the Event. - Annotation annotation = 2; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recaptchaenterprise.googleapis.com/Assessment" + } + ]; + + // Required. The annotation that will be assigned to the Event. + Annotation annotation = 2 [(google.api.field_behavior) = REQUIRED]; } // Empty response for AnnotateAssessment. @@ -88,30 +145,38 @@ message AnnotateAssessmentResponse { // A recaptcha assessment resource. message Assessment { + option (google.api.resource) = { + type: "recaptchaenterprise.googleapis.com/Assessment" + pattern: "projects/{project}/assessments/{assessment}" + }; + // LINT.IfChange(classification_reason) // Reasons contributing to the risk analysis verdict. enum ClassificationReason { // Default unspecified type. CLASSIFICATION_REASON_UNSPECIFIED = 0; - // The event appeared to be automated. + // Interactions matched the behavior of an automated agent. AUTOMATION = 1; - // The event was not made from the proper context on the real site. + // The event originated from an illegitimate environment. UNEXPECTED_ENVIRONMENT = 2; - // Browsing behavior leading up to the event was generated was out of the - // ordinary. + // Traffic volume from the event source is higher than normal. + TOO_MUCH_TRAFFIC = 3; + + // Interactions with the site were significantly different than expected + // patterns. UNEXPECTED_USAGE_PATTERNS = 4; // Too little traffic has been received from this site thus far to generate // quality risk analysis. - PROVISIONAL_RISK_ANALYSIS = 5; + LOW_CONFIDENCE_SCORE = 5; } // Output only. The resource name for the Assessment in the format // "projects/{project_number}/assessments/{assessment_id}". - string name = 1; + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // The event being assessed. Event event = 2; @@ -119,26 +184,39 @@ message Assessment { // Output only. Legitimate event score from 0.0 to 1.0. // (1.0 means very likely legitimate traffic while 0.0 means very likely // non-legitimate traffic). - float score = 3; + float score = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Properties of the provided event token. - TokenProperties token_properties = 4; + TokenProperties token_properties = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Reasons contributing to the risk analysis verdict. - repeated ClassificationReason reasons = 5; + repeated ClassificationReason reasons = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } message Event { - // The user response token provided by the reCAPTCHA client-side integration + // Optional. The user response token provided by the reCAPTCHA client-side integration // on your site. - string token = 1; + string token = 1 [(google.api.field_behavior) = OPTIONAL]; - // The site key that was used to invoke reCAPTCHA on your site and generate + // Optional. The site key that was used to invoke reCAPTCHA on your site and generate // the token. - string site_key = 2; + string site_key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The user agent present in the request from the user's device related to + // this event. + string user_agent = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address in the request from the user's device related to this event. + string user_ip_address = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The expected action for this type of event. This should be the same action + // provided at token generation time on client-side platforms already + // integrated with recaptcha enterprise. + string expected_action = 5 [(google.api.field_behavior) = OPTIONAL]; } message TokenProperties { + // LINT.IfChange // Enum that represents the types of invalid token reasons. enum InvalidReason { // Default unspecified type. @@ -156,7 +234,7 @@ message TokenProperties { // The user verification had already been seen. DUPE = 4; - // The user verification token did not match the provided site secret. + // The user verification token did not match the provided site key. // This may be a configuration error (e.g. development keys used in // production) or end users trying to use verification tokens from other // sites. @@ -166,18 +244,199 @@ message TokenProperties { MISSING = 6; } - // Output only. Whether the provided user response token is valid. + // Whether the provided user response token is valid. bool valid = 1; - // Output only. Reason associated with the response when valid = false. + // Reason associated with the response when valid = false. InvalidReason invalid_reason = 2; - // Output only. The timestamp corresponding to the generation of the token. + // The timestamp corresponding to the generation of the token. google.protobuf.Timestamp create_time = 3; - // Output only. The hostname of the page on which the token was generated. + // The hostname of the page on which the token was generated. string hostname = 4; - // Output only. Action name provided at token generation. + // Action name provided at token generation. string action = 5; } + +// The create key request message. +message CreateKeyRequest { + // Required. The name of the project in which the key will be created, in the + // format "projects/{project_number}". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. Information to create a reCAPTCHA Enterprise key. + Key key = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The list keys request message. +message ListKeysRequest { + // Required. The name of the project that contains the keys that will be + // listed, in the format "projects/{project_number}". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Optional. The maximum number of keys to return. Default is 10. Max limit is + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous. + // ListKeysRequest, if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response to request to list keys in a project. +message ListKeysResponse { + // Key details. + repeated Key keys = 1; + + // Token to retrieve the next page of results. It is set to empty if no keys + // remain in results. + string next_page_token = 2; +} + +// The get key request message. +message GetKeyRequest { + // Required. The name of the requested key, in the format + // "projects/{project_number}/keys/{key_id}". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recaptchaenterprise.googleapis.com/Key" + } + ]; +} + +// The update key request message. +message UpdateKeyRequest { + // Required. The key to update. + Key key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which field of the key get updated. If the mask is not + // present, all fields will be updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The delete key request message. +message DeleteKeyRequest { + // Required. The name of the key to be deleted, in the format + // "projects/{project_number}/keys/{key_id}". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recaptchaenterprise.googleapis.com/Key" + } + ]; +} + +// A key used to identify and configure applications (web and/or mobile) that +// use reCAPTCHA Enterprise. +message Key { + option (google.api.resource) = { + type: "recaptchaenterprise.googleapis.com/Key" + pattern: "projects/{project}/keys/{key}" + }; + + // The resource name for the Key in the format + // "projects/{project_number}/keys/{key_id}". + string name = 1; + + // Human-readable display name of this key. Modifiable by user. + string display_name = 2; + + // Platform specific settings for this key. The key can only be used on one + // platform, the one it has settings for. + oneof platform_settings { + // Settings for keys that can be used by websites. + WebKeySettings web_settings = 3; + + // Settings for keys that can be used by Android apps. + AndroidKeySettings android_settings = 4; + + // Settings for keys that can be used by iOS apps. + IOSKeySettings ios_settings = 5; + } +} + +// Settings specific to keys that can be used by websites. +message WebKeySettings { + // Enum that represents the integration types for web keys. + enum IntegrationType { + // Default type that indicates this enum hasn't been specified. This is not + // a valid IntegrationType, one of the other types must be specified + // instead. + INTEGRATION_TYPE_UNSPECIFIED = 0; + + // Only used to produce scores. It doesn't display the "I'm not a robot" + // checkbox and never shows captcha challenges. + SCORE_ONLY = 1; + + // Displays the "I'm not a robot" checkbox and may show captcha challenges + // after it is checked. + CHECKBOX_CHALLENGE = 2; + + // Doesn't display the "I'm not a robot" checkbox, but may show captcha + // challenges after risk analysis. + INVISIBLE_CHALLENGE = 3; + } + + // Enum that represents the possible challenge frequency and difficulty + // configurations for a web key. + enum ChallengeSecurityPreference { + // Default type that indicates this enum hasn't been specified. + CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0; + + // Key tends to show fewer and easier challenges. + USABILITY = 1; + + // Key tends to show balanced (in amount and difficulty) challenges. + BALANCED = 2; + + // Key tends to show more and harder challenges. + SECURITY = 3; + } + + // Whether allowed_domains is enforced or not. + bool enforce_allowed_domains = 3; + + // Domains or subdomains of websites allowed to use the key. All subdomains + // of an allowed domain are automatically allowed. A valid domain requires a + // host and must not include any path, port, query or fragment. + // Examples: 'example.com' or 'subdomain.example.com' + repeated string allowed_domains = 1; + + // Whether this key can be used on AMP (Accelerated Mobile Pages) websites. + bool allow_amp_traffic = 2; + + // Required. Describes how this key is integrated with the website. + IntegrationType integration_type = 4 [(google.api.field_behavior) = REQUIRED]; + + // Settings for the frequency and difficulty at which this key triggers + // captcha challenges. This should only be specified for IntegrationTypes + // CHECKBOX_CHALLENGE and INVISIBLE_CHALLENGE. + ChallengeSecurityPreference challenge_security_preference = 5; +} + +// Settings specific to keys that can be used by Android apps. +message AndroidKeySettings { + // Android package names of apps allowed to use the key. + // Example: 'com.companyname.appname' + repeated string allowed_package_names = 1; +} + +// Settings specific to keys that can be used by iOS apps. +message IOSKeySettings { + // iOS bundle ids of apps allowed to use the key. + // Example: 'com.companyname.productname.appname' + repeated string allowed_bundle_ids = 1; +} diff --git a/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.legacy.yaml b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.legacy.yaml new file mode 100644 index 000000000..7973f096c --- /dev/null +++ b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.legacy.yaml @@ -0,0 +1,155 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.recaptchaenterprise.v1beta1 + python: + package_name: google.cloud.recaptcha_enterprise_v1beta1.gapic + go: + package_name: cloud.google.com/go/recaptchaenterprise/apiv1beta1 + csharp: + package_name: Google.Cloud.RecaptchaEnterprise.V1Beta1 + ruby: + package_name: Google::Cloud::RecaptchaEnterprise::V1beta1 + php: + package_name: Google\Cloud\RecaptchaEnterprise\V1beta1 + nodejs: + package_name: recaptchaenterprise.v1beta1 + domain_layer_location: google-cloud +# The configuration for the license header to put on generated files. +license_header: + # The file containing the copyright line(s). + copyright_file: copyright-google.txt + # The file containing the raw license header without any copyright line(s). + license_file: license-header-apache-2.0.txt +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1 + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + - name_pattern: projects/{project}/assessments/{assessment} + entity_name: assessment + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateAssessment + flattening: + groups: + - parameters: + - parent + - assessment + required_fields: + - parent + - assessment + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: AnnotateAssessment + flattening: + groups: + - parameters: + - name + - annotation + required_fields: + - name + - annotation + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: assessment + timeout_millis: 60000 +resource_name_generation: +- message_name: CreateAssessmentRequest + field_entity_map: + parent: project +- message_name: AnnotateAssessmentRequest + field_entity_map: + name: assessment diff --git a/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.yaml b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.yaml index 7973f096c..3871a3262 100644 --- a/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.yaml +++ b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -17,139 +17,8 @@ language_settings: nodejs: package_name: recaptchaenterprise.v1beta1 domain_layer_location: google-cloud -# The configuration for the license header to put on generated files. -license_header: - # The file containing the copyright line(s). - copyright_file: copyright-google.txt - # The file containing the raw license header without any copyright line(s). - license_file: license-header-apache-2.0.txt -# A list of API interface configurations. -interfaces: -# The fully qualified name of the API interface. -- name: google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1 - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - - name_pattern: projects/{project}/assessments/{assessment} - entity_name: assessment - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: CreateAssessment - flattening: - groups: - - parameters: - - parent - - assessment - required_fields: - - parent - - assessment - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - - name: AnnotateAssessment - flattening: - groups: - - parameters: - - name - - annotation - required_fields: - - name - - annotation - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: assessment - timeout_millis: 60000 -resource_name_generation: -- message_name: CreateAssessmentRequest - field_entity_map: - parent: project -- message_name: AnnotateAssessmentRequest - field_entity_map: - name: assessment +collections: +- entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName diff --git a/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_grpc_service_config.json b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_grpc_service_config.json new file mode 100755 index 000000000..be075f419 --- /dev/null +++ b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_grpc_service_config.json @@ -0,0 +1,37 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1", + "method": "CreateAssessment" + }, + { + "service": "google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1", + "method": "AnnotateAssessment" + }, + { + "service": "google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1", + "method": "CreateKey" + }, + { + "service": "google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1", + "method": "ListKeys" + }, + { + "service": "google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1", + "method": "GetKey" + }, + { + "service": "google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1", + "method": "DeleteKey" + }, + { + "service": "google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1", + "method": "UpdateKey" + } + ], + "timeout": "600s" + } + ] +} diff --git a/google/cloud/recaptchaenterprise/recaptchaenterprise_v1beta1.yaml b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_v1beta1.yaml similarity index 51% rename from google/cloud/recaptchaenterprise/recaptchaenterprise_v1beta1.yaml rename to google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_v1beta1.yaml index 4996c5a4f..fc95bdf73 100644 --- a/google/cloud/recaptchaenterprise/recaptchaenterprise_v1beta1.yaml +++ b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_v1beta1.yaml @@ -8,11 +8,7 @@ apis: authentication: rules: - - selector: google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1.AnnotateAssessment - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform - - selector: google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1.CreateAssessment + - selector: 'google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1.*' oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/recommendationengine/v1beta1/BUILD.bazel b/google/cloud/recommendationengine/v1beta1/BUILD.bazel new file mode 100644 index 000000000..f60a1cb14 --- /dev/null +++ b/google/cloud/recommendationengine/v1beta1/BUILD.bazel @@ -0,0 +1,351 @@ +# This file was automatically generated by BuildFileGenerator + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", + "moved_proto_library", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", + "proto_library_with_info", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +proto_library( + name = "recommendationengine_proto", + srcs = [ + "catalog.proto", + "catalog_service.proto", + "common.proto", + "import.proto", + "prediction_apikey_registry_service.proto", + "prediction_service.proto", + "recommendationengine_resources.proto", + "user_event.proto", + "user_event_service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:httpbody_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "//google/type:date_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "recommendationengine_proto_with_info", + deps = [ + ":recommendationengine_proto", + "//google/cloud:common_resources_proto", + ], +) + +java_proto_library( + name = "recommendationengine_java_proto", + deps = [ + ":recommendationengine_proto", + "//google/api:httpbody_proto", + ], +) + +java_grpc_library( + name = "recommendationengine_java_grpc", + srcs = [":recommendationengine_proto"], + deps = [":recommendationengine_java_proto"], +) + +java_gapic_library( + name = "recommendationengine_java_gapic", + src = ":recommendationengine_proto_with_info", + gapic_yaml = "recommendationengine_gapic.yaml", + package = "google.cloud.recommendationengine.v1beta1", + service_yaml = "recommendationengine_v1beta1.yaml", + test_deps = [ + ":recommendationengine_java_grpc", + ], + deps = [ + ":recommendationengine_java_proto", + "//google/api:httpbody_proto", + ], +) + +java_gapic_test( + name = "recommendationengine_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.recommendationengine.v1beta1.CatalogServiceClientTest", + "com.google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistryClientTest", + "com.google.cloud.recommendationengine.v1beta1.PredictionServiceClientTest", + "com.google.cloud.recommendationengine.v1beta1.UserEventServiceClientTest", + ], + runtime_deps = [":recommendationengine_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-recommendationengine-v1beta1-java", + deps = [ + ":recommendationengine_java_gapic", + ":recommendationengine_java_grpc", + ":recommendationengine_java_proto", + ":recommendationengine_proto", + ], +) + +go_proto_library( + name = "recommendationengine_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/recommendationengine/v1beta1", + protos = [":recommendationengine_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/api:httpbody_go_proto", + "//google/longrunning:longrunning_go_proto", + "//google/rpc:status_go_proto", + "//google/type:date_go_proto", + ], +) + +go_gapic_library( + name = "recommendationengine_go_gapic", + srcs = [":recommendationengine_proto_with_info"], + grpc_service_config = "recommendationengine_grpc_service_config.json", + importpath = "cloud.google.com/go/recommendationengine/apiv1beta1;recommendationengine", + service_yaml = "recommendationengine_v1beta1.yaml", + deps = [ + ":recommendationengine_go_proto", + "//google/api:httpbody_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:struct_go_proto", + ], +) + +go_test( + name = "recommendationengine_go_gapic_test", + srcs = [":recommendationengine_go_gapic_srcjar_test"], + embed = [":recommendationengine_go_gapic"], + importpath = "cloud.google.com/go/recommendationengine/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-recommendationengine-v1beta1-go", + deps = [ + ":recommendationengine_go_gapic", + ":recommendationengine_go_gapic_srcjar-test.srcjar", + ":recommendationengine_go_proto", + ], +) + +moved_proto_library( + name = "recommendationengine_moved_proto", + srcs = [":recommendationengine_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:httpbody_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "//google/type:date_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "recommendationengine_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":recommendationengine_moved_proto"], +) + +py_grpc_library( + name = "recommendationengine_py_grpc", + srcs = [":recommendationengine_moved_proto"], + deps = [":recommendationengine_py_proto"], +) + +py_gapic_library( + name = "recommendationengine_py_gapic", + src = ":recommendationengine_proto_with_info", + gapic_yaml = "recommendationengine_gapic.yaml", + package = "google.cloud.recommendationengine.v1beta1", + service_yaml = "recommendationengine_v1beta1.yaml", + deps = [ + ":recommendationengine_py_grpc", + ":recommendationengine_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "recommendationengine-v1beta1-py", + deps = [ + ":recommendationengine_py_gapic", + ":recommendationengine_py_grpc", + ":recommendationengine_py_proto", + ], +) + +php_proto_library( + name = "recommendationengine_php_proto", + deps = [":recommendationengine_proto"], +) + +php_grpc_library( + name = "recommendationengine_php_grpc", + srcs = [":recommendationengine_proto"], + deps = [":recommendationengine_php_proto"], +) + +php_gapic_library( + name = "recommendationengine_php_gapic", + src = ":recommendationengine_proto_with_info", + gapic_yaml = "recommendationengine_gapic.yaml", + package = "google.cloud.recommendationengine.v1beta1", + service_yaml = "recommendationengine_v1beta1.yaml", + deps = [ + ":recommendationengine_php_grpc", + ":recommendationengine_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-recommendationengine-v1beta1-php", + deps = [ + ":recommendationengine_php_gapic", + ":recommendationengine_php_grpc", + ":recommendationengine_php_proto", + ], +) + +nodejs_gapic_library( + name = "recommendationengine_nodejs_gapic", + src = ":recommendationengine_proto_with_info", + gapic_yaml = "recommendationengine_gapic.yaml", + package = "google.cloud.recommendationengine.v1beta1", + service_yaml = "recommendationengine_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "recommendationengine-v1beta1-nodejs", + deps = [ + ":recommendationengine_nodejs_gapic", + ":recommendationengine_proto", + ], +) + +ruby_proto_library( + name = "recommendationengine_ruby_proto", + deps = [":recommendationengine_proto"], +) + +ruby_grpc_library( + name = "recommendationengine_ruby_grpc", + srcs = [":recommendationengine_proto"], + deps = [":recommendationengine_ruby_proto"], +) + +ruby_gapic_library( + name = "recommendationengine_ruby_gapic", + src = ":recommendationengine_proto_with_info", + gapic_yaml = "recommendationengine_gapic.yaml", + package = "google.cloud.recommendationengine.v1beta1", + service_yaml = "recommendationengine_v1beta1.yaml", + deps = [ + ":recommendationengine_ruby_grpc", + ":recommendationengine_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-recommendationengine-v1beta1-ruby", + deps = [ + ":recommendationengine_ruby_gapic", + ":recommendationengine_ruby_grpc", + ":recommendationengine_ruby_proto", + ], +) + +csharp_proto_library( + name = "recommendationengine_csharp_proto", + deps = [":recommendationengine_proto"], +) + +csharp_grpc_library( + name = "recommendationengine_csharp_grpc", + srcs = [":recommendationengine_proto"], + deps = [":recommendationengine_csharp_proto"], +) + +csharp_gapic_library( + name = "recommendationengine_csharp_gapic", + src = ":recommendationengine_proto_with_info", + gapic_yaml = "recommendationengine_gapic.yaml", + package = "google.cloud.recommendationengine.v1beta1", + service_yaml = "recommendationengine_v1beta1.yaml", + deps = [ + ":recommendationengine_csharp_grpc", + ":recommendationengine_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-recommendationengine-v1beta1-csharp", + deps = [ + ":recommendationengine_csharp_gapic", + ":recommendationengine_csharp_grpc", + ":recommendationengine_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/recommendationengine/v1beta1/artman_recommendationengine_v1beta1.yaml b/google/cloud/recommendationengine/v1beta1/artman_recommendationengine_v1beta1.yaml new file mode 100644 index 000000000..9e1b2c80a --- /dev/null +++ b/google/cloud/recommendationengine/v1beta1/artman_recommendationengine_v1beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: recommendationengine + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - . + service_yaml: recommendationengine_v1beta1.yaml + gapic_yaml: recommendationengine_gapic.yaml +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: php_gapic + type: GAPIC + language: PHP +- name: go_gapic + type: GAPIC + language: GO +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: csharp_gapic + type: GAPIC + language: CSHARP diff --git a/google/cloud/recommendationengine/v1beta1/catalog.proto b/google/cloud/recommendationengine/v1beta1/catalog.proto new file mode 100644 index 000000000..9a0c163dc --- /dev/null +++ b/google/cloud/recommendationengine/v1beta1/catalog.proto @@ -0,0 +1,199 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.recommendationengine.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/cloud/recommendationengine/v1beta1/common.proto"; +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.RecommendationEngine.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/recommendationengine/v1beta1;recommendationengine"; +option java_multiple_files = true; +option java_package = "com.google.cloud.recommendationengine.v1beta1"; +option objc_class_prefix = "RECAI"; +option php_namespace = "Google\\Cloud\\RecommendationEngine\\V1beta1"; +option ruby_package = "Google::Cloud::RecommendationEngine::V1beta1"; + +// CatalogItem captures all metadata information of items to be recommended. +message CatalogItem { + // Category represents catalog item category hierarchy. + message CategoryHierarchy { + // Required. Catalog item categories. Each category should be a UTF-8 + // encoded string with a length limit of 2 KiB. + // + // Note that the order in the list denotes the specificity (from least to + // most specific). + repeated string categories = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. Catalog item identifier. UTF-8 encoded string with a length limit + // of 128 bytes. + // + // This id must be unique among all catalog items within the same catalog. It + // should also be used when logging user events in order for the user events + // to be joined with the Catalog. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Catalog item categories. This field is repeated for supporting + // one catalog item belonging to several parallel category hierarchies. + // + // For example, if a shoes product belongs to both + // ["Shoes & Accessories" -> "Shoes"] and + // ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be + // represented as: + // + // "categoryHierarchies": [ + // { "categories": ["Shoes & Accessories", "Shoes"]}, + // { "categories": ["Sports & Fitness", "Athletic Clothing", "Shoes"] } + // ] + repeated CategoryHierarchy category_hierarchies = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Catalog item title. UTF-8 encoded string with a length limit of 1 + // KiB. + string title = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Catalog item description. UTF-8 encoded string with a length + // limit of 5 KiB. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Highly encouraged. Extra catalog item attributes to be + // included in the recommendation model. For example, for retail products, + // this could include the store name, vendor, style, color, etc. These are + // very strong signals for recommendation model, thus we highly recommend + // providing the item attributes here. + FeatureMap item_attributes = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Language of the title/description/item_attributes. Use language + // tags defined by BCP 47. https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Our + // supported language codes include 'en', 'es', 'fr', 'de', 'ar', 'fa', 'zh', + // 'ja', 'ko', 'sv', 'ro', 'nl'. For other languages, contact + // your Google account manager. + string language_code = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering tags associated with the catalog item. Each tag should + // be a UTF-8 encoded string with a length limit of 1 KiB. + // + // This tag can be used for filtering recommendation results by passing the + // tag as part of the predict request filter. + repeated string tags = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Variant group identifier for prediction results. UTF-8 encoded + // string with a length limit of 128 bytes. + // + // This field must be enabled before it can be used. [Learn + // more](/recommendations-ai/docs/catalog#item-group-id). + string item_group_id = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Extra catalog item metadata for different recommendation types. + oneof recommendation_type { + // Optional. Metadata specific to retail products. + ProductCatalogItem product_metadata = 10 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// ProductCatalogItem captures item metadata specific to retail products. +message ProductCatalogItem { + // Exact product price. + message ExactPrice { + // Optional. Display price of the product. + float display_price = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Price of the product without any discount. If zero, by default + // set to be the 'displayPrice'. + float original_price = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Product price range when there are a range of prices for different + // variations of the same product. + message PriceRange { + // Required. The minimum product price. + float min = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The maximum product price. + float max = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Item stock state. If this field is unspecified, the item is + // assumed to be in stock. + enum StockState { + option allow_alias = true; + + // Default item stock status. Should never be used. + STOCK_STATE_UNSPECIFIED = 0; + + // Item in stock. + IN_STOCK = 0; + + // Item out of stock. + OUT_OF_STOCK = 1; + + // Item that is in pre-order state. + PREORDER = 2; + + // Item that is back-ordered (i.e. temporarily out of stock). + BACKORDER = 3; + } + + // Product price. Only one of 'exactPrice'/'priceRange' can be provided. + oneof price { + // Optional. The exact product price. + ExactPrice exact_price = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The product price range. + PriceRange price_range = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. A map to pass the costs associated with the product. + // + // For example: + // {"manufacturing": 45.5} The profit of selling this item is computed like + // so: + // + // * If 'exactPrice' is provided, profit = displayPrice - sum(costs) + // * If 'priceRange' is provided, profit = minPrice - sum(costs) + map costs = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only required if the price is set. Currency code for price/costs. Use + // three-character ISO-4217 code. + string currency_code = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Online stock state of the catalog item. Default is `IN_STOCK`. + StockState stock_state = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The available quantity of the item. + int64 available_quantity = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Canonical URL directly linking to the item detail page with a + // length limit of 5 KiB.. + string canonical_product_uri = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Product images for the catalog item. + repeated Image images = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// Catalog item thumbnail/detail image. +message Image { + // Required. URL of the image with a length limit of 5 KiB. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Height of the image in number of pixels. + int32 height = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Width of the image in number of pixels. + int32 width = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/google/cloud/recommendationengine/v1beta1/catalog_service.proto b/google/cloud/recommendationengine/v1beta1/catalog_service.proto new file mode 100644 index 000000000..5d38d0c8d --- /dev/null +++ b/google/cloud/recommendationengine/v1beta1/catalog_service.proto @@ -0,0 +1,199 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.recommendationengine.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/recommendationengine/v1beta1/catalog.proto"; +import "google/cloud/recommendationengine/v1beta1/import.proto"; +import "google/cloud/recommendationengine/v1beta1/recommendationengine_resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.RecommendationEngine.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/recommendationengine/v1beta1;recommendationengine"; +option java_multiple_files = true; +option java_package = "com.google.cloud.recommendationengine.v1beta1"; +option objc_class_prefix = "RECAI"; +option php_namespace = "Google\\Cloud\\RecommendationEngine\\V1beta1"; +option ruby_package = "Google::Cloud::RecommendationEngine::V1beta1"; + +// Service for ingesting catalog information of the customer's website. +service CatalogService { + option (google.api.default_host) = "recommendationengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a catalog item. + rpc CreateCatalogItem(CreateCatalogItemRequest) returns (CatalogItem) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/catalogs/*}/catalogItems" + body: "catalog_item" + }; + option (google.api.method_signature) = "parent,catalog_item"; + } + + // Gets a specific catalog item. + rpc GetCatalogItem(GetCatalogItemRequest) returns (CatalogItem) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/catalogs/*/catalogItems/**}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets a list of catalog items. + rpc ListCatalogItems(ListCatalogItemsRequest) + returns (ListCatalogItemsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/catalogs/*}/catalogItems" + }; + option (google.api.method_signature) = "parent,filter"; + } + + // Updates a catalog item. Partial updating is supported. Non-existing + // items will be created. + rpc UpdateCatalogItem(UpdateCatalogItemRequest) returns (CatalogItem) { + option (google.api.http) = { + patch: "/v1beta1/{name=projects/*/locations/*/catalogs/*/catalogItems/**}" + body: "catalog_item" + }; + option (google.api.method_signature) = "name,catalog_item,update_mask"; + } + + // Deletes a catalog item. + rpc DeleteCatalogItem(DeleteCatalogItemRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/catalogs/*/catalogItems/**}" + }; + option (google.api.method_signature) = "name"; + } + + // Bulk import of multiple catalog items. Request processing may be + // synchronous. No partial updating supported. Non-existing items will be + // created. + // + // Operation.response is of type ImportResponse. Note that it is + // possible for a subset of the items to be successfully updated. + rpc ImportCatalogItems(ImportCatalogItemsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/catalogs/*}/catalogItems:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.recommendationengine.v1beta1.ImportCatalogItemsResponse" + metadata_type: "google.cloud.recommendationengine.v1beta1.ImportMetadata" + }; + option (google.api.method_signature) = + "parent,request_id,input_config,errors_config"; + } +} + +// Request message for CreateCatalogItem method. +message CreateCatalogItemRequest { + // Required. The parent catalog resource name, such as + // "projects/*/locations/global/catalogs/default_catalog". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/Catalog" + } + ]; + + // Required. The catalog item to create. + CatalogItem catalog_item = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for GetCatalogItem method. +message GetCatalogItemRequest { + // Required. Full resource name of catalog item, such as + // "projects/*/locations/global/catalogs/default_catalog/catalogitems/some_catalog_item_id". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/CatalogItemPath" + } + ]; +} + +// Request message for ListCatalogItems method. +message ListCatalogItemsRequest { + // Required. The parent catalog resource name, such as + // "projects/*/locations/global/catalogs/default_catalog". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/Catalog" + } + ]; + + // Optional. Maximum number of results to return per page. If zero, the + // service will choose a reasonable default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The previous ListCatalogItemsResponse.next_page_token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter to apply on the list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListCatalogItems method. +message ListCatalogItemsResponse { + // The catalog items. + repeated CatalogItem catalog_items = 1; + + // If empty, the list is complete. If nonempty, the token to pass to the next + // request's ListCatalogItemRequest.page_token. + string next_page_token = 2; +} + +// Request message for UpdateCatalogItem method. +message UpdateCatalogItemRequest { + // Required. Full resource name of catalog item, such as + // "projects/*/locations/global/catalogs/default_catalog/catalogItems/some_catalog_item_id". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/CatalogItemPath" + } + ]; + + // Required. The catalog item to update/create. The 'catalog_item_id' field + // has to match that in the 'name'. + CatalogItem catalog_item = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates which fields in the provided 'item' to update. If not + // set, will by default update all fields. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for DeleteCatalogItem method. +message DeleteCatalogItemRequest { + // Required. Full resource name of catalog item, such as + // "projects/*/locations/global/catalogs/default_catalog/catalogItems/some_catalog_item_id". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/CatalogItemPath" + } + ]; +} diff --git a/google/cloud/recommendationengine/v1beta1/common.proto b/google/cloud/recommendationengine/v1beta1/common.proto new file mode 100644 index 000000000..1ca1bab87 --- /dev/null +++ b/google/cloud/recommendationengine/v1beta1/common.proto @@ -0,0 +1,63 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.recommendationengine.v1beta1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.RecommendationEngine.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/recommendationengine/v1beta1;recommendationengine"; +option java_multiple_files = true; +option java_package = "com.google.cloud.recommendationengine.v1beta1"; +option objc_class_prefix = "RECAI"; +option php_namespace = "Google\\Cloud\\RecommendationEngine\\V1beta1"; +option ruby_package = "Google::Cloud::RecommendationEngine::V1beta1"; + +// FeatureMap represents extra features that customers want to include in the +// recommendation model for catalogs/user events as categorical/numerical +// features. +message FeatureMap { + // A list of string features. + message StringList { + // String feature value with a length limit of 128 bytes. + repeated string value = 1; + } + + // A list of float features. + message FloatList { + // Float feature value. + repeated float value = 1; + } + + // Categorical features that can take on one of a limited number of possible + // values. Some examples would be the brand/maker of a product, or country of + // a customer. + // + // Feature names and values must be UTF-8 encoded strings. + // + // For example: `{ "colors": {"value": ["yellow", "green"]}, + // "sizes": {"value":["S", "M"]}` + map categorical_features = 1; + + // Numerical features. Some examples would be the height/weight of a product, + // or age of a customer. + // + // Feature names must be UTF-8 encoded strings. + // + // For example: `{ "lengths_cm": {"value":[2.3, 15.4]}, + // "heights_cm": {"value":[8.1, 6.4]} }` + map numerical_features = 2; +} diff --git a/google/cloud/recommendationengine/v1beta1/import.proto b/google/cloud/recommendationengine/v1beta1/import.proto new file mode 100644 index 000000000..fc288c36a --- /dev/null +++ b/google/cloud/recommendationengine/v1beta1/import.proto @@ -0,0 +1,198 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.recommendationengine.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/recommendationengine/v1beta1/catalog.proto"; +import "google/cloud/recommendationengine/v1beta1/user_event.proto"; +import "google/cloud/recommendationengine/v1beta1/recommendationengine_resources.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.RecommendationEngine.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/recommendationengine/v1beta1;recommendationengine"; +option java_multiple_files = true; +option java_package = "com.google.cloud.recommendationengine.v1beta1"; +option objc_class_prefix = "RECAI"; +option php_namespace = "Google\\Cloud\\RecommendationEngine\\V1beta1"; +option ruby_package = "Google::Cloud::RecommendationEngine::V1beta1"; + +// Google Cloud Storage location for input content. +// format. +message GcsSource { + // Required. Google Cloud Storage URIs to input files. URI can be up to + // 2000 characters long. URIs can match the full object path (for example, + // gs://bucket/directory/object.json) or a pattern matching one or more + // files, such as gs://bucket/directory/*.json. A request can + // contain at most 100 files, and each file can be up to 2 GB. See + // [Importing catalog information](/recommendations-ai/docs/upload-catalog) + // for the expected file format and setup instructions. + repeated string input_uris = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The inline source for the input config for ImportCatalogItems method. +message CatalogInlineSource { + // Optional. A list of catalog items to update/create. Recommended max of 10k + // items. + repeated CatalogItem catalog_items = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The inline source for the input config for ImportUserEvents method. +message UserEventInlineSource { + // Optional. A list of user events to import. Recommended max of 10k items. + repeated UserEvent user_events = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration of destination for Import related errors. +message ImportErrorsConfig { + // Required. Errors destination. + oneof destination { + // Google Cloud Storage path for import errors. This must be an empty, + // existing Cloud Storage bucket. Import errors will be written to a file in + // this bucket, one per line, as a JSON-encoded + // `google.rpc.Status` message. + string gcs_prefix = 1; + } +} + +// Request message for Import methods. +message ImportCatalogItemsRequest { + // Required. "projects/1234/locations/global/catalogs/default_catalog" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/Catalog" + } + ]; + + // Optional. Unique identifier provided by client, within the ancestor + // dataset scope. Ensures idempotency and used for request deduplication. + // Server-generated if unspecified. Up to 128 characters long. This is + // returned as google.longrunning.Operation.name in the response. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The desired input location of the data. + InputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The desired location of errors incurred during the Import. + ImportErrorsConfig errors_config = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for the ImportUserEvents request. +message ImportUserEventsRequest { + // Required. + // "projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/EventStore" + } + ]; + + // Optional. Unique identifier provided by client, within the ancestor + // dataset scope. Ensures idempotency for expensive long running operations. + // Server-generated if unspecified. Up to 128 characters long. This is + // returned as google.longrunning.Operation.name in the response. Note that + // this field must not be set if the desired input config is + // catalog_inline_source. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The desired input location of the data. + InputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The desired location of errors incurred during the Import. + ImportErrorsConfig errors_config = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The input config source. +message InputConfig { + // Required. The source of the input. + oneof source { + // The Inline source for the input content for Catalog items. + CatalogInlineSource catalog_inline_source = 1; + + // Google Cloud Storage location for the input content. + GcsSource gcs_source = 2; + + // The Inline source for the input content for UserEvents. + UserEventInlineSource user_event_inline_source = 3; + } +} + +// Metadata related to the progress of the Import operation. This will be +// returned by the google.longrunning.Operation.metadata field. +message ImportMetadata { + // Name of the operation. + string operation_name = 5; + + // Id of the request / operation. This is parroting back the requestId that + // was passed in the request. + string request_id = 3; + + // Operation create time. + google.protobuf.Timestamp create_time = 4; + + // Count of entries that were processed successfully. + int64 success_count = 1; + + // Count of entries that encountered errors while processing. + int64 failure_count = 2; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 6; +} + +// Response of the ImportCatalogItemsRequest. If the long running +// operation is done, then this message is returned by the +// google.longrunning.Operations.response field if the operation was successful. +message ImportCatalogItemsResponse { + // A sample of errors encountered while processing the request. + repeated google.rpc.Status error_samples = 1; + + // Echoes the destination for the complete errors in the request if set. + ImportErrorsConfig errors_config = 2; +} + +// Response of the ImportUserEventsRequest. If the long running +// operation was successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was successful. +message ImportUserEventsResponse { + // A sample of errors encountered while processing the request. + repeated google.rpc.Status error_samples = 1; + + // Echoes the destination for the complete errors if this field was set in + // the request. + ImportErrorsConfig errors_config = 2; + + // Aggregated statistics of user event import status. + UserEventImportSummary import_summary = 3; +} + +// A summary of import result. The UserEventImportSummary summarizes +// the import status for user events. +message UserEventImportSummary { + // Count of user events imported with complete existing catalog information. + int64 joined_events_count = 1; + + // Count of user events imported, but with catalog information not found + // in the imported catalog. + int64 unjoined_events_count = 2; +} diff --git a/google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service.proto b/google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service.proto new file mode 100644 index 000000000..2dbc98e64 --- /dev/null +++ b/google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service.proto @@ -0,0 +1,138 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.recommendationengine.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/api/client.proto"; +import "google/cloud/recommendationengine/v1beta1/recommendationengine_resources.proto"; + +option csharp_namespace = "Google.Cloud.RecommendationEngine.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/recommendationengine/v1beta1;recommendationengine"; +option java_multiple_files = true; +option java_package = "com.google.cloud.recommendationengine.v1beta1"; +option objc_class_prefix = "RECAI"; +option php_namespace = "Google\\Cloud\\RecommendationEngine\\V1beta1"; +option ruby_package = "Google::Cloud::RecommendationEngine::V1beta1"; + +// Service for registering API keys for use with the `predict` method. If you +// use an API key to request predictions, you must first register the API key. +// Otherwise, your prediction request is rejected. If you use OAuth to +// authenticate your `predict` method call, you do not need to register an API +// key. You can register up to 20 API keys per project. +service PredictionApiKeyRegistry { + option (google.api.default_host) = "recommendationengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Register an API key for use with predict method. + rpc CreatePredictionApiKeyRegistration( + CreatePredictionApiKeyRegistrationRequest) + returns (PredictionApiKeyRegistration) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/catalogs/*/eventStores/*}/predictionApiKeyRegistrations" + body: "*" + }; + option (google.api.method_signature) = + "parent,prediction_api_key_registration"; + } + + // List the registered apiKeys for use with predict method. + rpc ListPredictionApiKeyRegistrations( + ListPredictionApiKeyRegistrationsRequest) + returns (ListPredictionApiKeyRegistrationsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/catalogs/*/eventStores/*}/predictionApiKeyRegistrations" + }; + option (google.api.method_signature) = "parent"; + } + + // Unregister an apiKey from using for predict method. + rpc DeletePredictionApiKeyRegistration( + DeletePredictionApiKeyRegistrationRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/catalogs/*/eventStores/*/predictionApiKeyRegistrations/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Registered Api Key. +message PredictionApiKeyRegistration { + // The API key. + string api_key = 1; +} + +// Request message for the `CreatePredictionApiKeyRegistration` method. +message CreatePredictionApiKeyRegistrationRequest { + // Required. The parent resource path. + // "projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/EventStore" + } + ]; + + // Required. The prediction API key registration. + PredictionApiKeyRegistration prediction_api_key_registration = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for the `ListPredictionApiKeyRegistrations`. +message ListPredictionApiKeyRegistrationsRequest { + // Required. The parent placement resource name such as + // "projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/EventStore" + } + ]; + + // Optional. Maximum number of results to return per page. If unset, the + // service will choose a reasonable default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The previous `ListPredictionApiKeyRegistration.nextPageToken`. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for the `ListPredictionApiKeyRegistrations`. +message ListPredictionApiKeyRegistrationsResponse { + // The list of registered API keys. + repeated PredictionApiKeyRegistration prediction_api_key_registrations = 1; + + // If empty, the list is complete. If nonempty, pass the token to the next + // request's `ListPredictionApiKeysRegistrationsRequest.pageToken`. + string next_page_token = 2; +} + +// Request message for `DeletePredictionApiKeyRegistration` method. +message DeletePredictionApiKeyRegistrationRequest { + // Required. The API key to unregister including full resource path. + // "projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/PredictionApiKeyRegistration" + } + ]; +} diff --git a/google/cloud/recommendationengine/v1beta1/prediction_service.proto b/google/cloud/recommendationengine/v1beta1/prediction_service.proto new file mode 100644 index 000000000..1f5e77f4d --- /dev/null +++ b/google/cloud/recommendationengine/v1beta1/prediction_service.proto @@ -0,0 +1,198 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.recommendationengine.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/recommendationengine/v1beta1/user_event.proto"; +import "google/protobuf/struct.proto"; +import "google/api/client.proto"; + +option csharp_namespace = "Google.Cloud.RecommendationEngine.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/recommendationengine/v1beta1;recommendationengine"; +option java_multiple_files = true; +option java_package = "com.google.cloud.recommendationengine.v1beta1"; +option objc_class_prefix = "RECAI"; +option php_namespace = "Google\\Cloud\\RecommendationEngine\\V1beta1"; +option ruby_package = "Google::Cloud::RecommendationEngine::V1beta1"; + +// Service for making recommendation prediction. +service PredictionService { + option (google.api.default_host) = "recommendationengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Makes a recommendation prediction. If using API Key based authentication, + // the API Key must be registered using the + // [PredictionApiKeyRegistry][google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry] + // service. [Learn more](/recommendations-ai/docs/setting-up#register-key). + rpc Predict(PredictRequest) returns (PredictResponse) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/catalogs/*/eventStores/*/placements/*}:predict" + body: "*" + }; + option (google.api.method_signature) = "name,user_event"; + } +} + +// Request message for Predict method. +message PredictRequest { + // Required. Full resource name of the format: + // {name=projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/placements/*} + // The id of the recommendation engine placement. This id is used to identify + // the set of models that will be used to make the prediction. + // + // We currently support three placements with the following IDs by default: + // + // * `shopping_cart`: Predicts items frequently bought together with one or + // more catalog items in the same shopping session. Commonly displayed after + // `add-to-cart` events, on product detail pages, or on the shopping cart + // page. + // + // * `home_page`: Predicts the next product that a user will most likely + // engage with or purchase based on the shopping or viewing history of the + // specified `userId` or `visitorId`. For example - Recommendations for you. + // + // * `product_detail`: Predicts the next product that a user will most likely + // engage with or purchase. The prediction is based on the shopping or + // viewing history of the specified `userId` or `visitorId` and its + // relevance to a specified `CatalogItem`. Typically used on product detail + // pages. For example - More items like this. + // + // * `recently_viewed_default`: Returns up to 75 items recently viewed by the + // specified `userId` or `visitorId`, most recent ones first. Returns + // nothing if neither of them has viewed any items yet. For example - + // Recently viewed. + // + // The full list of available placements can be seen at + // https://console.cloud.google.com/recommendation/datafeeds/default_catalog/dashboard + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/Placement" + } + ]; + + // Required. Context about the user, what they are looking at and what action + // they took to trigger the predict request. Note that this user event detail + // won't be ingested to userEvent logs. Thus, a separate userEvent write + // request is required for event logging. + UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Maximum number of results to return per page. Set this property + // to the number of prediction results required. If zero, the service will + // choose a reasonable default. + int32 page_size = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The previous PredictResponse.next_page_token. + string page_token = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for restricting prediction results. Accepts values for + // tags and the `filterOutOfStockItems` flag. + // + // * Tag expressions. Restricts predictions to items that match all of the + // specified tags. Boolean operators `OR` and `NOT` are supported if the + // expression is enclosed in parentheses, and must be separated from the + // tag values by a space. `-"tagA"` is also supported and is equivalent to + // `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings + // with a size limit of 1 KiB. + // + // * filterOutOfStockItems. Restricts predictions to items that do not have a + // stockState value of OUT_OF_STOCK. + // + // Examples: + // + // * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional") + // * filterOutOfStockItems tag=(-"promotional") + // * filterOutOfStockItems + string filter = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Use dryRun mode for this prediction query. If set to true, a + // dummy model will be used that returns arbitrary catalog items. + // Note that the dryRun mode should only be used for testing the API, or if + // the model is not ready. + bool dry_run = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional domain specific parameters for the predictions. + // + // Allowed values: + // + // * `returnCatalogItem`: Boolean. If set to true, the associated catalogItem + // object will be returned in the + // `PredictResponse.PredictionResult.itemMetadata` object in the method + // response. + // * `returnItemScore`: Boolean. If set to true, the prediction 'score' + // corresponding to each returned item will be set in the `metadata` + // field in the prediction response. The given 'score' indicates the + // probability of an item being clicked/purchased given the user's context + // and history. + map params = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The labels for the predict request. + // + // * Label keys can contain lowercase letters, digits and hyphens, must start + // with a letter, and must end with a letter or digit. + // * Non-zero label values can contain lowercase letters, digits and hyphens, + // must start with a letter, and must end with a letter or digit. + // * No more than 64 labels can be associated with a given request. + // + // See https://goo.gl/xmQnxf for more information on and examples of labels. + map labels = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for predict method. +message PredictResponse { + // PredictionResult represents the recommendation prediction results. + message PredictionResult { + // ID of the recommended catalog item + string id = 1; + + // Additional item metadata / annotations. + // + // Possible values: + // + // * `catalogItem`: JSON representation of the catalogItem. Will be set if + // `returnCatalogItem` is set to true in `PredictRequest.params`. + // * `score`: Prediction score in double value. Will be set if + // `returnItemScore` is set to true in `PredictRequest.params`. + map item_metadata = 2; + } + + // A list of recommended items. The order represents the ranking (from the + // most relevant item to the least). + repeated PredictionResult results = 1; + + // A unique recommendation token. This should be included in the user event + // logs resulting from this recommendation, which enables accurate attribution + // of recommendation model performance. + string recommendation_token = 2; + + // IDs of items in the request that were missing from the catalog. + repeated string items_missing_in_catalog = 3; + + // True if the dryRun property was set in the request. + bool dry_run = 4; + + // Additional domain specific prediction response metadata. + map metadata = 5; + + // If empty, the list is complete. If nonempty, the token to pass to the next + // request's PredictRequest.page_token. + string next_page_token = 6; +} diff --git a/google/devtools/resultstore/v2/resultstore_gapic.yaml b/google/cloud/recommendationengine/v1beta1/recommendationengine_gapic.legacy.yaml similarity index 60% rename from google/devtools/resultstore/v2/resultstore_gapic.yaml rename to google/cloud/recommendationengine/v1beta1/recommendationengine_gapic.legacy.yaml index fadd4131e..90910159f 100644 --- a/google/devtools/resultstore/v2/resultstore_gapic.yaml +++ b/google/cloud/recommendationengine/v1beta1/recommendationengine_gapic.legacy.yaml @@ -3,23 +3,23 @@ config_schema_version: 1.0.0 # The settings of generated code in a specific language. language_settings: java: - package_name: com.google.cloud.devtools.resultstore.v2 + package_name: com.google.cloud.recommendationengine.v1beta1 python: - package_name: google.cloud.devtools.resultstore_v2.gapic + package_name: google.cloud.recommendationengine_v1beta1.gapic go: - package_name: cloud.google.com/go/devtools/resultstore/apiv2 + package_name: cloud.google.com/go/recommendationengine/apiv1beta1 csharp: - package_name: Google.Devtools.Resultstore.V2 + package_name: Google.Cloud.Recommendationengine.V1beta1 ruby: - package_name: Google::Cloud::Devtools::Resultstore::V2 + package_name: Google::Cloud::Recommendationengine::V1beta1 php: - package_name: Google\Cloud\Devtools\Resultstore\V2 + package_name: Google\Cloud\Recommendationengine\V1beta1 nodejs: - package_name: resultstore.v2 + package_name: recommendationengine.v1beta1 # A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. -- name: google.devtools.resultstore.v2.ResultStoreDownload +# The fully qualified name of the API interface. +- name: google.cloud.recommendationengine.v1beta1.CatalogService # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. # The name_pattern is a pattern to describe the names of the resources of this @@ -31,24 +31,16 @@ interfaces: # The entity_name is the name to be used as a basis for generated methods and # classes. collections: - - name_pattern: invocations/{invocation} - entity_name: invocation - - name_pattern: invocations/{invocation}/configs/{config} - entity_name: config - - name_pattern: invocations/{invocation}/fileSets/{file_set} - entity_name: file_set - - name_pattern: invocations/{invocation}/targets/{target} - entity_name: target - - name_pattern: invocations/{invocation}/targets/{target}/configuredTargets/{configured_target} - entity_name: configured_target - - name_pattern: invocations/{invocation}/targets/{target}/configuredTargets/{configured_target}/actions/{action} - entity_name: action + - name_pattern: projects/{project}/locations/{location}/catalogs/{catalog} + entity_name: catalog + - name_pattern: projects/{project}/locations/{location}/catalogs/{catalog}/catalogItems/{catalog_item_path=**} + entity_name: catalog_item_path # Definition for retryable codes. retry_codes_def: - name: idempotent retry_codes: - - UNAVAILABLE - DEADLINE_EXCEEDED + - UNAVAILABLE - name: non_idempotent retry_codes: [] # Definition for retry/backoff parameters. @@ -77,15 +69,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a paging # list RPC into a stream of resources. @@ -116,38 +99,21 @@ interfaces: # timeout_millis - Specifies the default timeout for a non-retrying call. If # the call is retrying, refer to retry_params_name instead. methods: - - name: GetInvocation + - name: CreateCatalogItem flattening: groups: - parameters: - - name + - parent + - catalog_item required_fields: - - name - retry_codes_name: idempotent + - parent + - catalog_item + retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: - name: invocation + parent: catalog timeout_millis: 60000 - - name: SearchInvocations - flattening: - groups: - - parameters: - - query - - project_id - required_fields: - - query - - project_id - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: invocations - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - - name: GetConfiguration + - name: GetCatalogItem flattening: groups: - parameters: @@ -157,13 +123,14 @@ interfaces: retry_codes_name: idempotent retry_params_name: default field_name_patterns: - name: config + name: catalog_item_path timeout_millis: 60000 - - name: ListConfigurations + - name: ListCatalogItems flattening: groups: - parameters: - parent + - filter required_fields: - parent page_streaming: @@ -172,44 +139,27 @@ interfaces: token_field: page_token response: token_field: next_page_token - resources_field: configurations + resources_field: catalog_items retry_codes_name: idempotent retry_params_name: default field_name_patterns: - parent: invocation - timeout_millis: 60000 - - name: GetTarget + parent: catalog + timeout_millis: 300000 + - name: UpdateCatalogItem flattening: groups: - parameters: - name + - catalog_item required_fields: - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: target - timeout_millis: 60000 - - name: ListTargets - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: targets - retry_codes_name: idempotent + - catalog_item + retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: - parent: invocation + name: catalog_item_path timeout_millis: 60000 - - name: GetConfiguredTarget + - name: DeleteCatalogItem flattening: groups: - parameters: @@ -219,40 +169,127 @@ interfaces: retry_codes_name: idempotent retry_params_name: default field_name_patterns: - name: configured_target + name: catalog_item_path timeout_millis: 60000 - - name: ListConfiguredTargets + - name: ImportCatalogItems flattening: groups: - parameters: - parent + - request_id + - input_config + - errors_config required_fields: - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: configured_targets - retry_codes_name: idempotent + - input_config + retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: - parent: target - timeout_millis: 60000 - - name: GetAction + parent: catalog + long_running: + return_type: google.cloud.recommendationengine.v1beta1.ImportCatalogItemsResponse + metadata_type: google.cloud.recommendationengine.v1beta1.ImportMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 300000 +# The fully qualified name of the API interface. +- name: google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location}/catalogs/{catalog}/eventStores/{event_store} + entity_name: event_store + - name_pattern: projects/{project}/locations/{location}/catalogs/{catalog}/eventStores/{event_store}/predictionApiKeyRegistrations/{prediction_api_key_registration} + entity_name: prediction_api_key_registration + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreatePredictionApiKeyRegistration flattening: groups: - parameters: - - name + - parent + - prediction_api_key_registration required_fields: - - name - retry_codes_name: idempotent + - parent + - prediction_api_key_registration + retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: - name: action + parent: event_store timeout_millis: 60000 - - name: ListActions + - name: ListPredictionApiKeyRegistrations flattening: groups: - parameters: @@ -265,13 +302,13 @@ interfaces: token_field: page_token response: token_field: next_page_token - resources_field: actions + resources_field: prediction_api_key_registrations retry_codes_name: idempotent retry_params_name: default field_name_patterns: - parent: configured_target + parent: event_store timeout_millis: 60000 - - name: GetFileSet + - name: DeletePredictionApiKeyRegistration flattening: groups: - parameters: @@ -281,29 +318,10 @@ interfaces: retry_codes_name: idempotent retry_params_name: default field_name_patterns: - name: file_set + name: prediction_api_key_registration timeout_millis: 60000 - - name: ListFileSets - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: file_sets - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: invocation - timeout_millis: 60000 - # The fully qualified name of the API interface. -- name: google.devtools.resultstore.v2.ResultStoreFileDownload +# The fully qualified name of the API interface. +- name: google.cloud.recommendationengine.v1beta1.PredictionService # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. # The name_pattern is a pattern to describe the names of the resources of this @@ -315,16 +333,14 @@ interfaces: # The entity_name is the name to be used as a basis for generated methods and # classes. collections: - - name_pattern: file/tail/{tail} - entity_name: tail - - name_pattern: file/{file} - entity_name: file + - name_pattern: projects/{project}/locations/{location}/catalogs/{catalog}/eventStores/{event_store}/placements/{placement} + entity_name: placement # Definition for retryable codes. retry_codes_def: - name: idempotent retry_codes: - - UNAVAILABLE - DEADLINE_EXCEEDED + - UNAVAILABLE - name: non_idempotent retry_codes: [] # Definition for retry/backoff parameters. @@ -353,15 +369,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a paging # list RPC into a stream of resources. @@ -392,36 +399,24 @@ interfaces: # timeout_millis - Specifies the default timeout for a non-retrying call. If # the call is retrying, refer to retry_params_name instead. methods: - - name: GetFile - flattening: - groups: - - parameters: - - uri - - read_offset - - read_limit + - name: Predict required_fields: - - uri - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - uri: file - timeout_millis: 60000 - - name: GetFileTail - flattening: - groups: - - parameters: - - uri - - read_offset - - read_limit - required_fields: - - uri - retry_codes_name: idempotent + - name + - user_event + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: results + retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: - uri: tail + name: placement timeout_millis: 60000 # The fully qualified name of the API interface. -- name: google.devtools.resultstore.v2.ResultStoreUpload +- name: google.cloud.recommendationengine.v1beta1.UserEventService # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. # The name_pattern is a pattern to describe the names of the resources of this @@ -433,18 +428,8 @@ interfaces: # The entity_name is the name to be used as a basis for generated methods and # classes. collections: - - name_pattern: invocations/{invocation} - entity_name: invocation - - name_pattern: invocations/{invocation}/configs/{config} - entity_name: config - - name_pattern: invocations/{invocation}/fileSets/{file_set} - entity_name: file_set - - name_pattern: invocations/{invocation}/targets/{target} - entity_name: target - - name_pattern: invocations/{invocation}/targets/{target}/configuredTargets/{configured_target} - entity_name: configured_target - - name_pattern: invocations/{invocation}/targets/{target}/configuredTargets/{configured_target}/actions/{action} - entity_name: action + - name_pattern: projects/{project}/locations/{location}/catalogs/{catalog}/eventStores/{event_store} + entity_name: event_store # Definition for retryable codes. retry_codes_def: - name: idempotent @@ -479,15 +464,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a paging # list RPC into a stream of resources. @@ -518,204 +494,98 @@ interfaces: # timeout_millis - Specifies the default timeout for a non-retrying call. If # the call is retrying, refer to retry_params_name instead. methods: - - name: CreateInvocation - required_fields: - - request_id - - invocation - - authorization_token - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: UpdateInvocation - flattening: - groups: - - parameters: - - update_mask - - authorization_token - required_fields: - - invocation - - update_mask - - authorization_token - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - invocation.name: invocation - timeout_millis: 60000 - - name: FinishInvocation + - name: WriteUserEvent flattening: groups: - parameters: - - name - - authorization_token - required_fields: - - name - - authorization_token - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: invocation - timeout_millis: 60000 - - name: CreateTarget + - parent + - user_event required_fields: - - request_id - parent - - target_id - - target - - authorization_token + - user_event retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: - parent: invocation - timeout_millis: 60000 - - name: UpdateTarget - flattening: - groups: - - parameters: - - update_mask - - authorization_token - required_fields: - - target - - update_mask - - authorization_token - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - target.name: target + parent: event_store timeout_millis: 60000 - - name: FinishTarget + - name: CollectUserEvent flattening: groups: - parameters: - - name - - authorization_token - required_fields: - - name - - authorization_token - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: target - timeout_millis: 60000 - - name: CreateConfiguredTarget + - parent + - user_event + - uri + - ets required_fields: - - request_id - parent - - config_id - - configured_target - - authorization_token - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: target - timeout_millis: 60000 - - name: UpdateConfiguredTarget - flattening: - groups: - - parameters: - - update_mask - - authorization_token - required_fields: - - configured_target - - update_mask - - authorization_token + - user_event retry_codes_name: idempotent retry_params_name: default field_name_patterns: - configured_target.name: configured_target + parent: event_store timeout_millis: 60000 - - name: FinishConfiguredTarget + - name: ListUserEvents flattening: groups: - parameters: - - name - - authorization_token - required_fields: - - name - - authorization_token - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: configured_target - timeout_millis: 60000 - - name: CreateAction + - parent + - filter required_fields: - - request_id - parent - - action_id - - action - - authorization_token - retry_codes_name: non_idempotent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: user_events + retry_codes_name: idempotent retry_params_name: default field_name_patterns: - parent: configured_target - timeout_millis: 60000 - - name: UpdateAction + parent: event_store + timeout_millis: 300000 + - name: PurgeUserEvents flattening: groups: - parameters: - - update_mask - - authorization_token - required_fields: - - action - - update_mask - - authorization_token - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - action.name: action - timeout_millis: 60000 - - name: CreateConfiguration + - parent + - filter + - force required_fields: - - request_id - parent - - config_id - - configuration - - authorization_token + - filter retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: - parent: invocation + parent: event_store + long_running: + return_type: google.cloud.recommendationengine.v1beta1.PurgeUserEventsResponse + metadata_type: google.cloud.recommendationengine.v1beta1.PurgeUserEventsMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 timeout_millis: 60000 - - name: UpdateConfiguration + - name: ImportUserEvents flattening: groups: - parameters: - - update_mask - - authorization_token - required_fields: - - configuration - - update_mask - - authorization_token - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - configuration.name: config - timeout_millis: 60000 - - name: CreateFileSet + - parent + - request_id + - input_config + - errors_config required_fields: - - request_id - parent - - file_set_id - - file_set - - authorization_token + - input_config retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: - parent: invocation - timeout_millis: 60000 - - name: UpdateFileSet - flattening: - groups: - - parameters: - - update_mask - - authorization_token - required_fields: - - file_set - - update_mask - - authorization_token - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - file_set.name: file_set - timeout_millis: 60000 - + parent: event_store + long_running: + return_type: google.cloud.recommendationengine.v1beta1.ImportUserEventsResponse + metadata_type: google.cloud.recommendationengine.v1beta1.ImportMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 300000 diff --git a/google/cloud/recommendationengine/v1beta1/recommendationengine_gapic.yaml b/google/cloud/recommendationengine/v1beta1/recommendationengine_gapic.yaml new file mode 100644 index 000000000..385c7da70 --- /dev/null +++ b/google/cloud/recommendationengine/v1beta1/recommendationengine_gapic.yaml @@ -0,0 +1,53 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.recommendationengine.v1beta1 + python: + package_name: google.cloud.recommendationengine_v1beta1.gapic + go: + package_name: cloud.google.com/go/recommendationengine/apiv1beta1 + csharp: + package_name: Google.Cloud.Recommendationengine.V1beta1 + ruby: + package_name: Google::Cloud::Recommendationengine::V1beta1 + php: + package_name: Google\Cloud\Recommendationengine\V1beta1 + nodejs: + package_name: recommendationengine.v1beta1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.recommendationengine.v1beta1.CatalogService + methods: + - name: DeleteCatalogItem + retry_codes_name: idempotent + - name: ImportCatalogItems + long_running: + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + +- name: google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry + methods: + - name: DeletePredictionApiKeyRegistration + retry_codes_name: idempotent + +- name: google.cloud.recommendationengine.v1beta1.PredictionService + +- name: google.cloud.recommendationengine.v1beta1.UserEventService + methods: + - name: PurgeUserEvents + long_running: + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + - name: ImportUserEvents + long_running: + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 diff --git a/google/cloud/recommendationengine/v1beta1/recommendationengine_grpc_service_config.json b/google/cloud/recommendationengine/v1beta1/recommendationengine_grpc_service_config.json new file mode 100644 index 000000000..f3516f741 --- /dev/null +++ b/google/cloud/recommendationengine/v1beta1/recommendationengine_grpc_service_config.json @@ -0,0 +1,78 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "com.google.cloud.recommendationengine.v1beta1.CatalogService", + "method": "CreateCatalogItem" + }, + { + "service": "com.google.cloud.recommendationengine.v1beta1.CatalogService", + "method": "GetCatalogItem" + }, + { + "service": "com.google.cloud.recommendationengine.v1beta1.CatalogService", + "method": "ListCatalogItems" + }, + { + "service": "com.google.cloud.recommendationengine.v1beta1.CatalogService", + "method": "UpdateCatalogItem" + }, + { + "service": "com.google.cloud.recommendationengine.v1beta1.CatalogService", + "method": "DeleteCatalogItem" + }, + { + "service": "com.google.cloud.recommendationengine.v1beta1.CatalogService", + "method": "ImportCatalogItems" + }, + { + "service": "com.google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry", + "method": "CreatePredictionApiKeyRegistration" + }, + { + "service": "com.google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry", + "method": "ListPredictionApiKeyRegistrations" + }, + { + "service": "com.google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry", + "method": "DeletePredictionApiKeyRegistration" + }, + { + "service": "com.google.cloud.recommendationengine.v1beta1.PredictionService", + "method": "Predict" + }, + { + "service": "com.google.cloud.recommendationengine.v1beta1.UserEventService", + "method": "WriteUserEvent" + }, + { + "service": "com.google.cloud.recommendationengine.v1beta1.UserEventService", + "method": "CollectUserEvent" + }, + { + "service": "com.google.cloud.recommendationengine.v1beta1.UserEventService", + "method": "ListUserEvents" + }, + { + "service": "com.google.cloud.recommendationengine.v1beta1.UserEventService", + "method": "PurgeUserEvents" + }, + { + "service": "com.google.cloud.recommendationengine.v1beta1.UserEventService", + "method": "ImportUserEvents" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/recommendationengine/v1beta1/recommendationengine_resources.proto b/google/cloud/recommendationengine/v1beta1/recommendationengine_resources.proto new file mode 100644 index 000000000..dce1e2fa5 --- /dev/null +++ b/google/cloud/recommendationengine/v1beta1/recommendationengine_resources.proto @@ -0,0 +1,46 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Contains common resources for recommendationengine/v1beta1. + +syntax = "proto3"; + +package google.cloud.recommendationengine.v1beta1; + +import "google/api/resource.proto"; + +option (google.api.resource_definition) = { + type: "recommendationengine.googleapis.com/Catalog" + pattern: "projects/{project}/locations/{location}/catalogs/{catalog}" +}; + +option (google.api.resource_definition) = { + type: "recommendationengine.googleapis.com/CatalogItemPath" + pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/catalogItems/{catalog_item_path=**}" +}; + +option (google.api.resource_definition) = { + type: "recommendationengine.googleapis.com/EventStore" + pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/eventStores/{event_store}" +}; + +option (google.api.resource_definition) = { + type: "recommendationengine.googleapis.com/PredictionApiKeyRegistration" + pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/eventStores/{event_store}/predictionApiKeyRegistrations/{prediction_api_key_registration}" +}; + +option (google.api.resource_definition) = { + type: "recommendationengine.googleapis.com/Placement" + pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/eventStores/{event_store}/placements/{placement}" +}; diff --git a/google/cloud/recommendationengine/v1beta1/recommendationengine_v1beta1.yaml b/google/cloud/recommendationengine/v1beta1/recommendationengine_v1beta1.yaml new file mode 100644 index 000000000..cf3a27db3 --- /dev/null +++ b/google/cloud/recommendationengine/v1beta1/recommendationengine_v1beta1.yaml @@ -0,0 +1,69 @@ +type: google.api.Service +config_version: 3 +name: recommendationengine.googleapis.com +title: Recommendations AI + +apis: +- name: google.cloud.recommendationengine.v1beta1.CatalogService +- name: google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry +- name: google.cloud.recommendationengine.v1beta1.PredictionService +- name: google.cloud.recommendationengine.v1beta1.UserEventService + +types: +- name: google.cloud.recommendationengine.v1beta1.ImportCatalogItemsResponse +- name: google.cloud.recommendationengine.v1beta1.ImportErrorsConfig +- name: google.cloud.recommendationengine.v1beta1.ImportMetadata +- name: google.cloud.recommendationengine.v1beta1.ImportUserEventsResponse +- name: google.cloud.recommendationengine.v1beta1.PurgeUserEventsMetadata +- name: google.cloud.recommendationengine.v1beta1.PurgeUserEventsResponse + +documentation: + summary: |- + Recommendations AI service enables customers to build end-to-end + personalized recommendation systems without requiring a high level of + expertise in machine learning, recommendation system, or Google Cloud. + +backend: + rules: + - selector: google.cloud.recommendationengine.v1beta1.CatalogService.ImportCatalogItems + deadline: 300.0 + - selector: google.cloud.recommendationengine.v1beta1.CatalogService.ListCatalogItems + deadline: 300.0 + - selector: google.cloud.recommendationengine.v1beta1.UserEventService.ImportUserEvents + deadline: 300.0 + - selector: google.cloud.recommendationengine.v1beta1.UserEventService.ListUserEvents + deadline: 300.0 + +http: + rules: + - selector: google.longrunning.Operations.GetOperation + get: '/v1beta1/{name=projects/*/locations/*/catalogs/*/operations/*}' + additional_bindings: + - get: '/v1beta1/{name=projects/*/locations/*/catalogs/*/eventStores/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1beta1/{name=projects/*/locations/*/catalogs/*}/operations' + additional_bindings: + - get: '/v1beta1/{name=projects/*/locations/*/catalogs/*/eventStores/*}/operations' + +authentication: + rules: + - selector: 'google.cloud.recommendationengine.v1beta1.CatalogService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.recommendationengine.v1beta1.PredictionService.Predict + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.recommendationengine.v1beta1.UserEventService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/recommendationengine/v1beta1/user_event.proto b/google/cloud/recommendationengine/v1beta1/user_event.proto new file mode 100644 index 000000000..da3fc3e04 --- /dev/null +++ b/google/cloud/recommendationengine/v1beta1/user_event.proto @@ -0,0 +1,336 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.recommendationengine.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/cloud/recommendationengine/v1beta1/catalog.proto"; +import "google/cloud/recommendationengine/v1beta1/common.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.RecommendationEngine.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/recommendationengine/v1beta1;recommendationengine"; +option java_multiple_files = true; +option java_package = "com.google.cloud.recommendationengine.v1beta1"; +option objc_class_prefix = "RECAI"; +option php_namespace = "Google\\Cloud\\RecommendationEngine\\V1beta1"; +option ruby_package = "Google::Cloud::RecommendationEngine::V1beta1"; + +// UserEvent captures all metadata information recommendation engine needs to +// know about how end users interact with customers' website. +message UserEvent { + // User event source. + enum EventSource { + // Unspecified event source. + EVENT_SOURCE_UNSPECIFIED = 0; + + // The event is ingested via a javascript pixel or Recommendations AI Tag + // through automl datalayer or JS Macros. + AUTOML = 1; + + // The event is ingested via Recommendations AI Tag through Enhanced + // Ecommerce datalayer. + ECOMMERCE = 2; + + // The event is ingested via Import user events API. + BATCH_UPLOAD = 3; + } + + // Required. User event type. Allowed values are: + // + // * `add-to-cart` Products being added to cart. + // * `add-to-list` Items being added to a list (shopping list, favorites + // etc). + // * `category-page-view` Special pages such as sale or promotion pages + // viewed. + // * `checkout-start` User starting a checkout process. + // * `detail-page-view` Products detail page viewed. + // * `home-page-view` Homepage viewed. + // * `page-visit` Generic page visits not included in the event types above. + // * `purchase-complete` User finishing a purchase. + // * `refund` Purchased items being refunded or returned. + // * `remove-from-cart` Products being removed from cart. + // * `remove-from-list` Items being removed from a list. + // * `search` Product search. + // * `shopping-cart-page-view` User viewing a shopping cart. + // * `impression` List of items displayed. Used by Google Tag Manager. + string event_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. User information. + UserInfo user_info = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. User event detailed information common across different + // recommendation types. + EventDetail event_detail = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Retail product specific user event metadata. + // + // This field is required for the following event types: + // + // * `add-to-cart` + // * `add-to-list` + // * `category-page-view` + // * `checkout-start` + // * `detail-page-view` + // * `purchase-complete` + // * `refund` + // * `remove-from-cart` + // * `remove-from-list` + // * `search` + // + // This field is optional for the following event types: + // + // * `page-visit` + // * `shopping-cart-page-view` - note that 'product_event_detail' should be + // set for this unless the shopping cart is empty. + // + // This field is not allowed for the following event types: + // + // * `home-page-view` + ProductEventDetail product_event_detail = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only required for ImportUserEvents method. Timestamp of user + // event created. + google.protobuf.Timestamp event_time = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field should *not* be set when using JavaScript pixel + // or the Recommendations AI Tag. Defaults to `EVENT_SOURCE_UNSPECIFIED`. + EventSource event_source = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Information of end users. +message UserInfo { + // Required. A unique identifier for tracking visitors with a length limit of + // 128 bytes. + // + // For example, this could be implemented with a http cookie, which should be + // able to uniquely identify a visitor on a single device. This unique + // identifier should not change if the visitor log in/out of the website. + // Maximum length 128 bytes. Cannot be empty. + string visitor_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Unique identifier for logged-in user with a length limit of 128 + // bytes. Required only for logged-in users. + string user_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. IP address of the user. This could be either IPv4 (e.g. 104.133.9.80) or + // IPv6 (e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334). This should *not* be + // set when using the javascript pixel or if `direct_user_request` is set. + // Used to extract location information for personalization. + string ip_address = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User agent as included in the HTTP header. UTF-8 encoded string + // with a length limit of 1 KiB. + // + // This should *not* be set when using the JavaScript pixel or if + // `directUserRequest` is set. + string user_agent = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates if the request is made directly from the end user + // in which case the user_agent and ip_address fields can be populated + // from the HTTP request. This should *not* be set when using the javascript + // pixel. This flag should be set only if the API request is made directly + // from the end user such as a mobile app (and not if a gateway or a server is + // processing and pushing the user events). + bool direct_user_request = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// User event details shared by all recommendation types. +message EventDetail { + // Optional. Complete url (window.location.href) of the user's current page. + // When using the JavaScript pixel, this value is filled in automatically. + // Maximum length 5KB. + string uri = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The referrer url of the current page. When using + // the JavaScript pixel, this value is filled in automatically. + string referrer_uri = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A unique id of a web page view. + // This should be kept the same for all user events triggered from the same + // pageview. For example, an item detail page view could trigger multiple + // events as the user is browsing the page. + // The `pageViewId` property should be kept the same for all these events so + // that they can be grouped together properly. This `pageViewId` will be + // automatically generated if using the JavaScript pixel. + string page_view_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of identifiers for the independent experiment groups + // this user event belongs to. This is used to distinguish between user events + // associated with different experiment setups (e.g. using Recommendation + // Engine system, using different recommendation models). + repeated string experiment_ids = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Recommendation token included in the recommendation prediction + // response. + // + // This field enables accurate attribution of recommendation model + // performance. + // + // This token enables us to accurately attribute page view or purchase back to + // the event and the particular predict response containing this + // clicked/purchased item. If user clicks on product K in the recommendation + // results, pass the `PredictResponse.recommendationToken` property as a url + // parameter to product K's page. When recording events on product K's page, + // log the PredictResponse.recommendation_token to this field. + // + // Optional, but highly encouraged for user events that are the result of a + // recommendation prediction query. + string recommendation_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Extra user event features to include in the recommendation + // model. + // + // For product recommendation, an example of extra user information is + // traffic_channel, i.e. how user arrives at the site. Users can arrive + // at the site by coming to the site directly, or coming through Google + // search, and etc. + FeatureMap event_attributes = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// ProductEventDetail captures user event information specific to retail +// products. +message ProductEventDetail { + // Required for `search` events. Other event types should not set this field. + // The user's search query as UTF-8 encoded text with a length limit of 5 KiB. + string search_query = 1; + + // Required for `category-page-view` events. Other event types should not set + // this field. + // The categories associated with a category page. + // Category pages include special pages such as sales or promotions. For + // instance, a special sale page may have the category hierarchy: + // categories : ["Sales", "2017 Black Friday Deals"]. + repeated CatalogItem.CategoryHierarchy page_categories = 2; + + // The main product details related to the event. + // + // This field is required for the following event types: + // + // * `add-to-cart` + // * `add-to-list` + // * `checkout-start` + // * `detail-page-view` + // * `purchase-complete` + // * `refund` + // * `remove-from-cart` + // * `remove-from-list` + // + // This field is optional for the following event types: + // + // * `page-visit` + // * `shopping-cart-page-view` - note that 'product_details' should be set for + // this unless the shopping cart is empty. + // + // This field is not allowed for the following event types: + // + // * `category-page-view` + // * `home-page-view` + // * `search` + repeated ProductDetail product_details = 3; + + // Required for `add-to-list` and `remove-from-list` events. The id or name of + // the list that the item is being added to or removed from. Other event types + // should not set this field. + string list_id = 4; + + // Optional. The id or name of the associated shopping cart. This id is used + // to associate multiple items added or present in the cart before purchase. + // + // This can only be set for `add-to-cart`, `remove-from-cart`, + // `checkout-start`, `purchase-complete`, or `shopping-cart-page-view` events. + string cart_id = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A transaction represents the entire purchase transaction. + // Required for `purchase-complete` events. Optional for `checkout-start` + // events. Other event types should not set this field. + PurchaseTransaction purchase_transaction = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A transaction represents the entire purchase transaction. +message PurchaseTransaction { + // Optional. The transaction ID with a length limit of 128 bytes. + string id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Total revenue or grand total associated with the transaction. + // This value include shipping, tax, or other adjustments to total revenue + // that you want to include as part of your revenue calculations. This field + // is not required if the event type is `refund`. + float revenue = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. All the taxes associated with the transaction. + map taxes = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. All the costs associated with the product. These can be + // manufacturing costs, shipping expenses not borne by the end user, or any + // other costs. + // + // Total product cost such that + // profit = revenue - (sum(taxes) + sum(costs)) + // If product_cost is not set, then + // profit = revenue - tax - shipping - sum(CatalogItem.costs). + // + // If CatalogItem.cost is not specified for one of the items, CatalogItem.cost + // based profit *cannot* be calculated for this Transaction. + map costs = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Currency code. Use three-character ISO-4217 code. This field + // is not required if the event type is `refund`. + string currency_code = 6 [(google.api.field_behavior) = REQUIRED]; +} + +// Detailed product information associated with a user event. +message ProductDetail { + // Required. Catalog item ID. UTF-8 encoded string with a length limit of 128 + // characters. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Currency code for price/costs. Use three-character ISO-4217 + // code. Required only if originalPrice or displayPrice is set. + string currency_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Original price of the product. If provided, this will override + // the original price in Catalog for this product. + float original_price = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Display price of the product (e.g. discounted price). If + // provided, this will override the display price in Catalog for this product. + float display_price = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Item stock state. If provided, this overrides the stock state + // in Catalog for items in this event. + ProductCatalogItem.StockState stock_state = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Quantity of the product associated with the user event. For + // example, this field will be 2 if two products are added to the shopping + // cart for `add-to-cart` event. Required for `add-to-cart`, `add-to-list`, + // `remove-from-cart`, `checkout-start`, `purchase-complete`, `refund` event + // types. + int32 quantity = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Quantity of the products in stock when a user event happens. + // Optional. If provided, this overrides the available quantity in Catalog for + // this event. and can only be set if `stock_status` is set to `IN_STOCK`. + // + // Note that if an item is out of stock, you must set the `stock_state` field + // to be `OUT_OF_STOCK`. Leaving this field unspecified / as zero is not + // sufficient to mark the item out of stock. + int32 available_quantity = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Extra features associated with a product in the user event. + FeatureMap item_attributes = 8 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/google/cloud/recommendationengine/v1beta1/user_event_service.proto b/google/cloud/recommendationengine/v1beta1/user_event_service.proto new file mode 100644 index 000000000..8ea6f551d --- /dev/null +++ b/google/cloud/recommendationengine/v1beta1/user_event_service.proto @@ -0,0 +1,274 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.recommendationengine.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/httpbody.proto"; +import "google/api/resource.proto"; +import "google/cloud/recommendationengine/v1beta1/import.proto"; +import "google/cloud/recommendationengine/v1beta1/user_event.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/date.proto"; +import "google/api/client.proto"; + +option csharp_namespace = "Google.Cloud.RecommendationEngine.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/recommendationengine/v1beta1;recommendationengine"; +option java_multiple_files = true; +option java_package = "com.google.cloud.recommendationengine.v1beta1"; +option objc_class_prefix = "RECAI"; +option php_namespace = "Google\\Cloud\\RecommendationEngine\\V1beta1"; +option ruby_package = "Google::Cloud::RecommendationEngine::V1beta1"; + +// Service for ingesting end user actions on the customer website. +service UserEventService { + option (google.api.default_host) = "recommendationengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Writes a single user event. + rpc WriteUserEvent(WriteUserEventRequest) returns (UserEvent) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/catalogs/*/eventStores/*}/userEvents:write" + body: "user_event" + }; + option (google.api.method_signature) = "parent,user_event"; + } + + // Writes a single user event from the browser. This uses a GET request to + // due to browser restriction of POST-ing to a 3rd party domain. + // + // This method is used only by the Recommendations AI JavaScript pixel. + // Users should not call this method directly. + rpc CollectUserEvent(CollectUserEventRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/catalogs/*/eventStores/*}/userEvents:collect" + }; + option (google.api.method_signature) = "parent,user_event,uri,ets"; + } + + // Gets a list of user events within a time range, with potential filtering. + rpc ListUserEvents(ListUserEventsRequest) returns (ListUserEventsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/catalogs/*/eventStores/*}/userEvents" + }; + option (google.api.method_signature) = "parent,filter"; + } + + // Deletes permanently all user events specified by the filter provided. + // Depending on the number of events specified by the filter, this operation + // could take hours or days to complete. To test a filter, use the list + // command first. + rpc PurgeUserEvents(PurgeUserEventsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/catalogs/*/eventStores/*}/userEvents:purge" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.recommendationengine.v1beta1.PurgeUserEventsResponse" + metadata_type: "google.cloud.recommendationengine.v1beta1.PurgeUserEventsMetadata" + }; + option (google.api.method_signature) = "parent,filter,force"; + } + + // Bulk import of User events. Request processing might be + // synchronous. Events that already exist are skipped. + // Use this method for backfilling historical user events. + // + // Operation.response is of type ImportResponse. Note that it is + // possible for a subset of the items to be successfully inserted. + // Operation.metadata is of type ImportMetadata. + rpc ImportUserEvents(ImportUserEventsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/catalogs/*/eventStores/*}/userEvents:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.recommendationengine.v1beta1.ImportUserEventsResponse" + metadata_type: "google.cloud.recommendationengine.v1beta1.ImportMetadata" + }; + option (google.api.method_signature) = + "parent,request_id,input_config,errors_config"; + } +} + +// Request message for PurgeUserEvents method. +message PurgeUserEventsRequest { + // Required. The resource name of the event_store under which the events are + // created. The format is + // "projects/${projectId}/locations/global/catalogs/${catalogId}/eventStores/${eventStoreId}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/EventStore" + } + ]; + + // Required. The filter string to specify the events to be deleted. Empty + // string filter is not allowed. This filter can also be used with + // ListUserEvents API to list events that will be deleted. The eligible fields + // for filtering are: + // * eventType - UserEvent.eventType field of type string. + // * eventTime - in ISO 8601 "zulu" format. + // * visitorId - field of type string. Specifying this will delete all events + // associated with a visitor. + // * userId - field of type string. Specifying this will delete all events + // associated with a user. + // Example 1: Deleting all events in a time range. + // `eventTime > "2012-04-23T18:25:43.511Z" eventTime < + // "2012-04-23T18:30:43.511Z"` + // Example 2: Deleting specific eventType in time range. + // `eventTime > "2012-04-23T18:25:43.511Z" eventType = "detail-page-view"` + // Example 3: Deleting all events for a specific visitor + // `visitorId = visitor1024` + // The filtering fields are assumed to have an implicit AND. + string filter = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The default value is false. Override this flag to true to + // actually perform the purge. If the field is not set to true, a sampling of + // events to be deleted will be returned. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata related to the progress of the PurgeUserEvents operation. +// This will be returned by the google.longrunning.Operation.metadata field. +message PurgeUserEventsMetadata { + // The ID of the request / operation. + string operation_name = 1; + + // Operation create time. + google.protobuf.Timestamp create_time = 2; +} + +// Response of the PurgeUserEventsRequest. If the long running operation is +// successfully done, then this message is returned by the +// google.longrunning.Operations.response field. +message PurgeUserEventsResponse { + // The total count of events purged as a result of the operation. + int64 purged_events_count = 1; + + // A sampling of events deleted (or will be deleted) depending on the `force` + // property in the request. Max of 500 items will be returned. + repeated UserEvent user_events_sample = 2; +} + +// Request message for WriteUserEvent method. +message WriteUserEventRequest { + // Required. The parent eventStore resource name, such as + // "projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/EventStore" + } + ]; + + // Required. User event to write. + UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for CollectUserEvent method. +message CollectUserEventRequest { + // Required. The parent eventStore name, such as + // "projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/EventStore" + } + ]; + + // Required. URL encoded UserEvent proto. + string user_event = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The url including cgi-parameters but excluding the hash fragment. + // The URL must be truncated to 1.5K bytes to conservatively be under the 2K + // bytes. This is often more useful than the referer url, because many + // browsers only send the domain for 3rd party requests. + string uri = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The event timestamp in milliseconds. This prevents browser + // caching of otherwise identical get requests. The name is abbreviated to + // reduce the payload bytes. + int64 ets = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for ListUserEvents method. +message ListUserEventsRequest { + // Required. The parent eventStore resource name, such as + // "projects/*/locations/*/catalogs/default_catalog/eventStores/default_event_store". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommendationengine.googleapis.com/EventStore" + } + ]; + + // Optional. Maximum number of results to return per page. If zero, the + // service will choose a reasonable default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The previous ListUserEventsResponse.next_page_token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering expression to specify restrictions over + // returned events. This is a sequence of terms, where each term applies some + // kind of a restriction to the returned user events. Use this expression to + // restrict results to a specific time range, or filter events by eventType. + // eg: eventTime > "2012-04-23T18:25:43.511Z" eventsMissingCatalogItems + // eventTime<"2012-04-23T18:25:43.511Z" eventType=search + // + // We expect only 3 types of fields: + // + // * eventTime: this can be specified a maximum of 2 times, once with a + // less than operator and once with a greater than operator. The + // eventTime restrict should result in one contiguous valid eventTime + // range. + // + // * eventType: only 1 eventType restriction can be specified. + // + // * eventsMissingCatalogItems: specififying this will restrict results + // to events for which catalog items were not found in the catalog. The + // default behavior is to return only those events for which catalog + // items were found. + // + // Some examples of valid filters expressions: + // + // * Example 1: eventTime > "2012-04-23T18:25:43.511Z" + // eventTime < "2012-04-23T18:30:43.511Z" + // * Example 2: eventTime > "2012-04-23T18:25:43.511Z" + // eventType = detail-page-view + // * Example 3: eventsMissingCatalogItems + // eventType = search eventTime < "2018-04-23T18:30:43.511Z" + // * Example 4: eventTime > "2012-04-23T18:25:43.511Z" + // * Example 5: eventType = search + // * Example 6: eventsMissingCatalogItems + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListUserEvents method. +message ListUserEventsResponse { + // The user events. + repeated UserEvent user_events = 1; + + // If empty, the list is complete. If nonempty, the token to pass to the next + // request's ListUserEvents.page_token. + string next_page_token = 2; +} diff --git a/google/cloud/recommender/BUILD.bazel b/google/cloud/recommender/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/cloud/recommender/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/recommender/logging/v1/BUILD.bazel b/google/cloud/recommender/logging/v1/BUILD.bazel new file mode 100644 index 000000000..901386cd6 --- /dev/null +++ b/google/cloud/recommender/logging/v1/BUILD.bazel @@ -0,0 +1,162 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "logging_proto", + srcs = [ + "action_log.proto", + ], + deps = [ + "//google/cloud/recommender/v1:recommender_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "logging_java_proto", + deps = [":logging_proto"], +) + +java_grpc_library( + name = "logging_java_grpc", + srcs = [":logging_proto"], + deps = [":logging_java_proto"], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", +) + +go_proto_library( + name = "logging_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/recommender/logging/v1", + protos = [":logging_proto"], + deps = [ + "//google/cloud/recommender/v1:recommender_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "logging_moved_proto", + srcs = [":logging_proto"], + deps = [ + "//google/cloud/recommender/v1:recommender_proto", + ], +) + +py_proto_library( + name = "logging_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":logging_moved_proto"], +) + +py_grpc_library( + name = "logging_py_grpc", + srcs = [":logging_moved_proto"], + deps = [":logging_py_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "logging_php_proto", + deps = [":logging_proto"], +) + +php_grpc_library( + name = "logging_php_grpc", + srcs = [":logging_proto"], + deps = [":logging_php_proto"], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "logging_ruby_proto", + deps = [":logging_proto"], +) + +ruby_grpc_library( + name = "logging_ruby_grpc", + srcs = [":logging_proto"], + deps = [":logging_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "logging_csharp_proto", + deps = [":logging_proto"], +) + +csharp_grpc_library( + name = "logging_csharp_grpc", + srcs = [":logging_proto"], + deps = [":logging_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ code here diff --git a/google/cloud/recommender/logging/v1/action_log.proto b/google/cloud/recommender/logging/v1/action_log.proto new file mode 100644 index 000000000..d9c751fc9 --- /dev/null +++ b/google/cloud/recommender/logging/v1/action_log.proto @@ -0,0 +1,41 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.recommender.logging.v1; + +import "google/cloud/recommender/v1/recommendation.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/recommender/logging/v1;logging"; +option java_multiple_files = true; +option java_outer_classname = "ActionLogProto"; +option java_package = "com.google.cloud.recommender.logging.v1"; + +// Log content of an action on a recommendation. This includes Mark* actions, as +// well as ApplyRule actions. +message ActionLog { + // Required. User that executed this action. Eg, foo@gmail.com + string actor = 1; + + // Required. Action that was taken by the actor. Eg, MarkCompleted. + google.cloud.recommender.v1.RecommendationStateInfo.State state = 2; + + // Optional. Metadata that was included with the action that was taken. + map state_metadata = 3; + + // Required. Name of the recommendation which was acted on. Eg, : + // 'projects/foo/locations/global/recommenders/roleReco/recommendations/r1' + string recommendation_name = 4; +} diff --git a/google/cloud/recommender/logging/v1/recommender.yaml b/google/cloud/recommender/logging/v1/recommender.yaml new file mode 100644 index 000000000..bf4364427 --- /dev/null +++ b/google/cloud/recommender/logging/v1/recommender.yaml @@ -0,0 +1,7 @@ +type: google.api.Service +config_version: 3 +name: recommender.googleapis.com +title: Recommender API Logging + +types: +- name: google.cloud.recommender.logging.v1.ActionLog diff --git a/google/cloud/recommender/logging/v1beta1/BUILD.bazel b/google/cloud/recommender/logging/v1beta1/BUILD.bazel new file mode 100644 index 000000000..67532523c --- /dev/null +++ b/google/cloud/recommender/logging/v1beta1/BUILD.bazel @@ -0,0 +1,165 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "logging_proto", + srcs = [ + "action_log.proto", + ], + deps = [ + "//google/api:field_behavior_proto", + "//google/cloud/recommender/v1beta1:recommender_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "logging_java_proto", + deps = [":logging_proto"], +) + +java_grpc_library( + name = "logging_java_grpc", + srcs = [":logging_proto"], + deps = [":logging_java_proto"], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", +) + +go_proto_library( + name = "logging_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/recommender/logging/v1beta1", + protos = [":logging_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/cloud/recommender/v1beta1:recommender_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "logging_moved_proto", + srcs = [":logging_proto"], + deps = [ + "//google/api:field_behavior_proto", + "//google/cloud/recommender/v1beta1:recommender_proto", + ], +) + +py_proto_library( + name = "logging_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":logging_moved_proto"], +) + +py_grpc_library( + name = "logging_py_grpc", + srcs = [":logging_moved_proto"], + deps = [":logging_py_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "logging_php_proto", + deps = [":logging_proto"], +) + +php_grpc_library( + name = "logging_php_grpc", + srcs = [":logging_proto"], + deps = [":logging_php_proto"], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "logging_ruby_proto", + deps = [":logging_proto"], +) + +ruby_grpc_library( + name = "logging_ruby_grpc", + srcs = [":logging_proto"], + deps = [":logging_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "logging_csharp_proto", + deps = [":logging_proto"], +) + +csharp_grpc_library( + name = "logging_csharp_grpc", + srcs = [":logging_proto"], + deps = [":logging_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ code here diff --git a/google/cloud/recommender/logging/v1beta1/action_log.proto b/google/cloud/recommender/logging/v1beta1/action_log.proto new file mode 100644 index 000000000..960ed33ba --- /dev/null +++ b/google/cloud/recommender/logging/v1beta1/action_log.proto @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.recommender.logging.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/cloud/recommender/v1beta1/insight.proto"; +import "google/cloud/recommender/v1beta1/recommendation.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/recommender/logging/v1beta1;logging"; +option java_multiple_files = true; +option java_outer_classname = "ActionLogProto"; +option java_package = "com.google.cloud.recommender.logging.v1beta1"; + +// Log content of an action on a recommendation. This includes Mark* actions. +message ActionLog { + // Required. User that executed this action. Eg, foo@gmail.com + string actor = 1; + + // Required. State change that was made by the actor. Eg, SUCCEEDED. + google.cloud.recommender.v1beta1.RecommendationStateInfo.State state = 2; + + // Optional. Metadata that was included with the action that was taken. + map state_metadata = 3; + + // Required. Name of the recommendation which was acted on. Eg, : + // 'projects/foo/locations/global/recommenders/roleReco/recommendations/r1' + string recommendation_name = 4; +} + +// Log content of an action on an insight. This includes Mark* actions. +message InsightActionLog { + // Required. User that executed this action. Eg, foo@gmail.com + string actor = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. State change that was made by the actor. Eg, ACCEPTED. + google.cloud.recommender.v1beta1.InsightStateInfo.State state = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Metadata that was included with the action that was taken. + map state_metadata = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Name of the insight which was acted on. Eg, : + // 'projects/foo/locations/global/insightTypes/roleInsight/insights/i1' + string insight = 4 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/google/cloud/recommender/logging/v1beta1/recommender.yaml b/google/cloud/recommender/logging/v1beta1/recommender.yaml new file mode 100644 index 000000000..f143a7bf6 --- /dev/null +++ b/google/cloud/recommender/logging/v1beta1/recommender.yaml @@ -0,0 +1,8 @@ +type: google.api.Service +config_version: 3 +name: recommender.googleapis.com +title: Recommender API Logging + +types: +- name: google.cloud.recommender.logging.v1beta1.ActionLog +- name: google.cloud.recommender.logging.v1beta1.InsightActionLog diff --git a/google/cloud/recommender/v1/BUILD.bazel b/google/cloud/recommender/v1/BUILD.bazel new file mode 100644 index 000000000..0ac31fe6f --- /dev/null +++ b/google/cloud/recommender/v1/BUILD.bazel @@ -0,0 +1,367 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "recommender_proto", + srcs = [ + "recommendation.proto", + "recommender_service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/type:money_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "recommender_proto_with_info", + deps = [ + ":recommender_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "recommender_java_proto", + deps = [":recommender_proto"], +) + +java_grpc_library( + name = "recommender_java_grpc", + srcs = [":recommender_proto"], + deps = [":recommender_java_proto"], +) + +java_gapic_library( + name = "recommender_java_gapic", + src = ":recommender_proto_with_info", + gapic_yaml = "recommender_gapic.yaml", + package = "google.cloud.recommender.v1", + service_yaml = "recommender_v1.yaml", + test_deps = [ + ":recommender_java_grpc", + ], + deps = [ + ":recommender_java_proto", + ], +) + +java_gapic_test( + name = "recommender_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.recommender.v1.RecommenderClientTest", + ], + runtime_deps = [":recommender_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-recommender-v1-java", + deps = [ + ":recommender_java_gapic", + ":recommender_java_grpc", + ":recommender_java_proto", + ":recommender_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "recommender_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/recommender/v1", + protos = [":recommender_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/type:money_go_proto", + ], +) + +go_gapic_library( + name = "recommender_go_gapic", + srcs = [":recommender_proto_with_info"], + grpc_service_config = "recommender_grpc_service_config.json", + importpath = "cloud.google.com/go/recommender/apiv1;recommender", + service_yaml = "recommender_v1.yaml", + deps = [ + ":recommender_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +go_test( + name = "recommender_go_gapic_test", + srcs = [":recommender_go_gapic_srcjar_test"], + embed = [":recommender_go_gapic"], + importpath = "cloud.google.com/go/recommender/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-recommender-v1-go", + deps = [ + ":recommender_go_gapic", + ":recommender_go_gapic_srcjar-test.srcjar", + ":recommender_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "recommender_moved_proto", + srcs = [":recommender_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/type:money_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "recommender_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":recommender_moved_proto"], +) + +py_grpc_library( + name = "recommender_py_grpc", + srcs = [":recommender_moved_proto"], + deps = [":recommender_py_proto"], +) + +py_gapic_library( + name = "recommender_py_gapic", + src = ":recommender_proto_with_info", + gapic_yaml = "recommender_gapic.yaml", + package = "google.cloud.recommender.v1", + service_yaml = "recommender_v1.yaml", + deps = [ + ":recommender_py_grpc", + ":recommender_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "recommender-v1-py", + deps = [ + ":recommender_py_gapic", + ":recommender_py_grpc", + ":recommender_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "recommender_php_proto", + deps = [":recommender_proto"], +) + +php_grpc_library( + name = "recommender_php_grpc", + srcs = [":recommender_proto"], + deps = [":recommender_php_proto"], +) + +php_gapic_library( + name = "recommender_php_gapic", + src = ":recommender_proto_with_info", + gapic_yaml = "recommender_gapic.yaml", + package = "google.cloud.recommender.v1", + service_yaml = "recommender_v1.yaml", + deps = [ + ":recommender_php_grpc", + ":recommender_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-recommender-v1-php", + deps = [ + ":recommender_php_gapic", + ":recommender_php_grpc", + ":recommender_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "recommender_nodejs_gapic", + src = ":recommender_proto_with_info", + gapic_yaml = "recommender_gapic.yaml", + package = "google.cloud.recommender.v1", + service_yaml = "recommender_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "recommender-v1-nodejs", + deps = [ + ":recommender_nodejs_gapic", + ":recommender_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "recommender_ruby_proto", + deps = [":recommender_proto"], +) + +ruby_grpc_library( + name = "recommender_ruby_grpc", + srcs = [":recommender_proto"], + deps = [":recommender_ruby_proto"], +) + +ruby_gapic_library( + name = "recommender_ruby_gapic", + src = ":recommender_proto_with_info", + gapic_yaml = "recommender_gapic.yaml", + package = "google.cloud.recommender.v1", + service_yaml = "recommender_v1.yaml", + deps = [ + ":recommender_ruby_grpc", + ":recommender_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-recommender-v1-ruby", + deps = [ + ":recommender_ruby_gapic", + ":recommender_ruby_grpc", + ":recommender_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "recommender_csharp_proto", + deps = [":recommender_proto"], +) + +csharp_grpc_library( + name = "recommender_csharp_grpc", + srcs = [":recommender_proto"], + deps = [":recommender_csharp_proto"], +) + +csharp_gapic_library( + name = "recommender_csharp_gapic", + src = ":recommender_proto_with_info", + gapic_yaml = "recommender_gapic.yaml", + package = "google.cloud.recommender.v1", + service_yaml = "recommender_v1.yaml", + deps = [ + ":recommender_csharp_grpc", + ":recommender_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-recommender-v1-csharp", + deps = [ + ":recommender_csharp_gapic", + ":recommender_csharp_grpc", + ":recommender_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/recommender/v1/artman_recommender_v1.yaml b/google/cloud/recommender/v1/artman_recommender_v1.yaml new file mode 100644 index 000000000..f5b86dfc7 --- /dev/null +++ b/google/cloud/recommender/v1/artman_recommender_v1.yaml @@ -0,0 +1,35 @@ +common: + api_name: recommender + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - . + service_yaml: recommender_v1.yaml + gapic_yaml: recommender_gapic.yaml + proto_package: google.cloud.recommender.v1 +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: php_gapic + type: GAPIC + language: PHP +- name: go_gapic + type: GAPIC + language: GO +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: csharp_gapic + type: GAPIC + language: CSHARP diff --git a/google/cloud/recommender/v1/recommendation.proto b/google/cloud/recommender/v1/recommendation.proto new file mode 100644 index 000000000..15e2bca18 --- /dev/null +++ b/google/cloud/recommender/v1/recommendation.proto @@ -0,0 +1,277 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.recommender.v1; + +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/money.proto"; + +option csharp_namespace = "Google.Cloud.Recommender.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/recommender/v1;recommender"; +option java_multiple_files = true; +option java_package = "com.google.cloud.recommender.v1"; +option objc_class_prefix = "CREC"; +option (google.api.resource_definition) = { + type: "recommender.googleapis.com/Recommender" + pattern: "projects/{project}/locations/{location}/recommenders/{recommender}" +}; + +// A recommendation along with a suggested action. E.g., a rightsizing +// recommendation for an underutilized VM, IAM role recommendations, etc +message Recommendation { + option (google.api.resource) = { + type: "recommender.googleapis.com/Recommendation" + pattern: "projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}" + }; + + // Name of recommendation. + string name = 1; + + // Free-form human readable summary in English. The maximum length is 500 + // characters. + string description = 2; + + // Contains an identifier for a subtype of recommendations produced for the + // same recommender. Subtype is a function of content and impact, meaning a + // new subtype might be added when significant changes to `content` or + // `primary_impact.category` are introduced. See the Recommenders section + // to see a list of subtypes for a given Recommender. + // + // Examples: + // For recommender = "google.iam.policy.Recommender", + // recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE" + string recommender_subtype = 12; + + // Last time this recommendation was refreshed by the system that created it + // in the first place. + google.protobuf.Timestamp last_refresh_time = 4; + + // The primary impact that this recommendation can have while trying to + // optimize for one category. + Impact primary_impact = 5; + + // Optional set of additional impact that this recommendation may have when + // trying to optimize for the primary category. These may be positive + // or negative. + repeated Impact additional_impact = 6; + + // Content of the recommendation describing recommended changes to resources. + RecommendationContent content = 7; + + // Information for state. Contains state and metadata. + RecommendationStateInfo state_info = 10; + + // Fingerprint of the Recommendation. Provides optimistic locking when + // updating states. + string etag = 11; +} + +// Contains what resources are changing and how they are changing. +message RecommendationContent { + // Operations to one or more Google Cloud resources grouped in such a way + // that, all operations within one group are expected to be performed + // atomically and in an order. + repeated OperationGroup operation_groups = 2; +} + +// Group of operations that need to be performed atomically. +message OperationGroup { + // List of operations across one or more resources that belong to this group. + // Loosely based on RFC6902 and should be performed in the order they appear. + repeated Operation operations = 1; +} + +// Contains an operation for a resource loosely based on the JSON-PATCH format +// with support for: +// +// * Custom filters for describing partial array patch. +// * Extended path values for describing nested arrays. +// * Custom fields for describing the resource for which the operation is being +// described. +// * Allows extension to custom operations not natively supported by RFC6902. +// See https://tools.ietf.org/html/rfc6902 for details on the original RFC. +message Operation { + // Type of this operation. Contains one of 'and', 'remove', 'replace', 'move', + // 'copy', 'test' and custom operations. This field is case-insensitive and + // always populated. + string action = 1; + + // Type of GCP resource being modified/tested. This field is always populated. + // Example: cloudresourcemanager.googleapis.com/Project, + // compute.googleapis.com/Instance + string resource_type = 2; + + // Contains the fully qualified resource name. This field is always populated. + // ex: //cloudresourcemanager.googleapis.com/projects/foo. + string resource = 3; + + // Path to the target field being operated on. If the operation is at the + // resource level, then path should be "/". This field is always populated. + string path = 4; + + // Can be set with action 'copy' to copy resource configuration across + // different resources of the same type. Example: A resource clone can be + // done via action = 'copy', path = "/", from = "/", + // source_resource = and resource_name = . + // This field is empty for all other values of `action`. + string source_resource = 5; + + // Can be set with action 'copy' or 'move' to indicate the source field within + // resource or source_resource, ignored if provided for other operation types. + string source_path = 6; + + // One of the fields in the following block will be set and intend to + // describe a value for 'path' field. + oneof path_value { + // Value for the `path` field. Will be set for actions:'add'/'replace'. + // Maybe set for action: 'test'. Either this or `value_matcher` will be set + // for 'test' operation. An exact match must be performed. + google.protobuf.Value value = 7; + + // Can be set for action 'test' for advanced matching for the value of + // 'path' field. Either this or `value` will be set for 'test' operation. + ValueMatcher value_matcher = 10; + } + + // Set of filters to apply if `path` refers to array elements or nested array + // elements in order to narrow down to a single unique element that is being + // tested/modified. + // This is intended to be an exact match per filter. To perform advanced + // matching, use path_value_matchers. + // + // * Example: { + // "/versions/*/name" : "it-123" + // "/versions/*/targetSize/percent": 20 + // } + // * Example: { + // "/bindings/*/role": "roles/admin" + // "/bindings/*/condition" : null + // } + // * Example: { + // "/bindings/*/role": "roles/admin" + // "/bindings/*/members/*" : ["x@google.com", "y@google.com"] + // } + // When both path_filters and path_value_matchers are set, an implicit AND + // must be performed. + map path_filters = 8; + + // Similar to path_filters, this contains set of filters to apply if `path` + // field referes to array elements. This is meant to support value matching + // beyond exact match. To perform exact match, use path_filters. + // When both path_filters and path_value_matchers are set, an implicit AND + // must be performed. + map path_value_matchers = 11; +} + +// Contains various matching options for values for a GCP resource field. +message ValueMatcher { + oneof match_variant { + // To be used for full regex matching. The regular expression is using the + // Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be + // used with RE2::FullMatch + string matches_pattern = 1; + } +} + +// Contains metadata about how much money a recommendation can save or incur. +message CostProjection { + // An approximate projection on amount saved or amount incurred. Negative cost + // units indicate cost savings and positive cost units indicate increase. + // See google.type.Money documentation for positive/negative units. + google.type.Money cost = 1; + + // Duration for which this cost applies. + google.protobuf.Duration duration = 2; +} + +// Contains the impact a recommendation can have for a given category. +message Impact { + // The category of the impact. + enum Category { + // Default unspecified category. Don't use directly. + CATEGORY_UNSPECIFIED = 0; + + // Indicates a potential increase or decrease in cost. + COST = 1; + + // Indicates a potential increase or decrease in security. + SECURITY = 2; + + // Indicates a potential increase or decrease in performance. + PERFORMANCE = 3; + + // Indicates a potential increase or decrease in manageability. + MANAGEABILITY = 4; + } + + // Category that is being targeted. + Category category = 1; + + // Contains projections (if any) for this category. + oneof projection { + // Use with CategoryType.COST + CostProjection cost_projection = 100; + } +} + +// Information for state. Contains state and metadata. +message RecommendationStateInfo { + // Represents Recommendation State + enum State { + // Default state. Don't use directly. + STATE_UNSPECIFIED = 0; + + // Recommendation is active and can be applied. Recommendations content can + // be updated by Google. + // + // ACTIVE recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED. + ACTIVE = 1; + + // Recommendation is in claimed state. Recommendations content is + // immutable and cannot be updated by Google. + // + // CLAIMED recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED. + CLAIMED = 6; + + // Recommendation is in succeeded state. Recommendations content is + // immutable and cannot be updated by Google. + // + // SUCCEEDED recommendations can be marked as SUCCEEDED, or FAILED. + SUCCEEDED = 3; + + // Recommendation is in failed state. Recommendations content is immutable + // and cannot be updated by Google. + // + // FAILED recommendations can be marked as SUCCEEDED, or FAILED. + FAILED = 4; + + // Recommendation is in dismissed state. Recommendation content can be + // updated by Google. + // + // DISMISSED recommendations can be marked as ACTIVE. + DISMISSED = 5; + } + + // The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. + State state = 1; + + // A map of metadata for the state, provided by user or automations systems. + map state_metadata = 2; +} diff --git a/google/cloud/recommender/v1/recommender_gapic.yaml b/google/cloud/recommender/v1/recommender_gapic.yaml new file mode 100644 index 000000000..7d60eb9d7 --- /dev/null +++ b/google/cloud/recommender/v1/recommender_gapic.yaml @@ -0,0 +1,18 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.recommender.v1 + python: + package_name: google.cloud.recommender_v1.gapic + go: + package_name: cloud.google.com/go/recommender/apiv1 + csharp: + package_name: Google.Cloud.Recommender.V1 + ruby: + package_name: Google::Cloud::Recommender::V1 + php: + package_name: Google\Cloud\Recommender\V1 + nodejs: + package_name: recommender.v1 diff --git a/google/cloud/recommender/v1/recommender_grpc_service_config.json b/google/cloud/recommender/v1/recommender_grpc_service_config.json new file mode 100644 index 000000000..b21bddfe7 --- /dev/null +++ b/google/cloud/recommender/v1/recommender_grpc_service_config.json @@ -0,0 +1,44 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.recommender.v1.Recommender", + "method": "ListRecommendations" + }, + { + "service": "google.cloud.recommender.v1.Recommender", + "method": "GetRecommendation" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.recommender.v1.Recommender", + "method": "MarkRecommendationClaimed" + }, + { + "service": "google.cloud.recommender.v1.Recommender", + "method": "MarkRecommendationSucceeded" + }, + { + "service": "google.cloud.recommender.v1.Recommender", + "method": "MarkRecommendationFailed" + } + ], + "timeout": "60s" + } + ] +} diff --git a/google/cloud/recommender/v1/recommender_service.proto b/google/cloud/recommender/v1/recommender_service.proto new file mode 100644 index 000000000..97a04f5ac --- /dev/null +++ b/google/cloud/recommender/v1/recommender_service.proto @@ -0,0 +1,228 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.recommender.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/recommender/v1/recommendation.proto"; + +option csharp_namespace = "Google.Cloud.Recommender.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/recommender/v1;recommender"; +option java_multiple_files = true; +option java_outer_classname = "RecommenderProto"; +option java_package = "com.google.cloud.recommender.v1"; +option objc_class_prefix = "CREC"; + +// Provides recommendations for cloud customers for various categories like +// performance optimization, cost savings, reliability, feature discovery, etc. +// These recommendations are generated automatically based on analysis of user +// resources, configuration and monitoring metrics. +service Recommender { + option (google.api.default_host) = "recommender.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists recommendations for a Cloud project. Requires the recommender.*.list + // IAM permission for the specified recommender. + rpc ListRecommendations(ListRecommendationsRequest) returns (ListRecommendationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/recommenders/*}/recommendations" + }; + option (google.api.method_signature) = "parent"; + option (google.api.method_signature) = "parent,filter"; + } + + // Gets the requested recommendation. Requires the recommender.*.get + // IAM permission for the specified recommender. + rpc GetRecommendation(GetRecommendationRequest) returns (Recommendation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Mark the Recommendation State as Claimed. Users can use this method to + // indicate to the Recommender API that they are starting to apply the + // recommendation themselves. This stops the recommendation content from being + // updated. + // + // MarkRecommendationClaimed can be applied to recommendations in CLAIMED, + // SUCCEEDED, FAILED, or ACTIVE state. + // + // Requires the recommender.*.update IAM permission for the specified + // recommender. + rpc MarkRecommendationClaimed(MarkRecommendationClaimedRequest) returns (Recommendation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markClaimed" + body: "*" + }; + option (google.api.method_signature) = "name,state_metadata,etag"; + } + + // Mark the Recommendation State as Succeeded. Users can use this method to + // indicate to the Recommender API that they have applied the recommendation + // themselves, and the operation was successful. This stops the recommendation + // content from being updated. + // + // MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, + // CLAIMED, SUCCEEDED, or FAILED state. + // + // Requires the recommender.*.update IAM permission for the specified + // recommender. + rpc MarkRecommendationSucceeded(MarkRecommendationSucceededRequest) returns (Recommendation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markSucceeded" + body: "*" + }; + option (google.api.method_signature) = "name,state_metadata,etag"; + } + + // Mark the Recommendation State as Failed. Users can use this method to + // indicate to the Recommender API that they have applied the recommendation + // themselves, and the operation failed. This stops the recommendation content + // from being updated. + // + // MarkRecommendationFailed can be applied to recommendations in ACTIVE, + // CLAIMED, SUCCEEDED, or FAILED state. + // + // Requires the recommender.*.update IAM permission for the specified + // recommender. + rpc MarkRecommendationFailed(MarkRecommendationFailedRequest) returns (Recommendation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markFailed" + body: "*" + }; + option (google.api.method_signature) = "name,state_metadata,etag"; + } +} + +// Request for the `ListRecommendations` method. +message ListRecommendationsRequest { + // Required. The container resource on which to execute the request. + // Acceptable formats: + // + // 1. + // "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", + // + // LOCATION here refers to GCP Locations: + // https://cloud.google.com/about/locations/ + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommender.googleapis.com/Recommender" + } + ]; + + // Optional. The maximum number of results to return from this request. Non-positive + // values are ignored. If not specified, the server will determine the number + // of results to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If present, retrieves the next batch of results from the preceding call to + // this method. `page_token` must be the value of `next_page_token` from the + // previous response. The values of other method parameters must be identical + // to those in the previous call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Filter expression to restrict the recommendations returned. Supported + // filter fields: state_info.state + // Eg: `state_info.state:"DISMISSED" or state_info.state:"FAILED" + string filter = 5; +} + +// Response to the `ListRecommendations` method. +message ListRecommendationsResponse { + // The set of recommendations for the `parent` resource. + repeated Recommendation recommendations = 1; + + // A token that can be used to request the next page of results. This field is + // empty if there are no additional results. + string next_page_token = 2; +} + +// Request to the `GetRecommendation` method. +message GetRecommendationRequest { + // Required. Name of the recommendation. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommender.googleapis.com/Recommendation" + } + ]; +} + +// Request for the `MarkRecommendationClaimed` Method. +message MarkRecommendationClaimedRequest { + // Required. Name of the recommendation. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommender.googleapis.com/Recommendation" + } + ]; + + // State properties to include with this state. Overwrites any existing + // `state_metadata`. + // Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. + // Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/. + map state_metadata = 2; + + // Required. Fingerprint of the Recommendation. Provides optimistic locking. + string etag = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `MarkRecommendationSucceeded` Method. +message MarkRecommendationSucceededRequest { + // Required. Name of the recommendation. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommender.googleapis.com/Recommendation" + } + ]; + + // State properties to include with this state. Overwrites any existing + // `state_metadata`. + // Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. + // Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/. + map state_metadata = 2; + + // Required. Fingerprint of the Recommendation. Provides optimistic locking. + string etag = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `MarkRecommendationFailed` Method. +message MarkRecommendationFailedRequest { + // Required. Name of the recommendation. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommender.googleapis.com/Recommendation" + } + ]; + + // State properties to include with this state. Overwrites any existing + // `state_metadata`. + // Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. + // Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/. + map state_metadata = 2; + + // Required. Fingerprint of the Recommendation. Provides optimistic locking. + string etag = 3 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/google/cloud/recommender/v1/recommender_v1.yaml b/google/cloud/recommender/v1/recommender_v1.yaml new file mode 100644 index 000000000..3fd9f6eb2 --- /dev/null +++ b/google/cloud/recommender/v1/recommender_v1.yaml @@ -0,0 +1,19 @@ +type: google.api.Service +config_version: 3 +name: recommender.googleapis.com +title: Recommender API + +apis: +- name: google.cloud.recommender.v1.Recommender + +backend: + rules: + - selector: 'google.cloud.recommender.v1.Recommender.*' + deadline: 30.0 + +authentication: + rules: + - selector: 'google.cloud.recommender.v1.Recommender.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/recommender/v1beta1/BUILD.bazel b/google/cloud/recommender/v1beta1/BUILD.bazel new file mode 100644 index 000000000..73a2466e1 --- /dev/null +++ b/google/cloud/recommender/v1beta1/BUILD.bazel @@ -0,0 +1,368 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "recommender_proto", + srcs = [ + "insight.proto", + "recommendation.proto", + "recommender_service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/type:money_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "recommender_proto_with_info", + deps = [ + ":recommender_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "recommender_java_proto", + deps = [":recommender_proto"], +) + +java_grpc_library( + name = "recommender_java_grpc", + srcs = [":recommender_proto"], + deps = [":recommender_java_proto"], +) + +java_gapic_library( + name = "recommender_java_gapic", + src = ":recommender_proto_with_info", + gapic_yaml = "recommender_gapic.yaml", + package = "google.cloud.recommender.v1beta1", + service_yaml = "recommender_v1beta1.yaml", + test_deps = [ + ":recommender_java_grpc", + ], + deps = [ + ":recommender_java_proto", + ], +) + +java_gapic_test( + name = "recommender_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.recommender.v1beta1.RecommenderClientTest", + ], + runtime_deps = [":recommender_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-recommender-v1beta1-java", + deps = [ + ":recommender_java_gapic", + ":recommender_java_grpc", + ":recommender_java_proto", + ":recommender_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "recommender_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/recommender/v1beta1", + protos = [":recommender_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/type:money_go_proto", + ], +) + +go_gapic_library( + name = "recommender_go_gapic", + srcs = [":recommender_proto_with_info"], + grpc_service_config = "recommender_grpc_service_config.json", + importpath = "cloud.google.com/go/recommender/apiv1beta1;recommender", + service_yaml = "recommender_v1beta1.yaml", + deps = [ + ":recommender_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +go_test( + name = "recommender_go_gapic_test", + srcs = [":recommender_go_gapic_srcjar_test"], + embed = [":recommender_go_gapic"], + importpath = "cloud.google.com/go/recommender/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-recommender-v1beta1-go", + deps = [ + ":recommender_go_gapic", + ":recommender_go_gapic_srcjar-test.srcjar", + ":recommender_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "recommender_moved_proto", + srcs = [":recommender_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/type:money_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "recommender_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":recommender_moved_proto"], +) + +py_grpc_library( + name = "recommender_py_grpc", + srcs = [":recommender_moved_proto"], + deps = [":recommender_py_proto"], +) + +py_gapic_library( + name = "recommender_py_gapic", + src = ":recommender_proto_with_info", + gapic_yaml = "recommender_gapic.yaml", + package = "google.cloud.recommender.v1beta1", + service_yaml = "recommender_v1beta1.yaml", + deps = [ + ":recommender_py_grpc", + ":recommender_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "recommender-v1beta1-py", + deps = [ + ":recommender_py_gapic", + ":recommender_py_grpc", + ":recommender_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "recommender_php_proto", + deps = [":recommender_proto"], +) + +php_grpc_library( + name = "recommender_php_grpc", + srcs = [":recommender_proto"], + deps = [":recommender_php_proto"], +) + +php_gapic_library( + name = "recommender_php_gapic", + src = ":recommender_proto_with_info", + gapic_yaml = "recommender_gapic.yaml", + package = "google.cloud.recommender.v1beta1", + service_yaml = "recommender_v1beta1.yaml", + deps = [ + ":recommender_php_grpc", + ":recommender_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-recommender-v1beta1-php", + deps = [ + ":recommender_php_gapic", + ":recommender_php_grpc", + ":recommender_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "recommender_nodejs_gapic", + src = ":recommender_proto_with_info", + gapic_yaml = "recommender_gapic.yaml", + package = "google.cloud.recommender.v1beta1", + service_yaml = "recommender_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "recommender-v1beta1-nodejs", + deps = [ + ":recommender_nodejs_gapic", + ":recommender_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "recommender_ruby_proto", + deps = [":recommender_proto"], +) + +ruby_grpc_library( + name = "recommender_ruby_grpc", + srcs = [":recommender_proto"], + deps = [":recommender_ruby_proto"], +) + +ruby_gapic_library( + name = "recommender_ruby_gapic", + src = ":recommender_proto_with_info", + gapic_yaml = "recommender_gapic.yaml", + package = "google.cloud.recommender.v1beta1", + service_yaml = "recommender_v1beta1.yaml", + deps = [ + ":recommender_ruby_grpc", + ":recommender_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-recommender-v1beta1-ruby", + deps = [ + ":recommender_ruby_gapic", + ":recommender_ruby_grpc", + ":recommender_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "recommender_csharp_proto", + deps = [":recommender_proto"], +) + +csharp_grpc_library( + name = "recommender_csharp_grpc", + srcs = [":recommender_proto"], + deps = [":recommender_csharp_proto"], +) + +csharp_gapic_library( + name = "recommender_csharp_gapic", + src = ":recommender_proto_with_info", + gapic_yaml = "recommender_gapic.yaml", + package = "google.cloud.recommender.v1beta1", + service_yaml = "recommender_v1beta1.yaml", + deps = [ + ":recommender_csharp_grpc", + ":recommender_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-recommender-v1beta1-csharp", + deps = [ + ":recommender_csharp_gapic", + ":recommender_csharp_grpc", + ":recommender_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/recommender/artman_recommender_v1beta1.yaml b/google/cloud/recommender/v1beta1/artman_recommender_v1beta1.yaml similarity index 84% rename from google/cloud/recommender/artman_recommender_v1beta1.yaml rename to google/cloud/recommender/v1beta1/artman_recommender_v1beta1.yaml index e66456bf0..603f1ca7c 100644 --- a/google/cloud/recommender/artman_recommender_v1beta1.yaml +++ b/google/cloud/recommender/v1beta1/artman_recommender_v1beta1.yaml @@ -5,9 +5,11 @@ common: proto_deps: - name: google-common-protos src_proto_paths: - - v1beta1 + - . service_yaml: recommender_v1beta1.yaml - gapic_yaml: v1beta1/recommender_gapic.yaml + gapic_yaml: recommender_gapic.yaml + proto_package: google.cloud.recommender.v1beta1 + samples: samples artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/recommender/v1beta1/insight.proto b/google/cloud/recommender/v1beta1/insight.proto new file mode 100644 index 000000000..f968bd118 --- /dev/null +++ b/google/cloud/recommender/v1beta1/insight.proto @@ -0,0 +1,134 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.recommender.v1beta1; + +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Recommender.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/recommender/v1beta1;recommender"; +option java_multiple_files = true; +option java_package = "com.google.cloud.recommender.v1beta1"; +option objc_class_prefix = "CREC"; +option (google.api.resource_definition) = { + type: "recommender.googleapis.com/InsightType" + pattern: "projects/{project}/locations/{location}/insightTypes/{insight_type}" +}; + +// An insight along with the information used to derive the insight. The insight +// may have associated recomendations as well. +message Insight { + option (google.api.resource) = { + type: "recommender.googleapis.com/Insight" + pattern: "projects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight}" + }; + + // Reference to an associated recommendation. + message RecommendationReference { + // Recommendation resource name, e.g. + // projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID] + string recommendation = 1; + } + + // Insight category. + enum Category { + // Unspecified category. + CATEGORY_UNSPECIFIED = 0; + + // The insight is related to cost. + COST = 1; + + // The insight is related to security. + SECURITY = 2; + + // The insight is related to performance. + PERFORMANCE = 3; + + // This insight is related to manageability. + MANAGEABILITY = 4; + } + + // Name of the insight. + string name = 1; + + // Free-form human readable summary in English. The maximum length is 500 + // characters. + string description = 2; + + // Fully qualified resource names that this insight is targeting. + repeated string target_resources = 9; + + // Insight subtype. Insight content schema will be stable for a given subtype. + string insight_subtype = 10; + + // A struct of custom fields to explain the insight. + // Example: "grantedPermissionsCount": "1000" + google.protobuf.Struct content = 3; + + // Timestamp of the latest data used to generate the insight. + google.protobuf.Timestamp last_refresh_time = 4; + + // Observation period that led to the insight. The source data used to + // generate the insight ends at last_refresh_time and begins at + // (last_refresh_time - observation_period). + google.protobuf.Duration observation_period = 5; + + // Information state and metadata. + InsightStateInfo state_info = 6; + + // Category being targeted by the insight. + Category category = 7; + + // Fingerprint of the Insight. Provides optimistic locking when updating + // states. + string etag = 11; + + // Recommendations derived from this insight. + repeated RecommendationReference associated_recommendations = 8; +} + +// Information related to insight state. +message InsightStateInfo { + // Represents insight state. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // Insight is active. Content for ACTIVE insights can be updated by Google. + // ACTIVE insights can be marked DISMISSED OR ACCEPTED. + ACTIVE = 1; + + // Some action has been taken based on this insight. Insights become + // accepted when a recommendation derived from the insight has been marked + // CLAIMED, SUCCEEDED, or FAILED. ACTIVE insights can also be marked + // ACCEPTED explicitly. Content for ACCEPTED insights is immutable. ACCEPTED + // insights can only be marked ACCEPTED (which may update state metadata). + ACCEPTED = 2; + + // Insight is dismissed. Content for DISMISSED insights can be updated by + // Google. DISMISSED insights can be marked as ACTIVE. + DISMISSED = 3; + } + + // Insight state. + State state = 1; + + // A map of metadata for the state, provided by user or automations systems. + map state_metadata = 2; +} diff --git a/google/cloud/recommender/v1beta1/recommendation.proto b/google/cloud/recommender/v1beta1/recommendation.proto index 8980de0c4..79c4afee8 100644 --- a/google/cloud/recommender/v1beta1/recommendation.proto +++ b/google/cloud/recommender/v1beta1/recommendation.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.recommender.v1beta1; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; @@ -27,14 +27,27 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/recommender/v1b option java_multiple_files = true; option java_package = "com.google.cloud.recommender.v1beta1"; option objc_class_prefix = "CREC"; +option (google.api.resource_definition) = { + type: "recommender.googleapis.com/Recommender" + pattern: "projects/{project}/locations/{location}/recommenders/{recommender}" +}; // A recommendation along with a suggested action. E.g., a rightsizing // recommendation for an underutilized VM, IAM role recommendations, etc message Recommendation { + option (google.api.resource) = { + type: "recommender.googleapis.com/Recommendation" + pattern: "projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}" + }; + + // Reference to an associated insight. + message InsightReference { + // Insight resource name, e.g. + // projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] + string insight = 1; + } + // Name of recommendation. - // - // A project recommendation is represented as - // projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID] string name = 1; // Free-form human readable summary in English. The maximum length is 500 @@ -43,11 +56,12 @@ message Recommendation { // Contains an identifier for a subtype of recommendations produced for the // same recommender. Subtype is a function of content and impact, meaning a - // new subtype will be added when either content or primary impact category - // changes. + // new subtype might be added when significant changes to `content` or + // `primary_impact.category` are introduced. See the Recommenders section + // to see a list of subtypes for a given Recommender. // // Examples: - // For recommender = "google.iam.policy.RoleRecommender", + // For recommender = "google.iam.policy.Recommender", // recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE" string recommender_subtype = 12; @@ -73,6 +87,9 @@ message Recommendation { // Fingerprint of the Recommendation. Provides optimistic locking when // updating states. string etag = 11; + + // Insights that led to this recommendation. + repeated InsightReference associated_insights = 14; } // Contains what resources are changing and how they are changing. @@ -90,8 +107,9 @@ message OperationGroup { repeated Operation operations = 1; } -// Contains an operation for a resource inspired by the JSON-PATCH format with -// support for: +// Contains an operation for a resource loosely based on the JSON-PATCH format +// with support for: +// // * Custom filters for describing partial array patch. // * Extended path values for describing nested arrays. // * Custom fields for describing the resource for which the operation is being @@ -100,7 +118,7 @@ message OperationGroup { // See https://tools.ietf.org/html/rfc6902 for details on the original RFC. message Operation { // Type of this operation. Contains one of 'and', 'remove', 'replace', 'move', - // 'copy', 'test' and custom operations. This field is case-insensitive and + // 'copy', 'test' and 'custom' operations. This field is case-insensitive and // always populated. string action = 1; @@ -128,26 +146,57 @@ message Operation { // resource or source_resource, ignored if provided for other operation types. string source_path = 6; - // Value for the `path` field. Set if action is 'add'/'replace'/'test'. - google.protobuf.Value value = 7; + // One of the fields in the following block will be set and intend to + // describe a value for 'path' field. + oneof path_value { + // Value for the `path` field. Will be set for actions:'add'/'replace'. + // Maybe set for action: 'test'. Either this or `value_matcher` will be set + // for 'test' operation. An exact match must be performed. + google.protobuf.Value value = 7; + + // Can be set for action 'test' for advanced matching for the value of + // 'path' field. Either this or `value` will be set for 'test' operation. + ValueMatcher value_matcher = 10; + } // Set of filters to apply if `path` refers to array elements or nested array // elements in order to narrow down to a single unique element that is being // tested/modified. - // Note that this is intended to be an exact match per filter. - // Example: { + // This is intended to be an exact match per filter. To perform advanced + // matching, use path_value_matchers. + // + // * Example: { // "/versions/*/name" : "it-123" // "/versions/*/targetSize/percent": 20 - // } - // Example: { + // } + // * Example: { // "/bindings/*/role": "roles/admin" // "/bindings/*/condition" : null - // } - // Example: { + // } + // * Example: { // "/bindings/*/role": "roles/admin" // "/bindings/*/members/*" : ["x@google.com", "y@google.com"] - // } + // } + // When both path_filters and path_value_matchers are set, an implicit AND + // must be performed. map path_filters = 8; + + // Similar to path_filters, this contains set of filters to apply if `path` + // field referes to array elements. This is meant to support value matching + // beyond exact match. To perform exact match, use path_filters. + // When both path_filters and path_value_matchers are set, an implicit AND + // must be performed. + map path_value_matchers = 11; +} + +// Contains various matching options for values for a GCP resource field. +message ValueMatcher { + oneof match_variant { + // To be used for full regex matching. The regular expression is using the + // Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be + // used with RE2::FullMatch + string matches_pattern = 1; + } } // Contains metadata about how much money a recommendation can save or incur. @@ -176,6 +225,9 @@ message Impact { // Indicates a potential increase or decrease in performance. PERFORMANCE = 3; + + // Indicates a potential increase or decrease in manageability. + MANAGEABILITY = 4; } // Category that is being targeted. @@ -190,7 +242,7 @@ message Impact { // Information for state. Contains state and metadata. message RecommendationStateInfo { - // Represents Recommendation State + // Represents Recommendation State. enum State { // Default state. Don't use directly. STATE_UNSPECIFIED = 0; diff --git a/google/cloud/recommender/v1beta1/recommender_gapic.legacy.yaml b/google/cloud/recommender/v1beta1/recommender_gapic.legacy.yaml new file mode 100644 index 000000000..e19916a41 --- /dev/null +++ b/google/cloud/recommender/v1beta1/recommender_gapic.legacy.yaml @@ -0,0 +1,178 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.recommender.v1beta1 + python: + package_name: google.cloud.recommender_v1beta1.gapic + go: + package_name: cloud.google.com/go/recommender/apiv1beta1 + csharp: + package_name: Google.Cloud.Recommender.V1Beta1 + ruby: + package_name: Google::Cloud::Recommender::V1beta1 + php: + package_name: Google\Cloud\Recommender\V1beta1 + nodejs: + package_name: recommender.v1beta1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.recommender.v1beta1.Recommender + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location}/recommenders/{recommender} + entity_name: recommender + - name_pattern: projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation} + entity_name: recommendation + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListRecommendations + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: recommendations + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: recommender + timeout_millis: 60000 + - name: GetRecommendation + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: recommendation + timeout_millis: 60000 + - name: MarkRecommendationClaimed + flattening: + groups: + - parameters: + - name + - state_metadata + - etag + required_fields: + - name + - etag + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: recommendation + timeout_millis: 60000 + - name: MarkRecommendationSucceeded + flattening: + groups: + - parameters: + - name + - state_metadata + - etag + required_fields: + - name + - etag + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: recommendation + timeout_millis: 60000 + - name: MarkRecommendationFailed + flattening: + groups: + - parameters: + - name + - state_metadata + - etag + required_fields: + - name + - etag + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: recommendation + timeout_millis: 60000 diff --git a/google/cloud/recommender/v1beta1/recommender_gapic.yaml b/google/cloud/recommender/v1beta1/recommender_gapic.yaml index 2acecf311..174c69519 100644 --- a/google/cloud/recommender/v1beta1/recommender_gapic.yaml +++ b/google/cloud/recommender/v1beta1/recommender_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -9,166 +9,10 @@ language_settings: go: package_name: cloud.google.com/go/recommender/apiv1beta1 csharp: - package_name: Google.Cloud.Recommender.V1beta1 + package_name: Google.Cloud.Recommender.V1Beta1 ruby: package_name: Google::Cloud::Recommender::V1beta1 php: package_name: Google\Cloud\Recommender\V1beta1 nodejs: package_name: recommender.v1beta1 -# A list of API interface configurations. -interfaces: -# The fully qualified name of the API interface. -- name: google.cloud.recommender.v1beta1.Recommender - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/locations/{location}/recommenders/{recommender} - entity_name: recommender - - name_pattern: projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation} - entity_name: recommendation - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: ListRecommendations - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: recommendations - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: recommender - timeout_millis: 60000 - - name: GetRecommendation - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: recommendation - timeout_millis: 60000 - - name: MarkRecommendationClaimed - flattening: - groups: - - parameters: - - name - - etag - required_fields: - - name - - etag - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: recommendation - timeout_millis: 60000 - - name: MarkRecommendationSucceeded - flattening: - groups: - - parameters: - - name - - etag - required_fields: - - name - - etag - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: recommendation - timeout_millis: 60000 - - name: MarkRecommendationFailed - flattening: - groups: - - parameters: - - name - - etag - required_fields: - - name - - etag - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: recommendation - timeout_millis: 60000 diff --git a/google/cloud/recommender/v1beta1/recommender_grpc_service_config.json b/google/cloud/recommender/v1beta1/recommender_grpc_service_config.json new file mode 100644 index 000000000..e9ce1b197 --- /dev/null +++ b/google/cloud/recommender/v1beta1/recommender_grpc_service_config.json @@ -0,0 +1,56 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.recommender.v1beta1.Recommender", + "method": "ListInsights" + }, + { + "service": "google.cloud.recommender.v1beta1.Recommender", + "method": "GetInsight" + }, + { + "service": "google.cloud.recommender.v1beta1.Recommender", + "method": "ListRecommendations" + }, + { + "service": "google.cloud.recommender.v1beta1.Recommender", + "method": "GetRecommendation" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.recommender.v1beta1.Recommender", + "method": "MarkInsightAccepted" + }, + { + "service": "google.cloud.recommender.v1beta1.Recommender", + "method": "MarkRecommendationClaimed" + }, + { + "service": "google.cloud.recommender.v1beta1.Recommender", + "method": "MarkRecommendationSucceeded" + }, + { + "service": "google.cloud.recommender.v1beta1.Recommender", + "method": "MarkRecommendationFailed" + } + ], + "timeout": "60s" + } + ] +} diff --git a/google/cloud/recommender/v1beta1/recommender_service.proto b/google/cloud/recommender/v1beta1/recommender_service.proto index 49a076ae7..8f4df1a7d 100644 --- a/google/cloud/recommender/v1beta1/recommender_service.proto +++ b/google/cloud/recommender/v1beta1/recommender_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,38 +11,72 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.recommender.v1beta1; import "google/api/annotations.proto"; -import "google/cloud/recommender/v1beta1/recommendation.proto"; -import "google/longrunning/operations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/recommender/v1beta1/insight.proto"; +import "google/cloud/recommender/v1beta1/recommendation.proto"; -option csharp_namespace = "Google.Cloud.Recommmender.V1Beta1"; +option csharp_namespace = "Google.Cloud.Recommender.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/recommender/v1beta1;recommender"; option java_multiple_files = true; option java_outer_classname = "RecommenderProto"; option java_package = "com.google.cloud.recommender.v1beta1"; option objc_class_prefix = "CREC"; -// Provides recommendations for cloud customers for various categories like -// performance optimization, cost savings, reliability, feature discovery, etc. -// These recommendations are generated automatically based on analysis of user -// resources, configuration and monitoring metrics. +// Provides insights and recommendations for cloud customers for various +// categories like performance optimization, cost savings, reliability, feature +// discovery, etc. Insights and recommendations are generated automatically +// based on analysis of user resources, configuration and monitoring metrics. service Recommender { option (google.api.default_host) = "recommender.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Lists insights for a Cloud project. Requires the recommender.*.list IAM + // permission for the specified insight type. + rpc ListInsights(ListInsightsRequest) returns (ListInsightsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/insightTypes/*}/insights" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the requested insight. Requires the recommender.*.get IAM permission + // for the specified insight type. + rpc GetInsight(GetInsightRequest) returns (Insight) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/insightTypes/*/insights/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Marks the Insight State as Accepted. Users can use this method to + // indicate to the Recommender API that they have applied some action based + // on the insight. This stops the insight content from being updated. + // + // MarkInsightAccepted can be applied to insights in ACTIVE state. Requires + // the recommender.*.update IAM permission for the specified insight. + rpc MarkInsightAccepted(MarkInsightAcceptedRequest) returns (Insight) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/insightTypes/*/insights/*}:markAccepted" + body: "*" + }; + option (google.api.method_signature) = "name,state_metadata,etag"; + } + // Lists recommendations for a Cloud project. Requires the recommender.*.list // IAM permission for the specified recommender. rpc ListRecommendations(ListRecommendationsRequest) returns (ListRecommendationsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*/recommenders/*}/recommendations" }; + option (google.api.method_signature) = "parent,filter"; } // Gets the requested recommendation. Requires the recommender.*.get @@ -51,15 +85,16 @@ service Recommender { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/recommenders/*/recommendations/*}" }; + option (google.api.method_signature) = "name"; } - // Mark the Recommendation State as Claimed. Users can use this method to + // Marks the Recommendation State as Claimed. Users can use this method to // indicate to the Recommender API that they are starting to apply the // recommendation themselves. This stops the recommendation content from being - // updated. + // updated. Associated insights are frozen and placed in the ACCEPTED state. // - // MarkRecommendationClaimed can be applied to recommendations in CLAIMED, - // SUCCEEDED, FAILED, or ACTIVE state. + // MarkRecommendationClaimed can be applied to recommendations in CLAIMED or + // ACTIVE state. // // Requires the recommender.*.update IAM permission for the specified // recommender. @@ -68,12 +103,14 @@ service Recommender { post: "/v1beta1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markClaimed" body: "*" }; + option (google.api.method_signature) = "name,state_metadata,etag"; } - // Mark the Recommendation State as Succeeded. Users can use this method to + // Marks the Recommendation State as Succeeded. Users can use this method to // indicate to the Recommender API that they have applied the recommendation // themselves, and the operation was successful. This stops the recommendation - // content from being updated. + // content from being updated. Associated insights are frozen and placed in + // the ACCEPTED state. // // MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, // CLAIMED, SUCCEEDED, or FAILED state. @@ -85,12 +122,14 @@ service Recommender { post: "/v1beta1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markSucceeded" body: "*" }; + option (google.api.method_signature) = "name,state_metadata,etag"; } - // Mark the Recommendation State as Failed. Users can use this method to + // Marks the Recommendation State as Failed. Users can use this method to // indicate to the Recommender API that they have applied the recommendation // themselves, and the operation failed. This stops the recommendation content - // from being updated. + // from being updated. Associated insights are frozen and placed in the + // ACCEPTED state. // // MarkRecommendationFailed can be applied to recommendations in ACTIVE, // CLAIMED, SUCCEEDED, or FAILED state. @@ -102,9 +141,83 @@ service Recommender { post: "/v1beta1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markFailed" body: "*" }; + option (google.api.method_signature) = "name,state_metadata,etag"; } } +// Request for the `ListInsights` method. +message ListInsightsRequest { + // Required. The container resource on which to execute the request. + // Acceptable formats: + // + // 1. + // "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", + // + // LOCATION here refers to GCP Locations: + // https://cloud.google.com/about/locations/ + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommender.googleapis.com/InsightType" + } + ]; + + // Optional. The maximum number of results to return from this request. Non-positive + // values are ignored. If not specified, the server will determine the number + // of results to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If present, retrieves the next batch of results from the preceding call to + // this method. `page_token` must be the value of `next_page_token` from the + // previous response. The values of other method parameters must be identical + // to those in the previous call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter expression to restrict the insights returned. Supported + // filter fields: state + // Eg: `state:"DISMISSED" or state:"ACTIVE" + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response to the `ListInsights` method. +message ListInsightsResponse { + // The set of insights for the `parent` resource. + repeated Insight insights = 1; + + // A token that can be used to request the next page of results. This field is + // empty if there are no additional results. + string next_page_token = 2; +} + +// Request to the `GetInsight` method. +message GetInsightRequest { + // Required. Name of the insight. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommender.googleapis.com/Insight" + } + ]; +} + +// Request for the `MarkInsightAccepted` method. +message MarkInsightAcceptedRequest { + // Required. Name of the insight. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommender.googleapis.com/Insight" + } + ]; + + // Optional. State properties user wish to include with this state. Full replace of the + // current state_metadata. + map state_metadata = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Fingerprint of the Insight. Provides optimistic locking. + string etag = 3 [(google.api.field_behavior) = REQUIRED]; +} + // Request for the `ListRecommendations` method. message ListRecommendationsRequest { // Required. The container resource on which to execute the request. @@ -115,18 +228,23 @@ message ListRecommendationsRequest { // // LOCATION here refers to GCP Locations: // https://cloud.google.com/about/locations/ - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommender.googleapis.com/Recommender" + } + ]; - // Optional. The maximum number of results to return from this request. - // Non-positive values are ignored. If not specified, the server will - // determine the number of results to return. - int32 page_size = 2; + // Optional. The maximum number of results to return from this request. Non-positive + // values are ignored. If not specified, the server will determine the number + // of results to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. If present, retrieves the next batch of results from the - // preceding call to this method. `page_token` must be the value of - // `next_page_token` from the previous response. The values of other method - // parameters must be identical to those in the previous call. - string page_token = 3; + // Optional. If present, retrieves the next batch of results from the preceding call to + // this method. `page_token` must be the value of `next_page_token` from the + // previous response. The values of other method parameters must be identical + // to those in the previous call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Filter expression to restrict the recommendations returned. Supported // filter fields: state_info.state @@ -146,45 +264,71 @@ message ListRecommendationsResponse { // Request to the `GetRecommendation` method. message GetRecommendationRequest { - // Name of the recommendation. - string name = 1; + // Required. Name of the recommendation. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommender.googleapis.com/Recommendation" + } + ]; } // Request for the `MarkRecommendationClaimed` Method. message MarkRecommendationClaimedRequest { - // Name of the recommendation. - string name = 1; + // Required. Name of the recommendation. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommender.googleapis.com/Recommendation" + } + ]; // State properties to include with this state. Overwrites any existing // `state_metadata`. + // Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. + // Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/. map state_metadata = 2; - // Fingerprint of the Recommendation. Provides optimistic locking. - string etag = 3; + // Required. Fingerprint of the Recommendation. Provides optimistic locking. + string etag = 3 [(google.api.field_behavior) = REQUIRED]; } // Request for the `MarkRecommendationSucceeded` Method. message MarkRecommendationSucceededRequest { - // Name of the recommendation. - string name = 1; + // Required. Name of the recommendation. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommender.googleapis.com/Recommendation" + } + ]; // State properties to include with this state. Overwrites any existing // `state_metadata`. + // Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. + // Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/. map state_metadata = 2; - // Fingerprint of the Recommendation. Provides optimistic locking. - string etag = 3; + // Required. Fingerprint of the Recommendation. Provides optimistic locking. + string etag = 3 [(google.api.field_behavior) = REQUIRED]; } // Request for the `MarkRecommendationFailed` Method. message MarkRecommendationFailedRequest { - // Name of the recommendation. - string name = 1; + // Required. Name of the recommendation. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recommender.googleapis.com/Recommendation" + } + ]; // State properties to include with this state. Overwrites any existing // `state_metadata`. + // Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. + // Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/. map state_metadata = 2; - // Fingerprint of the Recommendation. Provides optimistic locking. - string etag = 3; + // Required. Fingerprint of the Recommendation. Provides optimistic locking. + string etag = 3 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/cloud/recommender/recommender_v1beta1.yaml b/google/cloud/recommender/v1beta1/recommender_v1beta1.yaml similarity index 95% rename from google/cloud/recommender/recommender_v1beta1.yaml rename to google/cloud/recommender/v1beta1/recommender_v1beta1.yaml index d72478e8e..9b53d26d3 100644 --- a/google/cloud/recommender/recommender_v1beta1.yaml +++ b/google/cloud/recommender/v1beta1/recommender_v1beta1.yaml @@ -9,7 +9,7 @@ apis: backend: rules: - selector: 'google.cloud.recommender.v1beta1.Recommender.*' - deadline: 30.0 + deadline: 3.0 authentication: rules: diff --git a/google/cloud/recommender/v1beta1/samples/list_recommendations.yaml b/google/cloud/recommender/v1beta1/samples/list_recommendations.yaml new file mode 100644 index 000000000..b3086c07d --- /dev/null +++ b/google/cloud/recommender/v1beta1/samples/list_recommendations.yaml @@ -0,0 +1,18 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 +samples: +- title: List Recommendations + service: google.cloud.recommender.v1beta1.Recommender + description: | + List recommendations for a specified project, location, and recommender. + rpc: ListRecommendations + request: + - field: parent + value: "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER]" + response: + - define: recommendation = $resp + - print: ["Recommendation name: %s", recommendation.name] + - print: ["- description: %s", recommendation.description] + - print: ["- primary_impact.category: %s", recommendation.primary_impact.category] + - print: ["- state_info.state: %s", recommendation.state_info.state] + - print: ["- last_refresh_time: %s", recommendation.last_refresh_time] diff --git a/google/cloud/redis/BUILD.bazel b/google/cloud/redis/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/cloud/redis/BUILD.bazel +++ b/google/cloud/redis/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/redis/v1/BUILD.bazel b/google/cloud/redis/v1/BUILD.bazel index 1f6917e05..dec68f01e 100644 --- a/google/cloud/redis/v1/BUILD.bazel +++ b/google/cloud/redis/v1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -14,6 +17,7 @@ proto_library( deps = [ "//google/api:annotations_proto", "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/api:resource_proto", "//google/longrunning:operations_proto", "@com_google_protobuf//:field_mask_proto", @@ -23,7 +27,10 @@ proto_library( proto_library_with_info( name = "redis_proto_with_info", - deps = [":redis_proto"], + deps = [ + ":redis_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -31,18 +38,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "redis_java_proto", deps = [":redis_proto"], @@ -51,51 +53,40 @@ java_proto_library( java_grpc_library( name = "redis_java_grpc", srcs = [":redis_proto"], - deps = [":redis_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "redis_resource_name_java_proto", - gapic_yaml = "redis_gapic.yaml", - deps = [":redis_proto"], + deps = [":redis_java_proto"], ) java_gapic_library( name = "redis_java_gapic", src = ":redis_proto_with_info", gapic_yaml = "redis_gapic.yaml", - service_yaml = "//google/cloud/redis:redis_v1.yaml", - test_deps = [":redis_java_grpc"], + package = "google.cloud.redis.v1", + service_yaml = "redis_v1.yaml", + test_deps = [ + ":redis_java_grpc", + ], deps = [ ":redis_java_proto", - ":redis_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":redis_java_gapic_test", +java_gapic_test( + name = "redis_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.redis.v1.CloudRedisClientTest", ], -) for test_name in [ - "com.google.cloud.redis.v1.CloudRedisClientTest", -]] + runtime_deps = [":redis_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-redis-v1-java", - client_deps = [":redis_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":redis_java_gapic_test"], - grpc_deps = [":redis_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":redis_java_gapic", + ":redis_java_grpc", ":redis_java_proto", ":redis_proto", - ":redis_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -103,10 +94,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -122,15 +113,16 @@ go_proto_library( go_gapic_library( name = "redis_go_gapic", - src = ":redis_proto_with_info", - gapic_yaml = "redis_gapic.yaml", - importpath = "cloud.google.com/go/redis/apiv1", - service_yaml = "//google/cloud/redis:redis_v1.yaml", + srcs = [":redis_proto_with_info"], + grpc_service_config = "redis_grpc_service_config.json", + importpath = "cloud.google.com/go/redis/apiv1;redis", + service_yaml = "redis_v1.yaml", deps = [ ":redis_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", ], ) @@ -141,13 +133,235 @@ go_test( importpath = "cloud.google.com/go/redis/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-redis-v1-go", deps = [ ":redis_go_gapic", - ":redis_go_gapic_srcjar-smoke-test.srcjar", ":redis_go_gapic_srcjar-test.srcjar", ":redis_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "redis_moved_proto", + srcs = [":redis_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "redis_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":redis_moved_proto"], +) + +py_grpc_library( + name = "redis_py_grpc", + srcs = [":redis_moved_proto"], + deps = [":redis_py_proto"], +) + +py_gapic_library( + name = "redis_py_gapic", + src = ":redis_proto_with_info", + gapic_yaml = "redis_gapic.yaml", + package = "google.cloud.redis.v1", + service_yaml = "redis_v1.yaml", + deps = [ + ":redis_py_grpc", + ":redis_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "redis-v1-py", + deps = [ + ":redis_py_gapic", + ":redis_py_grpc", + ":redis_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "redis_php_proto", + deps = [":redis_proto"], +) + +php_grpc_library( + name = "redis_php_grpc", + srcs = [":redis_proto"], + deps = [":redis_php_proto"], +) + +php_gapic_library( + name = "redis_php_gapic", + src = ":redis_proto_with_info", + gapic_yaml = "redis_gapic.yaml", + package = "google.cloud.redis.v1", + service_yaml = "redis_v1.yaml", + deps = [ + ":redis_php_grpc", + ":redis_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-redis-v1-php", + deps = [ + ":redis_php_gapic", + ":redis_php_grpc", + ":redis_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "redis_nodejs_gapic", + src = ":redis_proto_with_info", + gapic_yaml = "redis_gapic.yaml", + package = "google.cloud.redis.v1", + service_yaml = "redis_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "redis-v1-nodejs", + deps = [ + ":redis_nodejs_gapic", + ":redis_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "redis_ruby_proto", + deps = [":redis_proto"], +) + +ruby_grpc_library( + name = "redis_ruby_grpc", + srcs = [":redis_proto"], + deps = [":redis_ruby_proto"], +) + +ruby_gapic_library( + name = "redis_ruby_gapic", + src = ":redis_proto_with_info", + gapic_yaml = "redis_gapic.yaml", + package = "google.cloud.redis.v1", + service_yaml = "redis_v1.yaml", + deps = [ + ":redis_ruby_grpc", + ":redis_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-redis-v1-ruby", + deps = [ + ":redis_ruby_gapic", + ":redis_ruby_grpc", + ":redis_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "redis_csharp_proto", + deps = [":redis_proto"], +) + +csharp_grpc_library( + name = "redis_csharp_grpc", + srcs = [":redis_proto"], + deps = [":redis_csharp_proto"], +) + +csharp_gapic_library( + name = "redis_csharp_gapic", + src = ":redis_proto_with_info", + gapic_yaml = "redis_gapic.yaml", + package = "google.cloud.redis.v1", + service_yaml = "redis_v1.yaml", + deps = [ + ":redis_csharp_grpc", + ":redis_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-redis-v1-csharp", + deps = [ + ":redis_csharp_gapic", + ":redis_csharp_grpc", + ":redis_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/redis/v1/cloud_redis.proto b/google/cloud/redis/v1/cloud_redis.proto index 65366ca43..1b4669451 100644 --- a/google/cloud/redis/v1/cloud_redis.proto +++ b/google/cloud/redis/v1/cloud_redis.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,17 +11,18 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.redis.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/client.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/redis/v1;redis"; option java_multiple_files = true; @@ -45,11 +46,13 @@ option java_package = "com.google.cloud.redis.v1"; // * `projects/redpepper-1290/locations/us-central1/instances/my-redis` service CloudRedis { option (google.api.default_host) = "redis.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; // Lists all Redis instances owned by a project in either the specified // location (region) or all locations. // // The location should have the following format: + // // * `projects/{project_id}/locations/{location_id}` // // If `location_id` is specified as `-` (wildcard), then all regions @@ -58,6 +61,7 @@ service CloudRedis { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/instances" }; + option (google.api.method_signature) = "parent"; } // Gets the details of a specific Redis instance. @@ -65,6 +69,7 @@ service CloudRedis { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/instances/*}" }; + option (google.api.method_signature) = "name"; } // Creates a Redis instance based on the specified tier and memory size. @@ -84,6 +89,11 @@ service CloudRedis { post: "/v1/{parent=projects/*/locations/*}/instances" body: "instance" }; + option (google.api.method_signature) = "parent,instance_id,instance"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.redis.v1.Instance" + metadata_type: "google.cloud.redis.v1.OperationMetadata" + }; } // Updates the metadata and configuration of a specific Redis instance. @@ -96,6 +106,11 @@ service CloudRedis { patch: "/v1/{instance.name=projects/*/locations/*/instances/*}" body: "instance" }; + option (google.api.method_signature) = "update_mask,instance"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.redis.v1.Instance" + metadata_type: "google.cloud.redis.v1.OperationMetadata" + }; } // Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. @@ -111,6 +126,11 @@ service CloudRedis { post: "/v1/{name=projects/*/locations/*/instances/*}:import" body: "*" }; + option (google.api.method_signature) = "name,input_config"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.redis.v1.Instance" + metadata_type: "google.cloud.redis.v1.OperationMetadata" + }; } // Export Redis instance data into a Redis RDB format file in Cloud Storage. @@ -124,6 +144,11 @@ service CloudRedis { post: "/v1/{name=projects/*/locations/*/instances/*}:export" body: "*" }; + option (google.api.method_signature) = "name,output_config"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.redis.v1.Instance" + metadata_type: "google.cloud.redis.v1.OperationMetadata" + }; } // Initiates a failover of the master node to current replica node for a @@ -133,6 +158,11 @@ service CloudRedis { post: "/v1/{name=projects/*/locations/*/instances/*}:failover" body: "*" }; + option (google.api.method_signature) = "name,data_protection_mode"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.redis.v1.Instance" + metadata_type: "google.cloud.redis.v1.OperationMetadata" + }; } // Deletes a specific Redis instance. Instance stops serving and data is @@ -141,11 +171,21 @@ service CloudRedis { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/instances/*}" }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.redis.v1.OperationMetadata" + }; } } // A Google Cloud Redis instance. message Instance { + option (google.api.resource) = { + type: "redis.googleapis.com/Instance" + pattern: "projects/{project}/locations/{location}/instances/{instance}" + }; + // Represents the different states of a Redis instance. enum State { // Not set. @@ -190,6 +230,19 @@ message Instance { STANDARD_HA = 3; } + // Available connection modes. + enum ConnectMode { + // Not set. + CONNECT_MODE_UNSPECIFIED = 0; + + // Connect via directly peering with memorystore redis hosted service. + DIRECT_PEERING = 1; + + // Connect with google via private service access and share connection + // across google managed services. + PRIVATE_SERVICE_ACCESS = 2; + } + // Required. Unique name of the resource in this scope including project and // location using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` @@ -197,9 +250,9 @@ message Instance { // Note: Redis instances are managed and addressed at regional level so // location_id here refers to a GCP region; however, users may choose which // specific zone (or collection of zones for cross-zone instances) an instance - // should be provisioned in. Refer to [location_id] and - // [alternative_location_id] fields for more details. - string name = 1; + // should be provisioned in. Refer to [location_id][google.cloud.redis.v1.Instance.location_id] and + // [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details. + string name = 1 [(google.api.field_behavior) = REQUIRED]; // An arbitrary and optional user-provided name for the instance. string display_name = 2; @@ -210,88 +263,99 @@ message Instance { // Optional. The zone where the instance will be provisioned. If not provided, // the service will choose a zone for the instance. For STANDARD_HA tier, // instances will be created across two zones for protection against zonal - // failures. If [alternative_location_id] is also provided, it must be - // different from [location_id]. - string location_id = 4; + // failures. If [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] is also provided, it must be + // different from [location_id][google.cloud.redis.v1.Instance.location_id]. + string location_id = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Only applicable to STANDARD_HA tier which protects the instance // against zonal failures by provisioning it across two zones. If provided, it - // must be a different zone from the one provided in [location_id]. - string alternative_location_id = 5; + // must be a different zone from the one provided in [location_id][google.cloud.redis.v1.Instance.location_id]. + string alternative_location_id = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. The version of Redis software. - // If not provided, latest supported version will be used. Updating the - // version will perform an upgrade/downgrade to the new version. Currently, - // the supported values are: + // If not provided, latest supported version will be used. Currently, the + // supported values are: // - // * `REDIS_4_0` for Redis 4.0 compatibility (default) // * `REDIS_3_2` for Redis 3.2 compatibility - string redis_version = 7; + // * `REDIS_4_0` for Redis 4.0 compatibility (default) + // * `REDIS_5_0` for Redis 5.0 compatibility + string redis_version = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The CIDR range of internal addresses that are reserved for this // instance. If not provided, the service will choose an unused /29 block, // for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique // and non-overlapping with existing subnets in an authorized network. - string reserved_ip_range = 9; + string reserved_ip_range = 9 [(google.api.field_behavior) = OPTIONAL]; // Output only. Hostname or IP address of the exposed Redis endpoint used by // clients to connect to the service. - string host = 10; + string host = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The port number of the exposed Redis endpoint. - int32 port = 11; + int32 port = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current zone where the Redis endpoint is placed. For Basic - // Tier instances, this will always be the same as the [location_id] + // Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1.Instance.location_id] // provided by the user at creation time. For Standard Tier instances, - // this can be either [location_id] or [alternative_location_id] and can + // this can be either [location_id][google.cloud.redis.v1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] and can // change after a failover event. - string current_location_id = 12; + string current_location_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the instance was created. - google.protobuf.Timestamp create_time = 13; + google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of this instance. - State state = 14; + State state = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Additional information about the current status of this // instance, if available. - string status_message = 15; + string status_message = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. Redis configuration parameters, according to // http://redis.io/topics/config. Currently, the only supported parameters // are: // - // Redis 3.2 and above: + // Redis version 3.2 and newer: // // * maxmemory-policy // * notify-keyspace-events // - // Redis 4.0 and above: + // Redis version 4.0 and newer: // // * activedefrag - // * lfu-log-factor // * lfu-decay-time - map redis_configs = 16; + // * lfu-log-factor + // * maxmemory-gb + // + // Redis version 5.0 and newer: + // + // * stream-node-max-bytes + // * stream-node-max-entries + map redis_configs = 16 [(google.api.field_behavior) = OPTIONAL]; // Required. The service tier of the instance. - Tier tier = 17; + Tier tier = 17 [(google.api.field_behavior) = REQUIRED]; // Required. Redis memory size in GiB. - int32 memory_size_gb = 18; + int32 memory_size_gb = 18 [(google.api.field_behavior) = REQUIRED]; // Optional. The full name of the Google Compute Engine // [network](/compute/docs/networks-and-firewalls#networks) to which the // instance is connected. If left unspecified, the `default` network // will be used. - string authorized_network = 20; + string authorized_network = 20 [(google.api.field_behavior) = OPTIONAL]; // Output only. Cloud IAM identity used by import / export operations to // transfer data to/from Cloud Storage. Format is // "serviceAccount:". The value may change over time // for a given instance so should be checked before each import/export // operation. - string persistence_iam_identity = 21; + string persistence_iam_identity = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The connect mode of Redis instance. + // If not provided, default one will be used. + // Current default: DIRECT_PEERING. + ConnectMode connect_mode = 22 [(google.api.field_behavior) = OPTIONAL]; } // Request for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. @@ -299,19 +363,24 @@ message ListInstancesRequest { // Required. The resource name of the instance location using the form: // `projects/{project_id}/locations/{location_id}` // where `location_id` refers to a GCP region. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. // // If not specified, a default value of 1000 will be used by the service. // Regardless of the page_size value, the response may include a partial list // and a caller should only rely on response's - // [next_page_token][CloudRedis.ListInstancesResponse.next_page_token] + // [`next_page_token`][google.cloud.redis.v1.ListInstancesResponse.next_page_token] // to determine if there are more instances left to be queried. int32 page_size = 2; - // The next_page_token value returned from a previous List request, - // if any. + // The `next_page_token` value returned from a previous + // [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any. string page_token = 3; } @@ -323,10 +392,10 @@ message ListInstancesResponse { // If the `location_id` in the parent field of the request is "-", all regions // available to the project are queried, and the results aggregated. // If in such an aggregated query a location is unavailable, a dummy Redis - // entry is included in the response with the "name" field set to a value of - // the form projects/{project_id}/locations/{location_id}/instances/- and the - // "status" field set to ERROR and "status_message" field set to "location not - // available for ListInstances". + // entry is included in the response with the `name` field set to a value of + // the form `projects/{project_id}/locations/{location_id}/instances/`- and + // the `status` field set to ERROR and `status_message` field set to "location + // not available for ListInstances". repeated Instance instances = 1; // Token to retrieve the next page of results, or empty if there are no more @@ -342,7 +411,12 @@ message GetInstanceRequest { // Required. Redis instance resource name using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // where `location_id` refers to a GCP region. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "redis.googleapis.com/Instance" + } + ]; } // Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance]. @@ -350,7 +424,12 @@ message CreateInstanceRequest { // Required. The resource name of the instance location using the form: // `projects/{project_id}/locations/{location_id}` // where `location_id` refers to a GCP region. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // Required. The logical name of the Redis instance in the customer project // with the following restrictions: @@ -360,27 +439,27 @@ message CreateInstanceRequest { // * Must be between 1-40 characters. // * Must end with a number or a letter. // * Must be unique within the customer project / location - string instance_id = 2; + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. A Redis [Instance] resource - Instance instance = 3; + Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; } // Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance]. message UpdateInstanceRequest { // Required. Mask of fields to update. At least one path must be supplied in // this field. The elements of the repeated paths field may only include these - // fields from [Instance][CloudRedis.Instance]: + // fields from [Instance][google.cloud.redis.v1.Instance]: // // * `displayName` // * `labels` // * `memorySizeGb` // * `redisConfig` - google.protobuf.FieldMask update_mask = 1; + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Update description. // Only fields specified in update_mask are updated. - Instance instance = 2; + Instance instance = 2 [(google.api.field_behavior) = REQUIRED]; } // Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance]. @@ -388,13 +467,18 @@ message DeleteInstanceRequest { // Required. Redis instance resource name using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // where `location_id` refers to a GCP region. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "redis.googleapis.com/Instance" + } + ]; } // The Cloud Storage location for the input content message GcsSource { // Required. Source data URI. (e.g. 'gs://my_bucket/my_object'). - string uri = 1; + string uri = 1 [(google.api.field_behavior) = REQUIRED]; } // The input content @@ -411,17 +495,17 @@ message ImportInstanceRequest { // Required. Redis instance resource name using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // where `location_id` refers to a GCP region. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Specify data to be imported. - InputConfig input_config = 3; + InputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED]; } // The Cloud Storage location for the output content message GcsDestination { // Required. Data destination URI (e.g. // 'gs://my_bucket/my_object'). Existing files will be overwritten. - string uri = 1; + string uri = 1 [(google.api.field_behavior) = REQUIRED]; } // The output content @@ -438,14 +522,15 @@ message ExportInstanceRequest { // Required. Redis instance resource name using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // where `location_id` refers to a GCP region. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Specify data to be exported. - OutputConfig output_config = 3; + OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; } // Request for [Failover][google.cloud.redis.v1.CloudRedis.FailoverInstance]. message FailoverInstanceRequest { + // Specifies different modes of operation in relation to the data retention. enum DataProtectionMode { // Defaults to LIMITED_DATA_LOSS if a data protection mode is not // specified. @@ -464,11 +549,16 @@ message FailoverInstanceRequest { // Required. Redis instance resource name using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // where `location_id` refers to a GCP region. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "redis.googleapis.com/Instance" + } + ]; // Optional. Available data protection modes that the user can choose. If it's // unspecified, data protection mode will be LIMITED_DATA_LOSS by default. - DataProtectionMode data_protection_mode = 2; + DataProtectionMode data_protection_mode = 2 [(google.api.field_behavior) = OPTIONAL]; } // Represents the v1 metadata of the long-running operation. @@ -504,7 +594,7 @@ message LocationMetadata { // by the lowercase ID of each zone, as defined by GCE. These keys can be // specified in `location_id` or `alternative_location_id` fields when // creating a Redis instance. - map available_zones = 1; + map available_zones = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Defines specific information for a particular zone. Currently empty and diff --git a/google/cloud/redis/v1/redis_gapic.legacy.yaml b/google/cloud/redis/v1/redis_gapic.legacy.yaml new file mode 100644 index 000000000..664c96908 --- /dev/null +++ b/google/cloud/redis/v1/redis_gapic.legacy.yaml @@ -0,0 +1,298 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.redis.v1 + python: + package_name: google.cloud.redis_v1.gapic + go: + package_name: cloud.google.com/go/redis/apiv1 + csharp: + package_name: Google.Cloud.Redis.V1 + ruby: + package_name: Google::Cloud::Redis::V1 + php: + package_name: Google\Cloud\Redis\V1 + nodejs: + package_name: redis.v1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.redis.v1.CloudRedis + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/instances/{instance} + entity_name: instance + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListInstances + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: instances + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetInstance + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: instance + timeout_millis: 60000 + - name: CreateInstance + flattening: + groups: + - parameters: + - parent + - instance_id + - instance + required_fields: + - parent + - instance_id + - instance + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + long_running: + return_type: google.cloud.redis.v1.Instance + metadata_type: google.cloud.redis.v1.OperationMetadata + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 1200000 # 20 minutes + timeout_millis: 60000 + sample_code_init_fields: + - instance_id="test_instance" + - instance.tier="BASIC" + - instance.memory_size_gb=1 + - name: UpdateInstance + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - update_mask + - instance + required_fields: + - update_mask + - instance + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + instance.name: instance + long_running: + return_type: google.cloud.redis.v1.Instance + metadata_type: google.cloud.redis.v1.OperationMetadata + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 7200000 # 120 minutes + timeout_millis: 60000 + sample_code_init_fields: + - update_mask.paths[0]="display_name" + - update_mask.paths[1]="memory_size_gb" + - instance.display_name="UpdatedDisplayName" + - instance.memory_size_gb=4 + - name: ImportInstance + flattening: + groups: + - parameters: + - name + - input_config + required_fields: + - name + - input_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: instance + long_running: + return_type: google.cloud.redis.v1.Instance + metadata_type: google.cloud.redis.v1.OperationMetadata + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 18000000 # 300 minutes + timeout_millis: 60000 + - name: ExportInstance + flattening: + groups: + - parameters: + - name + - output_config + required_fields: + - name + - output_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: instance + long_running: + return_type: google.cloud.redis.v1.Instance + metadata_type: google.cloud.redis.v1.OperationMetadata + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 18000000 # 300 minutes + timeout_millis: 60000 + - name: FailoverInstance + flattening: + groups: + - parameters: + - name + - data_protection_mode + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: instance + resource_name_treatment: STATIC_TYPES + long_running: + return_type: google.cloud.redis.v1.Instance + metadata_type: google.cloud.redis.v1.OperationMetadata + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 1200000 # 20 minutes + timeout_millis: 60000 + - name: DeleteInstance + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: instance + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.redis.v1.OperationMetadata + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 1200000 # 20 minutes + timeout_millis: 60000 +resource_name_generation: +- message_name: ListInstancesRequest + field_entity_map: + parent: location +- message_name: GetInstanceRequest + field_entity_map: + name: instance +- message_name: CreateInstanceRequest + field_entity_map: + parent: location +- message_name: DeleteInstanceRequest + field_entity_map: + name: instance +- message_name: FailoverInstanceRequest + field_entity_map: + name: instance diff --git a/google/cloud/redis/v1/redis_gapic.yaml b/google/cloud/redis/v1/redis_gapic.yaml index bfff68c58..f94350faa 100644 --- a/google/cloud/redis/v1/redis_gapic.yaml +++ b/google/cloud/redis/v1/redis_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -21,22 +21,6 @@ language_settings: interfaces: # The fully qualified name of the API interface. - name: google.cloud.redis.v1.CloudRedis - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/locations/{location} - entity_name: location - - name_pattern: projects/{project}/locations/{location}/instances/{instance} - entity_name: instance - # Definition for retryable codes. retry_codes_def: - name: idempotent retry_codes: @@ -54,246 +38,56 @@ interfaces: rpc_timeout_multiplier: 1 max_rpc_timeout_millis: 20000 total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: ListInstances - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: instances retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - name: GetInstance - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - name: instance - timeout_millis: 60000 - name: CreateInstance - flattening: - groups: - - parameters: - - parent - - instance_id - - instance - required_fields: - - parent - - instance_id - - instance - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - long_running: - return_type: google.cloud.redis.v1.Instance - metadata_type: google.cloud.redis.v1.OperationMetadata - initial_poll_delay_millis: 60000 # 1 minutes - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 360000 # 6 minutes - total_poll_timeout_millis: 1200000 # 20 minutes - timeout_millis: 60000 sample_code_init_fields: - instance_id="test_instance" - instance.tier="BASIC" - instance.memory_size_gb=1 - - name: UpdateInstance - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - update_mask - - instance - required_fields: - - update_mask - - instance - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - instance.name: instance long_running: - return_type: google.cloud.redis.v1.Instance - metadata_type: google.cloud.redis.v1.OperationMetadata initial_poll_delay_millis: 60000 # 1 minutes poll_delay_multiplier: 1.5 max_poll_delay_millis: 360000 # 6 minutes total_poll_timeout_millis: 7200000 # 120 minutes - timeout_millis: 60000 + - name: UpdateInstance sample_code_init_fields: - update_mask.paths[0]="display_name" - update_mask.paths[1]="memory_size_gb" - instance.display_name="UpdatedDisplayName" - - instance.memory_size_gb=4 + - instance.name="projects//locations//instances/" + - instance.memory_size_gb=4 + long_running: + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 7200000 # 120 minutes - name: ImportInstance - flattening: - groups: - - parameters: - - name - - input_config - required_fields: - - name - - input_config - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: instance long_running: - return_type: google.cloud.redis.v1.Instance - metadata_type: google.cloud.redis.v1.OperationMetadata initial_poll_delay_millis: 60000 # 1 minutes poll_delay_multiplier: 1.5 max_poll_delay_millis: 360000 # 6 minutes total_poll_timeout_millis: 18000000 # 300 minutes - timeout_millis: 60000 - name: ExportInstance - flattening: - groups: - - parameters: - - name - - output_config - required_fields: - - name - - output_config - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: instance long_running: - return_type: google.cloud.redis.v1.Instance - metadata_type: google.cloud.redis.v1.OperationMetadata initial_poll_delay_millis: 60000 # 1 minutes poll_delay_multiplier: 1.5 max_poll_delay_millis: 360000 # 6 minutes total_poll_timeout_millis: 18000000 # 300 minutes - timeout_millis: 60000 - name: FailoverInstance - flattening: - groups: - - parameters: - - name - - data_protection_mode - required_fields: - - name - - data_protection_mode - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: instance - resource_name_treatment: STATIC_TYPES long_running: - return_type: google.cloud.redis.v1.Instance - metadata_type: google.cloud.redis.v1.OperationMetadata initial_poll_delay_millis: 60000 # 1 minutes poll_delay_multiplier: 1.5 max_poll_delay_millis: 360000 # 6 minutes total_poll_timeout_millis: 1200000 # 20 minutes - timeout_millis: 60000 - name: DeleteInstance - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: instance long_running: - return_type: google.protobuf.Empty - metadata_type: google.cloud.redis.v1.OperationMetadata initial_poll_delay_millis: 60000 # 1 minutes poll_delay_multiplier: 1.5 max_poll_delay_millis: 360000 # 6 minutes total_poll_timeout_millis: 1200000 # 20 minutes - timeout_millis: 60000 -resource_name_generation: -- message_name: ListInstancesRequest - field_entity_map: - parent: location -- message_name: GetInstanceRequest - field_entity_map: - name: instance -- message_name: CreateInstanceRequest - field_entity_map: - parent: location -- message_name: DeleteInstanceRequest - field_entity_map: - name: instance -- message_name: FailoverInstanceRequest - field_entity_map: - name: instance diff --git a/google/cloud/redis/v1/redis_grpc_service_config.json b/google/cloud/redis/v1/redis_grpc_service_config.json new file mode 100755 index 000000000..ecd12cc81 --- /dev/null +++ b/google/cloud/redis/v1/redis_grpc_service_config.json @@ -0,0 +1,45 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.redis.v1.CloudRedis", + "method": "ListInstances" + }, + { + "service": "google.cloud.redis.v1.CloudRedis", + "method": "GetInstance" + }, + { + "service": "google.cloud.redis.v1.CloudRedis", + "method": "CreateInstance" + }, + { + "service": "google.cloud.redis.v1.CloudRedis", + "method": "UpdateInstance" + }, + { + "service": "google.cloud.redis.v1.CloudRedis", + "method": "UpgradeInstance" + }, + { + "service": "google.cloud.redis.v1.CloudRedis", + "method": "ImportInstance" + }, + { + "service": "google.cloud.redis.v1.CloudRedis", + "method": "ExportInstance" + }, + { + "service": "google.cloud.redis.v1.CloudRedis", + "method": "FailoverInstance" + }, + { + "service": "google.cloud.redis.v1.CloudRedis", + "method": "DeleteInstance" + } + ], + "timeout": "600s" + } + ] +} diff --git a/google/cloud/redis/v1/redis_v1.yaml b/google/cloud/redis/v1/redis_v1.yaml new file mode 100644 index 000000000..baee17fa0 --- /dev/null +++ b/google/cloud/redis/v1/redis_v1.yaml @@ -0,0 +1,47 @@ +type: google.api.Service +config_version: 3 +name: redis.googleapis.com +title: Google Cloud Memorystore for Redis API + +apis: +- name: google.cloud.redis.v1.CloudRedis + +types: +- name: google.cloud.redis.v1.LocationMetadata +- name: google.cloud.redis.v1.OperationMetadata +- name: google.cloud.redis.v1.ZoneMetadata + +documentation: + summary: Creates and manages Redis instances on the Google Cloud Platform. + +backend: + rules: + - selector: 'google.cloud.redis.v1.CloudRedis.*' + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + +http: + rules: + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=projects/*/locations/*}/operations' + + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=projects/*/locations/*/operations/*}' + + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=projects/*/locations/*/operations/*}' + + - selector: google.longrunning.Operations.CancelOperation + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel' + +authentication: + rules: + - selector: 'google.cloud.redis.v1.CloudRedis.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/redis/v1beta1/BUILD.bazel b/google/cloud/redis/v1beta1/BUILD.bazel index cedc6e83d..4e4aac709 100644 --- a/google/cloud/redis/v1beta1/BUILD.bazel +++ b/google/cloud/redis/v1beta1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -14,9 +17,9 @@ proto_library( deps = [ "//google/api:annotations_proto", "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/api:resource_proto", "//google/longrunning:operations_proto", - "//google/rpc:status_proto", "@com_google_protobuf//:field_mask_proto", "@com_google_protobuf//:timestamp_proto", ], @@ -24,7 +27,10 @@ proto_library( proto_library_with_info( name = "redis_proto_with_info", - deps = [":redis_proto"], + deps = [ + ":redis_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -32,18 +38,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "redis_java_proto", deps = [":redis_proto"], @@ -52,51 +53,40 @@ java_proto_library( java_grpc_library( name = "redis_java_grpc", srcs = [":redis_proto"], - deps = [":redis_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "redis_resource_name_java_proto", - gapic_yaml = "redis_gapic.yaml", - deps = [":redis_proto"], + deps = [":redis_java_proto"], ) java_gapic_library( name = "redis_java_gapic", src = ":redis_proto_with_info", gapic_yaml = "redis_gapic.yaml", - service_yaml = "//google/cloud/redis:redis_v1beta1.yaml", - test_deps = [":redis_java_grpc"], + package = "google.cloud.redis.v1beta1", + service_yaml = "redis_v1beta1.yaml", + test_deps = [ + ":redis_java_grpc", + ], deps = [ ":redis_java_proto", - ":redis_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":redis_java_gapic_test", +java_gapic_test( + name = "redis_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.redis.v1beta1.CloudRedisClientTest", ], -) for test_name in [ - "com.google.cloud.redis.v1beta1.CloudRedisClientTest", -]] + runtime_deps = [":redis_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-redis-v1beta1-java", - client_deps = [":redis_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":redis_java_gapic_test"], - grpc_deps = [":redis_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":redis_java_gapic", + ":redis_java_grpc", ":redis_java_proto", ":redis_proto", - ":redis_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -104,10 +94,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -123,15 +113,16 @@ go_proto_library( go_gapic_library( name = "redis_go_gapic", - src = ":redis_proto_with_info", - gapic_yaml = "redis_gapic.yaml", - importpath = "cloud.google.com/go/redis/apiv1beta1", - service_yaml = "//google/cloud/redis:redis_v1beta1.yaml", + srcs = [":redis_proto_with_info"], + grpc_service_config = "redis_grpc_service_config.json", + importpath = "cloud.google.com/go/redis/apiv1beta1;redis", + service_yaml = "redis_v1beta1.yaml", deps = [ ":redis_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", "@io_bazel_rules_go//proto/wkt:any_go_proto", ], ) @@ -143,13 +134,235 @@ go_test( importpath = "cloud.google.com/go/redis/apiv1beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-redis-v1beta1-go", deps = [ ":redis_go_gapic", - ":redis_go_gapic_srcjar-smoke-test.srcjar", ":redis_go_gapic_srcjar-test.srcjar", ":redis_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "redis_moved_proto", + srcs = [":redis_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "redis_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":redis_moved_proto"], +) + +py_grpc_library( + name = "redis_py_grpc", + srcs = [":redis_moved_proto"], + deps = [":redis_py_proto"], +) + +py_gapic_library( + name = "redis_py_gapic", + src = ":redis_proto_with_info", + gapic_yaml = "redis_gapic.yaml", + package = "google.cloud.redis.v1beta1", + service_yaml = "redis_v1beta1.yaml", + deps = [ + ":redis_py_grpc", + ":redis_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "redis-v1beta1-py", + deps = [ + ":redis_py_gapic", + ":redis_py_grpc", + ":redis_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "redis_php_proto", + deps = [":redis_proto"], +) + +php_grpc_library( + name = "redis_php_grpc", + srcs = [":redis_proto"], + deps = [":redis_php_proto"], +) + +php_gapic_library( + name = "redis_php_gapic", + src = ":redis_proto_with_info", + gapic_yaml = "redis_gapic.yaml", + package = "google.cloud.redis.v1beta1", + service_yaml = "redis_v1beta1.yaml", + deps = [ + ":redis_php_grpc", + ":redis_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-redis-v1beta1-php", + deps = [ + ":redis_php_gapic", + ":redis_php_grpc", + ":redis_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "redis_nodejs_gapic", + src = ":redis_proto_with_info", + gapic_yaml = "redis_gapic.yaml", + package = "google.cloud.redis.v1beta1", + service_yaml = "redis_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "redis-v1beta1-nodejs", + deps = [ + ":redis_nodejs_gapic", + ":redis_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "redis_ruby_proto", + deps = [":redis_proto"], +) + +ruby_grpc_library( + name = "redis_ruby_grpc", + srcs = [":redis_proto"], + deps = [":redis_ruby_proto"], +) + +ruby_gapic_library( + name = "redis_ruby_gapic", + src = ":redis_proto_with_info", + gapic_yaml = "redis_gapic.yaml", + package = "google.cloud.redis.v1beta1", + service_yaml = "redis_v1beta1.yaml", + deps = [ + ":redis_ruby_grpc", + ":redis_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-redis-v1beta1-ruby", + deps = [ + ":redis_ruby_gapic", + ":redis_ruby_grpc", + ":redis_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "redis_csharp_proto", + deps = [":redis_proto"], +) + +csharp_grpc_library( + name = "redis_csharp_grpc", + srcs = [":redis_proto"], + deps = [":redis_csharp_proto"], +) + +csharp_gapic_library( + name = "redis_csharp_gapic", + src = ":redis_proto_with_info", + gapic_yaml = "redis_gapic.yaml", + package = "google.cloud.redis.v1beta1", + service_yaml = "redis_v1beta1.yaml", + deps = [ + ":redis_csharp_grpc", + ":redis_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-redis-v1beta1-csharp", + deps = [ + ":redis_csharp_gapic", + ":redis_csharp_grpc", + ":redis_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/redis/v1beta1/cloud_redis.proto b/google/cloud/redis/v1beta1/cloud_redis.proto index 699df83fa..47d9a6fef 100644 --- a/google/cloud/redis/v1beta1/cloud_redis.proto +++ b/google/cloud/redis/v1beta1/cloud_redis.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,17 +11,18 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.redis.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/client.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/redis/v1beta1;redis"; option java_multiple_files = true; @@ -45,11 +46,13 @@ option java_package = "com.google.cloud.redis.v1beta1"; // * `projects/redpepper-1290/locations/us-central1/instances/my-redis` service CloudRedis { option (google.api.default_host) = "redis.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; // Lists all Redis instances owned by a project in either the specified // location (region) or all locations. // // The location should have the following format: + // // * `projects/{project_id}/locations/{location_id}` // // If `location_id` is specified as `-` (wildcard), then all regions @@ -58,6 +61,7 @@ service CloudRedis { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*}/instances" }; + option (google.api.method_signature) = "parent"; } // Gets the details of a specific Redis instance. @@ -65,6 +69,7 @@ service CloudRedis { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/instances/*}" }; + option (google.api.method_signature) = "name"; } // Creates a Redis instance based on the specified tier and memory size. @@ -84,6 +89,11 @@ service CloudRedis { post: "/v1beta1/{parent=projects/*/locations/*}/instances" body: "instance" }; + option (google.api.method_signature) = "parent,instance_id,instance"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.redis.v1beta1.Instance" + metadata_type: "google.protobuf.Any" + }; } // Updates the metadata and configuration of a specific Redis instance. @@ -96,6 +106,25 @@ service CloudRedis { patch: "/v1beta1/{instance.name=projects/*/locations/*/instances/*}" body: "instance" }; + option (google.api.method_signature) = "update_mask,instance"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.redis.v1beta1.Instance" + metadata_type: "google.protobuf.Any" + }; + } + + // Upgrades Redis instance to the newer Redis version specified in the + // request. + rpc UpgradeInstance(UpgradeInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/instances/*}:upgrade" + body: "*" + }; + option (google.api.method_signature) = "name,redis_version"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.redis.v1beta1.Instance" + metadata_type: "google.protobuf.Any" + }; } // Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. @@ -111,6 +140,11 @@ service CloudRedis { post: "/v1beta1/{name=projects/*/locations/*/instances/*}:import" body: "*" }; + option (google.api.method_signature) = "name,input_config"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.redis.v1beta1.Instance" + metadata_type: "google.protobuf.Any" + }; } // Export Redis instance data into a Redis RDB format file in Cloud Storage. @@ -124,6 +158,11 @@ service CloudRedis { post: "/v1beta1/{name=projects/*/locations/*/instances/*}:export" body: "*" }; + option (google.api.method_signature) = "name,output_config"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.redis.v1beta1.Instance" + metadata_type: "google.protobuf.Any" + }; } // Initiates a failover of the master node to current replica node for a @@ -133,6 +172,11 @@ service CloudRedis { post: "/v1beta1/{name=projects/*/locations/*/instances/*}:failover" body: "*" }; + option (google.api.method_signature) = "name,data_protection_mode"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.redis.v1beta1.Instance" + metadata_type: "google.protobuf.Any" + }; } // Deletes a specific Redis instance. Instance stops serving and data is @@ -141,11 +185,21 @@ service CloudRedis { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/instances/*}" }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Any" + }; } } // A Google Cloud Redis instance. message Instance { + option (google.api.resource) = { + type: "redis.googleapis.com/Instance" + pattern: "projects/{project}/locations/{location}/instances/{instance}" + }; + // Represents the different states of a Redis instance. enum State { // Not set. @@ -190,6 +244,19 @@ message Instance { STANDARD_HA = 3; } + // Available connection modes. + enum ConnectMode { + // Not set. + CONNECT_MODE_UNSPECIFIED = 0; + + // Connect via directly peering with memorystore redis hosted service. + DIRECT_PEERING = 1; + + // Connect with google via private service access and share connection + // across google managed services. + PRIVATE_SERVICE_ACCESS = 2; + } + // Required. Unique name of the resource in this scope including project and // location using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` @@ -197,9 +264,9 @@ message Instance { // Note: Redis instances are managed and addressed at regional level so // location_id here refers to a GCP region; however, users may choose which // specific zone (or collection of zones for cross-zone instances) an instance - // should be provisioned in. Refer to [location_id] and - // [alternative_location_id] fields for more details. - string name = 1; + // should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and + // [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details. + string name = 1 [(google.api.field_behavior) = REQUIRED]; // An arbitrary and optional user-provided name for the instance. string display_name = 2; @@ -210,88 +277,99 @@ message Instance { // Optional. The zone where the instance will be provisioned. If not provided, // the service will choose a zone for the instance. For STANDARD_HA tier, // instances will be created across two zones for protection against zonal - // failures. If [alternative_location_id] is also provided, it must be - // different from [location_id]. - string location_id = 4; + // failures. If [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] is also provided, it must be + // different from [location_id][google.cloud.redis.v1beta1.Instance.location_id]. + string location_id = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Only applicable to STANDARD_HA tier which protects the instance // against zonal failures by provisioning it across two zones. If provided, it - // must be a different zone from the one provided in [location_id]. - string alternative_location_id = 5; + // must be a different zone from the one provided in [location_id][google.cloud.redis.v1beta1.Instance.location_id]. + string alternative_location_id = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. The version of Redis software. - // If not provided, latest supported version will be used. Updating the - // version will perform an upgrade/downgrade to the new version. Currently, - // the supported values are: + // If not provided, latest supported version will be used. Currently, the + // supported values are: // - // * `REDIS_4_0` for Redis 4.0 compatibility (default) // * `REDIS_3_2` for Redis 3.2 compatibility - string redis_version = 7; + // * `REDIS_4_0` for Redis 4.0 compatibility (default) + // * `REDIS_5_0` for Redis 5.0 compatibility + string redis_version = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The CIDR range of internal addresses that are reserved for this // instance. If not provided, the service will choose an unused /29 block, // for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique // and non-overlapping with existing subnets in an authorized network. - string reserved_ip_range = 9; + string reserved_ip_range = 9 [(google.api.field_behavior) = OPTIONAL]; // Output only. Hostname or IP address of the exposed Redis endpoint used by // clients to connect to the service. - string host = 10; + string host = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The port number of the exposed Redis endpoint. - int32 port = 11; + int32 port = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current zone where the Redis endpoint is placed. For Basic - // Tier instances, this will always be the same as the [location_id] + // Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1beta1.Instance.location_id] // provided by the user at creation time. For Standard Tier instances, - // this can be either [location_id] or [alternative_location_id] and can + // this can be either [location_id][google.cloud.redis.v1beta1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] and can // change after a failover event. - string current_location_id = 12; + string current_location_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the instance was created. - google.protobuf.Timestamp create_time = 13; + google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of this instance. - State state = 14; + State state = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Additional information about the current status of this // instance, if available. - string status_message = 15; + string status_message = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. Redis configuration parameters, according to // http://redis.io/topics/config. Currently, the only supported parameters // are: // - // Redis 3.2 and above: + // Redis version 3.2 and newer: // // * maxmemory-policy // * notify-keyspace-events // - // Redis 4.0 and above: + // Redis version 4.0 and newer: // // * activedefrag - // * lfu-log-factor // * lfu-decay-time - map redis_configs = 16; + // * lfu-log-factor + // * maxmemory-gb + // + // Redis version 5.0 and newer: + // + // * stream-node-max-bytes + // * stream-node-max-entries + map redis_configs = 16 [(google.api.field_behavior) = OPTIONAL]; // Required. The service tier of the instance. - Tier tier = 17; + Tier tier = 17 [(google.api.field_behavior) = REQUIRED]; // Required. Redis memory size in GiB. - int32 memory_size_gb = 18; + int32 memory_size_gb = 18 [(google.api.field_behavior) = REQUIRED]; // Optional. The full name of the Google Compute Engine // [network](/compute/docs/networks-and-firewalls#networks) to which the // instance is connected. If left unspecified, the `default` network // will be used. - string authorized_network = 20; + string authorized_network = 20 [(google.api.field_behavior) = OPTIONAL]; // Output only. Cloud IAM identity used by import / export operations to // transfer data to/from Cloud Storage. Format is // "serviceAccount:". The value may change over time // for a given instance so should be checked before each import/export // operation. - string persistence_iam_identity = 21; + string persistence_iam_identity = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The connect mode of Redis instance. + // If not provided, default one will be used. + // Current default: DIRECT_PEERING. + ConnectMode connect_mode = 22 [(google.api.field_behavior) = OPTIONAL]; } // Request for [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances]. @@ -299,19 +377,24 @@ message ListInstancesRequest { // Required. The resource name of the instance location using the form: // `projects/{project_id}/locations/{location_id}` // where `location_id` refers to a GCP region. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. // // If not specified, a default value of 1000 will be used by the service. // Regardless of the page_size value, the response may include a partial list // and a caller should only rely on response's - // [next_page_token][CloudRedis.ListInstancesResponse.next_page_token] + // [`next_page_token`][google.cloud.redis.v1beta1.ListInstancesResponse.next_page_token] // to determine if there are more instances left to be queried. int32 page_size = 2; - // The next_page_token value returned from a previous List request, - // if any. + // The `next_page_token` value returned from a previous + // [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances] request, if any. string page_token = 3; } @@ -323,10 +406,10 @@ message ListInstancesResponse { // If the `location_id` in the parent field of the request is "-", all regions // available to the project are queried, and the results aggregated. // If in such an aggregated query a location is unavailable, a dummy Redis - // entry is included in the response with the "name" field set to a value of - // the form projects/{project_id}/locations/{location_id}/instances/- and the - // "status" field set to ERROR and "status_message" field set to "location not - // available for ListInstances". + // entry is included in the response with the `name` field set to a value of + // the form `projects/{project_id}/locations/{location_id}/instances/`- and + // the `status` field set to ERROR and `status_message` field set to "location + // not available for ListInstances". repeated Instance instances = 1; // Token to retrieve the next page of results, or empty if there are no more @@ -342,7 +425,12 @@ message GetInstanceRequest { // Required. Redis instance resource name using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // where `location_id` refers to a GCP region. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "redis.googleapis.com/Instance" + } + ]; } // Request for [CreateInstance][google.cloud.redis.v1beta1.CloudRedis.CreateInstance]. @@ -350,7 +438,12 @@ message CreateInstanceRequest { // Required. The resource name of the instance location using the form: // `projects/{project_id}/locations/{location_id}` // where `location_id` refers to a GCP region. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // Required. The logical name of the Redis instance in the customer project // with the following restrictions: @@ -360,10 +453,10 @@ message CreateInstanceRequest { // * Must be between 1-40 characters. // * Must end with a number or a letter. // * Must be unique within the customer project / location - string instance_id = 2; + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. A Redis [Instance] resource - Instance instance = 3; + Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; } // Request for [UpdateInstance][google.cloud.redis.v1beta1.CloudRedis.UpdateInstance]. @@ -376,11 +469,27 @@ message UpdateInstanceRequest { // * `labels` // * `memorySizeGb` // * `redisConfig` - google.protobuf.FieldMask update_mask = 1; + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Update description. // Only fields specified in update_mask are updated. - Instance instance = 2; + Instance instance = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for [UpgradeInstance][google.cloud.redis.v1beta1.CloudRedis.UpgradeInstance]. +message UpgradeInstanceRequest { + // Required. Redis instance resource name using the form: + // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + // where `location_id` refers to a GCP region. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "redis.googleapis.com/Instance" + } + ]; + + // Required. Specifies the target version of Redis software to upgrade to. + string redis_version = 2 [(google.api.field_behavior) = REQUIRED]; } // Request for [DeleteInstance][google.cloud.redis.v1beta1.CloudRedis.DeleteInstance]. @@ -388,13 +497,18 @@ message DeleteInstanceRequest { // Required. Redis instance resource name using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // where `location_id` refers to a GCP region. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "redis.googleapis.com/Instance" + } + ]; } // The Cloud Storage location for the input content message GcsSource { // Required. Source data URI. (e.g. 'gs://my_bucket/my_object'). - string uri = 1; + string uri = 1 [(google.api.field_behavior) = REQUIRED]; } // The input content @@ -411,17 +525,17 @@ message ImportInstanceRequest { // Required. Redis instance resource name using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // where `location_id` refers to a GCP region. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Specify data to be imported. - InputConfig input_config = 3; + InputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED]; } // The Cloud Storage location for the output content message GcsDestination { // Required. Data destination URI (e.g. // 'gs://my_bucket/my_object'). Existing files will be overwritten. - string uri = 1; + string uri = 1 [(google.api.field_behavior) = REQUIRED]; } // The output content @@ -438,14 +552,15 @@ message ExportInstanceRequest { // Required. Redis instance resource name using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // where `location_id` refers to a GCP region. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Specify data to be exported. - OutputConfig output_config = 3; + OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; } // Request for [Failover][google.cloud.redis.v1beta1.CloudRedis.FailoverInstance]. message FailoverInstanceRequest { + // Specifies different modes of operation in relation to the data retention. enum DataProtectionMode { // Defaults to LIMITED_DATA_LOSS if a data protection mode is not // specified. @@ -464,11 +579,16 @@ message FailoverInstanceRequest { // Required. Redis instance resource name using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // where `location_id` refers to a GCP region. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "redis.googleapis.com/Instance" + } + ]; // Optional. Available data protection modes that the user can choose. If it's // unspecified, data protection mode will be LIMITED_DATA_LOSS by default. - DataProtectionMode data_protection_mode = 2; + DataProtectionMode data_protection_mode = 2 [(google.api.field_behavior) = OPTIONAL]; } // This location metadata represents additional configuration options for a @@ -480,7 +600,7 @@ message LocationMetadata { // by the lowercase ID of each zone, as defined by GCE. These keys can be // specified in `location_id` or `alternative_location_id` fields when // creating a Redis instance. - map available_zones = 1; + map available_zones = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Defines specific information for a particular zone. Currently empty and diff --git a/google/cloud/redis/v1beta1/redis_gapic.legacy.yaml b/google/cloud/redis/v1beta1/redis_gapic.legacy.yaml new file mode 100644 index 000000000..3882ea049 --- /dev/null +++ b/google/cloud/redis/v1beta1/redis_gapic.legacy.yaml @@ -0,0 +1,293 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.redis.v1beta1 + python: + package_name: google.cloud.redis_v1beta1.gapic + go: + package_name: cloud.google.com/go/redis/apiv1beta1 + csharp: + package_name: Google.Cloud.Redis.V1Beta1 + ruby: + package_name: Google::Cloud::Redis::V1beta1 + php: + package_name: Google\Cloud\Redis\V1beta1 + nodejs: + package_name: redis.v1beta1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.redis.v1beta1.CloudRedis + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/instances/{instance} + entity_name: instance + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListInstances + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: instances + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetInstance + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: instance + timeout_millis: 60000 + - name: CreateInstance + flattening: + groups: + - parameters: + - parent + - instance_id + - instance + required_fields: + - parent + - instance_id + - instance + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + long_running: + return_type: google.cloud.redis.v1beta1.Instance + metadata_type: google.protobuf.Any + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 1200000 # 20 minutes + timeout_millis: 60000 + sample_code_init_fields: + - instance_id="test_instance" + - instance.tier="BASIC" + - instance.memory_size_gb=1 + - name: UpdateInstance + flattening: + groups: + - parameters: + - update_mask + - instance + required_fields: + - update_mask + - instance + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + instance.name: instance + resource_name_treatment: STATIC_TYPES + long_running: + return_type: google.cloud.redis.v1beta1.Instance + metadata_type: google.protobuf.Any + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 7200000 # 120 minutes + timeout_millis: 60000 + sample_code_init_fields: + - update_mask.paths[0]="display_name" + - update_mask.paths[1]="memory_size_gb" + - instance.display_name="UpdatedDisplayName" + - instance.memory_size_gb=4 + - name: ImportInstance + flattening: + groups: + - parameters: + - name + - input_config + required_fields: + - name + - input_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: instance + long_running: + return_type: google.cloud.redis.v1beta1.Instance + metadata_type: google.protobuf.Any + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 18000000 # 300 minutes + timeout_millis: 60000 + - name: ExportInstance + flattening: + groups: + - parameters: + - name + - output_config + required_fields: + - name + - output_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: instance + long_running: + return_type: google.cloud.redis.v1beta1.Instance + metadata_type: google.protobuf.Any + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 18000000 # 300 minutes + timeout_millis: 60000 + - name: FailoverInstance + flattening: + groups: + - parameters: + - name + - data_protection_mode + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: instance + long_running: + return_type: google.cloud.redis.v1beta1.Instance + metadata_type: google.protobuf.Any + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 1200000 # 20 minutes + timeout_millis: 60000 + - name: DeleteInstance + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: instance + long_running: + return_type: google.protobuf.Empty + metadata_type: google.protobuf.Any + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 1200000 # 20 minutes + timeout_millis: 60000 +resource_name_generation: +- message_name: ListInstancesRequest + field_entity_map: + parent: location +- message_name: GetInstanceRequest + field_entity_map: + name: instance +- message_name: CreateInstanceRequest + field_entity_map: + parent: location +- message_name: DeleteInstanceRequest + field_entity_map: + name: instance diff --git a/google/cloud/redis/v1beta1/redis_gapic.yaml b/google/cloud/redis/v1beta1/redis_gapic.yaml index 855a5356c..a6844b243 100644 --- a/google/cloud/redis/v1beta1/redis_gapic.yaml +++ b/google/cloud/redis/v1beta1/redis_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -20,22 +20,6 @@ language_settings: interfaces: # The fully qualified name of the API interface. - name: google.cloud.redis.v1beta1.CloudRedis - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/locations/{location} - entity_name: location - - name_pattern: projects/{project}/locations/{location}/instances/{instance} - entity_name: instance - # Definition for retryable codes. retry_codes_def: - name: idempotent retry_codes: @@ -53,242 +37,56 @@ interfaces: rpc_timeout_multiplier: 1 max_rpc_timeout_millis: 20000 total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: ListInstances - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: instances retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - name: GetInstance - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - name: instance - timeout_millis: 60000 - name: CreateInstance - flattening: - groups: - - parameters: - - parent - - instance_id - - instance - required_fields: - - parent - - instance_id - - instance - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - long_running: - return_type: google.cloud.redis.v1beta1.Instance - metadata_type: google.protobuf.Any - initial_poll_delay_millis: 60000 # 1 minutes - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 360000 # 6 minutes - total_poll_timeout_millis: 1200000 # 20 minutes - timeout_millis: 60000 sample_code_init_fields: - instance_id="test_instance" - instance.tier="BASIC" - instance.memory_size_gb=1 - - name: UpdateInstance - flattening: - groups: - - parameters: - - update_mask - - instance - required_fields: - - update_mask - - instance - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - instance.name: instance - resource_name_treatment: STATIC_TYPES long_running: - return_type: google.cloud.redis.v1beta1.Instance - metadata_type: google.protobuf.Any initial_poll_delay_millis: 60000 # 1 minutes poll_delay_multiplier: 1.5 max_poll_delay_millis: 360000 # 6 minutes - total_poll_timeout_millis: 7200000 # 120 minutes - timeout_millis: 60000 + total_poll_timeout_millis: 1200000 # 20 minutes + - name: UpdateInstance sample_code_init_fields: - update_mask.paths[0]="display_name" - update_mask.paths[1]="memory_size_gb" - instance.display_name="UpdatedDisplayName" + - instance.name="projects//locations//instances/" - instance.memory_size_gb=4 + long_running: + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 7200000 # 120 minutes - name: ImportInstance - flattening: - groups: - - parameters: - - name - - input_config - required_fields: - - name - - input_config - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: instance long_running: - return_type: google.cloud.redis.v1beta1.Instance - metadata_type: google.protobuf.Any initial_poll_delay_millis: 60000 # 1 minutes poll_delay_multiplier: 1.5 max_poll_delay_millis: 360000 # 6 minutes total_poll_timeout_millis: 18000000 # 300 minutes - timeout_millis: 60000 - name: ExportInstance - flattening: - groups: - - parameters: - - name - - output_config - required_fields: - - name - - output_config - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: instance long_running: - return_type: google.cloud.redis.v1beta1.Instance - metadata_type: google.protobuf.Any initial_poll_delay_millis: 60000 # 1 minutes poll_delay_multiplier: 1.5 max_poll_delay_millis: 360000 # 6 minutes total_poll_timeout_millis: 18000000 # 300 minutes - timeout_millis: 60000 - name: FailoverInstance - flattening: - groups: - - parameters: - - name - - data_protection_mode - required_fields: - - name - - data_protection_mode - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: instance long_running: - return_type: google.cloud.redis.v1beta1.Instance - metadata_type: google.protobuf.Any initial_poll_delay_millis: 60000 # 1 minutes poll_delay_multiplier: 1.5 max_poll_delay_millis: 360000 # 6 minutes total_poll_timeout_millis: 1200000 # 20 minutes - timeout_millis: 60000 - name: DeleteInstance - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: instance long_running: - return_type: google.protobuf.Empty - metadata_type: google.protobuf.Any initial_poll_delay_millis: 60000 # 1 minutes poll_delay_multiplier: 1.5 max_poll_delay_millis: 360000 # 6 minutes total_poll_timeout_millis: 1200000 # 20 minutes - timeout_millis: 60000 -resource_name_generation: -- message_name: ListInstancesRequest - field_entity_map: - parent: location -- message_name: GetInstanceRequest - field_entity_map: - name: instance -- message_name: CreateInstanceRequest - field_entity_map: - parent: location -- message_name: DeleteInstanceRequest - field_entity_map: - name: instance diff --git a/google/cloud/redis/v1beta1/redis_grpc_service_config.json b/google/cloud/redis/v1beta1/redis_grpc_service_config.json new file mode 100755 index 000000000..014350bf5 --- /dev/null +++ b/google/cloud/redis/v1beta1/redis_grpc_service_config.json @@ -0,0 +1,45 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.redis.v1beta1.CloudRedis", + "method": "ListInstances" + }, + { + "service": "google.cloud.redis.v1beta1.CloudRedis", + "method": "GetInstance" + }, + { + "service": "google.cloud.redis.v1beta1.CloudRedis", + "method": "CreateInstance" + }, + { + "service": "google.cloud.redis.v1beta1.CloudRedis", + "method": "UpdateInstance" + }, + { + "service": "google.cloud.redis.v1beta1.CloudRedis", + "method": "UpgradeInstance" + }, + { + "service": "google.cloud.redis.v1beta1.CloudRedis", + "method": "ImportInstance" + }, + { + "service": "google.cloud.redis.v1beta1.CloudRedis", + "method": "ExportInstance" + }, + { + "service": "google.cloud.redis.v1beta1.CloudRedis", + "method": "FailoverInstance" + }, + { + "service": "google.cloud.redis.v1beta1.CloudRedis", + "method": "DeleteInstance" + } + ], + "timeout": "600s" + } + ] +} diff --git a/google/cloud/redis/v1beta1/redis_v1beta1.yaml b/google/cloud/redis/v1beta1/redis_v1beta1.yaml new file mode 100644 index 000000000..b9e101404 --- /dev/null +++ b/google/cloud/redis/v1beta1/redis_v1beta1.yaml @@ -0,0 +1,43 @@ +type: google.api.Service +config_version: 3 +name: redis.googleapis.com +title: Google Cloud Memorystore for Redis API + +apis: +- name: google.cloud.redis.v1beta1.CloudRedis + +types: +- name: google.cloud.redis.v1beta1.LocationMetadata +- name: google.cloud.redis.v1beta1.ZoneMetadata + +documentation: + summary: Creates and manages Redis instances on the Google Cloud Platform. + +backend: + rules: + - selector: 'google.cloud.redis.v1beta1.CloudRedis.*' + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + +http: + rules: + - selector: google.longrunning.Operations.CancelOperation + post: '/v1beta1/{name=projects/*/locations/*/operations/*}:cancel' + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1beta1/{name=projects/*/locations/*/operations/*}' + - selector: google.longrunning.Operations.GetOperation + get: '/v1beta1/{name=projects/*/locations/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1beta1/{name=projects/*/locations/*}/operations' + +authentication: + rules: + - selector: 'google.cloud.redis.v1beta1.CloudRedis.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/resourcemanager/artman_cloudresourcemanager.yaml b/google/cloud/resourcemanager/artman_cloudresourcemanager.yaml index c3d61249c..d69802e85 100644 --- a/google/cloud/resourcemanager/artman_cloudresourcemanager.yaml +++ b/google/cloud/resourcemanager/artman_cloudresourcemanager.yaml @@ -3,13 +3,14 @@ common: api_version: v2 organization_name: google-cloud proto_deps: - - name: google-common-protos - - name: google-iam-v1 - proto_path: google/iam/v1 + - name: google-common-protos + - name: google-iam-v1 + proto_path: google/iam/v1 src_proto_paths: - v2 - service_yaml: cloudresourcemanager.yaml - gapic_yaml: v2/cloudresourcemanager_gapic.yaml + service_yaml: v2/cloudresourcemanager_v2.yaml + gapic_yaml: v2/cloudresourcemanager_gapic.legacy.yaml + proto_package: google.cloud.resourcemanager.v2 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/resourcemanager/cloudresourcemanager.yaml b/google/cloud/resourcemanager/cloudresourcemanager.yaml deleted file mode 100644 index 7780c301d..000000000 --- a/google/cloud/resourcemanager/cloudresourcemanager.yaml +++ /dev/null @@ -1,56 +0,0 @@ -type: google.api.Service -config_version: 1 -name: cloudresourcemanager.googleapis.com -title: Google Cloud Resource Manager API - -apis: -- name: google.cloud.resourcemanager.v2.Folders - -types: -- name: google.cloud.resourcemanager.v2.FolderOperation - -documentation: - summary: |- - The Google Cloud Resource Manager API provides methods for creating, - reading, and updating project metadata. - -backend: - rules: - - selector: google.cloud.resourcemanager.v2.Folders.ListFolders - deadline: 30.0 - - selector: google.cloud.resourcemanager.v2.Folders.SearchFolders - deadline: 30.0 - - selector: google.cloud.resourcemanager.v2.Folders.GetFolder - deadline: 30.0 - - selector: google.cloud.resourcemanager.v2.Folders.CreateFolder - deadline: 30.0 - - selector: google.cloud.resourcemanager.v2.Folders.UpdateFolder - deadline: 30.0 - - selector: google.cloud.resourcemanager.v2.Folders.MoveFolder - deadline: 30.0 - - selector: google.cloud.resourcemanager.v2.Folders.DeleteFolder - deadline: 30.0 - - selector: google.cloud.resourcemanager.v2.Folders.UndeleteFolder - deadline: 30.0 - - selector: google.cloud.resourcemanager.v2.Folders.GetIamPolicy - deadline: 30.0 - - selector: google.cloud.resourcemanager.v2.Folders.SetIamPolicy - deadline: 30.0 - - selector: google.cloud.resourcemanager.v2.Folders.TestIamPermissions - deadline: 30.0 - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform - - selector: |- - google.cloud.resourcemanager.v2.Folders.GetFolder, - google.cloud.resourcemanager.v2.Folders.GetIamPolicy, - google.cloud.resourcemanager.v2.Folders.ListFolders, - google.cloud.resourcemanager.v2.Folders.SearchFolders - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/cloud-platform.read-only diff --git a/google/cloud/resourcemanager/v2/BUILD.bazel b/google/cloud/resourcemanager/v2/BUILD.bazel new file mode 100644 index 000000000..590122c0d --- /dev/null +++ b/google/cloud/resourcemanager/v2/BUILD.bazel @@ -0,0 +1,175 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "resourcemanager_proto", + srcs = [ + "folders.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "resourcemanager_proto_with_info", + deps = [ + ":resourcemanager_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "resourcemanager_java_proto", + deps = [":resourcemanager_proto"], +) + +java_grpc_library( + name = "resourcemanager_java_grpc", + srcs = [":resourcemanager_proto"], + deps = [":resourcemanager_java_proto"], +) + +############################################################################# +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "resourcemanager_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/resourcemanager/v2", + protos = [":resourcemanager_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "resourcemanager_moved_proto", + srcs = [":resourcemanager_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "resourcemanager_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":resourcemanager_moved_proto"], +) + +py_grpc_library( + name = "resourcemanager_py_grpc", + srcs = [":resourcemanager_moved_proto"], + deps = [":resourcemanager_py_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "resourcemanager_php_proto", + deps = [":resourcemanager_proto"], +) + +php_grpc_library( + name = "resourcemanager_php_grpc", + srcs = [":resourcemanager_proto"], + deps = [":resourcemanager_php_proto"], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "resourcemanager_ruby_proto", + deps = [":resourcemanager_proto"], +) + +ruby_grpc_library( + name = "resourcemanager_ruby_grpc", + srcs = [":resourcemanager_proto"], + deps = [":resourcemanager_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "resourcemanager_csharp_proto", + deps = [":resourcemanager_proto"], +) + +csharp_grpc_library( + name = "resourcemanager_csharp_grpc", + srcs = [":resourcemanager_proto"], + deps = [":resourcemanager_csharp_proto"], +) diff --git a/google/cloud/resourcemanager/v2/cloudresourcemanager_gapic.yaml b/google/cloud/resourcemanager/v2/cloudresourcemanager_gapic.legacy.yaml similarity index 99% rename from google/cloud/resourcemanager/v2/cloudresourcemanager_gapic.yaml rename to google/cloud/resourcemanager/v2/cloudresourcemanager_gapic.legacy.yaml index 49a394d39..e31826013 100644 --- a/google/cloud/resourcemanager/v2/cloudresourcemanager_gapic.yaml +++ b/google/cloud/resourcemanager/v2/cloudresourcemanager_gapic.legacy.yaml @@ -24,7 +24,6 @@ collection_oneofs: - folder # A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.cloud.resourcemanager.v2.Folders # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. diff --git a/google/cloud/resourcemanager/v2/cloudresourcemanager_v2.yaml b/google/cloud/resourcemanager/v2/cloudresourcemanager_v2.yaml new file mode 100644 index 000000000..daf8c6d2b --- /dev/null +++ b/google/cloud/resourcemanager/v2/cloudresourcemanager_v2.yaml @@ -0,0 +1,47 @@ +type: google.api.Service +config_version: 1 +name: cloudresourcemanager.googleapis.com +title: Cloud Resource Manager API + +apis: +- name: google.cloud.resourcemanager.v2.Folders + +types: +- name: google.cloud.resourcemanager.v2.FolderOperation + +documentation: + summary: |- + Creates, reads, and updates metadata for Google Cloud Platform resource + containers. + +backend: + rules: + - selector: 'google.cloud.resourcemanager.v2.Folders.*' + deadline: 30.0 + +authentication: + rules: + - selector: 'google.cloud.resourcemanager.v2.Folders.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.resourcemanager.v2.Folders.GetFolder + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only + - selector: google.cloud.resourcemanager.v2.Folders.GetIamPolicy + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only + - selector: google.cloud.resourcemanager.v2.Folders.ListFolders + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only + - selector: google.cloud.resourcemanager.v2.Folders.SearchFolders + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only diff --git a/google/cloud/resourcemanager/v2/folders.proto b/google/cloud/resourcemanager/v2/folders.proto index b231babfd..f8e9d2bc8 100644 --- a/google/cloud/resourcemanager/v2/folders.proto +++ b/google/cloud/resourcemanager/v2/folders.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,29 +11,38 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.resourcemanager.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; +option csharp_namespace = "Google.Cloud.ResourceManager.V2"; option go_package = "google.golang.org/genproto/googleapis/cloud/resourcemanager/v2;resourcemanager"; option java_multiple_files = true; option java_outer_classname = "FoldersProto"; option java_package = "com.google.cloud.resourcemanager.v2"; -option csharp_namespace = "Google.Cloud.ResourceManager.V2"; option php_namespace = "Google\\Cloud\\ResourceManager\\V2"; // Manages Cloud Resource Folders. // Cloud Resource Folders can be used to organize the resources under an // organization and to control the IAM policies applied to groups of resources. service Folders { + option (google.api.default_host) = "cloudresourcemanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + // Lists the Folders that are direct descendants of supplied parent resource. // List provides a strongly consistent view of the Folders underneath // the specified parent resource. @@ -45,6 +54,7 @@ service Folders { option (google.api.http) = { get: "/v2/folders" }; + option (google.api.method_signature) = "parent,show_deleted"; } // Search for folders that match specific filter criteria. @@ -58,6 +68,7 @@ service Folders { post: "/v2/folders:search" body: "*" }; + option (google.api.method_signature) = "query"; } // Retrieves a Folder identified by the supplied resource name. @@ -69,6 +80,7 @@ service Folders { option (google.api.http) = { get: "/v2/{name=folders/*}" }; + option (google.api.method_signature) = "name"; } // Creates a Folder in the resource hierarchy. @@ -79,6 +91,7 @@ service Folders { // // In order to succeed, the addition of this new Folder must not violate // the Folder naming, height or fanout constraints. + // // + The Folder's display_name must be distinct from all other Folder's that // share its parent. // + The addition of the Folder must not cause the active Folder hierarchy @@ -88,12 +101,12 @@ service Folders { // + The addition of the Folder must not cause the total number of Folders // under its parent to exceed 100. // - // If the operation fails due to a folder constraint violation, - // a PreconditionFailure explaining the violation will be returned. - // If the failure occurs synchronously then the PreconditionFailure - // will be returned via the Status.details field and if it occurs - // asynchronously then the PreconditionFailure will be returned - // via the Operation.error field. + // If the operation fails due to a folder constraint violation, some errors + // may be returned by the CreateFolder request, with status code + // FAILED_PRECONDITION and an error description. Other folder constraint + // violations will be communicated in the Operation, with the specific + // PreconditionFailure returned via the details list in the Operation.error + // field. // // The caller must have `resourcemanager.folders.create` permission on the // identified parent. @@ -102,16 +115,22 @@ service Folders { post: "/v2/folders" body: "folder" }; + option (google.api.method_signature) = "parent,folder"; + option (google.longrunning.operation_info) = { + response_type: "Folder" + metadata_type: "FolderOperation" + }; } // Updates a Folder, changing its display_name. // Changes to the folder display_name will be rejected if they violate either // the display_name formatting rules or naming constraints described in - // the [CreateFolder] documentation. - // + The Folder's display name must start and end with a letter or digit, + // the [CreateFolder][google.cloud.resourcemanager.v2.Folders.CreateFolder] documentation. + // + // The Folder's display name must start and end with a letter or digit, // may contain letters, digits, spaces, hyphens and underscores and can be // no longer than 30 characters. This is captured by the regular expression: - // [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. + // [\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. // The caller must have `resourcemanager.folders.update` permission on the // identified folder. // @@ -123,6 +142,7 @@ service Folders { patch: "/v2/{folder.name=folders/*}" body: "folder" }; + option (google.api.method_signature) = "folder,update_mask"; } // Moves a Folder under a new resource parent. @@ -134,11 +154,12 @@ service Folders { // be returned - if the failure occurs synchronously then the // FolderOperationError will be returned via the Status.details field // and if it occurs asynchronously then the FolderOperation will be returned - // via the the Operation.error field. + // via the Operation.error field. // In addition, the Operation.metadata field will be populated with a // FolderOperation message as an aid to stateless clients. // Folder moves will be rejected if they violate either the naming, height - // or fanout constraints described in the [CreateFolder] documentation. + // or fanout constraints described in the + // [CreateFolder][google.cloud.resourcemanager.v2.Folders.CreateFolder] documentation. // The caller must have `resourcemanager.folders.move` permission on the // folder's current and proposed new parent. rpc MoveFolder(MoveFolderRequest) returns (google.longrunning.Operation) { @@ -146,27 +167,38 @@ service Folders { post: "/v2/{name=folders/*}:move" body: "*" }; + option (google.api.method_signature) = "name,destination_parent"; + option (google.longrunning.operation_info) = { + response_type: "Folder" + metadata_type: "FolderOperation" + }; } // Requests deletion of a Folder. The Folder is moved into the - // [DELETE_REQUESTED] state immediately, and is deleted approximately 30 days - // later. This method may only be called on an empty Folder in the [ACTIVE] - // state, where a Folder is empty if it doesn't contain any Folders or - // Projects in the [ACTIVE] state. + // [DELETE_REQUESTED][google.cloud.resourcemanager.v2.Folder.LifecycleState.DELETE_REQUESTED] state + // immediately, and is deleted approximately 30 days later. This method may + // only be called on an empty Folder in the + // [ACTIVE][google.cloud.resourcemanager.v2.Folder.LifecycleState.ACTIVE] state, where a Folder is empty if + // it doesn't contain any Folders or Projects in the + // [ACTIVE][google.cloud.resourcemanager.v2.Folder.LifecycleState.ACTIVE] state. // The caller must have `resourcemanager.folders.delete` permission on the // identified folder. rpc DeleteFolder(DeleteFolderRequest) returns (Folder) { option (google.api.http) = { delete: "/v2/{name=folders/*}" }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,recursive_delete"; } // Cancels the deletion request for a Folder. This method may only be - // called on a Folder in the [DELETE_REQUESTED] state. - // In order to succeed, the Folder's parent must be in the [ACTIVE] state. + // called on a Folder in the + // [DELETE_REQUESTED][google.cloud.resourcemanager.v2.Folder.LifecycleState.DELETE_REQUESTED] state. + // In order to succeed, the Folder's parent must be in the + // [ACTIVE][google.cloud.resourcemanager.v2.Folder.LifecycleState.ACTIVE] state. // In addition, reintroducing the folder into the tree must not violate // folder naming, height and fanout constraints described in the - // [CreateFolder] documentation. + // [CreateFolder][google.cloud.resourcemanager.v2.Folders.CreateFolder] documentation. // The caller must have `resourcemanager.folders.undelete` permission on the // identified folder. rpc UndeleteFolder(UndeleteFolderRequest) returns (Folder) { @@ -174,6 +206,7 @@ service Folders { post: "/v2/{name=folders/*}:undelete" body: "*" }; + option (google.api.method_signature) = "name"; } // Gets the access control policy for a Folder. The returned policy may be @@ -181,12 +214,12 @@ service Folders { // be the Folder's resource name, e.g. "folders/1234". // The caller must have `resourcemanager.folders.getIamPolicy` permission // on the identified folder. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v2/{resource=folders/*}:getIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource"; } // Sets the access control policy on a Folder, replacing any existing policy. @@ -194,12 +227,12 @@ service Folders { // "folders/1234". // The caller must have `resourcemanager.folders.setIamPolicy` permission // on the identified folder. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v2/{resource=folders/*}:setIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource,policy"; } // Returns permissions that a caller has on the specified Folder. @@ -207,18 +240,23 @@ service Folders { // e.g. "folders/1234". // // There are no permissions required for making this API call. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v2/{resource=folders/*}:testIamPermissions" body: "*" }; + option (google.api.method_signature) = "resource,permissions"; } } // A Folder in an Organization's resource hierarchy, used to // organize that Organization's resources. message Folder { + option (google.api.resource) = { + type: "cloudresourcemanager.googleapis.com/Folder" + pattern: "folders/{folder}" + }; + // Folder lifecycle states. enum LifecycleState { // Unspecified state. @@ -233,11 +271,12 @@ message Folder { // Output only. The resource name of the Folder. // Its format is `folders/{folder_id}`, for example: "folders/1234". - string name = 1; + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The Folder’s parent's resource name. - // Updates to the folder's parent must be performed via [MoveFolders]. - string parent = 2; + // Required. The Folder’s parent's resource name. + // Updates to the folder's parent must be performed via + // [MoveFolder][google.cloud.resourcemanager.v2.Folders.MoveFolder]. + string parent = 2 [(google.api.field_behavior) = REQUIRED]; // The folder’s display name. // A folder’s display name must be unique amongst its siblings, e.g. @@ -245,42 +284,47 @@ message Folder { // The display name must start and end with a letter or digit, may contain // letters, digits, spaces, hyphens and underscores and can be no longer // than 30 characters. This is captured by the regular expression: - // [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. + // [\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. string display_name = 3; - // Output only. The lifecycle state of the folder. + // Output only. The lifecycle state of the folder. // Updates to the lifecycle_state must be performed via - // [DeleteFolder] and [UndeleteFolder]. - LifecycleState lifecycle_state = 4; + // [DeleteFolder][google.cloud.resourcemanager.v2.Folders.DeleteFolder] and + // [UndeleteFolder][google.cloud.resourcemanager.v2.Folders.UndeleteFolder]. + LifecycleState lifecycle_state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp when the Folder was created. Assigned by the server. - google.protobuf.Timestamp create_time = 5; + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp when the Folder was last modified. - google.protobuf.Timestamp update_time = 6; + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The ListFolders request message. message ListFoldersRequest { - // The resource name of the Organization or Folder whose Folders are + // Required. The resource name of the Organization or Folder whose Folders are // being listed. // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. // Access to this method is controlled by checking the // `resourcemanager.folders.list` permission on the `parent`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "*" + } + ]; - // The maximum number of Folders to return in the response. - // This field is optional. - int32 page_size = 2; + // Optional. The maximum number of Folders to return in the response. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // A pagination token returned from a previous call to `ListFolders` + // Optional. A pagination token returned from a previous call to `ListFolders` // that indicates where this listing should continue from. - // This field is optional. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Controls whether Folders in the [DELETE_REQUESTED} state should - // be returned. - bool show_deleted = 4; + // Optional. Controls whether Folders in the + // [DELETE_REQUESTED][google.cloud.resourcemanager.v2.Folder.LifecycleState.DELETE_REQUESTED] + // state should be returned. Defaults to false. + bool show_deleted = 4 [(google.api.field_behavior) = OPTIONAL]; } // The ListFolders response message. @@ -291,20 +335,17 @@ message ListFoldersResponse { // A pagination token returned from a previous call to `ListFolders` // that indicates from where listing should continue. - // This field is optional. string next_page_token = 2; } // The request message for searching folders. message SearchFoldersRequest { - // The maximum number of folders to return in the response. - // This field is optional. - int32 page_size = 1; + // Optional. The maximum number of folders to return in the response. + int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; - // A pagination token returned from a previous call to `SearchFolders` + // Optional. A pagination token returned from a previous call to `SearchFolders` // that indicates from where search should continue. - // This field is optional. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Search criteria used to select the Folders to return. // If no search criteria is specified then all accessible folders will be @@ -314,14 +355,21 @@ message SearchFoldersRequest { // lifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR` // can be used along with the suffix wildcard symbol `*`. // + // The displayName field in a query expression should use escaped quotes + // for values that include whitespace to prevent unexpected behavior. + // // Some example queries are: - // |Query|Description| - // |------|-----------| - // |displayName=Test*|Folders whose display name starts with "Test".| - // |lifecycleState=ACTIVE|Folders whose lifecycleState is ACTIVE.| - // |parent=folders/123|Folders whose parent is "folders/123".| - // |parent=folders/123 AND lifecycleState=ACTIVE|Active folders whose - // parent is "folders/123".| + // + // * Query `displayName=Test*` returns Folder resources whose display name + // starts with "Test". + // * Query `lifecycleState=ACTIVE` returns Folder resources with + // `lifecycleState` set to `ACTIVE`. + // * Query `parent=folders/123` returns Folder resources that have + // `folders/123` as a parent resource. + // * Query `parent=folders/123 AND lifecycleState=ACTIVE` returns active + // Folder resources that have `folders/123` as a parent resource. + // * Query `displayName=\\"Test String\\"` returns Folder resources with + // display names that include both "Test" and "String". string query = 3; } @@ -333,57 +381,81 @@ message SearchFoldersResponse { // A pagination token returned from a previous call to `SearchFolders` // that indicates from where searching should continue. - // This field is optional. string next_page_token = 2; } // The GetFolder request message. message GetFolderRequest { - // The resource name of the Folder to retrieve. + // Required. The resource name of the Folder to retrieve. // Must be of the form `folders/{folder_id}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Folder" + } + ]; } // The CreateFolder request message. message CreateFolderRequest { - // The resource name of the new Folder's parent. + // Required. The resource name of the new Folder's parent. // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. - string parent = 1; - - // The Folder being created, only the display name will be consulted. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "*" + } + ]; + + // Required. The Folder being created, only the display name will be consulted. // All other fields will be ignored. - Folder folder = 2; + Folder folder = 2 [(google.api.field_behavior) = REQUIRED]; } // The MoveFolder request message. message MoveFolderRequest { - // The resource name of the Folder to move. + // Required. The resource name of the Folder to move. // Must be of the form folders/{folder_id} - string name = 1; - - // The resource name of the Folder or Organization to reparent + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Folder" + } + ]; + + // Required. The resource name of the Folder or Organization to reparent // the folder under. // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. - string destination_parent = 2; + string destination_parent = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "*" + } + ]; } // The request message for updating a folder's display name. message UpdateFolderRequest { - // The new definition of the Folder. It must include a + // Required. The new definition of the Folder. It must include a // a `name` and `display_name` field. The other fields // will be ignored. - Folder folder = 1; + Folder folder = 1 [(google.api.field_behavior) = REQUIRED]; - // Fields to be updated. + // Required. Fields to be updated. // Only the `display_name` can be updated. - google.protobuf.FieldMask update_mask = 2; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; } // The DeleteFolder request message. message DeleteFolderRequest { - // the resource name of the Folder to be deleted. + // Required. The resource name of the Folder to be deleted. // Must be of the form `folders/{folder_id}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Folder" + } + ]; // Instructs DeleteFolderAction to delete a folder even when the folder is not // empty. @@ -392,9 +464,14 @@ message DeleteFolderRequest { // The UndeleteFolder request message. message UndeleteFolderRequest { - // The resource name of the Folder to undelete. + // Required. The resource name of the Folder to undelete. // Must be of the form `folders/{folder_id}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Folder" + } + ]; } // Metadata describing a long running folder operation diff --git a/google/cloud/scheduler/BUILD.bazel b/google/cloud/scheduler/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/cloud/scheduler/BUILD.bazel +++ b/google/cloud/scheduler/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/scheduler/artman_cloudscheduler_v1.yaml b/google/cloud/scheduler/artman_cloudscheduler_v1.yaml index ab2c4fa10..01fb41055 100644 --- a/google/cloud/scheduler/artman_cloudscheduler_v1.yaml +++ b/google/cloud/scheduler/artman_cloudscheduler_v1.yaml @@ -3,11 +3,12 @@ common: api_version: v1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1 - service_yaml: cloudscheduler_v1.yaml + service_yaml: v1/cloudscheduler_v1.yaml gapic_yaml: v1/cloudscheduler_gapic.yaml + proto_package: google.cloud.scheduler.v1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/scheduler/artman_cloudscheduler_v1beta1.yaml b/google/cloud/scheduler/artman_cloudscheduler_v1beta1.yaml index 44313ae1b..212875919 100644 --- a/google/cloud/scheduler/artman_cloudscheduler_v1beta1.yaml +++ b/google/cloud/scheduler/artman_cloudscheduler_v1beta1.yaml @@ -3,11 +3,12 @@ common: api_version: v1beta1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1beta1 - service_yaml: cloudscheduler_v1beta1.yaml + service_yaml: v1beta1/cloudscheduler_v1beta1.yaml gapic_yaml: v1beta1/cloudscheduler_gapic.yaml + proto_package: google.cloud.scheduler.v1beta1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/scheduler/v1/BUILD.bazel b/google/cloud/scheduler/v1/BUILD.bazel new file mode 100644 index 000000000..7c1d2ccfa --- /dev/null +++ b/google/cloud/scheduler/v1/BUILD.bazel @@ -0,0 +1,369 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "scheduler_proto", + srcs = [ + "cloudscheduler.proto", + "job.proto", + "target.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "scheduler_proto_with_info", + deps = [ + ":scheduler_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "scheduler_java_proto", + deps = [":scheduler_proto"], +) + +java_grpc_library( + name = "scheduler_java_grpc", + srcs = [":scheduler_proto"], + deps = [":scheduler_java_proto"], +) + +java_gapic_library( + name = "scheduler_java_gapic", + src = ":scheduler_proto_with_info", + gapic_yaml = "cloudscheduler_gapic.yaml", + package = "google.cloud.scheduler.v1", + service_yaml = "cloudscheduler_v1.yaml", + test_deps = [ + ":scheduler_java_grpc", + ], + deps = [ + ":scheduler_java_proto", + ], +) + +java_gapic_test( + name = "scheduler_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.scheduler.v1.CloudSchedulerClientTest", + ], + runtime_deps = [":scheduler_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-scheduler-v1-java", + deps = [ + ":scheduler_java_gapic", + ":scheduler_java_grpc", + ":scheduler_java_proto", + ":scheduler_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "scheduler_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/scheduler/v1", + protos = [":scheduler_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + ], +) + +go_gapic_library( + name = "scheduler_go_gapic", + srcs = [":scheduler_proto_with_info"], + grpc_service_config = "cloudscheduler_grpc_service_config.json", + importpath = "cloud.google.com/go/scheduler/apiv1;scheduler", + service_yaml = "cloudscheduler_v1.yaml", + deps = [ + ":scheduler_go_proto", + ], +) + +go_test( + name = "scheduler_go_gapic_test", + srcs = [":scheduler_go_gapic_srcjar_test"], + embed = [":scheduler_go_gapic"], + importpath = "cloud.google.com/go/scheduler/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-scheduler-v1-go", + deps = [ + ":scheduler_go_gapic", + ":scheduler_go_gapic_srcjar-test.srcjar", + ":scheduler_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "scheduler_moved_proto", + srcs = [":scheduler_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "scheduler_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":scheduler_moved_proto"], +) + +py_grpc_library( + name = "scheduler_py_grpc", + srcs = [":scheduler_moved_proto"], + deps = [":scheduler_py_proto"], +) + +py_gapic_library( + name = "scheduler_py_gapic", + src = ":scheduler_proto_with_info", + gapic_yaml = "cloudscheduler_gapic.yaml", + package = "google.cloud.scheduler.v1", + service_yaml = "cloudscheduler_v1.yaml", + deps = [ + ":scheduler_py_grpc", + ":scheduler_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "scheduler-v1-py", + deps = [ + ":scheduler_py_gapic", + ":scheduler_py_grpc", + ":scheduler_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "scheduler_php_proto", + deps = [":scheduler_proto"], +) + +php_grpc_library( + name = "scheduler_php_grpc", + srcs = [":scheduler_proto"], + deps = [":scheduler_php_proto"], +) + +php_gapic_library( + name = "scheduler_php_gapic", + src = ":scheduler_proto_with_info", + gapic_yaml = "cloudscheduler_gapic.yaml", + package = "google.cloud.scheduler.v1", + service_yaml = "cloudscheduler_v1.yaml", + deps = [ + ":scheduler_php_grpc", + ":scheduler_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-scheduler-v1-php", + deps = [ + ":scheduler_php_gapic", + ":scheduler_php_grpc", + ":scheduler_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "scheduler_nodejs_gapic", + src = ":scheduler_proto_with_info", + gapic_yaml = "cloudscheduler_gapic.yaml", + package = "google.cloud.scheduler.v1", + service_yaml = "cloudscheduler_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "scheduler-v1-nodejs", + deps = [ + ":scheduler_nodejs_gapic", + ":scheduler_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "scheduler_ruby_proto", + deps = [":scheduler_proto"], +) + +ruby_grpc_library( + name = "scheduler_ruby_grpc", + srcs = [":scheduler_proto"], + deps = [":scheduler_ruby_proto"], +) + +ruby_gapic_library( + name = "scheduler_ruby_gapic", + src = ":scheduler_proto_with_info", + gapic_yaml = "cloudscheduler_gapic.yaml", + package = "google.cloud.scheduler.v1", + service_yaml = "cloudscheduler_v1.yaml", + deps = [ + ":scheduler_ruby_grpc", + ":scheduler_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-scheduler-v1-ruby", + deps = [ + ":scheduler_ruby_gapic", + ":scheduler_ruby_grpc", + ":scheduler_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "scheduler_csharp_proto", + deps = [":scheduler_proto"], +) + +csharp_grpc_library( + name = "scheduler_csharp_grpc", + srcs = [":scheduler_proto"], + deps = [":scheduler_csharp_proto"], +) + +csharp_gapic_library( + name = "scheduler_csharp_gapic", + src = ":scheduler_proto_with_info", + gapic_yaml = "cloudscheduler_gapic.yaml", + package = "google.cloud.scheduler.v1", + service_yaml = "cloudscheduler_v1.yaml", + deps = [ + ":scheduler_csharp_grpc", + ":scheduler_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-scheduler-v1-csharp", + deps = [ + ":scheduler_csharp_gapic", + ":scheduler_csharp_grpc", + ":scheduler_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/scheduler/v1/cloudscheduler.proto b/google/cloud/scheduler/v1/cloudscheduler.proto index a68446235..89ce8cbd3 100644 --- a/google/cloud/scheduler/v1/cloudscheduler.proto +++ b/google/cloud/scheduler/v1/cloudscheduler.proto @@ -18,6 +18,8 @@ syntax = "proto3"; package google.cloud.scheduler.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/scheduler/v1/job.proto"; import "google/protobuf/empty.proto"; @@ -32,11 +34,15 @@ option objc_class_prefix = "SCHEDULER"; // The Cloud Scheduler API allows external entities to reliably // schedule asynchronous jobs. service CloudScheduler { + option (google.api.default_host) = "cloudscheduler.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Lists jobs. rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/jobs" }; + option (google.api.method_signature) = "parent"; } // Gets a job. @@ -44,6 +50,7 @@ service CloudScheduler { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/jobs/*}" }; + option (google.api.method_signature) = "name"; } // Creates a job. @@ -52,6 +59,7 @@ service CloudScheduler { post: "/v1/{parent=projects/*/locations/*}/jobs" body: "job" }; + option (google.api.method_signature) = "parent,job"; } // Updates a job. @@ -68,6 +76,7 @@ service CloudScheduler { patch: "/v1/{job.name=projects/*/locations/*/jobs/*}" body: "job" }; + option (google.api.method_signature) = "job,update_mask"; } // Deletes a job. @@ -75,6 +84,7 @@ service CloudScheduler { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/jobs/*}" }; + option (google.api.method_signature) = "name"; } // Pauses a job. @@ -89,6 +99,7 @@ service CloudScheduler { post: "/v1/{name=projects/*/locations/*/jobs/*}:pause" body: "*" }; + option (google.api.method_signature) = "name"; } // Resume a job. @@ -102,6 +113,7 @@ service CloudScheduler { post: "/v1/{name=projects/*/locations/*/jobs/*}:resume" body: "*" }; + option (google.api.method_signature) = "name"; } // Forces a job to run now. @@ -113,16 +125,20 @@ service CloudScheduler { post: "/v1/{name=projects/*/locations/*/jobs/*}:run" body: "*" }; + option (google.api.method_signature) = "name"; } } // Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs]. message ListJobsRequest { - // Required. - // - // The location name. For example: + // Required. The location name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudscheduler.googleapis.com/Job" + } + ]; // Requested page size. // @@ -159,79 +175,94 @@ message ListJobsResponse { // Request message for [GetJob][google.cloud.scheduler.v1.CloudScheduler.GetJob]. message GetJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } // Request message for [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob]. message CreateJobRequest { - // Required. - // - // The location name. For example: + // Required. The location name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudscheduler.googleapis.com/Job" + } + ]; - // Required. - // - // The job to add. The user can optionally specify a name for the + // Required. The job to add. The user can optionally specify a name for the // job in [name][google.cloud.scheduler.v1.Job.name]. [name][google.cloud.scheduler.v1.Job.name] cannot be the same as an // existing job. If a name is not specified then the system will // generate a random unique name that will be returned // ([name][google.cloud.scheduler.v1.Job.name]) in the response. - Job job = 2; + Job job = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for [UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob]. message UpdateJobRequest { - // Required. - // - // The new job properties. [name][google.cloud.scheduler.v1.Job.name] must be specified. + // Required. The new job properties. [name][google.cloud.scheduler.v1.Job.name] must be specified. // // Output only fields cannot be modified using UpdateJob. // Any value specified for an output only field will be ignored. - Job job = 1; + Job job = 1 [(google.api.field_behavior) = REQUIRED]; // A mask used to specify which fields of the job are being updated. - google.protobuf.FieldMask update_mask = 2; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request message for deleting a job using // [DeleteJob][google.cloud.scheduler.v1.CloudScheduler.DeleteJob]. message DeleteJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } // Request message for [PauseJob][google.cloud.scheduler.v1.CloudScheduler.PauseJob]. message PauseJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } // Request message for [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. message ResumeJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } // Request message for forcing a job to run now using // [RunJob][google.cloud.scheduler.v1.CloudScheduler.RunJob]. message RunJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } diff --git a/google/cloud/scheduler/v1/cloudscheduler_gapic.legacy.yaml b/google/cloud/scheduler/v1/cloudscheduler_gapic.legacy.yaml new file mode 100644 index 000000000..e3055f0b5 --- /dev/null +++ b/google/cloud/scheduler/v1/cloudscheduler_gapic.legacy.yaml @@ -0,0 +1,261 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.scheduler.v1 + python: + package_name: google.cloud.scheduler_v1.gapic + go: + package_name: cloud.google.com/go/scheduler/apiv1 + release_level: GA + csharp: + package_name: Google.Cloud.Scheduler.V1 + release_level: GA + ruby: + package_name: Google::Cloud::Scheduler::V1 + release_level: GA + php: + package_name: Google\Cloud\Scheduler\V1 + nodejs: + package_name: scheduler.v1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: +- name: google.cloud.scheduler.v1.CloudScheduler + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/jobs/{job} + entity_name: job + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListJobs + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: jobs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 30000 + - name: GetJob + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: job + timeout_millis: 30000 + - name: CreateJob + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + - job + required_fields: + - parent + - job + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 30000 + - name: UpdateJob + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - job + - update_mask + required_fields: + - job + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + job.name: job + timeout_millis: 30000 + - name: DeleteJob + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: job + timeout_millis: 30000 + - name: PauseJob + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: job + timeout_millis: 30000 + - name: ResumeJob + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: job + timeout_millis: 30000 + - name: RunJob + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: job + timeout_millis: 30000 +resource_name_generation: +- message_name: Job + field_entity_map: + name: job +- message_name: ListJobsRequest + field_entity_map: + parent: location +- message_name: GetJobRequest + field_entity_map: + name: job +- message_name: CreateJobRequest + field_entity_map: + parent: location +- message_name: UpdateJobRequest + field_entity_map: + job.name: job +- message_name: DeleteJobRequest + field_entity_map: + name: job +- message_name: PauseJobRequest + field_entity_map: + name: job +- message_name: ResumeJobRequest + field_entity_map: + name: job +- message_name: RunJobRequest + field_entity_map: + name: job diff --git a/google/cloud/scheduler/v1/cloudscheduler_gapic.yaml b/google/cloud/scheduler/v1/cloudscheduler_gapic.yaml index c3ee26568..be8c0d404 100644 --- a/google/cloud/scheduler/v1/cloudscheduler_gapic.yaml +++ b/google/cloud/scheduler/v1/cloudscheduler_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -20,243 +20,8 @@ language_settings: nodejs: package_name: scheduler.v1 domain_layer_location: google-cloud -# A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.cloud.scheduler.v1.CloudScheduler - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - - name_pattern: projects/{project}/locations/{location} - entity_name: location - - name_pattern: projects/{project}/locations/{location}/jobs/{job} - entity_name: job - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: ListJobs - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: jobs - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 30000 - - name: GetJob - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: job - timeout_millis: 30000 - - name: CreateJob - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - - job - required_fields: - - parent - - job - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 30000 - - name: UpdateJob - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - job - - update_mask - required_fields: - - job - - update_mask - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - job.name: job - timeout_millis: 30000 - name: DeleteJob - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: job - timeout_millis: 30000 - - name: PauseJob - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: job - timeout_millis: 30000 - - name: ResumeJob - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: job - timeout_millis: 30000 - - name: RunJob - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: job - timeout_millis: 30000 -resource_name_generation: -- message_name: Job - field_entity_map: - name: job -- message_name: ListJobsRequest - field_entity_map: - parent: location -- message_name: GetJobRequest - field_entity_map: - name: job -- message_name: CreateJobRequest - field_entity_map: - parent: location -- message_name: UpdateJobRequest - field_entity_map: - job.name: job -- message_name: DeleteJobRequest - field_entity_map: - name: job -- message_name: PauseJobRequest - field_entity_map: - name: job -- message_name: ResumeJobRequest - field_entity_map: - name: job -- message_name: RunJobRequest - field_entity_map: - name: job diff --git a/google/cloud/scheduler/v1/cloudscheduler_grpc_service_config.json b/google/cloud/scheduler/v1/cloudscheduler_grpc_service_config.json new file mode 100755 index 000000000..87980d856 --- /dev/null +++ b/google/cloud/scheduler/v1/cloudscheduler_grpc_service_config.json @@ -0,0 +1,55 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.scheduler.v1.CloudScheduler", + "method": "ListJobs" + }, + { + "service": "google.cloud.scheduler.v1.CloudScheduler", + "method": "GetJob" + }, + { + "service": "google.cloud.scheduler.v1.CloudScheduler", + "method": "DeleteJob" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.scheduler.v1.CloudScheduler", + "method": "CreateJob" + }, + { + "service": "google.cloud.scheduler.v1.CloudScheduler", + "method": "UpdateJob" + }, + { + "service": "google.cloud.scheduler.v1.CloudScheduler", + "method": "PauseJob" + }, + { + "service": "google.cloud.scheduler.v1.CloudScheduler", + "method": "ResumeJob" + }, + { + "service": "google.cloud.scheduler.v1.CloudScheduler", + "method": "RunJob" + } + ], + "timeout": "600s" + } + ] +} diff --git a/google/cloud/scheduler/cloudscheduler_v1.yaml b/google/cloud/scheduler/v1/cloudscheduler_v1.yaml similarity index 100% rename from google/cloud/scheduler/cloudscheduler_v1.yaml rename to google/cloud/scheduler/v1/cloudscheduler_v1.yaml diff --git a/google/cloud/scheduler/v1/job.proto b/google/cloud/scheduler/v1/job.proto index 60b472631..d26070266 100644 --- a/google/cloud/scheduler/v1/job.proto +++ b/google/cloud/scheduler/v1/job.proto @@ -17,12 +17,12 @@ syntax = "proto3"; package google.cloud.scheduler.v1; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "google/cloud/scheduler/v1/target.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1;scheduler"; option java_multiple_files = true; @@ -32,6 +32,11 @@ option java_package = "com.google.cloud.scheduler.v1"; // Configuration for a job. // The maximum allowed size for a job is 100KB. message Job { + option (google.api.resource) = { + type: "cloudscheduler.googleapis.com/Job" + pattern: "projects/{project}/locations/{location}/jobs/{job}" + }; + // State of the job. enum State { // Unspecified state. diff --git a/google/cloud/scheduler/v1/target.proto b/google/cloud/scheduler/v1/target.proto index e33b1558e..9a8f32f7c 100644 --- a/google/cloud/scheduler/v1/target.proto +++ b/google/cloud/scheduler/v1/target.proto @@ -17,8 +17,8 @@ syntax = "proto3"; package google.cloud.scheduler.v1; +import "google/api/resource.proto"; import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1;scheduler"; option java_multiple_files = true; @@ -32,9 +32,7 @@ option java_package = "com.google.cloud.scheduler.v1"; // constitutes a failed execution. For a redirected request, the response // returned by the redirected request is considered. message HttpTarget { - // Required. - // - // The full URI path that the request will be sent to. This string + // Required. The full URI path that the request will be sent to. This string // must begin with either "http://" or "https://". Some examples of // valid values for [uri][google.cloud.scheduler.v1.HttpTarget.uri] are: // `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will @@ -77,8 +75,8 @@ message HttpTarget { // will be generated and attached as an `Authorization` header in the HTTP // request. // - // This type of authorization should be used when sending requests to a GCP - // endpoint. + // This type of authorization should generally only be used when calling + // Google APIs hosted on *.googleapis.com. OAuthToken oauth_token = 5; // If specified, an @@ -86,8 +84,9 @@ message HttpTarget { // token will be generated and attached as an `Authorization` header in the // HTTP request. // - // This type of authorization should be used when sending requests to third - // party endpoints or Cloud Run. + // This type of authorization can be used for many scenarios, including + // calling Cloud Run, or endpoints where you intend to validate the token + // yourself. OidcToken oidc_token = 6; } } @@ -162,16 +161,16 @@ message AppEngineHttpTarget { // Pub/Sub target. The job will be delivered by publishing a message to // the given Pub/Sub topic. message PubsubTarget { - // Required. - // - // The name of the Cloud Pub/Sub topic to which messages will + // Required. The name of the Cloud Pub/Sub topic to which messages will // be published when a job is delivered. The topic name must be in the // same format as required by PubSub's // [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), // for example `projects/PROJECT_ID/topics/TOPIC_ID`. // // The topic must be in the same project as the Cloud Scheduler job. - string topic_name = 1; + string topic_name = 1 [(google.api.resource_reference) = { + type: "pubsub.googleapis.com/Topic" + }]; // The message payload for PubsubMessage. // @@ -315,8 +314,8 @@ enum HttpMethod { // Contains information needed for generating an // [OAuth token](https://developers.google.com/identity/protocols/OAuth2). -// This type of authorization should be used when sending requests to a GCP -// endpoint. +// This type of authorization should generally only be used when calling Google +// APIs hosted on *.googleapis.com. message OAuthToken { // [Service account email](https://cloud.google.com/iam/docs/service-accounts) // to be used for generating OAuth token. @@ -332,9 +331,10 @@ message OAuthToken { // Contains information needed for generating an // [OpenID Connect -// token](https://developers.google.com/identity/protocols/OpenIDConnect). This -// type of authorization should be used when sending requests to third party -// endpoints or Cloud Run. +// token](https://developers.google.com/identity/protocols/OpenIDConnect). +// This type of authorization can be used for many scenarios, including +// calling Cloud Run, or endpoints where you intend to validate the token +// yourself. message OidcToken { // [Service account email](https://cloud.google.com/iam/docs/service-accounts) // to be used for generating OIDC token. @@ -346,3 +346,11 @@ message OidcToken { // specified in target will be used. string audience = 2; } + +// The Pub/Sub Topic resource definition is in google/cloud/pubsub/v1/, +// but we do not import that proto directly; therefore, we redefine the +// pattern here. +option (google.api.resource_definition) = { + type: "pubsub.googleapis.com/Topic" + pattern: "projects/{project}/topics/{topic}" +}; diff --git a/google/cloud/scheduler/v1beta1/BUILD.bazel b/google/cloud/scheduler/v1beta1/BUILD.bazel index 33ac91119..617077d96 100644 --- a/google/cloud/scheduler/v1beta1/BUILD.bazel +++ b/google/cloud/scheduler/v1beta1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -15,9 +18,10 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/api:resource_proto", "//google/rpc:status_proto", - "@com_google_protobuf//:any_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:field_mask_proto", @@ -27,7 +31,10 @@ proto_library( proto_library_with_info( name = "scheduler_proto_with_info", - deps = [":scheduler_proto"], + deps = [ + ":scheduler_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -35,18 +42,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "scheduler_java_proto", deps = [":scheduler_proto"], @@ -55,48 +57,40 @@ java_proto_library( java_grpc_library( name = "scheduler_java_grpc", srcs = [":scheduler_proto"], - deps = [":scheduler_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "scheduler_resource_name_java_proto", - gapic_yaml = "cloudscheduler_gapic.yaml", - deps = [":scheduler_proto"], + deps = [":scheduler_java_proto"], ) java_gapic_library( name = "scheduler_java_gapic", src = ":scheduler_proto_with_info", gapic_yaml = "cloudscheduler_gapic.yaml", - service_yaml = "//google/cloud/scheduler:cloudscheduler_v1beta1.yaml", - test_deps = [":scheduler_java_grpc"], + package = "google.cloud.scheduler.v1beta1", + service_yaml = "cloudscheduler_v1beta1.yaml", + test_deps = [ + ":scheduler_java_grpc", + ], deps = [ ":scheduler_java_proto", - "scheduler_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, +java_gapic_test( + name = "scheduler_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.scheduler.v1beta1.CloudSchedulerClientTest", + ], runtime_deps = [":scheduler_java_gapic_test"], -) for test_name in [ - "com.google.cloud.scheduler.v1beta1.CloudSchedulerClientTest", -]] +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-scheduler-v1beta1-java", - client_deps = [":scheduler_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":scheduler_java_gapic_test"], - grpc_deps = [":scheduler_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":scheduler_java_gapic", + ":scheduler_java_grpc", ":scheduler_java_proto", ":scheduler_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -104,10 +98,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -123,11 +117,13 @@ go_proto_library( go_gapic_library( name = "scheduler_go_gapic", - src = ":scheduler_proto_with_info", - gapic_yaml = "cloudscheduler_gapic.yaml", - importpath = "cloud.google.com/go/scheduler/apiv1beta1", - service_yaml = "//google/cloud/scheduler:cloudscheduler_v1beta1.yaml", - deps = [":scheduler_go_proto"], + srcs = [":scheduler_proto_with_info"], + grpc_service_config = "cloudscheduler_grpc_service_config.json", + importpath = "cloud.google.com/go/scheduler/apiv1beta1;scheduler", + service_yaml = "cloudscheduler_v1beta1.yaml", + deps = [ + ":scheduler_go_proto", + ], ) go_test( @@ -137,13 +133,237 @@ go_test( importpath = "cloud.google.com/go/scheduler/apiv1beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-scheduler-v1beta1-go", deps = [ ":scheduler_go_gapic", - ":scheduler_go_gapic_srcjar-smoke-test.srcjar", ":scheduler_go_gapic_srcjar-test.srcjar", ":scheduler_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "scheduler_moved_proto", + srcs = [":scheduler_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "scheduler_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":scheduler_moved_proto"], +) + +py_grpc_library( + name = "scheduler_py_grpc", + srcs = [":scheduler_moved_proto"], + deps = [":scheduler_py_proto"], +) + +py_gapic_library( + name = "scheduler_py_gapic", + src = ":scheduler_proto_with_info", + gapic_yaml = "cloudscheduler_gapic.yaml", + package = "google.cloud.scheduler.v1beta1", + service_yaml = "cloudscheduler_v1beta1.yaml", + deps = [ + ":scheduler_py_grpc", + ":scheduler_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "scheduler-v1beta1-py", + deps = [ + ":scheduler_py_gapic", + ":scheduler_py_grpc", + ":scheduler_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "scheduler_php_proto", + deps = [":scheduler_proto"], +) + +php_grpc_library( + name = "scheduler_php_grpc", + srcs = [":scheduler_proto"], + deps = [":scheduler_php_proto"], +) + +php_gapic_library( + name = "scheduler_php_gapic", + src = ":scheduler_proto_with_info", + gapic_yaml = "cloudscheduler_gapic.yaml", + package = "google.cloud.scheduler.v1beta1", + service_yaml = "cloudscheduler_v1beta1.yaml", + deps = [ + ":scheduler_php_grpc", + ":scheduler_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-scheduler-v1beta1-php", + deps = [ + ":scheduler_php_gapic", + ":scheduler_php_grpc", + ":scheduler_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "scheduler_nodejs_gapic", + src = ":scheduler_proto_with_info", + gapic_yaml = "cloudscheduler_gapic.yaml", + package = "google.cloud.scheduler.v1beta1", + service_yaml = "cloudscheduler_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "scheduler-v1beta1-nodejs", + deps = [ + ":scheduler_nodejs_gapic", + ":scheduler_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "scheduler_ruby_proto", + deps = [":scheduler_proto"], +) + +ruby_grpc_library( + name = "scheduler_ruby_grpc", + srcs = [":scheduler_proto"], + deps = [":scheduler_ruby_proto"], +) + +ruby_gapic_library( + name = "scheduler_ruby_gapic", + src = ":scheduler_proto_with_info", + gapic_yaml = "cloudscheduler_gapic.yaml", + package = "google.cloud.scheduler.v1beta1", + service_yaml = "cloudscheduler_v1beta1.yaml", + deps = [ + ":scheduler_ruby_grpc", + ":scheduler_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-scheduler-v1beta1-ruby", + deps = [ + ":scheduler_ruby_gapic", + ":scheduler_ruby_grpc", + ":scheduler_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "scheduler_csharp_proto", + deps = [":scheduler_proto"], +) + +csharp_grpc_library( + name = "scheduler_csharp_grpc", + srcs = [":scheduler_proto"], + deps = [":scheduler_csharp_proto"], +) + +csharp_gapic_library( + name = "scheduler_csharp_gapic", + src = ":scheduler_proto_with_info", + gapic_yaml = "cloudscheduler_gapic.yaml", + package = "google.cloud.scheduler.v1beta1", + service_yaml = "cloudscheduler_v1beta1.yaml", + deps = [ + ":scheduler_csharp_grpc", + ":scheduler_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-scheduler-v1beta1-csharp", + deps = [ + ":scheduler_csharp_gapic", + ":scheduler_csharp_grpc", + ":scheduler_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/scheduler/v1beta1/cloudscheduler.proto b/google/cloud/scheduler/v1beta1/cloudscheduler.proto index 4c1d96618..4f86b7a56 100644 --- a/google/cloud/scheduler/v1beta1/cloudscheduler.proto +++ b/google/cloud/scheduler/v1beta1/cloudscheduler.proto @@ -18,6 +18,8 @@ syntax = "proto3"; package google.cloud.scheduler.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/scheduler/v1beta1/job.proto"; import "google/protobuf/empty.proto"; @@ -32,11 +34,15 @@ option objc_class_prefix = "SCHEDULER"; // The Cloud Scheduler API allows external entities to reliably // schedule asynchronous jobs. service CloudScheduler { + option (google.api.default_host) = "cloudscheduler.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Lists jobs. rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*}/jobs" }; + option (google.api.method_signature) = "parent"; } // Gets a job. @@ -44,6 +50,7 @@ service CloudScheduler { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/jobs/*}" }; + option (google.api.method_signature) = "name"; } // Creates a job. @@ -52,6 +59,7 @@ service CloudScheduler { post: "/v1beta1/{parent=projects/*/locations/*}/jobs" body: "job" }; + option (google.api.method_signature) = "parent,job"; } // Updates a job. @@ -68,6 +76,7 @@ service CloudScheduler { patch: "/v1beta1/{job.name=projects/*/locations/*/jobs/*}" body: "job" }; + option (google.api.method_signature) = "job,update_mask"; } // Deletes a job. @@ -75,6 +84,7 @@ service CloudScheduler { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/jobs/*}" }; + option (google.api.method_signature) = "name"; } // Pauses a job. @@ -89,6 +99,7 @@ service CloudScheduler { post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:pause" body: "*" }; + option (google.api.method_signature) = "name"; } // Resume a job. @@ -102,6 +113,7 @@ service CloudScheduler { post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:resume" body: "*" }; + option (google.api.method_signature) = "name"; } // Forces a job to run now. @@ -113,16 +125,20 @@ service CloudScheduler { post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:run" body: "*" }; + option (google.api.method_signature) = "name"; } } // Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. message ListJobsRequest { - // Required. - // - // The location name. For example: + // Required. The location name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudscheduler.googleapis.com/Job" + } + ]; // Requested page size. // @@ -159,40 +175,42 @@ message ListJobsResponse { // Request message for [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob]. message GetJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } // Request message for [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob]. message CreateJobRequest { - // Required. - // - // The location name. For example: + // Required. The location name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudscheduler.googleapis.com/Job" + } + ]; - // Required. - // - // The job to add. The user can optionally specify a name for the + // Required. The job to add. The user can optionally specify a name for the // job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an // existing job. If a name is not specified then the system will // generate a random unique name that will be returned // ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response. - Job job = 2; + Job job = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]. message UpdateJobRequest { - // Required. - // - // The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified. + // Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified. // // Output only fields cannot be modified using UpdateJob. // Any value specified for an output only field will be ignored. - Job job = 1; + Job job = 1 [(google.api.field_behavior) = REQUIRED]; // A mask used to specify which fields of the job are being updated. google.protobuf.FieldMask update_mask = 2; @@ -201,37 +219,49 @@ message UpdateJobRequest { // Request message for deleting a job using // [DeleteJob][google.cloud.scheduler.v1beta1.CloudScheduler.DeleteJob]. message DeleteJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } // Request message for [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob]. message PauseJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } // Request message for [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. message ResumeJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } // Request message for forcing a job to run now using // [RunJob][google.cloud.scheduler.v1beta1.CloudScheduler.RunJob]. message RunJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } diff --git a/google/cloud/scheduler/v1beta1/cloudscheduler_gapic.legacy.yaml b/google/cloud/scheduler/v1beta1/cloudscheduler_gapic.legacy.yaml new file mode 100644 index 000000000..07d2fa0f3 --- /dev/null +++ b/google/cloud/scheduler/v1beta1/cloudscheduler_gapic.legacy.yaml @@ -0,0 +1,257 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.scheduler.v1beta1 + python: + package_name: google.cloud.scheduler_v1beta1.gapic + go: + package_name: cloud.google.com/go/scheduler/apiv1beta1 + csharp: + package_name: Google.Cloud.Scheduler.V1Beta1 + ruby: + package_name: Google::Cloud::Scheduler::V1beta1 + php: + package_name: Google\Cloud\Scheduler\V1beta1 + nodejs: + package_name: scheduler.v1beta1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: +- name: google.cloud.scheduler.v1beta1.CloudScheduler + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/jobs/{job} + entity_name: job + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListJobs + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: jobs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 10000 + - name: GetJob + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: job + timeout_millis: 10000 + - name: CreateJob + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + - job + required_fields: + - parent + - job + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 10000 + - name: UpdateJob + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - job + - update_mask + required_fields: + - job + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + job.name: job + timeout_millis: 10000 + - name: DeleteJob + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: job + timeout_millis: 10000 + - name: PauseJob + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: job + timeout_millis: 10000 + - name: ResumeJob + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: job + timeout_millis: 10000 + - name: RunJob + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: job + timeout_millis: 10000 +resource_name_generation: +- message_name: Job + field_entity_map: + name: job +- message_name: ListJobsRequest + field_entity_map: + parent: location +- message_name: GetJobRequest + field_entity_map: + name: job +- message_name: CreateJobRequest + field_entity_map: + parent: location +- message_name: UpdateJobRequest + field_entity_map: + job.name: job +- message_name: DeleteJobRequest + field_entity_map: + name: job +- message_name: PauseJobRequest + field_entity_map: + name: job +- message_name: ResumeJobRequest + field_entity_map: + name: job +- message_name: RunJobRequest + field_entity_map: + name: job diff --git a/google/cloud/scheduler/v1beta1/cloudscheduler_gapic.yaml b/google/cloud/scheduler/v1beta1/cloudscheduler_gapic.yaml index abc706b61..c2d196bb6 100644 --- a/google/cloud/scheduler/v1beta1/cloudscheduler_gapic.yaml +++ b/google/cloud/scheduler/v1beta1/cloudscheduler_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -17,242 +17,12 @@ language_settings: nodejs: package_name: scheduler.v1beta1 domain_layer_location: google-cloud -# A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.cloud.scheduler.v1beta1.CloudScheduler - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - - name_pattern: projects/{project}/locations/{location} - entity_name: location - - name_pattern: projects/{project}/locations/{location}/jobs/{job} - entity_name: job - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: ListJobs - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: jobs - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 10000 - - name: GetJob - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: job - timeout_millis: 10000 - - name: CreateJob - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - - job - required_fields: - - parent - - job - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 10000 - - name: UpdateJob - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - job - - update_mask - required_fields: - - job - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - job.name: job - timeout_millis: 10000 - name: DeleteJob - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: job - timeout_millis: 10000 - name: PauseJob - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: job - timeout_millis: 10000 - name: ResumeJob - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: job - timeout_millis: 10000 - - name: RunJob - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: job - timeout_millis: 10000 -resource_name_generation: -- message_name: Job - field_entity_map: - name: job -- message_name: ListJobsRequest - field_entity_map: - parent: location -- message_name: GetJobRequest - field_entity_map: - name: job -- message_name: CreateJobRequest - field_entity_map: - parent: location -- message_name: UpdateJobRequest - field_entity_map: - job.name: job -- message_name: DeleteJobRequest - field_entity_map: - name: job -- message_name: PauseJobRequest - field_entity_map: - name: job -- message_name: ResumeJobRequest - field_entity_map: - name: job -- message_name: RunJobRequest - field_entity_map: - name: job diff --git a/google/cloud/scheduler/v1beta1/cloudscheduler_grpc_service_config.json b/google/cloud/scheduler/v1beta1/cloudscheduler_grpc_service_config.json new file mode 100755 index 000000000..547377650 --- /dev/null +++ b/google/cloud/scheduler/v1beta1/cloudscheduler_grpc_service_config.json @@ -0,0 +1,55 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.scheduler.v1beta1.CloudScheduler", + "method": "ListJobs" + }, + { + "service": "google.cloud.scheduler.v1beta1.CloudScheduler", + "method": "GetJob" + }, + { + "service": "google.cloud.scheduler.v1beta1.CloudScheduler", + "method": "DeleteJob" + }, + { + "service": "google.cloud.scheduler.v1beta1.CloudScheduler", + "method": "PauseJob" + }, + { + "service": "google.cloud.scheduler.v1beta1.CloudScheduler", + "method": "ResumeJob" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.scheduler.v1beta1.CloudScheduler", + "method": "CreateJob" + }, + { + "service": "google.cloud.scheduler.v1beta1.CloudScheduler", + "method": "UpdateJob" + }, + { + "service": "google.cloud.scheduler.v1beta1.CloudScheduler", + "method": "RunJob" + } + ], + "timeout": "600s" + } + ] +} diff --git a/google/cloud/scheduler/cloudscheduler_v1beta1.yaml b/google/cloud/scheduler/v1beta1/cloudscheduler_v1beta1.yaml similarity index 100% rename from google/cloud/scheduler/cloudscheduler_v1beta1.yaml rename to google/cloud/scheduler/v1beta1/cloudscheduler_v1beta1.yaml diff --git a/google/cloud/scheduler/v1beta1/job.proto b/google/cloud/scheduler/v1beta1/job.proto index ddf910b03..ddfda31ed 100644 --- a/google/cloud/scheduler/v1beta1/job.proto +++ b/google/cloud/scheduler/v1beta1/job.proto @@ -17,12 +17,12 @@ syntax = "proto3"; package google.cloud.scheduler.v1beta1; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "google/cloud/scheduler/v1beta1/target.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler"; option java_multiple_files = true; @@ -32,6 +32,11 @@ option java_package = "com.google.cloud.scheduler.v1beta1"; // Configuration for a job. // The maximum allowed size for a job is 100KB. message Job { + option (google.api.resource) = { + type: "cloudscheduler.googleapis.com/Job" + pattern: "projects/{project}/locations/{location}/jobs/{job}" + }; + // State of the job. enum State { // Unspecified state. diff --git a/google/cloud/scheduler/v1beta1/target.proto b/google/cloud/scheduler/v1beta1/target.proto index 3bb44a1fb..4b47e3567 100644 --- a/google/cloud/scheduler/v1beta1/target.proto +++ b/google/cloud/scheduler/v1beta1/target.proto @@ -17,8 +17,8 @@ syntax = "proto3"; package google.cloud.scheduler.v1beta1; +import "google/api/resource.proto"; import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler"; option java_multiple_files = true; @@ -32,9 +32,7 @@ option java_package = "com.google.cloud.scheduler.v1beta1"; // constitutes a failed execution. For a redirected request, the response // returned by the redirected request is considered. message HttpTarget { - // Required. - // - // The full URI path that the request will be sent to. This string + // Required. The full URI path that the request will be sent to. This string // must begin with either "http://" or "https://". Some examples of // valid values for [uri][google.cloud.scheduler.v1beta1.HttpTarget.uri] are: // `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will @@ -77,8 +75,8 @@ message HttpTarget { // will be generated and attached as an `Authorization` header in the HTTP // request. // - // This type of authorization should be used when sending requests to a GCP - // endpoint. + // This type of authorization should generally only be used when calling + // Google APIs hosted on *.googleapis.com. OAuthToken oauth_token = 5; // If specified, an @@ -86,8 +84,9 @@ message HttpTarget { // token will be generated and attached as an `Authorization` header in the // HTTP request. // - // This type of authorization should be used when sending requests to third - // party endpoints. + // This type of authorization can be used for many scenarios, including + // calling Cloud Run, or endpoints where you intend to validate the token + // yourself. OidcToken oidc_token = 6; } } @@ -162,16 +161,16 @@ message AppEngineHttpTarget { // Pub/Sub target. The job will be delivered by publishing a message to // the given Pub/Sub topic. message PubsubTarget { - // Required. - // - // The name of the Cloud Pub/Sub topic to which messages will + // Required. The name of the Cloud Pub/Sub topic to which messages will // be published when a job is delivered. The topic name must be in the // same format as required by PubSub's // [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), // for example `projects/PROJECT_ID/topics/TOPIC_ID`. // // The topic must be in the same project as the Cloud Scheduler job. - string topic_name = 1; + string topic_name = 1 [(google.api.resource_reference) = { + type: "pubsub.googleapis.com/Topic" + }]; // The message payload for PubsubMessage. // @@ -315,8 +314,8 @@ enum HttpMethod { // Contains information needed for generating an // [OAuth token](https://developers.google.com/identity/protocols/OAuth2). -// This type of authorization should be used when sending requests to a GCP -// endpoint. +// This type of authorization should generally only be used when calling Google +// APIs hosted on *.googleapis.com. message OAuthToken { // [Service account email](https://cloud.google.com/iam/docs/service-accounts) // to be used for generating OAuth token. @@ -332,9 +331,10 @@ message OAuthToken { // Contains information needed for generating an // [OpenID Connect -// token](https://developers.google.com/identity/protocols/OpenIDConnect). This -// type of authorization should be used when sending requests to third party -// endpoints. +// token](https://developers.google.com/identity/protocols/OpenIDConnect). +// This type of authorization can be used for many scenarios, including +// calling Cloud Run, or endpoints where you intend to validate the token +// yourself. message OidcToken { // [Service account email](https://cloud.google.com/iam/docs/service-accounts) // to be used for generating OIDC token. @@ -346,3 +346,11 @@ message OidcToken { // specified in target will be used. string audience = 2; } + +// The Pub/Sub Topic resource definition is in google/cloud/pubsub/v1/, +// but we do not import that proto directly; therefore, we redefine the +// pattern here. +option (google.api.resource_definition) = { + type: "pubsub.googleapis.com/Topic" + pattern: "projects/{project}/topics/{topic}" +}; diff --git a/google/cloud/secretmanager/v1/BUILD.bazel b/google/cloud/secretmanager/v1/BUILD.bazel new file mode 100644 index 000000000..9fbe04c97 --- /dev/null +++ b/google/cloud/secretmanager/v1/BUILD.bazel @@ -0,0 +1,371 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "secretmanager_proto", + srcs = [ + "resources.proto", + "service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "secretmanager_proto_with_info", + deps = [ + ":secretmanager_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "secretmanager_java_proto", + deps = [":secretmanager_proto"], +) + +java_grpc_library( + name = "secretmanager_java_grpc", + srcs = [":secretmanager_proto"], + deps = [":secretmanager_java_proto"], +) + +java_gapic_library( + name = "secretmanager_java_gapic", + src = ":secretmanager_proto_with_info", + gapic_yaml = "secretmanager_gapic.yaml", + package = "google.cloud.secretmanager.v1", + service_yaml = "secretmanager_v1.yaml", + test_deps = [ + ":secretmanager_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":secretmanager_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "secretmanager_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.secretmanager.v1.SecretManagerServiceClientTest", + ], + runtime_deps = [":secretmanager_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-secretmanager-v1-java", + deps = [ + ":secretmanager_java_gapic", + ":secretmanager_java_grpc", + ":secretmanager_java_proto", + ":secretmanager_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "secretmanager_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/secretmanager/v1", + protos = [":secretmanager_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_gapic_library( + name = "secretmanager_go_gapic", + srcs = [":secretmanager_proto_with_info"], + grpc_service_config = "secretmanager_grpc_service_config.json", + importpath = "cloud.google.com/go/secretmanager/apiv1;secretmanager", + service_yaml = "secretmanager_v1.yaml", + deps = [ + ":secretmanager_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_test( + name = "secretmanager_go_gapic_test", + srcs = [":secretmanager_go_gapic_srcjar_test"], + embed = [":secretmanager_go_gapic"], + importpath = "cloud.google.com/go/secretmanager/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-secretmanager-v1-go", + deps = [ + ":secretmanager_go_gapic", + ":secretmanager_go_gapic_srcjar-test.srcjar", + ":secretmanager_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "secretmanager_moved_proto", + srcs = [":secretmanager_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "secretmanager_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":secretmanager_moved_proto"], +) + +py_grpc_library( + name = "secretmanager_py_grpc", + srcs = [":secretmanager_moved_proto"], + deps = [":secretmanager_py_proto"], +) + +py_gapic_library( + name = "secretmanager_py_gapic", + src = ":secretmanager_proto_with_info", + gapic_yaml = "secretmanager_gapic.yaml", + package = "google.cloud.secretmanager.v1", + service_yaml = "secretmanager_v1.yaml", + deps = [ + ":secretmanager_py_grpc", + ":secretmanager_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "secretmanager-v1-py", + deps = [ + ":secretmanager_py_gapic", + ":secretmanager_py_grpc", + ":secretmanager_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "secretmanager_php_proto", + deps = [":secretmanager_proto"], +) + +php_grpc_library( + name = "secretmanager_php_grpc", + srcs = [":secretmanager_proto"], + deps = [":secretmanager_php_proto"], +) + +php_gapic_library( + name = "secretmanager_php_gapic", + src = ":secretmanager_proto_with_info", + gapic_yaml = "secretmanager_gapic.yaml", + package = "google.cloud.secretmanager.v1", + service_yaml = "secretmanager_v1.yaml", + deps = [ + ":secretmanager_php_grpc", + ":secretmanager_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-secretmanager-v1-php", + deps = [ + ":secretmanager_php_gapic", + ":secretmanager_php_grpc", + ":secretmanager_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "secretmanager_nodejs_gapic", + src = ":secretmanager_proto_with_info", + gapic_yaml = "secretmanager_gapic.yaml", + package = "google.cloud.secretmanager.v1", + service_yaml = "secretmanager_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "secretmanager-v1-nodejs", + deps = [ + ":secretmanager_nodejs_gapic", + ":secretmanager_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "secretmanager_ruby_proto", + deps = [":secretmanager_proto"], +) + +ruby_grpc_library( + name = "secretmanager_ruby_grpc", + srcs = [":secretmanager_proto"], + deps = [":secretmanager_ruby_proto"], +) + +ruby_gapic_library( + name = "secretmanager_ruby_gapic", + src = ":secretmanager_proto_with_info", + gapic_yaml = "secretmanager_gapic.yaml", + package = "google.cloud.secretmanager.v1", + service_yaml = "secretmanager_v1.yaml", + deps = [ + ":secretmanager_ruby_grpc", + ":secretmanager_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-secretmanager-v1-ruby", + deps = [ + ":secretmanager_ruby_gapic", + ":secretmanager_ruby_grpc", + ":secretmanager_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "secretmanager_csharp_proto", + deps = [":secretmanager_proto"], +) + +csharp_grpc_library( + name = "secretmanager_csharp_grpc", + srcs = [":secretmanager_proto"], + deps = [":secretmanager_csharp_proto"], +) + +csharp_gapic_library( + name = "secretmanager_csharp_gapic", + src = ":secretmanager_proto_with_info", + gapic_yaml = "secretmanager_gapic.yaml", + package = "google.cloud.secretmanager.v1", + service_yaml = "secretmanager_v1.yaml", + deps = [ + ":secretmanager_csharp_grpc", + ":secretmanager_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-secretmanager-v1-csharp", + deps = [ + ":secretmanager_csharp_gapic", + ":secretmanager_csharp_grpc", + ":secretmanager_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/secretmanager/v1/resources.proto b/google/cloud/secretmanager/v1/resources.proto new file mode 100644 index 000000000..d4bf4b7e6 --- /dev/null +++ b/google/cloud/secretmanager/v1/resources.proto @@ -0,0 +1,157 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.secretmanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.SecretManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/secretmanager/v1;secretmanager"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.cloud.secretmanager.v1"; +option objc_class_prefix = "GSM"; +option php_namespace = "Google\\Cloud\\SecretManager\\V1"; +option ruby_package = "Google::Cloud::SecretManager::V1"; + +// A [Secret][google.cloud.secretmanager.v1.Secret] is a logical secret whose value and versions can +// be accessed. +// +// A [Secret][google.cloud.secretmanager.v1.Secret] is made up of zero or more [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] that +// represent the secret data. +message Secret { + option (google.api.resource) = { + type: "secretmanager.googleapis.com/Secret" + pattern: "projects/{project}/secrets/{secret}" + }; + + // Output only. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] in the format `projects/*/secrets/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secretmanager.v1.Secret]. + // + // The replication policy cannot be changed after the Secret has been created. + Replication replication = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. The time at which the [Secret][google.cloud.secretmanager.v1.Secret] was created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The labels assigned to this Secret. + // + // Label keys must be between 1 and 63 characters long, have a UTF-8 encoding + // of maximum 128 bytes, and must conform to the following PCRE regular + // expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}` + // + // Label values must be between 0 and 63 characters long, have a UTF-8 + // encoding of maximum 128 bytes, and must conform to the following PCRE + // regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}` + // + // No more than 64 labels can be assigned to a given resource. + map labels = 4; +} + +// A secret version resource in the Secret Manager API. +message SecretVersion { + option (google.api.resource) = { + type: "secretmanager.googleapis.com/SecretVersion" + pattern: "projects/{project}/secrets/{secret}/versions/{secret_version}" + }; + + // The state of a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion], indicating if it can be accessed. + enum State { + // Not specified. This value is unused and invalid. + STATE_UNSPECIFIED = 0; + + // The [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] may be accessed. + ENABLED = 1; + + // The [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] may not be accessed, but the secret data + // is still available and can be placed back into the [ENABLED][google.cloud.secretmanager.v1.SecretVersion.State.ENABLED] + // state. + DISABLED = 2; + + // The [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] is destroyed and the secret data is no longer + // stored. A version may not leave this state once entered. + DESTROYED = 3; + } + + // Output only. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the + // format `projects/*/secrets/*/versions/*`. + // + // [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] IDs in a [Secret][google.cloud.secretmanager.v1.Secret] start at 1 and + // are incremented for each subsequent version of the secret. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] was created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time this [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] was destroyed. + // Only present if [state][google.cloud.secretmanager.v1.SecretVersion.state] is + // [DESTROYED][google.cloud.secretmanager.v1.SecretVersion.State.DESTROYED]. + google.protobuf.Timestamp destroy_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A policy that defines the replication configuration of data. +// +message Replication { + // A replication policy that replicates the [Secret][google.cloud.secretmanager.v1.Secret] payload without any + // restrictions. + message Automatic { + + } + + // A replication policy that replicates the [Secret][google.cloud.secretmanager.v1.Secret] payload into the + // locations specified in [Secret.replication.user_managed.replicas][] + message UserManaged { + // Represents a Replica for this [Secret][google.cloud.secretmanager.v1.Secret]. + message Replica { + // The canonical IDs of the location to replicate data. + // For example: `"us-east1"`. + string location = 1; + } + + // Required. The list of Replicas for this [Secret][google.cloud.secretmanager.v1.Secret]. + // + // Cannot be empty. + repeated Replica replicas = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The replication policy for this secret. + oneof replication { + // The [Secret][google.cloud.secretmanager.v1.Secret] will automatically be replicated without any restrictions. + Automatic automatic = 1; + + // The [Secret][google.cloud.secretmanager.v1.Secret] will only be replicated into the locations specified. + UserManaged user_managed = 2; + } +} + +// A secret payload resource in the Secret Manager API. This contains the +// sensitive secret payload that is associated with a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. +message SecretPayload { + // The secret data. Must be no larger than 64KiB. + bytes data = 1; +} diff --git a/google/cloud/secretmanager/v1/secretmanager_gapic.yaml b/google/cloud/secretmanager/v1/secretmanager_gapic.yaml new file mode 100644 index 000000000..1e4b0785e --- /dev/null +++ b/google/cloud/secretmanager/v1/secretmanager_gapic.yaml @@ -0,0 +1,19 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.secretmanager.v1 + python: + package_name: google.cloud.secretmanager_v1.gapic + go: + package_name: cloud.google.com/go/secretmanager/apiv1 + csharp: + package_name: Google.Cloud.SecretManager.V1 + ruby: + package_name: Google::Cloud::SecretManager::V1 + php: + package_name: Google\Cloud\SecretManager\V1 + nodejs: + package_name: secretmanager.v1 + domain_layer_location: google-cloud diff --git a/google/cloud/secretmanager/v1/secretmanager_grpc_service_config.json b/google/cloud/secretmanager/v1/secretmanager_grpc_service_config.json new file mode 100644 index 000000000..5574d48fa --- /dev/null +++ b/google/cloud/secretmanager/v1/secretmanager_grpc_service_config.json @@ -0,0 +1,83 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "ListSecrets" + }, + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "CreateSecret" + }, + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "AddSecretVersion" + }, + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "GetSecret" + }, + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "UpdateSecret" + }, + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "DeleteSecret" + }, + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "ListSecretVersions" + }, + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "GetSecretVersion" + }, + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "DisableSecretVersion" + }, + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "EnableSecretVersion" + }, + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "DestroySecretVersion" + }, + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "SetIamPolicy" + }, + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "GetIamPolicy" + }, + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "TestIamPermissions" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.secretmanager.v1.SecretManagerService", + "method": "AccessSecretVersion" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "UNKNOWN" + ] + } + } + ] +} diff --git a/google/cloud/secretmanager/v1/secretmanager_v1.yaml b/google/cloud/secretmanager/v1/secretmanager_v1.yaml new file mode 100644 index 000000000..b2f76829e --- /dev/null +++ b/google/cloud/secretmanager/v1/secretmanager_v1.yaml @@ -0,0 +1,25 @@ +type: google.api.Service +config_version: 3 +name: secretmanager.googleapis.com +title: Secret Manager API + +apis: +- name: google.cloud.secretmanager.v1.SecretManagerService + +documentation: + summary: |- + Stores sensitive data such as API keys, passwords, and certificates. + Provides convenience while improving security. + overview: Secret Manager Overview + +backend: + rules: + - selector: 'google.cloud.secretmanager.v1.SecretManagerService.*' + deadline: 10.0 + +authentication: + rules: + - selector: 'google.cloud.secretmanager.v1.SecretManagerService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/secretmanager/v1/service.proto b/google/cloud/secretmanager/v1/service.proto new file mode 100644 index 000000000..4bf5c6b69 --- /dev/null +++ b/google/cloud/secretmanager/v1/service.proto @@ -0,0 +1,420 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.secretmanager.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/secretmanager/v1/resources.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.SecretManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/secretmanager/v1;secretmanager"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.secretmanager.v1"; +option objc_class_prefix = "GSM"; +option php_namespace = "Google\\Cloud\\SecretManager\\V1"; +option ruby_package = "Google::Cloud::SecretManager::V1"; + +// `projects/*/secrets/*/versions/latest` is an alias to the `latest` +// [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + +// Secret Manager Service +// +// Manages secrets and operations using those secrets. Implements a REST +// model with the following objects: +// +// * [Secret][google.cloud.secretmanager.v1.Secret] +// * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] +service SecretManagerService { + option (google.api.default_host) = "secretmanager.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists [Secrets][google.cloud.secretmanager.v1.Secret]. + rpc ListSecrets(ListSecretsRequest) returns (ListSecretsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/secrets" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a new [Secret][google.cloud.secretmanager.v1.Secret] containing no [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + rpc CreateSecret(CreateSecretRequest) returns (Secret) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/secrets" + body: "secret" + }; + option (google.api.method_signature) = "parent,secret_id,secret"; + } + + // Creates a new [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] containing secret data and attaches + // it to an existing [Secret][google.cloud.secretmanager.v1.Secret]. + rpc AddSecretVersion(AddSecretVersionRequest) returns (SecretVersion) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/secrets/*}:addVersion" + body: "*" + }; + option (google.api.method_signature) = "parent,payload"; + } + + // Gets metadata for a given [Secret][google.cloud.secretmanager.v1.Secret]. + rpc GetSecret(GetSecretRequest) returns (Secret) { + option (google.api.http) = { + get: "/v1/{name=projects/*/secrets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates metadata of an existing [Secret][google.cloud.secretmanager.v1.Secret]. + rpc UpdateSecret(UpdateSecretRequest) returns (Secret) { + option (google.api.http) = { + patch: "/v1/{secret.name=projects/*/secrets/*}" + body: "secret" + }; + option (google.api.method_signature) = "secret,update_mask"; + } + + // Deletes a [Secret][google.cloud.secretmanager.v1.Secret]. + rpc DeleteSecret(DeleteSecretRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/secrets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. This call does not return secret + // data. + rpc ListSecretVersions(ListSecretVersionsRequest) returns (ListSecretVersionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/secrets/*}/versions" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + // + // `projects/*/secrets/*/versions/latest` is an alias to the `latest` + // [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + rpc GetSecretVersion(GetSecretVersionRequest) returns (SecretVersion) { + option (google.api.http) = { + get: "/v1/{name=projects/*/secrets/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the secret data. + // + // `projects/*/secrets/*/versions/latest` is an alias to the `latest` + // [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + rpc AccessSecretVersion(AccessSecretVersionRequest) returns (AccessSecretVersionResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/secrets/*/versions/*}:access" + }; + option (google.api.method_signature) = "name"; + } + + // Disables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + // + // Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to + // [DISABLED][google.cloud.secretmanager.v1.SecretVersion.State.DISABLED]. + rpc DisableSecretVersion(DisableSecretVersionRequest) returns (SecretVersion) { + option (google.api.http) = { + post: "/v1/{name=projects/*/secrets/*/versions/*}:disable" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Enables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + // + // Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to + // [ENABLED][google.cloud.secretmanager.v1.SecretVersion.State.ENABLED]. + rpc EnableSecretVersion(EnableSecretVersionRequest) returns (SecretVersion) { + option (google.api.http) = { + post: "/v1/{name=projects/*/secrets/*/versions/*}:enable" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Destroys a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + // + // Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to + // [DESTROYED][google.cloud.secretmanager.v1.SecretVersion.State.DESTROYED] and irrevocably destroys the + // secret data. + rpc DestroySecretVersion(DestroySecretVersionRequest) returns (SecretVersion) { + option (google.api.http) = { + post: "/v1/{name=projects/*/secrets/*/versions/*}:destroy" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Sets the access control policy on the specified secret. Replaces any + // existing policy. + // + // Permissions on [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] are enforced according + // to the policy set on the associated [Secret][google.cloud.secretmanager.v1.Secret]. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/secrets/*}:setIamPolicy" + body: "*" + }; + } + + // Gets the access control policy for a secret. + // Returns empty policy if the secret exists and does not have a policy set. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + get: "/v1/{resource=projects/*/secrets/*}:getIamPolicy" + }; + } + + // Returns permissions that a caller has for the specified secret. + // If the secret does not exist, this call returns an empty set of + // permissions, not a NOT_FOUND error. + // + // Note: This operation is designed to be used for building permission-aware + // UIs and command-line tools, not for authorization checking. This operation + // may "fail open" without warning. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/secrets/*}:testIamPermissions" + body: "*" + }; + } +} + +// Request message for [SecretManagerService.ListSecrets][google.cloud.secretmanager.v1.SecretManagerService.ListSecrets]. +message ListSecretsRequest { + // Required. The resource name of the project associated with the + // [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Optional. The maximum number of results to be returned in a single page. If + // set to 0, the server decides the number of results to return. If the + // number is greater than 25000, it is capped at 25000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListSecretsResponse.next_page_token][google.cloud.secretmanager.v1.ListSecretsResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for [SecretManagerService.ListSecrets][google.cloud.secretmanager.v1.SecretManagerService.ListSecrets]. +message ListSecretsResponse { + // The list of [Secrets][google.cloud.secretmanager.v1.Secret] sorted in reverse by create_time (newest + // first). + repeated Secret secrets = 1; + + // A token to retrieve the next page of results. Pass this value in + // [ListSecretsRequest.page_token][google.cloud.secretmanager.v1.ListSecretsRequest.page_token] to retrieve the next page. + string next_page_token = 2; + + // The total number of [Secrets][google.cloud.secretmanager.v1.Secret]. + int32 total_size = 3; +} + +// Request message for [SecretManagerService.CreateSecret][google.cloud.secretmanager.v1.SecretManagerService.CreateSecret]. +message CreateSecretRequest { + // Required. The resource name of the project to associate with the + // [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. This must be unique within the project. + // + // A secret ID is a string with a maximum length of 255 characters and can + // contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and + // underscore (`_`) characters. + string secret_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A [Secret][google.cloud.secretmanager.v1.Secret] with initial field values. + Secret secret = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion]. +message AddSecretVersionRequest { + // Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to associate with the + // [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format `projects/*/secrets/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/Secret" + } + ]; + + // Required. The secret payload of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + SecretPayload payload = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [SecretManagerService.GetSecret][google.cloud.secretmanager.v1.SecretManagerService.GetSecret]. +message GetSecretRequest { + // Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*/secrets/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/Secret" + } + ]; +} + +// Request message for [SecretManagerService.ListSecretVersions][google.cloud.secretmanager.v1.SecretManagerService.ListSecretVersions]. +message ListSecretVersionsRequest { + // Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] associated with the + // [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in the format + // `projects/*/secrets/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/Secret" + } + ]; + + // Optional. The maximum number of results to be returned in a single page. If + // set to 0, the server decides the number of results to return. If the + // number is greater than 25000, it is capped at 25000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // ListSecretVersionsResponse.next_page_token][]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for [SecretManagerService.ListSecretVersions][google.cloud.secretmanager.v1.SecretManagerService.ListSecretVersions]. +message ListSecretVersionsResponse { + // The list of [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] sorted in reverse by + // create_time (newest first). + repeated SecretVersion versions = 1; + + // A token to retrieve the next page of results. Pass this value in + // [ListSecretVersionsRequest.page_token][google.cloud.secretmanager.v1.ListSecretVersionsRequest.page_token] to retrieve the next page. + string next_page_token = 2; + + // The total number of [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + int32 total_size = 3; +} + +// Request message for [SecretManagerService.GetSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.GetSecretVersion]. +message GetSecretVersionRequest { + // Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + // `projects/*/secrets/*/versions/*`. + // `projects/*/secrets/*/versions/latest` is an alias to the `latest` + // [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; +} + +// Request message for [SecretManagerService.UpdateSecret][google.cloud.secretmanager.v1.SecretManagerService.UpdateSecret]. +message UpdateSecretRequest { + // Required. [Secret][google.cloud.secretmanager.v1.Secret] with updated field values. + Secret secret = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Specifies the fields to be updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [SecretManagerService.AccessSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion]. +message AccessSecretVersionRequest { + // Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + // `projects/*/secrets/*/versions/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; +} + +// Response message for [SecretManagerService.AccessSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion]. +message AccessSecretVersionResponse { + // The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + // `projects/*/secrets/*/versions/*`. + string name = 1 [(google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + }]; + + // Secret payload + SecretPayload payload = 2; +} + +// Request message for [SecretManagerService.DeleteSecret][google.cloud.secretmanager.v1.SecretManagerService.DeleteSecret]. +message DeleteSecretRequest { + // Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format + // `projects/*/secrets/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/Secret" + } + ]; +} + +// Request message for [SecretManagerService.DisableSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.DisableSecretVersion]. +message DisableSecretVersionRequest { + // Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in the format + // `projects/*/secrets/*/versions/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; +} + +// Request message for [SecretManagerService.EnableSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.EnableSecretVersion]. +message EnableSecretVersionRequest { + // Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in the format + // `projects/*/secrets/*/versions/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; +} + +// Request message for [SecretManagerService.DestroySecretVersion][google.cloud.secretmanager.v1.SecretManagerService.DestroySecretVersion]. +message DestroySecretVersionRequest { + // Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in the format + // `projects/*/secrets/*/versions/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; +} diff --git a/google/devtools/containeranalysis/artman_containeranalysis.yaml b/google/cloud/secrets/artman_secretmanager_v1beta1.yaml similarity index 72% rename from google/devtools/containeranalysis/artman_containeranalysis.yaml rename to google/cloud/secrets/artman_secretmanager_v1beta1.yaml index 67172bc9a..e2a8e4210 100644 --- a/google/devtools/containeranalysis/artman_containeranalysis.yaml +++ b/google/cloud/secrets/artman_secretmanager_v1beta1.yaml @@ -1,15 +1,15 @@ common: - api_name: containeranalysis - api_version: v1alpha1 + api_name: secretmanager + api_version: v1beta1 organization_name: google-cloud proto_deps: - name: google-common-protos - name: google-iam-v1 - proto_path: google/iam/v1 src_proto_paths: - - v1alpha1 - service_yaml: containeranalysis.yaml - gapic_yaml: v1alpha1/containeranalysis_gapic.yaml + - v1beta1 + service_yaml: v1beta1/secretmanager_v1beta1.yaml + gapic_yaml: v1beta1/secretmanager_gapic.yaml + proto_package: google.cloud.secrets.v1beta1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/secrets/v1beta1/BUILD.bazel b/google/cloud/secrets/v1beta1/BUILD.bazel new file mode 100644 index 000000000..01128a1d3 --- /dev/null +++ b/google/cloud/secrets/v1beta1/BUILD.bazel @@ -0,0 +1,369 @@ +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "secretmanager_proto", + srcs = [ + "service.proto", + "resources.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "secretmanager_proto_with_info", + deps = [ + ":secretmanager_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "secretmanager_java_proto", + deps = [":secretmanager_proto"], +) + +java_grpc_library( + name = "secretmanager_java_grpc", + srcs = [":secretmanager_proto"], + deps = [":secretmanager_java_proto"], +) + +java_gapic_library( + name = "secretmanager_java_gapic", + src = ":secretmanager_proto_with_info", + gapic_yaml = "secretmanager_gapic.yaml", + package = "google.cloud.secrets.v1beta1", + service_yaml = "//google/cloud/secrets/v1beta1:secretmanager_v1beta1.yaml", + test_deps = [ + ":secretmanager_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":secretmanager_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "secretmanager_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.secretmanager.v1beta1.SecretManagerServiceClientTest", + ], + runtime_deps = [":secretmanager_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-secretmanager-v1beta1-java", + deps = [ + ":secretmanager_java_gapic", + ":secretmanager_java_grpc", + ":secretmanager_java_proto", + ":secretmanager_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "secretmanager_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/secretmanager/v1beta1", + protos = [":secretmanager_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_gapic_library( + name = "secretmanager_go_gapic", + srcs = [":secretmanager_proto_with_info"], + grpc_service_config = "secretmanager_grpc_service_config.json", + importpath = "cloud.google.com/go/secretmanager/apiv1beta1;secretmanager", + service_yaml = "//google/cloud/secrets/v1beta1:secretmanager_v1beta1.yaml", + deps = [ + ":secretmanager_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_test( + name = "secretmanager_go_gapic_test", + srcs = [":secretmanager_go_gapic_srcjar_test"], + embed = [":secretmanager_go_gapic"], + importpath = "cloud.google.com/go/secretmanager/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-secretmanager-v1beta1-go", + deps = [ + ":secretmanager_go_gapic", + ":secretmanager_go_gapic_srcjar-test.srcjar", + ":secretmanager_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "secretmanager_moved_proto", + srcs = [":secretmanager_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "secretmanager_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":secretmanager_moved_proto"], +) + +py_grpc_library( + name = "secretmanager_py_grpc", + srcs = [":secretmanager_moved_proto"], + deps = [":secretmanager_py_proto"], +) + +py_gapic_library( + name = "secretmanager_py_gapic", + src = ":secretmanager_proto_with_info", + gapic_yaml = "secretmanager_gapic.yaml", + package = "google.cloud.secrets.v1beta1", + service_yaml = "//google/cloud/secrets/v1beta1:secretmanager_v1beta1.yaml", + deps = [ + ":secretmanager_py_grpc", + ":secretmanager_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "secretmanager-v1beta1-py", + deps = [ + ":secretmanager_py_gapic", + ":secretmanager_py_grpc", + ":secretmanager_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "secretmanager_php_proto", + deps = [":secretmanager_proto"], +) + +php_grpc_library( + name = "secretmanager_php_grpc", + srcs = [":secretmanager_proto"], + deps = [":secretmanager_php_proto"], +) + +php_gapic_library( + name = "secretmanager_php_gapic", + src = ":secretmanager_proto_with_info", + gapic_yaml = "secretmanager_gapic.yaml", + package = "google.cloud.secrets.v1beta1", + service_yaml = "//google/cloud/secrets/v1beta1:secretmanager_v1beta1.yaml", + deps = [ + ":secretmanager_php_grpc", + ":secretmanager_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-secretmanager-v1beta1-php", + deps = [ + ":secretmanager_php_gapic", + ":secretmanager_php_grpc", + ":secretmanager_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "secretmanager_nodejs_gapic", + src = ":secretmanager_proto_with_info", + gapic_yaml = "secretmanager_gapic.yaml", + package = "google.cloud.secrets.v1beta1", + service_yaml = "//google/cloud/secrets/v1beta1:secretmanager_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "secretmanager-v1beta1-nodejs", + deps = [ + ":secretmanager_nodejs_gapic", + ":secretmanager_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "secretmanager_ruby_proto", + deps = [":secretmanager_proto"], +) + +ruby_grpc_library( + name = "secretmanager_ruby_grpc", + srcs = [":secretmanager_proto"], + deps = [":secretmanager_ruby_proto"], +) + +ruby_gapic_library( + name = "secretmanager_ruby_gapic", + src = ":secretmanager_proto_with_info", + gapic_yaml = "secretmanager_gapic.yaml", + package = "google.cloud.secrets.v1beta1", + service_yaml = "//google/cloud/secrets/v1beta1:secretmanager_v1beta1.yaml", + deps = [ + ":secretmanager_ruby_grpc", + ":secretmanager_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-secretmanager-v1beta1-ruby", + deps = [ + ":secretmanager_ruby_gapic", + ":secretmanager_ruby_grpc", + ":secretmanager_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "secretmanager_csharp_proto", + deps = [":secretmanager_proto"], +) + +csharp_grpc_library( + name = "secretmanager_csharp_grpc", + srcs = [":secretmanager_proto"], + deps = [":secretmanager_csharp_proto"], +) + +csharp_gapic_library( + name = "secretmanager_csharp_gapic", + src = ":secretmanager_proto_with_info", + gapic_yaml = "secretmanager_gapic.yaml", + package = "google.cloud.secrets.v1beta1", + service_yaml = "//google/cloud/secrets/v1beta1:secretmanager_v1beta1.yaml", + deps = [ + ":secretmanager_csharp_grpc", + ":secretmanager_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-secretmanager-v1beta1-csharp", + deps = [ + ":secretmanager_csharp_gapic", + ":secretmanager_csharp_grpc", + ":secretmanager_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/secrets/v1beta1/resources.proto b/google/cloud/secrets/v1beta1/resources.proto new file mode 100644 index 000000000..4819addd5 --- /dev/null +++ b/google/cloud/secrets/v1beta1/resources.proto @@ -0,0 +1,156 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.secrets.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.SecretManager.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/secretmanager/v1beta1;secretmanager"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.cloud.secretmanager.v1beta1"; +option objc_class_prefix = "GSM"; +option php_namespace = "Google\\Cloud\\SecretManager\\V1beta1"; +option ruby_package = "Google::Cloud::SecretManager::V1beta1"; + +// A [Secret][google.cloud.secrets.v1beta1.Secret] is a logical secret whose value and versions can +// be accessed. +// +// A [Secret][google.cloud.secrets.v1beta1.Secret] is made up of zero or more [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion] that +// represent the secret data. +message Secret { + option (google.api.resource) = { + type: "secretmanager.googleapis.com/Secret" + pattern: "projects/{project}/secrets/{secret}" + }; + + // Output only. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] in the format `projects/*/secrets/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret]. + // + // The replication policy cannot be changed after the Secret has been created. + Replication replication = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The labels assigned to this Secret. + // + // Label keys must be between 1 and 63 characters long, have a UTF-8 encoding + // of maximum 128 bytes, and must conform to the following PCRE regular + // expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}` + // + // Label values must be between 0 and 63 characters long, have a UTF-8 + // encoding of maximum 128 bytes, and must conform to the following PCRE + // regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}` + // + // No more than 64 labels can be assigned to a given resource. + map labels = 4; +} + +// A secret version resource in the Secret Manager API. +message SecretVersion { + option (google.api.resource) = { + type: "secretmanager.googleapis.com/SecretVersion" + pattern: "projects/{project}/secrets/{secret}/versions/{secret_version}" + }; + + // The state of a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion], indicating if it can be accessed. + enum State { + // Not specified. This value is unused and invalid. + STATE_UNSPECIFIED = 0; + + // The [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] may be accessed. + ENABLED = 1; + + // The [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] may not be accessed, but the secret data + // is still available and can be placed back into the [ENABLED][google.cloud.secrets.v1beta1.SecretVersion.State.ENABLED] + // state. + DISABLED = 2; + + // The [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] is destroyed and the secret data is no longer + // stored. A version may not leave this state once entered. + DESTROYED = 3; + } + + // Output only. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] in the + // format `projects/*/secrets/*/versions/*`. + // + // [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] IDs in a [Secret][google.cloud.secrets.v1beta1.Secret] start at 1 and + // are incremented for each subsequent version of the secret. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] was created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time this [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] was destroyed. + // Only present if [state][google.cloud.secrets.v1beta1.SecretVersion.state] is + // [DESTROYED][google.cloud.secrets.v1beta1.SecretVersion.State.DESTROYED]. + google.protobuf.Timestamp destroy_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A policy that defines the replication configuration of data. +message Replication { + // A replication policy that replicates the [Secret][google.cloud.secrets.v1beta1.Secret] payload without any + // restrictions. + message Automatic { + + } + + // A replication policy that replicates the [Secret][google.cloud.secrets.v1beta1.Secret] payload into the + // locations specified in [Secret.replication.user_managed.replicas][] + message UserManaged { + // Represents a Replica for this [Secret][google.cloud.secrets.v1beta1.Secret]. + message Replica { + // The canonical IDs of the location to replicate data. + // For example: `"us-east1"`. + string location = 1; + } + + // Required. The list of Replicas for this [Secret][google.cloud.secrets.v1beta1.Secret]. + // + // Cannot be empty. + repeated Replica replicas = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The replication policy for this secret. + oneof replication { + // The [Secret][google.cloud.secrets.v1beta1.Secret] will automatically be replicated without any restrictions. + Automatic automatic = 1; + + // The [Secret][google.cloud.secrets.v1beta1.Secret] will only be replicated into the locations specified. + UserManaged user_managed = 2; + } +} + +// A secret payload resource in the Secret Manager API. This contains the +// sensitive secret data that is associated with a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. +message SecretPayload { + // The secret data. Must be no larger than 64KiB. + bytes data = 1; +} diff --git a/google/cloud/secrets/v1beta1/secretmanager_gapic.yaml b/google/cloud/secrets/v1beta1/secretmanager_gapic.yaml new file mode 100644 index 000000000..a72e23637 --- /dev/null +++ b/google/cloud/secrets/v1beta1/secretmanager_gapic.yaml @@ -0,0 +1,19 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.secretmanager.v1beta1 + python: + package_name: google.cloud.secretmanager_v1beta1.gapic + go: + package_name: cloud.google.com/go/secretmanager/apiv1beta1 + csharp: + package_name: Google.Cloud.SecretManager.V1Beta1 + ruby: + package_name: Google::Cloud::SecretManager::V1beta1 + php: + package_name: Google\Cloud\SecretManager\V1beta1 + nodejs: + package_name: secretmanager.v1beta1 + domain_layer_location: google-cloud diff --git a/google/cloud/secrets/v1beta1/secretmanager_grpc_service_config.json b/google/cloud/secrets/v1beta1/secretmanager_grpc_service_config.json new file mode 100644 index 000000000..bd52ecaa6 --- /dev/null +++ b/google/cloud/secrets/v1beta1/secretmanager_grpc_service_config.json @@ -0,0 +1,83 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "ListSecrets" + }, + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "CreateSecret" + }, + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "AddSecretVersion" + }, + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "GetSecret" + }, + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "UpdateSecret" + }, + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "DeleteSecret" + }, + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "ListSecretVersions" + }, + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "GetSecretVersion" + }, + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "DisableSecretVersion" + }, + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "EnableSecretVersion" + }, + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "DestroySecretVersion" + }, + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "SetIamPolicy" + }, + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "GetIamPolicy" + }, + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "TestIamPermissions" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.secrets.v1beta1.SecretManagerService", + "method": "AccessSecretVersion" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "UNKNOWN" + ] + } + } + ] +} diff --git a/google/cloud/secrets/v1beta1/secretmanager_v1beta1.yaml b/google/cloud/secrets/v1beta1/secretmanager_v1beta1.yaml new file mode 100644 index 000000000..6a0beccc7 --- /dev/null +++ b/google/cloud/secrets/v1beta1/secretmanager_v1beta1.yaml @@ -0,0 +1,25 @@ +type: google.api.Service +config_version: 3 +name: secretmanager.googleapis.com +title: Secret Manager API + +apis: +- name: google.cloud.secrets.v1beta1.SecretManagerService + +documentation: + summary: |- + Stores sensitive data such as API keys, passwords, and certificates. + Provides convenience while improving security. + overview: Secret Manager Overview + +backend: + rules: + - selector: 'google.cloud.secrets.v1beta1.SecretManagerService.*' + deadline: 10.0 + +authentication: + rules: + - selector: 'google.cloud.secrets.v1beta1.SecretManagerService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/secrets/v1beta1/service.proto b/google/cloud/secrets/v1beta1/service.proto new file mode 100644 index 000000000..9efb8cfcc --- /dev/null +++ b/google/cloud/secrets/v1beta1/service.proto @@ -0,0 +1,420 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.secrets.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/secrets/v1beta1/resources.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.SecretManager.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/secretmanager/v1beta1;secretmanager"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.secretmanager.v1beta1"; +option objc_class_prefix = "GSM"; +option php_namespace = "Google\\Cloud\\SecretManager\\V1beta1"; +option ruby_package = "Google::Cloud::SecretManager::V1beta1"; + +// `projects/*/secrets/*/versions/latest` is an alias to the `latest` +// [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + +// Secret Manager Service +// +// Manages secrets and operations using those secrets. Implements a REST +// model with the following objects: +// +// * [Secret][google.cloud.secrets.v1beta1.Secret] +// * [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] +service SecretManagerService { + option (google.api.default_host) = "secretmanager.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists [Secrets][google.cloud.secrets.v1beta1.Secret]. + rpc ListSecrets(ListSecretsRequest) returns (ListSecretsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/secrets" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a new [Secret][google.cloud.secrets.v1beta1.Secret] containing no [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion]. + rpc CreateSecret(CreateSecretRequest) returns (Secret) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/secrets" + body: "secret" + }; + option (google.api.method_signature) = "parent,secret_id,secret"; + } + + // Creates a new [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] containing secret data and attaches + // it to an existing [Secret][google.cloud.secrets.v1beta1.Secret]. + rpc AddSecretVersion(AddSecretVersionRequest) returns (SecretVersion) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/secrets/*}:addVersion" + body: "*" + }; + option (google.api.method_signature) = "parent,payload"; + } + + // Gets metadata for a given [Secret][google.cloud.secrets.v1beta1.Secret]. + rpc GetSecret(GetSecretRequest) returns (Secret) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/secrets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates metadata of an existing [Secret][google.cloud.secrets.v1beta1.Secret]. + rpc UpdateSecret(UpdateSecretRequest) returns (Secret) { + option (google.api.http) = { + patch: "/v1beta1/{secret.name=projects/*/secrets/*}" + body: "secret" + }; + option (google.api.method_signature) = "secret,update_mask"; + } + + // Deletes a [Secret][google.cloud.secrets.v1beta1.Secret]. + rpc DeleteSecret(DeleteSecretRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/secrets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion]. This call does not return secret + // data. + rpc ListSecretVersions(ListSecretVersionsRequest) returns (ListSecretVersionsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/secrets/*}/versions" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets metadata for a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + // + // `projects/*/secrets/*/versions/latest` is an alias to the `latest` + // [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + rpc GetSecretVersion(GetSecretVersionRequest) returns (SecretVersion) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/secrets/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Accesses a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. This call returns the secret data. + // + // `projects/*/secrets/*/versions/latest` is an alias to the `latest` + // [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + rpc AccessSecretVersion(AccessSecretVersionRequest) returns (AccessSecretVersionResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/secrets/*/versions/*}:access" + }; + option (google.api.method_signature) = "name"; + } + + // Disables a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + // + // Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to + // [DISABLED][google.cloud.secrets.v1beta1.SecretVersion.State.DISABLED]. + rpc DisableSecretVersion(DisableSecretVersionRequest) returns (SecretVersion) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/secrets/*/versions/*}:disable" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Enables a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + // + // Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to + // [ENABLED][google.cloud.secrets.v1beta1.SecretVersion.State.ENABLED]. + rpc EnableSecretVersion(EnableSecretVersionRequest) returns (SecretVersion) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/secrets/*/versions/*}:enable" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Destroys a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + // + // Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to + // [DESTROYED][google.cloud.secrets.v1beta1.SecretVersion.State.DESTROYED] and irrevocably destroys the + // secret data. + rpc DestroySecretVersion(DestroySecretVersionRequest) returns (SecretVersion) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/secrets/*/versions/*}:destroy" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Sets the access control policy on the specified secret. Replaces any + // existing policy. + // + // Permissions on [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion] are enforced according + // to the policy set on the associated [Secret][google.cloud.secrets.v1beta1.Secret]. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/secrets/*}:setIamPolicy" + body: "*" + }; + } + + // Gets the access control policy for a secret. + // Returns empty policy if the secret exists and does not have a policy set. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + get: "/v1beta1/{resource=projects/*/secrets/*}:getIamPolicy" + }; + } + + // Returns permissions that a caller has for the specified secret. + // If the secret does not exist, this call returns an empty set of + // permissions, not a NOT_FOUND error. + // + // Note: This operation is designed to be used for building permission-aware + // UIs and command-line tools, not for authorization checking. This operation + // may "fail open" without warning. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/secrets/*}:testIamPermissions" + body: "*" + }; + } +} + +// Request message for [SecretManagerService.ListSecrets][google.cloud.secrets.v1beta1.SecretManagerService.ListSecrets]. +message ListSecretsRequest { + // Required. The resource name of the project associated with the + // [Secrets][google.cloud.secrets.v1beta1.Secret], in the format `projects/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Optional. The maximum number of results to be returned in a single page. If + // set to 0, the server decides the number of results to return. If the + // number is greater than 25000, it is capped at 25000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListSecretsResponse.next_page_token][google.cloud.secrets.v1beta1.ListSecretsResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for [SecretManagerService.ListSecrets][google.cloud.secrets.v1beta1.SecretManagerService.ListSecrets]. +message ListSecretsResponse { + // The list of [Secrets][google.cloud.secrets.v1beta1.Secret] sorted in reverse by create_time (newest + // first). + repeated Secret secrets = 1; + + // A token to retrieve the next page of results. Pass this value in + // [ListSecretsRequest.page_token][google.cloud.secrets.v1beta1.ListSecretsRequest.page_token] to retrieve the next page. + string next_page_token = 2; + + // The total number of [Secrets][google.cloud.secrets.v1beta1.Secret]. + int32 total_size = 3; +} + +// Request message for [SecretManagerService.CreateSecret][google.cloud.secrets.v1beta1.SecretManagerService.CreateSecret]. +message CreateSecretRequest { + // Required. The resource name of the project to associate with the + // [Secret][google.cloud.secrets.v1beta1.Secret], in the format `projects/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. This must be unique within the project. + // + // A secret ID is a string with a maximum length of 255 characters and can + // contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and + // underscore (`_`) characters. + string secret_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A [Secret][google.cloud.secrets.v1beta1.Secret] with initial field values. + Secret secret = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [SecretManagerService.AddSecretVersion][google.cloud.secrets.v1beta1.SecretManagerService.AddSecretVersion]. +message AddSecretVersionRequest { + // Required. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] to associate with the + // [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] in the format `projects/*/secrets/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/Secret" + } + ]; + + // Required. The secret payload of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + SecretPayload payload = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [SecretManagerService.GetSecret][google.cloud.secrets.v1beta1.SecretManagerService.GetSecret]. +message GetSecretRequest { + // Required. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret], in the format `projects/*/secrets/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/Secret" + } + ]; +} + +// Request message for [SecretManagerService.ListSecretVersions][google.cloud.secrets.v1beta1.SecretManagerService.ListSecretVersions]. +message ListSecretVersionsRequest { + // Required. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] associated with the + // [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion] to list, in the format + // `projects/*/secrets/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/Secret" + } + ]; + + // Optional. The maximum number of results to be returned in a single page. If + // set to 0, the server decides the number of results to return. If the + // number is greater than 25000, it is capped at 25000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // ListSecretVersionsResponse.next_page_token][]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for [SecretManagerService.ListSecretVersions][google.cloud.secrets.v1beta1.SecretManagerService.ListSecretVersions]. +message ListSecretVersionsResponse { + // The list of [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion] sorted in reverse by + // create_time (newest first). + repeated SecretVersion versions = 1; + + // A token to retrieve the next page of results. Pass this value in + // [ListSecretVersionsRequest.page_token][google.cloud.secrets.v1beta1.ListSecretVersionsRequest.page_token] to retrieve the next page. + string next_page_token = 2; + + // The total number of [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion]. + int32 total_size = 3; +} + +// Request message for [SecretManagerService.GetSecretVersion][google.cloud.secrets.v1beta1.SecretManagerService.GetSecretVersion]. +message GetSecretVersionRequest { + // Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] in the format + // `projects/*/secrets/*/versions/*`. + // `projects/*/secrets/*/versions/latest` is an alias to the `latest` + // [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; +} + +// Request message for [SecretManagerService.UpdateSecret][google.cloud.secrets.v1beta1.SecretManagerService.UpdateSecret]. +message UpdateSecretRequest { + // Required. [Secret][google.cloud.secrets.v1beta1.Secret] with updated field values. + Secret secret = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Specifies the fields to be updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [SecretManagerService.AccessSecretVersion][google.cloud.secrets.v1beta1.SecretManagerService.AccessSecretVersion]. +message AccessSecretVersionRequest { + // Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] in the format + // `projects/*/secrets/*/versions/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; +} + +// Response message for [SecretManagerService.AccessSecretVersion][google.cloud.secrets.v1beta1.SecretManagerService.AccessSecretVersion]. +message AccessSecretVersionResponse { + // The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] in the format + // `projects/*/secrets/*/versions/*`. + string name = 1 [(google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + }]; + + // Secret payload + SecretPayload payload = 2; +} + +// Request message for [SecretManagerService.DeleteSecret][google.cloud.secrets.v1beta1.SecretManagerService.DeleteSecret]. +message DeleteSecretRequest { + // Required. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] to delete in the format + // `projects/*/secrets/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/Secret" + } + ]; +} + +// Request message for [SecretManagerService.DisableSecretVersion][google.cloud.secrets.v1beta1.SecretManagerService.DisableSecretVersion]. +message DisableSecretVersionRequest { + // Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to disable in the format + // `projects/*/secrets/*/versions/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; +} + +// Request message for [SecretManagerService.EnableSecretVersion][google.cloud.secrets.v1beta1.SecretManagerService.EnableSecretVersion]. +message EnableSecretVersionRequest { + // Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to enable in the format + // `projects/*/secrets/*/versions/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; +} + +// Request message for [SecretManagerService.DestroySecretVersion][google.cloud.secrets.v1beta1.SecretManagerService.DestroySecretVersion]. +message DestroySecretVersionRequest { + // Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to destroy in the format + // `projects/*/secrets/*/versions/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; +} diff --git a/google/cloud/securitycenter/BUILD.bazel b/google/cloud/securitycenter/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/cloud/securitycenter/BUILD.bazel +++ b/google/cloud/securitycenter/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/securitycenter/artman_securitycenter_v1.yaml b/google/cloud/securitycenter/artman_securitycenter_v1.yaml index 733df0f92..8a160cebc 100644 --- a/google/cloud/securitycenter/artman_securitycenter_v1.yaml +++ b/google/cloud/securitycenter/artman_securitycenter_v1.yaml @@ -3,13 +3,14 @@ common: api_version: v1 organization_name: google-cloud proto_deps: - - name: google-common-protos - - name: google-iam-v1 - proto_path: google/iam/v1 + - name: google-common-protos + - name: google-iam-v1 + proto_path: google/iam/v1 src_proto_paths: - v1 - service_yaml: securitycenter_v1.yaml + service_yaml: v1/securitycenter_v1.yaml gapic_yaml: v1/securitycenter_gapic.yaml + proto_package: google.cloud.securitycenter.v1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/securitycenter/artman_securitycenter_v1p1beta1.yaml b/google/cloud/securitycenter/artman_securitycenter_v1p1beta1.yaml new file mode 100644 index 000000000..ec98bc9d5 --- /dev/null +++ b/google/cloud/securitycenter/artman_securitycenter_v1p1beta1.yaml @@ -0,0 +1,37 @@ +common: + api_name: securitycenter + api_version: v1p1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + - name: google-iam-v1 + proto_path: google/iam/v1 + src_proto_paths: + - v1p1beta1 + service_yaml: v1p1beta1/securitycenter_v1p1beta1.yaml + gapic_yaml: v1p1beta1/securitycenter_gapic.yaml + proto_package: google.cloud.securitycenter.v1p1beta1 +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: php_gapic + type: GAPIC + language: PHP +- name: go_gapic + type: GAPIC + language: GO +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: csharp_gapic + type: GAPIC + language: CSHARP diff --git a/google/cloud/securitycenter/securitycenter_v1.yaml b/google/cloud/securitycenter/securitycenter_v1.yaml deleted file mode 100644 index bb3084313..000000000 --- a/google/cloud/securitycenter/securitycenter_v1.yaml +++ /dev/null @@ -1,80 +0,0 @@ -type: google.api.Service -config_version: 3 -name: securitycenter.googleapis.com -title: Cloud Security Command Center API - -apis: -- name: google.cloud.securitycenter.v1.SecurityCenter - -types: -- name: google.cloud.securitycenter.v1.RunAssetDiscoveryResponse - -documentation: - summary: |- - Cloud Security Command Center API provides access to temporal views of - assets and findings within an organization. - -backend: - rules: - - selector: google.cloud.securitycenter.v1.SecurityCenter.CreateSource - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.CreateFinding - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.GetIamPolicy - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.GetOrganizationSettings - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.GetSource - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.GroupAssets - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.GroupFindings - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.ListAssets - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.ListFindings - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.ListSources - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.RunAssetDiscovery - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.SetFindingState - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.SetIamPolicy - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.TestIamPermissions - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.UpdateFinding - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.UpdateOrganizationSettings - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.UpdateSource - deadline: 60.0 - - selector: google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityMarks - deadline: 60.0 - -http: - rules: - - selector: google.longrunning.Operations.ListOperations - get: '/v1/{name=organizations/*/operations}' - - - selector: google.longrunning.Operations.GetOperation - get: '/v1/{name=organizations/*/operations/*}' - - - selector: google.longrunning.Operations.DeleteOperation - delete: '/v1/{name=organizations/*/operations/*}' - - - selector: google.longrunning.Operations.CancelOperation - post: '/v1/{name=organizations/*/operations/*}:cancel' - body: '*' - -authentication: - rules: - - selector: 'google.cloud.securitycenter.v1.SecurityCenter.*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform - - selector: 'google.longrunning.Operations.*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/securitycenter/settings/v1beta1/BUILD.bazel b/google/cloud/securitycenter/settings/v1beta1/BUILD.bazel new file mode 100644 index 000000000..08abb81c3 --- /dev/null +++ b/google/cloud/securitycenter/settings/v1beta1/BUILD.bazel @@ -0,0 +1,367 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "settings_proto", + srcs = [ + "billing_settings.proto", + "component_settings.proto", + "detector.proto", + "securitycenter_settings_service.proto", + "settings.proto", + "sink_settings.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "settings_proto_with_info", + deps = [ + ":settings_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "settings_java_proto", + deps = [":settings_proto"], +) + +java_grpc_library( + name = "settings_java_grpc", + srcs = [":settings_proto"], + deps = [":settings_java_proto"], +) + +java_gapic_library( + name = "settings_java_gapic", + src = ":settings_proto_with_info", + gapic_yaml = "securitycenter_settings_gapic.yaml", + package = "google.cloud.securitycenter.settings.v1beta1", + service_yaml = "securitycenter_settings.yaml", + test_deps = [ + ":settings_java_grpc", + ], + deps = [ + ":settings_java_proto", + ], +) + +java_gapic_test( + name = "settings_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsServiceClientTest", + ], + runtime_deps = [":settings_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-securitycenter-settings-v1beta1-java", + deps = [ + ":settings_java_gapic", + ":settings_java_grpc", + ":settings_java_proto", + ":settings_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "settings_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/securitycenter/settings/v1beta1", + protos = [":settings_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "settings_go_gapic", + srcs = [":settings_proto_with_info"], + grpc_service_config = "securitycenter_settings_grpc_service_config.json", + importpath = "cloud.google.com/go/securitycenter/settings/apiv1beta1;settings", + service_yaml = "securitycenter_settings.yaml", + deps = [ + ":settings_go_proto", + ], +) + +go_test( + name = "settings_go_gapic_test", + srcs = [":settings_go_gapic_srcjar_test"], + embed = [":settings_go_gapic"], + importpath = "cloud.google.com/go/securitycenter/settings/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-securitycenter-settings-v1beta1-go", + deps = [ + ":settings_go_gapic", + ":settings_go_gapic_srcjar-test.srcjar", + ":settings_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "settings_moved_proto", + srcs = [":settings_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "settings_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":settings_moved_proto"], +) + +py_grpc_library( + name = "settings_py_grpc", + srcs = [":settings_moved_proto"], + deps = [":settings_py_proto"], +) + +py_gapic_library( + name = "settings_py_gapic", + src = ":settings_proto_with_info", + gapic_yaml = "securitycenter_settings_gapic.yaml", + package = "google.cloud.securitycenter.settings.v1beta1", + service_yaml = "securitycenter_settings.yaml", + deps = [ + ":settings_py_grpc", + ":settings_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "securitycenter-settings-v1beta1-py", + deps = [ + ":settings_py_gapic", + ":settings_py_grpc", + ":settings_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "settings_php_proto", + deps = [":settings_proto"], +) + +php_grpc_library( + name = "settings_php_grpc", + srcs = [":settings_proto"], + deps = [":settings_php_proto"], +) + +php_gapic_library( + name = "settings_php_gapic", + src = ":settings_proto_with_info", + gapic_yaml = "securitycenter_settings_gapic.yaml", + package = "google.cloud.securitycenter.settings.v1beta1", + service_yaml = "securitycenter_settings.yaml", + deps = [ + ":settings_php_grpc", + ":settings_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-securitycenter-settings-v1beta1-php", + deps = [ + ":settings_php_gapic", + ":settings_php_grpc", + ":settings_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "settings_nodejs_gapic", + src = ":settings_proto_with_info", + gapic_yaml = "securitycenter_settings_gapic.yaml", + package = "google.cloud.securitycenter.settings.v1beta1", + service_yaml = "securitycenter_settings.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "securitycenter-settings-v1beta1-nodejs", + deps = [ + ":settings_nodejs_gapic", + ":settings_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "settings_ruby_proto", + deps = [":settings_proto"], +) + +ruby_grpc_library( + name = "settings_ruby_grpc", + srcs = [":settings_proto"], + deps = [":settings_ruby_proto"], +) + +ruby_gapic_library( + name = "settings_ruby_gapic", + src = ":settings_proto_with_info", + gapic_yaml = "securitycenter_settings_gapic.yaml", + package = "google.cloud.securitycenter.settings.v1beta1", + service_yaml = "securitycenter_settings.yaml", + deps = [ + ":settings_ruby_grpc", + ":settings_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-securitycenter-settings-v1beta1-ruby", + deps = [ + ":settings_ruby_gapic", + ":settings_ruby_grpc", + ":settings_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "settings_csharp_proto", + deps = [":settings_proto"], +) + +csharp_grpc_library( + name = "settings_csharp_grpc", + srcs = [":settings_proto"], + deps = [":settings_csharp_proto"], +) + +csharp_gapic_library( + name = "settings_csharp_gapic", + src = ":settings_proto_with_info", + gapic_yaml = "securitycenter_settings_gapic.yaml", + package = "google.cloud.securitycenter.settings.v1beta1", + service_yaml = "securitycenter_settings.yaml", + deps = [ + ":settings_csharp_grpc", + ":settings_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-securitycenter-settings-v1beta1-csharp", + deps = [ + ":settings_csharp_gapic", + ":settings_csharp_grpc", + ":settings_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/securitycenter/settings/v1beta1/billing_settings.proto b/google/cloud/securitycenter/settings/v1beta1/billing_settings.proto new file mode 100644 index 000000000..149e32fcd --- /dev/null +++ b/google/cloud/securitycenter/settings/v1beta1/billing_settings.proto @@ -0,0 +1,79 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.settings.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.SecurityCenter.Settings.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/settings/v1beta1;settings"; +option java_multiple_files = true; +option java_outer_classname = "BillingSettingsProto"; +option java_package = "com.google.cloud.securitycenter.settings.v1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\Settings\\V1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::Settings::V1beta1"; + +// If this field is populated and billing_tier is STANDARD, this is +// indication of a point in the _past_ when a PREMIUM access ended. + +// Billing settings +message BillingSettings { + // Output only. Billing tier selected by customer + BillingTier billing_tier = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of billing method + BillingType billing_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The absolute point in time when the subscription became effective. + // Can be compared to expire_time value to determine full contract duration + google.protobuf.Timestamp start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The absolute point in time when the subscription expires. + // + // If this field is populated and billing_tier is STANDARD, this is + // indication of a point in the _past_ when a PREMIUM access ended. + google.protobuf.Timestamp expire_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Billing tier options +enum BillingTier { + // Default value. This value is unused. + BILLING_TIER_UNSPECIFIED = 0; + + // The standard billing tier. + STANDARD = 1; + + // The premium billing tier. + PREMIUM = 2; +} + +// Billing type +enum BillingType { + // Default billing type + BILLING_TYPE_UNSPECIFIED = 0; + + // Subscription for Premium billing tier + SUBSCRIPTION = 1; + + // Trial subscription for Premium billing tier + TRIAL_SUBSCRIPTION = 2; + + // Alpha customer for Premium billing tier + ALPHA = 3; +} diff --git a/google/cloud/securitycenter/settings/v1beta1/component_settings.proto b/google/cloud/securitycenter/settings/v1beta1/component_settings.proto new file mode 100644 index 000000000..efeb831f0 --- /dev/null +++ b/google/cloud/securitycenter/settings/v1beta1/component_settings.proto @@ -0,0 +1,171 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.settings.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.SecurityCenter.Settings.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/settings/v1beta1;settings"; +option java_multiple_files = true; +option java_outer_classname = "ComponentSettingsProto"; +option java_package = "com.google.cloud.securitycenter.settings.v1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\Settings\\V1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::Settings::V1beta1"; + +// Component Settings for Security Command Center +message ComponentSettings { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/ComponentSettings" + pattern: "organizations/{organization}/components/{component}/settings" + pattern: "folders/{folder}/components/{component}/settings" + pattern: "projects/{project}/components/{component}/settings" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings" + pattern: "projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings" + pattern: "projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings" + }; + + // Settings for each detector. + message DetectorSettings { + // ENABLE to enable component, DISABLE to disable and INHERIT to inherit + // setting from ancestors. + ComponentEnablementState state = 1; + } + + // The relative resource name of the component settings. + // Formats: + // * `organizations/{organization}/components/{component}/settings` + // * `folders/{folder}/components/{component}/settings` + // * `projects/{project}/components/{component}/settings` + // * `projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings` + // * `projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings` + // * `projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings` + string name = 1; + + // ENABLE to enable component, DISABLE to disable and INHERIT to inherit + // setting from ancestors. + ComponentEnablementState state = 2; + + // Output only. The service account to be used for security center component. + // The component must have permission to "act as" the service account. + string project_service_account = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Settings for detectors. Not all detectors must have settings present at + // each and every level in the hierarchy. If it is not present the setting + // will be inherited from its ancestors folders, organizations or the + // defaults. + map detector_settings = 4; + + // Output only. An fingerprint used for optimistic concurrency. If none is provided + // on updates then the existing metadata will be blindly overwritten. + string etag = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time these settings were last updated. + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Component specific settings. This must match the component value. + oneof specific_settings { + // Container Threate Detection specific settings + // For component, expect CONTAINER_THREAT_DETECTION + ContainerThreatDetectionSettings container_threat_detection_settings = 41; + + // Event Threat Detection specific settings + // For component, expect EVENT_THREAT_DETECTION + EventThreatDetectionSettings event_threat_detection_settings = 42; + + // Security Health Analytics specific settings + // For component, expect SECURITY_HEALTH_ANALYTICS + SecurityHealthAnalyticsSettings security_health_analytics_settings = 44; + + // Web Security Scanner specific settings + // For component, expect WEB_SECURITY_SCANNER + WebSecurityScanner web_security_scanner_settings = 40; + } +} + +// User specified settings for Web Security Scanner +message WebSecurityScanner { + +} + +// User specified settings for KTD +message ContainerThreatDetectionSettings { + +} + +// User specified settings for ETD +message EventThreatDetectionSettings { + +} + +// User specified settings for Security Health Analytics +message SecurityHealthAnalyticsSettings { + // Settings for "NON_ORG_IAM_MEMBER" scanner. + message NonOrgIamMemberSettings { + // User emails ending in the provided identities are allowed to have IAM + // permissions on a project or the organization. Otherwise a finding will + // be created. + // A valid identity can be: + // * a domain that starts with "@", e.g. "@yourdomain.com". + // * a fully specified email address that does not start with "@", e.g. + // "abc@gmail.com" + // Regular expressions are not supported. + // Service accounts are not examined by the scanner and will be omitted if + // added to the list. + // If not specified, only Gmail accounts will be considered as non-approved. + repeated string approved_identities = 1; + } + + // Settings for "ADMIN_SERVICE_ACCOUNT" scanner. + message AdminServiceAccountSettings { + // User-created service accounts ending in the provided identities are + // allowed to have Admin, Owner or Editor roles granted to them. Otherwise + // a finding will be created. + // A valid identity can be: + // * a partilly specified service account that starts with "@", e.g. + // "@myproject.iam.gserviceaccount.com". This approves all the service + // accounts suffixed with the specified identity. + // * a fully specified service account that does not start with "@", e.g. + // "myadmin@myproject.iam.gserviceaccount.com". + // Google-created service accounts are all approved. + repeated string approved_identities = 1; + } + + // Settings for "NON_ORG_IAM_MEMBER" scanner. + NonOrgIamMemberSettings non_org_iam_member_settings = 1; + + // Settings for "ADMIN_SERVICE_ACCOUNT" scanner. + AdminServiceAccountSettings admin_service_account_settings = 2; +} + +// Valid states for a component +enum ComponentEnablementState { + // No state specified, equivalent of INHERIT + COMPONENT_ENABLEMENT_STATE_UNSPECIFIED = 0; + + // Disable the component + DISABLE = 1; + + // Enable the component + ENABLE = 2; + + // Inherit the state from resources parent folder or organization. + INHERIT = 3; +} diff --git a/google/cloud/securitycenter/settings/v1beta1/detector.proto b/google/cloud/securitycenter/settings/v1beta1/detector.proto new file mode 100644 index 000000000..c7c42bc33 --- /dev/null +++ b/google/cloud/securitycenter/settings/v1beta1/detector.proto @@ -0,0 +1,57 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.settings.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/cloud/securitycenter/settings/v1beta1/billing_settings.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.SecurityCenter.Settings.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/settings/v1beta1;settings"; +option java_multiple_files = true; +option java_outer_classname = "DetectorsProto"; +option java_package = "com.google.cloud.securitycenter.settings.v1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\Settings\\V1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::Settings::V1beta1"; + +// Detector is a set of detectors or scanners act as individual checks done +// within a component e.g. bad IP, bad domains, IAM anomaly, cryptomining, open +// firewall, etc. Detector is independent of Organization, meaning each detector +// must be defined for a given Security Center component under a specified +// billing tier. Organizations can configure the list of detectors based on +// their subscribed billing tier. +// +// Defines a detector, its billing tier and any applicable labels. +message Detector { + // Output only. Detector Identifier + string detector = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Component that supports detector type. Multiple components may support the + // same detector. + string component = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The billing tier may be different for a detector of the same name in + // another component. + BillingTier billing_tier = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Google curated detector labels. These are alphanumeric tags that are not + // necessarily human readable. Labels can be used to group detectors together + // in the future. An example might be tagging all detectors “PCI” that help + // with PCI compliance. + repeated string detector_labels = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/securitycenter/settings/v1beta1/securitycenter_settings.yaml b/google/cloud/securitycenter/settings/v1beta1/securitycenter_settings.yaml new file mode 100644 index 000000000..ba2059581 --- /dev/null +++ b/google/cloud/securitycenter/settings/v1beta1/securitycenter_settings.yaml @@ -0,0 +1,29 @@ +type: google.api.Service +config_version: 3 +name: securitycenter.googleapis.com +title: Cloud Security Command Center API + +apis: +- name: google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService + +documentation: + summary: |- + Cloud Security Command Center Settings API provides functionality to retrieve and update configurations. + +backend: + rules: + - selector: 'google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService.*' + deadline: 480.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + +authentication: + rules: + - selector: 'google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/securitycenter/settings/v1beta1/securitycenter_settings_gapic.yaml b/google/cloud/securitycenter/settings/v1beta1/securitycenter_settings_gapic.yaml new file mode 100644 index 000000000..79f79eaae --- /dev/null +++ b/google/cloud/securitycenter/settings/v1beta1/securitycenter_settings_gapic.yaml @@ -0,0 +1,18 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + java: + package_name: com.google.cloud.securitycenter.settings.v1beta1 + python: + package_name: google.cloud.securitycenter.settings_v1beta1.gapic + go: + package_name: cloud.google.com/go/securitycenter/settings/apiv1beta1 + csharp: + package_name: Google.Cloud.SecurityCenter.Settings.V1Beta1 + ruby: + package_name: Google::Cloud::SecurityCenter::Settings::V1beta1 + php: + package_name: Google\Cloud\SecurityCenter\Settings\V1beta1 + nodejs: + package_name: security-center.settings.v1beta1 + domain_layer_location: google-cloud diff --git a/google/cloud/securitycenter/settings/v1beta1/securitycenter_settings_grpc_service_config.json b/google/cloud/securitycenter/settings/v1beta1/securitycenter_settings_grpc_service_config.json new file mode 100644 index 000000000..83b7fc8b7 --- /dev/null +++ b/google/cloud/securitycenter/settings/v1beta1/securitycenter_settings_grpc_service_config.json @@ -0,0 +1,70 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService", + "method": "GetServiceAccount" + }, + { + "service": "google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService", + "method": "GetSettings" + }, + { + "service": "google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService", + "method": "UpdateSettings" + }, + { + "service": "google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService", + "method": "ResetSettings" + }, + { + "service": "google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService", + "method": "BatchGetSettings" + }, + { + "service": "google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService", + "method": "CalculateEffectiveSettings" + }, + { + "service": "google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService", + "method": "BatchCalculateEffectiveSettings" + }, + { + "service": "google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService", + "method": "GetComponentSettings" + }, + { + "service": "google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService", + "method": "UpdateComponentSettings" + }, + { + "service": "google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService", + "method": "ResetComponentSettings" + }, + { + "service": "google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService", + "method": "CalculateEffectiveComponentSettings" + }, + { + "service": "google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService", + "method": "ListDetectors" + }, + { + "service": "google.cloud.securitycenter.settings.v1beta1.SecurityCenterSettingsService", + "method": "ListComponents" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/securitycenter/settings/v1beta1/securitycenter_settings_service.proto b/google/cloud/securitycenter/settings/v1beta1/securitycenter_settings_service.proto new file mode 100644 index 000000000..e5263695d --- /dev/null +++ b/google/cloud/securitycenter/settings/v1beta1/securitycenter_settings_service.proto @@ -0,0 +1,650 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.settings.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/securitycenter/settings/v1beta1/component_settings.proto"; +import "google/cloud/securitycenter/settings/v1beta1/detector.proto"; +import "google/cloud/securitycenter/settings/v1beta1/settings.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.SecurityCenter.Settings.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/settings/v1beta1;settings"; +option java_multiple_files = true; +option java_outer_classname = "SettingsServiceProto"; +option java_package = "com.google.cloud.securitycenter.settings.v1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\Settings\\V1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::Settings::V1beta1"; + +// ## API Overview +// +// The SecurityCenterSettingsService is a sub-api of +// `securitycenter.googleapis.com`. The service provides methods to manage +// Security Center Settings, and Component Settings for GCP organizations, +// folders, projects, and clusters. +service SecurityCenterSettingsService { + option (google.api.default_host) = "securitycenter.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Retrieves the organizations service account, if it exists, otherwise it + // creates the organization service account. This API is idempotent and + // will only create a service account once. On subsequent calls it will + // return the previously created service account. SHA, SCC and CTD Infra + // Automation will use this SA. This SA will not have any permissions when + // created. The UI will provision this via IAM or the user will using + // their own internal process. This API only creates SAs on the organization. + // Folders are not supported and projects will use per-project SAs associated + // with APIs enabled on a project. This API will be called by the UX + // onboarding workflow. + rpc GetServiceAccount(GetServiceAccountRequest) returns (ServiceAccount) { + option (google.api.http) = { + get: "/settings/v1beta1/{name=organizations/*/serviceAccount}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the Settings. + rpc GetSettings(GetSettingsRequest) returns (Settings) { + option (google.api.http) = { + get: "/settings/v1beta1/{name=organizations/*/settings}" + additional_bindings { + get: "/settings/v1beta1/{name=folders/*/settings}" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/settings}" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/locations/*/clusters/*/settings}" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/regions/*/clusters/*/settings}" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/zones/*/clusters/*/settings}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Updates the Settings. + rpc UpdateSettings(UpdateSettingsRequest) returns (Settings) { + option (google.api.http) = { + patch: "/settings/v1beta1/{settings.name=organizations/*/settings}" + body: "settings" + additional_bindings { + patch: "/settings/v1beta1/{settings.name=folders/*/settings}" + body: "settings" + } + additional_bindings { + patch: "/settings/v1beta1/{settings.name=projects/*/settings}" + body: "settings" + } + additional_bindings { + patch: "/settings/v1beta1/{settings.name=projects/*/locations/*/clusters/*/settings}" + body: "settings" + } + additional_bindings { + patch: "/settings/v1beta1/{settings.name=projects/*/regions/*/clusters/*/settings}" + body: "settings" + } + additional_bindings { + patch: "/settings/v1beta1/{settings.name=projects/*/zones/*/clusters/*/settings}" + body: "settings" + } + }; + option (google.api.method_signature) = "settings,update_mask"; + } + + // Reset the organization, folder or project's settings and return + // the settings of just that resource to the default. + // + // Settings are present at the organization, folder, project, and cluster + // levels. Using Reset on a sub-organization level will remove that resource's + // override and result in the parent's settings being used (eg: if Reset on a + // cluster, project settings will be used). + // + // Using Reset on organization will remove the override that was set and + // result in default settings being used. + rpc ResetSettings(ResetSettingsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/settings/v1beta1/{name=organizations/*/settings}:reset" + body: "*" + additional_bindings { + post: "/settings/v1beta1/{name=folders/*/settings}:reset" + body: "*" + } + additional_bindings { + post: "/settings/v1beta1/{name=projects/*/settings}:reset" + body: "*" + } + additional_bindings { + post: "/settings/v1beta1/{name=projects/*/locations/*/clusters/*/settings}:reset" + body: "*" + } + additional_bindings { + post: "/settings/v1beta1/{name=projects/*/regions/*/clusters/*/settings}:reset" + body: "*" + } + additional_bindings { + post: "/settings/v1beta1/{name=projects/*/zones/*/clusters/*/settings}:reset" + body: "*" + } + }; + } + + // Gets a list of settings. + rpc BatchGetSettings(BatchGetSettingsRequest) returns (BatchGetSettingsResponse) { + option (google.api.http) = { + get: "/settings/v1beta1/{parent=organizations/*}/settings:batchGet" + }; + } + + // CalculateEffectiveSettings looks up all of the Security Center + // Settings resources in the GCP resource hierarchy, and calculates the + // effective settings on that resource by applying the following rules: + // * Settings provided closer to the target resource take precedence over + // those further away (e.g. folder will override organization level + // settings). + // * Product defaults can be overridden at org, folder, project, and cluster + // levels. + // * Detectors will be filtered out if they belong to a billing tier the + // customer + // has not configured. + rpc CalculateEffectiveSettings(CalculateEffectiveSettingsRequest) returns (Settings) { + option (google.api.http) = { + get: "/settings/v1beta1/{name=organizations/*/effectiveSettings}:calculate" + additional_bindings { + get: "/settings/v1beta1/{name=folders/*/effectiveSettings}:calculate" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/effectiveSettings}:calculate" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/locations/*/clusters/*/effectiveSettings}:calculate" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/regions/*/clusters/*/effectiveSettings}:calculate" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/zones/*/clusters/*/effectiveSettings}:calculate" + } + }; + option (google.api.method_signature) = "name"; + } + + // Gets a list of effective settings. + rpc BatchCalculateEffectiveSettings(BatchCalculateEffectiveSettingsRequest) returns (BatchCalculateEffectiveSettingsResponse) { + option (google.api.http) = { + post: "/settings/v1beta1/{parent=organizations/*}/effectiveSettings:batchCalculate" + body: "*" + }; + } + + // Gets the Component Settings. + rpc GetComponentSettings(GetComponentSettingsRequest) returns (ComponentSettings) { + option (google.api.http) = { + get: "/settings/v1beta1/{name=organizations/*/components/*/settings}" + additional_bindings { + get: "/settings/v1beta1/{name=folders/*/components/*/settings}" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/components/*/settings}" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/locations/*/clusters/*/components/*/settings}" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/regions/*/clusters/*/components/*/settings}" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/zones/*/clusters/*/components/*/settings}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Updates the Component Settings. + rpc UpdateComponentSettings(UpdateComponentSettingsRequest) returns (ComponentSettings) { + option (google.api.http) = { + patch: "/settings/v1beta1/{component_settings.name=organizations/*/components/*/settings}" + body: "component_settings" + additional_bindings { + patch: "/settings/v1beta1/{component_settings.name=folders/*/components/*/settings}" + body: "component_settings" + } + additional_bindings { + patch: "/settings/v1beta1/{component_settings.name=projects/*/components/*/settings}" + body: "component_settings" + } + additional_bindings { + patch: "/settings/v1beta1/{component_settings.name=projects/*/locations/*/clusters/*/components/*/settings}" + body: "component_settings" + } + additional_bindings { + patch: "/settings/v1beta1/{component_settings.name=projects/*/regions/*/clusters/*/components/*/settings}" + body: "component_settings" + } + additional_bindings { + patch: "/settings/v1beta1/{component_settings.name=projects/*/zones/*/clusters/*/components/*/settings}" + body: "component_settings" + } + }; + option (google.api.method_signature) = "component_settings,update_mask"; + } + + // Reset the organization, folder or project's component settings and return + // the settings to the default. Settings are present at the + // organization, folder and project levels. Using Reset for a folder or + // project will remove the override that was set and result in the + // organization-level settings being used. + rpc ResetComponentSettings(ResetComponentSettingsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/settings/v1beta1/{name=organizations/*/components/*/settings}:reset" + body: "*" + additional_bindings { + post: "/settings/v1beta1/{name=folders/*/components/*/settings}:reset" + body: "*" + } + additional_bindings { + post: "/settings/v1beta1/{name=projects/*/components/*/settings}:reset" + body: "*" + } + additional_bindings { + post: "/settings/v1beta1/{name=projects/*/locations/*/clusters/*/components/*/settings}:reset" + body: "*" + } + additional_bindings { + post: "/settings/v1beta1/{name=projects/*/regions/*/clusters/*/components/*/settings}:reset" + body: "*" + } + additional_bindings { + post: "/settings/v1beta1/{name=projects/*/zones/*/clusters/*/components/*/settings}:reset" + body: "*" + } + }; + } + + // Gets the Effective Component Settings. + rpc CalculateEffectiveComponentSettings(CalculateEffectiveComponentSettingsRequest) returns (ComponentSettings) { + option (google.api.http) = { + get: "/settings/v1beta1/{name=organizations/*/components/*/effectiveSettings}:calculate" + additional_bindings { + get: "/settings/v1beta1/{name=folders/*/components/*/effectiveSettings}:calculate" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/components/*/effectiveSettings}:calculate" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/locations/*/clusters/*/components/*/effectiveSettings}:calculate" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/regions/*/clusters/*/components/*/effectiveSettings}:calculate" + } + additional_bindings { + get: "/settings/v1beta1/{name=projects/*/zones/*/clusters/*/components/*/effectiveSettings}:calculate" + } + }; + option (google.api.method_signature) = "name"; + } + + // Retrieves an unordered list of available detectors. + rpc ListDetectors(ListDetectorsRequest) returns (ListDetectorsResponse) { + option (google.api.http) = { + get: "/settings/v1beta1/{parent=organizations/*}/detectors" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves an unordered list of available SCC components. + rpc ListComponents(ListComponentsRequest) returns (ListComponentsResponse) { + option (google.api.http) = { + get: "/settings/v1beta1/{parent=organizations/*}/components" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request message for GetServiceAccount. +message GetServiceAccountRequest { + // Required. The relative resource name of the service account resource. + // Format: + // * `organizations/{organization}/serviceAccount` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/ServiceAccount" + } + ]; +} + +// An organization-level service account to be used by threat detection +// components. +message ServiceAccount { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/ServiceAccount" + pattern: "organizations/{organization}/serviceAccount" + }; + + // The relative resource name of the service account resource. + // Format: + // * `organizations/{organization}/serviceAccount` + string name = 1; + + // Security Center managed service account for the organization + // example service-org-1234@scc.iam.gserviceaccount.com + // This service_account will be stored in the ComponentSettings field for the + // SCC, SHA, and Infra Automation components. + string service_account = 2; +} + +// Request message for GetSettings. +message GetSettingsRequest { + // Required. The name of the settings to retrieve. + // Formats: + // * `organizations/{organization}/settings` + // * `folders/{folder}/settings` + // * `projects/{project}/settings` + // * `projects/{project}/locations/{location}/clusters/{cluster}/settings` + // * `projects/{project}/regions/{region}/clusters/{cluster}/settings` + // * `projects/{project}/zones/{zone}/clusters/{cluster}/settings` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Settings" + } + ]; +} + +// Request message for UpdateSettings. +message UpdateSettingsRequest { + // Required. The settings to update. + // + // The settings' `name` field is used to identify the settings to be updated. + // Formats: + // * `organizations/{organization}/settings` + // * `folders/{folder}/settings` + // * `projects/{project}/settings` + // * `projects/{project}/locations/{location}/clusters/{cluster}/settings` + // * `projects/{project}/regions/{region}/clusters/{cluster}/settings` + // * `projects/{project}/zones/{zone}/clusters/{cluster}/settings` + Settings settings = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated on the settings. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for ResetSettings. +message ResetSettingsRequest { + // Required. The name of the settings to reset. + // Formats: + // * `organizations/{organization}/settings` + // * `folders/{folder}/settings` + // * `projects/{project}/settings` + // * `projects/{project}/locations/{location}/clusters/{cluster}/settings` + // * `projects/{project}/regions/{region}/clusters/{cluster}/settings` + // * `projects/{project}/zones/{zone}/clusters/{cluster}/settings` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Settings" + } + ]; + + // A fingerprint used for optimistic concurrency. If none is provided, + // then the existing settings will be blindly overwritten. + string etag = 2; +} + +// Request message for BatchGetSettings. +message BatchGetSettingsRequest { + // Required. The relative resource name of the organization shared by all of the + // settings being retrieved. + // Format: + // * `organizations/{organization}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; + + // The names of the settings to retrieve. + // A maximum of 1000 settings can be retrieved in a batch. + // Formats: + // * `organizations/{organization}/settings` + // * `folders/{folder}/settings` + // * `projects/{project}/settings` + // * `projects/{project}/locations/{location}/clusters/{cluster}/settings` + // * `projects/{project}/regions/{region}/clusters/{cluster}/settings` + // * `projects/{project}/zones/{zone}/clusters/{cluster}/settings` + repeated string names = 2; +} + +// Response message for BatchGetSettings. +message BatchGetSettingsResponse { + // Settings requested. + repeated Settings settings = 1; +} + +// Request message for CalculateEffectiveSettings. +message CalculateEffectiveSettingsRequest { + // Required. The name of the effective settings to retrieve. + // Formats: + // * `organizations/{organization}/effectiveSettings` + // * `folders/{folder}/effectiveSettings` + // * `projects/{project}/effectiveSettings` + // * `projects/{project}/locations/{location}/clusters/{cluster}/effectiveSettings` + // * `projects/{project}/regions/{region}/clusters/{cluster}/effectiveSettings` + // * `projects/{project}/zones/{zone}/clusters/{cluster}/effectiveSettings` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Settings" + } + ]; +} + +// Request message for BatchGetEffectiveSettings. +message BatchCalculateEffectiveSettingsRequest { + // Required. The relative resource name of the organization shared by all of the + // settings being retrieved. + // Format: + // * `organizations/{organization}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; + + // The requests specifying the effective settings to retrieve. + // A maximum of 1000 effective settings can be retrieved in a batch. + repeated CalculateEffectiveSettingsRequest requests = 2; +} + +// Response message for BatchGetEffectiveSettings. +message BatchCalculateEffectiveSettingsResponse { + // Settings requested. + repeated Settings settings = 1; +} + +// Request message for GetComponentSettings. +message GetComponentSettingsRequest { + // Required. The component settings to retrieve. + // + // Formats: + // * `organizations/{organization}/components/{component}/settings` + // * `folders/{folder}/components/{component}/settings` + // * `projects/{project}/components/{component}/settings` + // * `projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings` + // * `projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings` + // * `projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/ComponentSettings" + } + ]; +} + +// Request message for UpdateComponentSettings. +message UpdateComponentSettingsRequest { + // Required. The component settings to update. + // + // The component settings' `name` field is used to identify the component + // settings to be updated. Formats: + // * `organizations/{organization}/components/{component}/settings` + // * `folders/{folder}/components/{component}/settings` + // * `projects/{project}/components/{component}/settings` + // * `projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings` + // * `projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings` + // * `projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings` + ComponentSettings component_settings = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated on the component settings resource. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for ResetComponentSettings. +message ResetComponentSettingsRequest { + // Required. The component settings to reset. + // + // Formats: + // * `organizations/{organization}/components/{component}/settings` + // * `folders/{folder}/components/{component}/settings` + // * `projects/{project}/components/{component}/settings` + // * `projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings` + // * `projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings` + // * `projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/ComponentSettings" + } + ]; + + // An fingerprint used for optimistic concurrency. If none is provided, + // then the existing settings will be blindly overwritten. + string etag = 2; +} + +// Request message for CalculateEffectiveComponentSettings. +message CalculateEffectiveComponentSettingsRequest { + // Required. The effective component settings to retrieve. + // + // Formats: + // * `organizations/{organization}/components/{component}/settings` + // * `folders/{folder}/components/{component}/settings` + // * `projects/{project}/components/{component}/settings` + // * `projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings` + // * `projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings` + // * `projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/ComponentSettings" + } + ]; +} + +// Request message for ListDetectors. +message ListDetectorsRequest { + // Required. The parent, which owns this collection of detectors. + // Format: + // * `organizations/{organization}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; + + // Filters to apply on the response. Filters can be applied on: + // * components + // * labels + // * billing tiers + // + // Component filters will retrieve only detectors for the components + // specified. Label filters will retrieve only detectors that match one of the + // labels specified. Billing tier filters will retrieve only detectors for + // that billing tier. + // + // The filters + string filter = 2; + + // The maximum number of detectors to return. The service may return fewer + // than this value. If unspecified, at most 100 detectors will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 3; + + // A page token, received from a previous `ListDetectors` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListDetectors` must + // match the call that provided the page token. + string page_token = 4; +} + +// Response message for ListDetectors. +message ListDetectorsResponse { + // The detectors from the specified organization. + repeated Detector detectors = 1; + + // A token that can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for ListComponents. +message ListComponentsRequest { + // Required. The parent, which owns this collection of components. + // Format: + // * `organizations/{organization}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; + + // The maximum number of components to return. The service may return fewer + // than this value. If unspecified, at most 100 components will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListComponents` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListComponents` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListComponents. +message ListComponentsResponse { + // The components from the specified organization. + repeated string components = 1; + + // A token that can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/google/cloud/securitycenter/settings/v1beta1/settings.proto b/google/cloud/securitycenter/settings/v1beta1/settings.proto new file mode 100644 index 000000000..1e99eacca --- /dev/null +++ b/google/cloud/securitycenter/settings/v1beta1/settings.proto @@ -0,0 +1,121 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.settings.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/securitycenter/settings/v1beta1/billing_settings.proto"; +import "google/cloud/securitycenter/settings/v1beta1/component_settings.proto"; +import "google/cloud/securitycenter/settings/v1beta1/sink_settings.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.SecurityCenter.Settings.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/settings/v1beta1;settings"; +option java_multiple_files = true; +option java_outer_classname = "SettingsProto"; +option java_package = "com.google.cloud.securitycenter.settings.v1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\Settings\\V1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::Settings::V1beta1"; + +// Common configuration settings for all of Security Center. +message Settings { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/Settings" + pattern: "organizations/{organization}/settings" + pattern: "folders/{folder}/settings" + pattern: "projects/{project}/settings" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}/settings" + pattern: "projects/{project}/regions/{region}/clusters/{cluster}/settings" + pattern: "projects/{project}/zones/{zone}/clusters/{cluster}/settings" + }; + + // The DetectorGroupSettings define the configuration for a detector group. + message DetectorGroupSettings { + // The state determines if the group is enabled or not. + ComponentEnablementState state = 1; + } + + // Defines the onboarding states for SCC + // + // Potentially is just an indicator that a user has reviewed some subset of + // our configuration surface, even if it's still currently set to its + // API-default state. + enum OnboardingState { + // No onboarding state has been set. Should not be seen in practice, but + // should be functionally equivalent to DISABLED. + ONBOARDING_STATE_UNSPECIFIED = 0; + + // SCC is fully on boarded + ENABLED = 1; + + // SCC has been disabled after being on boarded + DISABLED = 2; + + // SCC's onboarding tier has been explicitly set + BILLING_SELECTED = 3; + + // SCC's CTD FindingsProviders have been chosen + PROVIDERS_SELECTED = 4; + + // SCC's Service-Resource mappings have been set + RESOURCES_SELECTED = 5; + + // SCC's core Service Account was created + ORG_SERVICE_ACCOUNT_CREATED = 6; + } + + // The relative resource name of the settings resource. + // Formats: + // * `organizations/{organization}/settings` + // * `folders/{folder}/settings` + // * `projects/{project}/settings` + // * `projects/{project}/locations/{location}/clusters/{cluster}/settings` + // * `projects/{project}/regions/{region}/clusters/{cluster}/settings` + // * `projects/{project}/zones/{zone}/clusters/{cluster}/settings` + string name = 1; + + // Billing settings + BillingSettings billing_settings = 2; + + // An enum representing the current on boarding state of SCC. + OnboardingState state = 3; + + // Output only. The organization-level service account to be used for security center + // components. The component must have permission to "act as" the service + // account. + string org_service_account = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Sink settings. + SinkSettings sink_settings = 6; + + // The settings for detectors and/or scanners. + map component_settings = 7; + + // Detector group settings for all Security Center components. + // The key is the name of the detector group and the value is the settings for + // that group. + map detector_group_settings = 8; + + // A fingerprint used for optimistic concurrency. If none is provided + // on updates then the existing metadata will be blindly overwritten. + string etag = 9; + + // Output only. The time these settings were last updated. + google.protobuf.Timestamp update_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/securitycenter/settings/v1beta1/sink_settings.proto b/google/cloud/securitycenter/settings/v1beta1/sink_settings.proto new file mode 100644 index 000000000..388e375c3 --- /dev/null +++ b/google/cloud/securitycenter/settings/v1beta1/sink_settings.proto @@ -0,0 +1,38 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.settings.v1beta1; + +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.SecurityCenter.Settings.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/settings/v1beta1;settings"; +option java_multiple_files = true; +option java_outer_classname = "SinkProto"; +option java_package = "com.google.cloud.securitycenter.settings.v1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\Settings\\V1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::Settings::V1beta1"; + +// Sink Settings for Security Command Center +message SinkSettings { + // The resource name of the project to send logs to. This project must be + // part of the same organization where the Security Center API is + // enabled. The format is `projects/{project}`. If it is empty, we do + // not output logs. If a project ID is provided it will be normalized to a + // project number. + string logging_sink_project = 1; +} diff --git a/google/cloud/securitycenter/v1/BUILD.bazel b/google/cloud/securitycenter/v1/BUILD.bazel new file mode 100644 index 000000000..4b1154c97 --- /dev/null +++ b/google/cloud/securitycenter/v1/BUILD.bazel @@ -0,0 +1,386 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "securitycenter_proto", + srcs = [ + "asset.proto", + "finding.proto", + "notification_config.proto", + "notification_message.proto", + "organization_settings.proto", + "run_asset_discovery_response.proto", + "security_marks.proto", + "securitycenter_service.proto", + "source.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "securitycenter_proto_with_info", + deps = [ + ":securitycenter_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "securitycenter_java_proto", + deps = [":securitycenter_proto"], +) + +java_grpc_library( + name = "securitycenter_java_grpc", + srcs = [":securitycenter_proto"], + deps = [":securitycenter_java_proto"], +) + +java_gapic_library( + name = "securitycenter_java_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1", + service_yaml = "securitycenter_v1.yaml", + test_deps = [ + ":securitycenter_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":securitycenter_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "securitycenter_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.securitycenter.v1.SecurityCenterClientTest", + ], + runtime_deps = [":securitycenter_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-securitycenter-v1-java", + deps = [ + ":securitycenter_java_gapic", + ":securitycenter_java_grpc", + ":securitycenter_java_proto", + ":securitycenter_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "securitycenter_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1", + protos = [":securitycenter_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "securitycenter_go_gapic", + srcs = [":securitycenter_proto_with_info"], + grpc_service_config = "securitycenter_grpc_service_config.json", + importpath = "cloud.google.com/go/securitycenter/apiv1;securitycenter", + service_yaml = "securitycenter_v1.yaml", + deps = [ + ":securitycenter_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + "@io_bazel_rules_go//proto/wkt:struct_go_proto", + ], +) + +go_test( + name = "securitycenter_go_gapic_test", + srcs = [":securitycenter_go_gapic_srcjar_test"], + embed = [":securitycenter_go_gapic"], + importpath = "cloud.google.com/go/securitycenter/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-securitycenter-v1-go", + deps = [ + ":securitycenter_go_gapic", + ":securitycenter_go_gapic_srcjar-test.srcjar", + ":securitycenter_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "securitycenter_moved_proto", + srcs = [":securitycenter_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "securitycenter_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":securitycenter_moved_proto"], +) + +py_grpc_library( + name = "securitycenter_py_grpc", + srcs = [":securitycenter_moved_proto"], + deps = [":securitycenter_py_proto"], +) + +py_gapic_library( + name = "securitycenter_py_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1", + service_yaml = "securitycenter_v1.yaml", + deps = [ + ":securitycenter_py_grpc", + ":securitycenter_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "securitycenter-v1-py", + deps = [ + ":securitycenter_py_gapic", + ":securitycenter_py_grpc", + ":securitycenter_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "securitycenter_php_proto", + deps = [":securitycenter_proto"], +) + +php_grpc_library( + name = "securitycenter_php_grpc", + srcs = [":securitycenter_proto"], + deps = [":securitycenter_php_proto"], +) + +php_gapic_library( + name = "securitycenter_php_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1", + service_yaml = "securitycenter_v1.yaml", + deps = [ + ":securitycenter_php_grpc", + ":securitycenter_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-securitycenter-v1-php", + deps = [ + ":securitycenter_php_gapic", + ":securitycenter_php_grpc", + ":securitycenter_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "securitycenter_nodejs_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1", + service_yaml = "securitycenter_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "securitycenter-v1-nodejs", + deps = [ + ":securitycenter_nodejs_gapic", + ":securitycenter_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "securitycenter_ruby_proto", + deps = [":securitycenter_proto"], +) + +ruby_grpc_library( + name = "securitycenter_ruby_grpc", + srcs = [":securitycenter_proto"], + deps = [":securitycenter_ruby_proto"], +) + +ruby_gapic_library( + name = "securitycenter_ruby_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1", + service_yaml = "securitycenter_v1.yaml", + deps = [ + ":securitycenter_ruby_grpc", + ":securitycenter_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-securitycenter-v1-ruby", + deps = [ + ":securitycenter_ruby_gapic", + ":securitycenter_ruby_grpc", + ":securitycenter_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "securitycenter_csharp_proto", + deps = [":securitycenter_proto"], +) + +csharp_grpc_library( + name = "securitycenter_csharp_grpc", + srcs = [":securitycenter_proto"], + deps = [":securitycenter_csharp_proto"], +) + +csharp_gapic_library( + name = "securitycenter_csharp_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1", + service_yaml = "securitycenter_v1.yaml", + deps = [ + ":securitycenter_csharp_grpc", + ":securitycenter_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-securitycenter-v1-csharp", + deps = [ + ":securitycenter_csharp_gapic", + ":securitycenter_csharp_grpc", + ":securitycenter_csharp_proto", + ], +) diff --git a/google/cloud/securitycenter/v1/asset.proto b/google/cloud/securitycenter/v1/asset.proto index 74ec9b213..b079e5c5d 100644 --- a/google/cloud/securitycenter/v1/asset.proto +++ b/google/cloud/securitycenter/v1/asset.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.securitycenter.v1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; @@ -36,6 +36,11 @@ option ruby_package = "Google::Cloud::SecurityCenter::V1"; // GCP resource. All modifications to an Asset are only within the context of // Cloud SCC and don't affect the referenced GCP resource. message Asset { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/Asset" + pattern: "organizations/{organization}/assets/{asset}" + }; + // Cloud SCC managed properties. These properties are managed by Cloud SCC and // cannot be modified by the user. message SecurityCenterProperties { @@ -60,6 +65,15 @@ message Asset { // Owners of the Google Cloud resource. repeated string resource_owners = 5; + + // The user defined display name for this resource. + string resource_display_name = 6; + + // The user defined display name for the parent of this resource. + string resource_parent_display_name = 7; + + // The user defined display name for the project of this resource. + string resource_project_display_name = 8; } // IAM Policy information associated with the GCP resource described by the @@ -75,7 +89,7 @@ message Asset { // The relative resource name of this asset. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/assets/456". + // "organizations/{organization_id}/assets/{asset_id}". string name = 1; // Cloud SCC managed properties. These properties are managed by diff --git a/google/cloud/securitycenter/v1/finding.proto b/google/cloud/securitycenter/v1/finding.proto index e75247e88..9a3261c4c 100644 --- a/google/cloud/securitycenter/v1/finding.proto +++ b/google/cloud/securitycenter/v1/finding.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.securitycenter.v1; import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; @@ -31,11 +32,17 @@ option ruby_package = "Google::Cloud::SecurityCenter::V1"; // Cloud Security Command Center (Cloud SCC) finding. // -// A finding is a record of assessment data (security, risk, health or privacy) -// ingested into Cloud SCC for presentation, notification, analysis, -// policy testing, and enforcement. For example, an XSS vulnerability in an -// App Engine application is a finding. +// A finding is a record of assessment data like security, risk, health, or +// privacy, that is ingested into Cloud SCC for presentation, notification, +// analysis, policy testing, and enforcement. For example, a +// cross-site scripting (XSS) vulnerability in an App Engine application is a +// finding. message Finding { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/Finding" + pattern: "organizations/{organization}/sources/{source}/findings/{finding}" + }; + // The state of the finding. enum State { // Unspecified state. @@ -52,19 +59,21 @@ message Finding { // The relative resource name of this finding. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/sources/456/findings/789" + // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" string name = 1; // The relative resource name of the source the finding belongs to. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // This field is immutable after creation time. // For example: - // "organizations/123/sources/456" + // "organizations/{organization_id}/sources/{source_id}" string parent = 2; - // The full resource name of the Google Cloud Platform (GCP) resource this - // finding is for. See: + // For findings on Google Cloud Platform (GCP) resources, the full resource + // name of the GCP resource this finding is for. See: // https://cloud.google.com/apis/design/resource_names#full_resource_name + // When the finding is for a non-GCP resource, the resourceName can be a + // customer or partner defined string. // This field is immutable after creation time. string resource_name = 3; @@ -90,11 +99,11 @@ message Finding { // Output only. User specified security marks. These marks are entirely // managed by the user and come from the SecurityMarks resource that belongs // to the finding. - SecurityMarks security_marks = 8; + SecurityMarks security_marks = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // The time at which the event took place. For example, if the finding - // represents an open firewall it would capture the time the open firewall was - // detected. + // represents an open firewall it would capture the time the detector believes + // the firewall became open. The accuracy is determined by the detector. google.protobuf.Timestamp event_time = 9; // The time at which the finding was created in Cloud SCC. diff --git a/google/cloud/securitycenter/v1/notification_config.proto b/google/cloud/securitycenter/v1/notification_config.proto new file mode 100644 index 000000000..90bd83c3a --- /dev/null +++ b/google/cloud/securitycenter/v1/notification_config.proto @@ -0,0 +1,96 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; +option java_multiple_files = true; +option java_outer_classname = "NotificationConfigProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; +option (google.api.resource_definition) = { + type: "pubsub.googleapis.com/Topic" + pattern: "projects/{project}/topics/{topic}" +}; + +// Cloud Security Command Center (Cloud SCC) notification configs. +// +// A notification config is a Cloud SCC resource that contains the configuration +// to send notifications for create/update events of findings, assets and etc. +message NotificationConfig { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/NotificationConfig" + pattern: "organizations/{organization}/notificationConfigs/{notification_config}" + }; + + // The config for streaming-based notifications, which send each event as soon + // as it is detected. + message StreamingConfig { + // Expression that defines the filter to apply across create/update events + // of assets or findings as specified by the event type. The expression is a + // list of zero or more restrictions combined via logical operators `AND` + // and `OR`. Parentheses are supported, and `OR` has higher precedence than + // `AND`. + // + // Restrictions have the form ` ` and may have a + // `-` character in front of them to indicate negation. The fields map to + // those defined in the corresponding resource. + // + // The supported operators are: + // + // * `=` for all value types. + // * `>`, `<`, `>=`, `<=` for integer values. + // * `:`, meaning substring matching, for strings. + // + // The supported value types are: + // + // * string literals in quotes. + // * integer literals without quotes. + // * boolean literals `true` and `false` without quotes. + string filter = 1; + } + + // The relative resource name of this notification config. See: + // https://cloud.google.com/apis/design/resource_names#relative_resource_name + // Example: + // "organizations/{organization_id}/notificationConfigs/notify_public_bucket". + string name = 1; + + // The description of the notification config (max of 1024 characters). + string description = 2; + + // The PubSub topic to send notifications to. Its format is + // "projects/[project_id]/topics/[topic]". + string pubsub_topic = 3 [ + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; + + // Output only. The service account that needs "pubsub.topics.publish" + // permission to publish to the PubSub topic. + string service_account = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The config for triggering notifications. + oneof notify_config { + // The config for triggering streaming-based notifications. + StreamingConfig streaming_config = 5; + } +} diff --git a/google/cloud/securitycenter/v1/notification_message.proto b/google/cloud/securitycenter/v1/notification_message.proto new file mode 100644 index 000000000..b9dfb171b --- /dev/null +++ b/google/cloud/securitycenter/v1/notification_message.proto @@ -0,0 +1,41 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +import "google/api/annotations.proto"; +import "google/cloud/securitycenter/v1/finding.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; +option java_multiple_files = true; +option java_outer_classname = "NotificationMessageProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// Cloud SCC's Notification +message NotificationMessage { + // Name of the notification config that generated current notification. + string notification_config_name = 1; + + // Notification Event. + oneof event { + // If it's a Finding based notification config, this field will be + // populated. + Finding finding = 2; + } +} diff --git a/google/cloud/securitycenter/v1/organization_settings.proto b/google/cloud/securitycenter/v1/organization_settings.proto index e975e566c..d9d9aed79 100644 --- a/google/cloud/securitycenter/v1/organization_settings.proto +++ b/google/cloud/securitycenter/v1/organization_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.securitycenter.v1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; @@ -29,6 +29,11 @@ option ruby_package = "Google::Cloud::SecurityCenter::V1"; // User specified settings that are attached to the Cloud Security Command // Center (Cloud SCC) organization. message OrganizationSettings { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/OrganizationSettings" + pattern: "organizations/{organization}/organizationSettings" + }; + // The configuration used for Asset Discovery runs. message AssetDiscoveryConfig { // The mode of inclusion when running Asset Discovery. @@ -63,7 +68,7 @@ message OrganizationSettings { // The relative resource name of the settings. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/organizationSettings". + // "organizations/{organization_id}/organizationSettings". string name = 1; // A flag that indicates if Asset Discovery should be enabled. If the flag is @@ -74,6 +79,4 @@ message OrganizationSettings { // The configuration used for Asset Discovery runs. AssetDiscoveryConfig asset_discovery_config = 3; - - reserved 4, 5; } diff --git a/google/cloud/securitycenter/v1/run_asset_discovery_response.proto b/google/cloud/securitycenter/v1/run_asset_discovery_response.proto index 1cbba38e7..4f09d9c0a 100644 --- a/google/cloud/securitycenter/v1/run_asset_discovery_response.proto +++ b/google/cloud/securitycenter/v1/run_asset_discovery_response.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.securitycenter.v1; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; import "google/api/annotations.proto"; +import "google/protobuf/duration.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; diff --git a/google/cloud/securitycenter/v1/security_marks.proto b/google/cloud/securitycenter/v1/security_marks.proto index 97b3f9377..229aff32d 100644 --- a/google/cloud/securitycenter/v1/security_marks.proto +++ b/google/cloud/securitycenter/v1/security_marks.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.securitycenter.v1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; @@ -31,19 +31,26 @@ option ruby_package = "Google::Cloud::SecurityCenter::V1"; // SCC organization -- they can be modified and viewed by all users who have // proper permissions on the organization. message SecurityMarks { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/SecurityMarks" + pattern: "organizations/{organization}/assets/{asset}/securityMarks" + pattern: "organizations/{organization}/sources/{source}/findings/{finding}/securityMarks" + }; + // The relative resource name of the SecurityMarks. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Examples: - // "organizations/123/assets/456/securityMarks" - // "organizations/123/sources/456/findings/789/securityMarks". + // "organizations/{organization_id}/assets/{asset_id}/securityMarks" + // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". string name = 1; // Mutable user specified security marks belonging to the parent resource. // Constraints are as follows: - // - Keys and values are treated as case insensitive - // - Keys must be between 1 - 256 characters (inclusive) - // - Keys must be letters, numbers, underscores, or dashes - // - Values have leading and trailing whitespace trimmed, remaining + // + // * Keys and values are treated as case insensitive + // * Keys must be between 1 - 256 characters (inclusive) + // * Keys must be letters, numbers, underscores, or dashes + // * Values have leading and trailing whitespace trimmed, remaining // characters must be between 1 - 4096 characters (inclusive) map marks = 2; } diff --git a/google/cloud/securitycenter/v1/securitycenter_gapic.legacy.yaml b/google/cloud/securitycenter/v1/securitycenter_gapic.legacy.yaml new file mode 100644 index 000000000..4ad8a0e3b --- /dev/null +++ b/google/cloud/securitycenter/v1/securitycenter_gapic.legacy.yaml @@ -0,0 +1,478 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.securitycenter.v1 + python: + package_name: google.cloud.securitycenter_v1.gapic + go: + package_name: cloud.google.com/go/securitycenter/apiv1 + csharp: + package_name: Google.Cloud.SecurityCenter.V1 + ruby: + package_name: Google::Cloud::SecurityCenter::V1 + php: + package_name: Google\Cloud\SecurityCenter\V1 + nodejs: + package_name: security-center.v1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: + # The fully qualified name of the API interface. +- name: google.cloud.securitycenter.v1.SecurityCenter + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: organizations/{organization} + entity_name: organization + - name_pattern: organizations/{organization}/organizationSettings + entity_name: organization_settings + - name_pattern: organizations/{organization}/assets/{asset} + entity_name: asset + - name_pattern: organizations/{organization}/assets/{asset}/securityMarks + entity_name: asset_security_marks + - name_pattern: organizations/{organization}/sources/{source} + entity_name: source + - name_pattern: organizations/{organization}/sources/- + entity_name: organization_sources + - name_pattern: organizations/{organization}/sources/{source}/findings/{finding} + entity_name: finding + - name_pattern: organizations/{organization}/sources/{source}/findings/{finding}/securityMarks + entity_name: finding_security_marks + + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 480000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 480000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateSource + flattening: + groups: + - parameters: + - parent + - source + required_fields: + - parent + - source + retry_codes_name: non_idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + parent: organization + timeout_millis: 60000 + - name: CreateFinding + flattening: + groups: + - parameters: + - parent + - finding_id + - finding + required_fields: + - parent + - finding_id + - finding + retry_codes_name: non_idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + parent: source + timeout_millis: 60000 + - name: GetIamPolicy + flattening: + groups: + - parameters: + - resource + required_fields: + - resource + retry_codes_name: idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + resource: source + timeout_millis: 60000 + - name: GetOrganizationSettings + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + name: organization_settings + timeout_millis: 60000 + - name: GetSource + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + name: source + timeout_millis: 60000 + - name: GroupAssets + required_fields: + - parent + - group_by + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: group_by_results + retry_codes_name: idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + parent: organization + timeout_millis: 60000 + - name: GroupFindings + flattening: + groups: + - parameters: + - parent + - group_by + required_fields: + - parent + - group_by + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: group_by_results + retry_codes_name: idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + parent: source + timeout_millis: 60000 + - name: ListAssets + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: list_assets_results + retry_codes_name: idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + parent: organization + timeout_millis: 60000 + - name: ListFindings + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: list_findings_results + retry_codes_name: idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + parent: source + timeout_millis: 60000 + - name: ListSources + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: sources + retry_codes_name: idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + parent: organization + timeout_millis: 60000 + - name: RunAssetDiscovery + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: non_idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + parent: organization + long_running: + return_type: google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + metadata_type: google.protobuf.Empty + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 60000 + - name: SetFindingState + flattening: + groups: + - parameters: + - name + - state + - start_time + required_fields: + - name + - state + - start_time + retry_codes_name: non_idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + name: finding + timeout_millis: 60000 + - name: SetIamPolicy + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + retry_codes_name: non_idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + resource: source + timeout_millis: 60000 + - name: TestIamPermissions + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + retry_codes_name: idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + resource: source + timeout_millis: 60000 + - name: UpdateFinding + flattening: + groups: + - parameters: + - finding + required_fields: + - finding + retry_codes_name: non_idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + finding.name: finding + timeout_millis: 60000 + - name: UpdateOrganizationSettings + flattening: + groups: + - parameters: + - organization_settings + required_fields: + - organization_settings + retry_codes_name: non_idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + organization_settings.name: organization_settings + timeout_millis: 60000 + - name: UpdateSource + flattening: + groups: + - parameters: + - source + required_fields: + - source + retry_codes_name: non_idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + source.name: source + timeout_millis: 60000 + - name: UpdateSecurityMarks + flattening: + groups: + - parameters: + - security_marks + required_fields: + - security_marks + retry_codes_name: non_idempotent + retry_params_name: default + resource_name_treatment: STATIC_TYPES + field_name_patterns: + security_marks.name: securitymarks_oneof + timeout_millis: 60000 + +# Mappings for STATIC_TYPES +# See https://docs.google.com/document/d/1meVVWXYOGRApOH_fKQf48qjce4ewDv_ZiDRClmmCs2w/edit +# +collection_oneofs: + - oneof_name: securitymarks_oneof + collection_names: + - asset_security_marks + - finding_security_marks +resource_name_generation: +- message_name: Asset + field_entity_map: + name: asset +- message_name: CreateSourceRequest + field_entity_map: + parent: organization +- message_name: CreateFindingRequest + field_entity_map: + parent: source +- message_name: Finding + field_entity_map: + name: finding +- message_name: google.iam.v1.GetIamPolicyRequest + field_entity_map: + resource: "*" +- message_name: GetOrganizationSettingsRequest + field_entity_map: + name: organization_settings +- message_name: GetSourceRequest + field_entity_map: + name: source +- message_name: GroupAssetsRequest + field_entity_map: + parent: organization +- message_name: GroupFindingsRequest + field_entity_map: + parent: source +- message_name: ListAssetsRequest + field_entity_map: + parent: organization +- message_name: ListFindingsRequest + field_entity_map: + parent: source +- message_name: ListSourcesRequest + field_entity_map: + parent: organization +- message_name: RunAssetDiscoveryRequest + field_entity_map: + parent: organization +- message_name: SetFindingStateRequest + field_entity_map: + name: finding +- message_name: google.iam.v1.SetIamPolicyRequest + field_entity_map: + resource: "*" +- message_name: Source + field_entity_map: + name: source +- message_name: google.iam.v1.TestIamPermissionsRequest + field_entity_map: + resource: "*" +- message_name: UpdateFindingRequest + field_entity_map: + name: finding +- message_name: UpdateOrganizationSettingsRequest + field_entity_map: + name: organization_settings +- message_name: UpdateSourceRequest + field_entity_map: + name: source +- message_name: UpdateSecurityMarksRequest + field_entity_map: + name: securitymarks_oneof diff --git a/google/cloud/securitycenter/v1/securitycenter_gapic.yaml b/google/cloud/securitycenter/v1/securitycenter_gapic.yaml index 248968254..c9ab2f3f2 100644 --- a/google/cloud/securitycenter/v1/securitycenter_gapic.yaml +++ b/google/cloud/securitycenter/v1/securitycenter_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -19,460 +19,28 @@ language_settings: domain_layer_location: google-cloud # A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. +# The fully qualified name of the API interface. - name: google.cloud.securitycenter.v1.SecurityCenter - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: organizations/{organization} - entity_name: organization - - name_pattern: organizations/{organization}/organizationSettings - entity_name: organization_settings - - name_pattern: organizations/{organization}/assets/{asset} - entity_name: asset + deprecated_collections: - name_pattern: organizations/{organization}/assets/{asset}/securityMarks entity_name: asset_security_marks - - name_pattern: organizations/{organization}/sources/{source} - entity_name: source - - name_pattern: organizations/{organization}/sources/- - entity_name: organization_sources - - name_pattern: organizations/{organization}/sources/{source}/findings/{finding} - entity_name: finding - name_pattern: organizations/{organization}/sources/{source}/findings/{finding}/securityMarks entity_name: finding_security_marks - - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. retry_params_def: - name: default initial_retry_delay_millis: 100 retry_delay_multiplier: 1.3 max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 + initial_rpc_timeout_millis: 480000 rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 + max_rpc_timeout_millis: 480000 total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: CreateSource - flattening: - groups: - - parameters: - - parent - - source - required_fields: - - parent - - source - retry_codes_name: non_idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - parent: organization - timeout_millis: 60000 - - name: CreateFinding - flattening: - groups: - - parameters: - - parent - - finding_id - - finding - required_fields: - - parent - - finding_id - - finding - retry_codes_name: non_idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - parent: source - timeout_millis: 60000 - name: GetIamPolicy - flattening: - groups: - - parameters: - - resource - required_fields: - - resource retry_codes_name: idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - resource: source - timeout_millis: 60000 - - name: GetOrganizationSettings - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - name: organization_settings - timeout_millis: 60000 - - name: GetSource - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - name: source - timeout_millis: 60000 - name: GroupAssets - required_fields: - - parent - - group_by - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: group_by_results retry_codes_name: idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - parent: organization - timeout_millis: 60000 - name: GroupFindings - flattening: - groups: - - parameters: - - parent - - group_by - required_fields: - - parent - - group_by - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: group_by_results - retry_codes_name: idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - parent: source - timeout_millis: 60000 - - name: ListAssets - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: list_assets_results - retry_codes_name: idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - parent: organization - timeout_millis: 60000 - - name: ListFindings - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: list_findings_results - retry_codes_name: idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - parent: source - timeout_millis: 60000 - - name: ListSources - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: sources retry_codes_name: idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - parent: organization - timeout_millis: 60000 - - name: RunAssetDiscovery - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - retry_codes_name: non_idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - parent: organization - long_running: - return_type: google.cloud.securitycenter.v1.RunAssetDiscoveryResponse - metadata_type: google.protobuf.Empty - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 60000 - - name: SetFindingState - flattening: - groups: - - parameters: - - name - - state - - start_time - required_fields: - - name - - state - - start_time - retry_codes_name: non_idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - name: finding - timeout_millis: 60000 - - name: SetIamPolicy - flattening: - groups: - - parameters: - - resource - - policy - required_fields: - - resource - - policy - retry_codes_name: non_idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - resource: source - timeout_millis: 60000 - name: TestIamPermissions - flattening: - groups: - - parameters: - - resource - - permissions - required_fields: - - resource - - permissions retry_codes_name: idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - resource: source - timeout_millis: 60000 - - name: UpdateFinding - flattening: - groups: - - parameters: - - finding - required_fields: - - finding - retry_codes_name: non_idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - finding.name: finding - timeout_millis: 60000 - - name: UpdateOrganizationSettings - flattening: - groups: - - parameters: - - organization_settings - required_fields: - - organization_settings - retry_codes_name: non_idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - organization_settings.name: organization_settings - timeout_millis: 60000 - - name: UpdateSource - flattening: - groups: - - parameters: - - source - required_fields: - - source - retry_codes_name: non_idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - source.name: source - timeout_millis: 60000 - - name: UpdateSecurityMarks - flattening: - groups: - - parameters: - - security_marks - required_fields: - - security_marks - retry_codes_name: non_idempotent - retry_params_name: default - resource_name_treatment: STATIC_TYPES - field_name_patterns: - security_marks.name: securitymarks_oneof - timeout_millis: 60000 - -# Mappings for STATIC_TYPES -# See https://docs.google.com/document/d/1meVVWXYOGRApOH_fKQf48qjce4ewDv_ZiDRClmmCs2w/edit -# -collection_oneofs: - - oneof_name: securitymarks_oneof - collection_names: - - asset_security_marks - - finding_security_marks -resource_name_generation: -- message_name: Asset - field_entity_map: - name: asset -- message_name: CreateSourceRequest - field_entity_map: - parent: organization -- message_name: CreateFindingRequest - field_entity_map: - parent: source -- message_name: Finding - field_entity_map: - name: finding -- message_name: google.iam.v1.GetIamPolicyRequest - field_entity_map: - resource: "*" -- message_name: GetOrganizationSettingsRequest - field_entity_map: - name: organization_settings -- message_name: GetSourceRequest - field_entity_map: - name: source -- message_name: GroupAssetsRequest - field_entity_map: - parent: organization -- message_name: GroupFindingsRequest - field_entity_map: - parent: source -- message_name: ListAssetsRequest - field_entity_map: - parent: organization -- message_name: ListFindingsRequest - field_entity_map: - parent: source -- message_name: ListSourcesRequest - field_entity_map: - parent: organization -- message_name: RunAssetDiscoveryRequest - field_entity_map: - parent: organization -- message_name: SetFindingStateRequest - field_entity_map: - name: finding -- message_name: google.iam.v1.SetIamPolicyRequest - field_entity_map: - resource: "*" -- message_name: Source - field_entity_map: - name: source -- message_name: google.iam.v1.TestIamPermissionsRequest - field_entity_map: - resource: "*" -- message_name: UpdateFindingRequest - field_entity_map: - name: finding -- message_name: UpdateOrganizationSettingsRequest - field_entity_map: - name: organization_settings -- message_name: UpdateSourceRequest - field_entity_map: - name: source -- message_name: UpdateSecurityMarksRequest - field_entity_map: - name: securitymarks_oneof diff --git a/google/cloud/securitycenter/v1/securitycenter_grpc_service_config.json b/google/cloud/securitycenter/v1/securitycenter_grpc_service_config.json new file mode 100755 index 000000000..1633464c6 --- /dev/null +++ b/google/cloud/securitycenter/v1/securitycenter_grpc_service_config.json @@ -0,0 +1,116 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "CreateSource" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "CreateFinding" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "CreateNotificationConfig" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "DeleteNotificationConfig" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "RunAssetDiscovery" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "SetFindingState" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "SetIamPolicy" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "UpdateFinding" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "UpdateNotificationConfig" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "UpdateOrganizationSettings" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "UpdateSource" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "UpdateSecurityMarks" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "GetIamPolicy" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "GetNotificationConfig" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "GetOrganizationSettings" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "GetSource" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "GroupAssets" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "GroupFindings" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "ListAssets" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "ListFindings" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "ListNotificationConfigs" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "ListSources" + }, + { + "service": "google.cloud.securitycenter.v1.SecurityCenter", + "method": "TestIamPermissions" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/securitycenter/v1/securitycenter_service.proto b/google/cloud/securitycenter/v1/securitycenter_service.proto index bcb4e863d..bb9a82849 100644 --- a/google/cloud/securitycenter/v1/securitycenter_service.proto +++ b/google/cloud/securitycenter/v1/securitycenter_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,17 +11,21 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.securitycenter.v1; +import public "google/cloud/securitycenter/v1/run_asset_discovery_response.proto"; + import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/asset.proto"; import "google/cloud/securitycenter/v1/finding.proto"; +import "google/cloud/securitycenter/v1/notification_config.proto"; import "google/cloud/securitycenter/v1/organization_settings.proto"; -import "google/cloud/securitycenter/v1/run_asset_discovery_response.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; import "google/cloud/securitycenter/v1/source.proto"; import "google/iam/v1/iam_policy.proto"; @@ -42,12 +46,17 @@ option ruby_package = "Google::Cloud::SecurityCenter::V1"; // V1 APIs for Security Center service. service SecurityCenter { + option (google.api.default_host) = "securitycenter.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + // Creates a source. rpc CreateSource(CreateSourceRequest) returns (Source) { option (google.api.http) = { post: "/v1/{parent=organizations/*}/sources" body: "source" }; + option (google.api.method_signature) = "parent,source"; } // Creates a finding. The corresponding source must exist for finding creation @@ -57,6 +66,28 @@ service SecurityCenter { post: "/v1/{parent=organizations/*/sources/*}/findings" body: "finding" }; + option (google.api.method_signature) = "parent,finding_id,finding"; + } + + // Creates a notification config. + rpc CreateNotificationConfig(CreateNotificationConfigRequest) + returns (NotificationConfig) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*}/notificationConfigs" + body: "notification_config" + }; + option (google.api.method_signature) = + "parent,config_id,notification_config"; + option (google.api.method_signature) = "parent,notification_config"; + } + + // Deletes a notification config. + rpc DeleteNotificationConfig(DeleteNotificationConfigRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=organizations/*/notificationConfigs/*}" + }; + option (google.api.method_signature) = "name"; } // Gets the access control policy on the specified Source. @@ -66,6 +97,16 @@ service SecurityCenter { post: "/v1/{resource=organizations/*/sources/*}:getIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource"; + } + + // Gets a notification config. + rpc GetNotificationConfig(GetNotificationConfigRequest) + returns (NotificationConfig) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/notificationConfigs/*}" + }; + option (google.api.method_signature) = "name"; } // Gets the settings for an organization. @@ -74,6 +115,7 @@ service SecurityCenter { option (google.api.http) = { get: "/v1/{name=organizations/*/organizationSettings}" }; + option (google.api.method_signature) = "name"; } // Gets a source. @@ -81,6 +123,7 @@ service SecurityCenter { option (google.api.http) = { get: "/v1/{name=organizations/*/sources/*}" }; + option (google.api.method_signature) = "name"; } // Filters an organization's assets and groups them by their specified @@ -96,12 +139,13 @@ service SecurityCenter { // specified properties. // // To group across all sources provide a `-` as the source id. - // Example: /v1/organizations/123/sources/-/findings + // Example: /v1/organizations/{organization_id}/sources/-/findings rpc GroupFindings(GroupFindingsRequest) returns (GroupFindingsResponse) { option (google.api.http) = { post: "/v1/{parent=organizations/*/sources/*}/findings:group" body: "*" }; + option (google.api.method_signature) = "parent,group_by"; } // Lists an organization's assets. @@ -114,18 +158,28 @@ service SecurityCenter { // Lists an organization or source's findings. // // To list across all sources provide a `-` as the source id. - // Example: /v1/organizations/123/sources/-/findings + // Example: /v1/organizations/{organization_id}/sources/-/findings rpc ListFindings(ListFindingsRequest) returns (ListFindingsResponse) { option (google.api.http) = { get: "/v1/{parent=organizations/*/sources/*}/findings" }; } + // Lists notification configs. + rpc ListNotificationConfigs(ListNotificationConfigsRequest) + returns (ListNotificationConfigsResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*}/notificationConfigs" + }; + option (google.api.method_signature) = "parent"; + } + // Lists all sources belonging to an organization. rpc ListSources(ListSourcesRequest) returns (ListSourcesResponse) { option (google.api.http) = { get: "/v1/{parent=organizations/*}/sources" }; + option (google.api.method_signature) = "parent"; } // Runs asset discovery. The discovery is tracked with a long-running @@ -140,6 +194,11 @@ service SecurityCenter { post: "/v1/{parent=organizations/*}/assets:runDiscovery" body: "*" }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.securitycenter.v1.RunAssetDiscoveryResponse" + metadata_type: "google.protobuf.Empty" + }; } // Updates the state of a finding. @@ -148,6 +207,7 @@ service SecurityCenter { post: "/v1/{name=organizations/*/sources/*/findings/*}:setState" body: "*" }; + option (google.api.method_signature) = "name,state,start_time"; } // Sets the access control policy on the specified Source. @@ -157,6 +217,7 @@ service SecurityCenter { post: "/v1/{resource=organizations/*/sources/*}:setIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource,policy"; } // Returns the permissions that a caller has on the specified source. @@ -166,6 +227,7 @@ service SecurityCenter { post: "/v1/{resource=organizations/*/sources/*}:testIamPermissions" body: "*" }; + option (google.api.method_signature) = "resource,permissions"; } // Creates or updates a finding. The corresponding source must exist for a @@ -175,6 +237,19 @@ service SecurityCenter { patch: "/v1/{finding.name=organizations/*/sources/*/findings/*}" body: "finding" }; + option (google.api.method_signature) = "finding"; + } + + // + // Updates a notification config. + rpc UpdateNotificationConfig(UpdateNotificationConfigRequest) + returns (NotificationConfig) { + option (google.api.http) = { + patch: "/v1/{notification_config.name=organizations/*/notificationConfigs/*}" + body: "notification_config" + }; + option (google.api.method_signature) = "notification_config"; + option (google.api.method_signature) = "notification_config,update_mask"; } // Updates an organization's settings. @@ -184,6 +259,7 @@ service SecurityCenter { patch: "/v1/{organization_settings.name=organizations/*/organizationSettings}" body: "organization_settings" }; + option (google.api.method_signature) = "organization_settings"; } // Updates a source. @@ -192,6 +268,7 @@ service SecurityCenter { patch: "/v1/{source.name=organizations/*/sources/*}" body: "source" }; + option (google.api.method_signature) = "source"; } // Updates security marks. @@ -204,55 +281,129 @@ service SecurityCenter { body: "security_marks" } }; + option (google.api.method_signature) = "security_marks"; } } // Request message for creating a finding. message CreateFindingRequest { - // Resource name of the new finding's parent. Its format should be + // Required. Resource name of the new finding's parent. Its format should be // "organizations/[organization_id]/sources/[source_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; - // Unique identifier provided by the client within the parent scope. + // Required. Unique identifier provided by the client within the parent scope. // It must be alphanumeric and less than or equal to 32 characters and // greater than 0 characters in length. - string finding_id = 2; + string finding_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Finding being created. The name and security_marks will be + // ignored as they are both output only fields on this resource. + Finding finding = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for creating a notification config. +message CreateNotificationConfigRequest { + // Required. Resource name of the new notification config's parent. Its format + // is "organizations/[organization_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; - // The Finding being created. The name and security_marks will be ignored as - // they are both output only fields on this resource. - Finding finding = 3; + // Required. + // Unique identifier provided by the client within the parent scope. + // It must be between 1 and 128 characters, and contains alphanumeric + // characters, underscores or hyphens only. + string config_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The notification config being created. The name and the service + // account will be ignored as they are both output only fields on this + // resource. + NotificationConfig notification_config = 3 + [(google.api.field_behavior) = REQUIRED]; } // Request message for creating a source. message CreateSourceRequest { - // Resource name of the new source's parent. Its format should be + // Required. Resource name of the new source's parent. Its format should be // "organizations/[organization_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; - // The Source being created, only the display_name and description will be - // used. All other fields will be ignored. - Source source = 2; + // Required. The Source being created, only the display_name and description + // will be used. All other fields will be ignored. + Source source = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for deleting a notification config. +message DeleteNotificationConfigRequest { + // Required. Name of the notification config to delete. Its format is + // "organizations/[organization_id]/notificationConfigs/[config_id]". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/NotificationConfig" + } + ]; +} + +// Request message for getting a notification config. +message GetNotificationConfigRequest { + // Required. Name of the notification config to get. Its format is + // "organizations/[organization_id]/notificationConfigs/[config_id]". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/NotificationConfig" + } + ]; } // Request message for getting organization settings. message GetOrganizationSettingsRequest { - // Name of the organization to get organization settings for. Its format is - // "organizations/[organization_id]/organizationSettings". - string name = 1; + // Required. Name of the organization to get organization settings for. Its + // format is "organizations/[organization_id]/organizationSettings". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/OrganizationSettings" + } + ]; } // Request message for getting a source. message GetSourceRequest { - // Relative resource name of the source. Its format is + // Required. Relative resource name of the source. Its format is // "organizations/[organization_id]/source/[source_id]". - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; } // Request message for grouping by assets. message GroupAssetsRequest { - // Name of the organization to groupBy. Its format is + // Required. Name of the organization to groupBy. Its format is // "organizations/[organization_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; // Expression that defines the filter to apply across assets. // The expression is a list of zero or more restrictions combined via logical @@ -281,36 +432,56 @@ message GroupAssetsRequest { // * boolean literals `true` and `false` without quotes. // // The following field and operator combinations are supported: - // name | '=' - // update_time | '>', '<', '>=', '<=', '=' - // create_time | '>', '<', '>=', '<=', '=' - // iam_policy.policy_blob | '=', ':' - // resource_properties | '=', ':', '>', '<', '>=', '<=' - // security_marks | '=', ':' - // security_center_properties.resource_name | '=', ':' - // security_center_properties.resource_type | '=', ':' - // security_center_properties.resource_parent | '=', ':' - // security_center_properties.resource_project | '=', ':' - // security_center_properties.resource_owners | '=', ':' + // + // * name: `=` + // * update_time: `=`, `>`, `<`, `>=`, `<=` + // + // Usage: This should be milliseconds since epoch or an RFC3339 string. + // Examples: + // "update_time = \"2019-06-10T16:07:18-07:00\"" + // "update_time = 1560208038000" + // + // * create_time: `=`, `>`, `<`, `>=`, `<=` + // + // Usage: This should be milliseconds since epoch or an RFC3339 string. + // Examples: + // "create_time = \"2019-06-10T16:07:18-07:00\"" + // "create_time = 1560208038000" + // + // * iam_policy.policy_blob: `=`, `:` + // * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + // * security_marks.marks: `=`, `:` + // * security_center_properties.resource_name: `=`, `:` + // * security_center_properties.resource_display_name: `=`, `:` + // * security_center_properties.resource_type: `=`, `:` + // * security_center_properties.resource_parent: `=`, `:` + // * security_center_properties.resource_parent_display_name: `=`, `:` + // * security_center_properties.resource_project: `=`, `:` + // * security_center_properties.resource_project_display_name: `=`, `:` + // * security_center_properties.resource_owners: `=`, `:` // // For example, `resource_properties.size = 100` is a valid filter string. string filter = 2; - // Expression that defines what assets fields to use for grouping. The string - // value should follow SQL syntax: comma separated list of fields. For - // example: + // Required. Expression that defines what assets fields to use for grouping. + // The string value should follow SQL syntax: comma separated list of fields. + // For example: // "security_center_properties.resource_project,security_center_properties.project". // // The following fields are supported when compare_duration is not set: // // * security_center_properties.resource_project + // * security_center_properties.resource_project_display_name // * security_center_properties.resource_type // * security_center_properties.resource_parent + // * security_center_properties.resource_parent_display_name // // The following fields are supported when compare_duration is set: // // * security_center_properties.resource_type - string group_by = 3; + // * security_center_properties.resource_project_display_name + // * security_center_properties.resource_parent_display_name + string group_by = 3 [(google.api.field_behavior) = REQUIRED]; // When compare_duration is set, the GroupResult's "state_change" property is // updated to indicate whether the asset was added, removed, or remained @@ -355,8 +526,6 @@ message GroupAssetsRequest { // The maximum number of results to return in a single response. Default is // 10, minimum is 1, maximum is 1000. int32 page_size = 8; - - reserved 6; } // Response message for grouping by assets. @@ -379,11 +548,16 @@ message GroupAssetsResponse { // Request message for grouping by findings. message GroupFindingsRequest { - // Name of the source to groupBy. Its format is + // Required. Name of the source to groupBy. Its format is // "organizations/[organization_id]/sources/[source_id]". To groupBy across // all sources provide a source_id of `-`. For example: - // organizations/123/sources/- - string parent = 1; + // organizations/{organization_id}/sources/- + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; // Expression that defines the filter to apply across findings. // The expression is a list of one or more restrictions combined via logical @@ -410,22 +584,29 @@ message GroupFindingsRequest { // * boolean literals `true` and `false` without quotes. // // The following field and operator combinations are supported: - // name | `=` - // parent | '=', ':' - // resource_name | '=', ':' - // state | '=', ':' - // category | '=', ':' - // external_uri | '=', ':' - // event_time | `>`, `<`, `>=`, `<=` - // security_marks | '=', ':' - // source_properties | '=', ':', `>`, `<`, `>=`, `<=` + // + // * name: `=` + // * parent: `=`, `:` + // * resource_name: `=`, `:` + // * state: `=`, `:` + // * category: `=`, `:` + // * external_uri: `=`, `:` + // * event_time: `=`, `>`, `<`, `>=`, `<=` + // + // Usage: This should be milliseconds since epoch or an RFC3339 string. + // Examples: + // "event_time = \"2019-06-10T16:07:18-07:00\"" + // "event_time = 1560208038000" + // + // * security_marks.marks: `=`, `:` + // * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` // // For example, `source_properties.size = 100` is a valid filter string. string filter = 2; - // Expression that defines what assets fields to use for grouping (including - // `state_change`). The string value should follow SQL syntax: comma separated - // list of fields. For example: "parent,resource_name". + // Required. Expression that defines what assets fields to use for grouping + // (including `state_change`). The string value should follow SQL syntax: + // comma separated list of fields. For example: "parent,resource_name". // // The following fields are supported: // @@ -437,7 +618,7 @@ message GroupFindingsRequest { // The following fields are supported when compare_duration is set: // // * state_change - string group_by = 3; + string group_by = 3 [(google.api.field_behavior) = REQUIRED]; // Time used as a reference point when filtering findings. The filter is // limited to findings existing at the supplied time and their values are @@ -458,12 +639,18 @@ message GroupFindingsRequest { // // Possible "state_change" values when compare_duration is specified: // - // * "CHANGED": indicates that the finding was present at the start of - // compare_duration, but changed its state at read_time. - // * "UNCHANGED": indicates that the finding was present at the start of - // compare_duration and did not change state at read_time. - // * "ADDED": indicates that the finding was not present at the start - // of compare_duration, but was present at read_time. + // * "CHANGED": indicates that the finding was present and matched the given + // filter at the start of compare_duration, but changed its + // state at read_time. + // * "UNCHANGED": indicates that the finding was present and matched the given + // filter at the start of compare_duration and did not change + // state at read_time. + // * "ADDED": indicates that the finding did not match the given filter or + // was not present at the start of compare_duration, but was + // present at read_time. + // * "REMOVED": indicates that the finding was present and matched the + // filter at the start of compare_duration, but did not match + // the filter at read_time. // // If compare_duration is not specified, then the only possible state_change // is "UNUSED", which will be the state_change set for all findings present @@ -481,8 +668,6 @@ message GroupFindingsRequest { // The maximum number of results to return in a single response. Default is // 10, minimum is 1, maximum is 1000. int32 page_size = 8; - - reserved 6; } // Response message for group by findings. @@ -512,11 +697,47 @@ message GroupResult { int64 count = 2; } +// Request message for listing notification configs. +message ListNotificationConfigsRequest { + // Required. Name of the organization to list notification configs. + // Its format is "organizations/[organization_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; + + // The value returned by the last `ListNotificationConfigsResponse`; indicates + // that this is a continuation of a prior `ListNotificationConfigs` call, and + // that the system should return the next page of data. + string page_token = 2; + + // The maximum number of results to return in a single response. Default is + // 10, minimum is 1, maximum is 1000. + int32 page_size = 3; +} + +// Response message for listing notification configs. +message ListNotificationConfigsResponse { + // Notification configs belonging to the requested parent. + repeated NotificationConfig notification_configs = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results. + string next_page_token = 2; +} + // Request message for listing sources. message ListSourcesRequest { - // Resource name of the parent of sources to list. Its format should be - // "organizations/[organization_id]". - string parent = 1; + // Required. Resource name of the parent of sources to list. Its format should + // be "organizations/[organization_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; // The value returned by the last `ListSourcesResponse`; indicates // that this is a continuation of a prior `ListSources` call, and @@ -540,9 +761,14 @@ message ListSourcesResponse { // Request message for listing assets. message ListAssetsRequest { - // Name of the organization assets should belong to. Its format is + // Required. Name of the organization assets should belong to. Its format is // "organizations/[organization_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; // Expression that defines the filter to apply across assets. // The expression is a list of zero or more restrictions combined via logical @@ -571,16 +797,33 @@ message ListAssetsRequest { // * boolean literals `true` and `false` without quotes. // // The following are the allowed field and operator combinations: - // name | `=` - // update_time | `>`, `<`, `>=`, `<=` - // iam_policy.policy_blob | '=', ':' - // resource_properties | '=', ':', `>`, `<`, `>=`, `<=` - // security_marks | '=', ':' - // security_center_properties.resource_name | '=', ':' - // security_center_properties.resource_type | '=', ':' - // security_center_properties.resource_parent | '=', ':' - // security_center_properties.resource_project | '=', ':' - // security_center_properties.resource_owners | '=', ':' + // + // * name: `=` + // * update_time: `=`, `>`, `<`, `>=`, `<=` + // + // Usage: This should be milliseconds since epoch or an RFC3339 string. + // Examples: + // "update_time = \"2019-06-10T16:07:18-07:00\"" + // "update_time = 1560208038000" + // + // * create_time: `=`, `>`, `<`, `>=`, `<=` + // + // Usage: This should be milliseconds since epoch or an RFC3339 string. + // Examples: + // "create_time = \"2019-06-10T16:07:18-07:00\"" + // "create_time = 1560208038000" + // + // * iam_policy.policy_blob: `=`, `:` + // * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + // * security_marks.marks: `=`, `:` + // * security_center_properties.resource_name: `=`, `:` + // * security_center_properties.resource_display_name: `=`, `:` + // * security_center_properties.resource_type: `=`, `:` + // * security_center_properties.resource_parent: `=`, `:` + // * security_center_properties.resource_parent_display_name: `=`, `:` + // * security_center_properties.resource_project: `=`, `:` + // * security_center_properties.resource_project_display_name: `=`, `:` + // * security_center_properties.resource_owners: `=`, `:` // // For example, `resource_properties.size = 100` is a valid filter string. string filter = 2; @@ -598,10 +841,13 @@ message ListAssetsRequest { // name // update_time // resource_properties - // security_marks + // security_marks.marks // security_center_properties.resource_name + // security_center_properties.resource_display_name // security_center_properties.resource_parent + // security_center_properties.resource_parent_display_name // security_center_properties.resource_project + // security_center_properties.resource_project_display_name // security_center_properties.resource_type string order_by = 3; @@ -637,12 +883,10 @@ message ListAssetsRequest { // read_time. google.protobuf.Duration compare_duration = 5; - // Optional. - // - // A field mask to specify the ListAssetsResult fields to be listed in the - // response. - // An empty field mask will list all fields. - google.protobuf.FieldMask field_mask = 7; + // Optional. A field mask to specify the ListAssetsResult fields to be listed + // in the response. An empty field mask will list all fields. + google.protobuf.FieldMask field_mask = 7 + [(google.api.field_behavior) = OPTIONAL]; // The value returned by the last `ListAssetsResponse`; indicates // that this is a continuation of a prior `ListAssets` call, and @@ -652,8 +896,6 @@ message ListAssetsRequest { // The maximum number of results to return in a single response. Default is // 10, minimum is 1, maximum is 1000. int32 page_size = 9; - - reserved 6; } // Response message for listing assets. @@ -703,11 +945,16 @@ message ListAssetsResponse { // Request message for listing findings. message ListFindingsRequest { - // Name of the source the findings belong to. Its format is + // Required. Name of the source the findings belong to. Its format is // "organizations/[organization_id]/sources/[source_id]". To list across all // sources provide a source_id of `-`. For example: - // organizations/123/sources/- - string parent = 1; + // organizations/{organization_id}/sources/- + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; // Expression that defines the filter to apply across findings. // The expression is a list of one or more restrictions combined via logical @@ -734,15 +981,22 @@ message ListFindingsRequest { // * boolean literals `true` and `false` without quotes. // // The following field and operator combinations are supported: - // name | `=` - // parent | '=', ':' - // resource_name | '=', ':' - // state | '=', ':' - // category | '=', ':' - // external_uri | '=', ':' - // event_time | `>`, `<`, `>=`, `<=` - // security_marks | '=', ':' - // source_properties | '=', ':', `>`, `<`, `>=`, `<=` + // + // name: `=` + // parent: `=`, `:` + // resource_name: `=`, `:` + // state: `=`, `:` + // category: `=`, `:` + // external_uri: `=`, `:` + // event_time: `=`, `>`, `<`, `>=`, `<=` + // + // Usage: This should be milliseconds since epoch or an RFC3339 string. + // Examples: + // "event_time = \"2019-06-10T16:07:18-07:00\"" + // "event_time = 1560208038000" + // + // security_marks.marks: `=`, `:` + // source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` // // For example, `source_properties.size = 100` is a valid filter string. string filter = 2; @@ -764,7 +1018,7 @@ message ListFindingsRequest { // resource_name // event_time // source_properties - // security_marks + // security_marks.marks string order_by = 3; // Time used as a reference point when filtering findings. The filter is @@ -787,23 +1041,28 @@ message ListFindingsRequest { // // Possible "state_change" values when compare_duration is specified: // - // * "CHANGED": indicates that the finding was present at the start of - // compare_duration, but changed its state at read_time. - // * "UNCHANGED": indicates that the finding was present at the start of - // compare_duration and did not change state at read_time. - // * "ADDED": indicates that the finding was not present at the start - // of compare_duration, but was present at read_time. + // * "CHANGED": indicates that the finding was present and matched the given + // filter at the start of compare_duration, but changed its + // state at read_time. + // * "UNCHANGED": indicates that the finding was present and matched the given + // filter at the start of compare_duration and did not change + // state at read_time. + // * "ADDED": indicates that the finding did not match the given filter or + // was not present at the start of compare_duration, but was + // present at read_time. + // * "REMOVED": indicates that the finding was present and matched the + // filter at the start of compare_duration, but did not match + // the filter at read_time. // // If compare_duration is not specified, then the only possible state_change // is "UNUSED", which will be the state_change set for all findings present at // read_time. google.protobuf.Duration compare_duration = 5; - // Optional. - // - // A field mask to specify the Finding fields to be listed in the response. - // An empty field mask will list all fields. - google.protobuf.FieldMask field_mask = 7; + // Optional. A field mask to specify the Finding fields to be listed in the + // response. An empty field mask will list all fields. + google.protobuf.FieldMask field_mask = 7 + [(google.api.field_behavior) = OPTIONAL]; // The value returned by the last `ListFindingsResponse`; indicates // that this is a continuation of a prior `ListFindings` call, and @@ -813,14 +1072,32 @@ message ListFindingsRequest { // The maximum number of results to return in a single response. Default is // 10, minimum is 1, maximum is 1000. int32 page_size = 9; - - reserved 6; } // Response message for listing findings. message ListFindingsResponse { // Result containing the Finding and its StateChange. message ListFindingsResult { + // Information related to the Google Cloud Platform (GCP) resource that is + // associated with this finding. + message Resource { + // The full resource name of the resource. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name + string name = 1; + + // The full resource name of project that the resource belongs to. + string project_name = 2; + + // The human readable name of project that the resource belongs to. + string project_display_name = 3; + + // The full resource name of resource's parent. + string parent_name = 4; + + // The human readable name of resource's parent. + string parent_display_name = 5; + } + // The change in state of the finding. // // When querying across two points in time this describes @@ -854,6 +1131,9 @@ message ListFindingsResponse { // State change of the finding between the points in time. StateChange state_change = 2; + + // Output only. Resource that is associated with this finding. + Resource resource = 3; } // Findings matching the list request. @@ -872,35 +1152,46 @@ message ListFindingsResponse { // Request message for updating a finding's state. message SetFindingStateRequest { - // The relative resource name of the finding. See: + // Required. The relative resource name of the finding. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/sources/456/finding/789". - string name = 1; + // "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Finding" + } + ]; - // The desired State of the finding. - Finding.State state = 2; + // Required. The desired State of the finding. + Finding.State state = 2 [(google.api.field_behavior) = REQUIRED]; - // The time at which the updated state takes effect. - google.protobuf.Timestamp start_time = 3; + // Required. The time at which the updated state takes effect. + google.protobuf.Timestamp start_time = 3 + [(google.api.field_behavior) = REQUIRED]; } // Request message for running asset discovery for an organization. message RunAssetDiscoveryRequest { - // Name of the organization to run asset discovery for. Its format is - // "organizations/[organization_id]". - string parent = 1; + // Required. Name of the organization to run asset discovery for. Its format + // is "organizations/[organization_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; } // Request message for updating or creating a finding. message UpdateFindingRequest { - // The finding resource to update or create if it does not already exist. - // parent, security_marks, and update_time will be ignored. + // Required. The finding resource to update or create if it does not already + // exist. parent, security_marks, and update_time will be ignored. // // In the case of creation, the finding id portion of the name must be // alphanumeric and less than or equal to 32 characters and greater than 0 // characters in length. - Finding finding = 1; + Finding finding = 1 [(google.api.field_behavior) = REQUIRED]; // The FieldMask to use when updating the finding resource. This field should // not be specified when creating a finding. @@ -912,10 +1203,23 @@ message UpdateFindingRequest { google.protobuf.FieldMask update_mask = 2; } +// Request message for updating a notification config. +message UpdateNotificationConfigRequest { + // Required. The notification config to update. + NotificationConfig notification_config = 1 + [(google.api.field_behavior) = REQUIRED]; + + // The FieldMask to use when updating the notification config. + // + // If empty all mutable fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + // Request message for updating an organization's settings. message UpdateOrganizationSettingsRequest { - // The organization settings resource to update. - OrganizationSettings organization_settings = 1; + // Required. The organization settings resource to update. + OrganizationSettings organization_settings = 1 + [(google.api.field_behavior) = REQUIRED]; // The FieldMask to use when updating the settings resource. // @@ -925,8 +1229,8 @@ message UpdateOrganizationSettingsRequest { // Request message for updating a source. message UpdateSourceRequest { - // The source resource to update. - Source source = 1; + // Required. The source resource to update. + Source source = 1 [(google.api.field_behavior) = REQUIRED]; // The FieldMask to use when updating the source resource. // @@ -936,8 +1240,8 @@ message UpdateSourceRequest { // Request message for updating a SecurityMarks resource. message UpdateSecurityMarksRequest { - // The security marks resource to update. - SecurityMarks security_marks = 1; + // Required. The security marks resource to update. + SecurityMarks security_marks = 1 [(google.api.field_behavior) = REQUIRED]; // The FieldMask to use when updating the security marks resource. // diff --git a/google/cloud/securitycenter/v1/securitycenter_v1.yaml b/google/cloud/securitycenter/v1/securitycenter_v1.yaml new file mode 100644 index 000000000..52db2f613 --- /dev/null +++ b/google/cloud/securitycenter/v1/securitycenter_v1.yaml @@ -0,0 +1,49 @@ +type: google.api.Service +config_version: 3 +name: securitycenter.googleapis.com +title: Cloud Security Command Center API + +apis: +- name: google.cloud.securitycenter.v1.SecurityCenter + +types: +- name: google.cloud.securitycenter.v1.NotificationMessage +- name: google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + +documentation: + summary: |- + Cloud Security Command Center API provides access to temporal views of + assets and findings within an organization. + +backend: + rules: + - selector: 'google.cloud.securitycenter.v1.SecurityCenter.*' + deadline: 480.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + +http: + rules: + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=organizations/*/operations}' + + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=organizations/*/operations/*}' + + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=organizations/*/operations/*}' + + - selector: google.longrunning.Operations.CancelOperation + post: '/v1/{name=organizations/*/operations/*}:cancel' + body: '*' + +authentication: + rules: + - selector: 'google.cloud.securitycenter.v1.SecurityCenter.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/securitycenter/v1/source.proto b/google/cloud/securitycenter/v1/source.proto index 26b0d5a64..6fca821b8 100644 --- a/google/cloud/securitycenter/v1/source.proto +++ b/google/cloud/securitycenter/v1/source.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.securitycenter.v1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; @@ -28,31 +28,33 @@ option ruby_package = "Google::Cloud::SecurityCenter::V1"; // Cloud Security Command Center's (Cloud SCC) finding source. A finding source // is an entity or a mechanism that can produce a finding. A source is like a -// container of findings that come from the same scanner, logger, monitor, etc. +// container of findings that come from the same scanner, logger, monitor, and +// other tools. message Source { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/Source" + pattern: "organizations/{organization}/sources/{source}" + }; + // The relative resource name of this source. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/sources/456" + // "organizations/{organization_id}/sources/{source_id}" string name = 1; - // The source’s display name. - // A source’s display name must be unique amongst its siblings, for example, + // The source's display name. + // A source's display name must be unique amongst its siblings, for example, // two sources with the same parent can't share the same display name. - // The display name must start and end with a letter or digit, may contain - // letters, digits, spaces, hyphens, and underscores, and can be no longer - // than 32 characters. This is captured by the regular expression: - // [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,30}[\p{L}\p{N}])?. + // The display name must have a length between 1 and 64 characters + // (inclusive). string display_name = 2; // The description of the source (max of 1024 characters). // Example: - // "Cloud Security Scanner is a web security scanner for common + // "Web Security Scanner is a web security scanner for common // vulnerabilities in App Engine applications. It can automatically // scan and detect four common vulnerabilities, including cross-site-scripting // (XSS), Flash injection, mixed content (HTTP in HTTPS), and - // outdated/insecure libraries." + // outdated or insecure libraries." string description = 3; - - reserved 4; } diff --git a/google/cloud/securitycenter/v1beta1/BUILD.bazel b/google/cloud/securitycenter/v1beta1/BUILD.bazel index 6226c357a..2891e7af6 100644 --- a/google/cloud/securitycenter/v1beta1/BUILD.bazel +++ b/google/cloud/securitycenter/v1beta1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -12,16 +15,19 @@ proto_library( "asset.proto", "finding.proto", "organization_settings.proto", + "run_asset_discovery_response.proto", "security_marks.proto", "securitycenter_service.proto", "source.proto", ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/iam/v1:iam_policy_proto", "//google/iam/v1:policy_proto", "//google/longrunning:operations_proto", - "//google/rpc:status_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:field_mask_proto", @@ -32,7 +38,10 @@ proto_library( proto_library_with_info( name = "securitycenter_proto_with_info", - deps = [":securitycenter_proto"], + deps = [ + ":securitycenter_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -40,19 +49,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", - "@com_google_api_grpc_proto_google_iam_v1//jar", -] - java_proto_library( name = "securitycenter_java_proto", deps = [":securitycenter_proto"], @@ -61,48 +64,42 @@ java_proto_library( java_grpc_library( name = "securitycenter_java_grpc", srcs = [":securitycenter_proto"], - deps = [":securitycenter_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "securitycenter_resource_name_java_proto", - gapic_yaml = "securitycenter_gapic.yaml", - deps = [":securitycenter_proto"], + deps = [":securitycenter_java_proto"], ) java_gapic_library( name = "securitycenter_java_gapic", src = ":securitycenter_proto_with_info", gapic_yaml = "securitycenter_gapic.yaml", - service_yaml = "//google/cloud/securitycenter:securitycenter_v1beta1.yaml", - test_deps = [":securitycenter_java_grpc"], + package = "google.cloud.securitycenter.v1beta1", + service_yaml = "securitycenter_v1beta1.yaml", + test_deps = [ + ":securitycenter_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], deps = [ ":securitycenter_java_proto", - "securitycenter_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + "//google/iam/v1:iam_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, +java_gapic_test( + name = "securitycenter_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.securitycenter.v1beta1.SecurityCenterClientTest", + ], runtime_deps = [":securitycenter_java_gapic_test"], -) for test_name in [ - "com.google.cloud.securitycenter.v1beta1.SecurityCenterClientTest", -]] +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-securitycenter-v1beta1-java", - client_deps = [":securitycenter_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":securitycenter_java_gapic_test"], - grpc_deps = [":securitycenter_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":securitycenter_java_gapic", + ":securitycenter_java_grpc", ":securitycenter_java_proto", ":securitycenter_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -110,10 +107,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -125,22 +122,24 @@ go_proto_library( "//google/api:annotations_go_proto", "//google/iam/v1:iam_go_proto", "//google/longrunning:longrunning_go_proto", - "//google/rpc:status_go_proto", ], ) go_gapic_library( name = "securitycenter_go_gapic", - src = ":securitycenter_proto_with_info", - gapic_yaml = "securitycenter_gapic.yaml", - importpath = "cloud.google.com/go/securitycenter/apiv1beta1", - service_yaml = "//google/cloud/securitycenter:securitycenter_v1beta1.yaml", + srcs = [":securitycenter_proto_with_info"], + grpc_service_config = "securitycenter_grpc_service_config.json", + importpath = "cloud.google.com/go/securitycenter/apiv1beta1;securitycenter", + service_yaml = "securitycenter_v1beta1.yaml", deps = [ ":securitycenter_go_proto", "//google/iam/v1:iam_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + "@io_bazel_rules_go//proto/wkt:struct_go_proto", ], ) @@ -151,13 +150,235 @@ go_test( importpath = "cloud.google.com/go/securitycenter/apiv1beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-securitycenter-v1beta1-go", deps = [ ":securitycenter_go_gapic", - ":securitycenter_go_gapic_srcjar-smoke-test.srcjar", ":securitycenter_go_gapic_srcjar-test.srcjar", ":securitycenter_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "securitycenter_moved_proto", + srcs = [":securitycenter_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "securitycenter_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":securitycenter_moved_proto"], +) + +py_grpc_library( + name = "securitycenter_py_grpc", + srcs = [":securitycenter_moved_proto"], + deps = [":securitycenter_py_proto"], +) + +py_gapic_library( + name = "securitycenter_py_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1beta1", + service_yaml = "securitycenter_v1beta1.yaml", + deps = [ + ":securitycenter_py_grpc", + ":securitycenter_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "securitycenter-v1beta1-py", + deps = [ + ":securitycenter_py_gapic", + ":securitycenter_py_grpc", + ":securitycenter_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "securitycenter_php_proto", + deps = [":securitycenter_proto"], +) + +php_grpc_library( + name = "securitycenter_php_grpc", + srcs = [":securitycenter_proto"], + deps = [":securitycenter_php_proto"], +) + +php_gapic_library( + name = "securitycenter_php_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1beta1", + service_yaml = "securitycenter_v1beta1.yaml", + deps = [ + ":securitycenter_php_grpc", + ":securitycenter_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-securitycenter-v1beta1-php", + deps = [ + ":securitycenter_php_gapic", + ":securitycenter_php_grpc", + ":securitycenter_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "securitycenter_nodejs_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1beta1", + service_yaml = "securitycenter_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "securitycenter-v1beta1-nodejs", + deps = [ + ":securitycenter_nodejs_gapic", + ":securitycenter_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "securitycenter_ruby_proto", + deps = [":securitycenter_proto"], +) + +ruby_grpc_library( + name = "securitycenter_ruby_grpc", + srcs = [":securitycenter_proto"], + deps = [":securitycenter_ruby_proto"], +) + +ruby_gapic_library( + name = "securitycenter_ruby_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1beta1", + service_yaml = "securitycenter_v1beta1.yaml", + deps = [ + ":securitycenter_ruby_grpc", + ":securitycenter_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-securitycenter-v1beta1-ruby", + deps = [ + ":securitycenter_ruby_gapic", + ":securitycenter_ruby_grpc", + ":securitycenter_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "securitycenter_csharp_proto", + deps = [":securitycenter_proto"], +) + +csharp_grpc_library( + name = "securitycenter_csharp_grpc", + srcs = [":securitycenter_proto"], + deps = [":securitycenter_csharp_proto"], +) + +csharp_gapic_library( + name = "securitycenter_csharp_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1beta1", + service_yaml = "securitycenter_v1beta1.yaml", + deps = [ + ":securitycenter_csharp_grpc", + ":securitycenter_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-securitycenter-v1beta1-csharp", + deps = [ + ":securitycenter_csharp_gapic", + ":securitycenter_csharp_grpc", + ":securitycenter_csharp_proto", + ], +) diff --git a/google/cloud/securitycenter/v1beta1/asset.proto b/google/cloud/securitycenter/v1beta1/asset.proto index 3dd5b3581..85d0e0900 100644 --- a/google/cloud/securitycenter/v1beta1/asset.proto +++ b/google/cloud/securitycenter/v1beta1/asset.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,11 @@ syntax = "proto3"; package google.cloud.securitycenter.v1beta1; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; import "google/cloud/securitycenter/v1beta1/security_marks.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter"; option java_multiple_files = true; @@ -36,10 +37,10 @@ message Asset { // Cloud SCC managed properties. These properties are managed by Cloud SCC and // cannot be modified by the user. message SecurityCenterProperties { - // The full resource name of the GCP resource this asset + // Immutable. The full resource name of the GCP resource this asset // represents. This field is immutable after create time. See: // https://cloud.google.com/apis/design/resource_names#full_resource_name - string resource_name = 1; + string resource_name = 1 [(google.api.field_behavior) = IMMUTABLE]; // The type of the GCP resource. Examples include: APPLICATION, // PROJECT, and ORGANIZATION. This is a case insensitive field defined by @@ -62,7 +63,7 @@ message Asset { // The relative resource name of this asset. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/assets/456". + // "organizations/{organization_id}/assets/{asset_id}". string name = 1; // Cloud SCC managed properties. These properties are managed by diff --git a/google/cloud/securitycenter/v1beta1/finding.proto b/google/cloud/securitycenter/v1beta1/finding.proto index 21dfdd561..e582e6de3 100644 --- a/google/cloud/securitycenter/v1beta1/finding.proto +++ b/google/cloud/securitycenter/v1beta1/finding.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,12 @@ syntax = "proto3"; package google.cloud.securitycenter.v1beta1; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/securitycenter/v1beta1/security_marks.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter"; option java_multiple_files = true; @@ -33,6 +35,11 @@ option java_package = "com.google.cloud.securitycenter.v1beta1"; // policy testing, and enforcement. For example, an XSS vulnerability in an // App Engine application is a finding. message Finding { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/Finding" + pattern: "organizations/{organization}/sources/{source}/findings/{finding}" + }; + // The state of the finding. enum State { // Unspecified state. @@ -49,19 +56,21 @@ message Finding { // The relative resource name of this finding. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/sources/456/findings/789" + // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" string name = 1; - // The relative resource name of the source the finding belongs to. See: + // Immutable. The relative resource name of the source the finding belongs to. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // This field is immutable after creation time. // For example: - // "organizations/123/sources/456" - string parent = 2; + // "organizations/{organization_id}/sources/{source_id}" + string parent = 2 [(google.api.field_behavior) = IMMUTABLE]; - // The full resource name of the Google Cloud Platform (GCP) resource this - // finding is for. See: + // For findings on Google Cloud Platform (GCP) resources, the full resource + // name of the GCP resource this finding is for. See: // https://cloud.google.com/apis/design/resource_names#full_resource_name + // When the finding is for a non-GCP resource, the resourceName can be a + // customer or partner defined string. // This field is immutable after creation time. string resource_name = 3; @@ -87,11 +96,11 @@ message Finding { // Output only. User specified security marks. These marks are entirely // managed by the user and come from the SecurityMarks resource that belongs // to the finding. - SecurityMarks security_marks = 8; + SecurityMarks security_marks = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // The time at which the event took place. For example, if the finding - // represents an open firewall it would capture the time the open firewall was - // detected. + // represents an open firewall it would capture the time the detector believes + // the firewall became open. The accuracy is determined by the detector. google.protobuf.Timestamp event_time = 9; // The time at which the finding was created in Cloud SCC. diff --git a/google/cloud/securitycenter/v1beta1/organization_settings.proto b/google/cloud/securitycenter/v1beta1/organization_settings.proto index ca9be1145..9f7f2b0ed 100644 --- a/google/cloud/securitycenter/v1beta1/organization_settings.proto +++ b/google/cloud/securitycenter/v1beta1/organization_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.securitycenter.v1beta1; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter"; @@ -26,6 +27,11 @@ option java_package = "com.google.cloud.securitycenter.v1beta1"; // User specified settings that are attached to the Cloud Security Command // Center (Cloud SCC) organization. message OrganizationSettings { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/OrganizationSettings" + pattern: "organizations/{organization}/organizationSettings" + }; + // The configuration used for Asset Discovery runs. message AssetDiscoveryConfig { // The mode of inclusion when running Asset Discovery. @@ -60,7 +66,7 @@ message OrganizationSettings { // The relative resource name of the settings. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/organizationSettings". + // "organizations/{organization_id}/organizationSettings". string name = 1; // A flag that indicates if Asset Discovery should be enabled. If the flag is diff --git a/google/cloud/securitycenter/v1beta1/run_asset_discovery_response.proto b/google/cloud/securitycenter/v1beta1/run_asset_discovery_response.proto new file mode 100644 index 000000000..53ba02ef0 --- /dev/null +++ b/google/cloud/securitycenter/v1beta1/run_asset_discovery_response.proto @@ -0,0 +1,50 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.securitycenter.v1beta1; + +import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter"; +option java_multiple_files = true; +option java_package = "com.google.cloud.securitycenter.v1beta1"; + +// Response of asset discovery run +message RunAssetDiscoveryResponse { + // The state of an asset discovery run. + enum State { + // Asset discovery run state was unspecified. + STATE_UNSPECIFIED = 0; + + // Asset discovery run completed successfully. + COMPLETED = 1; + + // Asset discovery run was cancelled with tasks still pending, as another + // run for the same organization was started with a higher priority. + SUPERSEDED = 2; + + // Asset discovery run was killed and terminated. + TERMINATED = 3; + } + + // The state of an asset discovery run. + State state = 1; + + // The duration between asset discovery run start and end + google.protobuf.Duration duration = 2; +} diff --git a/google/cloud/securitycenter/v1beta1/security_marks.proto b/google/cloud/securitycenter/v1beta1/security_marks.proto index cfcb5f7dc..97baf2479 100644 --- a/google/cloud/securitycenter/v1beta1/security_marks.proto +++ b/google/cloud/securitycenter/v1beta1/security_marks.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.securitycenter.v1beta1; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter"; @@ -28,18 +29,26 @@ option java_package = "com.google.cloud.securitycenter.v1beta1"; // SCC organization -- they can be modified and viewed by all users who have // proper permissions on the organization. message SecurityMarks { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/SecurityMarks" + pattern: "organizations/{organization}/assets/{asset}/securityMarks" + pattern: "organizations/{organization}/sources/{source}/findings/{finding}/securityMarks" + }; + // The relative resource name of the SecurityMarks. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Examples: - // "organizations/123/assets/456/securityMarks" - // "organizations/123/sources/456/findings/789/securityMarks". + // "organizations/{organization_id}/assets/{asset_id}/securityMarks" + // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". string name = 1; // Mutable user specified security marks belonging to the parent resource. // Constraints are as follows: - // - Keys and values are treated as case insensitive - // - Keys must be alphanumeric and between 1 - 256 characters (inclusive) - // - Values have leading and trailing whitespace trimmed, remaining + // + // * Keys and values are treated as case insensitive + // * Keys must be between 1 - 256 characters (inclusive) + // * Keys must be letters, numbers, underscores, or dashes + // * Values have leading and trailing whitespace trimmed, remaining // characters must be between 1 - 4096 characters (inclusive) map marks = 2; } diff --git a/google/cloud/securitycenter/v1beta1/securitycenter_grpc_service_config.json b/google/cloud/securitycenter/v1beta1/securitycenter_grpc_service_config.json new file mode 100755 index 000000000..1b42ae38c --- /dev/null +++ b/google/cloud/securitycenter/v1beta1/securitycenter_grpc_service_config.json @@ -0,0 +1,96 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "CreateSource" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "CreateFinding" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "RunAssetDiscovery" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "SetFindingState" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "SetIamPolicy" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "UpdateFinding" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "UpdateOrganizationSettings" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "UpdateSource" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "UpdateSecurityMarks" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "GetIamPolicy" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "GetOrganizationSettings" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "GetSource" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "GroupAssets" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "GroupFindings" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "ListAssets" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "ListFindings" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "ListSources" + }, + { + "service": "google.cloud.securitycenter.v1beta1.SecurityCenter", + "method": "TestIamPermissions" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/securitycenter/v1beta1/securitycenter_service.proto b/google/cloud/securitycenter/v1beta1/securitycenter_service.proto index dafce562d..ba2edf4ee 100644 --- a/google/cloud/securitycenter/v1beta1/securitycenter_service.proto +++ b/google/cloud/securitycenter/v1beta1/securitycenter_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,9 @@ syntax = "proto3"; package google.cloud.securitycenter.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/securitycenter/v1beta1/asset.proto"; import "google/cloud/securitycenter/v1beta1/finding.proto"; import "google/cloud/securitycenter/v1beta1/organization_settings.proto"; @@ -38,12 +41,16 @@ option java_package = "com.google.cloud.securitycenter.v1beta1"; // V1 Beta APIs for Security Center service. service SecurityCenter { + option (google.api.default_host) = "securitycenter.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Creates a source. rpc CreateSource(CreateSourceRequest) returns (Source) { option (google.api.http) = { post: "/v1beta1/{parent=organizations/*}/sources" body: "source" }; + option (google.api.method_signature) = "parent,source"; } // Creates a finding. The corresponding source must exist for finding creation @@ -53,23 +60,24 @@ service SecurityCenter { post: "/v1beta1/{parent=organizations/*/sources/*}/findings" body: "finding" }; + option (google.api.method_signature) = "parent,finding_id,finding"; } // Gets the access control policy on the specified Source. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1beta1/{resource=organizations/*/sources/*}:getIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource"; } // Gets the settings for an organization. - rpc GetOrganizationSettings(GetOrganizationSettingsRequest) - returns (OrganizationSettings) { + rpc GetOrganizationSettings(GetOrganizationSettingsRequest) returns (OrganizationSettings) { option (google.api.http) = { get: "/v1beta1/{name=organizations/*/organizationSettings}" }; + option (google.api.method_signature) = "name"; } // Gets a source. @@ -77,6 +85,7 @@ service SecurityCenter { option (google.api.http) = { get: "/v1beta1/{name=organizations/*/sources/*}" }; + option (google.api.method_signature) = "name"; } // Filters an organization's assets and groups them by their specified @@ -92,12 +101,13 @@ service SecurityCenter { // specified properties. // // To group across all sources provide a `-` as the source id. - // Example: /v1beta1/organizations/123/sources/-/findings + // Example: /v1beta1/organizations/{organization_id}/sources/-/findings rpc GroupFindings(GroupFindingsRequest) returns (GroupFindingsResponse) { option (google.api.http) = { post: "/v1beta1/{parent=organizations/*/sources/*}/findings:group" body: "*" }; + option (google.api.method_signature) = "parent,group_by"; } // Lists an organization's assets. @@ -110,7 +120,7 @@ service SecurityCenter { // Lists an organization or source's findings. // // To list across all sources provide a `-` as the source id. - // Example: /v1beta1/organizations/123/sources/-/findings + // Example: /v1beta1/organizations/{organization_id}/sources/-/findings rpc ListFindings(ListFindingsRequest) returns (ListFindingsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=organizations/*/sources/*}/findings" @@ -122,6 +132,7 @@ service SecurityCenter { option (google.api.http) = { get: "/v1beta1/{parent=organizations/*}/sources" }; + option (google.api.method_signature) = "parent"; } // Runs asset discovery. The discovery is tracked with a long-running @@ -130,12 +141,16 @@ service SecurityCenter { // This API can only be called with limited frequency for an organization. If // it is called too frequently the caller will receive a TOO_MANY_REQUESTS // error. - rpc RunAssetDiscovery(RunAssetDiscoveryRequest) - returns (google.longrunning.Operation) { + rpc RunAssetDiscovery(RunAssetDiscoveryRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta1/{parent=organizations/*}/assets:runDiscovery" body: "*" }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Empty" + }; } // Updates the state of a finding. @@ -144,24 +159,25 @@ service SecurityCenter { post: "/v1beta1/{name=organizations/*/sources/*/findings/*}:setState" body: "*" }; + option (google.api.method_signature) = "name,state,start_time"; } // Sets the access control policy on the specified Source. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1beta1/{resource=organizations/*/sources/*}:setIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource,policy"; } // Returns the permissions that a caller has on the specified source. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1beta1/{resource=organizations/*/sources/*}:testIamPermissions" body: "*" }; + option (google.api.method_signature) = "resource,permissions"; } // Creates or updates a finding. The corresponding source must exist for a @@ -171,15 +187,16 @@ service SecurityCenter { patch: "/v1beta1/{finding.name=organizations/*/sources/*/findings/*}" body: "finding" }; + option (google.api.method_signature) = "finding"; } // Updates an organization's settings. - rpc UpdateOrganizationSettings(UpdateOrganizationSettingsRequest) - returns (OrganizationSettings) { + rpc UpdateOrganizationSettings(UpdateOrganizationSettingsRequest) returns (OrganizationSettings) { option (google.api.http) = { patch: "/v1beta1/{organization_settings.name=organizations/*/organizationSettings}" body: "organization_settings" }; + option (google.api.method_signature) = "organization_settings"; } // Updates a source. @@ -188,6 +205,7 @@ service SecurityCenter { patch: "/v1beta1/{source.name=organizations/*/sources/*}" body: "source" }; + option (google.api.method_signature) = "source"; } // Updates security marks. @@ -200,55 +218,81 @@ service SecurityCenter { body: "security_marks" } }; + option (google.api.method_signature) = "security_marks"; } } // Request message for creating a finding. message CreateFindingRequest { - // Resource name of the new finding's parent. Its format should be + // Required. Resource name of the new finding's parent. Its format should be // "organizations/[organization_id]/sources/[source_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; - // Unique identifier provided by the client within the parent scope. + // Required. Unique identifier provided by the client within the parent scope. // It must be alphanumeric and less than or equal to 32 characters and // greater than 0 characters in length. - string finding_id = 2; + string finding_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The Finding being created. The name and security_marks will be ignored as + // Required. The Finding being created. The name and security_marks will be ignored as // they are both output only fields on this resource. - Finding finding = 3; + Finding finding = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for creating a source. message CreateSourceRequest { - // Resource name of the new source's parent. Its format should be + // Required. Resource name of the new source's parent. Its format should be // "organizations/[organization_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; - // The Source being created, only the display_name and description will be + // Required. The Source being created, only the display_name and description will be // used. All other fields will be ignored. - Source source = 2; + Source source = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for getting organization settings. message GetOrganizationSettingsRequest { - // Name of the organization to get organization settings for. Its format is + // Required. Name of the organization to get organization settings for. Its format is // "organizations/[organization_id]/organizationSettings". - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/OrganizationSettings" + } + ]; } // Request message for getting a source. message GetSourceRequest { - // Relative resource name of the source. Its format is + // Required. Relative resource name of the source. Its format is // "organizations/[organization_id]/source/[source_id]". - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; } // Request message for grouping by assets. message GroupAssetsRequest { - // Name of the organization to groupBy. Its format is + // Required. Name of the organization to groupBy. Its format is // "organizations/[organization_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; // Expression that defines the filter to apply across assets. // The expression is a list of zero or more restrictions combined via logical @@ -279,7 +323,7 @@ message GroupAssetsRequest { // For example, `resource_properties.size = 100` is a valid filter string. string filter = 2; - // Expression that defines what assets fields to use for grouping. The string + // Required. Expression that defines what assets fields to use for grouping. The string // value should follow SQL syntax: comma separated list of fields. For // example: // "security_center_properties.resource_project,security_center_properties.project". @@ -293,7 +337,7 @@ message GroupAssetsRequest { // The following fields are supported when compare_duration is set: // // * security_center_properties.resource_type - string group_by = 3; + string group_by = 3 [(google.api.field_behavior) = REQUIRED]; // When compare_duration is set, the Asset's "state" property is updated to // indicate whether the asset was added, removed, or remained present during @@ -351,11 +395,16 @@ message GroupAssetsResponse { // Request message for grouping by findings. message GroupFindingsRequest { - // Name of the source to groupBy. Its format is + // Required. Name of the source to groupBy. Its format is // "organizations/[organization_id]/sources/[source_id]". To groupBy across // all sources provide a source_id of `-`. For example: - // organizations/123/sources/- - string parent = 1; + // organizations/{organization_id}/sources/- + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; // Expression that defines the filter to apply across findings. // The expression is a list of one or more restrictions combined via logical @@ -384,7 +433,7 @@ message GroupFindingsRequest { // For example, `source_properties.size = 100` is a valid filter string. string filter = 2; - // Expression that defines what assets fields to use for grouping (including + // Required. Expression that defines what assets fields to use for grouping (including // `state`). The string value should follow SQL syntax: comma separated list // of fields. For example: // "parent,resource_name". @@ -395,7 +444,7 @@ message GroupFindingsRequest { // * category // * state // * parent - string group_by = 3; + string group_by = 3 [(google.api.field_behavior) = REQUIRED]; // Time used as a reference point when filtering findings. The filter is // limited to findings existing at the supplied time and their values are @@ -439,9 +488,14 @@ message GroupResult { // Request message for listing sources. message ListSourcesRequest { - // Resource name of the parent of sources to list. Its format should be + // Required. Resource name of the parent of sources to list. Its format should be // "organizations/[organization_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; // The value returned by the last `ListSourcesResponse`; indicates // that this is a continuation of a prior `ListSources` call, and @@ -465,9 +519,14 @@ message ListSourcesResponse { // Request message for listing assets. message ListAssetsRequest { - // Name of the organization assets should belong to. Its format is + // Required. Name of the organization assets should belong to. Its format is // "organizations/[organization_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; // Expression that defines the filter to apply across assets. // The expression is a list of zero or more restrictions combined via logical @@ -539,12 +598,10 @@ message ListAssetsRequest { // "UNUSED", which indicates that the asset is present at read_time. google.protobuf.Duration compare_duration = 5; - // Optional. - // - // A field mask to specify the ListAssetsResult fields to be listed in the + // Optional. A field mask to specify the ListAssetsResult fields to be listed in the // response. // An empty field mask will list all fields. - google.protobuf.FieldMask field_mask = 7; + google.protobuf.FieldMask field_mask = 7 [(google.api.field_behavior) = OPTIONAL]; // The value returned by the last `ListAssetsResponse`; indicates // that this is a continuation of a prior `ListAssets` call, and @@ -606,11 +663,16 @@ message ListAssetsResponse { // Request message for listing findings. message ListFindingsRequest { - // Name of the source the findings belong to. Its format is + // Required. Name of the source the findings belong to. Its format is // "organizations/[organization_id]/sources/[source_id]". To list across all // sources provide a source_id of `-`. For example: - // organizations/123/sources/- - string parent = 1; + // organizations/{organization_id}/sources/- + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; // Expression that defines the filter to apply across findings. // The expression is a list of one or more restrictions combined via logical @@ -655,11 +717,9 @@ message ListFindingsRequest { // API's version of NOW. google.protobuf.Timestamp read_time = 4; - // Optional. - // - // A field mask to specify the Finding fields to be listed in the response. + // Optional. A field mask to specify the Finding fields to be listed in the response. // An empty field mask will list all fields. - google.protobuf.FieldMask field_mask = 5; + google.protobuf.FieldMask field_mask = 5 [(google.api.field_behavior) = OPTIONAL]; // The value returned by the last `ListFindingsResponse`; indicates // that this is a continuation of a prior `ListFindings` call, and @@ -689,35 +749,45 @@ message ListFindingsResponse { // Request message for updating a finding's state. message SetFindingStateRequest { - // The relative resource name of the finding. See: + // Required. The relative resource name of the finding. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/sources/456/finding/789". - string name = 1; + // "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Finding" + } + ]; - // The desired State of the finding. - Finding.State state = 2; + // Required. The desired State of the finding. + Finding.State state = 2 [(google.api.field_behavior) = REQUIRED]; - // The time at which the updated state takes effect. - google.protobuf.Timestamp start_time = 3; + // Required. The time at which the updated state takes effect. + google.protobuf.Timestamp start_time = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for running asset discovery for an organization. message RunAssetDiscoveryRequest { - // Name of the organization to run asset discovery for. Its format is + // Required. Name of the organization to run asset discovery for. Its format is // "organizations/[organization_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; } // Request message for updating or creating a finding. message UpdateFindingRequest { - // The finding resource to update or create if it does not already exist. + // Required. The finding resource to update or create if it does not already exist. // parent, security_marks, and update_time will be ignored. // // In the case of creation, the finding id portion of the name must // alphanumeric and less than or equal to 32 characters and greater than 0 // characters in length. - Finding finding = 1; + Finding finding = 1 [(google.api.field_behavior) = REQUIRED]; // The FieldMask to use when updating the finding resource. This field should // not be specified when creating a finding. @@ -726,8 +796,8 @@ message UpdateFindingRequest { // Request message for updating an organization's settings. message UpdateOrganizationSettingsRequest { - // The organization settings resource to update. - OrganizationSettings organization_settings = 1; + // Required. The organization settings resource to update. + OrganizationSettings organization_settings = 1 [(google.api.field_behavior) = REQUIRED]; // The FieldMask to use when updating the settings resource. google.protobuf.FieldMask update_mask = 2; @@ -735,8 +805,8 @@ message UpdateOrganizationSettingsRequest { // Request message for updating a source. message UpdateSourceRequest { - // The source resource to update. - Source source = 1; + // Required. The source resource to update. + Source source = 1 [(google.api.field_behavior) = REQUIRED]; // The FieldMask to use when updating the source resource. google.protobuf.FieldMask update_mask = 2; @@ -744,8 +814,8 @@ message UpdateSourceRequest { // Request message for updating a SecurityMarks resource. message UpdateSecurityMarksRequest { - // The security marks resource to update. - SecurityMarks security_marks = 1; + // Required. The security marks resource to update. + SecurityMarks security_marks = 1 [(google.api.field_behavior) = REQUIRED]; // The FieldMask to use when updating the security marks resource. google.protobuf.FieldMask update_mask = 2; diff --git a/google/cloud/securitycenter/v1beta1/securitycenter_v1beta1.yaml b/google/cloud/securitycenter/v1beta1/securitycenter_v1beta1.yaml new file mode 100644 index 000000000..7bc8e0f23 --- /dev/null +++ b/google/cloud/securitycenter/v1beta1/securitycenter_v1beta1.yaml @@ -0,0 +1,45 @@ +type: google.api.Service +config_version: 3 +name: securitycenter.googleapis.com +title: Cloud Security Command Center API + +apis: +- name: google.cloud.securitycenter.v1beta1.SecurityCenter + +types: +- name: google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse + +documentation: + summary: |- + Cloud Security Command Center API provides access to temporal views of + assets and findings within an organization. + +backend: + rules: + - selector: 'google.cloud.securitycenter.v1beta1.SecurityCenter.*' + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + +http: + rules: + - selector: google.longrunning.Operations.CancelOperation + post: '/v1beta1/{name=organizations/*/operations/*}:cancel' + body: '*' + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1beta1/{name=organizations/*/operations/*}' + - selector: google.longrunning.Operations.GetOperation + get: '/v1beta1/{name=organizations/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1beta1/{name=organizations/*/operations}' + +authentication: + rules: + - selector: 'google.cloud.securitycenter.v1beta1.SecurityCenter.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/securitycenter/v1beta1/source.proto b/google/cloud/securitycenter/v1beta1/source.proto index cc1fae6ea..98025bca2 100644 --- a/google/cloud/securitycenter/v1beta1/source.proto +++ b/google/cloud/securitycenter/v1beta1/source.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.securitycenter.v1beta1; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter"; @@ -27,19 +28,22 @@ option java_package = "com.google.cloud.securitycenter.v1beta1"; // is an entity or a mechanism that can produce a finding. A source is like a // container of findings that come from the same scanner, logger, monitor, etc. message Source { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/Source" + pattern: "organizations/{organization}/sources/{source}" + }; + // The relative resource name of this source. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/sources/456" + // "organizations/{organization_id}/sources/{source_id}" string name = 1; // The source's display name. // A source's display name must be unique amongst its siblings, for example, // two sources with the same parent can't share the same display name. - // The display name must start and end with a letter or digit, may contain - // letters, digits, spaces, hyphens, and underscores, and can be no longer - // than 32 characters. This is captured by the regular expression: - // [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,30}[\p{L}\p{N}])?. + // The display name must have a length between 1 and 64 characters + // (inclusive). string display_name = 2; // The description of the source (max of 1024 characters). diff --git a/google/cloud/securitycenter/v1p1beta1/BUILD.bazel b/google/cloud/securitycenter/v1p1beta1/BUILD.bazel new file mode 100644 index 000000000..4bfe84008 --- /dev/null +++ b/google/cloud/securitycenter/v1p1beta1/BUILD.bazel @@ -0,0 +1,386 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "securitycenter_proto", + srcs = [ + "asset.proto", + "finding.proto", + "notification_config.proto", + "notification_message.proto", + "organization_settings.proto", + "run_asset_discovery_response.proto", + "security_marks.proto", + "securitycenter_service.proto", + "source.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "securitycenter_proto_with_info", + deps = [ + ":securitycenter_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "securitycenter_java_proto", + deps = [":securitycenter_proto"], +) + +java_grpc_library( + name = "securitycenter_java_grpc", + srcs = [":securitycenter_proto"], + deps = [":securitycenter_java_proto"], +) + +java_gapic_library( + name = "securitycenter_java_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1p1beta1", + service_yaml = "securitycenter_v1p1beta1.yaml", + test_deps = [ + ":securitycenter_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":securitycenter_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "securitycenter_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.securitycenter.v1p1beta1.SecurityCenterClientTest", + ], + runtime_deps = [":securitycenter_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-securitycenter-v1p1beta1-java", + deps = [ + ":securitycenter_java_gapic", + ":securitycenter_java_grpc", + ":securitycenter_java_proto", + ":securitycenter_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "securitycenter_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1", + protos = [":securitycenter_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "securitycenter_go_gapic", + srcs = [":securitycenter_proto_with_info"], + grpc_service_config = "securitycenter_grpc_service_config.json", + importpath = "cloud.google.com/go/securitycenter/apiv1p1beta1;securitycenter", + service_yaml = "securitycenter_v1p1beta1.yaml", + deps = [ + ":securitycenter_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + "@io_bazel_rules_go//proto/wkt:struct_go_proto", + ], +) + +go_test( + name = "securitycenter_go_gapic_test", + srcs = [":securitycenter_go_gapic_srcjar_test"], + embed = [":securitycenter_go_gapic"], + importpath = "cloud.google.com/go/securitycenter/apiv1p1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-securitycenter-v1p1beta1-go", + deps = [ + ":securitycenter_go_gapic", + ":securitycenter_go_gapic_srcjar-test.srcjar", + ":securitycenter_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "securitycenter_moved_proto", + srcs = [":securitycenter_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "securitycenter_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":securitycenter_moved_proto"], +) + +py_grpc_library( + name = "securitycenter_py_grpc", + srcs = [":securitycenter_moved_proto"], + deps = [":securitycenter_py_proto"], +) + +py_gapic_library( + name = "securitycenter_py_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1p1beta1", + service_yaml = "securitycenter_v1p1beta1.yaml", + deps = [ + ":securitycenter_py_grpc", + ":securitycenter_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "securitycenter-v1p1beta1-py", + deps = [ + ":securitycenter_py_gapic", + ":securitycenter_py_grpc", + ":securitycenter_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "securitycenter_php_proto", + deps = [":securitycenter_proto"], +) + +php_grpc_library( + name = "securitycenter_php_grpc", + srcs = [":securitycenter_proto"], + deps = [":securitycenter_php_proto"], +) + +php_gapic_library( + name = "securitycenter_php_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1p1beta1", + service_yaml = "securitycenter_v1p1beta1.yaml", + deps = [ + ":securitycenter_php_grpc", + ":securitycenter_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-securitycenter-v1p1beta1-php", + deps = [ + ":securitycenter_php_gapic", + ":securitycenter_php_grpc", + ":securitycenter_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "securitycenter_nodejs_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1p1beta1", + service_yaml = "securitycenter_v1p1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "securitycenter-v1p1beta1-nodejs", + deps = [ + ":securitycenter_nodejs_gapic", + ":securitycenter_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "securitycenter_ruby_proto", + deps = [":securitycenter_proto"], +) + +ruby_grpc_library( + name = "securitycenter_ruby_grpc", + srcs = [":securitycenter_proto"], + deps = [":securitycenter_ruby_proto"], +) + +ruby_gapic_library( + name = "securitycenter_ruby_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1p1beta1", + service_yaml = "securitycenter_v1p1beta1.yaml", + deps = [ + ":securitycenter_ruby_grpc", + ":securitycenter_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-securitycenter-v1p1beta1-ruby", + deps = [ + ":securitycenter_ruby_gapic", + ":securitycenter_ruby_grpc", + ":securitycenter_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "securitycenter_csharp_proto", + deps = [":securitycenter_proto"], +) + +csharp_grpc_library( + name = "securitycenter_csharp_grpc", + srcs = [":securitycenter_proto"], + deps = [":securitycenter_csharp_proto"], +) + +csharp_gapic_library( + name = "securitycenter_csharp_gapic", + src = ":securitycenter_proto_with_info", + gapic_yaml = "securitycenter_gapic.yaml", + package = "google.cloud.securitycenter.v1p1beta1", + service_yaml = "securitycenter_v1p1beta1.yaml", + deps = [ + ":securitycenter_csharp_grpc", + ":securitycenter_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-securitycenter-v1p1beta1-csharp", + deps = [ + ":securitycenter_csharp_gapic", + ":securitycenter_csharp_grpc", + ":securitycenter_csharp_proto", + ], +) diff --git a/google/cloud/securitycenter/v1p1beta1/asset.proto b/google/cloud/securitycenter/v1p1beta1/asset.proto new file mode 100644 index 000000000..aaa18bcba --- /dev/null +++ b/google/cloud/securitycenter/v1p1beta1/asset.proto @@ -0,0 +1,119 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.securitycenter.v1p1beta1; + +import "google/api/annotations.proto"; +import "google/api/resource.proto"; +import "google/cloud/securitycenter/v1p1beta1/security_marks.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1P1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter"; +option java_multiple_files = true; +option java_package = "com.google.cloud.securitycenter.v1p1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; + +// Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud +// Platform (GCP) resource. +// +// The Asset is a Cloud SCC resource that captures information about a single +// GCP resource. All modifications to an Asset are only within the context of +// Cloud SCC and don't affect the referenced GCP resource. +message Asset { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/Asset" + pattern: "organizations/{organization}/assets/{asset}" + }; + + // Cloud SCC managed properties. These properties are managed by Cloud SCC and + // cannot be modified by the user. + message SecurityCenterProperties { + // The full resource name of the GCP resource this asset + // represents. This field is immutable after create time. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name + string resource_name = 1; + + // The type of the GCP resource. Examples include: APPLICATION, + // PROJECT, and ORGANIZATION. This is a case insensitive field defined by + // Cloud SCC and/or the producer of the resource and is immutable + // after create time. + string resource_type = 2; + + // The full resource name of the immediate parent of the resource. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name + string resource_parent = 3; + + // The full resource name of the project the resource belongs to. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name + string resource_project = 4; + + // Owners of the Google Cloud resource. + repeated string resource_owners = 5; + + // The user defined display name for this resource. + string resource_display_name = 6; + + // The user defined display name for the parent of this resource. + string resource_parent_display_name = 7; + + // The user defined display name for the project of this resource. + string resource_project_display_name = 8; + } + + // IAM Policy information associated with the GCP resource described by the + // Cloud SCC asset. This information is managed and defined by the GCP + // resource and cannot be modified by the user. + message IamPolicy { + // The JSON representation of the Policy associated with the asset. + // See https://cloud.google.com/iam/reference/rest/v1/Policy for + // format details. + string policy_blob = 1; + } + + // The relative resource name of this asset. See: + // https://cloud.google.com/apis/design/resource_names#relative_resource_name + // Example: + // "organizations/{organization_id}/assets/{asset_id}". + string name = 1; + + // Cloud SCC managed properties. These properties are managed by + // Cloud SCC and cannot be modified by the user. + SecurityCenterProperties security_center_properties = 2; + + // Resource managed properties. These properties are managed and defined by + // the GCP resource and cannot be modified by the user. + map resource_properties = 7; + + // User specified security marks. These marks are entirely managed by the user + // and come from the SecurityMarks resource that belongs to the asset. + SecurityMarks security_marks = 8; + + // The time at which the asset was created in Cloud SCC. + google.protobuf.Timestamp create_time = 9; + + // The time at which the asset was last updated, added, or deleted in Cloud + // SCC. + google.protobuf.Timestamp update_time = 10; + + // IAM Policy information associated with the GCP resource described by the + // Cloud SCC asset. This information is managed and defined by the GCP + // resource and cannot be modified by the user. + IamPolicy iam_policy = 11; +} diff --git a/google/cloud/securitycenter/v1p1beta1/finding.proto b/google/cloud/securitycenter/v1p1beta1/finding.proto new file mode 100644 index 000000000..6428027df --- /dev/null +++ b/google/cloud/securitycenter/v1p1beta1/finding.proto @@ -0,0 +1,111 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.securitycenter.v1p1beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/securitycenter/v1p1beta1/security_marks.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1P1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter"; +option java_multiple_files = true; +option java_package = "com.google.cloud.securitycenter.v1p1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; + +// Cloud Security Command Center (Cloud SCC) finding. +// +// A finding is a record of assessment data (security, risk, health or privacy) +// ingested into Cloud SCC for presentation, notification, analysis, +// policy testing, and enforcement. For example, an XSS vulnerability in an +// App Engine application is a finding. +message Finding { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/Finding" + pattern: "organizations/{organization}/sources/{source}/findings/{finding}" + }; + + // The state of the finding. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // The finding requires attention and has not been addressed yet. + ACTIVE = 1; + + // The finding has been fixed, triaged as a non-issue or otherwise addressed + // and is no longer active. + INACTIVE = 2; + } + + // The relative resource name of this finding. See: + // https://cloud.google.com/apis/design/resource_names#relative_resource_name + // Example: + // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + string name = 1; + + // The relative resource name of the source the finding belongs to. See: + // https://cloud.google.com/apis/design/resource_names#relative_resource_name + // This field is immutable after creation time. + // For example: + // "organizations/{organization_id}/sources/{source_id}" + string parent = 2; + + // For findings on Google Cloud Platform (GCP) resources, the full resource + // name of the GCP resource this finding is for. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name + // When the finding is for a non-GCP resource, the resourceName can be a + // customer or partner defined string. + // This field is immutable after creation time. + string resource_name = 3; + + // The state of the finding. + State state = 4; + + // The additional taxonomy group within findings from a given source. + // This field is immutable after creation time. + // Example: "XSS_FLASH_INJECTION" + string category = 5; + + // The URI that, if available, points to a web page outside of Cloud SCC + // where additional information about the finding can be found. This field is + // guaranteed to be either empty or a well formed URL. + string external_uri = 6; + + // Source specific properties. These properties are managed by the source + // that writes the finding. The key names in the source_properties map must be + // between 1 and 255 characters, and must start with a letter and contain + // alphanumeric characters or underscores only. + map source_properties = 7; + + // Output only. User specified security marks. These marks are entirely + // managed by the user and come from the SecurityMarks resource that belongs + // to the finding. + SecurityMarks security_marks = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The time at which the event took place. For example, if the finding + // represents an open firewall it would capture the time the detector believes + // the firewall became open. The accuracy is determined by the detector. + google.protobuf.Timestamp event_time = 9; + + // The time at which the finding was created in Cloud SCC. + google.protobuf.Timestamp create_time = 10; +} diff --git a/google/cloud/securitycenter/v1p1beta1/notification_config.proto b/google/cloud/securitycenter/v1p1beta1/notification_config.proto new file mode 100644 index 000000000..7cbb87b24 --- /dev/null +++ b/google/cloud/securitycenter/v1p1beta1/notification_config.proto @@ -0,0 +1,112 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.securitycenter.v1p1beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1P1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter"; +option java_multiple_files = true; +option java_package = "com.google.cloud.securitycenter.v1p1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; + +// The Pub/Sub Topic resource definition is in google/cloud/pubsub/v1/, +// but we do not import that proto directly; therefore, we redefine the +// pattern here. +option (google.api.resource_definition) = { + type: "pubsub.googleapis.com/Topic" + pattern: "projects/{project}/topics/{topic}" +}; + +// Cloud Security Command Center (Cloud SCC) notification configs. +// +// A notification config is a Cloud SCC resource that contains the configuration +// to send notifications for create/update events of findings, assets and etc. +message NotificationConfig { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/NotificationConfig" + pattern: "organizations/{organization}/notificationConfigs/{notification_config}" + }; + + // The config for streaming-based notifications, which send each event as soon + // as it is detected. + message StreamingConfig { + // Expression that defines the filter to apply across create/update events + // of assets or findings as specified by the event type. The expression is a + // list of zero or more restrictions combined via logical operators `AND` + // and `OR`. Parentheses are supported, and `OR` has higher precedence than + // `AND`. + // + // Restrictions have the form ` ` and may have a + // `-` character in front of them to indicate negation. The fields map to + // those defined in the corresponding resource. + // + // The supported operators are: + // + // * `=` for all value types. + // * `>`, `<`, `>=`, `<=` for integer values. + // * `:`, meaning substring matching, for strings. + // + // The supported value types are: + // + // * string literals in quotes. + // * integer literals without quotes. + // * boolean literals `true` and `false` without quotes. + string filter = 1; + } + + // The type of events. + enum EventType { + // Unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0; + + // Events for findings. + FINDING = 1; + } + + // The relative resource name of this notification config. See: + // https://cloud.google.com/apis/design/resource_names#relative_resource_name + // Example: + // "organizations/{organization_id}/notificationConfigs/notify_public_bucket". + string name = 1; + + // The description of the notification config (max of 1024 characters). + string description = 2; + + // The type of events the config is for, e.g. FINDING. + EventType event_type = 3; + + // The PubSub topic to send notifications to. Its format is + // "projects/[project_id]/topics/[topic]". + string pubsub_topic = 4 [ + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; + + // Output only. The service account that needs "pubsub.topics.publish" + // permission to publish to the PubSub topic. + string service_account = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The config for triggering notifications. + oneof notify_config { + // The config for triggering streaming-based notifications. + StreamingConfig streaming_config = 6; + } +} diff --git a/google/cloud/securitycenter/v1p1beta1/notification_message.proto b/google/cloud/securitycenter/v1p1beta1/notification_message.proto new file mode 100644 index 000000000..3abbcef32 --- /dev/null +++ b/google/cloud/securitycenter/v1p1beta1/notification_message.proto @@ -0,0 +1,42 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.securitycenter.v1p1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/securitycenter/v1p1beta1/asset.proto"; +import "google/cloud/securitycenter/v1p1beta1/finding.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1P1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter"; +option java_multiple_files = true; +option java_package = "com.google.cloud.securitycenter.v1p1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; + +// Cloud SCC's Notification +message NotificationMessage { + // Name of the notification config that generated current notification. + string notification_config_name = 1; + + // Notification Event. + oneof event { + // If it's a Finding based notification config, this field will be + // populated. + Finding finding = 2; + } +} diff --git a/google/cloud/securitycenter/v1p1beta1/organization_settings.proto b/google/cloud/securitycenter/v1p1beta1/organization_settings.proto new file mode 100644 index 000000000..9c38b87ba --- /dev/null +++ b/google/cloud/securitycenter/v1p1beta1/organization_settings.proto @@ -0,0 +1,83 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.securitycenter.v1p1beta1; + +import "google/api/annotations.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1P1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter"; +option java_multiple_files = true; +option java_package = "com.google.cloud.securitycenter.v1p1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; + +// User specified settings that are attached to the Cloud Security Command +// Center (Cloud SCC) organization. +message OrganizationSettings { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/OrganizationSettings" + pattern: "organizations/{organization}/organizationSettings" + }; + + // The configuration used for Asset Discovery runs. + message AssetDiscoveryConfig { + // The mode of inclusion when running Asset Discovery. + // Asset discovery can be limited by explicitly identifying projects to be + // included or excluded. If INCLUDE_ONLY is set, then only those projects + // within the organization and their children are discovered during asset + // discovery. If EXCLUDE is set, then projects that don't match those + // projects are discovered during asset discovery. If neither are set, then + // all projects within the organization are discovered during asset + // discovery. + enum InclusionMode { + // Unspecified. Setting the mode with this value will disable + // inclusion/exclusion filtering for Asset Discovery. + INCLUSION_MODE_UNSPECIFIED = 0; + + // Asset Discovery will capture only the resources within the projects + // specified. All other resources will be ignored. + INCLUDE_ONLY = 1; + + // Asset Discovery will ignore all resources under the projects specified. + // All other resources will be retrieved. + EXCLUDE = 2; + } + + // The project ids to use for filtering asset discovery. + repeated string project_ids = 1; + + // The mode to use for filtering asset discovery. + InclusionMode inclusion_mode = 2; + } + + // The relative resource name of the settings. See: + // https://cloud.google.com/apis/design/resource_names#relative_resource_name + // Example: + // "organizations/{organization_id}/organizationSettings". + string name = 1; + + // A flag that indicates if Asset Discovery should be enabled. If the flag is + // set to `true`, then discovery of assets will occur. If it is set to `false, + // all historical assets will remain, but discovery of future assets will not + // occur. + bool enable_asset_discovery = 2; + + // The configuration used for Asset Discovery runs. + AssetDiscoveryConfig asset_discovery_config = 3; +} diff --git a/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto b/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto new file mode 100644 index 000000000..b8b9ea489 --- /dev/null +++ b/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto @@ -0,0 +1,53 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.securitycenter.v1p1beta1; + +import "google/api/annotations.proto"; +import "google/protobuf/duration.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1P1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter"; +option java_multiple_files = true; +option java_package = "com.google.cloud.securitycenter.v1p1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; + +// Response of asset discovery run +message RunAssetDiscoveryResponse { + // The state of an asset discovery run. + enum State { + // Asset discovery run state was unspecified. + STATE_UNSPECIFIED = 0; + + // Asset discovery run completed successfully. + COMPLETED = 1; + + // Asset discovery run was cancelled with tasks still pending, as another + // run for the same organization was started with a higher priority. + SUPERSEDED = 2; + + // Asset discovery run was killed and terminated. + TERMINATED = 3; + } + + // The state of an asset discovery run. + State state = 1; + + // The duration between asset discovery run start and end + google.protobuf.Duration duration = 2; +} diff --git a/google/cloud/securitycenter/v1p1beta1/security_marks.proto b/google/cloud/securitycenter/v1p1beta1/security_marks.proto new file mode 100644 index 000000000..ac54bc19a --- /dev/null +++ b/google/cloud/securitycenter/v1p1beta1/security_marks.proto @@ -0,0 +1,57 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.securitycenter.v1p1beta1; + +import "google/api/annotations.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1P1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter"; +option java_multiple_files = true; +option java_package = "com.google.cloud.securitycenter.v1p1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; + +// User specified security marks that are attached to the parent Cloud Security +// Command Center (Cloud SCC) resource. Security marks are scoped within a Cloud +// SCC organization -- they can be modified and viewed by all users who have +// proper permissions on the organization. +message SecurityMarks { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/SecurityMarks" + pattern: "organizations/{organization}/assets/{asset}/securityMarks" + pattern: "organizations/{organization}/sources/{source}/findings/{finding}/securityMarks" + }; + + // The relative resource name of the SecurityMarks. See: + // https://cloud.google.com/apis/design/resource_names#relative_resource_name + // Examples: + // "organizations/{organization_id}/assets/{asset_id}/securityMarks" + // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". + string name = 1; + + // Mutable user specified security marks belonging to the parent resource. + // Constraints are as follows: + // + // * Keys and values are treated as case insensitive + // * Keys must be between 1 - 256 characters (inclusive) + // * Keys must be letters, numbers, underscores, or dashes + // * Values have leading and trailing whitespace trimmed, remaining + // characters must be between 1 - 4096 characters (inclusive) + map marks = 2; +} diff --git a/google/cloud/securitycenter/v1p1beta1/securitycenter_gapic.yaml b/google/cloud/securitycenter/v1p1beta1/securitycenter_gapic.yaml new file mode 100644 index 000000000..2669af7ea --- /dev/null +++ b/google/cloud/securitycenter/v1p1beta1/securitycenter_gapic.yaml @@ -0,0 +1,18 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + java: + package_name: com.google.cloud.securitycenter.v1p1beta1 + python: + package_name: google.cloud.securitycenter_v1p1beta1.gapic + go: + package_name: cloud.google.com/go/securitycenter/apiv1p1beta1 + csharp: + package_name: Google.Cloud.SecurityCenter.V1P1Beta1 + ruby: + package_name: Google::Cloud::SecurityCenter::V1p1beta1 + php: + package_name: Google\Cloud\SecurityCenter\V1p1beta1 + nodejs: + package_name: security-center.v1p1beta1 + domain_layer_location: google-cloud diff --git a/google/cloud/securitycenter/v1p1beta1/securitycenter_grpc_service_config.json b/google/cloud/securitycenter/v1p1beta1/securitycenter_grpc_service_config.json new file mode 100755 index 000000000..1e1d6a1b4 --- /dev/null +++ b/google/cloud/securitycenter/v1p1beta1/securitycenter_grpc_service_config.json @@ -0,0 +1,116 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "CreateSource" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "CreateFinding" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "CreateNotificationConfig" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "DeleteNotificationConfig" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "RunAssetDiscovery" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "SetFindingState" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "SetIamPolicy" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "UpdateFinding" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "UpdateNotificationConfig" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "UpdateOrganizationSettings" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "UpdateSource" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "UpdateSecurityMarks" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "GetIamPolicy" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "GetNotificationConfig" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "GetOrganizationSettings" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "GetSource" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "GroupAssets" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "GroupFindings" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "ListAssets" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "ListFindings" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "ListNotificationConfigs" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "ListSources" + }, + { + "service": "google.cloud.securitycenter.v1p1beta1.SecurityCenter", + "method": "TestIamPermissions" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto b/google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto new file mode 100644 index 000000000..dcd9af683 --- /dev/null +++ b/google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto @@ -0,0 +1,1277 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.securitycenter.v1p1beta1; + +import public "google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto"; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/securitycenter/v1p1beta1/asset.proto"; +import "google/cloud/securitycenter/v1p1beta1/finding.proto"; +import "google/cloud/securitycenter/v1p1beta1/notification_config.proto"; +import "google/cloud/securitycenter/v1p1beta1/organization_settings.proto"; +import "google/cloud/securitycenter/v1p1beta1/security_marks.proto"; +import "google/cloud/securitycenter/v1p1beta1/source.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1P1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter"; +option java_multiple_files = true; +option java_package = "com.google.cloud.securitycenter.v1p1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; + +// V1p1Beta1 APIs for Security Center service. +service SecurityCenter { + option (google.api.default_host) = "securitycenter.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a source. + rpc CreateSource(CreateSourceRequest) returns (Source) { + option (google.api.http) = { + post: "/v1p1beta1/{parent=organizations/*}/sources" + body: "source" + }; + option (google.api.method_signature) = "parent,source"; + } + + // + // Creates a finding. The corresponding source must exist for finding + // creation to succeed. + rpc CreateFinding(CreateFindingRequest) returns (Finding) { + option (google.api.http) = { + post: "/v1p1beta1/{parent=organizations/*/sources/*}/findings" + body: "finding" + }; + option (google.api.method_signature) = "parent,finding_id,finding"; + option (google.api.method_signature) = "parent,finding,finding_id"; + } + + // Creates a notification config. + rpc CreateNotificationConfig(CreateNotificationConfigRequest) + returns (NotificationConfig) { + option (google.api.http) = { + post: "/v1p1beta1/{parent=organizations/*}/notificationConfigs" + body: "notification_config" + }; + option (google.api.method_signature) = + "parent,config_id,notification_config"; + option (google.api.method_signature) = "parent,notification_config"; + } + + // Deletes a notification config. + rpc DeleteNotificationConfig(DeleteNotificationConfigRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1p1beta1/{name=organizations/*/notificationConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the access control policy on the specified Source. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1p1beta1/{resource=organizations/*/sources/*}:getIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource"; + } + + // Gets a notification config. + rpc GetNotificationConfig(GetNotificationConfigRequest) + returns (NotificationConfig) { + option (google.api.http) = { + get: "/v1p1beta1/{name=organizations/*/notificationConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the settings for an organization. + rpc GetOrganizationSettings(GetOrganizationSettingsRequest) + returns (OrganizationSettings) { + option (google.api.http) = { + get: "/v1p1beta1/{name=organizations/*/organizationSettings}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets a source. + rpc GetSource(GetSourceRequest) returns (Source) { + option (google.api.http) = { + get: "/v1p1beta1/{name=organizations/*/sources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Filters an organization's assets and groups them by their specified + // properties. + rpc GroupAssets(GroupAssetsRequest) returns (GroupAssetsResponse) { + option (google.api.http) = { + post: "/v1p1beta1/{parent=organizations/*}/assets:group" + body: "*" + }; + } + + // Filters an organization or source's findings and groups them by their + // specified properties. + // + // To group across all sources provide a `-` as the source id. + // Example: /v1p1beta1/organizations/{organization_id}/sources/-/findings + rpc GroupFindings(GroupFindingsRequest) returns (GroupFindingsResponse) { + option (google.api.http) = { + post: "/v1p1beta1/{parent=organizations/*/sources/*}/findings:group" + body: "*" + }; + option (google.api.method_signature) = "parent,group_by"; + } + + // Lists an organization's assets. + rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) { + option (google.api.http) = { + get: "/v1p1beta1/{parent=organizations/*}/assets" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists an organization or source's findings. + // + // To list across all sources provide a `-` as the source id. + // Example: /v1p1beta1/organizations/{organization_id}/sources/-/findings + rpc ListFindings(ListFindingsRequest) returns (ListFindingsResponse) { + option (google.api.http) = { + get: "/v1p1beta1/{parent=organizations/*/sources/*}/findings" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists notification configs. + rpc ListNotificationConfigs(ListNotificationConfigsRequest) + returns (ListNotificationConfigsResponse) { + option (google.api.http) = { + get: "/v1p1beta1/{parent=organizations/*}/notificationConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists all sources belonging to an organization. + rpc ListSources(ListSourcesRequest) returns (ListSourcesResponse) { + option (google.api.http) = { + get: "/v1p1beta1/{parent=organizations/*}/sources" + }; + option (google.api.method_signature) = "parent"; + } + + // Runs asset discovery. The discovery is tracked with a long-running + // operation. + // + // This API can only be called with limited frequency for an organization. If + // it is called too frequently the caller will receive a TOO_MANY_REQUESTS + // error. + rpc RunAssetDiscovery(RunAssetDiscoveryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p1beta1/{parent=organizations/*}/assets:runDiscovery" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse" + metadata_type: "google.protobuf.Empty" + }; + } + + // + // Updates the state of a finding. + rpc SetFindingState(SetFindingStateRequest) returns (Finding) { + option (google.api.http) = { + post: "/v1p1beta1/{name=organizations/*/sources/*/findings/*}:setState" + body: "*" + }; + option (google.api.method_signature) = "name,state,start_time"; + } + + // Sets the access control policy on the specified Source. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1p1beta1/{resource=organizations/*/sources/*}:setIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource,policy"; + } + + // Returns the permissions that a caller has on the specified source. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1p1beta1/{resource=organizations/*/sources/*}:testIamPermissions" + body: "*" + }; + option (google.api.method_signature) = "resource,permissions"; + } + + // + // Creates or updates a finding. The corresponding source must exist for a + // finding creation to succeed. + rpc UpdateFinding(UpdateFindingRequest) returns (Finding) { + option (google.api.http) = { + patch: "/v1p1beta1/{finding.name=organizations/*/sources/*/findings/*}" + body: "finding" + }; + option (google.api.method_signature) = "finding"; + option (google.api.method_signature) = "finding,update_mask"; + } + + // Updates a notification config. + rpc UpdateNotificationConfig(UpdateNotificationConfigRequest) + returns (NotificationConfig) { + option (google.api.http) = { + patch: "/v1p1beta1/{notification_config.name=organizations/*/notificationConfigs/*}" + body: "notification_config" + }; + option (google.api.method_signature) = "notification_config"; + option (google.api.method_signature) = "notification_config,update_mask"; + } + + // Updates an organization's settings. + rpc UpdateOrganizationSettings(UpdateOrganizationSettingsRequest) + returns (OrganizationSettings) { + option (google.api.http) = { + patch: "/v1p1beta1/{organization_settings.name=organizations/*/organizationSettings}" + body: "organization_settings" + }; + option (google.api.method_signature) = "organization_settings"; + } + + // Updates a source. + rpc UpdateSource(UpdateSourceRequest) returns (Source) { + option (google.api.http) = { + patch: "/v1p1beta1/{source.name=organizations/*/sources/*}" + body: "source" + }; + option (google.api.method_signature) = "source"; + option (google.api.method_signature) = "source,update_mask"; + } + + // Updates security marks. + rpc UpdateSecurityMarks(UpdateSecurityMarksRequest) returns (SecurityMarks) { + option (google.api.http) = { + patch: "/v1p1beta1/{security_marks.name=organizations/*/assets/*/securityMarks}" + body: "security_marks" + additional_bindings { + patch: "/v1p1beta1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}" + body: "security_marks" + } + }; + option (google.api.method_signature) = "security_marks"; + option (google.api.method_signature) = "security_marks,update_mask"; + } +} + +// Request message for creating a finding. +message CreateFindingRequest { + // Required. Resource name of the new finding's parent. Its format should be + // "organizations/[organization_id]/sources/[source_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; + + // Required. Unique identifier provided by the client within the parent scope. + // It must be alphanumeric and less than or equal to 32 characters and + // greater than 0 characters in length. + string finding_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Finding being created. The name and security_marks will be + // ignored as they are both output only fields on this resource. + Finding finding = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for creating a notification config. +message CreateNotificationConfigRequest { + // Required. Resource name of the new notification config's parent. Its format + // is "organizations/[organization_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; + + // Required. + // Unique identifier provided by the client within the parent scope. + // It must be between 1 and 128 characters, and contains alphanumeric + // characters, underscores or hyphens only. + string config_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The notification config being created. The name and the service + // account will be ignored as they are both output only fields on this + // resource. + NotificationConfig notification_config = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for creating a source. +message CreateSourceRequest { + // Required. Resource name of the new source's parent. Its format should be + // "organizations/[organization_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; + + // Required. The Source being created, only the display_name and description + // will be used. All other fields will be ignored. + Source source = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for deleting a notification config. +message DeleteNotificationConfigRequest { + // Required. Name of the notification config to delete. Its format is + // "organizations/[organization_id]/notificationConfigs/[config_id]". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/NotificationConfig" + } + ]; +} + +// Request message for getting a notification config. +message GetNotificationConfigRequest { + // Required. Name of the notification config to get. Its format is + // "organizations/[organization_id]/notificationConfigs/[config_id]". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/NotificationConfig" + } + ]; +} + +// Request message for getting organization settings. +message GetOrganizationSettingsRequest { + // Required. Name of the organization to get organization settings for. Its + // format is "organizations/[organization_id]/organizationSettings". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/OrganizationSettings" + } + ]; +} + +// Request message for getting a source. +message GetSourceRequest { + // Required. Relative resource name of the source. Its format is + // "organizations/[organization_id]/source/[source_id]". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; +} + +// Request message for grouping by assets. +message GroupAssetsRequest { + // Required. Name of the organization to groupBy. Its format is + // "organizations/[organization_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; + + // Expression that defines the filter to apply across assets. + // The expression is a list of zero or more restrictions combined via logical + // operators `AND` and `OR`. + // Parentheses are supported, and `OR` has higher precedence than `AND`. + // + // Restrictions have the form ` ` and may have a `-` + // character in front of them to indicate negation. The fields map to those + // defined in the Asset resource. Examples include: + // + // * name + // * security_center_properties.resource_name + // * resource_properties.a_property + // * security_marks.marks.marka + // + // The supported operators are: + // + // * `=` for all value types. + // * `>`, `<`, `>=`, `<=` for integer values. + // * `:`, meaning substring matching, for strings. + // + // The supported value types are: + // + // * string literals in quotes. + // * integer literals without quotes. + // * boolean literals `true` and `false` without quotes. + // + // The following field and operator combinations are supported: + // + // * name: `=` + // * update_time: `=`, `>`, `<`, `>=`, `<=` + // + // Usage: This should be milliseconds since epoch or an RFC3339 string. + // Examples: + // "update_time = \"2019-06-10T16:07:18-07:00\"" + // "update_time = 1560208038000" + // + // * create_time: `=`, `>`, `<`, `>=`, `<=` + // + // Usage: This should be milliseconds since epoch or an RFC3339 string. + // Examples: + // "create_time = \"2019-06-10T16:07:18-07:00\"" + // "create_time = 1560208038000" + // + // * iam_policy.policy_blob: `=`, `:` + // * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + // * security_marks.marks: `=`, `:` + // * security_center_properties.resource_name: `=`, `:` + // * security_center_properties.resource_name_display_name: `=`, `:` + // * security_center_properties.resource_type: `=`, `:` + // * security_center_properties.resource_parent: `=`, `:` + // * security_center_properties.resource_parent_display_name: `=`, `:` + // * security_center_properties.resource_project: `=`, `:` + // * security_center_properties.resource_project_display_name: `=`, `:` + // * security_center_properties.resource_owners: `=`, `:` + // + // For example, `resource_properties.size = 100` is a valid filter string. + string filter = 2; + + // Required. Expression that defines what assets fields to use for grouping. + // The string value should follow SQL syntax: comma separated list of fields. + // For example: + // "security_center_properties.resource_project,security_center_properties.project". + // + // The following fields are supported when compare_duration is not set: + // + // * security_center_properties.resource_project + // * security_center_properties.resource_project_display_name + // * security_center_properties.resource_type + // * security_center_properties.resource_parent + // * security_center_properties.resource_parent_display_name + // + // The following fields are supported when compare_duration is set: + // + // * security_center_properties.resource_type + // * security_center_properties.resource_project_display_name + // * security_center_properties.resource_parent_display_name + string group_by = 3 [(google.api.field_behavior) = REQUIRED]; + + // When compare_duration is set, the GroupResult's "state_change" property is + // updated to indicate whether the asset was added, removed, or remained + // present during the compare_duration period of time that precedes the + // read_time. This is the time between (read_time - compare_duration) and + // read_time. + // + // The state change value is derived based on the presence of the asset at the + // two points in time. Intermediate state changes between the two times don't + // affect the result. For example, the results aren't affected if the asset is + // removed and re-created again. + // + // Possible "state_change" values when compare_duration is specified: + // + // * "ADDED": indicates that the asset was not present at the start of + // compare_duration, but present at reference_time. + // * "REMOVED": indicates that the asset was present at the start of + // compare_duration, but not present at reference_time. + // * "ACTIVE": indicates that the asset was present at both the + // start and the end of the time period defined by + // compare_duration and reference_time. + // + // If compare_duration is not specified, then the only possible state_change + // is "UNUSED", which will be the state_change set for all assets present at + // read_time. + // + // If this field is set then `state_change` must be a specified field in + // `group_by`. + google.protobuf.Duration compare_duration = 4; + + // Time used as a reference point when filtering assets. The filter is limited + // to assets existing at the supplied time and their values are those at that + // specific time. Absence of this field will default to the API's version of + // NOW. + google.protobuf.Timestamp read_time = 5; + + // Filter that specifies what fields to further filter on *after* the query + // filter has been executed. Currently only `state_change` is supported and + // requires compare_duration to be specified. + string having = 6; + + // The value returned by the last `GroupAssetsResponse`; indicates + // that this is a continuation of a prior `GroupAssets` call, and that the + // system should return the next page of data. + string page_token = 7; + + // The maximum number of results to return in a single response. Default is + // 10, minimum is 1, maximum is 1000. + int32 page_size = 8; +} + +// Response message for grouping by assets. +message GroupAssetsResponse { + // Group results. There exists an element for each existing unique + // combination of property/values. The element contains a count for the number + // of times those specific property/values appear. + repeated GroupResult group_by_results = 1; + + // Time used for executing the groupBy request. + google.protobuf.Timestamp read_time = 2; + + // Token to retrieve the next page of results, or empty if there are no more + // results. + string next_page_token = 3; + + // The total number of results matching the query. + int32 total_size = 4; +} + +// Request message for grouping by findings. +message GroupFindingsRequest { + // Required. Name of the source to groupBy. Its format is + // "organizations/[organization_id]/sources/[source_id]". To groupBy across + // all sources provide a source_id of `-`. For example: + // organizations/{organization_id}/sources/- + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; + + // Expression that defines the filter to apply across findings. + // The expression is a list of one or more restrictions combined via logical + // operators `AND` and `OR`. + // Parentheses are supported, and `OR` has higher precedence than `AND`. + // + // Restrictions have the form ` ` and may have a `-` + // character in front of them to indicate negation. Examples include: + // + // * name + // * source_properties.a_property + // * security_marks.marks.marka + // + // The supported operators are: + // + // * `=` for all value types. + // * `>`, `<`, `>=`, `<=` for integer values. + // * `:`, meaning substring matching, for strings. + // + // The supported value types are: + // + // * string literals in quotes. + // * integer literals without quotes. + // * boolean literals `true` and `false` without quotes. + // + // The following field and operator combinations are supported: + // + // * name: `=` + // * parent: `=`, `:` + // * resource_name: `=`, `:` + // * state: `=`, `:` + // * category: `=`, `:` + // * external_uri: `=`, `:` + // * event_time: `=`, `>`, `<`, `>=`, `<=` + // + // Usage: This should be milliseconds since epoch or an RFC3339 string. + // Examples: + // "event_time = \"2019-06-10T16:07:18-07:00\"" + // "event_time = 1560208038000" + // + // * security_marks.marks: `=`, `:` + // * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + // + // For example, `source_properties.size = 100` is a valid filter string. + string filter = 2; + + // Required. Expression that defines what assets fields to use for grouping + // (including `state_change`). The string value should follow SQL syntax: + // comma separated list of fields. For example: "parent,resource_name". + // + // The following fields are supported: + // + // * resource_name + // * category + // * state + // * parent + // + // The following fields are supported when compare_duration is set: + // + // * state_change + string group_by = 3 [(google.api.field_behavior) = REQUIRED]; + + // Time used as a reference point when filtering findings. The filter is + // limited to findings existing at the supplied time and their values are + // those at that specific time. Absence of this field will default to the + // API's version of NOW. + google.protobuf.Timestamp read_time = 4; + + // When compare_duration is set, the GroupResult's "state_change" attribute is + // updated to indicate whether the finding had its state changed, the + // finding's state remained unchanged, or if the finding was added during the + // compare_duration period of time that precedes the read_time. This is the + // time between (read_time - compare_duration) and read_time. + // + // The state_change value is derived based on the presence and state of the + // finding at the two points in time. Intermediate state changes between the + // two times don't affect the result. For example, the results aren't affected + // if the finding is made inactive and then active again. + // + // Possible "state_change" values when compare_duration is specified: + // + // * "CHANGED": indicates that the finding was present at the start of + // compare_duration, but changed its state at read_time. + // * "UNCHANGED": indicates that the finding was present at the start of + // compare_duration and did not change state at read_time. + // * "ADDED": indicates that the finding was not present at the start + // of compare_duration, but was present at read_time. + // + // If compare_duration is not specified, then the only possible state_change + // is "UNUSED", which will be the state_change set for all findings present + // at read_time. + // + // If this field is set then `state_change` must be a specified field in + // `group_by`. + google.protobuf.Duration compare_duration = 5; + + // Filter that specifies what fields to further filter on *after* the query + // filter has been executed. Currently only `finding.state` and `state_change` + // are supported and requires compare_duration to be specified. + string having = 6; + + // The value returned by the last `GroupFindingsResponse`; indicates + // that this is a continuation of a prior `GroupFindings` call, and + // that the system should return the next page of data. + string page_token = 7; + + // The maximum number of results to return in a single response. Default is + // 10, minimum is 1, maximum is 1000. + int32 page_size = 8; +} + +// Response message for group by findings. +message GroupFindingsResponse { + // Group results. There exists an element for each existing unique + // combination of property/values. The element contains a count for the number + // of times those specific property/values appear. + repeated GroupResult group_by_results = 1; + + // Time used for executing the groupBy request. + google.protobuf.Timestamp read_time = 2; + + // Token to retrieve the next page of results, or empty if there are no more + // results. + string next_page_token = 3; + + // The total number of results matching the query. + int32 total_size = 4; +} + +// Result containing the properties and count of a groupBy request. +message GroupResult { + // Properties matching the groupBy fields in the request. + map properties = 1; + + // Total count of resources for the given properties. + int64 count = 2; +} + +// Request message for listing notification configs. +message ListNotificationConfigsRequest { + // Required. Name of the organization to list notification configs. + // Its format is "organizations/[organization_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; + + // The value returned by the last `ListNotificationConfigsResponse`; indicates + // that this is a continuation of a prior `ListNotificationConfigs` call, and + // that the system should return the next page of data. + string page_token = 2; + + // The maximum number of results to return in a single response. Default is + // 10, minimum is 1, maximum is 1000. + int32 page_size = 3; +} + +// Response message for listing notification configs. +message ListNotificationConfigsResponse { + // Notification configs belonging to the requested parent. + repeated NotificationConfig notification_configs = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results. + string next_page_token = 2; +} + +// Request message for listing sources. +message ListSourcesRequest { + // Required. Resource name of the parent of sources to list. Its format should + // be "organizations/[organization_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; + + // The value returned by the last `ListSourcesResponse`; indicates + // that this is a continuation of a prior `ListSources` call, and + // that the system should return the next page of data. + string page_token = 2; + + // The maximum number of results to return in a single response. Default is + // 10, minimum is 1, maximum is 1000. + int32 page_size = 7; +} + +// Response message for listing sources. +message ListSourcesResponse { + // Sources belonging to the requested parent. + repeated Source sources = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results. + string next_page_token = 2; +} + +// Request message for listing assets. +message ListAssetsRequest { + // Required. Name of the organization assets should belong to. Its format is + // "organizations/[organization_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; + + // Expression that defines the filter to apply across assets. + // The expression is a list of zero or more restrictions combined via logical + // operators `AND` and `OR`. + // Parentheses are supported, and `OR` has higher precedence than `AND`. + // + // Restrictions have the form ` ` and may have a `-` + // character in front of them to indicate negation. The fields map to those + // defined in the Asset resource. Examples include: + // + // * name + // * security_center_properties.resource_name + // * resource_properties.a_property + // * security_marks.marks.marka + // + // The supported operators are: + // + // * `=` for all value types. + // * `>`, `<`, `>=`, `<=` for integer values. + // * `:`, meaning substring matching, for strings. + // + // The supported value types are: + // + // * string literals in quotes. + // * integer literals without quotes. + // * boolean literals `true` and `false` without quotes. + // + // The following are the allowed field and operator combinations: + // + // * name: `=` + // * update_time: `=`, `>`, `<`, `>=`, `<=` + // + // Usage: This should be milliseconds since epoch or an RFC3339 string. + // Examples: + // "update_time = \"2019-06-10T16:07:18-07:00\"" + // "update_time = 1560208038000" + // + // * create_time: `=`, `>`, `<`, `>=`, `<=` + // + // Usage: This should be milliseconds since epoch or an RFC3339 string. + // Examples: + // "create_time = \"2019-06-10T16:07:18-07:00\"" + // "create_time = 1560208038000" + // + // * iam_policy.policy_blob: `=`, `:` + // * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + // * security_marks.marks: `=`, `:` + // * security_center_properties.resource_name: `=`, `:` + // * security_center_properties.resource_display_name: `=`, `:` + // * security_center_properties.resource_type: `=`, `:` + // * security_center_properties.resource_parent: `=`, `:` + // * security_center_properties.resource_parent_display_name: `=`, `:` + // * security_center_properties.resource_project: `=`, `:` + // * security_center_properties.resource_project_display_name: `=`, `:` + // * security_center_properties.resource_owners: `=`, `:` + // + // For example, `resource_properties.size = 100` is a valid filter string. + string filter = 2; + + // Expression that defines what fields and order to use for sorting. The + // string value should follow SQL syntax: comma separated list of fields. For + // example: "name,resource_properties.a_property". The default sorting order + // is ascending. To specify descending order for a field, a suffix " desc" + // should be appended to the field name. For example: "name + // desc,resource_properties.a_property". Redundant space characters in the + // syntax are insignificant. "name desc,resource_properties.a_property" and " + // name desc , resource_properties.a_property " are equivalent. + // + // The following fields are supported: + // name + // update_time + // resource_properties + // security_marks.marks + // security_center_properties.resource_name + // security_center_properties.resource_display_name + // security_center_properties.resource_parent + // security_center_properties.resource_parent_display_name + // security_center_properties.resource_project + // security_center_properties.resource_project_display_name + // security_center_properties.resource_type + string order_by = 3; + + // Time used as a reference point when filtering assets. The filter is limited + // to assets existing at the supplied time and their values are those at that + // specific time. Absence of this field will default to the API's version of + // NOW. + google.protobuf.Timestamp read_time = 4; + + // When compare_duration is set, the ListAssetsResult's "state_change" + // attribute is updated to indicate whether the asset was added, removed, or + // remained present during the compare_duration period of time that precedes + // the read_time. This is the time between (read_time - compare_duration) and + // read_time. + // + // The state_change value is derived based on the presence of the asset at the + // two points in time. Intermediate state changes between the two times don't + // affect the result. For example, the results aren't affected if the asset is + // removed and re-created again. + // + // Possible "state_change" values when compare_duration is specified: + // + // * "ADDED": indicates that the asset was not present at the start of + // compare_duration, but present at read_time. + // * "REMOVED": indicates that the asset was present at the start of + // compare_duration, but not present at read_time. + // * "ACTIVE": indicates that the asset was present at both the + // start and the end of the time period defined by + // compare_duration and read_time. + // + // If compare_duration is not specified, then the only possible state_change + // is "UNUSED", which will be the state_change set for all assets present at + // read_time. + google.protobuf.Duration compare_duration = 5; + + // Filter that specifies what fields to further filter on *after* the query + // filter has been executed. Currently only `state_change` is supported and + // requires compare_duration to be specified. + string having = 6; + + // Optional. + // A field mask to specify the ListAssetsResult fields to be listed in the + // response. + // An empty field mask will list all fields. + google.protobuf.FieldMask field_mask = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // The value returned by the last `ListAssetsResponse`; indicates + // that this is a continuation of a prior `ListAssets` call, and + // that the system should return the next page of data. + string page_token = 8; + + // The maximum number of results to return in a single response. Default is + // 10, minimum is 1, maximum is 1000. + int32 page_size = 9; +} + +// Response message for listing assets. +message ListAssetsResponse { + // Result containing the Asset and its State. + message ListAssetsResult { + // The change in state of the asset. + // + // When querying across two points in time this describes + // the change between the two points: ADDED, REMOVED, or ACTIVE. + // If there was no compare_duration supplied in the request the state change + // will be: UNUSED + enum StateChange { + // State change is unused, this is the canonical default for this enum. + UNUSED = 0; + + // Asset was added between the points in time. + ADDED = 1; + + // Asset was removed between the points in time. + REMOVED = 2; + + // Asset was present at both point(s) in time. + ACTIVE = 3; + } + + // Asset matching the search request. + Asset asset = 1; + + // State change of the asset between the points in time. + StateChange state_change = 2; + } + + // Assets matching the list request. + repeated ListAssetsResult list_assets_results = 1; + + // Time used for executing the list request. + google.protobuf.Timestamp read_time = 2; + + // Token to retrieve the next page of results, or empty if there are no more + // results. + string next_page_token = 3; + + // The total number of assets matching the query. + int32 total_size = 4; +} + +// Request message for listing findings. +message ListFindingsRequest { + // Required. Name of the source the findings belong to. Its format is + // "organizations/[organization_id]/sources/[source_id]". To list across all + // sources provide a source_id of `-`. For example: + // organizations/{organization_id}/sources/- + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; + + // Expression that defines the filter to apply across findings. + // The expression is a list of one or more restrictions combined via logical + // operators `AND` and `OR`. + // Parentheses are supported, and `OR` has higher precedence than `AND`. + // + // Restrictions have the form ` ` and may have a `-` + // character in front of them to indicate negation. Examples include: + // + // * name + // * source_properties.a_property + // * security_marks.marks.marka + // + // The supported operators are: + // + // * `=` for all value types. + // * `>`, `<`, `>=`, `<=` for integer values. + // * `:`, meaning substring matching, for strings. + // + // The supported value types are: + // + // * string literals in quotes. + // * integer literals without quotes. + // * boolean literals `true` and `false` without quotes. + // + // The following field and operator combinations are supported: + // + // name: `=` + // parent: `=`, `:` + // resource_name: `=`, `:` + // state: `=`, `:` + // category: `=`, `:` + // external_uri: `=`, `:` + // event_time: `=`, `>`, `<`, `>=`, `<=` + // + // Usage: This should be milliseconds since epoch or an RFC3339 string. + // Examples: + // "event_time = \"2019-06-10T16:07:18-07:00\"" + // "event_time = 1560208038000" + // + // security_marks.marks: `=`, `:` + // source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + // + // For example, `source_properties.size = 100` is a valid filter string. + string filter = 2; + + // Expression that defines what fields and order to use for sorting. The + // string value should follow SQL syntax: comma separated list of fields. For + // example: "name,resource_properties.a_property". The default sorting order + // is ascending. To specify descending order for a field, a suffix " desc" + // should be appended to the field name. For example: "name + // desc,source_properties.a_property". Redundant space characters in the + // syntax are insignificant. "name desc,source_properties.a_property" and " + // name desc , source_properties.a_property " are equivalent. + // + // The following fields are supported: + // name + // parent + // state + // category + // resource_name + // event_time + // source_properties + // security_marks.marks + string order_by = 3; + + // Time used as a reference point when filtering findings. The filter is + // limited to findings existing at the supplied time and their values are + // those at that specific time. Absence of this field will default to the + // API's version of NOW. + google.protobuf.Timestamp read_time = 4; + + // When compare_duration is set, the ListFindingsResult's "state_change" + // attribute is updated to indicate whether the finding had its state changed, + // the finding's state remained unchanged, or if the finding was added in any + // state during the compare_duration period of time that precedes the + // read_time. This is the time between (read_time - compare_duration) and + // read_time. + // + // The state_change value is derived based on the presence and state of the + // finding at the two points in time. Intermediate state changes between the + // two times don't affect the result. For example, the results aren't affected + // if the finding is made inactive and then active again. + // + // Possible "state_change" values when compare_duration is specified: + // + // * "CHANGED": indicates that the finding was present at the start of + // compare_duration, but changed its state at read_time. + // * "UNCHANGED": indicates that the finding was present at the start of + // compare_duration and did not change state at read_time. + // * "ADDED": indicates that the finding was not present at the start + // of compare_duration, but was present at read_time. + // + // If compare_duration is not specified, then the only possible state_change + // is "UNUSED", which will be the state_change set for all findings present at + // read_time. + google.protobuf.Duration compare_duration = 5; + + // Filter that specifies what fields to further filter on *after* the query + // filter has been executed. Currently only `finding.state` and `state_change` + // are supported and requires compare_duration to be specified. + string having = 6; + + // Optional. + // A field mask to specify the Finding fields to be listed in the response. + // An empty field mask will list all fields. + google.protobuf.FieldMask field_mask = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // The value returned by the last `ListFindingsResponse`; indicates + // that this is a continuation of a prior `ListFindings` call, and + // that the system should return the next page of data. + string page_token = 8; + + // The maximum number of results to return in a single response. Default is + // 10, minimum is 1, maximum is 1000. + int32 page_size = 9; +} + +// Response message for listing findings. +message ListFindingsResponse { + // Result containing the Finding and its StateChange. + message ListFindingsResult { + // Information related to the Google Cloud Platform (GCP) resource that is + // associated with this finding. + message Resource { + // The full resource name of the resource. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name + string name = 1; + + // The full resource name of project that the resource belongs to. + string project_name = 2; + + // The human readable name of project that the resource belongs to. + string project_display_name = 3; + + // The full resource name of resource's parent. + string parent_name = 4; + + // The human readable name of resource's parent. + string parent_display_name = 5; + } + + // The change in state of the finding. + // + // When querying across two points in time this describes + // the change in the finding between the two points: CHANGED, UNCHANGED, + // ADDED, or REMOVED. Findings can not be deleted, so REMOVED implies that + // the finding at timestamp does not match the filter specified, but it did + // at timestamp - compare_duration. If there was no compare_duration + // supplied in the request the state change will be: UNUSED + enum StateChange { + // State change is unused, this is the canonical default for this enum. + UNUSED = 0; + + // The finding has changed state in some way between the points in time + // and existed at both points. + CHANGED = 1; + + // The finding has not changed state between the points in time and + // existed at both points. + UNCHANGED = 2; + + // The finding was created between the points in time. + ADDED = 3; + + // The finding at timestamp does not match the filter specified, but it + // did at timestamp - compare_duration. + REMOVED = 4; + } + + // Finding matching the search request. + Finding finding = 1; + + // State change of the finding between the points in time. + StateChange state_change = 2; + + // Output only. Resource that is associated with this finding. + Resource resource = 3; + } + + // Findings matching the list request. + repeated ListFindingsResult list_findings_results = 1; + + // Time used for executing the list request. + google.protobuf.Timestamp read_time = 2; + + // Token to retrieve the next page of results, or empty if there are no more + // results. + string next_page_token = 3; + + // The total number of findings matching the query. + int32 total_size = 4; +} + +// Request message for updating a finding's state. +message SetFindingStateRequest { + // Required. The relative resource name of the finding. See: + // https://cloud.google.com/apis/design/resource_names#relative_resource_name + // Example: + // "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Finding" + } + ]; + + // Required. The desired State of the finding. + Finding.State state = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The time at which the updated state takes effect. + google.protobuf.Timestamp start_time = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for running asset discovery for an organization. +message RunAssetDiscoveryRequest { + // Required. Name of the organization to run asset discovery for. Its format + // is "organizations/[organization_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; +} + +// Request message for updating or creating a finding. +message UpdateFindingRequest { + // Required. The finding resource to update or create if it does not already + // exist. parent, security_marks, and update_time will be ignored. + // + // In the case of creation, the finding id portion of the name must be + // alphanumeric and less than or equal to 32 characters and greater than 0 + // characters in length. + Finding finding = 1 [(google.api.field_behavior) = REQUIRED]; + + // The FieldMask to use when updating the finding resource. This field should + // not be specified when creating a finding. + // + // When updating a finding, an empty mask is treated as updating all mutable + // fields and replacing source_properties. Individual source_properties can + // be added/updated by using "source_properties." in the field + // mask. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for updating a notification config. +message UpdateNotificationConfigRequest { + // Required. The notification config to update. + NotificationConfig notification_config = 1 + [(google.api.field_behavior) = REQUIRED]; + + // The FieldMask to use when updating the notification config. + // + // If empty all mutable fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for updating an organization's settings. +message UpdateOrganizationSettingsRequest { + // Required. The organization settings resource to update. + OrganizationSettings organization_settings = 1 + [(google.api.field_behavior) = REQUIRED]; + + // The FieldMask to use when updating the settings resource. + // + // If empty all mutable fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for updating a source. +message UpdateSourceRequest { + // Required. The source resource to update. + Source source = 1 [(google.api.field_behavior) = REQUIRED]; + + // The FieldMask to use when updating the source resource. + // + // If empty all mutable fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for updating a SecurityMarks resource. +message UpdateSecurityMarksRequest { + // Required. The security marks resource to update. + SecurityMarks security_marks = 1 [(google.api.field_behavior) = REQUIRED]; + + // The FieldMask to use when updating the security marks resource. + // + // The field mask must not contain duplicate fields. + // If empty or set to "marks", all marks will be replaced. Individual + // marks can be updated using "marks.". + google.protobuf.FieldMask update_mask = 2; + + // The time at which the updated SecurityMarks take effect. + // If not set uses current server time. Updates will be applied to the + // SecurityMarks that are active immediately preceding this time. + google.protobuf.Timestamp start_time = 3; +} diff --git a/google/cloud/securitycenter/v1p1beta1/securitycenter_v1p1beta1.yaml b/google/cloud/securitycenter/v1p1beta1/securitycenter_v1p1beta1.yaml new file mode 100644 index 000000000..3c7319584 --- /dev/null +++ b/google/cloud/securitycenter/v1p1beta1/securitycenter_v1p1beta1.yaml @@ -0,0 +1,49 @@ +type: google.api.Service +config_version: 3 +name: securitycenter.googleapis.com +title: Cloud Security Command Center API + +apis: +- name: google.cloud.securitycenter.v1p1beta1.SecurityCenter + +types: +- name: google.cloud.securitycenter.v1p1beta1.NotificationMessage +- name: google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse + +documentation: + summary: |- + Cloud Security Command Center API provides access to temporal views of + assets and findings within an organization. + +backend: + rules: + - selector: 'google.cloud.securitycenter.v1p1beta1.SecurityCenter.*' + deadline: 480.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + +http: + rules: + - selector: google.longrunning.Operations.ListOperations + get: '/v1p1beta1/{name=organizations/*/operations}' + + - selector: google.longrunning.Operations.GetOperation + get: '/v1p1beta1/{name=organizations/*/operations/*}' + + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1p1beta1/{name=organizations/*/operations/*}' + + - selector: google.longrunning.Operations.CancelOperation + post: '/v1p1beta1/{name=organizations/*/operations/*}:cancel' + body: '*' + +authentication: + rules: + - selector: 'google.cloud.securitycenter.v1p1beta1.SecurityCenter.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/securitycenter/v1p1beta1/source.proto b/google/cloud/securitycenter/v1p1beta1/source.proto new file mode 100644 index 000000000..d591a05cc --- /dev/null +++ b/google/cloud/securitycenter/v1p1beta1/source.proto @@ -0,0 +1,60 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.securitycenter.v1p1beta1; + +import "google/api/annotations.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1P1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter"; +option java_multiple_files = true; +option java_package = "com.google.cloud.securitycenter.v1p1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; + +// Cloud Security Command Center's (Cloud SCC) finding source. A finding source +// is an entity or a mechanism that can produce a finding. A source is like a +// container of findings that come from the same scanner, logger, monitor, etc. +message Source { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/Source" + pattern: "organizations/{organization}/sources/{source}" + }; + + // The relative resource name of this source. See: + // https://cloud.google.com/apis/design/resource_names#relative_resource_name + // Example: + // "organizations/{organization_id}/sources/{source_id}" + string name = 1; + + // The source's display name. + // A source's display name must be unique amongst its siblings, for example, + // two sources with the same parent can't share the same display name. + // The display name must have a length between 1 and 64 characters + // (inclusive). + string display_name = 2; + + // The description of the source (max of 1024 characters). + // Example: + // "Cloud Security Scanner is a web security scanner for common + // vulnerabilities in App Engine applications. It can automatically + // scan and detect four common vulnerabilities, including cross-site-scripting + // (XSS), Flash injection, mixed content (HTTP in HTTPS), and + // outdated/insecure libraries." + string description = 3; +} diff --git a/google/cloud/servicedirectory/v1beta1/BUILD.bazel b/google/cloud/servicedirectory/v1beta1/BUILD.bazel new file mode 100644 index 000000000..13efb63ed --- /dev/null +++ b/google/cloud/servicedirectory/v1beta1/BUILD.bazel @@ -0,0 +1,368 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "servicedirectory_proto", + srcs = [ + "endpoint.proto", + "lookup_service.proto", + "namespace.proto", + "registration_service.proto", + "service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + ], +) + +proto_library_with_info( + name = "servicedirectory_proto_with_info", + deps = [ + ":servicedirectory_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "servicedirectory_java_proto", + deps = [":servicedirectory_proto"], +) + +java_grpc_library( + name = "servicedirectory_java_grpc", + srcs = [":servicedirectory_proto"], + deps = [":servicedirectory_java_proto"], +) + +java_gapic_library( + name = "servicedirectory_java_gapic", + src = ":servicedirectory_proto_with_info", + gapic_yaml = "servicedirectory_gapic.yaml", + package = "google.cloud.servicedirectory.v1beta1", + service_yaml = "servicedirectory_v1beta1.yaml", + test_deps = [ + ":servicedirectory_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":servicedirectory_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "servicedirectory_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.servicedirectory.v1beta1.LookupServiceClientTest", + "com.google.cloud.servicedirectory.v1beta1.RegistrationServiceClientTest", + ], + runtime_deps = [":servicedirectory_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-servicedirectory-v1beta1-java", + deps = [ + ":servicedirectory_java_gapic", + ":servicedirectory_java_grpc", + ":servicedirectory_java_proto", + ":servicedirectory_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "servicedirectory_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1", + protos = [":servicedirectory_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_gapic_library( + name = "servicedirectory_go_gapic", + srcs = [":servicedirectory_proto_with_info"], + grpc_service_config = "servicedirectory_grpc_service_config.json", + importpath = "cloud.google.com/go/servicedirectory/apiv1beta1;servicedirectory", + service_yaml = "servicedirectory_v1beta1.yaml", + deps = [ + ":servicedirectory_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_test( + name = "servicedirectory_go_gapic_test", + srcs = [":servicedirectory_go_gapic_srcjar_test"], + embed = [":servicedirectory_go_gapic"], + importpath = "cloud.google.com/go/servicedirectory/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-servicedirectory-v1beta1-go", + deps = [ + ":servicedirectory_go_gapic", + ":servicedirectory_go_gapic_srcjar-test.srcjar", + ":servicedirectory_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "servicedirectory_moved_proto", + srcs = [":servicedirectory_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + ], +) + +py_proto_library( + name = "servicedirectory_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":servicedirectory_moved_proto"], +) + +py_grpc_library( + name = "servicedirectory_py_grpc", + srcs = [":servicedirectory_moved_proto"], + deps = [":servicedirectory_py_proto"], +) + +py_gapic_library( + name = "servicedirectory_py_gapic", + src = ":servicedirectory_proto_with_info", + gapic_yaml = "servicedirectory_gapic.yaml", + package = "google.cloud.servicedirectory.v1beta1", + service_yaml = "servicedirectory_v1beta1.yaml", + deps = [ + ":servicedirectory_py_grpc", + ":servicedirectory_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "servicedirectory-v1beta1-py", + deps = [ + ":servicedirectory_py_gapic", + ":servicedirectory_py_grpc", + ":servicedirectory_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "servicedirectory_php_proto", + deps = [":servicedirectory_proto"], +) + +php_grpc_library( + name = "servicedirectory_php_grpc", + srcs = [":servicedirectory_proto"], + deps = [":servicedirectory_php_proto"], +) + +php_gapic_library( + name = "servicedirectory_php_gapic", + src = ":servicedirectory_proto_with_info", + gapic_yaml = "servicedirectory_gapic.yaml", + package = "google.cloud.servicedirectory.v1beta1", + service_yaml = "servicedirectory_v1beta1.yaml", + deps = [ + ":servicedirectory_php_grpc", + ":servicedirectory_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-servicedirectory-v1beta1-php", + deps = [ + ":servicedirectory_php_gapic", + ":servicedirectory_php_grpc", + ":servicedirectory_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "servicedirectory_nodejs_gapic", + src = ":servicedirectory_proto_with_info", + gapic_yaml = "servicedirectory_gapic.yaml", + package = "google.cloud.servicedirectory.v1beta1", + service_yaml = "servicedirectory_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "servicedirectory-v1beta1-nodejs", + deps = [ + ":servicedirectory_nodejs_gapic", + ":servicedirectory_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "servicedirectory_ruby_proto", + deps = [":servicedirectory_proto"], +) + +ruby_grpc_library( + name = "servicedirectory_ruby_grpc", + srcs = [":servicedirectory_proto"], + deps = [":servicedirectory_ruby_proto"], +) + +ruby_gapic_library( + name = "servicedirectory_ruby_gapic", + src = ":servicedirectory_proto_with_info", + gapic_yaml = "servicedirectory_gapic.yaml", + package = "google.cloud.servicedirectory.v1beta1", + service_yaml = "servicedirectory_v1beta1.yaml", + deps = [ + ":servicedirectory_ruby_grpc", + ":servicedirectory_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-servicedirectory-v1beta1-ruby", + deps = [ + ":servicedirectory_ruby_gapic", + ":servicedirectory_ruby_grpc", + ":servicedirectory_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "servicedirectory_csharp_proto", + deps = [":servicedirectory_proto"], +) + +csharp_grpc_library( + name = "servicedirectory_csharp_grpc", + srcs = [":servicedirectory_proto"], + deps = [":servicedirectory_csharp_proto"], +) + +csharp_gapic_library( + name = "servicedirectory_csharp_gapic", + src = ":servicedirectory_proto_with_info", + gapic_yaml = "servicedirectory_gapic.yaml", + package = "google.cloud.servicedirectory.v1beta1", + service_yaml = "servicedirectory_v1beta1.yaml", + deps = [ + ":servicedirectory_csharp_grpc", + ":servicedirectory_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-servicedirectory-v1beta1-csharp", + deps = [ + ":servicedirectory_csharp_gapic", + ":servicedirectory_csharp_grpc", + ":servicedirectory_csharp_proto", + ], +) diff --git a/google/cloud/servicedirectory/v1beta1/endpoint.proto b/google/cloud/servicedirectory/v1beta1/endpoint.proto new file mode 100644 index 000000000..5a4bede2a --- /dev/null +++ b/google/cloud/servicedirectory/v1beta1/endpoint.proto @@ -0,0 +1,63 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.servicedirectory.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.ServiceDirectory.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1;servicedirectory"; +option java_multiple_files = true; +option java_outer_classname = "EndpointProto"; +option java_package = "com.google.cloud.servicedirectory.v1beta1"; +option php_namespace = "Google\\Cloud\\ServiceDirectory\\V1beta1"; +option ruby_package = "Google::Cloud::ServiceDirectory::V1beta1"; + +// An individual endpoint that provides a +// [service][google.cloud.servicedirectory.v1beta1.Service]. The service must +// already exist to create an endpoint. +message Endpoint { + option (google.api.resource) = { + type: "servicedirectory.googleapis.com/Endpoint" + pattern: "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}/endpoints/{endpoint}" + }; + + // Immutable. The resource name for the endpoint in the format + // 'projects/*/locations/*/namespaces/*/services/*/endpoints/*'. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Optional. An IPv4 or IPv6 address. Service Directory will reject bad + // addresses like: + // "8.8.8" + // "8.8.8.8:53" + // "test:bad:address" + // "[::1]" + // "[::1]:8080" + // Limited to 45 characters. + string address = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Service Directory will reject values outside of [0, 65535]. + int32 port = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Metadata for the endpoint. This data can be consumed by service + // clients. The entire metadata dictionary may contain up to 512 characters, + // spread accoss all key-value pairs. Metadata that goes beyond any these + // limits will be rejected. + map metadata = 4 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/google/cloud/servicedirectory/v1beta1/lookup_service.proto b/google/cloud/servicedirectory/v1beta1/lookup_service.proto new file mode 100644 index 000000000..24c6c8fc2 --- /dev/null +++ b/google/cloud/servicedirectory/v1beta1/lookup_service.proto @@ -0,0 +1,90 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.servicedirectory.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/servicedirectory/v1beta1/service.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.ServiceDirectory.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1;servicedirectory"; +option java_multiple_files = true; +option java_outer_classname = "LookupServiceProto"; +option java_package = "com.google.cloud.servicedirectory.v1beta1"; +option php_namespace = "Google\\Cloud\\ServiceDirectory\\V1beta1"; +option ruby_package = "Google::Cloud::ServiceDirectory::V1beta1"; + +// Service Directory API for looking up service data at runtime. +service LookupService { + option (google.api.default_host) = "servicedirectory.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Returns a [service][google.cloud.servicedirectory.v1beta1.Service] and its + // associated endpoints. + // Resolving a service is not considered an active developer method. + rpc ResolveService(ResolveServiceRequest) returns (ResolveServiceResponse) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*}:resolve" + body: "*" + }; + } +} + +// The request message for [LookupService.ResolveService][google.cloud.servicedirectory.v1beta1.LookupService.ResolveService]. +// Looks up a service by its name, returns the service and its endpoints. +message ResolveServiceRequest { + // Required. The name of the service to resolve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "servicedirectory.googleapis.com/Service" + } + ]; + + // Optional. The maximum number of endpoints to return. Defaults to 25. Maximum is 100. + // If a value less than one is specified, the Default is used. + // If a value greater than the Maximum is specified, the Maximum is used. + int32 max_endpoints = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter applied to the endpoints of the resolved service. + // + // General filter string syntax: + // () + // can be "name" or "metadata." for map field. + // can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS and is + // roughly the same as "=". + // must be the same data type as the field. + // can be "AND, OR, NOT". + // + // Examples of valid filters: + // * "metadata.owner" returns Endpoints that have a label with the + // key "owner", this is the same as "metadata:owner" + // * "metadata.protocol=gRPC" returns Endpoints that have key/value + // "protocol=gRPC" + // * "metadata.owner!=sd AND metadata.foo=bar" returns + // Endpoints that have "owner" field in metadata with a value that is not + // "sd" AND have the key/value foo=bar. + string endpoint_filter = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [LookupService.ResolveService][google.cloud.servicedirectory.v1beta1.LookupService.ResolveService]. +message ResolveServiceResponse { + Service service = 1; +} diff --git a/google/cloud/servicedirectory/v1beta1/namespace.proto b/google/cloud/servicedirectory/v1beta1/namespace.proto new file mode 100644 index 000000000..3e5722206 --- /dev/null +++ b/google/cloud/servicedirectory/v1beta1/namespace.proto @@ -0,0 +1,49 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.servicedirectory.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.ServiceDirectory.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1;servicedirectory"; +option java_multiple_files = true; +option java_outer_classname = "NamespaceProto"; +option java_package = "com.google.cloud.servicedirectory.v1beta1"; +option php_namespace = "Google\\Cloud\\ServiceDirectory\\V1beta1"; +option ruby_package = "Google::Cloud::ServiceDirectory::V1beta1"; + +// A container for [services][google.cloud.servicedirectory.v1beta1.Service]. +// Namespaces allow administrators to group services together and define +// permissions for a collection of services. +message Namespace { + option (google.api.resource) = { + type: "servicedirectory.googleapis.com/Namespace" + pattern: "projects/{project}/locations/{location}/namespaces/{namespace}" + }; + + // Immutable. The resource name for the namespace in the format + // 'projects/*/locations/*/namespaces/*'. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Optional. Resource labels associated with this Namespace. + // No more than 64 user labels can be associated with a given resource. Label + // keys and values can be no longer than 63 characters. + map labels = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/google/cloud/servicedirectory/v1beta1/registration_service.proto b/google/cloud/servicedirectory/v1beta1/registration_service.proto new file mode 100644 index 000000000..2c6dc8d40 --- /dev/null +++ b/google/cloud/servicedirectory/v1beta1/registration_service.proto @@ -0,0 +1,569 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.servicedirectory.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/servicedirectory/v1beta1/endpoint.proto"; +import "google/cloud/servicedirectory/v1beta1/namespace.proto"; +import "google/cloud/servicedirectory/v1beta1/service.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.ServiceDirectory.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1;servicedirectory"; +option java_multiple_files = true; +option java_outer_classname = "RegistrationServiceProto"; +option java_package = "com.google.cloud.servicedirectory.v1beta1"; +option php_namespace = "Google\\Cloud\\ServiceDirectory\\V1beta1"; +option ruby_package = "Google::Cloud::ServiceDirectory::V1beta1"; + +// Service Directory API for registering services. It defines the following +// resource model: +// +// - The API has a collection of +// [Namespace][google.cloud.servicedirectory.v1beta1.Namespace] +// resources, named `projects/*/locations/*/namespaces/*`. +// +// - Each Namespace has a collection of +// [Service][google.cloud.servicedirectory.v1beta1.Service] resources, named +// `projects/*/locations/*/namespaces/*/services/*`. +// +// - Each Service has a collection of +// [Endpoint][google.cloud.servicedirectory.v1beta1.Endpoint] +// resources, named +// `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. +service RegistrationService { + option (google.api.default_host) = "servicedirectory.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a namespace, and returns the new Namespace. + rpc CreateNamespace(CreateNamespaceRequest) returns (Namespace) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/namespaces" + body: "namespace" + }; + option (google.api.method_signature) = "parent,namespace,namespace_id"; + } + + // Lists all namespaces. + rpc ListNamespaces(ListNamespacesRequest) returns (ListNamespacesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/namespaces" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a namespace. + rpc GetNamespace(GetNamespaceRequest) returns (Namespace) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/namespaces/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a namespace. + rpc UpdateNamespace(UpdateNamespaceRequest) returns (Namespace) { + option (google.api.http) = { + patch: "/v1beta1/{namespace.name=projects/*/locations/*/namespaces/*}" + body: "namespace" + }; + option (google.api.method_signature) = "namespace,update_mask"; + } + + // Deletes a namespace. This also deletes all services and endpoints in + // the namespace. + rpc DeleteNamespace(DeleteNamespaceRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/namespaces/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a service, and returns the new Service. + rpc CreateService(CreateServiceRequest) returns (Service) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/namespaces/*}/services" + body: "service" + }; + option (google.api.method_signature) = "parent,service,service_id"; + } + + // Lists all services belonging to a namespace. + rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/namespaces/*}/services" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a service. + rpc GetService(GetServiceRequest) returns (Service) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a service. + rpc UpdateService(UpdateServiceRequest) returns (Service) { + option (google.api.http) = { + patch: "/v1beta1/{service.name=projects/*/locations/*/namespaces/*/services/*}" + body: "service" + }; + option (google.api.method_signature) = "service,update_mask"; + } + + // Deletes a service. This also deletes all endpoints associated with + // the service. + rpc DeleteService(DeleteServiceRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a endpoint, and returns the new Endpoint. + rpc CreateEndpoint(CreateEndpointRequest) returns (Endpoint) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/namespaces/*/services/*}/endpoints" + body: "endpoint" + }; + option (google.api.method_signature) = "parent,endpoint,endpoint_id"; + } + + // Lists all endpoints. + rpc ListEndpoints(ListEndpointsRequest) returns (ListEndpointsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/namespaces/*/services/*}/endpoints" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a endpoint. + rpc GetEndpoint(GetEndpointRequest) returns (Endpoint) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a endpoint. + rpc UpdateEndpoint(UpdateEndpointRequest) returns (Endpoint) { + option (google.api.http) = { + patch: "/v1beta1/{endpoint.name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}" + body: "endpoint" + }; + option (google.api.method_signature) = "endpoint,update_mask"; + } + + // Deletes a endpoint. + rpc DeleteEndpoint(DeleteEndpointRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the IAM Policy for a resource (namespace or service only). + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*}:getIamPolicy" + body: "*" + additional_bindings { + post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*/services/*}:getIamPolicy" + body: "*" + } + }; + } + + // Sets the IAM Policy for a resource (namespace or service only). + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*}:setIamPolicy" + body: "*" + additional_bindings { + post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*/services/*}:setIamPolicy" + body: "*" + } + }; + } + + // Tests IAM permissions for a resource (namespace or service only). + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*}:testIamPermissions" + body: "*" + additional_bindings { + post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*/services/*}:testIamPermissions" + body: "*" + } + }; + } +} + +// The request message for [RegistrationService.CreateNamespace][google.cloud.servicedirectory.v1beta1.RegistrationService.CreateNamespace]. +message CreateNamespaceRequest { + // Required. The resource name of the project and location the namespace + // will be created in. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The Resource ID must be 1-63 characters long, and comply with + // RFC1035. + // Specifically, the name must be 1-63 characters long and match the regular + // expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first + // character must be a lowercase letter, and all following characters must + // be a dash, lowercase letter, or digit, except the last character, which + // cannot be a dash. + string namespace_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A namespace with initial fields set. + Namespace namespace = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [RegistrationService.ListNamespaces][google.cloud.servicedirectory.v1beta1.RegistrationService.ListNamespaces]. +message ListNamespacesRequest { + // Required. The resource name of the project and location whose namespaces we'd like to + // list. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The maximum number of items to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous List request, if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to list result by. + // + // General filter string syntax: + // () + // can be "name", or "labels." for map field. + // can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS, and + // is roughly the same as "=". + // must be the same data type as field. + // can be "AND, OR, NOT". + // + // Examples of valid filters: + // * "labels.owner" returns Namespaces that have a label with the key "owner" + // this is the same as "labels:owner". + // * "labels.protocol=gRPC" returns Namespaces that have key/value + // "protocol=gRPC". + // * "name>projects/my-project/locations/us-east/namespaces/namespace-c" + // returns Namespaces that have name that is alphabetically later than the + // string, so "namespace-e" will be returned but "namespace-a" will not be. + // * "labels.owner!=sd AND labels.foo=bar" returns Namespaces that have + // "owner" in label key but value is not "sd" AND have key/value foo=bar. + // * "doesnotexist.foo=bar" returns an empty list. Note that Namespace doesn't + // have a field called "doesnotexist". Since the filter does not match any + // Namespaces, it returns no results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The order to list result by. + // + // General order by string syntax: + // () (,) + // allows values {"name"} + // ascending or descending order by . If this is left + // blank, "asc" is used. + // Note that an empty order_by string result in default order, which is order + // by name in ascending order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [RegistrationService.ListNamespaces][google.cloud.servicedirectory.v1beta1.RegistrationService.ListNamespaces]. +message ListNamespacesResponse { + // The list of namespaces. + repeated Namespace namespaces = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request message for [RegistrationService.GetNamespace][google.cloud.servicedirectory.v1beta1.RegistrationService.GetNamespace]. +message GetNamespaceRequest { + // Required. The name of the namespace to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "servicedirectory.googleapis.com/Namespace" + } + ]; +} + +// The request message for [RegistrationService.UpdateNamespace][google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateNamespace]. +message UpdateNamespaceRequest { + // Required. The updated namespace. + Namespace namespace = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [RegistrationService.DeleteNamespace][google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteNamespace]. +message DeleteNamespaceRequest { + // Required. The name of the namespace to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "servicedirectory.googleapis.com/Namespace" + } + ]; +} + +// The request message for [RegistrationService.CreateService][google.cloud.servicedirectory.v1beta1.RegistrationService.CreateService]. +message CreateServiceRequest { + // Required. The resource name of the namespace this service will belong to. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "servicedirectory.googleapis.com/Namespace" + } + ]; + + // Required. The Resource ID must be 1-63 characters long, and comply with + // RFC1035. + // Specifically, the name must be 1-63 characters long and match the regular + // expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first + // character must be a lowercase letter, and all following characters must + // be a dash, lowercase letter, or digit, except the last character, which + // cannot be a dash. + string service_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A service with initial fields set. + Service service = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [RegistrationService.ListServices][google.cloud.servicedirectory.v1beta1.RegistrationService.ListServices]. +message ListServicesRequest { + // Required. The resource name of the namespace whose services we'd + // like to list. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "servicedirectory.googleapis.com/Namespace" + } + ]; + + // Optional. The maximum number of items to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous List request, + // if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to list result by. + // + // General filter string syntax: + // () + // can be "name", or "metadata." for map field. + // can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS, and + // is roughly the same as "=". + // must be the same data type as field. + // can be "AND, OR, NOT". + // + // Examples of valid filters: + // * "metadata.owner" returns Services that have a label with the key "owner" + // this is the same as "metadata:owner". + // * "metadata.protocol=gRPC" returns Services that have key/value + // "protocol=gRPC". + // * "name>projects/my-project/locations/us-east/namespaces/my-namespace/services/service-c" + // returns Services that have name that is alphabetically later than the + // string, so "service-e" will be returned but "service-a" will not be. + // * "metadata.owner!=sd AND metadata.foo=bar" returns Services that have + // "owner" in label key but value is not "sd" AND have key/value foo=bar. + // * "doesnotexist.foo=bar" returns an empty list. Note that Service doesn't + // have a field called "doesnotexist". Since the filter does not match any + // Services, it returns no results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The order to list result by. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [RegistrationService.ListServices][google.cloud.servicedirectory.v1beta1.RegistrationService.ListServices]. +message ListServicesResponse { + // The list of services. + repeated Service services = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request message for [RegistrationService.GetService][google.cloud.servicedirectory.v1beta1.RegistrationService.GetService]. +// This should not be used for looking up a service. Insead, use the `resolve` +// method as it will contain all endpoints and associated metadata. +message GetServiceRequest { + // Required. The name of the service to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "servicedirectory.googleapis.com/Service" + } + ]; +} + +// The request message for [RegistrationService.UpdateService][google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateService]. +message UpdateServiceRequest { + // Required. The updated service. + Service service = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [RegistrationService.DeleteService][google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteService]. +message DeleteServiceRequest { + // Required. The name of the service to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "servicedirectory.googleapis.com/Service" + } + ]; +} + +// The request message for [RegistrationService.CreateEndpoint][google.cloud.servicedirectory.v1beta1.RegistrationService.CreateEndpoint]. +message CreateEndpointRequest { + // Required. The resource name of the service that this endpoint provides. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "servicedirectory.googleapis.com/Service" + } + ]; + + // Required. The Resource ID must be 1-63 characters long, and comply with + // RFC1035. + // Specifically, the name must be 1-63 characters long and match the regular + // expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first + // character must be a lowercase letter, and all following characters must + // be a dash, lowercase letter, or digit, except the last character, which + // cannot be a dash. + string endpoint_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A endpoint with initial fields set. + Endpoint endpoint = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [RegistrationService.ListEndpoints][google.cloud.servicedirectory.v1beta1.RegistrationService.ListEndpoints]. +message ListEndpointsRequest { + // Required. The resource name of the service whose endpoints we'd like to + // list. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "servicedirectory.googleapis.com/Service" + } + ]; + + // Optional. The maximum number of items to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous List request, + // if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to list result by. + // + // General filter string syntax: + // () + // can be "name", "address", "port" or "metadata." for map field. + // can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS, and + // is roughly the same as "=". + // must be the same data type as field. + // can be "AND, OR, NOT". + // + // Examples of valid filters: + // * "metadata.owner" returns Endpoints that have a label with the key "owner" + // this is the same as "metadata:owner". + // * "metadata.protocol=gRPC" returns Endpoints that have key/value + // "protocol=gRPC". + // * "address=192.108.1.105" returns Endpoints that have this address. + // * "port>8080" returns Endpoints that have port number larger than 8080. + // * "name>projects/my-project/locations/us-east/namespaces/my-namespace/services/my-service/endpoints/endpoint-c" + // returns Endpoints that have name that is alphabetically later than the + // string, so "endpoint-e" will be returned but "endpoint-a" will not be. + // * "metadata.owner!=sd AND metadata.foo=bar" returns Endpoints that have + // "owner" in label key but value is not "sd" AND have key/value foo=bar. + // * "doesnotexist.foo=bar" returns an empty list. Note that Endpoint doesn't + // have a field called "doesnotexist". Since the filter does not match any + // Endpoints, it returns no results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The order to list result by. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [RegistrationService.ListEndpoints][google.cloud.servicedirectory.v1beta1.RegistrationService.ListEndpoints]. +message ListEndpointsResponse { + // The list of endpoints. + repeated Endpoint endpoints = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request message for [RegistrationService.GetEndpoint][google.cloud.servicedirectory.v1beta1.RegistrationService.GetEndpoint]. +// This should not be used to lookup endpoints at runtime. Instead, use +// the `resolve` method. +message GetEndpointRequest { + // Required. The name of the endpoint to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "servicedirectory.googleapis.com/Endpoint" + } + ]; +} + +// The request message for [RegistrationService.UpdateEndpoint][google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateEndpoint]. +message UpdateEndpointRequest { + // Required. The updated endpoint. + Endpoint endpoint = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [RegistrationService.DeleteEndpoint][google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteEndpoint]. +message DeleteEndpointRequest { + // Required. The name of the endpoint to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "servicedirectory.googleapis.com/Endpoint" + } + ]; +} diff --git a/google/cloud/servicedirectory/v1beta1/service.proto b/google/cloud/servicedirectory/v1beta1/service.proto new file mode 100644 index 000000000..3e712ccd1 --- /dev/null +++ b/google/cloud/servicedirectory/v1beta1/service.proto @@ -0,0 +1,56 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.servicedirectory.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/servicedirectory/v1beta1/endpoint.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.ServiceDirectory.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1;servicedirectory"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.servicedirectory.v1beta1"; +option php_namespace = "Google\\Cloud\\ServiceDirectory\\V1beta1"; +option ruby_package = "Google::Cloud::ServiceDirectory::V1beta1"; + +// An individual service. A service contains a name and optional metadata. +// A service must exist before +// [endpoints][google.cloud.servicedirectory.v1beta1.Endpoint] can be +// added to it. +message Service { + option (google.api.resource) = { + type: "servicedirectory.googleapis.com/Service" + pattern: "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}" + }; + + // Immutable. The resource name for the service in the format + // 'projects/*/locations/*/namespaces/*/services/*'. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Optional. Metadata for the service. This data can be consumed by service + // clients. The entire metadata dictionary may contain up to 2000 characters, + // spread across all key-value pairs. Metadata that goes beyond any these + // limits will be rejected. + map metadata = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Endpoints associated with this service. Returned on LookupService.Resolve. + // Control plane clients should use RegistrationService.ListEndpoints. + repeated Endpoint endpoints = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/servicedirectory/v1beta1/servicedirectory_gapic.yaml b/google/cloud/servicedirectory/v1beta1/servicedirectory_gapic.yaml new file mode 100644 index 000000000..369d2fbcc --- /dev/null +++ b/google/cloud/servicedirectory/v1beta1/servicedirectory_gapic.yaml @@ -0,0 +1,18 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + java: + package_name: com.google.cloud.servicedirectory.v1beta1 + python: + package_name: google.cloud.servicedirectory_v1beta1.gapic + go: + package_name: cloud.google.com/go/servicedirectory/apiv1beta1 + csharp: + package_name: Google.Cloud.ServiceDirectory.V1Beta1 + ruby: + package_name: Google::Cloud::ServiceDirectory::V1beta1 + php: + package_name: Google\Cloud\ServiceDirectory\V1beta1 + nodejs: + package_name: servicedirectory.v1beta1 + domain_layer_location: google-cloud diff --git a/google/cloud/servicedirectory/v1beta1/servicedirectory_grpc_service_config.json b/google/cloud/servicedirectory/v1beta1/servicedirectory_grpc_service_config.json new file mode 100644 index 000000000..b93b84f8c --- /dev/null +++ b/google/cloud/servicedirectory/v1beta1/servicedirectory_grpc_service_config.json @@ -0,0 +1,26 @@ +{ + "methodConfig": [ + { + "name": [{ "service": "google.cloud.servicedirectory.v1beta1.RegistrationService" }], + "timeout": "15s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE", "UNKNOWN"] + } + }, + { + "name": [{ "service": "google.cloud.servicedirectory.v1beta1.LookupService" }], + "timeout": "15s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE", "UNKNOWN"] + } + } + ] +} diff --git a/google/cloud/servicedirectory/v1beta1/servicedirectory_v1beta1.yaml b/google/cloud/servicedirectory/v1beta1/servicedirectory_v1beta1.yaml new file mode 100644 index 000000000..d9903063f --- /dev/null +++ b/google/cloud/servicedirectory/v1beta1/servicedirectory_v1beta1.yaml @@ -0,0 +1,22 @@ +type: google.api.Service +config_version: 3 +name: servicedirectory.googleapis.com +title: Service Directory API + +apis: +- name: google.cloud.servicedirectory.v1beta1.LookupService +- name: google.cloud.servicedirectory.v1beta1.RegistrationService + +documentation: + summary: Allows the registration and lookup of services. + +authentication: + rules: + - selector: google.cloud.servicedirectory.v1beta1.LookupService.ResolveService + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.servicedirectory.v1beta1.RegistrationService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/speech/BUILD.bazel b/google/cloud/speech/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/cloud/speech/BUILD.bazel +++ b/google/cloud/speech/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/speech/artman_speech_v1.yaml b/google/cloud/speech/artman_speech_v1.yaml index c781940ea..7054bef52 100644 --- a/google/cloud/speech/artman_speech_v1.yaml +++ b/google/cloud/speech/artman_speech_v1.yaml @@ -3,11 +3,13 @@ common: api_version: v1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1 - service_yaml: speech_v1.yaml + service_yaml: v1/speech_v1.yaml gapic_yaml: v1/speech_gapic.yaml + samples: v1/samples + proto_package: google.cloud.speech.v1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/speech/artman_speech_v1p1beta1.yaml b/google/cloud/speech/artman_speech_v1p1beta1.yaml index fa2685425..63f659587 100644 --- a/google/cloud/speech/artman_speech_v1p1beta1.yaml +++ b/google/cloud/speech/artman_speech_v1p1beta1.yaml @@ -3,11 +3,13 @@ common: api_version: v1p1beta1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1p1beta1 - service_yaml: speech_v1p1beta1.yaml + service_yaml: v1p1beta1/speech_v1p1beta1.yaml gapic_yaml: v1p1beta1/speech_gapic.yaml + samples: v1p1beta1/samples + proto_package: google.cloud.speech.v1p1beta1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/speech/sample_resources.yaml b/google/cloud/speech/sample_resources.yaml index 5c00fc694..afd4b7eab 100644 --- a/google/cloud/speech/sample_resources.yaml +++ b/google/cloud/speech/sample_resources.yaml @@ -1,5 +1,8 @@ # Canonical GCS paths to resource files used by samples and sample system tests sample_resources: +- uri: gs://cloud-samples-data/speech/brooklyn_bridge.mp3 + description: | + 44100 Hz, 2 channels, English, "How old is the Brooklyn Bridge?" - uri: gs://cloud-samples-data/speech/brooklyn_bridge.raw description: | 16000 Hz, 1 channel, English, "How old is the Brooklyn Bridge?" @@ -8,7 +11,7 @@ sample_resources: 44100 Hz, 1 channel, English, "How old is the Brooklyn Bridge?" - uri: gs://cloud-samples-data/speech/brooklyn_bridge.wav description: | - 16000 Hz, 2 channel (only first contains audio data), English, "How old is the Brooklyn Bridge?" + 16000 Hz, 2 channels (only first contains audio data), English, "How old is the Brooklyn Bridge?" - uri: gs://cloud-samples-data/speech/hello.raw description: | 16000 Hz, 1 channel, English, "Hello" diff --git a/google/cloud/speech/speech_v1p1beta1.yaml b/google/cloud/speech/speech_v1p1beta1.yaml deleted file mode 100644 index 8fefdf6ff..000000000 --- a/google/cloud/speech/speech_v1p1beta1.yaml +++ /dev/null @@ -1,50 +0,0 @@ -type: google.api.Service -config_version: 3 -name: speech.googleapis.com -title: Cloud Speech API - -apis: -- name: google.cloud.speech.v1p1beta1.Speech - -documentation: - summary: Converts audio to text by applying powerful neural network models. - overview: |- - # Introduction - - Google Cloud Speech API provides speech recognition as a service. - -backend: - rules: - - selector: google.longrunning.Operations.ListOperations - deadline: 200.0 - - selector: google.longrunning.Operations.GetOperation - deadline: 200.0 - - selector: google.longrunning.Operations.WaitOperation - deadline: 200.0 - - selector: google.cloud.speech.v1p1beta1.Speech.Recognize - deadline: 200.0 - - selector: google.cloud.speech.v1p1beta1.Speech.LongRunningRecognize - deadline: 200.0 - - selector: google.cloud.speech.v1p1beta1.Speech.StreamingRecognize - deadline: 905.0 - -http: - rules: - - selector: google.longrunning.Operations.ListOperations - get: /v1/operations - additional_bindings: - - get: /v1beta1/operations - - selector: google.longrunning.Operations.GetOperation - get: '/v1/operations/{name=*}' - additional_bindings: - - get: '/v1beta1/operations/{name=*}' - - - get: '/v1p1beta1/operations/{name=*}' - - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/speech/v1/BUILD.bazel b/google/cloud/speech/v1/BUILD.bazel index 06dafe724..691de9b37 100644 --- a/google/cloud/speech/v1/BUILD.bazel +++ b/google/cloud/speech/v1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -13,18 +16,22 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/longrunning:operations_proto", "//google/rpc:status_proto", "@com_google_protobuf//:any_proto", "@com_google_protobuf//:duration_proto", - "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:timestamp_proto", ], ) proto_library_with_info( name = "speech_proto_with_info", - deps = [":speech_proto"], + deps = [ + ":speech_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -32,18 +39,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "speech_java_proto", deps = [":speech_proto"], @@ -52,51 +54,40 @@ java_proto_library( java_grpc_library( name = "speech_java_grpc", srcs = [":speech_proto"], - deps = [":speech_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "speech_resource_name_java_proto", - gapic_yaml = "speech_gapic.yaml", - deps = [":speech_proto"], + deps = [":speech_java_proto"], ) java_gapic_library( name = "speech_java_gapic", src = ":speech_proto_with_info", gapic_yaml = "speech_gapic.yaml", - service_yaml = "//google/cloud/speech:speech_v1.yaml", - test_deps = [":speech_java_grpc"], + package = "google.cloud.speech.v1", + service_yaml = "speech_v1.yaml", + test_deps = [ + ":speech_java_grpc", + ], deps = [ ":speech_java_proto", - ":speech_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":speech_java_gapic_test", +java_gapic_test( + name = "speech_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.speech.v1.SpeechClientTest", ], -) for test_name in [ - "com.google.cloud.speech.v1.SpeechClientTest", -]] + runtime_deps = [":speech_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-speech-v1-java", - client_deps = [":speech_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":speech_java_gapic_test"], - grpc_deps = [":speech_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":speech_java_gapic", + ":speech_java_grpc", ":speech_java_proto", ":speech_proto", - ":speech_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -104,10 +95,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -124,15 +115,18 @@ go_proto_library( go_gapic_library( name = "speech_go_gapic", - src = ":speech_proto_with_info", - gapic_yaml = "speech_gapic.yaml", - importpath = "cloud.google.com/go/speech/apiv1", - service_yaml = "//google/cloud/speech:speech_v1.yaml", + srcs = [":speech_proto_with_info"], + grpc_service_config = "speech_grpc_service_config.json", + importpath = "cloud.google.com/go/speech/apiv1;speech", + service_yaml = "speech_v1.yaml", deps = [ ":speech_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:any_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", ], ) @@ -143,13 +137,236 @@ go_test( importpath = "cloud.google.com/go/speech/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-speech-v1-go", deps = [ ":speech_go_gapic", - ":speech_go_gapic_srcjar-smoke-test.srcjar", ":speech_go_gapic_srcjar-test.srcjar", ":speech_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "speech_moved_proto", + srcs = [":speech_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "speech_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":speech_moved_proto"], +) + +py_grpc_library( + name = "speech_py_grpc", + srcs = [":speech_moved_proto"], + deps = [":speech_py_proto"], +) + +py_gapic_library( + name = "speech_py_gapic", + src = ":speech_proto_with_info", + gapic_yaml = "speech_gapic.yaml", + package = "google.cloud.speech.v1", + service_yaml = "speech_v1.yaml", + deps = [ + ":speech_py_grpc", + ":speech_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "speech-v1-py", + deps = [ + ":speech_py_gapic", + ":speech_py_grpc", + ":speech_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "speech_php_proto", + deps = [":speech_proto"], +) + +php_grpc_library( + name = "speech_php_grpc", + srcs = [":speech_proto"], + deps = [":speech_php_proto"], +) + +php_gapic_library( + name = "speech_php_gapic", + src = ":speech_proto_with_info", + gapic_yaml = "speech_gapic.yaml", + package = "google.cloud.speech.v1", + service_yaml = "speech_v1.yaml", + deps = [ + ":speech_php_grpc", + ":speech_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-speech-v1-php", + deps = [ + ":speech_php_gapic", + ":speech_php_grpc", + ":speech_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "speech_nodejs_gapic", + src = ":speech_proto_with_info", + gapic_yaml = "speech_gapic.yaml", + package = "google.cloud.speech.v1", + service_yaml = "speech_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "speech-v1-nodejs", + deps = [ + ":speech_nodejs_gapic", + ":speech_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "speech_ruby_proto", + deps = [":speech_proto"], +) + +ruby_grpc_library( + name = "speech_ruby_grpc", + srcs = [":speech_proto"], + deps = [":speech_ruby_proto"], +) + +ruby_gapic_library( + name = "speech_ruby_gapic", + src = ":speech_proto_with_info", + gapic_yaml = "speech_gapic.yaml", + package = "google.cloud.speech.v1", + service_yaml = "speech_v1.yaml", + deps = [ + ":speech_ruby_grpc", + ":speech_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-speech-v1-ruby", + deps = [ + ":speech_ruby_gapic", + ":speech_ruby_grpc", + ":speech_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "speech_csharp_proto", + deps = [":speech_proto"], +) + +csharp_grpc_library( + name = "speech_csharp_grpc", + srcs = [":speech_proto"], + deps = [":speech_csharp_proto"], +) + +csharp_gapic_library( + name = "speech_csharp_gapic", + src = ":speech_proto_with_info", + gapic_yaml = "speech_gapic.yaml", + package = "google.cloud.speech.v1", + service_yaml = "speech_v1.yaml", + deps = [ + ":speech_csharp_grpc", + ":speech_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-speech-v1-csharp", + deps = [ + ":speech_csharp_gapic", + ":speech_csharp_grpc", + ":speech_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/speech/v1/cloud_speech.proto b/google/cloud/speech/v1/cloud_speech.proto index 90ff515b5..f343fa21d 100644 --- a/google/cloud/speech/v1/cloud_speech.proto +++ b/google/cloud/speech/v1/cloud_speech.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,7 +18,10 @@ syntax = "proto3"; package google.cloud.speech.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -28,9 +31,13 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/speech/v1;speec option java_multiple_files = true; option java_outer_classname = "SpeechProto"; option java_package = "com.google.cloud.speech.v1"; +option objc_class_prefix = "GCS"; // Service that implements Google Cloud Speech API. service Speech { + option (google.api.default_host) = "speech.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Performs synchronous speech recognition: receive results after all audio // has been sent and processed. rpc Recognize(RecognizeRequest) returns (RecognizeResponse) { @@ -38,52 +45,59 @@ service Speech { post: "/v1/speech:recognize" body: "*" }; + option (google.api.method_signature) = "config,audio"; } // Performs asynchronous speech recognition: receive results via the // google.longrunning.Operations interface. Returns either an // `Operation.error` or an `Operation.response` which contains // a `LongRunningRecognizeResponse` message. - rpc LongRunningRecognize(LongRunningRecognizeRequest) - returns (google.longrunning.Operation) { + // For more information on asynchronous speech recognition, see the + // [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). + rpc LongRunningRecognize(LongRunningRecognizeRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/speech:longrunningrecognize" body: "*" }; + option (google.api.method_signature) = "config,audio"; + option (google.longrunning.operation_info) = { + response_type: "LongRunningRecognizeResponse" + metadata_type: "LongRunningRecognizeMetadata" + }; } // Performs bidirectional streaming speech recognition: receive results while // sending audio. This method is only available via the gRPC API (not REST). - rpc StreamingRecognize(stream StreamingRecognizeRequest) - returns (stream StreamingRecognizeResponse) {} + rpc StreamingRecognize(stream StreamingRecognizeRequest) returns (stream StreamingRecognizeResponse) { + } } // The top-level message sent by the client for the `Recognize` method. message RecognizeRequest { - // *Required* Provides information to the recognizer that specifies how to + // Required. Provides information to the recognizer that specifies how to // process the request. - RecognitionConfig config = 1; + RecognitionConfig config = 1 [(google.api.field_behavior) = REQUIRED]; - // *Required* The audio data to be recognized. - RecognitionAudio audio = 2; + // Required. The audio data to be recognized. + RecognitionAudio audio = 2 [(google.api.field_behavior) = REQUIRED]; } // The top-level message sent by the client for the `LongRunningRecognize` // method. message LongRunningRecognizeRequest { - // *Required* Provides information to the recognizer that specifies how to + // Required. Provides information to the recognizer that specifies how to // process the request. - RecognitionConfig config = 1; + RecognitionConfig config = 1 [(google.api.field_behavior) = REQUIRED]; - // *Required* The audio data to be recognized. - RecognitionAudio audio = 2; + // Required. The audio data to be recognized. + RecognitionAudio audio = 2 [(google.api.field_behavior) = REQUIRED]; } // The top-level message sent by the client for the `StreamingRecognize` method. // Multiple `StreamingRecognizeRequest` messages are sent. The first message -// must contain a `streaming_config` message and must not contain `audio` data. -// All subsequent messages must contain `audio` data and must not contain a -// `streaming_config` message. +// must contain a `streaming_config` message and must not contain +// `audio_content`. All subsequent messages must contain `audio_content` and +// must not contain a `streaming_config` message. message StreamingRecognizeRequest { // The streaming request, which is either a streaming config or audio content. oneof streaming_request { @@ -97,9 +111,9 @@ message StreamingRecognizeRequest { // `StreamingRecognizeRequest` message must not contain `audio_content` data // and all subsequent `StreamingRecognizeRequest` messages must contain // `audio_content` data. The audio bytes must be encoded as specified in - // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a + // `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a // pure binary representation (not base64). See - // [content limits](/speech-to-text/quotas#content). + // [content limits](https://cloud.google.com/speech-to-text/quotas#content). bytes audio_content = 2; } } @@ -107,11 +121,11 @@ message StreamingRecognizeRequest { // Provides information to the recognizer that specifies how to process the // request. message StreamingRecognitionConfig { - // *Required* Provides information to the recognizer that specifies how to + // Required. Provides information to the recognizer that specifies how to // process the request. - RecognitionConfig config = 1; + RecognitionConfig config = 1 [(google.api.field_behavior) = REQUIRED]; - // *Optional* If `false` or omitted, the recognizer will perform continuous + // If `false` or omitted, the recognizer will perform continuous // recognition (continuing to wait for and process audio even if the user // pauses speaking) until the client closes the input stream (gRPC API) or // until the maximum time limit has been reached. May return multiple @@ -124,7 +138,7 @@ message StreamingRecognitionConfig { // `true`. bool single_utterance = 2; - // *Optional* If `true`, interim results (tentative hypotheses) may be + // If `true`, interim results (tentative hypotheses) may be // returned as they become available (these interim results are indicated with // the `is_final=false` flag). // If `false` or omitted, only `is_final=true` result(s) are returned. @@ -136,13 +150,15 @@ message StreamingRecognitionConfig { message RecognitionConfig { // The encoding of the audio data sent in the request. // - // All encodings support only 1 channel (mono) audio. + // All encodings support only 1 channel (mono) audio, unless the + // `audio_channel_count` and `enable_separate_recognition_per_channel` fields + // are set. // // For best results, the audio source should be captured and transmitted using // a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech // recognition can be reduced if lossy codecs are used to capture or transmit // audio, particularly if background noise is present. Lossy codecs include - // `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, and `SPEEX_WITH_HEADER_BYTE`. + // `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, and `MP3`. // // The `FLAC` and `WAV` audio file formats include a header that describes the // included audio content. You can request recognition for `WAV` files that @@ -153,8 +169,7 @@ message RecognitionConfig { // an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the // encoding configuration must match the encoding described in the audio // header; otherwise the request returns an - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error - // code. + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error code. enum AudioEncoding { // Not specified. ENCODING_UNSPECIFIED = 0; @@ -202,8 +217,7 @@ message RecognitionConfig { // Encoding of audio data sent in all `RecognitionAudio` messages. // This field is optional for `FLAC` and `WAV` audio files and required - // for all other audio formats. For details, see - // [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding]. + // for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding]. AudioEncoding encoding = 1; // Sample rate in Hertz of the audio data sent in all @@ -211,12 +225,11 @@ message RecognitionConfig { // 16000 is optimal. For best results, set the sampling rate of the audio // source to 16000 Hz. If that's not possible, use the native sample rate of // the audio source (instead of re-sampling). - // This field is optional for `FLAC` and `WAV` audio files and required - // for all other audio formats. For details, see - // [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding]. + // This field is optional for FLAC and WAV audio files, but is + // required for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding]. int32 sample_rate_hertz = 2; - // *Optional* The number of channels in the input audio data. + // The number of channels in the input audio data. // ONLY set this for MULTI-CHANNEL recognition. // Valid values for LINEAR16 and FLAC are `1`-`8`. // Valid values for OGG_OPUS are '1'-'254'. @@ -235,14 +248,15 @@ message RecognitionConfig { // `audio_channel_count` multiplied by the length of the audio. bool enable_separate_recognition_per_channel = 12; - // *Required* The language of the supplied audio as a + // Required. The language of the supplied audio as a // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. // Example: "en-US". - // See [Language Support](/speech-to-text/docs/languages) - // for a list of the currently supported language codes. - string language_code = 3; + // See [Language + // Support](https://cloud.google.com/speech-to-text/docs/languages) for a list + // of the currently supported language codes. + string language_code = 3 [(google.api.field_behavior) = REQUIRED]; - // *Optional* Maximum number of recognition hypotheses to be returned. + // Maximum number of recognition hypotheses to be returned. // Specifically, the maximum number of `SpeechRecognitionAlternative` messages // within each `SpeechRecognitionResult`. // The server may return fewer than `max_alternatives`. @@ -250,24 +264,26 @@ message RecognitionConfig { // one. If omitted, will return a maximum of one. int32 max_alternatives = 4; - // *Optional* If set to `true`, the server will attempt to filter out + // If set to `true`, the server will attempt to filter out // profanities, replacing all but the initial character in each filtered word // with asterisks, e.g. "f***". If set to `false` or omitted, profanities // won't be filtered out. bool profanity_filter = 5; - // *Optional* array of [SpeechContext][google.cloud.speech.v1.SpeechContext]. + // Array of [SpeechContext][google.cloud.speech.v1.SpeechContext]. // A means to provide context to assist the speech recognition. For more - // information, see [Phrase Hints](/speech-to-text/docs/basics#phrase-hints). + // information, see + // [speech + // adaptation](https://cloud.google.com/speech-to-text/docs/context-strength). repeated SpeechContext speech_contexts = 6; - // *Optional* If `true`, the top result includes a list of words and + // If `true`, the top result includes a list of words and // the start and end time offsets (timestamps) for those words. If // `false`, no word-level time offset information is returned. The default is // `false`. bool enable_word_time_offsets = 8; - // *Optional* If 'true', adds punctuation to recognition result hypotheses. + // If 'true', adds punctuation to recognition result hypotheses. // This feature is only available in select languages. Setting this for // requests in other languages has no effect at all. // The default 'false' value does not add punctuation to result hypotheses. @@ -276,10 +292,20 @@ message RecognitionConfig { // premium feature. bool enable_automatic_punctuation = 11; - // *Optional* Metadata regarding this request. + // Config to enable speaker diarization and set additional + // parameters to make diarization better suited for your application. + // Note: When this is enabled, we send all the words from the beginning of the + // audio for the top alternative in every consecutive STREAMING responses. + // This is done in order to improve our speaker tags as our models learn to + // identify the speakers in the conversation over time. + // For non-streaming requests, the diarization results will be provided only + // in the top alternative of the FINAL SpeechRecognitionResult. + SpeakerDiarizationConfig diarization_config = 19; + + // Metadata regarding this request. RecognitionMetadata metadata = 9; - // *Optional* Which model to select for the given request. Select the model + // Which model to select for the given request. Select the model // best suited to your domain to get best results. If a model is not // explicitly specified, then we auto-select a model based on the parameters // in the RecognitionConfig. @@ -313,7 +339,7 @@ message RecognitionConfig { // string model = 13; - // *Optional* Set to true to use an enhanced model for speech recognition. + // Set to true to use an enhanced model for speech recognition. // If `use_enhanced` is set to true and the `model` field is not set, then // an appropriate enhanced model is chosen if an enhanced model exists for // the audio. @@ -324,6 +350,28 @@ message RecognitionConfig { bool use_enhanced = 14; } +// Config to enable speaker diarization. +message SpeakerDiarizationConfig { + // If 'true', enables speaker detection for each recognized word in + // the top alternative of the recognition result using a speaker_tag provided + // in the WordInfo. + bool enable_speaker_diarization = 1; + + // Minimum number of speakers in the conversation. This range gives you more + // flexibility by allowing the system to automatically determine the correct + // number of speakers. If not set, the default value is 2. + int32 min_speaker_count = 2; + + // Maximum number of speakers in the conversation. This range gives you more + // flexibility by allowing the system to automatically determine the correct + // number of speakers. If not set, the default value is 6. + int32 max_speaker_count = 3; + + // Unused. + int32 speaker_tag = 5 + [(google.api.field_behavior) = OUTPUT_ONLY, deprecated = true]; +} + // Description of audio data to be recognized. message RecognitionMetadata { // Use case categories that the audio recognition request can be described @@ -364,15 +412,6 @@ message RecognitionMetadata { DICTATION = 8; } - // The use case most closely describing the audio content to be recognized. - InteractionType interaction_type = 1; - - // The industry vertical to which this speech recognition request most - // closely applies. This is most indicative of the topics contained - // in the audio. Use the 6-digit NAICS code to identify the industry - // vertical - see https://www.naics.com/search/. - uint32 industry_naics_code_of_audio = 3; - // Enumerates the types of capture settings describing an audio file. enum MicrophoneDistance { // Audio type is not known. @@ -390,9 +429,6 @@ message RecognitionMetadata { FARFIELD = 3; } - // The audio type that most closely describes the audio being recognized. - MicrophoneDistance microphone_distance = 4; - // The original media the speech was recorded on. enum OriginalMediaType { // Unknown original media type. @@ -405,9 +441,6 @@ message RecognitionMetadata { VIDEO = 2; } - // The original media the speech was recorded on. - OriginalMediaType original_media_type = 5; - // The type of device the speech was recorded with. enum RecordingDeviceType { // The recording device is unknown. @@ -432,6 +465,21 @@ message RecognitionMetadata { OTHER_INDOOR_DEVICE = 6; } + // The use case most closely describing the audio content to be recognized. + InteractionType interaction_type = 1; + + // The industry vertical to which this speech recognition request most + // closely applies. This is most indicative of the topics contained + // in the audio. Use the 6-digit NAICS code to identify the industry + // vertical - see https://www.naics.com/search/. + uint32 industry_naics_code_of_audio = 3; + + // The audio type that most closely describes the audio being recognized. + MicrophoneDistance microphone_distance = 4; + + // The original media the speech was recorded on. + OriginalMediaType original_media_type = 5; + // The type of device the speech was recorded with. RecordingDeviceType recording_device_type = 6; @@ -454,25 +502,31 @@ message RecognitionMetadata { // Provides "hints" to the speech recognizer to favor specific words and phrases // in the results. message SpeechContext { - // *Optional* A list of strings containing words and phrases "hints" so that + // A list of strings containing words and phrases "hints" so that // the speech recognition is more likely to recognize them. This can be used // to improve the accuracy for specific words and phrases, for example, if // specific commands are typically spoken by the user. This can also be used // to add additional words to the vocabulary of the recognizer. See - // [usage limits](/speech-to-text/quotas#content). + // [usage limits](https://cloud.google.com/speech-to-text/quotas#content). + // + // List items can also be set to classes for groups of words that represent + // common concepts that occur in natural language. For example, rather than + // providing phrase hints for every month of the year, using the $MONTH class + // improves the likelihood of correctly transcribing audio that includes + // months. repeated string phrases = 1; } // Contains audio data in the encoding specified in the `RecognitionConfig`. // Either `content` or `uri` must be supplied. Supplying both or neither -// returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. -// See [content limits](/speech-to-text/quotas#content). +// returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See +// [content limits](https://cloud.google.com/speech-to-text/quotas#content). message RecognitionAudio { // The audio source, which is either inline content or a Google Cloud // Storage uri. oneof audio_source { // The audio data bytes encoded as specified in - // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a + // `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a // pure binary representation, whereas JSON representations use base64. bytes content = 1; @@ -481,9 +535,8 @@ message RecognitionAudio { // Currently, only Google Cloud Storage URIs are // supported, which must be specified in the following format: // `gs://bucket_name/object_name` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). - // For more information, see [Request - // URIs](https://cloud.google.com/storage/docs/reference-uris). + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + // [Request URIs](https://cloud.google.com/storage/docs/reference-uris). string uri = 2; } } @@ -492,7 +545,7 @@ message RecognitionAudio { // contains the result as zero or more sequential `SpeechRecognitionResult` // messages. message RecognizeResponse { - // Output only. Sequential list of transcription results corresponding to + // Sequential list of transcription results corresponding to // sequential portions of audio. repeated SpeechRecognitionResult results = 2; } @@ -503,7 +556,7 @@ message RecognizeResponse { // returned by the `GetOperation` call of the `google::longrunning::Operations` // service. message LongRunningRecognizeResponse { - // Output only. Sequential list of transcription results corresponding to + // Sequential list of transcription results corresponding to // sequential portions of audio. repeated SpeechRecognitionResult results = 2; } @@ -588,44 +641,44 @@ message StreamingRecognizeResponse { END_OF_SINGLE_UTTERANCE = 1; } - // Output only. If set, returns a [google.rpc.Status][google.rpc.Status] - // message that specifies the error for the operation. + // If set, returns a [google.rpc.Status][google.rpc.Status] message that + // specifies the error for the operation. google.rpc.Status error = 1; - // Output only. This repeated list contains zero or more results that + // This repeated list contains zero or more results that // correspond to consecutive portions of the audio currently being processed. // It contains zero or one `is_final=true` result (the newly settled portion), // followed by zero or more `is_final=false` results (the interim results). repeated StreamingRecognitionResult results = 2; - // Output only. Indicates the type of speech event. + // Indicates the type of speech event. SpeechEventType speech_event_type = 4; } // A streaming speech recognition result corresponding to a portion of the audio // that is currently being processed. message StreamingRecognitionResult { - // Output only. May contain one or more recognition hypotheses (up to the + // May contain one or more recognition hypotheses (up to the // maximum specified in `max_alternatives`). // These alternatives are ordered in terms of accuracy, with the top (first) // alternative being the most probable, as ranked by the recognizer. repeated SpeechRecognitionAlternative alternatives = 1; - // Output only. If `false`, this `StreamingRecognitionResult` represents an + // If `false`, this `StreamingRecognitionResult` represents an // interim result that may change. If `true`, this is the final time the // speech service will return this particular `StreamingRecognitionResult`, // the recognizer will not return any further hypotheses for this portion of // the transcript and corresponding audio. bool is_final = 2; - // Output only. An estimate of the likelihood that the recognizer will not + // An estimate of the likelihood that the recognizer will not // change its guess about this interim result. Values range from 0.0 // (completely unstable) to 1.0 (completely stable). // This field is only provided for interim results (`is_final=false`). // The default of 0.0 is a sentinel value indicating `stability` was not set. float stability = 3; - // Output only. Time offset of the end of this result relative to the + // Time offset of the end of this result relative to the // beginning of the audio. google.protobuf.Duration result_end_time = 4; @@ -634,16 +687,16 @@ message StreamingRecognitionResult { // For audio_channel_count = N, its output values can range from '1' to 'N'. int32 channel_tag = 5; - // Output only. The - // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the - // language in this result. This language code was detected to have the most - // likelihood of being spoken in the audio. - string language_code = 6; + // The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of + // the language in this result. This language code was detected to have the + // most likelihood of being spoken in the audio. + string language_code = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // A speech recognition result corresponding to a portion of the audio. message SpeechRecognitionResult { - // Output only. May contain one or more recognition hypotheses (up to the + // May contain one or more recognition hypotheses (up to the // maximum specified in `max_alternatives`). // These alternatives are ordered in terms of accuracy, with the top (first) // alternative being the most probable, as ranked by the recognizer. @@ -657,10 +710,10 @@ message SpeechRecognitionResult { // Alternative hypotheses (a.k.a. n-best list). message SpeechRecognitionAlternative { - // Output only. Transcript text representing the words that the user spoke. + // Transcript text representing the words that the user spoke. string transcript = 1; - // Output only. The confidence estimate between 0.0 and 1.0. A higher number + // The confidence estimate between 0.0 and 1.0. A higher number // indicates an estimated greater likelihood that the recognized words are // correct. This field is set only for the top alternative of a non-streaming // result or, of a streaming result where `is_final=true`. @@ -669,7 +722,7 @@ message SpeechRecognitionAlternative { // The default of 0.0 is a sentinel value indicating `confidence` was not set. float confidence = 2; - // Output only. A list of word-specific information for each recognized word. + // A list of word-specific information for each recognized word. // Note: When `enable_speaker_diarization` is true, you will see all the words // from the beginning of the audio. repeated WordInfo words = 3; @@ -677,7 +730,7 @@ message SpeechRecognitionAlternative { // Word-specific information for recognized words. message WordInfo { - // Output only. Time offset relative to the beginning of the audio, + // Time offset relative to the beginning of the audio, // and corresponding to the start of the spoken word. // This field is only set if `enable_word_time_offsets=true` and only // in the top hypothesis. @@ -685,7 +738,7 @@ message WordInfo { // vary. google.protobuf.Duration start_time = 1; - // Output only. Time offset relative to the beginning of the audio, + // Time offset relative to the beginning of the audio, // and corresponding to the end of the spoken word. // This field is only set if `enable_word_time_offsets=true` and only // in the top hypothesis. @@ -693,6 +746,14 @@ message WordInfo { // vary. google.protobuf.Duration end_time = 2; - // Output only. The word corresponding to this set of information. + // The word corresponding to this set of information. string word = 3; + + // A distinct integer value is assigned for every speaker within + // the audio. This field specifies which one of those speakers was detected to + // have spoken this word. Value ranges from '1' to diarization_speaker_count. + // speaker_tag is set if enable_speaker_diarization = 'true' and only in the + // top alternative. + int32 speaker_tag = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/cloud/speech/v1/samples/speech_transcribe_async.yaml b/google/cloud/speech/v1/samples/speech_transcribe_async.yaml index 97cd71095..f798bb46a 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_async.yaml +++ b/google/cloud/speech/v1/samples/speech_transcribe_async.yaml @@ -1,35 +1,36 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -- id: speech_transcribe_async +- region_tag: speech_transcribe_async title: Transcribe Audio File using Long Running Operation (Local File) (LRO) description: Transcribe a long audio file using asynchronous speech recognition rpc: LongRunningRecognize service: google.cloud.speech.v1.Speech - parameters: - defaults: - - audio.content = "resources/brooklyn_bridge.raw" - - config.language_code = "en-US" - - config.sample_rate_hertz = 16000 - - config.encoding = LINEAR16 - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: "Path to local audio file, e.g. /path/audio.wav" - - parameter: config.language_code - description: "The language of the supplied audio" - - parameter: config.sample_rate_hertz - description: Sample rate in Hertz of the audio data sent - - parameter: config.encoding - description: | - Encoding of audio data sent. This sample sets this explicitly. - This field is optional for FLAC and WAV audio formats. - on_success: + request: + - field: audio.content + value: "resources/brooklyn_bridge.raw" + input_parameter: local_file_path + comment: Path to local audio file, e.g. /path/audio.wav + value_is_file: true + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + - field: config.sample_rate_hertz + value: 16000 + comment: Sample rate in Hertz of the audio data sent + - field: config.encoding + value: LINEAR16 + comment: | + Encoding of audio data sent. This sample sets this explicitly. + This field is optional for FLAC and WAV audio formats. + response: - loop: variable: result collection: $resp.results body: - - comment: ["First alternative is the most probable result"] - - define: alternative=result.alternatives[0] + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript diff --git a/google/cloud/speech/v1/samples/speech_transcribe_async_gcs.yaml b/google/cloud/speech/v1/samples/speech_transcribe_async_gcs.yaml index f4bce2bc7..cb39d7b3c 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_async_gcs.yaml +++ b/google/cloud/speech/v1/samples/speech_transcribe_async_gcs.yaml @@ -1,35 +1,35 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -- id: speech_transcribe_async_gcs +- region_tag: speech_transcribe_async_gcs title: Transcript Audio File using Long Running Operation (Cloud Storage) (LRO) - description: | - Transcribe long audio file from Cloud Storage using asynchronous speech recognition + description: Transcribe long audio file from Cloud Storage using asynchronous speech recognition rpc: LongRunningRecognize service: google.cloud.speech.v1.Speech - parameters: - defaults: - - audio.uri = "gs://cloud-samples-data/speech/brooklyn_bridge.raw" - - config.sample_rate_hertz = 16000 - - config.language_code = "en-US" - - config.encoding = LINEAR16 - attributes: - - parameter: audio.uri - sample_argument_name: storage_uri - description: "URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE]" - - parameter: config.language_code - description: "The language of the supplied audio" - - parameter: config.sample_rate_hertz - description: Sample rate in Hertz of the audio data sent - - parameter: config.encoding - description: | - Encoding of audio data sent. This sample sets this explicitly. - This field is optional for FLAC and WAV audio formats. - on_success: + request: + - field: audio.uri + value: "gs://cloud-samples-data/speech/brooklyn_bridge.raw" + input_parameter: storage_uri + comment: URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE] + - field: config.sample_rate_hertz + value: 16000 + comment: Sample rate in Hertz of the audio data sent + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + - field: config.encoding + value: LINEAR16 + comment: | + Encoding of audio data sent. This sample sets this explicitly. + This field is optional for FLAC and WAV audio formats. + response: - loop: variable: result collection: $resp.results body: - - comment: ["First alternative is the most probable result"] - - define: alternative=result.alternatives[0] + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript diff --git a/google/cloud/speech/v1/samples/speech_transcribe_async_word_time_offsets_gcs.yaml b/google/cloud/speech/v1/samples/speech_transcribe_async_word_time_offsets_gcs.yaml index e40d83d8b..33695b069 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_async_word_time_offsets_gcs.yaml +++ b/google/cloud/speech/v1/samples/speech_transcribe_async_word_time_offsets_gcs.yaml @@ -1,38 +1,48 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -- id: speech_transcribe_async_word_time_offsets_gcs +- region_tag: speech_transcribe_async_word_time_offsets_gcs title: Getting word timestamps (Cloud Storage) (LRO) - description: | - Print start and end time of each word spoken in audio file from Cloud Storage + description: Print start and end time of each word spoken in audio file from Cloud Storage rpc: LongRunningRecognize service: google.cloud.speech.v1.Speech - parameters: - defaults: - - audio.uri = "gs://cloud-samples-data/speech/brooklyn_bridge.flac" - - config.enable_word_time_offsets = True - - config.language_code = "en-US" - attributes: - - parameter: audio.uri - sample_argument_name: storage_uri - description: "URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE]" - - parameter: config.enable_word_time_offsets - description: | - When enabled, the first result returned by the API will include a list - of words and the start and end time offsets (timestamps) for those words. - - parameter: config.language_code - description: "The language of the supplied audio" - on_success: - - comment: ["The first result includes start and end time word offsets"] - - define: result=$resp.results[0] - - comment: ["First alternative is the most probable result"] - - define: alternative=result.alternatives[0] + request: + - field: audio.uri + value: "gs://cloud-samples-data/speech/brooklyn_bridge.flac" + input_parameter: storage_uri + comment: URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE] + - field: config.enable_word_time_offsets + value: true + comment: | + When enabled, the first result returned by the API will include a list + of words and the start and end time offsets (timestamps) for those words. + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + response: + - comment: + - The first result includes start and end time word offsets + - define: result = $resp.results[0] + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript - - comment: ["Print the start and end time of each word"] + - comment: + - Print the start and end time of each word - loop: collection: alternative.words variable: word body: - - print: ["Word: %s", word.word] - - print: ["Start time: %s seconds %s nanos", word.start_time.seconds, word.start_time.nanos] - - print: ["End time: %s seconds %s nanos", word.end_time.seconds, word.end_time.nanos] + - print: + - "Word: %s" + - word.word + - print: + - "Start time: %s seconds %s nanos" + - word.start_time.seconds + - word.start_time.nanos + - print: + - "End time: %s seconds %s nanos" + - word.end_time.seconds + - word.end_time.nanos diff --git a/google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.yaml b/google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.yaml index adfb7ccaa..fa051b1c8 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.yaml +++ b/google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.yaml @@ -1,38 +1,38 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -- id: speech_transcribe_enhanced_model +- region_tag: speech_transcribe_enhanced_model title: Using Enhanced Models (Local File) description: Transcribe a short audio file using an enhanced model rpc: Recognize service: google.cloud.speech.v1.Speech - parameters: - defaults: - - audio.content = "resources/hello.wav" - - config.model = "phone_call" - - config.use_enhanced = True - - config.language_code = "en-US" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: "Path to local audio file, e.g. /path/audio.wav" - - parameter: config.model - description: | - The enhanced model to use, e.g. phone_call - Currently phone_call is the only model available as an enhanced model. - - parameter: config.use_enhanced - description: | - Use an enhanced model for speech recognition (when set to true). - Project must be eligible for requesting enhanced models. - Enhanced speech models require that you opt-in to data logging. - - parameter: config.language_code - description: "The language of the supplied audio" - on_success: + request: + - field: audio.content + value: "resources/hello.wav" + input_parameter: local_file_path + comment: Path to local audio file, e.g. /path/audio.wav + value_is_file: true + - field: config.model + value: "phone_call" + comment: | + The enhanced model to use, e.g. phone_call + - field: config.use_enhanced + value: true + comment: | + Use an enhanced model for speech recognition (when set to true). + Project must be eligible for requesting enhanced models. + Enhanced speech models require that you opt-in to data logging. + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + response: - loop: variable: result collection: $resp.results body: - - comment: ["First alternative is the most probable result"] - - define: alternative=result.alternatives[0] + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript diff --git a/google/cloud/speech/v1/samples/speech_transcribe_model_selection.yaml b/google/cloud/speech/v1/samples/speech_transcribe_model_selection.yaml index 1ff649a6d..b206f8bfb 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_model_selection.yaml +++ b/google/cloud/speech/v1/samples/speech_transcribe_model_selection.yaml @@ -1,34 +1,35 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -- id: speech_transcribe_model_selection +- region_tag: speech_transcribe_model_selection title: Selecting a Transcription Model (Local File) description: Transcribe a short audio file using a specified transcription model rpc: Recognize service: google.cloud.speech.v1.Speech - parameters: - defaults: - - audio.content = "resources/hello.wav" - - config.model = "phone_call" - - config.language_code = "en-US" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: "Path to local audio file, e.g. /path/audio.wav" - - parameter: config.model - sample_argument_name: model - description: | - The transcription model to use, e.g. video, phone_call, default - For a list of available transcription models, see: - https://cloud.google.com/speech-to-text/docs/transcription-model#transcription_models - - parameter: config.language_code - description: "The language of the supplied audio" - on_success: + request: + - field: audio.content + value: "resources/hello.wav" + input_parameter: local_file_path + comment: Path to local audio file, e.g. /path/audio.wav + value_is_file: true + - field: config.model + value: "phone_call" + input_parameter: model + comment: | + The transcription model to use, e.g. video, phone_call, default + For a list of available transcription models, see: + https://cloud.google.com/speech-to-text/docs/transcription-model#transcription_models + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + response: - loop: variable: result collection: $resp.results body: - - comment: ["First alternative is the most probable result"] - - define: alternative=result.alternatives[0] + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript diff --git a/google/cloud/speech/v1/samples/speech_transcribe_model_selection_gcs.yaml b/google/cloud/speech/v1/samples/speech_transcribe_model_selection_gcs.yaml index a16c37444..a6e3bde67 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_model_selection_gcs.yaml +++ b/google/cloud/speech/v1/samples/speech_transcribe_model_selection_gcs.yaml @@ -1,34 +1,35 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -- id: speech_transcribe_model_selection_gcs +- region_tag: speech_transcribe_model_selection_gcs title: Selecting a Transcription Model (Cloud Storage) description: | Transcribe a short audio file from Cloud Storage using a specified transcription model rpc: Recognize service: google.cloud.speech.v1.Speech - parameters: - defaults: - - audio.uri = "gs://cloud-samples-data/speech/hello.wav" - - config.model = "phone_call" - - config.language_code = "en-US" - attributes: - - parameter: audio.uri - sample_argument_name: storage_uri - description: "URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE]" - - parameter: config.model - sample_argument_name: model - description: | - The transcription model to use, e.g. video, phone_call, default - For a list of available transcription models, see: - https://cloud.google.com/speech-to-text/docs/transcription-model#transcription_models - - parameter: config.language_code - description: "The language of the supplied audio" - on_success: + request: + - field: audio.uri + value: "gs://cloud-samples-data/speech/hello.wav" + input_parameter: storage_uri + comment: URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE] + - field: config.model + value: "phone_call" + input_parameter: model + comment: | + The transcription model to use, e.g. video, phone_call, default + For a list of available transcription models, see: + https://cloud.google.com/speech-to-text/docs/transcription-model#transcription_models + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + response: - loop: variable: result collection: $resp.results body: - - comment: ["First alternative is the most probable result"] - - define: alternative=result.alternatives[0] + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript diff --git a/google/cloud/speech/v1/samples/speech_transcribe_multichannel.yaml b/google/cloud/speech/v1/samples/speech_transcribe_multichannel.yaml index 68d56a786..6de5ce075 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_multichannel.yaml +++ b/google/cloud/speech/v1/samples/speech_transcribe_multichannel.yaml @@ -1,30 +1,30 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -- id: speech_transcribe_multichannel +- region_tag: speech_transcribe_multichannel title: Multi-Channel Audio Transcription (Local File) description: Transcribe a short audio file with multiple channels rpc: Recognize service: google.cloud.speech.v1.Speech - parameters: - defaults: - - audio.content = "resources/multi.wav" - - config.audio_channel_count = 2 - - config.enable_separate_recognition_per_channel = True - - config.language_code = "en-US" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: "Path to local audio file, e.g. /path/audio.wav" - - parameter: config.audio_channel_count - description: The number of channels in the input audio file (optional) - - parameter: config.enable_separate_recognition_per_channel - description: | - When set to true, each audio channel will be recognized separately. - The recognition result will contain a channel_tag field to state which - channel that result belongs to - - parameter: config.language_code - description: "The language of the supplied audio" - on_success: + request: + - field: audio.content + value: "resources/multi.wav" + input_parameter: local_file_path + comment: Path to local audio file, e.g. /path/audio.wav + value_is_file: true + - field: config.audio_channel_count + value: 2 + comment: The number of channels in the input audio file (optional) + - field: config.enable_separate_recognition_per_channel + value: true + comment: | + When set to true, each audio channel will be recognized separately. + The recognition result will contain a channel_tag field to state which + channel that result belongs to + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + response: - loop: variable: result collection: $resp.results @@ -32,9 +32,12 @@ samples: - comment: - "%s to recognize which audio channel this result is for" - channel_tag - - print: ["Channel tag: %s", result.channel_tag] - - comment: ["First alternative is the most probable result"] - - define: alternative=result.alternatives[0] + - print: + - "Channel tag: %s" + - result.channel_tag + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript diff --git a/google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.yaml b/google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.yaml index f09b7cdd0..dc0d7c58b 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.yaml +++ b/google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.yaml @@ -1,30 +1,29 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -- id: speech_transcribe_multichannel_gcs +- region_tag: speech_transcribe_multichannel_gcs title: Multi-Channel Audio Transcription (Cloud Storage) - description: | - Transcribe a short audio file from Cloud Storage with multiple channels + description: Transcribe a short audio file from Cloud Storage with multiple channels rpc: Recognize service: google.cloud.speech.v1.Speech - parameters: - defaults: - - audio.uri = "gs://cloud-samples-data/speech/multi.wav" - - config.audio_channel_count = 2 - - config.enable_separate_recognition_per_channel = True - - config.language_code = "en-US" - attributes: - - parameter: audio.uri - sample_argument_name: storage_uri - description: "URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE]" - - parameter: config.audio_channel_count - description: The number of channels in the input audio file (optional) - - parameter: config.enable_separate_recognition_per_channel - description: | - When set to true, each audio channel will be recognized separately. - The recognition result will contain a channel_tag field to state which - channel that result belongs to - - parameter: config.language_code - description: "The language of the supplied audio" - on_success: + request: + - field: audio.uri + value: "gs://cloud-samples-data/speech/multi.wav" + input_parameter: storage_uri + comment: URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE] + - field: config.audio_channel_count + value: 2 + comment: The number of channels in the input audio file (optional) + - field: config.enable_separate_recognition_per_channel + value: true + comment: | + When set to true, each audio channel will be recognized separately. + The recognition result will contain a channel_tag field to state which + channel that result belongs to + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + response: - loop: variable: result collection: $resp.results @@ -32,9 +31,12 @@ samples: - comment: - "%s to recognize which audio channel this result is for" - channel_tag - - print: ["Channel tag: %s", result.channel_tag] - - comment: ["First alternative is the most probable result"] - - define: alternative=result.alternatives[0] + - print: + - "Channel tag: %s" + - result.channel_tag + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript diff --git a/google/cloud/speech/v1/samples/speech_transcribe_sync.yaml b/google/cloud/speech/v1/samples/speech_transcribe_sync.yaml index 0529a2874..9b53ba4f4 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_sync.yaml +++ b/google/cloud/speech/v1/samples/speech_transcribe_sync.yaml @@ -1,35 +1,36 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -- id: speech_transcribe_sync +- region_tag: speech_transcribe_sync title: Transcribe Audio File (Local File) description: Transcribe a short audio file using synchronous speech recognition rpc: Recognize service: google.cloud.speech.v1.Speech - parameters: - defaults: - - audio.content = "resources/brooklyn_bridge.raw" - - config.language_code = "en-US" - - config.sample_rate_hertz = 16000 - - config.encoding = LINEAR16 - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: "Path to local audio file, e.g. /path/audio.wav" - - parameter: config.language_code - description: "The language of the supplied audio" - - parameter: config.sample_rate_hertz - description: Sample rate in Hertz of the audio data sent - - parameter: config.encoding - description: | - Encoding of audio data sent. This sample sets this explicitly. - This field is optional for FLAC and WAV audio formats. - on_success: + request: + - field: audio.content + value: "resources/brooklyn_bridge.raw" + input_parameter: local_file_path + comment: Path to local audio file, e.g. /path/audio.wav + value_is_file: true + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + - field: config.sample_rate_hertz + value: 16000 + comment: Sample rate in Hertz of the audio data sent + - field: config.encoding + value: LINEAR16 + comment: | + Encoding of audio data sent. This sample sets this explicitly. + This field is optional for FLAC and WAV audio formats. + response: - loop: variable: result collection: $resp.results body: - - comment: ["First alternative is the most probable result"] - - define: alternative=result.alternatives[0] + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript diff --git a/google/cloud/speech/v1/samples/speech_transcribe_sync_gcs.yaml b/google/cloud/speech/v1/samples/speech_transcribe_sync_gcs.yaml index 6ebb1d2a5..fc571b154 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_sync_gcs.yaml +++ b/google/cloud/speech/v1/samples/speech_transcribe_sync_gcs.yaml @@ -1,35 +1,35 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -- id: speech_transcribe_sync_gcs +- region_tag: speech_transcribe_sync_gcs title: Transcript Audio File (Cloud Storage) - description: | - Transcribe short audio file from Cloud Storage using synchronous speech recognition + description: Transcribe short audio file from Cloud Storage using synchronous speech recognition rpc: Recognize service: google.cloud.speech.v1.Speech - parameters: - defaults: - - audio.uri = "gs://cloud-samples-data/speech/brooklyn_bridge.raw" - - config.sample_rate_hertz = 16000 - - config.language_code = "en-US" - - config.encoding = LINEAR16 - attributes: - - parameter: audio.uri - sample_argument_name: storage_uri - description: "URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE]" - - parameter: config.language_code - description: "The language of the supplied audio" - - parameter: config.sample_rate_hertz - description: Sample rate in Hertz of the audio data sent - - parameter: config.encoding - description: | - Encoding of audio data sent. This sample sets this explicitly. - This field is optional for FLAC and WAV audio formats. - on_success: + request: + - field: audio.uri + value: "gs://cloud-samples-data/speech/brooklyn_bridge.raw" + input_parameter: storage_uri + comment: URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE] + - field: config.sample_rate_hertz + value: 16000 + comment: Sample rate in Hertz of the audio data sent + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + - field: config.encoding + value: LINEAR16 + comment: | + Encoding of audio data sent. This sample sets this explicitly. + This field is optional for FLAC and WAV audio formats. + response: - loop: variable: result collection: $resp.results body: - - comment: ["First alternative is the most probable result"] - - define: alternative=result.alternatives[0] + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript diff --git a/google/cloud/speech/v1/samples/speech_transcribe_async.test.yaml b/google/cloud/speech/v1/samples/test/speech_transcribe_async.test.yaml similarity index 95% rename from google/cloud/speech/v1/samples/speech_transcribe_async.test.yaml rename to google/cloud/speech/v1/samples/test/speech_transcribe_async.test.yaml index 387e4b7e2..f26cfbabc 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_async.test.yaml +++ b/google/cloud/speech/v1/samples/test/speech_transcribe_async.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Transcribe Audio File using Long Running Operation (Local File) (LRO) diff --git a/google/cloud/speech/v1/samples/speech_transcribe_async_gcs.test.yaml b/google/cloud/speech/v1/samples/test/speech_transcribe_async_gcs.test.yaml similarity index 96% rename from google/cloud/speech/v1/samples/speech_transcribe_async_gcs.test.yaml rename to google/cloud/speech/v1/samples/test/speech_transcribe_async_gcs.test.yaml index 146fb5c51..d3d83133e 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_async_gcs.test.yaml +++ b/google/cloud/speech/v1/samples/test/speech_transcribe_async_gcs.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Transcript Audio File using Long Running Operation (Cloud Storage) (LRO) diff --git a/google/cloud/speech/v1/samples/speech_transcribe_async_word_time_offsets_gcs.test.yaml b/google/cloud/speech/v1/samples/test/speech_transcribe_async_word_time_offsets_gcs.test.yaml similarity index 97% rename from google/cloud/speech/v1/samples/speech_transcribe_async_word_time_offsets_gcs.test.yaml rename to google/cloud/speech/v1/samples/test/speech_transcribe_async_word_time_offsets_gcs.test.yaml index 5528d025c..11784726d 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_async_word_time_offsets_gcs.test.yaml +++ b/google/cloud/speech/v1/samples/test/speech_transcribe_async_word_time_offsets_gcs.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Getting word timestamps (Cloud Storage) (LRO) diff --git a/google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.test.yaml b/google/cloud/speech/v1/samples/test/speech_transcribe_enhanced_model.test.yaml similarity index 96% rename from google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.test.yaml rename to google/cloud/speech/v1/samples/test/speech_transcribe_enhanced_model.test.yaml index 36ee3f348..6eab33b52 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.test.yaml +++ b/google/cloud/speech/v1/samples/test/speech_transcribe_enhanced_model.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Using Enhanced Models (Local File) diff --git a/google/cloud/speech/v1/samples/speech_transcribe_model_selection.test.yaml b/google/cloud/speech/v1/samples/test/speech_transcribe_model_selection.test.yaml similarity index 97% rename from google/cloud/speech/v1/samples/speech_transcribe_model_selection.test.yaml rename to google/cloud/speech/v1/samples/test/speech_transcribe_model_selection.test.yaml index d5f3ff577..b5ec2d902 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_model_selection.test.yaml +++ b/google/cloud/speech/v1/samples/test/speech_transcribe_model_selection.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Selecting a Transcription Model (Local File) diff --git a/google/cloud/speech/v1/samples/speech_transcribe_model_selection_gcs.test.yaml b/google/cloud/speech/v1/samples/test/speech_transcribe_model_selection_gcs.test.yaml similarity index 97% rename from google/cloud/speech/v1/samples/speech_transcribe_model_selection_gcs.test.yaml rename to google/cloud/speech/v1/samples/test/speech_transcribe_model_selection_gcs.test.yaml index 323079da3..60c45c975 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_model_selection_gcs.test.yaml +++ b/google/cloud/speech/v1/samples/test/speech_transcribe_model_selection_gcs.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Selecting a Transcription Model (Cloud Storage) diff --git a/google/cloud/speech/v1/samples/speech_transcribe_multichannel.test.yaml b/google/cloud/speech/v1/samples/test/speech_transcribe_multichannel.test.yaml similarity index 96% rename from google/cloud/speech/v1/samples/speech_transcribe_multichannel.test.yaml rename to google/cloud/speech/v1/samples/test/speech_transcribe_multichannel.test.yaml index 18e77c69b..9d5379dc9 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_multichannel.test.yaml +++ b/google/cloud/speech/v1/samples/test/speech_transcribe_multichannel.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Multi-Channel Audio Transcription (Local File) diff --git a/google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.test.yaml b/google/cloud/speech/v1/samples/test/speech_transcribe_multichannel_gcs.test.yaml similarity index 96% rename from google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.test.yaml rename to google/cloud/speech/v1/samples/test/speech_transcribe_multichannel_gcs.test.yaml index 6186121b8..64c9340ce 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.test.yaml +++ b/google/cloud/speech/v1/samples/test/speech_transcribe_multichannel_gcs.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Multi-Channel Audio Transcription (Cloud Storage) diff --git a/google/cloud/speech/v1/samples/speech_transcribe_sync.test.yaml b/google/cloud/speech/v1/samples/test/speech_transcribe_sync.test.yaml similarity index 95% rename from google/cloud/speech/v1/samples/speech_transcribe_sync.test.yaml rename to google/cloud/speech/v1/samples/test/speech_transcribe_sync.test.yaml index aeb321194..47cc8c1a4 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_sync.test.yaml +++ b/google/cloud/speech/v1/samples/test/speech_transcribe_sync.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Transcribe Audio File (Local File) diff --git a/google/cloud/speech/v1/samples/speech_transcribe_sync_gcs.test.yaml b/google/cloud/speech/v1/samples/test/speech_transcribe_sync_gcs.test.yaml similarity index 95% rename from google/cloud/speech/v1/samples/speech_transcribe_sync_gcs.test.yaml rename to google/cloud/speech/v1/samples/test/speech_transcribe_sync_gcs.test.yaml index 2e50f3602..3defdf289 100644 --- a/google/cloud/speech/v1/samples/speech_transcribe_sync_gcs.test.yaml +++ b/google/cloud/speech/v1/samples/test/speech_transcribe_sync_gcs.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Transcript Audio File (Cloud Storage) diff --git a/google/cloud/speech/v1/speech_gapic.legacy.yaml b/google/cloud/speech/v1/speech_gapic.legacy.yaml new file mode 100644 index 000000000..1e2d456c0 --- /dev/null +++ b/google/cloud/speech/v1/speech_gapic.legacy.yaml @@ -0,0 +1,92 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.speech.v1 + python: + package_name: google.cloud.speech_v1.gapic + go: + package_name: cloud.google.com/go/speech/apiv1 + release_level: GA + csharp: + package_name: Google.Cloud.Speech.V1 + release_level: GA + ruby: + package_name: Google::Cloud::Speech::V1 + php: + package_name: Google\Cloud\Speech\V1 + nodejs: + package_name: speech.v1 + domain_layer_location: google-cloud +interfaces: +- name: google.cloud.speech.v1.Speech + smoke_test: + method: Recognize + init_fields: + - config.language_code="en-US" + - config.sample_rate_hertz=44100 + - config.encoding=FLAC + - audio.uri="gs://gapic-toolkit/hello.flac" + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 1000000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 1000000 + total_timeout_millis: 5000000 + methods: + - name: Recognize + flattening: + groups: + - parameters: + - config + - audio + required_fields: + - config + - audio + sample_code_init_fields: + - config.encoding=FLAC + - config.sample_rate_hertz=44100 + - config.language_code="en-US" + - audio.uri=gs://bucket_name/file_name.flac + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 1000000 + - name: LongRunningRecognize + flattening: + groups: + - parameters: + - config + - audio + required_fields: + - config + - audio + sample_code_init_fields: + - config.encoding=FLAC + - config.sample_rate_hertz=44100 + - config.language_code="en-US" + - audio.uri=gs://bucket_name/file_name.flac + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + long_running: + return_type: google.cloud.speech.v1.LongRunningRecognizeResponse + metadata_type: google.cloud.speech.v1.LongRunningRecognizeMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + - name: StreamingRecognize + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 1000000 diff --git a/google/cloud/speech/v1/speech_gapic.yaml b/google/cloud/speech/v1/speech_gapic.yaml index 1edeb9984..24fdf272e 100644 --- a/google/cloud/speech/v1/speech_gapic.yaml +++ b/google/cloud/speech/v1/speech_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.speech.v1 @@ -26,15 +26,7 @@ interfaces: - config.language_code="en-US" - config.sample_rate_hertz=44100 - config.encoding=FLAC - - audio.uri="gs://gapic-toolkit/hello.flac" - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] + - audio.uri="gs://cloud-samples-data/speech/brooklyn_bridge.flac" retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -46,454 +38,17 @@ interfaces: total_timeout_millis: 5000000 methods: - name: Recognize - flattening: - groups: - - parameters: - - config - - audio - required_fields: - - config - - audio + retry_codes_name: idempotent sample_code_init_fields: - config.encoding=FLAC - config.sample_rate_hertz=44100 - config.language_code="en-US" - audio.uri=gs://bucket_name/file_name.flac - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 1000000 - samples: - standalone: - - region_tag: speech_transcribe_sync_gcs - value_sets: - - speech_transcribe_sync_gcs - - region_tag: speech_transcribe_sync - value_sets: - - speech_transcribe_sync - - region_tag: speech_transcribe_multichannel - value_sets: - - speech_transcribe_multichannel - - region_tag: speech_transcribe_model_selection_gcs - value_sets: - - speech_transcribe_model_selection_gcs - - region_tag: speech_transcribe_async_word_time_offsets_gcs - value_sets: - - speech_transcribe_async_word_time_offsets_gcs - - region_tag: speech_transcribe_model_selection - value_sets: - - speech_transcribe_model_selection - - region_tag: speech_transcribe_multichannel_gcs - value_sets: - - speech_transcribe_multichannel_gcs - - region_tag: speech_transcribe_enhanced_model - value_sets: - - speech_transcribe_enhanced_model - sample_value_sets: - - id: speech_transcribe_model_selection_gcs - title: Selecting a Transcription Model (Cloud Storage) - description: 'Transcribe a short audio file from Cloud Storage using a specified - transcription model - -' - parameters: - defaults: - - audio.uri = "gs://cloud-samples-data/speech/hello.wav" - - config.model = "phone_call" - - config.language_code = "en-US" - attributes: - - parameter: audio.uri - sample_argument_name: storage_uri - description: URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE] - - parameter: config.model - sample_argument_name: model - description: | - The transcription model to use, e.g. video, phone_call, default - For a list of available transcription models, see: - https://cloud.google.com/speech-to-text/docs/transcription-model#transcription_models - - parameter: config.language_code - description: The language of the supplied audio - on_success: - - loop: - variable: result - collection: "$resp.results" - body: - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - id: speech_transcribe_sync_gcs - title: Transcript Audio File (Cloud Storage) - description: 'Transcribe short audio file from Cloud Storage using synchronous - speech recognition - -' - parameters: - defaults: - - audio.uri = "gs://cloud-samples-data/speech/brooklyn_bridge.raw" - - config.sample_rate_hertz = 16000 - - config.language_code = "en-US" - - config.encoding = LINEAR16 - attributes: - - parameter: audio.uri - sample_argument_name: storage_uri - description: URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE] - - parameter: config.language_code - description: The language of the supplied audio - - parameter: config.sample_rate_hertz - description: Sample rate in Hertz of the audio data sent - - parameter: config.encoding - description: | - Encoding of audio data sent. This sample sets this explicitly. - This field is optional for FLAC and WAV audio formats. - on_success: - - loop: - variable: result - collection: "$resp.results" - body: - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - id: speech_transcribe_sync - title: Transcribe Audio File (Local File) - description: Transcribe a short audio file using synchronous speech recognition - parameters: - defaults: - - audio.content = "resources/brooklyn_bridge.raw" - - config.language_code = "en-US" - - config.sample_rate_hertz = 16000 - - config.encoding = LINEAR16 - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: Path to local audio file, e.g. /path/audio.wav - - parameter: config.language_code - description: The language of the supplied audio - - parameter: config.sample_rate_hertz - description: Sample rate in Hertz of the audio data sent - - parameter: config.encoding - description: | - Encoding of audio data sent. This sample sets this explicitly. - This field is optional for FLAC and WAV audio formats. - on_success: - - loop: - variable: result - collection: "$resp.results" - body: - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - id: speech_transcribe_model_selection - title: Selecting a Transcription Model (Local File) - description: Transcribe a short audio file using a specified transcription model - parameters: - defaults: - - audio.content = "resources/hello.wav" - - config.model = "phone_call" - - config.language_code = "en-US" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: Path to local audio file, e.g. /path/audio.wav - - parameter: config.model - sample_argument_name: model - description: | - The transcription model to use, e.g. video, phone_call, default - For a list of available transcription models, see: - https://cloud.google.com/speech-to-text/docs/transcription-model#transcription_models - - parameter: config.language_code - description: The language of the supplied audio - on_success: - - loop: - variable: result - collection: "$resp.results" - body: - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - id: speech_transcribe_multichannel_gcs - title: Multi-Channel Audio Transcription (Cloud Storage) - description: 'Transcribe a short audio file from Cloud Storage with multiple - channels - -' - parameters: - defaults: - - audio.uri = "gs://cloud-samples-data/speech/multi.wav" - - config.audio_channel_count = 2 - - config.enable_separate_recognition_per_channel = True - - config.language_code = "en-US" - attributes: - - parameter: audio.uri - sample_argument_name: storage_uri - description: URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE] - - parameter: config.audio_channel_count - description: The number of channels in the input audio file (optional) - - parameter: config.enable_separate_recognition_per_channel - description: | - When set to true, each audio channel will be recognized separately. - The recognition result will contain a channel_tag field to state which - channel that result belongs to - - parameter: config.language_code - description: The language of the supplied audio - on_success: - - loop: - variable: result - collection: "$resp.results" - body: - - comment: - - "%s to recognize which audio channel this result is for" - - channel_tag - - print: - - 'Channel tag: %s' - - result.channel_tag - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - id: speech_transcribe_multichannel - title: Multi-Channel Audio Transcription (Local File) - description: Transcribe a short audio file with multiple channels - parameters: - defaults: - - audio.content = "resources/multi.wav" - - config.audio_channel_count = 2 - - config.enable_separate_recognition_per_channel = True - - config.language_code = "en-US" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: Path to local audio file, e.g. /path/audio.wav - - parameter: config.audio_channel_count - description: The number of channels in the input audio file (optional) - - parameter: config.enable_separate_recognition_per_channel - description: | - When set to true, each audio channel will be recognized separately. - The recognition result will contain a channel_tag field to state which - channel that result belongs to - - parameter: config.language_code - description: The language of the supplied audio - on_success: - - loop: - variable: result - collection: "$resp.results" - body: - - comment: - - "%s to recognize which audio channel this result is for" - - channel_tag - - print: - - 'Channel tag: %s' - - result.channel_tag - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - id: speech_transcribe_enhanced_model - title: Using Enhanced Models (Local File) - description: Transcribe a short audio file using an enhanced model - parameters: - defaults: - - audio.content = "resources/hello.wav" - - config.model = "phone_call" - - config.use_enhanced = True - - config.language_code = "en-US" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: Path to local audio file, e.g. /path/audio.wav - - parameter: config.model - description: | - The enhanced model to use, e.g. phone_call - Currently phone_call is the only model available as an enhanced model. - - parameter: config.use_enhanced - description: | - Use an enhanced model for speech recognition (when set to true). - Project must be eligible for requesting enhanced models. - Enhanced speech models require that you opt-in to data logging. - - parameter: config.language_code - description: The language of the supplied audio - on_success: - - loop: - variable: result - collection: "$resp.results" - body: - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - name: LongRunningRecognize - flattening: - groups: - - parameters: - - config - - audio - required_fields: - - config - - audio sample_code_init_fields: - config.encoding=FLAC - config.sample_rate_hertz=44100 - config.language_code="en-US" - audio.uri=gs://bucket_name/file_name.flac - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - long_running: - return_type: google.cloud.speech.v1.LongRunningRecognizeResponse - metadata_type: google.cloud.speech.v1.LongRunningRecognizeMetadata - initial_poll_delay_millis: 20000 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 45000 - total_poll_timeout_millis: 86400000 - samples: - standalone: - - region_tag: speech_transcribe_async_gcs - value_sets: - - speech_transcribe_async_gcs - - region_tag: speech_transcribe_async - value_sets: - - speech_transcribe_async - - region_tag: speech_transcribe_async_word_time_offsets_gcs - value_sets: - - speech_transcribe_async_word_time_offsets_gcs - sample_value_sets: - - id: speech_transcribe_async_gcs - title: Transcript Audio File using Long Running Operation (Cloud Storage) (LRO) - description: 'Transcribe long audio file from Cloud Storage using asynchronous - speech recognition - -' - parameters: - defaults: - - audio.uri = "gs://cloud-samples-data/speech/brooklyn_bridge.raw" - - config.sample_rate_hertz = 16000 - - config.language_code = "en-US" - - config.encoding = LINEAR16 - attributes: - - parameter: audio.uri - sample_argument_name: storage_uri - description: URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE] - - parameter: config.language_code - description: The language of the supplied audio - - parameter: config.sample_rate_hertz - description: Sample rate in Hertz of the audio data sent - - parameter: config.encoding - description: | - Encoding of audio data sent. This sample sets this explicitly. - This field is optional for FLAC and WAV audio formats. - on_success: - - loop: - variable: result - collection: "$resp.results" - body: - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - id: speech_transcribe_async - title: Transcribe Audio File using Long Running Operation (Local File) (LRO) - description: Transcribe a long audio file using asynchronous speech recognition - parameters: - defaults: - - audio.content = "resources/brooklyn_bridge.raw" - - config.language_code = "en-US" - - config.sample_rate_hertz = 16000 - - config.encoding = LINEAR16 - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: Path to local audio file, e.g. /path/audio.wav - - parameter: config.language_code - description: The language of the supplied audio - - parameter: config.sample_rate_hertz - description: Sample rate in Hertz of the audio data sent - - parameter: config.encoding - description: | - Encoding of audio data sent. This sample sets this explicitly. - This field is optional for FLAC and WAV audio formats. - on_success: - - loop: - variable: result - collection: "$resp.results" - body: - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - id: speech_transcribe_async_word_time_offsets_gcs - title: Getting word timestamps (Cloud Storage) (LRO) - description: 'Print start and end time of each word spoken in audio file from - Cloud Storage - -' - parameters: - defaults: - - audio.uri = "gs://cloud-samples-data/speech/brooklyn_bridge.flac" - - config.enable_word_time_offsets = True - - config.language_code = "en-US" - attributes: - - parameter: audio.uri - sample_argument_name: storage_uri - description: URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE] - - parameter: config.enable_word_time_offsets - description: | - When enabled, the first result returned by the API will include a list - of words and the start and end time offsets (timestamps) for those words. - - parameter: config.language_code - description: The language of the supplied audio - on_success: - - comment: - - The first result includes start and end time word offsets - - define: result=$resp.results[0] - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - comment: - - Print the start and end time of each word - - loop: - collection: alternative.words - variable: word - body: - - print: - - 'Word: %s' - - word.word - - print: - - 'Start time: %s seconds %s nanos' - - word.start_time.seconds - - word.start_time.nanos - - print: - - 'End time: %s seconds %s nanos' - - word.end_time.seconds - - word.end_time.nanos - name: StreamingRecognize retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 1000000 diff --git a/google/cloud/speech/v1/speech_grpc_service_config.json b/google/cloud/speech/v1/speech_grpc_service_config.json new file mode 100755 index 000000000..007414d80 --- /dev/null +++ b/google/cloud/speech/v1/speech_grpc_service_config.json @@ -0,0 +1,35 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.speech.v1.Speech", + "method": "Recognize" + }, + { + "service": "google.cloud.speech.v1.Speech", + "method": "StreamingRecognize" + } + ], + "timeout": "5000s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.speech.v1.Speech", + "method": "LongRunningRecognize" + } + ], + "timeout": "5000s" + } + ] +} diff --git a/google/cloud/speech/speech_v1.yaml b/google/cloud/speech/v1/speech_v1.yaml similarity index 53% rename from google/cloud/speech/speech_v1.yaml rename to google/cloud/speech/v1/speech_v1.yaml index 4cb4b7b2c..db88fe7b6 100644 --- a/google/cloud/speech/speech_v1.yaml +++ b/google/cloud/speech/v1/speech_v1.yaml @@ -1,7 +1,7 @@ type: google.api.Service config_version: 3 name: speech.googleapis.com -title: Cloud Speech API +title: Cloud Speech-to-Text API apis: - name: google.cloud.speech.v1.Speech @@ -19,47 +19,29 @@ documentation: backend: rules: - - selector: google.longrunning.Operations.ListOperations - deadline: 200.0 - - selector: google.longrunning.Operations.GetOperation - deadline: 200.0 - - selector: google.longrunning.Operations.WaitOperation - deadline: 200.0 - - selector: google.cloud.speech.v1.Speech.Recognize - deadline: 200.0 - - selector: google.cloud.speech.v1.Speech.LongRunningRecognize - deadline: 200.0 - - selector: google.cloud.speech.v1.Speech.StreamingRecognize - deadline: 200.0 + - selector: 'google.cloud.speech.v1.Speech.*' + deadline: 355.0 + - selector: 'google.longrunning.Operations.*' + deadline: 355.0 http: rules: - - selector: google.longrunning.Operations.ListOperations - get: /v1/operations - additional_bindings: - - get: /v1beta1/operations - - - get: /v1p1beta1/operations - - - get: '/v1p1beta1/{name=projects/*/locations/*}/operations' - - - get: '/v1/{name=projects/*/locations/*}/operations' - - selector: google.longrunning.Operations.GetOperation get: '/v1/operations/{name=**}' additional_bindings: - - get: '/v1beta1/operations/{name=**}' - - - get: '/v1p1beta1/operations/{name=**}' - - get: '/v1/{name=projects/*/locations/*/operations/*}' - - - get: '/v1p1beta1/{name=projects/*/locations/*/operations/*}' - + - selector: google.longrunning.Operations.ListOperations + get: /v1/operations + additional_bindings: + - get: '/v1/{name=projects/*/locations/*}/operations' authentication: rules: - - selector: '*' + - selector: 'google.cloud.speech.v1.Speech.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/speech/v1p1beta1/BUILD.bazel b/google/cloud/speech/v1p1beta1/BUILD.bazel index e2001e02f..14fd48bb4 100644 --- a/google/cloud/speech/v1p1beta1/BUILD.bazel +++ b/google/cloud/speech/v1p1beta1/BUILD.bazel @@ -1,30 +1,39 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( name = "speech_proto", srcs = [ "cloud_speech.proto", + "resource.proto", ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/longrunning:operations_proto", "//google/rpc:status_proto", "@com_google_protobuf//:any_proto", "@com_google_protobuf//:duration_proto", - "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:timestamp_proto", ], ) proto_library_with_info( name = "speech_proto_with_info", - deps = [":speech_proto"], + deps = [ + ":speech_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -32,18 +41,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "speech_java_proto", deps = [":speech_proto"], @@ -52,51 +56,40 @@ java_proto_library( java_grpc_library( name = "speech_java_grpc", srcs = [":speech_proto"], - deps = [":speech_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "speech_resource_name_java_proto", - gapic_yaml = "speech_gapic.yaml", - deps = [":speech_proto"], + deps = [":speech_java_proto"], ) java_gapic_library( name = "speech_java_gapic", src = ":speech_proto_with_info", gapic_yaml = "speech_gapic.yaml", - service_yaml = "//google/cloud/speech:speech_v1p1beta1.yaml", - test_deps = [":speech_java_grpc"], + package = "google.cloud.speech.v1p1beta1", + service_yaml = "speech_v1p1beta1.yaml", + test_deps = [ + ":speech_java_grpc", + ], deps = [ ":speech_java_proto", - ":speech_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":speech_java_gapic_test", +java_gapic_test( + name = "speech_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.speech.v1p1beta1.SpeechClientTest", ], -) for test_name in [ - "com.google.cloud.speech.v1p1beta1.SpeechClientTest", -]] + runtime_deps = [":speech_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-speech-v1p1beta1-java", - client_deps = [":speech_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":speech_java_gapic_test"], - grpc_deps = [":speech_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":speech_java_gapic", + ":speech_java_grpc", ":speech_java_proto", ":speech_proto", - ":speech_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -104,10 +97,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -124,15 +117,18 @@ go_proto_library( go_gapic_library( name = "speech_go_gapic", - src = ":speech_proto_with_info", - gapic_yaml = "speech_gapic.yaml", - importpath = "cloud.google.com/go/speech/apiv1p1beta1", - service_yaml = "//google/cloud/speech:speech_v1p1beta1.yaml", + srcs = [":speech_proto_with_info"], + grpc_service_config = "speech_grpc_service_config.json", + importpath = "cloud.google.com/go/speech/apiv1p1beta1;speech", + service_yaml = "speech_v1p1beta1.yaml", deps = [ ":speech_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:any_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", ], ) @@ -143,13 +139,237 @@ go_test( importpath = "cloud.google.com/go/speech/apiv1p1beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-speech-v1p1beta1-go", deps = [ ":speech_go_gapic", - ":speech_go_gapic_srcjar-smoke-test.srcjar", ":speech_go_gapic_srcjar-test.srcjar", ":speech_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "speech_moved_proto", + srcs = [":speech_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "speech_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":speech_moved_proto"], +) + +py_grpc_library( + name = "speech_py_grpc", + srcs = [":speech_moved_proto"], + deps = [":speech_py_proto"], +) + +py_gapic_library( + name = "speech_py_gapic", + src = ":speech_proto_with_info", + gapic_yaml = "speech_gapic.yaml", + package = "google.cloud.speech.v1p1beta1", + service_yaml = "speech_v1p1beta1.yaml", + deps = [ + ":speech_py_grpc", + ":speech_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "speech-v1p1beta1-py", + deps = [ + ":speech_py_gapic", + ":speech_py_grpc", + ":speech_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "speech_php_proto", + deps = [":speech_proto"], +) + +php_grpc_library( + name = "speech_php_grpc", + srcs = [":speech_proto"], + deps = [":speech_php_proto"], +) + +php_gapic_library( + name = "speech_php_gapic", + src = ":speech_proto_with_info", + gapic_yaml = "speech_gapic.yaml", + package = "google.cloud.speech.v1p1beta1", + service_yaml = "speech_v1p1beta1.yaml", + deps = [ + ":speech_php_grpc", + ":speech_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-speech-v1p1beta1-php", + deps = [ + ":speech_php_gapic", + ":speech_php_grpc", + ":speech_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "speech_nodejs_gapic", + src = ":speech_proto_with_info", + gapic_yaml = "speech_gapic.yaml", + package = "google.cloud.speech.v1p1beta1", + service_yaml = "speech_v1p1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "speech-v1p1beta1-nodejs", + deps = [ + ":speech_nodejs_gapic", + ":speech_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "speech_ruby_proto", + deps = [":speech_proto"], +) + +ruby_grpc_library( + name = "speech_ruby_grpc", + srcs = [":speech_proto"], + deps = [":speech_ruby_proto"], +) + +ruby_gapic_library( + name = "speech_ruby_gapic", + src = ":speech_proto_with_info", + gapic_yaml = "speech_gapic.yaml", + package = "google.cloud.speech.v1p1beta1", + service_yaml = "speech_v1p1beta1.yaml", + deps = [ + ":speech_ruby_grpc", + ":speech_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-speech-v1p1beta1-ruby", + deps = [ + ":speech_ruby_gapic", + ":speech_ruby_grpc", + ":speech_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "speech_csharp_proto", + deps = [":speech_proto"], +) + +csharp_grpc_library( + name = "speech_csharp_grpc", + srcs = [":speech_proto"], + deps = [":speech_csharp_proto"], +) + +csharp_gapic_library( + name = "speech_csharp_gapic", + src = ":speech_proto_with_info", + gapic_yaml = "speech_gapic.yaml", + package = "google.cloud.speech.v1p1beta1", + service_yaml = "speech_v1p1beta1.yaml", + deps = [ + ":speech_csharp_grpc", + ":speech_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-speech-v1p1beta1-csharp", + deps = [ + ":speech_csharp_gapic", + ":speech_csharp_grpc", + ":speech_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/speech/v1p1beta1/cloud_speech.proto b/google/cloud/speech/v1p1beta1/cloud_speech.proto index dd557c5fd..7bb12866b 100644 --- a/google/cloud/speech/v1p1beta1/cloud_speech.proto +++ b/google/cloud/speech/v1p1beta1/cloud_speech.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,17 +11,19 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.speech.v1p1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/speech/v1p1beta1/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -30,9 +32,14 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta option java_multiple_files = true; option java_outer_classname = "SpeechProto"; option java_package = "com.google.cloud.speech.v1p1beta1"; +option objc_class_prefix = "GCS"; // Service that implements Google Cloud Speech API. service Speech { + option (google.api.default_host) = "speech.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + // Performs synchronous speech recognition: receive results after all audio // has been sent and processed. rpc Recognize(RecognizeRequest) returns (RecognizeResponse) { @@ -40,18 +47,26 @@ service Speech { post: "/v1p1beta1/speech:recognize" body: "*" }; + option (google.api.method_signature) = "config,audio"; } // Performs asynchronous speech recognition: receive results via the // google.longrunning.Operations interface. Returns either an // `Operation.error` or an `Operation.response` which contains // a `LongRunningRecognizeResponse` message. + // For more information on asynchronous speech recognition, see the + // [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). rpc LongRunningRecognize(LongRunningRecognizeRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1p1beta1/speech:longrunningrecognize" body: "*" }; + option (google.api.method_signature) = "config,audio"; + option (google.longrunning.operation_info) = { + response_type: "LongRunningRecognizeResponse" + metadata_type: "LongRunningRecognizeMetadata" + }; } // Performs bidirectional streaming speech recognition: receive results while @@ -62,30 +77,30 @@ service Speech { // The top-level message sent by the client for the `Recognize` method. message RecognizeRequest { - // *Required* Provides information to the recognizer that specifies how to + // Required. Provides information to the recognizer that specifies how to // process the request. - RecognitionConfig config = 1; + RecognitionConfig config = 1 [(google.api.field_behavior) = REQUIRED]; - // *Required* The audio data to be recognized. - RecognitionAudio audio = 2; + // Required. The audio data to be recognized. + RecognitionAudio audio = 2 [(google.api.field_behavior) = REQUIRED]; } // The top-level message sent by the client for the `LongRunningRecognize` // method. message LongRunningRecognizeRequest { - // *Required* Provides information to the recognizer that specifies how to + // Required. Provides information to the recognizer that specifies how to // process the request. - RecognitionConfig config = 1; + RecognitionConfig config = 1 [(google.api.field_behavior) = REQUIRED]; - // *Required* The audio data to be recognized. - RecognitionAudio audio = 2; + // Required. The audio data to be recognized. + RecognitionAudio audio = 2 [(google.api.field_behavior) = REQUIRED]; } // The top-level message sent by the client for the `StreamingRecognize` method. // Multiple `StreamingRecognizeRequest` messages are sent. The first message -// must contain a `streaming_config` message and must not contain `audio` data. -// All subsequent messages must contain `audio` data and must not contain a -// `streaming_config` message. +// must contain a `streaming_config` message and must not contain +// `audio_content`. All subsequent messages must contain `audio_content` and +// must not contain a `streaming_config` message. message StreamingRecognizeRequest { // The streaming request, which is either a streaming config or audio content. oneof streaming_request { @@ -99,9 +114,9 @@ message StreamingRecognizeRequest { // `StreamingRecognizeRequest` message must not contain `audio_content` data // and all subsequent `StreamingRecognizeRequest` messages must contain // `audio_content` data. The audio bytes must be encoded as specified in - // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a + // `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a // pure binary representation (not base64). See - // [content limits](/speech-to-text/quotas#content). + // [content limits](https://cloud.google.com/speech-to-text/quotas#content). bytes audio_content = 2; } } @@ -109,11 +124,11 @@ message StreamingRecognizeRequest { // Provides information to the recognizer that specifies how to process the // request. message StreamingRecognitionConfig { - // *Required* Provides information to the recognizer that specifies how to + // Required. Provides information to the recognizer that specifies how to // process the request. - RecognitionConfig config = 1; + RecognitionConfig config = 1 [(google.api.field_behavior) = REQUIRED]; - // *Optional* If `false` or omitted, the recognizer will perform continuous + // If `false` or omitted, the recognizer will perform continuous // recognition (continuing to wait for and process audio even if the user // pauses speaking) until the client closes the input stream (gRPC API) or // until the maximum time limit has been reached. May return multiple @@ -126,7 +141,7 @@ message StreamingRecognitionConfig { // `true`. bool single_utterance = 2; - // *Optional* If `true`, interim results (tentative hypotheses) may be + // If `true`, interim results (tentative hypotheses) may be // returned as they become available (these interim results are indicated with // the `is_final=false` flag). // If `false` or omitted, only `is_final=true` result(s) are returned. @@ -138,13 +153,15 @@ message StreamingRecognitionConfig { message RecognitionConfig { // The encoding of the audio data sent in the request. // - // All encodings support only 1 channel (mono) audio. + // All encodings support only 1 channel (mono) audio, unless the + // `audio_channel_count` and `enable_separate_recognition_per_channel` fields + // are set. // // For best results, the audio source should be captured and transmitted using // a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech // recognition can be reduced if lossy codecs are used to capture or transmit // audio, particularly if background noise is present. Lossy codecs include - // `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, and `SPEEX_WITH_HEADER_BYTE`. + // `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, and `MP3`. // // The `FLAC` and `WAV` audio file formats include a header that describes the // included audio content. You can request recognition for `WAV` files that @@ -202,8 +219,8 @@ message RecognitionConfig { SPEEX_WITH_HEADER_BYTE = 7; // MP3 audio. Support all standard MP3 bitrates (which range from 32-320 - // kbps). When using this encoding, `sample_rate_hertz` can be optionally - // unset if not known. + // kbps). When using this encoding, `sample_rate_hertz` has to match the + // sample rate of the file being used. MP3 = 8; } @@ -218,12 +235,12 @@ message RecognitionConfig { // 16000 is optimal. For best results, set the sampling rate of the audio // source to 16000 Hz. If that's not possible, use the native sample rate of // the audio source (instead of re-sampling). - // This field is optional for `FLAC` and `WAV` audio files and required - // for all other audio formats. For details, see + // This field is optional for FLAC and WAV audio files, but is + // required for all other audio formats. For details, see // [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. int32 sample_rate_hertz = 2; - // *Optional* The number of channels in the input audio data. + // The number of channels in the input audio data. // ONLY set this for MULTI-CHANNEL recognition. // Valid values for LINEAR16 and FLAC are `1`-`8`. // Valid values for OGG_OPUS are '1'-'254'. @@ -234,7 +251,7 @@ message RecognitionConfig { // `enable_separate_recognition_per_channel` to 'true'. int32 audio_channel_count = 7; - // This needs to be set to ‘true’ explicitly and `audio_channel_count` > 1 + // This needs to be set to `true` explicitly and `audio_channel_count` > 1 // to get each channel recognized separately. The recognition result will // contain a `channel_tag` field to state which channel that result belongs // to. If this is not true, we will only recognize the first channel. The @@ -242,28 +259,29 @@ message RecognitionConfig { // `audio_channel_count` multiplied by the length of the audio. bool enable_separate_recognition_per_channel = 12; - // *Required* The language of the supplied audio as a + // Required. The language of the supplied audio as a // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. // Example: "en-US". - // See [Language Support](/speech-to-text/docs/languages) - // for a list of the currently supported language codes. - string language_code = 3; + // See [Language + // Support](https://cloud.google.com/speech-to-text/docs/languages) for a list + // of the currently supported language codes. + string language_code = 3 [(google.api.field_behavior) = REQUIRED]; - // *Optional* A list of up to 3 additional + // A list of up to 3 additional // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags, // listing possible alternative languages of the supplied audio. - // See [Language Support](/speech-to-text/docs/languages) - // for a list of the currently supported language codes. - // If alternative languages are listed, recognition result will contain - // recognition in the most likely language detected including the main - // language_code. The recognition result will include the language tag - // of the language detected in the audio. - // Note: This feature is only supported for Voice Command and Voice Search - // use cases and performance may vary for other use cases (e.g., phone call + // See [Language + // Support](https://cloud.google.com/speech-to-text/docs/languages) for a list + // of the currently supported language codes. If alternative languages are + // listed, recognition result will contain recognition in the most likely + // language detected including the main language_code. The recognition result + // will include the language tag of the language detected in the audio. Note: + // This feature is only supported for Voice Command and Voice Search use cases + // and performance may vary for other use cases (e.g., phone call // transcription). repeated string alternative_language_codes = 18; - // *Optional* Maximum number of recognition hypotheses to be returned. + // Maximum number of recognition hypotheses to be returned. // Specifically, the maximum number of `SpeechRecognitionAlternative` messages // within each `SpeechRecognitionResult`. // The server may return fewer than `max_alternatives`. @@ -271,59 +289,68 @@ message RecognitionConfig { // one. If omitted, will return a maximum of one. int32 max_alternatives = 4; - // *Optional* If set to `true`, the server will attempt to filter out + // If set to `true`, the server will attempt to filter out // profanities, replacing all but the initial character in each filtered word // with asterisks, e.g. "f***". If set to `false` or omitted, profanities // won't be filtered out. bool profanity_filter = 5; - // *Optional* array of - // [SpeechContext][google.cloud.speech.v1p1beta1.SpeechContext]. A means to - // provide context to assist the speech recognition. For more information, see - // [Phrase Hints](/speech-to-text/docs/basics#phrase-hints). + // Speech adaptation configuration improves the accuracy of speech + // recognition. When speech adaptation is set it supersedes the + // `speech_contexts` field. For more information, see the [speech + // adaptation](https://cloud.google.com/speech-to-text/docs/context-strength) + // documentation. + SpeechAdaptation adaptation = 20; + + // Array of [SpeechContext][google.cloud.speech.v1p1beta1.SpeechContext]. + // A means to provide context to assist the speech recognition. For more + // information, see + // [speech + // adaptation](https://cloud.google.com/speech-to-text/docs/context-strength). repeated SpeechContext speech_contexts = 6; - // *Optional* If `true`, the top result includes a list of words and + // If `true`, the top result includes a list of words and // the start and end time offsets (timestamps) for those words. If // `false`, no word-level time offset information is returned. The default is // `false`. bool enable_word_time_offsets = 8; - // *Optional* If `true`, the top result includes a list of words and the + // If `true`, the top result includes a list of words and the // confidence for those words. If `false`, no word-level confidence // information is returned. The default is `false`. bool enable_word_confidence = 15; - // *Optional* If 'true', adds punctuation to recognition result hypotheses. + // If 'true', adds punctuation to recognition result hypotheses. // This feature is only available in select languages. Setting this for // requests in other languages has no effect at all. // The default 'false' value does not add punctuation to result hypotheses. - // Note: This is currently offered as an experimental service, complimentary - // to all users. In the future this may be exclusively available as a - // premium feature. bool enable_automatic_punctuation = 11; - // *Optional* If 'true', enables speaker detection for each recognized word in + // If 'true', enables speaker detection for each recognized word in // the top alternative of the recognition result using a speaker_tag provided // in the WordInfo. - // Note: When this is true, we send all the words from the beginning of the + // Note: Use diarization_config instead. + bool enable_speaker_diarization = 16 [deprecated = true]; + + // If set, specifies the estimated number of speakers in the conversation. + // Defaults to '2'. Ignored unless enable_speaker_diarization is set to true. + // Note: Use diarization_config instead. + int32 diarization_speaker_count = 17 [deprecated = true]; + + // Config to enable speaker diarization and set additional + // parameters to make diarization better suited for your application. + // Note: When this is enabled, we send all the words from the beginning of the // audio for the top alternative in every consecutive STREAMING responses. // This is done in order to improve our speaker tags as our models learn to // identify the speakers in the conversation over time. // For non-streaming requests, the diarization results will be provided only // in the top alternative of the FINAL SpeechRecognitionResult. - bool enable_speaker_diarization = 16; - - // *Optional* - // If set, specifies the estimated number of speakers in the conversation. - // If not set, defaults to '2'. - // Ignored unless enable_speaker_diarization is set to true." - int32 diarization_speaker_count = 17; + SpeakerDiarizationConfig diarization_config = 19; - // *Optional* Metadata regarding this request. + // Metadata regarding this request. RecognitionMetadata metadata = 9; - // *Optional* Which model to select for the given request. Select the model + // Which model to select for the given request. Select the model // best suited to your domain to get best results. If a model is not // explicitly specified, then we auto-select a model based on the parameters // in the RecognitionConfig. @@ -357,7 +384,7 @@ message RecognitionConfig { // string model = 13; - // *Optional* Set to true to use an enhanced model for speech recognition. + // Set to true to use an enhanced model for speech recognition. // If `use_enhanced` is set to true and the `model` field is not set, then // an appropriate enhanced model is chosen if an enhanced model exists for // the audio. @@ -368,6 +395,28 @@ message RecognitionConfig { bool use_enhanced = 14; } +// Config to enable speaker diarization. +message SpeakerDiarizationConfig { + // If 'true', enables speaker detection for each recognized word in + // the top alternative of the recognition result using a speaker_tag provided + // in the WordInfo. + bool enable_speaker_diarization = 1; + + // Minimum number of speakers in the conversation. This range gives you more + // flexibility by allowing the system to automatically determine the correct + // number of speakers. If not set, the default value is 2. + int32 min_speaker_count = 2; + + // Maximum number of speakers in the conversation. This range gives you more + // flexibility by allowing the system to automatically determine the correct + // number of speakers. If not set, the default value is 6. + int32 max_speaker_count = 3; + + // Output only. Unused. + int32 speaker_tag = 5 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; +} + // Description of audio data to be recognized. message RecognitionMetadata { // Use case categories that the audio recognition request can be described @@ -492,7 +541,7 @@ message RecognitionMetadata { // Obfuscated (privacy-protected) ID of the user, to identify number of // unique users using the service. - int64 obfuscated_id = 9; + int64 obfuscated_id = 9 [deprecated = true]; // Description of the content. Eg. "Recordings of federal supreme court // hearings from 2012". @@ -502,12 +551,12 @@ message RecognitionMetadata { // Provides "hints" to the speech recognizer to favor specific words and phrases // in the results. message SpeechContext { - // *Optional* A list of strings containing words and phrases "hints" so that + // A list of strings containing words and phrases "hints" so that // the speech recognition is more likely to recognize them. This can be used // to improve the accuracy for specific words and phrases, for example, if // specific commands are typically spoken by the user. This can also be used // to add additional words to the vocabulary of the recognizer. See - // [usage limits](/speech-to-text/quotas#content). + // [usage limits](https://cloud.google.com/speech-to-text/quotas#content). // // List items can also be set to classes for groups of words that represent // common concepts that occur in natural language. For example, rather than @@ -530,13 +579,13 @@ message SpeechContext { // Contains audio data in the encoding specified in the `RecognitionConfig`. // Either `content` or `uri` must be supplied. Supplying both or neither // returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. -// See [content limits](/speech-to-text/quotas#content). +// See [content limits](https://cloud.google.com/speech-to-text/quotas#content). message RecognitionAudio { // The audio source, which is either inline content or a Google Cloud // Storage uri. oneof audio_source { // The audio data bytes encoded as specified in - // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a + // `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a // pure binary representation, whereas JSON representations use base64. bytes content = 1; @@ -556,7 +605,7 @@ message RecognitionAudio { // contains the result as zero or more sequential `SpeechRecognitionResult` // messages. message RecognizeResponse { - // Output only. Sequential list of transcription results corresponding to + // Sequential list of transcription results corresponding to // sequential portions of audio. repeated SpeechRecognitionResult results = 2; } @@ -567,7 +616,7 @@ message RecognizeResponse { // returned by the `GetOperation` call of the `google::longrunning::Operations` // service. message LongRunningRecognizeResponse { - // Output only. Sequential list of transcription results corresponding to + // Sequential list of transcription results corresponding to // sequential portions of audio. repeated SpeechRecognitionResult results = 2; } @@ -585,6 +634,10 @@ message LongRunningRecognizeMetadata { // Time of the most recent processing update. google.protobuf.Timestamp last_update_time = 3; + + // The URI of the audio file being transcribed. Empty if the audio was sent + // as byte content. + string uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // `StreamingRecognizeResponse` is the only message returned to the client by @@ -652,44 +705,44 @@ message StreamingRecognizeResponse { END_OF_SINGLE_UTTERANCE = 1; } - // Output only. If set, returns a [google.rpc.Status][google.rpc.Status] - // message that specifies the error for the operation. + // If set, returns a [google.rpc.Status][google.rpc.Status] message that + // specifies the error for the operation. google.rpc.Status error = 1; - // Output only. This repeated list contains zero or more results that + // This repeated list contains zero or more results that // correspond to consecutive portions of the audio currently being processed. // It contains zero or one `is_final=true` result (the newly settled portion), // followed by zero or more `is_final=false` results (the interim results). repeated StreamingRecognitionResult results = 2; - // Output only. Indicates the type of speech event. + // Indicates the type of speech event. SpeechEventType speech_event_type = 4; } // A streaming speech recognition result corresponding to a portion of the audio // that is currently being processed. message StreamingRecognitionResult { - // Output only. May contain one or more recognition hypotheses (up to the + // May contain one or more recognition hypotheses (up to the // maximum specified in `max_alternatives`). // These alternatives are ordered in terms of accuracy, with the top (first) // alternative being the most probable, as ranked by the recognizer. repeated SpeechRecognitionAlternative alternatives = 1; - // Output only. If `false`, this `StreamingRecognitionResult` represents an + // If `false`, this `StreamingRecognitionResult` represents an // interim result that may change. If `true`, this is the final time the // speech service will return this particular `StreamingRecognitionResult`, // the recognizer will not return any further hypotheses for this portion of // the transcript and corresponding audio. bool is_final = 2; - // Output only. An estimate of the likelihood that the recognizer will not + // An estimate of the likelihood that the recognizer will not // change its guess about this interim result. Values range from 0.0 // (completely unstable) to 1.0 (completely stable). // This field is only provided for interim results (`is_final=false`). // The default of 0.0 is a sentinel value indicating `stability` was not set. float stability = 3; - // Output only. Time offset of the end of this result relative to the + // Time offset of the end of this result relative to the // beginning of the audio. google.protobuf.Duration result_end_time = 4; @@ -698,16 +751,15 @@ message StreamingRecognitionResult { // For audio_channel_count = N, its output values can range from '1' to 'N'. int32 channel_tag = 5; - // Output only. The - // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the - // language in this result. This language code was detected to have the most - // likelihood of being spoken in the audio. - string language_code = 6; + // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + // language tag of the language in this result. This language code was + // detected to have the most likelihood of being spoken in the audio. + string language_code = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A speech recognition result corresponding to a portion of the audio. message SpeechRecognitionResult { - // Output only. May contain one or more recognition hypotheses (up to the + // May contain one or more recognition hypotheses (up to the // maximum specified in `max_alternatives`). // These alternatives are ordered in terms of accuracy, with the top (first) // alternative being the most probable, as ranked by the recognizer. @@ -718,19 +770,18 @@ message SpeechRecognitionResult { // For audio_channel_count = N, its output values can range from '1' to 'N'. int32 channel_tag = 2; - // Output only. The - // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the - // language in this result. This language code was detected to have the most - // likelihood of being spoken in the audio. - string language_code = 5; + // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + // language tag of the language in this result. This language code was + // detected to have the most likelihood of being spoken in the audio. + string language_code = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Alternative hypotheses (a.k.a. n-best list). message SpeechRecognitionAlternative { - // Output only. Transcript text representing the words that the user spoke. + // Transcript text representing the words that the user spoke. string transcript = 1; - // Output only. The confidence estimate between 0.0 and 1.0. A higher number + // The confidence estimate between 0.0 and 1.0. A higher number // indicates an estimated greater likelihood that the recognized words are // correct. This field is set only for the top alternative of a non-streaming // result or, of a streaming result where `is_final=true`. @@ -739,7 +790,7 @@ message SpeechRecognitionAlternative { // The default of 0.0 is a sentinel value indicating `confidence` was not set. float confidence = 2; - // Output only. A list of word-specific information for each recognized word. + // A list of word-specific information for each recognized word. // Note: When `enable_speaker_diarization` is true, you will see all the words // from the beginning of the audio. repeated WordInfo words = 3; @@ -747,7 +798,7 @@ message SpeechRecognitionAlternative { // Word-specific information for recognized words. message WordInfo { - // Output only. Time offset relative to the beginning of the audio, + // Time offset relative to the beginning of the audio, // and corresponding to the start of the spoken word. // This field is only set if `enable_word_time_offsets=true` and only // in the top hypothesis. @@ -755,7 +806,7 @@ message WordInfo { // vary. google.protobuf.Duration start_time = 1; - // Output only. Time offset relative to the beginning of the audio, + // Time offset relative to the beginning of the audio, // and corresponding to the end of the spoken word. // This field is only set if `enable_word_time_offsets=true` and only // in the top hypothesis. @@ -763,10 +814,10 @@ message WordInfo { // vary. google.protobuf.Duration end_time = 2; - // Output only. The word corresponding to this set of information. + // The word corresponding to this set of information. string word = 3; - // Output only. The confidence estimate between 0.0 and 1.0. A higher number + // The confidence estimate between 0.0 and 1.0. A higher number // indicates an estimated greater likelihood that the recognized words are // correct. This field is set only for the top alternative of a non-streaming // result or, of a streaming result where `is_final=true`. @@ -780,5 +831,5 @@ message WordInfo { // have spoken this word. Value ranges from '1' to diarization_speaker_count. // speaker_tag is set if enable_speaker_diarization = 'true' and only in the // top alternative. - int32 speaker_tag = 5; + int32 speaker_tag = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/cloud/speech/v1p1beta1/resource.proto b/google/cloud/speech/v1p1beta1/resource.proto new file mode 100644 index 000000000..5bb379ff1 --- /dev/null +++ b/google/cloud/speech/v1p1beta1/resource.proto @@ -0,0 +1,129 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.speech.v1p1beta1; + +import "google/api/annotations.proto"; +import "google/api/resource.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1;speech"; +option java_multiple_files = true; +option java_outer_classname = "SpeechResourceProto"; +option java_package = "com.google.cloud.speech.v1p1beta1"; +option objc_class_prefix = "GCS"; + +// A set of words or phrases that represents a common concept likely to appear +// in your audio, for example a list of passenger ship names. CustomClass items +// can be substituted into placeholders that you set in PhraseSet phrases. +message CustomClass { + option (google.api.resource) = { + type: "speech.googleapis.com/CustomClass" + pattern: "projects/{project}/locations/{location}/customClasses/{custom_class}" + }; + + // An item of the class. + message ClassItem { + // The class item's value. + string value = 1; + } + + // The resource name of the custom class. + string name = 1; + + // If this custom class is a resource, the custom_class_id is the resource id + // of the CustomClass. + string custom_class_id = 2; + + // A collection of class items. + repeated ClassItem items = 3; +} + +// Provides "hints" to the speech recognizer to favor specific words and phrases +// in the results. +message PhraseSet { + option (google.api.resource) = { + type: "speech.googleapis.com/PhraseSet" + pattern: "projects/{project}/locations/{location}/phraseSets/{phrase_set}" + }; + + // A phrases containing words and phrase "hints" so that + // the speech recognition is more likely to recognize them. This can be used + // to improve the accuracy for specific words and phrases, for example, if + // specific commands are typically spoken by the user. This can also be used + // to add additional words to the vocabulary of the recognizer. See + // [usage limits](https://cloud.google.com/speech-to-text/quotas#content). + // + // List items can also include pre-built or custom classes containing groups + // of words that represent common concepts that occur in natural language. For + // example, rather than providing a phrase hint for every month of the + // year (e.g. "i was born in january", "i was born in febuary", ...), use the + // pre-built `$MONTH` class improves the likelihood of correctly transcribing + // audio that includes months (e.g. "i was born in $month"). + // To refer to pre-built classes, use the class' symbol prepended with `$` + // e.g. `$MONTH`. To refer to custom classes that were defined inline in the + // request, set the class's `custom_class_id` to a string unique to all class + // resources and inline classes. Then use the class' id wrapped in $`{...}` + // e.g. "${my-months}". To refer to custom classes resources, use the class' + // id wrapped in `${}` (e.g. `${my-months}`). + message Phrase { + // The phrase itself. + string value = 1; + + // Hint Boost. Overrides the boost set at the phrase set level. + // Positive value will increase the probability that a specific phrase will + // be recognized over other similar sounding phrases. The higher the boost, + // the higher the chance of false positive recognition as well. Negative + // boost values would correspond to anti-biasing. Anti-biasing is not + // enabled, so negative boost will simply be ignored. Though `boost` can + // accept a wide range of positive values, most use cases are best served + // with values between 0 and 20. We recommend using a binary search approach + // to finding the optimal value for your use case. Speech recognition + // will skip PhraseSets with a boost value of 0. + float boost = 2; + } + + // The resource name of the phrase set. + string name = 1; + + // A list of word and phrases. + repeated Phrase phrases = 2; + + // Hint Boost. Positive value will increase the probability that a specific + // phrase will be recognized over other similar sounding phrases. The higher + // the boost, the higher the chance of false positive recognition as well. + // Negative boost values would correspond to anti-biasing. Anti-biasing is not + // enabled, so negative boost will simply be ignored. Though `boost` can + // accept a wide range of positive values, most use cases are best served with + // values between 0 (exclusive) and 20. We recommend using a binary search + // approach to finding the optimal value for your use case. Speech recognition + // will skip PhraseSets with a boost value of 0. + float boost = 4; +} + +// Speech adaptation configuration. +message SpeechAdaptation { + // A collection of phrase sets. To specify the hints inline, leave the + // phrase set's `name` blank and fill in the rest of its fields. Any + // phrase set can use any custom class. + repeated PhraseSet phrase_sets = 1; + + // A collection of custom classes. To specify the classes inline, leave the + // class' `name` blank and fill in the rest of its fields, giving it a unique + // `custom_class_id`. Refer to the inline defined class in phrase hints by its + // `custom_class_id`. + repeated CustomClass custom_classes = 2; +} diff --git a/google/cloud/speech/v1p1beta1/samples/speech_adaptation_beta.yaml b/google/cloud/speech/v1p1beta1/samples/speech_adaptation_beta.yaml new file mode 100644 index 000000000..b687bd592 --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_adaptation_beta.yaml @@ -0,0 +1,49 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 +samples: +- region_tag: speech_adaptation_beta + title: Speech Adaptation (Cloud Storage) + description: Transcribe a short audio file with speech adaptation. + rpc: Recognize + service: google.cloud.speech.v1p1beta1.Speech + request: + - field: audio.uri + value: "gs://cloud-samples-data/speech/brooklyn_bridge.mp3" + input_parameter: storage_uri + comment: URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE] + - field: config.speech_contexts[0].phrases[0] + value: "Brooklyn Bridge" + input_parameter: phrase + comment: | + Phrase "hints" help recognize the specified phrases from your audio. + - field: config.speech_contexts[0].boost + value: 20.0 + comment: | + Hint Boost. This value increases the probability that a specific + phrase will be recognized over other similar sounding phrases. + The higher the boost, the higher the chance of false positive + recognition as well. Can accept wide range of positive values. + Most use cases are best served with values between 0 and 20. + Using a binary search happroach may help you find the optimal value. + - field: config.sample_rate_hertz + value: 44100 + comment: Sample rate in Hertz of the audio data sent + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + - field: config.encoding + value: MP3 + comment: | + Encoding of audio data sent. This sample sets this explicitly. + This field is optional for FLAC and WAV audio formats. + response: + - loop: + variable: result + collection: $resp.results + body: + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] + - print: + - "Transcript: %s" + - alternative.transcript diff --git a/google/cloud/speech/v1p1beta1/samples/speech_contexts_classes_beta.yaml b/google/cloud/speech/v1p1beta1/samples/speech_contexts_classes_beta.yaml new file mode 100644 index 000000000..1103f362b --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_contexts_classes_beta.yaml @@ -0,0 +1,43 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 +samples: +- region_tag: speech_contexts_classes_beta + title: Using Context Classes (Cloud Storage) + description: Transcribe a short audio file with static context classes. + rpc: Recognize + service: google.cloud.speech.v1p1beta1.Speech + request: + - field: audio.uri + value: "gs://cloud-samples-data/speech/time.mp3" + input_parameter: storage_uri + comment: URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE] + - field: config.speech_contexts[0].phrases[0] + value: "$TIME" + input_parameter: phrase + comment: | + Phrase "hints" help recognize the specified phrases from your audio. + In this sample we are using a static class phrase ($TIME). + Classes represent groups of words that represent common concepts + that occur in natural language. + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + - field: config.sample_rate_hertz + value: 24000 + comment: Sample rate in Hertz of the audio data sent + - field: config.encoding + value: MP3 + comment: | + Encoding of audio data sent. This sample sets this explicitly. + This field is optional for FLAC and WAV audio formats. + response: + - loop: + variable: result + collection: $resp.results + body: + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] + - print: + - "Transcript: %s" + - alternative.transcript diff --git a/google/cloud/speech/v1p1beta1/samples/speech_quickstart_beta.yaml b/google/cloud/speech/v1p1beta1/samples/speech_quickstart_beta.yaml new file mode 100644 index 000000000..44aff9cf8 --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_quickstart_beta.yaml @@ -0,0 +1,35 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 +samples: +- region_tag: speech_quickstart_beta + title: Quickstart Beta + description: Performs synchronous speech recognition on an audio file + rpc: Recognize + service: google.cloud.speech.v1p1beta1.Speech + request: + - field: audio.uri + value: "gs://cloud-samples-data/speech/brooklyn_bridge.mp3" + input_parameter: storage_uri + comment: URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE] + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + - field: config.sample_rate_hertz + value: 44100 + comment: Sample rate in Hertz of the audio data sent + - field: config.encoding + value: MP3 + comment: | + Encoding of audio data sent. This sample sets this explicitly. + This field is optional for FLAC and WAV audio formats. + response: + - loop: + variable: result + collection: $resp.results + body: + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] + - print: + - "Transcript: %s" + - alternative.transcript diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_auto_punctuation_beta.yaml b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_auto_punctuation_beta.yaml index 2093ab0d3..636d61cac 100644 --- a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_auto_punctuation_beta.yaml +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_auto_punctuation_beta.yaml @@ -1,34 +1,35 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -- id: speech_transcribe_auto_punctuation_beta +- region_tag: speech_transcribe_auto_punctuation_beta title: Getting punctuation in results (Local File) (Beta) - description: | - Transcribe a short audio file with punctuation + description: Transcribe a short audio file with punctuation rpc: Recognize service: google.cloud.speech.v1p1beta1.Speech - parameters: - defaults: - - audio.content = "resources/commercial_mono.wav" - - config.enable_automatic_punctuation = True - - config.language_code = "en-US" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: "Path to local audio file, e.g. /path/audio.wav" - - parameter: config.enable_automatic_punctuation - description: | - When enabled, trascription results may include punctuation (available for select languages). - - parameter: config.language_code - description: | - The language of the supplied audio. Even though additional languages are - provided by alternative_language_codes, a primary language is still required. - on_success: + request: + - field: audio.content + value: "resources/commercial_mono.wav" + input_parameter: local_file_path + comment: Path to local audio file, e.g. /path/audio.wav + value_is_file: true + - field: config.enable_automatic_punctuation + value: true + comment: | + When enabled, trascription results may include punctuation + (available for select languages). + - field: config.language_code + value: "en-US" + comment: | + The language of the supplied audio. Even though additional languages are + provided by alternative_language_codes, a primary language is still required. + response: - loop: variable: result collection: $resp.results body: - - comment: ["First alternative is the most probable result"] - - define: alternative=result.alternatives[0] + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_diarization_beta.yaml b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_diarization_beta.yaml index 4e2eb66ba..55c150336 100644 --- a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_diarization_beta.yaml +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_diarization_beta.yaml @@ -1,46 +1,51 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -# TODO: this id should include "async" (calls LongRunningRecognize async rpc) -- id: speech_transcribe_diarization_beta +- region_tag: speech_transcribe_diarization_beta title: Separating different speakers (Local File) (LRO) (Beta) description: | Print confidence level for individual words in a transcription of a short audio file Separating different speakers in an audio file recording rpc: LongRunningRecognize service: google.cloud.speech.v1p1beta1.Speech - parameters: - defaults: - - audio.content = "resources/commercial_mono.wav" - - config.enable_speaker_diarization = True - - config.diarization_speaker_count = 2 - - config.language_code = "en-US" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: "Path to local audio file, e.g. /path/audio.wav" - - parameter: config.enable_speaker_diarization - description: | - If enabled, each word in the first alternative of each result will be - tagged with a speaker tag to identify the speaker. - - parameter: config.diarization_speaker_count - description: | - Optional. Specifies the estimated number of speakers in the conversation. - - parameter: config.language_code - description: "The language of the supplied audio" - on_success: + request: + - field: audio.content + value: "resources/commercial_mono.wav" + input_parameter: local_file_path + comment: Path to local audio file, e.g. /path/audio.wav + value_is_file: true + - field: config.enable_speaker_diarization + value: true + comment: | + If enabled, each word in the first alternative of each result will be + tagged with a speaker tag to identify the speaker. + - field: config.diarization_speaker_count + value: 2 + comment: Optional. Specifies the estimated number of speakers in the conversation. + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + response: - loop: collection: $resp.results variable: result body: - - comment: ["First alternative has words tagged with speakers"] - - define: alternative=result.alternatives[0] + - comment: + - First alternative has words tagged with speakers + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript - - comment: ["Print the %s of each word", speaker_tag] + - comment: + - Print the %s of each word + - speaker_tag - loop: collection: alternative.words variable: word body: - - print: ["Word: %s", word.word] - - print: ["Speaker tag: %s", word.speaker_tag] + - print: + - 'Word: %s' + - word.word + - print: + - 'Speaker tag: %s' + - word.speaker_tag diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.yaml b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.yaml index 7852d51e8..3cbf84914 100644 --- a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.yaml +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.yaml @@ -1,37 +1,44 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -- id: speech_transcribe_multilanguage_beta +- region_tag: speech_transcribe_multilanguage_beta title: Detecting language spoken automatically (Local File) (Beta) description: | Transcribe a short audio file with language detected from a list of possible languages rpc: Recognize service: google.cloud.speech.v1p1beta1.Speech - parameters: - defaults: - - audio.content = "resources/brooklyn_bridge.flac" - - config.language_code = "fr" - - config.alternative_language_codes[0] = "es" - - config.alternative_language_codes[1] = "en" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: "Path to local audio file, e.g. /path/audio.wav" - - parameter: config.alternative_language_codes[0] - description: | - Specify up to 3 additional languages as possible alternative languages of the supplied audio. - - parameter: config.language_code - description: | - The language of the supplied audio. Even though additional languages are - provided by alternative_language_codes, a primary language is still required. - on_success: + request: + - field: audio.content + value: resources/brooklyn_bridge.flac + input_parameter: local_file_path + comment: Path to local audio file, e.g. /path/audio.wav + value_is_file: true + - field: config.language_code + value: "fr" + comment: | + The language of the supplied audio. Even though additional languages are + provided by alternative_language_codes, a primary language is still required. + - field: config.alternative_language_codes[0] + value: "es" + comment: | + Specify up to 3 additional languages as possible alternative languages + of the supplied audio. + - field: config.alternative_language_codes[1] + value: "en" + response: - loop: variable: result collection: $resp.results body: - - comment: ["The %s which was detected as the most likely being spoken in the audio", language_code] - - print: ["Detected language: %s", result.language_code] - - comment: ["First alternative is the most probable result"] - - define: alternative=result.alternatives[0] + - comment: + - The %s which was detected as the most likely being spoken in the audio + - language_code + - print: + - "Detected language: %s" + - result.language_code + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_recognition_metadata_beta.yaml b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_recognition_metadata_beta.yaml index 70dba7257..9517f6460 100644 --- a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_recognition_metadata_beta.yaml +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_recognition_metadata_beta.yaml @@ -1,42 +1,41 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -- id: speech_transcribe_recognition_metadata_beta +- region_tag: speech_transcribe_recognition_metadata_beta title: Adding recognition metadata (Local File) (Beta) - description: | - Adds additional details short audio file included in this recognition request + description: Adds additional details short audio file included in this recognition request rpc: Recognize service: google.cloud.speech.v1p1beta1.Speech - parameters: - defaults: - - audio.content = "resources/commercial_mono.wav" - - config.metadata.interaction_type = VOICE_SEARCH - - config.metadata.recording_device_type = SMARTPHONE - - config.metadata.recording_device_name = "Pixel 3" - - config.language_code = "en-US" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: "Path to local audio file, e.g. /path/audio.wav" - - parameter: config.metadata.interaction_type - description: | - The use case of the audio, e.g. PHONE_CALL, DISCUSSION, PRESENTATION, et al. - - parameter: config.metadata.recording_device_type - description: The kind of device used to capture the audio - - parameter: config.metadata.recording_device_name - description: | - The device used to make the recording. - Arbitrary string, e.g. 'Pixel XL', 'VoIP', 'Cardioid Microphone', or other value. - - parameter: config.language_code - description: | - The language of the supplied audio. Even though additional languages are - provided by alternative_language_codes, a primary language is still required. - on_success: + request: + - field: audio.content + value: "resources/commercial_mono.wav" + input_parameter: local_file_path + comment: Path to local audio file, e.g. /path/audio.wav + value_is_file: true + - field: config.metadata.interaction_type + value: VOICE_SEARCH + comment: The use case of the audio, e.g. PHONE_CALL, DISCUSSION, PRESENTATION, et al. + - field: config.metadata.recording_device_type + value: SMARTPHONE + comment: The kind of device used to capture the audio + - field: config.metadata.recording_device_name + value: "Pixel 3" + comment: | + The device used to make the recording. + Arbitrary string, e.g. 'Pixel XL', 'VoIP', 'Cardioid Microphone', or other value. + - field: config.language_code + value: "en-US" + comment: | + The language of the supplied audio. Even though additional languages are + provided by alternative_language_codes, a primary language is still required. + response: - loop: variable: result collection: $resp.results body: - - comment: ["First alternative is the most probable result"] - - define: alternative=result.alternatives[0] + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_word_level_confidence_beta.yaml b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_word_level_confidence_beta.yaml index 66978a5d9..bc085b3a6 100644 --- a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_word_level_confidence_beta.yaml +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_word_level_confidence_beta.yaml @@ -1,38 +1,45 @@ +type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto +schema_version: 1.2.0 samples: -- id: speech_transcribe_word_level_confidence_beta +- region_tag: speech_transcribe_word_level_confidence_beta title: Enabling word-level confidence (Local File) (Beta) description: | - Print confidence level for individual words in a transcription of a short audio file + Print confidence level for individual words in a transcription of a short audio file. rpc: Recognize service: google.cloud.speech.v1p1beta1.Speech - parameters: - defaults: - - audio.content = "resources/brooklyn_bridge.flac" - - config.enable_word_confidence = True - - config.language_code = "en-US" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: "Path to local audio file, e.g. /path/audio.wav" - - parameter: config.enable_word_confidence - description: | - When enabled, the first result returned by the API will include a list - of words and the confidence level for each of those words. - - parameter: config.language_code - description: "The language of the supplied audio" - on_success: - - comment: ["The first result includes confidence levels per word"] - - define: result=$resp.results[0] - - comment: ["First alternative is the most probable result"] - - define: alternative=result.alternatives[0] + request: + - field: audio.content + value: "resources/brooklyn_bridge.flac" + input_parameter: local_file_path + comment: Path to local audio file, e.g. /path/audio.wav + value_is_file: true + - field: config.enable_word_confidence + value: true + comment: | + When enabled, the first result returned by the API will include a list + of words and the confidence level for each of those words. + - field: config.language_code + value: "en-US" + comment: The language of the supplied audio + response: + - comment: + - The first result includes confidence levels per word + - define: result = $resp.results[0] + - comment: + - First alternative is the most probable result + - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript - - comment: ["Print the confidence level of each word"] + - comment: + - Print the confidence level of each word - loop: collection: alternative.words variable: word body: - - print: ["Word: %s", word.word] - - print: ["Confidence: %s", word.confidence] + - print: + - "Word: %s" + - word.word + - print: + - "Confidence: %s" + - word.confidence diff --git a/google/cloud/speech/v1p1beta1/samples/speech_adaptation_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/test/speech_adaptation_beta.test.yaml similarity index 87% rename from google/cloud/speech/v1p1beta1/samples/speech_adaptation_beta.test.yaml rename to google/cloud/speech/v1p1beta1/samples/test/speech_adaptation_beta.test.yaml index a5be2cba3..4efe8e83f 100644 --- a/google/cloud/speech/v1p1beta1/samples/speech_adaptation_beta.test.yaml +++ b/google/cloud/speech/v1p1beta1/samples/test/speech_adaptation_beta.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Speech-to-Text Sample Tests For Speech Adaptation diff --git a/google/cloud/speech/v1p1beta1/samples/speech_contexts_classes_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/test/speech_contexts_classes_beta.test.yaml similarity index 88% rename from google/cloud/speech/v1p1beta1/samples/speech_contexts_classes_beta.test.yaml rename to google/cloud/speech/v1p1beta1/samples/test/speech_contexts_classes_beta.test.yaml index 6525a4beb..b6dccfc71 100644 --- a/google/cloud/speech/v1p1beta1/samples/speech_contexts_classes_beta.test.yaml +++ b/google/cloud/speech/v1p1beta1/samples/test/speech_contexts_classes_beta.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Speech-to-Text Sample Tests For Speech Contexts Static Classes diff --git a/google/cloud/speech/v1p1beta1/samples/speech_quickstart_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/test/speech_quickstart_beta.test.yaml similarity index 87% rename from google/cloud/speech/v1p1beta1/samples/speech_quickstart_beta.test.yaml rename to google/cloud/speech/v1p1beta1/samples/test/speech_quickstart_beta.test.yaml index 10ec749de..bd5bf6700 100644 --- a/google/cloud/speech/v1p1beta1/samples/speech_quickstart_beta.test.yaml +++ b/google/cloud/speech/v1p1beta1/samples/test/speech_quickstart_beta.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Speech-to-Text Sample Tests For Quickstart diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_auto_punctuation_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_auto_punctuation_beta.test.yaml similarity index 93% rename from google/cloud/speech/v1p1beta1/samples/speech_transcribe_auto_punctuation_beta.test.yaml rename to google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_auto_punctuation_beta.test.yaml index cb49b8c76..1ab5f79a0 100644 --- a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_auto_punctuation_beta.test.yaml +++ b/google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_auto_punctuation_beta.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Getting punctuation in results (Local File) (Beta) @@ -12,7 +14,7 @@ test: # Simply assert that actual punctuation is present from commercial_mono.wav - literal: "?" - literal: "," - - literal: "'" + - literal: "" # Confirm that another file can be transcribed (use another file) - name: speech_transcribe_auto_punctuation_beta (--local_file_path) diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_diarization_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_diarization_beta.test.yaml similarity index 97% rename from google/cloud/speech/v1p1beta1/samples/speech_transcribe_diarization_beta.test.yaml rename to google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_diarization_beta.test.yaml index f752efa53..409e4b54b 100644 --- a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_diarization_beta.test.yaml +++ b/google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_diarization_beta.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Separating different speakers (Local File) (LRO) (Beta) diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_multilanguage_beta.test.yaml similarity index 97% rename from google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.test.yaml rename to google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_multilanguage_beta.test.yaml index a9b0dd547..d9f2d7109 100644 --- a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.test.yaml +++ b/google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_multilanguage_beta.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Detecting language spoken automatically (Local File) (Beta) diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_recognition_metadata_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_recognition_metadata_beta.test.yaml similarity index 95% rename from google/cloud/speech/v1p1beta1/samples/speech_transcribe_recognition_metadata_beta.test.yaml rename to google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_recognition_metadata_beta.test.yaml index 7bcf7740c..57cf24a1d 100644 --- a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_recognition_metadata_beta.test.yaml +++ b/google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_recognition_metadata_beta.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Adding recognition metadata (Local File) (Beta) diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_word_level_confidence_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_word_level_confidence_beta.test.yaml similarity index 96% rename from google/cloud/speech/v1p1beta1/samples/speech_transcribe_word_level_confidence_beta.test.yaml rename to google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_word_level_confidence_beta.test.yaml index d5ab8f18c..0d7d60570 100644 --- a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_word_level_confidence_beta.test.yaml +++ b/google/cloud/speech/v1p1beta1/samples/test/speech_transcribe_word_level_confidence_beta.test.yaml @@ -1,3 +1,5 @@ +type: test/samples +schema_version: 1 test: suites: - name: Enabling word-level confidence (Local File) (Beta) diff --git a/google/cloud/speech/v1p1beta1/speech_gapic.legacy.yaml b/google/cloud/speech/v1p1beta1/speech_gapic.legacy.yaml new file mode 100644 index 000000000..0d778cd94 --- /dev/null +++ b/google/cloud/speech/v1p1beta1/speech_gapic.legacy.yaml @@ -0,0 +1,90 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.speech.v1p1beta1 + python: + package_name: google.cloud.speech_v1p1beta1.gapic + go: + package_name: cloud.google.com/go/speech/apiv1p1beta1 + csharp: + package_name: Google.Cloud.Speech.V1P1Beta1 + ruby: + package_name: Google::Cloud::Speech::V1p1beta1 + php: + package_name: Google\Cloud\Speech\V1p1beta1 + nodejs: + package_name: speech.v1p1beta1 + domain_layer_location: google-cloud +interfaces: +- name: google.cloud.speech.v1p1beta1.Speech + smoke_test: + method: Recognize + init_fields: + - config.language_code="en-US" + - config.sample_rate_hertz=44100 + - config.encoding=FLAC + - audio.uri="gs://gapic-toolkit/hello.flac" + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 1000000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 1000000 + total_timeout_millis: 5000000 + methods: + - name: Recognize + flattening: + groups: + - parameters: + - config + - audio + required_fields: + - config + - audio + sample_code_init_fields: + - config.encoding=FLAC + - config.sample_rate_hertz=44100 + - config.language_code="en-US" + - audio.uri=gs://bucket_name/file_name.flac + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 1000000 + - name: LongRunningRecognize + flattening: + groups: + - parameters: + - config + - audio + required_fields: + - config + - audio + sample_code_init_fields: + - config.encoding=FLAC + - config.sample_rate_hertz=44100 + - config.language_code="en-US" + - audio.uri=gs://bucket_name/file_name.flac + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + long_running: + return_type: google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse + metadata_type: google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + - name: StreamingRecognize + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 1000000 diff --git a/google/cloud/speech/v1p1beta1/speech_gapic.yaml b/google/cloud/speech/v1p1beta1/speech_gapic.yaml index d5312d129..f77b1a3fe 100644 --- a/google/cloud/speech/v1p1beta1/speech_gapic.yaml +++ b/google/cloud/speech/v1p1beta1/speech_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.speech.v1p1beta1 @@ -24,15 +24,7 @@ interfaces: - config.language_code="en-US" - config.sample_rate_hertz=44100 - config.encoding=FLAC - - audio.uri="gs://gapic-toolkit/hello.flac" - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] + - audio.uri="gs://cloud-samples-data/speech/brooklyn_bridge.flac" retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -44,387 +36,17 @@ interfaces: total_timeout_millis: 5000000 methods: - name: Recognize - flattening: - groups: - - parameters: - - config - - audio - required_fields: - - config - - audio + retry_codes_name: idempotent sample_code_init_fields: - config.encoding=FLAC - config.sample_rate_hertz=44100 - config.language_code="en-US" - audio.uri=gs://bucket_name/file_name.flac - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 1000000 - samples: - standalone: - - region_tag: speech_transcribe_word_level_confidence_beta - value_sets: - - speech_transcribe_word_level_confidence_beta - - region_tag: speech_transcribe_multilanguage_beta - value_sets: - - speech_transcribe_multilanguage_beta - - region_tag: speech_transcribe_recognition_metadata_beta - value_sets: - - speech_transcribe_recognition_metadata_beta - - region_tag: speech_transcribe_auto_punctuation_beta - value_sets: - - speech_transcribe_auto_punctuation_beta - - region_tag: speech_quickstart_beta - value_sets: - - speech_quickstart_beta - - region_tag: speech_adaptation_beta - value_sets: - - speech_adaptation_beta - - region_tag: speech_contexts_classes_beta - value_sets: - - speech_contexts_classes_beta - sample_value_sets: - - id: speech_transcribe_word_level_confidence_beta - title: Enabling word-level confidence (Local File) (Beta) - description: 'Print confidence level for individual words in a transcription - of a short audio file - -' - parameters: - defaults: - - audio.content = "resources/brooklyn_bridge.flac" - - config.enable_word_confidence = True - - config.language_code = "en-US" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: Path to local audio file, e.g. /path/audio.wav - - parameter: config.enable_word_confidence - description: | - When enabled, the first result returned by the API will include a list - of words and the confidence level for each of those words. - - parameter: config.language_code - description: The language of the supplied audio - on_success: - - comment: - - The first result includes confidence levels per word - - define: result=$resp.results[0] - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - comment: - - Print the confidence level of each word - - loop: - collection: alternative.words - variable: word - body: - - print: - - 'Word: %s' - - word.word - - print: - - 'Confidence: %s' - - word.confidence - - id: speech_transcribe_multilanguage_beta - title: Detecting language spoken automatically (Local File) (Beta) - description: 'Transcribe a short audio file with language detected from a list - of possible languages - -' - parameters: - defaults: - - audio.content = "resources/brooklyn_bridge.flac" - - config.language_code = "fr" - - config.alternative_language_codes[0] = "es" - - config.alternative_language_codes[1] = "en" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: Path to local audio file, e.g. /path/audio.wav - - parameter: config.alternative_language_codes[0] - description: 'Specify up to 3 additional languages as possible alternative - languages of the supplied audio. - -' - - parameter: config.language_code - description: | - The language of the supplied audio. Even though additional languages are - provided by alternative_language_codes, a primary language is still required. - on_success: - - loop: - variable: result - collection: "$resp.results" - body: - - comment: - - The %s which was detected as the most likely being spoken in the audio - - language_code - - print: - - 'Detected language: %s' - - result.language_code - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - id: speech_transcribe_auto_punctuation_beta - title: Getting punctuation in results (Local File) (Beta) - description: 'Transcribe a short audio file with punctuation - -' - parameters: - defaults: - - audio.content = "resources/commercial_mono.wav" - - config.enable_automatic_punctuation = True - - config.language_code = "en-US" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: Path to local audio file, e.g. /path/audio.wav - - parameter: config.enable_automatic_punctuation - description: 'When enabled, trascription results may include punctuation - (available for select languages). - -' - - parameter: config.language_code - description: | - The language of the supplied audio. Even though additional languages are - provided by alternative_language_codes, a primary language is still required. - on_success: - - loop: - variable: result - collection: "$resp.results" - body: - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - id: speech_transcribe_recognition_metadata_beta - title: Adding recognition metadata (Local File) (Beta) - description: "Adds additional details short audio file included in this recognition - request \n" - parameters: - defaults: - - audio.content = "resources/commercial_mono.wav" - - config.metadata.interaction_type = VOICE_SEARCH - - config.metadata.recording_device_type = SMARTPHONE - - config.metadata.recording_device_name = "Pixel 3" - - config.language_code = "en-US" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: Path to local audio file, e.g. /path/audio.wav - - parameter: config.metadata.interaction_type - description: 'The use case of the audio, e.g. PHONE_CALL, DISCUSSION, PRESENTATION, - et al. - -' - - parameter: config.metadata.recording_device_type - description: The kind of device used to capture the audio - - parameter: config.metadata.recording_device_name - description: | - The device used to make the recording. - Arbitrary string, e.g. 'Pixel XL', 'VoIP', 'Cardioid Microphone', or other value. - - parameter: config.language_code - description: | - The language of the supplied audio. Even though additional languages are - provided by alternative_language_codes, a primary language is still required. - on_success: - - loop: - variable: result - collection: "$resp.results" - body: - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - id: speech_quickstart_beta - description: "Performs synchronous speech recognition on an audio file." - parameters: - defaults: - - config.encoding=MP3 - - config.sample_rate_hertz=44100 - - config.language_code="en-US" - - audio.uri="gs://cloud-samples-data/speech/brooklyn_bridge.mp3" - attributes: - - parameter: config.sample_rate_hertz - sample_argument_name: sample_rate_hertz - description: "Sample rate in Hertz of the audio data sent in all `RecognitionAudio` messages. Valid values are: 8000-48000." - - parameter: config.language_code - sample_argument_name: language_code - description: The language of the supplied audio. - - parameter: audio.uri - sample_argument_name: uri_path - description: Path to the audio file stored on GCS. - on_success: - - loop: - collection: $resp.results - variable: result - body: - - define: transcript=result.alternatives[0].transcript - - print: ["Transcript: %s", transcript] - - id: speech_adaptation_beta - description: "Performs synchronous speech recognition with speech adaptation." - parameters: - defaults: - - config.encoding=MP3 - - config.sample_rate_hertz=44100 - - config.language_code="en-US" - - config.speech_contexts[0].phrases[0]="Brooklyn Bridge" - - config.speech_contexts[0].boost=20 - - audio.uri="gs://cloud-samples-data/speech/brooklyn_bridge.mp3" - attributes: - - parameter: config.sample_rate_hertz - sample_argument_name: sample_rate_hertz - description: "Sample rate in Hertz of the audio data sent in all `RecognitionAudio` messages. Valid values are: 8000-48000." - - parameter: config.language_code - sample_argument_name: language_code - description: The language of the supplied audio. - - parameter: config.speech_contexts[0].phrases[0] - sample_argument_name: phrase - description: Phrase "hints" help Speech-to-Text API recognize the specified phrases from your audio data. - - parameter: config.speech_contexts[0].boost - sample_argument_name: boost - description: Positive value will increase the probability that a specific phrase will be recognized over other similar sounding phrases. - - parameter: audio.uri - sample_argument_name: uri_path - description: Path to the audio file stored on GCS. - on_success: - - loop: - variable: result - collection: "$resp.results" - body: - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - id: speech_contexts_classes_beta - description: "Performs synchronous speech recognition with static context classes." - parameters: - defaults: - - config.encoding=MP3 - - config.sample_rate_hertz=24000 - - config.language_code="en-US" - - config.speech_contexts[0].phrases[0]="$TIME" - - audio.uri="gs://cloud-samples-data/speech/time.mp3" - attributes: - - parameter: config.sample_rate_hertz - sample_argument_name: sample_rate_hertz - description: "Sample rate in Hertz of the audio data sent in all `RecognitionAudio` messages. Valid values are: 8000-48000." - - parameter: config.language_code - sample_argument_name: language_code - description: The language of the supplied audio. - - parameter: config.speech_contexts[0].phrases[0] - sample_argument_name: phrase - description: Phrase "hints" help Speech-to-Text API recognize the specified phrases from your audio data. In this sample we are using a static class phrase ($TIME). Classes represent groups of words that represent common concepts that occur in natural language. We recommend checking out the docs page for more info on static classes. - - parameter: audio.uri - sample_argument_name: uri_path - description: Path to the audio file stored on GCS. - on_success: - - loop: - variable: result - collection: "$resp.results" - body: - - comment: - - First alternative is the most probable result - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - name: LongRunningRecognize - flattening: - groups: - - parameters: - - config - - audio - required_fields: - - config - - audio sample_code_init_fields: - config.encoding=FLAC - config.sample_rate_hertz=44100 - config.language_code="en-US" - audio.uri=gs://bucket_name/file_name.flac - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - long_running: - return_type: google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse - metadata_type: google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata - initial_poll_delay_millis: 20000 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 45000 - total_poll_timeout_millis: 86400000 - samples: - standalone: - - region_tag: speech_transcribe_diarization_beta - value_sets: - - speech_transcribe_diarization_beta - sample_value_sets: - - id: speech_transcribe_diarization_beta - title: Separating different speakers (Local File) (LRO) (Beta) - description: | - Print confidence level for individual words in a transcription of a short audio file - Separating different speakers in an audio file recording - parameters: - defaults: - - audio.content = "resources/commercial_mono.wav" - - config.enable_speaker_diarization = True - - config.diarization_speaker_count = 2 - - config.language_code = "en-US" - attributes: - - parameter: audio.content - sample_argument_name: local_file_path - read_file: true - description: Path to local audio file, e.g. /path/audio.wav - - parameter: config.enable_speaker_diarization - description: | - If enabled, each word in the first alternative of each result will be - tagged with a speaker tag to identify the speaker. - - parameter: config.diarization_speaker_count - description: 'Optional. Specifies the estimated number of speakers in the - conversation. - -' - - parameter: config.language_code - description: The language of the supplied audio - on_success: - - loop: - collection: "$resp.results" - variable: result - body: - - comment: - - First alternative has words tagged with speakers - - define: alternative=result.alternatives[0] - - print: - - 'Transcript: %s' - - alternative.transcript - - comment: - - Print the %s of each word - - speaker_tag - - loop: - collection: alternative.words - variable: word - body: - - print: - - 'Word: %s' - - word.word - - print: - - 'Speaker tag: %s' - - word.speaker_tag - name: StreamingRecognize retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 1000000 diff --git a/google/cloud/speech/v1p1beta1/speech_grpc_service_config.json b/google/cloud/speech/v1p1beta1/speech_grpc_service_config.json new file mode 100755 index 000000000..abc988ca4 --- /dev/null +++ b/google/cloud/speech/v1p1beta1/speech_grpc_service_config.json @@ -0,0 +1,35 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.speech.v1p1beta1.Speech", + "method": "Recognize" + }, + { + "service": "google.cloud.speech.v1p1beta1.Speech", + "method": "StreamingRecognize" + } + ], + "timeout": "5000s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.speech.v1p1beta1.Speech", + "method": "LongRunningRecognize" + } + ], + "timeout": "5000s" + } + ] +} diff --git a/google/cloud/speech/v1p1beta1/speech_v1p1beta1.yaml b/google/cloud/speech/v1p1beta1/speech_v1p1beta1.yaml new file mode 100644 index 000000000..9d5e374b7 --- /dev/null +++ b/google/cloud/speech/v1p1beta1/speech_v1p1beta1.yaml @@ -0,0 +1,47 @@ +type: google.api.Service +config_version: 3 +name: speech.googleapis.com +title: Cloud Speech-to-Text API + +apis: +- name: google.cloud.speech.v1p1beta1.Speech + +types: +- name: google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata +- name: google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse + +documentation: + summary: Converts audio to text by applying powerful neural network models. + overview: |- + # Introduction + + Google Cloud Speech API provides speech recognition as a service. + +backend: + rules: + - selector: 'google.cloud.speech.v1p1beta1.Speech.*' + deadline: 355.0 + - selector: 'google.longrunning.Operations.*' + deadline: 355.0 + +http: + rules: + - selector: google.longrunning.Operations.GetOperation + get: '/v1p1beta1/operations/{name=**}' + additional_bindings: + - get: '/v1p1beta1/{name=projects/*/locations/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1p1beta1/operations' + additional_bindings: + - get: '/v1p1beta1/{name=projects/*/locations/*}/operations' + +authentication: + rules: + - selector: 'google.cloud.speech.v1p1beta1.Speech.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/talent/BUILD.bazel b/google/cloud/talent/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/cloud/talent/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/talent/talent_v4beta1.yaml b/google/cloud/talent/talent_v4beta1.yaml index 01a300b79..d418c1ac9 100644 --- a/google/cloud/talent/talent_v4beta1.yaml +++ b/google/cloud/talent/talent_v4beta1.yaml @@ -51,6 +51,11 @@ backend: - selector: 'google.longrunning.Operations.*' deadline: 30.0 +http: + rules: + - selector: google.longrunning.Operations.GetOperation + get: '/v4beta1/{name=projects/*/operations/*}' + authentication: rules: - selector: 'google.cloud.talent.v4beta1.ApplicationService.*' diff --git a/google/cloud/talent/v4beta1/BUILD.bazel b/google/cloud/talent/v4beta1/BUILD.bazel new file mode 100644 index 000000000..9cf7d3dc8 --- /dev/null +++ b/google/cloud/talent/v4beta1/BUILD.bazel @@ -0,0 +1,417 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "talent_proto", + srcs = [ + "application.proto", + "application_service.proto", + "batch.proto", + "common.proto", + "company.proto", + "company_service.proto", + "completion_service.proto", + "event.proto", + "event_service.proto", + "filters.proto", + "histogram.proto", + "job.proto", + "job_service.proto", + "profile.proto", + "profile_service.proto", + "tenant.proto", + "tenant_service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "//google/type:date_proto", + "//google/type:latlng_proto", + "//google/type:money_proto", + "//google/type:postal_address_proto", + "//google/type:timeofday_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library_with_info( + name = "talent_proto_with_info", + deps = [ + ":talent_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "talent_java_proto", + deps = [":talent_proto"], +) + +java_grpc_library( + name = "talent_java_grpc", + srcs = [":talent_proto"], + deps = [":talent_java_proto"], +) + +java_gapic_library( + name = "talent_java_gapic", + src = ":talent_proto_with_info", + gapic_yaml = "talent_gapic.yaml", + package = "google.cloud.talent.v4beta1", + service_yaml = "//google/cloud/talent:talent_v4beta1.yaml", + test_deps = [ + ":talent_java_grpc", + ], + deps = [ + ":talent_java_proto", + ], +) + +java_gapic_test( + name = "talent_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.talent.v4beta1.ApplicationServiceClientTest", + "com.google.cloud.talent.v4beta1.CompanyServiceClientTest", + "com.google.cloud.talent.v4beta1.CompletionClientTest", + "com.google.cloud.talent.v4beta1.EventServiceClientTest", + "com.google.cloud.talent.v4beta1.JobServiceClientTest", + "com.google.cloud.talent.v4beta1.ProfileServiceClientTest", + "com.google.cloud.talent.v4beta1.TenantServiceClientTest", + ], + runtime_deps = [":talent_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-talent-v4beta1-java", + deps = [ + ":talent_java_gapic", + ":talent_java_grpc", + ":talent_java_proto", + ":talent_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "talent_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1", + protos = [":talent_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + "//google/rpc:status_go_proto", + "//google/type:date_go_proto", + "//google/type:latlng_go_proto", + "//google/type:money_go_proto", + "//google/type:postaladdress_go_proto", + "//google/type:timeofday_go_proto", + ], +) + +go_gapic_library( + name = "talent_go_gapic", + srcs = [":talent_proto_with_info"], + grpc_service_config = "talent_grpc_service_config.json", + importpath = "cloud.google.com/go/talent/apiv4beta1;talent", + service_yaml = "//google/cloud/talent:talent_v4beta1.yaml", + deps = [ + ":talent_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:any_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +go_test( + name = "talent_go_gapic_test", + srcs = [":talent_go_gapic_srcjar_test"], + embed = [":talent_go_gapic"], + importpath = "cloud.google.com/go/talent/apiv4beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-talent-v4beta1-go", + deps = [ + ":talent_go_gapic", + ":talent_go_gapic_srcjar-test.srcjar", + ":talent_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "talent_moved_proto", + srcs = [":talent_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "//google/type:date_proto", + "//google/type:latlng_proto", + "//google/type:money_proto", + "//google/type:postal_address_proto", + "//google/type:timeofday_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "talent_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":talent_moved_proto"], +) + +py_grpc_library( + name = "talent_py_grpc", + srcs = [":talent_moved_proto"], + deps = [":talent_py_proto"], +) + +py_gapic_library( + name = "talent_py_gapic", + src = ":talent_proto_with_info", + gapic_yaml = "talent_gapic.yaml", + package = "google.cloud.talent.v4beta1", + service_yaml = "//google/cloud/talent:talent_v4beta1.yaml", + deps = [ + ":talent_py_grpc", + ":talent_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "talent-v4beta1-py", + deps = [ + ":talent_py_gapic", + ":talent_py_grpc", + ":talent_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "talent_php_proto", + deps = [":talent_proto"], +) + +php_grpc_library( + name = "talent_php_grpc", + srcs = [":talent_proto"], + deps = [":talent_php_proto"], +) + +php_gapic_library( + name = "talent_php_gapic", + src = ":talent_proto_with_info", + gapic_yaml = "talent_gapic.yaml", + package = "google.cloud.talent.v4beta1", + service_yaml = "//google/cloud/talent:talent_v4beta1.yaml", + deps = [ + ":talent_php_grpc", + ":talent_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-talent-v4beta1-php", + deps = [ + ":talent_php_gapic", + ":talent_php_grpc", + ":talent_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "talent_nodejs_gapic", + src = ":talent_proto_with_info", + gapic_yaml = "talent_gapic.yaml", + package = "google.cloud.talent.v4beta1", + service_yaml = "//google/cloud/talent:talent_v4beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "talent-v4beta1-nodejs", + deps = [ + ":talent_nodejs_gapic", + ":talent_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "talent_ruby_proto", + deps = [":talent_proto"], +) + +ruby_grpc_library( + name = "talent_ruby_grpc", + srcs = [":talent_proto"], + deps = [":talent_ruby_proto"], +) + +ruby_gapic_library( + name = "talent_ruby_gapic", + src = ":talent_proto_with_info", + gapic_yaml = "talent_gapic.yaml", + package = "google.cloud.talent.v4beta1", + service_yaml = "//google/cloud/talent:talent_v4beta1.yaml", + deps = [ + ":talent_ruby_grpc", + ":talent_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-talent-v4beta1-ruby", + deps = [ + ":talent_ruby_gapic", + ":talent_ruby_grpc", + ":talent_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "talent_csharp_proto", + deps = [":talent_proto"], +) + +csharp_grpc_library( + name = "talent_csharp_grpc", + srcs = [":talent_proto"], + deps = [":talent_csharp_proto"], +) + +csharp_gapic_library( + name = "talent_csharp_gapic", + src = ":talent_proto_with_info", + gapic_yaml = "talent_gapic.yaml", + package = "google.cloud.talent.v4beta1", + service_yaml = "//google/cloud/talent:talent_v4beta1.yaml", + deps = [ + ":talent_csharp_grpc", + ":talent_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-talent-v4beta1-csharp", + deps = [ + ":talent_csharp_gapic", + ":talent_csharp_grpc", + ":talent_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/talent/v4beta1/application.proto b/google/cloud/talent/v4beta1/application.proto index 30ce2fed8..ccb492089 100644 --- a/google/cloud/talent/v4beta1/application.proto +++ b/google/cloud/talent/v4beta1/application.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.talent.v4beta1; import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/talent/v4beta1/common.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; @@ -31,6 +32,11 @@ option objc_class_prefix = "CTS"; // Resource that represents a job application record of a candidate. message Application { + option (google.api.resource) = { + type: "jobs.googleapis.com/Application" + pattern: "projects/{project}/tenants/{tenant}/profiles/{profile}/applications/{application}" + }; + // Enum that represents the application status. enum ApplicationState { // Default value. @@ -92,85 +98,86 @@ message Application { // Resource name assigned to an application by the API. // // The format is - // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}", - // for example, - // "projects/api-test-project/tenants/foo/profiles/bar/applications/baz". + // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}". + // For example, "projects/foo/tenants/bar/profiles/baz/applications/qux". string name = 1; // Required. Client side application identifier, used to uniquely identify the // application. // // The maximum number of allowed characters is 255. - string external_id = 31; + string external_id = 31 [(google.api.field_behavior) = REQUIRED]; // Output only. Resource name of the candidate of this application. // // The format is - // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", - // for example, "projects/api-test-project/tenants/foo/profiles/bar". - string profile = 2; + // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}". + // For example, "projects/foo/tenants/bar/profiles/baz". + string profile = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // One of either a job or a company is required. - // - // Resource name of the job which the candidate applied for. + // Required. Resource name of the job which the candidate applied for. // // The format is - // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", - // for example, "projects/api-test-project/tenants/foo/jobs/bar". - string job = 4; + // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, + // "projects/foo/tenants/bar/jobs/baz". + string job = 4 [ + (google.api.resource_reference).type = "jobs.googleapis.com/Job", + (google.api.field_behavior) = REQUIRED + ]; - // One of either a job or a company is required. - // // Resource name of the company which the candidate applied for. // // The format is - // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", - // for example, "projects/api-test-project/tenants/foo/companies/bar". - string company = 5; + // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". + // For example, "projects/foo/tenants/bar/companies/baz". + string company = 5 [ + (google.api.resource_reference) = { type: "jobs.googleapis.com/Company" } + ]; - // Optional. The application date. + // The application date. google.type.Date application_date = 7; // Required. What is the most recent stage of the application (that is, new, // screen, send cv, hired, finished work)? This field is intentionally not // comprehensive of every possible status, but instead, represents statuses // that would be used to indicate to the ML models good / bad matches. - ApplicationStage stage = 11; + ApplicationStage stage = 11 [(google.api.field_behavior) = REQUIRED]; - // Optional. The application state. + // The application state. ApplicationState state = 13; - // Optional. All interviews (screen, onsite, and so on) conducted as part of - // this application (includes details such as user conducting the interview, + // All interviews (screen, onsite, and so on) conducted as part of this + // application (includes details such as user conducting the interview, // timestamp, feedback, and so on). repeated Interview interviews = 16; - // Optional. If the candidate is referred by a employee. + // If the candidate is referred by a employee. google.protobuf.BoolValue referral = 18; // Required. Reflects the time that the application was created. - google.protobuf.Timestamp create_time = 19; + google.protobuf.Timestamp create_time = 19 + [(google.api.field_behavior) = REQUIRED]; - // Optional. The last update timestamp. + // The last update timestamp. google.protobuf.Timestamp update_time = 20; - // Optional. Free text reason behind the recruitement outcome (for example, - // reason for withdraw / reject, reason for an unsuccessful finish, and so - // on). + // Free text reason behind the recruitement outcome (for example, reason for + // withdraw / reject, reason for an unsuccessful finish, and so on). // // Number of characters allowed is 100. string outcome_notes = 21; - // Optional. Outcome positiveness shows how positive the outcome is. + // Outcome positiveness shows how positive the outcome is. Outcome outcome = 22; // Output only. Indicates whether this job application is a match to // application related filters. This value is only applicable in profile // search response. - google.protobuf.BoolValue is_match = 28; + google.protobuf.BoolValue is_match = 28 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Job title snippet shows how the job title is related to a // search query. It's empty if the job title isn't related to the search // query. - string job_title_snippet = 29; + string job_title_snippet = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/cloud/talent/v4beta1/application_service.proto b/google/cloud/talent/v4beta1/application_service.proto index 48e4f9500..c9f990dab 100644 --- a/google/cloud/talent/v4beta1/application_service.proto +++ b/google/cloud/talent/v4beta1/application_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.cloud.talent.v4beta1; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/talent/v4beta1/application.proto"; import "google/cloud/talent/v4beta1/common.proto"; import "google/protobuf/empty.proto"; @@ -44,6 +45,7 @@ service ApplicationService { post: "/v4beta1/{parent=projects/*/tenants/*/profiles/*}/applications" body: "*" }; + option (google.api.method_signature) = "parent,application"; } // Retrieves specified application. @@ -51,6 +53,7 @@ service ApplicationService { option (google.api.http) = { get: "/v4beta1/{name=projects/*/tenants/*/profiles/*/applications/*}" }; + option (google.api.method_signature) = "name"; } // Updates specified application. @@ -59,37 +62,42 @@ service ApplicationService { patch: "/v4beta1/{application.name=projects/*/tenants/*/profiles/*/applications/*}" body: "*" }; + option (google.api.method_signature) = "application"; } // Deletes specified application. - rpc DeleteApplication(DeleteApplicationRequest) - returns (google.protobuf.Empty) { + rpc DeleteApplication(DeleteApplicationRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v4beta1/{name=projects/*/tenants/*/profiles/*/applications/*}" }; + option (google.api.method_signature) = "name"; } // Lists all applications associated with the profile. - rpc ListApplications(ListApplicationsRequest) - returns (ListApplicationsResponse) { + rpc ListApplications(ListApplicationsRequest) returns (ListApplicationsResponse) { option (google.api.http) = { get: "/v4beta1/{parent=projects/*/tenants/*/profiles/*}/applications" }; + option (google.api.method_signature) = "parent"; } } // The Request of the CreateApplication method. message CreateApplicationRequest { - // Required. Resource name of the profile under which the application is - // created. + // Required. Resource name of the profile under which the application is created. // // The format is - // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", for - // example, "projects/test-project/tenants/test-tenant/profiles/test-profile". - string parent = 1; + // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}". + // For example, "projects/foo/tenants/bar/profiles/baz". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Profile" + } + ]; // Required. The application to be created. - Application application = 2; + Application application = 2 [(google.api.field_behavior) = REQUIRED]; } // Request for getting a application by name. @@ -97,30 +105,28 @@ message GetApplicationRequest { // Required. The resource name of the application to be retrieved. // // The format is - // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}", - // for example, - // "projects/test-project/tenants/test-tenant/profiles/test-profile/applications/test-application". - string name = 1; + // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}". + // For example, "projects/foo/tenants/bar/profiles/baz/applications/qux". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Application" + } + ]; } // Request for updating a specified application. message UpdateApplicationRequest { - // Required. The application resource to replace the current resource in the - // system. - Application application = 1; + // Required. The application resource to replace the current resource in the system. + Application application = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional but strongly recommended for the best service - // experience. + // Strongly recommended for the best service experience. // - // If - // [update_mask][google.cloud.talent.v4beta1.UpdateApplicationRequest.update_mask] - // is provided, only the specified fields in - // [application][google.cloud.talent.v4beta1.UpdateApplicationRequest.application] - // are updated. Otherwise all the fields are updated. + // If [update_mask][google.cloud.talent.v4beta1.UpdateApplicationRequest.update_mask] is provided, only the specified fields in + // [application][google.cloud.talent.v4beta1.UpdateApplicationRequest.application] are updated. Otherwise all the fields are updated. // // A field mask to specify the application fields to be updated. Only - // top level fields of [Application][google.cloud.talent.v4beta1.Application] - // are supported. + // top level fields of [Application][google.cloud.talent.v4beta1.Application] are supported. google.protobuf.FieldMask update_mask = 2; } @@ -129,32 +135,38 @@ message DeleteApplicationRequest { // Required. The resource name of the application to be deleted. // // The format is - // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}", - // for example, - // "projects/test-project/tenants/test-tenant/profiles/test-profile/applications/test-application". - string name = 1; + // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}". + // For example, "projects/foo/tenants/bar/profiles/baz/applications/qux". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Application" + } + ]; } // List applications for which the client has ACL visibility. message ListApplicationsRequest { - // Required. Resource name of the profile under which the application is - // created. + // Required. Resource name of the profile under which the application is created. // // The format is // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", for - // example, "projects/test-project/tenants/test-tenant/profiles/test-profile". - string parent = 1; - - // Optional. The starting indicator from which to return results. + // example, "projects/foo/tenants/bar/profiles/baz". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Profile" + } + ]; + + // The starting indicator from which to return results. string page_token = 2; - // Optional. The maximum number of applications to be returned, at most 100. + // The maximum number of applications to be returned, at most 100. // Default is 100 if a non-positive number is provided. int32 page_size = 3; } -// Output only. -// // The List applications response object. message ListApplicationsResponse { // Applications for the current client. diff --git a/google/cloud/talent/v4beta1/batch.proto b/google/cloud/talent/v4beta1/batch.proto index 5eeeff57c..074e87050 100644 --- a/google/cloud/talent/v4beta1/batch.proto +++ b/google/cloud/talent/v4beta1/batch.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,111 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.talent.v4beta1; import "google/api/annotations.proto"; -import "google/cloud/talent/v4beta1/job.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; option java_multiple_files = true; option java_outer_classname = "BatchProto"; option java_package = "com.google.cloud.talent.v4beta1"; option objc_class_prefix = "CTS"; - -// Output only. -// -// Metadata used for long running operations returned by CTS batch APIs. -// It's used to replace -// [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata]. -message BatchOperationMetadata { - enum State { - // Default value. - STATE_UNSPECIFIED = 0; - - // The batch operation is being prepared for processing. - INITIALIZING = 1; - - // The batch operation is actively being processed. - PROCESSING = 2; - - // The batch operation is processed, and at least one item has been - // successfully processed. - SUCCEEDED = 3; - - // The batch operation is done and no item has been successfully processed. - FAILED = 4; - - // The batch operation is in the process of cancelling after - // [google.longrunning.Operation.CancelOperation] is called. - CANCELLING = 5; - - // The batch operation is done after - // [google.longrunning.Operation.CancelOperation] is called. Any items - // processed before cancelling are returned in the response. - CANCELLED = 6; - } - - // The state of a long running operation. - State state = 1; - - // More detailed information about operation state. - string state_description = 2; - - // Count of successful item(s) inside an operation. - int32 success_count = 3; - - // Count of failed item(s) inside an operation. - int32 failure_count = 4; - - // Count of total item(s) inside an operation. - int32 total_count = 5; - - // The time when the batch operation is created. - google.protobuf.Timestamp create_time = 6; - - // The time when the batch operation status is updated. The metadata and the - // [update_time][google.cloud.talent.v4beta1.BatchOperationMetadata.update_time] - // is refreshed every minute otherwise cached data is returned. - google.protobuf.Timestamp update_time = 7; - - // The time when the batch operation is finished and - // [google.longrunning.Operation.done][google.longrunning.Operation.done] is - // set to `true`. - google.protobuf.Timestamp end_time = 8; -} - -// Output only. -// -// The result of [BatchCreateJobs][] or [BatchUpdateJobs][] APIs. It's used to -// replace -// [google.longrunning.Operation.response][google.longrunning.Operation.response] -// in case of success. -message JobOperationResult { - // Mutation result of a job. - message JobResult { - // Here [Job][google.cloud.talent.v4beta1.Job] only contains basic - // information including [name][google.cloud.talent.v4beta1.Job.name], - // [company][google.cloud.talent.v4beta1.Job.company], - // [language_code][google.cloud.talent.v4beta1.Job.language_code] and - // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], use - // getJob method to retrieve detailed information of the created/updated - // job. - Job job = 1; - - // The status of the job processed. This field is populated if the - // processing of the - // [job][google.cloud.talent.v4beta1.JobOperationResult.JobResult.job] - // fails. - google.rpc.Status status = 2; - } - - // List of job mutation results from a batch mutate operation. It can change - // until operation status is FINISHED, FAILED or CANCELLED. - repeated JobResult job_results = 1; -} diff --git a/google/cloud/talent/v4beta1/common.proto b/google/cloud/talent/v4beta1/common.proto index 1513d795c..13f774217 100644 --- a/google/cloud/talent/v4beta1/common.proto +++ b/google/cloud/talent/v4beta1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.talent.v4beta1; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; import "google/type/date.proto"; @@ -25,6 +24,7 @@ import "google/type/latlng.proto"; import "google/type/money.proto"; import "google/type/postal_address.proto"; import "google/type/timeofday.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; option java_multiple_files = true; @@ -41,8 +41,7 @@ message TimestampRange { google.protobuf.Timestamp end_time = 2; } -// Output only. A resource that represents a location with full geographic -// information. +// A resource that represents a location with full geographic information. message Location { // An enum which represents the type of a location. enum LocationType { @@ -85,11 +84,9 @@ message Location { } // The type of a location, which corresponds to the address lines field of - // [google.type.PostalAddress][google.type.PostalAddress]. For example, - // "Downtown, Atlanta, GA, USA" has a type of - // [LocationType.NEIGHBORHOOD][google.cloud.talent.v4beta1.Location.LocationType.NEIGHBORHOOD], - // and "Kansas City, KS, USA" has a type of - // [LocationType.LOCALITY][google.cloud.talent.v4beta1.Location.LocationType.LOCALITY]. + // [google.type.PostalAddress][google.type.PostalAddress]. For example, "Downtown, Atlanta, GA, USA" + // has a type of [LocationType.NEIGHBORHOOD][google.cloud.talent.v4beta1.Location.LocationType.NEIGHBORHOOD], and "Kansas City, KS, USA" + // has a type of [LocationType.LOCALITY][google.cloud.talent.v4beta1.Location.LocationType.LOCALITY]. LocationType location_type = 1; // Postal address of the location that includes human readable information, @@ -103,9 +100,10 @@ message Location { // Radius in miles of the job location. This value is derived from the // location bounding box in which a circle with the specified radius - // centered from [google.type.LatLng][google.type.LatLng] covers the area - // associated with the job location. For example, currently, "Mountain View, - // CA, USA" has a radius of 6.17 miles. + // centered from [google.type.LatLng][google.type.LatLng] covers the area associated with the + // job location. + // For example, currently, "Mountain View, CA, USA" has a radius of + // 6.17 miles. double radius_miles = 4; } @@ -256,8 +254,7 @@ enum EmploymentType { // The job is offered as a contracted position with the understanding // that it's converted into a full-time position at the end of the // contract. Jobs of this type are also returned by a search for - // [EmploymentType.CONTRACTOR][google.cloud.talent.v4beta1.EmploymentType.CONTRACTOR] - // jobs. + // [EmploymentType.CONTRACTOR][google.cloud.talent.v4beta1.EmploymentType.CONTRACTOR] jobs. CONTRACT_TO_HIRE = 4; // The job is offered as a temporary employment opportunity, usually @@ -417,11 +414,10 @@ enum PostingRegion { POSTING_REGION_UNSPECIFIED = 0; // In addition to exact location matching, job posting is returned when the - // [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] in the search - // query is in the same administrative area as the returned job posting. For - // example, if a `ADMINISTRATIVE_AREA` job is posted in "CA, USA", it's - // returned if [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] - // has "Mountain View". + // [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] in the search query is in the same administrative area + // as the returned job posting. For example, if a `ADMINISTRATIVE_AREA` job + // is posted in "CA, USA", it's returned if [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] has + // "Mountain View". // // Administrative area refers to top-level administrative subdivision of this // country. For example, US state, IT region, UK constituent nation and @@ -429,11 +425,9 @@ enum PostingRegion { ADMINISTRATIVE_AREA = 1; // In addition to exact location matching, job is returned when - // [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] in search - // query is in the same country as this job. For example, if a `NATION_WIDE` - // job is posted in "USA", it's returned if - // [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] has 'Mountain - // View'. + // [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] in search query is in the same country as this job. + // For example, if a `NATION_WIDE` job is posted in "USA", it's + // returned if [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] has 'Mountain View'. NATION = 2; // Job allows employees to work remotely (telecommute). @@ -442,8 +436,12 @@ enum PostingRegion { TELECOMMUTE = 3; } +// Deprecated. All resources are only visible to the owner. +// // An enum that represents who has view access to the resource. enum Visibility { + option deprecated = true; + // Default value. VISIBILITY_UNSPECIFIED = 0; @@ -474,8 +472,6 @@ enum ContactInfoUsage { SCHOOL = 3; } -// Input only. -// // Option for HTML content sanitization on user input fields, for example, job // description. By setting this option, user can determine whether and how // sanitization is performed on these fields. @@ -510,15 +506,11 @@ enum CommuteMethod { CYCLING = 4; } -// Input only. -// // Meta information related to the job searcher or entity // conducting the job search. This information is used to improve the // performance of the service. message RequestMetadata { - // Required if - // [allow_missing_ids][google.cloud.talent.v4beta1.RequestMetadata.allow_missing_ids] - // is unset or `false`. + // Required if [allow_missing_ids][google.cloud.talent.v4beta1.RequestMetadata.allow_missing_ids] is unset or `false`. // // The client-defined scope or source of the service call, which typically // is the domain on @@ -535,9 +527,7 @@ message RequestMetadata { // The maximum number of allowed characters is 255. string domain = 1; - // Required if - // [allow_missing_ids][google.cloud.talent.v4beta1.RequestMetadata.allow_missing_ids] - // is unset or `false`. + // Required if [allow_missing_ids][google.cloud.talent.v4beta1.RequestMetadata.allow_missing_ids] is unset or `false`. // // A unique session identification string. A session is defined as the // duration of an end user's interaction with the service over a certain @@ -551,9 +541,7 @@ message RequestMetadata { // The maximum number of allowed characters is 255. string session_id = 2; - // Required if - // [allow_missing_ids][google.cloud.talent.v4beta1.RequestMetadata.allow_missing_ids] - // is unset or `false`. + // Required if [allow_missing_ids][google.cloud.talent.v4beta1.RequestMetadata.allow_missing_ids] is unset or `false`. // // A unique user identification string, as determined by the client. // To have the strongest positive impact on search quality @@ -567,25 +555,18 @@ message RequestMetadata { // The maximum number of allowed characters is 255. string user_id = 3; - // Optional. If set to `true`, - // [domain][google.cloud.talent.v4beta1.RequestMetadata.domain], - // [session_id][google.cloud.talent.v4beta1.RequestMetadata.session_id] and - // [user_id][google.cloud.talent.v4beta1.RequestMetadata.user_id] are - // optional. Only set when any of these fields isn't available for some - // reason. It is highly recommended not to set this field and provide accurate - // [domain][google.cloud.talent.v4beta1.RequestMetadata.domain], - // [session_id][google.cloud.talent.v4beta1.RequestMetadata.session_id] and - // [user_id][google.cloud.talent.v4beta1.RequestMetadata.user_id] for the best - // service experience. + // Only set when any of [domain][google.cloud.talent.v4beta1.RequestMetadata.domain], [session_id][google.cloud.talent.v4beta1.RequestMetadata.session_id] and [user_id][google.cloud.talent.v4beta1.RequestMetadata.user_id] isn't + // available for some reason. It is highly recommended not to set this field + // and provide accurate [domain][google.cloud.talent.v4beta1.RequestMetadata.domain], [session_id][google.cloud.talent.v4beta1.RequestMetadata.session_id] and [user_id][google.cloud.talent.v4beta1.RequestMetadata.user_id] for the + // best service experience. bool allow_missing_ids = 4; - // Optional. The type of device used by the job seeker at the time of the call - // to the service. + // The type of device used by the job seeker at the time of the call to the + // service. DeviceInfo device_info = 5; } -// Output only. Additional information returned to client, such as debugging -// information. +// Additional information returned to client, such as debugging information. message ResponseMetadata { // A unique id associated with this call. // This id is logged for tracking purposes. @@ -623,52 +604,44 @@ message DeviceInfo { OTHER = 6; } - // Optional. Type of the device. + // Type of the device. DeviceType device_type = 1; - // Optional. A device-specific ID. The ID must be a unique identifier that + // A device-specific ID. The ID must be a unique identifier that // distinguishes the device from other devices. string id = 2; } // Custom attribute values that are either filterable or non-filterable. message CustomAttribute { - // Optional but exactly one of - // [string_values][google.cloud.talent.v4beta1.CustomAttribute.string_values] - // or [long_values][google.cloud.talent.v4beta1.CustomAttribute.long_values] - // must be specified. + // Exactly one of [string_values][google.cloud.talent.v4beta1.CustomAttribute.string_values] or [long_values][google.cloud.talent.v4beta1.CustomAttribute.long_values] must be specified. // // This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or // `CASE_INSENSITIVE_MATCH`) search. // For filterable `string_value`s, a maximum total number of 200 values // is allowed, with each `string_value` has a byte size of no more than - // 255B. For unfilterable `string_values`, the maximum total byte size of + // 500B. For unfilterable `string_values`, the maximum total byte size of // unfilterable `string_values` is 50KB. // // Empty string isn't allowed. repeated string string_values = 1; - // Optional but exactly one of - // [string_values][google.cloud.talent.v4beta1.CustomAttribute.string_values] - // or [long_values][google.cloud.talent.v4beta1.CustomAttribute.long_values] - // must be specified. + // Exactly one of [string_values][google.cloud.talent.v4beta1.CustomAttribute.string_values] or [long_values][google.cloud.talent.v4beta1.CustomAttribute.long_values] must be specified. // // This field is used to perform number range search. // (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. // - // Currently at most 1 - // [long_values][google.cloud.talent.v4beta1.CustomAttribute.long_values] is - // supported. + // Currently at most 1 [long_values][google.cloud.talent.v4beta1.CustomAttribute.long_values] is supported. repeated int64 long_values = 2; - // Optional. If the `filterable` flag is true, custom field values are - // searchable. If false, values are not searchable. + // If the `filterable` flag is true, custom field values are searchable. + // If false, values are not searchable. // // Default is false. bool filterable = 3; } -// Output only. Spell check result. +// Spell check result. message SpellingCorrection { // Indicates if the query was corrected by the spell checker. bool corrected = 1; @@ -692,52 +665,38 @@ message CompensationInfo { // as base pay, bonus, or other compensation type. // // Annualization: One compensation entry can be annualized if - // - it contains valid - // [amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] - // or - // [range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range]. - // - and its - // [expected_units_per_year][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.expected_units_per_year] - // is set or can be derived. Its annualized range is determined as - // ([amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] - // or - // [range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range]) - // times + // - it contains valid [amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] or [range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range]. + // - and its [expected_units_per_year][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.expected_units_per_year] is set or can be derived. + // Its annualized range is determined as ([amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] or [range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range]) times // [expected_units_per_year][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.expected_units_per_year]. message CompensationEntry { - // Optional. Compensation type. + // Compensation type. // - // Default is - // [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4beta1.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED]. + // Default is [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4beta1.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED]. CompensationType type = 1; - // Optional. Frequency of the specified amount. + // Frequency of the specified amount. // - // Default is - // [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED]. + // Default is [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED]. CompensationUnit unit = 2; - // Optional. - // // Compensation amount. It could be a fixed amount or a floating range. oneof compensation_amount { - // Optional. Compensation amount. + // Compensation amount. google.type.Money amount = 3; - // Optional. Compensation range. + // Compensation range. CompensationRange range = 4; } - // Optional. Compensation description. For example, could + // Compensation description. For example, could // indicate equity terms or provide additional context to an estimated // bonus. string description = 5; - // Optional. Expected number of units paid each year. If not specified, when - // [Job.employment_types][google.cloud.talent.v4beta1.Job.employment_types] - // is FULLTIME, a default value is inferred based on - // [unit][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.unit]. - // Default values: + // Expected number of units paid each year. If not specified, when + // [Job.employment_types][google.cloud.talent.v4beta1.Job.employment_types] is FULLTIME, a default value is inferred + // based on [unit][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.unit]. Default values: // - HOURLY: 2080 // - DAILY: 260 // - WEEKLY: 52 @@ -748,44 +707,34 @@ message CompensationInfo { // Compensation range. message CompensationRange { - // Optional. The maximum amount of compensation. If left empty, the value is - // set to a maximal compensation value and the currency code is set to match - // the [currency code][google.type.Money.currency_code] of min_compensation. + // The maximum amount of compensation. If left empty, the value is set + // to a maximal compensation value and the currency code is set to + // match the [currency code][google.type.Money.currency_code] of + // min_compensation. google.type.Money max_compensation = 2; - // Optional. The minimum amount of compensation. If left empty, the value is - // set to zero and the currency code is set to match the [currency - // code][google.type.Money.currency_code] of max_compensation. + // The minimum amount of compensation. If left empty, the value is set + // to zero and the currency code is set to match the + // [currency code][google.type.Money.currency_code] of max_compensation. google.type.Money min_compensation = 1; } // The type of compensation. // // For compensation amounts specified in non-monetary amounts, - // describe the compensation scheme in the - // [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description]. + // describe the compensation scheme in the [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description]. // // For example, tipping format is described in - // [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description] - // (for example, "expect 15-20% tips based on customer bill.") and an estimate - // of the tips provided in - // [CompensationEntry.amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] - // or - // [CompensationEntry.range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range] - // ($10 per hour). - // - // For example, equity is described in - // [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description] + // [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description] (for example, "expect 15-20% tips based + // on customer bill.") and an estimate of the tips provided in + // [CompensationEntry.amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] or [CompensationEntry.range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range] ($10 per hour). + // + // For example, equity is described in [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description] // (for example, "1% - 2% equity vesting over 4 years, 1 year cliff") and - // value estimated in - // [CompensationEntry.amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] - // or - // [CompensationEntry.range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range]. - // If no value estimate is possible, units are - // [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED] - // and then further clarified in - // [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description] - // field. + // value estimated in [CompensationEntry.amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] or + // [CompensationEntry.range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range]. If no value estimate is possible, units are + // [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED] and then further + // clarified in [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description] field. enum CompensationType { // Default value. COMPENSATION_TYPE_UNSPECIFIED = 0; @@ -845,55 +794,47 @@ message CompensationInfo { OTHER_COMPENSATION_UNIT = 7; } - // Optional. Job compensation information. + // Job compensation information. // // At most one entry can be of type - // [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4beta1.CompensationInfo.CompensationType.BASE], - // which is referred as **base compensation entry** for the job. + // [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4beta1.CompensationInfo.CompensationType.BASE], which is + // referred as **base compensation entry** for the job. repeated CompensationEntry entries = 1; - // Output only. Annualized base compensation range. Computed as - // base compensation entry's - // [CompensationEntry.amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] - // times + // Output only. Annualized base compensation range. Computed as base compensation entry's + // [CompensationEntry.amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] times // [CompensationEntry.expected_units_per_year][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.expected_units_per_year]. // - // See - // [CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry] - // for explanation on compensation annualization. - CompensationRange annualized_base_compensation_range = 2; + // See [CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry] for explanation on compensation annualization. + CompensationRange annualized_base_compensation_range = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Annualized total compensation range. Computed as - // all compensation entries' - // [CompensationEntry.amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] - // times + // Output only. Annualized total compensation range. Computed as all compensation entries' + // [CompensationEntry.amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] times // [CompensationEntry.expected_units_per_year][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.expected_units_per_year]. // - // See - // [CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry] - // for explanation on compensation annualization. - CompensationRange annualized_total_compensation_range = 3; + // See [CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry] for explanation on compensation annualization. + CompensationRange annualized_total_compensation_range = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Resource that represents a license or certification. message Certification { - // Optional. Name of license or certification. + // Name of license or certification. // // Number of characters allowed is 100. string display_name = 1; - // Optional. Acquisition date or effective date of license or certification. + // Acquisition date or effective date of license or certification. google.type.Date acquire_date = 2; - // Optional. Expiration date of license of certification. + // Expiration date of license of certification. google.type.Date expire_date = 3; - // Optional. Authority of license, such as government. + // Authority of license, such as government. // // Number of characters allowed is 100. string authority = 4; - // Optional. Description of license or certification. + // Description of license or certification. // // Number of characters allowed is 100,000. string description = 5; @@ -901,41 +842,39 @@ message Certification { // Resource that represents a skill of a candidate. message Skill { - // Optional. Skill display name. + // Skill display name. // // For example, "Java", "Python". // // Number of characters allowed is 100. string display_name = 1; - // Optional. The last time this skill was used. + // The last time this skill was used. google.type.Date last_used_date = 2; - // Optional. Skill proficiency level which indicates how proficient the - // candidate is at this skill. + // Skill proficiency level which indicates how proficient the candidate is at + // this skill. SkillProficiencyLevel level = 3; - // Optional. A paragraph describes context of this skill. + // A paragraph describes context of this skill. // // Number of characters allowed is 100,000. string context = 4; - // Output only. Skill name snippet shows how the - // [display_name][google.cloud.talent.v4beta1.Skill.display_name] is related - // to a search query. It's empty if the - // [display_name][google.cloud.talent.v4beta1.Skill.display_name] isn't - // related to the search query. - string skill_name_snippet = 5; + // Output only. Skill name snippet shows how the [display_name][google.cloud.talent.v4beta1.Skill.display_name] is related to a search + // query. It's empty if the [display_name][google.cloud.talent.v4beta1.Skill.display_name] isn't related to the search + // query. + string skill_name_snippet = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Details of an interview. message Interview { - // Optional. The rating on this interview. + // The rating on this interview. Rating rating = 6; - // Required. The overall decision resulting from this interview (positive, - // negative, nuetral). - Outcome outcome = 7; + // Required. The overall decision resulting from this interview (positive, negative, + // nuetral). + Outcome outcome = 7 [(google.api.field_behavior) = REQUIRED]; } // The details of the score received for an assessment or interview. @@ -954,6 +893,64 @@ message Rating { double interval = 4; } +// Metadata used for long running operations returned by CTS batch APIs. +// It's used to replace [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata]. +message BatchOperationMetadata { + enum State { + // Default value. + STATE_UNSPECIFIED = 0; + + // The batch operation is being prepared for processing. + INITIALIZING = 1; + + // The batch operation is actively being processed. + PROCESSING = 2; + + // The batch operation is processed, and at least one item has been + // successfully processed. + SUCCEEDED = 3; + + // The batch operation is done and no item has been successfully processed. + FAILED = 4; + + // The batch operation is in the process of cancelling after + // [google.longrunning.Operations.CancelOperation][google.longrunning.Operations.CancelOperation] is called. + CANCELLING = 5; + + // The batch operation is done after + // [google.longrunning.Operations.CancelOperation][google.longrunning.Operations.CancelOperation] is called. Any items + // processed before cancelling are returned in the response. + CANCELLED = 6; + } + + // The state of a long running operation. + State state = 1; + + // More detailed information about operation state. + string state_description = 2; + + // Count of successful item(s) inside an operation. + int32 success_count = 3; + + // Count of failed item(s) inside an operation. + int32 failure_count = 4; + + // Count of total item(s) inside an operation. + int32 total_count = 5; + + // The time when the batch operation is created. + google.protobuf.Timestamp create_time = 6; + + // The time when the batch operation status is updated. The metadata and the + // [update_time][google.cloud.talent.v4beta1.BatchOperationMetadata.update_time] is refreshed every minute otherwise cached data is + // returned. + google.protobuf.Timestamp update_time = 7; + + // The time when the batch operation is finished and + // [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to `true`. + google.protobuf.Timestamp end_time = 8; +} + // Enum that represents the skill proficiency level. enum SkillProficiencyLevel { // Default value. @@ -1004,3 +1001,73 @@ enum Outcome { // candidate did not complete assessment). OUTCOME_NOT_AVAILABLE = 4; } + +// The type of candidate availability signal. +enum AvailabilitySignalType { + // Default value. + AVAILABILITY_SIGNAL_TYPE_UNSPECIFIED = 0; + + // Job application signal. + // + // In the context of [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals], this signal is related + // to the candidate's most recent application. + // [last_update_time][google.cloud.talent.v4beta1.AvailabilitySignal.last_update_time] is + // calculated from max([Application.create_time][google.cloud.talent.v4beta1.Application.create_time]) from all [Application][google.cloud.talent.v4beta1.Application] + // records where [Application.source][google.cloud.talent.v4beta1.Application.source] is any of the following: + // [APPLY_DIRECT_WEB][google.cloud.talent.v4beta1.Application.ApplicationSource.APPLY_DIRECT_WEB] + // [APPLY_DIRECT_MOBILE_WEB][google.cloud.talent.v4beta1.Application.ApplicationSource.APPLY_DIRECT_MOBILE_WEB] + // [APPLY_DIRECT_MOBILE_APP][google.cloud.talent.v4beta1.Application.ApplicationSource.APPLY_DIRECT_MOBILE_APP] + // [APPLY_DIRECT_IN_PERSON][google.cloud.talent.v4beta1.Application.ApplicationSource.APPLY_DIRECT_IN_PERSON] + // [APPLY_INDIRECT][google.cloud.talent.v4beta1.Application.ApplicationSource.APPLY_INDIRECT] + // + // In the context of [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter], the filter is applied on + // [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals] where + // [type][google.cloud.talent.v4beta1.AvailabilitySignal.type] is JOB_APPLICATION. + JOB_APPLICATION = 1; + + // Resume update signal. + // + // In the context of [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals], this signal is related + // to the candidate's most recent update to their resume. + // For a [SummarizedProfile.summary][google.cloud.talent.v4beta1.SummarizedProfile.summary], + // [last_update_time][google.cloud.talent.v4beta1.AvailabilitySignal.last_update_time] is + // calculated from max([Profile.resume_update_time][google.cloud.talent.v4beta1.Profile.resume_update_time]) from all + // [SummarizedProfile.profiles][google.cloud.talent.v4beta1.SummarizedProfile.profiles]. + // + // In the context of [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter], the filter is applied on + // [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals] where + // [type][google.cloud.talent.v4beta1.AvailabilitySignal.type] is RESUME_UPDATE. + RESUME_UPDATE = 2; + + // Candidate update signal. + // + // In the context of [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals], this signal is related + // to the candidate's most recent update to their profile. + // For a [SummarizedProfile.summary][google.cloud.talent.v4beta1.SummarizedProfile.summary], + // [last_update_time][google.cloud.talent.v4beta1.AvailabilitySignal.last_update_time] is + // calculated from max([Profile.candidate_update_time][google.cloud.talent.v4beta1.Profile.candidate_update_time]) from all + // [SummarizedProfile.profiles][google.cloud.talent.v4beta1.SummarizedProfile.profiles]. + // + // In the context of [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter], the filter is applied on + // [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals] where + // [type][google.cloud.talent.v4beta1.AvailabilitySignal.type] is CANDIDATE_UPDATE. + CANDIDATE_UPDATE = 3; + + // Client submission signal. + // + // In the context of [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals], this signal is related + // to the candidate's most recent submission. + // [last_update_time][google.cloud.talent.v4beta1.AvailabilitySignal.last_update_time] is + // calculated from max([Application.create_time][google.cloud.talent.v4beta1.Application.create_time]) from all [Application][google.cloud.talent.v4beta1.Application] + // records where [Application.stage][google.cloud.talent.v4beta1.Application.stage] is any of the following: + // [HIRING_MANAGER_REVIEW][google.cloud.talent.v4beta1.Application.ApplicationStage.HIRING_MANAGER_REVIEW] + // [INTERVIEW][google.cloud.talent.v4beta1.Application.ApplicationStage.INTERVIEW] + // [OFFER_EXTENDED][google.cloud.talent.v4beta1.Application.ApplicationStage.OFFER_EXTENDED] + // [OFFER_ACCEPTED][google.cloud.talent.v4beta1.Application.ApplicationStage.OFFER_ACCEPTED] + // [STARTED][google.cloud.talent.v4beta1.Application.ApplicationStage.STARTED] + // + // In the context of [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter], the filter is applied on + // [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals] where + // [type][google.cloud.talent.v4beta1.AvailabilitySignal.type] is CLIENT_SUBMISSION. + CLIENT_SUBMISSION = 4; +} diff --git a/google/cloud/talent/v4beta1/company.proto b/google/cloud/talent/v4beta1/company.proto index 928a43822..c68945723 100644 --- a/google/cloud/talent/v4beta1/company.proto +++ b/google/cloud/talent/v4beta1/company.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.talent.v4beta1; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/talent/v4beta1/common.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; option java_multiple_files = true; @@ -30,11 +31,16 @@ option objc_class_prefix = "CTS"; // entity that owns job postings, that is, the hiring entity responsible for // employing applicants for the job position. message Company { + option (google.api.resource) = { + type: "jobs.googleapis.com/Company" + pattern: "projects/{project}/tenants/{tenant}/companies/{company}" + pattern: "projects/{project}/companies/{company}" + }; + // Derived details about the company. message DerivedInfo { // A structured headquarters location of the company, resolved from - // [Company.headquarters_address][google.cloud.talent.v4beta1.Company.headquarters_address] - // if provided. + // [Company.headquarters_address][google.cloud.talent.v4beta1.Company.headquarters_address] if provided. Location headquarters_location = 1; } @@ -45,60 +51,58 @@ message Company { // // The format is // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - // example, "projects/api-test-project/tenants/foo/companies/bar". + // example, "projects/foo/tenants/bar/companies/baz". // - // Tenant id is optional and the default tenant is used if unspecified, for - // example, "projects/api-test-project/companies/bar". + // If tenant id is unspecified, the default tenant is used. For + // example, "projects/foo/companies/bar". string name = 1; - // Required. The display name of the company, for example, "Google, LLC". - string display_name = 2; + // Required. The display name of the company, for example, "Google LLC". + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; // Required. Client side company identifier, used to uniquely identify the // company. // // The maximum number of allowed characters is 255. - string external_id = 3; + string external_id = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. The employer's company size. + // The employer's company size. CompanySize size = 4; - // Optional. The street address of the company's main headquarters, which may - // be different from the job location. The service attempts to geolocate the - // provided address, and populates a more specific location wherever possible - // in - // [DerivedInfo.headquarters_location][google.cloud.talent.v4beta1.Company.DerivedInfo.headquarters_location]. + // The street address of the company's main headquarters, which may be + // different from the job location. The service attempts + // to geolocate the provided address, and populates a more specific + // location wherever possible in [DerivedInfo.headquarters_location][google.cloud.talent.v4beta1.Company.DerivedInfo.headquarters_location]. string headquarters_address = 5; - // Optional. Set to true if it is the hiring agency that post jobs for other + // Set to true if it is the hiring agency that post jobs for other // employers. // // Defaults to false if not provided. bool hiring_agency = 6; - // Optional. Equal Employment Opportunity legal disclaimer text to be + // Equal Employment Opportunity legal disclaimer text to be // associated with all jobs, and typically to be displayed in all // roles. // // The maximum number of allowed characters is 500. string eeo_text = 7; - // Optional. The URI representing the company's primary web site or home page, + // The URI representing the company's primary web site or home page, // for example, "https://www.google.com". // // The maximum number of allowed characters is 255. string website_uri = 8; - // Optional. The URI to employer's career site or careers page on the - // employer's web site, for example, "https://careers.google.com". + // The URI to employer's career site or careers page on the employer's web + // site, for example, "https://careers.google.com". string career_site_uri = 9; - // Optional. A URI that hosts the employer's company logo. + // A URI that hosts the employer's company logo. string image_uri = 10; - // Optional. A list of keys of filterable - // [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes], - // whose corresponding `string_values` are used in keyword searches. Jobs with + // A list of keys of filterable [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes], whose + // corresponding `string_values` are used in keyword searches. Jobs with // `string_values` under these specified field keys are returned if any // of the values match the search keyword. Custom field values with // parenthesis, brackets and special symbols are not searchable as-is, @@ -106,10 +110,10 @@ message Company { repeated string keyword_searchable_job_custom_attributes = 11; // Output only. Derived details about the company. - DerivedInfo derived_info = 12; + DerivedInfo derived_info = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Indicates whether a company is flagged to be suspended from // public availability by the service when job content appears suspicious, // abusive, or spammy. - bool suspended = 13; + bool suspended = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/cloud/talent/v4beta1/company_service.proto b/google/cloud/talent/v4beta1/company_service.proto index 1e48a46cd..ac6a7d744 100644 --- a/google/cloud/talent/v4beta1/company_service.proto +++ b/google/cloud/talent/v4beta1/company_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.cloud.talent.v4beta1; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/talent/v4beta1/common.proto"; import "google/cloud/talent/v4beta1/company.proto"; import "google/protobuf/empty.proto"; @@ -47,14 +48,18 @@ service CompanyService { body: "*" } }; + option (google.api.method_signature) = "parent,company"; } // Retrieves specified company. rpc GetCompany(GetCompanyRequest) returns (Company) { option (google.api.http) = { get: "/v4beta1/{name=projects/*/tenants/*/companies/*}" - additional_bindings { get: "/v4beta1/{name=projects/*/companies/*}" } + additional_bindings { + get: "/v4beta1/{name=projects/*/companies/*}" + } }; + option (google.api.method_signature) = "name"; } // Updates specified company. @@ -67,6 +72,7 @@ service CompanyService { body: "*" } }; + option (google.api.method_signature) = "company"; } // Deletes specified company. @@ -74,16 +80,22 @@ service CompanyService { rpc DeleteCompany(DeleteCompanyRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v4beta1/{name=projects/*/tenants/*/companies/*}" - additional_bindings { delete: "/v4beta1/{name=projects/*/companies/*}" } + additional_bindings { + delete: "/v4beta1/{name=projects/*/companies/*}" + } }; + option (google.api.method_signature) = "name"; } // Lists all companies associated with the project. rpc ListCompanies(ListCompaniesRequest) returns (ListCompaniesResponse) { option (google.api.http) = { get: "/v4beta1/{parent=projects/*/tenants/*}/companies" - additional_bindings { get: "/v4beta1/{parent=projects/*}/companies" } + additional_bindings { + get: "/v4beta1/{parent=projects/*}/companies" + } }; + option (google.api.method_signature) = "parent"; } } @@ -92,14 +104,17 @@ message CreateCompanyRequest { // Required. Resource name of the tenant under which the company is created. // // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenant/foo". - // - // Tenant id is optional and a default tenant is created if unspecified, for - // example, "projects/api-test-project". - string parent = 1; + // "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + // is created, for example, "projects/foo". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Company" + } + ]; // Required. The company to be created. - Company company = 2; + Company company = 2 [(google.api.field_behavior) = REQUIRED]; } // Request for getting a company by name. @@ -110,29 +125,28 @@ message GetCompanyRequest { // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for // example, "projects/api-test-project/tenants/foo/companies/bar". // - // Tenant id is optional and the default tenant is used if unspecified, for + // If tenant id is unspecified, the default tenant is used, for // example, "projects/api-test-project/companies/bar". - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Company" + } + ]; } // Request for updating a specified company. message UpdateCompanyRequest { - // Required. The company resource to replace the current resource in the - // system. - Company company = 1; + // Required. The company resource to replace the current resource in the system. + Company company = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional but strongly recommended for the best service - // experience. + // Strongly recommended for the best service experience. // - // If - // [update_mask][google.cloud.talent.v4beta1.UpdateCompanyRequest.update_mask] - // is provided, only the specified fields in - // [company][google.cloud.talent.v4beta1.UpdateCompanyRequest.company] are - // updated. Otherwise all the fields are updated. + // If [update_mask][google.cloud.talent.v4beta1.UpdateCompanyRequest.update_mask] is provided, only the specified fields in + // [company][google.cloud.talent.v4beta1.UpdateCompanyRequest.company] are updated. Otherwise all the fields are updated. // // A field mask to specify the company fields to be updated. Only - // top level fields of [Company][google.cloud.talent.v4beta1.Company] are - // supported. + // top level fields of [Company][google.cloud.talent.v4beta1.Company] are supported. google.protobuf.FieldMask update_mask = 2; } @@ -142,11 +156,16 @@ message DeleteCompanyRequest { // // The format is // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - // example, "projects/api-test-project/tenants/foo/companies/bar". + // example, "projects/foo/tenants/bar/companies/baz". // - // Tenant id is optional and the default tenant is used if unspecified, for - // example, "projects/api-test-project/companies/bar". - string name = 1; + // If tenant id is unspecified, the default tenant is used, for + // example, "projects/foo/companies/bar". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Company" + } + ]; } // List companies for which the client has ACL visibility. @@ -154,31 +173,33 @@ message ListCompaniesRequest { // Required. Resource name of the tenant under which the company is created. // // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenant/foo". + // "projects/foo/tenant/bar". // - // Tenant id is optional and the default tenant is used if unspecified, for - // example, "projects/api-test-project". - string parent = 1; - - // Optional. The starting indicator from which to return results. + // If tenant id is unspecified, the default tenant will be used, for + // example, "projects/foo". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Company" + } + ]; + + // The starting indicator from which to return results. string page_token = 2; - // Optional. The maximum number of companies to be returned, at most 100. + // The maximum number of companies to be returned, at most 100. // Default is 100 if a non-positive number is provided. int32 page_size = 3; - // Optional. Set to true if the companies requested must have open jobs. + // Set to true if the companies requested must have open jobs. // // Defaults to false. // - // If true, at most - // [page_size][google.cloud.talent.v4beta1.ListCompaniesRequest.page_size] of - // companies are fetched, among which only those with open jobs are returned. + // If true, at most [page_size][google.cloud.talent.v4beta1.ListCompaniesRequest.page_size] of companies are fetched, among which + // only those with open jobs are returned. bool require_open_jobs = 4; } -// Output only. -// // The List companies response object. message ListCompaniesResponse { // Companies for the current client. diff --git a/google/cloud/talent/v4beta1/completion_service.proto b/google/cloud/talent/v4beta1/completion_service.proto index 2b105c24b..2e45ac7d5 100644 --- a/google/cloud/talent/v4beta1/completion_service.proto +++ b/google/cloud/talent/v4beta1/completion_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.talent.v4beta1; import "google/api/annotations.proto"; -import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/talent/v4beta1/common.proto"; +import "google/api/client.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; option java_multiple_files = true; @@ -39,13 +40,13 @@ service Completion { rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) { option (google.api.http) = { get: "/v4beta1/{parent=projects/*/tenants/*}:complete" - additional_bindings { get: "/v4beta1/{parent=projects/*}:complete" } + additional_bindings { + get: "/v4beta1/{parent=projects/*}:complete" + } }; } } -// Input only. -// // Auto-complete parameters. message CompleteQueryRequest { // Enum to specify the scope of completion. @@ -66,88 +67,80 @@ message CompleteQueryRequest { // Default value. COMPLETION_TYPE_UNSPECIFIED = 0; - // Only suggest job titles. + // Suggest job titles for jobs autocomplete. + // + // For [CompletionType.JOB_TITLE][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.JOB_TITLE] type, only open jobs with the same + // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are returned. JOB_TITLE = 1; - // Only suggest company names. + // Suggest company names for jobs autocomplete. + // + // For [CompletionType.COMPANY_NAME][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMPANY_NAME] type, + // only companies having open jobs with the same [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are + // returned. COMPANY_NAME = 2; - // Suggest both job titles and company names. + // Suggest both job titles and company names for jobs autocomplete. + // + // For [CompletionType.COMBINED][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMBINED] type, only open jobs with the same + // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] or companies having open jobs with the same + // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are returned. COMBINED = 3; } // Required. Resource name of tenant the completion is performed within. // // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenant/foo". + // "projects/foo/tenant/bar". // - // Tenant id is optional and the default tenant is used if unspecified, for - // example, "projects/api-test-project". - string parent = 1; + // If tenant id is unspecified, the default tenant is used, for + // example, "projects/foo". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Company" + } + ]; // Required. The query used to generate suggestions. // // The maximum number of allowed characters is 255. - string query = 2; + string query = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. The list of languages of the query. This is + // The list of languages of the query. This is // the BCP-47 language code, such as "en-US" or "sr-Latn". // For more information, see // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). // - // For - // [CompletionType.JOB_TITLE][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.JOB_TITLE] - // type, only open jobs with the same - // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] - // are returned. - // - // For - // [CompletionType.COMPANY_NAME][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMPANY_NAME] - // type, only companies having open jobs with the same - // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] - // are returned. - // - // For - // [CompletionType.COMBINED][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMBINED] - // type, only open jobs with the same - // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] - // or companies having open jobs with the same - // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] - // are returned. - // // The maximum number of allowed characters is 255. repeated string language_codes = 3; // Required. Completion result count. // // The maximum allowed page size is 10. - int32 page_size = 4; + int32 page_size = 4 [(google.api.field_behavior) = REQUIRED]; - // Optional. If provided, restricts completion to specified company. + // If provided, restricts completion to specified company. // // The format is // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - // example, "projects/api-test-project/tenants/foo/companies/bar". + // example, "projects/foo/tenants/bar/companies/baz". // - // Tenant id is optional and the default tenant is used if unspecified, for - // example, "projects/api-test-project/companies/bar". - string company = 5; + // If tenant id is unspecified, the default tenant is used, for + // example, "projects/foo". + string company = 5 [(google.api.resource_reference) = { + type: "jobs.googleapis.com/Company" + }]; - // Optional. The scope of the completion. The defaults is - // [CompletionScope.PUBLIC][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionScope.PUBLIC]. + // The scope of the completion. The defaults is [CompletionScope.PUBLIC][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionScope.PUBLIC]. CompletionScope scope = 6; - // Optional. The completion topic. The default is - // [CompletionType.COMBINED][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMBINED]. + // The completion topic. The default is [CompletionType.COMBINED][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMBINED]. CompletionType type = 7; } -// Output only. -// // Response of auto-complete query. message CompleteQueryResponse { - // Output only. - // // Resource that represents completion results. message CompletionResult { // The suggestion for the query. diff --git a/google/cloud/talent/v4beta1/event.proto b/google/cloud/talent/v4beta1/event.proto index c8ea12581..c5a71553b 100644 --- a/google/cloud/talent/v4beta1/event.proto +++ b/google/cloud/talent/v4beta1/event.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.talent.v4beta1; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; option java_multiple_files = true; @@ -32,17 +32,17 @@ option objc_class_prefix = "CTS"; // service to perform optimally. The number of events sent must be consistent // with other calls, such as job searches, issued to the service by the client. message ClientEvent { - // Optional but highly recommended. + // Strongly recommended for the best service experience. // // A unique ID generated in the API responses. It can be found in // [ResponseMetadata.request_id][google.cloud.talent.v4beta1.ResponseMetadata.request_id]. string request_id = 1; // Required. A unique identifier, generated by the client application. - string event_id = 2; + string event_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The timestamp of the event. - google.protobuf.Timestamp create_time = 4; + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = REQUIRED]; // Required. // @@ -57,8 +57,8 @@ message ClientEvent { ProfileEvent profile_event = 6; } - // Optional. Notes about the event provided by recruiters or other users, for - // example, feedback on why a profile was bookmarked. + // Notes about the event provided by recruiters or other users, for example, + // feedback on why a profile was bookmarked. string event_notes = 9; } @@ -101,9 +101,7 @@ message JobEvent { // submitted an application for a job with a single click without // entering information. If a job seeker performs this action, send only // this event to the service. Do not also send - // [JobEventType.APPLICATION_START][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_START] - // or - // [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_FINISH] + // [JobEventType.APPLICATION_START][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_START] or [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_FINISH] // events. APPLICATION_QUICK_SUBMISSION = 6; @@ -123,12 +121,8 @@ message JobEvent { // (without viewing the details of the job posting), and is redirected // to a different website to complete the application. If a candidate // performs this action, send only this event to the service. Do not also - // send - // [JobEventType.APPLICATION_START][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_START], - // [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_FINISH] - // or - // [JobEventType.VIEW][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] - // events. + // send [JobEventType.APPLICATION_START][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_START], + // [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_FINISH] or [JobEventType.VIEW][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] events. APPLICATION_REDIRECT_FROM_SEARCH = 9; // This event should be used when a company submits an application @@ -165,29 +159,25 @@ message JobEvent { INTERVIEW_GRANTED = 15; } - // Required. The type of the event (see - // [JobEventType][google.cloud.talent.v4beta1.JobEvent.JobEventType]). - JobEventType type = 1; - - // Required. The [job name(s)][google.cloud.talent.v4beta1.Job.name] - // associated with this event. For example, if this is an - // [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION] - // event, this field contains the identifiers of all jobs shown to the job - // seeker. If this was a - // [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this - // field contains the identifier of the viewed job. + // Required. The type of the event (see [JobEventType][google.cloud.talent.v4beta1.JobEvent.JobEventType]). + JobEventType type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with this event. + // For example, if this is an [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION] event, + // this field contains the identifiers of all jobs shown to the job seeker. + // If this was a [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this field contains the + // identifier of the viewed job. // // The format is // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for - // example, "projects/api-test-project/tenants/foo/jobs/1234". - repeated string jobs = 2; + // example, "projects/foo/tenants/bar/jobs/baz". + repeated string jobs = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. The [profile name][google.cloud.talent.v4beta1.Profile.name] - // associated with this client event. + // The [profile name][google.cloud.talent.v4beta1.Profile.name] associated with this client event. // // The format is // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", - // for example, "projects/api-test-project/tenants/foo/profiles/bar". + // for example, "projects/foo/tenants/bar/profiles/baz". string profile = 3; } @@ -199,82 +189,25 @@ message ProfileEvent { // Default value. PROFILE_EVENT_TYPE_UNSPECIFIED = 0; - // Send this event when a - // [ProfileEvent.profiles][google.cloud.talent.v4beta1.ProfileEvent.profiles] - // meets all of the following criteria: - // * Was sent as a part of a result set for a CTS API call. - // * Was rendered in the end user's UI (that is, the - // [ProfileEvent.recruiter][google.cloud.talent.v4beta1.ProfileEvent.recruiter]). - // * That UI rendering was displayed in the end user's viewport for >=3 - // seconds. - // - // In other words, send this event when the end user of the CTS service - // actually saw a resulting profile in their viewport. - // - // To understand how to use this event, consider an example: - // - // * The customer's UI for interacting with CTS - // result sets is accessed by the end user through a web browser. - // * The UI calls for a page size of 15 candidates (that is, 15 candidates - // are rendered on each page of results). - // * However, the UI design calls for only 5 candidates to be shown at any - // given time in the viewport (that is, the end user can only see 5 results - // at any given time and needs to scroll up or down to view all 15 results). - // - // To render each page of results, the customer will send a - // request to CTS with a page size = 15. - // - // * User loads page #1 of results. - // * User scrolls down to expose results #1 - #5 and dwells on this view for - // 30 seconds. - // * Send an IMPRESSION event for result 1, 2, 3, 4, 5. - // * User scrolls down a bit, exposing results #2 - #6 in the viewport and - // dwells on this view for 5 minutes. - // * Send an IMPRESSION event for result 6. - // * User scrolls to the bottom of the page, with results #7 - #15 shown in - // the viewport for ~5 seconds each. - // * Specifically, NO IMPRESSION events are sent for result 7, 8, 9, 10, 11, - // 12, 13, 14, 15. - // * User clicks to the next page and loads page #2 of results. - // * Within 2 seconds, user scrolls to expose results #20 - #24 in the - // viewport and dwells on this view for 20 mins. - // * Send an IMPRESSION event for result 20, 21, 22, 23, 24 - // * User closes their browser window. + // Send this event when a [ProfileEvent.profiles][google.cloud.talent.v4beta1.ProfileEvent.profiles] was sent as a part of + // a result set for a CTS API call and was rendered in the end user's UI + // (that is, the [ProfileEvent.recruiter][google.cloud.talent.v4beta1.ProfileEvent.recruiter]). IMPRESSION = 1; - // The VIEW event allows CTS to understand if a candidate's profile was - // viewed by an end user (that is, recruiter) of the system for >=3 seconds. - // This is critical to tracking product metrics and should be sent for every - // profile VIEW that happens in the customer's system. + // The VIEW event records the action of a candidate's profile being + // viewed by an end user. This is critical to tracking product metrics and + // should be sent for every profile VIEW that happens in your system, + // whether the event is associated with an API call (for example, a + // recruiter making a request for a result set and clicking on a profile) + // or not (a recruiter using the system to view profile details without + // making a request). // - // VIEW events should be sent whether an end user views a candidate's - // profile as a result of seeing that profile in the result set of a - // CTS API request or whether the end user - // views the profile for some other reason (that is, clicks to the - // candidate's profile in the ATS, and so on). - // - // For a VIEW that happens as a result of seeing the profile in - // a CTS API request's result set, the - // [ClientEvent.request_id][google.cloud.talent.v4beta1.ClientEvent.request_id] - // should be populated. If the VIEW happens for some other reason, the - // [requestId] should not be populated. + // For a VIEW events associated with API calls, the + // [ClientEvent.request_id][google.cloud.talent.v4beta1.ClientEvent.request_id] should be populated. If the VIEW is not + // associated with an API call, [request_id][google.cloud.talent.v4beta1.ClientEvent.request_id] should + // not be populated. // // This event requires a valid recruiter and one valid ID in profiles. - // - // To understand how to use this event, consider 2 examples in which a VIEW - // event should be sent: - // * End user makes a request to the CTS API for a result set. - // * Results for the request are shown to the end user. - // * End user clicks on one of the candidates that are shown as part of the - // results. - // * A VIEW event with the - // [ClientEvent.request_id][google.cloud.talent.v4beta1.ClientEvent.request_id] - // of the API call in the first step of this example is sent. - // - // * End user browses to a candidate's profile in the ATS. - // * A VIEW event without a - // [ClientEvent.request_id][google.cloud.talent.v4beta1.ClientEvent.request_id] - // is sent. VIEW = 2; // The profile is bookmarked. @@ -282,22 +215,20 @@ message ProfileEvent { } // Required. Type of event. - ProfileEventType type = 1; + ProfileEventType type = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The [profile name(s)][google.cloud.talent.v4beta1.Profile.name] - // associated with this client event. + // Required. The [profile name(s)][google.cloud.talent.v4beta1.Profile.name] associated with this client event. // // The format is // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", - // for example, "projects/api-test-project/tenants/foo/profiles/bar". - repeated string profiles = 2; + // for example, "projects/foo/tenants/bar/profiles/baz". + repeated string profiles = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. The [job name(s)][google.cloud.talent.v4beta1.Job.name] - // associated with this client event. Leave it empty if the event isn't - // associated with a job. + // The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with this client event. Leave it + // empty if the event isn't associated with a job. // // The format is // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for - // example, "projects/api-test-project/tenants/foo/jobs/1234". + // example, "projects/foo/tenants/bar/jobs/baz". repeated string jobs = 6; } diff --git a/google/cloud/talent/v4beta1/event_service.proto b/google/cloud/talent/v4beta1/event_service.proto index 966632e57..4577352e9 100644 --- a/google/cloud/talent/v4beta1/event_service.proto +++ b/google/cloud/talent/v4beta1/event_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.cloud.talent.v4beta1; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/talent/v4beta1/event.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; @@ -50,6 +51,7 @@ service EventService { body: "*" } }; + option (google.api.method_signature) = "parent,client_event"; } } @@ -58,13 +60,16 @@ message CreateClientEventRequest { // Required. Resource name of the tenant under which the event is created. // // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenant/foo". - // - // Tenant id is optional and a default tenant is created if unspecified, for - // example, "projects/api-test-project". - string parent = 1; + // "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + // is created, for example, "projects/foo". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Company" + } + ]; - // Required. Events issued when end user interacts with customer's application - // that uses Cloud Talent Solution. - ClientEvent client_event = 2; + // Required. Events issued when end user interacts with customer's application that + // uses Cloud Talent Solution. + ClientEvent client_event = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/cloud/talent/v4beta1/filters.proto b/google/cloud/talent/v4beta1/filters.proto index 0f86b2df6..be457b430 100644 --- a/google/cloud/talent/v4beta1/filters.proto +++ b/google/cloud/talent/v4beta1/filters.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,23 +11,21 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.talent.v4beta1; -import "google/api/annotations.proto"; -import "google/cloud/talent/v4beta1/application.proto"; +import "google/api/field_behavior.proto"; import "google/cloud/talent/v4beta1/common.proto"; -import "google/cloud/talent/v4beta1/job.proto"; -import "google/cloud/talent/v4beta1/profile.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; import "google/type/date.proto"; import "google/type/latlng.proto"; import "google/type/timeofday.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; option java_multiple_files = true; @@ -35,17 +33,26 @@ option java_outer_classname = "FiltersProto"; option java_package = "com.google.cloud.talent.v4beta1"; option objc_class_prefix = "CTS"; -// Input only. -// // The query required to perform a search query. message JobQuery { - // Optional. The query string that matches against the job title, description, - // and location fields. + // The query string that matches against the job title, description, and + // location fields. // // The maximum number of allowed characters is 255. string query = 1; - // Optional. This filter specifies the company entities to search against. + // The language code of [query][google.cloud.talent.v4beta1.JobQuery.query]. For example, "en-US". This field helps to + // better interpret the query. + // + // If a value isn't specified, the query language code is automatically + // detected, which may not be accurate. + // + // Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". + // For more information, see + // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + string query_language_code = 14; + + // This filter specifies the company entities to search against. // // If a value isn't specified, jobs are searched for against all // companies. @@ -54,34 +61,31 @@ message JobQuery { // companies specified. // // The format is - // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - // example, "projects/api-test-project/tenants/foo/companies/bar". + // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For + // example, "projects/foo/tenants/bar/companies/baz". // - // Tenant id is optional and the default tenant is used if unspecified, for - // example, "projects/api-test-project/companies/bar". + // If tenant id is unspecified, the default tenant is used. For + // example, "projects/foo/companies/bar". // // At most 20 company filters are allowed. repeated string companies = 2; - // Optional. The location filter specifies geo-regions containing the jobs to - // search against. See - // [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] for more - // information. + // The location filter specifies geo-regions containing the jobs to + // search against. See [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] for more information. // // If a location value isn't specified, jobs fitting the other search // criteria are retrieved regardless of where they're located. // // If multiple values are specified, jobs are retrieved from any of the // specified locations. If different values are specified for the - // [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles] - // parameter, the maximum provided distance is used for all locations. + // [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles] parameter, the maximum provided + // distance is used for all locations. // // At most 5 location filters are allowed. repeated LocationFilter location_filters = 3; - // Optional. The category filter specifies the categories of jobs to search - // against. See [JobCategory][google.cloud.talent.v4beta1.JobCategory] for - // more information. + // The category filter specifies the categories of jobs to search against. + // See [JobCategory][google.cloud.talent.v4beta1.JobCategory] for more information. // // If a value isn't specified, jobs from any category are searched against. // @@ -89,21 +93,17 @@ message JobQuery { // categories are searched against. repeated JobCategory job_categories = 4; - // Optional. Allows filtering jobs by commute time with different travel - // methods (for + // Allows filtering jobs by commute time with different travel methods (for // example, driving or public transit). // - // Note: This only works when you specify a - // [CommuteMethod][google.cloud.talent.v4beta1.CommuteMethod]. In this case, - // [location_filters][google.cloud.talent.v4beta1.JobQuery.location_filters] - // is ignored. + // Note: This only works when you specify a [CommuteMethod][google.cloud.talent.v4beta1.CommuteMethod]. In this case, + // [location_filters][google.cloud.talent.v4beta1.JobQuery.location_filters] is ignored. // // Currently we don't support sorting by commute time. CommuteFilter commute_filter = 5; - // Optional. This filter specifies the exact company - // [Company.display_name][google.cloud.talent.v4beta1.Company.display_name] of - // the jobs to search against. + // This filter specifies the exact company [Company.display_name][google.cloud.talent.v4beta1.Company.display_name] + // of the jobs to search against. // // If a value isn't specified, jobs within the search results are // associated with any company. @@ -114,16 +114,15 @@ message JobQuery { // At most 20 company display name filters are allowed. repeated string company_display_names = 6; - // Optional. This search filter is applied only to - // [Job.compensation_info][google.cloud.talent.v4beta1.Job.compensation_info]. - // For example, if the filter is specified as "Hourly job with per-hour - // compensation > $15", only jobs meeting these criteria are searched. If a - // filter isn't defined, all open jobs are searched. + // This search filter is applied only to + // [Job.compensation_info][google.cloud.talent.v4beta1.Job.compensation_info]. For example, if the filter is specified + // as "Hourly job with per-hour compensation > $15", only jobs meeting + // these criteria are searched. If a filter isn't defined, all open jobs + // are searched. CompensationFilter compensation_filter = 7; - // Optional. This filter specifies a structured syntax to match against the - // [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] - // marked as `filterable`. + // This filter specifies a structured syntax to match against the + // [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] marked as `filterable`. // // The syntax for this expression is a subset of SQL syntax. // @@ -139,23 +138,22 @@ message JobQuery { // Boolean expressions (AND/OR/NOT) are supported up to 3 levels of // nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 // comparisons or functions are allowed in the expression. The expression - // must be < 3000 bytes in length. + // must be < 6000 bytes in length. // // Sample Query: // `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND // driving_years > 10` string custom_attribute_filter = 8; - // Optional. This flag controls the spell-check feature. If false, the + // This flag controls the spell-check feature. If false, the // service attempts to correct a misspelled query, // for example, "enginee" is corrected to "engineer". // // Defaults to false: a spell check is performed. bool disable_spell_check = 9; - // Optional. The employment type filter specifies the employment type of jobs - // to search against, such as - // [EmploymentType.FULL_TIME][google.cloud.talent.v4beta1.EmploymentType.FULL_TIME]. + // The employment type filter specifies the employment type of jobs to + // search against, such as [EmploymentType.FULL_TIME][google.cloud.talent.v4beta1.EmploymentType.FULL_TIME]. // // If a value isn't specified, jobs in the search results includes any // employment type. @@ -164,7 +162,7 @@ message JobQuery { // any of the specified employment types. repeated EmploymentType employment_types = 10; - // Optional. This filter specifies the locale of jobs to search against, + // This filter specifies the locale of jobs to search against, // for example, "en-US". // // If a value isn't specified, the search results can contain jobs in any @@ -178,12 +176,11 @@ message JobQuery { // At most 10 language code filters are allowed. repeated string language_codes = 11; - // Optional. Jobs published within a range specified by this filter are - // searched against. + // Jobs published within a range specified by this filter are searched + // against. TimestampRange publish_time_range = 12; - // Optional. This filter specifies a list of job names to be excluded during - // search. + // This filter specifies a list of job names to be excluded during search. // // At most 400 excluded job names are allowed. repeated string excluded_jobs = 13; @@ -191,39 +188,96 @@ message JobQuery { // Filters to apply when performing the search query. message ProfileQuery { - // Optional. Keywords to match any text fields of profiles. + // Keywords to match any text fields of profiles. // // For example, "software engineer in Palo Alto". string query = 1; - // Optional. The location filter specifies geo-regions containing the profiles - // to search against. + // The location filter specifies geo-regions containing the profiles to + // search against. + // + // One of [LocationFilter.address][google.cloud.talent.v4beta1.LocationFilter.address] or [LocationFilter.lat_lng][google.cloud.talent.v4beta1.LocationFilter.lat_lng] must be + // provided or an error is thrown. If both [LocationFilter.address][google.cloud.talent.v4beta1.LocationFilter.address] and + // [LocationFilter.lat_lng][google.cloud.talent.v4beta1.LocationFilter.lat_lng] are provided, an error is thrown. + // + // The following logic is used to determine which locations in + // the profile to filter against: + // + // 1. All of the profile's geocoded [Profile.addresses][google.cloud.talent.v4beta1.Profile.addresses] where + // [Address.usage][google.cloud.talent.v4beta1.Address.usage] is PERSONAL and [Address.current][google.cloud.talent.v4beta1.Address.current] is true. + // + // 2. If the above set of locations is empty, all of the profile's geocoded + // [Profile.addresses][google.cloud.talent.v4beta1.Profile.addresses] where [Address.usage][google.cloud.talent.v4beta1.Address.usage] is + // CONTACT_INFO_USAGE_UNSPECIFIED and [Address.current][google.cloud.talent.v4beta1.Address.current] is true. + // + // 3. If the above set of locations is empty, all of the profile's geocoded + // [Profile.addresses][google.cloud.talent.v4beta1.Profile.addresses] where [Address.usage][google.cloud.talent.v4beta1.Address.usage] is PERSONAL or + // CONTACT_INFO_USAGE_UNSPECIFIED and [Address.current][google.cloud.talent.v4beta1.Address.current] is not set. + // + // This means that any profiles without any [Profile.addresses][google.cloud.talent.v4beta1.Profile.addresses] that match + // any of the above criteria will not be included in a search with location + // filter. Furthermore, any [Profile.addresses][google.cloud.talent.v4beta1.Profile.addresses] where [Address.usage][google.cloud.talent.v4beta1.Address.usage] is + // WORK or SCHOOL or where [Address.current][google.cloud.talent.v4beta1.Address.current] is false are not considered for + // location filter. // // If a location filter isn't specified, profiles fitting the other search // criteria are retrieved regardless of where they're located. // - // If - // [LocationFilter.negated][google.cloud.talent.v4beta1.LocationFilter.negated] - // is specified, the result doesn't contain profiles from that location. - // - // For example, search for profiles with addresses in "New York City". + // If [LocationFilter.negated][google.cloud.talent.v4beta1.LocationFilter.negated] is specified, the result doesn't contain + // profiles from that location. + // + // If [LocationFilter.address][google.cloud.talent.v4beta1.LocationFilter.address] is provided, the + // [LocationType][google.cloud.talent.v4beta1.Location.LocationType], center + // point (latitude and longitude), and radius are automatically detected by + // the Google Maps Geocoding API and included as well. If + // [LocationFilter.address][google.cloud.talent.v4beta1.LocationFilter.address] cannot be geocoded, the filter + // falls back to keyword search. + // + // If the detected + // [LocationType][google.cloud.talent.v4beta1.Location.LocationType] is + // [LocationType.SUB_ADMINISTRATIVE_AREA][google.cloud.talent.v4beta1.Location.LocationType.SUB_ADMINISTRATIVE_AREA], + // [LocationType.ADMINISTRATIVE_AREA][google.cloud.talent.v4beta1.Location.LocationType.ADMINISTRATIVE_AREA], + // or + // [LocationType.COUNTRY][google.cloud.talent.v4beta1.Location.LocationType.COUNTRY], + // the filter is performed against the detected location name (using exact + // text matching). Otherwise, the filter is performed against the detected + // center point and a radius of detected location radius + + // [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles]. + // + // If [LocationFilter.address][google.cloud.talent.v4beta1.LocationFilter.address] is provided, + // [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles] is the additional radius on top of the + // radius of the location geocoded from [LocationFilter.address][google.cloud.talent.v4beta1.LocationFilter.address]. If + // [LocationFilter.lat_lng][google.cloud.talent.v4beta1.LocationFilter.lat_lng] is provided, + // [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles] is the only radius that is used. + // + // [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles] is 10 by default. Note that the value + // of [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles] is 0 if it is unset, so the server + // does not differentiate [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles] that is + // explicitly set to 0 and [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles] that is not + // set. Which means that if [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles] is explicitly + // set to 0, the server will use the default value of + // [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles] which is 10. To work around this and + // effectively set [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles] to 0, we recommend + // setting [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles] to a very small decimal number + // (such as 0.00001). + // + // If [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles] is negative, an error is thrown. repeated LocationFilter location_filters = 2; - // Optional. Job title filter specifies job titles of profiles to match on. + // Job title filter specifies job titles of profiles to match on. // // If a job title isn't specified, profiles with any titles are retrieved. // // If multiple values are specified, profiles are retrieved with any of the // specified job titles. // - // If - // [JobTitleFilter.negated][google.cloud.talent.v4beta1.JobTitleFilter.negated] - // is specified, the result won't contain profiles with the job titles. + // If [JobTitleFilter.negated][google.cloud.talent.v4beta1.JobTitleFilter.negated] is specified, the result won't contain + // profiles with the job titles. // // For example, search for profiles with a job title "Product Manager". repeated JobTitleFilter job_title_filters = 3; - // Optional. Employer filter specifies employers of profiles to match on. + // Employer filter specifies employers of profiles to match on. // // If an employer filter isn't specified, profiles with any employers are // retrieved. @@ -231,15 +285,14 @@ message ProfileQuery { // If multiple employer filters are specified, profiles with any matching // employers are retrieved. // - // If - // [EmployerFilter.negated][google.cloud.talent.v4beta1.EmployerFilter.negated] - // is specified, the result won't contain profiles that match the employers. + // If [EmployerFilter.negated][google.cloud.talent.v4beta1.EmployerFilter.negated] is specified, the result won't contain + // profiles that match the employers. // // For example, search for profiles that have working experience at "Google // LLC". repeated EmployerFilter employer_filters = 4; - // Optional. Education filter specifies education of profiles to match on. + // Education filter specifies education of profiles to match on. // // If an education filter isn't specified, profiles with any education are // retrieved. @@ -247,29 +300,28 @@ message ProfileQuery { // If multiple education filters are specified, profiles that match any // education filters are retrieved. // - // If - // [EducationFilter.negated][google.cloud.talent.v4beta1.EducationFilter.negated] - // is specified, the result won't contain profiles that match the educations. + // If [EducationFilter.negated][google.cloud.talent.v4beta1.EducationFilter.negated] is specified, the result won't contain + // profiles that match the educations. // // For example, search for profiles with a master degree. repeated EducationFilter education_filters = 5; - // Optional. Skill filter specifies skill of profiles to match on. + // Skill filter specifies skill of profiles to match on. // // If a skill filter isn't specified, profiles with any skills are retrieved. // // If multiple skill filters are specified, profiles that match any skill // filters are retrieved. // - // If [SkillFilter.negated][google.cloud.talent.v4beta1.SkillFilter.negated] - // is specified, the result won't contain profiles that match the skills. + // If [SkillFilter.negated][google.cloud.talent.v4beta1.SkillFilter.negated] is specified, the result won't contain profiles + // that match the skills. // // For example, search for profiles that have "Java" and "Python" in skill // list. repeated SkillFilter skill_filters = 6; - // Optional. Work experience filter specifies the total working experience of - // profiles to match on. + // Work experience filter specifies the total working experience of profiles + // to match on. // // If a work experience filter isn't specified, profiles with any // professional experience are retrieved. @@ -280,31 +332,27 @@ message ProfileQuery { // For example, search for profiles with 10 years of work experience. repeated WorkExperienceFilter work_experience_filter = 7; - // Optional. Time filter specifies the create/update timestamp of the profiles - // to match on. + // Time filter specifies the create/update timestamp of the profiles to match + // on. // // For example, search for profiles created since "2018-1-1". repeated TimeFilter time_filters = 8; - // Optional. The hirable filter specifies the profile's hirable status to - // match on. + // The hirable filter specifies the profile's hirable status to match on. google.protobuf.BoolValue hirable_filter = 9; - // Optional. The application date filters specify application date ranges to - // match on. + // The application date filters specify application date ranges to match on. repeated ApplicationDateFilter application_date_filters = 10; - // Optional. The application outcome notes filters specify the notes for the - // outcome of the job application. + // The application outcome notes filters specify the notes for the outcome of + // the job application. repeated ApplicationOutcomeNotesFilter application_outcome_notes_filters = 11; - // Optional. The application job filters specify the job applied for in the - // application. + // The application job filters specify the job applied for in the application. repeated ApplicationJobFilter application_job_filters = 13; - // Optional. This filter specifies a structured syntax to match against the - // [Profile.custom_attributes][google.cloud.talent.v4beta1.Profile.custom_attributes] - // that are marked as `filterable`. + // This filter specifies a structured syntax to match against the + // [Profile.custom_attributes][google.cloud.talent.v4beta1.Profile.custom_attributes] that are marked as `filterable`. // // The syntax for this expression is a subset of Google SQL syntax. // @@ -329,12 +377,14 @@ message ProfileQuery { // (key1 = "TEST" OR LOWER(key1)="test" OR NOT EMPTY(key1)) string custom_attribute_filter = 15; - // Optional. The candidate availability filter which filters based on - // availability signals. + // Deprecated. Use availability_filters instead. + // + // The candidate availability filter which filters based on availability + // signals. // // Signal 1: Number of days since most recent job application. See - // [Availability.JobApplicationAvailabilitySignal][google.cloud.talent.v4beta1.Availability.JobApplicationAvailabilitySignal] - // for the details of this signal. + // [Availability.JobApplicationAvailabilitySignal][google.cloud.talent.v4beta1.Availability.JobApplicationAvailabilitySignal] for the details of this + // signal. // // Signal 2: Number of days since last profile update. See // [Availability.ProfileUpdateAvailabilitySignal][google.cloud.talent.v4beta1.Availability.ProfileUpdateAvailabilitySignal] @@ -345,14 +395,35 @@ message ProfileQuery { // based on an aggregated set of signals. Specifically, the intent is NOT to // indicate the candidate's potential qualification / interest / close ability // for a specific job. - CandidateAvailabilityFilter candidate_availability_filter = 16; + CandidateAvailabilityFilter candidate_availability_filter = 16 [deprecated = true]; + + // The availability filter which filters based on + // [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals]. + // + // The availability filter helps a recruiter understand if a + // specific candidate is likely to be actively seeking new job opportunities + // based on an aggregated set of signals. Specifically, the intent is NOT to + // indicate the candidate's potential qualification / interest / close ability + // for a specific job. + // + // There can be at most one [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] per + // [signal_type][google.cloud.talent.v4beta1.AvailabilityFilter.signal_type]. If there are multiple + // [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] for a [signal_type][google.cloud.talent.v4beta1.AvailabilityFilter.signal_type], + // an error is thrown. + repeated AvailabilityFilter availability_filters = 18; + + // Person name filter specifies person name of profiles to match on. + // + // If multiple person name filters are specified, profiles that match any + // person name filters are retrieved. + // + // For example, search for profiles of candidates with name "John Smith". + repeated PersonNameFilter person_name_filters = 17; } -// Input only. -// // Geographic region of the search. message LocationFilter { - // Specify whether including telecommute jobs. + // Specify whether to include telecommute jobs. enum TelecommutePreference { // Default value if the telecommute preference isn't specified. TELECOMMUTE_PREFERENCE_UNSPECIFIED = 0; @@ -364,43 +435,41 @@ message LocationFilter { TELECOMMUTE_ALLOWED = 2; } - // Optional. The address name, such as "Mountain View" or "Bay Area". + // The address name, such as "Mountain View" or "Bay Area". string address = 1; - // Optional. CLDR region code of the country/region of the address. This is - // used to address ambiguity of the user-input location, for example, - // "Liverpool" against "Liverpool, NY, US" or "Liverpool, UK". + // CLDR region code of the country/region of the address. This is used + // to address ambiguity of the user-input location, for example, "Liverpool" + // against "Liverpool, NY, US" or "Liverpool, UK". // - // Set this field if all the jobs to search against are from a same region, - // or jobs are world-wide, but the job seeker is from a specific region. + // Set this field to bias location resolution toward a specific country + // or territory. If this field is not set, application behavior is biased + // toward the United States by default. // - // See http://cldr.unicode.org/ and - // http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html + // See https://cldr.unicode.org/ and + // https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html // for details. Example: "CH" for Switzerland. // Note that this filter is not applicable for Profile Search related queries. string region_code = 2; - // Optional. The latitude and longitude of the geographic center from which to - // search. This field's ignored if `address` is provided. + // The latitude and longitude of the geographic center to search from. This + // field is ignored if `address` is provided. google.type.LatLng lat_lng = 3; - // Optional. The distance_in_miles is applied when the location being searched - // for is identified as a city or smaller. When the location being searched - // for is a state or larger, this field is ignored. + // The distance_in_miles is applied when the location being searched for is + // identified as a city or smaller. This field is ignored if the location + // being searched for is a state or larger. double distance_in_miles = 4; - // Optional. Allows the client to return jobs without a + // Allows the client to return jobs without a // set location, specifically, telecommuting jobs (telecommuting is considered // by the service as a special location. - // [Job.posting_region][google.cloud.talent.v4beta1.Job.posting_region] - // indicates if a job permits telecommuting. If this field is set to - // [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4beta1.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED], - // telecommuting jobs are searched, and - // [address][google.cloud.talent.v4beta1.LocationFilter.address] and - // [lat_lng][google.cloud.talent.v4beta1.LocationFilter.lat_lng] are ignored. - // If not set or set to - // [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4beta1.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED], - // telecommute job are not searched. + // [Job.posting_region][google.cloud.talent.v4beta1.Job.posting_region] indicates if a job permits telecommuting. + // If this field is set to [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4beta1.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED], + // telecommuting jobs are searched, and [address][google.cloud.talent.v4beta1.LocationFilter.address] and [lat_lng][google.cloud.talent.v4beta1.LocationFilter.lat_lng] are + // ignored. If not set or set to + // [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4beta1.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED], telecommute job are not + // searched. // // This filter can be used by itself to search exclusively for telecommuting // jobs, or it can be combined with another location @@ -408,17 +477,17 @@ message LocationFilter { // such as "Mountain View" or "telecommuting" jobs. However, when used in // combination with other location filters, telecommuting jobs can be // treated as less relevant than other jobs in the search response. + // + // This field is only used for job search requests. TelecommutePreference telecommute_preference = 5; - // Optional. Whether to apply negation to the filter so profiles matching the - // filter are excluded. + // Whether to apply negation to the filter so profiles matching the filter + // are excluded. // // Currently only supported in profile search. bool negated = 6; } -// Input only. -// // Filter on job compensation type and amount. message CompensationFilter { // Specify the type of filtering. @@ -428,62 +497,50 @@ message CompensationFilter { // Filter by `base compensation entry's` unit. A job is a match if and // only if the job contains a base CompensationEntry and the base - // CompensationEntry's unit matches provided - // [units][google.cloud.talent.v4beta1.CompensationFilter.units]. Populate - // one or more - // [units][google.cloud.talent.v4beta1.CompensationFilter.units]. + // CompensationEntry's unit matches provided [units][google.cloud.talent.v4beta1.CompensationFilter.units]. + // Populate one or more [units][google.cloud.talent.v4beta1.CompensationFilter.units]. // - // See - // [CompensationInfo.CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry] - // for definition of base compensation entry. + // See [CompensationInfo.CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry] for definition of + // base compensation entry. UNIT_ONLY = 1; // Filter by `base compensation entry's` unit and amount / range. A job // is a match if and only if the job contains a base CompensationEntry, and // the base entry's unit matches provided - // [CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit] - // and amount or range overlaps with provided + // [CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit] and + // amount or range overlaps with provided // [CompensationRange][google.cloud.talent.v4beta1.CompensationInfo.CompensationRange]. // - // See - // [CompensationInfo.CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry] - // for definition of base compensation entry. + // See [CompensationInfo.CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry] for definition of + // base compensation entry. // - // Set exactly one - // [units][google.cloud.talent.v4beta1.CompensationFilter.units] and - // populate [range][google.cloud.talent.v4beta1.CompensationFilter.range]. + // Set exactly one [units][google.cloud.talent.v4beta1.CompensationFilter.units] and populate [range][google.cloud.talent.v4beta1.CompensationFilter.range]. UNIT_AND_AMOUNT = 2; // Filter by annualized base compensation amount and `base compensation - // entry's` unit. Populate - // [range][google.cloud.talent.v4beta1.CompensationFilter.range] and zero or - // more [units][google.cloud.talent.v4beta1.CompensationFilter.units]. + // entry's` unit. Populate [range][google.cloud.talent.v4beta1.CompensationFilter.range] and zero or more [units][google.cloud.talent.v4beta1.CompensationFilter.units]. ANNUALIZED_BASE_AMOUNT = 3; // Filter by annualized total compensation amount and `base compensation - // entry's` unit . Populate - // [range][google.cloud.talent.v4beta1.CompensationFilter.range] and zero or - // more [units][google.cloud.talent.v4beta1.CompensationFilter.units]. + // entry's` unit . Populate [range][google.cloud.talent.v4beta1.CompensationFilter.range] and zero or more [units][google.cloud.talent.v4beta1.CompensationFilter.units]. ANNUALIZED_TOTAL_AMOUNT = 4; } // Required. Type of filter. - FilterType type = 1; + FilterType type = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Specify desired `base compensation entry's` // [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit]. - repeated CompensationInfo.CompensationUnit units = 2; + repeated CompensationInfo.CompensationUnit units = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. Compensation range. + // Compensation range. CompensationInfo.CompensationRange range = 3; - // Optional. If set to true, jobs with unspecified compensation range fields - // are included. + // If set to true, jobs with unspecified compensation range fields are + // included. bool include_jobs_with_unspecified_compensation_range = 4; } -// Input only. -// // Parameters needed for commute search. message CommuteFilter { // The traffic density to use when calculating commute time. @@ -498,84 +555,69 @@ message CommuteFilter { BUSY_HOUR = 2; } - // Required. The method of transportation for which to calculate the commute - // time. - CommuteMethod commute_method = 1; + // Required. The method of transportation to calculate the commute time for. + CommuteMethod commute_method = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The latitude and longitude of the location from which to - // calculate the commute time. - google.type.LatLng start_coordinates = 2; + // Required. The latitude and longitude of the location to calculate the + // commute time from. + google.type.LatLng start_coordinates = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The maximum travel time in seconds. The maximum allowed value is - // `3600s` (one hour). Format is `123s`. - google.protobuf.Duration travel_duration = 3; + // Required. The maximum travel time in seconds. The maximum allowed value is `3600s` + // (one hour). Format is `123s`. + google.protobuf.Duration travel_duration = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. If `true`, jobs without street level addresses may also be - // returned. For city level addresses, the city center is used. For state and - // coarser level addresses, text matching is used. If this field is set to - // `false` or isn't specified, only jobs that include street level addresses - // will be returned by commute search. + // If `true`, jobs without street level addresses may also be returned. + // For city level addresses, the city center is used. For state and coarser + // level addresses, text matching is used. + // If this field is set to `false` or isn't specified, only jobs that include + // street level addresses will be returned by commute search. bool allow_imprecise_addresses = 4; - // Optional. - // // Traffic factor to take into account while searching by commute. oneof traffic_option { - // Optional. Specifies the traffic density to use when calculating commute - // time. + // Specifies the traffic density to use when calculating commute time. RoadTraffic road_traffic = 5; - // Optional. The departure time used to calculate traffic impact, - // represented as [google.type.TimeOfDay][google.type.TimeOfDay] in local - // time zone. + // The departure time used to calculate traffic impact, represented as + // [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone. // // Currently traffic model is restricted to hour level resolution. google.type.TimeOfDay departure_time = 6; } } -// Input only. -// // Job title of the search. message JobTitleFilter { - // Required. The job title, for example, "Software engineer", or "Product - // manager". - string job_title = 1; + // Required. The job title. For example, "Software engineer", or "Product manager". + string job_title = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Whether to apply negation to the filter so profiles matching the - // filter are excluded. + // Whether to apply negation to the filter so profiles matching the filter + // are excluded. bool negated = 2; } -// Input only. -// // Skill filter of the search. message SkillFilter { // Required. The skill name. For example, "java", "j2ee", and so on. - string skill = 1; + string skill = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Whether to apply negation to the filter so profiles matching the - // filter are excluded. + // Whether to apply negation to the filter so profiles matching the filter + // are excluded. bool negated = 2; } -// Input only. -// // Employer filter of the search. message EmployerFilter { - // Enum indicating which set of - // [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records] - // to search against. + // Enum indicating which set of [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records] to search + // against. enum EmployerFilterMode { // Default value. EMPLOYER_FILTER_MODE_UNSPECIFIED = 0; - // Apply to all employers in - // [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records]. + // Apply to all employers in [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records]. ALL_EMPLOYMENT_RECORDS = 1; - // Apply only to current employer in - // [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records]. + // Apply only to current employer in [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records]. CURRENT_EMPLOYMENT_RECORDS_ONLY = 2; // Apply only to past (not current) employers in @@ -584,121 +626,92 @@ message EmployerFilter { } // Required. The name of the employer, for example "Google", "Alphabet". - string employer = 1; + string employer = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Define set of - // [EmploymentRecord][google.cloud.talent.v4beta1.EmploymentRecord]s to search - // against. + // Define set of [EmploymentRecord][google.cloud.talent.v4beta1.EmploymentRecord]s to search against. // - // Defaults to - // [EmployerFilterMode.ALL_EMPLOYMENT_RECORDS][google.cloud.talent.v4beta1.EmployerFilter.EmployerFilterMode.ALL_EMPLOYMENT_RECORDS]. + // Defaults to [EmployerFilterMode.ALL_EMPLOYMENT_RECORDS][google.cloud.talent.v4beta1.EmployerFilter.EmployerFilterMode.ALL_EMPLOYMENT_RECORDS]. EmployerFilterMode mode = 2; - // Optional. Whether to apply negation to the filter so profiles matching the - // filter is excluded. + // Whether to apply negation to the filter so profiles matching the filter + // is excluded. bool negated = 3; } -// Input only. -// // Education filter of the search. message EducationFilter { - // Optional. The school name. For example "MIT", "University of California, - // Berkeley". + // The school name. For example "MIT", "University of California, Berkeley". string school = 1; - // Optional. The field of study. This is to search against value provided in + // The field of study. This is to search against value provided in // [Degree.fields_of_study][google.cloud.talent.v4beta1.Degree.fields_of_study]. // For example "Computer Science", "Mathematics". string field_of_study = 2; - // Optional. Education degree in ISCED code. Each value in degree covers a - // specific level of education, without any expansion to upper nor lower - // levels of education degree. + // Education degree in ISCED code. Each value in degree covers a specific + // level of education, without any expansion to upper nor lower levels of + // education degree. DegreeType degree_type = 3; - // Optional. Whether to apply negation to the filter so profiles matching the - // filter is excluded. + // Whether to apply negation to the filter so profiles matching the filter + // is excluded. bool negated = 6; } -// Input only. -// // Work experience filter. // // This filter is used to search for profiles with working experience length -// between -// [min_experience][google.cloud.talent.v4beta1.WorkExperienceFilter.min_experience] -// and -// [max_experience][google.cloud.talent.v4beta1.WorkExperienceFilter.max_experience]. +// between [min_experience][google.cloud.talent.v4beta1.WorkExperienceFilter.min_experience] and [max_experience][google.cloud.talent.v4beta1.WorkExperienceFilter.max_experience]. message WorkExperienceFilter { - // Optional. The minimum duration of the work experience (inclusive). + // The minimum duration of the work experience (inclusive). google.protobuf.Duration min_experience = 1; - // Optional. The maximum duration of the work experience (exclusive). + // The maximum duration of the work experience (exclusive). google.protobuf.Duration max_experience = 2; } -// Input only. -// // Application Date Range Filter. // -// The API matches profiles with -// [Application.application_date][google.cloud.talent.v4beta1.Application.application_date] -// between start date and end date (both boundaries are inclusive). The filter -// is ignored if both -// [start_date][google.cloud.talent.v4beta1.ApplicationDateFilter.start_date] -// and [end_date][google.cloud.talent.v4beta1.ApplicationDateFilter.end_date] -// are missing. +// The API matches profiles with [Application.application_date][google.cloud.talent.v4beta1.Application.application_date] between +// start date and end date (both boundaries are inclusive). The filter is +// ignored if both [start_date][google.cloud.talent.v4beta1.ApplicationDateFilter.start_date] and [end_date][google.cloud.talent.v4beta1.ApplicationDateFilter.end_date] are missing. message ApplicationDateFilter { - // Optional. Start date. If it's missing, The API matches profiles with - // application date not after the end date. + // Start date. If it's missing, The API matches profiles with application date + // not after the end date. google.type.Date start_date = 1; - // Optional. End date. If it's missing, The API matches profiles with - // application date not before the start date. + // End date. If it's missing, The API matches profiles with application date + // not before the start date. google.type.Date end_date = 2; } -// Input only. -// // Outcome Notes Filter. message ApplicationOutcomeNotesFilter { - // Required. User entered or selected outcome reason. The API does an exact - // match on the - // [Application.outcome_notes][google.cloud.talent.v4beta1.Application.outcome_notes] - // in profiles. - string outcome_notes = 1; - - // Optional. If true, The API excludes all candidates with any - // [Application.outcome_notes][google.cloud.talent.v4beta1.Application.outcome_notes] - // matching the outcome reason specified in the filter. + // Required. User entered or selected outcome reason. The API does an exact match on the + // [Application.outcome_notes][google.cloud.talent.v4beta1.Application.outcome_notes] in profiles. + string outcome_notes = 1 [(google.api.field_behavior) = REQUIRED]; + + // If true, The API excludes all candidates with any + // [Application.outcome_notes][google.cloud.talent.v4beta1.Application.outcome_notes] matching the outcome reason specified in + // the filter. bool negated = 2; } -// Input only. -// // Filter on the job information of Application. message ApplicationJobFilter { - // Optional. The job requisition id in the application. The API does an exact - // match on the - // [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id] of - // [Application.job][google.cloud.talent.v4beta1.Application.job] in profiles. + // The job requisition id in the application. The API does an exact match on + // the [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id] of [Application.job][google.cloud.talent.v4beta1.Application.job] in profiles. string job_requisition_id = 2; - // Optional. The job title in the application. The API does an exact match on - // the [Job.title][google.cloud.talent.v4beta1.Job.title] of - // [Application.job][google.cloud.talent.v4beta1.Application.job] in profiles. + // The job title in the application. The API does an exact match on the + // [Job.title][google.cloud.talent.v4beta1.Job.title] of [Application.job][google.cloud.talent.v4beta1.Application.job] in profiles. string job_title = 3; - // Optional. If true, the API excludes all profiles with any - // [Application.job][google.cloud.talent.v4beta1.Application.job] matching the - // filters. + // If true, the API excludes all profiles with any [Application.job][google.cloud.talent.v4beta1.Application.job] + // matching the filters. bool negated = 4; } -// Input only. -// // Filter on create timestamp or update timestamp of profiles. message TimeFilter { // Time fields can be used in TimeFilter. @@ -713,28 +726,55 @@ message TimeFilter { UPDATE_TIME = 2; } - // Optional. Start timestamp, matching profiles with the start time. If this - // field missing, The API matches profiles with create / update timestamp - // before the end timestamp. + // Start timestamp, matching profiles with the start time. If this field + // missing, The API matches profiles with create / update timestamp before the + // end timestamp. google.protobuf.Timestamp start_time = 1; - // Optional. End timestamp, matching profiles with the end time. If this field + // End timestamp, matching profiles with the end time. If this field // missing, The API matches profiles with create / update timestamp after the // start timestamp. google.protobuf.Timestamp end_time = 2; - // Optional. Specifies which time field to filter profiles. + // Specifies which time field to filter profiles. // - // Defaults to - // [TimeField.CREATE_TIME][google.cloud.talent.v4beta1.TimeFilter.TimeField.CREATE_TIME]. + // Defaults to [TimeField.CREATE_TIME][google.cloud.talent.v4beta1.TimeFilter.TimeField.CREATE_TIME]. TimeField time_field = 3; } -// Input only +// Deprecated. Use AvailabilityFilter instead. // // Filter on availability signals. message CandidateAvailabilityFilter { - // Optional. It is false by default. If true, API excludes all the potential - // available profiles. + option deprecated = true; + + // It is false by default. If true, API excludes all the potential available + // profiles. bool negated = 1; } + +// Filter on availability signals. +message AvailabilityFilter { + // Required. Type of signal to apply filter on. + AvailabilitySignalType signal_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Range of times to filter candidate signals by. + TimestampRange range = 2 [(google.api.field_behavior) = REQUIRED]; + + // If multiple [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] are provided, the default + // behavior is to OR all filters, but if this field is set to true, this + // particular [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] will be AND'ed against other + // [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter]. + bool required = 3; +} + +// Filter on person name. +message PersonNameFilter { + // Required. The person name. For example, "John Smith". + // + // Can be any combination of [PersonName.structured_name.given_name][], + // [PersonName.structured_name.middle_initial][], + // [PersonName.structured_name.family_name][], and + // [PersonName.formatted_name][google.cloud.talent.v4beta1.PersonName.formatted_name]. + string person_name = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/google/cloud/talent/v4beta1/histogram.proto b/google/cloud/talent/v4beta1/histogram.proto index a4dfdd4e6..109386904 100644 --- a/google/cloud/talent/v4beta1/histogram.proto +++ b/google/cloud/talent/v4beta1/histogram.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.talent.v4beta1; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; option java_multiple_files = true; @@ -26,26 +24,17 @@ option java_outer_classname = "HistogramProto"; option java_package = "com.google.cloud.talent.v4beta1"; option objc_class_prefix = "CTS"; -// Input Only. -// // The histogram request. message HistogramQuery { // An expression specifies a histogram request against matching resources // (for example, jobs, profiles) for searches. // - // See - // [SearchJobsRequest.histogram_queries][google.cloud.talent.v4beta1.SearchJobsRequest.histogram_queries] - // and - // [SearchProfilesRequest.histogram_queries][google.cloud.talent.v4beta1.SearchProfilesRequest.histogram_queries] - // for details about syntax. + // See [SearchJobsRequest.histogram_queries][google.cloud.talent.v4beta1.SearchJobsRequest.histogram_queries] and + // [SearchProfilesRequest.histogram_queries][google.cloud.talent.v4beta1.SearchProfilesRequest.histogram_queries] for details about syntax. string histogram_query = 1; } -// Output only. -// -// Histogram result that matches -// [HistogramQuery][google.cloud.talent.v4beta1.HistogramQuery] specified in -// searches. +// Histogram result that matches [HistogramQuery][google.cloud.talent.v4beta1.HistogramQuery] specified in searches. message HistogramQueryResult { // Requested histogram expression. string histogram_query = 1; diff --git a/google/cloud/talent/v4beta1/job.proto b/google/cloud/talent/v4beta1/job.proto index 711a4b5be..b2ffa2bc8 100644 --- a/google/cloud/talent/v4beta1/job.proto +++ b/google/cloud/talent/v4beta1/job.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,17 +11,17 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.talent.v4beta1; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/talent/v4beta1/common.proto"; import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; import "google/type/postal_address.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; option java_multiple_files = true; @@ -30,20 +30,25 @@ option java_package = "com.google.cloud.talent.v4beta1"; option objc_class_prefix = "CTS"; // A Job resource represents a job posting (also referred to as a "job listing" -// or "job requisition"). A job belongs to a -// [Company][google.cloud.talent.v4beta1.Company], which is the hiring entity -// responsible for the job. +// or "job requisition"). A job belongs to a [Company][google.cloud.talent.v4beta1.Company], which is the hiring +// entity responsible for the job. message Job { + option (google.api.resource) = { + type: "jobs.googleapis.com/Job" + pattern: "projects/{project}/tenants/{tenant}/jobs/{job}" + pattern: "projects/{project}/jobs/{job}" + }; + // Application related details of a job posting. message ApplicationInfo { - // Optional. Use this field to specify email address(es) to which resumes or + // Use this field to specify email address(es) to which resumes or // applications can be sent. // // The maximum number of allowed characters for each entry is 255. repeated string emails = 1; - // Optional. Use this field to provide instructions, such as "Mail your - // application to ...", that a candidate can follow to apply for the job. + // Use this field to provide instructions, such as "Mail your application + // to ...", that a candidate can follow to apply for the job. // // This field accepts and sanitizes HTML input, and also accepts // bold, italic, ordered list, and unordered list markup tags. @@ -51,41 +56,32 @@ message Job { // The maximum number of allowed characters is 3,000. string instruction = 2; - // Optional. Use this URI field to direct an applicant to a website, for - // example to link to an online application form. + // Use this URI field to direct an applicant to a website, for example to + // link to an online application form. // // The maximum number of allowed characters for each entry is 2,000. repeated string uris = 3; } - // Output only. - // // Derived details about the job posting. message DerivedInfo { - // Structured locations of the job, resolved from - // [Job.addresses][google.cloud.talent.v4beta1.Job.addresses]. + // Structured locations of the job, resolved from [Job.addresses][google.cloud.talent.v4beta1.Job.addresses]. // - // [locations][google.cloud.talent.v4beta1.Job.DerivedInfo.locations] are - // exactly matched to - // [Job.addresses][google.cloud.talent.v4beta1.Job.addresses] in the same + // [locations][google.cloud.talent.v4beta1.Job.DerivedInfo.locations] are exactly matched to [Job.addresses][google.cloud.talent.v4beta1.Job.addresses] in the same // order. repeated Location locations = 1; - // Job categories derived from - // [Job.title][google.cloud.talent.v4beta1.Job.title] and - // [Job.description][google.cloud.talent.v4beta1.Job.description]. + // Job categories derived from [Job.title][google.cloud.talent.v4beta1.Job.title] and [Job.description][google.cloud.talent.v4beta1.Job.description]. repeated JobCategory job_categories = 3; } - // Input only. - // // Options for job processing. message ProcessingOptions { - // Optional. If set to `true`, the service does not attempt to resolve a + // If set to `true`, the service does not attempt to resolve a // more precise address for the job. bool disable_street_address_resolution = 1; - // Optional. Option for job HTML content sanitization. Applied fields are: + // Option for job HTML content sanitization. Applied fields are: // // * description // * applicationInfo.instruction @@ -96,8 +92,7 @@ message Job { // HTML tags in these fields may be stripped if sanitiazation isn't // disabled. // - // Defaults to - // [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4beta1.HtmlSanitization.SIMPLE_FORMATTING_ONLY]. + // Defaults to [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4beta1.HtmlSanitization.SIMPLE_FORMATTING_ONLY]. HtmlSanitization html_sanitization = 2; } @@ -107,57 +102,58 @@ message Job { // job is created. // // The format is - // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for - // example, "projects/api-test-project/tenants/foo/jobs/1234". + // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + // example, "projects/foo/tenants/bar/jobs/baz". // - // Tenant id is optional and the default tenant is used if unspecified, for - // example, "projects/api-test-project/jobs/1234". + // If tenant id is unspecified, the default tenant is used. For + // example, "projects/foo/jobs/bar". // // Use of this field in job queries and API calls is preferred over the use of - // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id] since this - // value is unique. + // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id] since this value is unique. string name = 1; // Required. The resource name of the company listing the job. // // The format is - // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - // example, "projects/api-test-project/tenants/foo/companies/bar". - // - // Tenant id is optional and the default tenant is used if unspecified, for - // example, "projects/api-test-project/companies/bar". - string company = 2; - - // Required. The requisition ID, also referred to as the posting ID, is - // assigned by the client to identify a job. This field is intended to be used - // by clients for client identification and tracking of postings. A job isn't - // allowed to be created if there is another job with the same - // [company][google.cloud.talent.v4beta1.Job.name], - // [language_code][google.cloud.talent.v4beta1.Job.language_code] and - // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id]. + // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For + // example, "projects/foo/tenants/bar/companies/baz". + // + // If tenant id is unspecified, the default tenant is used. For + // example, "projects/foo/companies/bar". + string company = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Company" + } + ]; + + // Required. The requisition ID, also referred to as the posting ID, is assigned by the + // client to identify a job. This field is intended to be used by clients + // for client identification and tracking of postings. A job isn't allowed + // to be created if there is another job with the same [company][google.cloud.talent.v4beta1.Job.name], + // [language_code][google.cloud.talent.v4beta1.Job.language_code] and [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id]. // // The maximum number of allowed characters is 255. - string requisition_id = 3; + string requisition_id = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The title of the job, such as "Software Engineer" // // The maximum number of allowed characters is 500. - string title = 4; + string title = 4 [(google.api.field_behavior) = REQUIRED]; - // Required. The description of the job, which typically includes a - // multi-paragraph description of the company and related information. - // Separate fields are provided on the job object for - // [responsibilities][google.cloud.talent.v4beta1.Job.responsibilities], - // [qualifications][google.cloud.talent.v4beta1.Job.qualifications], and other - // job characteristics. Use of these separate job fields is recommended. + // Required. The description of the job, which typically includes a multi-paragraph + // description of the company and related information. Separate fields are + // provided on the job object for [responsibilities][google.cloud.talent.v4beta1.Job.responsibilities], + // [qualifications][google.cloud.talent.v4beta1.Job.qualifications], and other job characteristics. Use of + // these separate job fields is recommended. // // This field accepts and sanitizes HTML input, and also accepts // bold, italic, ordered list, and unordered list markup tags. // // The maximum number of allowed characters is 100,000. - string description = 5; + string description = 5 [(google.api.field_behavior) = REQUIRED]; - // Optional but strongly recommended for the best service experience. + // Strongly recommended for the best service experience. // // Location(s) where the employer is looking to hire for this job posting. // @@ -166,32 +162,28 @@ message Job { // // At most 50 locations are allowed for best search performance. If a job has // more locations, it is suggested to split it into multiple jobs with unique - // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id]s (e.g. - // 'ReqA' becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the - // same [company][google.cloud.talent.v4beta1.Job.company], - // [language_code][google.cloud.talent.v4beta1.Job.language_code] and - // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id] are not - // allowed. If the original - // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id] must be - // preserved, a custom field should be used for storage. It is also suggested - // to group the locations that close to each other in the same job for better - // search experience. + // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id]s (e.g. 'ReqA' becomes 'ReqA-1', 'ReqA-2', and so on.) as + // multiple jobs with the same [company][google.cloud.talent.v4beta1.Job.company], [language_code][google.cloud.talent.v4beta1.Job.language_code] and + // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id] are not allowed. If the original [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id] must + // be preserved, a custom field should be used for storage. It is also + // suggested to group the locations that close to each other in the same job + // for better search experience. // // The maximum number of allowed characters is 500. repeated string addresses = 6; - // Optional. Job application information. + // Job application information. ApplicationInfo application_info = 7; - // Optional. The benefits included with the job. + // The benefits included with the job. repeated JobBenefit job_benefits = 8; - // Optional. Job compensation information (a.k.a. "pay rate") i.e., the - // compensation that will paid to the employee. + // Job compensation information (a.k.a. "pay rate") i.e., the compensation + // that will paid to the employee. CompensationInfo compensation_info = 9; - // Optional. A map of fields to hold both filterable and non-filterable custom - // job attributes that are not covered by the provided structured fields. + // A map of fields to hold both filterable and non-filterable custom job + // attributes that are not covered by the provided structured fields. // // The keys of the map are strings up to 64 bytes and must match the // pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or @@ -204,28 +196,27 @@ message Job { // is 50KB. map custom_attributes = 10; - // Optional. The desired education degrees for the job, such as Bachelors, - // Masters. + // The desired education degrees for the job, such as Bachelors, Masters. repeated DegreeType degree_types = 11; - // Optional. The department or functional area within the company with the - // open position. + // The department or functional area within the company with the open + // position. // // The maximum number of allowed characters is 255. string department = 12; - // Optional. The employment type(s) of a job, for example, + // The employment type(s) of a job, for example, // [full time][google.cloud.talent.v4beta1.EmploymentType.FULL_TIME] or // [part time][google.cloud.talent.v4beta1.EmploymentType.PART_TIME]. repeated EmploymentType employment_types = 13; - // Optional. A description of bonus, commission, and other compensation + // A description of bonus, commission, and other compensation // incentives associated with the job not including salary or pay. // // The maximum number of allowed characters is 10,000. string incentives = 14; - // Optional. The language of the posting. This field is distinct from + // The language of the posting. This field is distinct from // any requirements for fluency that are associated with the job. // // Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn". @@ -233,18 +224,15 @@ message Job { // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){: // class="external" target="_blank" }. // - // If this field is unspecified and - // [Job.description][google.cloud.talent.v4beta1.Job.description] is present, - // detected language code based on - // [Job.description][google.cloud.talent.v4beta1.Job.description] is assigned, - // otherwise defaults to 'en_US'. + // If this field is unspecified and [Job.description][google.cloud.talent.v4beta1.Job.description] is present, detected + // language code based on [Job.description][google.cloud.talent.v4beta1.Job.description] is assigned, otherwise + // defaults to 'en_US'. string language_code = 15; - // Optional. The experience level associated with the job, such as "Entry - // Level". + // The experience level associated with the job, such as "Entry Level". JobLevel job_level = 16; - // Optional. A promotion value of the job, as determined by the client. + // A promotion value of the job, as determined by the client. // The value determines the sort order of the jobs returned when searching for // jobs using the featured jobs search call, with higher promotional values // being returned first and ties being resolved by relevance sort. Only the @@ -253,10 +241,9 @@ message Job { // Default value is 0, and negative values are treated as 0. int32 promotion_value = 17; - // Optional. A description of the qualifications required to perform the + // A description of the qualifications required to perform the // job. The use of this field is recommended - // as an alternative to using the more general - // [description][google.cloud.talent.v4beta1.Job.description] field. + // as an alternative to using the more general [description][google.cloud.talent.v4beta1.Job.description] field. // // This field accepts and sanitizes HTML input, and also accepts // bold, italic, ordered list, and unordered list markup tags. @@ -264,9 +251,9 @@ message Job { // The maximum number of allowed characters is 10,000. string qualifications = 18; - // Optional. A description of job responsibilities. The use of this field is - // recommended as an alternative to using the more general - // [description][google.cloud.talent.v4beta1.Job.description] field. + // A description of job responsibilities. The use of this field is + // recommended as an alternative to using the more general [description][google.cloud.talent.v4beta1.Job.description] + // field. // // This field accepts and sanitizes HTML input, and also accepts // bold, italic, ordered list, and unordered list markup tags. @@ -274,55 +261,46 @@ message Job { // The maximum number of allowed characters is 10,000. string responsibilities = 19; - // Optional. The job - // [PostingRegion][google.cloud.talent.v4beta1.PostingRegion] (for example, - // state, country) throughout which the job is available. If this field is - // set, a [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] in a - // search query within the job region finds this job posting if an exact - // location match isn't specified. If this field is set to - // [PostingRegion.NATION][google.cloud.talent.v4beta1.PostingRegion.NATION] or - // [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4beta1.PostingRegion.ADMINISTRATIVE_AREA], - // setting job [Job.addresses][google.cloud.talent.v4beta1.Job.addresses] to - // the same location level as this field is strongly recommended. + // The job [PostingRegion][google.cloud.talent.v4beta1.PostingRegion] (for example, state, country) throughout + // which the job is available. If this field is set, a [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] + // in a search query within the job region finds this job posting if an + // exact location match isn't specified. If this field is set to + // [PostingRegion.NATION][google.cloud.talent.v4beta1.PostingRegion.NATION] or [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4beta1.PostingRegion.ADMINISTRATIVE_AREA], + // setting job [Job.addresses][google.cloud.talent.v4beta1.Job.addresses] to the same location level as this field + // is strongly recommended. PostingRegion posting_region = 20; - // Optional. The visibility of the job. + // Deprecated. The job is only visible to the owner. // - // Defaults to - // [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4beta1.Visibility.ACCOUNT_ONLY] - // if not specified. - Visibility visibility = 21; + // The visibility of the job. + // + // Defaults to [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4beta1.Visibility.ACCOUNT_ONLY] if not specified. + Visibility visibility = 21 [deprecated = true]; - // Optional. The start timestamp of the job in UTC time zone. Typically this - // field is used for contracting engagements. Invalid timestamps are ignored. + // The start timestamp of the job in UTC time zone. Typically this field + // is used for contracting engagements. Invalid timestamps are ignored. google.protobuf.Timestamp job_start_time = 22; - // Optional. The end timestamp of the job. Typically this field is used for - // contracting engagements. Invalid timestamps are ignored. + // The end timestamp of the job. Typically this field is used for contracting + // engagements. Invalid timestamps are ignored. google.protobuf.Timestamp job_end_time = 23; - // Optional. The timestamp this job posting was most recently published. The - // default value is the time the request arrives at the server. Invalid - // timestamps are ignored. + // The timestamp this job posting was most recently published. The default + // value is the time the request arrives at the server. Invalid timestamps are + // ignored. google.protobuf.Timestamp posting_publish_time = 24; - // Optional but strongly recommended for the best service - // experience. + // Strongly recommended for the best service experience. // // The expiration timestamp of the job. After this timestamp, the // job is marked as expired, and it no longer appears in search results. The - // expired job can't be listed by the - // [ListJobs][google.cloud.talent.v4beta1.JobService.ListJobs] API, but it can - // be retrieved with the - // [GetJob][google.cloud.talent.v4beta1.JobService.GetJob] API or updated with - // the [UpdateJob][google.cloud.talent.v4beta1.JobService.UpdateJob] API or - // deleted with the - // [DeleteJob][google.cloud.talent.v4beta1.JobService.DeleteJob] API. An - // expired job can be updated and opened again by using a future expiration - // timestamp. Updating an expired job fails if there is another existing open - // job with same [company][google.cloud.talent.v4beta1.Job.company], - // [language_code][google.cloud.talent.v4beta1.Job.language_code] and - // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id]. + // expired job can't be listed by the [ListJobs][google.cloud.talent.v4beta1.JobService.ListJobs] API, + // but it can be retrieved with the [GetJob][google.cloud.talent.v4beta1.JobService.GetJob] API or + // updated with the [UpdateJob][google.cloud.talent.v4beta1.JobService.UpdateJob] API or deleted with + // the [DeleteJob][google.cloud.talent.v4beta1.JobService.DeleteJob] API. An expired job can + // be updated and opened again by using a future expiration timestamp. + // Updating an expired job fails if there is another existing open job with + // same [company][google.cloud.talent.v4beta1.Job.company], [language_code][google.cloud.talent.v4beta1.Job.language_code] and [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id]. // // The expired jobs are retained in our system for 90 days. However, the // overall expired job count cannot exceed 3 times the maximum number of @@ -336,13 +314,12 @@ message Job { // If the timestamp is before the instant request is made, the job // is treated as expired immediately on creation. This kind of job can // not be updated. And when creating a job with past timestamp, the - // [posting_publish_time][google.cloud.talent.v4beta1.Job.posting_publish_time] - // must be set before - // [posting_expire_time][google.cloud.talent.v4beta1.Job.posting_expire_time]. - // The purpose of this feature is to allow other objects, such as - // [Application][google.cloud.talent.v4beta1.Application], to refer a job that - // didn't exist in the system prior to becoming expired. If you want to modify - // a job that was expired on creation, delete it and create a new one. + // [posting_publish_time][google.cloud.talent.v4beta1.Job.posting_publish_time] must be set before + // [posting_expire_time][google.cloud.talent.v4beta1.Job.posting_expire_time]. The purpose of this feature is + // to allow other objects, such as [Application][google.cloud.talent.v4beta1.Application], to refer a job + // that didn't exist in the system prior to becoming expired. If you + // want to modify a job that was expired on creation, + // delete it and create a new one. // // If this value isn't provided at the time of job creation or is invalid, // the job posting expires after 30 days from the job's creation time. For @@ -350,27 +327,24 @@ message Job { // unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC. // // If this value isn't provided on job update, it depends on the field masks - // set by - // [UpdateJobRequest.update_mask][google.cloud.talent.v4beta1.UpdateJobRequest.update_mask]. - // If the field masks include - // [job_end_time][google.cloud.talent.v4beta1.Job.job_end_time], or the masks - // are empty meaning that every field is updated, the job posting expires - // after 30 days from the job's last update time. Otherwise the expiration - // date isn't updated. + // set by [UpdateJobRequest.update_mask][google.cloud.talent.v4beta1.UpdateJobRequest.update_mask]. If the field masks include + // [job_end_time][google.cloud.talent.v4beta1.Job.job_end_time], or the masks are empty meaning that every field is + // updated, the job posting expires after 30 days from the job's last + // update time. Otherwise the expiration date isn't updated. google.protobuf.Timestamp posting_expire_time = 25; // Output only. The timestamp when this job posting was created. - google.protobuf.Timestamp posting_create_time = 26; + google.protobuf.Timestamp posting_create_time = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The timestamp when this job posting was last updated. - google.protobuf.Timestamp posting_update_time = 27; + google.protobuf.Timestamp posting_update_time = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Display name of the company listing the job. - string company_display_name = 28; + string company_display_name = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Derived details about the job posting. - DerivedInfo derived_info = 29; + DerivedInfo derived_info = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Options for job processing. + // Options for job processing. ProcessingOptions processing_options = 30; } diff --git a/google/cloud/talent/v4beta1/job_service.proto b/google/cloud/talent/v4beta1/job_service.proto index 1b0d8bfeb..148e64865 100644 --- a/google/cloud/talent/v4beta1/job_service.proto +++ b/google/cloud/talent/v4beta1/job_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,15 +18,18 @@ package google.cloud.talent.v4beta1; import "google/api/annotations.proto"; import "google/api/client.proto"; -import "google/cloud/talent/v4beta1/batch.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/talent/v4beta1/common.proto"; import "google/cloud/talent/v4beta1/filters.proto"; import "google/cloud/talent/v4beta1/histogram.proto"; import "google/cloud/talent/v4beta1/job.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; option java_multiple_files = true; @@ -55,6 +57,24 @@ service JobService { body: "*" } }; + option (google.api.method_signature) = "parent,job"; + } + + // Begins executing a batch create jobs operation. + rpc BatchCreateJobs(BatchCreateJobsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:batchCreate" + body: "*" + additional_bindings { + post: "/v4beta1/{parent=projects/*}/jobs:batchCreate" + body: "*" + } + }; + option (google.api.method_signature) = "parent,jobs"; + option (google.longrunning.operation_info) = { + response_type: "JobOperationResult" + metadata_type: "BatchOperationMetadata" + }; } // Retrieves the specified job, whose status is OPEN or recently EXPIRED @@ -62,8 +82,11 @@ service JobService { rpc GetJob(GetJobRequest) returns (Job) { option (google.api.http) = { get: "/v4beta1/{name=projects/*/tenants/*/jobs/*}" - additional_bindings { get: "/v4beta1/{name=projects/*/jobs/*}" } + additional_bindings { + get: "/v4beta1/{name=projects/*/jobs/*}" + } }; + option (google.api.method_signature) = "name"; } // Updates specified job. @@ -79,6 +102,24 @@ service JobService { body: "*" } }; + option (google.api.method_signature) = "job"; + } + + // Begins executing a batch update jobs operation. + rpc BatchUpdateJobs(BatchUpdateJobsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:batchUpdate" + body: "*" + additional_bindings { + post: "/v4beta1/{parent=projects/*}/jobs:batchUpdate" + body: "*" + } + }; + option (google.api.method_signature) = "parent,jobs"; + option (google.longrunning.operation_info) = { + response_type: "JobOperationResult" + metadata_type: "BatchOperationMetadata" + }; } // Deletes the specified job. @@ -88,16 +129,11 @@ service JobService { rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v4beta1/{name=projects/*/tenants/*/jobs/*}" - additional_bindings { delete: "/v4beta1/{name=projects/*/jobs/*}" } - }; - } - - // Lists jobs by filter. - rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { - option (google.api.http) = { - get: "/v4beta1/{parent=projects/*/tenants/*}/jobs" - additional_bindings { get: "/v4beta1/{parent=projects/*}/jobs" } + additional_bindings { + delete: "/v4beta1/{name=projects/*/jobs/*}" + } }; + option (google.api.method_signature) = "name"; } // Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. @@ -109,15 +145,25 @@ service JobService { post: "/v4beta1/{parent=projects/*}/jobs:batchDelete" } }; + option (google.api.method_signature) = "parent,filter"; + } + + // Lists jobs by filter. + rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { + option (google.api.http) = { + get: "/v4beta1/{parent=projects/*/tenants/*}/jobs" + additional_bindings { + get: "/v4beta1/{parent=projects/*}/jobs" + } + }; + option (google.api.method_signature) = "parent,filter"; } - // Searches for jobs using the provided - // [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. + // Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. // - // This call constrains the - // [visibility][google.cloud.talent.v4beta1.Job.visibility] of jobs present in - // the database, and only returns jobs that the caller has permission to - // search against. + // This call constrains the [visibility][google.cloud.talent.v4beta1.Job.visibility] of jobs + // present in the database, and only returns jobs that the caller has + // permission to search against. rpc SearchJobs(SearchJobsRequest) returns (SearchJobsResponse) { option (google.api.http) = { post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:search" @@ -129,18 +175,16 @@ service JobService { }; } - // Searches for jobs using the provided - // [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. + // Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. // // This API call is intended for the use case of targeting passive job // seekers (for example, job seekers who have signed up to receive email // alerts about potential job opportunities), and has different algorithmic // adjustments that are targeted to passive job seekers. // - // This call constrains the - // [visibility][google.cloud.talent.v4beta1.Job.visibility] of jobs present in - // the database, and only returns jobs the caller has permission to search - // against. + // This call constrains the [visibility][google.cloud.talent.v4beta1.Job.visibility] of jobs + // present in the database, and only returns jobs the caller has + // permission to search against. rpc SearchJobsForAlert(SearchJobsRequest) returns (SearchJobsResponse) { option (google.api.http) = { post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:searchForAlert" @@ -151,113 +195,90 @@ service JobService { } }; } - - // Begins executing a batch create jobs operation. - rpc BatchCreateJobs(BatchCreateJobsRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:batchCreate" - body: "*" - additional_bindings { - post: "/v4beta1/{parent=projects/*}/jobs:batchCreate" - body: "*" - } - }; - } - - // Begins executing a batch update jobs operation. - rpc BatchUpdateJobs(BatchUpdateJobsRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:batchUpdate" - body: "*" - additional_bindings { - post: "/v4beta1/{parent=projects/*}/jobs:batchUpdate" - body: "*" - } - }; - } } -// Input only. -// // Create job request. message CreateJobRequest { // Required. The resource name of the tenant under which the job is created. // - // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenant/foo". - // - // Tenant id is optional and a default tenant is created if unspecified, for - // example, "projects/api-test-project". - string parent = 1; + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenant/bar". If tenant id is unspecified a default tenant + // is created. For example, "projects/foo". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Job" + } + ]; // Required. The Job to be created. - Job job = 2; + Job job = 2 [(google.api.field_behavior) = REQUIRED]; } -// Input only. -// // Get job request. message GetJobRequest { // Required. The resource name of the job to retrieve. // // The format is - // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for - // example, "projects/api-test-project/tenants/foo/jobs/1234". - // - // Tenant id is optional and the default tenant is used if unspecified, for - // example, "projects/api-test-project/jobs/1234". - string name = 1; + // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + // example, "projects/foo/tenants/bar/jobs/baz". + // + // If tenant id is unspecified, the default tenant is used. For + // example, "projects/foo/jobs/bar". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Job" + } + ]; } -// Input only. -// // Update job request. message UpdateJobRequest { // Required. The Job to be updated. - Job job = 1; + Job job = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional but strongly recommended to be provided for the best service - // experience. + // Strongly recommended for the best service experience. // - // If [update_mask][google.cloud.talent.v4beta1.UpdateJobRequest.update_mask] - // is provided, only the specified fields in - // [job][google.cloud.talent.v4beta1.UpdateJobRequest.job] are updated. - // Otherwise all the fields are updated. + // If [update_mask][google.cloud.talent.v4beta1.UpdateJobRequest.update_mask] is provided, only the specified fields in + // [job][google.cloud.talent.v4beta1.UpdateJobRequest.job] are updated. Otherwise all the fields are updated. // // A field mask to restrict the fields that are updated. Only // top level fields of [Job][google.cloud.talent.v4beta1.Job] are supported. google.protobuf.FieldMask update_mask = 2; } -// Input only. -// // Delete job request. message DeleteJobRequest { // Required. The resource name of the job to be deleted. // // The format is - // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for - // example, "projects/api-test-project/tenants/foo/jobs/1234". - // - // Tenant id is optional and the default tenant is used if unspecified, for - // example, "projects/api-test-project/jobs/1234". - string name = 1; + // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + // example, "projects/foo/tenants/bar/jobs/baz". + // + // If tenant id is unspecified, the default tenant is used. For + // example, "projects/foo/jobs/bar". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Job" + } + ]; } -// Input only. -// // Batch delete jobs request. message BatchDeleteJobsRequest { // Required. The resource name of the tenant under which the job is created. // - // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenant/foo". - // - // Tenant id is optional and the default tenant is used if unspecified, for - // example, "projects/api-test-project". - string parent = 1; + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + // is created. For example, "projects/foo". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Job" + } + ]; // Required. The filter string specifies the jobs to be deleted. // @@ -268,23 +289,24 @@ message BatchDeleteJobsRequest { // * `companyName` (Required) // * `requisitionId` (Required) // - // Sample Query: companyName = "projects/api-test-project/companies/123" AND + // Sample Query: companyName = "projects/foo/companies/bar" AND // requisitionId = "req-1" - string filter = 2; + string filter = 2 [(google.api.field_behavior) = REQUIRED]; } -// Input only. -// // List jobs request. message ListJobsRequest { // Required. The resource name of the tenant under which the job is created. // - // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenant/foo". - // - // Tenant id is optional and the default tenant is used if unspecified, for - // example, "projects/api-test-project". - string parent = 1; + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + // is created. For example, "projects/foo". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Job" + } + ]; // Required. The filter string specifies the jobs to be enumerated. // @@ -293,80 +315,62 @@ message ListJobsRequest { // The fields eligible for filtering are: // // * `companyName` (Required) - // * `requisitionId` (Optional) - // * `status` (Optional) Available values: OPEN, EXPIRED, ALL. Defaults to + // * `requisitionId` + // * `status` Available values: OPEN, EXPIRED, ALL. Defaults to // OPEN if no value is specified. // // Sample Query: // - // * companyName = "projects/api-test-project/tenants/foo/companies/bar" - // * companyName = "projects/api-test-project/tenants/foo/companies/bar" AND + // * companyName = "projects/foo/tenants/bar/companies/baz" + // * companyName = "projects/foo/tenants/bar/companies/baz" AND // requisitionId = "req-1" - // * companyName = "projects/api-test-project/tenants/foo/companies/bar" AND + // * companyName = "projects/foo/tenants/bar/companies/baz" AND // status = "EXPIRED" - string filter = 2; + string filter = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. The starting point of a query result. + // The starting point of a query result. string page_token = 3; - // Optional. The maximum number of jobs to be returned per page of results. + // The maximum number of jobs to be returned per page of results. // - // If [job_view][google.cloud.talent.v4beta1.ListJobsRequest.job_view] is set - // to - // [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4beta1.JobView.JOB_VIEW_ID_ONLY], - // the maximum allowed page size is 1000. Otherwise, the maximum allowed page - // size is 100. + // If [job_view][google.cloud.talent.v4beta1.ListJobsRequest.job_view] is set to [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4beta1.JobView.JOB_VIEW_ID_ONLY], the maximum allowed + // page size is 1000. Otherwise, the maximum allowed page size is 100. // // Default is 100 if empty or a number < 1 is specified. int32 page_size = 4; - // Optional. The desired job attributes returned for jobs in the - // search response. Defaults to - // [JobView.JOB_VIEW_FULL][google.cloud.talent.v4beta1.JobView.JOB_VIEW_FULL] - // if no value is specified. + // The desired job attributes returned for jobs in the + // search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4beta1.JobView.JOB_VIEW_FULL] if no value is + // specified. JobView job_view = 5; } // An enum that specifies the job attributes that are returned in the -// [MatchingJob.job][google.cloud.talent.v4beta1.SearchJobsResponse.MatchingJob.job] -// or [ListJobsResponse.jobs][google.cloud.talent.v4beta1.ListJobsResponse.jobs] -// fields. +// [MatchingJob.job][google.cloud.talent.v4beta1.SearchJobsResponse.MatchingJob.job] or +// [ListJobsResponse.jobs][google.cloud.talent.v4beta1.ListJobsResponse.jobs] fields. enum JobView { // Default value. JOB_VIEW_UNSPECIFIED = 0; // A ID only view of job, with following attributes: - // [Job.name][google.cloud.talent.v4beta1.Job.name], - // [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], - // [Job.language_code][google.cloud.talent.v4beta1.Job.language_code]. + // [Job.name][google.cloud.talent.v4beta1.Job.name], [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], [Job.language_code][google.cloud.talent.v4beta1.Job.language_code]. JOB_VIEW_ID_ONLY = 1; // A minimal view of the job, with the following attributes: - // [Job.name][google.cloud.talent.v4beta1.Job.name], - // [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], - // [Job.title][google.cloud.talent.v4beta1.Job.title], - // [Job.company][google.cloud.talent.v4beta1.Job.company], - // [Job.DerivedInfo.locations][google.cloud.talent.v4beta1.Job.DerivedInfo.locations], - // [Job.language_code][google.cloud.talent.v4beta1.Job.language_code]. + // [Job.name][google.cloud.talent.v4beta1.Job.name], [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], [Job.title][google.cloud.talent.v4beta1.Job.title], + // [Job.company][google.cloud.talent.v4beta1.Job.company], [Job.DerivedInfo.locations][google.cloud.talent.v4beta1.Job.DerivedInfo.locations], [Job.language_code][google.cloud.talent.v4beta1.Job.language_code]. JOB_VIEW_MINIMAL = 2; // A small view of the job, with the following attributes in the search - // results: [Job.name][google.cloud.talent.v4beta1.Job.name], - // [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], - // [Job.title][google.cloud.talent.v4beta1.Job.title], - // [Job.company][google.cloud.talent.v4beta1.Job.company], - // [Job.DerivedInfo.locations][google.cloud.talent.v4beta1.Job.DerivedInfo.locations], - // [Job.visibility][google.cloud.talent.v4beta1.Job.visibility], - // [Job.language_code][google.cloud.talent.v4beta1.Job.language_code], - // [Job.description][google.cloud.talent.v4beta1.Job.description]. + // results: [Job.name][google.cloud.talent.v4beta1.Job.name], [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], [Job.title][google.cloud.talent.v4beta1.Job.title], + // [Job.company][google.cloud.talent.v4beta1.Job.company], [Job.DerivedInfo.locations][google.cloud.talent.v4beta1.Job.DerivedInfo.locations], [Job.visibility][google.cloud.talent.v4beta1.Job.visibility], + // [Job.language_code][google.cloud.talent.v4beta1.Job.language_code], [Job.description][google.cloud.talent.v4beta1.Job.description]. JOB_VIEW_SMALL = 3; // All available attributes are included in the search results. JOB_VIEW_FULL = 4; } -// Output only. -// // List jobs response. message ListJobsResponse { // The Jobs for a given company. @@ -383,17 +387,11 @@ message ListJobsResponse { ResponseMetadata metadata = 3; } -// Input only. -// // The Request body of the `SearchJobs` call. message SearchJobsRequest { - // Input only. - // - // Custom ranking information for - // [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. + // Custom ranking information for [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. message CustomRankingInfo { - // The importance level for - // [CustomRankingInfo.ranking_expression][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ranking_expression]. + // The importance level for [CustomRankingInfo.ranking_expression][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ranking_expression]. enum ImportanceLevel { // Default value if the importance level isn't specified. IMPORTANCE_LEVEL_UNSPECIFIED = 0; @@ -430,37 +428,41 @@ message SearchJobsRequest { } // Required. Controls over how important the score of - // [CustomRankingInfo.ranking_expression][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ranking_expression] - // gets applied to job's final ranking position. + // [CustomRankingInfo.ranking_expression][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ranking_expression] gets applied to job's final + // ranking position. // // An error is thrown if not specified. - ImportanceLevel importance_level = 1; + ImportanceLevel importance_level = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Controls over how job documents get ranked on top of existing - // relevance score (determined by API algorithm). The product of ranking + // Required. Controls over how job documents get ranked on top of existing relevance + // score (determined by API algorithm). A combination of the ranking // expression and relevance score is used to determine job's final ranking // position. // // The syntax for this expression is a subset of Google SQL syntax. // // Supported operators are: +, -, *, /, where the left and right side of - // the operator is either a numeric - // [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] - // key, integer/double value or an expression that can be evaluated to a - // number. + // the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] key, + // integer/double value or an expression that can be evaluated to a number. // // Parenthesis are supported to adjust calculation precedence. The // expression must be < 100 characters in length. // + // The expression is considered invalid for a job if the expression + // references custom attributes that are not populated on the job or if the + // expression results in a divide by zero. If an expression is invalid for a + // job, that job is demoted to the end of the results. + // // Sample ranking expression // (year + 25) * 0.25 - (freshness / 0.5) - string ranking_expression = 2; + string ranking_expression = 2 [(google.api.field_behavior) = REQUIRED]; } // A string-represented enumeration of the job search mode. The service // operate differently for different modes of service. enum SearchMode { - // The mode of the search method isn't specified. + // The mode of the search method isn't specified. The default search + // behavior is identical to JOB_SEARCH search behavior. SEARCH_MODE_UNSPECIFIED = 0; // The job search matches against all jobs, and featured jobs @@ -492,43 +494,47 @@ message SearchJobsRequest { // Default diversifying behavior. The result list is ordered so that // highly similar results are pushed to the end of the last page of search - // results. + // results. If you are using pageToken to page through the result set, + // latency might be lower but we can't guarantee that all results are + // returned. If you are using page offset, latency might be higher but all + // results are returned. SIMPLE = 2; } // Required. The resource name of the tenant to search within. // - // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenant/foo". - // - // Tenant id is optional and the default tenant is used if unspecified, for - // example, "projects/api-test-project". - string parent = 1; + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + // is created. For example, "projects/foo". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Job" + } + ]; - // Optional. Mode of a search. + // Mode of a search. // - // Defaults to - // [SearchMode.JOB_SEARCH][google.cloud.talent.v4beta1.SearchJobsRequest.SearchMode.JOB_SEARCH]. + // Defaults to [SearchMode.JOB_SEARCH][google.cloud.talent.v4beta1.SearchJobsRequest.SearchMode.JOB_SEARCH]. SearchMode search_mode = 2; - // Required. The meta information collected about the job searcher, used to - // improve the search quality of the service. The identifiers (such as - // `user_id`) are provided by users, and must be unique and consistent. - RequestMetadata request_metadata = 3; + // Required. The meta information collected about the job searcher, used to improve the + // search quality of the service. The identifiers (such as `user_id`) are + // provided by users, and must be unique and consistent. + RequestMetadata request_metadata = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. Query used to search against jobs, such as keyword, location - // filters, etc. + // Query used to search against jobs, such as keyword, location filters, etc. JobQuery job_query = 4; - // Optional. Controls whether to broaden the search when it produces sparse - // results. Broadened queries append results to the end of the matching - // results list. + // Controls whether to broaden the search when it produces sparse results. + // Broadened queries append results to the end of the matching results + // list. // // Defaults to false. bool enable_broadening = 5; - // Optional. Controls if the search job request requires the return of a - // precise count of the first 300 results. Setting this to `true` ensures + // Controls if the search job request requires the return of a precise + // count of the first 300 results. Setting this to `true` ensures // consistency in the number of results per page. Best practice is to set this // value to true if a client allows users to jump directly to a // non-sequential search results page. @@ -538,8 +544,7 @@ message SearchJobsRequest { // Defaults to false. bool require_precise_result_size = 6; - // Optional. An expression specifies a histogram request against matching - // jobs. + // An expression specifies a histogram request against matching jobs. // // Expression syntax is an aggregation function call with histogram facets and // other options. @@ -571,30 +576,20 @@ message SearchJobsRequest { // // Job histogram facets: // - // * company_display_name: histogram by - // [Job.company_display_name][google.cloud.talent.v4beta1.Job.company_display_name]. - // * employment_type: histogram by - // [Job.employment_types][google.cloud.talent.v4beta1.Job.employment_types], - // for example, + // * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4beta1.Job.company_display_name]. + // * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4beta1.Job.employment_types], for example, // "FULL_TIME", "PART_TIME". - // * company_size: histogram by - // [CompanySize][google.cloud.talent.v4beta1.CompanySize], for example, - // "SMALL", "MEDIUM", "BIG". - // * publish_time_in_month: histogram by the - // [Job.posting_publish_time][google.cloud.talent.v4beta1.Job.posting_publish_time] + // * company_size: histogram by [CompanySize][google.cloud.talent.v4beta1.CompanySize], for example, "SMALL", + // "MEDIUM", "BIG". + // * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4beta1.Job.posting_publish_time] // in months. // Must specify list of numeric buckets in spec. - // * publish_time_in_year: histogram by the - // [Job.posting_publish_time][google.cloud.talent.v4beta1.Job.posting_publish_time] + // * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4beta1.Job.posting_publish_time] // in years. // Must specify list of numeric buckets in spec. - // * degree_types: histogram by the - // [Job.degree_types][google.cloud.talent.v4beta1.Job.degree_types], for - // example, + // * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4beta1.Job.degree_types], for example, // "Bachelors", "Masters". - // * job_level: histogram by the - // [Job.job_level][google.cloud.talent.v4beta1.Job.job_level], for example, - // "Entry + // * job_level: histogram by the [Job.job_level][google.cloud.talent.v4beta1.Job.job_level], for example, "Entry // Level". // * country: histogram by the country code of jobs, for example, "US", "FR". // * admin1: histogram by the admin1 code of jobs, which is a global @@ -609,31 +604,25 @@ message SearchJobsRequest { // and longitude), for example, 37.4038522,-122.0987765. Since the // coordinates of a city center can change, customers may need to refresh // them periodically. - // * locale: histogram by the - // [Job.language_code][google.cloud.talent.v4beta1.Job.language_code], for - // example, "en-US", + // * locale: histogram by the [Job.language_code][google.cloud.talent.v4beta1.Job.language_code], for example, "en-US", // "fr-FR". - // * language: histogram by the language subtag of the - // [Job.language_code][google.cloud.talent.v4beta1.Job.language_code], + // * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4beta1.Job.language_code], // for example, "en", "fr". - // * category: histogram by the - // [JobCategory][google.cloud.talent.v4beta1.JobCategory], for example, + // * category: histogram by the [JobCategory][google.cloud.talent.v4beta1.JobCategory], for example, // "COMPUTER_AND_IT", "HEALTHCARE". // * base_compensation_unit: histogram by the - // [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit] - // of base salary, for example, "WEEKLY", "MONTHLY". + // [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit] of base + // salary, for example, "WEEKLY", "MONTHLY". // * base_compensation: histogram by the base salary. Must specify list of // numeric buckets to group results by. // * annualized_base_compensation: histogram by the base annualized salary. // Must specify list of numeric buckets to group results by. // * annualized_total_compensation: histogram by the total annualized salary. // Must specify list of numeric buckets to group results by. - // * string_custom_attribute: histogram by string - // [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes]. + // * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes]. // Values can be accessed via square bracket notations like // string_custom_attribute["key1"]. - // * numeric_custom_attribute: histogram by numeric - // [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes]. + // * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes]. // Values can be accessed via square bracket notations like // numeric_custom_attribute["key1"]. Must specify list of numeric buckets to // group results by. @@ -648,17 +637,15 @@ message SearchJobsRequest { // [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])` repeated HistogramQuery histogram_queries = 7; - // Optional. The desired job attributes returned for jobs in the search - // response. Defaults to - // [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4beta1.JobView.JOB_VIEW_SMALL] - // if no value is specified. + // The desired job attributes returned for jobs in the search response. + // Defaults to [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4beta1.JobView.JOB_VIEW_SMALL] if no value is specified. JobView job_view = 8; - // Optional. An integer that specifies the current offset (that is, starting - // result location, amongst the jobs deemed by the API as relevant) in search - // results. This field is only considered if - // [page_token][google.cloud.talent.v4beta1.SearchJobsRequest.page_token] is - // unset. + // An integer that specifies the current offset (that is, starting result + // location, amongst the jobs deemed by the API as relevant) in search + // results. This field is only considered if [page_token][google.cloud.talent.v4beta1.SearchJobsRequest.page_token] is unset. + // + // The maximum allowed value is 5000. Otherwise an error is thrown. // // For example, 0 means to return results starting from the first matching // job, and 10 means to return from the 11th job. This can be used for @@ -666,19 +653,17 @@ message SearchJobsRequest { // from the second page). int32 offset = 9; - // Optional. A limit on the number of jobs returned in the search results. + // A limit on the number of jobs returned in the search results. // Increasing this value above the default value of 10 can increase search // response time. The value can be between 1 and 100. int32 page_size = 10; - // Optional. The token specifying the current offset within - // search results. See - // [SearchJobsResponse.next_page_token][google.cloud.talent.v4beta1.SearchJobsResponse.next_page_token] - // for an explanation of how to obtain the next set of query results. + // The token specifying the current offset within + // search results. See [SearchJobsResponse.next_page_token][google.cloud.talent.v4beta1.SearchJobsResponse.next_page_token] for + // an explanation of how to obtain the next set of query results. string page_token = 11; - // Optional. The criteria determining how search results are sorted. Default - // is + // The criteria determining how search results are sorted. Default is // `"relevance desc"`. // // Supported options are: @@ -686,37 +671,33 @@ message SearchJobsRequest { // * `"relevance desc"`: By relevance descending, as determined by the API // algorithms. Relevance thresholding of query results is only available // with this ordering. - // * `"posting_publish_time desc"`: By - // [Job.posting_publish_time][google.cloud.talent.v4beta1.Job.posting_publish_time] + // * `"posting_publish_time desc"`: By [Job.posting_publish_time][google.cloud.talent.v4beta1.Job.posting_publish_time] // descending. - // * `"posting_update_time desc"`: By - // [Job.posting_update_time][google.cloud.talent.v4beta1.Job.posting_update_time] + // * `"posting_update_time desc"`: By [Job.posting_update_time][google.cloud.talent.v4beta1.Job.posting_update_time] // descending. - // * `"title"`: By [Job.title][google.cloud.talent.v4beta1.Job.title] - // ascending. - // * `"title desc"`: By [Job.title][google.cloud.talent.v4beta1.Job.title] - // descending. + // * `"title"`: By [Job.title][google.cloud.talent.v4beta1.Job.title] ascending. + // * `"title desc"`: By [Job.title][google.cloud.talent.v4beta1.Job.title] descending. // * `"annualized_base_compensation"`: By job's - // [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_base_compensation_range] - // ascending. Jobs whose annualized base compensation is unspecified are put - // at the end of search results. + // [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_base_compensation_range] ascending. Jobs + // whose annualized base compensation is unspecified are put at the end of + // search results. // * `"annualized_base_compensation desc"`: By job's - // [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_base_compensation_range] - // descending. Jobs whose annualized base compensation is unspecified are - // put at the end of search results. + // [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_base_compensation_range] descending. Jobs + // whose annualized base compensation is unspecified are put at the end of + // search results. // * `"annualized_total_compensation"`: By job's - // [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_total_compensation_range] - // ascending. Jobs whose annualized base compensation is unspecified are put - // at the end of search results. + // [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_total_compensation_range] ascending. Jobs + // whose annualized base compensation is unspecified are put at the end of + // search results. // * `"annualized_total_compensation desc"`: By job's - // [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_total_compensation_range] - // descending. Jobs whose annualized base compensation is unspecified are - // put at the end of search results. + // [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_total_compensation_range] descending. Jobs + // whose annualized base compensation is unspecified are put at the end of + // search results. // * `"custom_ranking desc"`: By the relevance score adjusted to the - // [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ranking_expression] - // with weight factor assigned by - // [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.importance_level] - // in descending order. + // [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ranking_expression] with weight + // factor assigned by + // [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.importance_level] in descending + // order. // * Location sorting: Use the special syntax to order jobs by distance:
// `"distance_from('Hawaii')"`: Order by distance from Hawaii.
// `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
@@ -734,78 +715,63 @@ message SearchJobsRequest { // [diversification_level][google.cloud.talent.v4beta1.SearchJobsRequest.diversification_level]. string order_by = 12; - // Optional. Controls whether highly similar jobs are returned next to each - // other in the search results. Jobs are identified as highly similar based on + // Controls whether highly similar jobs are returned next to each other in + // the search results. Jobs are identified as highly similar based on // their titles, job categories, and locations. Highly similar results are // clustered so that only one representative job of the cluster is // displayed to the job seeker higher up in the results, with the other jobs // being displayed lower down in the results. // - // Defaults to - // [DiversificationLevel.SIMPLE][google.cloud.talent.v4beta1.SearchJobsRequest.DiversificationLevel.SIMPLE] - // if no value is specified. + // Defaults to [DiversificationLevel.SIMPLE][google.cloud.talent.v4beta1.SearchJobsRequest.DiversificationLevel.SIMPLE] if no value + // is specified. DiversificationLevel diversification_level = 13; - // Optional. Controls over how job documents get ranked on top of existing - // relevance score (determined by API algorithm). + // Controls over how job documents get ranked on top of existing relevance + // score (determined by API algorithm). CustomRankingInfo custom_ranking_info = 14; - // Optional. Controls whether to disable exact keyword match on - // [Job.title][google.cloud.talent.v4beta1.Job.title], - // [Job.description][google.cloud.talent.v4beta1.Job.description], - // [Job.company_display_name][google.cloud.talent.v4beta1.Job.company_display_name], - // [Job.addresses][google.cloud.talent.v4beta1.Job.addresses], - // [Job.qualifications][google.cloud.talent.v4beta1.Job.qualifications]. When - // disable keyword match is turned off, a keyword match returns jobs that do - // not match given category filters when there are matching keywords. For - // example, for the query "program manager," a result is returned even if the - // job posting has the title "software developer," which doesn't fall into - // "program manager" ontology, but does have "program manager" appearing in - // its description. + // Controls whether to disable exact keyword match on [Job.title][google.cloud.talent.v4beta1.Job.title], + // [Job.description][google.cloud.talent.v4beta1.Job.description], [Job.company_display_name][google.cloud.talent.v4beta1.Job.company_display_name], [Job.addresses][google.cloud.talent.v4beta1.Job.addresses], + // [Job.qualifications][google.cloud.talent.v4beta1.Job.qualifications]. When disable keyword match is turned off, a + // keyword match returns jobs that do not match given category filters when + // there are matching keywords. For example, for the query "program manager," + // a result is returned even if the job posting has the title "software + // developer," which doesn't fall into "program manager" ontology, but does + // have "program manager" appearing in its description. // // For queries like "cloud" that don't contain title or // location specific ontology, jobs with "cloud" keyword matches are returned // regardless of this flag's value. // - // Use - // [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4beta1.Company.keyword_searchable_job_custom_attributes] - // if company-specific globally matched custom field/attribute string values - // are needed. Enabling keyword match improves recall of subsequent search + // Use [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4beta1.Company.keyword_searchable_job_custom_attributes] if + // company-specific globally matched custom field/attribute string values are + // needed. Enabling keyword match improves recall of subsequent search // requests. // // Defaults to false. bool disable_keyword_match = 16; } -// Output only. -// // Response for SearchJob method. message SearchJobsResponse { - // Output only. - // - // Job entry with metadata inside - // [SearchJobsResponse][google.cloud.talent.v4beta1.SearchJobsResponse]. + // Job entry with metadata inside [SearchJobsResponse][google.cloud.talent.v4beta1.SearchJobsResponse]. message MatchingJob { - // Job resource that matches the specified - // [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. + // Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. Job job = 1; // A summary of the job with core information that's displayed on the search // results listing page. string job_summary = 2; - // Contains snippets of text from the - // [Job.title][google.cloud.talent.v4beta1.Job.title] field most closely - // matching a search query's keywords, if available. The matching query - // keywords are enclosed in HTML bold tags. + // Contains snippets of text from the [Job.title][google.cloud.talent.v4beta1.Job.title] field most + // closely matching a search query's keywords, if available. The matching + // query keywords are enclosed in HTML bold tags. string job_title_snippet = 3; - // Contains snippets of text from the - // [Job.description][google.cloud.talent.v4beta1.Job.description] and - // similar fields that most closely match a search query's keywords, if - // available. All HTML tags in the original fields are stripped when - // returned in this field, and matching query keywords are enclosed in HTML - // bold tags. + // Contains snippets of text from the [Job.description][google.cloud.talent.v4beta1.Job.description] and similar + // fields that most closely match a search query's keywords, if available. + // All HTML tags in the original fields are stripped when returned in this + // field, and matching query keywords are enclosed in HTML bold tags. string search_text_snippet = 4; // Commute information which is generated based on specified @@ -813,8 +779,6 @@ message SearchJobsResponse { CommuteInfo commute_info = 5; } - // Output only. - // // Commute details related to this job. message CommuteInfo { // Location used as the destination in the commute calculation. @@ -827,8 +791,7 @@ message SearchJobsResponse { google.protobuf.Duration travel_duration = 2; } - // The Job entities that match the specified - // [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. + // The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. repeated MatchingJob matching_jobs = 1; // The histogram results that match with specified @@ -840,23 +803,19 @@ message SearchJobsResponse { string next_page_token = 3; // The location filters that the service applied to the specified query. If - // any filters are lat-lng based, the - // [Location.location_type][google.cloud.talent.v4beta1.Location.location_type] - // is + // any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4beta1.Location.location_type] is // [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4beta1.Location.LocationType.LOCATION_TYPE_UNSPECIFIED]. repeated Location location_filters = 4; // An estimation of the number of jobs that match the specified query. // // This number isn't guaranteed to be accurate. For accurate results, - // see - // [SearchJobsRequest.require_precise_result_size][google.cloud.talent.v4beta1.SearchJobsRequest.require_precise_result_size]. + // see [SearchJobsRequest.require_precise_result_size][google.cloud.talent.v4beta1.SearchJobsRequest.require_precise_result_size]. int32 estimated_total_size = 5; // The precise result count, which is available only if the client set - // [SearchJobsRequest.require_precise_result_size][google.cloud.talent.v4beta1.SearchJobsRequest.require_precise_result_size] - // to `true`, or if the response is the last page of results. Otherwise, the - // value is `-1`. + // [SearchJobsRequest.require_precise_result_size][google.cloud.talent.v4beta1.SearchJobsRequest.require_precise_result_size] to `true`, or if the + // response is the last page of results. Otherwise, the value is `-1`. int32 total_size = 6; // Additional information for the API invocation, such as the request @@ -880,48 +839,72 @@ message SearchJobsResponse { message BatchCreateJobsRequest { // Required. The resource name of the tenant under which the job is created. // - // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenant/foo". - // - // Tenant id is optional and a default tenant is created if unspecified, for - // example, "projects/api-test-project". - string parent = 1; + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + // is created. For example, "projects/foo". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Job" + } + ]; // Required. The jobs to be created. - repeated Job jobs = 2; + repeated Job jobs = 2 [(google.api.field_behavior) = REQUIRED]; } // Request to update a batch of jobs. message BatchUpdateJobsRequest { // Required. The resource name of the tenant under which the job is created. // - // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenant/foo". - // - // Tenant id is optional and the default tenant is used if unspecified, for - // example, "projects/api-test-project". - string parent = 1; + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + // is created. For example, "projects/foo". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Job" + } + ]; // Required. The jobs to be updated. - repeated Job jobs = 2; + repeated Job jobs = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional but strongly recommended to be provided for the best service - // experience, also increase latency when checking status of batch operation. + // Strongly recommended for the best service experience. Be aware that it will + // also increase latency when checking the status of a batch operation. // - // If - // [update_mask][google.cloud.talent.v4beta1.BatchUpdateJobsRequest.update_mask] - // is provided, only the specified fields in - // [Job][google.cloud.talent.v4beta1.Job] are updated. Otherwise all the - // fields are updated. + // If [update_mask][google.cloud.talent.v4beta1.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in + // [Job][google.cloud.talent.v4beta1.Job] are updated. Otherwise all the fields are updated. // // A field mask to restrict the fields that are updated. Only // top level fields of [Job][google.cloud.talent.v4beta1.Job] are supported. // - // If - // [update_mask][google.cloud.talent.v4beta1.BatchUpdateJobsRequest.update_mask] - // is provided, The [Job][google.cloud.talent.v4beta1.Job] inside - // [JobResult][] will only contains fields that is updated, plus the Id of the - // Job. Otherwise, [Job][google.cloud.talent.v4beta1.Job] will include all - // fields, which can yield a very large response. + // If [update_mask][google.cloud.talent.v4beta1.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4beta1.Job] inside + // [JobResult][google.cloud.talent.v4beta1.JobOperationResult.JobResult] + // will only contains fields that is updated, plus the Id of the Job. + // Otherwise, [Job][google.cloud.talent.v4beta1.Job] will include all fields, which can yield a very + // large response. google.protobuf.FieldMask update_mask = 3; } + +// The result of [JobService.BatchCreateJobs][google.cloud.talent.v4beta1.JobService.BatchCreateJobs] or +// [JobService.BatchUpdateJobs][google.cloud.talent.v4beta1.JobService.BatchUpdateJobs] APIs. It's used to +// replace [google.longrunning.Operation.response][google.longrunning.Operation.response] in case of success. +message JobOperationResult { + // Mutation result of a job. + message JobResult { + // Here [Job][google.cloud.talent.v4beta1.Job] only contains basic information including [name][google.cloud.talent.v4beta1.Job.name], + // [company][google.cloud.talent.v4beta1.Job.company], [language_code][google.cloud.talent.v4beta1.Job.language_code] + // and [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], use getJob method to retrieve + // detailed information of the created/updated job. + Job job = 1; + + // The status of the job processed. This field is populated if the + // processing of the [job][google.cloud.talent.v4beta1.JobOperationResult.JobResult.job] fails. + google.rpc.Status status = 2; + } + + // List of job mutation results from a batch mutate operation. It can change + // until operation status is FINISHED, FAILED or CANCELLED. + repeated JobResult job_results = 1; +} diff --git a/google/cloud/talent/v4beta1/jobs_v4beta1.yaml b/google/cloud/talent/v4beta1/jobs_v4beta1.yaml new file mode 100644 index 000000000..01a300b79 --- /dev/null +++ b/google/cloud/talent/v4beta1/jobs_v4beta1.yaml @@ -0,0 +1,95 @@ +type: google.api.Service +config_version: 3 +name: jobs.googleapis.com +title: Cloud Talent Solution API + +apis: +- name: google.cloud.talent.v4beta1.ApplicationService +- name: google.cloud.talent.v4beta1.CompanyService +- name: google.cloud.talent.v4beta1.Completion +- name: google.cloud.talent.v4beta1.EventService +- name: google.cloud.talent.v4beta1.JobService +- name: google.cloud.talent.v4beta1.ProfileService +- name: google.cloud.talent.v4beta1.TenantService + +types: +- name: google.cloud.talent.v4beta1.BatchOperationMetadata +- name: google.cloud.talent.v4beta1.JobOperationResult + +documentation: + summary: |- + Cloud Talent Solution provides the capability to create, read, update, and + delete job postings, as well as search jobs based on keywords and filters. + overview: |- + # Introduction + + Cloud Talent Solution provides hiring companies and job distributors with + the capability to create and manage job postings and organizational + information, and perform job search using field based queries. This site + contains all of the information you need to integrate Cloud Talent + Solution, create company entities that represent employers with intended + access control, post and manage jobs on Garage Jobs on behalf of + employers, and search jobs where access control permits. For a full list + of supported API methods, refer to the [Reference](rest/) section. + +backend: + rules: + - selector: 'google.cloud.talent.v4beta1.ApplicationService.*' + deadline: 30.0 + - selector: 'google.cloud.talent.v4beta1.CompanyService.*' + deadline: 30.0 + - selector: google.cloud.talent.v4beta1.Completion.CompleteQuery + deadline: 30.0 + - selector: google.cloud.talent.v4beta1.EventService.CreateClientEvent + deadline: 30.0 + - selector: 'google.cloud.talent.v4beta1.JobService.*' + deadline: 30.0 + - selector: 'google.cloud.talent.v4beta1.ProfileService.*' + deadline: 30.0 + - selector: 'google.cloud.talent.v4beta1.TenantService.*' + deadline: 30.0 + - selector: 'google.longrunning.Operations.*' + deadline: 30.0 + +authentication: + rules: + - selector: 'google.cloud.talent.v4beta1.ApplicationService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/jobs + - selector: 'google.cloud.talent.v4beta1.CompanyService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/jobs + - selector: google.cloud.talent.v4beta1.Completion.CompleteQuery + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/jobs + - selector: google.cloud.talent.v4beta1.EventService.CreateClientEvent + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/jobs + - selector: 'google.cloud.talent.v4beta1.JobService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/jobs + - selector: 'google.cloud.talent.v4beta1.ProfileService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/jobs + - selector: 'google.cloud.talent.v4beta1.TenantService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/jobs + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/jobs diff --git a/google/cloud/talent/v4beta1/profile.proto b/google/cloud/talent/v4beta1/profile.proto index 268bb433a..e087a8cd3 100644 --- a/google/cloud/talent/v4beta1/profile.proto +++ b/google/cloud/talent/v4beta1/profile.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,21 +11,20 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.talent.v4beta1; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/talent/v4beta1/common.proto"; -import "google/cloud/talent/v4beta1/job.proto"; import "google/protobuf/duration.proto"; -import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; import "google/type/date.proto"; import "google/type/postal_address.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; option java_multiple_files = true; @@ -38,21 +37,28 @@ option objc_class_prefix = "CTS"; // A resource that represents the profile for a job candidate (also referred to // as a "single-source profile"). message Profile { + option (google.api.resource) = { + type: "jobs.googleapis.com/Profile" + pattern: "projects/{project}/tenants/{tenant}/profiles/{profile}" + }; + // Required during profile update. // // Resource name assigned to a profile by the API. // // The format is // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", - // for example, "projects/api-test-project/tenants/foo/profiles/bar". + // for example, "projects/foo/tenants/bar/profiles/baz". string name = 1; - // Optional. Profile's id in client system if available. + // Profile's id in client system, if available. This value is unique for each + // profile inside a tenant. An error is thrown if another profile with the + // same external_id is created. // // The maximum number of bytes allowed is 100. string external_id = 2; - // Optional. The source description indicating where the profile is acquired. + // The source description indicating where the profile is acquired. // // For example, if a candidate profile is acquired from a resume, the user can // input "resume" here to indicate the source. @@ -60,14 +66,13 @@ message Profile { // The maximum number of bytes allowed is 100. string source = 3; - // Optional. The URI set by clients that links to this profile's client-side - // copy. + // The URI set by clients that links to this profile's client-side copy. // // The maximum number of bytes allowed is 4000. string uri = 4; - // Optional. The cluster id of the profile to associate with other profile(s) - // for the same candidate. + // The cluster id of the profile to associate with other profile(s) for the + // same candidate. // // This field should be generated by the customer. If a value is not provided, // a random UUID is assigned to this field of the profile. @@ -76,106 +81,155 @@ message Profile { // a client has a candidate with two profiles, where one was created recently // and the other one was created 5 years ago. These two profiles may be very // different. The clients can create the first profile and get a generated - // [group_id][google.cloud.talent.v4beta1.Profile.group_id], and assign it - // when the second profile is created, indicating these two profiles are - // referring to the same candidate. + // [group_id][google.cloud.talent.v4beta1.Profile.group_id], and assign it when the second profile is created, + // indicating these two profiles are referring to the same candidate. string group_id = 5; - // Optional. Indicates the hirable status of the candidate. + // Indicates the hirable status of the candidate. google.protobuf.BoolValue is_hirable = 6; - // Optional. The timestamp when the profile was first created at this source. + // The timestamp when the profile was first created at this source. google.protobuf.Timestamp create_time = 7; - // Optional. The timestamp when the profile was last updated at this source. + // The timestamp when the profile was last updated at this source. google.protobuf.Timestamp update_time = 8; - // Optional. The resume representing this profile. + // The timestamp when the profile was last updated as a result of a direct or + // indirect action by a candidate. + // + // These actions include: + // + // * Direct actions such as the candidate submitting a new resume as part of a + // job application to the agency, using a self-service tool such as a website + // to update their profile, and so on. + // * Indirect actions by the candidate such as uploading a resume to a job + // board that is collected by the agency through a feed, providing a resume to + // a recruiter who then uploads it into the ATS, and so on. + // * Updates made to the candidate's profile by the recruiter as a result of + // interacting with the candidate (for example adding a skill or work + // preference, and so on). Changes to [recruiting_notes][google.cloud.talent.v4beta1.Profile.recruiting_notes] are specifically + // excluded from this action type. + // + // Note: [candidate_update_time][google.cloud.talent.v4beta1.Profile.candidate_update_time] must be greater than or equal to + // [resume_update_time][google.cloud.talent.v4beta1.Profile.resume_update_time] or an error is thrown. + google.protobuf.Timestamp candidate_update_time = 67; + + // The timestamp when the candidate's resume was added or updated on the + // candidate's profile. Whether that resume was directly uploaded by a + // candidate, pulled from a 3rd party job board feed, added by a recruiter, + // and so on. + // + // If this field is updated, it's expected that [resume][google.cloud.talent.v4beta1.Profile.resume] is provided in + // the create or update calls. + google.protobuf.Timestamp resume_update_time = 68; + + // The resume representing this profile. Resume resume = 53; - // Optional. The names of the candidate this profile references. + // The names of the candidate this profile references. // // Currently only one person name is supported. repeated PersonName person_names = 11; - // Optional. The candidate's postal addresses. + // The candidate's postal addresses. It's highly recommended to + // input this information as accurately as possible to help improve search + // quality. Here are some recommendations: + // + // * Provide [Address.usage][google.cloud.talent.v4beta1.Address.usage] if possible, especially if the address is + // PERSONAL. During a search only personal addresses are considered. If there + // is no such address, all addresses with unspecified usage are assumed to be + // personal. + // * Provide [Address.current][google.cloud.talent.v4beta1.Address.current] for the current address if possible. During + // a search, only current addresses are considered. If there is no such + // address, all addresses are assumed to be current. + // + // When displaying a candidate's addresses, it is sometimes desirable to limit + // the number of addresses shown. In these cases we recommend that you display + // the addresses in the following order of priority: + // 1. [Address.usage][google.cloud.talent.v4beta1.Address.usage] is PERSONAL and [Address.current][google.cloud.talent.v4beta1.Address.current] is true. + // 2. [Address.usage][google.cloud.talent.v4beta1.Address.usage] is PERSONAL and [Address.current][google.cloud.talent.v4beta1.Address.current] is false or not + // set. + // 3. [Address.usage][google.cloud.talent.v4beta1.Address.usage] is CONTACT_INFO_USAGE_UNSPECIFIED and + // [Address.current][google.cloud.talent.v4beta1.Address.current] is true. + // 4. [Address.usage][google.cloud.talent.v4beta1.Address.usage] is CONTACT_INFO_USAGE_UNSPECIFIED and + // [Address.current][google.cloud.talent.v4beta1.Address.current] is false or not set. repeated Address addresses = 12; - // Optional. The candidate's email addresses. + // The candidate's email addresses. repeated Email email_addresses = 13; - // Optional. The candidate's phone number(s). + // The candidate's phone number(s). repeated Phone phone_numbers = 14; - // Optional. The candidate's personal URIs. + // The candidate's personal URIs. repeated PersonalUri personal_uris = 15; - // Optional. Available contact information besides - // [addresses][google.cloud.talent.v4beta1.Profile.addresses], - // [email_addresses][google.cloud.talent.v4beta1.Profile.email_addresses], - // [phone_numbers][google.cloud.talent.v4beta1.Profile.phone_numbers] and - // [personal_uris][google.cloud.talent.v4beta1.Profile.personal_uris]. For - // example, Hang-out, Skype. + // Available contact information besides [addresses][google.cloud.talent.v4beta1.Profile.addresses], [email_addresses][google.cloud.talent.v4beta1.Profile.email_addresses], + // [phone_numbers][google.cloud.talent.v4beta1.Profile.phone_numbers] and [personal_uris][google.cloud.talent.v4beta1.Profile.personal_uris]. For example, Hang-out, Skype. repeated AdditionalContactInfo additional_contact_info = 16; - // Optional. The employment history records of the candidate. It's highly - // recommended to input this information as accurately as possible to help - // improve search quality. Here are some recommendations: + // The employment history records of the candidate. It's highly recommended + // to input this information as accurately as possible to help improve search + // quality. Here are some recommendations: // // * Specify the start and end dates of the employment records. // * List different employment types separately, no matter how minor the // change is. // For example, only job title is changed from "software engineer" to "senior // software engineer". - // * Provide - // [EmploymentRecord.is_current][google.cloud.talent.v4beta1.EmploymentRecord.is_current] - // for the current employment if possible. If not, it's inferred from user - // inputs. + // * Provide [EmploymentRecord.is_current][google.cloud.talent.v4beta1.EmploymentRecord.is_current] for the current employment if + // possible. If not, it's inferred from user inputs. + // + // The limitation for max number of employment records is 100. repeated EmploymentRecord employment_records = 17; - // Optional. The education history record of the candidate. It's highly - // recommended to input this information as accurately as possible to help - // improve search quality. Here are some recommendations: + // The education history record of the candidate. It's highly recommended to + // input this information as accurately as possible to help improve search + // quality. Here are some recommendations: // // * Specify the start and end dates of the education records. // * List each education type separately, no matter how minor the change is. // For example, the profile contains the education experience from the same // school but different degrees. - // * Provide - // [EducationRecord.is_current][google.cloud.talent.v4beta1.EducationRecord.is_current] - // for the current education if possible. If not, it's inferred from user - // inputs. + // * Provide [EducationRecord.is_current][google.cloud.talent.v4beta1.EducationRecord.is_current] for the current education if + // possible. If not, it's inferred from user inputs. + // + // The limitation for max number of education records is 100. repeated EducationRecord education_records = 18; - // Optional. The skill set of the candidate. It's highly recommended to - // provide as much information as possible to help improve the search quality. + // The skill set of the candidate. It's highly recommended to provide as + // much information as possible to help improve the search quality. + // + // The limitation for max number of skills is 500. repeated Skill skills = 19; - // Optional. The individual or collaborative activities which the candidate - // has participated in, for example, open-source projects, class assignments - // that aren't listed in - // [employment_records][google.cloud.talent.v4beta1.Profile.employment_records]. + // The individual or collaborative activities which the candidate has + // participated in, for example, open-source projects, class assignments that + // aren't listed in [employment_records][google.cloud.talent.v4beta1.Profile.employment_records]. + // + // The limitation for max number of activities is 50. repeated Activity activities = 20; - // Optional. The publications published by the candidate. + // The publications published by the candidate. + // + // The limitation for max number of publications is 50. repeated Publication publications = 21; - // Optional. The patents acquired by the candidate. + // The patents acquired by the candidate. repeated Patent patents = 22; - // Optional. The certifications acquired by the candidate. + // The certifications acquired by the candidate. repeated Certification certifications = 23; // Output only. The resource names of the candidate's applications. - repeated string applications = 47; + repeated string applications = 47 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The resource names of the candidate's assignments. - repeated string assignments = 48; + repeated string assignments = 48 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. A map of fields to hold both filterable and non-filterable custom - // profile attributes that aren't covered by the provided structured fields. - // See [CustomAttribute][google.cloud.talent.v4beta1.CustomAttribute] for more - // details. + // A map of fields to hold both filterable and non-filterable custom profile + // attributes that aren't covered by the provided structured fields. See + // [CustomAttribute][google.cloud.talent.v4beta1.CustomAttribute] for more details. // // At most 100 filterable and at most 100 unfilterable keys are supported. If // limit is exceeded, an error is thrown. Custom attributes are `unfilterable` @@ -196,12 +250,37 @@ message Profile { // Output only. Indicates if a summarized profile was created as part of the // profile creation API call. This flag does not indicate whether a profile is // searchable or not. - bool processed = 27; + bool processed = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Keyword snippet shows how the search result is related to a - // search query. This is only returned in - // [SearchProfilesResponse][google.cloud.talent.v4beta1.SearchProfilesResponse]. - string keyword_snippet = 28; + // search query. This is only returned in [SearchProfilesResponse][google.cloud.talent.v4beta1.SearchProfilesResponse]. + string keyword_snippet = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Candidate's availability signals. + repeated AvailabilitySignal availability_signals = 70 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Derived locations of the profile, resolved from [Profile.addresses][google.cloud.talent.v4beta1.Profile.addresses]. + // + // [derived_addresses][google.cloud.talent.v4beta1.Profile.derived_addresses] are exactly matched to [Profile.addresses][google.cloud.talent.v4beta1.Profile.addresses] in the + // same order. + repeated Location derived_addresses = 64 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Candidate availability signal. +message AvailabilitySignal { + // Type of signal. + AvailabilitySignalType type = 1; + + // Timestamp of when the given availability activity last happened. + google.protobuf.Timestamp last_update_time = 2; + + // Indicates if the [last_update_time][google.cloud.talent.v4beta1.AvailabilitySignal.last_update_time] is within + // [AvailabilityFilter.range][google.cloud.talent.v4beta1.AvailabilityFilter.range]. + // + // Returned only in a search response when there is an [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] + // in [ProfileQuery.availability_filters][google.cloud.talent.v4beta1.ProfileQuery.availability_filters] where + // [signal_type][google.cloud.talent.v4beta1.AvailabilityFilter.signal_type] matches [type][google.cloud.talent.v4beta1.AvailabilitySignal.type]. + google.protobuf.BoolValue filter_satisfied = 3; } // Resource that represents a resume. @@ -212,7 +291,7 @@ message Resume { RESUME_TYPE_UNSPECIFIED = 0; // The profile contents in HR-XML format. - // See http://schemas.liquid-technologies.com/hr-xml/2007-04-15/ for more + // See https://schemas.liquid-technologies.com/hr-xml/2007-04-15/ for more // information about Human Resources XML. HRXML = 1; @@ -220,24 +299,19 @@ message Resume { OTHER_RESUME_TYPE = 2; } - // Optional. Users can create a profile with only this field field, if - // [resume_type][google.cloud.talent.v4beta1.Resume.resume_type] is - // [HRXML][google.cloud.talent.v4beta1.Resume.ResumeType.HRXML]. For example, - // the API parses this field and creates a profile with all structured fields - // populated, for example. - // [EmploymentRecord][google.cloud.talent.v4beta1.EmploymentRecord], - // [EducationRecord][google.cloud.talent.v4beta1.EducationRecord], and so on. - // An error is thrown if this field cannot be parsed. - // - // If this field is provided during profile creation or update, - // any other structured data provided in the profile is ignored. The - // API populates these fields by parsing this field. Note that the use of the - // functionality offered by this field to extract data from resumes is an - // Alpha feature and as such is not covered by any SLA. + // Users can create a profile with only this field field, if [resume_type][google.cloud.talent.v4beta1.Resume.resume_type] + // is [HRXML][google.cloud.talent.v4beta1.Resume.ResumeType.HRXML]. For example, the API parses this field and + // creates a profile + // with all structured fields populated. [EmploymentRecord][google.cloud.talent.v4beta1.EmploymentRecord], + // [EducationRecord][google.cloud.talent.v4beta1.EducationRecord], and so on. An error is thrown if this field cannot be + // parsed. + // + // Note that the use of the functionality offered by this field to extract + // data from resumes is an Alpha feature and as such is not covered by any + // SLA. string structured_resume = 1; - // Optional. The format of - // [structured_resume][google.cloud.talent.v4beta1.Resume.structured_resume]. + // The format of [structured_resume][google.cloud.talent.v4beta1.Resume.structured_resume]. ResumeType resume_type = 2; } @@ -245,44 +319,38 @@ message Resume { message PersonName { // Resource that represents a person's structured name. message PersonStructuredName { - // Optional. Given/first name. + // Given/first name. // - // It's derived from - // [formatted_name][google.cloud.talent.v4beta1.PersonName.formatted_name] - // if not provided. + // It's derived from [formatted_name][google.cloud.talent.v4beta1.PersonName.formatted_name] if not provided. // // Number of characters allowed is 100. string given_name = 1; - // Optional. Preferred given/first name or nickname. + // Preferred given/first name or nickname. // // Number of characters allowed is 100. string preferred_name = 6; - // Optional. Middle initial. + // Middle initial. // - // It's derived from - // [formatted_name][google.cloud.talent.v4beta1.PersonName.formatted_name] - // if not provided. + // It's derived from [formatted_name][google.cloud.talent.v4beta1.PersonName.formatted_name] if not provided. // // Number of characters allowed is 20. string middle_initial = 2; - // Optional. Family/last name. + // Family/last name. // - // It's derived from - // [formatted_name][google.cloud.talent.v4beta1.PersonName.formatted_name] - // if not provided. + // It's derived from [formatted_name][google.cloud.talent.v4beta1.PersonName.formatted_name] if not provided. // // Number of characters allowed is 100. string family_name = 3; - // Optional. Suffixes. + // Suffixes. // // Number of characters allowed is 20. repeated string suffixes = 4; - // Optional. Prefixes. + // Prefixes. // // Number of characters allowed is 20. repeated string prefixes = 5; @@ -292,19 +360,17 @@ message PersonName { // [formatted_name][google.cloud.talent.v4beta1.PersonName.formatted_name] or // [structured_name][google.cloud.talent.v4beta1.PersonName.structured_name]. oneof person_name { - // Optional. A string represents a person's full name. For example, "Dr. - // John Smith". + // A string represents a person's full name. For example, "Dr. John Smith". // // Number of characters allowed is 100. string formatted_name = 1; - // Optional. A person's name in a structured way (last name, first name, - // suffix, and so on.) + // A person's name in a structured way (last name, first name, suffix, and + // so on.) PersonStructuredName structured_name = 2; } - // Optional. Preferred name for the person. This field is ignored if - // [structured_name][google.cloud.talent.v4beta1.PersonName.structured_name] + // Preferred name for the person. This field is ignored if [structured_name][google.cloud.talent.v4beta1.PersonName.structured_name] // is provided. // // Number of characters allowed is 100. @@ -313,15 +379,14 @@ message PersonName { // Resource that represents a address. message Address { - // Optional. The usage of the address. For example, SCHOOL, WORK, PERSONAL. + // The usage of the address. For example, SCHOOL, WORK, PERSONAL. ContactInfoUsage usage = 1; // The address of a person. It can be one of - // [unstructured_address][google.cloud.talent.v4beta1.Address.unstructured_address] - // or + // [unstructured_address][google.cloud.talent.v4beta1.Address.unstructured_address] or // [structured_address][google.cloud.talent.v4beta1.Address.structured_address]. oneof address { - // Optional. Unstructured address. + // Unstructured address. // // For example, "1600 Amphitheatre Pkwy, Mountain View, CA 94043", // "Sunnyvale, California". @@ -329,22 +394,21 @@ message Address { // Number of characters allowed is 100. string unstructured_address = 2; - // Optional. Structured address that contains street address, city, state, - // country, and so on. + // Structured address that contains street address, city, state, country, + // and so on. google.type.PostalAddress structured_address = 3; } - // Optional. Indicates if it's the person's current address. + // Indicates if it's the person's current address. google.protobuf.BoolValue current = 4; } // Resource that represents a person's email address. message Email { - // Optional. The usage of the email address. For example, SCHOOL, WORK, - // PERSONAL. + // The usage of the email address. For example, SCHOOL, WORK, PERSONAL. ContactInfoUsage usage = 1; - // Optional. Email address. + // Email address. // // Number of characters allowed is 4,000. string email_address = 2; @@ -378,10 +442,9 @@ message Phone { // A virtual telephone number is a number that can be routed to another // number and managed by the user via Web, SMS, IVR, and so on. It is // associated with a particular person, and may be routed to either a MOBILE - // or LANDLINE number. The [phone - // usage][google.cloud.talent.v4beta1.ContactInfoUsage] should be set to - // PERSONAL for these phone types. Some more information can be found here: - // http://en.wikipedia.org/wiki/Personal_Numbers + // or LANDLINE number. The [phone usage][google.cloud.talent.v4beta1.ContactInfoUsage] should + // be set to PERSONAL for these phone types. Some more information can be + // found here: https://en.wikipedia.org/wiki/Personal_Numbers VIRTUAL = 7; // Voice over IP numbers. This includes TSoIP (Telephony Service over IP). @@ -392,13 +455,13 @@ message Phone { MOBILE_OR_LANDLINE = 9; } - // Optional. The usage of the phone. For example, SCHOOL, WORK, PERSONAL. + // The usage of the phone. For example, SCHOOL, WORK, PERSONAL. ContactInfoUsage usage = 1; - // Optional. The phone type. For example, LANDLINE, MOBILE, FAX. + // The phone type. For example, LANDLINE, MOBILE, FAX. PhoneType type = 2; - // Optional. Phone number. + // Phone number. // // Any phone formats are supported and only exact matches are performed on // searches. For example, if a phone number in profile is provided in the @@ -408,8 +471,7 @@ message Phone { // Number of characters allowed is 20. string number = 3; - // Optional. When this number is available. Any descriptive string is - // expected. + // When this number is available. Any descriptive string is expected. // // Number of characters allowed is 100. string when_available = 4; @@ -417,7 +479,7 @@ message Phone { // Resource that represents a valid URI for a personal use. message PersonalUri { - // Optional. The personal URI. + // The personal URI. // // Number of characters allowed is 4,000. string uri = 1; @@ -426,18 +488,17 @@ message PersonalUri { // Resource that represents contact information other than phone, email, // URI and addresses. message AdditionalContactInfo { - // Optional. The usage of this contact method. For example, SCHOOL, WORK, - // PERSONAL. + // The usage of this contact method. For example, SCHOOL, WORK, PERSONAL. ContactInfoUsage usage = 1; - // Optional. The name of the contact method. + // The name of the contact method. // // For example, "hangout", "skype". // // Number of characters allowed is 100. string name = 2; - // Optional. The contact id. + // The contact id. // // Number of characters allowed is 100. string contact_id = 3; @@ -445,145 +506,134 @@ message AdditionalContactInfo { // Resource that represents an employment record of a candidate. message EmploymentRecord { - // Optional. Start date of the employment. + // Start date of the employment. google.type.Date start_date = 1; - // Optional. End date of the employment. + // End date of the employment. google.type.Date end_date = 2; - // Optional. The name of the employer company/organization. + // The name of the employer company/organization. // // For example, "Google", "Alphabet", and so on. // - // Number of characters allowed is 100. + // Number of characters allowed is 250. string employer_name = 3; - // Optional. The division name of the employment. + // The division name of the employment. // // For example, division, department, client, and so on. // // Number of characters allowed is 100. string division_name = 4; - // Optional. The physical address of the employer. + // The physical address of the employer. Address address = 5; - // Optional. The job title of the employment. + // The job title of the employment. // // For example, "Software Engineer", "Data Scientist", and so on. // - // Number of characters allowed is 100. + // Number of characters allowed is 250. string job_title = 6; - // Optional. The description of job content. + // The description of job content. // // Number of characters allowed is 100,000. string job_description = 7; - // Optional. If the jobs is a supervisor position. + // If the jobs is a supervisor position. google.protobuf.BoolValue is_supervisor = 8; - // Optional. If this employment is self-employed. + // If this employment is self-employed. google.protobuf.BoolValue is_self_employed = 9; - // Optional. If this employment is current. + // If this employment is current. google.protobuf.BoolValue is_current = 10; - // Output only. The job title snippet shows how the - // [job_title][google.cloud.talent.v4beta1.EmploymentRecord.job_title] is - // related to a search query. It's empty if the - // [job_title][google.cloud.talent.v4beta1.EmploymentRecord.job_title] isn't + // Output only. The job title snippet shows how the [job_title][google.cloud.talent.v4beta1.EmploymentRecord.job_title] is related + // to a search query. It's empty if the [job_title][google.cloud.talent.v4beta1.EmploymentRecord.job_title] isn't related to the + // search query. + string job_title_snippet = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The job description snippet shows how the [job_description][google.cloud.talent.v4beta1.EmploymentRecord.job_description] + // is related to a search query. It's empty if the [job_description][google.cloud.talent.v4beta1.EmploymentRecord.job_description] isn't // related to the search query. - string job_title_snippet = 11; - - // Output only. The job description snippet shows how the - // [job_description][google.cloud.talent.v4beta1.EmploymentRecord.job_description] - // is related to a search query. It's empty if the - // [job_description][google.cloud.talent.v4beta1.EmploymentRecord.job_description] - // isn't related to the search query. - string job_description_snippet = 12; - - // Output only. The employer name snippet shows how the - // [employer_name][google.cloud.talent.v4beta1.EmploymentRecord.employer_name] - // is related to a search query. It's empty if the - // [employer_name][google.cloud.talent.v4beta1.EmploymentRecord.employer_name] - // isn't related to the search query. - string employer_name_snippet = 13; + string job_description_snippet = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The employer name snippet shows how the [employer_name][google.cloud.talent.v4beta1.EmploymentRecord.employer_name] is + // related to a search query. It's empty if the [employer_name][google.cloud.talent.v4beta1.EmploymentRecord.employer_name] isn't + // related to the search query. + string employer_name_snippet = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Resource that represents an education record of a candidate. message EducationRecord { - // Optional. The start date of the education. + // The start date of the education. google.type.Date start_date = 1; - // Optional. The end date of the education. + // The end date of the education. google.type.Date end_date = 2; - // Optional. The expected graduation date if currently pursuing a degree. + // The expected graduation date if currently pursuing a degree. google.type.Date expected_graduation_date = 3; - // Optional. The name of the school or institution. + // The name of the school or institution. // // For example, "Stanford University", "UC Berkeley", and so on. // - // Number of characters allowed is 100. + // Number of characters allowed is 250. string school_name = 4; - // Optional. The physical address of the education institution. + // The physical address of the education institution. Address address = 5; // The degree information. It can be one of - // [degree_description][google.cloud.talent.v4beta1.EducationRecord.degree_description] - // or + // [degree_description][google.cloud.talent.v4beta1.EducationRecord.degree_description] or // [structured_degree][google.cloud.talent.v4beta1.EducationRecord.structured_degree]. oneof degree { - // Optional. The full description of the degree. + // The full description of the degree. // // For example, "Master of Science in Computer Science", "B.S in Math". // // Number of characters allowed is 100. string degree_description = 6; - // Optional. The structured notation of the degree. + // The structured notation of the degree. Degree structured_degree = 7; } - // Optional. The description of the education. + // The description of the education. // // Number of characters allowed is 100,000. string description = 8; - // Optional. If this education is current. + // If this education is current. google.protobuf.BoolValue is_current = 9; - // Output only. The school name snippet shows how the - // [school_name][google.cloud.talent.v4beta1.EducationRecord.school_name] is - // related to a search query in search result. It's empty if the - // [school_name][google.cloud.talent.v4beta1.EducationRecord.school_name] - // isn't related to the search query. - string school_name_snippet = 10; - - // Output only. The job description snippet shows how the - // [Degree][google.cloud.talent.v4beta1.Degree] is related to a search query - // in search result. It's empty if the - // [Degree][google.cloud.talent.v4beta1.Degree] isn't related to the search - // query. - string degree_snippet = 11; + // Output only. The school name snippet shows how the [school_name][google.cloud.talent.v4beta1.EducationRecord.school_name] is related to a + // search query in search result. It's empty if the [school_name][google.cloud.talent.v4beta1.EducationRecord.school_name] isn't + // related to the search query. + string school_name_snippet = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The job description snippet shows how the [Degree][google.cloud.talent.v4beta1.Degree] is related to a search + // query in search result. It's empty if the [Degree][google.cloud.talent.v4beta1.Degree] isn't related to the + // search query. + string degree_snippet = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Resource that represents a degree pursuing or acquired by a candidate. message Degree { - // Optional. ISCED degree type. + // ISCED degree type. DegreeType degree_type = 1; - // Optional. Full Degree name. + // Full Degree name. // // For example, "B.S.", "Master of Arts", and so on. // // Number of characters allowed is 100. string degree_name = 2; - // Optional. Fields of study for the degree. + // Fields of study for the degree. // // For example, "Computer science", "engineering". // @@ -595,98 +645,96 @@ message Degree { // in by a candidate, for example, an open-source project, a class assignment, // and so on. message Activity { - // Optional. Activity display name. + // Activity display name. // // Number of characters allowed is 100. string display_name = 1; - // Optional. Activity description. + // Activity description. // // Number of characters allowed is 100,000. string description = 2; - // Optional. Activity URI. + // Activity URI. // // Number of characters allowed is 4,000. string uri = 3; - // Optional. The first creation date of the activity. + // The first creation date of the activity. google.type.Date create_date = 4; - // Optional. The last update date of the activity. + // The last update date of the activity. google.type.Date update_date = 5; - // Optional. A list of team members involved in this activity. + // A list of team members involved in this activity. // // Number of characters allowed is 100. + // + // The limitation for max number of team members is 50. repeated string team_members = 6; - // Optional. A list of skills used in this activity. + // A list of skills used in this activity. + // + // The limitation for max number of skills used is 50. repeated Skill skills_used = 7; - // Output only. Activity name snippet shows how the - // [display_name][google.cloud.talent.v4beta1.Activity.display_name] is - // related to a search query. It's empty if the - // [display_name][google.cloud.talent.v4beta1.Activity.display_name] isn't - // related to the search query. - string activity_name_snippet = 8; + // Output only. Activity name snippet shows how the [display_name][google.cloud.talent.v4beta1.Activity.display_name] is related to a search + // query. It's empty if the [display_name][google.cloud.talent.v4beta1.Activity.display_name] isn't related to the search + // query. + string activity_name_snippet = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Activity description snippet shows how the - // [description][google.cloud.talent.v4beta1.Activity.description] is related - // to a search query. It's empty if the - // [description][google.cloud.talent.v4beta1.Activity.description] isn't - // related to the search query. - string activity_description_snippet = 9; + // [description][google.cloud.talent.v4beta1.Activity.description] is related to a search query. It's empty if the + // [description][google.cloud.talent.v4beta1.Activity.description] isn't related to the search query. + string activity_description_snippet = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Skill used snippet shows how the corresponding - // [skills_used][google.cloud.talent.v4beta1.Activity.skills_used] are related - // to a search query. It's empty if the corresponding - // [skills_used][google.cloud.talent.v4beta1.Activity.skills_used] are not - // related to the search query. - repeated string skills_used_snippet = 10; + // [skills_used][google.cloud.talent.v4beta1.Activity.skills_used] are related to a search query. It's empty if the + // corresponding [skills_used][google.cloud.talent.v4beta1.Activity.skills_used] are not related to the search query. + repeated string skills_used_snippet = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Resource that represents a publication resource of a candidate. message Publication { - // Optional. A list of author names. + // A list of author names. // // Number of characters allowed is 100. repeated string authors = 1; - // Optional. The title of the publication. + // The title of the publication. // // Number of characters allowed is 100. string title = 2; - // Optional. The description of the publication. + // The description of the publication. // // Number of characters allowed is 100,000. string description = 3; - // Optional. The journal name of the publication. + // The journal name of the publication. // // Number of characters allowed is 100. string journal = 4; - // Optional. Volume number. + // Volume number. // // Number of characters allowed is 100. string volume = 5; - // Optional. The publisher of the journal. + // The publisher of the journal. // // Number of characters allowed is 100. string publisher = 6; - // Optional. The publication date. + // The publication date. google.type.Date publication_date = 7; - // Optional. The publication type. + // The publication type. // // Number of characters allowed is 100. string publication_type = 8; - // Optional. ISBN number. + // ISBN number. // // Number of characters allowed is 100. string isbn = 9; @@ -694,42 +742,42 @@ message Publication { // Resource that represents the patent acquired by a candidate. message Patent { - // Optional. Name of the patent. + // Name of the patent. // // Number of characters allowed is 100. string display_name = 1; - // Optional. A list of inventors' names. + // A list of inventors' names. // // Number of characters allowed for each is 100. repeated string inventors = 2; - // Optional. The status of the patent. + // The status of the patent. // // Number of characters allowed is 100. string patent_status = 3; - // Optional. The date the last time the status of the patent was checked. + // The date the last time the status of the patent was checked. google.type.Date patent_status_date = 4; - // Optional. The date that the patent was filed. + // The date that the patent was filed. google.type.Date patent_filing_date = 5; - // Optional. The name of the patent office. + // The name of the patent office. // // Number of characters allowed is 100. string patent_office = 6; - // Optional. The number of the patent. + // The number of the patent. // // Number of characters allowed is 100. string patent_number = 7; - // Optional. The description of the patent. + // The description of the patent. // // Number of characters allowed is 100,000. string patent_description = 8; - // Optional. The skills used in this patent. + // The skills used in this patent. repeated Skill skills_used = 9; } diff --git a/google/cloud/talent/v4beta1/profile_service.proto b/google/cloud/talent/v4beta1/profile_service.proto index 4c759f7e3..4a153fd2e 100644 --- a/google/cloud/talent/v4beta1/profile_service.proto +++ b/google/cloud/talent/v4beta1/profile_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,12 +18,17 @@ package google.cloud.talent.v4beta1; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/talent/v4beta1/common.proto"; import "google/cloud/talent/v4beta1/filters.proto"; import "google/cloud/talent/v4beta1/histogram.proto"; import "google/cloud/talent/v4beta1/profile.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/any.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; option java_multiple_files = true; @@ -45,6 +49,7 @@ service ProfileService { option (google.api.http) = { get: "/v4beta1/{parent=projects/*/tenants/*}/profiles" }; + option (google.api.method_signature) = "parent"; } // Creates and returns a new profile. @@ -53,6 +58,7 @@ service ProfileService { post: "/v4beta1/{parent=projects/*/tenants/*}/profiles" body: "*" }; + option (google.api.method_signature) = "parent,profile"; } // Gets the specified profile. @@ -60,6 +66,7 @@ service ProfileService { option (google.api.http) = { get: "/v4beta1/{name=projects/*/tenants/*/profiles/*}" }; + option (google.api.method_signature) = "name"; } // Updates the specified profile and returns the updated result. @@ -68,6 +75,7 @@ service ProfileService { patch: "/v4beta1/{profile.name=projects/*/tenants/*/profiles/*}" body: "*" }; + option (google.api.method_signature) = "profile"; } // Deletes the specified profile. @@ -77,6 +85,7 @@ service ProfileService { option (google.api.http) = { delete: "/v4beta1/{name=projects/*/tenants/*/profiles/*}" }; + option (google.api.method_signature) = "name"; } // Searches for profiles within a tenant. @@ -84,9 +93,7 @@ service ProfileService { // For example, search by raw queries "software engineer in Mountain View" or // search by structured filters (location filter, education filter, etc.). // - // See - // [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest] - // for more information. + // See [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest] for more information. rpc SearchProfiles(SearchProfilesRequest) returns (SearchProfilesResponse) { option (google.api.http) = { post: "/v4beta1/{parent=projects/*/tenants/*}:search" @@ -97,28 +104,49 @@ service ProfileService { // List profiles request. message ListProfilesRequest { - // Required. The resource name of the tenant under which the profile is - // created. + // Required. The resource name of the tenant under which the profile is created. // - // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenants/foo". - string parent = 1; + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenants/bar". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Profile" + } + ]; - // Optional. The token that specifies the current offset (that is, starting - // result). + // The filter string specifies the profiles to be enumerated. + // + // Supported operator: =, AND + // + // The field(s) eligible for filtering are: + // + // * `externalId` + // * `groupId` + // + // externalId and groupId cannot be specified at the same time. If both + // externalId and groupId are provided, the API will return a bad request + // error. // - // Please set the value to - // [ListProfilesResponse.next_page_token][google.cloud.talent.v4beta1.ListProfilesResponse.next_page_token] - // to continue the list. + // Sample Query: + // + // * externalId = "externalId-1" + // * groupId = "groupId-1" + string filter = 5; + + // The token that specifies the current offset (that is, starting result). + // + // Please set the value to [ListProfilesResponse.next_page_token][google.cloud.talent.v4beta1.ListProfilesResponse.next_page_token] to + // continue the list. string page_token = 2; - // Optional. The maximum number of profiles to be returned, at most 100. + // The maximum number of profiles to be returned, at most 100. // // Default is 100 unless a positive number smaller than 100 is specified. int32 page_size = 3; - // Optional. A field mask to specify the profile fields to be listed in - // response. All fields are listed if it is unset. + // A field mask to specify the profile fields to be listed in response. + // All fields are listed if it is unset. // // Valid values are: // @@ -140,12 +168,17 @@ message ListProfilesResponse { message CreateProfileRequest { // Required. The name of the tenant this profile belongs to. // - // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenants/foo". - string parent = 1; + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenants/bar". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Tenant" + } + ]; // Required. The profile to be created. - Profile profile = 2; + Profile profile = 2 [(google.api.field_behavior) = REQUIRED]; } // Get profile request. @@ -153,45 +186,24 @@ message GetProfileRequest { // Required. Resource name of the profile to get. // // The format is - // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", - // for example, "projects/api-test-project/tenants/foo/profiles/bar". - string name = 1; + // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}". For + // example, "projects/foo/tenants/bar/profiles/baz". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Profile" + } + ]; } // Update profile request message UpdateProfileRequest { // Required. Profile to be updated. - Profile profile = 1; + Profile profile = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. A field mask to specify the profile fields to update. + // A field mask to specify the profile fields to update. // // A full update is performed if it is unset. - // - // Valid values are: - // - // * external_id - // * source - // * uri - // * is_hirable - // * create_time - // * update_time - // * resume - // * person_names - // * addresses - // * email_addresses - // * phone_numbers - // * personal_uris - // * additional_contact_info - // * employment_records - // * education_records - // * skills - // * projects - // * publications - // * patents - // * certifications - // * recruiting_notes - // * custom_attributes - // * group_id google.protobuf.FieldMask update_mask = 2; } @@ -200,47 +212,54 @@ message DeleteProfileRequest { // Required. Resource name of the profile to be deleted. // // The format is - // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", - // for example, "projects/api-test-project/tenants/foo/profiles/bar". - string name = 1; + // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}". For + // example, "projects/foo/tenants/bar/profiles/baz". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Profile" + } + ]; } // The request body of the `SearchProfiles` call. message SearchProfilesRequest { // Required. The resource name of the tenant to search within. // - // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenants/foo". - string parent = 1; - - // Required. The meta information collected about the profile search user. - // This is used to improve the search quality of the service. These values are - // provided by users, and must be precise and consistent. - RequestMetadata request_metadata = 2; - - // Optional. Search query to execute. See - // [ProfileQuery][google.cloud.talent.v4beta1.ProfileQuery] for more details. + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenants/bar". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Tenant" + } + ]; + + // Required. The meta information collected about the profile search user. This is used + // to improve the search quality of the service. These values are provided by + // users, and must be precise and consistent. + RequestMetadata request_metadata = 2 [(google.api.field_behavior) = REQUIRED]; + + // Search query to execute. See [ProfileQuery][google.cloud.talent.v4beta1.ProfileQuery] for more details. ProfileQuery profile_query = 3; - // Optional. A limit on the number of profiles returned in the search results. + // A limit on the number of profiles returned in the search results. // A value above the default value 10 can increase search response time. // // The maximum value allowed is 100. Otherwise an error is thrown. int32 page_size = 4; - // Optional. The pageToken, similar to offset enables users of the API to - // paginate through the search results. To retrieve the first page of results, - // set the pageToken to empty. The search response includes a - // [nextPageToken][google.cloud.talent.v4beta1.SearchProfilesResponse.next_page_token] - // field that can be used to populate the pageToken field for the next page of - // results. Using pageToken instead of offset increases the performance of the - // API, especially compared to larger offset values. + // The pageToken, similar to offset enables users of the API to paginate + // through the search results. To retrieve the first page of results, set the + // pageToken to empty. The search response includes a + // [nextPageToken][google.cloud.talent.v4beta1.SearchProfilesResponse.next_page_token] field that can be + // used to populate the pageToken field for the next page of results. Using + // pageToken instead of offset increases the performance of the API, + // especially compared to larger offset values. string page_token = 5; - // Optional. An integer that specifies the current offset (that is, starting - // result) in search results. This field is only considered if - // [page_token][google.cloud.talent.v4beta1.SearchProfilesRequest.page_token] - // is unset. + // An integer that specifies the current offset (that is, starting result) in + // search results. This field is only considered if [page_token][google.cloud.talent.v4beta1.SearchProfilesRequest.page_token] is unset. // // The maximum allowed value is 5000. Otherwise an error is thrown. // @@ -249,54 +268,42 @@ message SearchProfilesRequest { // pageSize = 10 and offset = 10 means to search from the second page. int32 offset = 6; - // Optional. This flag controls the spell-check feature. If `false`, the + // This flag controls the spell-check feature. If `false`, the // service attempts to correct a misspelled query. // // For example, "enginee" is corrected to "engineer". bool disable_spell_check = 7; - // Optional. The criteria that determines how search results are sorted. + // The criteria that determines how search results are sorted. // Defaults is "relevance desc" if no value is specified. // // Supported options are: // // * "relevance desc": By descending relevance, as determined by the API // algorithms. - // * "update_time desc": Sort by - // [Profile.update_time][google.cloud.talent.v4beta1.Profile.update_time] in - // descending order + // * "update_date desc": Sort by [Profile.update_time][google.cloud.talent.v4beta1.Profile.update_time] in descending order // (recently updated profiles first). - // * "create_time desc": Sort by - // [Profile.create_time][google.cloud.talent.v4beta1.Profile.create_time] in - // descending order + // * "create_date desc": Sort by [Profile.create_time][google.cloud.talent.v4beta1.Profile.create_time] in descending order // (recently created profiles first). - // * "first_name": Sort by - // [PersonName.PersonStructuredName.given_name][google.cloud.talent.v4beta1.PersonName.PersonStructuredName.given_name] - // in + // * "first_name": Sort by [PersonName.PersonStructuredName.given_name][google.cloud.talent.v4beta1.PersonName.PersonStructuredName.given_name] in // ascending order. - // * "first_name desc": Sort by - // [PersonName.PersonStructuredName.given_name][google.cloud.talent.v4beta1.PersonName.PersonStructuredName.given_name] + // * "first_name desc": Sort by [PersonName.PersonStructuredName.given_name][google.cloud.talent.v4beta1.PersonName.PersonStructuredName.given_name] // in descending order. - // * "last_name": Sort by - // [PersonName.PersonStructuredName.family_name][google.cloud.talent.v4beta1.PersonName.PersonStructuredName.family_name] - // in + // * "last_name": Sort by [PersonName.PersonStructuredName.family_name][google.cloud.talent.v4beta1.PersonName.PersonStructuredName.family_name] in // ascending order. - // * "last_name desc": Sort by - // [PersonName.PersonStructuredName.family_name][google.cloud.talent.v4beta1.PersonName.PersonStructuredName.family_name] + // * "last_name desc": Sort by [PersonName.PersonStructuredName.family_name][google.cloud.talent.v4beta1.PersonName.PersonStructuredName.family_name] // in ascending order. string order_by = 8; - // Optional. When sort by field is based on alphabetical order, sort values - // case sensitively (based on ASCII) when the value is set to true. Default - // value is case in-sensitive sort (false). + // When sort by field is based on alphabetical order, sort values case + // sensitively (based on ASCII) when the value is set to true. Default value + // is case in-sensitive sort (false). bool case_sensitive_sort = 9; - // Optional. A list of expressions specifies histogram requests against - // matching profiles for - // [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest]. + // A list of expressions specifies histogram requests against matching + // profiles for [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest]. // - // The expression syntax looks like a function definition with optional - // parameters. + // The expression syntax looks like a function definition with parameters. // // Function syntax: function_name(histogram_facet[, list of buckets]) // @@ -346,19 +353,13 @@ message SearchProfilesRequest { // * experience_in_months: experience in months. 0 means 0 month to 1 month // (exclusive). // * application_date: The application date specifies application start dates. - // See - // [ApplicationDateFilter][google.cloud.talent.v4beta1.ApplicationDateFilter] - // for more details. + // See [ApplicationDateFilter][google.cloud.talent.v4beta1.ApplicationDateFilter] for more details. // * application_outcome_notes: The application outcome reason specifies the // reasons behind the outcome of the job application. - // See - // [ApplicationOutcomeNotesFilter][google.cloud.talent.v4beta1.ApplicationOutcomeNotesFilter] - // for more details. + // See [ApplicationOutcomeNotesFilter][google.cloud.talent.v4beta1.ApplicationOutcomeNotesFilter] for more details. // * application_job_title: The application job title specifies the job // applied for in the application. - // See - // [ApplicationJobFilter][google.cloud.talent.v4beta1.ApplicationJobFilter] - // for more details. + // See [ApplicationJobFilter][google.cloud.talent.v4beta1.ApplicationJobFilter] for more details. // * hirable_status: Hirable status specifies the profile's hirable status. // * string_custom_attribute: String custom attributes. Values can be accessed // via square bracket notation like string_custom_attribute["key1"]. @@ -375,33 +376,42 @@ message SearchProfilesRequest { // [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")]) repeated HistogramQuery histogram_queries = 10; - // Optional. An id that uniquely identifies the result set of a - // [SearchProfiles][] call. The id should be retrieved from the - // [SearchProfilesResponse][google.cloud.talent.v4beta1.SearchProfilesResponse] - // message returned from a previous invocation of [SearchProfiles][]. + // An id that uniquely identifies the result set of a + // [SearchProfiles][google.cloud.talent.v4beta1.ProfileService.SearchProfiles] call. The id should be + // retrieved from the + // [SearchProfilesResponse][google.cloud.talent.v4beta1.SearchProfilesResponse] message returned from a previous + // invocation of [SearchProfiles][google.cloud.talent.v4beta1.ProfileService.SearchProfiles]. // // A result set is an ordered list of search results. // // If this field is not set, a new result set is computed based on the - // [profile_query][google.cloud.talent.v4beta1.SearchProfilesRequest.profile_query]. - // A new - // [result_set_id][google.cloud.talent.v4beta1.SearchProfilesRequest.result_set_id] - // is returned as a handle to access this result set. + // [profile_query][google.cloud.talent.v4beta1.SearchProfilesRequest.profile_query]. A new [result_set_id][google.cloud.talent.v4beta1.SearchProfilesRequest.result_set_id] is returned as a handle to + // access this result set. // // If this field is set, the service will ignore the resource and - // [profile_query][google.cloud.talent.v4beta1.SearchProfilesRequest.profile_query] - // values, and simply retrieve a page of results from the corresponding result - // set. In this case, one and only one of [page_token] or [offset] must be - // set. - // - // A typical use case is to invoke - // [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest] - // without this field, then use the resulting - // [result_set_id][google.cloud.talent.v4beta1.SearchProfilesRequest.result_set_id] - // in - // [SearchProfilesResponse][google.cloud.talent.v4beta1.SearchProfilesResponse] - // to page through the results. + // [profile_query][google.cloud.talent.v4beta1.SearchProfilesRequest.profile_query] values, and simply retrieve a page of results from the + // corresponding result set. In this case, one and only one of [page_token][google.cloud.talent.v4beta1.SearchProfilesRequest.page_token] + // or [offset][google.cloud.talent.v4beta1.SearchProfilesRequest.offset] must be set. + // + // A typical use case is to invoke [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest] without this + // field, then use the resulting [result_set_id][google.cloud.talent.v4beta1.SearchProfilesRequest.result_set_id] in + // [SearchProfilesResponse][google.cloud.talent.v4beta1.SearchProfilesResponse] to page through the results. string result_set_id = 12; + + // This flag is used to indicate whether the service will attempt to + // understand synonyms and terms related to the search query or treat the + // query "as is" when it generates a set of results. By default this flag is + // set to false, thus allowing expanded results to also be returned. For + // example a search for "software engineer" might also return candidates who + // have experience in jobs similar to software engineer positions. By setting + // this flag to true, the service will only attempt to deliver candidates has + // software engineer in his/her global fields by treating "software engineer" + // as a keyword. + // + // It is recommended to provide a feature in the UI (such as a checkbox) to + // allow recruiters to set this flag to true if they intend to search for + // longer boolean strings. + bool strict_keywords_search = 13; } // Response of SearchProfiles method. @@ -426,32 +436,26 @@ message SearchProfilesResponse { // [SearchProfilesRequest.histogram_queries][google.cloud.talent.v4beta1.SearchProfilesRequest.histogram_queries]. repeated HistogramQueryResult histogram_query_results = 5; - // The profile entities that match the specified - // [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest]. + // The profile entities that match the specified [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest]. repeated SummarizedProfile summarized_profiles = 6; // An id that uniquely identifies the result set of a - // [SearchProfiles][google.cloud.talent.v4beta1.ProfileService.SearchProfiles] - // call for consistent results. + // [SearchProfiles][google.cloud.talent.v4beta1.ProfileService.SearchProfiles] call for consistent + // results. string result_set_id = 7; } -// Output only. -// -// Profile entry with metadata inside -// [SearchProfilesResponse][google.cloud.talent.v4beta1.SearchProfilesResponse]. +// Profile entry with metadata inside [SearchProfilesResponse][google.cloud.talent.v4beta1.SearchProfilesResponse]. message SummarizedProfile { - // A list of profiles that are linked by - // [Profile.group_id][google.cloud.talent.v4beta1.Profile.group_id]. + // A list of profiles that are linked by [Profile.group_id][google.cloud.talent.v4beta1.Profile.group_id]. repeated Profile profiles = 1; // A profile summary shows the profile summary and how the profile matches the // search query. // - // In profile summary, the profiles with the same - // [Profile.group_id][google.cloud.talent.v4beta1.Profile.group_id] are merged - // together. Among profiles, same education/employment records may be slightly - // different but they are merged into one with best efforts. + // In profile summary, the profiles with the same [Profile.group_id][google.cloud.talent.v4beta1.Profile.group_id] are + // merged together. Among profiles, same education/employment records may be + // slightly different but they are merged into one with best efforts. // // For example, in one profile the school name is "UC Berkeley" and the field // study is "Computer Science" and in another one the school name is diff --git a/google/cloud/talent/v4beta1/talent_gapic.legacy.yaml b/google/cloud/talent/v4beta1/talent_gapic.legacy.yaml new file mode 100644 index 000000000..0e3612510 --- /dev/null +++ b/google/cloud/talent/v4beta1/talent_gapic.legacy.yaml @@ -0,0 +1,1890 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.talent.v4beta1 + python: + package_name: google.cloud.talent_v4beta1.gapic + go: + package_name: cloud.google.com/go/talent/apiv4beta1 + csharp: + package_name: Google.Cloud.Talent.V4Beta1 + ruby: + package_name: Google::Cloud::Talent::V4beta1 + php: + package_name: Google\Cloud\Talent\V4beta1 + nodejs: + package_name: talent.v4beta1 + domain_layer_location: google-cloud +# A list of resource collection configurations. +# Consists of a name_pattern and an entity_name. +# The name_pattern is a pattern to describe the names of the resources of this +# collection, using the platform's conventions for URI patterns. A generator +# may use this to generate methods to compose and decompose such names. The +# pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; +# those will be taken as hints for the parameter names of the generated +# methods. If empty, no name methods are generated. +# The entity_name is the name to be used as a basis for generated methods and +# classes. +collections: +- name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName +- name_pattern: projects/{project}/companies/{company} + entity_name: company_without_tenant +- name_pattern: projects/{project}/tenants/{tenant}/companies/{company} + entity_name: company + # Override on Java, or we'll get an exception caused by conflicting with company_oneof: + # "CompanyName.java: Tried to write the same file twice". + language_overrides: + - language: java + entity_name: company_with_tenant +- name_pattern: projects/{project}/jobs/{jobs} + entity_name: job_without_tenant +- name_pattern: projects/{project}/tenants/{tenant}/jobs/{jobs} + entity_name: job + # Override on Java, or we'll get an exception caused by conflicting with job_oneof: + # "JobName.java: Tried to write the same file twice". + language_overrides: + - language: java + entity_name: job_with_tenant +- name_pattern: projects/{project}/tenants/{tenant}/profiles/{profile} + entity_name: profile +- name_pattern: projects/{project}/tenants/{tenant}/profiles/{profile}/applications/{application} + entity_name: application +- name_pattern: projects/{project}/tenants/{tenant} + entity_name: tenant + +collection_oneofs: +- oneof_name: company_oneof + collection_names: + - company + - company_without_tenant +- oneof_name: job_oneof + collection_names: + - job + - job_without_tenant +- oneof_name: tenant_or_project + collection_names: + - tenant + - project + +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.talent.v4beta1.ApplicationService + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateApplication + flattening: + groups: + - parameters: + - parent + - application + required_fields: + - parent + - application + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: profile + timeout_millis: 30000 + - name: GetApplication + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: application + timeout_millis: 30000 + - name: UpdateApplication + flattening: + groups: + - parameters: + - application + required_fields: + - application + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + application.name: application + timeout_millis: 30000 + - name: DeleteApplication + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: application + timeout_millis: 30000 + - name: ListApplications + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: applications + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: profile + timeout_millis: 30000 +# The fully qualified name of the API interface. +- name: google.cloud.talent.v4beta1.CompanyService + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateCompany + samples: + standalone: + - value_sets: [job_search_create_company] + region_tag: job_search_create_company + sample_value_sets: + - id: job_search_create_company + description: Create Company + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - parent%tenant="Your Tenant ID (using tenancy is optional)" + - company.display_name="My Company Name" + - company.external_id="Identifier of this company in my system" + attributes: + - parameter: parent%project + sample_argument_name: project_id + description: Your Google Cloud Project ID + - parameter: parent%tenant + sample_argument_name: tenant_id + description: Identifier of the Tenant + - parameter: company.display_name + sample_argument_name: display_name + - parameter: company.external_id + sample_argument_name: external_id + on_success: + - print: ["Created Company"] + - print: ["Name: %s", $resp.name] + - print: ["Display Name: %s", $resp.display_name] + - print: ["External ID: %s", $resp.external_id] + flattening: + groups: + - parameters: + - parent + - company + required_fields: + - parent + - company + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: tenant_or_project + timeout_millis: 30000 + - name: GetCompany + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: company_oneof + timeout_millis: 30000 + samples: + standalone: + - value_sets: [job_search_get_company] + region_tag: job_search_get_company + sample_value_sets: + - id: job_search_get_company + description: Get Company + parameters: + defaults: + - name%project="Your Google Cloud Project ID" + - name%tenant="Your Tenant ID (using tenancy is optional)" + - name%company="Company ID" + attributes: + - parameter: name%project + sample_argument_name: project_id + - parameter: name%tenant + sample_argument_name: tenant_id + - parameter: name%company + sample_argument_name: company_id + on_success: + - print: ["Company name: %s", $resp.name] + - print: ["Display name: %s", $resp.display_name] + - name: UpdateCompany + flattening: + groups: + - parameters: + - company + required_fields: + - company + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + company.name: company_oneof + timeout_millis: 30000 + - name: DeleteCompany + samples: + standalone: + - value_sets: [job_search_delete_company] + region_tag: job_search_delete_company + sample_value_sets: + - id: job_search_delete_company + description: Delete Company + parameters: + defaults: + - name%project="Your Google Cloud Project ID" + - name%tenant="Your Tenant ID (using tenancy is optional)" + - name%company="ID of the company to delete" + attributes: + - parameter: name%project + sample_argument_name: project_id + - parameter: name%tenant + sample_argument_name: tenant_id + - parameter: name%company + sample_argument_name: company_id + on_success: + - print: ["Deleted company"] + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: company_oneof + timeout_millis: 30000 + - name: ListCompanies + samples: + standalone: + - value_sets: [job_search_list_companies] + region_tag: job_search_list_companies + sample_value_sets: + - id: job_search_list_companies + description: List Companies + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - parent%tenant="Your Tenant ID (using tenancy is optional)" + attributes: + - parameter: parent%project + sample_argument_name: project_id + description: Your Google Cloud Project ID + - parameter: parent%tenant + sample_argument_name: tenant_id + description: Identifier of the Tenant + on_success: + - print: ["Company Name: %s", $resp.name] + - print: ["Display Name: %s", $resp.display_name] + - print: ["External ID: %s", $resp.external_id] + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: companies + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: tenant_or_project + timeout_millis: 30000 +# The fully qualified name of the API interface. +- name: google.cloud.talent.v4beta1.Completion + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CompleteQuery + required_fields: + - parent + - query + - page_size + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: tenant_or_project + company: company_oneof + timeout_millis: 30000 + samples: + standalone: + - value_sets: [job_search_autocomplete_job_title] + region_tag: job_search_autocomplete_job_title + sample_value_sets: + - id: job_search_autocomplete_job_title + description: Complete job title given partial text (autocomplete) + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - parent%tenant="Your Tenant ID (using tenancy is optional)" + - query="[partially typed job title]" + - page_size=5 + - language_codes[0]="en-US" + attributes: + - parameter: parent%project + sample_argument_name: project_id + description: Your Google Cloud Project ID + - parameter: parent%tenant + sample_argument_name: tenant_id + description: Identifier of the Tenantd + - parameter: query + sample_argument_name: query + - parameter: page_size + sample_argument_name: num_results + - parameter: language_codes[0] + sample_argument_name: language_code + on_success: + - loop: + collection: $resp.completion_results + variable: result + body: + - print: ["Suggested title: %s", result.suggestion] + - comment: ["Suggestion type is JOB_TITLE or COMPANY_TITLE"] + - print: ["Suggestion type: %s", result.type] + +# The fully qualified name of the API interface. +- name: google.cloud.talent.v4beta1.EventService + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateClientEvent + flattening: + groups: + - parameters: + - parent + - client_event + required_fields: + - parent + - client_event + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: tenant_or_project + timeout_millis: 30000 + samples: + standalone: + - value_sets: [job_search_create_client_event] + region_tag: job_search_create_client_event + sample_value_sets: + - id: job_search_create_client_event + description: Creates a client event + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - parent%tenant="Your Tenant ID (using tenancy is optional)" + - client_event.request_id="[request_id from ResponseMetadata]" + - client_event.event_id="[Set this to a unique identifier]" + # https://github.com/googleapis/gapic-generator/issues/2762 + # - client_event.create_time="1972-01-01T10:00:20.021Z" + - client_event.create_time.seconds=0 + - client_event.job_event.type=VIEW + - client_event.job_event.jobs[0]="projects/[Project ID]/tenants/[Tenant ID]/jobs/[Job ID]" + - client_event.job_event.jobs[1]="projects/[Project ID]/tenants/[Tenant ID]/jobs/[Job ID]" + attributes: + - parameter: parent%project + sample_argument_name: project_id + description: Your Google Cloud Project ID + - parameter: parent%tenant + sample_argument_name: tenant_id + description: Identifier of the Tenant + - parameter: client_event.request_id + sample_argument_name: request_id + description: | + A unique ID generated in the API responses. + Value should be set to the request_id from an API response. + - parameter: client_event.event_id + sample_argument_name: event_id + description: A unique identifier, generated by the client application + - parameter: client_event.create_time.seconds + description: | + The timestamp of the event as seconds of UTC time since Unix epoch + For more information on how to create google.protobuf.Timestamps + See: https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/timestamp.proto + - parameter: client_event.job_event.type + description: The type of event attributed to the behavior of the end user + - parameter: client_event.job_event.jobs[0] + description: List of job names associated with this event + on_success: + - print: ["Created client event"] +# The fully qualified name of the API interface. +- name: google.cloud.talent.v4beta1.JobService + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateJob + flattening: + groups: + - parameters: + - parent + - job + required_fields: + - parent + - job + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: tenant_or_project + job.company: company_oneof + timeout_millis: 30000 + samples: + standalone: + - value_sets: [job_search_create_job] + region_tag: job_search_create_job + - value_sets: [job_search_create_job_custom_attributes] + region_tag: job_search_create_job_custom_attributes + sample_value_sets: + - id: job_search_create_job + description: Create Job + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - parent%tenant="Your Tenant ID (using tenancy is optional)" + ## # Currently cannot generate code which uses the helper methods to generate + ## # the company name using the projectId and companyId. Instead the user + ## # has to provide the full projects/X/companies/Y string path. + ## # See: https://github.com/googleapis/gapic-generator/issues/2621 + # - job.company.project%project="Your Google Cloud Project ID" + # - job.company.company%company="Company ID" + - job.company="Company name, e.g. projects/your-project/companies/company-id" + ## + - job.requisition_id="Job requisition ID, aka Posting ID. Unique per job." + - job.title="Software Engineer" + - job.description="This is a description of this wonderful job!" + - job.application_info.uris[0]="https://www.example.org/job-posting/123" + - job.addresses[0]="1600 Amphitheatre Parkway, Mountain View, CA 94043" + - job.addresses[1]="111 8th Avenue, New York, NY 10011" + - job.language_code="en-US" + attributes: + - parameter: parent%project + sample_argument_name: project_id + description: Your Google Cloud Project ID + - parameter: parent%tenant + sample_argument_name: tenant_id + description: Identifier of the Tenant + - parameter: job.company + sample_argument_name: company_name + - parameter: job.requisition_id + sample_argument_name: requisition_id + - parameter: job.title + sample_argument_name: title + - parameter: job.description + sample_argument_name: description + - parameter: job.application_info.uris[0] + sample_argument_name: job_application_url + - parameter: job.addresses[0] + sample_argument_name: address_one + - parameter: job.addresses[1] + sample_argument_name: address_two + - parameter: job.language_code + sample_argument_name: language_code + on_success: + - print: + - "Created job: %s" + - $resp.name + - id: job_search_create_job_custom_attributes + description: Create Job with Custom Attributes + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - parent%tenant="Your Tenant ID (using tenancy is optional)" + - job.company="Company name, e.g. projects/your-project/companies/company-id" + - job.requisition_id="Job requisition ID, aka Posting ID. Unique per job." + - job.language_code="en-US" + # - custom_attributes["my_attribute"][0]="My attribute value" + attributes: + - parameter: parent%project + sample_argument_name: project_id + description: Your Google Cloud Project ID + - parameter: parent%tenant + sample_argument_name: tenant_id + description: Identifier of the Tenantd + - parameter: job.company + sample_argument_name: company_name + - parameter: job.requisition_id + sample_argument_name: requisition_id + - parameter: job.language_code + sample_argument_name: language_code + on_success: + - print: + - "Created job: %s" + - $resp.name + - name: GetJob + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: job_oneof + timeout_millis: 30000 + samples: + standalone: + - value_sets: [job_search_get_job] + region_tag: job_search_get_job + sample_value_sets: + - id: job_search_get_job + description: Get Job + parameters: + defaults: + - name%project="Your Google Cloud Project ID" + - name%tenant="Your Tenant ID (using tenancy is optional)" + - name%jobs="Job ID" + attributes: + - parameter: name%project + sample_argument_name: project_id + - parameter: name%tenant + sample_argument_name: tenant_id + - parameter: name%jobs + sample_argument_name: job_id + on_success: + - print: ["Job name: %s", $resp.name] + - print: ["Requisition ID: %s", $resp.requisition_id] + - print: ["Title: %s", $resp.title] + - print: ["Description: %s", $resp.description] + - print: ["Posting language: %s", $resp.language_code] + - loop: + collection: $resp.addresses + variable: address + body: + - print: ["Address: %s", address] + - loop: + collection: $resp.application_info.emails + variable: email + body: + - print: ["Email: %s", email] + - loop: + collection: $resp.application_info.uris + variable: website_uri + body: + - print: ["Website: %s", website_uri] + - name: UpdateJob + flattening: + groups: + - parameters: + - job + required_fields: + - job + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + job.name: job_oneof + job.company: company_oneof + timeout_millis: 30000 + - name: DeleteJob + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: job_oneof + timeout_millis: 30000 + samples: + standalone: + - value_sets: [job_search_delete_job] + region_tag: job_search_delete_job + sample_value_sets: + - id: job_search_delete_job + description: Delete Job + parameters: + defaults: + - name%project="Your Google Cloud Project ID" + - name%tenant="Your Tenant ID (using tenancy is optional)" + - name%jobs="Company ID" + attributes: + - parameter: name%project + sample_argument_name: project_id + - parameter: name%tenant + sample_argument_name: tenant_id + - parameter: name%jobs + sample_argument_name: job_id + on_success: + - print: + - "Deleted job." + - name: ListJobs + samples: + standalone: + - value_sets: [job_search_list_jobs] + region_tag: job_search_list_jobs + sample_value_sets: + - id: job_search_list_jobs + description: List Jobs + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - parent%tenant="Your Tenant ID (using tenancy is optional)" + - filter="companyName=projects/my-project/companies/company-id" + attributes: + - parameter: parent%project + sample_argument_name: project_id + description: Your Google Cloud Project ID + - parameter: parent%tenant + sample_argument_name: tenant_id + description: Identifier of the Tenant + - parameter: filter + sample_argument_name: filter + on_success: + - print: + - "Job name: %s" + - $resp.name + - print: + - "Job requisition ID: %s" + - $resp.requisition_id + - print: + - "Job title: %s" + - $resp.title + - print: + - "Job description: %s" + - $resp.description + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + - filter + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: jobs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: tenant_or_project + timeout_millis: 30000 + - name: BatchDeleteJobs + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + - filter + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: tenant_or_project + timeout_millis: 30000 + samples: + standalone: + - value_sets: [job_search_batch_delete_job] + region_tag: job_search_batch_delete_job + sample_value_sets: + - id: job_search_batch_delete_job + description: Batch delete jobs using a filter + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - parent%tenant="Your Tenant ID (using tenancy is optional)" + - filter="[Query]" + attributes: + - parameter: parent%project + sample_argument_name: project_id + description: Your Google Cloud Project ID + - parameter: parent%tenant + sample_argument_name: tenant_id + description: Identifier of the Tenantd + - parameter: filter + sample_argument_name: filter + description: | + The filter string specifies the jobs to be deleted. + For example: + companyName = "projects/api-test-project/companies/123" AND equisitionId = "req-1" + on_success: + - print: ["Batch deleted jobs from filter"] + - name: SearchJobs + required_fields: + - parent + - request_metadata + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: matching_jobs + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: tenant_or_project + timeout_millis: 30000 + samples: + standalone: + - value_sets: [job_search_custom_ranking_search] + region_tag: job_search_custom_ranking_search + - value_sets: [job_search_commute_search] + region_tag: job_search_commute_search + - value_sets: [job_search_histogram_search] + region_tag: job_search_histogram_search + sample_value_sets: + - id: job_search_custom_ranking_search + description: Search Jobs using custom rankings + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - parent%tenant="Your Tenant ID (using tenancy is optional)" + # - job_query.company_names[0]="projects/[Project ID]/companies/[Company ID]" + - request_metadata.domain="www.example.com" + - request_metadata.session_id="Hashed session identifier" + - request_metadata.user_id="Hashed user identifier" + - custom_ranking_info.importance_level=EXTREME + - custom_ranking_info.ranking_expression="(someFieldLong + 25) * 0.25" + - order_by="custom_ranking desc" + attributes: + - parameter: parent%project + sample_argument_name: project_id + description: Your Google Cloud Project ID + - parameter: parent%tenant + sample_argument_name: tenant_id + description: Identifier of the Tenantd + on_success: + - print: ["Job summary: %s", $resp.job_summary] + - print: ["Job title snippet: %s", $resp.job_title_snippet] + - define: job=$resp.job + - print: ["Job name: %s", job.name] + - print: ["Job title: %s", job.title] + - id: job_search_commute_search + description: Search Jobs using commute distance + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - parent%tenant="Your Tenant ID (using tenancy is optional)" + # - job_query.company_names[0]="projects/[Project ID]/companies/[Company ID]" + - request_metadata.domain="www.example.com" + - request_metadata.session_id="Hashed session identifier" + - request_metadata.user_id="Hashed user identifier" + - job_query.commute_filter.commute_method=TRANSIT + # 30 minutes + - job_query.commute_filter.travel_duration.seconds=1800 + - job_query.commute_filter.start_coordinates.latitude=37.422408 + - job_query.commute_filter.start_coordinates.longitude=-122.084068 + attributes: + - parameter: parent%project + sample_argument_name: project_id + - parameter: parent%tenant + sample_argument_name: tenant_id + on_success: + - print: ["Job summary: %s", $resp.job_summary] + - print: ["Job title snippet: %s", $resp.job_title_snippet] + - define: job=$resp.job + - print: ["Job name: %s", job.name] + - print: ["Job title: %s", job.title] + - id: job_search_histogram_search + description: Search Jobs with histogram queries + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - parent%tenant="Your Tenant ID (using tenancy is optional)" + - request_metadata.domain="www.example.com" + - request_metadata.session_id="Hashed session identifier" + - request_metadata.user_id="Hashed user identifier" + - histogram_queries[0].histogram_query="count(base_compensation, [bucket(12, 20)])" + attributes: + - parameter: parent%project + sample_argument_name: project_id + - parameter: parent%tenant + sample_argument_name: tenant_id + - parameter: histogram_queries[0].histogram_query + sample_argument_name: query + description: | + Histogram query + More info on histogram facets, constants, and built-in functions: + https://godoc.org/google.golang.org/genproto/googleapis/cloud/talent/v4beta1#SearchJobsRequest + on_success: + - print: ["Job summary: %s", $resp.job_summary] + - print: ["Job title snippet: %s", $resp.job_title_snippet] + - define: job=$resp.job + - print: ["Job name: %s", job.name] + - print: ["Job title: %s", job.title] + - name: SearchJobsForAlert + required_fields: + - parent + - request_metadata + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: matching_jobs + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: tenant_or_project + timeout_millis: 30000 + - name: BatchCreateJobs + flattening: + groups: + - parameters: + - parent + - jobs + required_fields: + - parent + - jobs + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: tenant + long_running: + return_type: google.cloud.talent.v4beta1.JobOperationResult + metadata_type: google.cloud.talent.v4beta1.BatchOperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 30000 + samples: + standalone: + - value_sets: [job_search_batch_create_jobs] + region_tag: job_search_batch_create_jobs + sample_value_sets: + - id: job_search_batch_create_jobs + description: Batch Create Jobs + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - parent%tenant="Your Tenant ID (using tenancy is optional)" + ## # Currently cannot generate code which uses the helper methods to generate + ## # the company name using the projectId and companyId. Instead the user + ## # has to provide the full projects/X/companies/Y string path. + ## # See: https://github.com/googleapis/gapic-generator/issues/2621 + # - job.company.project%project="Your Google Cloud Project ID" + # - job.company.company%company="Company ID" + - jobs[0].company="Company name, e.g. projects/your-project/companies/company-id" + - jobs[0].requisition_id="Job requisition ID, aka Posting ID. Unique per job." + - jobs[0].title="Software Engineer" + - jobs[0].description="This is a description of this wonderful job!" + - jobs[0].application_info.uris[0]="https://www.example.org/job-posting/123" + - jobs[0].addresses[0]="1600 Amphitheatre Parkway, Mountain View, CA 94043" + - jobs[0].language_code="en-US" + - jobs[1].company="Company name, e.g. projects/your-project/companies/company-id" + - jobs[1].requisition_id="Job requisition ID, aka Posting ID. Unique per job." + - jobs[1].title="Quality Assurance" + - jobs[1].description="This is a description of this wonderful job!" + - jobs[1].application_info.uris[0]="https://www.example.org/job-posting/123" + - jobs[1].addresses[0]="111 8th Avenue, New York, NY 10011" + - jobs[1].language_code="en-US" + attributes: + - parameter: parent%project + sample_argument_name: project_id + description: Your Google Cloud Project ID + - parameter: parent%tenant + sample_argument_name: tenant_id + description: Identifier of the Tenant + - parameter: jobs[0].company + sample_argument_name: company_name_one + - parameter: jobs[0].requisition_id + sample_argument_name: requisition_id_one + - parameter: jobs[0].title + sample_argument_name: title_one + - parameter: jobs[0].description + sample_argument_name: description_one + - parameter: jobs[0].application_info.uris[0] + sample_argument_name: job_application_url_one + - parameter: jobs[0].addresses[0] + sample_argument_name: address_one + - parameter: jobs[0].language_code + sample_argument_name: language_code_one + - parameter: jobs[1].company + sample_argument_name: company_name_two + - parameter: jobs[1].requisition_id + sample_argument_name: requisition_id_two + - parameter: jobs[1].title + sample_argument_name: title_two + - parameter: jobs[1].description + sample_argument_name: description_two + - parameter: jobs[1].application_info.uris[0] + sample_argument_name: job_application_url_two + - parameter: jobs[1].addresses[0] + sample_argument_name: address_two + - parameter: jobs[1].language_code + sample_argument_name: language_code_two + on_success: + - print: + - "Batch response: %s" + - $resp + - name: BatchUpdateJobs + flattening: + groups: + - parameters: + - parent + - jobs + required_fields: + - parent + - jobs + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: tenant + long_running: + return_type: google.cloud.talent.v4beta1.JobOperationResult + metadata_type: google.cloud.talent.v4beta1.BatchOperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 30000 + samples: + standalone: + - value_sets: [job_search_batch_update_jobs] + region_tag: job_search_batch_update_jobs + sample_value_sets: + - id: job_search_batch_update_jobs + description: Batch Update Jobs + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - parent%tenant="Your Tenant ID (using tenancy is optional)" + ## # Currently cannot generate code which uses the helper methods to generate + ## # the company name using the projectId and companyId. Instead the user + ## # has to provide the full projects/X/companies/Y string path. + ## # See: https://github.com/googleapis/gapic-generator/issues/2621 + # - job.company.project%project="Your Google Cloud Project ID" + # - job.company.company%company="Company ID" + - jobs[0].name = "job name, e.g. projects/your-project/tenants/tenant-id/jobs/job-id" + - jobs[0].company="Company name, e.g. projects/your-project/companies/company-id" + - jobs[0].requisition_id="Job requisition ID, aka Posting ID. Unique per job." + - jobs[0].title="Software Engineer" + - jobs[0].description="This is a description of this wonderful job!" + - jobs[0].application_info.uris[0]="https://www.example.org/job-posting/123" + - jobs[0].addresses[0]="1600 Amphitheatre Parkway, Mountain View, CA 94043" + - jobs[0].language_code="en-US" + - jobs[1].name = "job name, e.g. projects/your-project/tenants/tenant-id/jobs/job-id" + - jobs[1].company="Company name, e.g. projects/your-project/companies/company-id" + - jobs[1].requisition_id="Job requisition ID, aka Posting ID. Unique per job." + - jobs[1].title="Quality Assurance" + - jobs[1].description="This is a description of this wonderful job!" + - jobs[1].application_info.uris[0]="https://www.example.org/job-posting/123" + - jobs[1].addresses[0]="111 8th Avenue, New York, NY 10011" + - jobs[1].language_code="en-US" + attributes: + - parameter: parent%project + sample_argument_name: project_id + description: Your Google Cloud Project ID + - parameter: parent%tenant + sample_argument_name: tenant_id + description: Identifier of the Tenant + - parameter: jobs[0].name + sample_argument_name: job_name_one + - parameter: jobs[0].company + sample_argument_name: company_name_one + - parameter: jobs[0].requisition_id + sample_argument_name: requisition_id_one + - parameter: jobs[0].title + sample_argument_name: title_one + - parameter: jobs[0].description + sample_argument_name: description_one + - parameter: jobs[0].application_info.uris[0] + sample_argument_name: job_application_url_one + - parameter: jobs[0].addresses[0] + sample_argument_name: address_one + - parameter: jobs[0].language_code + sample_argument_name: language_code_one + - parameter: jobs[1].name + sample_argument_name: job_name_two + - parameter: jobs[1].company + sample_argument_name: company_name_two + - parameter: jobs[1].requisition_id + sample_argument_name: requisition_id_two + - parameter: jobs[1].title + sample_argument_name: title_two + - parameter: jobs[1].description + sample_argument_name: description_two + - parameter: jobs[1].application_info.uris[0] + sample_argument_name: job_application_url_two + - parameter: jobs[1].addresses[0] + sample_argument_name: address_two + - parameter: jobs[1].language_code + sample_argument_name: language_code_two + on_success: + - print: + - "Batch response: %s" + - $resp +# The fully qualified name of the API interface. +- name: google.cloud.talent.v4beta1.ProfileService + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListProfiles + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: profiles + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: tenant + timeout_millis: 30000 + - name: CreateProfile + flattening: + groups: + - parameters: + - parent + - profile + required_fields: + - parent + - profile + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: tenant + timeout_millis: 30000 + - name: GetProfile + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: profile + timeout_millis: 30000 + - name: UpdateProfile + flattening: + groups: + - parameters: + - profile + required_fields: + - profile + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + profile.name: profile + timeout_millis: 30000 + - name: DeleteProfile + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: profile + timeout_millis: 30000 + - name: SearchProfiles + required_fields: + - parent + - request_metadata + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: summarized_profiles + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: tenant + timeout_millis: 30000 +# The fully qualified name of the API interface. +- name: google.cloud.talent.v4beta1.TenantService + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 300000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateTenant + flattening: + groups: + - parameters: + - parent + - tenant + required_fields: + - parent + - tenant + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + samples: + standalone: + - value_sets: [job_search_create_tenant] + region_tag: job_search_create_tenant + sample_value_sets: + - id: job_search_create_tenant + description: Create Tenant for scoping resources, e.g. companies and jobs + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - tenant.external_id="Your Unique Identifier for Tenant" + attributes: + - parameter: parent%project + sample_argument_name: project_id + - parameter: tenant.external_id + sample_argument_name: external_id + on_success: + - print: ["Created Tenant"] + - print: ["Name: %s", $resp.name] + - print: ["External ID: %s", $resp.external_id] + - name: GetTenant + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: tenant + timeout_millis: 30000 + samples: + standalone: + - value_sets: [job_search_get_tenant] + region_tag: job_search_get_tenant + sample_value_sets: + - id: job_search_get_tenant + description: Get Tenant by name + parameters: + defaults: + - name%project="Your Google Cloud Project ID" + - name%tenant="Your Tenant ID" + attributes: + - parameter: name%project + sample_argument_name: project_id + - parameter: name%tenant + sample_argument_name: tenant_id + on_success: + - print: ["Name: %s", $resp.name] + - print: ["External ID: %s", $resp.external_id] + - name: UpdateTenant + flattening: + groups: + - parameters: + - tenant + required_fields: + - tenant + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + tenant.name: tenant + timeout_millis: 30000 + - name: DeleteTenant + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: tenant + timeout_millis: 30000 + samples: + standalone: + - value_sets: [job_search_delete_tenant] + region_tag: job_search_delete_tenant + sample_value_sets: + - id: job_search_delete_tenant + description: Delete Tenant + parameters: + defaults: + - name%project="Your Google Cloud Project ID" + - name%tenant="Your Tenant ID)" + attributes: + - parameter: name%project + sample_argument_name: project_id + - parameter: name%tenant + sample_argument_name: tenant_id + on_success: + - print: ["Deleted Tenant."] + - name: ListTenants + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: tenants + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + samples: + standalone: + - value_sets: [job_search_list_tenants] + region_tag: job_search_list_tenants + sample_value_sets: + - id: job_search_list_tenants + description: List Tenants + parameters: + defaults: + - parent%project="Your Google Cloud Project ID" + - parent%tenant="Your Tenant ID" + attributes: + - parameter: parent%project + sample_argument_name: project_id + on_success: + - print: ["Tenant Name: %s", $resp.name] + - print: ["External ID: %s", $resp.external_id] +resource_name_generation: +- message_name: Application + field_entity_map: + name: application +- message_name: CreateApplicationRequest + field_entity_map: + parent: profile +- message_name: GetApplicationRequest + field_entity_map: + name: application +- message_name: DeleteApplicationRequest + field_entity_map: + name: application +- message_name: ListApplicationsRequest + field_entity_map: + parent: profile +- message_name: Company + field_entity_map: + name: company_oneof +- message_name: CreateCompanyRequest + field_entity_map: + parent: tenant_or_project +- message_name: GetCompanyRequest + field_entity_map: + name: company_oneof +- message_name: DeleteCompanyRequest + field_entity_map: + name: company_oneof +- message_name: ListCompaniesRequest + field_entity_map: + parent: tenant_or_project +- message_name: CompleteQueryRequest + field_entity_map: + parent: tenant_or_project + company: company_oneof +- message_name: CreateClientEventRequest + field_entity_map: + parent: tenant_or_project +- message_name: Job + field_entity_map: + name: job_oneof + company: company_oneof +- message_name: CreateJobRequest + field_entity_map: + parent: tenant_or_project + job.company: company_oneof +- message_name: GetJobRequest + field_entity_map: + name: job_oneof +- message_name: DeleteJobRequest + field_entity_map: + name: job_oneof +- message_name: ListJobsRequest + field_entity_map: + parent: tenant_or_project +- message_name: BatchDeleteJobsRequest + field_entity_map: + parent: tenant_or_project +- message_name: SearchJobsRequest + field_entity_map: + parent: tenant_or_project +- message_name: SearchJobsForAlertRequest + field_entity_map: + parent: tenant_or_project +- message_name: Profile + field_entity_map: + name: profile +- message_name: CreateProfileRequest + field_entity_map: + parent: tenant +- message_name: GetProfileRequest + field_entity_map: + name: profile +- message_name: DeleteProfileRequest + field_entity_map: + name: profile +- message_name: ListProfilesRequest + field_entity_map: + parent: tenant +- message_name: SearchProfilesRequest + field_entity_map: + parent: tenant +- message_name: Tenant + field_entity_map: + name: tenant +- message_name: CreateTenantRequest + field_entity_map: + parent: project +- message_name: GetTenantRequest + field_entity_map: + name: tenant +- message_name: DeleteTenantRequest + field_entity_map: + name: tenant +- message_name: ListTenantsRequest + field_entity_map: + parent: project diff --git a/google/cloud/talent/v4beta1/talent_gapic.yaml b/google/cloud/talent/v4beta1/talent_gapic.yaml index d21ea292f..c58dc701e 100644 --- a/google/cloud/talent/v4beta1/talent_gapic.yaml +++ b/google/cloud/talent/v4beta1/talent_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -17,1546 +17,48 @@ language_settings: nodejs: package_name: talent.v4beta1 domain_layer_location: google-cloud -# A list of resource collection configurations. -# Consists of a name_pattern and an entity_name. -# The name_pattern is a pattern to describe the names of the resources of this -# collection, using the platform's conventions for URI patterns. A generator -# may use this to generate methods to compose and decompose such names. The -# pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; -# those will be taken as hints for the parameter names of the generated -# methods. If empty, no name methods are generated. -# The entity_name is the name to be used as a basis for generated methods and -# classes. -collections: -- name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName -- name_pattern: projects/{project}/companies/{company} - entity_name: company_without_tenant -- name_pattern: projects/{project}/tenants/{tenant}/companies/{company} - entity_name: company - # Override on Java, or we'll get an exception caused by conflicting with company_oneof: - # "CompanyName.java: Tried to write the same file twice". - language_overrides: - - language: java - entity_name: company_with_tenant -- name_pattern: projects/{project}/jobs/{jobs} - entity_name: job_without_tenant -- name_pattern: projects/{project}/tenants/{tenant}/jobs/{jobs} - entity_name: job - # Override on Java, or we'll get an exception caused by conflicting with job_oneof: - # "JobName.java: Tried to write the same file twice". - language_overrides: - - language: java - entity_name: job_with_tenant -- name_pattern: projects/{project}/tenants/{tenant}/profiles/{profile} - entity_name: profile -- name_pattern: projects/{project}/tenants/{tenant}/profiles/{profile}/applications/{application} - entity_name: application -- name_pattern: projects/{project}/tenants/{tenant} - entity_name: tenant - -collection_oneofs: -- oneof_name: company_oneof - collection_names: - - company - - company_without_tenant -- oneof_name: job_oneof - collection_names: - - job - - job_without_tenant -- oneof_name: tenant_or_project - collection_names: - - tenant - - project - # A list of API interface configurations. interfaces: -# The fully qualified name of the API interface. - name: google.cloud.talent.v4beta1.ApplicationService - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: CreateApplication - flattening: - groups: - - parameters: - - parent - - application - required_fields: - - parent - - application - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: profile - timeout_millis: 30000 - - name: GetApplication - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: application - timeout_millis: 30000 - - name: UpdateApplication - flattening: - groups: - - parameters: - - application - required_fields: - - application - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - application.name: application - timeout_millis: 30000 - name: DeleteApplication - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: application - timeout_millis: 30000 - - name: ListApplications - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: applications - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: profile - timeout_millis: 30000 -# The fully qualified name of the API interface. - name: google.cloud.talent.v4beta1.CompanyService - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. + deprecated_collections: + - name_pattern: projects/{project}/companies/{company} + entity_name: company_without_tenant + - name_pattern: projects/{project}/tenants/{tenant}/companies/{company} + entity_name: company methods: - - name: CreateCompany - samples: - standalone: - - value_sets: [job_search_create_company] - region_tag: job_search_create_company - sample_value_sets: - - id: job_search_create_company - description: Create Company - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - parent%tenant="Your Tenant ID (using tenancy is optional)" - - company.display_name="My Company Name" - - company.external_id="Identifier of this company in my system" - attributes: - - parameter: parent%project - sample_argument_name: project_id - description: Your Google Cloud Project ID - - parameter: parent%tenant - sample_argument_name: tenant_id - description: Identifier of the Tenant - - parameter: company.display_name - sample_argument_name: display_name - - parameter: company.external_id - sample_argument_name: external_id - on_success: - - print: ["Created Company"] - - print: ["Name: %s", $resp.name] - - print: ["Display Name: %s", $resp.display_name] - - print: ["External ID: %s", $resp.external_id] - flattening: - groups: - - parameters: - - parent - - company - required_fields: - - parent - - company - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: tenant_or_project - timeout_millis: 30000 - - name: GetCompany - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: company_oneof - timeout_millis: 30000 - samples: - standalone: - - value_sets: [job_search_get_company] - region_tag: job_search_get_company - sample_value_sets: - - id: job_search_get_company - description: Get Company - parameters: - defaults: - - name%project="Your Google Cloud Project ID" - - name%tenant="Your Tenant ID (using tenancy is optional)" - - name%company="Company ID" - attributes: - - parameter: name%project - sample_argument_name: project_id - - parameter: name%tenant - sample_argument_name: tenant_id - - parameter: name%company - sample_argument_name: company_id - on_success: - - print: ["Company name: %s", $resp.name] - - print: ["Display name: %s", $resp.display_name] - - name: UpdateCompany - flattening: - groups: - - parameters: - - company - required_fields: - - company - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - company.name: company_oneof - timeout_millis: 30000 - name: DeleteCompany - samples: - standalone: - - value_sets: [job_search_delete_company] - region_tag: job_search_delete_company - sample_value_sets: - - id: job_search_delete_company - description: Delete Company - parameters: - defaults: - - name%project="Your Google Cloud Project ID" - - name%tenant="Your Tenant ID (using tenancy is optional)" - - name%company="ID of the company to delete" - attributes: - - parameter: name%project - sample_argument_name: project_id - - parameter: name%tenant - sample_argument_name: tenant_id - - parameter: name%company - sample_argument_name: company_id - on_success: - - print: ["Deleted company"] - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: company_oneof - timeout_millis: 30000 - - name: ListCompanies - samples: - standalone: - - value_sets: [job_search_list_companies] - region_tag: job_search_list_companies - sample_value_sets: - - id: job_search_list_companies - description: List Companies - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - parent%tenant="Your Tenant ID (using tenancy is optional)" - attributes: - - parameter: parent%project - sample_argument_name: project_id - description: Your Google Cloud Project ID - - parameter: parent%tenant - sample_argument_name: tenant_id - description: Identifier of the Tenant - on_success: - - print: ["Company Name: %s", $resp.name] - - print: ["Display Name: %s", $resp.display_name] - - print: ["External ID: %s", $resp.external_id] - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: companies - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: tenant_or_project - timeout_millis: 30000 # The fully qualified name of the API interface. - name: google.cloud.talent.v4beta1.Completion - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. + deprecated_collections: + - name_pattern: projects/{project}/companies/{company} + entity_name: company_without_tenant + - name_pattern: projects/{project}/tenants/{tenant}/companies/{company} + entity_name: company methods: - name: CompleteQuery - required_fields: - - parent - - query - - page_size - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: tenant_or_project - company: company_oneof - timeout_millis: 30000 - samples: - standalone: - - value_sets: [job_search_autocomplete_job_title] - region_tag: job_search_autocomplete_job_title - sample_value_sets: - - id: job_search_autocomplete_job_title - description: Complete job title given partial text (autocomplete) - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - parent%tenant="Your Tenant ID (using tenancy is optional)" - - query="[partially typed job title]" - - page_size=5 - - language_codes[0]="en-US" - attributes: - - parameter: parent%project - sample_argument_name: project_id - description: Your Google Cloud Project ID - - parameter: parent%tenant - sample_argument_name: tenant_id - description: Identifier of the Tenantd - - parameter: query - sample_argument_name: query - - parameter: page_size - sample_argument_name: num_results - - parameter: language_codes[0] - sample_argument_name: language_code - on_success: - - loop: - collection: $resp.completion_results - variable: result - body: - - print: ["Suggested title: %s", result.suggestion] - - comment: ["Suggestion type is JOB_TITLE or COMPANY_TITLE"] - - print: ["Suggestion type: %s", result.type] - -# The fully qualified name of the API interface. - name: google.cloud.talent.v4beta1.EventService - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: CreateClientEvent - flattening: - groups: - - parameters: - - parent - - client_event - required_fields: - - parent - - client_event - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: tenant_or_project - timeout_millis: 30000 - samples: - standalone: - - value_sets: [job_search_create_client_event] - region_tag: job_search_create_client_event - sample_value_sets: - - id: job_search_create_client_event - description: Creates a client event - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - parent%tenant="Your Tenant ID (using tenancy is optional)" - - client_event.request_id="[request_id from ResponseMetadata]" - - client_event.event_id="[Set this to a unique identifier]" - # https://github.com/googleapis/gapic-generator/issues/2762 - # - client_event.create_time="1972-01-01T10:00:20.021Z" - - client_event.create_time.seconds=0 - - client_event.job_event.type=VIEW - - client_event.job_event.jobs[0]="projects/[Project ID]/tenants/[Tenant ID]/jobs/[Job ID]" - - client_event.job_event.jobs[1]="projects/[Project ID]/tenants/[Tenant ID]/jobs/[Job ID]" - attributes: - - parameter: parent%project - sample_argument_name: project_id - description: Your Google Cloud Project ID - - parameter: parent%tenant - sample_argument_name: tenant_id - description: Identifier of the Tenant - - parameter: client_event.request_id - sample_argument_name: request_id - description: | - A unique ID generated in the API responses. - Value should be set to the request_id from an API response. - - parameter: client_event.event_id - sample_argument_name: event_id - description: A unique identifier, generated by the client application - - parameter: client_event.create_time.seconds - description: | - The timestamp of the event as seconds of UTC time since Unix epoch - For more information on how to create google.protobuf.Timestamps - See: https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/timestamp.proto - - parameter: client_event.job_event.type - description: The type of event attributed to the behavior of the end user - - parameter: client_event.job_event.jobs[0] - description: List of job names associated with this event - on_success: - - print: ["Created client event"] -# The fully qualified name of the API interface. - name: google.cloud.talent.v4beta1.JobService - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. + deprecated_collections: + - name_pattern: projects/{project}/jobs/{job} + entity_name: job_without_tenant + - name_pattern: projects/{project}/tenants/{tenant}/jobs/{job} + entity_name: job methods: - - name: CreateJob - flattening: - groups: - - parameters: - - parent - - job - required_fields: - - parent - - job - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: tenant_or_project - job.company: company_oneof - timeout_millis: 30000 - samples: - standalone: - - value_sets: [job_search_create_job] - region_tag: job_search_create_job - - value_sets: [job_search_create_job_custom_attributes] - region_tag: job_search_create_job_custom_attributes - sample_value_sets: - - id: job_search_create_job - description: Create Job - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - parent%tenant="Your Tenant ID (using tenancy is optional)" - ## # Currently cannot generate code which uses the helper methods to generate - ## # the company name using the projectId and companyId. Instead the user - ## # has to provide the full projects/X/companies/Y string path. - ## # See: https://github.com/googleapis/gapic-generator/issues/2621 - # - job.company.project%project="Your Google Cloud Project ID" - # - job.company.company%company="Company ID" - - job.company="Company name, e.g. projects/your-project/companies/company-id" - ## - - job.requisition_id="Job requisition ID, aka Posting ID. Unique per job." - - job.title="Software Engineer" - - job.description="This is a description of this wonderful job!" - - job.application_info.uris[0]="https://www.example.org/job-posting/123" - - job.addresses[0]="1600 Amphitheatre Parkway, Mountain View, CA 94043" - - job.addresses[1]="111 8th Avenue, New York, NY 10011" - - job.language_code="en-US" - attributes: - - parameter: parent%project - sample_argument_name: project_id - description: Your Google Cloud Project ID - - parameter: parent%tenant - sample_argument_name: tenant_id - description: Identifier of the Tenant - - parameter: job.company - sample_argument_name: company_name - - parameter: job.requisition_id - sample_argument_name: requisition_id - - parameter: job.title - sample_argument_name: title - - parameter: job.description - sample_argument_name: description - - parameter: job.application_info.uris[0] - sample_argument_name: job_application_url - - parameter: job.addresses[0] - sample_argument_name: address_one - - parameter: job.addresses[1] - sample_argument_name: address_two - - parameter: job.language_code - sample_argument_name: language_code - on_success: - - print: - - "Created job: %s" - - $resp.name - - id: job_search_create_job_custom_attributes - description: Create Job with Custom Attributes - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - parent%tenant="Your Tenant ID (using tenancy is optional)" - - job.company="Company name, e.g. projects/your-project/companies/company-id" - - job.requisition_id="Job requisition ID, aka Posting ID. Unique per job." - - job.language_code="en-US" - # - custom_attributes["my_attribute"][0]="My attribute value" - attributes: - - parameter: parent%project - sample_argument_name: project_id - description: Your Google Cloud Project ID - - parameter: parent%tenant - sample_argument_name: tenant_id - description: Identifier of the Tenantd - - parameter: job.company - sample_argument_name: company_name - - parameter: job.requisition_id - sample_argument_name: requisition_id - - parameter: job.language_code - sample_argument_name: language_code - on_success: - - print: - - "Created job: %s" - - $resp.name - - name: GetJob - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: job_oneof - timeout_millis: 30000 - samples: - standalone: - - value_sets: [job_search_get_job] - region_tag: job_search_get_job - sample_value_sets: - - id: job_search_get_job - description: Get Job - parameters: - defaults: - - name%project="Your Google Cloud Project ID" - - name%tenant="Your Tenant ID (using tenancy is optional)" - - name%jobs="Job ID" - attributes: - - parameter: name%project - sample_argument_name: project_id - - parameter: name%tenant - sample_argument_name: tenant_id - - parameter: name%jobs - sample_argument_name: job_id - on_success: - - print: ["Job name: %s", $resp.name] - - print: ["Requisition ID: %s", $resp.requisition_id] - - print: ["Title: %s", $resp.title] - - print: ["Description: %s", $resp.description] - - print: ["Posting language: %s", $resp.language_code] - - loop: - collection: $resp.addresses - variable: address - body: - - print: ["Address: %s", address] - - loop: - collection: $resp.application_info.emails - variable: email - body: - - print: ["Email: %s", email] - - loop: - collection: $resp.application_info.uris - variable: website_uri - body: - - print: ["Website: %s", website_uri] - - name: UpdateJob - flattening: - groups: - - parameters: - - job - required_fields: - - job - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - job.name: job_oneof - job.company: company_oneof - timeout_millis: 30000 - name: DeleteJob - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: job_oneof - timeout_millis: 30000 - samples: - standalone: - - value_sets: [job_search_delete_job] - region_tag: job_search_delete_job - sample_value_sets: - - id: job_search_delete_job - description: Delete Job - parameters: - defaults: - - name%project="Your Google Cloud Project ID" - - name%tenant="Your Tenant ID (using tenancy is optional)" - - name%jobs="Company ID" - attributes: - - parameter: name%project - sample_argument_name: project_id - - parameter: name%tenant - sample_argument_name: tenant_id - - parameter: name%jobs - sample_argument_name: job_id - on_success: - - print: - - "Deleted job." - - name: ListJobs - samples: - standalone: - - value_sets: [job_search_list_jobs] - region_tag: job_search_list_jobs - sample_value_sets: - - id: job_search_list_jobs - description: List Jobs - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - parent%tenant="Your Tenant ID (using tenancy is optional)" - - filter="companyName=projects/my-project/companies/company-id" - attributes: - - parameter: parent%project - sample_argument_name: project_id - description: Your Google Cloud Project ID - - parameter: parent%tenant - sample_argument_name: tenant_id - description: Identifier of the Tenant - - parameter: filter - sample_argument_name: filter - on_success: - - print: - - "Job name: %s" - - $resp.name - - print: - - "Job requisition ID: %s" - - $resp.requisition_id - - print: - - "Job title: %s" - - $resp.title - - print: - - "Job description: %s" - - $resp.description - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - - parent - - filter - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: jobs - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: tenant_or_project - timeout_millis: 30000 - - name: BatchDeleteJobs - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - - parent - - filter - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: tenant_or_project - timeout_millis: 30000 - samples: - standalone: - - value_sets: [job_search_batch_delete_job] - region_tag: job_search_batch_delete_job - sample_value_sets: - - id: job_search_batch_delete_job - description: Batch delete jobs using a filter - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - parent%tenant="Your Tenant ID (using tenancy is optional)" - - filter="[Query]" - attributes: - - parameter: parent%project - sample_argument_name: project_id - description: Your Google Cloud Project ID - - parameter: parent%tenant - sample_argument_name: tenant_id - description: Identifier of the Tenantd - - parameter: filter - sample_argument_name: filter - description: | - The filter string specifies the jobs to be deleted. - For example: - companyName = "projects/api-test-project/companies/123" AND equisitionId = "req-1" - on_success: - - print: ["Batch deleted jobs from filter"] - - name: SearchJobs - required_fields: - - parent - - request_metadata - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: matching_jobs - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: tenant_or_project - timeout_millis: 30000 - samples: - standalone: - - value_sets: [job_search_custom_ranking_search] - region_tag: job_search_custom_ranking_search - - value_sets: [job_search_commute_search] - region_tag: job_search_commute_search - - value_sets: [job_search_histogram_search] - region_tag: job_search_histogram_search - sample_value_sets: - - id: job_search_custom_ranking_search - description: Search Jobs using custom rankings - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - parent%tenant="Your Tenant ID (using tenancy is optional)" - # - job_query.company_names[0]="projects/[Project ID]/companies/[Company ID]" - - request_metadata.domain="www.example.com" - - request_metadata.session_id="Hashed session identifier" - - request_metadata.user_id="Hashed user identifier" - - custom_ranking_info.importance_level=EXTREME - - custom_ranking_info.ranking_expression="(someFieldLong + 25) * 0.25" - - order_by="custom_ranking desc" - attributes: - - parameter: parent%project - sample_argument_name: project_id - description: Your Google Cloud Project ID - - parameter: parent%tenant - sample_argument_name: tenant_id - description: Identifier of the Tenantd - on_success: - - print: ["Job summary: %s", $resp.job_summary] - - print: ["Job title snippet: %s", $resp.job_title_snippet] - - define: job=$resp.job - - print: ["Job name: %s", job.name] - - print: ["Job title: %s", job.title] - - id: job_search_commute_search - description: Search Jobs using commute distance - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - parent%tenant="Your Tenant ID (using tenancy is optional)" - # - job_query.company_names[0]="projects/[Project ID]/companies/[Company ID]" - - request_metadata.domain="www.example.com" - - request_metadata.session_id="Hashed session identifier" - - request_metadata.user_id="Hashed user identifier" - - job_query.commute_filter.commute_method=TRANSIT - # 30 minutes - - job_query.commute_filter.travel_duration.seconds=1800 - - job_query.commute_filter.start_coordinates.latitude=37.422408 - - job_query.commute_filter.start_coordinates.longitude=-122.084068 - attributes: - - parameter: parent%project - sample_argument_name: project_id - - parameter: parent%tenant - sample_argument_name: tenant_id - on_success: - - print: ["Job summary: %s", $resp.job_summary] - - print: ["Job title snippet: %s", $resp.job_title_snippet] - - define: job=$resp.job - - print: ["Job name: %s", job.name] - - print: ["Job title: %s", job.title] - - id: job_search_histogram_search - description: Search Jobs with histogram queries - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - parent%tenant="Your Tenant ID (using tenancy is optional)" - - request_metadata.domain="www.example.com" - - request_metadata.session_id="Hashed session identifier" - - request_metadata.user_id="Hashed user identifier" - - histogram_queries[0].histogram_query="count(base_compensation, [bucket(12, 20)])" - attributes: - - parameter: parent%project - sample_argument_name: project_id - - parameter: parent%tenant - sample_argument_name: tenant_id - - parameter: histogram_queries[0].histogram_query - sample_argument_name: query - description: | - Histogram query - More info on histogram facets, constants, and built-in functions: - https://godoc.org/google.golang.org/genproto/googleapis/cloud/talent/v4beta1#SearchJobsRequest - on_success: - - print: ["Job summary: %s", $resp.job_summary] - - print: ["Job title snippet: %s", $resp.job_title_snippet] - - define: job=$resp.job - - print: ["Job name: %s", job.name] - - print: ["Job title: %s", job.title] - - name: SearchJobsForAlert - required_fields: - - parent - - request_metadata - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: matching_jobs - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: tenant_or_project - timeout_millis: 30000 - - name: BatchCreateJobs - flattening: - groups: - - parameters: - - parent - - jobs - required_fields: - - parent - - jobs - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: tenant - long_running: - return_type: google.cloud.talent.v4beta1.JobOperationResult - metadata_type: google.cloud.talent.v4beta1.BatchOperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 60000 - samples: - standalone: - - value_sets: [job_search_batch_create_jobs] - region_tag: job_search_batch_create_jobs - sample_value_sets: - - id: job_search_batch_create_jobs - description: Batch Create Jobs - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - parent%tenant="Your Tenant ID (using tenancy is optional)" - ## # Currently cannot generate code which uses the helper methods to generate - ## # the company name using the projectId and companyId. Instead the user - ## # has to provide the full projects/X/companies/Y string path. - ## # See: https://github.com/googleapis/gapic-generator/issues/2621 - # - job.company.project%project="Your Google Cloud Project ID" - # - job.company.company%company="Company ID" - - jobs[0].company="Company name, e.g. projects/your-project/companies/company-id" - - jobs[0].requisition_id="Job requisition ID, aka Posting ID. Unique per job." - - jobs[0].title="Software Engineer" - - jobs[0].description="This is a description of this wonderful job!" - - jobs[0].application_info.uris[0]="https://www.example.org/job-posting/123" - - jobs[0].addresses[0]="1600 Amphitheatre Parkway, Mountain View, CA 94043" - - jobs[0].language_code="en-US" - - jobs[1].company="Company name, e.g. projects/your-project/companies/company-id" - - jobs[1].requisition_id="Job requisition ID, aka Posting ID. Unique per job." - - jobs[1].title="Quality Assurance" - - jobs[1].description="This is a description of this wonderful job!" - - jobs[1].application_info.uris[0]="https://www.example.org/job-posting/123" - - jobs[1].addresses[0]="111 8th Avenue, New York, NY 10011" - - jobs[1].language_code="en-US" - attributes: - - parameter: parent%project - sample_argument_name: project_id - description: Your Google Cloud Project ID - - parameter: parent%tenant - sample_argument_name: tenant_id - description: Identifier of the Tenant - - parameter: jobs[0].company - sample_argument_name: company_name_one - - parameter: jobs[0].requisition_id - sample_argument_name: requisition_id_one - - parameter: jobs[0].title - sample_argument_name: title_one - - parameter: jobs[0].description - sample_argument_name: description_one - - parameter: jobs[0].application_info.uris[0] - sample_argument_name: job_application_url_one - - parameter: jobs[0].addresses[0] - sample_argument_name: address_one - - parameter: jobs[0].language_code - sample_argument_name: language_code_one - - parameter: jobs[1].company - sample_argument_name: company_name_two - - parameter: jobs[1].requisition_id - sample_argument_name: requisition_id_two - - parameter: jobs[1].title - sample_argument_name: title_two - - parameter: jobs[1].description - sample_argument_name: description_two - - parameter: jobs[1].application_info.uris[0] - sample_argument_name: job_application_url_two - - parameter: jobs[1].addresses[0] - sample_argument_name: address_two - - parameter: jobs[1].language_code - sample_argument_name: language_code_two - on_success: - - print: - - "Batch response: %s" - - $resp - - name: BatchUpdateJobs - flattening: - groups: - - parameters: - - parent - - jobs - required_fields: - - parent - - jobs - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: tenant - long_running: - return_type: google.cloud.talent.v4beta1.JobOperationResult - metadata_type: google.cloud.talent.v4beta1.BatchOperationMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 60000 - samples: - standalone: - - value_sets: [job_search_batch_update_jobs] - region_tag: job_search_batch_update_jobs - sample_value_sets: - - id: job_search_batch_update_jobs - description: Batch Update Jobs - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - parent%tenant="Your Tenant ID (using tenancy is optional)" - ## # Currently cannot generate code which uses the helper methods to generate - ## # the company name using the projectId and companyId. Instead the user - ## # has to provide the full projects/X/companies/Y string path. - ## # See: https://github.com/googleapis/gapic-generator/issues/2621 - # - job.company.project%project="Your Google Cloud Project ID" - # - job.company.company%company="Company ID" - - jobs[0].name = "job name, e.g. projects/your-project/tenants/tenant-id/jobs/job-id" - - jobs[0].company="Company name, e.g. projects/your-project/companies/company-id" - - jobs[0].requisition_id="Job requisition ID, aka Posting ID. Unique per job." - - jobs[0].title="Software Engineer" - - jobs[0].description="This is a description of this wonderful job!" - - jobs[0].application_info.uris[0]="https://www.example.org/job-posting/123" - - jobs[0].addresses[0]="1600 Amphitheatre Parkway, Mountain View, CA 94043" - - jobs[0].language_code="en-US" - - jobs[1].name = "job name, e.g. projects/your-project/tenants/tenant-id/jobs/job-id" - - jobs[1].company="Company name, e.g. projects/your-project/companies/company-id" - - jobs[1].requisition_id="Job requisition ID, aka Posting ID. Unique per job." - - jobs[1].title="Quality Assurance" - - jobs[1].description="This is a description of this wonderful job!" - - jobs[1].application_info.uris[0]="https://www.example.org/job-posting/123" - - jobs[1].addresses[0]="111 8th Avenue, New York, NY 10011" - - jobs[1].language_code="en-US" - attributes: - - parameter: parent%project - sample_argument_name: project_id - description: Your Google Cloud Project ID - - parameter: parent%tenant - sample_argument_name: tenant_id - description: Identifier of the Tenant - - parameter: jobs[0].name - sample_argument_name: job_name_one - - parameter: jobs[0].company - sample_argument_name: company_name_one - - parameter: jobs[0].requisition_id - sample_argument_name: requisition_id_one - - parameter: jobs[0].title - sample_argument_name: title_one - - parameter: jobs[0].description - sample_argument_name: description_one - - parameter: jobs[0].application_info.uris[0] - sample_argument_name: job_application_url_one - - parameter: jobs[0].addresses[0] - sample_argument_name: address_one - - parameter: jobs[0].language_code - sample_argument_name: language_code_one - - parameter: jobs[1].name - sample_argument_name: job_name_two - - parameter: jobs[1].company - sample_argument_name: company_name_two - - parameter: jobs[1].requisition_id - sample_argument_name: requisition_id_two - - parameter: jobs[1].title - sample_argument_name: title_two - - parameter: jobs[1].description - sample_argument_name: description_two - - parameter: jobs[1].application_info.uris[0] - sample_argument_name: job_application_url_two - - parameter: jobs[1].addresses[0] - sample_argument_name: address_two - - parameter: jobs[1].language_code - sample_argument_name: language_code_two - on_success: - - print: - - "Batch response: %s" - - $resp # The fully qualified name of the API interface. - name: google.cloud.talent.v4beta1.ProfileService - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: ListProfiles - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: profiles - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: tenant - timeout_millis: 30000 - - name: CreateProfile - flattening: - groups: - - parameters: - - parent - - profile - required_fields: - - parent - - profile - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: tenant - timeout_millis: 30000 - - name: GetProfile - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: profile - timeout_millis: 30000 - - name: UpdateProfile - flattening: - groups: - - parameters: - - profile - required_fields: - - profile - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - profile.name: profile - timeout_millis: 30000 - name: DeleteProfile - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: profile - timeout_millis: 30000 - name: SearchProfiles - required_fields: - - parent - - request_metadata - resource_name_treatment: STATIC_TYPES page_streaming: request: page_size_field: page_size @@ -1564,22 +66,7 @@ interfaces: response: token_field: next_page_token resources_field: summarized_profiles - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: tenant - timeout_millis: 30000 -# The fully qualified name of the API interface. - name: google.cloud.talent.v4beta1.TenantService - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -1588,303 +75,7 @@ interfaces: initial_rpc_timeout_millis: 20000 rpc_timeout_multiplier: 1 max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. + total_timeout_millis: 300000 methods: - - name: CreateTenant - flattening: - groups: - - parameters: - - parent - - tenant - required_fields: - - parent - - tenant - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 30000 - samples: - standalone: - - value_sets: [job_search_create_tenant] - region_tag: job_search_create_tenant - sample_value_sets: - - id: job_search_create_tenant - description: Create Tenant for scoping resources, e.g. companies and jobs - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - tenant.external_id="Your Unique Identifier for Tenant" - attributes: - - parameter: parent%project - sample_argument_name: project_id - - parameter: tenant.external_id - sample_argument_name: external_id - on_success: - - print: ["Created Tenant"] - - print: ["Name: %s", $resp.name] - - print: ["External ID: %s", $resp.external_id] - - name: GetTenant - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: tenant - timeout_millis: 30000 - samples: - standalone: - - value_sets: [job_search_get_tenant] - region_tag: job_search_get_tenant - sample_value_sets: - - id: job_search_get_tenant - description: Get Tenant by name - parameters: - defaults: - - name%project="Your Google Cloud Project ID" - - name%tenant="Your Tenant ID" - attributes: - - parameter: name%project - sample_argument_name: project_id - - parameter: name%tenant - sample_argument_name: tenant_id - on_success: - - print: ["Name: %s", $resp.name] - - print: ["External ID: %s", $resp.external_id] - - name: UpdateTenant - flattening: - groups: - - parameters: - - tenant - required_fields: - - tenant - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - tenant.name: tenant - timeout_millis: 30000 - name: DeleteTenant - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: tenant - timeout_millis: 30000 - samples: - standalone: - - value_sets: [job_search_delete_tenant] - region_tag: job_search_delete_tenant - sample_value_sets: - - id: job_search_delete_tenant - description: Delete Tenant - parameters: - defaults: - - name%project="Your Google Cloud Project ID" - - name%tenant="Your Tenant ID)" - attributes: - - parameter: name%project - sample_argument_name: project_id - - parameter: name%tenant - sample_argument_name: tenant_id - on_success: - - print: ["Deleted Tenant."] - - name: ListTenants - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: tenants retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 30000 - samples: - standalone: - - value_sets: [job_search_list_tenants] - region_tag: job_search_list_tenants - sample_value_sets: - - id: job_search_list_tenants - description: List Tenants - parameters: - defaults: - - parent%project="Your Google Cloud Project ID" - - parent%tenant="Your Tenant ID" - attributes: - - parameter: parent%project - sample_argument_name: project_id - on_success: - - print: ["Tenant Name: %s", $resp.name] - - print: ["External ID: %s", $resp.external_id] -resource_name_generation: -- message_name: Application - field_entity_map: - name: application -- message_name: CreateApplicationRequest - field_entity_map: - parent: profile -- message_name: GetApplicationRequest - field_entity_map: - name: application -- message_name: DeleteApplicationRequest - field_entity_map: - name: application -- message_name: ListApplicationsRequest - field_entity_map: - parent: profile -- message_name: Company - field_entity_map: - name: company_oneof -- message_name: CreateCompanyRequest - field_entity_map: - parent: tenant_or_project -- message_name: GetCompanyRequest - field_entity_map: - name: company_oneof -- message_name: DeleteCompanyRequest - field_entity_map: - name: company_oneof -- message_name: ListCompaniesRequest - field_entity_map: - parent: tenant_or_project -- message_name: CompleteQueryRequest - field_entity_map: - parent: tenant_or_project - company: company_oneof -- message_name: CreateClientEventRequest - field_entity_map: - parent: tenant_or_project -- message_name: Job - field_entity_map: - name: job_oneof - company: company_oneof -- message_name: CreateJobRequest - field_entity_map: - parent: tenant_or_project - job.company: company_oneof -- message_name: GetJobRequest - field_entity_map: - name: job_oneof -- message_name: DeleteJobRequest - field_entity_map: - name: job_oneof -- message_name: ListJobsRequest - field_entity_map: - parent: tenant_or_project -- message_name: BatchDeleteJobsRequest - field_entity_map: - parent: tenant_or_project -- message_name: SearchJobsRequest - field_entity_map: - parent: tenant_or_project -- message_name: SearchJobsForAlertRequest - field_entity_map: - parent: tenant_or_project -- message_name: Profile - field_entity_map: - name: profile -- message_name: CreateProfileRequest - field_entity_map: - parent: tenant -- message_name: GetProfileRequest - field_entity_map: - name: profile -- message_name: DeleteProfileRequest - field_entity_map: - name: profile -- message_name: ListProfilesRequest - field_entity_map: - parent: tenant -- message_name: SearchProfilesRequest - field_entity_map: - parent: tenant -- message_name: Tenant - field_entity_map: - name: tenant -- message_name: CreateTenantRequest - field_entity_map: - parent: project -- message_name: GetTenantRequest - field_entity_map: - name: tenant -- message_name: DeleteTenantRequest - field_entity_map: - name: tenant -- message_name: ListTenantsRequest - field_entity_map: - parent: project diff --git a/google/cloud/talent/v4beta1/talent_grpc_service_config.json b/google/cloud/talent/v4beta1/talent_grpc_service_config.json new file mode 100755 index 000000000..55bd28e39 --- /dev/null +++ b/google/cloud/talent/v4beta1/talent_grpc_service_config.json @@ -0,0 +1,256 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.talent.v4beta1.TenantService", + "method": "GetTenant" + }, + { + "service": "google.cloud.talent.v4beta1.TenantService", + "method": "DeleteTenant" + }, + { + "service": "google.cloud.talent.v4beta1.TenantService", + "method": "ListTenants" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.talent.v4beta1.ApplicationService", + "method": "GetApplication" + }, + { + "service": "google.cloud.talent.v4beta1.ApplicationService", + "method": "DeleteApplication" + }, + { + "service": "google.cloud.talent.v4beta1.ApplicationService", + "method": "ListApplications" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.talent.v4beta1.EventService", + "method": "CreateClientEvent" + } + ], + "timeout": "30s" + }, + { + "name": [ + { + "service": "google.cloud.talent.v4beta1.JobService", + "method": "GetJob" + }, + { + "service": "google.cloud.talent.v4beta1.JobService", + "method": "DeleteJob" + }, + { + "service": "google.cloud.talent.v4beta1.JobService", + "method": "ListJobs" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.talent.v4beta1.ProfileService", + "method": "CreateProfile" + }, + { + "service": "google.cloud.talent.v4beta1.ProfileService", + "method": "UpdateProfile" + }, + { + "service": "google.cloud.talent.v4beta1.ProfileService", + "method": "SearchProfiles" + } + ], + "timeout": "30s" + }, + { + "name": [ + { + "service": "google.cloud.talent.v4beta1.JobService", + "method": "CreateJob" + }, + { + "service": "google.cloud.talent.v4beta1.JobService", + "method": "UpdateJob" + }, + { + "service": "google.cloud.talent.v4beta1.JobService", + "method": "BatchDeleteJobs" + }, + { + "service": "google.cloud.talent.v4beta1.JobService", + "method": "SearchJobs" + }, + { + "service": "google.cloud.talent.v4beta1.JobService", + "method": "SearchJobsForAlert" + }, + { + "service": "google.cloud.talent.v4beta1.JobService", + "method": "BatchCreateJobs" + }, + { + "service": "google.cloud.talent.v4beta1.JobService", + "method": "BatchUpdateJobs" + } + ], + "timeout": "30s" + }, + { + "name": [ + { + "service": "google.cloud.talent.v4beta1.ProfileService", + "method": "ListProfiles" + }, + { + "service": "google.cloud.talent.v4beta1.ProfileService", + "method": "GetProfile" + }, + { + "service": "google.cloud.talent.v4beta1.ProfileService", + "method": "DeleteProfile" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.talent.v4beta1.TenantService", + "method": "CreateTenant" + }, + { + "service": "google.cloud.talent.v4beta1.TenantService", + "method": "UpdateTenant" + } + ], + "timeout": "30s" + }, + { + "name": [ + { + "service": "google.cloud.talent.v4beta1.ApplicationService", + "method": "CreateApplication" + }, + { + "service": "google.cloud.talent.v4beta1.ApplicationService", + "method": "UpdateApplication" + } + ], + "timeout": "30s" + }, + { + "name": [ + { + "service": "google.cloud.talent.v4beta1.CompanyService", + "method": "CreateCompany" + }, + { + "service": "google.cloud.talent.v4beta1.CompanyService", + "method": "UpdateCompany" + } + ], + "timeout": "30s" + }, + { + "name": [ + { + "service": "google.cloud.talent.v4beta1.CompanyService", + "method": "GetCompany" + }, + { + "service": "google.cloud.talent.v4beta1.CompanyService", + "method": "DeleteCompany" + }, + { + "service": "google.cloud.talent.v4beta1.CompanyService", + "method": "ListCompanies" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.talent.v4beta1.Completion", + "method": "CompleteQuery" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/talent/v4beta1/tenant.proto b/google/cloud/talent/v4beta1/tenant.proto index 88deddeca..0328c143a 100644 --- a/google/cloud/talent/v4beta1/tenant.proto +++ b/google/cloud/talent/v4beta1/tenant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.talent.v4beta1; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; import "google/api/annotations.proto"; -import "google/cloud/talent/v4beta1/common.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; option java_multiple_files = true; @@ -31,6 +32,11 @@ option objc_class_prefix = "CTS"; // profiles. Customer may create multiple tenants to provide data isolation for // different groups. message Tenant { + option (google.api.resource) = { + type: "jobs.googleapis.com/Tenant" + pattern: "projects/{project}/tenants/{tenant}" + }; + // Enum that represents how user data owned by the tenant is used. enum DataUsageType { // Default value. @@ -51,27 +57,23 @@ message Tenant { // tenant is created. // // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenants/foo". + // "projects/foo/tenants/bar". string name = 1; - // Required. Client side tenant identifier, used to uniquely identify the - // tenant. + // Required. Client side tenant identifier, used to uniquely identify the tenant. // // The maximum number of allowed characters is 255. - string external_id = 2; + string external_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. Indicates whether data owned by this tenant may be used to - // provide product improvements across other tenants. + // Indicates whether data owned by this tenant may be used to provide product + // improvements across other tenants. // - // Defaults behavior is - // [DataUsageType.ISOLATED][google.cloud.talent.v4beta1.Tenant.DataUsageType.ISOLATED] - // if it's unset. + // Defaults behavior is [DataUsageType.ISOLATED][google.cloud.talent.v4beta1.Tenant.DataUsageType.ISOLATED] if it's unset. DataUsageType usage_type = 3; - // Optional. A list of keys of filterable - // [Profile.custom_attributes][google.cloud.talent.v4beta1.Profile.custom_attributes], - // whose corresponding `string_values` are used in keyword searches. Profiles - // with `string_values` under these specified field keys are returned if any + // A list of keys of filterable [Profile.custom_attributes][google.cloud.talent.v4beta1.Profile.custom_attributes], whose + // corresponding `string_values` are used in keyword searches. Profiles with + // `string_values` under these specified field keys are returned if any // of the values match the search keyword. Custom field values with // parenthesis, brackets and special symbols are not searchable as-is, // and must be surrounded by quotes. diff --git a/google/cloud/talent/v4beta1/tenant_service.proto b/google/cloud/talent/v4beta1/tenant_service.proto index 33b7f5384..3eb260d8a 100644 --- a/google/cloud/talent/v4beta1/tenant_service.proto +++ b/google/cloud/talent/v4beta1/tenant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,8 @@ package google.cloud.talent.v4beta1; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/talent/v4beta1/common.proto"; import "google/cloud/talent/v4beta1/tenant.proto"; import "google/protobuf/empty.proto"; @@ -43,6 +44,7 @@ service TenantService { post: "/v4beta1/{parent=projects/*}/tenants" body: "*" }; + option (google.api.method_signature) = "parent,tenant"; } // Retrieves specified tenant. @@ -50,6 +52,7 @@ service TenantService { option (google.api.http) = { get: "/v4beta1/{name=projects/*/tenants/*}" }; + option (google.api.method_signature) = "name"; } // Updates specified tenant. @@ -58,6 +61,7 @@ service TenantService { patch: "/v4beta1/{tenant.name=projects/*/tenants/*}" body: "*" }; + option (google.api.method_signature) = "tenant"; } // Deletes specified tenant. @@ -65,6 +69,7 @@ service TenantService { option (google.api.http) = { delete: "/v4beta1/{name=projects/*/tenants/*}" }; + option (google.api.method_signature) = "name"; } // Lists all tenants associated with the project. @@ -72,6 +77,7 @@ service TenantService { option (google.api.http) = { get: "/v4beta1/{parent=projects/*}/tenants" }; + option (google.api.method_signature) = "parent"; } } @@ -80,11 +86,16 @@ message CreateTenantRequest { // Required. Resource name of the project under which the tenant is created. // // The format is "projects/{project_id}", for example, - // "projects/api-test-project". - string parent = 1; + // "projects/foo". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Required. The tenant to be created. - Tenant tenant = 2; + Tenant tenant = 2 [(google.api.field_behavior) = REQUIRED]; } // Request for getting a tenant by name. @@ -92,28 +103,27 @@ message GetTenantRequest { // Required. The resource name of the tenant to be retrieved. // // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenants/foo". - string name = 1; + // "projects/foo/tenants/bar". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Tenant" + } + ]; } // Request for updating a specified tenant. message UpdateTenantRequest { - // Required. The tenant resource to replace the current resource in the - // system. - Tenant tenant = 1; + // Required. The tenant resource to replace the current resource in the system. + Tenant tenant = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional but strongly recommended for the best service - // experience. + // Strongly recommended for the best service experience. // - // If - // [update_mask][google.cloud.talent.v4beta1.UpdateTenantRequest.update_mask] - // is provided, only the specified fields in - // [tenant][google.cloud.talent.v4beta1.UpdateTenantRequest.tenant] are - // updated. Otherwise all the fields are updated. + // If [update_mask][google.cloud.talent.v4beta1.UpdateTenantRequest.update_mask] is provided, only the specified fields in + // [tenant][google.cloud.talent.v4beta1.UpdateTenantRequest.tenant] are updated. Otherwise all the fields are updated. // // A field mask to specify the tenant fields to be updated. Only - // top level fields of [Tenant][google.cloud.talent.v4beta1.Tenant] are - // supported. + // top level fields of [Tenant][google.cloud.talent.v4beta1.Tenant] are supported. google.protobuf.FieldMask update_mask = 2; } @@ -122,8 +132,13 @@ message DeleteTenantRequest { // Required. The resource name of the tenant to be deleted. // // The format is "projects/{project_id}/tenants/{tenant_id}", for example, - // "projects/api-test-project/tenants/foo". - string name = 1; + // "projects/foo/tenants/bar". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Tenant" + } + ]; } // List tenants for which the client has ACL visibility. @@ -131,19 +146,22 @@ message ListTenantsRequest { // Required. Resource name of the project under which the tenant is created. // // The format is "projects/{project_id}", for example, - // "projects/api-test-project". - string parent = 1; - - // Optional. The starting indicator from which to return results. + // "projects/foo". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // The starting indicator from which to return results. string page_token = 2; - // Optional. The maximum number of tenants to be returned, at most 100. + // The maximum number of tenants to be returned, at most 100. // Default is 100 if a non-positive number is provided. int32 page_size = 3; } -// Output only. -// // The List tenants response object. message ListTenantsResponse { // Tenants for the current client. diff --git a/google/cloud/tasks/BUILD.bazel b/google/cloud/tasks/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/cloud/tasks/BUILD.bazel +++ b/google/cloud/tasks/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/tasks/artman_cloudtasks_v2.yaml b/google/cloud/tasks/artman_cloudtasks_v2.yaml index f3af7e6d4..0ab0b07d5 100644 --- a/google/cloud/tasks/artman_cloudtasks_v2.yaml +++ b/google/cloud/tasks/artman_cloudtasks_v2.yaml @@ -3,13 +3,14 @@ common: api_version: v2 organization_name: google-cloud proto_deps: - - name: google-common-protos - - name: google-iam-v1 - proto_path: google/iam/v1 + - name: google-common-protos + - name: google-iam-v1 + proto_path: google/iam/v1 src_proto_paths: - v2 - service_yaml: cloudtasks_v2.yaml + service_yaml: v2/cloudtasks_v2.yaml gapic_yaml: v2/cloudtasks_gapic.yaml + proto_package: google.cloud.tasks.v2 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/tasks/artman_cloudtasks_v2beta2.yaml b/google/cloud/tasks/artman_cloudtasks_v2beta2.yaml index f19712010..7a8113feb 100644 --- a/google/cloud/tasks/artman_cloudtasks_v2beta2.yaml +++ b/google/cloud/tasks/artman_cloudtasks_v2beta2.yaml @@ -3,11 +3,12 @@ common: api_version: v2beta2 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v2beta2 - service_yaml: cloudtasks_v2beta2.yaml + service_yaml: v2beta2/cloudtasks_v2beta2.yaml gapic_yaml: v2beta2/cloudtasks_gapic.yaml + proto_package: google.cloud.tasks.v2beta2 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/tasks/artman_cloudtasks_v2beta3.yaml b/google/cloud/tasks/artman_cloudtasks_v2beta3.yaml index d72d92d8f..0335c5c43 100644 --- a/google/cloud/tasks/artman_cloudtasks_v2beta3.yaml +++ b/google/cloud/tasks/artman_cloudtasks_v2beta3.yaml @@ -3,13 +3,14 @@ common: api_version: v2beta3 organization_name: google-cloud proto_deps: - - name: google-common-protos - - name: google-iam-v1 - proto_path: google/iam/v1 + - name: google-common-protos + - name: google-iam-v1 + proto_path: google/iam/v1 src_proto_paths: - v2beta3 - service_yaml: cloudtasks_v2beta3.yaml + service_yaml: v2beta3/cloudtasks_v2beta3.yaml gapic_yaml: v2beta3/cloudtasks_gapic.yaml + proto_package: google.cloud.tasks.v2beta3 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/tasks/cloudtasks_v2beta2.yaml b/google/cloud/tasks/cloudtasks_v2beta2.yaml deleted file mode 100644 index 65a96d45c..000000000 --- a/google/cloud/tasks/cloudtasks_v2beta2.yaml +++ /dev/null @@ -1,71 +0,0 @@ -type: google.api.Service -config_version: 3 -name: cloudtasks.googleapis.com -title: Cloud Tasks API - -apis: -- name: google.cloud.tasks.v2beta2.CloudTasks - -enums: -- name: google.rpc.Code - -documentation: - summary: Manages the execution of large numbers of distributed requests. - overview: |- - Cloud Tasks manages the execution of large numbers of distributed requests. - - For more information, see https://cloud.google.com/tasks/. - -backend: - rules: - - selector: google.cloud.location.Locations.ListLocations - deadline: 10.0 - - selector: google.cloud.location.Locations.GetLocation - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.ListQueues - deadline: 15.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.GetQueue - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.CreateQueue - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.PauseQueue - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.GetIamPolicy - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.SetIamPolicy - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.TestIamPermissions - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.ListTasks - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.GetTask - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.CreateTask - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.DeleteTask - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.RenewLease - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.CancelLease - deadline: 10.0 - - selector: google.cloud.tasks.v2beta2.CloudTasks.RunTask - deadline: 10.0 - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/tasks/v2/BUILD.bazel b/google/cloud/tasks/v2/BUILD.bazel new file mode 100644 index 000000000..c91328995 --- /dev/null +++ b/google/cloud/tasks/v2/BUILD.bazel @@ -0,0 +1,378 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "tasks_proto", + srcs = [ + "cloudtasks.proto", + "queue.proto", + "target.proto", + "task.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "tasks_proto_with_info", + deps = [ + ":tasks_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "tasks_java_proto", + deps = [":tasks_proto"], +) + +java_grpc_library( + name = "tasks_java_grpc", + srcs = [":tasks_proto"], + deps = [":tasks_java_proto"], +) + +java_gapic_library( + name = "tasks_java_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2", + service_yaml = "cloudtasks_v2.yaml", + test_deps = [ + ":tasks_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":tasks_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "tasks_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.tasks.v2.CloudTasksClientTest", + ], + runtime_deps = [":tasks_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-tasks-v2-java", + deps = [ + ":tasks_java_gapic", + ":tasks_java_grpc", + ":tasks_java_proto", + ":tasks_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "tasks_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/tasks/v2", + protos = [":tasks_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/rpc:status_go_proto", + ], +) + +go_gapic_library( + name = "tasks_go_gapic", + srcs = [":tasks_proto_with_info"], + grpc_service_config = "cloudtasks_grpc_service_config.json", + importpath = "cloud.google.com/go/cloudtasks/apiv2;tasks", + service_yaml = "cloudtasks_v2.yaml", + deps = [ + ":tasks_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_test( + name = "tasks_go_gapic_test", + srcs = [":tasks_go_gapic_srcjar_test"], + embed = [":tasks_go_gapic"], + importpath = "cloud.google.com/go/cloudtasks/apiv2", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-tasks-v2-go", + deps = [ + ":tasks_go_gapic", + ":tasks_go_gapic_srcjar-test.srcjar", + ":tasks_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "tasks_moved_proto", + srcs = [":tasks_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "tasks_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":tasks_moved_proto"], +) + +py_grpc_library( + name = "tasks_py_grpc", + srcs = [":tasks_moved_proto"], + deps = [":tasks_py_proto"], +) + +py_gapic_library( + name = "tasks_py_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2", + service_yaml = "cloudtasks_v2.yaml", + deps = [ + ":tasks_py_grpc", + ":tasks_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "tasks-v2-py", + deps = [ + ":tasks_py_gapic", + ":tasks_py_grpc", + ":tasks_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "tasks_php_proto", + deps = [":tasks_proto"], +) + +php_grpc_library( + name = "tasks_php_grpc", + srcs = [":tasks_proto"], + deps = [":tasks_php_proto"], +) + +php_gapic_library( + name = "tasks_php_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2", + service_yaml = "cloudtasks_v2.yaml", + deps = [ + ":tasks_php_grpc", + ":tasks_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-tasks-v2-php", + deps = [ + ":tasks_php_gapic", + ":tasks_php_grpc", + ":tasks_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "tasks_nodejs_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2", + service_yaml = "cloudtasks_v2.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "tasks-v2-nodejs", + deps = [ + ":tasks_nodejs_gapic", + ":tasks_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "tasks_ruby_proto", + deps = [":tasks_proto"], +) + +ruby_grpc_library( + name = "tasks_ruby_grpc", + srcs = [":tasks_proto"], + deps = [":tasks_ruby_proto"], +) + +ruby_gapic_library( + name = "tasks_ruby_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2", + service_yaml = "cloudtasks_v2.yaml", + deps = [ + ":tasks_ruby_grpc", + ":tasks_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-tasks-v2-ruby", + deps = [ + ":tasks_ruby_gapic", + ":tasks_ruby_grpc", + ":tasks_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "tasks_csharp_proto", + deps = [":tasks_proto"], +) + +csharp_grpc_library( + name = "tasks_csharp_grpc", + srcs = [":tasks_proto"], + deps = [":tasks_csharp_proto"], +) + +csharp_gapic_library( + name = "tasks_csharp_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2", + service_yaml = "cloudtasks_v2.yaml", + deps = [ + ":tasks_csharp_grpc", + ":tasks_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-tasks-v2-csharp", + deps = [ + ":tasks_csharp_gapic", + ":tasks_csharp_grpc", + ":tasks_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/tasks/v2/cloudtasks.proto b/google/cloud/tasks/v2/cloudtasks.proto index e287880c3..d30aae519 100644 --- a/google/cloud/tasks/v2/cloudtasks.proto +++ b/google/cloud/tasks/v2/cloudtasks.proto @@ -18,6 +18,8 @@ syntax = "proto3"; package google.cloud.tasks.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/tasks/v2/queue.proto"; import "google/cloud/tasks/v2/task.proto"; @@ -25,7 +27,6 @@ import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/rpc/code.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks"; option java_multiple_files = true; @@ -36,6 +37,9 @@ option objc_class_prefix = "TASKS"; // Cloud Tasks allows developers to manage the execution of background // work in their applications. service CloudTasks { + option (google.api.default_host) = "cloudtasks.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Lists queues. // // Queues are returned in lexicographical order. @@ -43,6 +47,7 @@ service CloudTasks { option (google.api.http) = { get: "/v2/{parent=projects/*/locations/*}/queues" }; + option (google.api.method_signature) = "parent"; } // Gets a queue. @@ -50,6 +55,7 @@ service CloudTasks { option (google.api.http) = { get: "/v2/{name=projects/*/locations/*/queues/*}" }; + option (google.api.method_signature) = "name"; } // Creates a queue. @@ -69,6 +75,7 @@ service CloudTasks { post: "/v2/{parent=projects/*/locations/*}/queues" body: "queue" }; + option (google.api.method_signature) = "parent,queue"; } // Updates a queue. @@ -91,6 +98,7 @@ service CloudTasks { patch: "/v2/{queue.name=projects/*/locations/*/queues/*}" body: "queue" }; + option (google.api.method_signature) = "queue,update_mask"; } // Deletes a queue. @@ -110,6 +118,7 @@ service CloudTasks { option (google.api.http) = { delete: "/v2/{name=projects/*/locations/*/queues/*}" }; + option (google.api.method_signature) = "name"; } // Purges a queue by deleting all of its tasks. @@ -123,6 +132,7 @@ service CloudTasks { post: "/v2/{name=projects/*/locations/*/queues/*}:purge" body: "*" }; + option (google.api.method_signature) = "name"; } // Pauses the queue. @@ -137,6 +147,7 @@ service CloudTasks { post: "/v2/{name=projects/*/locations/*/queues/*}:pause" body: "*" }; + option (google.api.method_signature) = "name"; } // Resume a queue. @@ -157,6 +168,7 @@ service CloudTasks { post: "/v2/{name=projects/*/locations/*/queues/*}:resume" body: "*" }; + option (google.api.method_signature) = "name"; } // Gets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. @@ -173,6 +185,7 @@ service CloudTasks { post: "/v2/{resource=projects/*/locations/*/queues/*}:getIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource"; } // Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. Replaces any existing @@ -191,6 +204,7 @@ service CloudTasks { post: "/v2/{resource=projects/*/locations/*/queues/*}:setIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource,policy"; } // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2.Queue]. @@ -205,6 +219,7 @@ service CloudTasks { post: "/v2/{resource=projects/*/locations/*/queues/*}:testIamPermissions" body: "*" }; + option (google.api.method_signature) = "resource,permissions"; } // Lists the tasks in a queue. @@ -220,6 +235,7 @@ service CloudTasks { option (google.api.http) = { get: "/v2/{parent=projects/*/locations/*/queues/*}/tasks" }; + option (google.api.method_signature) = "parent"; } // Gets a task. @@ -227,6 +243,7 @@ service CloudTasks { option (google.api.http) = { get: "/v2/{name=projects/*/locations/*/queues/*/tasks/*}" }; + option (google.api.method_signature) = "name"; } // Creates a task and adds it to a queue. @@ -239,6 +256,7 @@ service CloudTasks { post: "/v2/{parent=projects/*/locations/*/queues/*}/tasks" body: "*" }; + option (google.api.method_signature) = "parent,task"; } // Deletes a task. @@ -250,6 +268,7 @@ service CloudTasks { option (google.api.http) = { delete: "/v2/{name=projects/*/locations/*/queues/*/tasks/*}" }; + option (google.api.method_signature) = "name"; } // Forces a task to run now. @@ -281,16 +300,20 @@ service CloudTasks { post: "/v2/{name=projects/*/locations/*/queues/*/tasks/*}:run" body: "*" }; + option (google.api.method_signature) = "name"; } } // Request message for [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues]. message ListQueuesRequest { - // Required. - // - // The location name. + // Required. The location name. // For example: `projects/PROJECT_ID/locations/LOCATION_ID` - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Queue" + } + ]; // `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2.Queue] // field can be used as a filter and several operators as supported. @@ -344,45 +367,47 @@ message ListQueuesResponse { // Request message for [GetQueue][google.cloud.tasks.v2.CloudTasks.GetQueue]. message GetQueueRequest { - // Required. - // - // The resource name of the queue. For example: + // Required. The resource name of the queue. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } // Request message for [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue]. message CreateQueueRequest { - // Required. - // - // The location name in which the queue will be created. + // Required. The location name in which the queue will be created. // For example: `projects/PROJECT_ID/locations/LOCATION_ID` // // The list of allowed locations can be obtained by calling Cloud // Tasks' implementation of // [ListLocations][google.cloud.location.Locations.ListLocations]. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Queue" + } + ]; - // Required. - // - // The queue to create. + // Required. The queue to create. // // [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue. - Queue queue = 2; + Queue queue = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue]. message UpdateQueueRequest { - // Required. - // - // The queue to create or update. + // Required. The queue to create or update. // // The queue's [name][google.cloud.tasks.v2.Queue.name] must be specified. // // Output only fields cannot be modified using UpdateQueue. // Any value specified for an output only field will be ignored. // The queue's [name][google.cloud.tasks.v2.Queue.name] cannot be changed. - Queue queue = 1; + Queue queue = 1 [(google.api.field_behavior) = REQUIRED]; // A mask used to specify which fields of the queue are being updated. // @@ -392,47 +417,62 @@ message UpdateQueueRequest { // Request message for [DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue]. message DeleteQueueRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } // Request message for [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue]. message PurgeQueueRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } // Request message for [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue]. message PauseQueueRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } // Request message for [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. message ResumeQueueRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } // Request message for listing tasks using [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks]. message ListTasksRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Task" + } + ]; // The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be // returned. @@ -487,11 +527,14 @@ message ListTasksResponse { // Request message for getting a task using [GetTask][google.cloud.tasks.v2.CloudTasks.GetTask]. message GetTaskRequest { - // Required. - // - // The task name. For example: + // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Task" + } + ]; // The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be // returned. @@ -510,17 +553,18 @@ message GetTaskRequest { // Request message for [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. message CreateTaskRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` // // The queue must already exist. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Task" + } + ]; - // Required. - // - // The task to add. + // Required. The task to add. // // Task names have the following format: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. @@ -553,7 +597,7 @@ message CreateTaskRequest { // task commands. The infrastructure relies on an approximately // uniform distribution of task ids to store and serve tasks // efficiently. - Task task = 2; + Task task = 2 [(google.api.field_behavior) = REQUIRED]; // The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be // returned. @@ -573,21 +617,27 @@ message CreateTaskRequest { // Request message for deleting a task using // [DeleteTask][google.cloud.tasks.v2.CloudTasks.DeleteTask]. message DeleteTaskRequest { - // Required. - // - // The task name. For example: + // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Task" + } + ]; } // Request message for forcing a task to run now using // [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask]. message RunTaskRequest { - // Required. - // - // The task name. For example: + // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Task" + } + ]; // The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be // returned. diff --git a/google/cloud/tasks/v2/cloudtasks_gapic.legacy.yaml b/google/cloud/tasks/v2/cloudtasks_gapic.legacy.yaml new file mode 100644 index 000000000..49373a7b8 --- /dev/null +++ b/google/cloud/tasks/v2/cloudtasks_gapic.legacy.yaml @@ -0,0 +1,439 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.tasks.v2 + python: + package_name: google.cloud.tasks_v2.gapic + release_level: GA + go: + package_name: cloud.google.com/go/cloudtasks/apiv2 + release_level: GA + csharp: + package_name: Google.Cloud.Tasks.V2 + release_level: GA + ruby: + package_name: Google::Cloud::Tasks::V2 + release_level: GA + php: + package_name: Google\Cloud\Tasks\V2 + release_level: GA + nodejs: + package_name: tasks.v2 +# A list of API interface configurations. +interfaces: +- name: google.cloud.tasks.v2.CloudTasks + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/queues/{queue} + entity_name: queue + - name_pattern: projects/{project}/locations/{location}/queues/{queue}/tasks/{task} + entity_name: task + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListQueues + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + header_request_params: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: queues + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 10000 + - name: GetQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: CreateQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + - queue + required_fields: + - parent + - queue + header_request_params: + - parent + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 10000 + - name: UpdateQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - queue + - update_mask + required_fields: + - queue + header_request_params: + - queue.name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + queue.name: queue + timeout_millis: 10000 + - name: DeleteQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: PurgeQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: PauseQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: ResumeQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: GetIamPolicy + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - resource + required_fields: + - resource + header_request_params: + - resource + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + resource: queue + timeout_millis: 10000 + - name: SetIamPolicy + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + header_request_params: + - resource + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: queue + timeout_millis: 10000 + - name: TestIamPermissions + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + header_request_params: + - resource + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + resource: queue + timeout_millis: 10000 + - name: ListTasks + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + header_request_params: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: tasks + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: queue + timeout_millis: 10000 + - name: GetTask + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: task + timeout_millis: 10000 + - name: CreateTask + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + - task + required_fields: + - parent + - task + header_request_params: + - parent + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: queue + timeout_millis: 10000 + - name: DeleteTask + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: task + timeout_millis: 10000 + - name: RunTask + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: task + timeout_millis: 10000 +resource_name_generation: +- message_name: Queue + field_entity_map: + name: queue +- message_name: Task + field_entity_map: + name: task +- message_name: ListQueuesRequest + field_entity_map: + parent: location +- message_name: GetQueueRequest + field_entity_map: + name: queue +- message_name: CreateQueueRequest + field_entity_map: + parent: location +- message_name: UpdateQueueRequest + field_entity_map: + queue.name: queue +- message_name: DeleteQueueRequest + field_entity_map: + name: queue +- message_name: PurgeQueueRequest + field_entity_map: + name: queue +- message_name: PauseQueueRequest + field_entity_map: + name: queue +- message_name: ResumeQueueRequest + field_entity_map: + name: queue +- message_name: ListTasksRequest + field_entity_map: + parent: queue +- message_name: GetTaskRequest + field_entity_map: + name: task +- message_name: CreateTaskRequest + field_entity_map: + parent: queue +- message_name: DeleteTaskRequest + field_entity_map: + name: task +- message_name: RunTaskRequest + field_entity_map: + name: task +- message_name: google.iam.v1.GetIamPolicyRequest + field_entity_map: + resource: "*" +- message_name: google.iam.v1.SetIamPolicyRequest + field_entity_map: + resource: "*" +- message_name: google.iam.v1.TestIamPermissionsRequest + field_entity_map: + resource: "*" diff --git a/google/cloud/tasks/v2/cloudtasks_gapic.yaml b/google/cloud/tasks/v2/cloudtasks_gapic.yaml index e0453b952..ad8a4bd85 100644 --- a/google/cloud/tasks/v2/cloudtasks_gapic.yaml +++ b/google/cloud/tasks/v2/cloudtasks_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -21,420 +21,46 @@ language_settings: release_level: GA nodejs: package_name: tasks.v2 -# A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.cloud.tasks.v2.CloudTasks - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - - name_pattern: projects/{project}/locations/{location} - entity_name: location - - name_pattern: projects/{project}/locations/{location}/queues/{queue} - entity_name: queue - - name_pattern: projects/{project}/locations/{location}/queues/{queue}/tasks/{task} - entity_name: task - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: ListQueues - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - header_request_params: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: queues - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: location timeout_millis: 10000 - name: GetQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: CreateQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - - queue - required_fields: - - parent - - queue - header_request_params: - - parent - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location timeout_millis: 10000 - name: UpdateQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - queue - - update_mask - required_fields: - - queue - header_request_params: - - queue.name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - queue.name: queue timeout_millis: 10000 - name: DeleteQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: PurgeQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: PauseQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: ResumeQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: GetIamPolicy - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - resource - required_fields: - - resource - header_request_params: - - resource retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - resource: queue timeout_millis: 10000 - name: SetIamPolicy - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - resource - - policy - required_fields: - - resource - - policy - header_request_params: - - resource - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: queue timeout_millis: 10000 - name: TestIamPermissions - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - resource - - permissions - required_fields: - - resource - - permissions - header_request_params: - - resource retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - resource: queue timeout_millis: 10000 - name: ListTasks - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - header_request_params: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: tasks - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: queue timeout_millis: 10000 - name: GetTask - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: task timeout_millis: 10000 - name: CreateTask - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - - task - required_fields: - - parent - - task - header_request_params: - - parent - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: queue timeout_millis: 10000 - name: DeleteTask - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: task timeout_millis: 10000 - name: RunTask - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: task timeout_millis: 10000 -resource_name_generation: -- message_name: Queue - field_entity_map: - name: queue -- message_name: Task - field_entity_map: - name: task -- message_name: ListQueuesRequest - field_entity_map: - parent: location -- message_name: GetQueueRequest - field_entity_map: - name: queue -- message_name: CreateQueueRequest - field_entity_map: - parent: location -- message_name: UpdateQueueRequest - field_entity_map: - queue.name: queue -- message_name: DeleteQueueRequest - field_entity_map: - name: queue -- message_name: PurgeQueueRequest - field_entity_map: - name: queue -- message_name: PauseQueueRequest - field_entity_map: - name: queue -- message_name: ResumeQueueRequest - field_entity_map: - name: queue -- message_name: ListTasksRequest - field_entity_map: - parent: queue -- message_name: GetTaskRequest - field_entity_map: - name: task -- message_name: CreateTaskRequest - field_entity_map: - parent: queue -- message_name: DeleteTaskRequest - field_entity_map: - name: task -- message_name: RunTaskRequest - field_entity_map: - name: task -- message_name: google.iam.v1.GetIamPolicyRequest - field_entity_map: - resource: "*" -- message_name: google.iam.v1.SetIamPolicyRequest - field_entity_map: - resource: "*" -- message_name: google.iam.v1.TestIamPermissionsRequest - field_entity_map: - resource: "*" diff --git a/google/cloud/tasks/v2/cloudtasks_grpc_service_config.json b/google/cloud/tasks/v2/cloudtasks_grpc_service_config.json new file mode 100755 index 000000000..cdad5bd41 --- /dev/null +++ b/google/cloud/tasks/v2/cloudtasks_grpc_service_config.json @@ -0,0 +1,87 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "ListQueues" + }, + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "GetQueue" + }, + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "DeleteQueue" + }, + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "GetIamPolicy" + }, + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "TestIamPermissions" + }, + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "ListTasks" + }, + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "GetTask" + }, + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "DeleteTask" + } + ], + "timeout": "10s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "10s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "CreateQueue" + }, + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "UpdateQueue" + }, + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "PurgeQueue" + }, + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "PauseQueue" + }, + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "ResumeQueue" + }, + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "SetIamPolicy" + }, + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "CreateTask" + }, + { + "service": "google.cloud.tasks.v2.CloudTasks", + "method": "RunTask" + } + ], + "timeout": "10s" + } + ] +} diff --git a/google/cloud/tasks/cloudtasks_v2.yaml b/google/cloud/tasks/v2/cloudtasks_v2.yaml similarity index 100% rename from google/cloud/tasks/cloudtasks_v2.yaml rename to google/cloud/tasks/v2/cloudtasks_v2.yaml diff --git a/google/cloud/tasks/v2/queue.proto b/google/cloud/tasks/v2/queue.proto index 05dd03d07..483a1f61f 100644 --- a/google/cloud/tasks/v2/queue.proto +++ b/google/cloud/tasks/v2/queue.proto @@ -17,11 +17,11 @@ syntax = "proto3"; package google.cloud.tasks.v2; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "google/cloud/tasks/v2/target.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks"; option java_multiple_files = true; @@ -32,6 +32,11 @@ option java_package = "com.google.cloud.tasks.v2"; // how those tasks are dispatched. Configurable properties include rate limits, // retry options, queue types, and others. message Queue { + option (google.api.resource) = { + type: "cloudtasks.googleapis.com/Queue" + pattern: "projects/{project}/locations/{location}/queues/{queue}" + }; + // State of the queue. enum State { // Unspecified state. @@ -94,6 +99,7 @@ message Queue { // [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. // These settings apply only to // [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue. + // [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected. // // If set, `app_engine_routing_override` is used for all // [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the @@ -160,6 +166,11 @@ message Queue { // Purge time will be truncated to the nearest microsecond. Purge // time will be unset if the queue has never been purged. google.protobuf.Timestamp purge_time = 6; + + // Configuration options for writing logs to + // [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + // field is unset, then no logs are written. + StackdriverLoggingConfig stackdriver_logging_config = 9; } // Rate limits. @@ -175,8 +186,7 @@ message RateLimits { // If unspecified when the queue is created, Cloud Tasks will pick the // default. // - // * For [App Engine queues][google.cloud.tasks.v2.AppEngineHttpQueue], the maximum allowed value - // is 500. + // * The maximum allowed value is 500. // // // This field has the same meaning as @@ -205,7 +215,7 @@ message RateLimits { // value of // [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. // - // For App Engine queues that were created or updated using + // For queues that were created or updated using // `queue.yaml/xml`, `max_burst_size` is equal to // [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). // Since `max_burst_size` is output only, if @@ -339,3 +349,13 @@ message RetryConfig { // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). int32 max_doublings = 5; } + +// Configuration options for writing logs to +// [Stackdriver Logging](https://cloud.google.com/logging/docs/). +message StackdriverLoggingConfig { + // Specifies the fraction of operations to write to + // [Stackdriver Logging](https://cloud.google.com/logging/docs/). + // This field may contain any value between 0.0 and 1.0, inclusive. + // 0.0 is the default and means that no operations are logged. + double sampling_ratio = 1; +} diff --git a/google/cloud/tasks/v2/target.proto b/google/cloud/tasks/v2/target.proto index 2943a4058..558ca4afc 100644 --- a/google/cloud/tasks/v2/target.proto +++ b/google/cloud/tasks/v2/target.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.tasks.v2; +import "google/api/field_behavior.proto"; import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks"; @@ -24,6 +25,112 @@ option java_multiple_files = true; option java_outer_classname = "TargetProto"; option java_package = "com.google.cloud.tasks.v2"; +// HTTP request. +// +// The task will be pushed to the worker as an HTTP request. If the worker +// or the redirected worker acknowledges the task by returning a successful HTTP +// response code ([`200` - `299`]), the task will be removed from the queue. If +// any other HTTP response code is returned or no response is received, the +// task will be retried according to the following: +// +// * User-specified throttling: [retry configuration][google.cloud.tasks.v2.Queue.retry_config], +// [rate limits][google.cloud.tasks.v2.Queue.rate_limits], and the [queue's state][google.cloud.tasks.v2.Queue.state]. +// +// * System throttling: To prevent the worker from overloading, Cloud Tasks may +// temporarily reduce the queue's effective rate. User-specified settings +// will not be changed. +// +// System throttling happens because: +// +// * Cloud Tasks backs off on all errors. Normally the backoff specified in +// [rate limits][google.cloud.tasks.v2.Queue.rate_limits] will be used. But if the worker returns +// `429` (Too Many Requests), `503` (Service Unavailable), or the rate of +// errors is high, Cloud Tasks will use a higher backoff rate. The retry +// specified in the `Retry-After` HTTP response header is considered. +// +// * To prevent traffic spikes and to smooth sudden increases in traffic, +// dispatches ramp up slowly when the queue is newly created or idle and +// if large numbers of tasks suddenly become available to dispatch (due to +// spikes in create task rates, the queue being unpaused, or many tasks +// that are scheduled at the same time). +message HttpRequest { + // Required. The full url path that the request will be sent to. + // + // This string must begin with either "http://" or "https://". Some examples + // are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + // encode some characters for safety and compatibility. The maximum allowed + // URL length is 2083 characters after encoding. + // + // The `Location` header response from a redirect response [`300` - `399`] + // may be followed. The redirect is not counted as a separate attempt. + string url = 1 [(google.api.field_behavior) = REQUIRED]; + + // The HTTP method to use for the request. The default is POST. + HttpMethod http_method = 2; + + // HTTP request headers. + // + // This map contains the header field names and values. + // Headers can be set when the + // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + // + // These headers represent a subset of the headers that will accompany the + // task's HTTP request. Some HTTP request headers will be ignored or replaced. + // + // A partial list of headers that will be ignored or replaced is: + // + // * Host: This will be computed by Cloud Tasks and derived from + // [HttpRequest.url][google.cloud.tasks.v2.HttpRequest.url]. + // * Content-Length: This will be computed by Cloud Tasks. + // * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + // * X-Google-*: Google use only. + // * X-AppEngine-*: Google use only. + // + // `Content-Type` won't be set by Cloud Tasks. You can explicitly set + // `Content-Type` to a media type when the + // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + // For example, `Content-Type` can be set to `"application/octet-stream"` or + // `"application/json"`. + // + // Headers which can have multiple values (according to RFC2616) can be + // specified using comma-separated values. + // + // The size of the headers must be less than 80KB. + map headers = 3; + + // HTTP request body. + // + // A request body is allowed only if the + // [HTTP method][google.cloud.tasks.v2.HttpRequest.http_method] is POST, PUT, or PATCH. It is an + // error to set body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2.HttpMethod]. + bytes body = 4; + + // The mode for generating an `Authorization` header for HTTP requests. + // + // If specified, all `Authorization` headers in the [HttpRequest.headers][google.cloud.tasks.v2.HttpRequest.headers] + // field will be overridden. + oneof authorization_header { + // If specified, an + // [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + // will be generated and attached as an `Authorization` header in the HTTP + // request. + // + // This type of authorization should generally only be used when calling + // Google APIs hosted on *.googleapis.com. + OAuthToken oauth_token = 5; + + // If specified, an + // [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + // token will be generated and attached as an `Authorization` header in the + // HTTP request. + // + // This type of authorization can be used for many scenarios, including + // calling Cloud Run, or endpoints where you intend to validate the token + // yourself. + OidcToken oidc_token = 6; + } +} + // App Engine HTTP request. // // The message defines the HTTP request that is sent to an App Engine app when @@ -52,11 +159,10 @@ option java_package = "com.google.cloud.tasks.v2"; // The [AppEngineRouting][google.cloud.tasks.v2.AppEngineRouting] used to construct the URL that the task is // delivered to can be set at the queue-level or task-level: // -// * If set, -// [app_engine_routing_override][google.cloud.tasks.v2.AppEngineHttpQueue.app_engine_routing_override] -// is used for all tasks in the queue, no matter what the setting -// is for the -// [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. +// * If [app_engine_routing_override is set on the +// queue][Queue.app_engine_routing_override], this value is used for all +// tasks in the queue, no matter what the setting is for the [task-level +// app_engine_routing][AppEngineHttpRequest.app_engine_routing]. // // // The `url` that the task will be sent to is: @@ -79,7 +185,7 @@ option java_package = "com.google.cloud.tasks.v2"; // the app's handler returns a non-2xx response code or Cloud Tasks does // not receive response before the [deadline][google.cloud.tasks.v2.Task.dispatch_deadline]. Failed // tasks will be retried according to the -// [retry configuration][Queue.RetryConfig]. `503` (Service Unavailable) is +// [retry configuration][google.cloud.tasks.v2.Queue.retry_config]. `503` (Service Unavailable) is // considered an App Engine system error instead of an application error and // will cause Cloud Tasks' traffic congestion control to temporarily throttle // the queue's dispatches. Unlike other types of task targets, a `429` (Too Many @@ -101,10 +207,10 @@ message AppEngineHttpRequest { // Task-level setting for App Engine routing. // - // If set, - // [app_engine_routing_override][google.cloud.tasks.v2.AppEngineHttpQueue.app_engine_routing_override] - // is used for all tasks in the queue, no matter what the setting is for the - // [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + // * If [app_engine_routing_override is set on the + // queue][Queue.app_engine_routing_override], this value is used for all + // tasks in the queue, no matter what the setting is for the [task-level + // app_engine_routing][AppEngineHttpRequest.app_engine_routing]. AppEngineRouting app_engine_routing = 2; // The relative URI. @@ -150,7 +256,7 @@ message AppEngineHttpRequest { // In addition, Cloud Tasks sets some headers when the task is dispatched, // such as headers containing information about the task; see // [request - // headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). + // headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). // These headers are set only when the task is dispatched, so they are not // visible when the task is returned in a Cloud Tasks response. // @@ -180,6 +286,13 @@ message AppEngineHttpRequest { // routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), // and [App Engine Flex request // routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). +// +// Using [AppEngineRouting][google.cloud.tasks.v2.AppEngineRouting] requires +// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) +// Google IAM permission for the project +// and the following scope: +// +// `https://www.googleapis.com/auth/cloud-platform` message AppEngineRouting { // App service. // @@ -272,3 +385,40 @@ enum HttpMethod { // HTTP OPTIONS OPTIONS = 7; } + +// Contains information needed for generating an +// [OAuth token](https://developers.google.com/identity/protocols/OAuth2). +// This type of authorization should generally only be used when calling Google +// APIs hosted on *.googleapis.com. +message OAuthToken { + // [Service account email](https://cloud.google.com/iam/docs/service-accounts) + // to be used for generating OAuth token. + // The service account must be within the same project as the queue. The + // caller must have iam.serviceAccounts.actAs permission for the service + // account. + string service_account_email = 1; + + // OAuth scope to be used for generating OAuth access token. + // If not specified, "https://www.googleapis.com/auth/cloud-platform" + // will be used. + string scope = 2; +} + +// Contains information needed for generating an +// [OpenID Connect +// token](https://developers.google.com/identity/protocols/OpenIDConnect). +// This type of authorization can be used for many scenarios, including +// calling Cloud Run, or endpoints where you intend to validate the token +// yourself. +message OidcToken { + // [Service account email](https://cloud.google.com/iam/docs/service-accounts) + // to be used for generating OIDC token. + // The service account must be within the same project as the queue. The + // caller must have iam.serviceAccounts.actAs permission for the service + // account. + string service_account_email = 1; + + // Audience to be used when generating OIDC token. If not specified, the URI + // specified in target will be used. + string audience = 2; +} diff --git a/google/cloud/tasks/v2/task.proto b/google/cloud/tasks/v2/task.proto index eefcb378c..70a2baba4 100644 --- a/google/cloud/tasks/v2/task.proto +++ b/google/cloud/tasks/v2/task.proto @@ -17,12 +17,12 @@ syntax = "proto3"; package google.cloud.tasks.v2; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "google/cloud/tasks/v2/target.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks"; option java_multiple_files = true; @@ -31,6 +31,11 @@ option java_package = "com.google.cloud.tasks.v2"; // A unit of scheduled work. message Task { + option (google.api.resource) = { + type: "cloudtasks.googleapis.com/Task" + pattern: "projects/{project}/locations/{location}/queues/{queue}/tasks/{task}" + }; + // The view specifies a subset of [Task][google.cloud.tasks.v2.Task] data. // // When a task is returned in a response, not all @@ -88,11 +93,14 @@ message Task { // // An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set. AppEngineHttpRequest app_engine_http_request = 2; + + // HTTP request that is sent to the worker. + // + // An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + HttpRequest http_request = 3; } - // The time when the task is scheduled to be attempted. - // - // For App Engine queues, this is when the task will be attempted or retried. + // The time when the task is scheduled to be attempted or retried. // // `schedule_time` will be truncated to the nearest microsecond. google.protobuf.Timestamp schedule_time = 4; @@ -114,6 +122,8 @@ message Task { // // The default and maximum values depend on the type of request: // + // * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10 minutes. The deadline + // must be in the interval [15 seconds, 30 minutes]. // // * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the // request has the default deadline. The default deadline depends on the diff --git a/google/cloud/tasks/v2beta2/BUILD.bazel b/google/cloud/tasks/v2beta2/BUILD.bazel index f10c5e203..d430b1219 100644 --- a/google/cloud/tasks/v2beta2/BUILD.bazel +++ b/google/cloud/tasks/v2beta2/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -16,9 +19,11 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/iam/v1:iam_policy_proto", "//google/iam/v1:policy_proto", - "//google/rpc:code_proto", "//google/rpc:status_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:empty_proto", @@ -29,7 +34,10 @@ proto_library( proto_library_with_info( name = "tasks_proto_with_info", - deps = [":tasks_proto"], + deps = [ + ":tasks_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -37,19 +45,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", - "@com_google_api_grpc_proto_google_iam_v1//jar", -] - java_proto_library( name = "tasks_java_proto", deps = [":tasks_proto"], @@ -58,51 +60,42 @@ java_proto_library( java_grpc_library( name = "tasks_java_grpc", srcs = [":tasks_proto"], - deps = [":tasks_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "tasks_resource_name_java_proto", - gapic_yaml = "cloudtasks_gapic.yaml", - deps = [":tasks_proto"], + deps = [":tasks_java_proto"], ) java_gapic_library( name = "tasks_java_gapic", src = ":tasks_proto_with_info", gapic_yaml = "cloudtasks_gapic.yaml", - service_yaml = "//google/cloud/tasks:cloudtasks_v2beta2.yaml", - test_deps = [":tasks_java_grpc"], + package = "google.cloud.tasks.v2beta2", + service_yaml = "cloudtasks_v2beta2.yaml", + test_deps = [ + ":tasks_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], deps = [ ":tasks_java_proto", - ":tasks_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + "//google/iam/v1:iam_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":tasks_java_gapic_test", +java_gapic_test( + name = "tasks_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.tasks.v2beta2.CloudTasksClientTest", ], -) for test_name in [ - "com.google.cloud.tasks.v2beta2.CloudTasksClientTest", -]] + runtime_deps = [":tasks_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-tasks-v2beta2-java", - client_deps = [":tasks_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":tasks_java_gapic_test"], - grpc_deps = [":tasks_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":tasks_java_gapic", + ":tasks_java_grpc", ":tasks_java_proto", ":tasks_proto", - ":tasks_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -110,10 +103,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -124,17 +117,16 @@ go_proto_library( deps = [ "//google/api:annotations_go_proto", "//google/iam/v1:iam_go_proto", - "//google/rpc:code_go_proto", "//google/rpc:status_go_proto", ], ) go_gapic_library( name = "tasks_go_gapic", - src = ":tasks_proto_with_info", - gapic_yaml = "cloudtasks_gapic.yaml", - importpath = "cloud.google.com/go/cloudtasks/apiv2beta2", - service_yaml = "//google/cloud/tasks:cloudtasks_v2beta2.yaml", + srcs = [":tasks_proto_with_info"], + grpc_service_config = "cloudtasks_grpc_service_config.json", + importpath = "cloud.google.com/go/cloudtasks/apiv2beta2;tasks", + service_yaml = "cloudtasks_v2beta2.yaml", deps = [ ":tasks_go_proto", "//google/iam/v1:iam_go_proto", @@ -149,13 +141,239 @@ go_test( importpath = "cloud.google.com/go/cloudtasks/apiv2beta2", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-tasks-v2beta2-go", deps = [ ":tasks_go_gapic", - ":tasks_go_gapic_srcjar-smoke-test.srcjar", ":tasks_go_gapic_srcjar-test.srcjar", ":tasks_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "tasks_moved_proto", + srcs = [":tasks_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "tasks_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":tasks_moved_proto"], +) + +py_grpc_library( + name = "tasks_py_grpc", + srcs = [":tasks_moved_proto"], + deps = [":tasks_py_proto"], +) + +py_gapic_library( + name = "tasks_py_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2beta2", + service_yaml = "cloudtasks_v2beta2.yaml", + deps = [ + ":tasks_py_grpc", + ":tasks_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "tasks-v2beta2-py", + deps = [ + ":tasks_py_gapic", + ":tasks_py_grpc", + ":tasks_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "tasks_php_proto", + deps = [":tasks_proto"], +) + +php_grpc_library( + name = "tasks_php_grpc", + srcs = [":tasks_proto"], + deps = [":tasks_php_proto"], +) + +php_gapic_library( + name = "tasks_php_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2beta2", + service_yaml = "cloudtasks_v2beta2.yaml", + deps = [ + ":tasks_php_grpc", + ":tasks_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-tasks-v2beta2-php", + deps = [ + ":tasks_php_gapic", + ":tasks_php_grpc", + ":tasks_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "tasks_nodejs_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2beta2", + service_yaml = "cloudtasks_v2beta2.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "tasks-v2beta2-nodejs", + deps = [ + ":tasks_nodejs_gapic", + ":tasks_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "tasks_ruby_proto", + deps = [":tasks_proto"], +) + +ruby_grpc_library( + name = "tasks_ruby_grpc", + srcs = [":tasks_proto"], + deps = [":tasks_ruby_proto"], +) + +ruby_gapic_library( + name = "tasks_ruby_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2beta2", + service_yaml = "cloudtasks_v2beta2.yaml", + deps = [ + ":tasks_ruby_grpc", + ":tasks_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-tasks-v2beta2-ruby", + deps = [ + ":tasks_ruby_gapic", + ":tasks_ruby_grpc", + ":tasks_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "tasks_csharp_proto", + deps = [":tasks_proto"], +) + +csharp_grpc_library( + name = "tasks_csharp_grpc", + srcs = [":tasks_proto"], + deps = [":tasks_csharp_proto"], +) + +csharp_gapic_library( + name = "tasks_csharp_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2beta2", + service_yaml = "cloudtasks_v2beta2.yaml", + deps = [ + ":tasks_csharp_grpc", + ":tasks_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-tasks-v2beta2-csharp", + deps = [ + ":tasks_csharp_gapic", + ":tasks_csharp_grpc", + ":tasks_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/tasks/v2beta2/cloudtasks.proto b/google/cloud/tasks/v2beta2/cloudtasks.proto index 61a6ecdc9..afea6919a 100644 --- a/google/cloud/tasks/v2beta2/cloudtasks.proto +++ b/google/cloud/tasks/v2beta2/cloudtasks.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.tasks.v2beta2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/tasks/v2beta2/queue.proto"; import "google/cloud/tasks/v2beta2/task.proto"; import "google/iam/v1/iam_policy.proto"; @@ -25,7 +29,6 @@ import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -import "google/rpc/code.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2;tasks"; option java_multiple_files = true; @@ -36,6 +39,9 @@ option objc_class_prefix = "TASKS"; // Cloud Tasks allows developers to manage the execution of background // work in their applications. service CloudTasks { + option (google.api.default_host) = "cloudtasks.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Lists queues. // // Queues are returned in lexicographical order. @@ -43,6 +49,7 @@ service CloudTasks { option (google.api.http) = { get: "/v2beta2/{parent=projects/*/locations/*}/queues" }; + option (google.api.method_signature) = "parent"; } // Gets a queue. @@ -50,13 +57,14 @@ service CloudTasks { option (google.api.http) = { get: "/v2beta2/{name=projects/*/locations/*/queues/*}" }; + option (google.api.method_signature) = "name"; } // Creates a queue. // // Queues created with this method allow tasks to live for a maximum of 31 - // days. After a task is 31 days old, the task will be deleted regardless of - // whether it was dispatched or not. + // days. After a task is 31 days old, the task will be deleted regardless of whether + // it was dispatched or not. // // WARNING: Using this method may have unintended side effects if you are // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. @@ -69,6 +77,7 @@ service CloudTasks { post: "/v2beta2/{parent=projects/*/locations/*}/queues" body: "queue" }; + option (google.api.method_signature) = "parent,queue"; } // Updates a queue. @@ -77,8 +86,8 @@ service CloudTasks { // the queue if it does exist. // // Queues created with this method allow tasks to live for a maximum of 31 - // days. After a task is 31 days old, the task will be deleted regardless of - // whether it was dispatched or not. + // days. After a task is 31 days old, the task will be deleted regardless of whether + // it was dispatched or not. // // WARNING: Using this method may have unintended side effects if you are // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. @@ -91,6 +100,7 @@ service CloudTasks { patch: "/v2beta2/{queue.name=projects/*/locations/*/queues/*}" body: "queue" }; + option (google.api.method_signature) = "queue,update_mask"; } // Deletes a queue. @@ -110,6 +120,7 @@ service CloudTasks { option (google.api.http) = { delete: "/v2beta2/{name=projects/*/locations/*/queues/*}" }; + option (google.api.method_signature) = "name"; } // Purges a queue by deleting all of its tasks. @@ -123,32 +134,31 @@ service CloudTasks { post: "/v2beta2/{name=projects/*/locations/*/queues/*}:purge" body: "*" }; + option (google.api.method_signature) = "name"; } // Pauses the queue. // // If a queue is paused then the system will stop dispatching tasks // until the queue is resumed via - // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can - // still be added when the queue is paused. A queue is paused if its - // [state][google.cloud.tasks.v2beta2.Queue.state] is - // [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added + // when the queue is paused. A queue is paused if its + // [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. rpc PauseQueue(PauseQueueRequest) returns (Queue) { option (google.api.http) = { post: "/v2beta2/{name=projects/*/locations/*/queues/*}:pause" body: "*" }; + option (google.api.method_signature) = "name"; } // Resume a queue. // // This method resumes a queue after it has been // [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or - // [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a - // queue is stored in the queue's - // [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method - // it will be set to - // [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. + // [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored + // in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it + // will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. // // WARNING: Resuming many high-QPS queues at the same time can // lead to target overloading. If you are resuming high-QPS @@ -160,27 +170,28 @@ service CloudTasks { post: "/v2beta2/{name=projects/*/locations/*/queues/*}:resume" body: "*" }; + option (google.api.method_signature) = "name"; } - // Gets the access control policy for a - // [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an empty policy if the - // resource exists and does not have a policy set. + // Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. + // Returns an empty policy if the resource exists and does not have a policy + // set. // // Authorization requires the following // [Google IAM](https://cloud.google.com/iam) permission on the specified // resource parent: // // * `cloudtasks.queues.getIamPolicy` - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v2beta2/{resource=projects/*/locations/*/queues/*}:getIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource"; } - // Sets the access control policy for a - // [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing policy. + // Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing + // policy. // // Note: The Cloud Console does not check queue-level IAM permissions yet. // Project-level permissions are required to use the Cloud Console. @@ -190,36 +201,35 @@ service CloudTasks { // resource parent: // // * `cloudtasks.queues.setIamPolicy` - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v2beta2/{resource=projects/*/locations/*/queues/*}:setIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource,policy"; } - // Returns permissions that a caller has on a - // [Queue][google.cloud.tasks.v2beta2.Queue]. If the resource does not exist, - // this will return an empty set of permissions, not a - // [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue]. + // If the resource does not exist, this will return an empty set of + // permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. // // Note: This operation is designed to be used for building permission-aware // UIs and command-line tools, not for authorization checking. This operation // may "fail open" without warning. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v2beta2/{resource=projects/*/locations/*/queues/*}:testIamPermissions" body: "*" }; + option (google.api.method_signature) = "resource,permissions"; } // Lists the tasks in a queue. // - // By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] - // view is retrieved due to performance considerations; - // [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] - // controls the subset of information which is returned. + // By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved + // due to performance considerations; + // [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the + // subset of information which is returned. // // The tasks may be returned in any order. The ordering may change at any // time. @@ -227,6 +237,7 @@ service CloudTasks { option (google.api.http) = { get: "/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks" }; + option (google.api.method_signature) = "parent"; } // Gets a task. @@ -234,22 +245,22 @@ service CloudTasks { option (google.api.http) = { get: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}" }; + option (google.api.method_signature) = "name"; } // Creates a task and adds it to a queue. // // Tasks cannot be updated after creation; there is no UpdateTask command. // - // * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], - // the maximum task size is + // * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is // 100KB. - // * For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum - // task size is 1MB. + // * For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB. rpc CreateTask(CreateTaskRequest) returns (Task) { option (google.api.http) = { post: "/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks" body: "*" }; + option (google.api.method_signature) = "parent,task"; } // Deletes a task. @@ -261,6 +272,7 @@ service CloudTasks { option (google.api.http) = { delete: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}" }; + option (google.api.method_signature) = "name"; } // Leases tasks from a pull queue for @@ -268,19 +280,18 @@ service CloudTasks { // // This method is invoked by the worker to obtain a lease. The // worker must acknowledge the task via - // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] - // after they have performed the work associated with the task. - // - // The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended - // to store data that the worker needs to perform the work associated with the - // task. To return the payloads in the - // [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set - // [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] - // to [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. - // - // A maximum of 10 qps of - // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests are - // allowed per queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have + // performed the work associated with the task. + // + // The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that + // the worker needs to perform the work associated with the task. To + // return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set + // [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to + // [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. + // + // A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] + // requests are allowed per + // queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] // is returned when this limit is // exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] // is also returned when @@ -291,18 +302,18 @@ service CloudTasks { post: "/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks:lease" body: "*" }; + option (google.api.method_signature) = "parent,lease_duration"; } // Acknowledges a pull task. // // The worker, that is, the entity that - // [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must - // call this method to indicate that the work associated with the task has - // finished. + // [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method + // to indicate that the work associated with the task has finished. // // The worker must acknowledge a task within the - // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] - // or the lease will expire and the task will become available to be leased + // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease + // will expire and the task will become available to be leased // again. After the task is acknowledged, it will not be returned // by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], // [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or @@ -312,85 +323,88 @@ service CloudTasks { post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:acknowledge" body: "*" }; + option (google.api.method_signature) = "name,schedule_time"; } // Renew the current lease of a pull task. // // The worker can use this method to extend the lease by a new // duration, starting from now. The new task lease will be - // returned in the task's - // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + // returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. rpc RenewLease(RenewLeaseRequest) returns (Task) { option (google.api.http) = { post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:renewLease" body: "*" }; + option (google.api.method_signature) = "name,schedule_time,lease_duration"; } // Cancel a pull task's lease. // // The worker can use this method to cancel a task's lease by - // setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] - // to now. This will make the task available to be leased to the next caller - // of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. + // setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will + // make the task available to be leased to the next caller of + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. rpc CancelLease(CancelLeaseRequest) returns (Task) { option (google.api.http) = { post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:cancelLease" body: "*" }; + option (google.api.method_signature) = "name,schedule_time"; } // Forces a task to run now. // // When this method is called, Cloud Tasks will dispatch the task, even if - // the task is already running, the queue has reached its - // [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or is - // [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + // the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or + // is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. // // This command is meant to be used for manual debugging. For - // example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be - // used to retry a failed task after a fix has been made or to manually force - // a task to be dispatched now. + // example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed + // task after a fix has been made or to manually force a task to be + // dispatched now. // // The dispatched task is returned. That is, the task that is returned - // contains the [status][google.cloud.tasks.v2beta2.Task.status] after the - // task is dispatched but before the task is received by its target. + // contains the [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but + // before the task is received by its target. // // If Cloud Tasks receives a successful response from the task's // target, then the task will be deleted; otherwise the task's - // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be - // reset to the time that - // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus - // the retry delay specified in the queue's - // [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified + // in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. // // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a // task that has already succeeded or permanently failed. // - // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called - // on a [pull task][google.cloud.tasks.v2beta2.PullMessage]. + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a + // [pull task][google.cloud.tasks.v2beta2.PullMessage]. rpc RunTask(RunTaskRequest) returns (Task) { option (google.api.http) = { post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:run" body: "*" }; + option (google.api.method_signature) = "name"; } } -// Request message for -// [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. +// Request message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. message ListQueuesRequest { - // Required. - // - // The location name. + // Required. The location name. // For example: `projects/PROJECT_ID/locations/LOCATION_ID` - string parent = 1; - - // `filter` can be used to specify a subset of queues. Any - // [Queue][google.cloud.tasks.v2beta2.Queue] field can be used as a filter and - // several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - // filter syntax is the same as described in [Stackdriver's Advanced Logs + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Queue" + } + ]; + + // `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue] + // field can be used as a filter and several operators as supported. + // For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as + // described in + // [Stackdriver's Advanced Logs // Filters](https://cloud.google.com/logging/docs/view/advanced_filters). // // Sample filter "app_engine_http_target: *". @@ -404,25 +418,22 @@ message ListQueuesRequest { // The maximum page size is 9800. If unspecified, the page size will // be the maximum. Fewer queues than requested might be returned, // even if more queues exist; use the - // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] - // in the response to determine if more queues exist. + // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] in the + // response to determine if more queues exist. int32 page_size = 3; // A token identifying the page of results to return. // // To request the first page results, page_token must be empty. To // request the next page of results, page_token must be the value of - // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] - // returned from the previous call to - // [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] method. It - // is an error to switch the value of the - // [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while - // iterating through pages. + // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] returned + // from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] + // method. It is an error to switch the value of the + // [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages. string page_token = 4; } -// Response message for -// [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. +// Response message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. message ListQueuesResponse { // The list of queues. repeated Queue queues = 1; @@ -430,8 +441,7 @@ message ListQueuesResponse { // A token to retrieve next page of results. // // To return the next page of results, call - // [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this - // value as the + // [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the // [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token]. // // If the next_page_token is empty, there are no more results. @@ -440,53 +450,49 @@ message ListQueuesResponse { string next_page_token = 2; } -// Request message for -// [GetQueue][google.cloud.tasks.v2beta2.CloudTasks.GetQueue]. +// Request message for [GetQueue][google.cloud.tasks.v2beta2.CloudTasks.GetQueue]. message GetQueueRequest { - // Required. - // - // The resource name of the queue. For example: + // Required. The resource name of the queue. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } -// Request message for -// [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue]. +// Request message for [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue]. message CreateQueueRequest { - // Required. - // - // The location name in which the queue will be created. + // Required. The location name in which the queue will be created. // For example: `projects/PROJECT_ID/locations/LOCATION_ID` // // The list of allowed locations can be obtained by calling Cloud // Tasks' implementation of // [ListLocations][google.cloud.location.Locations.ListLocations]. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Queue" + } + ]; - // Required. + // Required. The queue to create. // - // The queue to create. - // - // [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as - // an existing queue. - Queue queue = 2; + // [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue. + Queue queue = 2 [(google.api.field_behavior) = REQUIRED]; } -// Request message for -// [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue]. +// Request message for [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue]. message UpdateQueueRequest { - // Required. - // - // The queue to create or update. + // Required. The queue to create or update. // - // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be - // specified. + // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified. // // Output only fields cannot be modified using UpdateQueue. // Any value specified for an output only field will be ignored. - // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be - // changed. - Queue queue = 1; + // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed. + Queue queue = 1 [(google.api.field_behavior) = REQUIRED]; // A mask used to specify which fields of the queue are being updated. // @@ -494,93 +500,102 @@ message UpdateQueueRequest { google.protobuf.FieldMask update_mask = 2; } -// Request message for -// [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. +// Request message for [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. message DeleteQueueRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } -// Request message for -// [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue]. +// Request message for [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue]. message PurgeQueueRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } -// Request message for -// [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue]. +// Request message for [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue]. message PauseQueueRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } -// Request message for -// [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. +// Request message for [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. message ResumeQueueRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } -// Request message for listing tasks using -// [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. +// Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. message ListTasksRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - string parent = 1; - - // The response_view specifies which subset of the - // [Task][google.cloud.tasks.v2beta2.Task] will be returned. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Task" + } + ]; + + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. // - // By default response_view is - // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - // retrieved by default because some data, such as payloads, might be - // desirable to return only when needed because of its large size or because - // of the sensitivity of data that it contains. + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - // requires `cloudtasks.tasks.fullView` [Google - // IAM](https://cloud.google.com/iam/) permission on the - // [Task][google.cloud.tasks.v2beta2.Task] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 2; - // Requested page size. Fewer tasks than requested might be returned. + // Maximum page size. // - // The maximum page size is 1000. If unspecified, the page size will - // be the maximum. Fewer tasks than requested might be returned, - // even if more tasks exist; use - // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] - // in the response to determine if more tasks exist. + // Fewer tasks than requested might be returned, even if more tasks exist; use + // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] in the response to + // determine if more tasks exist. + // + // The maximum page size is 1000. If unspecified, the page size will be the + // maximum. int32 page_size = 4; // A token identifying the page of results to return. // // To request the first page results, page_token must be empty. To // request the next page of results, page_token must be the value of - // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] - // returned from the previous call to - // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] method. + // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] returned + // from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] + // method. // // The page token is valid for only 2 hours. string page_token = 5; } -// Response message for listing tasks using -// [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. +// Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. message ListTasksResponse { // The list of tasks. repeated Task tasks = 1; @@ -588,63 +603,63 @@ message ListTasksResponse { // A token to retrieve next page of results. // // To return the next page of results, call - // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this - // value as the + // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the // [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token]. // // If the next_page_token is empty, there are no more results. string next_page_token = 2; } -// Request message for getting a task using -// [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask]. +// Request message for getting a task using [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask]. message GetTaskRequest { - // Required. - // - // The task name. For example: + // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - string name = 1; - - // The response_view specifies which subset of the - // [Task][google.cloud.tasks.v2beta2.Task] will be returned. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Task" + } + ]; + + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. // - // By default response_view is - // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - // retrieved by default because some data, such as payloads, might be - // desirable to return only when needed because of its large size or because - // of the sensitivity of data that it contains. + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - // requires `cloudtasks.tasks.fullView` [Google - // IAM](https://cloud.google.com/iam/) permission on the - // [Task][google.cloud.tasks.v2beta2.Task] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 2; } -// Request message for -// [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. +// Request message for [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. message CreateTaskRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` // // The queue must already exist. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Task" + } + ]; - // Required. - // - // The task to add. + // Required. The task to add. // // Task names have the following format: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - // The user can optionally specify a task - // [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not specified - // then the system will generate a random unique task id, which will be set in - // the task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. + // The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a + // name is not specified then the system will generate a random + // unique task id, which will be set in the task returned in the + // [response][google.cloud.tasks.v2beta2.Task.name]. // - // If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not - // set or is in the past then Cloud Tasks will set it to the current time. + // If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the + // past then Cloud Tasks will set it to the current time. // // Task De-duplication: // @@ -659,50 +674,54 @@ message CreateTaskRequest { // for ~9days after the original task was deleted or completed. // // Because there is an extra lookup cost to identify duplicate task - // names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] - // calls have significantly increased latency. Using hashed strings for the - // task id or for the prefix of the task id is recommended. Choosing task ids - // that are sequential or have sequential prefixes, for example using a + // names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly + // increased latency. Using hashed strings for the task id or for + // the prefix of the task id is recommended. Choosing task ids that + // are sequential or have sequential prefixes, for example using a // timestamp, causes an increase in latency and error rates in all // task commands. The infrastructure relies on an approximately // uniform distribution of task ids to store and serve tasks // efficiently. - Task task = 2; + Task task = 2 [(google.api.field_behavior) = REQUIRED]; - // The response_view specifies which subset of the - // [Task][google.cloud.tasks.v2beta2.Task] will be returned. + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. // - // By default response_view is - // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - // retrieved by default because some data, such as payloads, might be - // desirable to return only when needed because of its large size or because - // of the sensitivity of data that it contains. + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - // requires `cloudtasks.tasks.fullView` [Google - // IAM](https://cloud.google.com/iam/) permission on the - // [Task][google.cloud.tasks.v2beta2.Task] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 3; } // Request message for deleting a task using // [DeleteTask][google.cloud.tasks.v2beta2.CloudTasks.DeleteTask]. message DeleteTaskRequest { - // Required. - // - // The task name. For example: + // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Task" + } + ]; } -// Request message for leasing tasks using -// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. +// Request message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. message LeaseTasksRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Task" + } + ]; // The maximum number of tasks to lease. // @@ -710,47 +729,57 @@ message LeaseTasksRequest { // `max_tasks` as possible. // // The largest that `max_tasks` can be is 1000. + // + // The maximum total size of a [lease tasks response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is + // 32 MB. If the sum of all task sizes requested reaches this limit, + // fewer tasks than requested are returned. int32 max_tasks = 2; + // Required. The duration of the lease. + // + // Each task returned in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will + // have its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the current + // time plus the `lease_duration`. The task is leased until its + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the task will not be + // returned to another [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call + // before its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + // // // After the worker has successfully finished the work associated // with the task, the worker must call via - // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] - // before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. - // Otherwise the task will be returned to a later - // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that - // another worker can retry it. + // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be + // returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so + // that another worker can retry it. // // The maximum lease duration is 1 week. // `lease_duration` will be truncated to the nearest second. - google.protobuf.Duration lease_duration = 3; + google.protobuf.Duration lease_duration = 3 [(google.api.field_behavior) = REQUIRED]; - // The response_view specifies which subset of the - // [Task][google.cloud.tasks.v2beta2.Task] will be returned. + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. // - // By default response_view is - // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - // retrieved by default because some data, such as payloads, might be - // desirable to return only when needed because of its large size or because - // of the sensitivity of data that it contains. + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - // requires `cloudtasks.tasks.fullView` [Google - // IAM](https://cloud.google.com/iam/) permission on the - // [Task][google.cloud.tasks.v2beta2.Task] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 4; // `filter` can be used to specify a subset of tasks to lease. // // When `filter` is set to `tag=` then the - // [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only - // tasks whose [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to - // ``. `` must be less than 500 characters. + // [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose + // [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to ``. `` must be + // less than 500 characters. // // When `filter` is set to `tag_function=oldest_tag()`, only tasks which have // the same tag as the task with the oldest - // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be - // returned. + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned. // // Grammar Syntax: // @@ -768,14 +797,12 @@ message LeaseTasksRequest { // [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), // only UTF-8 encoded tags can be used in Cloud Tasks. Tag which // aren't UTF-8 encoded can't be used in the - // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the - // task's [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed - // as empty in Cloud Tasks. + // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task's + // [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks. string filter = 5; } -// Response message for leasing tasks using -// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. +// Response message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. message LeaseTasksResponse { // The leased tasks. repeated Task tasks = 1; @@ -784,120 +811,121 @@ message LeaseTasksResponse { // Request message for acknowledging a task using // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask]. message AcknowledgeTaskRequest { - // Required. - // - // The task name. For example: + // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - string name = 1; - - // Required. - // - // The task's current schedule time, available in the + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Task" + } + ]; + + // Required. The task's current schedule time, available in the // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - // This restriction is to ensure that your worker currently holds the lease. - google.protobuf.Timestamp schedule_time = 2; + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is + // to ensure that your worker currently holds the lease. + google.protobuf.Timestamp schedule_time = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for renewing a lease using // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease]. message RenewLeaseRequest { - // Required. - // - // The task name. For example: + // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - string name = 1; - - // Required. - // - // The task's current schedule time, available in the + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Task" + } + ]; + + // Required. The task's current schedule time, available in the // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - // This restriction is to ensure that your worker currently holds the lease. - google.protobuf.Timestamp schedule_time = 2; + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is + // to ensure that your worker currently holds the lease. + google.protobuf.Timestamp schedule_time = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. - // - // The desired new lease duration, starting from now. + // Required. The desired new lease duration, starting from now. // // // The maximum lease duration is 1 week. // `lease_duration` will be truncated to the nearest second. - google.protobuf.Duration lease_duration = 3; + google.protobuf.Duration lease_duration = 3 [(google.api.field_behavior) = REQUIRED]; - // The response_view specifies which subset of the - // [Task][google.cloud.tasks.v2beta2.Task] will be returned. + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. // - // By default response_view is - // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - // retrieved by default because some data, such as payloads, might be - // desirable to return only when needed because of its large size or because - // of the sensitivity of data that it contains. + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - // requires `cloudtasks.tasks.fullView` [Google - // IAM](https://cloud.google.com/iam/) permission on the - // [Task][google.cloud.tasks.v2beta2.Task] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 4; } // Request message for canceling a lease using // [CancelLease][google.cloud.tasks.v2beta2.CloudTasks.CancelLease]. message CancelLeaseRequest { - // Required. - // - // The task name. For example: + // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - string name = 1; - - // Required. - // - // The task's current schedule time, available in the + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Task" + } + ]; + + // Required. The task's current schedule time, available in the // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - // This restriction is to ensure that your worker currently holds the lease. - google.protobuf.Timestamp schedule_time = 2; - - // The response_view specifies which subset of the - // [Task][google.cloud.tasks.v2beta2.Task] will be returned. - // - // By default response_view is - // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - // retrieved by default because some data, such as payloads, might be - // desirable to return only when needed because of its large size or because - // of the sensitivity of data that it contains. - // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - // requires `cloudtasks.tasks.fullView` [Google - // IAM](https://cloud.google.com/iam/) permission on the - // [Task][google.cloud.tasks.v2beta2.Task] resource. + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is + // to ensure that your worker currently holds the lease. + google.protobuf.Timestamp schedule_time = 2 [(google.api.field_behavior) = REQUIRED]; + + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 3; } // Request message for forcing a task to run now using // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask]. message RunTaskRequest { - // Required. - // - // The task name. For example: + // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - string name = 1; - - // The response_view specifies which subset of the - // [Task][google.cloud.tasks.v2beta2.Task] will be returned. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Task" + } + ]; + + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. // - // By default response_view is - // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - // retrieved by default because some data, such as payloads, might be - // desirable to return only when needed because of its large size or because - // of the sensitivity of data that it contains. + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - // requires `cloudtasks.tasks.fullView` [Google - // IAM](https://cloud.google.com/iam/) permission on the - // [Task][google.cloud.tasks.v2beta2.Task] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 2; } diff --git a/google/cloud/tasks/v2beta2/cloudtasks_gapic.legacy.yaml b/google/cloud/tasks/v2beta2/cloudtasks_gapic.legacy.yaml new file mode 100644 index 000000000..28584daa9 --- /dev/null +++ b/google/cloud/tasks/v2beta2/cloudtasks_gapic.legacy.yaml @@ -0,0 +1,511 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.tasks.v2beta2 + python: + package_name: google.cloud.tasks_v2beta2.gapic + go: + package_name: cloud.google.com/go/cloudtasks/apiv2beta2 + csharp: + package_name: Google.Cloud.Tasks.V2Beta2 + ruby: + package_name: Google::Cloud::Tasks::V2beta2 + php: + package_name: Google\Cloud\Tasks\V2beta2 + nodejs: + package_name: tasks.v2beta2 +# A list of API interface configurations. +interfaces: +- name: google.cloud.tasks.v2beta2.CloudTasks + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/queues/{queue} + entity_name: queue + - name_pattern: projects/{project}/locations/{location}/queues/{queue}/tasks/{task} + entity_name: task + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListQueues + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + header_request_params: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: queues + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 10000 + - name: GetQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: CreateQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + - queue + required_fields: + - parent + - queue + header_request_params: + - parent + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 10000 + - name: UpdateQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - queue + - update_mask + required_fields: + - queue + header_request_params: + - queue.name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + queue.name: queue + timeout_millis: 10000 + - name: DeleteQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: PurgeQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: PauseQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: ResumeQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: GetIamPolicy + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - resource + required_fields: + - resource + header_request_params: + - resource + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + resource: queue + timeout_millis: 10000 + - name: SetIamPolicy + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + header_request_params: + - resource + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: queue + timeout_millis: 10000 + - name: TestIamPermissions + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + header_request_params: + - resource + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + resource: queue + timeout_millis: 10000 + - name: ListTasks + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + header_request_params: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: tasks + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: queue + timeout_millis: 10000 + - name: GetTask + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: task + timeout_millis: 10000 + - name: CreateTask + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + - task + required_fields: + - parent + - task + header_request_params: + - parent + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: queue + timeout_millis: 10000 + - name: DeleteTask + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: task + timeout_millis: 10000 + - name: LeaseTasks + resource_name_treatment: STATIC_TYPES + required_fields: + - parent + - lease_duration + header_request_params: + - parent + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: queue + timeout_millis: 10000 + - name: AcknowledgeTask + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + - schedule_time + required_fields: + - name + - schedule_time + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: task + timeout_millis: 10000 + - name: RenewLease + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + - schedule_time + - lease_duration + required_fields: + - name + - schedule_time + - lease_duration + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: task + timeout_millis: 10000 + - name: CancelLease + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + - schedule_time + required_fields: + - name + - schedule_time + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: task + timeout_millis: 10000 + - name: RunTask + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: task + timeout_millis: 10000 +resource_name_generation: +- message_name: Queue + field_entity_map: + name: queue +- message_name: Task + field_entity_map: + name: task +- message_name: ListQueuesRequest + field_entity_map: + parent: location +- message_name: GetQueueRequest + field_entity_map: + name: queue +- message_name: CreateQueueRequest + field_entity_map: + parent: location +- message_name: UpdateQueueRequest + field_entity_map: + queue.name: queue +- message_name: DeleteQueueRequest + field_entity_map: + name: queue +- message_name: PurgeQueueRequest + field_entity_map: + name: queue +- message_name: PauseQueueRequest + field_entity_map: + name: queue +- message_name: ResumeQueueRequest + field_entity_map: + name: queue +- message_name: ListTasksRequest + field_entity_map: + parent: queue +- message_name: GetTaskRequest + field_entity_map: + name: task +- message_name: CreateTaskRequest + field_entity_map: + parent: queue +- message_name: DeleteTaskRequest + field_entity_map: + name: task +- message_name: LeaseTasksRequest + field_entity_map: + parent: queue +- message_name: AcknowledgeTaskRequest + field_entity_map: + name: task +- message_name: RenewLeaseRequest + field_entity_map: + name: task +- message_name: CancelLeaseRequest + field_entity_map: + name: task +- message_name: RunTaskRequest + field_entity_map: + name: task +- message_name: google.iam.v1.GetIamPolicyRequest + field_entity_map: + resource: "*" +- message_name: google.iam.v1.SetIamPolicyRequest + field_entity_map: + resource: "*" +- message_name: google.iam.v1.TestIamPermissionsRequest + field_entity_map: + resource: "*" diff --git a/google/cloud/tasks/v2beta2/cloudtasks_gapic.yaml b/google/cloud/tasks/v2beta2/cloudtasks_gapic.yaml index d0693fe5f..956f2d082 100644 --- a/google/cloud/tasks/v2beta2/cloudtasks_gapic.yaml +++ b/google/cloud/tasks/v2beta2/cloudtasks_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -16,497 +16,51 @@ language_settings: package_name: Google\Cloud\Tasks\V2beta2 nodejs: package_name: tasks.v2beta2 -# A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.cloud.tasks.v2beta2.CloudTasks - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - - name_pattern: projects/{project}/locations/{location} - entity_name: location - - name_pattern: projects/{project}/locations/{location}/queues/{queue} - entity_name: queue - - name_pattern: projects/{project}/locations/{location}/queues/{queue}/tasks/{task} - entity_name: task - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: ListQueues - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - header_request_params: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: queues - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: location timeout_millis: 10000 - name: GetQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: CreateQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - - queue - required_fields: - - parent - - queue - header_request_params: - - parent - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location timeout_millis: 10000 - name: UpdateQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - queue - - update_mask - required_fields: - - queue - header_request_params: - - queue.name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - queue.name: queue timeout_millis: 10000 - name: DeleteQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: PurgeQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: PauseQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: ResumeQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: GetIamPolicy - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - resource - required_fields: - - resource - header_request_params: - - resource retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - resource: queue timeout_millis: 10000 - name: SetIamPolicy - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - resource - - policy - required_fields: - - resource - - policy - header_request_params: - - resource - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: queue timeout_millis: 10000 - name: TestIamPermissions - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - resource - - permissions - required_fields: - - resource - - permissions - header_request_params: - - resource retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - resource: queue timeout_millis: 10000 - name: ListTasks - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - header_request_params: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: tasks - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: queue timeout_millis: 10000 - name: GetTask - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: task timeout_millis: 10000 - name: CreateTask - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - - task - required_fields: - - parent - - task - header_request_params: - - parent - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: queue timeout_millis: 10000 - name: DeleteTask - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: task timeout_millis: 10000 - name: LeaseTasks - resource_name_treatment: STATIC_TYPES - required_fields: - - parent - - lease_duration - header_request_params: - - parent - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: queue timeout_millis: 10000 - name: AcknowledgeTask - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - - schedule_time - required_fields: - - name - - schedule_time - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: task timeout_millis: 10000 - name: RenewLease - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - - schedule_time - - lease_duration - required_fields: - - name - - schedule_time - - lease_duration - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: task timeout_millis: 10000 - name: CancelLease - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - - schedule_time - required_fields: - - name - - schedule_time - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: task timeout_millis: 10000 - name: RunTask - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: task timeout_millis: 10000 -resource_name_generation: -- message_name: Queue - field_entity_map: - name: queue -- message_name: Task - field_entity_map: - name: task -- message_name: ListQueuesRequest - field_entity_map: - parent: location -- message_name: GetQueueRequest - field_entity_map: - name: queue -- message_name: CreateQueueRequest - field_entity_map: - parent: location -- message_name: UpdateQueueRequest - field_entity_map: - queue.name: queue -- message_name: DeleteQueueRequest - field_entity_map: - name: queue -- message_name: PurgeQueueRequest - field_entity_map: - name: queue -- message_name: PauseQueueRequest - field_entity_map: - name: queue -- message_name: ResumeQueueRequest - field_entity_map: - name: queue -- message_name: ListTasksRequest - field_entity_map: - parent: queue -- message_name: GetTaskRequest - field_entity_map: - name: task -- message_name: CreateTaskRequest - field_entity_map: - parent: queue -- message_name: DeleteTaskRequest - field_entity_map: - name: task -- message_name: LeaseTasksRequest - field_entity_map: - parent: queue -- message_name: AcknowledgeTaskRequest - field_entity_map: - name: task -- message_name: RenewLeaseRequest - field_entity_map: - name: task -- message_name: CancelLeaseRequest - field_entity_map: - name: task -- message_name: RunTaskRequest - field_entity_map: - name: task -- message_name: google.iam.v1.GetIamPolicyRequest - field_entity_map: - resource: "*" -- message_name: google.iam.v1.SetIamPolicyRequest - field_entity_map: - resource: "*" -- message_name: google.iam.v1.TestIamPermissionsRequest - field_entity_map: - resource: "*" diff --git a/google/cloud/tasks/v2beta2/cloudtasks_grpc_service_config.json b/google/cloud/tasks/v2beta2/cloudtasks_grpc_service_config.json new file mode 100755 index 000000000..9cb9f37da --- /dev/null +++ b/google/cloud/tasks/v2beta2/cloudtasks_grpc_service_config.json @@ -0,0 +1,103 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "ListQueues" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "GetQueue" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "DeleteQueue" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "GetIamPolicy" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "TestIamPermissions" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "ListTasks" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "GetTask" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "DeleteTask" + } + ], + "timeout": "10s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "10s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "CreateQueue" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "UpdateQueue" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "PurgeQueue" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "PauseQueue" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "ResumeQueue" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "SetIamPolicy" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "CreateTask" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "LeaseTasks" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "AcknowledgeTask" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "RenewLease" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "CancelLease" + }, + { + "service": "google.cloud.tasks.v2beta2.CloudTasks", + "method": "RunTask" + } + ], + "timeout": "10s" + } + ] +} diff --git a/google/cloud/tasks/v2beta2/cloudtasks_v2beta2.yaml b/google/cloud/tasks/v2beta2/cloudtasks_v2beta2.yaml new file mode 100644 index 000000000..6e29e8ac0 --- /dev/null +++ b/google/cloud/tasks/v2beta2/cloudtasks_v2beta2.yaml @@ -0,0 +1,29 @@ +type: google.api.Service +config_version: 3 +name: cloudtasks.googleapis.com +title: Cloud Tasks API + +apis: +- name: google.cloud.tasks.v2beta2.CloudTasks + +documentation: + summary: Manages the execution of large numbers of distributed requests. + overview: |- + Cloud Tasks manages the execution of large numbers of distributed + requests. + + For more information, see https://cloud.google.com/tasks/. + +backend: + rules: + - selector: 'google.cloud.tasks.v2beta2.CloudTasks.*' + deadline: 10.0 + - selector: google.cloud.tasks.v2beta2.CloudTasks.ListQueues + deadline: 15.0 + +authentication: + rules: + - selector: 'google.cloud.tasks.v2beta2.CloudTasks.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/tasks/v2beta2/queue.proto b/google/cloud/tasks/v2beta2/queue.proto index 3aa4b80b3..212ab7384 100644 --- a/google/cloud/tasks/v2beta2/queue.proto +++ b/google/cloud/tasks/v2beta2/queue.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,17 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.tasks.v2beta2; -import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/tasks/v2beta2/target.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2;tasks"; option java_multiple_files = true; @@ -30,6 +32,11 @@ option java_package = "com.google.cloud.tasks.v2beta2"; // how those tasks are dispatched. Configurable properties include rate limits, // retry options, target types, and others. message Queue { + option (google.api.resource) = { + type: "cloudtasks.googleapis.com/Queue" + pattern: "projects/{project}/locations/{location}/queues/{queue}" + }; + // State of the queue. enum State { // Unspecified state. @@ -48,8 +55,8 @@ message Queue { // Tasks are paused by the user. If the queue is paused then Cloud // Tasks will stop delivering tasks from it, but more tasks can // still be added to it by the user. When a pull queue is paused, - // all [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls - // will return a [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION]. + // all [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls will return a + // [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION]. PAUSED = 2; // The queue is disabled. @@ -63,17 +70,16 @@ message Queue { // // When a queue is disabled, tasks can still be added to a queue // but the tasks are not dispatched and - // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls - // return a `FAILED_PRECONDITION` error. + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls return a + // `FAILED_PRECONDITION` error. // // To permanently delete this queue and all of its tasks, call // [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. DISABLED = 3; } - // Caller-specified and required in - // [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], after - // which it becomes output only. + // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], + // after which it becomes output only. // // The queue name. // @@ -93,10 +99,9 @@ message Queue { // hyphens (-). The maximum length is 100 characters. string name = 1; - // Caller-specified and required in - // [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue][], after - // which the queue config type becomes output only, though fields within the - // config are mutable. + // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue][], + // after which the queue config type becomes output only, though fields within + // the config are mutable. // // The queue's target. // @@ -104,34 +109,30 @@ message Queue { oneof target_type { // App Engine HTTP target. // - // An App Engine queue is a queue that has an - // [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget]. + // An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget]. AppEngineHttpTarget app_engine_http_target = 3; // Pull target. // - // A pull queue is a queue that has a - // [PullTarget][google.cloud.tasks.v2beta2.PullTarget]. + // A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget]. PullTarget pull_target = 4; } // Rate limits for task dispatches. // // [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and - // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related - // because they both control task attempts however they control how tasks are + // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both + // control task attempts however they control how tasks are // attempted in different ways: // - // * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the - // total rate of + // * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of // dispatches from a queue (i.e. all traffic dispatched from the // queue, regardless of whether the dispatch is from a first // attempt or a retry). - // * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls - // what happens to + // * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to // particular a task after its first attempt fails. That is, - // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls - // task retries (the second attempt, third attempt, etc). + // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the + // second attempt, third attempt, etc). RateLimits rate_limits = 5; // Settings that determine the retry behavior. @@ -150,21 +151,18 @@ message Queue { // // `state` can only be changed by called // [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], - // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or - // uploading + // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading // [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be - // used to change `state`. + // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`. State state = 7; // Output only. The last time this queue was purged. // - // All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] - // before this time were purged. + // All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time + // were purged. // - // A queue can be purged using - // [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the [App - // Engine Task Queue SDK, or the Cloud + // A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the + // [App Engine Task Queue SDK, or the Cloud // Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). // // Purge time will be truncated to the nearest microsecond. Purge @@ -177,24 +175,19 @@ message Queue { // This message determines the maximum rate that tasks can be dispatched by a // queue, regardless of whether the dispatch is a first task attempt or a retry. // -// Note: The debugging command, -// [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask], will run a task -// even if the queue has reached its -// [RateLimits][google.cloud.tasks.v2beta2.RateLimits]. +// Note: The debugging command, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask], will run a task +// even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits]. message RateLimits { // The maximum rate at which tasks are dispatched from this queue. // // If unspecified when the queue is created, Cloud Tasks will pick the // default. // - // * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], - // the maximum allowed value + // * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum allowed value // is 500. - // * This field is output only for [pull - // queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the + // * This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the // `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of - // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests - // are allowed per pull queue. + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests are allowed per pull queue. // // // This field has the same meaning as @@ -227,9 +220,9 @@ message RateLimits { // `queue.yaml/xml`, `max_burst_size` is equal to // [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). // Since `max_burst_size` is output only, if - // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called - // on a queue created by `queue.yaml/xml`, `max_burst_size` will be reset - // based on the value of + // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue + // created by `queue.yaml/xml`, `max_burst_size` will be reset based + // on the value of // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second], // regardless of whether // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] @@ -249,9 +242,8 @@ message RateLimits { // The maximum allowed value is 5,000. // // This field is output only for - // [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which - // indicates no limit. No other queue types can have `max_concurrent_tasks` - // set to -1. + // [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which indicates no limit. No other + // queue types can have `max_concurrent_tasks` set to -1. // // // This field has the same meaning as @@ -289,17 +281,16 @@ message RetryConfig { // If positive, `max_retry_duration` specifies the time limit for // retrying a failed task, measured from when the task was first // attempted. Once `max_retry_duration` time has passed *and* the - // task has been attempted - // [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times, - // no further attempts will be made and the task will be deleted. + // task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] + // times, no further attempts will be made and the task will be + // deleted. // // If zero, then the task age is unlimited. // // If unspecified when the queue is created, Cloud Tasks will pick the // default. // - // This field is output only for [pull - // queues][google.cloud.tasks.v2beta2.PullTarget]. + // This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. // // // `max_retry_duration` will be truncated to the nearest second. @@ -309,19 +300,16 @@ message RetryConfig { // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). google.protobuf.Duration max_retry_duration = 3; - // A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] - // for retry between + // A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] for retry between // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and - // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration - // after it fails, if the queue's - // [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the - // task should be retried. + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails, + // if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be + // retried. // // If unspecified when the queue is created, Cloud Tasks will pick the // default. // - // This field is output only for [pull - // queues][google.cloud.tasks.v2beta2.PullTarget]. + // This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. // // // `min_backoff` will be truncated to the nearest second. @@ -331,19 +319,16 @@ message RetryConfig { // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). google.protobuf.Duration min_backoff = 4; - // A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] - // for retry between + // A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] for retry between // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and - // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration - // after it fails, if the queue's - // [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the - // task should be retried. + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails, + // if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be + // retried. // // If unspecified when the queue is created, Cloud Tasks will pick the // default. // - // This field is output only for [pull - // queues][google.cloud.tasks.v2beta2.PullTarget]. + // This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. // // // `max_backoff` will be truncated to the nearest second. @@ -356,29 +341,26 @@ message RetryConfig { // The time between retries will double `max_doublings` times. // // A task's retry interval starts at - // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then - // doubles `max_doublings` times, then increases linearly, and finally retries - // retries at intervals of + // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles + // `max_doublings` times, then increases linearly, and finally + // retries retries at intervals of // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to // [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. // - // For example, if - // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, - // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, - // and `max_doublings` is 3, then the a task will first be retried in 10s. The - // retry interval will double three times, and then increase linearly by 2^3 * - // 10s. Finally, the task will retry at intervals of - // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the - // task has been attempted - // [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. - // Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, - // 300s, .... + // For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, and + // `max_doublings` is 3, then the a task will first be retried in + // 10s. The retry interval will double three times, and then + // increase linearly by 2^3 * 10s. Finally, the task will retry at + // intervals of [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the + // task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] + // times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, + // 240s, 300s, 300s, .... // // If unspecified when the queue is created, Cloud Tasks will pick the // default. // - // This field is output only for [pull - // queues][google.cloud.tasks.v2beta2.PullTarget]. + // This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. // // // This field has the same meaning as diff --git a/google/cloud/tasks/v2beta2/target.proto b/google/cloud/tasks/v2beta2/target.proto index ae1b5555d..decdbaf8b 100644 --- a/google/cloud/tasks/v2beta2/target.proto +++ b/google/cloud/tasks/v2beta2/target.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.tasks.v2beta2; import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2;tasks"; option java_multiple_files = true; @@ -25,11 +25,12 @@ option java_outer_classname = "TargetProto"; option java_package = "com.google.cloud.tasks.v2beta2"; // Pull target. -message PullTarget {} +message PullTarget { + +} // The pull message contains data that can be used by the caller of -// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the -// task. +// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. // // This proto can only be used for tasks in a queue which has // [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] set. @@ -41,11 +42,10 @@ message PullMessage { // // Tags allow similar tasks to be processed in a batch. If you label // tasks with a tag, your worker can - // [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the - // same tag using - // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, - // if you want to aggregate the events associated with a specific user once a - // day, you could tag tasks with the user ID. + // [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using + // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to + // aggregate the events associated with a specific user once a day, + // you could tag tasks with the user ID. // // The task's tag can only be set when the // [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. @@ -63,15 +63,11 @@ message PullMessage { // App Engine HTTP target. // // The task will be delivered to the App Engine application hostname -// specified by its -// [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] and -// [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest]. The -// documentation for -// [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] -// explains how the task's host URL is constructed. +// specified by its [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] and [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest]. +// The documentation for [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] explains how the +// task's host URL is constructed. // -// Using [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] -// requires +// Using [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] requires // [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) // Google IAM permission for the project // and the following scope: @@ -79,13 +75,11 @@ message PullMessage { // `https://www.googleapis.com/auth/cloud-platform` message AppEngineHttpTarget { // Overrides for the - // [task-level - // app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. // // If set, `app_engine_routing_override` is used for all tasks in // the queue, no matter what the setting is for the - // [task-level - // app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. AppEngineRouting app_engine_routing_override = 1; } @@ -95,11 +89,9 @@ message AppEngineHttpTarget { // the task is dispatched. // // This proto can only be used for tasks in a queue which has -// [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] -// set. +// [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] set. // -// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] -// requires +// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] requires // [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) // Google IAM permission for the project // and the following scope: @@ -113,17 +105,20 @@ message AppEngineHttpTarget { // and how routing is affected by // [dispatch // files](https://cloud.google.com/appengine/docs/python/config/dispatchref). +// Traffic is encrypted during transport and never leaves Google datacenters. +// Because this traffic is carried over a communication mechanism internal to +// Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). +// The request to the handler, however, will appear to have used the HTTP +// protocol. // -// The [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used to -// construct the URL that the task is delivered to can be set at the queue-level -// or task-level: +// The [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used to construct the URL that the task is +// delivered to can be set at the queue-level or task-level: // // * If set, // [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] // is used for all tasks in the queue, no matter what the setting // is for the -// [task-level -// app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. +// [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. // // // The `url` that the task will be sent to is: @@ -131,13 +126,27 @@ message AppEngineHttpTarget { // * `url =` [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] `+` // [relative_url][google.cloud.tasks.v2beta2.AppEngineHttpRequest.relative_url] // -// The task attempt has succeeded if the app's request handler returns -// an HTTP response code in the range [`200` - `299`]. `503` is -// considered an App Engine system error instead of an application -// error. Requests returning error `503` will be retried regardless of -// retry configuration and not counted against retry counts. -// Any other response code or a failure to receive a response before the -// deadline is a failed attempt. +// Tasks can be dispatched to secure app handlers, unsecure app handlers, and +// URIs restricted with +// [`login: +// admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). +// Because tasks are not run as any user, they cannot be dispatched to URIs +// restricted with +// [`login: +// required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) +// Task dispatches also do not follow redirects. +// +// The task attempt has succeeded if the app's request handler returns an HTTP +// response code in the range [`200` - `299`]. The task attempt has failed if +// the app's handler returns a non-2xx response code or Cloud Tasks does +// not receive response before the [deadline][Task.dispatch_deadline]. Failed +// tasks will be retried according to the +// [retry configuration][google.cloud.tasks.v2beta2.Queue.retry_config]. `503` (Service Unavailable) is +// considered an App Engine system error instead of an application error and +// will cause Cloud Tasks' traffic congestion control to temporarily throttle +// the queue's dispatches. Unlike other types of task targets, a `429` (Too Many +// Requests) response from an app handler does not cause traffic congestion +// control to throttle the queue. message AppEngineHttpRequest { // The HTTP method to use for the request. The default is POST. // @@ -157,8 +166,7 @@ message AppEngineHttpRequest { // If set, // [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] // is used for all tasks in the queue, no matter what the setting is for the - // [task-level - // app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. AppEngineRouting app_engine_routing = 2; // The relative URL. @@ -184,8 +192,7 @@ message AppEngineHttpRequest { // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the // modified `User-Agent`. // - // If the task has a - // [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud + // If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud // Tasks sets the following headers: // // * `Content-Type`: By default, the `Content-Type` header is set to @@ -210,10 +217,8 @@ message AppEngineHttpRequest { // visible when the task is returned in a Cloud Tasks response. // // Although there is no specific limit for the maximum number of headers or - // the size, there is a limit on the maximum size of the - // [Task][google.cloud.tasks.v2beta2.Task]. For more information, see the - // [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] - // documentation. + // the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more + // information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation. map headers = 4; // Payload. @@ -227,6 +232,9 @@ message AppEngineHttpRequest { // App Engine Routing. // +// Defines routing characteristics specific to App Engine - service, version, +// and instance. +// // For more information about services, versions, and instances see // [An Overview of App // Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), @@ -243,18 +251,16 @@ message AppEngineRouting { // service when the task is attempted. // // For some queues or tasks which were created using the App Engine - // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is - // not parsable into - // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable + // into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For - // example, some tasks which were created using the App Engine SDK use a - // custom domain name; custom domains are not parsed by Cloud Tasks. If - // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, - // then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks + // which were created using the App Engine SDK use a custom domain + // name; custom domains are not parsed by Cloud Tasks. If + // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the - // empty string. + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string. string service = 1; // App version. @@ -263,18 +269,16 @@ message AppEngineRouting { // version when the task is attempted. // // For some queues or tasks which were created using the App Engine - // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is - // not parsable into - // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable + // into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For - // example, some tasks which were created using the App Engine SDK use a - // custom domain name; custom domains are not parsed by Cloud Tasks. If - // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, - // then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks + // which were created using the App Engine SDK use a custom domain + // name; custom domains are not parsed by Cloud Tasks. If + // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the - // empty string. + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string. string version = 2; // App instance. @@ -315,49 +319,44 @@ message AppEngineRouting { // queue's project ID. Some tasks which were created using the App Engine // SDK use a custom domain name. // - // * `service =` - // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] // - // * `version =` - // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + // * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] // // * `version_dot_service =` // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] // - // * `instance =` - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] + // * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] // // * `instance_dot_service =` - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - // +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] // // * `instance_dot_version =` - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - // +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] // // * `instance_dot_version_dot_service =` - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - // +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' - // +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] // - // If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, - // then the task will be sent to the service which is the default service when - // the task is attempted. + // If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent + // to the service which is the default service when the task is attempted. // - // If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, - // then the task will be sent to the version which is the default version when - // the task is attempted. + // If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent + // to the version which is the default version when the task is attempted. // - // If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is - // empty, then the task will be sent to an instance which is available when - // the task is attempted. + // If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task + // will be sent to an instance which is available when the task is + // attempted. // // If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is - // invalid, then the task will be sent to the default version of the default - // service when the task is attempted. + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task + // will be sent to the default version of the default service when + // the task is attempted. string host = 4; } diff --git a/google/cloud/tasks/v2beta2/task.proto b/google/cloud/tasks/v2beta2/task.proto index f9e18be49..9a927462c 100644 --- a/google/cloud/tasks/v2beta2/task.proto +++ b/google/cloud/tasks/v2beta2/task.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,17 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.tasks.v2beta2; -import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/tasks/v2beta2/target.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2;tasks"; option java_multiple_files = true; @@ -28,8 +30,12 @@ option java_package = "com.google.cloud.tasks.v2beta2"; // A unit of scheduled work. message Task { - // The view specifies a subset of [Task][google.cloud.tasks.v2beta2.Task] - // data. + option (google.api.resource) = { + type: "cloudtasks.googleapis.com/Task" + pattern: "projects/{project}/locations/{location}/queues/{queue}/tasks/{task}" + }; + + // The view specifies a subset of [Task][google.cloud.tasks.v2beta2.Task] data. // // When a task is returned in a response, not all // information is retrieved by default because some data, such as @@ -44,26 +50,22 @@ message Task { // sensitive data. // // This view does not include the - // ([payload in - // AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] - // and [payload in - // PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These - // payloads are desirable to return only when needed, because they can be - // large and because of the sensitivity of the data that you choose to store - // in it. + // ([payload in AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] and + // [payload in PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These payloads are + // desirable to return only when needed, because they can be large + // and because of the sensitivity of the data that you choose to + // store in it. BASIC = 1; // All information is returned. // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - // requires `cloudtasks.tasks.fullView` [Google - // IAM](https://cloud.google.com/iam/) permission on the - // [Queue][google.cloud.tasks.v2beta2.Queue] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Queue][google.cloud.tasks.v2beta2.Queue] resource. FULL = 2; } - // Optionally caller-specified in - // [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + // Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. // // The task name. // @@ -92,21 +94,16 @@ message Task { oneof payload_type { // App Engine HTTP request that is sent to the task's target. Can // be set only if - // [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] - // is set on the queue. + // [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set + // on the queue. // - // An App Engine task is a task that has - // [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] - // set. + // An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set. AppEngineHttpRequest app_engine_http_request = 3; - // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process - // the task. Can be set only if - // [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the - // queue. + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be + // set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue. // - // A pull task is a task that has - // [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set. + // A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set. PullMessage pull_message = 4; } @@ -117,8 +114,7 @@ message Task { // For pull queues, this is the time when the task is available to // be leased; if a task is currently leased, this is the time when // the current lease expires, that is, the time that the task was - // leased plus the - // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + // leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. // // `schedule_time` will be truncated to the nearest microsecond. google.protobuf.Timestamp schedule_time = 5; @@ -131,8 +127,8 @@ message Task { // Output only. The task status. TaskStatus status = 7; - // Output only. The view specifies which subset of the - // [Task][google.cloud.tasks.v2beta2.Task] has been returned. + // Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has + // been returned. View view = 8; } @@ -140,32 +136,26 @@ message Task { message TaskStatus { // Output only. The number of attempts dispatched. // - // This count includes tasks which have been dispatched but haven't + // This count includes attempts which have been dispatched but haven't // received a response. int32 attempt_dispatch_count = 1; // Output only. The number of attempts which have received a response. // - // This field is not calculated for [pull - // tasks][google.cloud.tasks.v2beta2.PullMessage]. + // This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage]. int32 attempt_response_count = 2; // Output only. The status of the task's first attempt. // - // Only - // [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] - // will be set. The other - // [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is - // not retained by Cloud Tasks. + // Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set. + // The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks. // - // This field is not calculated for [pull - // tasks][google.cloud.tasks.v2beta2.PullMessage]. + // This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage]. AttemptStatus first_attempt_status = 3; // Output only. The status of the task's last attempt. // - // This field is not calculated for [pull - // tasks][google.cloud.tasks.v2beta2.PullMessage]. + // This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage]. AttemptStatus last_attempt_status = 4; } diff --git a/google/cloud/tasks/v2beta3/BUILD.bazel b/google/cloud/tasks/v2beta3/BUILD.bazel index 2af528f0e..b3477f4a0 100644 --- a/google/cloud/tasks/v2beta3/BUILD.bazel +++ b/google/cloud/tasks/v2beta3/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -16,10 +19,11 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/api:resource_proto", "//google/iam/v1:iam_policy_proto", "//google/iam/v1:policy_proto", - "//google/rpc:code_proto", "//google/rpc:status_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:empty_proto", @@ -30,7 +34,10 @@ proto_library( proto_library_with_info( name = "tasks_proto_with_info", - deps = [":tasks_proto"], + deps = [ + ":tasks_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -38,19 +45,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", - "@com_google_api_grpc_proto_google_iam_v1//jar", -] - java_proto_library( name = "tasks_java_proto", deps = [":tasks_proto"], @@ -59,51 +60,42 @@ java_proto_library( java_grpc_library( name = "tasks_java_grpc", srcs = [":tasks_proto"], - deps = [":tasks_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "tasks_resource_name_java_proto", - gapic_yaml = "cloudtasks_gapic.yaml", - deps = [":tasks_proto"], + deps = [":tasks_java_proto"], ) java_gapic_library( name = "tasks_java_gapic", src = ":tasks_proto_with_info", gapic_yaml = "cloudtasks_gapic.yaml", - service_yaml = "//google/cloud/tasks:cloudtasks_v2beta3.yaml", - test_deps = [":tasks_java_grpc"], + package = "google.cloud.tasks.v2beta3", + service_yaml = "cloudtasks_v2beta3.yaml", + test_deps = [ + ":tasks_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], deps = [ ":tasks_java_proto", - ":tasks_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + "//google/iam/v1:iam_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":tasks_java_gapic_test", +java_gapic_test( + name = "tasks_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.tasks.v2beta3.CloudTasksClientTest", ], -) for test_name in [ - "com.google.cloud.tasks.v2beta3.CloudTasksClientTest", -]] + runtime_deps = [":tasks_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-tasks-v2beta3-java", - client_deps = [":tasks_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":tasks_java_gapic_test"], - grpc_deps = [":tasks_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":tasks_java_gapic", + ":tasks_java_grpc", ":tasks_java_proto", ":tasks_proto", - ":tasks_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -111,10 +103,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -125,17 +117,16 @@ go_proto_library( deps = [ "//google/api:annotations_go_proto", "//google/iam/v1:iam_go_proto", - "//google/rpc:code_go_proto", "//google/rpc:status_go_proto", ], ) go_gapic_library( name = "tasks_go_gapic", - src = ":tasks_proto_with_info", - gapic_yaml = "cloudtasks_gapic.yaml", - importpath = "cloud.google.com/go/cloudtasks/apiv2beta3", - service_yaml = "//google/cloud/tasks:cloudtasks_v2beta3.yaml", + srcs = [":tasks_proto_with_info"], + grpc_service_config = "cloudtasks_grpc_service_config.json", + importpath = "cloud.google.com/go/cloudtasks/apiv2beta3;tasks", + service_yaml = "cloudtasks_v2beta3.yaml", deps = [ ":tasks_go_proto", "//google/iam/v1:iam_go_proto", @@ -150,13 +141,239 @@ go_test( importpath = "cloud.google.com/go/cloudtasks/apiv2beta3", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-tasks-v2beta3-go", deps = [ ":tasks_go_gapic", - ":tasks_go_gapic_srcjar-smoke-test.srcjar", ":tasks_go_gapic_srcjar-test.srcjar", ":tasks_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "tasks_moved_proto", + srcs = [":tasks_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "tasks_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":tasks_moved_proto"], +) + +py_grpc_library( + name = "tasks_py_grpc", + srcs = [":tasks_moved_proto"], + deps = [":tasks_py_proto"], +) + +py_gapic_library( + name = "tasks_py_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2beta3", + service_yaml = "cloudtasks_v2beta3.yaml", + deps = [ + ":tasks_py_grpc", + ":tasks_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "tasks-v2beta3-py", + deps = [ + ":tasks_py_gapic", + ":tasks_py_grpc", + ":tasks_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "tasks_php_proto", + deps = [":tasks_proto"], +) + +php_grpc_library( + name = "tasks_php_grpc", + srcs = [":tasks_proto"], + deps = [":tasks_php_proto"], +) + +php_gapic_library( + name = "tasks_php_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2beta3", + service_yaml = "cloudtasks_v2beta3.yaml", + deps = [ + ":tasks_php_grpc", + ":tasks_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-tasks-v2beta3-php", + deps = [ + ":tasks_php_gapic", + ":tasks_php_grpc", + ":tasks_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "tasks_nodejs_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2beta3", + service_yaml = "cloudtasks_v2beta3.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "tasks-v2beta3-nodejs", + deps = [ + ":tasks_nodejs_gapic", + ":tasks_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "tasks_ruby_proto", + deps = [":tasks_proto"], +) + +ruby_grpc_library( + name = "tasks_ruby_grpc", + srcs = [":tasks_proto"], + deps = [":tasks_ruby_proto"], +) + +ruby_gapic_library( + name = "tasks_ruby_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2beta3", + service_yaml = "cloudtasks_v2beta3.yaml", + deps = [ + ":tasks_ruby_grpc", + ":tasks_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-tasks-v2beta3-ruby", + deps = [ + ":tasks_ruby_gapic", + ":tasks_ruby_grpc", + ":tasks_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "tasks_csharp_proto", + deps = [":tasks_proto"], +) + +csharp_grpc_library( + name = "tasks_csharp_grpc", + srcs = [":tasks_proto"], + deps = [":tasks_csharp_proto"], +) + +csharp_gapic_library( + name = "tasks_csharp_gapic", + src = ":tasks_proto_with_info", + gapic_yaml = "cloudtasks_gapic.yaml", + package = "google.cloud.tasks.v2beta3", + service_yaml = "cloudtasks_v2beta3.yaml", + deps = [ + ":tasks_csharp_grpc", + ":tasks_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-tasks-v2beta3-csharp", + deps = [ + ":tasks_csharp_gapic", + ":tasks_csharp_grpc", + ":tasks_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/tasks/v2beta3/cloudtasks.proto b/google/cloud/tasks/v2beta3/cloudtasks.proto index 66971c3e6..711c7a616 100644 --- a/google/cloud/tasks/v2beta3/cloudtasks.proto +++ b/google/cloud/tasks/v2beta3/cloudtasks.proto @@ -18,6 +18,8 @@ syntax = "proto3"; package google.cloud.tasks.v2beta3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/tasks/v2beta3/queue.proto"; import "google/cloud/tasks/v2beta3/task.proto"; @@ -25,7 +27,6 @@ import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/rpc/code.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta3;tasks"; option java_multiple_files = true; @@ -36,6 +37,9 @@ option objc_class_prefix = "TASKS"; // Cloud Tasks allows developers to manage the execution of background // work in their applications. service CloudTasks { + option (google.api.default_host) = "cloudtasks.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Lists queues. // // Queues are returned in lexicographical order. @@ -43,6 +47,7 @@ service CloudTasks { option (google.api.http) = { get: "/v2beta3/{parent=projects/*/locations/*}/queues" }; + option (google.api.method_signature) = "parent"; } // Gets a queue. @@ -50,6 +55,7 @@ service CloudTasks { option (google.api.http) = { get: "/v2beta3/{name=projects/*/locations/*/queues/*}" }; + option (google.api.method_signature) = "name"; } // Creates a queue. @@ -69,6 +75,7 @@ service CloudTasks { post: "/v2beta3/{parent=projects/*/locations/*}/queues" body: "queue" }; + option (google.api.method_signature) = "parent,queue"; } // Updates a queue. @@ -91,6 +98,7 @@ service CloudTasks { patch: "/v2beta3/{queue.name=projects/*/locations/*/queues/*}" body: "queue" }; + option (google.api.method_signature) = "queue,update_mask"; } // Deletes a queue. @@ -110,6 +118,7 @@ service CloudTasks { option (google.api.http) = { delete: "/v2beta3/{name=projects/*/locations/*/queues/*}" }; + option (google.api.method_signature) = "name"; } // Purges a queue by deleting all of its tasks. @@ -123,6 +132,7 @@ service CloudTasks { post: "/v2beta3/{name=projects/*/locations/*/queues/*}:purge" body: "*" }; + option (google.api.method_signature) = "name"; } // Pauses the queue. @@ -137,6 +147,7 @@ service CloudTasks { post: "/v2beta3/{name=projects/*/locations/*/queues/*}:pause" body: "*" }; + option (google.api.method_signature) = "name"; } // Resume a queue. @@ -157,6 +168,7 @@ service CloudTasks { post: "/v2beta3/{name=projects/*/locations/*/queues/*}:resume" body: "*" }; + option (google.api.method_signature) = "name"; } // Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue]. @@ -173,6 +185,7 @@ service CloudTasks { post: "/v2beta3/{resource=projects/*/locations/*/queues/*}:getIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource"; } // Sets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing @@ -191,6 +204,7 @@ service CloudTasks { post: "/v2beta3/{resource=projects/*/locations/*/queues/*}:setIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource,policy"; } // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta3.Queue]. @@ -205,6 +219,7 @@ service CloudTasks { post: "/v2beta3/{resource=projects/*/locations/*/queues/*}:testIamPermissions" body: "*" }; + option (google.api.method_signature) = "resource,permissions"; } // Lists the tasks in a queue. @@ -220,6 +235,7 @@ service CloudTasks { option (google.api.http) = { get: "/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks" }; + option (google.api.method_signature) = "parent"; } // Gets a task. @@ -227,6 +243,7 @@ service CloudTasks { option (google.api.http) = { get: "/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}" }; + option (google.api.method_signature) = "name"; } // Creates a task and adds it to a queue. @@ -239,6 +256,7 @@ service CloudTasks { post: "/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks" body: "*" }; + option (google.api.method_signature) = "parent,task"; } // Deletes a task. @@ -250,6 +268,7 @@ service CloudTasks { option (google.api.http) = { delete: "/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}" }; + option (google.api.method_signature) = "name"; } // Forces a task to run now. @@ -281,16 +300,20 @@ service CloudTasks { post: "/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}:run" body: "*" }; + option (google.api.method_signature) = "name"; } } // Request message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues]. message ListQueuesRequest { - // Required. - // - // The location name. + // Required. The location name. // For example: `projects/PROJECT_ID/locations/LOCATION_ID` - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Queue" + } + ]; // `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta3.Queue] // field can be used as a filter and several operators as supported. @@ -344,45 +367,47 @@ message ListQueuesResponse { // Request message for [GetQueue][google.cloud.tasks.v2beta3.CloudTasks.GetQueue]. message GetQueueRequest { - // Required. - // - // The resource name of the queue. For example: + // Required. The resource name of the queue. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } // Request message for [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue]. message CreateQueueRequest { - // Required. - // - // The location name in which the queue will be created. + // Required. The location name in which the queue will be created. // For example: `projects/PROJECT_ID/locations/LOCATION_ID` // // The list of allowed locations can be obtained by calling Cloud // Tasks' implementation of // [ListLocations][google.cloud.location.Locations.ListLocations]. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Queue" + } + ]; - // Required. - // - // The queue to create. + // Required. The queue to create. // // [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue. - Queue queue = 2; + Queue queue = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue]. message UpdateQueueRequest { - // Required. - // - // The queue to create or update. + // Required. The queue to create or update. // // The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified. // // Output only fields cannot be modified using UpdateQueue. // Any value specified for an output only field will be ignored. // The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed. - Queue queue = 1; + Queue queue = 1 [(google.api.field_behavior) = REQUIRED]; // A mask used to specify which fields of the queue are being updated. // @@ -392,47 +417,62 @@ message UpdateQueueRequest { // Request message for [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue]. message DeleteQueueRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } // Request message for [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue]. message PurgeQueueRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } // Request message for [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue]. message PauseQueueRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } // Request message for [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. message ResumeQueueRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Queue" + } + ]; } // Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks]. message ListTasksRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Task" + } + ]; // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be // returned. @@ -487,11 +527,14 @@ message ListTasksResponse { // Request message for getting a task using [GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. message GetTaskRequest { - // Required. - // - // The task name. For example: + // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Task" + } + ]; // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be // returned. @@ -510,17 +553,18 @@ message GetTaskRequest { // Request message for [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. message CreateTaskRequest { - // Required. - // - // The queue name. For example: + // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` // // The queue must already exist. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Task" + } + ]; - // Required. - // - // The task to add. + // Required. The task to add. // // Task names have the following format: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. @@ -553,7 +597,7 @@ message CreateTaskRequest { // task commands. The infrastructure relies on an approximately // uniform distribution of task ids to store and serve tasks // efficiently. - Task task = 2; + Task task = 2 [(google.api.field_behavior) = REQUIRED]; // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be // returned. @@ -573,21 +617,27 @@ message CreateTaskRequest { // Request message for deleting a task using // [DeleteTask][google.cloud.tasks.v2beta3.CloudTasks.DeleteTask]. message DeleteTaskRequest { - // Required. - // - // The task name. For example: + // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Task" + } + ]; } // Request message for forcing a task to run now using // [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask]. message RunTaskRequest { - // Required. - // - // The task name. For example: + // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudtasks.googleapis.com/Task" + } + ]; // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be // returned. diff --git a/google/cloud/tasks/v2beta3/cloudtasks_gapic.legacy.yaml b/google/cloud/tasks/v2beta3/cloudtasks_gapic.legacy.yaml new file mode 100644 index 000000000..ffcdd5e73 --- /dev/null +++ b/google/cloud/tasks/v2beta3/cloudtasks_gapic.legacy.yaml @@ -0,0 +1,434 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.tasks.v2beta3 + python: + package_name: google.cloud.tasks_v2beta3.gapic + go: + package_name: cloud.google.com/go/cloudtasks/apiv2beta3 + csharp: + package_name: Google.Cloud.Tasks.V2Beta3 + ruby: + package_name: Google::Cloud::Tasks::V2beta3 + php: + package_name: Google\Cloud\Tasks\V2beta3 + nodejs: + package_name: tasks.v2beta3 +# A list of API interface configurations. +interfaces: +- name: google.cloud.tasks.v2beta3.CloudTasks + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/queues/{queue} + entity_name: queue + - name_pattern: projects/{project}/locations/{location}/queues/{queue}/tasks/{task} + entity_name: task + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListQueues + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + header_request_params: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: queues + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 10000 + - name: GetQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: CreateQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + - queue + required_fields: + - parent + - queue + header_request_params: + - parent + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 10000 + - name: UpdateQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - queue + - update_mask + required_fields: + - queue + header_request_params: + - queue.name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + queue.name: queue + timeout_millis: 10000 + - name: DeleteQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: PurgeQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: PauseQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: ResumeQueue + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: queue + timeout_millis: 10000 + - name: GetIamPolicy + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - resource + required_fields: + - resource + header_request_params: + - resource + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + resource: queue + timeout_millis: 10000 + - name: SetIamPolicy + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + header_request_params: + - resource + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: queue + timeout_millis: 10000 + - name: TestIamPermissions + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + header_request_params: + - resource + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + resource: queue + timeout_millis: 10000 + - name: ListTasks + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + header_request_params: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: tasks + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: queue + timeout_millis: 10000 + - name: GetTask + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: task + timeout_millis: 10000 + - name: CreateTask + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - parent + - task + required_fields: + - parent + - task + header_request_params: + - parent + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: queue + timeout_millis: 10000 + - name: DeleteTask + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: task + timeout_millis: 10000 + - name: RunTask + resource_name_treatment: STATIC_TYPES + flattening: + groups: + - parameters: + - name + required_fields: + - name + header_request_params: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: task + timeout_millis: 10000 +resource_name_generation: +- message_name: Queue + field_entity_map: + name: queue +- message_name: Task + field_entity_map: + name: task +- message_name: ListQueuesRequest + field_entity_map: + parent: location +- message_name: GetQueueRequest + field_entity_map: + name: queue +- message_name: CreateQueueRequest + field_entity_map: + parent: location +- message_name: UpdateQueueRequest + field_entity_map: + queue.name: queue +- message_name: DeleteQueueRequest + field_entity_map: + name: queue +- message_name: PurgeQueueRequest + field_entity_map: + name: queue +- message_name: PauseQueueRequest + field_entity_map: + name: queue +- message_name: ResumeQueueRequest + field_entity_map: + name: queue +- message_name: ListTasksRequest + field_entity_map: + parent: queue +- message_name: GetTaskRequest + field_entity_map: + name: task +- message_name: CreateTaskRequest + field_entity_map: + parent: queue +- message_name: DeleteTaskRequest + field_entity_map: + name: task +- message_name: RunTaskRequest + field_entity_map: + name: task +- message_name: google.iam.v1.GetIamPolicyRequest + field_entity_map: + resource: "*" +- message_name: google.iam.v1.SetIamPolicyRequest + field_entity_map: + resource: "*" +- message_name: google.iam.v1.TestIamPermissionsRequest + field_entity_map: + resource: "*" diff --git a/google/cloud/tasks/v2beta3/cloudtasks_gapic.yaml b/google/cloud/tasks/v2beta3/cloudtasks_gapic.yaml index eb88c15fe..1e91efb26 100644 --- a/google/cloud/tasks/v2beta3/cloudtasks_gapic.yaml +++ b/google/cloud/tasks/v2beta3/cloudtasks_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -16,420 +16,43 @@ language_settings: package_name: Google\Cloud\Tasks\V2beta3 nodejs: package_name: tasks.v2beta3 -# A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.cloud.tasks.v2beta3.CloudTasks - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - - name_pattern: projects/{project}/locations/{location} - entity_name: location - - name_pattern: projects/{project}/locations/{location}/queues/{queue} - entity_name: queue - - name_pattern: projects/{project}/locations/{location}/queues/{queue}/tasks/{task} - entity_name: task - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: ListQueues - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - header_request_params: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: queues - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: location timeout_millis: 10000 - name: GetQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: CreateQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - - queue - required_fields: - - parent - - queue - header_request_params: - - parent - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location timeout_millis: 10000 - name: UpdateQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - queue - - update_mask - required_fields: - - queue - header_request_params: - - queue.name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - queue.name: queue timeout_millis: 10000 - name: DeleteQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: PurgeQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: PauseQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: ResumeQueue - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: queue timeout_millis: 10000 - name: GetIamPolicy - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - resource - required_fields: - - resource - header_request_params: - - resource retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - resource: queue timeout_millis: 10000 - name: SetIamPolicy - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - resource - - policy - required_fields: - - resource - - policy - header_request_params: - - resource - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: queue timeout_millis: 10000 - name: TestIamPermissions - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - resource - - permissions - required_fields: - - resource - - permissions - header_request_params: - - resource retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - resource: queue timeout_millis: 10000 - name: ListTasks - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - header_request_params: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: tasks - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: queue timeout_millis: 10000 - name: GetTask - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: task timeout_millis: 10000 - name: CreateTask - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - parent - - task - required_fields: - - parent - - task - header_request_params: - - parent - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: queue timeout_millis: 10000 - name: DeleteTask - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: task timeout_millis: 10000 - name: RunTask - resource_name_treatment: STATIC_TYPES - flattening: - groups: - - parameters: - - name - required_fields: - - name - header_request_params: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: task timeout_millis: 10000 -resource_name_generation: -- message_name: Queue - field_entity_map: - name: queue -- message_name: Task - field_entity_map: - name: task -- message_name: ListQueuesRequest - field_entity_map: - parent: location -- message_name: GetQueueRequest - field_entity_map: - name: queue -- message_name: CreateQueueRequest - field_entity_map: - parent: location -- message_name: UpdateQueueRequest - field_entity_map: - queue.name: queue -- message_name: DeleteQueueRequest - field_entity_map: - name: queue -- message_name: PurgeQueueRequest - field_entity_map: - name: queue -- message_name: PauseQueueRequest - field_entity_map: - name: queue -- message_name: ResumeQueueRequest - field_entity_map: - name: queue -- message_name: ListTasksRequest - field_entity_map: - parent: queue -- message_name: GetTaskRequest - field_entity_map: - name: task -- message_name: CreateTaskRequest - field_entity_map: - parent: queue -- message_name: DeleteTaskRequest - field_entity_map: - name: task -- message_name: RunTaskRequest - field_entity_map: - name: task -- message_name: google.iam.v1.GetIamPolicyRequest - field_entity_map: - resource: "*" -- message_name: google.iam.v1.SetIamPolicyRequest - field_entity_map: - resource: "*" -- message_name: google.iam.v1.TestIamPermissionsRequest - field_entity_map: - resource: "*" diff --git a/google/cloud/tasks/v2beta3/cloudtasks_grpc_service_config.json b/google/cloud/tasks/v2beta3/cloudtasks_grpc_service_config.json new file mode 100755 index 000000000..ed67771cf --- /dev/null +++ b/google/cloud/tasks/v2beta3/cloudtasks_grpc_service_config.json @@ -0,0 +1,87 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "CreateQueue" + }, + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "UpdateQueue" + }, + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "PurgeQueue" + }, + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "PauseQueue" + }, + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "ResumeQueue" + }, + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "SetIamPolicy" + }, + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "CreateTask" + }, + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "RunTask" + } + ], + "timeout": "10s" + }, + { + "name": [ + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "ListQueues" + }, + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "GetQueue" + }, + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "DeleteQueue" + }, + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "GetIamPolicy" + }, + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "TestIamPermissions" + }, + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "ListTasks" + }, + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "GetTask" + }, + { + "service": "google.cloud.tasks.v2beta3.CloudTasks", + "method": "DeleteTask" + } + ], + "timeout": "10s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "10s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/tasks/cloudtasks_v2beta3.yaml b/google/cloud/tasks/v2beta3/cloudtasks_v2beta3.yaml similarity index 100% rename from google/cloud/tasks/cloudtasks_v2beta3.yaml rename to google/cloud/tasks/v2beta3/cloudtasks_v2beta3.yaml diff --git a/google/cloud/tasks/v2beta3/queue.proto b/google/cloud/tasks/v2beta3/queue.proto index 264a19eed..777e9b8b4 100644 --- a/google/cloud/tasks/v2beta3/queue.proto +++ b/google/cloud/tasks/v2beta3/queue.proto @@ -17,11 +17,11 @@ syntax = "proto3"; package google.cloud.tasks.v2beta3; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "google/cloud/tasks/v2beta3/target.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta3;tasks"; option java_multiple_files = true; @@ -32,6 +32,11 @@ option java_package = "com.google.cloud.tasks.v2beta3"; // how those tasks are dispatched. Configurable properties include rate limits, // retry options, queue types, and others. message Queue { + option (google.api.resource) = { + type: "cloudtasks.googleapis.com/Queue" + pattern: "projects/{project}/locations/{location}/queues/{queue}" + }; + // State of the queue. enum State { // Unspecified state. diff --git a/google/cloud/tasks/v2beta3/target.proto b/google/cloud/tasks/v2beta3/target.proto index 48d7df55f..60eccf350 100644 --- a/google/cloud/tasks/v2beta3/target.proto +++ b/google/cloud/tasks/v2beta3/target.proto @@ -28,12 +28,12 @@ option java_package = "com.google.cloud.tasks.v2beta3"; // // The task will be pushed to the worker as an HTTP request. If the worker // or the redirected worker acknowledges the task by returning a successful HTTP -// response code ([`200` - `299`]), the task will removed from the queue. If +// response code ([`200` - `299`]), the task will be removed from the queue. If // any other HTTP response code is returned or no response is received, the // task will be retried according to the following: // -// * User-specified throttling: [retry configuration][Queue.RetryConfig], -// [rate limits][Queue.RateLimits], and the [queue's state][google.cloud.tasks.v2beta3.Queue.state]. +// * User-specified throttling: [retry configuration][google.cloud.tasks.v2beta3.Queue.retry_config], +// [rate limits][google.cloud.tasks.v2beta3.Queue.rate_limits], and the [queue's state][google.cloud.tasks.v2beta3.Queue.state]. // // * System throttling: To prevent the worker from overloading, Cloud Tasks may // temporarily reduce the queue's effective rate. User-specified settings @@ -41,13 +41,13 @@ option java_package = "com.google.cloud.tasks.v2beta3"; // // System throttling happens because: // -// * Cloud Tasks backoffs on all errors. Normally the backoff specified in -// [rate limits][Queue.RateLimits] will be used. But if the worker returns +// * Cloud Tasks backs off on all errors. Normally the backoff specified in +// [rate limits][google.cloud.tasks.v2beta3.Queue.rate_limits] will be used. But if the worker returns // `429` (Too Many Requests), `503` (Service Unavailable), or the rate of // errors is high, Cloud Tasks will use a higher backoff rate. The retry // specified in the `Retry-After` HTTP response header is considered. // -// * To prevent traffic spikes and to smooth sudden large traffic spikes, +// * To prevent traffic spikes and to smooth sudden increases in traffic, // dispatches ramp up slowly when the queue is newly created or idle and // if large numbers of tasks suddenly become available to dispatch (due to // spikes in create task rates, the queue being unpaused, or many tasks @@ -106,7 +106,7 @@ message HttpRequest { // The mode for generating an `Authorization` header for HTTP requests. // - // If specified, all `Authorization` headers in the [HttpTarget.headers][] + // If specified, all `Authorization` headers in the [HttpRequest.headers][google.cloud.tasks.v2beta3.HttpRequest.headers] // field will be overridden. oneof authorization_header { // If specified, an @@ -208,7 +208,7 @@ message AppEngineHttpQueue { // the app's handler returns a non-2xx response code or Cloud Tasks does // not receive response before the [deadline][google.cloud.tasks.v2beta3.Task.dispatch_deadline]. Failed // tasks will be retried according to the -// [retry configuration][Queue.RetryConfig]. `503` (Service Unavailable) is +// [retry configuration][google.cloud.tasks.v2beta3.Queue.retry_config]. `503` (Service Unavailable) is // considered an App Engine system error instead of an application error and // will cause Cloud Tasks' traffic congestion control to temporarily throttle // the queue's dispatches. Unlike other types of task targets, a `429` (Too Many @@ -279,7 +279,7 @@ message AppEngineHttpRequest { // In addition, Cloud Tasks sets some headers when the task is dispatched, // such as headers containing information about the task; see // [request - // headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). + // headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). // These headers are set only when the task is dispatched, so they are not // visible when the task is returned in a Cloud Tasks response. // diff --git a/google/cloud/tasks/v2beta3/task.proto b/google/cloud/tasks/v2beta3/task.proto index 10213ad85..573cc8502 100644 --- a/google/cloud/tasks/v2beta3/task.proto +++ b/google/cloud/tasks/v2beta3/task.proto @@ -17,12 +17,12 @@ syntax = "proto3"; package google.cloud.tasks.v2beta3; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "google/cloud/tasks/v2beta3/target.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta3;tasks"; option java_multiple_files = true; @@ -31,6 +31,11 @@ option java_package = "com.google.cloud.tasks.v2beta3"; // A unit of scheduled work. message Task { + option (google.api.resource) = { + type: "cloudtasks.googleapis.com/Task" + pattern: "projects/{project}/locations/{location}/queues/{queue}/tasks/{task}" + }; + // The view specifies a subset of [Task][google.cloud.tasks.v2beta3.Task] data. // // When a task is returned in a response, not all diff --git a/google/cloud/texttospeech/BUILD.bazel b/google/cloud/texttospeech/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/cloud/texttospeech/BUILD.bazel +++ b/google/cloud/texttospeech/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/texttospeech/artman_texttospeech_v1.yaml b/google/cloud/texttospeech/artman_texttospeech_v1.yaml index b5f3d6d28..22f0044c3 100644 --- a/google/cloud/texttospeech/artman_texttospeech_v1.yaml +++ b/google/cloud/texttospeech/artman_texttospeech_v1.yaml @@ -8,6 +8,7 @@ common: - v1 service_yaml: tts_v1.yaml gapic_yaml: v1/texttospeech_gapic.yaml + proto_package: google.cloud.texttospeech.v1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/texttospeech/artman_texttospeech_v1beta1.yaml b/google/cloud/texttospeech/artman_texttospeech_v1beta1.yaml index 91280d64e..8aef988c7 100644 --- a/google/cloud/texttospeech/artman_texttospeech_v1beta1.yaml +++ b/google/cloud/texttospeech/artman_texttospeech_v1beta1.yaml @@ -8,6 +8,7 @@ common: - v1beta1 service_yaml: tts_v1beta1.yaml gapic_yaml: v1beta1/texttospeech_gapic.yaml + proto_package: google.cloud.texttospeech.v1beta1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/texttospeech/v1/BUILD.bazel b/google/cloud/texttospeech/v1/BUILD.bazel index dd89685fe..c5d7bcd8b 100644 --- a/google/cloud/texttospeech/v1/BUILD.bazel +++ b/google/cloud/texttospeech/v1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -13,12 +16,17 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", ], ) proto_library_with_info( name = "texttospeech_proto_with_info", - deps = [":texttospeech_proto"], + deps = [ + ":texttospeech_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -26,17 +34,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "texttospeech_java_proto", deps = [":texttospeech_proto"], @@ -45,39 +49,40 @@ java_proto_library( java_grpc_library( name = "texttospeech_java_grpc", srcs = [":texttospeech_proto"], - deps = [":texttospeech_java_proto"] + _JAVA_GRPC_DEPS, + deps = [":texttospeech_java_proto"], ) java_gapic_library( name = "texttospeech_java_gapic", src = ":texttospeech_proto_with_info", gapic_yaml = "texttospeech_gapic.yaml", - service_yaml = "//google/cloud/texttospeech:tts_v1.yaml", - test_deps = [":texttospeech_java_grpc"], - deps = [":texttospeech_java_proto"] + _JAVA_GRPC_DEPS, + package = "google.cloud.texttospeech.v1", + service_yaml = "texttospeech_v1.yaml", + test_deps = [ + ":texttospeech_java_grpc", + ], + deps = [ + ":texttospeech_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, +java_gapic_test( + name = "texttospeech_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.texttospeech.v1.TextToSpeechClientTest", + ], runtime_deps = [":texttospeech_java_gapic_test"], -) for test_name in [ - "com.google.cloud.texttospeech.v1.TextToSpeechClientTest", -]] +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-texttospeech-v1-java", - client_deps = [":texttospeech_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":texttospeech_java_gapic_test"], - grpc_deps = [":texttospeech_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":texttospeech_java_gapic", + ":texttospeech_java_grpc", ":texttospeech_java_proto", ":texttospeech_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -85,10 +90,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -96,16 +101,20 @@ go_proto_library( compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/cloud/texttospeech/v1", protos = [":texttospeech_proto"], - deps = ["//google/api:annotations_go_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], ) go_gapic_library( name = "texttospeech_go_gapic", - src = ":texttospeech_proto_with_info", - gapic_yaml = "texttospeech_gapic.yaml", - importpath = "cloud.google.com/go/texttospeech/apiv1", - service_yaml = "//google/cloud/texttospeech:tts_v1.yaml", - deps = [":texttospeech_go_proto"], + srcs = [":texttospeech_proto_with_info"], + grpc_service_config = "texttospeech_grpc_service_config.json", + importpath = "cloud.google.com/go/texttospeech/apiv1;texttospeech", + service_yaml = "texttospeech_v1.yaml", + deps = [ + ":texttospeech_go_proto", + ], ) go_test( @@ -115,13 +124,231 @@ go_test( importpath = "cloud.google.com/go/texttospeech/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-texttospeech-v1-go", deps = [ ":texttospeech_go_gapic", - ":texttospeech_go_gapic_srcjar-smoke-test.srcjar", ":texttospeech_go_gapic_srcjar-test.srcjar", ":texttospeech_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "texttospeech_moved_proto", + srcs = [":texttospeech_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + ], +) + +py_proto_library( + name = "texttospeech_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":texttospeech_moved_proto"], +) + +py_grpc_library( + name = "texttospeech_py_grpc", + srcs = [":texttospeech_moved_proto"], + deps = [":texttospeech_py_proto"], +) + +py_gapic_library( + name = "texttospeech_py_gapic", + src = ":texttospeech_proto_with_info", + gapic_yaml = "texttospeech_gapic.yaml", + package = "google.cloud.texttospeech.v1", + service_yaml = "texttospeech_v1.yaml", + deps = [ + ":texttospeech_py_grpc", + ":texttospeech_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "texttospeech-v1-py", + deps = [ + ":texttospeech_py_gapic", + ":texttospeech_py_grpc", + ":texttospeech_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "texttospeech_php_proto", + deps = [":texttospeech_proto"], +) + +php_grpc_library( + name = "texttospeech_php_grpc", + srcs = [":texttospeech_proto"], + deps = [":texttospeech_php_proto"], +) + +php_gapic_library( + name = "texttospeech_php_gapic", + src = ":texttospeech_proto_with_info", + gapic_yaml = "texttospeech_gapic.yaml", + package = "google.cloud.texttospeech.v1", + service_yaml = "texttospeech_v1.yaml", + deps = [ + ":texttospeech_php_grpc", + ":texttospeech_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-texttospeech-v1-php", + deps = [ + ":texttospeech_php_gapic", + ":texttospeech_php_grpc", + ":texttospeech_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "texttospeech_nodejs_gapic", + src = ":texttospeech_proto_with_info", + gapic_yaml = "texttospeech_gapic.yaml", + package = "google.cloud.texttospeech.v1", + service_yaml = "texttospeech_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "texttospeech-v1-nodejs", + deps = [ + ":texttospeech_nodejs_gapic", + ":texttospeech_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "texttospeech_ruby_proto", + deps = [":texttospeech_proto"], +) + +ruby_grpc_library( + name = "texttospeech_ruby_grpc", + srcs = [":texttospeech_proto"], + deps = [":texttospeech_ruby_proto"], +) + +ruby_gapic_library( + name = "texttospeech_ruby_gapic", + src = ":texttospeech_proto_with_info", + gapic_yaml = "texttospeech_gapic.yaml", + package = "google.cloud.texttospeech.v1", + service_yaml = "texttospeech_v1.yaml", + deps = [ + ":texttospeech_ruby_grpc", + ":texttospeech_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-texttospeech-v1-ruby", + deps = [ + ":texttospeech_ruby_gapic", + ":texttospeech_ruby_grpc", + ":texttospeech_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "texttospeech_csharp_proto", + deps = [":texttospeech_proto"], +) + +csharp_grpc_library( + name = "texttospeech_csharp_grpc", + srcs = [":texttospeech_proto"], + deps = [":texttospeech_csharp_proto"], +) + +csharp_gapic_library( + name = "texttospeech_csharp_gapic", + src = ":texttospeech_proto_with_info", + gapic_yaml = "texttospeech_gapic.yaml", + package = "google.cloud.texttospeech.v1", + service_yaml = "texttospeech_v1.yaml", + deps = [ + ":texttospeech_csharp_grpc", + ":texttospeech_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-texttospeech-v1-csharp", + deps = [ + ":texttospeech_csharp_gapic", + ":texttospeech_csharp_grpc", + ":texttospeech_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/texttospeech/v1/cloud_tts.proto b/google/cloud/texttospeech/v1/cloud_tts.proto index dd9fa6ce2..6134ef640 100644 --- a/google/cloud/texttospeech/v1/cloud_tts.proto +++ b/google/cloud/texttospeech/v1/cloud_tts.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,8 @@ syntax = "proto3"; package google.cloud.texttospeech.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.TextToSpeech.V1"; @@ -26,30 +28,35 @@ option java_multiple_files = true; option java_outer_classname = "TextToSpeechProto"; option java_package = "com.google.cloud.texttospeech.v1"; option php_namespace = "Google\\Cloud\\TextToSpeech\\V1"; +option ruby_package = "Google::Cloud::TextToSpeech::V1"; // Service that implements Google Cloud Text-to-Speech API. service TextToSpeech { + option (google.api.default_host) = "texttospeech.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Returns a list of Voice supported for synthesis. rpc ListVoices(ListVoicesRequest) returns (ListVoicesResponse) { option (google.api.http) = { get: "/v1/voices" }; + option (google.api.method_signature) = "language_code"; } // Synthesizes speech synchronously: receive results after all text input // has been processed. - rpc SynthesizeSpeech(SynthesizeSpeechRequest) - returns (SynthesizeSpeechResponse) { + rpc SynthesizeSpeech(SynthesizeSpeechRequest) returns (SynthesizeSpeechResponse) { option (google.api.http) = { post: "/v1/text:synthesize" body: "*" }; + option (google.api.method_signature) = "input,voice,audio_config"; } } // The top-level message sent by the client for the `ListVoices` method. message ListVoicesRequest { - // Optional (but recommended) + // Optional. Recommended. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If // specified, the ListVoices call will only return voices that can be used to // synthesize this language_code. E.g. when specifying "en-NZ", you will get @@ -57,7 +64,47 @@ message ListVoicesRequest { // "no-*" (Norwegian) and "nb-*" (Norwegian Bokmal) voices; specifying "zh" // will also get supported "cmn-*" voices; specifying "zh-hk" will also get // supported "yue-*" voices. - string language_code = 1; + string language_code = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Gender of the voice as described in +// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). +enum SsmlVoiceGender { + // An unspecified gender. + // In VoiceSelectionParams, this means that the client doesn't care which + // gender the selected voice will have. In the Voice field of + // ListVoicesResponse, this may mean that the voice doesn't fit any of the + // other categories in this enum, or that the gender of the voice isn't known. + SSML_VOICE_GENDER_UNSPECIFIED = 0; + + // A male voice. + MALE = 1; + + // A female voice. + FEMALE = 2; + + // A gender-neutral voice. + NEUTRAL = 3; +} + +// Configuration to set up audio encoder. The encoding determines the output +// audio format that we'd like. +enum AudioEncoding { + // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][]. + AUDIO_ENCODING_UNSPECIFIED = 0; + + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + // Audio content returned as LINEAR16 also contains a WAV header. + LINEAR16 = 1; + + // MP3 audio at 32kbps. + MP3 = 2; + + // Opus encoded audio wrapped in an ogg container. The result will be a + // file which can be played natively on Android, and in browsers (at least + // Chrome and Firefox). The quality of the encoding is considerably higher + // than MP3 while using approximately the same bitrate. + OGG_OPUS = 3; } // The message returned to the client by the `ListVoices` method. @@ -86,13 +133,13 @@ message Voice { // The top-level message sent by the client for the `SynthesizeSpeech` method. message SynthesizeSpeechRequest { // Required. The Synthesizer requires either plain text or SSML as input. - SynthesisInput input = 1; + SynthesisInput input = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The desired voice of the synthesized audio. - VoiceSelectionParams voice = 2; + VoiceSelectionParams voice = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The configuration of the synthesized audio. - AudioConfig audio_config = 3; + AudioConfig audio_config = 3 [(google.api.field_behavior) = REQUIRED]; } // Contains text input to be synthesized. Either `text` or `ssml` must be @@ -115,9 +162,9 @@ message SynthesisInput { // Description of which voice to use for a synthesis request. message VoiceSelectionParams { - // The language (and optionally also the region) of the voice expressed as a + // Required. The language (and potentially also the region) of the voice expressed as a // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g. - // "en-US". Required. This should not include a script tag (e.g. use + // "en-US". This should not include a script tag (e.g. use // "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred // from the input provided in the SynthesisInput. The TTS service // will use this parameter to help choose an appropriate voice. Note that @@ -126,13 +173,13 @@ message VoiceSelectionParams { // (e.g. using en-US rather than en-CA if there isn't a Canadian voice // available), or even a different language, e.g. using "nb" (Norwegian // Bokmal) instead of "no" (Norwegian)". - string language_code = 1; + string language_code = 1 [(google.api.field_behavior) = REQUIRED]; - // The name of the voice. Optional; if not set, the service will choose a + // The name of the voice. If not set, the service will choose a // voice based on the other parameters such as language_code and gender. string name = 2; - // The preferred gender of the voice. Optional; if not set, the service will + // The preferred gender of the voice. If not set, the service will // choose a voice based on the other parameters such as language_code and // name. Note that this is only a preference, not requirement; if a // voice of the appropriate gender is not available, the synthesizer should @@ -142,94 +189,66 @@ message VoiceSelectionParams { // Description of audio data to be synthesized. message AudioConfig { - // Required. The format of the requested audio byte stream. - AudioEncoding audio_encoding = 1; - - // Optional speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal - // native speed supported by the specific voice. 2.0 is twice as fast, and - // 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any - // other values < 0.25 or > 4.0 will return an error. - double speaking_rate = 2; - - // Optional speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 - // semitones from the original pitch. -20 means decrease 20 semitones from the - // original pitch. - double pitch = 3; - - // Optional volume gain (in dB) of the normal native volume supported by the - // specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of - // 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) - // will play at approximately half the amplitude of the normal native signal - // amplitude. A value of +6.0 (dB) will play at approximately twice the - // amplitude of the normal native signal amplitude. Strongly recommend not to - // exceed +10 (dB) as there's usually no effective increase in loudness for - // any value greater than that. - double volume_gain_db = 4; - - // The synthesis sample rate (in hertz) for this audio. Optional. If this is - // different from the voice's natural sample rate, then the synthesizer will - // honor this request by converting to the desired sample rate (which might - // result in worse audio quality), unless the specified sample rate is not - // supported for the encoding chosen, in which case it will fail the request - // and return [google.rpc.Code.INVALID_ARGUMENT][]. - int32 sample_rate_hertz = 5; - - // An identifier which selects 'audio effects' profiles that are applied on - // (post synthesized) text to speech. - // Effects are applied on top of each other in the order they are given. - // See - // - // [audio-profiles](https: - // //cloud.google.com/text-to-speech/docs/audio-profiles) - // for current supported profile ids. - repeated string effects_profile_id = 6; + // Required. The format of the audio byte stream. + AudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Input only. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is + // the normal native speed supported by the specific voice. 2.0 is twice as + // fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 + // speed. Any other values < 0.25 or > 4.0 will return an error. + double speaking_rate = 2 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means + // increase 20 semitones from the original pitch. -20 means decrease 20 + // semitones from the original pitch. + double pitch = 3 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Input only. Volume gain (in dB) of the normal native volume + // supported by the specific voice, in the range [-96.0, 16.0]. If unset, or + // set to a value of 0.0 (dB), will play at normal native signal amplitude. A + // value of -6.0 (dB) will play at approximately half the amplitude of the + // normal native signal amplitude. A value of +6.0 (dB) will play at + // approximately twice the amplitude of the normal native signal amplitude. + // Strongly recommend not to exceed +10 (dB) as there's usually no effective + // increase in loudness for any value greater than that. + double volume_gain_db = 4 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. The synthesis sample rate (in hertz) for this audio. When this is + // specified in SynthesizeSpeechRequest, if this is different from the voice's + // natural sample rate, then the synthesizer will honor this request by + // converting to the desired sample rate (which might result in worse audio + // quality), unless the specified sample rate is not supported for the + // encoding chosen, in which case it will fail the request and return + // [google.rpc.Code.INVALID_ARGUMENT][]. + int32 sample_rate_hertz = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Input only. An identifier which selects 'audio effects' profiles + // that are applied on (post synthesized) text to speech. Effects are applied + // on top of each other in the order they are given. See + // [audio + // profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for + // current supported profile ids. + repeated string effects_profile_id = 6 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; } // The message returned to the client by the `SynthesizeSpeech` method. message SynthesizeSpeechResponse { // The audio data bytes encoded as specified in the request, including the - // header (For LINEAR16 audio, we include the WAV header). Note: as + // header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). + // For LINEAR16 audio, we include the WAV header. Note: as // with all bytes fields, protobuffers use a pure binary representation, // whereas JSON representations use base64. bytes audio_content = 1; } - -// Gender of the voice as described in -// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). -enum SsmlVoiceGender { - // An unspecified gender. - // In VoiceSelectionParams, this means that the client doesn't care which - // gender the selected voice will have. In the Voice field of - // ListVoicesResponse, this may mean that the voice doesn't fit any of the - // other categories in this enum, or that the gender of the voice isn't known. - SSML_VOICE_GENDER_UNSPECIFIED = 0; - - // A male voice. - MALE = 1; - - // A female voice. - FEMALE = 2; - - // A gender-neutral voice. - NEUTRAL = 3; -} - -// Configuration to set up audio encoder. The encoding determines the output -// audio format that we'd like. -enum AudioEncoding { - // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][]. - AUDIO_ENCODING_UNSPECIFIED = 0; - - // Uncompressed 16-bit signed little-endian samples (Linear PCM). - // Audio content returned as LINEAR16 also contains a WAV header. - LINEAR16 = 1; - - // MP3 audio. - MP3 = 2; - - // Opus encoded audio wrapped in an ogg container. The result will be a - // file which can be played natively on Android, and in browsers (at least - // Chrome and Firefox). The quality of the encoding is considerably higher - // than MP3 while using approximately the same bitrate. - OGG_OPUS = 3; -} diff --git a/google/cloud/texttospeech/v1/texttospeech_gapic.legacy.yaml b/google/cloud/texttospeech/v1/texttospeech_gapic.legacy.yaml new file mode 100644 index 000000000..5f35fcdd4 --- /dev/null +++ b/google/cloud/texttospeech/v1/texttospeech_gapic.legacy.yaml @@ -0,0 +1,135 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.texttospeech.v1 + python: + package_name: google.cloud.texttospeech_v1.gapic + go: + package_name: cloud.google.com/go/texttospeech/apiv1 + csharp: + package_name: Google.Cloud.TextToSpeech.V1 + ruby: + package_name: Google::Cloud::TextToSpeech::V1 + php: + package_name: Google\Cloud\TextToSpeech\V1 + nodejs: + package_name: text-to-speech.v1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: + # The fully qualified name of the API interface. +- name: google.cloud.texttospeech.v1.TextToSpeech + smoke_test: + method: SynthesizeSpeech + init_fields: + - input.text="test" + - voice.language_code="en-US" + - audio_config.audio_encoding=MP3 + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListVoices + flattening: + groups: + - parameters: + - language_code + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 + - name: SynthesizeSpeech + flattening: + groups: + - parameters: + - input + - voice + - audio_config + required_fields: + - input + - voice + - audio_config + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/cloud/texttospeech/v1/texttospeech_gapic.yaml b/google/cloud/texttospeech/v1/texttospeech_gapic.yaml index 5f35fcdd4..e760265f8 100644 --- a/google/cloud/texttospeech/v1/texttospeech_gapic.yaml +++ b/google/cloud/texttospeech/v1/texttospeech_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -17,119 +17,8 @@ language_settings: nodejs: package_name: text-to-speech.v1 domain_layer_location: google-cloud -# A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.cloud.texttospeech.v1.TextToSpeech - smoke_test: - method: SynthesizeSpeech - init_fields: - - input.text="test" - - voice.language_code="en-US" - - audio_config.audio_encoding=MP3 - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: [] - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: ListVoices - flattening: - groups: - - parameters: - - language_code - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 30000 - name: SynthesizeSpeech - flattening: - groups: - - parameters: - - input - - voice - - audio_config - required_fields: - - input - - voice - - audio_config retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 diff --git a/google/cloud/texttospeech/v1/texttospeech_grpc_service_config.json b/google/cloud/texttospeech/v1/texttospeech_grpc_service_config.json new file mode 100755 index 000000000..aedaab2d1 --- /dev/null +++ b/google/cloud/texttospeech/v1/texttospeech_grpc_service_config.json @@ -0,0 +1,26 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.texttospeech.v1.TextToSpeech", + "method": "ListVoices" + }, + { + "service": "google.cloud.texttospeech.v1.TextToSpeech", + "method": "SynthesizeSpeech" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/texttospeech/v1/texttospeech_v1.yaml b/google/cloud/texttospeech/v1/texttospeech_v1.yaml new file mode 100644 index 000000000..99f5f17d3 --- /dev/null +++ b/google/cloud/texttospeech/v1/texttospeech_v1.yaml @@ -0,0 +1,27 @@ +type: google.api.Service +config_version: 3 +name: texttospeech.googleapis.com +title: Cloud Text-to-Speech API + +apis: +- name: google.cloud.texttospeech.v1.TextToSpeech + +documentation: + summary: |- + Synthesizes natural-sounding speech by applying powerful neural network + models. + overview: |- + # Introduction + + Google Cloud Text-to-Speech API provides speech synthesis as a service. + +authentication: + rules: + - selector: google.cloud.texttospeech.v1.TextToSpeech.ListVoices + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.texttospeech.v1.TextToSpeech.SynthesizeSpeech + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/texttospeech/v1beta1/BUILD.bazel b/google/cloud/texttospeech/v1beta1/BUILD.bazel index 5a9557a2e..d3408680e 100644 --- a/google/cloud/texttospeech/v1beta1/BUILD.bazel +++ b/google/cloud/texttospeech/v1beta1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -13,12 +16,17 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", ], ) proto_library_with_info( name = "texttospeech_proto_with_info", - deps = [":texttospeech_proto"], + deps = [ + ":texttospeech_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -26,17 +34,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "texttospeech_java_proto", deps = [":texttospeech_proto"], @@ -45,39 +49,40 @@ java_proto_library( java_grpc_library( name = "texttospeech_java_grpc", srcs = [":texttospeech_proto"], - deps = [":texttospeech_java_proto"] + _JAVA_GRPC_DEPS, + deps = [":texttospeech_java_proto"], ) java_gapic_library( name = "texttospeech_java_gapic", src = ":texttospeech_proto_with_info", gapic_yaml = "texttospeech_gapic.yaml", - service_yaml = "//google/cloud/texttospeech:tts_v1beta1.yaml", - test_deps = [":texttospeech_java_grpc"], - deps = [":texttospeech_java_proto"] + _JAVA_GRPC_DEPS, + package = "google.cloud.texttospeech.v1beta1", + service_yaml = "texttospeech_v1beta1.yaml", + test_deps = [ + ":texttospeech_java_grpc", + ], + deps = [ + ":texttospeech_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, +java_gapic_test( + name = "texttospeech_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.texttospeech.v1beta1.TextToSpeechClientTest", + ], runtime_deps = [":texttospeech_java_gapic_test"], -) for test_name in [ - "com.google.cloud.texttospeech.v1beta1.TextToSpeechClientTest", -]] +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-texttospeech-v1beta1-java", - client_deps = [":texttospeech_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":texttospeech_java_gapic_test"], - grpc_deps = [":texttospeech_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":texttospeech_java_gapic", + ":texttospeech_java_grpc", ":texttospeech_java_proto", ":texttospeech_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -85,10 +90,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -96,16 +101,20 @@ go_proto_library( compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/cloud/texttospeech/v1beta1", protos = [":texttospeech_proto"], - deps = ["//google/api:annotations_go_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], ) go_gapic_library( name = "texttospeech_go_gapic", - src = ":texttospeech_proto_with_info", - gapic_yaml = "texttospeech_gapic.yaml", - importpath = "cloud.google.com/go/texttospeech/apiv1beta1", - service_yaml = "//google/cloud/texttospeech:tts_v1beta1.yaml", - deps = [":texttospeech_go_proto"], + srcs = [":texttospeech_proto_with_info"], + grpc_service_config = "texttospeech_grpc_service_config.json", + importpath = "cloud.google.com/go/texttospeech/apiv1beta1;texttospeech", + service_yaml = "texttospeech_v1beta1.yaml", + deps = [ + ":texttospeech_go_proto", + ], ) go_test( @@ -115,13 +124,231 @@ go_test( importpath = "cloud.google.com/go/texttospeech/apiv1beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-texttospeech-v1beta1-go", deps = [ ":texttospeech_go_gapic", - ":texttospeech_go_gapic_srcjar-smoke-test.srcjar", ":texttospeech_go_gapic_srcjar-test.srcjar", ":texttospeech_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "texttospeech_moved_proto", + srcs = [":texttospeech_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + ], +) + +py_proto_library( + name = "texttospeech_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":texttospeech_moved_proto"], +) + +py_grpc_library( + name = "texttospeech_py_grpc", + srcs = [":texttospeech_moved_proto"], + deps = [":texttospeech_py_proto"], +) + +py_gapic_library( + name = "texttospeech_py_gapic", + src = ":texttospeech_proto_with_info", + gapic_yaml = "texttospeech_gapic.yaml", + package = "google.cloud.texttospeech.v1beta1", + service_yaml = "texttospeech_v1beta1.yaml", + deps = [ + ":texttospeech_py_grpc", + ":texttospeech_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "texttospeech-v1beta1-py", + deps = [ + ":texttospeech_py_gapic", + ":texttospeech_py_grpc", + ":texttospeech_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "texttospeech_php_proto", + deps = [":texttospeech_proto"], +) + +php_grpc_library( + name = "texttospeech_php_grpc", + srcs = [":texttospeech_proto"], + deps = [":texttospeech_php_proto"], +) + +php_gapic_library( + name = "texttospeech_php_gapic", + src = ":texttospeech_proto_with_info", + gapic_yaml = "texttospeech_gapic.yaml", + package = "google.cloud.texttospeech.v1beta1", + service_yaml = "texttospeech_v1beta1.yaml", + deps = [ + ":texttospeech_php_grpc", + ":texttospeech_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-texttospeech-v1beta1-php", + deps = [ + ":texttospeech_php_gapic", + ":texttospeech_php_grpc", + ":texttospeech_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "texttospeech_nodejs_gapic", + src = ":texttospeech_proto_with_info", + gapic_yaml = "texttospeech_gapic.yaml", + package = "google.cloud.texttospeech.v1beta1", + service_yaml = "texttospeech_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "texttospeech-v1beta1-nodejs", + deps = [ + ":texttospeech_nodejs_gapic", + ":texttospeech_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "texttospeech_ruby_proto", + deps = [":texttospeech_proto"], +) + +ruby_grpc_library( + name = "texttospeech_ruby_grpc", + srcs = [":texttospeech_proto"], + deps = [":texttospeech_ruby_proto"], +) + +ruby_gapic_library( + name = "texttospeech_ruby_gapic", + src = ":texttospeech_proto_with_info", + gapic_yaml = "texttospeech_gapic.yaml", + package = "google.cloud.texttospeech.v1beta1", + service_yaml = "texttospeech_v1beta1.yaml", + deps = [ + ":texttospeech_ruby_grpc", + ":texttospeech_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-texttospeech-v1beta1-ruby", + deps = [ + ":texttospeech_ruby_gapic", + ":texttospeech_ruby_grpc", + ":texttospeech_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "texttospeech_csharp_proto", + deps = [":texttospeech_proto"], +) + +csharp_grpc_library( + name = "texttospeech_csharp_grpc", + srcs = [":texttospeech_proto"], + deps = [":texttospeech_csharp_proto"], +) + +csharp_gapic_library( + name = "texttospeech_csharp_gapic", + src = ":texttospeech_proto_with_info", + gapic_yaml = "texttospeech_gapic.yaml", + package = "google.cloud.texttospeech.v1beta1", + service_yaml = "texttospeech_v1beta1.yaml", + deps = [ + ":texttospeech_csharp_grpc", + ":texttospeech_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-texttospeech-v1beta1-csharp", + deps = [ + ":texttospeech_csharp_gapic", + ":texttospeech_csharp_grpc", + ":texttospeech_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/texttospeech/v1beta1/cloud_tts.proto b/google/cloud/texttospeech/v1beta1/cloud_tts.proto index 791499c4d..f8189b3fa 100644 --- a/google/cloud/texttospeech/v1beta1/cloud_tts.proto +++ b/google/cloud/texttospeech/v1beta1/cloud_tts.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,43 +11,52 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.texttospeech.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.TextToSpeech.V1beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/texttospeech/v1beta1;texttospeech"; option java_multiple_files = true; option java_outer_classname = "TextToSpeechProto"; option java_package = "com.google.cloud.texttospeech.v1beta1"; +option php_namespace = "Google\\Cloud\\TextToSpeech\\V1beta1"; +option ruby_package = "Google::Cloud::TextToSpeech::V1beta1"; // Service that implements Google Cloud Text-to-Speech API. service TextToSpeech { - // Returns a list of [Voice][google.cloud.texttospeech.v1beta1.Voice] - // supported for synthesis. + option (google.api.default_host) = "texttospeech.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Returns a list of Voice supported for synthesis. rpc ListVoices(ListVoicesRequest) returns (ListVoicesResponse) { option (google.api.http) = { get: "/v1beta1/voices" }; + option (google.api.method_signature) = "language_code"; } // Synthesizes speech synchronously: receive results after all text input // has been processed. - rpc SynthesizeSpeech(SynthesizeSpeechRequest) - returns (SynthesizeSpeechResponse) { + rpc SynthesizeSpeech(SynthesizeSpeechRequest) returns (SynthesizeSpeechResponse) { option (google.api.http) = { post: "/v1beta1/text:synthesize" body: "*" }; + option (google.api.method_signature) = "input,voice,audio_config"; } } // The top-level message sent by the client for the `ListVoices` method. message ListVoicesRequest { - // Optional (but recommended) + // Optional. Recommended. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If // specified, the ListVoices call will only return voices that can be used to // synthesize this language_code. E.g. when specifying "en-NZ", you will get @@ -55,7 +64,47 @@ message ListVoicesRequest { // "no-*" (Norwegian) and "nb-*" (Norwegian Bokmal) voices; specifying "zh" // will also get supported "cmn-*" voices; specifying "zh-hk" will also get // supported "yue-*" voices. - string language_code = 1; + string language_code = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Gender of the voice as described in +// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). +enum SsmlVoiceGender { + // An unspecified gender. + // In VoiceSelectionParams, this means that the client doesn't care which + // gender the selected voice will have. In the Voice field of + // ListVoicesResponse, this may mean that the voice doesn't fit any of the + // other categories in this enum, or that the gender of the voice isn't known. + SSML_VOICE_GENDER_UNSPECIFIED = 0; + + // A male voice. + MALE = 1; + + // A female voice. + FEMALE = 2; + + // A gender-neutral voice. + NEUTRAL = 3; +} + +// Configuration to set up audio encoder. The encoding determines the output +// audio format that we'd like. +enum AudioEncoding { + // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][]. + AUDIO_ENCODING_UNSPECIFIED = 0; + + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + // Audio content returned as LINEAR16 also contains a WAV header. + LINEAR16 = 1; + + // MP3 audio at 32kbps. + MP3 = 2; + + // Opus encoded audio wrapped in an ogg container. The result will be a + // file which can be played natively on Android, and in browsers (at least + // Chrome and Firefox). The quality of the encoding is considerably higher + // than MP3 while using approximately the same bitrate. + OGG_OPUS = 3; } // The message returned to the client by the `ListVoices` method. @@ -84,13 +133,13 @@ message Voice { // The top-level message sent by the client for the `SynthesizeSpeech` method. message SynthesizeSpeechRequest { // Required. The Synthesizer requires either plain text or SSML as input. - SynthesisInput input = 1; + SynthesisInput input = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The desired voice of the synthesized audio. - VoiceSelectionParams voice = 2; + VoiceSelectionParams voice = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The configuration of the synthesized audio. - AudioConfig audio_config = 3; + AudioConfig audio_config = 3 [(google.api.field_behavior) = REQUIRED]; } // Contains text input to be synthesized. Either `text` or `ssml` must be @@ -113,9 +162,9 @@ message SynthesisInput { // Description of which voice to use for a synthesis request. message VoiceSelectionParams { - // The language (and optionally also the region) of the voice expressed as a + // Required. The language (and potentially also the region) of the voice expressed as a // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g. - // "en-US". Required. This should not include a script tag (e.g. use + // "en-US". This should not include a script tag (e.g. use // "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred // from the input provided in the SynthesisInput. The TTS service // will use this parameter to help choose an appropriate voice. Note that @@ -124,13 +173,13 @@ message VoiceSelectionParams { // (e.g. using en-US rather than en-CA if there isn't a Canadian voice // available), or even a different language, e.g. using "nb" (Norwegian // Bokmal) instead of "no" (Norwegian)". - string language_code = 1; + string language_code = 1 [(google.api.field_behavior) = REQUIRED]; - // The name of the voice. Optional; if not set, the service will choose a + // The name of the voice. If not set, the service will choose a // voice based on the other parameters such as language_code and gender. string name = 2; - // The preferred gender of the voice. Optional; if not set, the service will + // The preferred gender of the voice. If not set, the service will // choose a voice based on the other parameters such as language_code and // name. Note that this is only a preference, not requirement; if a // voice of the appropriate gender is not available, the synthesizer should @@ -140,89 +189,66 @@ message VoiceSelectionParams { // Description of audio data to be synthesized. message AudioConfig { - // Required. The format of the requested audio byte stream. - AudioEncoding audio_encoding = 1; - - // Optional speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal - // native speed supported by the specific voice. 2.0 is twice as fast, and - // 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any - // other values < 0.25 or > 4.0 will return an error. - double speaking_rate = 2; - - // Optional speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 - // semitones from the original pitch. -20 means decrease 20 semitones from the - // original pitch. - double pitch = 3; - - // Optional volume gain (in dB) of the normal native volume supported by the - // specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of - // 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) - // will play at approximately half the amplitude of the normal native signal - // amplitude. A value of +6.0 (dB) will play at approximately twice the - // amplitude of the normal native signal amplitude. Strongly recommend not to - // exceed +10 (dB) as there's usually no effective increase in loudness for - // any value greater than that. - double volume_gain_db = 4; - - // The synthesis sample rate (in hertz) for this audio. Optional. If this is - // different from the voice's natural sample rate, then the synthesizer will - // honor this request by converting to the desired sample rate (which might - // result in worse audio quality), unless the specified sample rate is not - // supported for the encoding chosen, in which case it will fail the request - // and return [google.rpc.Code.INVALID_ARGUMENT][]. - int32 sample_rate_hertz = 5; - - // An identifier which selects 'audio effects' profiles that are applied on - // (post synthesized) text to speech. - // Effects are applied on top of each other in the order they are given. - repeated string effects_profile_id = 6; + // Required. The format of the audio byte stream. + AudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Input only. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is + // the normal native speed supported by the specific voice. 2.0 is twice as + // fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 + // speed. Any other values < 0.25 or > 4.0 will return an error. + double speaking_rate = 2 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means + // increase 20 semitones from the original pitch. -20 means decrease 20 + // semitones from the original pitch. + double pitch = 3 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Input only. Volume gain (in dB) of the normal native volume + // supported by the specific voice, in the range [-96.0, 16.0]. If unset, or + // set to a value of 0.0 (dB), will play at normal native signal amplitude. A + // value of -6.0 (dB) will play at approximately half the amplitude of the + // normal native signal amplitude. A value of +6.0 (dB) will play at + // approximately twice the amplitude of the normal native signal amplitude. + // Strongly recommend not to exceed +10 (dB) as there's usually no effective + // increase in loudness for any value greater than that. + double volume_gain_db = 4 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. The synthesis sample rate (in hertz) for this audio. When this is + // specified in SynthesizeSpeechRequest, if this is different from the voice's + // natural sample rate, then the synthesizer will honor this request by + // converting to the desired sample rate (which might result in worse audio + // quality), unless the specified sample rate is not supported for the + // encoding chosen, in which case it will fail the request and return + // [google.rpc.Code.INVALID_ARGUMENT][]. + int32 sample_rate_hertz = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Input only. An identifier which selects 'audio effects' profiles + // that are applied on (post synthesized) text to speech. Effects are applied + // on top of each other in the order they are given. See + // [audio + // profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for + // current supported profile ids. + repeated string effects_profile_id = 6 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; } // The message returned to the client by the `SynthesizeSpeech` method. message SynthesizeSpeechResponse { // The audio data bytes encoded as specified in the request, including the - // header (For LINEAR16 audio, we include the WAV header). Note: as + // header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). + // For LINEAR16 audio, we include the WAV header. Note: as // with all bytes fields, protobuffers use a pure binary representation, // whereas JSON representations use base64. bytes audio_content = 1; } - -// Gender of the voice as described in -// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). -enum SsmlVoiceGender { - // An unspecified gender. - // In VoiceSelectionParams, this means that the client doesn't care which - // gender the selected voice will have. In the Voice field of - // ListVoicesResponse, this may mean that the voice doesn't fit any of the - // other categories in this enum, or that the gender of the voice isn't known. - SSML_VOICE_GENDER_UNSPECIFIED = 0; - - // A male voice. - MALE = 1; - - // A female voice. - FEMALE = 2; - - // A gender-neutral voice. - NEUTRAL = 3; -} - -// Configuration to set up audio encoder. The encoding determines the output -// audio format that we'd like. -enum AudioEncoding { - // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][]. - AUDIO_ENCODING_UNSPECIFIED = 0; - - // Uncompressed 16-bit signed little-endian samples (Linear PCM). - // Audio content returned as LINEAR16 also contains a WAV header. - LINEAR16 = 1; - - // MP3 audio. - MP3 = 2; - - // Opus encoded audio wrapped in an ogg container. The result will be a - // file which can be played natively on Android, and in browsers (at least - // Chrome and Firefox). The quality of the encoding is considerably higher - // than MP3 while using approximately the same bitrate. - OGG_OPUS = 3; -} diff --git a/google/cloud/texttospeech/v1beta1/texttospeech_gapic.legacy.yaml b/google/cloud/texttospeech/v1beta1/texttospeech_gapic.legacy.yaml new file mode 100644 index 000000000..276f9ed83 --- /dev/null +++ b/google/cloud/texttospeech/v1beta1/texttospeech_gapic.legacy.yaml @@ -0,0 +1,135 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.texttospeech.v1beta1 + python: + package_name: google.cloud.texttospeech_v1beta1.gapic + go: + package_name: cloud.google.com/go/texttospeech/apiv1beta1 + csharp: + package_name: Google.Cloud.TextToSpeech.V1Beta1 + ruby: + package_name: Google::Cloud::TextToSpeech::V1beta1 + php: + package_name: Google\Cloud\TextToSpeech\V1beta1 + nodejs: + package_name: text-to-speech.v1beta1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: + # The fully qualified name of the API interface. +- name: google.cloud.texttospeech.v1beta1.TextToSpeech + smoke_test: + method: SynthesizeSpeech + init_fields: + - input.text="test" + - voice.language_code="en-US" + - audio_config.audio_encoding=MP3 + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListVoices + flattening: + groups: + - parameters: + - language_code + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 + - name: SynthesizeSpeech + flattening: + groups: + - parameters: + - input + - voice + - audio_config + required_fields: + - input + - voice + - audio_config + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml b/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml index 276f9ed83..e02fe4316 100644 --- a/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml +++ b/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -17,119 +17,8 @@ language_settings: nodejs: package_name: text-to-speech.v1beta1 domain_layer_location: google-cloud -# A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.cloud.texttospeech.v1beta1.TextToSpeech - smoke_test: - method: SynthesizeSpeech - init_fields: - - input.text="test" - - voice.language_code="en-US" - - audio_config.audio_encoding=MP3 - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: [] - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: ListVoices - flattening: - groups: - - parameters: - - language_code - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 30000 - name: SynthesizeSpeech - flattening: - groups: - - parameters: - - input - - voice - - audio_config - required_fields: - - input - - voice - - audio_config retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 diff --git a/google/cloud/texttospeech/v1beta1/texttospeech_grpc_service_config.json b/google/cloud/texttospeech/v1beta1/texttospeech_grpc_service_config.json new file mode 100755 index 000000000..4741d86c9 --- /dev/null +++ b/google/cloud/texttospeech/v1beta1/texttospeech_grpc_service_config.json @@ -0,0 +1,26 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.texttospeech.v1beta1.TextToSpeech", + "method": "ListVoices" + }, + { + "service": "google.cloud.texttospeech.v1beta1.TextToSpeech", + "method": "SynthesizeSpeech" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/texttospeech/v1beta1/texttospeech_v1beta1.yaml b/google/cloud/texttospeech/v1beta1/texttospeech_v1beta1.yaml new file mode 100644 index 000000000..8e5391843 --- /dev/null +++ b/google/cloud/texttospeech/v1beta1/texttospeech_v1beta1.yaml @@ -0,0 +1,27 @@ +type: google.api.Service +config_version: 3 +name: texttospeech.googleapis.com +title: Cloud Text-to-Speech API + +apis: +- name: google.cloud.texttospeech.v1beta1.TextToSpeech + +documentation: + summary: |- + Synthesizes natural-sounding speech by applying powerful neural network + models. + overview: |- + # Introduction + + Google Cloud Text-to-Speech API provides speech synthesis as a service. + +authentication: + rules: + - selector: google.cloud.texttospeech.v1beta1.TextToSpeech.ListVoices + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.texttospeech.v1beta1.TextToSpeech.SynthesizeSpeech + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/translate/artman_translate_v3.yaml b/google/cloud/translate/artman_translate_v3.yaml new file mode 100644 index 000000000..9cd1553e5 --- /dev/null +++ b/google/cloud/translate/artman_translate_v3.yaml @@ -0,0 +1,35 @@ +common: + api_name: translate + api_version: v3 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v3 + service_yaml: v3/translate_v3.yaml + gapic_yaml: v3/translate_gapic.yaml + proto_package: google.cloud.translation.v3 +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: php_gapic + type: GAPIC + language: PHP +- name: go_gapic + type: GAPIC + language: GO +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: csharp_gapic + type: GAPIC + language: CSHARP diff --git a/google/cloud/translate/artman_translate_v3beta1.yaml b/google/cloud/translate/artman_translate_v3beta1.yaml index 5b5e1b8c7..655741031 100644 --- a/google/cloud/translate/artman_translate_v3beta1.yaml +++ b/google/cloud/translate/artman_translate_v3beta1.yaml @@ -6,8 +6,9 @@ common: - name: google-common-protos src_proto_paths: - v3beta1 - service_yaml: translate_v3beta1.yaml + service_yaml: v3beta1/translate_v3beta1.yaml gapic_yaml: v3beta1/translate_gapic.yaml + proto_package: google.cloud.translation.v3beta1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/translate/translate_v3beta1.yaml b/google/cloud/translate/translate_v3beta1.yaml deleted file mode 100644 index 2df789463..000000000 --- a/google/cloud/translate/translate_v3beta1.yaml +++ /dev/null @@ -1,68 +0,0 @@ -type: google.api.Service -config_version: 3 -name: translate.googleapis.com -title: Cloud Translation API - -apis: -- name: google.cloud.translation.v3beta1.TranslationService - -documentation: - summary: Integrates text translation into your website or application. - -http: - rules: - - selector: google.iam.v1.IAMPolicy.GetIamPolicy - get: '/v3beta1/{resource=projects/*/locations/*}:getIamPolicy' - additional_bindings: - - get: '/v3beta1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy' - - get: '/v3beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy' - - get: '/v3beta1/{resource=projects/*/locations/*/models/general/*}:getIamPolicy' - - get: '/v3beta1/{resource=projects/*/locations/*/models/language-detection/*}:getIamPolicy' - - selector: google.iam.v1.IAMPolicy.SetIamPolicy - post: '/v3beta1/{resource=projects/*/locations/*}:setIamPolicy' - body: '*' - additional_bindings: - - post: '/v3beta1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy' - body: '*' - - post: '/v3beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy' - body: '*' - - post: '/v3beta1/{resource=projects/*/locations/*/models/general/*}:setIamPolicy' - body: '*' - - post: '/v3beta1/{resource=projects/*/locations/*/models/language-detection/*}:setIamPolicy' - body: '*' - - selector: google.iam.v1.IAMPolicy.TestIamPermissions - post: '/v3beta1/{resource=projects/*/locations/*/**}:testIamPermissions' - body: '*' - - selector: google.longrunning.Operations.CancelOperation - post: '/v3beta1/{name=projects/*/locations/*/operations/*}:cancel' - body: '*' - - selector: google.longrunning.Operations.DeleteOperation - delete: '/v3beta1/{name=projects/*/locations/*/operations/*}' - - selector: google.longrunning.Operations.GetOperation - get: '/v3beta1/{name=projects/*/locations/*/operations/*}' - - selector: google.longrunning.Operations.ListOperations - get: '/v3beta1/{name=projects/*/locations/*/operations}' - - selector: google.longrunning.Operations.WaitOperation - post: '/v3beta1/{name=projects/*/locations/*/operations/*}:wait' - body: '*' - -authentication: - rules: - - selector: 'google.cloud.translation.v3beta1.TranslationService.*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/cloud-translation - - selector: google.cloud.translation.v3beta1.TranslationService.BatchTranslateText - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform - - selector: google.cloud.translation.v3beta1.TranslationService.CreateGlossary - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform - - selector: 'google.longrunning.Operations.*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/cloud-translation diff --git a/google/cloud/translate/v3/BUILD.bazel b/google/cloud/translate/v3/BUILD.bazel new file mode 100644 index 000000000..1599dcb2f --- /dev/null +++ b/google/cloud/translate/v3/BUILD.bazel @@ -0,0 +1,365 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "translation_proto", + srcs = [ + "translation_service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "translation_proto_with_info", + deps = [ + ":translation_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "translation_java_proto", + deps = [":translation_proto"], +) + +java_grpc_library( + name = "translation_java_grpc", + srcs = [":translation_proto"], + deps = [":translation_java_proto"], +) + +java_gapic_library( + name = "translation_java_gapic", + src = ":translation_proto_with_info", + gapic_yaml = "translate_gapic.yaml", + package = "google.cloud.translation.v3", + service_yaml = "translate_v3.yaml", + test_deps = [ + ":translation_java_grpc", + ], + deps = [ + ":translation_java_proto", + ], +) + +java_gapic_test( + name = "translation_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.translate.v3.TranslationServiceClientTest", + ], + runtime_deps = [":translation_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-translation-v3-java", + deps = [ + ":translation_java_gapic", + ":translation_java_grpc", + ":translation_java_proto", + ":translation_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "translation_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/translate/v3", + protos = [":translation_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "translation_go_gapic", + srcs = [":translation_proto_with_info"], + grpc_service_config = "translate_grpc_service_config.json", + importpath = "cloud.google.com/go/translate/apiv3;translate", + service_yaml = "translate_v3.yaml", + deps = [ + ":translation_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + ], +) + +go_test( + name = "translation_go_gapic_test", + srcs = [":translation_go_gapic_srcjar_test"], + embed = [":translation_go_gapic"], + importpath = "cloud.google.com/go/translate/apiv3", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-translation-v3-go", + deps = [ + ":translation_go_gapic", + ":translation_go_gapic_srcjar-test.srcjar", + ":translation_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "translation_moved_proto", + srcs = [":translation_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "translation_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":translation_moved_proto"], +) + +py_grpc_library( + name = "translation_py_grpc", + srcs = [":translation_moved_proto"], + deps = [":translation_py_proto"], +) + +py_gapic_library( + name = "translation_py_gapic", + src = ":translation_proto_with_info", + gapic_yaml = "translate_gapic.yaml", + package = "google.cloud.translation.v3", + service_yaml = "translate_v3.yaml", + deps = [ + ":translation_py_grpc", + ":translation_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "translation-v3-py", + deps = [ + ":translation_py_gapic", + ":translation_py_grpc", + ":translation_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "translation_php_proto", + deps = [":translation_proto"], +) + +php_grpc_library( + name = "translation_php_grpc", + srcs = [":translation_proto"], + deps = [":translation_php_proto"], +) + +php_gapic_library( + name = "translation_php_gapic", + src = ":translation_proto_with_info", + gapic_yaml = "translate_gapic.yaml", + package = "google.cloud.translation.v3", + service_yaml = "translate_v3.yaml", + deps = [ + ":translation_php_grpc", + ":translation_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-translation-v3-php", + deps = [ + ":translation_php_gapic", + ":translation_php_grpc", + ":translation_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "translation_nodejs_gapic", + src = ":translation_proto_with_info", + gapic_yaml = "translate_gapic.yaml", + package = "google.cloud.translation.v3", + service_yaml = "translate_v3.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "translation-v3-nodejs", + deps = [ + ":translation_nodejs_gapic", + ":translation_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "translation_ruby_proto", + deps = [":translation_proto"], +) + +ruby_grpc_library( + name = "translation_ruby_grpc", + srcs = [":translation_proto"], + deps = [":translation_ruby_proto"], +) + +ruby_gapic_library( + name = "translation_ruby_gapic", + src = ":translation_proto_with_info", + gapic_yaml = "translate_gapic.yaml", + package = "google.cloud.translation.v3", + service_yaml = "translate_v3.yaml", + deps = [ + ":translation_ruby_grpc", + ":translation_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-translation-v3-ruby", + deps = [ + ":translation_ruby_gapic", + ":translation_ruby_grpc", + ":translation_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "translation_csharp_proto", + deps = [":translation_proto"], +) + +csharp_grpc_library( + name = "translation_csharp_grpc", + srcs = [":translation_proto"], + deps = [":translation_csharp_proto"], +) + +csharp_gapic_library( + name = "translation_csharp_gapic", + src = ":translation_proto_with_info", + gapic_yaml = "translate_gapic.yaml", + package = "google.cloud.translation.v3", + service_yaml = "translate_v3.yaml", + deps = [ + ":translation_csharp_grpc", + ":translation_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-translation-v3-csharp", + deps = [ + ":translation_csharp_gapic", + ":translation_csharp_grpc", + ":translation_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/translate/v3/translate_gapic.legacy.yaml b/google/cloud/translate/v3/translate_gapic.legacy.yaml new file mode 100644 index 000000000..bcfaed533 --- /dev/null +++ b/google/cloud/translate/v3/translate_gapic.legacy.yaml @@ -0,0 +1,244 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.translate.v3 + python: + package_name: google.cloud.translate_v3.gapic + go: + package_name: cloud.google.com/go/translate/apiv3 + csharp: + package_name: Google.Cloud.Translate.V3 + ruby: + package_name: Google::Cloud::Translate::V3 + php: + package_name: Google\Cloud\Translate\V3 + nodejs: + package_name: translate.v3 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.translation.v3.TranslationService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/glossaries/{glossary} + entity_name: glossary + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: TranslateText + flattening: + groups: + - parameters: + - parent + - target_language_code + - contents + - parameters: + - parent + - model + - mime_type + - source_language_code + - target_language_code + - contents + required_fields: + - contents + - target_language_code + - parent + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: DetectLanguage + flattening: + groups: + - parameters: + - parent + - model + - mime_type + - content + required_fields: + - parent + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetSupportedLanguages + flattening: + groups: + - parameters: + - parent + - model + - display_language_code + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: BatchTranslateText + required_fields: + - parent + - source_language_code + - target_language_codes + - input_configs + - output_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + long_running: + return_type: google.cloud.translation.v3.BatchTranslateResponse + metadata_type: google.cloud.translation.v3.BatchTranslateMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 60000 + - name: CreateGlossary + flattening: + groups: + - parameters: + - parent + - glossary + required_fields: + - parent + - glossary + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + long_running: + return_type: google.cloud.translation.v3.Glossary + metadata_type: google.cloud.translation.v3.CreateGlossaryMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 60000 + - name: ListGlossaries + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: glossaries + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetGlossary + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: glossary + timeout_millis: 60000 + - name: DeleteGlossary + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: glossary + long_running: + return_type: google.cloud.translation.v3.DeleteGlossaryResponse + metadata_type: google.cloud.translation.v3.DeleteGlossaryMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 60000 diff --git a/google/cloud/translate/v3/translate_gapic.yaml b/google/cloud/translate/v3/translate_gapic.yaml new file mode 100644 index 000000000..4532cd522 --- /dev/null +++ b/google/cloud/translate/v3/translate_gapic.yaml @@ -0,0 +1,25 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.translate.v3 + python: + package_name: google.cloud.translate_v3.gapic + go: + package_name: cloud.google.com/go/translate/apiv3 + release_level: GA + csharp: + package_name: Google.Cloud.Translate.V3 + ruby: + package_name: Google::Cloud::Translate::V3 + php: + package_name: Google\Cloud\Translate\V3 + nodejs: + package_name: translate.v3 + domain_layer_location: google-cloud +interfaces: +- name: google.cloud.translation.v3.TranslationService + methods: + - name: DeleteGlossary + retry_codes_name: idempotent diff --git a/google/cloud/translate/v3/translate_grpc_service_config.json b/google/cloud/translate/v3/translate_grpc_service_config.json new file mode 100755 index 000000000..657011c12 --- /dev/null +++ b/google/cloud/translate/v3/translate_grpc_service_config.json @@ -0,0 +1,55 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.translation.v3.TranslationService", + "method": "GetSupportedLanguages" + }, + { + "service": "google.cloud.translation.v3.TranslationService", + "method": "ListGlossaries" + }, + { + "service": "google.cloud.translation.v3.TranslationService", + "method": "GetGlossary" + }, + { + "service": "google.cloud.translation.v3.TranslationService", + "method": "DeleteGlossary" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.translation.v3.TranslationService", + "method": "TranslateText" + }, + { + "service": "google.cloud.translation.v3.TranslationService", + "method": "DetectLanguage" + }, + { + "service": "google.cloud.translation.v3.TranslationService", + "method": "BatchTranslateText" + }, + { + "service": "google.cloud.translation.v3.TranslationService", + "method": "CreateGlossary" + } + ], + "timeout": "600s" + } + ] +} diff --git a/google/cloud/translate/v3/translate_v3.yaml b/google/cloud/translate/v3/translate_v3.yaml new file mode 100644 index 000000000..dad626213 --- /dev/null +++ b/google/cloud/translate/v3/translate_v3.yaml @@ -0,0 +1,38 @@ +type: google.api.Service +config_version: 3 +name: translate.googleapis.com +title: Cloud Translation API + +apis: +- name: google.cloud.translation.v3.TranslationService + +documentation: + summary: Integrates text translation into your website or application. + +backend: + rules: + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + - selector: google.longrunning.Operations.WaitOperation + deadline: 120.0 + +authentication: + rules: + - selector: 'google.cloud.translation.v3.TranslationService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-translation + - selector: google.cloud.translation.v3.TranslationService.BatchTranslateText + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.translation.v3.TranslationService.CreateGlossary + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-translation diff --git a/google/cloud/translate/v3/translation_service.proto b/google/cloud/translate/v3/translation_service.proto new file mode 100644 index 000000000..ad43831c2 --- /dev/null +++ b/google/cloud/translate/v3/translation_service.proto @@ -0,0 +1,926 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.translation.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Translate.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/translate/v3;translate"; +option java_multiple_files = true; +option java_outer_classname = "TranslationServiceProto"; +option java_package = "com.google.cloud.translate.v3"; +option php_namespace = "Google\\Cloud\\Translate\\V3"; +option ruby_package = "Google::Cloud::Translate::V3"; + +// Proto file for the Cloud Translation API (v3 GA). + +// Provides natural language translation operations. +service TranslationService { + option (google.api.default_host) = "translate.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-translation"; + + // Translates input text and returns translated text. + rpc TranslateText(TranslateTextRequest) returns (TranslateTextResponse) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*}:translateText" + body: "*" + additional_bindings { + post: "/v3/{parent=projects/*}:translateText" + body: "*" + } + }; + option (google.api.method_signature) = + "parent,target_language_code,contents"; + option (google.api.method_signature) = + "parent,model,mime_type,source_language_code,target_language_code,contents"; + } + + // Detects the language of text within a request. + rpc DetectLanguage(DetectLanguageRequest) returns (DetectLanguageResponse) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*}:detectLanguage" + body: "*" + additional_bindings { + post: "/v3/{parent=projects/*}:detectLanguage" + body: "*" + } + }; + option (google.api.method_signature) = "parent,model,mime_type,content"; + } + + // Returns a list of supported languages for translation. + rpc GetSupportedLanguages(GetSupportedLanguagesRequest) + returns (SupportedLanguages) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*}/supportedLanguages" + additional_bindings { get: "/v3/{parent=projects/*}/supportedLanguages" } + }; + option (google.api.method_signature) = "parent,model,display_language_code"; + } + + // Translates a large volume of text in asynchronous batch mode. + // This function provides real-time output as the inputs are being processed. + // If caller cancels a request, the partial results (for an input file, it's + // all or nothing) may still be available on the specified output location. + // + // This call returns immediately and you can + // use google.longrunning.Operation.name to poll the status of the call. + rpc BatchTranslateText(BatchTranslateTextRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*}:batchTranslateText" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "BatchTranslateResponse" + metadata_type: "BatchTranslateMetadata" + }; + } + + // Creates a glossary and returns the long-running operation. Returns + // NOT_FOUND, if the project doesn't exist. + rpc CreateGlossary(CreateGlossaryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*}/glossaries" + body: "glossary" + }; + option (google.api.method_signature) = "parent,glossary"; + option (google.longrunning.operation_info) = { + response_type: "Glossary" + metadata_type: "CreateGlossaryMetadata" + }; + } + + // Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't + // exist. + rpc ListGlossaries(ListGlossariesRequest) returns (ListGlossariesResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*}/glossaries" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a glossary. Returns NOT_FOUND, if the glossary doesn't + // exist. + rpc GetGlossary(GetGlossaryRequest) returns (Glossary) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/glossaries/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a glossary, or cancels glossary construction + // if the glossary isn't created yet. + // Returns NOT_FOUND, if the glossary doesn't exist. + rpc DeleteGlossary(DeleteGlossaryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/glossaries/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "DeleteGlossaryResponse" + metadata_type: "DeleteGlossaryMetadata" + }; + } +} + +// Configures which glossary should be used for a specific target language, +// and defines options for applying that glossary. +message TranslateTextGlossaryConfig { + // Required. Specifies the glossary used for this translation. Use + // this format: projects/*/locations/*/glossaries/* + string glossary = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates match is case-insensitive. + // Default value is false if missing. + bool ignore_case = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for synchronous translation. +message TranslateTextRequest { + // Required. The content of the input in string format. + // We recommend the total content be less than 30k codepoints. + // Use BatchTranslateText for larger text. + repeated string contents = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The format of the source text, for example, "text/html", + // "text/plain". If left blank, the MIME type defaults to "text/html". + string mime_type = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The BCP-47 language code of the input text if + // known, for example, "en-US" or "sr-Latn". Supported language codes are + // listed in Language Support. If the source language isn't specified, the API + // attempts to identify the source language automatically and returns the + // source language within the response. + string source_language_code = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The BCP-47 language code to use for translation of the input + // text, set to one of the language codes listed in Language Support. + string target_language_code = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Project or location to make a call. Must refer to a caller's + // project. + // + // Format: `projects/{project-number-or-id}` or + // `projects/{project-number-or-id}/locations/{location-id}`. + // + // For global calls, use `projects/{project-number-or-id}/locations/global` or + // `projects/{project-number-or-id}`. + // + // Non-global location is required for requests using AutoML models or + // custom glossaries. + // + // Models and glossaries must be within the same region (have same + // location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + string parent = 8 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The `model` type requested for this translation. + // + // The format depends on model type: + // + // - AutoML Translation models: + // `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + // + // - General (built-in) models: + // `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + // `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + // + // + // For global (non-regionalized) requests, use `location-id` `global`. + // For example, + // `projects/{project-number-or-id}/locations/global/models/general/nmt`. + // + // If missing, the system decides which google base model to use. + string model = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Glossary to be applied. The glossary must be + // within the same region (have the same location-id) as the model, otherwise + // an INVALID_ARGUMENT (400) error is returned. + TranslateTextGlossaryConfig glossary_config = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The labels with user-defined metadata for the request. + // + // Label keys and values can be no longer than 63 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // Label values are optional. Label keys must start with a letter. + // + // See https://cloud.google.com/translate/docs/labels for more information. + map labels = 10 [(google.api.field_behavior) = OPTIONAL]; +} + +message TranslateTextResponse { + // Text translation responses with no glossary applied. + // This field has the same length as + // [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. + repeated Translation translations = 1; + + // Text translation responses if a glossary is provided in the request. + // This can be the same as + // [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations] + // if no terms apply. This field has the same length as + // [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. + repeated Translation glossary_translations = 3; +} + +// A single translation response. +message Translation { + // Text translated into the target language. + string translated_text = 1; + + // Only present when `model` is present in the request. + // `model` here is normalized to have project number. + // + // For example: + // If the `model` requested in TranslationTextRequest is + // `projects/{project-id}/locations/{location-id}/models/general/nmt` then + // `model` here would be normalized to + // `projects/{project-number}/locations/{location-id}/models/general/nmt`. + string model = 2; + + // The BCP-47 language code of source text in the initial request, detected + // automatically, if no source language was passed within the initial + // request. If the source language was passed, auto-detection of the language + // does not occur and this field is empty. + string detected_language_code = 4; + + // The `glossary_config` used for this translation. + TranslateTextGlossaryConfig glossary_config = 3; +} + +// The request message for language detection. +message DetectLanguageRequest { + // Required. Project or location to make a call. Must refer to a caller's + // project. + // + // Format: `projects/{project-number-or-id}/locations/{location-id}` or + // `projects/{project-number-or-id}`. + // + // For global calls, use `projects/{project-number-or-id}/locations/global` or + // `projects/{project-number-or-id}`. + // + // Only models within the same region (has same location-id) can be used. + // Otherwise an INVALID_ARGUMENT (400) error is returned. + string parent = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The language detection model to be used. + // + // Format: + // `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` + // + // Only one language detection model is currently supported: + // `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. + // + // If not specified, the default model is used. + string model = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The source of the document from which to detect the language. + oneof source { + // The content of the input stored as a string. + string content = 1; + } + + // Optional. The format of the source text, for example, "text/html", + // "text/plain". If left blank, the MIME type defaults to "text/html". + string mime_type = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The labels with user-defined metadata for the request. + // + // Label keys and values can be no longer than 63 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // Label values are optional. Label keys must start with a letter. + // + // See https://cloud.google.com/translate/docs/labels for more information. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for language detection. +message DetectedLanguage { + // The BCP-47 language code of source content in the request, detected + // automatically. + string language_code = 1; + + // The confidence of the detection result for this language. + float confidence = 2; +} + +// The response message for language detection. +message DetectLanguageResponse { + // A list of detected languages sorted by detection confidence in descending + // order. The most probable language first. + repeated DetectedLanguage languages = 1; +} + +// The request message for discovering supported languages. +message GetSupportedLanguagesRequest { + // Required. Project or location to make a call. Must refer to a caller's + // project. + // + // Format: `projects/{project-number-or-id}` or + // `projects/{project-number-or-id}/locations/{location-id}`. + // + // For global calls, use `projects/{project-number-or-id}/locations/global` or + // `projects/{project-number-or-id}`. + // + // Non-global location is required for AutoML models. + // + // Only models within the same region (have same location-id) can be used, + // otherwise an INVALID_ARGUMENT (400) error is returned. + string parent = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The language to use to return localized, human readable names + // of supported languages. If missing, then display names are not returned + // in a response. + string display_language_code = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Get supported languages of this model. + // + // The format depends on model type: + // + // - AutoML Translation models: + // `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + // + // - General (built-in) models: + // `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + // `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + // + // + // Returns languages supported by the specified model. + // If missing, we get supported languages of Google general base (PBMT) model. + string model = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for discovering supported languages. +message SupportedLanguages { + // A list of supported language responses. This list contains an entry + // for each language the Translation API supports. + repeated SupportedLanguage languages = 1; +} + +// A single supported language response corresponds to information related +// to one supported language. +message SupportedLanguage { + // Supported language code, generally consisting of its ISO 639-1 + // identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes + // including language and region identifiers are returned (for example, + // 'zh-TW' and 'zh-CN') + string language_code = 1; + + // Human readable name of the language localized in the display language + // specified in the request. + string display_name = 2; + + // Can be used as source language. + bool support_source = 3; + + // Can be used as target language. + bool support_target = 4; +} + +// The Google Cloud Storage location for the input content. +message GcsSource { + // Required. Source data URI. For example, `gs://my_bucket/my_object`. + string input_uri = 1; +} + +// Input configuration for BatchTranslateText request. +message InputConfig { + // Optional. Can be "text/plain" or "text/html". + // For `.tsv`, "text/html" is used if mime_type is missing. + // For `.html`, this field must be "text/html" or empty. + // For `.txt`, this field must be "text/plain" or empty. + string mime_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Specify the input. + oneof source { + // Required. Google Cloud Storage location for the source input. + // This can be a single file (for example, + // `gs://translation-test/input.tsv`) or a wildcard (for example, + // `gs://translation-test/*`). If a file extension is `.tsv`, it can + // contain either one or two columns. The first column (optional) is the id + // of the text request. If the first column is missing, we use the row + // number (0-based) from the input file as the ID in the output file. The + // second column is the actual text to be + // translated. We recommend each row be <= 10K Unicode codepoints, + // otherwise an error might be returned. + // Note that the input tsv must be RFC 4180 compliant. + // + // You could use https://github.com/Clever/csvlint to check potential + // formatting errors in your tsv file. + // csvlint --delimiter='\t' your_input_file.tsv + // + // The other supported file extensions are `.txt` or `.html`, which is + // treated as a single large chunk of text. + GcsSource gcs_source = 2; + } +} + +// The Google Cloud Storage location for the output content. +message GcsDestination { + // Required. There must be no files under 'output_uri_prefix'. + // 'output_uri_prefix' must end with "/" and start with "gs://", otherwise an + // INVALID_ARGUMENT (400) error is returned. + string output_uri_prefix = 1; +} + +// Output configuration for BatchTranslateText request. +message OutputConfig { + // Required. The destination of output. + oneof destination { + // Google Cloud Storage destination for output content. + // For every single input file (for example, gs://a/b/c.[extension]), we + // generate at most 2 * n output files. (n is the # of target_language_codes + // in the BatchTranslateTextRequest). + // + // Output files (tsv) generated are compliant with RFC 4180 except that + // record delimiters are '\n' instead of '\r\n'. We don't provide any way to + // change record delimiters. + // + // While the input files are being processed, we write/update an index file + // 'index.csv' under 'output_uri_prefix' (for example, + // gs://translation-test/index.csv) The index file is generated/updated as + // new files are being translated. The format is: + // + // input_file,target_language_code,translations_file,errors_file, + // glossary_translations_file,glossary_errors_file + // + // input_file is one file we matched using gcs_source.input_uri. + // target_language_code is provided in the request. + // translations_file contains the translations. (details provided below) + // errors_file contains the errors during processing of the file. (details + // below). Both translations_file and errors_file could be empty + // strings if we have no content to output. + // glossary_translations_file and glossary_errors_file are always empty + // strings if the input_file is tsv. They could also be empty if we have no + // content to output. + // + // Once a row is present in index.csv, the input/output matching never + // changes. Callers should also expect all the content in input_file are + // processed and ready to be consumed (that is, no partial output file is + // written). + // + // The format of translations_file (for target language code 'trg') is: + // gs://translation_test/a_b_c_'trg'_translations.[extension] + // + // If the input file extension is tsv, the output has the following + // columns: + // Column 1: ID of the request provided in the input, if it's not + // provided in the input, then the input row number is used (0-based). + // Column 2: source sentence. + // Column 3: translation without applying a glossary. Empty string if there + // is an error. + // Column 4 (only present if a glossary is provided in the request): + // translation after applying the glossary. Empty string if there is an + // error applying the glossary. Could be same string as column 3 if there is + // no glossary applied. + // + // If input file extension is a txt or html, the translation is directly + // written to the output file. If glossary is requested, a separate + // glossary_translations_file has format of + // gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + // + // The format of errors file (for target language code 'trg') is: + // gs://translation_test/a_b_c_'trg'_errors.[extension] + // + // If the input file extension is tsv, errors_file contains the following: + // Column 1: ID of the request provided in the input, if it's not + // provided in the input, then the input row number is used (0-based). + // Column 2: source sentence. + // Column 3: Error detail for the translation. Could be empty. + // Column 4 (only present if a glossary is provided in the request): + // Error when applying the glossary. + // + // If the input file extension is txt or html, glossary_error_file will be + // generated that contains error details. glossary_error_file has format of + // gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + GcsDestination gcs_destination = 1; + } +} + +// The batch translation request. +message BatchTranslateTextRequest { + // Required. Location to make a call. Must refer to a caller's project. + // + // Format: `projects/{project-number-or-id}/locations/{location-id}`. + // + // The `global` location is not supported for batch translation. + // + // Only AutoML Translation models or glossaries within the same region (have + // the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + // error is returned. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Source language code. + string source_language_code = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Specify up to 10 language codes here. + repeated string target_language_codes = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The models to use for translation. Map's key is target language + // code. Map's value is model name. Value can be a built-in general model, + // or an AutoML Translation model. + // + // The value format depends on model type: + // + // - AutoML Translation models: + // `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + // + // - General (built-in) models: + // `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + // `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + // + // + // If the map is empty or a specific model is + // not requested for a language pair, then default google model (nmt) is used. + map models = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Input configurations. + // The total number of files matched should be <= 1000. + // The total content size should be <= 100M Unicode codepoints. + // The files must use UTF-8 encoding. + repeated InputConfig input_configs = 5 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Output configuration. + // If 2 input configs match to the same file (that is, same input path), + // we don't generate output for duplicate inputs. + OutputConfig output_config = 6 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Glossaries to be applied for translation. + // It's keyed by target language code. + map glossaries = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The labels with user-defined metadata for the request. + // + // Label keys and values can be no longer than 63 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // Label values are optional. Label keys must start with a letter. + // + // See https://cloud.google.com/translate/docs/labels for more information. + map labels = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// State metadata for the batch translation operation. +message BatchTranslateMetadata { + // State of the job. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is being processed. + RUNNING = 1; + + // The batch is processed, and at least one item was successfully + // processed. + SUCCEEDED = 2; + + // The batch is done and no item was successfully processed. + FAILED = 3; + + // Request is in the process of being canceled after caller invoked + // longrunning.Operations.CancelOperation on the request id. + CANCELLING = 4; + + // The batch is done after the user has called the + // longrunning.Operations.CancelOperation. Any records processed before the + // cancel command are output as specified in the request. + CANCELLED = 5; + } + + // The state of the operation. + State state = 1; + + // Number of successfully translated characters so far (Unicode codepoints). + int64 translated_characters = 2; + + // Number of characters that have failed to process so far (Unicode + // codepoints). + int64 failed_characters = 3; + + // Total number of characters (Unicode codepoints). + // This is the total number of codepoints from input files times the number of + // target languages and appears here shortly after the call is submitted. + int64 total_characters = 4; + + // Time when the operation was submitted. + google.protobuf.Timestamp submit_time = 5; +} + +// Stored in the +// [google.longrunning.Operation.response][google.longrunning.Operation.response] +// field returned by BatchTranslateText if at least one sentence is translated +// successfully. +message BatchTranslateResponse { + // Total number of characters (Unicode codepoints). + int64 total_characters = 1; + + // Number of successfully translated characters (Unicode codepoints). + int64 translated_characters = 2; + + // Number of characters that have failed to process (Unicode codepoints). + int64 failed_characters = 3; + + // Time when the operation was submitted. + google.protobuf.Timestamp submit_time = 4; + + // The time when the operation is finished and + // [google.longrunning.Operation.done][google.longrunning.Operation.done] is + // set to true. + google.protobuf.Timestamp end_time = 5; +} + +// Input configuration for glossaries. +message GlossaryInputConfig { + // Required. Specify the input. + oneof source { + // Required. Google Cloud Storage location of glossary data. + // File format is determined based on the filename extension. API returns + // [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + // formats. Wildcards are not allowed. This must be a single file in one of + // the following formats: + // + // For unidirectional glossaries: + // + // - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + // The first column is source text. The second column is target text. + // The file must not contain headers. That is, the first row is data, not + // column names. + // + // - TMX (`.tmx`): TMX file with parallel data defining source/target term + // pairs. + // + // For equivalent term sets glossaries: + // + // - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + // in multiple languages. The format is defined for Google Translation + // Toolkit and documented in [Use a + // glossary](https://support.google.com/translatortoolkit/answer/6306379?hl=en). + GcsSource gcs_source = 1; + } +} + +// Represents a glossary built from user provided data. +message Glossary { + option (google.api.resource) = { + type: "translate.googleapis.com/Glossary" + pattern: "projects/{project}/locations/{location}/glossaries/{glossary}" + }; + + // Used with unidirectional glossaries. + message LanguageCodePair { + // Required. The BCP-47 language code of the input text, for example, + // "en-US". Expected to be an exact match for GlossaryTerm.language_code. + string source_language_code = 1; + + // Required. The BCP-47 language code for translation output, for example, + // "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + string target_language_code = 2; + } + + // Used with equivalent term set glossaries. + message LanguageCodesSet { + // The BCP-47 language code(s) for terms defined in the glossary. + // All entries are unique. The list contains at least two entries. + // Expected to be an exact match for GlossaryTerm.language_code. + repeated string language_codes = 1; + } + + // Required. The resource name of the glossary. Glossary names have the form + // `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. + string name = 1; + + // Languages supported by the glossary. + oneof languages { + // Used with unidirectional glossaries. + LanguageCodePair language_pair = 3; + + // Used with equivalent term set glossaries. + LanguageCodesSet language_codes_set = 4; + } + + // Required. Provides examples to build the glossary from. + // Total glossary must not exceed 10M Unicode codepoints. + GlossaryInputConfig input_config = 5; + + // Output only. The number of entries defined in the glossary. + int32 entry_count = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When CreateGlossary was called. + google.protobuf.Timestamp submit_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the glossary creation was finished. + google.protobuf.Timestamp end_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for CreateGlossary. +message CreateGlossaryRequest { + // Required. The project name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The glossary to create. + Glossary glossary = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for GetGlossary. +message GetGlossaryRequest { + // Required. The name of the glossary to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "translate.googleapis.com/Glossary" + } + ]; +} + +// Request message for DeleteGlossary. +message DeleteGlossaryRequest { + // Required. The name of the glossary to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "translate.googleapis.com/Glossary" + } + ]; +} + +// Request message for ListGlossaries. +message ListGlossariesRequest { + // Required. The name of the project from which to list all of the glossaries. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Requested page size. The server may return fewer glossaries than + // requested. If unspecified, the server picks an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + // Typically, this is the value of [ListGlossariesResponse.next_page_token] + // returned from the previous call to `ListGlossaries` method. + // The first page is returned if `page_token`is empty or missing. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter specifying constraints of a list operation. + // Filtering is not supported yet, and the parameter currently has no effect. + // If missing, no filtering is performed. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListGlossaries. +message ListGlossariesResponse { + // The list of glossaries for a project. + repeated Glossary glossaries = 1; + + // A token to retrieve a page of results. Pass this value in the + // [ListGlossariesRequest.page_token] field in the subsequent call to + // `ListGlossaries` method to retrieve the next page of results. + string next_page_token = 2; +} + +// Stored in the +// [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] +// field returned by CreateGlossary. +message CreateGlossaryMetadata { + // Enumerates the possible states that the creation request can be in. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is being processed. + RUNNING = 1; + + // The glossary was successfully created. + SUCCEEDED = 2; + + // Failed to create the glossary. + FAILED = 3; + + // Request is in the process of being canceled after caller invoked + // longrunning.Operations.CancelOperation on the request id. + CANCELLING = 4; + + // The glossary creation request was successfully canceled. + CANCELLED = 5; + } + + // The name of the glossary that is being created. + string name = 1; + + // The current state of the glossary creation operation. + State state = 2; + + // The time when the operation was submitted to the server. + google.protobuf.Timestamp submit_time = 3; +} + +// Stored in the +// [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] +// field returned by DeleteGlossary. +message DeleteGlossaryMetadata { + // Enumerates the possible states that the creation request can be in. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is being processed. + RUNNING = 1; + + // The glossary was successfully deleted. + SUCCEEDED = 2; + + // Failed to delete the glossary. + FAILED = 3; + + // Request is in the process of being canceled after caller invoked + // longrunning.Operations.CancelOperation on the request id. + CANCELLING = 4; + + // The glossary deletion request was successfully canceled. + CANCELLED = 5; + } + + // The name of the glossary that is being deleted. + string name = 1; + + // The current state of the glossary deletion operation. + State state = 2; + + // The time when the operation was submitted to the server. + google.protobuf.Timestamp submit_time = 3; +} + +// Stored in the +// [google.longrunning.Operation.response][google.longrunning.Operation.response] +// field returned by DeleteGlossary. +message DeleteGlossaryResponse { + // The name of the deleted glossary. + string name = 1; + + // The time when the operation was submitted to the server. + google.protobuf.Timestamp submit_time = 2; + + // The time when the glossary deletion is finished and + // [google.longrunning.Operation.done][google.longrunning.Operation.done] is + // set to true. + google.protobuf.Timestamp end_time = 3; +} diff --git a/google/cloud/translate/v3beta1/BUILD.bazel b/google/cloud/translate/v3beta1/BUILD.bazel new file mode 100644 index 000000000..0de75e280 --- /dev/null +++ b/google/cloud/translate/v3beta1/BUILD.bazel @@ -0,0 +1,365 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "translation_proto", + srcs = [ + "translation_service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "translation_proto_with_info", + deps = [ + ":translation_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "translation_java_proto", + deps = [":translation_proto"], +) + +java_grpc_library( + name = "translation_java_grpc", + srcs = [":translation_proto"], + deps = [":translation_java_proto"], +) + +java_gapic_library( + name = "translation_java_gapic", + src = ":translation_proto_with_info", + gapic_yaml = "translate_gapic.yaml", + package = "google.cloud.translation.v3beta1", + service_yaml = "translate_v3beta1.yaml", + test_deps = [ + ":translation_java_grpc", + ], + deps = [ + ":translation_java_proto", + ], +) + +java_gapic_test( + name = "translation_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.translate.v3beta1.TranslationServiceClientTest", + ], + runtime_deps = [":translation_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-translation-v3beta1-java", + deps = [ + ":translation_java_gapic", + ":translation_java_grpc", + ":translation_java_proto", + ":translation_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "translation_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/translate/v3beta1", + protos = [":translation_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "translation_go_gapic", + srcs = [":translation_proto_with_info"], + grpc_service_config = "translate_grpc_service_config.json", + importpath = "cloud.google.com/go/translate/apiv3beta1;translate", + service_yaml = "translate_v3beta1.yaml", + deps = [ + ":translation_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + ], +) + +go_test( + name = "translation_go_gapic_test", + srcs = [":translation_go_gapic_srcjar_test"], + embed = [":translation_go_gapic"], + importpath = "cloud.google.com/go/translate/apiv3beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-translation-v3beta1-go", + deps = [ + ":translation_go_gapic", + ":translation_go_gapic_srcjar-test.srcjar", + ":translation_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "translation_moved_proto", + srcs = [":translation_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "translation_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":translation_moved_proto"], +) + +py_grpc_library( + name = "translation_py_grpc", + srcs = [":translation_moved_proto"], + deps = [":translation_py_proto"], +) + +py_gapic_library( + name = "translation_py_gapic", + src = ":translation_proto_with_info", + gapic_yaml = "translate_gapic.yaml", + package = "google.cloud.translation.v3beta1", + service_yaml = "translate_v3beta1.yaml", + deps = [ + ":translation_py_grpc", + ":translation_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "translation-v3beta1-py", + deps = [ + ":translation_py_gapic", + ":translation_py_grpc", + ":translation_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "translation_php_proto", + deps = [":translation_proto"], +) + +php_grpc_library( + name = "translation_php_grpc", + srcs = [":translation_proto"], + deps = [":translation_php_proto"], +) + +php_gapic_library( + name = "translation_php_gapic", + src = ":translation_proto_with_info", + gapic_yaml = "translate_gapic.yaml", + package = "google.cloud.translation.v3beta1", + service_yaml = "translate_v3beta1.yaml", + deps = [ + ":translation_php_grpc", + ":translation_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-translation-v3beta1-php", + deps = [ + ":translation_php_gapic", + ":translation_php_grpc", + ":translation_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "translation_nodejs_gapic", + src = ":translation_proto_with_info", + gapic_yaml = "translate_gapic.yaml", + package = "google.cloud.translation.v3beta1", + service_yaml = "translate_v3beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "translation-v3beta1-nodejs", + deps = [ + ":translation_nodejs_gapic", + ":translation_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "translation_ruby_proto", + deps = [":translation_proto"], +) + +ruby_grpc_library( + name = "translation_ruby_grpc", + srcs = [":translation_proto"], + deps = [":translation_ruby_proto"], +) + +ruby_gapic_library( + name = "translation_ruby_gapic", + src = ":translation_proto_with_info", + gapic_yaml = "translate_gapic.yaml", + package = "google.cloud.translation.v3beta1", + service_yaml = "translate_v3beta1.yaml", + deps = [ + ":translation_ruby_grpc", + ":translation_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-translation-v3beta1-ruby", + deps = [ + ":translation_ruby_gapic", + ":translation_ruby_grpc", + ":translation_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "translation_csharp_proto", + deps = [":translation_proto"], +) + +csharp_grpc_library( + name = "translation_csharp_grpc", + srcs = [":translation_proto"], + deps = [":translation_csharp_proto"], +) + +csharp_gapic_library( + name = "translation_csharp_gapic", + src = ":translation_proto_with_info", + gapic_yaml = "translate_gapic.yaml", + package = "google.cloud.translation.v3beta1", + service_yaml = "translate_v3beta1.yaml", + deps = [ + ":translation_csharp_grpc", + ":translation_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-translation-v3beta1-csharp", + deps = [ + ":translation_csharp_gapic", + ":translation_csharp_grpc", + ":translation_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/translate/v3beta1/translate_gapic.legacy.yaml b/google/cloud/translate/v3beta1/translate_gapic.legacy.yaml new file mode 100644 index 000000000..5a4e25638 --- /dev/null +++ b/google/cloud/translate/v3beta1/translate_gapic.legacy.yaml @@ -0,0 +1,235 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.translate.v3beta1 + python: + package_name: google.cloud.translate_v3beta1.gapic + go: + package_name: cloud.google.com/go/translate/apiv3beta1 + csharp: + package_name: Google.Cloud.Translate.V3Beta1 + ruby: + package_name: Google::Cloud::Translate::V3beta1 + php: + package_name: Google\Cloud\Translate\V3beta1 + nodejs: + package_name: translate.v3beta1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.translation.v3beta1.TranslationService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/glossaries/{glossary} + entity_name: glossary + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: TranslateText + required_fields: + - contents + - target_language_code + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: DetectLanguage + flattening: + groups: + - parameters: + - parent + - model + - mime_type + required_fields: + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetSupportedLanguages + flattening: + groups: + - parameters: + - parent + - display_language_code + - model + required_fields: + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: BatchTranslateText + required_fields: + - source_language_code + - target_language_codes + - input_configs + - output_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + long_running: + return_type: google.cloud.translation.v3beta1.BatchTranslateResponse + metadata_type: google.cloud.translation.v3beta1.BatchTranslateMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 60000 + - name: CreateGlossary + flattening: + groups: + - parameters: + - parent + - glossary + required_fields: + - parent + - glossary + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + long_running: + return_type: google.cloud.translation.v3beta1.Glossary + metadata_type: google.cloud.translation.v3beta1.CreateGlossaryMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 60000 + - name: ListGlossaries + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: glossaries + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetGlossary + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: glossary + timeout_millis: 60000 + - name: DeleteGlossary + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: glossary + long_running: + return_type: google.cloud.translation.v3beta1.DeleteGlossaryResponse + metadata_type: google.cloud.translation.v3beta1.DeleteGlossaryMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 60000 diff --git a/google/cloud/translate/v3beta1/translate_gapic.yaml b/google/cloud/translate/v3beta1/translate_gapic.yaml index 5a4e25638..56858501a 100644 --- a/google/cloud/translate/v3beta1/translate_gapic.yaml +++ b/google/cloud/translate/v3beta1/translate_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -17,219 +17,8 @@ language_settings: nodejs: package_name: translate.v3beta1 domain_layer_location: google-cloud -# A list of API interface configurations. interfaces: -# The fully qualified name of the API interface. - name: google.cloud.translation.v3beta1.TranslationService - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/locations/{location} - entity_name: location - - name_pattern: projects/{project}/locations/{location}/glossaries/{glossary} - entity_name: glossary - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: TranslateText - required_fields: - - contents - - target_language_code - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - - name: DetectLanguage - flattening: - groups: - - parameters: - - parent - - model - - mime_type - required_fields: - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - - name: GetSupportedLanguages - flattening: - groups: - - parameters: - - parent - - display_language_code - - model - required_fields: - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - - name: BatchTranslateText - required_fields: - - source_language_code - - target_language_codes - - input_configs - - output_config - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - long_running: - return_type: google.cloud.translation.v3beta1.BatchTranslateResponse - metadata_type: google.cloud.translation.v3beta1.BatchTranslateMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 60000 - - name: CreateGlossary - flattening: - groups: - - parameters: - - parent - - glossary - required_fields: - - parent - - glossary - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - long_running: - return_type: google.cloud.translation.v3beta1.Glossary - metadata_type: google.cloud.translation.v3beta1.CreateGlossaryMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 60000 - - name: ListGlossaries - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: glossaries - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - - name: GetGlossary - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: glossary - timeout_millis: 60000 - name: DeleteGlossary - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: glossary - long_running: - return_type: google.cloud.translation.v3beta1.DeleteGlossaryResponse - metadata_type: google.cloud.translation.v3beta1.DeleteGlossaryMetadata - initial_poll_delay_millis: 500 - poll_delay_multiplier: 1.5 - max_poll_delay_millis: 5000 - total_poll_timeout_millis: 300000 - timeout_millis: 60000 diff --git a/google/cloud/translate/v3beta1/translate_grpc_service_config.json b/google/cloud/translate/v3beta1/translate_grpc_service_config.json new file mode 100755 index 000000000..2c5292bef --- /dev/null +++ b/google/cloud/translate/v3beta1/translate_grpc_service_config.json @@ -0,0 +1,55 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.translation.v3beta1.TranslationService", + "method": "TranslateText" + }, + { + "service": "google.cloud.translation.v3beta1.TranslationService", + "method": "DetectLanguage" + }, + { + "service": "google.cloud.translation.v3beta1.TranslationService", + "method": "BatchTranslateText" + }, + { + "service": "google.cloud.translation.v3beta1.TranslationService", + "method": "CreateGlossary" + } + ], + "timeout": "600s" + }, + { + "name": [ + { + "service": "google.cloud.translation.v3beta1.TranslationService", + "method": "GetSupportedLanguages" + }, + { + "service": "google.cloud.translation.v3beta1.TranslationService", + "method": "ListGlossaries" + }, + { + "service": "google.cloud.translation.v3beta1.TranslationService", + "method": "GetGlossary" + }, + { + "service": "google.cloud.translation.v3beta1.TranslationService", + "method": "DeleteGlossary" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/translate/v3beta1/translate_v3beta1.yaml b/google/cloud/translate/v3beta1/translate_v3beta1.yaml new file mode 100644 index 000000000..7b1e8a0c8 --- /dev/null +++ b/google/cloud/translate/v3beta1/translate_v3beta1.yaml @@ -0,0 +1,44 @@ +type: google.api.Service +config_version: 3 +name: translate.googleapis.com +title: Cloud Translation API + +apis: +- name: google.cloud.translation.v3beta1.TranslationService + +documentation: + summary: Integrates text translation into your website or application. + +backend: + rules: + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + - selector: google.longrunning.Operations.WaitOperation + deadline: 120.0 + +http: + rules: + - selector: google.longrunning.Operations.WaitOperation + post: '/v3beta1/{name=projects/*/locations/*/operations/*}:wait' + body: '*' + +authentication: + rules: + - selector: 'google.cloud.translation.v3beta1.TranslationService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-translation + - selector: google.cloud.translation.v3beta1.TranslationService.BatchTranslateText + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.translation.v3beta1.TranslationService.CreateGlossary + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-translation diff --git a/google/cloud/translate/v3beta1/translation_service.proto b/google/cloud/translate/v3beta1/translation_service.proto index fa20f0169..e62a50883 100644 --- a/google/cloud/translate/v3beta1/translation_service.proto +++ b/google/cloud/translate/v3beta1/translation_service.proto @@ -18,10 +18,11 @@ syntax = "proto3"; package google.cloud.translation.v3beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Translate.V3Beta1"; @@ -36,7 +37,10 @@ option ruby_package = "Google::Cloud::Translate::V3beta1"; // Provides natural language translation operations. service TranslationService { - option (google.api.default_host) = "translation.googleapis.com"; + option (google.api.default_host) = "translate.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-translation"; // Translates input text and returns translated text. rpc TranslateText(TranslateTextRequest) returns (TranslateTextResponse) { @@ -60,6 +64,7 @@ service TranslationService { body: "*" } }; + option (google.api.method_signature) = "parent,model,mime_type"; } // Returns a list of supported languages for translation. @@ -70,6 +75,7 @@ service TranslationService { get: "/v3beta1/{parent=projects/*}/supportedLanguages" } }; + option (google.api.method_signature) = "parent,display_language_code,model"; } // Translates a large volume of text in asynchronous batch mode. @@ -84,6 +90,10 @@ service TranslationService { post: "/v3beta1/{parent=projects/*/locations/*}:batchTranslateText" body: "*" }; + option (google.longrunning.operation_info) = { + response_type: "BatchTranslateResponse" + metadata_type: "BatchTranslateMetadata" + }; } // Creates a glossary and returns the long-running operation. Returns @@ -93,6 +103,11 @@ service TranslationService { post: "/v3beta1/{parent=projects/*/locations/*}/glossaries" body: "glossary" }; + option (google.api.method_signature) = "parent,glossary"; + option (google.longrunning.operation_info) = { + response_type: "Glossary" + metadata_type: "CreateGlossaryMetadata" + }; } // Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't @@ -101,6 +116,8 @@ service TranslationService { option (google.api.http) = { get: "/v3beta1/{parent=projects/*/locations/*}/glossaries" }; + option (google.api.method_signature) = "parent"; + option (google.api.method_signature) = "parent,filter"; } // Gets a glossary. Returns NOT_FOUND, if the glossary doesn't @@ -109,6 +126,7 @@ service TranslationService { option (google.api.http) = { get: "/v3beta1/{name=projects/*/locations/*/glossaries/*}" }; + option (google.api.method_signature) = "name"; } // Deletes a glossary, or cancels glossary construction @@ -118,6 +136,11 @@ service TranslationService { option (google.api.http) = { delete: "/v3beta1/{name=projects/*/locations/*/glossaries/*}" }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "DeleteGlossaryResponse" + metadata_type: "DeleteGlossaryMetadata" + }; } } @@ -126,11 +149,11 @@ service TranslationService { message TranslateTextGlossaryConfig { // Required. Specifies the glossary used for this translation. Use // this format: projects/*/locations/*/glossaries/* - string glossary = 1; + string glossary = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Indicates match is case-insensitive. // Default value is false if missing. - bool ignore_case = 2; + bool ignore_case = 2 [(google.api.field_behavior) = OPTIONAL]; } // The request message for synchronous translation. @@ -138,32 +161,43 @@ message TranslateTextRequest { // Required. The content of the input in string format. // We recommend the total content be less than 30k codepoints. // Use BatchTranslateText for larger text. - repeated string contents = 1; + repeated string contents = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The format of the source text, for example, "text/html", // "text/plain". If left blank, the MIME type defaults to "text/html". - string mime_type = 3; + string mime_type = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The BCP-47 language code of the input text if // known, for example, "en-US" or "sr-Latn". Supported language codes are // listed in Language Support. If the source language isn't specified, the API // attempts to identify the source language automatically and returns the // source language within the response. - string source_language_code = 4; + string source_language_code = 4 [(google.api.field_behavior) = OPTIONAL]; // Required. The BCP-47 language code to use for translation of the input // text, set to one of the language codes listed in Language Support. - string target_language_code = 5; + string target_language_code = 5 [(google.api.field_behavior) = REQUIRED]; - // Required. Location to make a regional or global call. + // Required. Project or location to make a call. Must refer to a caller's + // project. // - // Format: `projects/{project-id}/locations/{location-id}`. + // Format: `projects/{project-id}` or + // `projects/{project-id}/locations/{location-id}`. // - // For global calls, use `projects/{project-id}/locations/global`. + // For global calls, use `projects/{project-id}/locations/global` or + // `projects/{project-id}`. + // + // Non-global location is required for requests using AutoML models or + // custom glossaries. // // Models and glossaries must be within the same region (have same // location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - string parent = 8; + string parent = 8 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // Optional. The `model` type requested for this translation. // @@ -182,12 +216,22 @@ message TranslateTextRequest { // `projects/{project-id}/locations/global/models/general/nmt`. // // If missing, the system decides which google base model to use. - string model = 6; + string model = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. Glossary to be applied. The glossary must be // within the same region (have the same location-id) as the model, otherwise // an INVALID_ARGUMENT (400) error is returned. - TranslateTextGlossaryConfig glossary_config = 7; + TranslateTextGlossaryConfig glossary_config = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The labels with user-defined metadata for the request. + // + // Label keys and values can be no longer than 63 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // Label values are optional. Label keys must start with a letter. + // + // See https://cloud.google.com/translate/docs/labels for more information. + map labels = 10 [(google.api.field_behavior) = OPTIONAL]; } message TranslateTextResponse { @@ -225,15 +269,23 @@ message Translation { // The request message for language detection. message DetectLanguageRequest { - // Required. Location to make a regional or global call. + // Required. Project or location to make a call. Must refer to a caller's + // project. // - // Format: `projects/{project-id}/locations/{location-id}`. + // Format: `projects/{project-id}/locations/{location-id}` or + // `projects/{project-id}`. // - // For global calls, use `projects/{project-id}/locations/global`. + // For global calls, use `projects/{project-id}/locations/global` or + // `projects/{project-id}`. // // Only models within the same region (has same location-id) can be used. // Otherwise an INVALID_ARGUMENT (400) error is returned. - string parent = 5; + string parent = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // Optional. The language detection model to be used. // @@ -244,7 +296,7 @@ message DetectLanguageRequest { // `projects/{project-id}/locations/{location-id}/models/language-detection/default`. // // If not specified, the default model is used. - string model = 4; + string model = 4 [(google.api.field_behavior) = OPTIONAL]; // Required. The source of the document from which to detect the language. oneof source { @@ -254,7 +306,17 @@ message DetectLanguageRequest { // Optional. The format of the source text, for example, "text/html", // "text/plain". If left blank, the MIME type defaults to "text/html". - string mime_type = 3; + string mime_type = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The labels with user-defined metadata for the request. + // + // Label keys and values can be no longer than 63 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // Label values are optional. Label keys must start with a letter. + // + // See https://cloud.google.com/translate/docs/labels for more information. + map labels = 6; } // The response message for language detection. @@ -276,20 +338,30 @@ message DetectLanguageResponse { // The request message for discovering supported languages. message GetSupportedLanguagesRequest { - // Required. Location to make a regional or global call. + // Required. Project or location to make a call. Must refer to a caller's + // project. // - // Format: `projects/{project-id}/locations/{location-id}`. + // Format: `projects/{project-id}` or + // `projects/{project-id}/locations/{location-id}`. // - // For global calls, use `projects/{project-id}/locations/global`. + // For global calls, use `projects/{project-id}/locations/global` or + // `projects/{project-id}`. + // + // Non-global location is required for AutoML models. // // Only models within the same region (have same location-id) can be used, // otherwise an INVALID_ARGUMENT (400) error is returned. - string parent = 3; + string parent = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // Optional. The language to use to return localized, human readable names // of supported languages. If missing, then display names are not returned // in a response. - string display_language_code = 1; + string display_language_code = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Get supported languages of this model. // @@ -305,7 +377,7 @@ message GetSupportedLanguagesRequest { // // Returns languages supported by the specified model. // If missing, we get supported languages of Google general base (PBMT) model. - string model = 2; + string model = 2 [(google.api.field_behavior) = OPTIONAL]; } // The response message for discovering supported languages. @@ -338,7 +410,7 @@ message SupportedLanguage { // The Google Cloud Storage location for the input content. message GcsSource { // Required. Source data URI. For example, `gs://my_bucket/my_object`. - string input_uri = 1; + string input_uri = 1 [(google.api.field_behavior) = REQUIRED]; } // Input configuration for BatchTranslateText request. @@ -347,7 +419,7 @@ message InputConfig { // For `.tsv`, "text/html" is used if mime_type is missing. // For `.html`, this field must be "text/html" or empty. // For `.txt`, this field must be "text/plain" or empty. - string mime_type = 1; + string mime_type = 1 [(google.api.field_behavior) = OPTIONAL]; // Required. Specify the input. oneof source { @@ -373,12 +445,12 @@ message InputConfig { } } -// The Google Cloud Storage location for the output content +// The Google Cloud Storage location for the output content. message GcsDestination { // Required. There must be no files under 'output_uri_prefix'. - // 'output_uri_prefix' must end with "/", otherwise an INVALID_ARGUMENT (400) - // error is returned.. - string output_uri_prefix = 1; + // 'output_uri_prefix' must end with "/" and start with "gs://", otherwise an + // INVALID_ARGUMENT (400) error is returned. + string output_uri_prefix = 1 [(google.api.field_behavior) = REQUIRED]; } // Output configuration for BatchTranslateText request. @@ -457,7 +529,7 @@ message OutputConfig { // The batch translation request. message BatchTranslateTextRequest { - // Required. Location to make a regional call. + // Required. Location to make a call. Must refer to a caller's project. // // Format: `projects/{project-id}/locations/{location-id}`. // @@ -466,13 +538,18 @@ message BatchTranslateTextRequest { // Only AutoML Translation models or glossaries within the same region (have // the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) // error is returned. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // Required. Source language code. - string source_language_code = 2; + string source_language_code = 2 [(google.api.field_behavior) = REQUIRED]; // Required. Specify up to 10 language codes here. - repeated string target_language_codes = 3; + repeated string target_language_codes = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. The models to use for translation. Map's key is target language // code. Map's value is model name. Value can be a built-in general model, @@ -490,22 +567,32 @@ message BatchTranslateTextRequest { // // If the map is empty or a specific model is // not requested for a language pair, then default google model (nmt) is used. - map models = 4; + map models = 4 [(google.api.field_behavior) = OPTIONAL]; // Required. Input configurations. // The total number of files matched should be <= 1000. // The total content size should be <= 100M Unicode codepoints. // The files must use UTF-8 encoding. - repeated InputConfig input_configs = 5; + repeated InputConfig input_configs = 5 [(google.api.field_behavior) = REQUIRED]; // Required. Output configuration. // If 2 input configs match to the same file (that is, same input path), // we don't generate output for duplicate inputs. - OutputConfig output_config = 6; + OutputConfig output_config = 6 [(google.api.field_behavior) = REQUIRED]; // Optional. Glossaries to be applied for translation. // It's keyed by target language code. - map glossaries = 7; + map glossaries = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The labels with user-defined metadata for the request. + // + // Label keys and values can be no longer than 63 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // Label values are optional. Label keys must start with a letter. + // + // See https://cloud.google.com/translate/docs/labels for more information. + map labels = 9 [(google.api.field_behavior) = OPTIONAL]; } // State metadata for the batch translation operation. @@ -606,6 +693,11 @@ message GlossaryInputConfig { // Represents a glossary built from user provided data. message Glossary { + option (google.api.resource) = { + type: "translate.googleapis.com/Glossary" + pattern: "projects/{project}/locations/{location}/glossaries/{glossary}" + }; + // Used with unidirectional glossaries. message LanguageCodePair { // Required. The BCP-47 language code of the input text, for example, @@ -627,7 +719,7 @@ message Glossary { // Required. The resource name of the glossary. Glossary names have the form // `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Languages supported by the glossary. oneof languages { @@ -643,55 +735,75 @@ message Glossary { GlossaryInputConfig input_config = 5; // Output only. The number of entries defined in the glossary. - int32 entry_count = 6; + int32 entry_count = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. When CreateGlossary was called. - google.protobuf.Timestamp submit_time = 7; + google.protobuf.Timestamp submit_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. When the glossary creation was finished. - google.protobuf.Timestamp end_time = 8; + google.protobuf.Timestamp end_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Request message for CreateGlossary. message CreateGlossaryRequest { // Required. The project name. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // Required. The glossary to create. - Glossary glossary = 2; + Glossary glossary = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for GetGlossary. message GetGlossaryRequest { // Required. The name of the glossary to retrieve. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "translate.googleapis.com/Glossary" + } + ]; } // Request message for DeleteGlossary. message DeleteGlossaryRequest { // Required. The name of the glossary to delete. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "translate.googleapis.com/Glossary" + } + ]; } // Request message for ListGlossaries. message ListGlossariesRequest { // Required. The name of the project from which to list all of the glossaries. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // Optional. Requested page size. The server may return fewer glossaries than // requested. If unspecified, the server picks an appropriate default. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A token identifying a page of results the server should return. // Typically, this is the value of [ListGlossariesResponse.next_page_token] // returned from the previous call to `ListGlossaries` method. // The first page is returned if `page_token`is empty or missing. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Filter specifying constraints of a list operation. // Filtering is not supported yet, and the parameter currently has no effect. // If missing, no filtering is performed. - string filter = 4; + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; } // Response message for ListGlossaries. diff --git a/google/cloud/videointelligence/artman_videointelligence_v1.legacy.yaml b/google/cloud/videointelligence/artman_videointelligence_v1.legacy.yaml new file mode 100644 index 000000000..aa1c83312 --- /dev/null +++ b/google/cloud/videointelligence/artman_videointelligence_v1.legacy.yaml @@ -0,0 +1,15 @@ +common: + api_name: video-intelligence + api_version: v1 + organization_name: google-cloud + service_yaml: v1/videointelligence_v1.yaml + gapic_yaml: v1/videointelligence_gapic.legacy.yaml + proto_package: google.cloud.videointelligence.v1 + src_proto_paths: + - v1 + proto_deps: + - name: google-common-protos +artifacts: +- name: php_gapic + type: GAPIC + language: PHP diff --git a/google/cloud/videointelligence/artman_videointelligence_v1.yaml b/google/cloud/videointelligence/artman_videointelligence_v1.yaml index 7f9520ad5..8c0af51ea 100644 --- a/google/cloud/videointelligence/artman_videointelligence_v1.yaml +++ b/google/cloud/videointelligence/artman_videointelligence_v1.yaml @@ -2,8 +2,9 @@ common: api_name: video-intelligence api_version: v1 organization_name: google-cloud - service_yaml: videointelligence_v1.yaml + service_yaml: v1/videointelligence_v1.yaml gapic_yaml: v1/videointelligence_gapic.yaml + proto_package: google.cloud.videointelligence.v1 src_proto_paths: - v1 proto_deps: @@ -15,9 +16,6 @@ artifacts: - name: python_gapic type: GAPIC language: PYTHON -- name: php_gapic - type: GAPIC - language: PHP - name: ruby_gapic type: GAPIC language: RUBY diff --git a/google/cloud/videointelligence/v1/BUILD.bazel b/google/cloud/videointelligence/v1/BUILD.bazel index b9a3ca592..06c231fe6 100644 --- a/google/cloud/videointelligence/v1/BUILD.bazel +++ b/google/cloud/videointelligence/v1/BUILD.bazel @@ -1,18 +1,23 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "video_intelligence_proto", + name = "videointelligence_proto", srcs = [ "video_intelligence.proto", ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/longrunning:operations_proto", "//google/rpc:status_proto", "@com_google_protobuf//:duration_proto", @@ -21,8 +26,11 @@ proto_library( ) proto_library_with_info( - name = "video_intelligence_proto_with_info", - deps = [":video_intelligence_proto"], + name = "videointelligence_proto_with_info", + deps = [ + ":videointelligence_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -30,71 +38,55 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( - name = "video_intelligence_java_proto", - deps = [":video_intelligence_proto"], + name = "videointelligence_java_proto", + deps = [":videointelligence_proto"], ) java_grpc_library( - name = "video_intelligence_java_grpc", - srcs = [":video_intelligence_proto"], - deps = [":video_intelligence_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "video_intelligence_resource_name_java_proto", - gapic_yaml = "videointelligence_gapic.yaml", - deps = [":video_intelligence_proto"], + name = "videointelligence_java_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_java_proto"], ) java_gapic_library( - name = "video_intelligence_java_gapic", - src = ":video_intelligence_proto_with_info", + name = "videointelligence_java_gapic", + src = ":videointelligence_proto_with_info", gapic_yaml = "videointelligence_gapic.yaml", - service_yaml = "//google/cloud/videointelligence:videointelligence_v1.yaml", - test_deps = [":video_intelligence_java_grpc"], + package = "google.cloud.videointelligence.v1", + service_yaml = "videointelligence_v1.yaml", + test_deps = [ + ":videointelligence_java_grpc", + ], deps = [ - ":video_intelligence_java_proto", - ":video_intelligence_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ":videointelligence_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":video_intelligence_java_gapic_test", +java_gapic_test( + name = "videointelligence_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClientTest", ], -) for test_name in [ - "com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClientTest", -]] + runtime_deps = [":videointelligence_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-video-intelligence-v1-java", - client_deps = [":video_intelligence_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":video_intelligence_java_gapic_test"], - grpc_deps = [":video_intelligence_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":video_intelligence_java_proto", - ":video_intelligence_proto", - ":video_intelligence_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + name = "google-cloud-videointelligence-v1-java", + deps = [ + ":videointelligence_java_gapic", + ":videointelligence_java_grpc", + ":videointelligence_java_proto", + ":videointelligence_proto", + ], ) ############################################################################## @@ -102,17 +94,17 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "video_intelligence_go_proto", + name = "videointelligence_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1", - protos = [":video_intelligence_proto"], + protos = [":videointelligence_proto"], deps = [ "//google/api:annotations_go_proto", "//google/longrunning:longrunning_go_proto", @@ -121,33 +113,258 @@ go_proto_library( ) go_gapic_library( - name = "video_intelligence_go_gapic", - src = ":video_intelligence_proto_with_info", - gapic_yaml = "videointelligence_gapic.yaml", - importpath = "cloud.google.com/go/videointelligence/apiv1", - service_yaml = "//google/cloud/videointelligence:videointelligence_v1.yaml", + name = "videointelligence_go_gapic", + srcs = [":videointelligence_proto_with_info"], + grpc_service_config = "videointelligence_grpc_service_config.json", + importpath = "cloud.google.com/go/videointelligence/apiv1;videointelligence", + service_yaml = "videointelligence_v1.yaml", deps = [ - ":video_intelligence_go_proto", + ":videointelligence_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", ], ) go_test( - name = "video_intelligence_go_gapic_test", - srcs = [":video_intelligence_go_gapic_srcjar_test"], - embed = [":video_intelligence_go_gapic"], + name = "videointelligence_go_gapic_test", + srcs = [":videointelligence_go_gapic_srcjar_test"], + embed = [":videointelligence_go_gapic"], importpath = "cloud.google.com/go/videointelligence/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-video-intelligence-v1-go", + name = "gapi-cloud-videointelligence-v1-go", + deps = [ + ":videointelligence_go_gapic", + ":videointelligence_go_gapic_srcjar-test.srcjar", + ":videointelligence_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "videointelligence_moved_proto", + srcs = [":videointelligence_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "videointelligence_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":videointelligence_moved_proto"], +) + +py_grpc_library( + name = "videointelligence_py_grpc", + srcs = [":videointelligence_moved_proto"], + deps = [":videointelligence_py_proto"], +) + +py_gapic_library( + name = "videointelligence_py_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1", + service_yaml = "videointelligence_v1.yaml", + deps = [ + ":videointelligence_py_grpc", + ":videointelligence_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "videointelligence-v1-py", + deps = [ + ":videointelligence_py_gapic", + ":videointelligence_py_grpc", + ":videointelligence_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "videointelligence_php_proto", + deps = [":videointelligence_proto"], +) + +php_grpc_library( + name = "videointelligence_php_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_php_proto"], +) + +php_gapic_library( + name = "videointelligence_php_gapic", + src = ":videointelligence_proto_with_info", + #Do NOT override with videointelligence_gapic.yaml + gapic_yaml = "videointelligence_gapic.legacy.yaml", + package = "google.cloud.videointelligence.v1", + service_yaml = "videointelligence_v1.yaml", + deps = [ + ":videointelligence_php_grpc", + ":videointelligence_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1-php", deps = [ - ":video_intelligence_go_gapic", - ":video_intelligence_go_gapic_srcjar-smoke-test.srcjar", - ":video_intelligence_go_gapic_srcjar-test.srcjar", - ":video_intelligence_go_proto", + ":videointelligence_php_gapic", + ":videointelligence_php_grpc", + ":videointelligence_php_proto", ], ) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "videointelligence_nodejs_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1", + service_yaml = "videointelligence_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "videointelligence-v1-nodejs", + deps = [ + ":videointelligence_nodejs_gapic", + ":videointelligence_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "videointelligence_ruby_proto", + deps = [":videointelligence_proto"], +) + +ruby_grpc_library( + name = "videointelligence_ruby_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_ruby_proto"], +) + +ruby_gapic_library( + name = "videointelligence_ruby_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1", + service_yaml = "videointelligence_v1.yaml", + deps = [ + ":videointelligence_ruby_grpc", + ":videointelligence_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1-ruby", + deps = [ + ":videointelligence_ruby_gapic", + ":videointelligence_ruby_grpc", + ":videointelligence_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "videointelligence_csharp_proto", + deps = [":videointelligence_proto"], +) + +csharp_grpc_library( + name = "videointelligence_csharp_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_csharp_proto"], +) + +csharp_gapic_library( + name = "videointelligence_csharp_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1", + service_yaml = "videointelligence_v1.yaml", + deps = [ + ":videointelligence_csharp_grpc", + ":videointelligence_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1-csharp", + deps = [ + ":videointelligence_csharp_gapic", + ":videointelligence_csharp_grpc", + ":videointelligence_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/videointelligence/v1/video_intelligence.proto b/google/cloud/videointelligence/v1/video_intelligence.proto index ce3d8f8c2..9dcfda55e 100644 --- a/google/cloud/videointelligence/v1/video_intelligence.proto +++ b/google/cloud/videointelligence/v1/video_intelligence.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.videointelligence.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -33,16 +34,23 @@ option ruby_package = "Google::Cloud::VideoIntelligence::V1"; // Service that implements Google Cloud Video Intelligence API. service VideoIntelligenceService { + option (google.api.default_host) = "videointelligence.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Performs asynchronous video annotation. Progress and results can be // retrieved through the `google.longrunning.Operations` interface. // `Operation.metadata` contains `AnnotateVideoProgress` (progress). // `Operation.response` contains `AnnotateVideoResponse` (results). - rpc AnnotateVideo(AnnotateVideoRequest) - returns (google.longrunning.Operation) { + rpc AnnotateVideo(AnnotateVideoRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/videos:annotate" body: "*" }; + option (google.api.method_signature) = "input_uri,features"; + option (google.longrunning.operation_info) = { + response_type: "AnnotateVideoResponse" + metadata_type: "AnnotateVideoProgress" + }; } } @@ -52,10 +60,10 @@ message AnnotateVideoRequest { // [Google Cloud Storage](https://cloud.google.com/storage/) URIs are // supported, which must be specified in the following format: // `gs://bucket-id/object-id` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - // more information, see [Request URIs](/storage/docs/reference-uris). A video - // URI may include wildcards in `object-id`, and thus identify multiple - // videos. Supported wildcards: '*' to match 0 or more characters; + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + // [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + // A video URI may include wildcards in `object-id`, and thus identify + // multiple videos. Supported wildcards: '*' to match 0 or more characters; // '?' to match 1 character. If unset, the input video should be embedded // in the request as `input_content`. If set, `input_content` should be unset. string input_uri = 1; @@ -65,24 +73,24 @@ message AnnotateVideoRequest { // If set, `input_uri` should be unset. bytes input_content = 6; - // Requested video annotation features. - repeated Feature features = 2; + // Required. Requested video annotation features. + repeated Feature features = 2 [(google.api.field_behavior) = REQUIRED]; // Additional video context and/or feature-specific parameters. VideoContext video_context = 3; - // Optional location where the output (in JSON format) should be stored. + // Optional. Location where the output (in JSON format) should be stored. // Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) // URIs are supported, which must be specified in the following format: // `gs://bucket-id/object-id` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - // more information, see [Request URIs](/storage/docs/reference-uris). - string output_uri = 4; + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + // [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + string output_uri = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional cloud region where annotation should take place. Supported cloud + // Optional. Cloud region where annotation should take place. Supported cloud // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region // is specified, a region will be determined based on video file location. - string location_id = 5; + string location_id = 5 [(google.api.field_behavior) = OPTIONAL]; } // Video context and/or feature-specific parameters. @@ -114,6 +122,72 @@ message VideoContext { ObjectTrackingConfig object_tracking_config = 13; } +// Video annotation feature. +enum Feature { + // Unspecified. + FEATURE_UNSPECIFIED = 0; + + // Label detection. Detect objects, such as dog or flower. + LABEL_DETECTION = 1; + + // Shot change detection. + SHOT_CHANGE_DETECTION = 2; + + // Explicit content detection. + EXPLICIT_CONTENT_DETECTION = 3; + + // Human face detection and tracking. + FACE_DETECTION = 4; + + // Speech transcription. + SPEECH_TRANSCRIPTION = 6; + + // OCR text detection and tracking. + TEXT_DETECTION = 7; + + // Object detection and tracking. + OBJECT_TRACKING = 9; + + // Logo detection, tracking, and recognition. + LOGO_RECOGNITION = 12; +} + +// Label detection mode. +enum LabelDetectionMode { + // Unspecified. + LABEL_DETECTION_MODE_UNSPECIFIED = 0; + + // Detect shot-level labels. + SHOT_MODE = 1; + + // Detect frame-level labels. + FRAME_MODE = 2; + + // Detect both shot-level and frame-level labels. + SHOT_AND_FRAME_MODE = 3; +} + +// Bucketized representation of likelihood. +enum Likelihood { + // Unspecified likelihood. + LIKELIHOOD_UNSPECIFIED = 0; + + // Very unlikely. + VERY_UNLIKELY = 1; + + // Unlikely. + UNLIKELY = 2; + + // Possible. + POSSIBLE = 3; + + // Likely. + LIKELY = 4; + + // Very likely. + VERY_LIKELY = 5; +} + // Config for LABEL_DETECTION. message LabelDetectionConfig { // What labels should be detected with LABEL_DETECTION, in addition to @@ -156,9 +230,9 @@ message ShotChangeDetectionConfig { string model = 1; } -// Config for EXPLICIT_CONTENT_DETECTION. -message ExplicitContentDetectionConfig { - // Model to use for explicit content detection. +// Config for OBJECT_TRACKING. +message ObjectTrackingConfig { + // Model to use for object tracking. // Supported values: "builtin/stable" (the default if unset) and // "builtin/latest". string model = 1; @@ -175,9 +249,9 @@ message FaceDetectionConfig { bool include_bounding_boxes = 2; } -// Config for OBJECT_TRACKING. -message ObjectTrackingConfig { - // Model to use for object tracking. +// Config for EXPLICIT_CONTENT_DETECTION. +message ExplicitContentDetectionConfig { + // Model to use for explicit content detection. // Supported values: "builtin/stable" (the default if unset) and // "builtin/latest". string model = 1; @@ -325,20 +399,99 @@ message FaceAnnotation { repeated FaceFrame frames = 3; } +// For tracking related features. +// An object at time_offset with attributes, and located with +// normalized_bounding_box. +message TimestampedObject { + // Normalized Bounding box in a frame, where the object is located. + NormalizedBoundingBox normalized_bounding_box = 1; + + // Time-offset, relative to the beginning of the video, + // corresponding to the video frame for this object. + google.protobuf.Duration time_offset = 2; + + // Optional. The attributes of the object in the bounding box. + repeated DetectedAttribute attributes = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The detected landmarks. + repeated DetectedLandmark landmarks = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A track of an object instance. +message Track { + // Video segment of a track. + VideoSegment segment = 1; + + // The object with timestamp and attributes per frame in the track. + repeated TimestampedObject timestamped_objects = 2; + + // Optional. Attributes in the track level. + repeated DetectedAttribute attributes = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The confidence score of the tracked object. + float confidence = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A generic detected attribute represented by name in string format. +message DetectedAttribute { + // The name of the attribute, i.e. glasses, dark_glasses, mouth_open etc. + // A full list of supported type names will be provided in the document. + string name = 1; + + // Detected attribute confidence. Range [0, 1]. + float confidence = 2; + + // Text value of the detection result. For example, the value for "HairColor" + // can be "black", "blonde", etc. + string value = 3; +} + +// A generic detected landmark represented by name in string format and a 2D +// location. +message DetectedLandmark { + // The name of this landmark, i.e. left_hand, right_shoulder. + string name = 1; + + // The 2D point of the detected landmark using the normalized image + // coordindate system. The normalized coordinates have the range from 0 to 1. + NormalizedVertex point = 2; + + // The confidence score of the detected landmark. Range [0, 1]. + float confidence = 3; +} + // Annotation results for a single video. message VideoAnnotationResults { // Video file location in // [Google Cloud Storage](https://cloud.google.com/storage/). string input_uri = 1; - // Label annotations on video level or user specified segment level. + // Video segment on which the annotation is run. + VideoSegment segment = 10; + + // Topical label annotations on video level or user specified segment level. // There is exactly one element for each unique label. repeated LabelAnnotation segment_label_annotations = 2; - // Label annotations on shot level. + // Presence label annotations on video level or user specified segment level. + // There is exactly one element for each unique label. Compared to the + // existing topical `segment_label_annotations`, this field presents more + // fine-grained, segment-level labels detected in video content and is made + // available only when the client sets `LabelDetectionConfig.model` to + // "builtin/latest" in the request. + repeated LabelAnnotation segment_presence_label_annotations = 23; + + // Topical label annotations on shot level. // There is exactly one element for each unique label. repeated LabelAnnotation shot_label_annotations = 3; + // Presence label annotations on shot level. There is exactly one element for + // each unique label. Compared to the existing topical + // `shot_label_annotations`, this field presents more fine-grained, shot-level + // labels detected in video content and is made available only when the client + // sets `LabelDetectionConfig.model` to "builtin/latest" in the request. + repeated LabelAnnotation shot_presence_label_annotations = 24; + // Label annotations on frame level. // There is exactly one element for each unique label. repeated LabelAnnotation frame_label_annotations = 4; @@ -363,6 +516,9 @@ message VideoAnnotationResults { // Annotations for list of objects detected and tracked in video. repeated ObjectTrackingAnnotation object_annotations = 14; + // Annotations for list of logos detected, tracked and recognized in video. + repeated LogoRecognitionAnnotation logo_recognition_annotations = 19; + // If set, indicates an error. Note that for a single `AnnotateVideoRequest` // some videos may succeed and some may fail. google.rpc.Status error = 9; @@ -391,6 +547,14 @@ message VideoAnnotationProgress { // Time of the most recent update. google.protobuf.Timestamp update_time = 4; + + // Specifies which feature is being tracked if the request contains more than + // one features. + Feature feature = 5; + + // Specifies which segment is being tracked if the request contains more than + // one segments. + VideoSegment segment = 6; } // Video annotation progress. Included in the `metadata` @@ -403,72 +567,71 @@ message AnnotateVideoProgress { // Config for SPEECH_TRANSCRIPTION. message SpeechTranscriptionConfig { - // *Required* The language of the supplied audio as a + // Required. *Required* The language of the supplied audio as a // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. // Example: "en-US". // See [Language Support](https://cloud.google.com/speech/docs/languages) // for a list of the currently supported language codes. - string language_code = 1; + string language_code = 1 [(google.api.field_behavior) = REQUIRED]; - // *Optional* Maximum number of recognition hypotheses to be returned. + // Optional. Maximum number of recognition hypotheses to be returned. // Specifically, the maximum number of `SpeechRecognitionAlternative` messages // within each `SpeechTranscription`. The server may return fewer than // `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will // return a maximum of one. If omitted, will return a maximum of one. - int32 max_alternatives = 2; + int32 max_alternatives = 2 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* If set to `true`, the server will attempt to filter out + // Optional. If set to `true`, the server will attempt to filter out // profanities, replacing all but the initial character in each filtered word // with asterisks, e.g. "f***". If set to `false` or omitted, profanities // won't be filtered out. - bool filter_profanity = 3; + bool filter_profanity = 3 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* A means to provide context to assist the speech recognition. - repeated SpeechContext speech_contexts = 4; + // Optional. A means to provide context to assist the speech recognition. + repeated SpeechContext speech_contexts = 4 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* If 'true', adds punctuation to recognition result hypotheses. + // Optional. If 'true', adds punctuation to recognition result hypotheses. // This feature is only available in select languages. Setting this for // requests in other languages has no effect at all. The default 'false' value // does not add punctuation to result hypotheses. NOTE: "This is currently // offered as an experimental service, complimentary to all users. In the // future this may be exclusively available as a premium feature." - bool enable_automatic_punctuation = 5; + bool enable_automatic_punctuation = 5 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* For file formats, such as MXF or MKV, supporting multiple audio + // Optional. For file formats, such as MXF or MKV, supporting multiple audio // tracks, specify up to two tracks. Default: track 0. - repeated int32 audio_tracks = 6; + repeated int32 audio_tracks = 6 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* If 'true', enables speaker detection for each recognized word in + // Optional. If 'true', enables speaker detection for each recognized word in // the top alternative of the recognition result using a speaker_tag provided // in the WordInfo. // Note: When this is true, we send all the words from the beginning of the // audio for the top alternative in every consecutive responses. // This is done in order to improve our speaker tags as our models learn to // identify the speakers in the conversation over time. - bool enable_speaker_diarization = 7; + bool enable_speaker_diarization = 7 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* - // If set, specifies the estimated number of speakers in the conversation. + // Optional. If set, specifies the estimated number of speakers in the conversation. // If not set, defaults to '2'. // Ignored unless enable_speaker_diarization is set to true. - int32 diarization_speaker_count = 8; + int32 diarization_speaker_count = 8 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* If `true`, the top result includes a list of words and the + // Optional. If `true`, the top result includes a list of words and the // confidence for those words. If `false`, no word-level confidence // information is returned. The default is `false`. - bool enable_word_confidence = 9; + bool enable_word_confidence = 9 [(google.api.field_behavior) = OPTIONAL]; } // Provides "hints" to the speech recognizer to favor specific words and phrases // in the results. message SpeechContext { - // *Optional* A list of strings containing words and phrases "hints" so that + // Optional. A list of strings containing words and phrases "hints" so that // the speech recognition is more likely to recognize them. This can be used // to improve the accuracy for specific words and phrases, for example, if // specific commands are typically spoken by the user. This can also be used // to add additional words to the vocabulary of the recognizer. See // [usage limits](https://cloud.google.com/speech/limits#content). - repeated string phrases = 1; + repeated string phrases = 1 [(google.api.field_behavior) = OPTIONAL]; } // A speech recognition result corresponding to a portion of the audio. @@ -479,11 +642,10 @@ message SpeechTranscription { // ranked by the recognizer. repeated SpeechRecognitionAlternative alternatives = 1; - // Output only. The - // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the - // language in this result. This language code was detected to have the most - // likelihood of being spoken in the audio. - string language_code = 2; + // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of + // the language in this result. This language code was detected to have the + // most likelihood of being spoken in the audio. + string language_code = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Alternative hypotheses (a.k.a. n-best list). @@ -491,16 +653,18 @@ message SpeechRecognitionAlternative { // Transcript text representing the words that the user spoke. string transcript = 1; - // The confidence estimate between 0.0 and 1.0. A higher number + // Output only. The confidence estimate between 0.0 and 1.0. A higher number // indicates an estimated greater likelihood that the recognized words are - // correct. This field is typically provided only for the top hypothesis, and - // only for `is_final=true` results. Clients should not rely on the - // `confidence` field as it is not guaranteed to be accurate or consistent. + // correct. This field is set only for the top alternative. + // This field is not guaranteed to be accurate and users should not rely on it + // to be always provided. // The default of 0.0 is a sentinel value indicating `confidence` was not set. - float confidence = 2; + float confidence = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A list of word-specific information for each recognized word. - repeated WordInfo words = 3; + // Output only. A list of word-specific information for each recognized word. + // Note: When `enable_speaker_diarization` is true, you will see all the words + // from the beginning of the audio. + repeated WordInfo words = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Word-specific information for recognized words. Word information is only @@ -528,13 +692,13 @@ message WordInfo { // This field is not guaranteed to be accurate and users should not rely on it // to be always provided. // The default of 0.0 is a sentinel value indicating `confidence` was not set. - float confidence = 4; + float confidence = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A distinct integer value is assigned for every speaker within // the audio. This field specifies which one of those speakers was detected to // have spoken this word. Value ranges from 1 up to diarization_speaker_count, // and is only set if speaker diarization is enabled. - int32 speaker_tag = 5; + int32 speaker_tag = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A vertex represents a 2D point in the image. @@ -646,65 +810,17 @@ message ObjectTrackingAnnotation { repeated ObjectTrackingFrame frames = 2; } -// Video annotation feature. -enum Feature { - // Unspecified. - FEATURE_UNSPECIFIED = 0; - - // Label detection. Detect objects, such as dog or flower. - LABEL_DETECTION = 1; - - // Shot change detection. - SHOT_CHANGE_DETECTION = 2; - - // Explicit content detection. - EXPLICIT_CONTENT_DETECTION = 3; - - // Human face detection and tracking. - FACE_DETECTION = 4; - - // Speech transcription. - SPEECH_TRANSCRIPTION = 6; - - // OCR text detection and tracking. - TEXT_DETECTION = 7; - - // Object detection and tracking. - OBJECT_TRACKING = 9; -} - -// Label detection mode. -enum LabelDetectionMode { - // Unspecified. - LABEL_DETECTION_MODE_UNSPECIFIED = 0; - - // Detect shot-level labels. - SHOT_MODE = 1; - - // Detect frame-level labels. - FRAME_MODE = 2; - - // Detect both shot-level and frame-level labels. - SHOT_AND_FRAME_MODE = 3; -} - -// Bucketized representation of likelihood. -enum Likelihood { - // Unspecified likelihood. - LIKELIHOOD_UNSPECIFIED = 0; - - // Very unlikely. - VERY_UNLIKELY = 1; - - // Unlikely. - UNLIKELY = 2; - - // Possible. - POSSIBLE = 3; +// Annotation corresponding to one detected, tracked and recognized logo class. +message LogoRecognitionAnnotation { + // Entity category information to specify the logo class that all the logo + // tracks within this LogoRecognitionAnnotation are recognized as. + Entity entity = 1; - // Likely. - LIKELY = 4; + // All logo tracks where the recognized logo appears. Each track corresponds + // to one logo instance appearing in consecutive frames. + repeated Track tracks = 2; - // Very likely. - VERY_LIKELY = 5; + // All video segments where the recognized logo appears. There might be + // multiple instances of the same logo class appearing in one VideoSegment. + repeated VideoSegment segments = 3; } diff --git a/google/cloud/videointelligence/v1/videointelligence_gapic.legacy.yaml b/google/cloud/videointelligence/v1/videointelligence_gapic.legacy.yaml new file mode 100644 index 000000000..20843a355 --- /dev/null +++ b/google/cloud/videointelligence/v1/videointelligence_gapic.legacy.yaml @@ -0,0 +1,63 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.videointelligence.v1 + python: + package_name: google.cloud.videointelligence_v1.gapic + go: + package_name: cloud.google.com/go/videointelligence/apiv1 + csharp: + package_name: Google.Cloud.VideoIntelligence.V1 + ruby: + package_name: Google::Cloud::VideoIntelligence::V1 + release_level: GA + php: + package_name: Google\Cloud\VideoIntelligence\V1 + nodejs: + package_name: video-intelligence.v1 + domain_layer_location: google-cloud +interfaces: +- name: google.cloud.videointelligence.v1.VideoIntelligenceService + smoke_test: + method: AnnotateVideo + init_fields: + - input_uri=gs://cloud-samples-data/video/cat.mp4 + - features[0]=LABEL_DETECTION + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 1000 + retry_delay_multiplier: 2.5 + max_retry_delay_millis: 120000 + initial_rpc_timeout_millis: 120000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 120000 + total_timeout_millis: 600000 + methods: + - name: AnnotateVideo + flattening: + groups: + - parameters: + - input_uri + - features + long_running: + return_type: google.cloud.videointelligence.v1.AnnotateVideoResponse + metadata_type: google.cloud.videointelligence.v1.AnnotateVideoProgress + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + sample_code_init_fields: + - input_uri=gs://cloud-samples-data/video/cat.mp4 + - features[0]=LABEL_DETECTION diff --git a/google/cloud/videointelligence/v1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1/videointelligence_gapic.yaml index 20843a355..31dbde17d 100644 --- a/google/cloud/videointelligence/v1/videointelligence_gapic.yaml +++ b/google/cloud/videointelligence/v1/videointelligence_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.videointelligence.v1 @@ -24,14 +24,6 @@ interfaces: init_fields: - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 1000 @@ -43,21 +35,12 @@ interfaces: total_timeout_millis: 600000 methods: - name: AnnotateVideo - flattening: - groups: - - parameters: - - input_uri - - features + retry_codes_name: idempotent long_running: - return_type: google.cloud.videointelligence.v1.AnnotateVideoResponse - metadata_type: google.cloud.videointelligence.v1.AnnotateVideoProgress initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 sample_code_init_fields: - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION diff --git a/google/cloud/videointelligence/v1/videointelligence_grpc_service_config.json b/google/cloud/videointelligence/v1/videointelligence_grpc_service_config.json new file mode 100755 index 000000000..2d537341c --- /dev/null +++ b/google/cloud/videointelligence/v1/videointelligence_grpc_service_config.json @@ -0,0 +1,22 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.videointelligence.v1.VideoIntelligenceService", + "method": "AnnotateVideo" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "1s", + "maxBackoff": "120s", + "backoffMultiplier": 2.5, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/videointelligence/v1/videointelligence_v1.yaml b/google/cloud/videointelligence/v1/videointelligence_v1.yaml new file mode 100644 index 000000000..963afbf80 --- /dev/null +++ b/google/cloud/videointelligence/v1/videointelligence_v1.yaml @@ -0,0 +1,47 @@ +type: google.api.Service +config_version: 3 +name: videointelligence.googleapis.com +title: Cloud Video Intelligence API + +apis: +- name: google.cloud.videointelligence.v1.VideoIntelligenceService + +types: +- name: google.cloud.videointelligence.v1.AnnotateVideoProgress +- name: google.cloud.videointelligence.v1.AnnotateVideoResponse +- name: google.cloud.videointelligence.v1.VideoSegment + +documentation: + summary: |- + Detects objects, explicit content, and scene changes in videos. It also + specifies the region for annotation and transcribes speech to text. + Supports both asynchronous API and streaming API. + +http: + rules: + - selector: google.longrunning.Operations.CancelOperation + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel' + body: '*' + additional_bindings: + - post: '/v1/operations/{name=projects/*/locations/*/operations/*}:cancel' + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=projects/*/locations/*/operations/*}' + additional_bindings: + - delete: '/v1/operations/{name=projects/*/locations/*/operations/*}' + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=projects/*/locations/*/operations/*}' + additional_bindings: + - get: '/v1/operations/{name=projects/*/locations/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=projects/*/locations/*}/operations' + +authentication: + rules: + - selector: google.cloud.videointelligence.v1.VideoIntelligenceService.AnnotateVideo + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/videointelligence/v1beta1/BUILD.bazel b/google/cloud/videointelligence/v1beta1/BUILD.bazel deleted file mode 100644 index 4e2efa857..000000000 --- a/google/cloud/videointelligence/v1beta1/BUILD.bazel +++ /dev/null @@ -1,152 +0,0 @@ -# This is an API workspace, having public visibility by default makes perfect sense. -package(default_visibility = ["//visibility:public"]) - -############################################################################## -# Common -############################################################################## -load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") - -proto_library( - name = "video_intelligence_proto", - srcs = [ - "video_intelligence.proto", - ], - deps = [ - "//google/api:annotations_proto", - "//google/longrunning:operations_proto", - "//google/rpc:status_proto", - "@com_google_protobuf//:timestamp_proto", - ], -) - -proto_library_with_info( - name = "video_intelligence_proto_with_info", - deps = [":video_intelligence_proto"], -) - -############################################################################## -# Java -############################################################################## -load( - "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", - "java_gapic_assembly_gradle_pkg", - "java_proto_library", - "java_resource_name_proto_library", - "java_test", -) - -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - -java_proto_library( - name = "video_intelligence_java_proto", - deps = [":video_intelligence_proto"], -) - -java_grpc_library( - name = "video_intelligence_java_grpc", - srcs = [":video_intelligence_proto"], - deps = [":video_intelligence_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "video_intelligence_resource_name_java_proto", - gapic_yaml = "videointelligence_gapic.yaml", - deps = [":video_intelligence_proto"], -) - -java_gapic_library( - name = "video_intelligence_java_gapic", - src = ":video_intelligence_proto_with_info", - gapic_yaml = "videointelligence_gapic.yaml", - service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta1.yaml", - test_deps = [":video_intelligence_java_grpc"], - deps = [ - ":video_intelligence_java_proto", - ":video_intelligence_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, -) - -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":video_intelligence_java_gapic_test", - ], -) for test_name in [ - "com.google.cloud.videointelligence.v1beta1.VideoIntelligenceServiceClientTest", -]] - -# Opensource Packages -java_gapic_assembly_gradle_pkg( - name = "google-cloud-video-intelligence-v1beta1-java", - client_deps = [":video_intelligence_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":video_intelligence_java_gapic_test"], - grpc_deps = [":video_intelligence_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":video_intelligence_java_proto", - ":video_intelligence_proto", - ":video_intelligence_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", -) - -############################################################################## -# Go -############################################################################## -load( - "@com_google_googleapis_imports//:imports.bzl", - "go_proto_library", - "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", -) - -go_proto_library( - name = "video_intelligence_go_proto", - compilers = ["@io_bazel_rules_go//proto:go_grpc"], - importpath = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1beta1", - protos = [":video_intelligence_proto"], - deps = [ - "//google/api:annotations_go_proto", - "//google/longrunning:longrunning_go_proto", - "//google/rpc:status_go_proto", - ], -) - -go_gapic_library( - name = "video_intelligence_go_gapic", - src = ":video_intelligence_proto_with_info", - gapic_yaml = "videointelligence_gapic.yaml", - importpath = "cloud.google.com/go/videointelligence/apiv1beta1", - service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta1.yaml", - deps = [ - ":video_intelligence_go_proto", - "//google/longrunning:longrunning_go_gapic", - "//google/longrunning:longrunning_go_proto", - "@com_google_cloud_go//longrunning:go_default_library", - ], -) - -go_test( - name = "video_intelligence_go_gapic_test", - srcs = [":video_intelligence_go_gapic_srcjar_test"], - embed = [":video_intelligence_go_gapic"], - importpath = "cloud.google.com/go/videointelligence/apiv1beta1", -) - -# Opensource Packages -go_gapic_assembly_pkg( - name = "gapi-cloud-video-intelligence-v1beta1-go", - deps = [ - ":video_intelligence_go_gapic", - ":video_intelligence_go_gapic_srcjar-smoke-test.srcjar", - ":video_intelligence_go_gapic_srcjar-test.srcjar", - ":video_intelligence_go_proto", - ], -) diff --git a/google/cloud/videointelligence/v1beta1/video_intelligence.proto b/google/cloud/videointelligence/v1beta1/video_intelligence.proto deleted file mode 100644 index 430776bf0..000000000 --- a/google/cloud/videointelligence/v1beta1/video_intelligence.proto +++ /dev/null @@ -1,345 +0,0 @@ -// Copyright 2017 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.videointelligence.v1beta1; - -import "google/api/annotations.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.VideoIntelligence.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1beta1;videointelligence"; -option java_multiple_files = true; -option java_outer_classname = "VideoIntelligenceServiceProto"; -option java_package = "com.google.cloud.videointelligence.v1beta1"; -option php_namespace = "Google\\Cloud\\VideoIntelligence\\V1beta1"; -option ruby_package = "Google::Cloud::VideoIntelligence::V1beta1"; - -// Service that implements Google Cloud Video Intelligence API. -service VideoIntelligenceService { - // Performs asynchronous video annotation. Progress and results can be - // retrieved through the `google.longrunning.Operations` interface. - // `Operation.metadata` contains `AnnotateVideoProgress` (progress). - // `Operation.response` contains `AnnotateVideoResponse` (results). - rpc AnnotateVideo(AnnotateVideoRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/videos:annotate" - body: "*" - }; - } -} - -// Video annotation request. -message AnnotateVideoRequest { - // Input video location. Currently, only - // [Google Cloud Storage](https://cloud.google.com/storage/) URIs are - // supported, which must be specified in the following format: - // `gs://bucket-id/object-id` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - // more information, see [Request URIs](/storage/docs/reference-uris). A video - // URI may include wildcards in `object-id`, and thus identify multiple - // videos. Supported wildcards: '*' to match 0 or more characters; - // '?' to match 1 character. If unset, the input video should be embedded - // in the request as `input_content`. If set, `input_content` should be unset. - string input_uri = 1; - - // The video data bytes. Encoding: base64. If unset, the input video(s) - // should be specified via `input_uri`. If set, `input_uri` should be unset. - string input_content = 6; - - // Requested video annotation features. - repeated Feature features = 2; - - // Additional video context and/or feature-specific parameters. - VideoContext video_context = 3; - - // Optional location where the output (in JSON format) should be stored. - // Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) - // URIs are supported, which must be specified in the following format: - // `gs://bucket-id/object-id` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - // more information, see [Request URIs](/storage/docs/reference-uris). - string output_uri = 4; - - // Optional cloud region where annotation should take place. Supported cloud - // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region - // is specified, a region will be determined based on video file location. - string location_id = 5; -} - -// Video context and/or feature-specific parameters. -message VideoContext { - // Video segments to annotate. The segments may overlap and are not required - // to be contiguous or span the whole video. If unspecified, each video - // is treated as a single segment. - repeated VideoSegment segments = 1; - - // If label detection has been requested, what labels should be detected - // in addition to video-level labels or segment-level labels. If unspecified, - // defaults to `SHOT_MODE`. - LabelDetectionMode label_detection_mode = 2; - - // Whether the video has been shot from a stationary (i.e. non-moving) camera. - // When set to true, might improve detection accuracy for moving objects. - bool stationary_camera = 3; - - // Model to use for label detection. - // Supported values: "latest" and "stable" (the default). - string label_detection_model = 4; - - // Model to use for face detection. - // Supported values: "latest" and "stable" (the default). - string face_detection_model = 5; - - // Model to use for shot change detection. - // Supported values: "latest" and "stable" (the default). - string shot_change_detection_model = 6; - - // Model to use for safe search detection. - // Supported values: "latest" and "stable" (the default). - string safe_search_detection_model = 7; -} - -// Video segment. -message VideoSegment { - // Start offset in microseconds (inclusive). Unset means 0. - int64 start_time_offset = 1; - - // End offset in microseconds (inclusive). Unset means 0. - int64 end_time_offset = 2; -} - -// Label location. -message LabelLocation { - // Video segment. Set to [-1, -1] for video-level labels. - // Set to [timestamp, timestamp] for frame-level labels. - // Otherwise, corresponds to one of `AnnotateSpec.segments` - // (if specified) or to shot boundaries (if requested). - VideoSegment segment = 1; - - // Confidence that the label is accurate. Range: [0, 1]. - float confidence = 2; - - // Label level. - LabelLevel level = 3; -} - -// Label annotation. -message LabelAnnotation { - // Textual description, e.g. `Fixed-gear bicycle`. - string description = 1; - - // Language code for `description` in BCP-47 format. - string language_code = 2; - - // Where the label was detected and with what confidence. - repeated LabelLocation locations = 3; -} - -// Safe search annotation (based on per-frame visual signals only). -// If no unsafe content has been detected in a frame, no annotations -// are present for that frame. If only some types of unsafe content -// have been detected in a frame, the likelihood is set to `UNKNOWN` -// for all other types of unsafe content. -message SafeSearchAnnotation { - // Likelihood of adult content. - Likelihood adult = 1; - - // Likelihood that an obvious modification was made to the original - // version to make it appear funny or offensive. - Likelihood spoof = 2; - - // Likelihood of medical content. - Likelihood medical = 3; - - // Likelihood of violent content. - Likelihood violent = 4; - - // Likelihood of racy content. - Likelihood racy = 5; - - // Video time offset in microseconds. - int64 time_offset = 6; -} - -// Bounding box. -message BoundingBox { - // Left X coordinate. - int32 left = 1; - - // Right X coordinate. - int32 right = 2; - - // Bottom Y coordinate. - int32 bottom = 3; - - // Top Y coordinate. - int32 top = 4; -} - -// Face location. -message FaceLocation { - // Bounding box in a frame. - BoundingBox bounding_box = 1; - - // Video time offset in microseconds. - int64 time_offset = 2; -} - -// Face annotation. -message FaceAnnotation { - // Thumbnail of a representative face view (in JPEG format). Encoding: base64. - string thumbnail = 1; - - // All locations where a face was detected. - // Faces are detected and tracked on a per-video basis - // (as opposed to across multiple videos). - repeated VideoSegment segments = 2; - - // Face locations at one frame per second. - repeated FaceLocation locations = 3; -} - -// Annotation results for a single video. -message VideoAnnotationResults { - // Video file location in - // [Google Cloud Storage](https://cloud.google.com/storage/). - string input_uri = 1; - - // Label annotations. There is exactly one element for each unique label. - repeated LabelAnnotation label_annotations = 2; - - // Face annotations. There is exactly one element for each unique face. - repeated FaceAnnotation face_annotations = 3; - - // Shot annotations. Each shot is represented as a video segment. - repeated VideoSegment shot_annotations = 4; - - // Safe search annotations. - repeated SafeSearchAnnotation safe_search_annotations = 6; - - // If set, indicates an error. Note that for a single `AnnotateVideoRequest` - // some videos may succeed and some may fail. - google.rpc.Status error = 5; -} - -// Video annotation response. Included in the `response` -// field of the `Operation` returned by the `GetOperation` -// call of the `google::longrunning::Operations` service. -message AnnotateVideoResponse { - // Annotation results for all videos specified in `AnnotateVideoRequest`. - repeated VideoAnnotationResults annotation_results = 1; -} - -// Annotation progress for a single video. -message VideoAnnotationProgress { - // Video file location in - // [Google Cloud Storage](https://cloud.google.com/storage/). - string input_uri = 1; - - // Approximate percentage processed thus far. - // Guaranteed to be 100 when fully processed. - int32 progress_percent = 2; - - // Time when the request was received. - google.protobuf.Timestamp start_time = 3; - - // Time of the most recent update. - google.protobuf.Timestamp update_time = 4; -} - -// Video annotation progress. Included in the `metadata` -// field of the `Operation` returned by the `GetOperation` -// call of the `google::longrunning::Operations` service. -message AnnotateVideoProgress { - // Progress metadata for all videos specified in `AnnotateVideoRequest`. - repeated VideoAnnotationProgress annotation_progress = 1; -} - -// Video annotation feature. -enum Feature { - // Unspecified. - FEATURE_UNSPECIFIED = 0; - - // Label detection. Detect objects, such as dog or flower. - LABEL_DETECTION = 1; - - // Human face detection and tracking. - FACE_DETECTION = 2; - - // Shot change detection. - SHOT_CHANGE_DETECTION = 3; - - // Safe search detection. - SAFE_SEARCH_DETECTION = 4; -} - -// Label level (scope). -enum LabelLevel { - // Unspecified. - LABEL_LEVEL_UNSPECIFIED = 0; - - // Video-level. Corresponds to the whole video. - VIDEO_LEVEL = 1; - - // Segment-level. Corresponds to one of `AnnotateSpec.segments`. - SEGMENT_LEVEL = 2; - - // Shot-level. Corresponds to a single shot (i.e. a series of frames - // without a major camera position or background change). - SHOT_LEVEL = 3; - - // Frame-level. Corresponds to a single video frame. - FRAME_LEVEL = 4; -} - -// Label detection mode. -enum LabelDetectionMode { - // Unspecified. - LABEL_DETECTION_MODE_UNSPECIFIED = 0; - - // Detect shot-level labels. - SHOT_MODE = 1; - - // Detect frame-level labels. - FRAME_MODE = 2; - - // Detect both shot-level and frame-level labels. - SHOT_AND_FRAME_MODE = 3; -} - -// Bucketized representation of likelihood. -enum Likelihood { - // Unknown likelihood. - UNKNOWN = 0; - - // Very unlikely. - VERY_UNLIKELY = 1; - - // Unlikely. - UNLIKELY = 2; - - // Possible. - POSSIBLE = 3; - - // Likely. - LIKELY = 4; - - // Very likely. - VERY_LIKELY = 5; -} diff --git a/google/cloud/videointelligence/v1beta1/videointelligence_grpc_service_config.json b/google/cloud/videointelligence/v1beta1/videointelligence_grpc_service_config.json new file mode 100755 index 000000000..d41c56e6a --- /dev/null +++ b/google/cloud/videointelligence/v1beta1/videointelligence_grpc_service_config.json @@ -0,0 +1,22 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.videointelligence.v1beta1.VideoIntelligenceService", + "method": "AnnotateVideo" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "1s", + "maxBackoff": "120s", + "backoffMultiplier": 2.5, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/videointelligence/v1beta2/BUILD.bazel b/google/cloud/videointelligence/v1beta2/BUILD.bazel index acd3c583e..c8edfddc8 100644 --- a/google/cloud/videointelligence/v1beta2/BUILD.bazel +++ b/google/cloud/videointelligence/v1beta2/BUILD.bazel @@ -1,18 +1,23 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "video_intelligence_proto", + name = "videointelligence_proto", srcs = [ "video_intelligence.proto", ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/longrunning:operations_proto", "//google/rpc:status_proto", "@com_google_protobuf//:duration_proto", @@ -21,8 +26,11 @@ proto_library( ) proto_library_with_info( - name = "video_intelligence_proto_with_info", - deps = [":video_intelligence_proto"], + name = "videointelligence_proto_with_info", + deps = [ + ":videointelligence_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -30,71 +38,55 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( - name = "video_intelligence_java_proto", - deps = [":video_intelligence_proto"], + name = "videointelligence_java_proto", + deps = [":videointelligence_proto"], ) java_grpc_library( - name = "video_intelligence_java_grpc", - srcs = [":video_intelligence_proto"], - deps = [":video_intelligence_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "video_intelligence_resource_name_java_proto", - gapic_yaml = "videointelligence_gapic.yaml", - deps = [":video_intelligence_proto"], + name = "videointelligence_java_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_java_proto"], ) java_gapic_library( - name = "video_intelligence_java_gapic", - src = ":video_intelligence_proto_with_info", + name = "videointelligence_java_gapic", + src = ":videointelligence_proto_with_info", gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1beta2", service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta2.yaml", - test_deps = [":video_intelligence_java_grpc"], + test_deps = [ + ":videointelligence_java_grpc", + ], deps = [ - ":video_intelligence_java_proto", - ":video_intelligence_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ":videointelligence_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":video_intelligence_java_gapic_test", +java_gapic_test( + name = "videointelligence_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.videointelligence.v1beta2.VideoIntelligenceServiceClientTest", ], -) for test_name in [ - "com.google.cloud.videointelligence.v1beta2.VideoIntelligenceServiceClientTest", -]] + runtime_deps = [":videointelligence_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-video-intelligence-v1beta2-java", - client_deps = [":video_intelligence_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":video_intelligence_java_gapic_test"], - grpc_deps = [":video_intelligence_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":video_intelligence_java_proto", - ":video_intelligence_proto", - ":video_intelligence_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + name = "google-cloud-videointelligence-v1beta2-java", + deps = [ + ":videointelligence_java_gapic", + ":videointelligence_java_grpc", + ":videointelligence_java_proto", + ":videointelligence_proto", + ], ) ############################################################################## @@ -102,17 +94,17 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "video_intelligence_go_proto", + name = "videointelligence_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1beta2", - protos = [":video_intelligence_proto"], + protos = [":videointelligence_proto"], deps = [ "//google/api:annotations_go_proto", "//google/longrunning:longrunning_go_proto", @@ -121,33 +113,257 @@ go_proto_library( ) go_gapic_library( - name = "video_intelligence_go_gapic", - src = ":video_intelligence_proto_with_info", - gapic_yaml = "videointelligence_gapic.yaml", - importpath = "cloud.google.com/go/videointelligence/apiv1beta2", + name = "videointelligence_go_gapic", + srcs = [":videointelligence_proto_with_info"], + grpc_service_config = "videointelligence_grpc_service_config.json", + importpath = "cloud.google.com/go/videointelligence/apiv1beta2;videointelligence", service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta2.yaml", deps = [ - ":video_intelligence_go_proto", + ":videointelligence_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", ], ) go_test( - name = "video_intelligence_go_gapic_test", - srcs = [":video_intelligence_go_gapic_srcjar_test"], - embed = [":video_intelligence_go_gapic"], + name = "videointelligence_go_gapic_test", + srcs = [":videointelligence_go_gapic_srcjar_test"], + embed = [":videointelligence_go_gapic"], importpath = "cloud.google.com/go/videointelligence/apiv1beta2", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-video-intelligence-v1beta2-go", + name = "gapi-cloud-videointelligence-v1beta2-go", + deps = [ + ":videointelligence_go_gapic", + ":videointelligence_go_gapic_srcjar-test.srcjar", + ":videointelligence_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "videointelligence_moved_proto", + srcs = [":videointelligence_proto"], deps = [ - ":video_intelligence_go_gapic", - ":video_intelligence_go_gapic_srcjar-smoke-test.srcjar", - ":video_intelligence_go_gapic_srcjar-test.srcjar", - ":video_intelligence_go_proto", + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "videointelligence_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":videointelligence_moved_proto"], +) + +py_grpc_library( + name = "videointelligence_py_grpc", + srcs = [":videointelligence_moved_proto"], + deps = [":videointelligence_py_proto"], +) + +py_gapic_library( + name = "videointelligence_py_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1beta2", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta2.yaml", + deps = [ + ":videointelligence_py_grpc", + ":videointelligence_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "videointelligence-v1beta2-py", + deps = [ + ":videointelligence_py_gapic", + ":videointelligence_py_grpc", + ":videointelligence_py_proto", ], ) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "videointelligence_php_proto", + deps = [":videointelligence_proto"], +) + +php_grpc_library( + name = "videointelligence_php_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_php_proto"], +) + +php_gapic_library( + name = "videointelligence_php_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.legacy.yaml", + package = "google.cloud.videointelligence.v1beta2", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta2.yaml", + deps = [ + ":videointelligence_php_grpc", + ":videointelligence_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1beta2-php", + deps = [ + ":videointelligence_php_gapic", + ":videointelligence_php_grpc", + ":videointelligence_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "videointelligence_nodejs_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1beta2", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta2.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "videointelligence-v1beta2-nodejs", + deps = [ + ":videointelligence_nodejs_gapic", + ":videointelligence_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "videointelligence_ruby_proto", + deps = [":videointelligence_proto"], +) + +ruby_grpc_library( + name = "videointelligence_ruby_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_ruby_proto"], +) + +ruby_gapic_library( + name = "videointelligence_ruby_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1beta2", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta2.yaml", + deps = [ + ":videointelligence_ruby_grpc", + ":videointelligence_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1beta2-ruby", + deps = [ + ":videointelligence_ruby_gapic", + ":videointelligence_ruby_grpc", + ":videointelligence_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "videointelligence_csharp_proto", + deps = [":videointelligence_proto"], +) + +csharp_grpc_library( + name = "videointelligence_csharp_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_csharp_proto"], +) + +csharp_gapic_library( + name = "videointelligence_csharp_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1beta2", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta2.yaml", + deps = [ + ":videointelligence_csharp_grpc", + ":videointelligence_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1beta2-csharp", + deps = [ + ":videointelligence_csharp_gapic", + ":videointelligence_csharp_grpc", + ":videointelligence_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/videointelligence/v1beta2/video_intelligence.proto b/google/cloud/videointelligence/v1beta2/video_intelligence.proto index a69c25791..690099751 100644 --- a/google/cloud/videointelligence/v1beta2/video_intelligence.proto +++ b/google/cloud/videointelligence/v1beta2/video_intelligence.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.videointelligence.v1beta2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -32,6 +35,10 @@ option ruby_package = "Google::Cloud::VideoIntelligence::V1beta2"; // Service that implements Google Cloud Video Intelligence API. service VideoIntelligenceService { + option (google.api.default_host) = "videointelligence.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + // Performs asynchronous video annotation. Progress and results can be // retrieved through the `google.longrunning.Operations` interface. // `Operation.metadata` contains `AnnotateVideoProgress` (progress). @@ -42,6 +49,11 @@ service VideoIntelligenceService { post: "/v1beta2/videos:annotate" body: "*" }; + option (google.api.method_signature) = "input_uri,features"; + option (google.longrunning.operation_info) = { + response_type: "AnnotateVideoResponse" + metadata_type: "AnnotateVideoProgress" + }; } } @@ -52,7 +64,7 @@ message AnnotateVideoRequest { // supported, which must be specified in the following format: // `gs://bucket-id/object-id` (other URI formats return // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - // more information, see [Request URIs](/storage/docs/reference-uris). A video + // more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). A video // URI may include wildcards in `object-id`, and thus identify multiple // videos. Supported wildcards: '*' to match 0 or more characters; // '?' to match 1 character. If unset, the input video should be embedded @@ -64,31 +76,31 @@ message AnnotateVideoRequest { // If set, `input_uri` should be unset. bytes input_content = 6; - // Requested video annotation features. - repeated Feature features = 2; + // Required. Requested video annotation features. + repeated Feature features = 2 [(google.api.field_behavior) = REQUIRED]; // Additional video context and/or feature-specific parameters. VideoContext video_context = 3; - // Optional location where the output (in JSON format) should be stored. + // Optional. Location where the output (in JSON format) should be stored. // Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) // URIs are supported, which must be specified in the following format: // `gs://bucket-id/object-id` (other URI formats return // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - // more information, see [Request URIs](/storage/docs/reference-uris). - string output_uri = 4; + // more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + string output_uri = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional cloud region where annotation should take place. Supported cloud + // Optional. Cloud region where annotation should take place. Supported cloud // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region // is specified, a region will be determined based on video file location. - string location_id = 5; + string location_id = 5 [(google.api.field_behavior) = OPTIONAL]; } // Video context and/or feature-specific parameters. message VideoContext { // Video segments to annotate. The segments may overlap and are not required - // to be contiguous or span the whole video. If unspecified, each video - // is treated as a single segment. + // to be contiguous or span the whole video. If unspecified, each video is + // treated as a single segment. repeated VideoSegment segments = 1; // Config for LABEL_DETECTION. diff --git a/google/cloud/videointelligence/v1beta1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1beta2/videointelligence_gapic.legacy.yaml similarity index 68% rename from google/cloud/videointelligence/v1beta1/videointelligence_gapic.yaml rename to google/cloud/videointelligence/v1beta2/videointelligence_gapic.legacy.yaml index 931cc445e..8f4de6e6d 100644 --- a/google/cloud/videointelligence/v1beta1/videointelligence_gapic.yaml +++ b/google/cloud/videointelligence/v1beta2/videointelligence_gapic.legacy.yaml @@ -2,23 +2,23 @@ type: com.google.api.codegen.ConfigProto config_schema_version: 1.0.0 language_settings: java: - package_name: com.google.cloud.videointelligence.v1beta1 + package_name: com.google.cloud.videointelligence.v1beta2 python: - package_name: google.cloud.videointelligence_v1beta1.gapic + package_name: google.cloud.videointelligence_v1beta2.gapic go: - package_name: cloud.google.com/go/videointelligence/apiv1beta1 + package_name: cloud.google.com/go/videointelligence/apiv1beta2 csharp: - package_name: Google.Cloud.VideoIntelligence.V1Beta1 + package_name: Google.Cloud.VideoIntelligence.V1Beta2 ruby: - package_name: Google::Cloud::VideoIntelligence::V1beta1 + package_name: Google::Cloud::VideoIntelligence::V1beta2 release_level: GA php: - package_name: Google\Cloud\VideoIntelligence\V1beta1 + package_name: Google\Cloud\VideoIntelligence\V1beta2 nodejs: - package_name: videointelligence.v1beta1 + package_name: video-intelligence.v1beta2 domain_layer_location: google-cloud interfaces: -- name: google.cloud.videointelligence.v1beta1.VideoIntelligenceService +- name: google.cloud.videointelligence.v1beta2.VideoIntelligenceService collections: [] retry_codes_def: - name: idempotent @@ -44,15 +44,12 @@ interfaces: - input_uri - features long_running: - return_type: google.cloud.videointelligence.v1beta1.AnnotateVideoResponse - metadata_type: google.cloud.videointelligence.v1beta1.AnnotateVideoProgress + return_type: google.cloud.videointelligence.v1beta2.AnnotateVideoResponse + metadata_type: google.cloud.videointelligence.v1beta2.AnnotateVideoProgress initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - required_fields: - - input_uri - - features retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 diff --git a/google/cloud/videointelligence/v1beta2/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1beta2/videointelligence_gapic.yaml index 8f4de6e6d..2e7300596 100644 --- a/google/cloud/videointelligence/v1beta2/videointelligence_gapic.yaml +++ b/google/cloud/videointelligence/v1beta2/videointelligence_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.videointelligence.v1beta2 @@ -19,14 +19,6 @@ language_settings: domain_layer_location: google-cloud interfaces: - name: google.cloud.videointelligence.v1beta2.VideoIntelligenceService - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 1000 @@ -38,21 +30,13 @@ interfaces: total_timeout_millis: 600000 methods: - name: AnnotateVideo - flattening: - groups: - - parameters: - - input_uri - - features long_running: - return_type: google.cloud.videointelligence.v1beta2.AnnotateVideoResponse - metadata_type: google.cloud.videointelligence.v1beta2.AnnotateVideoProgress initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 sample_code_init_fields: - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION diff --git a/google/cloud/videointelligence/v1beta2/videointelligence_grpc_service_config.json b/google/cloud/videointelligence/v1beta2/videointelligence_grpc_service_config.json new file mode 100755 index 000000000..cf66cb592 --- /dev/null +++ b/google/cloud/videointelligence/v1beta2/videointelligence_grpc_service_config.json @@ -0,0 +1,22 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.videointelligence.v1beta2.VideoIntelligenceService", + "method": "AnnotateVideo" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "1s", + "maxBackoff": "120s", + "backoffMultiplier": 2.5, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/videointelligence/v1p1beta1/BUILD.bazel b/google/cloud/videointelligence/v1p1beta1/BUILD.bazel index 6d5193091..171db7c3d 100644 --- a/google/cloud/videointelligence/v1p1beta1/BUILD.bazel +++ b/google/cloud/videointelligence/v1p1beta1/BUILD.bazel @@ -1,18 +1,23 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "video_intelligence_proto", + name = "videointelligence_proto", srcs = [ "video_intelligence.proto", ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/longrunning:operations_proto", "//google/rpc:status_proto", "@com_google_protobuf//:duration_proto", @@ -21,8 +26,11 @@ proto_library( ) proto_library_with_info( - name = "video_intelligence_proto_with_info", - deps = [":video_intelligence_proto"], + name = "videointelligence_proto_with_info", + deps = [ + ":videointelligence_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -30,71 +38,55 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( - name = "video_intelligence_java_proto", - deps = [":video_intelligence_proto"], + name = "videointelligence_java_proto", + deps = [":videointelligence_proto"], ) java_grpc_library( - name = "video_intelligence_java_grpc", - srcs = [":video_intelligence_proto"], - deps = [":video_intelligence_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "video_intelligence_resource_name_java_proto", - gapic_yaml = "videointelligence_gapic.yaml", - deps = [":video_intelligence_proto"], + name = "videointelligence_java_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_java_proto"], ) java_gapic_library( - name = "video_intelligence_java_gapic", - src = ":video_intelligence_proto_with_info", + name = "videointelligence_java_gapic", + src = ":videointelligence_proto_with_info", gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p1beta1", service_yaml = "//google/cloud/videointelligence:videointelligence_v1p1beta1.yaml", - test_deps = [":video_intelligence_java_grpc"], + test_deps = [ + ":videointelligence_java_grpc", + ], deps = [ - ":video_intelligence_java_proto", - ":video_intelligence_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ":videointelligence_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":video_intelligence_java_gapic_test", +java_gapic_test( + name = "videointelligence_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceClientTest", ], -) for test_name in [ - "com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceClientTest", -]] + runtime_deps = [":videointelligence_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-video-intelligence-v1p1beta1-java", - client_deps = [":video_intelligence_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":video_intelligence_java_gapic_test"], - grpc_deps = [":video_intelligence_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":video_intelligence_java_proto", - ":video_intelligence_proto", - ":video_intelligence_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + name = "google-cloud-videointelligence-v1p1beta1-java", + deps = [ + ":videointelligence_java_gapic", + ":videointelligence_java_grpc", + ":videointelligence_java_proto", + ":videointelligence_proto", + ], ) ############################################################################## @@ -102,17 +94,17 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "video_intelligence_go_proto", + name = "videointelligence_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1p1beta1", - protos = [":video_intelligence_proto"], + protos = [":videointelligence_proto"], deps = [ "//google/api:annotations_go_proto", "//google/longrunning:longrunning_go_proto", @@ -121,33 +113,257 @@ go_proto_library( ) go_gapic_library( - name = "video_intelligence_go_gapic", - src = ":video_intelligence_proto_with_info", - gapic_yaml = "videointelligence_gapic.yaml", - importpath = "cloud.google.com/go/videointelligence/apiv1p1beta1", + name = "videointelligence_go_gapic", + srcs = [":videointelligence_proto_with_info"], + grpc_service_config = "videointelligence_grpc_service_config.json", + importpath = "cloud.google.com/go/videointelligence/apiv1p1beta1;videointelligence", service_yaml = "//google/cloud/videointelligence:videointelligence_v1p1beta1.yaml", deps = [ - ":video_intelligence_go_proto", + ":videointelligence_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", ], ) go_test( - name = "video_intelligence_go_gapic_test", - srcs = [":video_intelligence_go_gapic_srcjar_test"], - embed = [":video_intelligence_go_gapic"], + name = "videointelligence_go_gapic_test", + srcs = [":videointelligence_go_gapic_srcjar_test"], + embed = [":videointelligence_go_gapic"], importpath = "cloud.google.com/go/videointelligence/apiv1p1beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-video-intelligence-v1p1beta1-go", + name = "gapi-cloud-videointelligence-v1p1beta1-go", + deps = [ + ":videointelligence_go_gapic", + ":videointelligence_go_gapic_srcjar-test.srcjar", + ":videointelligence_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "videointelligence_moved_proto", + srcs = [":videointelligence_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "videointelligence_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":videointelligence_moved_proto"], +) + +py_grpc_library( + name = "videointelligence_py_grpc", + srcs = [":videointelligence_moved_proto"], + deps = [":videointelligence_py_proto"], +) + +py_gapic_library( + name = "videointelligence_py_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p1beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p1beta1.yaml", + deps = [ + ":videointelligence_py_grpc", + ":videointelligence_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "videointelligence-v1p1beta1-py", + deps = [ + ":videointelligence_py_gapic", + ":videointelligence_py_grpc", + ":videointelligence_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "videointelligence_php_proto", + deps = [":videointelligence_proto"], +) + +php_grpc_library( + name = "videointelligence_php_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_php_proto"], +) + +php_gapic_library( + name = "videointelligence_php_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p1beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p1beta1.yaml", + deps = [ + ":videointelligence_php_grpc", + ":videointelligence_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1p1beta1-php", + deps = [ + ":videointelligence_php_gapic", + ":videointelligence_php_grpc", + ":videointelligence_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "videointelligence_nodejs_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p1beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "videointelligence-v1p1beta1-nodejs", + deps = [ + ":videointelligence_nodejs_gapic", + ":videointelligence_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "videointelligence_ruby_proto", + deps = [":videointelligence_proto"], +) + +ruby_grpc_library( + name = "videointelligence_ruby_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_ruby_proto"], +) + +ruby_gapic_library( + name = "videointelligence_ruby_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p1beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p1beta1.yaml", + deps = [ + ":videointelligence_ruby_grpc", + ":videointelligence_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1p1beta1-ruby", + deps = [ + ":videointelligence_ruby_gapic", + ":videointelligence_ruby_grpc", + ":videointelligence_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "videointelligence_csharp_proto", + deps = [":videointelligence_proto"], +) + +csharp_grpc_library( + name = "videointelligence_csharp_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_csharp_proto"], +) + +csharp_gapic_library( + name = "videointelligence_csharp_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p1beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p1beta1.yaml", + deps = [ + ":videointelligence_csharp_grpc", + ":videointelligence_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1p1beta1-csharp", deps = [ - ":video_intelligence_go_gapic", - ":video_intelligence_go_gapic_srcjar-smoke-test.srcjar", - ":video_intelligence_go_gapic_srcjar-test.srcjar", - ":video_intelligence_go_proto", + ":videointelligence_csharp_gapic", + ":videointelligence_csharp_grpc", + ":videointelligence_csharp_proto", ], ) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto b/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto index 115f362be..a54bddd07 100644 --- a/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto +++ b/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.videointelligence.v1p1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -32,16 +35,23 @@ option ruby_package = "Google::Cloud::VideoIntelligence::V1p1beta1"; // Service that implements Google Cloud Video Intelligence API. service VideoIntelligenceService { + option (google.api.default_host) = "videointelligence.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Performs asynchronous video annotation. Progress and results can be // retrieved through the `google.longrunning.Operations` interface. // `Operation.metadata` contains `AnnotateVideoProgress` (progress). // `Operation.response` contains `AnnotateVideoResponse` (results). - rpc AnnotateVideo(AnnotateVideoRequest) - returns (google.longrunning.Operation) { + rpc AnnotateVideo(AnnotateVideoRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1p1beta1/videos:annotate" body: "*" }; + option (google.api.method_signature) = "input_uri,features"; + option (google.longrunning.operation_info) = { + response_type: "AnnotateVideoResponse" + metadata_type: "AnnotateVideoProgress" + }; } } @@ -51,10 +61,10 @@ message AnnotateVideoRequest { // [Google Cloud Storage](https://cloud.google.com/storage/) URIs are // supported, which must be specified in the following format: // `gs://bucket-id/object-id` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - // more information, see [Request URIs](/storage/docs/reference-uris). A video - // URI may include wildcards in `object-id`, and thus identify multiple - // videos. Supported wildcards: '*' to match 0 or more characters; + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + // [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + // A video URI may include wildcards in `object-id`, and thus identify + // multiple videos. Supported wildcards: '*' to match 0 or more characters; // '?' to match 1 character. If unset, the input video should be embedded // in the request as `input_content`. If set, `input_content` should be unset. string input_uri = 1; @@ -64,24 +74,24 @@ message AnnotateVideoRequest { // If set, `input_uri` should be unset. bytes input_content = 6; - // Requested video annotation features. - repeated Feature features = 2; + // Required. Requested video annotation features. + repeated Feature features = 2 [(google.api.field_behavior) = REQUIRED]; // Additional video context and/or feature-specific parameters. VideoContext video_context = 3; - // Optional location where the output (in JSON format) should be stored. + // Optional. Location where the output (in JSON format) should be stored. // Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) // URIs are supported, which must be specified in the following format: // `gs://bucket-id/object-id` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - // more information, see [Request URIs](/storage/docs/reference-uris). - string output_uri = 4; + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + // [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + string output_uri = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional cloud region where annotation should take place. Supported cloud + // Optional. Cloud region where annotation should take place. Supported cloud // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region // is specified, a region will be determined based on video file location. - string location_id = 5; + string location_id = 5 [(google.api.field_behavior) = OPTIONAL]; } // Video context and/or feature-specific parameters. @@ -285,60 +295,60 @@ message AnnotateVideoProgress { // Config for SPEECH_TRANSCRIPTION. message SpeechTranscriptionConfig { - // *Required* The language of the supplied audio as a + // Required. *Required* The language of the supplied audio as a // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. // Example: "en-US". // See [Language Support](https://cloud.google.com/speech/docs/languages) // for a list of the currently supported language codes. - string language_code = 1; + string language_code = 1 [(google.api.field_behavior) = REQUIRED]; - // *Optional* Maximum number of recognition hypotheses to be returned. + // Optional. Maximum number of recognition hypotheses to be returned. // Specifically, the maximum number of `SpeechRecognitionAlternative` messages - // within each `SpeechRecognitionResult`. The server may return fewer than + // within each `SpeechTranscription`. The server may return fewer than // `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will // return a maximum of one. If omitted, will return a maximum of one. - int32 max_alternatives = 2; + int32 max_alternatives = 2 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* If set to `true`, the server will attempt to filter out + // Optional. If set to `true`, the server will attempt to filter out // profanities, replacing all but the initial character in each filtered word // with asterisks, e.g. "f***". If set to `false` or omitted, profanities // won't be filtered out. - bool filter_profanity = 3; + bool filter_profanity = 3 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* A means to provide context to assist the speech recognition. - repeated SpeechContext speech_contexts = 4; + // Optional. A means to provide context to assist the speech recognition. + repeated SpeechContext speech_contexts = 4 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* If 'true', adds punctuation to recognition result hypotheses. + // Optional. If 'true', adds punctuation to recognition result hypotheses. // This feature is only available in select languages. Setting this for // requests in other languages has no effect at all. The default 'false' value // does not add punctuation to result hypotheses. NOTE: "This is currently // offered as an experimental service, complimentary to all users. In the // future this may be exclusively available as a premium feature." - bool enable_automatic_punctuation = 5; + bool enable_automatic_punctuation = 5 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* For file formats, such as MXF or MKV, supporting multiple audio + // Optional. For file formats, such as MXF or MKV, supporting multiple audio // tracks, specify up to two tracks. Default: track 0. - repeated int32 audio_tracks = 6; + repeated int32 audio_tracks = 6 [(google.api.field_behavior) = OPTIONAL]; } // Provides "hints" to the speech recognizer to favor specific words and phrases // in the results. message SpeechContext { - // *Optional* A list of strings containing words and phrases "hints" so that + // Optional. A list of strings containing words and phrases "hints" so that // the speech recognition is more likely to recognize them. This can be used // to improve the accuracy for specific words and phrases, for example, if // specific commands are typically spoken by the user. This can also be used // to add additional words to the vocabulary of the recognizer. See // [usage limits](https://cloud.google.com/speech/limits#content). - repeated string phrases = 1; + repeated string phrases = 1 [(google.api.field_behavior) = OPTIONAL]; } // A speech recognition result corresponding to a portion of the audio. message SpeechTranscription { - // Output only. May contain one or more recognition hypotheses (up to the - // maximum specified in `max_alternatives`). - // These alternatives are ordered in terms of accuracy, with the top (first) - // alternative being the most probable, as ranked by the recognizer. + // May contain one or more recognition hypotheses (up to the maximum specified + // in `max_alternatives`). These alternatives are ordered in terms of + // accuracy, with the top (first) alternative being the most probable, as + // ranked by the recognizer. repeated SpeechRecognitionAlternative alternatives = 1; } @@ -349,11 +359,11 @@ message SpeechRecognitionAlternative { // Output only. The confidence estimate between 0.0 and 1.0. A higher number // indicates an estimated greater likelihood that the recognized words are - // correct. This field is typically provided only for the top hypothesis, and - // only for `is_final=true` results. Clients should not rely on the - // `confidence` field as it is not guaranteed to be accurate or consistent. + // correct. This field is set only for the top alternative. + // This field is not guaranteed to be accurate and users should not rely on it + // to be always provided. // The default of 0.0 is a sentinel value indicating `confidence` was not set. - float confidence = 2; + float confidence = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A list of word-specific information for each recognized word. repeated WordInfo words = 3; diff --git a/google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.legacy.yaml b/google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.legacy.yaml new file mode 100644 index 000000000..dbf690434 --- /dev/null +++ b/google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.legacy.yaml @@ -0,0 +1,63 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.videointelligence.v1p1beta1 + python: + package_name: google.cloud.videointelligence_v1p1beta1.gapic + go: + package_name: cloud.google.com/go/videointelligence/apiv1p1beta1 + csharp: + package_name: Google.Cloud.VideoIntelligence.V1P1Beta1 + ruby: + package_name: Google::Cloud::VideoIntelligence::V1p1beta1 + release_level: BETA + php: + package_name: Google\Cloud\VideoIntelligence\V1p1beta1 + nodejs: + package_name: video-intelligence.v1p1beta1 + domain_layer_location: google-cloud +interfaces: +- name: google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService + smoke_test: + method: AnnotateVideo + init_fields: + - input_uri=gs://cloud-samples-data/video/cat.mp4 + - features[0]=LABEL_DETECTION + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 1000 + retry_delay_multiplier: 2.5 + max_retry_delay_millis: 120000 + initial_rpc_timeout_millis: 120000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 120000 + total_timeout_millis: 600000 + methods: + - name: AnnotateVideo + flattening: + groups: + - parameters: + - input_uri + - features + long_running: + return_type: google.cloud.videointelligence.v1p1beta1.AnnotateVideoResponse + metadata_type: google.cloud.videointelligence.v1p1beta1.AnnotateVideoProgress + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + sample_code_init_fields: + - input_uri=gs://cloud-samples-data/video/cat.mp4 + - features[0]=LABEL_DETECTION diff --git a/google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.yaml index dbf690434..fd08cb97c 100644 --- a/google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.yaml +++ b/google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.videointelligence.v1p1beta1 @@ -24,14 +24,6 @@ interfaces: init_fields: - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 1000 @@ -43,21 +35,13 @@ interfaces: total_timeout_millis: 600000 methods: - name: AnnotateVideo - flattening: - groups: - - parameters: - - input_uri - - features long_running: - return_type: google.cloud.videointelligence.v1p1beta1.AnnotateVideoResponse - metadata_type: google.cloud.videointelligence.v1p1beta1.AnnotateVideoProgress initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 sample_code_init_fields: - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION diff --git a/google/cloud/videointelligence/v1p1beta1/videointelligence_grpc_service_config.json b/google/cloud/videointelligence/v1p1beta1/videointelligence_grpc_service_config.json new file mode 100755 index 000000000..8e28530cc --- /dev/null +++ b/google/cloud/videointelligence/v1p1beta1/videointelligence_grpc_service_config.json @@ -0,0 +1,22 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService", + "method": "AnnotateVideo" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "1s", + "maxBackoff": "120s", + "backoffMultiplier": 2.5, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/videointelligence/v1p2beta1/BUILD.bazel b/google/cloud/videointelligence/v1p2beta1/BUILD.bazel index 2de852107..cba21e1f1 100644 --- a/google/cloud/videointelligence/v1p2beta1/BUILD.bazel +++ b/google/cloud/videointelligence/v1p2beta1/BUILD.bazel @@ -1,18 +1,23 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "video_intelligence_proto", + name = "videointelligence_proto", srcs = [ "video_intelligence.proto", ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/longrunning:operations_proto", "//google/rpc:status_proto", "@com_google_protobuf//:duration_proto", @@ -21,8 +26,11 @@ proto_library( ) proto_library_with_info( - name = "video_intelligence_proto_with_info", - deps = [":video_intelligence_proto"], + name = "videointelligence_proto_with_info", + deps = [ + ":videointelligence_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -30,71 +38,55 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( - name = "video_intelligence_java_proto", - deps = [":video_intelligence_proto"], + name = "videointelligence_java_proto", + deps = [":videointelligence_proto"], ) java_grpc_library( - name = "video_intelligence_java_grpc", - srcs = [":video_intelligence_proto"], - deps = [":video_intelligence_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "video_intelligence_resource_name_java_proto", - gapic_yaml = "videointelligence_gapic.yaml", - deps = [":video_intelligence_proto"], + name = "videointelligence_java_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_java_proto"], ) java_gapic_library( - name = "video_intelligence_java_gapic", - src = ":video_intelligence_proto_with_info", + name = "videointelligence_java_gapic", + src = ":videointelligence_proto_with_info", gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p2beta1", service_yaml = "//google/cloud/videointelligence:videointelligence_v1p2beta1.yaml", - test_deps = [":video_intelligence_java_grpc"], + test_deps = [ + ":videointelligence_java_grpc", + ], deps = [ - ":video_intelligence_java_proto", - ":video_intelligence_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ":videointelligence_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":video_intelligence_java_gapic_test", +java_gapic_test( + name = "videointelligence_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.videointelligence.v1p2beta1.VideoIntelligenceServiceClientTest", ], -) for test_name in [ - "com.google.cloud.videointelligence.v1p2beta1.VideoIntelligenceServiceClientTest", -]] + runtime_deps = [":videointelligence_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-video-intelligence-v1p2beta1-java", - client_deps = [":video_intelligence_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":video_intelligence_java_gapic_test"], - grpc_deps = [":video_intelligence_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":video_intelligence_java_proto", - ":video_intelligence_proto", - ":video_intelligence_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + name = "google-cloud-videointelligence-v1p2beta1-java", + deps = [ + ":videointelligence_java_gapic", + ":videointelligence_java_grpc", + ":videointelligence_java_proto", + ":videointelligence_proto", + ], ) ############################################################################## @@ -102,17 +94,17 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "video_intelligence_go_proto", + name = "videointelligence_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1p2beta1", - protos = [":video_intelligence_proto"], + protos = [":videointelligence_proto"], deps = [ "//google/api:annotations_go_proto", "//google/longrunning:longrunning_go_proto", @@ -121,33 +113,257 @@ go_proto_library( ) go_gapic_library( - name = "video_intelligence_go_gapic", - src = ":video_intelligence_proto_with_info", - gapic_yaml = "videointelligence_gapic.yaml", - importpath = "cloud.google.com/go/videointelligence/apiv1p2beta1", + name = "videointelligence_go_gapic", + srcs = [":videointelligence_proto_with_info"], + grpc_service_config = "videointelligence_grpc_service_config.json", + importpath = "cloud.google.com/go/videointelligence/apiv1p2beta1;videointelligence", service_yaml = "//google/cloud/videointelligence:videointelligence_v1p2beta1.yaml", deps = [ - ":video_intelligence_go_proto", + ":videointelligence_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", ], ) go_test( - name = "video_intelligence_go_gapic_test", - srcs = [":video_intelligence_go_gapic_srcjar_test"], - embed = [":video_intelligence_go_gapic"], + name = "videointelligence_go_gapic_test", + srcs = [":videointelligence_go_gapic_srcjar_test"], + embed = [":videointelligence_go_gapic"], importpath = "cloud.google.com/go/videointelligence/apiv1p2beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-video-intelligence-v1p2beta1-go", + name = "gapi-cloud-videointelligence-v1p2beta1-go", + deps = [ + ":videointelligence_go_gapic", + ":videointelligence_go_gapic_srcjar-test.srcjar", + ":videointelligence_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "videointelligence_moved_proto", + srcs = [":videointelligence_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "videointelligence_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":videointelligence_moved_proto"], +) + +py_grpc_library( + name = "videointelligence_py_grpc", + srcs = [":videointelligence_moved_proto"], + deps = [":videointelligence_py_proto"], +) + +py_gapic_library( + name = "videointelligence_py_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p2beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p2beta1.yaml", + deps = [ + ":videointelligence_py_grpc", + ":videointelligence_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "videointelligence-v1p2beta1-py", + deps = [ + ":videointelligence_py_gapic", + ":videointelligence_py_grpc", + ":videointelligence_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "videointelligence_php_proto", + deps = [":videointelligence_proto"], +) + +php_grpc_library( + name = "videointelligence_php_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_php_proto"], +) + +php_gapic_library( + name = "videointelligence_php_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p2beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p2beta1.yaml", + deps = [ + ":videointelligence_php_grpc", + ":videointelligence_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1p2beta1-php", + deps = [ + ":videointelligence_php_gapic", + ":videointelligence_php_grpc", + ":videointelligence_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "videointelligence_nodejs_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p2beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p2beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "videointelligence-v1p2beta1-nodejs", + deps = [ + ":videointelligence_nodejs_gapic", + ":videointelligence_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "videointelligence_ruby_proto", + deps = [":videointelligence_proto"], +) + +ruby_grpc_library( + name = "videointelligence_ruby_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_ruby_proto"], +) + +ruby_gapic_library( + name = "videointelligence_ruby_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p2beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p2beta1.yaml", + deps = [ + ":videointelligence_ruby_grpc", + ":videointelligence_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1p2beta1-ruby", + deps = [ + ":videointelligence_ruby_gapic", + ":videointelligence_ruby_grpc", + ":videointelligence_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "videointelligence_csharp_proto", + deps = [":videointelligence_proto"], +) + +csharp_grpc_library( + name = "videointelligence_csharp_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_csharp_proto"], +) + +csharp_gapic_library( + name = "videointelligence_csharp_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p2beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p2beta1.yaml", + deps = [ + ":videointelligence_csharp_grpc", + ":videointelligence_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1p2beta1-csharp", deps = [ - ":video_intelligence_go_gapic", - ":video_intelligence_go_gapic_srcjar-smoke-test.srcjar", - ":video_intelligence_go_gapic_srcjar-test.srcjar", - ":video_intelligence_go_proto", + ":videointelligence_csharp_gapic", + ":videointelligence_csharp_grpc", + ":videointelligence_csharp_proto", ], ) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/videointelligence/v1p2beta1/video_intelligence.proto b/google/cloud/videointelligence/v1p2beta1/video_intelligence.proto index 0a16e7afd..3b1d51cd7 100644 --- a/google/cloud/videointelligence/v1p2beta1/video_intelligence.proto +++ b/google/cloud/videointelligence/v1p2beta1/video_intelligence.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,8 @@ syntax = "proto3"; package google.cloud.videointelligence.v1p2beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -33,16 +35,23 @@ option ruby_package = "Google::Cloud::VideoIntelligence::V1p2beta1"; // Service that implements Google Cloud Video Intelligence API. service VideoIntelligenceService { + option (google.api.default_host) = "videointelligence.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Performs asynchronous video annotation. Progress and results can be // retrieved through the `google.longrunning.Operations` interface. // `Operation.metadata` contains `AnnotateVideoProgress` (progress). // `Operation.response` contains `AnnotateVideoResponse` (results). - rpc AnnotateVideo(AnnotateVideoRequest) - returns (google.longrunning.Operation) { + rpc AnnotateVideo(AnnotateVideoRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1p2beta1/videos:annotate" body: "*" }; + option (google.api.method_signature) = "input_uri,features"; + option (google.longrunning.operation_info) = { + response_type: "AnnotateVideoResponse" + metadata_type: "AnnotateVideoProgress" + }; } } @@ -52,10 +61,10 @@ message AnnotateVideoRequest { // [Google Cloud Storage](https://cloud.google.com/storage/) URIs are // supported, which must be specified in the following format: // `gs://bucket-id/object-id` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - // more information, see [Request URIs](/storage/docs/reference-uris). A video - // URI may include wildcards in `object-id`, and thus identify multiple - // videos. Supported wildcards: '*' to match 0 or more characters; + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + // [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + // A video URI may include wildcards in `object-id`, and thus identify + // multiple videos. Supported wildcards: '*' to match 0 or more characters; // '?' to match 1 character. If unset, the input video should be embedded // in the request as `input_content`. If set, `input_content` should be unset. string input_uri = 1; @@ -65,24 +74,24 @@ message AnnotateVideoRequest { // If set, `input_uri` should be unset. bytes input_content = 6; - // Requested video annotation features. - repeated Feature features = 2; + // Required. Requested video annotation features. + repeated Feature features = 2 [(google.api.field_behavior) = REQUIRED]; // Additional video context and/or feature-specific parameters. VideoContext video_context = 3; - // Optional location where the output (in JSON format) should be stored. + // Optional. Location where the output (in JSON format) should be stored. // Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) // URIs are supported, which must be specified in the following format: // `gs://bucket-id/object-id` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - // more information, see [Request URIs](/storage/docs/reference-uris). - string output_uri = 4; + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + // [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + string output_uri = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional cloud region where annotation should take place. Supported cloud + // Optional. Cloud region where annotation should take place. Supported cloud // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region // is specified, a region will be determined based on video file location. - string location_id = 5; + string location_id = 5 [(google.api.field_behavior) = OPTIONAL]; } // Video context and/or feature-specific parameters. diff --git a/google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.legacy.yaml b/google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.legacy.yaml new file mode 100644 index 000000000..c627a5d1c --- /dev/null +++ b/google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.legacy.yaml @@ -0,0 +1,63 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.videointelligence.v1p2beta1 + python: + package_name: google.cloud.videointelligence_v1p2beta1.gapic + go: + package_name: cloud.google.com/go/videointelligence/apiv1p2beta1 + csharp: + package_name: Google.Cloud.VideoIntelligence.V1P2Beta1 + ruby: + package_name: Google::Cloud::VideoIntelligence::V1p2beta1 + release_level: BETA + php: + package_name: Google\Cloud\VideoIntelligence\V1p2beta1 + nodejs: + package_name: video-intelligence.v1p2beta1 + domain_layer_location: google-cloud +interfaces: +- name: google.cloud.videointelligence.v1p2beta1.VideoIntelligenceService + smoke_test: + method: AnnotateVideo + init_fields: + - input_uri=gs://cloud-samples-data/video/cat.mp4 + - features[0]=LABEL_DETECTION + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 1000 + retry_delay_multiplier: 2.5 + max_retry_delay_millis: 120000 + initial_rpc_timeout_millis: 120000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 120000 + total_timeout_millis: 600000 + methods: + - name: AnnotateVideo + flattening: + groups: + - parameters: + - input_uri + - features + long_running: + return_type: google.cloud.videointelligence.v1p2beta1.AnnotateVideoResponse + metadata_type: google.cloud.videointelligence.v1p2beta1.AnnotateVideoProgress + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + sample_code_init_fields: + - input_uri=gs://cloud-samples-data/video/cat.mp4 + - features[0]=LABEL_DETECTION diff --git a/google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.yaml index c627a5d1c..5e040d7b8 100644 --- a/google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.yaml +++ b/google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.videointelligence.v1p2beta1 @@ -24,14 +24,6 @@ interfaces: init_fields: - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 1000 @@ -43,21 +35,13 @@ interfaces: total_timeout_millis: 600000 methods: - name: AnnotateVideo - flattening: - groups: - - parameters: - - input_uri - - features long_running: - return_type: google.cloud.videointelligence.v1p2beta1.AnnotateVideoResponse - metadata_type: google.cloud.videointelligence.v1p2beta1.AnnotateVideoProgress initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 sample_code_init_fields: - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION diff --git a/google/cloud/videointelligence/v1p2beta1/videointelligence_grpc_service_config.json b/google/cloud/videointelligence/v1p2beta1/videointelligence_grpc_service_config.json new file mode 100755 index 000000000..cdc6efce8 --- /dev/null +++ b/google/cloud/videointelligence/v1p2beta1/videointelligence_grpc_service_config.json @@ -0,0 +1,22 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.videointelligence.v1p2beta1.VideoIntelligenceService", + "method": "AnnotateVideo" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "1s", + "maxBackoff": "120s", + "backoffMultiplier": 2.5, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/videointelligence/v1p3beta1/BUILD.bazel b/google/cloud/videointelligence/v1p3beta1/BUILD.bazel index 17c796d5c..4adfac734 100644 --- a/google/cloud/videointelligence/v1p3beta1/BUILD.bazel +++ b/google/cloud/videointelligence/v1p3beta1/BUILD.bazel @@ -1,18 +1,23 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "video_intelligence_proto", + name = "videointelligence_proto", srcs = [ "video_intelligence.proto", ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/longrunning:operations_proto", "//google/rpc:status_proto", "@com_google_protobuf//:duration_proto", @@ -21,99 +26,86 @@ proto_library( ) proto_library_with_info( - name = "video_intelligence_proto_with_info", - deps = [":video_intelligence_proto"], + name = "videointelligence_proto_with_info", + deps = [ + ":videointelligence_proto", + "//google/cloud:common_resources_proto", + ], ) -# TODO: uncomment once https://github.com/googleapis/gapic-generator/issues/1149 is fixed ############################################################################## # Java ############################################################################## -#load( -# "@com_google_googleapis_imports//:imports.bzl", -# "java_grpc_library", -# "java_gapic_library", -# "java_gapic_assembly_gradle_pkg", -# "java_proto_library", -# "java_resource_name_proto_library", -# "java_test", -#) -# -#_JAVA_GRPC_DEPS = [ -# "@com_google_api_grpc_proto_google_common_protos//jar", -#] -# -#java_proto_library( -# name = "video_intelligence_java_proto", -# deps = [":video_intelligence_proto"], -#) -# -#java_grpc_library( -# name = "video_intelligence_java_grpc", -# srcs = [":video_intelligence_proto"], -# deps = [":video_intelligence_java_proto"] + _JAVA_GRPC_DEPS, -#) -# -#java_resource_name_proto_library( -# name = "video_intelligence_resource_name_java_proto", -# gapic_yaml = "videointelligence_gapic.yaml", -# deps = [":video_intelligence_proto"], -#) -# -#java_gapic_library( -# name = "video_intelligence_java_gapic", -# src = ":video_intelligence_proto_with_info", -# gapic_yaml = "videointelligence_gapic.yaml", -# service_yaml = "//google/cloud/videointelligence:videointelligence_v1p3beta1.yaml", -# test_deps = [":video_intelligence_java_grpc"], -# deps = [ -# ":video_intelligence_java_proto", -# ":video_intelligence_resource_name_java_proto", -# ] + _JAVA_GRPC_DEPS, -#) -# -#[java_test( -# name = test_name, -# test_class = test_name, -# runtime_deps = [ -# ":video_intelligence_java_gapic_test", -# ], -#) for test_name in [ -# "com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceClientTest", -#]] - -## Opensource Packages -#java_gapic_assembly_gradle_pkg( -# name = "google-cloud-video-intelligence-v1p3beta1-java", -# client_deps = [":video_intelligence_java_gapic"], -# client_group = "com.google.cloud", -# client_test_deps = [":video_intelligence_java_gapic_test"], -# grpc_deps = [":video_intelligence_java_grpc"], -# grpc_group = "com.google.api.grpc", -# proto_deps = [ -# ":video_intelligence_java_proto", -# ":video_intelligence_proto", -# ":video_intelligence_resource_name_java_proto", -# ] + _JAVA_GRPC_DEPS, -# version = "0.0.0-SNAPSHOT", -#) +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "videointelligence_java_proto", + deps = [":videointelligence_proto"], +) + +java_grpc_library( + name = "videointelligence_java_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_java_proto"], +) + +java_gapic_library( + name = "videointelligence_java_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p3beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p3beta1.yaml", + test_deps = [ + ":videointelligence_java_grpc", + ], + deps = [ + ":videointelligence_java_proto", + ], +) + +java_gapic_test( + name = "videointelligence_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceServiceClientTest", + "com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceClientTest", + ], + runtime_deps = [":videointelligence_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-videointelligence-v1p3beta1-java", + deps = [ + ":videointelligence_java_gapic", + ":videointelligence_java_grpc", + ":videointelligence_java_proto", + ":videointelligence_proto", + ], +) ############################################################################## # Go ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "video_intelligence_go_proto", + name = "videointelligence_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1p3beta1", - protos = [":video_intelligence_proto"], + protos = [":videointelligence_proto"], deps = [ "//google/api:annotations_go_proto", "//google/longrunning:longrunning_go_proto", @@ -122,33 +114,257 @@ go_proto_library( ) go_gapic_library( - name = "video_intelligence_go_gapic", - src = ":video_intelligence_proto_with_info", - gapic_yaml = "videointelligence_gapic.yaml", - importpath = "cloud.google.com/go/videointelligence/apiv1p3beta1", + name = "videointelligence_go_gapic", + srcs = [":videointelligence_proto_with_info"], + grpc_service_config = "videointelligence_grpc_service_config.json", + importpath = "cloud.google.com/go/videointelligence/apiv1p3beta1;videointelligence", service_yaml = "//google/cloud/videointelligence:videointelligence_v1p3beta1.yaml", deps = [ - ":video_intelligence_go_proto", + ":videointelligence_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", ], ) go_test( - name = "video_intelligence_go_gapic_test", - srcs = [":video_intelligence_go_gapic_srcjar_test"], - embed = [":video_intelligence_go_gapic"], + name = "videointelligence_go_gapic_test", + srcs = [":videointelligence_go_gapic_srcjar_test"], + embed = [":videointelligence_go_gapic"], importpath = "cloud.google.com/go/videointelligence/apiv1p3beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-video-intelligence-v1p3beta1-go", + name = "gapi-cloud-videointelligence-v1p3beta1-go", + deps = [ + ":videointelligence_go_gapic", + ":videointelligence_go_gapic_srcjar-test.srcjar", + ":videointelligence_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "videointelligence_moved_proto", + srcs = [":videointelligence_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "videointelligence_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":videointelligence_moved_proto"], +) + +py_grpc_library( + name = "videointelligence_py_grpc", + srcs = [":videointelligence_moved_proto"], + deps = [":videointelligence_py_proto"], +) + +py_gapic_library( + name = "videointelligence_py_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p3beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p3beta1.yaml", + deps = [ + ":videointelligence_py_grpc", + ":videointelligence_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "videointelligence-v1p3beta1-py", + deps = [ + ":videointelligence_py_gapic", + ":videointelligence_py_grpc", + ":videointelligence_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "videointelligence_php_proto", + deps = [":videointelligence_proto"], +) + +php_grpc_library( + name = "videointelligence_php_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_php_proto"], +) + +php_gapic_library( + name = "videointelligence_php_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p3beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p3beta1.yaml", + deps = [ + ":videointelligence_php_grpc", + ":videointelligence_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1p3beta1-php", + deps = [ + ":videointelligence_php_gapic", + ":videointelligence_php_grpc", + ":videointelligence_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "videointelligence_nodejs_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p3beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p3beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "videointelligence-v1p3beta1-nodejs", + deps = [ + ":videointelligence_nodejs_gapic", + ":videointelligence_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "videointelligence_ruby_proto", + deps = [":videointelligence_proto"], +) + +ruby_grpc_library( + name = "videointelligence_ruby_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_ruby_proto"], +) + +ruby_gapic_library( + name = "videointelligence_ruby_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p3beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p3beta1.yaml", + deps = [ + ":videointelligence_ruby_grpc", + ":videointelligence_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1p3beta1-ruby", + deps = [ + ":videointelligence_ruby_gapic", + ":videointelligence_ruby_grpc", + ":videointelligence_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "videointelligence_csharp_proto", + deps = [":videointelligence_proto"], +) + +csharp_grpc_library( + name = "videointelligence_csharp_grpc", + srcs = [":videointelligence_proto"], + deps = [":videointelligence_csharp_proto"], +) + +csharp_gapic_library( + name = "videointelligence_csharp_gapic", + src = ":videointelligence_proto_with_info", + gapic_yaml = "videointelligence_gapic.yaml", + package = "google.cloud.videointelligence.v1p3beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p3beta1.yaml", + deps = [ + ":videointelligence_csharp_grpc", + ":videointelligence_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-videointelligence-v1p3beta1-csharp", deps = [ - ":video_intelligence_go_gapic", - ":video_intelligence_go_gapic_srcjar-smoke-test.srcjar", - ":video_intelligence_go_gapic_srcjar-test.srcjar", - ":video_intelligence_go_proto", + ":videointelligence_csharp_gapic", + ":videointelligence_csharp_grpc", + ":videointelligence_csharp_proto", ], ) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto b/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto index e37726e0b..6284e0db3 100644 --- a/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto +++ b/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.videointelligence.v1p3beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -29,10 +30,13 @@ option java_multiple_files = true; option java_outer_classname = "VideoIntelligenceServiceProto"; option java_package = "com.google.cloud.videointelligence.v1p3beta1"; option php_namespace = "Google\\Cloud\\VideoIntelligence\\V1p3beta1"; -option ruby_package = "Google::Cloud::VideoIntelligence::V1p3beta1"; -// Service that implements Google Cloud Video Intelligence API. +// Service that implements the Video Intelligence API. service VideoIntelligenceService { + option (google.api.default_host) = "videointelligence.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + // Performs asynchronous video annotation. Progress and results can be // retrieved through the `google.longrunning.Operations` interface. // `Operation.metadata` contains `AnnotateVideoProgress` (progress). @@ -43,55 +47,67 @@ service VideoIntelligenceService { post: "/v1p3beta1/videos:annotate" body: "*" }; + option (google.api.method_signature) = "input_uri,features"; + option (google.longrunning.operation_info) = { + response_type: "AnnotateVideoResponse" + metadata_type: "AnnotateVideoProgress" + }; } } -// Service that implements Google Cloud Video Intelligence Streaming API. +// Service that implements streaming Video Intelligence API. service StreamingVideoIntelligenceService { + option (google.api.default_host) = "videointelligence.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + // Performs video annotation with bidirectional streaming: emitting results // while sending video/audio bytes. // This method is only available via the gRPC API (not REST). rpc StreamingAnnotateVideo(stream StreamingAnnotateVideoRequest) - returns (stream StreamingAnnotateVideoResponse); + returns (stream StreamingAnnotateVideoResponse) {} } // Video annotation request. message AnnotateVideoRequest { // Input video location. Currently, only - // [Google Cloud Storage](https://cloud.google.com/storage/) URIs are - // supported, which must be specified in the following format: + // [Cloud Storage](https://cloud.google.com/storage/) URIs are + // supported. URIs must be specified in the following format: // `gs://bucket-id/object-id` (other URI formats return // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - // more information, see [Request URIs](/storage/docs/reference-uris). A video - // URI may include wildcards in `object-id`, and thus identify multiple - // videos. Supported wildcards: '*' to match 0 or more characters; + // more information, see [Request + // URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify + // multiple videos, a video URI may include wildcards in the `object-id`. + // Supported wildcards: '*' to match 0 or more characters; // '?' to match 1 character. If unset, the input video should be embedded - // in the request as `input_content`. If set, `input_content` should be unset. + // in the request as `input_content`. If set, `input_content` must be unset. string input_uri = 1; // The video data bytes. - // If unset, the input video(s) should be specified via `input_uri`. - // If set, `input_uri` should be unset. + // If unset, the input video(s) should be specified via the `input_uri`. + // If set, `input_uri` must be unset. bytes input_content = 6; - // Requested video annotation features. - repeated Feature features = 2; + // Required. Requested video annotation features. + repeated Feature features = 2 [(google.api.field_behavior) = REQUIRED]; // Additional video context and/or feature-specific parameters. VideoContext video_context = 3; - // Optional location where the output (in JSON format) should be stored. - // Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) - // URIs are supported, which must be specified in the following format: + // Optional. Location where the output (in JSON format) should be stored. + // Currently, only [Cloud Storage](https://cloud.google.com/storage/) + // URIs are supported. These must be specified in the following format: // `gs://bucket-id/object-id` (other URI formats return // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - // more information, see [Request URIs](/storage/docs/reference-uris). - string output_uri = 4; - - // Optional cloud region where annotation should take place. Supported cloud - // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region - // is specified, a region will be determined based on video file location. - string location_id = 5; + // more information, see [Request + // URIs](https://cloud.google.com/storage/docs/request-endpoints). + string output_uri = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud region where annotation should take place. Supported cloud + // regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no + // region is specified, the region will be determined based on video file + // location. + string location_id = 5 [(google.api.field_behavior) = OPTIONAL]; } // Video context and/or feature-specific parameters. @@ -110,16 +126,58 @@ message VideoContext { // Config for EXPLICIT_CONTENT_DETECTION. ExplicitContentDetectionConfig explicit_content_detection_config = 4; + // Config for FACE_DETECTION. + FaceDetectionConfig face_detection_config = 5; + // Config for SPEECH_TRANSCRIPTION. SpeechTranscriptionConfig speech_transcription_config = 6; // Config for TEXT_DETECTION. TextDetectionConfig text_detection_config = 8; + // Config for PERSON_DETECTION. + PersonDetectionConfig person_detection_config = 11; + // Config for OBJECT_TRACKING. ObjectTrackingConfig object_tracking_config = 13; } +// Label detection mode. +enum LabelDetectionMode { + // Unspecified. + LABEL_DETECTION_MODE_UNSPECIFIED = 0; + + // Detect shot-level labels. + SHOT_MODE = 1; + + // Detect frame-level labels. + FRAME_MODE = 2; + + // Detect both shot-level and frame-level labels. + SHOT_AND_FRAME_MODE = 3; +} + +// Bucketized representation of likelihood. +enum Likelihood { + // Unspecified likelihood. + LIKELIHOOD_UNSPECIFIED = 0; + + // Very unlikely. + VERY_UNLIKELY = 1; + + // Unlikely. + UNLIKELY = 2; + + // Possible. + POSSIBLE = 3; + + // Likely. + LIKELY = 4; + + // Very likely. + VERY_LIKELY = 5; +} + // Config for LABEL_DETECTION. message LabelDetectionConfig { // What labels should be detected with LABEL_DETECTION, in addition to @@ -127,9 +185,9 @@ message LabelDetectionConfig { // If unspecified, defaults to `SHOT_MODE`. LabelDetectionMode label_detection_mode = 1; - // Whether the video has been shot from a stationary (i.e. non-moving) camera. - // When set to true, might improve detection accuracy for moving objects. - // Should be used with `SHOT_AND_FRAME_MODE` enabled. + // Whether the video has been shot from a stationary (i.e., non-moving) + // camera. When set to true, might improve detection accuracy for moving + // objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. bool stationary_camera = 2; // Model to use for label detection. @@ -141,19 +199,82 @@ message LabelDetectionConfig { // frame-level detection. If not set, it is set to 0.4 by default. The valid // range for this threshold is [0.1, 0.9]. Any value set outside of this // range will be clipped. - // Note: for best results please follow the default threshold. We will update + // Note: For best results, follow the default threshold. We will update // the default threshold everytime when we release a new model. float frame_confidence_threshold = 4; // The confidence threshold we perform filtering on the labels from - // video-level and shot-level detections. If not set, it is set to 0.3 by + // video-level and shot-level detections. If not set, it's set to 0.3 by // default. The valid range for this threshold is [0.1, 0.9]. Any value set // outside of this range will be clipped. - // Note: for best results please follow the default threshold. We will update + // Note: For best results, follow the default threshold. We will update // the default threshold everytime when we release a new model. float video_confidence_threshold = 5; } +// Streaming video annotation feature. +enum StreamingFeature { + // Unspecified. + STREAMING_FEATURE_UNSPECIFIED = 0; + + // Label detection. Detect objects, such as dog or flower. + STREAMING_LABEL_DETECTION = 1; + + // Shot change detection. + STREAMING_SHOT_CHANGE_DETECTION = 2; + + // Explicit content detection. + STREAMING_EXPLICIT_CONTENT_DETECTION = 3; + + // Object detection and tracking. + STREAMING_OBJECT_TRACKING = 4; + + // Action recognition based on AutoML model. + STREAMING_AUTOML_ACTION_RECOGNITION = 23; + + // Video classification based on AutoML model. + STREAMING_AUTOML_CLASSIFICATION = 21; + + // Object detection and tracking based on AutoML model. + STREAMING_AUTOML_OBJECT_TRACKING = 22; +} + +// Video annotation feature. +enum Feature { + // Unspecified. + FEATURE_UNSPECIFIED = 0; + + // Label detection. Detect objects, such as dog or flower. + LABEL_DETECTION = 1; + + // Shot change detection. + SHOT_CHANGE_DETECTION = 2; + + // Explicit content detection. + EXPLICIT_CONTENT_DETECTION = 3; + + // Human face detection. + FACE_DETECTION = 4; + + // Speech transcription. + SPEECH_TRANSCRIPTION = 6; + + // OCR text detection and tracking. + TEXT_DETECTION = 7; + + // Object detection and tracking. + OBJECT_TRACKING = 9; + + // Logo detection, tracking, and recognition. + LOGO_RECOGNITION = 12; + + // Celebrity recognition. + CELEBRITY_RECOGNITION = 13; + + // Person detection. + PERSON_DETECTION = 14; +} + // Config for SHOT_CHANGE_DETECTION. message ShotChangeDetectionConfig { // Model to use for shot change detection. @@ -178,6 +299,38 @@ message ExplicitContentDetectionConfig { string model = 1; } +// Config for FACE_DETECTION. +message FaceDetectionConfig { + // Model to use for face detection. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". + string model = 1; + + // Whether bounding boxes are included in the face annotation output. + bool include_bounding_boxes = 2; + + // Whether to enable face attributes detection, such as glasses, dark_glasses, + // mouth_open etc. Ignored if 'include_bounding_boxes' is set to false. + bool include_attributes = 5; +} + +// Config for PERSON_DETECTION. +message PersonDetectionConfig { + // Whether bounding boxes are included in the person detection annotation + // output. + bool include_bounding_boxes = 1; + + // Whether to enable pose landmarks detection. Ignored if + // 'include_bounding_boxes' is set to false. + bool include_pose_landmarks = 2; + + // Whether to enable person attributes detection, such as cloth color (black, + // blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, + // etc. + // Ignored if 'include_bounding_boxes' is set to false. + bool include_attributes = 3; +} + // Config for TEXT_DETECTION. message TextDetectionConfig { // Language hint can be specified if the language to be detected is known a @@ -230,7 +383,7 @@ message Entity { // API](https://developers.google.com/knowledge-graph/). string entity_id = 1; - // Textual description, e.g. `Fixed-gear bicycle`. + // Textual description, e.g., `Fixed-gear bicycle`. string description = 2; // Language code for `description` in BCP-47 format. @@ -243,9 +396,9 @@ message LabelAnnotation { Entity entity = 1; // Common categories for the detected entity. - // E.g. when the label is `Terrier` the category is likely `dog`. And in some - // cases there might be more than one categories e.g. `Terrier` could also be - // a `pet`. + // For example, when the label is `Terrier`, the category is likely `dog`. And + // in some cases there might be more than one categories e.g., `Terrier` could + // also be a `pet`. repeated Entity category_entities = 2; // All video segments where a label was detected. @@ -290,8 +443,7 @@ message NormalizedBoundingBox { float bottom = 4; } -// For tracking related features, such as LOGO_RECOGNITION, FACE_DETECTION, -// CELEBRITY_RECOGNITION, PERSON_DETECTION. +// For tracking related features. // An object at time_offset with attributes, and located with // normalized_bounding_box. message TimestampedObject { @@ -303,7 +455,12 @@ message TimestampedObject { google.protobuf.Duration time_offset = 2; // Optional. The attributes of the object in the bounding box. - repeated DetectedAttribute attributes = 3; + repeated DetectedAttribute attributes = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The detected landmarks. + repeated DetectedLandmark landmarks = 4 + [(google.api.field_behavior) = OPTIONAL]; } // A track of an object instance. @@ -315,15 +472,16 @@ message Track { repeated TimestampedObject timestamped_objects = 2; // Optional. Attributes in the track level. - repeated DetectedAttribute attributes = 3; + repeated DetectedAttribute attributes = 3 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The confidence score of the tracked object. - float confidence = 4; + float confidence = 4 [(google.api.field_behavior) = OPTIONAL]; } // A generic detected attribute represented by name in string format. message DetectedAttribute { - // The name of the attribute, i.e. glasses, dark_glasses, mouth_open etc. + // The name of the attribute, for example, glasses, dark_glasses, mouth_open. // A full list of supported type names will be provided in the document. string name = 1; @@ -335,24 +493,116 @@ message DetectedAttribute { string value = 3; } +// Celebrity definition. +message Celebrity { + // The resource name of the celebrity. Have the format + // `video-intelligence/kg-mid` indicates a celebrity from preloaded gallery. + // kg-mid is the id in Google knowledge graph, which is unique for the + // celebrity. + string name = 1; + + // The celebrity name. + string display_name = 2; + + // Textual description of additional information about the celebrity, if + // applicable. + string description = 3; +} + +// The annotation result of a celebrity face track. RecognizedCelebrity field +// could be empty if the face track does not have any matched celebrities. +message CelebrityTrack { + // The recognized celebrity with confidence score. + message RecognizedCelebrity { + // The recognized celebrity. + Celebrity celebrity = 1; + + // Recognition confidence. Range [0, 1]. + float confidence = 2; + } + + // Top N match of the celebrities for the face in this track. + repeated RecognizedCelebrity celebrities = 1; + + // A track of a person's face. + Track face_track = 3; +} + +// Celebrity recognition annotation per video. +message CelebrityRecognitionAnnotation { + // The tracks detected from the input video, including recognized celebrities + // and other detected faces in the video. + repeated CelebrityTrack celebrity_tracks = 1; +} + +// A generic detected landmark represented by name in string format and a 2D +// location. +message DetectedLandmark { + // The name of this landmark, for example, left_hand, right_shoulder. + string name = 1; + + // The 2D point of the detected landmark using the normalized image + // coordindate system. The normalized coordinates have the range from 0 to 1. + NormalizedVertex point = 2; + + // The confidence score of the detected landmark. Range [0, 1]. + float confidence = 3; +} + +// Face detection annotation. +message FaceDetectionAnnotation { + // The face tracks with attributes. + repeated Track tracks = 3; + + // The thumbnail of a person's face. + bytes thumbnail = 4; +} + +// Person detection annotation per video. +message PersonDetectionAnnotation { + // The detected tracks of a person. + repeated Track tracks = 1; +} + // Annotation results for a single video. message VideoAnnotationResults { // Video file location in - // [Google Cloud Storage](https://cloud.google.com/storage/). + // [Cloud Storage](https://cloud.google.com/storage/). string input_uri = 1; - // Label annotations on video level or user specified segment level. + // Video segment on which the annotation is run. + VideoSegment segment = 10; + + // Topical label annotations on video level or user-specified segment level. // There is exactly one element for each unique label. repeated LabelAnnotation segment_label_annotations = 2; - // Label annotations on shot level. + // Presence label annotations on video level or user-specified segment level. + // There is exactly one element for each unique label. Compared to the + // existing topical `segment_label_annotations`, this field presents more + // fine-grained, segment-level labels detected in video content and is made + // available only when the client sets `LabelDetectionConfig.model` to + // "builtin/latest" in the request. + repeated LabelAnnotation segment_presence_label_annotations = 23; + + // Topical label annotations on shot level. // There is exactly one element for each unique label. repeated LabelAnnotation shot_label_annotations = 3; + // Presence label annotations on shot level. There is exactly one element for + // each unique label. Compared to the existing topical + // `shot_label_annotations`, this field presents more fine-grained, shot-level + // labels detected in video content and is made available only when the client + // sets `LabelDetectionConfig.model` to "builtin/latest" in the request. + repeated LabelAnnotation shot_presence_label_annotations = 24; + // Label annotations on frame level. // There is exactly one element for each unique label. repeated LabelAnnotation frame_label_annotations = 4; + // Face detection annotations. + repeated FaceDetectionAnnotation face_detection_annotations = 13; + // Shot annotations. Each shot is represented as a video segment. repeated VideoSegment shot_annotations = 6; @@ -373,6 +623,12 @@ message VideoAnnotationResults { // Annotations for list of logos detected, tracked and recognized in video. repeated LogoRecognitionAnnotation logo_recognition_annotations = 19; + // Person detection annotations. + repeated PersonDetectionAnnotation person_detection_annotations = 20; + + // Celebrity recognition annotations. + CelebrityRecognitionAnnotation celebrity_recognition_annotations = 21; + // If set, indicates an error. Note that for a single `AnnotateVideoRequest` // some videos may succeed and some may fail. google.rpc.Status error = 9; @@ -389,7 +645,7 @@ message AnnotateVideoResponse { // Annotation progress for a single video. message VideoAnnotationProgress { // Video file location in - // [Google Cloud Storage](https://cloud.google.com/storage/). + // [Cloud Storage](https://cloud.google.com/storage/). string input_uri = 1; // Approximate percentage processed thus far. Guaranteed to be @@ -401,6 +657,14 @@ message VideoAnnotationProgress { // Time of the most recent update. google.protobuf.Timestamp update_time = 4; + + // Specifies which feature is being tracked if the request contains more than + // one feature. + Feature feature = 5; + + // Specifies which segment is being tracked if the request contains more than + // one segment. + VideoSegment segment = 6; } // Video annotation progress. Included in the `metadata` @@ -413,72 +677,73 @@ message AnnotateVideoProgress { // Config for SPEECH_TRANSCRIPTION. message SpeechTranscriptionConfig { - // *Required* The language of the supplied audio as a + // Required. *Required* The language of the supplied audio as a // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. // Example: "en-US". // See [Language Support](https://cloud.google.com/speech/docs/languages) // for a list of the currently supported language codes. - string language_code = 1; + string language_code = 1 [(google.api.field_behavior) = REQUIRED]; - // *Optional* Maximum number of recognition hypotheses to be returned. + // Optional. Maximum number of recognition hypotheses to be returned. // Specifically, the maximum number of `SpeechRecognitionAlternative` messages // within each `SpeechTranscription`. The server may return fewer than // `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will // return a maximum of one. If omitted, will return a maximum of one. - int32 max_alternatives = 2; + int32 max_alternatives = 2 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* If set to `true`, the server will attempt to filter out + // Optional. If set to `true`, the server will attempt to filter out // profanities, replacing all but the initial character in each filtered word // with asterisks, e.g. "f***". If set to `false` or omitted, profanities // won't be filtered out. - bool filter_profanity = 3; + bool filter_profanity = 3 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* A means to provide context to assist the speech recognition. - repeated SpeechContext speech_contexts = 4; + // Optional. A means to provide context to assist the speech recognition. + repeated SpeechContext speech_contexts = 4 + [(google.api.field_behavior) = OPTIONAL]; - // *Optional* If 'true', adds punctuation to recognition result hypotheses. + // Optional. If 'true', adds punctuation to recognition result hypotheses. // This feature is only available in select languages. Setting this for // requests in other languages has no effect at all. The default 'false' value // does not add punctuation to result hypotheses. NOTE: "This is currently // offered as an experimental service, complimentary to all users. In the // future this may be exclusively available as a premium feature." - bool enable_automatic_punctuation = 5; + bool enable_automatic_punctuation = 5 + [(google.api.field_behavior) = OPTIONAL]; - // *Optional* For file formats, such as MXF or MKV, supporting multiple audio + // Optional. For file formats, such as MXF or MKV, supporting multiple audio // tracks, specify up to two tracks. Default: track 0. - repeated int32 audio_tracks = 6; + repeated int32 audio_tracks = 6 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* If 'true', enables speaker detection for each recognized word in + // Optional. If 'true', enables speaker detection for each recognized word in // the top alternative of the recognition result using a speaker_tag provided // in the WordInfo. // Note: When this is true, we send all the words from the beginning of the - // audio for the top alternative in every consecutive responses. + // audio for the top alternative in every consecutive response. // This is done in order to improve our speaker tags as our models learn to // identify the speakers in the conversation over time. - bool enable_speaker_diarization = 7; + bool enable_speaker_diarization = 7 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* - // If set, specifies the estimated number of speakers in the conversation. - // If not set, defaults to '2'. - // Ignored unless enable_speaker_diarization is set to true. - int32 diarization_speaker_count = 8; + // Optional. If set, specifies the estimated number of speakers in the + // conversation. If not set, defaults to '2'. Ignored unless + // enable_speaker_diarization is set to true. + int32 diarization_speaker_count = 8 [(google.api.field_behavior) = OPTIONAL]; - // *Optional* If `true`, the top result includes a list of words and the + // Optional. If `true`, the top result includes a list of words and the // confidence for those words. If `false`, no word-level confidence // information is returned. The default is `false`. - bool enable_word_confidence = 9; + bool enable_word_confidence = 9 [(google.api.field_behavior) = OPTIONAL]; } // Provides "hints" to the speech recognizer to favor specific words and phrases // in the results. message SpeechContext { - // *Optional* A list of strings containing words and phrases "hints" so that + // Optional. A list of strings containing words and phrases "hints" so that // the speech recognition is more likely to recognize them. This can be used // to improve the accuracy for specific words and phrases, for example, if // specific commands are typically spoken by the user. This can also be used // to add additional words to the vocabulary of the recognizer. See // [usage limits](https://cloud.google.com/speech/limits#content). - repeated string phrases = 1; + repeated string phrases = 1 [(google.api.field_behavior) = OPTIONAL]; } // A speech recognition result corresponding to a portion of the audio. @@ -489,11 +754,10 @@ message SpeechTranscription { // ranked by the recognizer. repeated SpeechRecognitionAlternative alternatives = 1; - // Output only. The - // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the - // language in this result. This language code was detected to have the most - // likelihood of being spoken in the audio. - string language_code = 2; + // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + // language tag of the language in this result. This language code was + // detected to have the most likelihood of being spoken in the audio. + string language_code = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Alternative hypotheses (a.k.a. n-best list). @@ -501,16 +765,18 @@ message SpeechRecognitionAlternative { // Transcript text representing the words that the user spoke. string transcript = 1; - // The confidence estimate between 0.0 and 1.0. A higher number + // Output only. The confidence estimate between 0.0 and 1.0. A higher number // indicates an estimated greater likelihood that the recognized words are - // correct. This field is typically provided only for the top hypothesis, and - // only for `is_final=true` results. Clients should not rely on the - // `confidence` field as it is not guaranteed to be accurate or consistent. + // correct. This field is set only for the top alternative. + // This field is not guaranteed to be accurate and users should not rely on it + // to be always provided. // The default of 0.0 is a sentinel value indicating `confidence` was not set. - float confidence = 2; + float confidence = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A list of word-specific information for each recognized word. - repeated WordInfo words = 3; + // Output only. A list of word-specific information for each recognized word. + // Note: When `enable_speaker_diarization` is set to true, you will see all + // the words from the beginning of the audio. + repeated WordInfo words = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Word-specific information for recognized words. Word information is only @@ -538,13 +804,13 @@ message WordInfo { // This field is not guaranteed to be accurate and users should not rely on it // to be always provided. // The default of 0.0 is a sentinel value indicating `confidence` was not set. - float confidence = 4; + float confidence = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A distinct integer value is assigned for every speaker within // the audio. This field specifies which one of those speakers was detected to // have spoken this word. Value ranges from 1 up to diarization_speaker_count, // and is only set if speaker diarization is enabled. - int32 speaker_tag = 5; + int32 speaker_tag = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A vertex represents a 2D point in the image. @@ -627,24 +893,13 @@ message ObjectTrackingFrame { // Annotations corresponding to one tracked object. message ObjectTrackingAnnotation { - // Entity to specify the object category that this track is labeled as. - Entity entity = 1; - - // Object category's labeling confidence of this track. - float confidence = 4; - - // Information corresponding to all frames where this object track appears. - // Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame - // messages in frames. - // Streaming mode: it can only be one ObjectTrackingFrame message in frames. - repeated ObjectTrackingFrame frames = 2; - // Different representation of tracking info in non-streaming batch // and streaming modes. oneof track_info { // Non-streaming batch mode ONLY. // Each object track corresponds to one video segment where it appears. VideoSegment segment = 3; + // Streaming mode ONLY. // In streaming mode, we do not know the end time of a tracked object // before it is completed. Hence, there is no VideoSegment info returned. @@ -653,6 +908,18 @@ message ObjectTrackingAnnotation { // ObjectTrackAnnotation of the same track_id over time. int64 track_id = 5; } + + // Entity to specify the object category that this track is labeled as. + Entity entity = 1; + + // Object category's labeling confidence of this track. + float confidence = 4; + + // Information corresponding to all frames where this object track appears. + // Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame + // messages in frames. + // Streaming mode: it can only be one ObjectTrackingFrame message in frames. + repeated ObjectTrackingFrame frames = 2; } // Annotation corresponding to one detected, tracked and recognized logo class. @@ -694,101 +961,9 @@ message StreamingAnnotateVideoRequest { } } -// `StreamingAnnotateVideoResponse` is the only message returned to the client -// by `StreamingAnnotateVideo`. A series of zero or more -// `StreamingAnnotateVideoResponse` messages are streamed back to the client. -message StreamingAnnotateVideoResponse { - // If set, returns a [google.rpc.Status][google.rpc.Status] message that - // specifies the error for the operation. - google.rpc.Status error = 1; - - // Streaming annotation results. - StreamingVideoAnnotationResults annotation_results = 2; - - // GCS URI that stores annotation results of one streaming session. - // It is a directory that can hold multiple files in JSON format. - // Example uri format: - // gs://bucket_id/object_id/cloud_project_name-session_id - string annotation_results_uri = 3; -} - -// Config for AUTOML_CLASSIFICATION in streaming mode. -message StreamingAutomlClassificationConfig { - // Resource name of AutoML model. - // Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` - string model_name = 1; -} - -// Config for AUTOML_OBJECT_TRACKING in streaming mode. -message StreamingAutomlObjectTrackingConfig { - // Resource name of AutoML model. - // Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` - string model_name = 1; -} - -// Config for EXPLICIT_CONTENT_DETECTION in streaming mode. -message StreamingExplicitContentDetectionConfig { - // No customized config support. -} - -// Config for LABEL_DETECTION in streaming mode. -message StreamingLabelDetectionConfig { - // Whether the video has been captured from a stationary (i.e. non-moving) - // camera. When set to true, might improve detection accuracy for moving - // objects. Default: false. - bool stationary_camera = 1; -} - -// Config for STREAMING_OBJECT_TRACKING. -message StreamingObjectTrackingConfig { - // No customized config support. -} - -// Config for SHOT_CHANGE_DETECTION in streaming mode. -message StreamingShotChangeDetectionConfig { - // No customized config support. -} - -// Config for streaming storage option. -message StreamingStorageConfig { - // Enable streaming storage. Default: false. - bool enable_storage_annotation_result = 1; - - // GCS URI to store all annotation results for one client. Client should - // specify this field as the top-level storage directory. Annotation results - // of different sessions will be put into different sub-directories denoted - // by project_name and session_id. All sub-directories will be auto generated - // by program and will be made accessible to client in response proto. - // URIs must be specified in the following format: `gs://bucket-id/object-id` - // `bucket-id` should be a valid GCS bucket created by client and bucket - // permission shall also be configured properly. `object-id` can be arbitrary - // string that make sense to client. Other URI formats will return error and - // cause GCS write failure. - string annotation_result_storage_directory = 3; -} - -// Streaming annotation results corresponding to a portion of the video -// that is currently being processed. -message StreamingVideoAnnotationResults { - // Shot annotation results. Each shot is represented as a video segment. - repeated VideoSegment shot_annotations = 1; - - // Label annotation results. - repeated LabelAnnotation label_annotations = 2; - - // Explicit content annotation results. - ExplicitContentAnnotation explicit_annotation = 3; - - // Object tracking results. - repeated ObjectTrackingAnnotation object_annotations = 4; -} - // Provides information to the annotator that specifies how to process the // request. message StreamingVideoConfig { - // Requested annotation feature. - StreamingFeature feature = 1; - // Config for requested annotation feature. oneof streaming_config { // Config for STREAMING_SHOT_CHANGE_DETECTION. @@ -804,6 +979,10 @@ message StreamingVideoConfig { // Config for STREAMING_OBJECT_TRACKING. StreamingObjectTrackingConfig object_tracking_config = 5; + // Config for STREAMING_AUTOML_ACTION_RECOGNITION. + StreamingAutomlActionRecognitionConfig automl_action_recognition_config = + 23; + // Config for STREAMING_AUTOML_CLASSIFICATION. StreamingAutomlClassificationConfig automl_classification_config = 21; @@ -811,87 +990,100 @@ message StreamingVideoConfig { StreamingAutomlObjectTrackingConfig automl_object_tracking_config = 22; } + // Requested annotation feature. + StreamingFeature feature = 1; + // Streaming storage option. By default: storage is disabled. StreamingStorageConfig storage_config = 30; } -// Video annotation feature. -enum Feature { - // Unspecified. - FEATURE_UNSPECIFIED = 0; - - // Label detection. Detect objects, such as dog or flower. - LABEL_DETECTION = 1; +// `StreamingAnnotateVideoResponse` is the only message returned to the client +// by `StreamingAnnotateVideo`. A series of zero or more +// `StreamingAnnotateVideoResponse` messages are streamed back to the client. +message StreamingAnnotateVideoResponse { + // If set, returns a [google.rpc.Status][google.rpc.Status] message that + // specifies the error for the operation. + google.rpc.Status error = 1; - // Shot change detection. - SHOT_CHANGE_DETECTION = 2; + // Streaming annotation results. + StreamingVideoAnnotationResults annotation_results = 2; - // Explicit content detection. - EXPLICIT_CONTENT_DETECTION = 3; + // Google Cloud Storage(GCS) URI that stores annotation results of one + // streaming session in JSON format. + // It is the annotation_result_storage_directory + // from the request followed by '/cloud_project_number-session_id'. + string annotation_results_uri = 3; +} - // Speech transcription. - SPEECH_TRANSCRIPTION = 6; +// Streaming annotation results corresponding to a portion of the video +// that is currently being processed. +message StreamingVideoAnnotationResults { + // Shot annotation results. Each shot is represented as a video segment. + repeated VideoSegment shot_annotations = 1; - // OCR text detection and tracking. - TEXT_DETECTION = 7; + // Label annotation results. + repeated LabelAnnotation label_annotations = 2; - // Object detection and tracking. - OBJECT_TRACKING = 9; + // Explicit content annotation results. + ExplicitContentAnnotation explicit_annotation = 3; - // Logo detection, tracking, and recognition. - LOGO_RECOGNITION = 12; + // Object tracking results. + repeated ObjectTrackingAnnotation object_annotations = 4; } -// Label detection mode. -enum LabelDetectionMode { - // Unspecified. - LABEL_DETECTION_MODE_UNSPECIFIED = 0; - - // Detect shot-level labels. - SHOT_MODE = 1; +// Config for STREAMING_SHOT_CHANGE_DETECTION. +message StreamingShotChangeDetectionConfig {} - // Detect frame-level labels. - FRAME_MODE = 2; - - // Detect both shot-level and frame-level labels. - SHOT_AND_FRAME_MODE = 3; +// Config for STREAMING_LABEL_DETECTION. +message StreamingLabelDetectionConfig { + // Whether the video has been captured from a stationary (i.e. non-moving) + // camera. When set to true, might improve detection accuracy for moving + // objects. Default: false. + bool stationary_camera = 1; } -// Bucketized representation of likelihood. -enum Likelihood { - // Unspecified likelihood. - LIKELIHOOD_UNSPECIFIED = 0; - - // Very unlikely. - VERY_UNLIKELY = 1; +// Config for STREAMING_EXPLICIT_CONTENT_DETECTION. +message StreamingExplicitContentDetectionConfig {} - // Unlikely. - UNLIKELY = 2; +// Config for STREAMING_OBJECT_TRACKING. +message StreamingObjectTrackingConfig {} - // Possible. - POSSIBLE = 3; +// Config for STREAMING_AUTOML_ACTION_RECOGNITION. +message StreamingAutomlActionRecognitionConfig { + // Resource name of AutoML model. + // Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` + string model_name = 1; +} - // Likely. - LIKELY = 4; +// Config for STREAMING_AUTOML_CLASSIFICATION. +message StreamingAutomlClassificationConfig { + // Resource name of AutoML model. + // Format: + // `projects/{project_number}/locations/{location_id}/models/{model_id}` + string model_name = 1; +} - // Very likely. - VERY_LIKELY = 5; +// Config for STREAMING_AUTOML_OBJECT_TRACKING. +message StreamingAutomlObjectTrackingConfig { + // Resource name of AutoML model. + // Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` + string model_name = 1; } -// Streaming video annotation feature. -enum StreamingFeature { - // Unspecified. - STREAMING_FEATURE_UNSPECIFIED = 0; - // Label detection. Detect objects, such as dog or flower. - STREAMING_LABEL_DETECTION = 1; - // Shot change detection. - STREAMING_SHOT_CHANGE_DETECTION = 2; - // Explicit content detection. - STREAMING_EXPLICIT_CONTENT_DETECTION = 3; - // Object detection and tracking. - STREAMING_OBJECT_TRACKING = 4; - // Video classification based on AutoML model. - STREAMING_AUTOML_CLASSIFICATION = 21; - // Object detection and tracking based on AutoML model. - STREAMING_AUTOML_OBJECT_TRACKING = 22; +// Config for streaming storage option. +message StreamingStorageConfig { + // Enable streaming storage. Default: false. + bool enable_storage_annotation_result = 1; + + // Cloud Storage URI to store all annotation results for one client. Client + // should specify this field as the top-level storage directory. Annotation + // results of different sessions will be put into different sub-directories + // denoted by project_name and session_id. All sub-directories will be auto + // generated by program and will be made accessible to client in response + // proto. URIs must be specified in the following format: + // `gs://bucket-id/object-id` `bucket-id` should be a valid Cloud Storage + // bucket created by client and bucket permission shall also be configured + // properly. `object-id` can be arbitrary string that make sense to client. + // Other URI formats will return error and cause Cloud Storage write failure. + string annotation_result_storage_directory = 3; } diff --git a/google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.legacy.yaml b/google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.legacy.yaml new file mode 100644 index 000000000..28ec53f39 --- /dev/null +++ b/google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.legacy.yaml @@ -0,0 +1,237 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.videointelligence.v1p3beta1 + python: + package_name: google.cloud.videointelligence_v1p3beta1.gapic + go: + package_name: cloud.google.com/go/videointelligence/apiv1p3beta1 + csharp: + package_name: Google.Cloud.VideoIntelligence.V1P3Beta1 + ruby: + package_name: Google::Cloud::VideoIntelligence::V1p3beta1 + release_level: BETA + php: + package_name: Google\Cloud\VideoIntelligence\V1p3beta1 + nodejs: + package_name: video-intelligence.v1p3beta1 + domain_layer_location: google-cloud +interfaces: +- name: google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService + smoke_test: + method: AnnotateVideo + init_fields: + - input_uri=gs://cloud-samples-data/video/cat.mp4 + - features[0]=LABEL_DETECTION + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 1000 + retry_delay_multiplier: 2.5 + max_retry_delay_millis: 120000 + initial_rpc_timeout_millis: 120000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 120000 + total_timeout_millis: 600000 + methods: + - name: AnnotateVideo + flattening: + groups: + - parameters: + - input_uri + - features + long_running: + return_type: google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse + metadata_type: google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + sample_code_init_fields: + - input_uri=gs://cloud-samples-data/video/cat.mp4 + - features[0]=LABEL_DETECTION + samples: + standalone: + - region_tag: video_detect_logo_beta + value_sets: [video_detect_logo_beta] + - region_tag: video_detect_logo_gcs_beta + value_sets: [video_detect_logo_gcs_beta] + sample_value_sets: + - id: video_detect_logo_beta + description: "Performs asynchronous video annotation for logo recognition from inline video content." + parameters: + defaults: + - input_content="resources/googlework_short.mp4" + - features[0]=LOGO_RECOGNITION + attributes: + - parameter: input_content + sample_argument_name: local_file_path + read_file: true + description: Path to local video file, e.g. /path/video.mp4 + on_success: + - comment: ["Get the first response, since we sent only one video."] + - define: annotation_result=$resp.annotation_results[0] + - comment: ["Annotations for list of logos detected, tracked and recognized in video."] + - loop: + collection: annotation_result.logo_recognition_annotations + variable: logo_recognition_annotation + body: + - define: entity=logo_recognition_annotation.entity + - comment: ["Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/)."] + - print: ["Entity Id : %s", entity.entity_id] + - comment: ["Textual description, e.g. `Google`."] + - print: ["Description : %s", entity.description] + - comment: ["All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames."] + - loop: + collection: logo_recognition_annotation.tracks + variable: track + body: + - comment: ["Video segment of a track."] + - define: segment=track.segment + - define: segment_start_time_offset=segment.start_time_offset + - print: ["\n\tStart Time Offset : %s.%s", segment_start_time_offset.seconds, segment_start_time_offset.nanos] + - define: segment_end_time_offset=segment.end_time_offset + - print: ["\tEnd Time Offset : %s.%s", segment_end_time_offset.seconds, segment_end_time_offset.nanos] + - print: ["\tConfidence : %s", track.confidence] + - comment: ["The object with timestamp and attributes per frame in the track."] + - loop: + collection: track.timestamped_objects + variable: timestamped_object + body: + - comment: ["Normalized Bounding box in a frame, where the object is located."] + - define: normalized_bounding_box=timestamped_object.normalized_bounding_box + - print: ["\n\t\tLeft : %s", normalized_bounding_box.left] + - print: ["\t\tTop : %s", normalized_bounding_box.top] + - print: ["\t\tRight : %s", normalized_bounding_box.right] + - print: ["\t\tBottom : %s", normalized_bounding_box.bottom] + - comment: ["Optional. The attributes of the object in the bounding box."] + - loop: + collection: timestamped_object.attributes + variable: attribute + body: + - print: ["\n\t\t\tName : %s", attribute.name] + - print: ["\t\t\tConfidence : %s", attribute.confidence] + - print: ["\t\t\tValue : %s", attribute.value] + - comment: ["Optional. Attributes in the track level."] + - loop: + collection: track.attributes + variable: track_attribute + body: + - print: ["\n\t\tName : %s", track_attribute.name] + - print: ["\t\tConfidence : %s", track_attribute.confidence] + - print: ["\t\tValue : %s", track_attribute.value] + - comment: ["All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment."] + - loop: + collection: logo_recognition_annotation.segments + variable: logo_recognition_annotation_segment + body: + - define: logo_recognition_annotation_segment_start_time_offset=logo_recognition_annotation_segment.start_time_offset + - print: ["\n\tStart Time Offset : %s.%s", logo_recognition_annotation_segment_start_time_offset.seconds, logo_recognition_annotation_segment_start_time_offset.nanos] + - define: logo_recognition_annotation_segment_end_time_offset=logo_recognition_annotation_segment.end_time_offset + - print: ["\tEnd Time Offset : %s.%s", logo_recognition_annotation_segment_end_time_offset.seconds, logo_recognition_annotation_segment_end_time_offset.nanos] + - id: video_detect_logo_gcs_beta + description: "Performs asynchronous video annotation for logo recognition on a file hosted in GCS." + parameters: + defaults: + - input_uri=gs://cloud-samples-data/video/googlework_short.mp4 + - features[0]=LOGO_RECOGNITION + on_success: + - comment: ["Get the first response, since we sent only one video."] + - define: annotation_result=$resp.annotation_results[0] + - comment: ["Annotations for list of logos detected, tracked and recognized in video."] + - loop: + collection: annotation_result.logo_recognition_annotations + variable: logo_recognition_annotation + body: + - define: entity=logo_recognition_annotation.entity + - comment: ["Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/)."] + - print: ["Entity Id : %s", entity.entity_id] + - comment: ["Textual description, e.g. `Google`."] + - print: ["Description : %s", entity.description] + - comment: ["All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames."] + - loop: + collection: logo_recognition_annotation.tracks + variable: track + body: + - comment: ["Video segment of a track."] + - define: segment=track.segment + - define: segment_start_time_offset=segment.start_time_offset + - print: ["\n\tStart Time Offset : %s.%s", segment_start_time_offset.seconds, segment_start_time_offset.nanos] + - define: segment_end_time_offset=segment.end_time_offset + - print: ["\tEnd Time Offset : %s.%s", segment_end_time_offset.seconds, segment_end_time_offset.nanos] + - print: ["\tConfidence : %s", track.confidence] + - comment: ["The object with timestamp and attributes per frame in the track."] + - loop: + collection: track.timestamped_objects + variable: timestamped_object + body: + - comment: ["Normalized Bounding box in a frame, where the object is located."] + - define: normalized_bounding_box=timestamped_object.normalized_bounding_box + - print: ["\n\t\tLeft : %s", normalized_bounding_box.left] + - print: ["\t\tTop : %s", normalized_bounding_box.top] + - print: ["\t\tRight : %s", normalized_bounding_box.right] + - print: ["\t\tBottom : %s", normalized_bounding_box.bottom] + - comment: ["Optional. The attributes of the object in the bounding box."] + - loop: + collection: timestamped_object.attributes + variable: attribute + body: + - print: ["\n\t\t\tName : %s", attribute.name] + - print: ["\t\t\tConfidence : %s", attribute.confidence] + - print: ["\t\t\tValue : %s", attribute.value] + - comment: ["Optional. Attributes in the track level."] + - loop: + collection: track.attributes + variable: track_attribute + body: + - print: ["\n\t\tName : %s", track_attribute.name] + - print: ["\t\tConfidence : %s", track_attribute.confidence] + - print: ["\t\tValue : %s", track_attribute.value] + - comment: ["All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment."] + - loop: + collection: logo_recognition_annotation.segments + variable: logo_recognition_annotation_segment + body: + - define: logo_recognition_annotation_segment_start_time_offset=logo_recognition_annotation_segment.start_time_offset + - print: ["\n\tStart Time Offset : %s.%s", logo_recognition_annotation_segment_start_time_offset.seconds, logo_recognition_annotation_segment_start_time_offset.nanos] + - define: logo_recognition_annotation_segment_end_time_offset=logo_recognition_annotation_segment.end_time_offset + - print: ["\tEnd Time Offset : %s.%s", logo_recognition_annotation_segment_end_time_offset.seconds, logo_recognition_annotation_segment_end_time_offset.nanos] +# TODO: This config is currently broken: +# https://github.com/googleapis/gapic-generator/issues/1057 +# https://github.com/googleapis/gapic-generator/issues/1149 +- name: google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 10800000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 10800000 + total_timeout_millis: 10800000 + methods: + - name: StreamingAnnotateVideo + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10800000 diff --git a/google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.yaml index 9a06190e7..64ced22ca 100644 --- a/google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.yaml +++ b/google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.videointelligence.v1p3beta1 @@ -24,14 +24,6 @@ interfaces: init_fields: - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 1000 @@ -43,37 +35,166 @@ interfaces: total_timeout_millis: 600000 methods: - name: AnnotateVideo - flattening: - groups: - - parameters: - - input_uri - - features long_running: - return_type: google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse - metadata_type: google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 sample_code_init_fields: - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION + samples: + standalone: + - region_tag: video_detect_logo_beta + value_sets: [video_detect_logo_beta] + - region_tag: video_detect_logo_gcs_beta + value_sets: [video_detect_logo_gcs_beta] + sample_value_sets: + - id: video_detect_logo_beta + description: "Performs asynchronous video annotation for logo recognition from inline video content." + parameters: + defaults: + - input_content="resources/googlework_short.mp4" + - features[0]=LOGO_RECOGNITION + attributes: + - parameter: input_content + sample_argument_name: local_file_path + read_file: true + description: Path to local video file, e.g. /path/video.mp4 + on_success: + - comment: ["Get the first response, since we sent only one video."] + - define: annotation_result=$resp.annotation_results[0] + - comment: ["Annotations for list of logos detected, tracked and recognized in video."] + - loop: + collection: annotation_result.logo_recognition_annotations + variable: logo_recognition_annotation + body: + - define: entity=logo_recognition_annotation.entity + - comment: ["Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/)."] + - print: ["Entity Id : %s", entity.entity_id] + - comment: ["Textual description, e.g. `Google`."] + - print: ["Description : %s", entity.description] + - comment: ["All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames."] + - loop: + collection: logo_recognition_annotation.tracks + variable: track + body: + - comment: ["Video segment of a track."] + - define: segment=track.segment + - define: segment_start_time_offset=segment.start_time_offset + - print: ["\n\tStart Time Offset : %s.%s", segment_start_time_offset.seconds, segment_start_time_offset.nanos] + - define: segment_end_time_offset=segment.end_time_offset + - print: ["\tEnd Time Offset : %s.%s", segment_end_time_offset.seconds, segment_end_time_offset.nanos] + - print: ["\tConfidence : %s", track.confidence] + - comment: ["The object with timestamp and attributes per frame in the track."] + - loop: + collection: track.timestamped_objects + variable: timestamped_object + body: + - comment: ["Normalized Bounding box in a frame, where the object is located."] + - define: normalized_bounding_box=timestamped_object.normalized_bounding_box + - print: ["\n\t\tLeft : %s", normalized_bounding_box.left] + - print: ["\t\tTop : %s", normalized_bounding_box.top] + - print: ["\t\tRight : %s", normalized_bounding_box.right] + - print: ["\t\tBottom : %s", normalized_bounding_box.bottom] + - comment: ["Optional. The attributes of the object in the bounding box."] + - loop: + collection: timestamped_object.attributes + variable: attribute + body: + - print: ["\n\t\t\tName : %s", attribute.name] + - print: ["\t\t\tConfidence : %s", attribute.confidence] + - print: ["\t\t\tValue : %s", attribute.value] + - comment: ["Optional. Attributes in the track level."] + - loop: + collection: track.attributes + variable: track_attribute + body: + - print: ["\n\t\tName : %s", track_attribute.name] + - print: ["\t\tConfidence : %s", track_attribute.confidence] + - print: ["\t\tValue : %s", track_attribute.value] + - comment: ["All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment."] + - loop: + collection: logo_recognition_annotation.segments + variable: logo_recognition_annotation_segment + body: + - define: logo_recognition_annotation_segment_start_time_offset=logo_recognition_annotation_segment.start_time_offset + - print: ["\n\tStart Time Offset : %s.%s", logo_recognition_annotation_segment_start_time_offset.seconds, logo_recognition_annotation_segment_start_time_offset.nanos] + - define: logo_recognition_annotation_segment_end_time_offset=logo_recognition_annotation_segment.end_time_offset + - print: ["\tEnd Time Offset : %s.%s", logo_recognition_annotation_segment_end_time_offset.seconds, logo_recognition_annotation_segment_end_time_offset.nanos] + - id: video_detect_logo_gcs_beta + description: "Performs asynchronous video annotation for logo recognition on a file hosted in GCS." + parameters: + defaults: + - input_uri=gs://cloud-samples-data/video/googlework_short.mp4 + - features[0]=LOGO_RECOGNITION + on_success: + - comment: ["Get the first response, since we sent only one video."] + - define: annotation_result=$resp.annotation_results[0] + - comment: ["Annotations for list of logos detected, tracked and recognized in video."] + - loop: + collection: annotation_result.logo_recognition_annotations + variable: logo_recognition_annotation + body: + - define: entity=logo_recognition_annotation.entity + - comment: ["Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/)."] + - print: ["Entity Id : %s", entity.entity_id] + - comment: ["Textual description, e.g. `Google`."] + - print: ["Description : %s", entity.description] + - comment: ["All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames."] + - loop: + collection: logo_recognition_annotation.tracks + variable: track + body: + - comment: ["Video segment of a track."] + - define: segment=track.segment + - define: segment_start_time_offset=segment.start_time_offset + - print: ["\n\tStart Time Offset : %s.%s", segment_start_time_offset.seconds, segment_start_time_offset.nanos] + - define: segment_end_time_offset=segment.end_time_offset + - print: ["\tEnd Time Offset : %s.%s", segment_end_time_offset.seconds, segment_end_time_offset.nanos] + - print: ["\tConfidence : %s", track.confidence] + - comment: ["The object with timestamp and attributes per frame in the track."] + - loop: + collection: track.timestamped_objects + variable: timestamped_object + body: + - comment: ["Normalized Bounding box in a frame, where the object is located."] + - define: normalized_bounding_box=timestamped_object.normalized_bounding_box + - print: ["\n\t\tLeft : %s", normalized_bounding_box.left] + - print: ["\t\tTop : %s", normalized_bounding_box.top] + - print: ["\t\tRight : %s", normalized_bounding_box.right] + - print: ["\t\tBottom : %s", normalized_bounding_box.bottom] + - comment: ["Optional. The attributes of the object in the bounding box."] + - loop: + collection: timestamped_object.attributes + variable: attribute + body: + - print: ["\n\t\t\tName : %s", attribute.name] + - print: ["\t\t\tConfidence : %s", attribute.confidence] + - print: ["\t\t\tValue : %s", attribute.value] + - comment: ["Optional. Attributes in the track level."] + - loop: + collection: track.attributes + variable: track_attribute + body: + - print: ["\n\t\tName : %s", track_attribute.name] + - print: ["\t\tConfidence : %s", track_attribute.confidence] + - print: ["\t\tValue : %s", track_attribute.value] + - comment: ["All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment."] + - loop: + collection: logo_recognition_annotation.segments + variable: logo_recognition_annotation_segment + body: + - define: logo_recognition_annotation_segment_start_time_offset=logo_recognition_annotation_segment.start_time_offset + - print: ["\n\tStart Time Offset : %s.%s", logo_recognition_annotation_segment_start_time_offset.seconds, logo_recognition_annotation_segment_start_time_offset.nanos] + - define: logo_recognition_annotation_segment_end_time_offset=logo_recognition_annotation_segment.end_time_offset + - print: ["\tEnd Time Offset : %s.%s", logo_recognition_annotation_segment_end_time_offset.seconds, logo_recognition_annotation_segment_end_time_offset.nanos] # TODO: This config is currently broken: # https://github.com/googleapis/gapic-generator/issues/1057 # https://github.com/googleapis/gapic-generator/issues/1149 - name: google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService - collections: [] - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] # Definition for retry/backoff parameters. retry_params_def: - name: default @@ -88,4 +209,3 @@ interfaces: - name: StreamingAnnotateVideo retry_codes_name: idempotent retry_params_name: default - timeout_millis: 10800000 diff --git a/google/cloud/videointelligence/v1p3beta1/videointelligence_grpc_service_config.json b/google/cloud/videointelligence/v1p3beta1/videointelligence_grpc_service_config.json new file mode 100755 index 000000000..3ded3c9cc --- /dev/null +++ b/google/cloud/videointelligence/v1p3beta1/videointelligence_grpc_service_config.json @@ -0,0 +1,40 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService", + "method": "AnnotateVideo" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "1s", + "maxBackoff": "120s", + "backoffMultiplier": 2.5, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService", + "method": "StreamingAnnotateVideo" + } + ], + "timeout": "10800s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/videointelligence/v1p3beta1/videointelligence_v1p3beta1.yaml b/google/cloud/videointelligence/v1p3beta1/videointelligence_v1p3beta1.yaml new file mode 100644 index 000000000..3da30f34e --- /dev/null +++ b/google/cloud/videointelligence/v1p3beta1/videointelligence_v1p3beta1.yaml @@ -0,0 +1,35 @@ +type: google.api.Service +config_version: 3 +name: videointelligence.googleapis.com +title: Cloud Video Intelligence API + +apis: +- name: google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService +- name: google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService + +types: +- name: google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress +- name: google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse +- name: google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse +- name: google.cloud.videointelligence.v1p3beta1.VideoSegment + +documentation: + summary: |- + Detects objects, explicit content, and scene changes in videos. It also + specifies the region for annotation and transcribes speech to text. + Supports both asynchronous API and streaming API. + +authentication: + rules: + - selector: google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService.StreamingAnnotateVideo + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService.AnnotateVideo + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/videointelligence/videointelligence_v1.yaml b/google/cloud/videointelligence/videointelligence_v1.yaml deleted file mode 100644 index 4de2fb6ad..000000000 --- a/google/cloud/videointelligence/videointelligence_v1.yaml +++ /dev/null @@ -1,52 +0,0 @@ -type: google.api.Service -config_version: 3 -name: videointelligence.googleapis.com -title: Cloud Video Intelligence API - -apis: -- name: google.cloud.videointelligence.v1.VideoIntelligenceService - -types: -- name: google.cloud.videointelligence.v1.AnnotateVideoResponse -- name: google.cloud.videointelligence.v1.AnnotateVideoProgress -- name: google.cloud.videointelligence.v1.VideoSegment -- name: google.rpc.Status - -documentation: - summary: Cloud Video Intelligence API. - -backend: - rules: - - selector: google.longrunning.Operations.ListOperations - deadline: 600.0 - - selector: google.longrunning.Operations.GetOperation - deadline: 600.0 - - selector: google.longrunning.Operations.DeleteOperation - deadline: 600.0 - - selector: google.longrunning.Operations.CancelOperation - deadline: 600.0 - - selector: google.cloud.videointelligence.v1.VideoIntelligenceService.AnnotateVideo - deadline: 600.0 - -http: - rules: - - selector: google.longrunning.Operations.ListOperations - get: /v1/operations - - - selector: google.longrunning.Operations.GetOperation - get: '/v1/operations/{name=*}' - - - selector: google.longrunning.Operations.DeleteOperation - delete: '/v1/operations/{name=*}' - - - selector: google.longrunning.Operations.CancelOperation - post: '/v1/operations/{name=*}:cancel' - body: '*' - - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/videointelligence/videointelligence_v1beta1.yaml b/google/cloud/videointelligence/videointelligence_v1beta1.yaml deleted file mode 100644 index 62e1227a9..000000000 --- a/google/cloud/videointelligence/videointelligence_v1beta1.yaml +++ /dev/null @@ -1,35 +0,0 @@ -type: google.api.Service -config_version: 3 -name: videointelligence.googleapis.com -title: Google Cloud Video Intelligence API - -apis: -- name: google.cloud.videointelligence.v1beta1.VideoIntelligenceService - -documentation: - summary: - Google Cloud Video Intelligence API. - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: https://www.googleapis.com/auth/cloud-platform - -types: -- name: google.cloud.videointelligence.v1beta1.AnnotateVideoResponse -- name: google.cloud.videointelligence.v1beta1.AnnotateVideoProgress -- name: google.cloud.videointelligence.v1beta1.VideoSegment -- name: google.rpc.Status - -http: - rules: - - selector: google.longrunning.Operations.GetOperation - get: '/v1/operations/{name=*}' - - selector: google.longrunning.Operations.ListOperations - get: '/v1/operations' - - selector: google.longrunning.Operations.CancelOperation - post: '/v1/operations/{name=*}:cancel' - body: '*' - - selector: google.longrunning.Operations.DeleteOperation - delete: '/v1/operations/{name=*}' diff --git a/google/cloud/videointelligence/videointelligence_v1beta2.yaml b/google/cloud/videointelligence/videointelligence_v1beta2.yaml index 37918a95f..513e045b8 100644 --- a/google/cloud/videointelligence/videointelligence_v1beta2.yaml +++ b/google/cloud/videointelligence/videointelligence_v1beta2.yaml @@ -7,31 +7,42 @@ apis: - name: google.cloud.videointelligence.v1beta2.VideoIntelligenceService documentation: - summary: - Google Cloud Video Intelligence API. + summary: |- + Detects objects, explicit content, and scene changes in videos. It also + specifies the region for annotation and transcribes speech to text. + Supports both asynchronous API and streaming API. authentication: rules: - - selector: '*' - allow_without_credential: true - oauth: - canonical_scopes: https://www.googleapis.com/auth/cloud-platform + - selector: '*' + allow_without_credential: true + oauth: + canonical_scopes: https://www.googleapis.com/auth/cloud-platform types: -- name: google.cloud.videointelligence.v1beta2.AnnotateVideoResponse - name: google.cloud.videointelligence.v1beta2.AnnotateVideoProgress +- name: google.cloud.videointelligence.v1beta2.AnnotateVideoResponse - name: google.cloud.videointelligence.v1beta2.VideoSegment - name: google.rpc.Status # HTTP overrides. http: rules: - - selector: google.longrunning.Operations.GetOperation - get: '/v1/operations/{name=*}' - selector: google.longrunning.Operations.ListOperations - get: '/v1/operations' + get: '/v1beta2/{name=projects/*/locations/*}/operations' + + - selector: google.longrunning.Operations.GetOperation + get: '/v1beta2/{name=projects/*/locations/*/operations/*}' + additional_bindings: + - get: '/v1beta2/operations/{name=projects/*/locations/*/operations/*}' + + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1beta2/{name=projects/*/locations/*/operations/*}' + additional_bindings: + - delete: '/v1beta2/operations/{name=projects/*/locations/*/operations/*}' + - selector: google.longrunning.Operations.CancelOperation - post: '/v1/operations/{name=*}:cancel' + post: '/v1beta2/{name=projects/*/locations/*/operations/*}:cancel' body: '*' - - selector: google.longrunning.Operations.DeleteOperation - delete: '/v1/operations/{name=*}' + additional_bindings: + - post: '/v1beta2/operations/{name=projects/*/locations/*/operations/*}:cancel' diff --git a/google/cloud/videointelligence/videointelligence_v1p1beta1.yaml b/google/cloud/videointelligence/videointelligence_v1p1beta1.yaml index 1e0caadbb..262d7f184 100644 --- a/google/cloud/videointelligence/videointelligence_v1p1beta1.yaml +++ b/google/cloud/videointelligence/videointelligence_v1p1beta1.yaml @@ -7,13 +7,16 @@ apis: - name: google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService types: -- name: google.cloud.videointelligence.v1p1beta1.AnnotateVideoResponse - name: google.cloud.videointelligence.v1p1beta1.AnnotateVideoProgress +- name: google.cloud.videointelligence.v1p1beta1.AnnotateVideoResponse - name: google.cloud.videointelligence.v1p1beta1.VideoSegment - name: google.rpc.Status documentation: - summary: Cloud Video Intelligence API. + summary: |- + Detects objects, explicit content, and scene changes in videos. It also + specifies the region for annotation and transcribes speech to text. + Supports both asynchronous API and streaming API. backend: rules: @@ -31,18 +34,23 @@ backend: http: rules: - selector: google.longrunning.Operations.ListOperations - get: /v1p1beta1/operations + get: '/v1p1beta1/{name=projects/*/locations/*}/operations' - selector: google.longrunning.Operations.GetOperation - get: '/v1p1beta1/operations/{name=*}' + get: '/v1p1beta1/{name=projects/*/locations/*/operations/*}' + additional_bindings: + - get: '/v1p1beta1/operations/{name=projects/*/locations/*/operations/*}' - selector: google.longrunning.Operations.DeleteOperation - delete: '/v1p1beta1/operations/{name=*}' + delete: '/v1p1beta1/{name=projects/*/locations/*/operations/*}' + additional_bindings: + - delete: '/v1p1beta1/operations/{name=projects/*/locations/*/operations/*}' - selector: google.longrunning.Operations.CancelOperation - post: '/v1p1beta1/operations/{name=*}:cancel' + post: '/v1p1beta1/{name=projects/*/locations/*/operations/*}:cancel' body: '*' - + additional_bindings: + - post: '/v1p1beta1/operations/{name=projects/*/locations/*/operations/*}:cancel' authentication: rules: diff --git a/google/cloud/videointelligence/videointelligence_v1p2beta1.yaml b/google/cloud/videointelligence/videointelligence_v1p2beta1.yaml index df5da4297..3b4d3434c 100644 --- a/google/cloud/videointelligence/videointelligence_v1p2beta1.yaml +++ b/google/cloud/videointelligence/videointelligence_v1p2beta1.yaml @@ -7,13 +7,16 @@ apis: - name: google.cloud.videointelligence.v1p2beta1.VideoIntelligenceService types: -- name: google.cloud.videointelligence.v1p2beta1.AnnotateVideoResponse - name: google.cloud.videointelligence.v1p2beta1.AnnotateVideoProgress +- name: google.cloud.videointelligence.v1p2beta1.AnnotateVideoResponse - name: google.cloud.videointelligence.v1p2beta1.VideoSegment - name: google.rpc.Status documentation: - summary: Cloud Video Intelligence API. + summary: |- + Detects objects, explicit content, and scene changes in videos. It also + specifies the region for annotation and transcribes speech to text. + Supports both asynchronous API and streaming API. backend: rules: @@ -31,18 +34,23 @@ backend: http: rules: - selector: google.longrunning.Operations.ListOperations - get: /v1p2beta1/operations + get: '/v1p2beta1/{name=projects/*/locations/*}/operations' - selector: google.longrunning.Operations.GetOperation - get: '/v1p2beta1/operations/{name=*}' + get: '/v1p2beta1/{name=projects/*/locations/*/operations/*}' + additional_bindings: + - get: '/v1p2beta1/operations/{name=projects/*/locations/*/operations/*}' - selector: google.longrunning.Operations.DeleteOperation - delete: '/v1p2beta1/operations/{name=*}' + delete: '/v1p2beta1/{name=projects/*/locations/*/operations/*}' + additional_bindings: + - delete: '/v1p2beta1/operations/{name=projects/*/locations/*/operations/*}' - selector: google.longrunning.Operations.CancelOperation - post: '/v1p2beta1/operations/{name=*}:cancel' + post: '/v1p2beta1/{name=projects/*/locations/*/operations/*}:cancel' body: '*' - + additional_bindings: + - post: '/v1p2beta1/operations/{name=projects/*/locations/*/operations/*}:cancel' authentication: rules: diff --git a/google/cloud/videointelligence/videointelligence_v1p3beta1.yaml b/google/cloud/videointelligence/videointelligence_v1p3beta1.yaml index 6d33be286..145d0fbd2 100644 --- a/google/cloud/videointelligence/videointelligence_v1p3beta1.yaml +++ b/google/cloud/videointelligence/videointelligence_v1p3beta1.yaml @@ -8,13 +8,16 @@ apis: - name: google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService types: -- name: google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse - name: google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress +- name: google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse - name: google.cloud.videointelligence.v1p3beta1.VideoSegment - name: google.rpc.Status documentation: - summary: Cloud Video Intelligence API. + summary: |- + Detects objects, explicit content, and scene changes in videos. It also + specifies the region for annotation and transcribes speech to text. + Supports both asynchronous API and streaming API. backend: rules: @@ -34,18 +37,23 @@ backend: http: rules: - selector: google.longrunning.Operations.ListOperations - get: /v1p3beta1/operations + get: '/v1p3beta1/{name=projects/*/locations/*}/operations' - selector: google.longrunning.Operations.GetOperation - get: '/v1p3beta1/operations/{name=*}' + get: '/v1p3beta1/{name=projects/*/locations/*/operations/*}' + additional_bindings: + - get: '/v1p3beta1/operations/{name=projects/*/locations/*/operations/*}' - selector: google.longrunning.Operations.DeleteOperation - delete: '/v1p3beta1/operations/{name=*}' + delete: '/v1p3beta1/{name=projects/*/locations/*/operations/*}' + additional_bindings: + - delete: '/v1p3beta1/operations/{name=projects/*/locations/*/operations/*}' - selector: google.longrunning.Operations.CancelOperation - post: '/v1p3beta1/operations/{name=*}:cancel' + post: '/v1p3beta1/{name=projects/*/locations/*/operations/*}:cancel' body: '*' - + additional_bindings: + - post: '/v1p3beta1/operations/{name=projects/*/locations/*/operations/*}:cancel' authentication: rules: diff --git a/google/cloud/vision/artman_vision_v1.yaml b/google/cloud/vision/artman_vision_v1.yaml index 6b037447e..069edaae0 100644 --- a/google/cloud/vision/artman_vision_v1.yaml +++ b/google/cloud/vision/artman_vision_v1.yaml @@ -2,12 +2,13 @@ common: api_name: vision api_version: v1 organization_name: google-cloud - service_yaml: vision_v1.yaml + service_yaml: v1/vision_v1.yaml gapic_yaml: v1/vision_gapic.yaml src_proto_paths: - v1 proto_deps: - name: google-common-protos + proto_package: google.cloud.vision.v1 artifacts: - name: java_gapic type: GAPIC diff --git a/google/cloud/vision/v1/BUILD.bazel b/google/cloud/vision/v1/BUILD.bazel index 049cd6281..5aedae4e1 100644 --- a/google/cloud/vision/v1/BUILD.bazel +++ b/google/cloud/vision/v1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -18,6 +21,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/longrunning:operations_proto", "//google/rpc:status_proto", "//google/type:color_proto", @@ -30,7 +36,10 @@ proto_library( proto_library_with_info( name = "vision_proto_with_info", - deps = [":vision_proto"], + deps = [ + ":vision_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -38,18 +47,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "vision_java_proto", deps = [":vision_proto"], @@ -58,51 +62,41 @@ java_proto_library( java_grpc_library( name = "vision_java_grpc", srcs = [":vision_proto"], - deps = [":vision_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "vision_resource_name_java_proto", - gapic_yaml = "vision_gapic.yaml", - deps = [":vision_proto"], + deps = [":vision_java_proto"], ) java_gapic_library( name = "vision_java_gapic", src = ":vision_proto_with_info", gapic_yaml = "vision_gapic.yaml", - service_yaml = "//google/cloud/vision:vision_v1.yaml", - test_deps = [":vision_java_grpc"], + package = "google.cloud.vision.v1", + service_yaml = "vision_v1.yaml", + test_deps = [ + ":vision_java_grpc", + ], deps = [ ":vision_java_proto", - ":vision_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":vision_java_gapic_test", +java_gapic_test( + name = "vision_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.vision.v1.ImageAnnotatorClientTest", + "com.google.cloud.vision.v1.ProductSearchClientTest", ], -) for test_name in [ - "com.google.cloud.vision.v1.ImageAnnotatorClientTest", -]] + runtime_deps = [":vision_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-vision-v1-java", - client_deps = [":vision_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":vision_java_gapic_test"], - grpc_deps = [":vision_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":vision_java_gapic", + ":vision_java_grpc", ":vision_java_proto", ":vision_proto", - ":vision_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -110,10 +104,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -132,15 +126,16 @@ go_proto_library( go_gapic_library( name = "vision_go_gapic", - src = ":vision_proto_with_info", - gapic_yaml = "vision_gapic.yaml", - importpath = "cloud.google.com/go/vision/apiv1", - service_yaml = "//google/cloud/vision:vision_v1.yaml", + srcs = [":vision_proto_with_info"], + grpc_service_config = "vision_grpc_service_config.json", + importpath = "cloud.google.com/go/vision/apiv1;vision", + service_yaml = "vision_v1.yaml", deps = [ ":vision_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", ], ) @@ -151,25 +146,246 @@ go_test( importpath = "cloud.google.com/go/vision/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-vision-v1-go", deps = [ ":vision_go_gapic", - ":vision_go_gapic_srcjar-smoke-test.srcjar", ":vision_go_gapic_srcjar-test.srcjar", ":vision_go_proto", ], ) +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "vision_moved_proto", + srcs = [":vision_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "//google/type:color_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "vision_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":vision_moved_proto"], +) + +py_grpc_library( + name = "vision_py_grpc", + srcs = [":vision_moved_proto"], + deps = [":vision_py_proto"], +) + +py_gapic_library( + name = "vision_py_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1", + service_yaml = "vision_v1.yaml", + deps = [ + ":vision_py_grpc", + ":vision_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "vision-v1-py", + deps = [ + ":vision_py_gapic", + ":vision_py_grpc", + ":vision_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "vision_php_proto", + deps = [":vision_proto"], +) + +php_grpc_library( + name = "vision_php_grpc", + srcs = [":vision_proto"], + deps = [":vision_php_proto"], +) + +php_gapic_library( + name = "vision_php_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1", + service_yaml = "vision_v1.yaml", + deps = [ + ":vision_php_grpc", + ":vision_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-vision-v1-php", + deps = [ + ":vision_php_gapic", + ":vision_php_grpc", + ":vision_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "vision_nodejs_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1", + service_yaml = "vision_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "vision-v1-nodejs", + deps = [ + ":vision_nodejs_gapic", + ":vision_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "vision_ruby_proto", + deps = [":vision_proto"], +) + +ruby_grpc_library( + name = "vision_ruby_grpc", + srcs = [":vision_proto"], + deps = [":vision_ruby_proto"], +) + +ruby_gapic_library( + name = "vision_ruby_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1", + service_yaml = "vision_v1.yaml", + deps = [ + ":vision_ruby_grpc", + ":vision_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-vision-v1-ruby", + deps = [ + ":vision_ruby_gapic", + ":vision_ruby_grpc", + ":vision_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "vision_csharp_proto", + deps = [":vision_proto"], +) + +csharp_grpc_library( + name = "vision_csharp_grpc", + srcs = [":vision_proto"], + deps = [":vision_csharp_proto"], +) + +csharp_gapic_library( + name = "vision_csharp_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1", + service_yaml = "vision_v1.yaml", + deps = [ + ":vision_csharp_grpc", + ":vision_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-vision-v1-csharp", + deps = [ + ":vision_csharp_gapic", + ":vision_csharp_grpc", + ":vision_csharp_proto", + ], +) + ############################################################################## # C++ ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "cc_gapic_library", "cc_grpc_library", "cc_proto_library", - "cc_gapic_library", ) cc_proto_library( @@ -180,8 +396,9 @@ cc_proto_library( cc_grpc_library( name = "vision_cc_grpc", srcs = [":vision_proto"], - deps = [":vision_cc_proto"], + generate_mocks = True, grpc_only = True, + deps = [":vision_cc_proto"], ) cc_gapic_library( @@ -192,4 +409,4 @@ cc_gapic_library( ":vision_cc_grpc", ":vision_cc_proto", ], -) \ No newline at end of file +) diff --git a/google/cloud/vision/v1/image_annotator.proto b/google/cloud/vision/v1/image_annotator.proto index 3375345e2..e75ca7660 100644 --- a/google/cloud/vision/v1/image_annotator.proto +++ b/google/cloud/vision/v1/image_annotator.proto @@ -18,6 +18,8 @@ syntax = "proto3"; package google.cloud.vision.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/cloud/vision/v1/geometry.proto"; import "google/cloud/vision/v1/product_search.proto"; import "google/cloud/vision/v1/text_annotation.proto"; @@ -40,13 +42,26 @@ option objc_class_prefix = "GCVN"; // images, such as face, landmark, logo, label, and text detection. The // ImageAnnotator service returns detected entities from the images. service ImageAnnotator { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + // Run image detection and annotation for a batch of images. - rpc BatchAnnotateImages(BatchAnnotateImagesRequest) - returns (BatchAnnotateImagesResponse) { + rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { option (google.api.http) = { post: "/v1/images:annotate" body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/images:annotate" + body: "*" + } + additional_bindings { + post: "/v1/{parent=projects/*}/images:annotate" + body: "*" + } }; + option (google.api.method_signature) = "requests"; } // Service that performs image detection and annotation for a batch of files. @@ -56,12 +71,20 @@ service ImageAnnotator { // AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each // file provided and perform detection and annotation for each image // extracted. - rpc BatchAnnotateFiles(BatchAnnotateFilesRequest) - returns (BatchAnnotateFilesResponse) { + rpc BatchAnnotateFiles(BatchAnnotateFilesRequest) returns (BatchAnnotateFilesResponse) { option (google.api.http) = { post: "/v1/files:annotate" body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/files:annotate" + body: "*" + } + additional_bindings { + post: "/v1/{parent=projects/*}/files:annotate" + body: "*" + } }; + option (google.api.method_signature) = "requests"; } // Run asynchronous image detection and annotation for a list of images. @@ -73,11 +96,23 @@ service ImageAnnotator { // // This service will write image annotation outputs to json files in customer // GCS bucket, each json file containing BatchAnnotateImagesResponse proto. - rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest) - returns (google.longrunning.Operation) { + rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/images:asyncBatchAnnotate" body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate" + body: "*" + } + additional_bindings { + post: "/v1/{parent=projects/*}/images:asyncBatchAnnotate" + body: "*" + } + }; + option (google.api.method_signature) = "requests,output_config"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateImagesResponse" + metadata_type: "OperationMetadata" }; } @@ -87,11 +122,23 @@ service ImageAnnotator { // `google.longrunning.Operations` interface. // `Operation.metadata` contains `OperationMetadata` (metadata). // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) - returns (google.longrunning.Operation) { + rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/files:asyncBatchAnnotate" body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/files:asyncBatchAnnotate" + body: "*" + } + additional_bindings { + post: "/v1/{parent=projects/*}/files:asyncBatchAnnotate" + body: "*" + } + }; + option (google.api.method_signature) = "requests"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateFilesResponse" + metadata_type: "OperationMetadata" }; } } @@ -160,28 +207,6 @@ message Feature { string model = 3; } -// A bucketized representation of likelihood, which is intended to give clients -// highly stable results across model upgrades. -enum Likelihood { - // Unknown likelihood. - UNKNOWN = 0; - - // It is very unlikely that the image belongs to the specified vertical. - VERY_UNLIKELY = 1; - - // It is unlikely that the image belongs to the specified vertical. - UNLIKELY = 2; - - // It is possible that the image belongs to the specified vertical. - POSSIBLE = 3; - - // It is likely that the image belongs to the specified vertical. - LIKELY = 4; - - // It is very likely that the image belongs to the specified vertical. - VERY_LIKELY = 5; -} - // External image source (Google Cloud Storage or web URL image location). message ImageSource { // **Use `image_uri` instead.** @@ -225,6 +250,28 @@ message Image { ImageSource source = 2; } +// A bucketized representation of likelihood, which is intended to give clients +// highly stable results across model upgrades. +enum Likelihood { + // Unknown likelihood. + UNKNOWN = 0; + + // It is very unlikely. + VERY_UNLIKELY = 1; + + // It is unlikely. + UNLIKELY = 2; + + // It is possible. + POSSIBLE = 3; + + // It is likely. + LIKELY = 4; + + // It is very likely. + VERY_LIKELY = 5; +} + // A face annotation object contains the results of face detection. message FaceAnnotation { // A face-specific landmark (for example, a face feature). @@ -519,6 +566,30 @@ message SafeSearchAnnotation { // covered nudity, lewd or provocative poses, or close-ups of sensitive // body areas. Likelihood racy = 9; + + // Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means + // very confident. + float adult_confidence = 16; + + // Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means + // very confident. + float spoof_confidence = 18; + + // Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means + // very confident. + float medical_confidence = 20; + + // Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means + // very confident. + float violence_confidence = 22; + + // Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very + // confident. + float racy_confidence = 24; + + // Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very + // confident. + float nsfw_confidence = 26; } // Rectangle determined by min and max `LatLng` pairs. @@ -605,7 +676,7 @@ message ImageContext { // setting a hint will help get better results (although it will be a // significant hindrance if the hint is wrong). Text detection returns an // error if one or more of the specified languages is not one of the - // [supported languages](/vision/docs/languages). + // [supported languages](https://cloud.google.com/vision/docs/languages). repeated string language_hints = 2; // Parameters for crop hints annotation request. @@ -694,23 +765,24 @@ message AnnotateImageResponse { ImageAnnotationContext context = 21; } -// Response to a single file annotation request. A file may contain one or more -// images, which individually have their own responses. -message AnnotateFileResponse { - // Information about the file for which this response is generated. - InputConfig input_config = 1; - - // Individual responses to images found within the file. - repeated AnnotateImageResponse responses = 2; - - // This field gives the total number of pages in the file. - int32 total_pages = 3; -} - // Multiple image annotation requests are batched into a single service call. message BatchAnnotateImagesRequest { - // Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1; + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Target project and location to make a call. + // + // Format: `projects/{project-id}/locations/{location-id}`. + // + // If no parent is specified, a region will be chosen automatically. + // + // Supported location-ids: + // `us`: USA country only, + // `asia`: East asia areas, like Japan, Taiwan, + // `eu`: The European Union. + // + // Example: `projects/project-A/locations/eu`. + string parent = 4; } // Response to a batch image annotation request. @@ -747,11 +819,43 @@ message AnnotateFileRequest { repeated int32 pages = 4; } +// Response to a single file annotation request. A file may contain one or more +// images, which individually have their own responses. +message AnnotateFileResponse { + // Information about the file for which this response is generated. + InputConfig input_config = 1; + + // Individual responses to images found within the file. This field will be + // empty if the `error` field is set. + repeated AnnotateImageResponse responses = 2; + + // This field gives the total number of pages in the file. + int32 total_pages = 3; + + // If set, represents the error message for the failed request. The + // `responses` field will not be set in this case. + google.rpc.Status error = 4; +} + // A list of requests to annotate files using the BatchAnnotateFiles API. message BatchAnnotateFilesRequest { - // The list of file annotation requests. Right now we support only one + // Required. The list of file annotation requests. Right now we support only one // AnnotateFileRequest in BatchAnnotateFilesRequest. - repeated AnnotateFileRequest requests = 1; + repeated AnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Target project and location to make a call. + // + // Format: `projects/{project-id}/locations/{location-id}`. + // + // If no parent is specified, a region will be chosen automatically. + // + // Supported location-ids: + // `us`: USA country only, + // `asia`: East asia areas, like Japan, Taiwan, + // `eu`: The European Union. + // + // Example: `projects/project-A/locations/eu`. + string parent = 3; } // A list of file annotation responses. @@ -784,11 +888,25 @@ message AsyncAnnotateFileResponse { // Request for async image annotation for a list of images. message AsyncBatchAnnotateImagesRequest { - // Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1; + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The desired output location and metadata (e.g. format). - OutputConfig output_config = 2; + OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Target project and location to make a call. + // + // Format: `projects/{project-id}/locations/{location-id}`. + // + // If no parent is specified, a region will be chosen automatically. + // + // Supported location-ids: + // `us`: USA country only, + // `asia`: East asia areas, like Japan, Taiwan, + // `eu`: The European Union. + // + // Example: `projects/project-A/locations/eu`. + string parent = 4; } // Response to an async batch image annotation request. @@ -800,8 +918,22 @@ message AsyncBatchAnnotateImagesResponse { // Multiple async file annotation requests are batched into a single service // call. message AsyncBatchAnnotateFilesRequest { - // Individual async file annotation requests for this batch. - repeated AsyncAnnotateFileRequest requests = 1; + // Required. Individual async file annotation requests for this batch. + repeated AsyncAnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Target project and location to make a call. + // + // Format: `projects/{project-id}/locations/{location-id}`. + // + // If no parent is specified, a region will be chosen automatically. + // + // Supported location-ids: + // `us`: USA country only, + // `asia`: East asia areas, like Japan, Taiwan, + // `eu`: The European Union. + // + // Example: `projects/project-A/locations/eu`. + string parent = 4; } // Response to an async batch file annotation request. diff --git a/google/cloud/vision/v1/product_search.proto b/google/cloud/vision/v1/product_search.proto index 9d981ff77..6df694b8b 100644 --- a/google/cloud/vision/v1/product_search.proto +++ b/google/cloud/vision/v1/product_search.proto @@ -17,10 +17,11 @@ syntax = "proto3"; package google.cloud.vision.v1; -import "google/api/annotations.proto"; import "google/cloud/vision/v1/geometry.proto"; import "google/cloud/vision/v1/product_search_service.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; +import "google/api/resource.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; @@ -35,20 +36,21 @@ message ProductSearchParams { // Optional. If it is not specified, system discretion will be applied. BoundingPoly bounding_poly = 9; - // The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to - // be searched for similar images. + // The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - string product_set = 6; + string product_set = 6 [(google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + }]; // The list of product categories to search in. Currently, we only consider - // the first category, and either "homegoods-v2", "apparel-v2", or "toys-v2" - // should be specified. The legacy categories "homegoods", "apparel", and - // "toys" are still supported but will be deprecated. For new products, please - // use "homegoods-v2", "apparel-v2", or "toys-v2" for better product search - // accuracy. It is recommended to migrate existing products to these - // categories as well. + // the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", + // "packagedgoods-v1", or "general-v1" should be specified. The legacy + // categories "homegoods", "apparel", and "toys" are still supported but will + // be deprecated. For new products, please use "homegoods-v2", "apparel-v2", + // or "toys-v2" for better product search accuracy. It is recommended to + // migrate existing products to these categories as well. repeated string product_categories = 7; // The filtering expression. This can be used to restrict search results based @@ -78,6 +80,23 @@ message ProductSearchResults { string image = 3; } + // Prediction for what the object in the bounding box is. + message ObjectAnnotation { + // Object ID that should align with EntityAnnotation mid. + string mid = 1; + + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + + // Object name, expressed in its `language_code` language. + string name = 3; + + // Score of the result. Range [0, 1]. + float score = 4; + } + // Information about the products similar to a single product in a query // image. message GroupedResult { @@ -86,6 +105,9 @@ message ProductSearchResults { // List of results, one for each product match. repeated Result results = 2; + + // List of generic predictions for the object in the bounding box. + repeated ObjectAnnotation object_annotations = 3; } // Timestamp of the index which provided these results. Products added to the diff --git a/google/cloud/vision/v1/product_search_service.proto b/google/cloud/vision/v1/product_search_service.proto index 5b36591c2..ecfcdf6c7 100644 --- a/google/cloud/vision/v1/product_search_service.proto +++ b/google/cloud/vision/v1/product_search_service.proto @@ -18,6 +18,9 @@ syntax = "proto3"; package google.cloud.vision.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/vision/v1/geometry.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; @@ -35,20 +38,23 @@ option objc_class_prefix = "GCVN"; // Manages Products and ProductSets of reference images for use in product // search. It uses the following resource model: // -// - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] -// resources, named `projects/*/locations/*/productSets/*`, which acts as a way -// to put different products into groups to limit identification. +// - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named +// `projects/*/locations/*/productSets/*`, which acts as a way to put different +// products into groups to limit identification. // // In parallel, // -// - The API has a collection of [Product][google.cloud.vision.v1.Product] -// resources, named +// - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named // `projects/*/locations/*/products/*` // -// - Each [Product][google.cloud.vision.v1.Product] has a collection of -// [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named +// - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named // `projects/*/locations/*/products/*/referenceImages/*` service ProductSearch { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + // Creates and returns a new ProductSet resource. // // Possible errors: @@ -60,6 +66,7 @@ service ProductSearch { post: "/v1/{parent=projects/*/locations/*}/productSets" body: "product_set" }; + option (google.api.method_signature) = "parent,product_set,product_set_id"; } // Lists ProductSets in an unspecified order. @@ -68,11 +75,11 @@ service ProductSearch { // // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less // than 1. - rpc ListProductSets(ListProductSetsRequest) - returns (ListProductSetsResponse) { + rpc ListProductSets(ListProductSetsRequest) returns (ListProductSetsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/productSets" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a ProductSet. @@ -84,6 +91,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/productSets/*}" }; + option (google.api.method_signature) = "name"; } // Makes changes to a ProductSet resource. @@ -99,17 +107,18 @@ service ProductSearch { patch: "/v1/{product_set.name=projects/*/locations/*/productSets/*}" body: "product_set" }; + option (google.api.method_signature) = "product_set,update_mask"; } // Permanently deletes a ProductSet. Products and ReferenceImages in the // ProductSet are not deleted. // // The actual image files are not deleted from Google Cloud Storage. - rpc DeleteProductSet(DeleteProductSetRequest) - returns (google.protobuf.Empty) { + rpc DeleteProductSet(DeleteProductSetRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/productSets/*}" }; + option (google.api.method_signature) = "name"; } // Creates and returns a new product resource. @@ -125,6 +134,7 @@ service ProductSearch { post: "/v1/{parent=projects/*/locations/*}/products" body: "product" }; + option (google.api.method_signature) = "parent,product,product_id"; } // Lists products in an unspecified order. @@ -136,6 +146,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/products" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a Product. @@ -147,6 +158,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/products/*}" }; + option (google.api.method_signature) = "name"; } // Makes changes to a Product resource. @@ -169,6 +181,7 @@ service ProductSearch { patch: "/v1/{product.name=projects/*/locations/*/products/*}" body: "product" }; + option (google.api.method_signature) = "product,update_mask"; } // Permanently deletes a product and its reference images. @@ -180,6 +193,7 @@ service ProductSearch { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/products/*}" }; + option (google.api.method_signature) = "name"; } // Creates and returns a new ReferenceImage resource. @@ -201,12 +215,12 @@ service ProductSearch { // * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing // compatible with the parent product's product_category is detected. // * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - rpc CreateReferenceImage(CreateReferenceImageRequest) - returns (ReferenceImage) { + rpc CreateReferenceImage(CreateReferenceImageRequest) returns (ReferenceImage) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/products/*}/referenceImages" body: "reference_image" }; + option (google.api.method_signature) = "parent,reference_image,reference_image_id"; } // Permanently deletes a reference image. @@ -216,11 +230,11 @@ service ProductSearch { // caches are refreshed. // // The actual image files are not deleted from Google Cloud Storage. - rpc DeleteReferenceImage(DeleteReferenceImageRequest) - returns (google.protobuf.Empty) { + rpc DeleteReferenceImage(DeleteReferenceImageRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}" }; + option (google.api.method_signature) = "name"; } // Lists reference images. @@ -230,11 +244,11 @@ service ProductSearch { // * Returns NOT_FOUND if the parent product does not exist. // * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less // than 1. - rpc ListReferenceImages(ListReferenceImagesRequest) - returns (ListReferenceImagesResponse) { + rpc ListReferenceImages(ListReferenceImagesRequest) returns (ListReferenceImagesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/products/*}/referenceImages" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a ReferenceImage. @@ -246,6 +260,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}" }; + option (google.api.method_signature) = "name"; } // Adds a Product to the specified ProductSet. If the Product is already @@ -256,21 +271,21 @@ service ProductSearch { // Possible errors: // // * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - rpc AddProductToProductSet(AddProductToProductSetRequest) - returns (google.protobuf.Empty) { + rpc AddProductToProductSet(AddProductToProductSetRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/productSets/*}:addProduct" body: "*" }; + option (google.api.method_signature) = "name,product"; } // Removes a Product from the specified ProductSet. - rpc RemoveProductFromProductSet(RemoveProductFromProductSetRequest) - returns (google.protobuf.Empty) { + rpc RemoveProductFromProductSet(RemoveProductFromProductSetRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/productSets/*}:removeProduct" body: "*" }; + option (google.api.method_signature) = "name,product"; } // Lists the Products in a ProductSet, in an unspecified order. If the @@ -280,35 +295,80 @@ service ProductSearch { // Possible errors: // // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - rpc ListProductsInProductSet(ListProductsInProductSetRequest) - returns (ListProductsInProductSetResponse) { + rpc ListProductsInProductSet(ListProductsInProductSetRequest) returns (ListProductsInProductSetResponse) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/productSets/*}/products" }; + option (google.api.method_signature) = "name"; } // Asynchronous API that imports a list of reference images to specified // product sets based on a list of image information. // - // The [google.longrunning.Operation][google.longrunning.Operation] API can be - // used to keep track of the progress and results of the request. + // The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + // progress and results of the request. // `Operation.metadata` contains `BatchOperationMetadata`. (progress) // `Operation.response` contains `ImportProductSetsResponse`. (results) // // The input source of this method is a csv file on Google Cloud Storage. // For the format of the csv file please see // [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. - rpc ImportProductSets(ImportProductSetsRequest) - returns (google.longrunning.Operation) { + rpc ImportProductSets(ImportProductSetsRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/productSets:import" body: "*" }; + option (google.api.method_signature) = "parent,input_config"; + option (google.longrunning.operation_info) = { + response_type: "ImportProductSetsResponse" + metadata_type: "BatchOperationMetadata" + }; + } + + // Asynchronous API to delete all Products in a ProductSet or all Products + // that are in no ProductSet. + // + // If a Product is a member of the specified ProductSet in addition to other + // ProductSets, the Product will still be deleted. + // + // It is recommended to not delete the specified ProductSet until after this + // operation has completed. It is also recommended to not add any of the + // Products involved in the batch delete to a new ProductSet while this + // operation is running because those Products may still end up deleted. + // + // It's not possible to undo the PurgeProducts operation. Therefore, it is + // recommended to keep the csv files used in ImportProductSets (if that was + // how you originally built the Product Set) before starting PurgeProducts, in + // case you need to re-import the data after deletion. + // + // If the plan is to purge all of the Products from a ProductSet and then + // re-use the empty ProductSet to re-import new Products into the empty + // ProductSet, you must wait until the PurgeProducts operation has finished + // for that ProductSet. + // + // The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + // progress and results of the request. + // `Operation.metadata` contains `BatchOperationMetadata`. (progress) + rpc PurgeProducts(PurgeProductsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/products:purge" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "BatchOperationMetadata" + }; } } // A Product contains ReferenceImages. message Product { + option (google.api.resource) = { + type: "vision.googleapis.com/Product" + pattern: "projects/{project}/locations/{location}/products/{product}" + }; + // A product label represented as a key-value pair. message KeyValue { // The key of the label attached to the product. Cannot be empty and cannot @@ -336,15 +396,11 @@ message Product { // characters long. string description = 3; - // The category for the product identified by the reference image. This should + // Immutable. The category for the product identified by the reference image. This should // be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories - // "homegoods", "apparel", and "toys" are still supported but will be - // deprecated. For new products, please use "homegoods-v2", "apparel-v2", or - // "toys-v2" for better product search accuracy. It is recommended to migrate - // existing products to these categories as well. - // - // This field is immutable. - string product_category = 4; + // "homegoods", "apparel", and "toys" are still supported, but these should + // not be used for new products. + string product_category = 4 [(google.api.field_behavior) = IMMUTABLE]; // Key-value pairs that can be attached to a product. At query time, // constraints can be specified based on the product_labels. @@ -354,7 +410,11 @@ message Product { // to be supported soon. // // Multiple values can be assigned to the same key. One product may have up to - // 100 product_labels. + // 500 product_labels. + // + // Notice that the total number of distinct product_labels over all products + // in one ProductSet cannot exceed 1M, otherwise the product search pipeline + // will refuse to work for that ProductSet. repeated KeyValue product_labels = 5; } @@ -362,6 +422,11 @@ message Product { // million reference images. If the limit is exceeded, periodic indexing will // fail. message ProductSet { + option (google.api.resource) = { + type: "vision.googleapis.com/ProductSet" + pattern: "projects/{project}/locations/{location}/productSets/{product_set}" + }; + // The resource name of the ProductSet. // // Format is: @@ -380,18 +445,23 @@ message ProductSet { // "1970-01-01T00:00:00Z". // // This field is ignored when creating a ProductSet. - google.protobuf.Timestamp index_time = 3; + google.protobuf.Timestamp index_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. If there was an error with indexing the product set, the field // is populated. // // This field is ignored when creating a ProductSet. - google.rpc.Status index_error = 4; + google.rpc.Status index_error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A `ReferenceImage` represents a product image and its associated metadata, // such as bounding boxes. message ReferenceImage { + option (google.api.resource) = { + type: "vision.googleapis.com/ReferenceImage" + pattern: "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" + }; + // The resource name of the reference image. // // Format is: @@ -401,34 +471,37 @@ message ReferenceImage { // This field is ignored when creating a reference image. string name = 1; - // The Google Cloud Storage URI of the reference image. + // Required. The Google Cloud Storage URI of the reference image. // // The URI must start with `gs://`. - // - // Required. - string uri = 2; + string uri = 2 [(google.api.field_behavior) = REQUIRED]; - // Bounding polygons around the areas of interest in the reference image. - // Optional. If this field is empty, the system will try to detect regions of + // Optional. Bounding polygons around the areas of interest in the reference image. + // If this field is empty, the system will try to detect regions of // interest. At most 10 bounding polygons will be used. // // The provided shape is converted into a non-rotated rectangle. Once // converted, the small edge of the rectangle must be greater than or equal // to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 // is not). - repeated BoundingPoly bounding_polys = 3; + repeated BoundingPoly bounding_polys = 3 [(google.api.field_behavior) = OPTIONAL]; } // Request message for the `CreateProduct` method. message CreateProductRequest { - // The project in which the Product should be created. + // Required. The project in which the Product should be created. // // Format is // `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // The product to create. - Product product = 2; + // Required. The product to create. + Product product = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for this Product. If set, the server will // attempt to use this value as the resource id. If it is already in use, an @@ -439,11 +512,16 @@ message CreateProductRequest { // Request message for the `ListProducts` method. message ListProductsRequest { - // The project OR ProductSet from which Products should be listed. + // Required. The project OR ProductSet from which Products should be listed. // // Format: // `projects/PROJECT_ID/locations/LOC_ID` - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -464,18 +542,23 @@ message ListProductsResponse { // Request message for the `GetProduct` method. message GetProductRequest { - // Resource name of the Product to get. + // Required. Resource name of the Product to get. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; } // Request message for the `UpdateProduct` method. message UpdateProductRequest { - // The Product resource which replaces the one on the server. + // Required. The Product resource which replaces the one on the server. // product.name is immutable. - Product product = 1; + Product product = 1 [(google.api.field_behavior) = REQUIRED]; // The [FieldMask][google.protobuf.FieldMask] that specifies which fields // to update. @@ -487,22 +570,32 @@ message UpdateProductRequest { // Request message for the `DeleteProduct` method. message DeleteProductRequest { - // Resource name of product to delete. + // Required. Resource name of product to delete. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; } // Request message for the `CreateProductSet` method. message CreateProductSetRequest { - // The project in which the ProductSet should be created. + // Required. The project in which the ProductSet should be created. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // The ProductSet to create. - ProductSet product_set = 2; + // Required. The ProductSet to create. + ProductSet product_set = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for this ProductSet. If set, the server will // attempt to use this value as the resource id. If it is already in use, an @@ -513,10 +606,15 @@ message CreateProductSetRequest { // Request message for the `ListProductSets` method. message ListProductSetsRequest { - // The project from which ProductSets should be listed. + // Required. The project from which ProductSets should be listed. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -537,17 +635,22 @@ message ListProductSetsResponse { // Request message for the `GetProductSet` method. message GetProductSetRequest { - // Resource name of the ProductSet to get. + // Required. Resource name of the ProductSet to get. // // Format is: // `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; } // Request message for the `UpdateProductSet` method. message UpdateProductSetRequest { - // The ProductSet resource which replaces the one on the server. - ProductSet product_set = 1; + // Required. The ProductSet resource which replaces the one on the server. + ProductSet product_set = 1 [(google.api.field_behavior) = REQUIRED]; // The [FieldMask][google.protobuf.FieldMask] that specifies which fields to // update. @@ -558,24 +661,34 @@ message UpdateProductSetRequest { // Request message for the `DeleteProductSet` method. message DeleteProductSetRequest { - // Resource name of the ProductSet to delete. + // Required. Resource name of the ProductSet to delete. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; } // Request message for the `CreateReferenceImage` method. message CreateReferenceImageRequest { - // Resource name of the product in which to create the reference image. + // Required. Resource name of the product in which to create the reference image. // // Format is // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1; - - // The reference image to create. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; + + // Required. The reference image to create. // If an image ID is specified, it is ignored. - ReferenceImage reference_image = 2; + ReferenceImage reference_image = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for the ReferenceImage to be added. If set, // the server will attempt to use this value as the resource id. If it is @@ -586,11 +699,16 @@ message CreateReferenceImageRequest { // Request message for the `ListReferenceImages` method. message ListReferenceImagesRequest { - // Resource name of the product containing the reference images. + // Required. Resource name of the product containing the reference images. // // Format is // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -616,61 +734,96 @@ message ListReferenceImagesResponse { // Request message for the `GetReferenceImage` method. message GetReferenceImageRequest { - // The resource name of the ReferenceImage to get. + // Required. The resource name of the ReferenceImage to get. // // Format is: // // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; } // Request message for the `DeleteReferenceImage` method. message DeleteReferenceImageRequest { - // The resource name of the reference image to delete. + // Required. The resource name of the reference image to delete. // // Format is: // // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; } // Request message for the `AddProductToProductSet` method. message AddProductToProductSetRequest { - // The resource name for the ProductSet to modify. + // Required. The resource name for the ProductSet to modify. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; - // The resource name for the Product to be added to this ProductSet. + // Required. The resource name for the Product to be added to this ProductSet. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2; + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; } // Request message for the `RemoveProductFromProductSet` method. message RemoveProductFromProductSetRequest { - // The resource name for the ProductSet to modify. + // Required. The resource name for the ProductSet to modify. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; - // The resource name for the Product to be removed from this ProductSet. + // Required. The resource name for the Product to be removed from this ProductSet. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2; + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; } // Request message for the `ListProductsInProductSet` method. message ListProductsInProductSetRequest { - // The ProductSet resource for which to retrieve Products. + // Required. The ProductSet resource for which to retrieve Products. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -717,17 +870,15 @@ message ImportProductSetsGcsSource { // `product-display-name` column refers to // [display_name][google.cloud.vision.v1.Product.display_name], the // `product-category` column refers to - // [product_category][google.cloud.vision.v1.Product.product_category], and - // the `labels` column refers to - // [product_labels][google.cloud.vision.v1.Product.product_labels]. + // [product_category][google.cloud.vision.v1.Product.product_category], and the + // `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels]. // // The `image-id` column is optional but must be unique if provided. If it is // empty, the system will automatically assign a unique id to the image. // // The `product-display-name` column is optional. If it is empty, the system - // sets the [display_name][google.cloud.vision.v1.Product.display_name] field - // for the product to a space (" "). You can update the `display_name` later - // by using the API. + // sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a + // space (" "). You can update the `display_name` later by using the API. // // If a `Product` with the specified `product-id` already exists, then the // system ignores the `product-display-name`, `product-category`, and `labels` @@ -770,22 +921,25 @@ message ImportProductSetsInputConfig { // Request message for the `ImportProductSets` method. message ImportProductSetsRequest { - // The project in which the ProductSets should be imported. + // Required. The project in which the ProductSets should be imported. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; - - // The input content for the list of requests. - ImportProductSetsInputConfig input_config = 2; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The input content for the list of requests. + ImportProductSetsInputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED]; } // Response message for the `ImportProductSets` method. // // This message is returned by the -// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] -// method in the returned -// [google.longrunning.Operation.response][google.longrunning.Operation.response] -// field. +// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned +// [google.longrunning.Operation.response][google.longrunning.Operation.response] field. message ImportProductSetsResponse { // The list of reference_images that are imported successfully. repeated ReferenceImage reference_images = 1; @@ -832,7 +986,41 @@ message BatchOperationMetadata { google.protobuf.Timestamp submit_time = 2; // The time when the batch request is finished and - // [google.longrunning.Operation.done][google.longrunning.Operation.done] is - // set to true. + // [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. google.protobuf.Timestamp end_time = 3; } + +// Config to control which ProductSet contains the Products to be deleted. +message ProductSetPurgeConfig { + // The ProductSet that contains the Products to delete. If a Product is a + // member of product_set_id in addition to other ProductSets, the Product will + // still be deleted. + string product_set_id = 1; +} + +// Request message for the `PurgeProducts` method. +message PurgeProductsRequest { + // The Products to delete. + oneof target { + // Specify which ProductSet contains the Products to be deleted. + ProductSetPurgeConfig product_set_purge_config = 2; + + // If delete_orphan_products is true, all Products that are not in any + // ProductSet will be deleted. + bool delete_orphan_products = 3; + } + + // Required. The project and location in which the Products should be deleted. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The default value is false. Override this value to true to actually perform + // the purge. + bool force = 4; +} diff --git a/google/cloud/vision/v1/text_annotation.proto b/google/cloud/vision/v1/text_annotation.proto index afbebea51..97f9c8fa9 100644 --- a/google/cloud/vision/v1/text_annotation.proto +++ b/google/cloud/vision/v1/text_annotation.proto @@ -17,8 +17,8 @@ syntax = "proto3"; package google.cloud.vision.v1; -import "google/api/annotations.proto"; import "google/cloud/vision/v1/geometry.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; @@ -32,9 +32,8 @@ option objc_class_prefix = "GCVN"; // TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol // Each structural component, starting from Page, may further have their own // properties. Properties describe detected languages, breaks etc.. Please refer -// to the -// [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] -// message definition below for more detail. +// to the [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] message definition below for more +// detail. message TextAnnotation { // Detected language for a structural component. message DetectedLanguage { @@ -194,7 +193,7 @@ message Paragraph { // and the vertex order will still be (0, 1, 2, 3). BoundingPoly bounding_box = 2; - // List of words in this paragraph. + // List of all words in this paragraph. repeated Word words = 3; // Confidence of the OCR results for the paragraph. Range [0, 1]. @@ -250,7 +249,7 @@ message Symbol { // 2----3 // | | // 1----0 - // and the vertice order will still be (0, 1, 2, 3). + // and the vertex order will still be (0, 1, 2, 3). BoundingPoly bounding_box = 2; // The actual UTF-8 representation of the symbol. diff --git a/google/cloud/vision/v1/vision_gapic.legacy.yaml b/google/cloud/vision/v1/vision_gapic.legacy.yaml new file mode 100644 index 000000000..62c87c780 --- /dev/null +++ b/google/cloud/vision/v1/vision_gapic.legacy.yaml @@ -0,0 +1,640 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.vision.v1 + release_level: GA + python: + package_name: google.cloud.vision_v1.gapic + go: + package_name: cloud.google.com/go/vision/apiv1 + release_level: GA + csharp: + package_name: Google.Cloud.Vision.V1 + release_level: GA + ruby: + package_name: Google::Cloud::Vision::V1 + php: + package_name: Google\Cloud\Vision\V1 + nodejs: + package_name: vision.v1 + domain_layer_location: google-cloud +interfaces: +- name: google.cloud.vision.v1.ImageAnnotator + smoke_test: + method: BatchAnnotateImages + init_fields: + - requests[0].image.source.gcs_image_uri="gs://cloud-samples-data/vision/face_detection/celebrity_recognition/sergey.jpg" + - requests[0].features[0].type=FACE_DETECTION + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: BatchAnnotateImages + flattening: + groups: + - parameters: + - requests + required_fields: + - requests + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: BatchAnnotateFiles + flattening: + groups: + - parameters: + - requests + required_fields: + - requests + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + samples: + standalone: + - region_tag: vision_batch_annotate_files_gcs + value_sets: [vision_batch_annotate_files_gcs] + - region_tag: vision_batch_annotate_files + value_sets: [vision_batch_annotate_files] + sample_value_sets: + - id: vision_batch_annotate_files_gcs + description: "Perform batch file annotation" + parameters: + defaults: + - requests[0].input_config.gcs_source.uri=gs://cloud-samples-data/vision/document_understanding/kafka.pdf + - requests[0].features[0].type=DOCUMENT_TEXT_DETECTION + - requests[0].pages[0]=1 + - requests[0].pages[1]=2 + - requests[0].pages[2]="-1" + attributes: + - parameter: requests[0].input_config.gcs_source.uri + sample_argument_name: storage_uri + description: "Cloud Storage URI to source image in the format gs://[bucket]/[file]" + - parameter: requests[0].pages[0] + description: | + The service can process up to 5 pages per document file. + Here we specify the first, second, and last page of the document to be processed. + on_success: + - loop: + collection: $resp.responses[0].responses + variable: image_response + body: + - print: ["Full text: %s", image_response.full_text_annotation.text] + - loop: + collection: image_response.full_text_annotation.pages + variable: page + body: + - loop: + collection: page.blocks + variable: block + body: + - print: ["\nBlock confidence: %s", block.confidence] + - loop: + collection: block.paragraphs + variable: par + body: + - print: ["\tParagraph confidence: %s", par.confidence] + - loop: + collection: par.words + variable: word + body: + - print: ["\t\tWord confidence: %s", word.confidence] + - loop: + collection: word.symbols + variable: symbol + body: + - print: ["\t\t\tSymbol: %s, (confidence: %s)", symbol.text, symbol.confidence] + - id: vision_batch_annotate_files + description: "Perform batch file annotation" + parameters: + defaults: + - requests[0].input_config.mime_type="application/pdf" + - requests[0].input_config.content="resources/kafka.pdf" + - requests[0].features[0].type=DOCUMENT_TEXT_DETECTION + - requests[0].pages[0]=1 + - requests[0].pages[1]=2 + - requests[0].pages[2]="-1" + attributes: + - parameter: requests[0].input_config.mime_type + description: "Supported mime_type: application/pdf, image/tiff, image/gif" + - parameter: requests[0].input_config.content + sample_argument_name: file_path + read_file: true + description: Path to local pdf file, e.g. /path/document.pdf + - parameter: requests[0].pages[0] + description: "The service can process up to 5 pages per document file. Here we specify the first, second, and last page of the document to be processed." + on_success: + - loop: + collection: $resp.responses[0].responses + variable: image_response + body: + - print: ["Full text: %s", image_response.full_text_annotation.text] + - loop: + collection: image_response.full_text_annotation.pages + variable: page + body: + - loop: + collection: page.blocks + variable: block + body: + - print: ["\nBlock confidence: %s", block.confidence] + - loop: + collection: block.paragraphs + variable: par + body: + - print: ["\tParagraph confidence: %s", par.confidence] + - loop: + collection: par.words + variable: word + body: + - print: ["\t\tWord confidence: %s", word.confidence] + - loop: + collection: word.symbols + variable: symbol + body: + - print: ["\t\t\tSymbol: %s, (confidence: %s)", symbol.text, symbol.confidence] + - name: AsyncBatchAnnotateImages + flattening: + groups: + - parameters: + - requests + - output_config + required_fields: + - requests + - output_config + retry_codes_name: idempotent + retry_params_name: default + long_running: + return_type: google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse + metadata_type: google.cloud.vision.v1.OperationMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + timeout_millis: 60000 + samples: + standalone: + - region_tag: vision_async_batch_annotate_images + value_sets: [vision_async_batch_annotate_images] + sample_value_sets: + - id: vision_async_batch_annotate_images + title: Async Batch Image Annotation + description: "Perform async batch image annotation" + parameters: + defaults: + - requests[0].image.source.image_uri=gs://cloud-samples-data/vision/label/wakeupcat.jpg + - requests[0].features[0].type=LABEL_DETECTION + - requests[0].features[1].type=IMAGE_PROPERTIES + - output_config.gcs_destination.uri=gs://your-bucket/prefix/ + - output_config.batch_size=2 + attributes: + - parameter: requests[0].image.source.image_uri + sample_argument_name: input_image_uri + - parameter: output_config.gcs_destination.uri + sample_argument_name: output_uri + - parameter: output_config.batch_size + description: The max number of responses to output in each JSON file + on_success: + - comment: ["The output is written to GCS with the provided output_uri as prefix"] + - define: gcs_output_uri=$resp.output_config.gcs_destination.uri + - print: ["Output written to GCS with prefix: %s", gcs_output_uri] + - name: AsyncBatchAnnotateFiles + flattening: + groups: + - parameters: + - requests + required_fields: + - requests + retry_codes_name: idempotent + retry_params_name: default + long_running: + return_type: google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse + metadata_type: google.cloud.vision.v1.OperationMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + timeout_millis: 60000 +- name: google.cloud.vision.v1.ProductSearch + collections: + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/productSets/{product_set} + entity_name: product_set + - name_pattern: projects/{project}/locations/{location}/products/{product} + entity_name: product + - name_pattern: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image} + entity_name: reference_image + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: CreateProductSet + flattening: + groups: + - parameters: + - parent + - product_set + - product_set_id + required_fields: + - parent + - product_set + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + parent: location + - name: ListProductSets + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: product_sets + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + parent: location + - name: GetProductSet + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + name: product_set + - name: UpdateProductSet + flattening: + groups: + - parameters: + - product_set + - update_mask + required_fields: + - product_set + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + product_set.name: product_set + - name: DeleteProductSet + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + name: product_set + - name: CreateProduct + flattening: + groups: + - parameters: + - parent + - product + - product_id + required_fields: + - parent + - product + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + parent: location + - name: ListProducts + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: products + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + parent: location + - name: GetProduct + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + name: product + - name: UpdateProduct + flattening: + groups: + - parameters: + - product + - update_mask + required_fields: + - product + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + product.name: product + - name: DeleteProduct + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + name: product + - name: CreateReferenceImage + flattening: + groups: + - parameters: + - parent + - reference_image + - reference_image_id + required_fields: + - parent + - reference_image + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + parent: product + - name: DeleteReferenceImage + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: reference_image + timeout_millis: 60000 + - name: ListReferenceImages + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: reference_images + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + parent: product + - name: GetReferenceImage + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: reference_image + timeout_millis: 60000 + - name: AddProductToProductSet + flattening: + groups: + - parameters: + - name + - product + required_fields: + - name + - product + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + name: product_set + product: product + - name: RemoveProductFromProductSet + flattening: + groups: + - parameters: + - name + - product + required_fields: + - name + - product + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + name: product_set + product: product + - name: ListProductsInProductSet + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: products + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + name: product_set + - name: ImportProductSets + flattening: + groups: + - parameters: + - parent + - input_config + required_fields: + - parent + - input_config + long_running: + return_type: google.cloud.vision.v1.ImportProductSetsResponse + metadata_type: google.cloud.vision.v1.BatchOperationMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + parent: location + - name: PurgeProducts + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + long_running: + return_type: google.protobuf.Empty + metadata_type: google.cloud.vision.v1.BatchOperationMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + field_name_patterns: + parent: location +# Force string formatting functions to be generated. +enable_string_format_functions_override: true +resource_name_generation: +- message_name: CreateProductSetRequest + field_entity_map: + parent: location +- message_name: ListProductSetsRequest + field_entity_map: + parent: location +- message_name: GetProductSetRequest + field_entity_map: + name: product_set +- message_name: UpdateProductSetRequest + field_entity_map: + product_set.name: product_set +- message_name: DeleteProductSetRequest + field_entity_map: + name: product_set +- message_name: CreateProductRequest + field_entity_map: + parent: location +- message_name: ListProductsRequest + field_entity_map: + parent: location +- message_name: GetProductRequest + field_entity_map: + name: product +- message_name: UpdateProductRequest + field_entity_map: + product.name: product +- message_name: DeleteProductRequest + field_entity_map: + name: product +- message_name: CreateReferenceImageRequest + field_entity_map: + parent: product +- message_name: DeleteReferenceImageRequest + field_entity_map: + name: reference_image +- message_name: ListReferenceImagesRequest + field_entity_map: + parent: product +- message_name: GetReferenceImageRequest + field_entity_map: + name: reference_image +- message_name: AddProductToProductSetRequest + field_entity_map: + name: product_set + product: product +- message_name: RemoveProductFromProductSetRequest + field_entity_map: + name: product_set + product: product +- message_name: ListProductsInProductSetRequest + field_entity_map: + name: product_set +- message_name: ImportProductSetsRequest + field_entity_map: + parent: location +- message_name: Product + field_entity_map: + name: product +- message_name: ProductSet + field_entity_map: + name: product_set +- message_name: PurgeProductsRequest + field_entity_map: + parent: location +- message_name: ReferenceImage + field_entity_map: + name: reference_image +- message_name: ProductSearchParams + field_entity_map: + product_set: product_set diff --git a/google/cloud/vision/v1/vision_gapic.yaml b/google/cloud/vision/v1/vision_gapic.yaml index bf83ed511..d8ef3af1e 100644 --- a/google/cloud/vision/v1/vision_gapic.yaml +++ b/google/cloud/vision/v1/vision_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.vision.v1 @@ -24,16 +24,8 @@ interfaces: smoke_test: method: BatchAnnotateImages init_fields: - - requests[0].image.source.gcs_image_uri="gs://gapic-toolkit/President_Barack_Obama.jpg" + - requests[0].image.source.gcs_image_uri="gs://cloud-samples-data/vision/face_detection/celebrity_recognition/sergey.jpg" - requests[0].features[0].type=FACE_DETECTION - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -45,25 +37,11 @@ interfaces: total_timeout_millis: 600000 methods: - name: BatchAnnotateImages - flattening: - groups: - - parameters: - - requests - required_fields: - - requests retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - name: BatchAnnotateFiles - flattening: - groups: - - parameters: - - requests - required_fields: - - requests retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 samples: standalone: - region_tag: vision_batch_annotate_files_gcs @@ -168,24 +146,13 @@ interfaces: body: - print: ["\t\t\tSymbol: %s, (confidence: %s)", symbol.text, symbol.confidence] - name: AsyncBatchAnnotateImages - flattening: - groups: - - parameters: - - requests - - output_config - required_fields: - - requests - - output_config retry_codes_name: idempotent retry_params_name: default long_running: - return_type: google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse - metadata_type: google.cloud.vision.v1.OperationMetadata initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - timeout_millis: 60000 samples: standalone: - region_tag: vision_async_batch_annotate_images @@ -213,39 +180,14 @@ interfaces: - define: gcs_output_uri=$resp.output_config.gcs_destination.uri - print: ["Output written to GCS with prefix: %s", gcs_output_uri] - name: AsyncBatchAnnotateFiles - flattening: - groups: - - parameters: - - requests - required_fields: - - requests retry_codes_name: idempotent retry_params_name: default long_running: - return_type: google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse - metadata_type: google.cloud.vision.v1.OperationMetadata initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - timeout_millis: 60000 - name: google.cloud.vision.v1.ProductSearch - collections: - - name_pattern: projects/{project}/locations/{location} - entity_name: location - - name_pattern: projects/{project}/locations/{location}/productSets/{product_set} - entity_name: product_set - - name_pattern: projects/{project}/locations/{location}/products/{product} - entity_name: product - - name_pattern: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image} - entity_name: reference_image - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -257,361 +199,60 @@ interfaces: total_timeout_millis: 600000 methods: - name: CreateProductSet - flattening: - groups: - - parameters: - - parent - - product_set - - product_set_id - required_fields: - - parent - - product_set - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - parent: location - name: ListProductSets - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: product_sets - retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - parent: location - name: GetProductSet - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - name: product_set - name: UpdateProductSet - flattening: - groups: - - parameters: - - product_set - - update_mask - required_fields: - - product_set - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - product_set.name: product_set - name: DeleteProductSet - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - name: product_set - name: CreateProduct - flattening: - groups: - - parameters: - - parent - - product - - product_id - required_fields: - - parent - - product - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - parent: location - name: ListProducts - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: products - retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - parent: location - name: GetProduct - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - name: product - name: UpdateProduct - flattening: - groups: - - parameters: - - product - - update_mask - required_fields: - - product - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - product.name: product - name: DeleteProduct - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - name: product - name: CreateReferenceImage - flattening: - groups: - - parameters: - - parent - - reference_image - - reference_image_id - required_fields: - - parent - - reference_image - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - parent: product - name: DeleteReferenceImage - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: reference_image - timeout_millis: 60000 - name: ListReferenceImages - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: reference_images retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - parent: product - name: GetReferenceImage - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: reference_image - timeout_millis: 60000 - name: AddProductToProductSet - flattening: - groups: - - parameters: - - name - - product - required_fields: - - name - - product - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - name: product_set - product: product - name: RemoveProductFromProductSet - flattening: - groups: - - parameters: - - name - - product - required_fields: - - name - - product - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - name: product_set - product: product - name: ListProductsInProductSet - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: products - retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - name: product_set - name: ImportProductSets - flattening: - groups: - - parameters: - - parent - - input_config - required_fields: - - parent - - input_config long_running: - return_type: google.cloud.vision.v1.ImportProductSetsResponse - metadata_type: google.cloud.vision.v1.BatchOperationMetadata initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 - field_name_patterns: - parent: location + - name: PurgeProducts + long_running: + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + retry_params_name: default # Force string formatting functions to be generated. enable_string_format_functions_override: true -resource_name_generation: -- message_name: CreateProductSetRequest - field_entity_map: - parent: location -- message_name: ListProductSetsRequest - field_entity_map: - parent: location -- message_name: GetProductSetRequest - field_entity_map: - name: product_set -- message_name: UpdateProductSetRequest - field_entity_map: - product_set.name: product_set -- message_name: DeleteProductSetRequest - field_entity_map: - name: product_set -- message_name: CreateProductRequest - field_entity_map: - parent: location -- message_name: ListProductsRequest - field_entity_map: - parent: location -- message_name: GetProductRequest - field_entity_map: - name: product -- message_name: UpdateProductRequest - field_entity_map: - product.name: product -- message_name: DeleteProductRequest - field_entity_map: - name: product -- message_name: CreateReferenceImageRequest - field_entity_map: - parent: product -- message_name: DeleteReferenceImageRequest - field_entity_map: - name: reference_image -- message_name: ListReferenceImagesRequest - field_entity_map: - parent: product -- message_name: GetReferenceImageRequest - field_entity_map: - name: reference_image -- message_name: AddProductToProductSetRequest - field_entity_map: - name: product_set - product: product -- message_name: RemoveProductFromProductSetRequest - field_entity_map: - name: product_set - product: product -- message_name: ListProductsInProductSetRequest - field_entity_map: - name: product_set -- message_name: ImportProductSetsRequest - field_entity_map: - parent: location -- message_name: Product - field_entity_map: - name: product -- message_name: ProductSet - field_entity_map: - name: product_set -- message_name: ReferenceImage - field_entity_map: - name: reference_image -- message_name: ProductSearchParams - field_entity_map: - product_set: product_set diff --git a/google/cloud/vision/v1/vision_grpc_service_config.json b/google/cloud/vision/v1/vision_grpc_service_config.json new file mode 100755 index 000000000..93863b5c7 --- /dev/null +++ b/google/cloud/vision/v1/vision_grpc_service_config.json @@ -0,0 +1,136 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.vision.v1.ImageAnnotator", + "method": "BatchAnnotateImages" + }, + { + "service": "google.cloud.vision.v1.ImageAnnotator", + "method": "BatchAnnotateFiles" + }, + { + "service": "google.cloud.vision.v1.ImageAnnotator", + "method": "AsyncBatchAnnotateImages" + }, + { + "service": "google.cloud.vision.v1.ImageAnnotator", + "method": "AsyncBatchAnnotateFiles" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "CreateProductSet" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "CreateProduct" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "CreateReferenceImage" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "ImportProductSets" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "PurgeProducts" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + ] + } + }, + { + "name": [ + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "ListProductSets" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "GetProductSet" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "UpdateProductSet" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "DeleteProductSet" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "ListProducts" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "GetProduct" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "UpdateProduct" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "DeleteProduct" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "DeleteReferenceImage" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "ListReferenceImages" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "GetReferenceImage" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "AddProductToProductSet" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "RemoveProductFromProductSet" + }, + { + "service": "google.cloud.vision.v1.ProductSearch", + "method": "ListProductsInProductSet" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/vision/vision_v1.yaml b/google/cloud/vision/v1/vision_v1.yaml similarity index 74% rename from google/cloud/vision/vision_v1.yaml rename to google/cloud/vision/v1/vision_v1.yaml index 4169dafe9..4a45e9728 100644 --- a/google/cloud/vision/vision_v1.yaml +++ b/google/cloud/vision/v1/vision_v1.yaml @@ -33,7 +33,17 @@ http: authentication: rules: - - selector: '*' + - selector: 'google.cloud.vision.v1.ImageAnnotator.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-vision + - selector: 'google.cloud.vision.v1.ProductSearch.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-vision + - selector: 'google.longrunning.Operations.*' oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform, diff --git a/google/cloud/vision/v1/web_detection.proto b/google/cloud/vision/v1/web_detection.proto index f4a22019c..5ba864038 100644 --- a/google/cloud/vision/v1/web_detection.proto +++ b/google/cloud/vision/v1/web_detection.proto @@ -50,17 +50,6 @@ message WebDetection { float score = 2; } - // Label to provide extra metadata for the web detection. - message WebLabel { - // Label for extra metadata. - string label = 1; - - // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; - } - // Metadata for web pages. message WebPage { // The result web page URL. @@ -83,6 +72,17 @@ message WebDetection { repeated WebImage partial_matching_images = 5; } + // Label to provide extra metadata for the web detection. + message WebLabel { + // Label for extra metadata. + string label = 1; + + // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + // For more information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + } + // Deduced entities from similar images on the Internet. repeated WebEntity web_entities = 1; diff --git a/google/cloud/vision/v1p1beta1/BUILD.bazel b/google/cloud/vision/v1p1beta1/BUILD.bazel index 9e0c8f78c..13f33e046 100644 --- a/google/cloud/vision/v1p1beta1/BUILD.bazel +++ b/google/cloud/vision/v1p1beta1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -16,7 +19,8 @@ proto_library( ], deps = [ "//google/api:annotations_proto", - "//google/longrunning:operations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/rpc:status_proto", "//google/type:color_proto", "//google/type:latlng_proto", @@ -25,7 +29,10 @@ proto_library( proto_library_with_info( name = "vision_proto_with_info", - deps = [":vision_proto"], + deps = [ + ":vision_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -33,18 +40,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "vision_java_proto", deps = [":vision_proto"], @@ -53,51 +55,40 @@ java_proto_library( java_grpc_library( name = "vision_java_grpc", srcs = [":vision_proto"], - deps = [":vision_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "vision_resource_name_java_proto", - gapic_yaml = "vision_gapic.yaml", - deps = [":vision_proto"], + deps = [":vision_java_proto"], ) java_gapic_library( name = "vision_java_gapic", src = ":vision_proto_with_info", gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p1beta1", service_yaml = "//google/cloud/vision:vision_v1p1beta1.yaml", - test_deps = [":vision_java_grpc"], + test_deps = [ + ":vision_java_grpc", + ], deps = [ ":vision_java_proto", - ":vision_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":vision_java_gapic_test", +java_gapic_test( + name = "vision_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.vision.v1p1beta1.ImageAnnotatorClientTest", ], -) for test_name in [ - "com.google.cloud.vision.v1p1beta1.ImageAnnotatorClientTest", -]] + runtime_deps = [":vision_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-vision-v1p1beta1-java", - client_deps = [":vision_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":vision_java_gapic_test"], - grpc_deps = [":vision_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":vision_java_gapic", + ":vision_java_grpc", ":vision_java_proto", ":vision_proto", - ":vision_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -105,10 +96,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -118,7 +109,6 @@ go_proto_library( protos = [":vision_proto"], deps = [ "//google/api:annotations_go_proto", - "//google/longrunning:longrunning_go_proto", "//google/rpc:status_go_proto", "//google/type:color_go_proto", "//google/type:latlng_go_proto", @@ -127,15 +117,12 @@ go_proto_library( go_gapic_library( name = "vision_go_gapic", - src = ":vision_proto_with_info", - gapic_yaml = "vision_gapic.yaml", - importpath = "cloud.google.com/go/vision/apiv1p1beta1", + srcs = [":vision_proto_with_info"], + grpc_service_config = "vision_grpc_service_config.json", + importpath = "cloud.google.com/go/vision/apiv1p1beta1;vision", service_yaml = "//google/cloud/vision:vision_v1p1beta1.yaml", deps = [ ":vision_go_proto", - "//google/longrunning:longrunning_go_gapic", - "//google/longrunning:longrunning_go_proto", - "@com_google_cloud_go//longrunning:go_default_library", ], ) @@ -146,13 +133,234 @@ go_test( importpath = "cloud.google.com/go/vision/apiv1p1beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-vision-v1p1beta1-go", deps = [ ":vision_go_gapic", - ":vision_go_gapic_srcjar-smoke-test.srcjar", ":vision_go_gapic_srcjar-test.srcjar", ":vision_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "vision_moved_proto", + srcs = [":vision_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/rpc:status_proto", + "//google/type:color_proto", + "//google/type:latlng_proto", + ], +) + +py_proto_library( + name = "vision_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":vision_moved_proto"], +) + +py_grpc_library( + name = "vision_py_grpc", + srcs = [":vision_moved_proto"], + deps = [":vision_py_proto"], +) + +py_gapic_library( + name = "vision_py_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p1beta1", + service_yaml = "//google/cloud/vision:vision_v1p1beta1.yaml", + deps = [ + ":vision_py_grpc", + ":vision_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "vision-v1p1beta1-py", + deps = [ + ":vision_py_gapic", + ":vision_py_grpc", + ":vision_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "vision_php_proto", + deps = [":vision_proto"], +) + +php_grpc_library( + name = "vision_php_grpc", + srcs = [":vision_proto"], + deps = [":vision_php_proto"], +) + +php_gapic_library( + name = "vision_php_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p1beta1", + service_yaml = "//google/cloud/vision:vision_v1p1beta1.yaml", + deps = [ + ":vision_php_grpc", + ":vision_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-vision-v1p1beta1-php", + deps = [ + ":vision_php_gapic", + ":vision_php_grpc", + ":vision_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "vision_nodejs_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p1beta1", + service_yaml = "//google/cloud/vision:vision_v1p1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "vision-v1p1beta1-nodejs", + deps = [ + ":vision_nodejs_gapic", + ":vision_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "vision_ruby_proto", + deps = [":vision_proto"], +) + +ruby_grpc_library( + name = "vision_ruby_grpc", + srcs = [":vision_proto"], + deps = [":vision_ruby_proto"], +) + +ruby_gapic_library( + name = "vision_ruby_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p1beta1", + service_yaml = "//google/cloud/vision:vision_v1p1beta1.yaml", + deps = [ + ":vision_ruby_grpc", + ":vision_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-vision-v1p1beta1-ruby", + deps = [ + ":vision_ruby_gapic", + ":vision_ruby_grpc", + ":vision_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "vision_csharp_proto", + deps = [":vision_proto"], +) + +csharp_grpc_library( + name = "vision_csharp_grpc", + srcs = [":vision_proto"], + deps = [":vision_csharp_proto"], +) + +csharp_gapic_library( + name = "vision_csharp_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p1beta1", + service_yaml = "//google/cloud/vision:vision_v1p1beta1.yaml", + deps = [ + ":vision_csharp_grpc", + ":vision_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-vision-v1p1beta1-csharp", + deps = [ + ":vision_csharp_gapic", + ":vision_csharp_grpc", + ":vision_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/vision/v1p1beta1/image_annotator.proto b/google/cloud/vision/v1p1beta1/image_annotator.proto index 4869a3311..4f5ada70d 100644 --- a/google/cloud/vision/v1p1beta1/image_annotator.proto +++ b/google/cloud/vision/v1p1beta1/image_annotator.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.vision.v1p1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/cloud/vision/v1p1beta1/geometry.proto"; import "google/cloud/vision/v1p1beta1/text_annotation.proto"; import "google/cloud/vision/v1p1beta1/web_detection.proto"; @@ -34,6 +37,11 @@ option java_package = "com.google.cloud.vision.v1p1beta1"; // images, such as face, landmark, logo, label, and text detection. The // ImageAnnotator service returns detected entities from the images. service ImageAnnotator { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + // Run image detection and annotation for a batch of images. rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { @@ -41,6 +49,7 @@ service ImageAnnotator { post: "/v1p1beta1/images:annotate" body: "*" }; + option (google.api.method_signature) = "requests"; } } @@ -493,7 +502,7 @@ message ImageContext { // setting a hint will help get better results (although it will be a // significant hindrance if the hint is wrong). Text detection returns an // error if one or more of the specified languages is not one of the - // [supported languages](/vision/docs/languages). + // [supported languages](https://cloud.google.com/vision/docs/languages). repeated string language_hints = 2; // Parameters for crop hints annotation request. @@ -559,8 +568,8 @@ message AnnotateImageResponse { // Multiple image annotation requests are batched into a single service call. message BatchAnnotateImagesRequest { - // Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1; + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; } // Response to a batch image annotation request. diff --git a/google/cloud/vision/v1p1beta1/vision_gapic.legacy.yaml b/google/cloud/vision/v1p1beta1/vision_gapic.legacy.yaml new file mode 100644 index 000000000..12cfc5cbc --- /dev/null +++ b/google/cloud/vision/v1p1beta1/vision_gapic.legacy.yaml @@ -0,0 +1,55 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.vision.v1p1beta1 + python: + package_name: google.cloud.vision_v1p1beta1.gapic + go: + package_name: cloud.google.com/go/vision/apiv1p1beta1 + release_level: BETA + csharp: + package_name: Google.Cloud.Vision.V1P1Beta1 + release_level: BETA + ruby: + package_name: Google::Cloud::Vision::V1p1beta1 + php: + package_name: Google\Cloud\Vision\V1p1beta1 + nodejs: + package_name: vision.v1p1beta1 + domain_layer_location: google-cloud +interfaces: +- name: google.cloud.vision.v1p1beta1.ImageAnnotator + smoke_test: + method: BatchAnnotateImages + init_fields: + - requests[0].image.source.gcs_image_uri="gs://cloud-samples-data/vision/face_detection/celebrity_recognition/sergey.jpg" + - requests[0].features[0].type=FACE_DETECTION + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: BatchAnnotateImages + flattening: + groups: + - parameters: + - requests + required_fields: + - requests + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/cloud/vision/v1p1beta1/vision_gapic.yaml b/google/cloud/vision/v1p1beta1/vision_gapic.yaml index 07b9bd9d4..654b8f963 100644 --- a/google/cloud/vision/v1p1beta1/vision_gapic.yaml +++ b/google/cloud/vision/v1p1beta1/vision_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.vision.v1p1beta1 @@ -23,16 +23,8 @@ interfaces: smoke_test: method: BatchAnnotateImages init_fields: - - requests[0].image.source.gcs_image_uri="gs://gapic-toolkit/President_Barack_Obama.jpg" + - requests[0].image.source.gcs_image_uri="gs://cloud-samples-data/vision/face_detection/celebrity_recognition/sergey.jpg" - requests[0].features[0].type=FACE_DETECTION - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -44,12 +36,5 @@ interfaces: total_timeout_millis: 600000 methods: - name: BatchAnnotateImages - flattening: - groups: - - parameters: - - requests - required_fields: - - requests retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 diff --git a/google/cloud/vision/v1p1beta1/vision_grpc_service_config.json b/google/cloud/vision/v1p1beta1/vision_grpc_service_config.json new file mode 100755 index 000000000..be169976b --- /dev/null +++ b/google/cloud/vision/v1p1beta1/vision_grpc_service_config.json @@ -0,0 +1,22 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.vision.v1p1beta1.ImageAnnotator", + "method": "BatchAnnotateImages" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/vision/v1p1beta1/vision_v1p1beta1.yaml b/google/cloud/vision/v1p1beta1/vision_v1p1beta1.yaml new file mode 100644 index 000000000..7dc2b552f --- /dev/null +++ b/google/cloud/vision/v1p1beta1/vision_v1p1beta1.yaml @@ -0,0 +1,31 @@ +type: google.api.Service +config_version: 3 +name: vision.googleapis.com +title: Cloud Vision API + +apis: +- name: google.cloud.vision.v1p1beta1.ImageAnnotator + +types: +- name: google.cloud.vision.v1p1beta1.AnnotateFileResponse +- name: google.cloud.vision.v1p1beta1.AsyncBatchAnnotateFilesResponse +- name: google.cloud.vision.v1p1beta1.OperationMetadata + +documentation: + summary: |- + Integrates Google Vision features, including image labeling, face, logo, + and landmark detection, optical character recognition (OCR), and detection + of explicit content, into applications. + +authentication: + rules: + - selector: 'google.cloud.vision.v1p1beta1.ImageAnnotator.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-vision + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-vision diff --git a/google/cloud/vision/v1p2beta1/BUILD.bazel b/google/cloud/vision/v1p2beta1/BUILD.bazel index 8511d499b..27419a3cb 100644 --- a/google/cloud/vision/v1p2beta1/BUILD.bazel +++ b/google/cloud/vision/v1p2beta1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -16,6 +19,8 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/longrunning:operations_proto", "//google/rpc:status_proto", "//google/type:color_proto", @@ -26,7 +31,10 @@ proto_library( proto_library_with_info( name = "vision_proto_with_info", - deps = [":vision_proto"], + deps = [ + ":vision_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -34,18 +42,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "vision_java_proto", deps = [":vision_proto"], @@ -54,51 +57,40 @@ java_proto_library( java_grpc_library( name = "vision_java_grpc", srcs = [":vision_proto"], - deps = [":vision_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "vision_resource_name_java_proto", - gapic_yaml = "vision_gapic.yaml", - deps = [":vision_proto"], + deps = [":vision_java_proto"], ) java_gapic_library( name = "vision_java_gapic", src = ":vision_proto_with_info", gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p2beta1", service_yaml = "//google/cloud/vision:vision_v1p2beta1.yaml", - test_deps = [":vision_java_grpc"], + test_deps = [ + ":vision_java_grpc", + ], deps = [ ":vision_java_proto", - ":vision_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":vision_java_gapic_test", +java_gapic_test( + name = "vision_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.vision.v1p2beta1.ImageAnnotatorClientTest", ], -) for test_name in [ - "com.google.cloud.vision.v1p2beta1.ImageAnnotatorClientTest", -]] + runtime_deps = [":vision_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-vision-v1p2beta1-java", - client_deps = [":vision_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":vision_java_gapic_test"], - grpc_deps = [":vision_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":vision_java_gapic", + ":vision_java_grpc", ":vision_java_proto", ":vision_proto", - ":vision_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -106,10 +98,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -128,15 +120,16 @@ go_proto_library( go_gapic_library( name = "vision_go_gapic", - src = ":vision_proto_with_info", - gapic_yaml = "vision_gapic.yaml", - importpath = "cloud.google.com/go/vision/apiv1p2beta1", + srcs = [":vision_proto_with_info"], + grpc_service_config = "vision_grpc_service_config.json", + importpath = "cloud.google.com/go/vision/apiv1p2beta1;vision", service_yaml = "//google/cloud/vision:vision_v1p2beta1.yaml", deps = [ ":vision_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", ], ) @@ -147,13 +140,236 @@ go_test( importpath = "cloud.google.com/go/vision/apiv1p2beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-vision-v1p2beta1-go", deps = [ ":vision_go_gapic", - ":vision_go_gapic_srcjar-smoke-test.srcjar", ":vision_go_gapic_srcjar-test.srcjar", ":vision_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "vision_moved_proto", + srcs = [":vision_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "//google/type:color_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "vision_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":vision_moved_proto"], +) + +py_grpc_library( + name = "vision_py_grpc", + srcs = [":vision_moved_proto"], + deps = [":vision_py_proto"], +) + +py_gapic_library( + name = "vision_py_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p2beta1", + service_yaml = "//google/cloud/vision:vision_v1p2beta1.yaml", + deps = [ + ":vision_py_grpc", + ":vision_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "vision-v1p2beta1-py", + deps = [ + ":vision_py_gapic", + ":vision_py_grpc", + ":vision_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "vision_php_proto", + deps = [":vision_proto"], +) + +php_grpc_library( + name = "vision_php_grpc", + srcs = [":vision_proto"], + deps = [":vision_php_proto"], +) + +php_gapic_library( + name = "vision_php_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p2beta1", + service_yaml = "//google/cloud/vision:vision_v1p2beta1.yaml", + deps = [ + ":vision_php_grpc", + ":vision_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-vision-v1p2beta1-php", + deps = [ + ":vision_php_gapic", + ":vision_php_grpc", + ":vision_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "vision_nodejs_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p2beta1", + service_yaml = "//google/cloud/vision:vision_v1p2beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "vision-v1p2beta1-nodejs", + deps = [ + ":vision_nodejs_gapic", + ":vision_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "vision_ruby_proto", + deps = [":vision_proto"], +) + +ruby_grpc_library( + name = "vision_ruby_grpc", + srcs = [":vision_proto"], + deps = [":vision_ruby_proto"], +) + +ruby_gapic_library( + name = "vision_ruby_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p2beta1", + service_yaml = "//google/cloud/vision:vision_v1p2beta1.yaml", + deps = [ + ":vision_ruby_grpc", + ":vision_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-vision-v1p2beta1-ruby", + deps = [ + ":vision_ruby_gapic", + ":vision_ruby_grpc", + ":vision_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "vision_csharp_proto", + deps = [":vision_proto"], +) + +csharp_grpc_library( + name = "vision_csharp_grpc", + srcs = [":vision_proto"], + deps = [":vision_csharp_proto"], +) + +csharp_gapic_library( + name = "vision_csharp_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p2beta1", + service_yaml = "//google/cloud/vision:vision_v1p2beta1.yaml", + deps = [ + ":vision_csharp_grpc", + ":vision_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-vision-v1p2beta1-csharp", + deps = [ + ":vision_csharp_gapic", + ":vision_csharp_grpc", + ":vision_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/vision/v1p2beta1/image_annotator.proto b/google/cloud/vision/v1p2beta1/image_annotator.proto index c5fce50f9..87ae9f2c6 100644 --- a/google/cloud/vision/v1p2beta1/image_annotator.proto +++ b/google/cloud/vision/v1p2beta1/image_annotator.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.vision.v1p2beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/cloud/vision/v1p2beta1/geometry.proto"; import "google/cloud/vision/v1p2beta1/text_annotation.proto"; import "google/cloud/vision/v1p2beta1/web_detection.proto"; @@ -36,13 +39,18 @@ option java_package = "com.google.cloud.vision.v1p2beta1"; // images, such as face, landmark, logo, label, and text detection. The // ImageAnnotator service returns detected entities from the images. service ImageAnnotator { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + // Run image detection and annotation for a batch of images. - rpc BatchAnnotateImages(BatchAnnotateImagesRequest) - returns (BatchAnnotateImagesResponse) { + rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { option (google.api.http) = { post: "/v1p2beta1/images:annotate" body: "*" }; + option (google.api.method_signature) = "requests"; } // Run async image detection and annotation for a list of generic files (e.g. @@ -51,12 +59,16 @@ service ImageAnnotator { // `google.longrunning.Operations` interface. // `Operation.metadata` contains `OperationMetadata` (metadata). // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) - returns (google.longrunning.Operation) { + rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1p2beta1/files:asyncBatchAnnotate" body: "*" }; + option (google.api.method_signature) = "requests"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateFilesResponse" + metadata_type: "OperationMetadata" + }; } } @@ -521,7 +533,7 @@ message ImageContext { // setting a hint will help get better results (although it will be a // significant hindrance if the hint is wrong). Text detection returns an // error if one or more of the specified languages is not one of the - // [supported languages](/vision/docs/languages). + // [supported languages](https://cloud.google.com/vision/docs/languages). repeated string language_hints = 2; // Parameters for crop hints annotation request. @@ -612,8 +624,8 @@ message AnnotateFileResponse { // Multiple image annotation requests are batched into a single service call. message BatchAnnotateImagesRequest { - // Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1; + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; } // Response to a batch image annotation request. @@ -646,8 +658,8 @@ message AsyncAnnotateFileResponse { // Multiple async file annotation requests are batched into a single service // call. message AsyncBatchAnnotateFilesRequest { - // Individual async file annotation requests for this batch. - repeated AsyncAnnotateFileRequest requests = 1; + // Required. Individual async file annotation requests for this batch. + repeated AsyncAnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; } // Response to an async batch file annotation request. diff --git a/google/cloud/vision/v1p2beta1/vision_gapic.legacy.yaml b/google/cloud/vision/v1p2beta1/vision_gapic.legacy.yaml new file mode 100644 index 000000000..6d6699d79 --- /dev/null +++ b/google/cloud/vision/v1p2beta1/vision_gapic.legacy.yaml @@ -0,0 +1,72 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.vision.v1p2beta1 + python: + package_name: google.cloud.vision_v1p2beta1.gapic + go: + package_name: cloud.google.com/go/vision/apiv1p2beta1 + release_level: BETA + csharp: + package_name: Google.Cloud.Vision.V1P2Beta1 + release_level: BETA + ruby: + package_name: Google::Cloud::Vision::V1p2beta1 + php: + package_name: Google\Cloud\Vision\V1p2beta1 + nodejs: + package_name: vision.v1p2beta1 + domain_layer_location: google-cloud +interfaces: +- name: google.cloud.vision.v1p2beta1.ImageAnnotator + smoke_test: + method: BatchAnnotateImages + init_fields: + - requests[0].image.source.gcs_image_uri="gs://cloud-samples-data/vision/face_detection/celebrity_recognition/sergey.jpg" + - requests[0].features[0].type=FACE_DETECTION + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: BatchAnnotateImages + flattening: + groups: + - parameters: + - requests + required_fields: + - requests + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: AsyncBatchAnnotateFiles + flattening: + groups: + - parameters: + - requests + required_fields: + - requests + long_running: + return_type: google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse + metadata_type: google.cloud.vision.v1p2beta1.OperationMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/cloud/vision/v1p2beta1/vision_gapic.yaml b/google/cloud/vision/v1p2beta1/vision_gapic.yaml index 41d5c49b4..31f81e672 100644 --- a/google/cloud/vision/v1p2beta1/vision_gapic.yaml +++ b/google/cloud/vision/v1p2beta1/vision_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.vision.v1p2beta1 @@ -23,16 +23,8 @@ interfaces: smoke_test: method: BatchAnnotateImages init_fields: - - requests[0].image.source.gcs_image_uri="gs://gapic-toolkit/President_Barack_Obama.jpg" + - requests[0].image.source.gcs_image_uri="gs://cloud-samples-data/vision/face_detection/celebrity_recognition/sergey.jpg" - requests[0].features[0].type=FACE_DETECTION - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -44,29 +36,13 @@ interfaces: total_timeout_millis: 600000 methods: - name: BatchAnnotateImages - flattening: - groups: - - parameters: - - requests - required_fields: - - requests retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - name: AsyncBatchAnnotateFiles - flattening: - groups: - - parameters: - - requests - required_fields: - - requests long_running: - return_type: google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse - metadata_type: google.cloud.vision.v1p2beta1.OperationMetadata initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 diff --git a/google/cloud/vision/v1p2beta1/vision_grpc_service_config.json b/google/cloud/vision/v1p2beta1/vision_grpc_service_config.json new file mode 100755 index 000000000..f4b61a130 --- /dev/null +++ b/google/cloud/vision/v1p2beta1/vision_grpc_service_config.json @@ -0,0 +1,26 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.vision.v1p2beta1.ImageAnnotator", + "method": "BatchAnnotateImages" + }, + { + "service": "google.cloud.vision.v1p2beta1.ImageAnnotator", + "method": "AsyncBatchAnnotateFiles" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/vision/v1p2beta1/vision_v1p2beta1.yaml b/google/cloud/vision/v1p2beta1/vision_v1p2beta1.yaml new file mode 100644 index 000000000..0f43e1439 --- /dev/null +++ b/google/cloud/vision/v1p2beta1/vision_v1p2beta1.yaml @@ -0,0 +1,31 @@ +type: google.api.Service +config_version: 3 +name: vision.googleapis.com +title: Cloud Vision API + +apis: +- name: google.cloud.vision.v1p2beta1.ImageAnnotator + +types: +- name: google.cloud.vision.v1p2beta1.AnnotateFileResponse +- name: google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse +- name: google.cloud.vision.v1p2beta1.OperationMetadata + +documentation: + summary: |- + Integrates Google Vision features, including image labeling, face, logo, + and landmark detection, optical character recognition (OCR), and detection + of explicit content, into applications. + +authentication: + rules: + - selector: 'google.cloud.vision.v1p2beta1.ImageAnnotator.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-vision + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-vision diff --git a/google/cloud/vision/v1p3beta1/BUILD.bazel b/google/cloud/vision/v1p3beta1/BUILD.bazel index 371594f03..15d74217d 100644 --- a/google/cloud/vision/v1p3beta1/BUILD.bazel +++ b/google/cloud/vision/v1p3beta1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -18,6 +21,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/longrunning:operations_proto", "//google/rpc:status_proto", "//google/type:color_proto", @@ -30,7 +36,10 @@ proto_library( proto_library_with_info( name = "vision_proto_with_info", - deps = [":vision_proto"], + deps = [ + ":vision_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -38,18 +47,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "vision_java_proto", deps = [":vision_proto"], @@ -58,51 +62,41 @@ java_proto_library( java_grpc_library( name = "vision_java_grpc", srcs = [":vision_proto"], - deps = [":vision_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "vision_resource_name_java_proto", - gapic_yaml = "vision_gapic.yaml", - deps = [":vision_proto"], + deps = [":vision_java_proto"], ) java_gapic_library( name = "vision_java_gapic", src = ":vision_proto_with_info", gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p3beta1", service_yaml = "//google/cloud/vision:vision_v1p3beta1.yaml", - test_deps = [":vision_java_grpc"], + test_deps = [ + ":vision_java_grpc", + ], deps = [ ":vision_java_proto", - ":vision_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":vision_java_gapic_test", +java_gapic_test( + name = "vision_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.vision.v1p3beta1.ImageAnnotatorClientTest", + "com.google.cloud.vision.v1p3beta1.ProductSearchClientTest", ], -) for test_name in [ - "com.google.cloud.vision.v1p3beta1.ImageAnnotatorClientTest", -]] + runtime_deps = [":vision_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-vision-v1p3beta1-java", - client_deps = [":vision_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":vision_java_gapic_test"], - grpc_deps = [":vision_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":vision_java_gapic", + ":vision_java_grpc", ":vision_java_proto", ":vision_proto", - ":vision_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -110,10 +104,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -132,15 +126,16 @@ go_proto_library( go_gapic_library( name = "vision_go_gapic", - src = ":vision_proto_with_info", - gapic_yaml = "vision_gapic.yaml", - importpath = "cloud.google.com/go/vision/apiv1p3beta1", + srcs = [":vision_proto_with_info"], + grpc_service_config = "vision_grpc_service_config.json", + importpath = "cloud.google.com/go/vision/apiv1p3beta1;vision", service_yaml = "//google/cloud/vision:vision_v1p3beta1.yaml", deps = [ ":vision_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", ], ) @@ -151,13 +146,239 @@ go_test( importpath = "cloud.google.com/go/vision/apiv1p3beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-vision-v1p3beta1-go", deps = [ ":vision_go_gapic", - ":vision_go_gapic_srcjar-smoke-test.srcjar", ":vision_go_gapic_srcjar-test.srcjar", ":vision_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "vision_moved_proto", + srcs = [":vision_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "//google/type:color_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "vision_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":vision_moved_proto"], +) + +py_grpc_library( + name = "vision_py_grpc", + srcs = [":vision_moved_proto"], + deps = [":vision_py_proto"], +) + +py_gapic_library( + name = "vision_py_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p3beta1", + service_yaml = "//google/cloud/vision:vision_v1p3beta1.yaml", + deps = [ + ":vision_py_grpc", + ":vision_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "vision-v1p3beta1-py", + deps = [ + ":vision_py_gapic", + ":vision_py_grpc", + ":vision_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "vision_php_proto", + deps = [":vision_proto"], +) + +php_grpc_library( + name = "vision_php_grpc", + srcs = [":vision_proto"], + deps = [":vision_php_proto"], +) + +php_gapic_library( + name = "vision_php_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p3beta1", + service_yaml = "//google/cloud/vision:vision_v1p3beta1.yaml", + deps = [ + ":vision_php_grpc", + ":vision_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-vision-v1p3beta1-php", + deps = [ + ":vision_php_gapic", + ":vision_php_grpc", + ":vision_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "vision_nodejs_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p3beta1", + service_yaml = "//google/cloud/vision:vision_v1p3beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "vision-v1p3beta1-nodejs", + deps = [ + ":vision_nodejs_gapic", + ":vision_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "vision_ruby_proto", + deps = [":vision_proto"], +) + +ruby_grpc_library( + name = "vision_ruby_grpc", + srcs = [":vision_proto"], + deps = [":vision_ruby_proto"], +) + +ruby_gapic_library( + name = "vision_ruby_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p3beta1", + service_yaml = "//google/cloud/vision:vision_v1p3beta1.yaml", + deps = [ + ":vision_ruby_grpc", + ":vision_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-vision-v1p3beta1-ruby", + deps = [ + ":vision_ruby_gapic", + ":vision_ruby_grpc", + ":vision_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "vision_csharp_proto", + deps = [":vision_proto"], +) + +csharp_grpc_library( + name = "vision_csharp_grpc", + srcs = [":vision_proto"], + deps = [":vision_csharp_proto"], +) + +csharp_gapic_library( + name = "vision_csharp_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p3beta1", + service_yaml = "//google/cloud/vision:vision_v1p3beta1.yaml", + deps = [ + ":vision_csharp_grpc", + ":vision_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-vision-v1p3beta1-csharp", + deps = [ + ":vision_csharp_gapic", + ":vision_csharp_grpc", + ":vision_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/vision/v1p3beta1/image_annotator.proto b/google/cloud/vision/v1p3beta1/image_annotator.proto index 2ac3ddb8b..b63aa2b25 100644 --- a/google/cloud/vision/v1p3beta1/image_annotator.proto +++ b/google/cloud/vision/v1p3beta1/image_annotator.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.vision.v1p3beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/cloud/vision/v1p3beta1/geometry.proto"; import "google/cloud/vision/v1p3beta1/product_search.proto"; import "google/cloud/vision/v1p3beta1/text_annotation.proto"; @@ -37,13 +40,18 @@ option java_package = "com.google.cloud.vision.v1p3beta1"; // images, such as face, landmark, logo, label, and text detection. The // ImageAnnotator service returns detected entities from the images. service ImageAnnotator { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + // Run image detection and annotation for a batch of images. - rpc BatchAnnotateImages(BatchAnnotateImagesRequest) - returns (BatchAnnotateImagesResponse) { + rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { option (google.api.http) = { post: "/v1p3beta1/images:annotate" body: "*" }; + option (google.api.method_signature) = "requests"; } // Run asynchronous image detection and annotation for a list of generic @@ -58,6 +66,11 @@ service ImageAnnotator { post: "/v1p3beta1/files:asyncBatchAnnotate" body: "*" }; + option (google.api.method_signature) = "requests"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateFilesResponse" + metadata_type: "OperationMetadata" + }; } } @@ -548,7 +561,7 @@ message ImageContext { // setting a hint will help get better results (although it will be a // significant hindrance if the hint is wrong). Text detection returns an // error if one or more of the specified languages is not one of the - // [supported languages](/vision/docs/languages). + // [supported languages](https://cloud.google.com/vision/docs/languages). repeated string language_hints = 2; // Parameters for crop hints annotation request. @@ -684,8 +697,8 @@ message AsyncAnnotateFileResponse { // Multiple async file annotation requests are batched into a single service // call. message AsyncBatchAnnotateFilesRequest { - // Individual async file annotation requests for this batch. - repeated AsyncAnnotateFileRequest requests = 1; + // Required. Individual async file annotation requests for this batch. + repeated AsyncAnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; } // Response to an async batch file annotation request. diff --git a/google/cloud/vision/v1p3beta1/product_search.proto b/google/cloud/vision/v1p3beta1/product_search.proto index 6a30c0875..6dde477c3 100644 --- a/google/cloud/vision/v1p3beta1/product_search.proto +++ b/google/cloud/vision/v1p3beta1/product_search.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.vision.v1p3beta1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/vision/v1p3beta1/geometry.proto"; import "google/cloud/vision/v1p3beta1/product_search_service.proto"; import "google/protobuf/timestamp.proto"; @@ -64,7 +66,9 @@ message ProductSearchParams { // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - string product_set = 6; + string product_set = 6 [(google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + }]; // The list of product categories to search in. Currently, we only consider // the first category, and either "homegoods" or "apparel" should be diff --git a/google/cloud/vision/v1p3beta1/product_search_service.proto b/google/cloud/vision/v1p3beta1/product_search_service.proto index 23919ee7e..daf1d0ddc 100644 --- a/google/cloud/vision/v1p3beta1/product_search_service.proto +++ b/google/cloud/vision/v1p3beta1/product_search_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.vision.v1p3beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/vision/v1p3beta1/geometry.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; @@ -33,22 +37,23 @@ option java_package = "com.google.cloud.vision.v1p3beta1"; // Manages Products and ProductSets of reference images for use in product // search. It uses the following resource model: // -// - The API has a collection of -// [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named +// - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named // `projects/*/locations/*/productSets/*`, which acts as a way to put different // products into groups to limit identification. // // In parallel, // -// - The API has a collection of -// [Product][google.cloud.vision.v1p3beta1.Product] resources, named +// - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named // `projects/*/locations/*/products/*` // -// - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of -// [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, -// named +// - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named // `projects/*/locations/*/products/*/referenceImages/*` service ProductSearch { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + // Creates and returns a new ProductSet resource. // // Possible errors: @@ -60,6 +65,7 @@ service ProductSearch { post: "/v1p3beta1/{parent=projects/*/locations/*}/productSets" body: "product_set" }; + option (google.api.method_signature) = "parent,product_set,product_set_id"; } // Lists ProductSets in an unspecified order. @@ -68,11 +74,11 @@ service ProductSearch { // // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less // than 1. - rpc ListProductSets(ListProductSetsRequest) - returns (ListProductSetsResponse) { + rpc ListProductSets(ListProductSetsRequest) returns (ListProductSetsResponse) { option (google.api.http) = { get: "/v1p3beta1/{parent=projects/*/locations/*}/productSets" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a ProductSet. @@ -84,6 +90,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}" }; + option (google.api.method_signature) = "name"; } // Makes changes to a ProductSet resource. @@ -99,6 +106,7 @@ service ProductSearch { patch: "/v1p3beta1/{product_set.name=projects/*/locations/*/productSets/*}" body: "product_set" }; + option (google.api.method_signature) = "product_set,update_mask"; } // Permanently deletes a ProductSet. All Products and ReferenceImages in the @@ -114,6 +122,7 @@ service ProductSearch { option (google.api.http) = { delete: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}" }; + option (google.api.method_signature) = "name"; } // Creates and returns a new product resource. @@ -129,6 +138,7 @@ service ProductSearch { post: "/v1p3beta1/{parent=projects/*/locations/*}/products" body: "product" }; + option (google.api.method_signature) = "parent,product,product_id"; } // Lists products in an unspecified order. @@ -140,6 +150,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p3beta1/{parent=projects/*/locations/*}/products" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a Product. @@ -151,6 +162,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p3beta1/{name=projects/*/locations/*/products/*}" }; + option (google.api.method_signature) = "name"; } // Makes changes to a Product resource. @@ -172,6 +184,7 @@ service ProductSearch { patch: "/v1p3beta1/{product.name=projects/*/locations/*/products/*}" body: "product" }; + option (google.api.method_signature) = "product,update_mask"; } // Permanently deletes a product and its reference images. @@ -187,6 +200,7 @@ service ProductSearch { option (google.api.http) = { delete: "/v1p3beta1/{name=projects/*/locations/*/products/*}" }; + option (google.api.method_signature) = "name"; } // Creates and returns a new ReferenceImage resource. @@ -214,6 +228,7 @@ service ProductSearch { post: "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages" body: "reference_image" }; + option (google.api.method_signature) = "parent,reference_image,reference_image_id"; } // Permanently deletes a reference image. @@ -232,6 +247,7 @@ service ProductSearch { option (google.api.http) = { delete: "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" }; + option (google.api.method_signature) = "name"; } // Lists reference images. @@ -246,6 +262,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a ReferenceImage. @@ -257,6 +274,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" }; + option (google.api.method_signature) = "name"; } // Adds a Product to the specified ProductSet. If the Product is already @@ -273,6 +291,7 @@ service ProductSearch { post: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct" body: "*" }; + option (google.api.method_signature) = "name,product"; } // Removes a Product from the specified ProductSet. @@ -286,6 +305,7 @@ service ProductSearch { post: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:removeProduct" body: "*" }; + option (google.api.method_signature) = "name,product"; } // Lists the Products in a ProductSet, in an unspecified order. If the @@ -300,6 +320,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products" }; + option (google.api.method_signature) = "name"; } // Asynchronous API that imports a list of reference images to specified @@ -319,11 +340,21 @@ service ProductSearch { post: "/v1p3beta1/{parent=projects/*/locations/*}/productSets:import" body: "*" }; + option (google.api.method_signature) = "parent,input_config"; + option (google.longrunning.operation_info) = { + response_type: "ImportProductSetsResponse" + metadata_type: "BatchOperationMetadata" + }; } } // A Product contains ReferenceImages. message Product { + option (google.api.resource) = { + type: "vision.googleapis.com/Product" + pattern: "projects/{project}/locations/{location}/products/{product}" + }; + // A product label represented as a key-value pair. message KeyValue { // The key of the label attached to the product. Cannot be empty and cannot @@ -351,11 +382,11 @@ message Product { // characters long. string description = 3; - // The category for the product identified by the reference image. This should - // be either "homegoods" or "apparel". - // - // This field is immutable. - string product_category = 4; + // Immutable. The category for the product identified by the reference image. This should + // be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories + // "homegoods", "apparel", and "toys" are still supported, but these should + // not be used for new products. + string product_category = 4 [(google.api.field_behavior) = IMMUTABLE]; // Key-value pairs that can be attached to a product. At query time, // constraints can be specified based on the product_labels. @@ -373,6 +404,11 @@ message Product { // million reference images. If the limit is exceeded, periodic indexing will // fail. message ProductSet { + option (google.api.resource) = { + type: "vision.googleapis.com/ProductSet" + pattern: "projects/{project}/locations/{location}/productSets/{product_set}" + }; + // The resource name of the ProductSet. // // Format is: @@ -390,18 +426,23 @@ message ProductSet { // never been indexed, this field is 0. // // This field is ignored when creating a ProductSet. - google.protobuf.Timestamp index_time = 3; + google.protobuf.Timestamp index_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. If there was an error with indexing the product set, the field // is populated. // // This field is ignored when creating a ProductSet. - google.rpc.Status index_error = 4; + google.rpc.Status index_error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A `ReferenceImage` represents a product image and its associated metadata, // such as bounding boxes. message ReferenceImage { + option (google.api.resource) = { + type: "vision.googleapis.com/ReferenceImage" + pattern: "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" + }; + // The resource name of the reference image. // // Format is: @@ -411,34 +452,37 @@ message ReferenceImage { // This field is ignored when creating a reference image. string name = 1; - // The Google Cloud Storage URI of the reference image. + // Required. The Google Cloud Storage URI of the reference image. // // The URI must start with `gs://`. - // - // Required. - string uri = 2; + string uri = 2 [(google.api.field_behavior) = REQUIRED]; - // Bounding polygons around the areas of interest in the reference image. - // Optional. If this field is empty, the system will try to detect regions of + // Optional. Bounding polygons around the areas of interest in the reference image. + // If this field is empty, the system will try to detect regions of // interest. At most 10 bounding polygons will be used. // // The provided shape is converted into a non-rotated rectangle. Once // converted, the small edge of the rectangle must be greater than or equal // to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 // is not). - repeated BoundingPoly bounding_polys = 3; + repeated BoundingPoly bounding_polys = 3 [(google.api.field_behavior) = OPTIONAL]; } // Request message for the `CreateProduct` method. message CreateProductRequest { - // The project in which the Product should be created. + // Required. The project in which the Product should be created. // // Format is // `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // The product to create. - Product product = 2; + // Required. The product to create. + Product product = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for this Product. If set, the server will // attempt to use this value as the resource id. If it is already in use, an @@ -449,11 +493,16 @@ message CreateProductRequest { // Request message for the `ListProducts` method. message ListProductsRequest { - // The project OR ProductSet from which Products should be listed. + // Required. The project OR ProductSet from which Products should be listed. // // Format: // `projects/PROJECT_ID/locations/LOC_ID` - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -474,45 +523,60 @@ message ListProductsResponse { // Request message for the `GetProduct` method. message GetProductRequest { - // Resource name of the Product to get. + // Required. Resource name of the Product to get. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; } // Request message for the `UpdateProduct` method. message UpdateProductRequest { - // The Product resource which replaces the one on the server. + // Required. The Product resource which replaces the one on the server. // product.name is immutable. - Product product = 1; + Product product = 1 [(google.api.field_behavior) = REQUIRED]; // The [FieldMask][google.protobuf.FieldMask] that specifies which fields // to update. // If update_mask isn't specified, all mutable fields are to be updated. - // Valid mask paths include `product_labels`, `display_name` and + // Valid mask paths include `product_labels`, `display_name`, and // `description`. google.protobuf.FieldMask update_mask = 2; } // Request message for the `DeleteProduct` method. message DeleteProductRequest { - // Resource name of product to delete. + // Required. Resource name of product to delete. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; } // Request message for the `CreateProductSet` method. message CreateProductSetRequest { - // The project in which the ProductSet should be created. + // Required. The project in which the ProductSet should be created. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // The ProductSet to create. - ProductSet product_set = 2; + // Required. The ProductSet to create. + ProductSet product_set = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for this ProductSet. If set, the server will // attempt to use this value as the resource id. If it is already in use, an @@ -523,10 +587,15 @@ message CreateProductSetRequest { // Request message for the `ListProductSets` method. message ListProductSetsRequest { - // The project from which ProductSets should be listed. + // Required. The project from which ProductSets should be listed. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -547,17 +616,22 @@ message ListProductSetsResponse { // Request message for the `GetProductSet` method. message GetProductSetRequest { - // Resource name of the ProductSet to get. + // Required. Resource name of the ProductSet to get. // // Format is: - // `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID` - string name = 1; + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; } // Request message for the `UpdateProductSet` method. message UpdateProductSetRequest { - // The ProductSet resource which replaces the one on the server. - ProductSet product_set = 1; + // Required. The ProductSet resource which replaces the one on the server. + ProductSet product_set = 1 [(google.api.field_behavior) = REQUIRED]; // The [FieldMask][google.protobuf.FieldMask] that specifies which fields to // update. @@ -568,24 +642,34 @@ message UpdateProductSetRequest { // Request message for the `DeleteProductSet` method. message DeleteProductSetRequest { - // Resource name of the ProductSet to delete. + // Required. Resource name of the ProductSet to delete. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; } // Request message for the `CreateReferenceImage` method. message CreateReferenceImageRequest { - // Resource name of the product in which to create the reference image. + // Required. Resource name of the product in which to create the reference image. // // Format is // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1; - - // The reference image to create. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; + + // Required. The reference image to create. // If an image ID is specified, it is ignored. - ReferenceImage reference_image = 2; + ReferenceImage reference_image = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for the ReferenceImage to be added. If set, // the server will attempt to use this value as the resource id. If it is @@ -596,11 +680,16 @@ message CreateReferenceImageRequest { // Request message for the `ListReferenceImages` method. message ListReferenceImagesRequest { - // Resource name of the product containing the reference images. + // Required. Resource name of the product containing the reference images. // // Format is // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -626,61 +715,96 @@ message ListReferenceImagesResponse { // Request message for the `GetReferenceImage` method. message GetReferenceImageRequest { - // The resource name of the ReferenceImage to get. + // Required. The resource name of the ReferenceImage to get. // // Format is: // // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; } // Request message for the `DeleteReferenceImage` method. message DeleteReferenceImageRequest { - // The resource name of the reference image to delete. + // Required. The resource name of the reference image to delete. // // Format is: // // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; } // Request message for the `AddProductToProductSet` method. message AddProductToProductSetRequest { - // The resource name for the ProductSet to modify. + // Required. The resource name for the ProductSet to modify. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; - // The resource name for the Product to be added to this ProductSet. + // Required. The resource name for the Product to be added to this ProductSet. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2; + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; } // Request message for the `RemoveProductFromProductSet` method. message RemoveProductFromProductSetRequest { - // The resource name for the ProductSet to modify. + // Required. The resource name for the ProductSet to modify. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; - // The resource name for the Product to be removed from this ProductSet. + // Required. The resource name for the Product to be removed from this ProductSet. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2; + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; } // Request message for the `ListProductsInProductSet` method. message ListProductsInProductSetRequest { - // The ProductSet resource for which to retrieve Products. + // Required. The ProductSet resource for which to retrieve Products. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -704,7 +828,7 @@ message ListProductsInProductSetResponse { message ImportProductSetsGcsSource { // The Google Cloud Storage URI of the input csv file. // - // The URI must start with gs:// + // The URI must start with `gs://`. // // The format of the input csv file should be one image per line. // In each line, there are 6 columns. @@ -774,13 +898,18 @@ message ImportProductSetsInputConfig { // Request message for the `ImportProductSets` method. message ImportProductSetsRequest { - // The project in which the ProductSets should be imported. + // Required. The project in which the ProductSets should be imported. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; - - // The input content for the list of requests. - ImportProductSetsInputConfig input_config = 2; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The input content for the list of requests. + ImportProductSetsInputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED]; } // Response message for the `ImportProductSets` method. diff --git a/google/cloud/vision/v1p3beta1/vision_gapic.legacy.yaml b/google/cloud/vision/v1p3beta1/vision_gapic.legacy.yaml new file mode 100644 index 000000000..4a95b19ea --- /dev/null +++ b/google/cloud/vision/v1p3beta1/vision_gapic.legacy.yaml @@ -0,0 +1,444 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.vision.v1p3beta1 + python: + package_name: google.cloud.vision_v1p3beta1.gapic + go: + package_name: cloud.google.com/go/vision/apiv1p3beta1 + domain_layer_location: cloud.google.com/go/vision + csharp: + package_name: Google.Cloud.Vision.V1p3beta1 + ruby: + package_name: Google::Cloud::Vision::V1p3beta1 + php: + package_name: Google\Cloud\Vision\V1p3beta1 + nodejs: + package_name: vision.v1p3beta1 + domain_layer_location: google-cloud +interfaces: +- name: google.cloud.vision.v1p3beta1.ProductSearch + collections: + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/productSets/{product_set} + entity_name: product_set + - name_pattern: projects/{project}/locations/{location}/products/{product} + entity_name: product + - name_pattern: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image} + entity_name: reference_image + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + methods: + - name: CreateProductSet + flattening: + groups: + - parameters: + - parent + - product_set + - product_set_id + required_fields: + - parent + - product_set + - product_set_id + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: ListProductSets + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: product_sets + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetProductSet + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: product_set + timeout_millis: 60000 + - name: UpdateProductSet + flattening: + groups: + - parameters: + - product_set + - update_mask + required_fields: + - product_set + - update_mask + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + product_set.name: product_set + timeout_millis: 60000 + - name: DeleteProductSet + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: product_set + timeout_millis: 60000 + - name: CreateProduct + flattening: + groups: + - parameters: + - parent + - product + - product_id + required_fields: + - parent + - product + - product_id + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: ListProducts + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: products + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetProduct + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: product + timeout_millis: 60000 + - name: UpdateProduct + flattening: + groups: + - parameters: + - product + - update_mask + required_fields: + - product + - update_mask + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + product.name: product + timeout_millis: 60000 + - name: DeleteProduct + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: product + timeout_millis: 60000 + - name: CreateReferenceImage + flattening: + groups: + - parameters: + - parent + - reference_image + - reference_image_id + required_fields: + - parent + - reference_image + - reference_image_id + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: product + timeout_millis: 60000 + - name: DeleteReferenceImage + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: reference_image + timeout_millis: 60000 + - name: ListReferenceImages + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: reference_images + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: product + timeout_millis: 60000 + - name: GetReferenceImage + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: reference_image + timeout_millis: 60000 + - name: AddProductToProductSet + flattening: + groups: + - parameters: + - name + - product + required_fields: + - name + - product + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: product_set + timeout_millis: 60000 + - name: RemoveProductFromProductSet + flattening: + groups: + - parameters: + - name + - product + required_fields: + - name + - product + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: product_set + timeout_millis: 60000 + - name: ListProductsInProductSet + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: products + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: product_set + timeout_millis: 60000 + - name: ImportProductSets + flattening: + groups: + - parameters: + - parent + - input_config + required_fields: + - parent + - input_config + long_running: + return_type: google.cloud.vision.v1p3beta1.ImportProductSetsResponse + metadata_type: google.cloud.vision.v1p3beta1.BatchOperationMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 +- name: google.cloud.vision.v1p3beta1.ImageAnnotator + smoke_test: + method: BatchAnnotateImages + init_fields: + - requests[0].image.source.gcs_image_uri="gs://cloud-samples-data/vision/face_detection/celebrity_recognition/sergey.jpg" + - requests[0].features[0].type=FACE_DETECTION + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: BatchAnnotateImages + flattening: + groups: + - parameters: + - requests + required_fields: + - requests + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: AsyncBatchAnnotateFiles + flattening: + groups: + - parameters: + - requests + required_fields: + - requests + long_running: + return_type: google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse + metadata_type: google.cloud.vision.v1p3beta1.OperationMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 +resource_name_generation: +- message_name: CreateProductSetRequest + field_entity_map: + parent: location +- message_name: ListProductSetsRequest + field_entity_map: + parent: location +- message_name: GetProductSetRequest + field_entity_map: + name: product_set +- message_name: UpdateProductSetRequest + field_entity_map: + product_set.name: product_set +- message_name: DeleteProductSetRequest + field_entity_map: + name: product_set +- message_name: CreateProductRequest + field_entity_map: + parent: location +- message_name: ListProductsRequest + field_entity_map: + parent: location +- message_name: GetProductRequest + field_entity_map: + name: product +- message_name: UpdateProductRequest + field_entity_map: + product.name: product +- message_name: DeleteProductRequest + field_entity_map: + name: product +- message_name: CreateReferenceImageRequest + field_entity_map: + parent: product +- message_name: DeleteReferenceImageRequest + field_entity_map: + name: reference_image +- message_name: ListReferenceImagesRequest + field_entity_map: + parent: product +- message_name: GetReferenceImageRequest + field_entity_map: + name: reference_image +- message_name: AddProductToProductSetRequest + field_entity_map: + name: product_set +- message_name: RemoveProductFromProductSetRequest + field_entity_map: + name: product_set +- message_name: ListProductsInProductSetRequest + field_entity_map: + name: product_set +- message_name: ImportProductSetsRequest + field_entity_map: + parent: location diff --git a/google/cloud/vision/v1p3beta1/vision_gapic.yaml b/google/cloud/vision/v1p3beta1/vision_gapic.yaml index 59c695328..882698028 100644 --- a/google/cloud/vision/v1p3beta1/vision_gapic.yaml +++ b/google/cloud/vision/v1p3beta1/vision_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.vision.v1p3beta1 @@ -19,22 +19,6 @@ language_settings: domain_layer_location: google-cloud interfaces: - name: google.cloud.vision.v1p3beta1.ProductSearch - collections: - - name_pattern: projects/{project}/locations/{location} - entity_name: location - - name_pattern: projects/{project}/locations/{location}/productSets/{product_set} - entity_name: product_set - - name_pattern: projects/{project}/locations/{location}/products/{product} - entity_name: product - - name_pattern: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image} - entity_name: reference_image - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -45,311 +29,25 @@ interfaces: max_rpc_timeout_millis: 20000 total_timeout_millis: 600000 methods: - - name: CreateProductSet - flattening: - groups: - - parameters: - - parent - - product_set - - product_set_id - required_fields: - - parent - - product_set - - product_set_id - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - - name: ListProductSets - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: product_sets - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - - name: GetProductSet - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: product_set - timeout_millis: 60000 - - name: UpdateProductSet - flattening: - groups: - - parameters: - - product_set - - update_mask - required_fields: - - product_set - - update_mask - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - product_set.name: product_set - timeout_millis: 60000 - name: DeleteProductSet - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: product_set - timeout_millis: 60000 - - name: CreateProduct - flattening: - groups: - - parameters: - - parent - - product - - product_id - required_fields: - - parent - - product - - product_id - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - - name: ListProducts - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: products - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - - name: GetProduct - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: product - timeout_millis: 60000 - - name: UpdateProduct - flattening: - groups: - - parameters: - - product - - update_mask - required_fields: - - product - - update_mask - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - product.name: product - timeout_millis: 60000 - name: DeleteProduct - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: product - timeout_millis: 60000 - - name: CreateReferenceImage - flattening: - groups: - - parameters: - - parent - - reference_image - - reference_image_id - required_fields: - - parent - - reference_image - - reference_image_id - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: product - timeout_millis: 60000 - name: DeleteReferenceImage - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: reference_image - timeout_millis: 60000 - - name: ListReferenceImages - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: reference_images - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: product - timeout_millis: 60000 - - name: GetReferenceImage - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: reference_image - timeout_millis: 60000 - - name: AddProductToProductSet - flattening: - groups: - - parameters: - - name - - product - required_fields: - - name - - product - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: product_set - timeout_millis: 60000 - - name: RemoveProductFromProductSet - flattening: - groups: - - parameters: - - name - - product - required_fields: - - name - - product - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: product_set - timeout_millis: 60000 - - name: ListProductsInProductSet - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: products retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: product_set - timeout_millis: 60000 - name: ImportProductSets - flattening: - groups: - - parameters: - - parent - - input_config - required_fields: - - parent - - input_config long_running: - return_type: google.cloud.vision.v1p3beta1.ImportProductSetsResponse - metadata_type: google.cloud.vision.v1p3beta1.BatchOperationMetadata initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 + - name: google.cloud.vision.v1p3beta1.ImageAnnotator smoke_test: method: BatchAnnotateImages init_fields: - - requests[0].image.source.gcs_image_uri="gs://gapic-toolkit/President_Barack_Obama.jpg" + - requests[0].image.source.gcs_image_uri="gs://cloud-samples-data/vision/face_detection/celebrity_recognition/sergey.jpg" - requests[0].features[0].type=FACE_DETECTION - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -361,84 +59,10 @@ interfaces: total_timeout_millis: 600000 methods: - name: BatchAnnotateImages - flattening: - groups: - - parameters: - - requests - required_fields: - - requests retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - name: AsyncBatchAnnotateFiles - flattening: - groups: - - parameters: - - requests - required_fields: - - requests long_running: - return_type: google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse - metadata_type: google.cloud.vision.v1p3beta1.OperationMetadata initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 -resource_name_generation: -- message_name: CreateProductSetRequest - field_entity_map: - parent: location -- message_name: ListProductSetsRequest - field_entity_map: - parent: location -- message_name: GetProductSetRequest - field_entity_map: - name: product_set -- message_name: UpdateProductSetRequest - field_entity_map: - product_set.name: product_set -- message_name: DeleteProductSetRequest - field_entity_map: - name: product_set -- message_name: CreateProductRequest - field_entity_map: - parent: location -- message_name: ListProductsRequest - field_entity_map: - parent: location -- message_name: GetProductRequest - field_entity_map: - name: product -- message_name: UpdateProductRequest - field_entity_map: - product.name: product -- message_name: DeleteProductRequest - field_entity_map: - name: product -- message_name: CreateReferenceImageRequest - field_entity_map: - parent: product -- message_name: DeleteReferenceImageRequest - field_entity_map: - name: reference_image -- message_name: ListReferenceImagesRequest - field_entity_map: - parent: product -- message_name: GetReferenceImageRequest - field_entity_map: - name: reference_image -- message_name: AddProductToProductSetRequest - field_entity_map: - name: product_set -- message_name: RemoveProductFromProductSetRequest - field_entity_map: - name: product_set -- message_name: ListProductsInProductSetRequest - field_entity_map: - name: product_set -- message_name: ImportProductSetsRequest - field_entity_map: - parent: location diff --git a/google/cloud/vision/v1p3beta1/vision_grpc_service_config.json b/google/cloud/vision/v1p3beta1/vision_grpc_service_config.json new file mode 100755 index 000000000..f1b79dc06 --- /dev/null +++ b/google/cloud/vision/v1p3beta1/vision_grpc_service_config.json @@ -0,0 +1,136 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.vision.v1p3beta1.ImageAnnotator", + "method": "AsyncBatchAnnotateFiles" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + ] + } + }, + { + "name": [ + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "CreateProductSet" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "UpdateProductSet" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "CreateProduct" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "UpdateProduct" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "CreateReferenceImage" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "AddProductToProductSet" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "RemoveProductFromProductSet" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "ImportProductSets" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + ] + } + }, + { + "name": [ + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "ListProductSets" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "GetProductSet" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "DeleteProductSet" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "ListProducts" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "GetProduct" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "DeleteProduct" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "DeleteReferenceImage" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "ListReferenceImages" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "GetReferenceImage" + }, + { + "service": "google.cloud.vision.v1p3beta1.ProductSearch", + "method": "ListProductsInProductSet" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.cloud.vision.v1p3beta1.ImageAnnotator", + "method": "BatchAnnotateImages" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/vision/v1p3beta1/vision_v1p3beta1.yaml b/google/cloud/vision/v1p3beta1/vision_v1p3beta1.yaml new file mode 100644 index 000000000..65c3b6577 --- /dev/null +++ b/google/cloud/vision/v1p3beta1/vision_v1p3beta1.yaml @@ -0,0 +1,39 @@ +type: google.api.Service +config_version: 3 +name: vision.googleapis.com +title: Cloud Vision API + +apis: +- name: google.cloud.vision.v1p3beta1.ImageAnnotator +- name: google.cloud.vision.v1p3beta1.ProductSearch + +types: +- name: google.cloud.vision.v1p3beta1.AnnotateFileResponse +- name: google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse +- name: google.cloud.vision.v1p3beta1.BatchOperationMetadata +- name: google.cloud.vision.v1p3beta1.ImportProductSetsResponse +- name: google.cloud.vision.v1p3beta1.OperationMetadata + +documentation: + summary: |- + Integrates Google Vision features, including image labeling, face, logo, + and landmark detection, optical character recognition (OCR), and detection + of explicit content, into applications. + +authentication: + rules: + - selector: 'google.cloud.vision.v1p3beta1.ImageAnnotator.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-vision + - selector: 'google.cloud.vision.v1p3beta1.ProductSearch.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-vision + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-vision diff --git a/google/cloud/vision/v1p4beta1/BUILD.bazel b/google/cloud/vision/v1p4beta1/BUILD.bazel index 1b263fa0f..b454a941f 100644 --- a/google/cloud/vision/v1p4beta1/BUILD.bazel +++ b/google/cloud/vision/v1p4beta1/BUILD.bazel @@ -1,14 +1,18 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( name = "vision_proto", srcs = [ + "face.proto", "geometry.proto", "image_annotator.proto", "product_search.proto", @@ -18,6 +22,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/longrunning:operations_proto", "//google/rpc:status_proto", "//google/type:color_proto", @@ -30,7 +37,10 @@ proto_library( proto_library_with_info( name = "vision_proto_with_info", - deps = [":vision_proto"], + deps = [ + ":vision_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -38,18 +48,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "vision_java_proto", deps = [":vision_proto"], @@ -58,51 +63,41 @@ java_proto_library( java_grpc_library( name = "vision_java_grpc", srcs = [":vision_proto"], - deps = [":vision_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "vision_resource_name_java_proto", - gapic_yaml = "vision_gapic.yaml", - deps = [":vision_proto"], + deps = [":vision_java_proto"], ) java_gapic_library( name = "vision_java_gapic", src = ":vision_proto_with_info", gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p4beta1", service_yaml = "//google/cloud/vision:vision_v1p4beta1.yaml", - test_deps = [":vision_java_grpc"], + test_deps = [ + ":vision_java_grpc", + ], deps = [ ":vision_java_proto", - ":vision_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":vision_java_gapic_test", +java_gapic_test( + name = "vision_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.vision.v1p4beta1.ImageAnnotatorClientTest", + "com.google.cloud.vision.v1p4beta1.ProductSearchClientTest", ], -) for test_name in [ - "com.google.cloud.vision.v1p4beta1.ImageAnnotatorClientTest", -]] + runtime_deps = [":vision_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-vision-v1p4beta1-java", - client_deps = [":vision_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":vision_java_gapic_test"], - grpc_deps = [":vision_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":vision_java_gapic", + ":vision_java_grpc", ":vision_java_proto", ":vision_proto", - ":vision_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -110,10 +105,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -132,15 +127,16 @@ go_proto_library( go_gapic_library( name = "vision_go_gapic", - src = ":vision_proto_with_info", - gapic_yaml = "vision_gapic.yaml", - importpath = "cloud.google.com/go/vision/apiv1p4beta1", + srcs = [":vision_proto_with_info"], + grpc_service_config = "vision_grpc_service_config.json", + importpath = "cloud.google.com/go/vision/apiv1p4beta1;vision", service_yaml = "//google/cloud/vision:vision_v1p4beta1.yaml", deps = [ ":vision_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", ], ) @@ -151,13 +147,239 @@ go_test( importpath = "cloud.google.com/go/vision/apiv1p4beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-vision-v1p4beta1-go", deps = [ ":vision_go_gapic", - ":vision_go_gapic_srcjar-smoke-test.srcjar", ":vision_go_gapic_srcjar-test.srcjar", ":vision_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "vision_moved_proto", + srcs = [":vision_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "//google/type:color_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "vision_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":vision_moved_proto"], +) + +py_grpc_library( + name = "vision_py_grpc", + srcs = [":vision_moved_proto"], + deps = [":vision_py_proto"], +) + +py_gapic_library( + name = "vision_py_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p4beta1", + service_yaml = "//google/cloud/vision:vision_v1p4beta1.yaml", + deps = [ + ":vision_py_grpc", + ":vision_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "vision-v1p4beta1-py", + deps = [ + ":vision_py_gapic", + ":vision_py_grpc", + ":vision_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "vision_php_proto", + deps = [":vision_proto"], +) + +php_grpc_library( + name = "vision_php_grpc", + srcs = [":vision_proto"], + deps = [":vision_php_proto"], +) + +php_gapic_library( + name = "vision_php_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p4beta1", + service_yaml = "//google/cloud/vision:vision_v1p4beta1.yaml", + deps = [ + ":vision_php_grpc", + ":vision_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-vision-v1p4beta1-php", + deps = [ + ":vision_php_gapic", + ":vision_php_grpc", + ":vision_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "vision_nodejs_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p4beta1", + service_yaml = "//google/cloud/vision:vision_v1p4beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "vision-v1p4beta1-nodejs", + deps = [ + ":vision_nodejs_gapic", + ":vision_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "vision_ruby_proto", + deps = [":vision_proto"], +) + +ruby_grpc_library( + name = "vision_ruby_grpc", + srcs = [":vision_proto"], + deps = [":vision_ruby_proto"], +) + +ruby_gapic_library( + name = "vision_ruby_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p4beta1", + service_yaml = "//google/cloud/vision:vision_v1p4beta1.yaml", + deps = [ + ":vision_ruby_grpc", + ":vision_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-vision-v1p4beta1-ruby", + deps = [ + ":vision_ruby_gapic", + ":vision_ruby_grpc", + ":vision_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "vision_csharp_proto", + deps = [":vision_proto"], +) + +csharp_grpc_library( + name = "vision_csharp_grpc", + srcs = [":vision_proto"], + deps = [":vision_csharp_proto"], +) + +csharp_gapic_library( + name = "vision_csharp_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + package = "google.cloud.vision.v1p4beta1", + service_yaml = "//google/cloud/vision:vision_v1p4beta1.yaml", + deps = [ + ":vision_csharp_grpc", + ":vision_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-vision-v1p4beta1-csharp", + deps = [ + ":vision_csharp_gapic", + ":vision_csharp_grpc", + ":vision_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/vision/v1p4beta1/face.proto b/google/cloud/vision/v1p4beta1/face.proto new file mode 100644 index 000000000..1786f26f0 --- /dev/null +++ b/google/cloud/vision/v1p4beta1/face.proto @@ -0,0 +1,61 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.vision.v1p4beta1; + +import "google/api/annotations.proto"; +import "google/cloud/vision/v1p4beta1/geometry.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "CelebrityProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +option objc_class_prefix = "GCVN"; + +// Parameters for a celebrity recognition request. +message FaceRecognitionParams { + // The resource names for one or more + // [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity + // set is preloaded and can be specified as "builtin/default". If this is + // specified, the algorithm will try to match the faces detected in the input + // image to the Celebrities in the CelebritySets. + repeated string celebrity_set = 1; +} + +// A Celebrity is a group of Faces with an identity. +message Celebrity { + // The resource name of the preloaded Celebrity. Has the format + // `builtin/{mid}`. + string name = 1; + + // The Celebrity's display name. + string display_name = 2; + + // The Celebrity's description. + string description = 3; +} + +// Information about a face's identity. +message FaceRecognitionResult { + // The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was + // matched to. + Celebrity celebrity = 1; + + // Recognition confidence. Range [0, 1]. + float confidence = 2; +} diff --git a/google/cloud/vision/v1p4beta1/geometry.proto b/google/cloud/vision/v1p4beta1/geometry.proto index b0abd329c..18877188f 100644 --- a/google/cloud/vision/v1p4beta1/geometry.proto +++ b/google/cloud/vision/v1p4beta1/geometry.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/cloud/vision/v1p4beta1/image_annotator.proto b/google/cloud/vision/v1p4beta1/image_annotator.proto index ebbf92c35..9c18cccdf 100644 --- a/google/cloud/vision/v1p4beta1/image_annotator.proto +++ b/google/cloud/vision/v1p4beta1/image_annotator.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,9 @@ syntax = "proto3"; package google.cloud.vision.v1p4beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/vision/v1p4beta1/face.proto"; import "google/cloud/vision/v1p4beta1/geometry.proto"; import "google/cloud/vision/v1p4beta1/product_search.proto"; import "google/cloud/vision/v1p4beta1/text_annotation.proto"; @@ -40,6 +43,11 @@ option objc_class_prefix = "GCVN"; // images, such as face, landmark, logo, label, and text detection. The // ImageAnnotator service returns detected entities from the images. service ImageAnnotator { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + // Run image detection and annotation for a batch of images. rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { @@ -47,20 +55,23 @@ service ImageAnnotator { post: "/v1p4beta1/images:annotate" body: "*" }; + option (google.api.method_signature) = "requests"; } // Service that performs image detection and annotation for a batch of files. // Now only "application/pdf", "image/tiff" and "image/gif" are supported. // - // This service will extract at most the first 10 frames (gif) or pages - // (pdf or tiff) from each file provided and perform detection and annotation - // for each image extracted. + // This service will extract at most 5 (customers can specify which 5 in + // AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each + // file provided and perform detection and annotation for each image + // extracted. rpc BatchAnnotateFiles(BatchAnnotateFilesRequest) returns (BatchAnnotateFilesResponse) { option (google.api.http) = { post: "/v1p4beta1/files:annotate" body: "*" }; + option (google.api.method_signature) = "requests"; } // Run asynchronous image detection and annotation for a list of images. @@ -78,6 +89,11 @@ service ImageAnnotator { post: "/v1p4beta1/images:asyncBatchAnnotate" body: "*" }; + option (google.api.method_signature) = "requests,output_config"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateImagesResponse" + metadata_type: "OperationMetadata" + }; } // Run asynchronous image detection and annotation for a list of generic @@ -92,6 +108,11 @@ service ImageAnnotator { post: "/v1p4beta1/files:asyncBatchAnnotate" body: "*" }; + option (google.api.method_signature) = "requests"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateFilesResponse" + metadata_type: "OperationMetadata" + }; } } @@ -208,19 +229,19 @@ enum Likelihood { // Unknown likelihood. UNKNOWN = 0; - // It is very unlikely that the image belongs to the specified vertical. + // It is very unlikely. VERY_UNLIKELY = 1; - // It is unlikely that the image belongs to the specified vertical. + // It is unlikely. UNLIKELY = 2; - // It is possible that the image belongs to the specified vertical. + // It is possible. POSSIBLE = 3; - // It is likely that the image belongs to the specified vertical. + // It is likely. LIKELY = 4; - // It is very likely that the image belongs to the specified vertical. + // It is very likely. VERY_LIKELY = 5; } @@ -406,6 +427,13 @@ message FaceAnnotation { // Headwear likelihood. Likelihood headwear_likelihood = 15; + + // Additional recognition information. Only computed if + // image_context.face_recognition_params is provided, **and** a match is found + // to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input + // [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is + // sorted in order of decreasing confidence values. + repeated FaceRecognitionResult recognition_result = 16; } // Detected entity location information. @@ -604,12 +632,15 @@ message ImageContext { // setting a hint will help get better results (although it will be a // significant hindrance if the hint is wrong). Text detection returns an // error if one or more of the specified languages is not one of the - // [supported languages](/vision/docs/languages). + // [supported languages](https://cloud.google.com/vision/docs/languages). repeated string language_hints = 2; // Parameters for crop hints annotation request. CropHintsParams crop_hints_params = 4; + // Parameters for face recognition. + FaceRecognitionParams face_recognition_params = 10; + // Parameters for product search. ProductSearchParams product_search_params = 5; @@ -693,23 +724,10 @@ message AnnotateImageResponse { ImageAnnotationContext context = 21; } -// Response to a single file annotation request. A file may contain one or more -// images, which individually have their own responses. -message AnnotateFileResponse { - // Information about the file for which this response is generated. - InputConfig input_config = 1; - - // Individual responses to images found within the file. - repeated AnnotateImageResponse responses = 2; - - // This field gives the total number of pages in the file. - int32 total_pages = 3; -} - // Multiple image annotation requests are batched into a single service call. message BatchAnnotateImagesRequest { - // Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1; + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; } // Response to a batch image annotation request. @@ -746,11 +764,30 @@ message AnnotateFileRequest { repeated int32 pages = 4; } +// Response to a single file annotation request. A file may contain one or more +// images, which individually have their own responses. +message AnnotateFileResponse { + // Information about the file for which this response is generated. + InputConfig input_config = 1; + + // Individual responses to images found within the file. This field will be + // empty if the `error` field is set. + repeated AnnotateImageResponse responses = 2; + + // This field gives the total number of pages in the file. + int32 total_pages = 3; + + // If set, represents the error message for the failed request. The + // `responses` field will not be set in this case. + google.rpc.Status error = 4; +} + // A list of requests to annotate files using the BatchAnnotateFiles API. message BatchAnnotateFilesRequest { - // The list of file annotation requests. Right now we support only one - // AnnotateFileRequest in BatchAnnotateFilesRequest. - repeated AnnotateFileRequest requests = 1; + // Required. The list of file annotation requests. Right now we support only + // one AnnotateFileRequest in BatchAnnotateFilesRequest. + repeated AnnotateFileRequest requests = 1 + [(google.api.field_behavior) = REQUIRED]; } // A list of file annotation responses. @@ -783,11 +820,12 @@ message AsyncAnnotateFileResponse { // Request for async image annotation for a list of images. message AsyncBatchAnnotateImagesRequest { - // Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1; + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 + [(google.api.field_behavior) = REQUIRED]; // Required. The desired output location and metadata (e.g. format). - OutputConfig output_config = 2; + OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; } // Response to an async batch image annotation request. @@ -799,8 +837,9 @@ message AsyncBatchAnnotateImagesResponse { // Multiple async file annotation requests are batched into a single service // call. message AsyncBatchAnnotateFilesRequest { - // Individual async file annotation requests for this batch. - repeated AsyncAnnotateFileRequest requests = 1; + // Required. Individual async file annotation requests for this batch. + repeated AsyncAnnotateFileRequest requests = 1 + [(google.api.field_behavior) = REQUIRED]; } // Response to an async batch file annotation request. @@ -823,8 +862,8 @@ message InputConfig { // not work for AsyncBatchAnnotateFiles requests. bytes content = 3; - // The type of the file. Currently only "application/pdf" and "image/tiff" - // are supported. Wildcards are not supported. + // The type of the file. Currently only "application/pdf", "image/tiff" and + // "image/gif" are supported. Wildcards are not supported. string mime_type = 2; } @@ -856,16 +895,23 @@ message GcsSource { // The Google Cloud Storage location where the output will be written to. message GcsDestination { - // Google Cloud Storage URI where the results will be stored. Results will - // be in JSON format and preceded by its corresponding input URI. This field - // can either represent a single file, or a prefix for multiple outputs. - // Prefixes must end in a `/`. + // Google Cloud Storage URI prefix where the results will be stored. Results + // will be in JSON format and preceded by its corresponding input URI prefix. + // This field can either represent a gcs file prefix or gcs directory. In + // either case, the uri should be unique because in order to get all of the + // output files, you will need to do a wildcard gcs search on the uri prefix + // you provide. // // Examples: // - // * File: gs://bucket-name/filename.json - // * Prefix: gs://bucket-name/prefix/here/ - // * File: gs://bucket-name/prefix/here + // * File Prefix: gs://bucket-name/here/filenameprefix The output files + // will be created in gs://bucket-name/here/ and the names of the + // output files will begin with "filenameprefix". + // + // * Directory Prefix: gs://bucket-name/some/location/ The output files + // will be created in gs://bucket-name/some/location/ and the names of the + // output files could be anything because there was no filename prefix + // specified. // // If multiple outputs, each response is still AnnotateFileResponse, each of // which contains some subset of the full list of AnnotateImageResponse. diff --git a/google/cloud/vision/v1p4beta1/product_search.proto b/google/cloud/vision/v1p4beta1/product_search.proto index 1caf30194..15baed1fd 100644 --- a/google/cloud/vision/v1p4beta1/product_search.proto +++ b/google/cloud/vision/v1p4beta1/product_search.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ syntax = "proto3"; package google.cloud.vision.v1p4beta1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/vision/v1p4beta1/geometry.proto"; import "google/cloud/vision/v1p4beta1/product_search_service.proto"; import "google/protobuf/timestamp.proto"; @@ -32,7 +33,7 @@ option objc_class_prefix = "GCVN"; // Parameters for a product search request. message ProductSearchParams { // The bounding polygon around the area of interest in the image. - // Optional. If it is not specified, system discretion will be applied. + // If it is not specified, system discretion will be applied. BoundingPoly bounding_poly = 9; // The resource name of a @@ -41,23 +42,27 @@ message ProductSearchParams { // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - string product_set = 6; + string product_set = 6 [(google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + }]; // The list of product categories to search in. Currently, we only consider - // the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", or - // "packagedgoods-v1" should be specified. The legacy categories "homegoods", - // "apparel", and "toys" are still supported but will be deprecated. For new - // products, please use "homegoods-v2", "apparel-v2", or "toys-v2" for better - // product search accuracy. It is recommended to migrate existing products to - // these categories as well. + // the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", + // "packagedgoods-v1", or "general-v1" should be specified. The legacy + // categories "homegoods", "apparel", and "toys" are still supported but will + // be deprecated. For new products, please use "homegoods-v2", "apparel-v2", + // or "toys-v2" for better product search accuracy. It is recommended to + // migrate existing products to these categories as well. repeated string product_categories = 7; // The filtering expression. This can be used to restrict search results based // on Product labels. We currently support an AND of OR of key-value - // expressions, where each expression within an OR must have the same key. + // expressions, where each expression within an OR must have the same key. An + // '=' should be used to connect the key and value. // // For example, "(color = red OR color = blue) AND brand = Google" is - // acceptable, but not "(color = red OR brand = Google)" or "color: red". + // acceptable, but "(color = red OR brand = Google)" is not acceptable. + // "color: red" is not acceptable because it uses a ':' instead of an '='. string filter = 8; } @@ -77,6 +82,23 @@ message ProductSearchResults { string image = 3; } + // Prediction for what the object in the bounding box is. + message ObjectAnnotation { + // Object ID that should align with EntityAnnotation mid. + string mid = 1; + + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + + // Object name, expressed in its `language_code` language. + string name = 3; + + // Score of the result. Range [0, 1]. + float score = 4; + } + // Information about the products similar to a single product in a query // image. message GroupedResult { @@ -85,10 +107,14 @@ message ProductSearchResults { // List of results, one for each product match. repeated Result results = 2; + + // List of generic predictions for the object in the bounding box. + repeated ObjectAnnotation object_annotations = 3; } - // Timestamp of the index which provided these results. Changes made after - // this time are not reflected in the current results. + // Timestamp of the index which provided these results. Products added to the + // product set and products removed from the product set after this time are + // not reflected in the current results. google.protobuf.Timestamp index_time = 2; // List of results, one for each product match. diff --git a/google/cloud/vision/v1p4beta1/product_search_service.proto b/google/cloud/vision/v1p4beta1/product_search_service.proto index 3cbc53573..df7bc7a38 100644 --- a/google/cloud/vision/v1p4beta1/product_search_service.proto +++ b/google/cloud/vision/v1p4beta1/product_search_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,9 @@ syntax = "proto3"; package google.cloud.vision.v1p4beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/vision/v1p4beta1/geometry.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; @@ -51,6 +54,11 @@ option objc_class_prefix = "GCVN"; // named // `projects/*/locations/*/products/*/referenceImages/*` service ProductSearch { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + // Creates and returns a new ProductSet resource. // // Possible errors: @@ -62,6 +70,7 @@ service ProductSearch { post: "/v1p4beta1/{parent=projects/*/locations/*}/productSets" body: "product_set" }; + option (google.api.method_signature) = "parent,product_set,product_set_id"; } // Lists ProductSets in an unspecified order. @@ -75,6 +84,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p4beta1/{parent=projects/*/locations/*}/productSets" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a ProductSet. @@ -86,6 +96,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}" }; + option (google.api.method_signature) = "name"; } // Makes changes to a ProductSet resource. @@ -101,21 +112,19 @@ service ProductSearch { patch: "/v1p4beta1/{product_set.name=projects/*/locations/*/productSets/*}" body: "product_set" }; + option (google.api.method_signature) = "product_set,update_mask"; } // Permanently deletes a ProductSet. Products and ReferenceImages in the // ProductSet are not deleted. // // The actual image files are not deleted from Google Cloud Storage. - // - // Possible errors: - // - // * Returns NOT_FOUND if the ProductSet does not exist. rpc DeleteProductSet(DeleteProductSetRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}" }; + option (google.api.method_signature) = "name"; } // Creates and returns a new product resource. @@ -131,6 +140,7 @@ service ProductSearch { post: "/v1p4beta1/{parent=projects/*/locations/*}/products" body: "product" }; + option (google.api.method_signature) = "parent,product,product_id"; } // Lists products in an unspecified order. @@ -142,6 +152,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p4beta1/{parent=projects/*/locations/*}/products" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a Product. @@ -153,6 +164,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p4beta1/{name=projects/*/locations/*/products/*}" }; + option (google.api.method_signature) = "name"; } // Makes changes to a Product resource. @@ -175,6 +187,7 @@ service ProductSearch { patch: "/v1p4beta1/{product.name=projects/*/locations/*/products/*}" body: "product" }; + option (google.api.method_signature) = "product,update_mask"; } // Permanently deletes a product and its reference images. @@ -182,14 +195,11 @@ service ProductSearch { // Metadata of the product and all its images will be deleted right away, but // search queries against ProductSets containing the product may still work // until all related caches are refreshed. - // - // Possible errors: - // - // * Returns NOT_FOUND if the product does not exist. rpc DeleteProduct(DeleteProductRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1p4beta1/{name=projects/*/locations/*/products/*}" }; + option (google.api.method_signature) = "name"; } // Creates and returns a new ReferenceImage resource. @@ -217,6 +227,8 @@ service ProductSearch { post: "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages" body: "reference_image" }; + option (google.api.method_signature) = + "parent,reference_image,reference_image_id"; } // Permanently deletes a reference image. @@ -226,15 +238,12 @@ service ProductSearch { // caches are refreshed. // // The actual image files are not deleted from Google Cloud Storage. - // - // Possible errors: - // - // * Returns NOT_FOUND if the reference image does not exist. rpc DeleteReferenceImage(DeleteReferenceImageRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" }; + option (google.api.method_signature) = "name"; } // Lists reference images. @@ -249,6 +258,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a ReferenceImage. @@ -260,6 +270,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" }; + option (google.api.method_signature) = "name"; } // Adds a Product to the specified ProductSet. If the Product is already @@ -276,19 +287,17 @@ service ProductSearch { post: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:addProduct" body: "*" }; + option (google.api.method_signature) = "name,product"; } // Removes a Product from the specified ProductSet. - // - // Possible errors: - // - // * Returns NOT_FOUND If the Product is not found under the ProductSet. rpc RemoveProductFromProductSet(RemoveProductFromProductSetRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:removeProduct" body: "*" }; + option (google.api.method_signature) = "name,product"; } // Lists the Products in a ProductSet, in an unspecified order. If the @@ -303,6 +312,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products" }; + option (google.api.method_signature) = "name"; } // Asynchronous API that imports a list of reference images to specified @@ -322,11 +332,58 @@ service ProductSearch { post: "/v1p4beta1/{parent=projects/*/locations/*}/productSets:import" body: "*" }; + option (google.api.method_signature) = "parent,input_config"; + option (google.longrunning.operation_info) = { + response_type: "ImportProductSetsResponse" + metadata_type: "BatchOperationMetadata" + }; + } + + // Asynchronous API to delete all Products in a ProductSet or all Products + // that are in no ProductSet. + // + // If a Product is a member of the specified ProductSet in addition to other + // ProductSets, the Product will still be deleted. + // + // It is recommended to not delete the specified ProductSet until after this + // operation has completed. It is also recommended to not add any of the + // Products involved in the batch delete to a new ProductSet while this + // operation is running because those Products may still end up deleted. + // + // It's not possible to undo the PurgeProducts operation. Therefore, it is + // recommended to keep the csv files used in ImportProductSets (if that was + // how you originally built the Product Set) before starting PurgeProducts, in + // case you need to re-import the data after deletion. + // + // If the plan is to purge all of the Products from a ProductSet and then + // re-use the empty ProductSet to re-import new Products into the empty + // ProductSet, you must wait until the PurgeProducts operation has finished + // for that ProductSet. + // + // The [google.longrunning.Operation][google.longrunning.Operation] API can be + // used to keep track of the progress and results of the request. + // `Operation.metadata` contains `BatchOperationMetadata`. (progress) + rpc PurgeProducts(PurgeProductsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p4beta1/{parent=projects/*/locations/*}/products:purge" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "BatchOperationMetadata" + }; } } // A Product contains ReferenceImages. message Product { + option (google.api.resource) = { + type: "vision.googleapis.com/Product" + pattern: "projects/{project}/locations/{location}/products/{product}" + }; + // A product label represented as a key-value pair. message KeyValue { // The key of the label attached to the product. Cannot be empty and cannot @@ -354,16 +411,11 @@ message Product { // characters long. string description = 3; - // The category for the product identified by the reference image. This should - // be either "homegoods-v2", "apparel-v2", "toys-v2", or "packagedgoods-v1". - // The legacy categories "homegoods", "apparel", and "toys" are still - // supported but will be deprecated. For new products, please use - // "homegoods-v2", "apparel-v2", or "toys-v2" for better product search - // accuracy. It is recommended to migrate existing products to these - // categories as well. - // - // This field is immutable. - string product_category = 4; + // Immutable. The category for the product identified by the reference image. + // This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The + // legacy categories "homegoods", "apparel", and "toys" are still supported, + // but these should not be used for new products. + string product_category = 4 [(google.api.field_behavior) = IMMUTABLE]; // Key-value pairs that can be attached to a product. At query time, // constraints can be specified based on the product_labels. @@ -373,7 +425,11 @@ message Product { // to be supported soon. // // Multiple values can be assigned to the same key. One product may have up to - // 100 product_labels. + // 500 product_labels. + // + // Notice that the total number of distinct product_labels over all products + // in one ProductSet cannot exceed 1M, otherwise the product search pipeline + // will refuse to work for that ProductSet. repeated KeyValue product_labels = 5; } @@ -381,6 +437,11 @@ message Product { // million reference images. If the limit is exceeded, periodic indexing will // fail. message ProductSet { + option (google.api.resource) = { + type: "vision.googleapis.com/ProductSet" + pattern: "projects/{project}/locations/{location}/productSets/{product_set}" + }; + // The resource name of the ProductSet. // // Format is: @@ -399,18 +460,24 @@ message ProductSet { // "1970-01-01T00:00:00Z". // // This field is ignored when creating a ProductSet. - google.protobuf.Timestamp index_time = 3; + google.protobuf.Timestamp index_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. If there was an error with indexing the product set, the field // is populated. // // This field is ignored when creating a ProductSet. - google.rpc.Status index_error = 4; + google.rpc.Status index_error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A `ReferenceImage` represents a product image and its associated metadata, // such as bounding boxes. message ReferenceImage { + option (google.api.resource) = { + type: "vision.googleapis.com/ReferenceImage" + pattern: "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" + }; + // The resource name of the reference image. // // Format is: @@ -420,34 +487,38 @@ message ReferenceImage { // This field is ignored when creating a reference image. string name = 1; - // The Google Cloud Storage URI of the reference image. + // Required. The Google Cloud Storage URI of the reference image. // // The URI must start with `gs://`. - // - // Required. - string uri = 2; + string uri = 2 [(google.api.field_behavior) = REQUIRED]; - // Bounding polygons around the areas of interest in the reference image. - // Optional. If this field is empty, the system will try to detect regions of + // Optional. Bounding polygons around the areas of interest in the reference + // image. If this field is empty, the system will try to detect regions of // interest. At most 10 bounding polygons will be used. // // The provided shape is converted into a non-rotated rectangle. Once // converted, the small edge of the rectangle must be greater than or equal // to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 // is not). - repeated BoundingPoly bounding_polys = 3; + repeated BoundingPoly bounding_polys = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Request message for the `CreateProduct` method. message CreateProductRequest { - // The project in which the Product should be created. + // Required. The project in which the Product should be created. // // Format is // `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // The product to create. - Product product = 2; + // Required. The product to create. + Product product = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for this Product. If set, the server will // attempt to use this value as the resource id. If it is already in use, an @@ -458,11 +529,16 @@ message CreateProductRequest { // Request message for the `ListProducts` method. message ListProductsRequest { - // The project OR ProductSet from which Products should be listed. + // Required. The project OR ProductSet from which Products should be listed. // // Format: // `projects/PROJECT_ID/locations/LOC_ID` - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -483,18 +559,21 @@ message ListProductsResponse { // Request message for the `GetProduct` method. message GetProductRequest { - // Resource name of the Product to get. + // Required. Resource name of the Product to get. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; } // Request message for the `UpdateProduct` method. message UpdateProductRequest { - // The Product resource which replaces the one on the server. + // Required. The Product resource which replaces the one on the server. // product.name is immutable. - Product product = 1; + Product product = 1 [(google.api.field_behavior) = REQUIRED]; // The [FieldMask][google.protobuf.FieldMask] that specifies which fields // to update. @@ -506,22 +585,30 @@ message UpdateProductRequest { // Request message for the `DeleteProduct` method. message DeleteProductRequest { - // Resource name of product to delete. + // Required. Resource name of product to delete. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; } // Request message for the `CreateProductSet` method. message CreateProductSetRequest { - // The project in which the ProductSet should be created. + // Required. The project in which the ProductSet should be created. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // The ProductSet to create. - ProductSet product_set = 2; + // Required. The ProductSet to create. + ProductSet product_set = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for this ProductSet. If set, the server will // attempt to use this value as the resource id. If it is already in use, an @@ -532,10 +619,15 @@ message CreateProductSetRequest { // Request message for the `ListProductSets` method. message ListProductSetsRequest { - // The project from which ProductSets should be listed. + // Required. The project from which ProductSets should be listed. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -556,17 +648,22 @@ message ListProductSetsResponse { // Request message for the `GetProductSet` method. message GetProductSetRequest { - // Resource name of the ProductSet to get. + // Required. Resource name of the ProductSet to get. // // Format is: - // `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID` - string name = 1; + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; } // Request message for the `UpdateProductSet` method. message UpdateProductSetRequest { - // The ProductSet resource which replaces the one on the server. - ProductSet product_set = 1; + // Required. The ProductSet resource which replaces the one on the server. + ProductSet product_set = 1 [(google.api.field_behavior) = REQUIRED]; // The [FieldMask][google.protobuf.FieldMask] that specifies which fields to // update. @@ -577,24 +674,33 @@ message UpdateProductSetRequest { // Request message for the `DeleteProductSet` method. message DeleteProductSetRequest { - // Resource name of the ProductSet to delete. + // Required. Resource name of the ProductSet to delete. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; } // Request message for the `CreateReferenceImage` method. message CreateReferenceImageRequest { - // Resource name of the product in which to create the reference image. + // Required. Resource name of the product in which to create the reference + // image. // // Format is // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; - // The reference image to create. + // Required. The reference image to create. // If an image ID is specified, it is ignored. - ReferenceImage reference_image = 2; + ReferenceImage reference_image = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for the ReferenceImage to be added. If set, // the server will attempt to use this value as the resource id. If it is @@ -605,11 +711,14 @@ message CreateReferenceImageRequest { // Request message for the `ListReferenceImages` method. message ListReferenceImagesRequest { - // Resource name of the product containing the reference images. + // Required. Resource name of the product containing the reference images. // // Format is // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -635,61 +744,93 @@ message ListReferenceImagesResponse { // Request message for the `GetReferenceImage` method. message GetReferenceImageRequest { - // The resource name of the ReferenceImage to get. + // Required. The resource name of the ReferenceImage to get. // // Format is: // // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; } // Request message for the `DeleteReferenceImage` method. message DeleteReferenceImageRequest { - // The resource name of the reference image to delete. + // Required. The resource name of the reference image to delete. // // Format is: // // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; } // Request message for the `AddProductToProductSet` method. message AddProductToProductSetRequest { - // The resource name for the ProductSet to modify. + // Required. The resource name for the ProductSet to modify. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; - // The resource name for the Product to be added to this ProductSet. + // Required. The resource name for the Product to be added to this ProductSet. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2; + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; } // Request message for the `RemoveProductFromProductSet` method. message RemoveProductFromProductSetRequest { - // The resource name for the ProductSet to modify. + // Required. The resource name for the ProductSet to modify. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; - // The resource name for the Product to be removed from this ProductSet. + // Required. The resource name for the Product to be removed from this + // ProductSet. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2; + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; } // Request message for the `ListProductsInProductSet` method. message ListProductsInProductSetRequest { - // The ProductSet resource for which to retrieve Products. + // Required. The ProductSet resource for which to retrieve Products. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -789,13 +930,19 @@ message ImportProductSetsInputConfig { // Request message for the `ImportProductSets` method. message ImportProductSetsRequest { - // The project in which the ProductSets should be imported. + // Required. The project in which the ProductSets should be imported. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; - - // The input content for the list of requests. - ImportProductSetsInputConfig input_config = 2; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The input content for the list of requests. + ImportProductSetsInputConfig input_config = 2 + [(google.api.field_behavior) = REQUIRED]; } // Response message for the `ImportProductSets` method. @@ -855,3 +1002,38 @@ message BatchOperationMetadata { // set to true. google.protobuf.Timestamp end_time = 3; } + +// Config to control which ProductSet contains the Products to be deleted. +message ProductSetPurgeConfig { + // The ProductSet that contains the Products to delete. If a Product is a + // member of product_set_id in addition to other ProductSets, the Product will + // still be deleted. + string product_set_id = 1; +} + +// Request message for the `PurgeProducts` method. +message PurgeProductsRequest { + // The Products to delete. + oneof target { + // Specify which ProductSet contains the Products to be deleted. + ProductSetPurgeConfig product_set_purge_config = 2; + + // If delete_orphan_products is true, all Products that are not in any + // ProductSet will be deleted. + bool delete_orphan_products = 3; + } + + // Required. The project and location in which the Products should be deleted. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The default value is false. Override this value to true to actually perform + // the purge. + bool force = 4; +} diff --git a/google/cloud/vision/v1p4beta1/text_annotation.proto b/google/cloud/vision/v1p4beta1/text_annotation.proto index 542677f27..fbc35bb54 100644 --- a/google/cloud/vision/v1p4beta1/text_annotation.proto +++ b/google/cloud/vision/v1p4beta1/text_annotation.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -194,7 +194,7 @@ message Paragraph { // and the vertex order will still be (0, 1, 2, 3). BoundingPoly bounding_box = 2; - // List of words in this paragraph. + // List of all words in this paragraph. repeated Word words = 3; // Confidence of the OCR results for the paragraph. Range [0, 1]. @@ -250,7 +250,7 @@ message Symbol { // 2----3 // | | // 1----0 - // and the vertice order will still be (0, 1, 2, 3). + // and the vertex order will still be (0, 1, 2, 3). BoundingPoly bounding_box = 2; // The actual UTF-8 representation of the symbol. diff --git a/google/cloud/vision/v1p4beta1/vision_gapic.legacy.yaml b/google/cloud/vision/v1p4beta1/vision_gapic.legacy.yaml new file mode 100644 index 000000000..90d6f5000 --- /dev/null +++ b/google/cloud/vision/v1p4beta1/vision_gapic.legacy.yaml @@ -0,0 +1,603 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.vision.v1p4beta1 + python: + package_name: google.cloud.vision_v1p4beta1.gapic + go: + package_name: cloud.google.com/go/vision/apiv1p4beta1 + csharp: + package_name: Google.Cloud.Vision.V1p4beta1 + ruby: + package_name: Google::Cloud::Vision::V1p4beta1 + php: + package_name: Google\Cloud\Vision\V1p4beta1 + nodejs: + package_name: vision.v1p4beta1 +# A list of API interface configurations. +interfaces: + # The fully qualified name of the API interface. +- name: google.cloud.vision.v1p4beta1.ProductSearch + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/locations/{location} + entity_name: location + - name_pattern: projects/{project}/locations/{location}/productSets/{product_set} + entity_name: product_set + - name_pattern: projects/{project}/locations/{location}/products/{product} + entity_name: product + - name_pattern: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image} + entity_name: reference_image + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateProductSet + flattening: + groups: + - parameters: + - parent + - product_set + - product_set_id + required_fields: + - parent + - product_set + - product_set_id + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: ListProductSets + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: product_sets + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetProductSet + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: product_set + timeout_millis: 60000 + - name: UpdateProductSet + flattening: + groups: + - parameters: + - product_set + - update_mask + required_fields: + - product_set + - update_mask + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + product_set.name: product_set + timeout_millis: 60000 + - name: DeleteProductSet + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: product_set + timeout_millis: 60000 + - name: CreateProduct + flattening: + groups: + - parameters: + - parent + - product + - product_id + required_fields: + - parent + - product + - product_id + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: ListProducts + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: products + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + - name: GetProduct + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: product + timeout_millis: 60000 + - name: UpdateProduct + # params. + flattening: + groups: + - parameters: + - product + - update_mask + required_fields: + - product + - update_mask + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + product.name: product + timeout_millis: 60000 + - name: DeleteProduct + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: product + timeout_millis: 60000 + - name: CreateReferenceImage + flattening: + groups: + - parameters: + - parent + - reference_image + - reference_image_id + required_fields: + - parent + - reference_image + - reference_image_id + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: product + timeout_millis: 60000 + - name: DeleteReferenceImage + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: reference_image + timeout_millis: 60000 + - name: ListReferenceImages + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: reference_images + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: product + timeout_millis: 60000 + - name: GetReferenceImage + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: reference_image + timeout_millis: 60000 + - name: AddProductToProductSet + flattening: + groups: + - parameters: + - name + - product + required_fields: + - name + - product + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: product_set + timeout_millis: 60000 + - name: RemoveProductFromProductSet + flattening: + groups: + - parameters: + - name + - product + required_fields: + - name + - product + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: product_set + timeout_millis: 60000 + - name: ListProductsInProductSet + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: products + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: product_set + timeout_millis: 60000 + - name: ImportProductSets + flattening: + groups: + - parameters: + - parent + - input_config + required_fields: + - parent + - input_config + long_running: + return_type: google.cloud.vision.v1p4beta1.ImportProductSetsResponse + metadata_type: google.cloud.vision.v1p4beta1.BatchOperationMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: location + timeout_millis: 60000 + # The fully qualified name of the API interface. +- name: google.cloud.vision.v1p4beta1.ImageAnnotator + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: BatchAnnotateImages + flattening: + groups: + - parameters: + - requests + required_fields: + - requests + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: BatchAnnotateFiles + flattening: + groups: + - parameters: + - requests + required_fields: + - requests + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: AsyncBatchAnnotateImages + flattening: + groups: + - parameters: + - requests + - output_config + required_fields: + - requests + - output_config + retry_codes_name: non_idempotent + retry_params_name: default + long_running: + return_type: google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse + metadata_type: google.cloud.vision.v1p4beta1.OperationMetadata + initial_poll_delay_millis: 500 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 5000 + total_poll_timeout_millis: 300000 + timeout_millis: 60000 + - name: AsyncBatchAnnotateFiles + flattening: + groups: + - parameters: + - requests + required_fields: + - requests + long_running: + return_type: google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse + metadata_type: google.cloud.vision.v1p4beta1.OperationMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 +resource_name_generation: +- message_name: CreateProductSetRequest + field_entity_map: + parent: location +- message_name: ListProductSetsRequest + field_entity_map: + parent: location +- message_name: GetProductSetRequest + field_entity_map: + name: product_set +- message_name: UpdateProductSetRequest + field_entity_map: + product_set.name: product_set +- message_name: DeleteProductSetRequest + field_entity_map: + name: product_set +- message_name: CreateProductRequest + field_entity_map: + parent: location +- message_name: ListProductsRequest + field_entity_map: + parent: location +- message_name: GetProductRequest + field_entity_map: + name: product +- message_name: UpdateProductRequest + field_entity_map: + product.name: product +- message_name: DeleteProductRequest + field_entity_map: + name: product +- message_name: CreateReferenceImageRequest + field_entity_map: + parent: product +- message_name: DeleteReferenceImageRequest + field_entity_map: + name: reference_image +- message_name: ListReferenceImagesRequest + field_entity_map: + parent: product +- message_name: GetReferenceImageRequest + field_entity_map: + name: reference_image +- message_name: AddProductToProductSetRequest + field_entity_map: + name: product_set +- message_name: RemoveProductFromProductSetRequest + field_entity_map: + name: product_set +- message_name: ListProductsInProductSetRequest + field_entity_map: + name: product_set +- message_name: ImportProductSetsRequest + field_entity_map: + parent: location diff --git a/google/cloud/vision/v1p4beta1/vision_gapic.yaml b/google/cloud/vision/v1p4beta1/vision_gapic.yaml index 90d6f5000..92569c0fb 100644 --- a/google/cloud/vision/v1p4beta1/vision_gapic.yaml +++ b/google/cloud/vision/v1p4beta1/vision_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -20,411 +20,32 @@ language_settings: interfaces: # The fully qualified name of the API interface. - name: google.cloud.vision.v1p4beta1.ProductSearch - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/locations/{location} - entity_name: location - - name_pattern: projects/{project}/locations/{location}/productSets/{product_set} - entity_name: product_set - - name_pattern: projects/{project}/locations/{location}/products/{product} - entity_name: product - - name_pattern: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image} - entity_name: reference_image - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 # A list of method configurations. # Common properties: # # name - The simple name of the method. # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # # retry_codes_name - Specifies the configuration for retryable codes. The # name must be defined in interfaces.retry_codes_def. # # retry_params_name - Specifies the configuration for retry/backoff # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: CreateProductSet - flattening: - groups: - - parameters: - - parent - - product_set - - product_set_id - required_fields: - - parent - - product_set - - product_set_id - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - - name: ListProductSets - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: product_sets - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - - name: GetProductSet - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: product_set - timeout_millis: 60000 - - name: UpdateProductSet - flattening: - groups: - - parameters: - - product_set - - update_mask - required_fields: - - product_set - - update_mask - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - product_set.name: product_set - timeout_millis: 60000 - name: DeleteProductSet - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: product_set - timeout_millis: 60000 - - name: CreateProduct - flattening: - groups: - - parameters: - - parent - - product - - product_id - required_fields: - - parent - - product - - product_id - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - - name: ListProducts - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: products retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 - - name: GetProduct - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: product - timeout_millis: 60000 - - name: UpdateProduct - # params. - flattening: - groups: - - parameters: - - product - - update_mask - required_fields: - - product - - update_mask - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - product.name: product - timeout_millis: 60000 - name: DeleteProduct - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: product - timeout_millis: 60000 - - name: CreateReferenceImage - flattening: - groups: - - parameters: - - parent - - reference_image - - reference_image_id - required_fields: - - parent - - reference_image - - reference_image_id - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: product - timeout_millis: 60000 - name: DeleteReferenceImage - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: reference_image - timeout_millis: 60000 - - name: ListReferenceImages - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: reference_images - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: product - timeout_millis: 60000 - - name: GetReferenceImage - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: reference_image - timeout_millis: 60000 - - name: AddProductToProductSet - flattening: - groups: - - parameters: - - name - - product - required_fields: - - name - - product - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: product_set - timeout_millis: 60000 - - name: RemoveProductFromProductSet - flattening: - groups: - - parameters: - - name - - product - required_fields: - - name - - product - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: product_set - timeout_millis: 60000 - - name: ListProductsInProductSet - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: products - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: product_set - timeout_millis: 60000 - name: ImportProductSets - flattening: - groups: - - parameters: - - parent - - input_config - required_fields: - - parent - - input_config long_running: - return_type: google.cloud.vision.v1p4beta1.ImportProductSetsResponse - metadata_type: google.cloud.vision.v1p4beta1.BatchOperationMetadata initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: location - timeout_millis: 60000 + # The fully qualified name of the API interface. - name: google.cloud.vision.v1p4beta1.ImageAnnotator - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: [] - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] # Definition for retry/backoff parameters. retry_params_def: - name: default @@ -440,164 +61,27 @@ interfaces: # # name - The simple name of the method. # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # # retry_codes_name - Specifies the configuration for retryable codes. The # name must be defined in interfaces.retry_codes_def. # # retry_params_name - Specifies the configuration for retry/backoff # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - name: BatchAnnotateImages - flattening: - groups: - - parameters: - - requests - required_fields: - - requests - retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 - name: BatchAnnotateFiles - flattening: - groups: - - parameters: - - requests - required_fields: - - requests - retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 - name: AsyncBatchAnnotateImages - flattening: - groups: - - parameters: - - requests - - output_config - required_fields: - - requests - - output_config - retry_codes_name: non_idempotent retry_params_name: default long_running: - return_type: google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse - metadata_type: google.cloud.vision.v1p4beta1.OperationMetadata initial_poll_delay_millis: 500 poll_delay_multiplier: 1.5 max_poll_delay_millis: 5000 total_poll_timeout_millis: 300000 - timeout_millis: 60000 - name: AsyncBatchAnnotateFiles - flattening: - groups: - - parameters: - - requests - required_fields: - - requests + retry_params_name: default long_running: - return_type: google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse - metadata_type: google.cloud.vision.v1p4beta1.OperationMetadata initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 -resource_name_generation: -- message_name: CreateProductSetRequest - field_entity_map: - parent: location -- message_name: ListProductSetsRequest - field_entity_map: - parent: location -- message_name: GetProductSetRequest - field_entity_map: - name: product_set -- message_name: UpdateProductSetRequest - field_entity_map: - product_set.name: product_set -- message_name: DeleteProductSetRequest - field_entity_map: - name: product_set -- message_name: CreateProductRequest - field_entity_map: - parent: location -- message_name: ListProductsRequest - field_entity_map: - parent: location -- message_name: GetProductRequest - field_entity_map: - name: product -- message_name: UpdateProductRequest - field_entity_map: - product.name: product -- message_name: DeleteProductRequest - field_entity_map: - name: product -- message_name: CreateReferenceImageRequest - field_entity_map: - parent: product -- message_name: DeleteReferenceImageRequest - field_entity_map: - name: reference_image -- message_name: ListReferenceImagesRequest - field_entity_map: - parent: product -- message_name: GetReferenceImageRequest - field_entity_map: - name: reference_image -- message_name: AddProductToProductSetRequest - field_entity_map: - name: product_set -- message_name: RemoveProductFromProductSetRequest - field_entity_map: - name: product_set -- message_name: ListProductsInProductSetRequest - field_entity_map: - name: product_set -- message_name: ImportProductSetsRequest - field_entity_map: - parent: location diff --git a/google/cloud/vision/v1p4beta1/vision_grpc_service_config.json b/google/cloud/vision/v1p4beta1/vision_grpc_service_config.json new file mode 100755 index 000000000..9f39156a2 --- /dev/null +++ b/google/cloud/vision/v1p4beta1/vision_grpc_service_config.json @@ -0,0 +1,130 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.vision.v1p4beta1.ImageAnnotator", + "method": "BatchAnnotateImages" + }, + { + "service": "google.cloud.vision.v1p4beta1.ImageAnnotator", + "method": "BatchAnnotateFiles" + }, + { + "service": "google.cloud.vision.v1p4beta1.ImageAnnotator", + "method": "AsyncBatchAnnotateImages" + }, + { + "service": "google.cloud.vision.v1p4beta1.ImageAnnotator", + "method": "AsyncBatchAnnotateFiles" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + ] + } + }, + { + "name": [ + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "CreateProductSet" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "UpdateProductSet" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "CreateProduct" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "UpdateProduct" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "CreateReferenceImage" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "AddProductToProductSet" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "RemoveProductFromProductSet" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "ImportProductSets" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + ] + } + }, + { + "name": [ + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "ListProductSets" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "GetProductSet" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "DeleteProductSet" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "ListProducts" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "GetProduct" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "DeleteProduct" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "DeleteReferenceImage" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "ListReferenceImages" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "GetReferenceImage" + }, + { + "service": "google.cloud.vision.v1p4beta1.ProductSearch", + "method": "ListProductsInProductSet" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/vision/v1p4beta1/vision_v1p4beta1.yaml b/google/cloud/vision/v1p4beta1/vision_v1p4beta1.yaml new file mode 100644 index 000000000..d05e1af38 --- /dev/null +++ b/google/cloud/vision/v1p4beta1/vision_v1p4beta1.yaml @@ -0,0 +1,41 @@ +type: google.api.Service +config_version: 3 +name: vision.googleapis.com +title: Cloud Vision API + +apis: +- name: google.cloud.vision.v1p4beta1.ImageAnnotator +- name: google.cloud.vision.v1p4beta1.ProductSearch + +types: +- name: google.cloud.vision.v1p4beta1.AnnotateFileResponse +- name: google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse +- name: google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse +- name: google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse +- name: google.cloud.vision.v1p4beta1.BatchOperationMetadata +- name: google.cloud.vision.v1p4beta1.ImportProductSetsResponse +- name: google.cloud.vision.v1p4beta1.OperationMetadata + +documentation: + summary: |- + Integrates Google Vision features, including image labeling, face, logo, + and landmark detection, optical character recognition (OCR), and detection + of explicit content, into applications. + +authentication: + rules: + - selector: 'google.cloud.vision.v1p4beta1.ImageAnnotator.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-vision + - selector: 'google.cloud.vision.v1p4beta1.ProductSearch.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-vision + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-vision diff --git a/google/cloud/vision/v1p4beta1/web_detection.proto b/google/cloud/vision/v1p4beta1/web_detection.proto index 15822563b..446a937f1 100644 --- a/google/cloud/vision/v1p4beta1/web_detection.proto +++ b/google/cloud/vision/v1p4beta1/web_detection.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -50,17 +50,6 @@ message WebDetection { float score = 2; } - // Label to provide extra metadata for the web detection. - message WebLabel { - // Label for extra metadata. - string label = 1; - - // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; - } - // Metadata for web pages. message WebPage { // The result web page URL. @@ -83,6 +72,17 @@ message WebDetection { repeated WebImage partial_matching_images = 5; } + // Label to provide extra metadata for the web detection. + message WebLabel { + // Label for extra metadata. + string label = 1; + + // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + // For more information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + } + // Deduced entities from similar images on the Internet. repeated WebEntity web_entities = 1; diff --git a/google/cloud/webrisk/artman_webrisk_v1beta1.yaml b/google/cloud/webrisk/artman_webrisk_v1beta1.yaml index 4e27f0413..47ac5d2c6 100644 --- a/google/cloud/webrisk/artman_webrisk_v1beta1.yaml +++ b/google/cloud/webrisk/artman_webrisk_v1beta1.yaml @@ -6,8 +6,9 @@ common: - name: google-common-protos src_proto_paths: - v1beta1 - service_yaml: webrisk.yaml + service_yaml: v1beta1/webrisk_v1beta1.yaml gapic_yaml: v1beta1/webrisk_gapic.yaml + proto_package: google.cloud.webrisk.v1beta1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/webrisk/v1/BUILD.bazel b/google/cloud/webrisk/v1/BUILD.bazel new file mode 100644 index 000000000..ea879bbae --- /dev/null +++ b/google/cloud/webrisk/v1/BUILD.bazel @@ -0,0 +1,358 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "webrisk_proto", + srcs = [ + "webrisk.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "webrisk_proto_with_info", + deps = [ + ":webrisk_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "webrisk_java_proto", + deps = [":webrisk_proto"], +) + +java_grpc_library( + name = "webrisk_java_grpc", + srcs = [":webrisk_proto"], + deps = [":webrisk_java_proto"], +) + +java_gapic_library( + name = "webrisk_java_gapic", + src = ":webrisk_proto_with_info", + gapic_yaml = "webrisk_gapic.yaml", + package = "google.cloud.webrisk.v1", + service_yaml = "webrisk_v1.yaml", + test_deps = [ + ":webrisk_java_grpc", + ], + deps = [ + ":webrisk_java_proto", + ], +) + +java_gapic_test( + name = "webrisk_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.webrisk.v1.WebRiskServiceClientTest", + ], + runtime_deps = [":webrisk_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-webrisk-v1-java", + deps = [ + ":webrisk_java_gapic", + ":webrisk_java_grpc", + ":webrisk_java_proto", + ":webrisk_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "webrisk_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/webrisk/v1", + protos = [":webrisk_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "webrisk_go_gapic", + srcs = [":webrisk_proto_with_info"], + grpc_service_config = "webrisk_grpc_service_config.json", + importpath = "cloud.google.com/go/webrisk/apiv1;webrisk", + service_yaml = "webrisk_v1.yaml", + deps = [ + ":webrisk_go_proto", + ], +) + +go_test( + name = "webrisk_go_gapic_test", + srcs = [":webrisk_go_gapic_srcjar_test"], + embed = [":webrisk_go_gapic"], + importpath = "cloud.google.com/go/webrisk/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-webrisk-v1-go", + deps = [ + ":webrisk_go_gapic", + ":webrisk_go_gapic_srcjar-test.srcjar", + ":webrisk_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "webrisk_moved_proto", + srcs = [":webrisk_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "webrisk_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":webrisk_moved_proto"], +) + +py_grpc_library( + name = "webrisk_py_grpc", + srcs = [":webrisk_moved_proto"], + deps = [":webrisk_py_proto"], +) + +py_gapic_library( + name = "webrisk_py_gapic", + src = ":webrisk_proto_with_info", + gapic_yaml = "webrisk_gapic.yaml", + package = "google.cloud.webrisk.v1", + service_yaml = "webrisk_v1.yaml", + deps = [ + ":webrisk_py_grpc", + ":webrisk_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "webrisk-v1-py", + deps = [ + ":webrisk_py_gapic", + ":webrisk_py_grpc", + ":webrisk_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "webrisk_php_proto", + deps = [":webrisk_proto"], +) + +php_grpc_library( + name = "webrisk_php_grpc", + srcs = [":webrisk_proto"], + deps = [":webrisk_php_proto"], +) + +php_gapic_library( + name = "webrisk_php_gapic", + src = ":webrisk_proto_with_info", + gapic_yaml = "webrisk_gapic.yaml", + package = "google.cloud.webrisk.v1", + service_yaml = "webrisk_v1.yaml", + deps = [ + ":webrisk_php_grpc", + ":webrisk_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-webrisk-v1-php", + deps = [ + ":webrisk_php_gapic", + ":webrisk_php_grpc", + ":webrisk_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "webrisk_nodejs_gapic", + src = ":webrisk_proto_with_info", + gapic_yaml = "webrisk_gapic.yaml", + package = "google.cloud.webrisk.v1", + service_yaml = "webrisk_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "webrisk-v1-nodejs", + deps = [ + ":webrisk_nodejs_gapic", + ":webrisk_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "webrisk_ruby_proto", + deps = [":webrisk_proto"], +) + +ruby_grpc_library( + name = "webrisk_ruby_grpc", + srcs = [":webrisk_proto"], + deps = [":webrisk_ruby_proto"], +) + +ruby_gapic_library( + name = "webrisk_ruby_gapic", + src = ":webrisk_proto_with_info", + gapic_yaml = "webrisk_gapic.yaml", + package = "google.cloud.webrisk.v1", + service_yaml = "webrisk_v1.yaml", + deps = [ + ":webrisk_ruby_grpc", + ":webrisk_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-webrisk-v1-ruby", + deps = [ + ":webrisk_ruby_gapic", + ":webrisk_ruby_grpc", + ":webrisk_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "webrisk_csharp_proto", + deps = [":webrisk_proto"], +) + +csharp_grpc_library( + name = "webrisk_csharp_grpc", + srcs = [":webrisk_proto"], + deps = [":webrisk_csharp_proto"], +) + +csharp_gapic_library( + name = "webrisk_csharp_gapic", + src = ":webrisk_proto_with_info", + gapic_yaml = "webrisk_gapic.yaml", + package = "google.cloud.webrisk.v1", + service_yaml = "webrisk_v1.yaml", + deps = [ + ":webrisk_csharp_grpc", + ":webrisk_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-webrisk-v1-csharp", + deps = [ + ":webrisk_csharp_gapic", + ":webrisk_csharp_grpc", + ":webrisk_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/webrisk/v1/webrisk.proto b/google/cloud/webrisk/v1/webrisk.proto new file mode 100644 index 000000000..71b6b44f7 --- /dev/null +++ b/google/cloud/webrisk/v1/webrisk.proto @@ -0,0 +1,353 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.webrisk.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.WebRisk.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/webrisk/v1;webrisk"; +option java_multiple_files = true; +option java_outer_classname = "WebRiskProto"; +option java_package = "com.google.webrisk.v1"; +option objc_class_prefix = "GCWR"; +option php_namespace = "Google\\Cloud\\WebRisk\\V1"; +option ruby_package = "Google::Cloud::WebRisk::V1"; + +// Web Risk API defines an interface to detect malicious URLs on your +// website and in client applications. +service WebRiskService { + option (google.api.default_host) = "webrisk.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Gets the most recent threat list diffs. These diffs should be applied to + // a local database of hashes to keep it up-to-date. If the local database is + // empty or excessively out-of-date, a complete snapshot of the database will + // be returned. This Method only updates a single ThreatList at a time. To + // update multiple ThreatList databases, this method needs to be called once + // for each list. + rpc ComputeThreatListDiff(ComputeThreatListDiffRequest) returns (ComputeThreatListDiffResponse) { + option (google.api.http) = { + get: "/v1/threatLists:computeDiff" + }; + option (google.api.method_signature) = "threat_type,version_token,constraints"; + } + + // This method is used to check whether a URI is on a given threatList. + // Multiple threatLists may be searched in a single query. + // The response will list all requested threatLists the URI was found to + // match. If the URI is not found on any of the requested ThreatList an + // empty response will be returned. + rpc SearchUris(SearchUrisRequest) returns (SearchUrisResponse) { + option (google.api.http) = { + get: "/v1/uris:search" + }; + option (google.api.method_signature) = "uri,threat_types"; + } + + // Gets the full hashes that match the requested hash prefix. + // This is used after a hash prefix is looked up in a threatList + // and there is a match. The client side threatList only holds partial hashes + // so the client must query this method to determine if there is a full + // hash match of a threat. + rpc SearchHashes(SearchHashesRequest) returns (SearchHashesResponse) { + option (google.api.http) = { + get: "/v1/hashes:search" + }; + option (google.api.method_signature) = "hash_prefix,threat_types"; + } + + // Creates a Submission of a URI suspected of containing phishing content to + // be reviewed. If the result verifies the existence of malicious phishing + // content, the site will be added to the [Google's Social Engineering + // lists](https://support.google.com/webmasters/answer/6350487/) in order to + // protect users that could get exposed to this threat in the future. Only + // projects with CREATE_SUBMISSION_USERS visibility can use this method. + rpc CreateSubmission(CreateSubmissionRequest) returns (Submission) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/submissions" + body: "submission" + }; + option (google.api.method_signature) = "parent,submission"; + } +} + +// Describes an API diff request. +message ComputeThreatListDiffRequest { + // The constraints for this diff. + message Constraints { + // The maximum size in number of entries. The diff will not contain more + // entries than this value. This should be a power of 2 between 2**10 and + // 2**20. If zero, no diff size limit is set. + int32 max_diff_entries = 1; + + // Sets the maximum number of entries that the client is willing to have + // in the local database. This should be a power of 2 between 2**10 and + // 2**20. If zero, no database size limit is set. + int32 max_database_entries = 2; + + // The compression types supported by the client. + repeated CompressionType supported_compressions = 3; + } + + // Required. The threat list to update. Only a single ThreatType should be specified. + ThreatType threat_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // The current version token of the client for the requested list (the + // client version that was received from the last successful diff). + // If the client does not have a version token (this is the first time calling + // ComputeThreatListDiff), this may be left empty and a full database + // snapshot will be returned. + bytes version_token = 2; + + // Required. The constraints associated with this request. + Constraints constraints = 3 [(google.api.field_behavior) = REQUIRED]; +} + +message ComputeThreatListDiffResponse { + // The expected state of a client's local database. + message Checksum { + // The SHA256 hash of the client state; that is, of the sorted list of all + // hashes present in the database. + bytes sha256 = 1; + } + + // The type of response sent to the client. + enum ResponseType { + // Unknown. + RESPONSE_TYPE_UNSPECIFIED = 0; + + // Partial updates are applied to the client's existing local database. + DIFF = 1; + + // Full updates resets the client's entire local database. This means + // that either the client had no state, was seriously out-of-date, + // or the client is believed to be corrupt. + RESET = 2; + } + + // The type of response. This may indicate that an action must be taken by the + // client when the response is received. + ResponseType response_type = 4; + + // A set of entries to add to a local threat type's list. + ThreatEntryAdditions additions = 5; + + // A set of entries to remove from a local threat type's list. + // This field may be empty. + ThreatEntryRemovals removals = 6; + + // The new opaque client version token. This should be retained by the client + // and passed into the next call of ComputeThreatListDiff as 'version_token'. + // A separate version token should be stored and used for each threatList. + bytes new_version_token = 7; + + // The expected SHA256 hash of the client state; that is, of the sorted list + // of all hashes present in the database after applying the provided diff. + // If the client state doesn't match the expected state, the client must + // discard this diff and retry later. + Checksum checksum = 8; + + // The soonest the client should wait before issuing any diff + // request. Querying sooner is unlikely to produce a meaningful diff. + // Waiting longer is acceptable considering the use case. + // If this field is not set clients may update as soon as they want. + google.protobuf.Timestamp recommended_next_diff = 2; +} + +// Request to check URI entries against threatLists. +message SearchUrisRequest { + // Required. The URI to be checked for matches. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ThreatLists to search in. Multiple ThreatLists may be specified. + repeated ThreatType threat_types = 2 [(google.api.field_behavior) = REQUIRED]; +} + +message SearchUrisResponse { + // Contains threat information on a matching uri. + message ThreatUri { + // The ThreatList this threat belongs to. + repeated ThreatType threat_types = 1; + + // The cache lifetime for the returned match. Clients must not cache this + // response past this timestamp to avoid false positives. + google.protobuf.Timestamp expire_time = 2; + } + + // The threat list matches. This may be empty if the URI is on no list. + ThreatUri threat = 1; +} + +// Request to return full hashes matched by the provided hash prefixes. +message SearchHashesRequest { + // A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + // hash. For JSON requests, this field is base64-encoded. + bytes hash_prefix = 1; + + // Required. The ThreatLists to search in. Multiple ThreatLists may be specified. + repeated ThreatType threat_types = 2 [(google.api.field_behavior) = REQUIRED]; +} + +message SearchHashesResponse { + // Contains threat information on a matching hash. + message ThreatHash { + // The ThreatList this threat belongs to. + // This must contain at least one entry. + repeated ThreatType threat_types = 1; + + // A 32 byte SHA256 hash. This field is in binary format. For JSON + // requests, hashes are base64-encoded. + bytes hash = 2; + + // The cache lifetime for the returned match. Clients must not cache this + // response past this timestamp to avoid false positives. + google.protobuf.Timestamp expire_time = 3; + } + + // The full hashes that matched the requested prefixes. + // The hash will be populated in the key. + repeated ThreatHash threats = 1; + + // For requested entities that did not match the threat list, how long to + // cache the response until. + google.protobuf.Timestamp negative_expire_time = 2; +} + +// Contains the set of entries to add to a local database. +// May contain a combination of compressed and raw data in a single response. +message ThreatEntryAdditions { + // The raw SHA256-formatted entries. + // Repeated to allow returning sets of hashes with different prefix sizes. + repeated RawHashes raw_hashes = 1; + + // The encoded 4-byte prefixes of SHA256-formatted entries, using a + // Golomb-Rice encoding. The hashes are converted to uint32, sorted in + // ascending order, then delta encoded and stored as encoded_data. + RiceDeltaEncoding rice_hashes = 2; +} + +// Contains the set of entries to remove from a local database. +message ThreatEntryRemovals { + // The raw removal indices for a local list. + RawIndices raw_indices = 1; + + // The encoded local, lexicographically-sorted list indices, using a + // Golomb-Rice encoding. Used for sending compressed removal indices. The + // removal indices (uint32) are sorted in ascending order, then delta encoded + // and stored as encoded_data. + RiceDeltaEncoding rice_indices = 2; +} + +// The type of threat. This maps dirrectly to the threat list a threat may +// belong to. +enum ThreatType { + // Unknown. + THREAT_TYPE_UNSPECIFIED = 0; + + // Malware targeting any platform. + MALWARE = 1; + + // Social engineering targeting any platform. + SOCIAL_ENGINEERING = 2; + + // Unwanted software targeting any platform. + UNWANTED_SOFTWARE = 3; +} + +// The ways in which threat entry sets can be compressed. +enum CompressionType { + // Unknown. + COMPRESSION_TYPE_UNSPECIFIED = 0; + + // Raw, uncompressed data. + RAW = 1; + + // Rice-Golomb encoded data. + RICE = 2; +} + +// A set of raw indices to remove from a local list. +message RawIndices { + // The indices to remove from a lexicographically-sorted local list. + repeated int32 indices = 1; +} + +// The uncompressed threat entries in hash format. +// Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 +// bytes, but some hashes are lengthened if they collide with the hash of a +// popular URI. +// +// Used for sending ThreatEntryAdditons to clients that do not support +// compression, or when sending non-4-byte hashes to clients that do support +// compression. +message RawHashes { + // The number of bytes for each prefix encoded below. This field can be + // anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + // In practice this is almost always 4, except in exceptional circumstances. + int32 prefix_size = 1; + + // The hashes, in binary format, concatenated into one long string. Hashes are + // sorted in lexicographic order. For JSON API users, hashes are + // base64-encoded. + bytes raw_hashes = 2; +} + +// The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or +// compressed removal indices. +message RiceDeltaEncoding { + // The offset of the first entry in the encoded data, or, if only a single + // integer was encoded, that single integer's value. If the field is empty or + // missing, assume zero. + int64 first_value = 1; + + // The Golomb-Rice parameter, which is a number between 2 and 28. This field + // is missing (that is, zero) if `num_entries` is zero. + int32 rice_parameter = 2; + + // The number of entries that are delta encoded in the encoded data. If only a + // single integer was encoded, this will be zero and the single value will be + // stored in `first_value`. + int32 entry_count = 3; + + // The encoded deltas that are encoded using the Golomb-Rice coder. + bytes encoded_data = 4; +} + +// Wraps a URI that might be displaying phishing content. +message Submission { + // Required. The URI that is being reported for phishing content to be analyzed. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to send a potentially phishy URI to WebRisk. +message CreateSubmissionRequest { + // Required. The name of the project that is making the submission. This string is in + // the format "projects/{project_number}". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The submission that contains the content of the phishing report. + Submission submission = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/google/cloud/webrisk/v1/webrisk_gapic.yaml b/google/cloud/webrisk/v1/webrisk_gapic.yaml new file mode 100644 index 000000000..c12da8e30 --- /dev/null +++ b/google/cloud/webrisk/v1/webrisk_gapic.yaml @@ -0,0 +1,19 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.webrisk.v1 + python: + package_name: google.cloud.webrisk_v1.gapic + go: + package_name: cloud.google.com/go/webrisk/apiv1 + csharp: + package_name: Google.Cloud.WebRisk.V1 + ruby: + package_name: Google::Cloud::Webrisk::V1 + php: + package_name: Google\Cloud\WebRisk\V1 + nodejs: + package_name: web-risk.v1 + domain_layer_location: google-cloud diff --git a/google/cloud/webrisk/v1/webrisk_grpc_service_config.json b/google/cloud/webrisk/v1/webrisk_grpc_service_config.json new file mode 100755 index 000000000..3e1707929 --- /dev/null +++ b/google/cloud/webrisk/v1/webrisk_grpc_service_config.json @@ -0,0 +1,30 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.webrisk.v1.WebRiskService", + "method": "ComputeThreatListDiff" + }, + { + "service": "google.cloud.webrisk.v1.WebRiskService", + "method": "SearchUris" + }, + { + "service": "google.cloud.webrisk.v1.WebRiskService", + "method": "SearchHashes" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/webrisk/webrisk.yaml b/google/cloud/webrisk/v1/webrisk_v1.yaml similarity index 67% rename from google/cloud/webrisk/webrisk.yaml rename to google/cloud/webrisk/v1/webrisk_v1.yaml index f43119679..cfb85a603 100644 --- a/google/cloud/webrisk/webrisk.yaml +++ b/google/cloud/webrisk/v1/webrisk_v1.yaml @@ -4,11 +4,11 @@ name: webrisk.googleapis.com title: Web Risk API apis: - - name: google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 +- name: google.cloud.webrisk.v1.WebRiskService authentication: rules: - - selector: '*' + - selector: 'google.cloud.webrisk.v1.WebRiskService.*' oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/webrisk/v1beta1/BUILD.bazel b/google/cloud/webrisk/v1beta1/BUILD.bazel new file mode 100644 index 000000000..a42686c83 --- /dev/null +++ b/google/cloud/webrisk/v1beta1/BUILD.bazel @@ -0,0 +1,356 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "webrisk_proto", + srcs = [ + "webrisk.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "webrisk_proto_with_info", + deps = [ + ":webrisk_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "webrisk_java_proto", + deps = [":webrisk_proto"], +) + +java_grpc_library( + name = "webrisk_java_grpc", + srcs = [":webrisk_proto"], + deps = [":webrisk_java_proto"], +) + +java_gapic_library( + name = "webrisk_java_gapic", + src = ":webrisk_proto_with_info", + gapic_yaml = "webrisk_gapic.yaml", + package = "google.cloud.webrisk.v1beta1", + service_yaml = "webrisk_v1beta1.yaml", + test_deps = [ + ":webrisk_java_grpc", + ], + deps = [ + ":webrisk_java_proto", + ], +) + +java_gapic_test( + name = "webrisk_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1ClientTest", + ], + runtime_deps = [":webrisk_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-webrisk-v1beta1-java", + deps = [ + ":webrisk_java_gapic", + ":webrisk_java_grpc", + ":webrisk_java_proto", + ":webrisk_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "webrisk_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/webrisk/v1beta1", + protos = [":webrisk_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "webrisk_go_gapic", + srcs = [":webrisk_proto_with_info"], + grpc_service_config = "webrisk_grpc_service_config.json", + importpath = "cloud.google.com/go/webrisk/apiv1beta1;webrisk", + service_yaml = "webrisk_v1beta1.yaml", + deps = [ + ":webrisk_go_proto", + ], +) + +go_test( + name = "webrisk_go_gapic_test", + srcs = [":webrisk_go_gapic_srcjar_test"], + embed = [":webrisk_go_gapic"], + importpath = "cloud.google.com/go/webrisk/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-webrisk-v1beta1-go", + deps = [ + ":webrisk_go_gapic", + ":webrisk_go_gapic_srcjar-test.srcjar", + ":webrisk_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "webrisk_moved_proto", + srcs = [":webrisk_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "webrisk_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":webrisk_moved_proto"], +) + +py_grpc_library( + name = "webrisk_py_grpc", + srcs = [":webrisk_moved_proto"], + deps = [":webrisk_py_proto"], +) + +py_gapic_library( + name = "webrisk_py_gapic", + src = ":webrisk_proto_with_info", + gapic_yaml = "webrisk_gapic.yaml", + package = "google.cloud.webrisk.v1beta1", + service_yaml = "webrisk_v1beta1.yaml", + deps = [ + ":webrisk_py_grpc", + ":webrisk_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "webrisk-v1beta1-py", + deps = [ + ":webrisk_py_gapic", + ":webrisk_py_grpc", + ":webrisk_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "webrisk_php_proto", + deps = [":webrisk_proto"], +) + +php_grpc_library( + name = "webrisk_php_grpc", + srcs = [":webrisk_proto"], + deps = [":webrisk_php_proto"], +) + +php_gapic_library( + name = "webrisk_php_gapic", + src = ":webrisk_proto_with_info", + gapic_yaml = "webrisk_gapic.yaml", + package = "google.cloud.webrisk.v1beta1", + service_yaml = "webrisk_v1beta1.yaml", + deps = [ + ":webrisk_php_grpc", + ":webrisk_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-webrisk-v1beta1-php", + deps = [ + ":webrisk_php_gapic", + ":webrisk_php_grpc", + ":webrisk_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "webrisk_nodejs_gapic", + src = ":webrisk_proto_with_info", + gapic_yaml = "webrisk_gapic.yaml", + package = "google.cloud.webrisk.v1beta1", + service_yaml = "webrisk_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "webrisk-v1beta1-nodejs", + deps = [ + ":webrisk_nodejs_gapic", + ":webrisk_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "webrisk_ruby_proto", + deps = [":webrisk_proto"], +) + +ruby_grpc_library( + name = "webrisk_ruby_grpc", + srcs = [":webrisk_proto"], + deps = [":webrisk_ruby_proto"], +) + +ruby_gapic_library( + name = "webrisk_ruby_gapic", + src = ":webrisk_proto_with_info", + gapic_yaml = "webrisk_gapic.yaml", + package = "google.cloud.webrisk.v1beta1", + service_yaml = "webrisk_v1beta1.yaml", + deps = [ + ":webrisk_ruby_grpc", + ":webrisk_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-webrisk-v1beta1-ruby", + deps = [ + ":webrisk_ruby_gapic", + ":webrisk_ruby_grpc", + ":webrisk_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "webrisk_csharp_proto", + deps = [":webrisk_proto"], +) + +csharp_grpc_library( + name = "webrisk_csharp_grpc", + srcs = [":webrisk_proto"], + deps = [":webrisk_csharp_proto"], +) + +csharp_gapic_library( + name = "webrisk_csharp_gapic", + src = ":webrisk_proto_with_info", + gapic_yaml = "webrisk_gapic.yaml", + package = "google.cloud.webrisk.v1beta1", + service_yaml = "webrisk_v1beta1.yaml", + deps = [ + ":webrisk_csharp_grpc", + ":webrisk_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-webrisk-v1beta1-csharp", + deps = [ + ":webrisk_csharp_gapic", + ":webrisk_csharp_grpc", + ":webrisk_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/webrisk/v1beta1/webrisk.proto b/google/cloud/webrisk/v1beta1/webrisk.proto index c6b5f7c90..02264252f 100644 --- a/google/cloud/webrisk/v1beta1/webrisk.proto +++ b/google/cloud/webrisk/v1beta1/webrisk.proto @@ -18,6 +18,8 @@ syntax = "proto3"; package google.cloud.webrisk.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.WebRisk.V1Beta1"; @@ -27,16 +29,20 @@ option java_outer_classname = "WebRiskProto"; option java_package = "com.google.webrisk.v1beta1"; option objc_class_prefix = "GCWR"; option php_namespace = "Google\\Cloud\\WebRisk\\V1beta1"; +option ruby_package = "Google::Cloud::WebRisk::V1beta1"; // Web Risk v1beta1 API defines an interface to detect malicious URLs on your // website and in client applications. service WebRiskServiceV1Beta1 { + option (google.api.default_host) = "webrisk.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Gets the most recent threat list diffs. - rpc ComputeThreatListDiff(ComputeThreatListDiffRequest) - returns (ComputeThreatListDiffResponse) { + rpc ComputeThreatListDiff(ComputeThreatListDiffRequest) returns (ComputeThreatListDiffResponse) { option (google.api.http) = { get: "/v1beta1/threatLists:computeDiff" }; + option (google.api.method_signature) = "threat_type,version_token,constraints"; } // This method is used to check whether a URI is on a given threatList. @@ -44,6 +50,7 @@ service WebRiskServiceV1Beta1 { option (google.api.http) = { get: "/v1beta1/uris:search" }; + option (google.api.method_signature) = "uri,threat_types"; } // Gets the full hashes that match the requested hash prefix. @@ -55,6 +62,7 @@ service WebRiskServiceV1Beta1 { option (google.api.http) = { get: "/v1beta1/hashes:search" }; + option (google.api.method_signature) = "hash_prefix,threat_types"; } } @@ -76,15 +84,15 @@ message ComputeThreatListDiffRequest { repeated CompressionType supported_compressions = 3; } - // Required. The ThreatList to update. - ThreatType threat_type = 1; + // The ThreatList to update. + ThreatType threat_type = 1 [(google.api.field_behavior) = REQUIRED]; // The current version token of the client for the requested list (the // client version that was received from the last successful diff). bytes version_token = 2; - // The constraints associated with this request. - Constraints constraints = 3; + // Required. The constraints associated with this request. + Constraints constraints = 3 [(google.api.field_behavior) = REQUIRED]; } message ComputeThreatListDiffResponse { @@ -109,7 +117,7 @@ message ComputeThreatListDiffResponse { RESET = 2; } - // The type of response. This may indicate that an action is required by the + // The type of response. This may indicate that an action must be taken by the // client when the response is received. ResponseType response_type = 4; @@ -138,11 +146,11 @@ message ComputeThreatListDiffResponse { // Request to check URI entries against threatLists. message SearchUrisRequest { - // The URI to be checked for matches. - string uri = 1; + // Required. The URI to be checked for matches. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The ThreatLists to search in. - repeated ThreatType threat_types = 2; + repeated ThreatType threat_types = 2 [(google.api.field_behavior) = REQUIRED]; } message SearchUrisResponse { @@ -167,7 +175,7 @@ message SearchHashesRequest { bytes hash_prefix = 1; // Required. The ThreatLists to search in. - repeated ThreatType threat_types = 2; + repeated ThreatType threat_types = 2 [(google.api.field_behavior) = REQUIRED]; } message SearchHashesResponse { diff --git a/google/cloud/webrisk/v1beta1/webrisk_gapic.legacy.yaml b/google/cloud/webrisk/v1beta1/webrisk_gapic.legacy.yaml new file mode 100644 index 000000000..f9be3b286 --- /dev/null +++ b/google/cloud/webrisk/v1beta1/webrisk_gapic.legacy.yaml @@ -0,0 +1,142 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.webrisk.v1beta1 + python: + package_name: google.cloud.webrisk_v1beta1.gapic + go: + package_name: cloud.google.com/go/webrisk/apiv1beta1 + csharp: + package_name: Google.Cloud.WebRisk.V1Beta1 + ruby: + package_name: Google::Cloud::Webrisk::V1beta1 + php: + package_name: Google\Cloud\WebRisk\V1beta1 + nodejs: + package_name: web-risk.v1beta1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: +- name: google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ComputeThreatListDiff + flattening: + groups: + - parameters: + - threat_type + - version_token + - constraints + required_fields: + - threat_type + - constraints + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: SearchUris + flattening: + groups: + - parameters: + - uri + - threat_types + required_fields: + - uri + - threat_types + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: SearchHashes + flattening: + groups: + - parameters: + - hash_prefix + - threat_types + required_fields: + - threat_types + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/cloud/webrisk/v1beta1/webrisk_gapic.yaml b/google/cloud/webrisk/v1beta1/webrisk_gapic.yaml index 4c6d77dd7..6f2b55c66 100644 --- a/google/cloud/webrisk/v1beta1/webrisk_gapic.yaml +++ b/google/cloud/webrisk/v1beta1/webrisk_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -17,125 +17,3 @@ language_settings: nodejs: package_name: web-risk.v1beta1 domain_layer_location: google-cloud -# A list of API interface configurations. -interfaces: - # The fully qualified name of the API interface. -- name: google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: [] - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: ComputeThreatListDiff - flattening: - groups: - - parameters: - - threat_type - - version_token - - constraints - required_fields: - - threat_type - - constraints - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - - name: SearchUris - flattening: - groups: - - parameters: - - uri - - threat_types - required_fields: - - uri - - threat_types - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - - name: SearchHashes - flattening: - groups: - - parameters: - - hash_prefix - - threat_types - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 diff --git a/google/cloud/webrisk/v1beta1/webrisk_grpc_service_config.json b/google/cloud/webrisk/v1beta1/webrisk_grpc_service_config.json new file mode 100755 index 000000000..497927970 --- /dev/null +++ b/google/cloud/webrisk/v1beta1/webrisk_grpc_service_config.json @@ -0,0 +1,30 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1", + "method": "ComputeThreatListDiff" + }, + { + "service": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1", + "method": "SearchUris" + }, + { + "service": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1", + "method": "SearchHashes" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/webrisk/v1beta1/webrisk_v1beta1.yaml b/google/cloud/webrisk/v1beta1/webrisk_v1beta1.yaml new file mode 100644 index 000000000..d9891ccb9 --- /dev/null +++ b/google/cloud/webrisk/v1beta1/webrisk_v1beta1.yaml @@ -0,0 +1,14 @@ +type: google.api.Service +config_version: 3 +name: webrisk.googleapis.com +title: Web Risk API + +apis: +- name: google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 + +authentication: + rules: + - selector: 'google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/websecurityscanner/BUILD.bazel b/google/cloud/websecurityscanner/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/cloud/websecurityscanner/BUILD.bazel +++ b/google/cloud/websecurityscanner/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/websecurityscanner/artman_websecurityscanner_v1alpha.yaml b/google/cloud/websecurityscanner/artman_websecurityscanner_v1alpha.yaml index 31dceecef..29f59a4bb 100644 --- a/google/cloud/websecurityscanner/artman_websecurityscanner_v1alpha.yaml +++ b/google/cloud/websecurityscanner/artman_websecurityscanner_v1alpha.yaml @@ -6,8 +6,9 @@ common: - name: google-common-protos src_proto_paths: - v1alpha - service_yaml: web_security_scanner_v1alpha.yaml + service_yaml: v1alpha/websecurityscanner_v1alpha.yaml gapic_yaml: v1alpha/websecurityscanner_gapic.yaml + proto_package: google.cloud.websecurityscanner.v1alpha artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/websecurityscanner/artman_websecurityscanner_v1beta.yaml b/google/cloud/websecurityscanner/artman_websecurityscanner_v1beta.yaml index 130084151..34720f709 100644 --- a/google/cloud/websecurityscanner/artman_websecurityscanner_v1beta.yaml +++ b/google/cloud/websecurityscanner/artman_websecurityscanner_v1beta.yaml @@ -6,8 +6,9 @@ common: - name: google-common-protos src_proto_paths: - v1beta - service_yaml: websecurityscanner_v1beta.yaml + service_yaml: v1beta/websecurityscanner_v1beta.yaml gapic_yaml: v1beta/websecurityscanner_gapic.yaml + proto_package: google.cloud.websecurityscanner.v1beta artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/websecurityscanner/v1/BUILD.bazel b/google/cloud/websecurityscanner/v1/BUILD.bazel new file mode 100644 index 000000000..292f3d473 --- /dev/null +++ b/google/cloud/websecurityscanner/v1/BUILD.bazel @@ -0,0 +1,371 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "websecurityscanner_proto", + srcs = [ + "crawled_url.proto", + "finding.proto", + "finding_addon.proto", + "finding_type_stats.proto", + "scan_config.proto", + "scan_config_error.proto", + "scan_run.proto", + "scan_run_error_trace.proto", + "scan_run_warning_trace.proto", + "web_security_scanner.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "websecurityscanner_proto_with_info", + deps = [ + ":websecurityscanner_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "websecurityscanner_java_proto", + deps = [":websecurityscanner_proto"], +) + +java_grpc_library( + name = "websecurityscanner_java_grpc", + srcs = [":websecurityscanner_proto"], + deps = [":websecurityscanner_java_proto"], +) + +java_gapic_library( + name = "websecurityscanner_java_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1", + service_yaml = "websecurityscanner_v1.yaml", + test_deps = [ + ":websecurityscanner_java_grpc", + ], + deps = [ + ":websecurityscanner_java_proto", + ], +) + +java_gapic_test( + name = "websecurityscanner_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.websecurityscanner.v1.WebSecurityScannerClientTest", + ], + runtime_deps = [":websecurityscanner_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-websecurityscanner-v1-java", + deps = [ + ":websecurityscanner_java_gapic", + ":websecurityscanner_java_grpc", + ":websecurityscanner_java_proto", + ":websecurityscanner_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "websecurityscanner_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1", + protos = [":websecurityscanner_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "websecurityscanner_go_gapic", + srcs = [":websecurityscanner_proto_with_info"], + grpc_service_config = "websecurityscanner_grpc_service_config.json", + importpath = "cloud.google.com/go/websecurityscanner/apiv1;websecurityscanner", + service_yaml = "websecurityscanner_v1.yaml", + deps = [ + ":websecurityscanner_go_proto", + ], +) + +go_test( + name = "websecurityscanner_go_gapic_test", + srcs = [":websecurityscanner_go_gapic_srcjar_test"], + embed = [":websecurityscanner_go_gapic"], + importpath = "cloud.google.com/go/websecurityscanner/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-websecurityscanner-v1-go", + deps = [ + ":websecurityscanner_go_gapic", + ":websecurityscanner_go_gapic_srcjar-test.srcjar", + ":websecurityscanner_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "websecurityscanner_moved_proto", + srcs = [":websecurityscanner_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "websecurityscanner_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":websecurityscanner_moved_proto"], +) + +py_grpc_library( + name = "websecurityscanner_py_grpc", + srcs = [":websecurityscanner_moved_proto"], + deps = [":websecurityscanner_py_proto"], +) + +py_gapic_library( + name = "websecurityscanner_py_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1", + service_yaml = "websecurityscanner_v1.yaml", + deps = [ + ":websecurityscanner_py_grpc", + ":websecurityscanner_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "websecurityscanner-v1-py", + deps = [ + ":websecurityscanner_py_gapic", + ":websecurityscanner_py_grpc", + ":websecurityscanner_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "websecurityscanner_php_proto", + deps = [":websecurityscanner_proto"], +) + +php_grpc_library( + name = "websecurityscanner_php_grpc", + srcs = [":websecurityscanner_proto"], + deps = [":websecurityscanner_php_proto"], +) + +php_gapic_library( + name = "websecurityscanner_php_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1", + service_yaml = "websecurityscanner_v1.yaml", + deps = [ + ":websecurityscanner_php_grpc", + ":websecurityscanner_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-websecurityscanner-v1-php", + deps = [ + ":websecurityscanner_php_gapic", + ":websecurityscanner_php_grpc", + ":websecurityscanner_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "websecurityscanner_nodejs_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1", + service_yaml = "websecurityscanner_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "websecurityscanner-v1-nodejs", + deps = [ + ":websecurityscanner_nodejs_gapic", + ":websecurityscanner_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "websecurityscanner_ruby_proto", + deps = [":websecurityscanner_proto"], +) + +ruby_grpc_library( + name = "websecurityscanner_ruby_grpc", + srcs = [":websecurityscanner_proto"], + deps = [":websecurityscanner_ruby_proto"], +) + +ruby_gapic_library( + name = "websecurityscanner_ruby_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1", + service_yaml = "websecurityscanner_v1.yaml", + deps = [ + ":websecurityscanner_ruby_grpc", + ":websecurityscanner_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-websecurityscanner-v1-ruby", + deps = [ + ":websecurityscanner_ruby_gapic", + ":websecurityscanner_ruby_grpc", + ":websecurityscanner_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "websecurityscanner_csharp_proto", + deps = [":websecurityscanner_proto"], +) + +csharp_grpc_library( + name = "websecurityscanner_csharp_grpc", + srcs = [":websecurityscanner_proto"], + deps = [":websecurityscanner_csharp_proto"], +) + +csharp_gapic_library( + name = "websecurityscanner_csharp_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1", + service_yaml = "websecurityscanner_v1.yaml", + deps = [ + ":websecurityscanner_csharp_grpc", + ":websecurityscanner_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-websecurityscanner-v1-csharp", + deps = [ + ":websecurityscanner_csharp_gapic", + ":websecurityscanner_csharp_grpc", + ":websecurityscanner_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/websecurityscanner/v1/crawled_url.proto b/google/cloud/websecurityscanner/v1/crawled_url.proto new file mode 100644 index 000000000..b64eb402b --- /dev/null +++ b/google/cloud/websecurityscanner/v1/crawled_url.proto @@ -0,0 +1,37 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.websecurityscanner.v1; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "CrawledUrlProto"; +option java_package = "com.google.cloud.websecurityscanner.v1"; + +// A CrawledUrl resource represents a URL that was crawled during a ScanRun. Web +// Security Scanner Service crawls the web applications, following all links +// within the scope of sites, to find the URLs to test against. +message CrawledUrl { + // Output only. The http method of the request that was used to visit the URL, in + // uppercase. + string http_method = 1; + + // Output only. The URL that was crawled. + string url = 2; + + // Output only. The body of the request that was used to visit the URL. + string body = 3; +} diff --git a/google/cloud/websecurityscanner/v1/finding.proto b/google/cloud/websecurityscanner/v1/finding.proto new file mode 100644 index 000000000..7a8cdf96e --- /dev/null +++ b/google/cloud/websecurityscanner/v1/finding.proto @@ -0,0 +1,116 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.websecurityscanner.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/websecurityscanner/v1/finding_addon.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "FindingProto"; +option java_package = "com.google.cloud.websecurityscanner.v1"; + +// A Finding resource represents a vulnerability instance identified during a +// ScanRun. +message Finding { + option (google.api.resource) = { + type: "websecurityscanner.googleapis.com/Finding" + pattern: "projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}" + }; + + // The severity level of a vulnerability. + enum Severity { + // No severity specified. The default value. + SEVERITY_UNSPECIFIED = 0; + + // Critical severity. + CRITICAL = 1; + + // High severity. + HIGH = 2; + + // Medium severity. + MEDIUM = 3; + + // Low severity. + LOW = 4; + } + + // Output only. The resource name of the Finding. The name follows the format of + // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. + // The finding IDs are generated by the system. + string name = 1; + + // Output only. The type of the Finding. + // Detailed and up-to-date information on findings can be found here: + // https://cloud.google.com/security-command-center/docs/how-to-remediate-web-security-scanner-findings + string finding_type = 2; + + // Output only. The severity level of the reported vulnerability. + Severity severity = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The http method of the request that triggered the vulnerability, in + // uppercase. + string http_method = 3; + + // Output only. The URL produced by the server-side fuzzer and used in the request that + // triggered the vulnerability. + string fuzzed_url = 4; + + // Output only. The body of the request that triggered the vulnerability. + string body = 5; + + // Output only. The description of the vulnerability. + string description = 6; + + // Output only. The URL containing human-readable payload that user can leverage to + // reproduce the vulnerability. + string reproduction_url = 7; + + // Output only. If the vulnerability was originated from nested IFrame, the immediate + // parent IFrame is reported. + string frame_url = 8; + + // Output only. The URL where the browser lands when the vulnerability is detected. + string final_url = 9; + + // Output only. The tracking ID uniquely identifies a vulnerability instance across + // multiple ScanRuns. + string tracking_id = 10; + + // Output only. An addon containing information reported for a vulnerability with an HTML + // form, if any. + Form form = 16; + + // Output only. An addon containing information about outdated libraries. + OutdatedLibrary outdated_library = 11; + + // Output only. An addon containing detailed information regarding any resource causing the + // vulnerability such as JavaScript sources, image, audio files, etc. + ViolatingResource violating_resource = 12; + + // Output only. An addon containing information about vulnerable or missing HTTP headers. + VulnerableHeaders vulnerable_headers = 15; + + // Output only. An addon containing information about request parameters which were found + // to be vulnerable. + VulnerableParameters vulnerable_parameters = 13; + + // Output only. An addon containing information reported for an XSS, if any. + Xss xss = 14; +} diff --git a/google/cloud/websecurityscanner/v1/finding_addon.proto b/google/cloud/websecurityscanner/v1/finding_addon.proto new file mode 100644 index 000000000..c171ca3b2 --- /dev/null +++ b/google/cloud/websecurityscanner/v1/finding_addon.proto @@ -0,0 +1,144 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.websecurityscanner.v1; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "FindingAddonProto"; +option java_package = "com.google.cloud.websecurityscanner.v1"; + +// ! Information about a vulnerability with an HTML. +message Form { + // ! The URI where to send the form when it's submitted. + string action_uri = 1; + + // ! The names of form fields related to the vulnerability. + repeated string fields = 2; +} + +// Information reported for an outdated library. +message OutdatedLibrary { + // The name of the outdated library. + string library_name = 1; + + // The version number. + string version = 2; + + // URLs to learn more information about the vulnerabilities in the library. + repeated string learn_more_urls = 3; +} + +// Information regarding any resource causing the vulnerability such +// as JavaScript sources, image, audio files, etc. +message ViolatingResource { + // The MIME type of this resource. + string content_type = 1; + + // URL of this violating resource. + string resource_url = 2; +} + +// Information about vulnerable request parameters. +message VulnerableParameters { + // The vulnerable parameter names. + repeated string parameter_names = 1; +} + +// Information about vulnerable or missing HTTP Headers. +message VulnerableHeaders { + // Describes a HTTP Header. + message Header { + // Header name. + string name = 1; + + // Header value. + string value = 2; + } + + // List of vulnerable headers. + repeated Header headers = 1; + + // List of missing headers. + repeated Header missing_headers = 2; +} + +// Information reported for an XSS. +message Xss { + // Types of XSS attack vector. + enum AttackVector { + // Unknown attack vector. + ATTACK_VECTOR_UNSPECIFIED = 0; + + // The attack comes from fuzzing the browser's localStorage. + LOCAL_STORAGE = 1; + + // The attack comes from fuzzing the browser's sessionStorage. + SESSION_STORAGE = 2; + + // The attack comes from fuzzing the window's name property. + WINDOW_NAME = 3; + + // The attack comes from fuzzing the referrer property. + REFERRER = 4; + + // The attack comes from fuzzing an input element. + FORM_INPUT = 5; + + // The attack comes from fuzzing the browser's cookies. + COOKIE = 6; + + // The attack comes from hijacking the post messaging mechanism. + POST_MESSAGE = 7; + + // The attack comes from fuzzing parameters in the url. + GET_PARAMETERS = 8; + + // The attack comes from fuzzing the fragment in the url. + URL_FRAGMENT = 9; + + // The attack comes from fuzzing the HTML comments. + HTML_COMMENT = 10; + + // The attack comes from fuzzing the POST parameters. + POST_PARAMETERS = 11; + + // The attack comes from fuzzing the protocol. + PROTOCOL = 12; + + // The attack comes from the server side and is stored. + STORED_XSS = 13; + + // The attack is a Same-Origin Method Execution attack via a GET parameter. + SAME_ORIGIN = 14; + + // The attack payload is received from a third-party host via a URL that is + // user-controllable + USER_CONTROLLABLE_URL = 15; + } + + // Stack traces leading to the point where the XSS occurred. + repeated string stack_traces = 1; + + // An error message generated by a javascript breakage. + string error_message = 2; + + // The attack vector of the payload triggering this XSS. + AttackVector attack_vector = 3; + + // The reproduction url for the seeding POST request of a Stored XSS. + string stored_xss_seeding_url = 4; +} diff --git a/google/cloud/websecurityscanner/v1/finding_type_stats.proto b/google/cloud/websecurityscanner/v1/finding_type_stats.proto new file mode 100644 index 000000000..66419f761 --- /dev/null +++ b/google/cloud/websecurityscanner/v1/finding_type_stats.proto @@ -0,0 +1,32 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.websecurityscanner.v1; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "FindingTypeStatsProto"; +option java_package = "com.google.cloud.websecurityscanner.v1"; + +// A FindingTypeStats resource represents stats regarding a specific FindingType +// of Findings under a given ScanRun. +message FindingTypeStats { + // Output only. The finding type associated with the stats. + string finding_type = 1; + + // Output only. The count of findings belonging to this finding type. + int32 finding_count = 2; +} diff --git a/google/cloud/websecurityscanner/v1/scan_config.proto b/google/cloud/websecurityscanner/v1/scan_config.proto new file mode 100644 index 000000000..f5cf4f67f --- /dev/null +++ b/google/cloud/websecurityscanner/v1/scan_config.proto @@ -0,0 +1,185 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.websecurityscanner.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "ScanConfigProto"; +option java_package = "com.google.cloud.websecurityscanner.v1"; + +// A ScanConfig resource contains the configurations to launch a scan. +message ScanConfig { + // Scan authentication configuration. + message Authentication { + // Describes authentication configuration that uses a Google account. + message GoogleAccount { + // Required. The user name of the Google account. + string username = 1; + + // Required. Input only. The password of the Google account. The credential is stored encrypted + // and not returned in any response nor included in audit logs. + string password = 2; + } + + // Describes authentication configuration that uses a custom account. + message CustomAccount { + // Required. The user name of the custom account. + string username = 1; + + // Required. Input only. The password of the custom account. The credential is stored encrypted + // and not returned in any response nor included in audit logs. + string password = 2; + + // Required. The login form URL of the website. + string login_url = 3; + } + + // Describes authentication configuration for Identity-Aware-Proxy (IAP). + message IapCredential { + // Describes authentication configuration when Web-Security-Scanner + // service account is added in Identity-Aware-Proxy (IAP) access policies. + message IapTestServiceAccountInfo { + // Required. Describes OAuth2 client id of resources protected by + // Identity-Aware-Proxy (IAP). + string target_audience_client_id = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Identity-Aware-Proxy (IAP) Authentication Configuration + oneof iap_credentials { + // Authentication configuration when Web-Security-Scanner service + // account is added in Identity-Aware-Proxy (IAP) access policies. + IapTestServiceAccountInfo iap_test_service_account_info = 1; + } + } + + // Required. + // Authentication configuration + oneof authentication { + // Authentication using a Google account. + GoogleAccount google_account = 1; + + // Authentication using a custom account. + CustomAccount custom_account = 2; + + // Authentication using Identity-Aware-Proxy (IAP). + IapCredential iap_credential = 4; + } + } + + // Scan schedule configuration. + message Schedule { + // A timestamp indicates when the next run will be scheduled. The value is + // refreshed by the server after each run. If unspecified, it will default + // to current server time, which means the scan will be scheduled to start + // immediately. + google.protobuf.Timestamp schedule_time = 1; + + // Required. The duration of time between executions in days. + int32 interval_duration_days = 2; + } + + // Type of user agents used for scanning. + enum UserAgent { + // The user agent is unknown. Service will default to CHROME_LINUX. + USER_AGENT_UNSPECIFIED = 0; + + // Chrome on Linux. This is the service default if unspecified. + CHROME_LINUX = 1; + + // Chrome on Android. + CHROME_ANDROID = 2; + + // Safari on IPhone. + SAFARI_IPHONE = 3; + } + + // Scan risk levels supported by Web Security Scanner. LOW impact + // scanning will minimize requests with the potential to modify data. To + // achieve the maximum scan coverage, NORMAL risk level is recommended. + enum RiskLevel { + // Use default, which is NORMAL. + RISK_LEVEL_UNSPECIFIED = 0; + + // Normal scanning (Recommended) + NORMAL = 1; + + // Lower impact scanning + LOW = 2; + } + + // Controls export of scan configurations and results to Security + // Command Center. + enum ExportToSecurityCommandCenter { + // Use default, which is ENABLED. + EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0; + + // Export results of this scan to Security Command Center. + ENABLED = 1; + + // Do not export results of this scan to Security Command Center. + DISABLED = 2; + } + + // The resource name of the ScanConfig. The name follows the format of + // 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are + // generated by the system. + string name = 1; + + // Required. The user provided display name of the ScanConfig. + string display_name = 2; + + // The maximum QPS during scanning. A valid value ranges from 5 to 20 + // inclusively. If the field is unspecified or its value is set 0, server will + // default to 15. Other values outside of [5, 20] range will be rejected with + // INVALID_ARGUMENT error. + int32 max_qps = 3; + + // Required. The starting URLs from which the scanner finds site pages. + repeated string starting_urls = 4; + + // The authentication configuration. If specified, service will use the + // authentication configuration during scanning. + Authentication authentication = 5; + + // The user agent used during scanning. + UserAgent user_agent = 6; + + // The excluded URL patterns as described in + // https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls + repeated string blacklist_patterns = 7; + + // The schedule of the ScanConfig. + Schedule schedule = 8; + + // Controls export of scan configurations and results to Security + // Command Center. + ExportToSecurityCommandCenter export_to_security_command_center = 10; + + // The risk level selected for the scan + RiskLevel risk_level = 12; + + // Whether the scan config is managed by Web Security Scanner, output + // only. + bool managed_scan = 13; + + // Whether the scan configuration has enabled static IP address scan feature. + // If enabled, the scanner will access applications from static IP addresses. + bool static_ip_scan = 14; +} diff --git a/google/cloud/websecurityscanner/v1/scan_config_error.proto b/google/cloud/websecurityscanner/v1/scan_config_error.proto new file mode 100644 index 000000000..7618c3935 --- /dev/null +++ b/google/cloud/websecurityscanner/v1/scan_config_error.proto @@ -0,0 +1,186 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.websecurityscanner.v1; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "ScanConfigErrorProto"; +option java_package = "com.google.cloud.websecurityscanner.v1"; + +// Defines a custom error message used by CreateScanConfig and UpdateScanConfig +// APIs when scan configuration validation fails. It is also reported as part of +// a ScanRunErrorTrace message if scan validation fails due to a scan +// configuration error. +message ScanConfigError { + // Output only. + // Defines an error reason code. + // Next id: 44 + enum Code { + option allow_alias = true; + + // There is no error. + CODE_UNSPECIFIED = 0; + + // There is no error. + OK = 0; + + // Indicates an internal server error. + // Please DO NOT USE THIS ERROR CODE unless the root cause is truly unknown. + INTERNAL_ERROR = 1; + + // One of the seed URLs is an App Engine URL but we cannot validate the scan + // settings due to an App Engine API backend error. + APPENGINE_API_BACKEND_ERROR = 2; + + // One of the seed URLs is an App Engine URL but we cannot access the + // App Engine API to validate scan settings. + APPENGINE_API_NOT_ACCESSIBLE = 3; + + // One of the seed URLs is an App Engine URL but the Default Host of the + // App Engine is not set. + APPENGINE_DEFAULT_HOST_MISSING = 4; + + // Google corporate accounts can not be used for scanning. + CANNOT_USE_GOOGLE_COM_ACCOUNT = 6; + + // The account of the scan creator can not be used for scanning. + CANNOT_USE_OWNER_ACCOUNT = 7; + + // This scan targets Compute Engine, but we cannot validate scan settings + // due to a Compute Engine API backend error. + COMPUTE_API_BACKEND_ERROR = 8; + + // This scan targets Compute Engine, but we cannot access the Compute Engine + // API to validate the scan settings. + COMPUTE_API_NOT_ACCESSIBLE = 9; + + // The Custom Login URL does not belong to the current project. + CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 10; + + // The Custom Login URL is malformed (can not be parsed). + CUSTOM_LOGIN_URL_MALFORMED = 11; + + // The Custom Login URL is mapped to a non-routable IP address in DNS. + CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 12; + + // The Custom Login URL is mapped to an IP address which is not reserved for + // the current project. + CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS = 13; + + // The Custom Login URL has a non-routable IP address. + CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 14; + + // The Custom Login URL has an IP address which is not reserved for the + // current project. + CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS = 15; + + // Another scan with the same name (case-sensitive) already exists. + DUPLICATE_SCAN_NAME = 16; + + // A field is set to an invalid value. + INVALID_FIELD_VALUE = 18; + + // There was an error trying to authenticate to the scan target. + FAILED_TO_AUTHENTICATE_TO_TARGET = 19; + + // Finding type value is not specified in the list findings request. + FINDING_TYPE_UNSPECIFIED = 20; + + // Scan targets Compute Engine, yet current project was not whitelisted for + // Google Compute Engine Scanning Alpha access. + FORBIDDEN_TO_SCAN_COMPUTE = 21; + + // User tries to update managed scan + FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43; + + // The supplied filter is malformed. For example, it can not be parsed, does + // not have a filter type in expression, or the same filter type appears + // more than once. + MALFORMED_FILTER = 22; + + // The supplied resource name is malformed (can not be parsed). + MALFORMED_RESOURCE_NAME = 23; + + // The current project is not in an active state. + PROJECT_INACTIVE = 24; + + // A required field is not set. + REQUIRED_FIELD = 25; + + // Project id, scanconfig id, scanrun id, or finding id are not consistent + // with each other in resource name. + RESOURCE_NAME_INCONSISTENT = 26; + + // The scan being requested to start is already running. + SCAN_ALREADY_RUNNING = 27; + + // The scan that was requested to be stopped is not running. + SCAN_NOT_RUNNING = 28; + + // One of the seed URLs does not belong to the current project. + SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 29; + + // One of the seed URLs is malformed (can not be parsed). + SEED_URL_MALFORMED = 30; + + // One of the seed URLs is mapped to a non-routable IP address in DNS. + SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 31; + + // One of the seed URLs is mapped to an IP address which is not reserved + // for the current project. + SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS = 32; + + // One of the seed URLs has on-routable IP address. + SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 33; + + // One of the seed URLs has an IP address that is not reserved + // for the current project. + SEED_URL_HAS_UNRESERVED_IP_ADDRESS = 35; + + // The Web Security Scanner service account is not configured under the + // project. + SERVICE_ACCOUNT_NOT_CONFIGURED = 36; + + // A project has reached the maximum number of scans. + TOO_MANY_SCANS = 37; + + // Resolving the details of the current project fails. + UNABLE_TO_RESOLVE_PROJECT_INFO = 38; + + // One or more blacklist patterns were in the wrong format. + UNSUPPORTED_BLACKLIST_PATTERN_FORMAT = 39; + + // The supplied filter is not supported. + UNSUPPORTED_FILTER = 40; + + // The supplied finding type is not supported. For example, we do not + // provide findings of the given finding type. + UNSUPPORTED_FINDING_TYPE = 41; + + // The URL scheme of one or more of the supplied URLs is not supported. + UNSUPPORTED_URL_SCHEME = 42; + } + + // Output only. Indicates the reason code for a configuration failure. + Code code = 1; + + // Output only. Indicates the full name of the ScanConfig field that triggers this error, + // for example "scan_config.max_qps". This field is provided for + // troubleshooting purposes only and its actual value can change in the + // future. + string field_name = 2; +} diff --git a/google/cloud/websecurityscanner/v1/scan_run.proto b/google/cloud/websecurityscanner/v1/scan_run.proto new file mode 100644 index 000000000..42335337e --- /dev/null +++ b/google/cloud/websecurityscanner/v1/scan_run.proto @@ -0,0 +1,107 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.websecurityscanner.v1; + +import "google/cloud/websecurityscanner/v1/scan_run_error_trace.proto"; +import "google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "ScanRunProto"; +option java_package = "com.google.cloud.websecurityscanner.v1"; + +// A ScanRun is a output-only resource representing an actual run of the scan. +// Next id: 12 +message ScanRun { + // Types of ScanRun execution state. + enum ExecutionState { + // Represents an invalid state caused by internal server error. This value + // should never be returned. + EXECUTION_STATE_UNSPECIFIED = 0; + + // The scan is waiting in the queue. + QUEUED = 1; + + // The scan is in progress. + SCANNING = 2; + + // The scan is either finished or stopped by user. + FINISHED = 3; + } + + // Types of ScanRun result state. + enum ResultState { + // Default value. This value is returned when the ScanRun is not yet + // finished. + RESULT_STATE_UNSPECIFIED = 0; + + // The scan finished without errors. + SUCCESS = 1; + + // The scan finished with errors. + ERROR = 2; + + // The scan was terminated by user. + KILLED = 3; + } + + // Output only. The resource name of the ScanRun. The name follows the format of + // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + // The ScanRun IDs are generated by the system. + string name = 1; + + // Output only. The execution state of the ScanRun. + ExecutionState execution_state = 2; + + // Output only. The result state of the ScanRun. This field is only available after the + // execution state reaches "FINISHED". + ResultState result_state = 3; + + // Output only. The time at which the ScanRun started. + google.protobuf.Timestamp start_time = 4; + + // Output only. The time at which the ScanRun reached termination state - that the ScanRun + // is either finished or stopped by user. + google.protobuf.Timestamp end_time = 5; + + // Output only. The number of URLs crawled during this ScanRun. If the scan is in progress, + // the value represents the number of URLs crawled up to now. + int64 urls_crawled_count = 6; + + // Output only. The number of URLs tested during this ScanRun. If the scan is in progress, + // the value represents the number of URLs tested up to now. The number of + // URLs tested is usually larger than the number URLS crawled because + // typically a crawled URL is tested with multiple test payloads. + int64 urls_tested_count = 7; + + // Output only. Whether the scan run has found any vulnerabilities. + bool has_vulnerabilities = 8; + + // Output only. The percentage of total completion ranging from 0 to 100. + // If the scan is in queue, the value is 0. + // If the scan is running, the value ranges from 0 to 100. + // If the scan is finished, the value is 100. + int32 progress_percent = 9; + + // Output only. If result_state is an ERROR, this field provides the primary reason for + // scan's termination and more details, if such are available. + ScanRunErrorTrace error_trace = 10; + + // Output only. A list of warnings, if such are encountered during this scan run. + repeated ScanRunWarningTrace warning_traces = 11; +} diff --git a/google/cloud/websecurityscanner/v1/scan_run_error_trace.proto b/google/cloud/websecurityscanner/v1/scan_run_error_trace.proto new file mode 100644 index 000000000..bae9f8805 --- /dev/null +++ b/google/cloud/websecurityscanner/v1/scan_run_error_trace.proto @@ -0,0 +1,72 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.websecurityscanner.v1; + +import "google/cloud/websecurityscanner/v1/scan_config_error.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "ScanRunErrorTraceProto"; +option java_package = "com.google.cloud.websecurityscanner.v1"; + +// Output only. +// Defines an error trace message for a ScanRun. +message ScanRunErrorTrace { + // Output only. + // Defines an error reason code. + // Next id: 7 + enum Code { + // Default value is never used. + CODE_UNSPECIFIED = 0; + + // Indicates that the scan run failed due to an internal server error. + INTERNAL_ERROR = 1; + + // Indicates a scan configuration error, usually due to outdated ScanConfig + // settings, such as starting_urls or the DNS configuration. + SCAN_CONFIG_ISSUE = 2; + + // Indicates an authentication error, usually due to outdated ScanConfig + // authentication settings. + AUTHENTICATION_CONFIG_ISSUE = 3; + + // Indicates a scan operation timeout, usually caused by a very large site. + TIMED_OUT_WHILE_SCANNING = 4; + + // Indicates that a scan encountered excessive redirects, either to + // authentication or some other page outside of the scan scope. + TOO_MANY_REDIRECTS = 5; + + // Indicates that a scan encountered numerous errors from the web site + // pages. When available, most_common_http_error_code field indicates the + // most common HTTP error code encountered during the scan. + TOO_MANY_HTTP_ERRORS = 6; + } + + // Output only. Indicates the error reason code. + Code code = 1; + + // Output only. If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error + // message encountered during scan configuration validation that is performed + // before each scan run. + ScanConfigError scan_config_error = 2; + + // Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most + // common HTTP error code, if such is available. For example, if this code is + // 404, the scan has encountered too many NOT_FOUND responses. + int32 most_common_http_error_code = 3; +} diff --git a/google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto b/google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto new file mode 100644 index 000000000..30c8b4f2f --- /dev/null +++ b/google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.websecurityscanner.v1; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "ScanRunWarningTraceProto"; +option java_package = "com.google.cloud.websecurityscanner.v1"; + +// Output only. +// Defines a warning trace message for ScanRun. Warning traces provide customers +// with useful information that helps make the scanning process more effective. +message ScanRunWarningTrace { + // Output only. + // Defines a warning message code. + // Next id: 6 + enum Code { + // Default value is never used. + CODE_UNSPECIFIED = 0; + + // Indicates that a scan discovered an unexpectedly low number of URLs. This + // is sometimes caused by complex navigation features or by using a single + // URL for numerous pages. + INSUFFICIENT_CRAWL_RESULTS = 1; + + // Indicates that a scan discovered too many URLs to test, or excessive + // redundant URLs. + TOO_MANY_CRAWL_RESULTS = 2; + + // Indicates that too many tests have been generated for the scan. Customer + // should try reducing the number of starting URLs, increasing the QPS rate, + // or narrowing down the scope of the scan using the excluded patterns. + TOO_MANY_FUZZ_TASKS = 3; + + // Indicates that a scan is blocked by IAP. + BLOCKED_BY_IAP = 4; + } + + // Output only. Indicates the warning code. + Code code = 1; +} diff --git a/google/cloud/websecurityscanner/v1/web_security_scanner.proto b/google/cloud/websecurityscanner/v1/web_security_scanner.proto new file mode 100644 index 000000000..599557104 --- /dev/null +++ b/google/cloud/websecurityscanner/v1/web_security_scanner.proto @@ -0,0 +1,334 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.websecurityscanner.v1; + +import "google/api/annotations.proto"; +import "google/cloud/websecurityscanner/v1/crawled_url.proto"; +import "google/cloud/websecurityscanner/v1/finding.proto"; +import "google/cloud/websecurityscanner/v1/finding_type_stats.proto"; +import "google/cloud/websecurityscanner/v1/scan_config.proto"; +import "google/cloud/websecurityscanner/v1/scan_run.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/api/client.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "WebSecurityScannerProto"; +option java_package = "com.google.cloud.websecurityscanner.v1"; + +// Web Security Scanner Service identifies security vulnerabilities in web +// applications hosted on Google Cloud. It crawls your application, and +// attempts to exercise as many user inputs and event handlers as possible. +service WebSecurityScanner { + option (google.api.default_host) = "websecurityscanner.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new ScanConfig. + rpc CreateScanConfig(CreateScanConfigRequest) returns (ScanConfig) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/scanConfigs" + body: "scan_config" + }; + } + + // Deletes an existing ScanConfig and its child resources. + rpc DeleteScanConfig(DeleteScanConfigRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/scanConfigs/*}" + }; + } + + // Gets a ScanConfig. + rpc GetScanConfig(GetScanConfigRequest) returns (ScanConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/scanConfigs/*}" + }; + } + + // Lists ScanConfigs under a given project. + rpc ListScanConfigs(ListScanConfigsRequest) returns (ListScanConfigsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/scanConfigs" + }; + } + + // Updates a ScanConfig. This method support partial update of a ScanConfig. + rpc UpdateScanConfig(UpdateScanConfigRequest) returns (ScanConfig) { + option (google.api.http) = { + patch: "/v1/{scan_config.name=projects/*/scanConfigs/*}" + body: "scan_config" + }; + } + + // Start a ScanRun according to the given ScanConfig. + rpc StartScanRun(StartScanRunRequest) returns (ScanRun) { + option (google.api.http) = { + post: "/v1/{name=projects/*/scanConfigs/*}:start" + body: "*" + }; + } + + // Gets a ScanRun. + rpc GetScanRun(GetScanRunRequest) returns (ScanRun) { + option (google.api.http) = { + get: "/v1/{name=projects/*/scanConfigs/*/scanRuns/*}" + }; + } + + // Lists ScanRuns under a given ScanConfig, in descending order of ScanRun + // stop time. + rpc ListScanRuns(ListScanRunsRequest) returns (ListScanRunsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/scanConfigs/*}/scanRuns" + }; + } + + // Stops a ScanRun. The stopped ScanRun is returned. + rpc StopScanRun(StopScanRunRequest) returns (ScanRun) { + option (google.api.http) = { + post: "/v1/{name=projects/*/scanConfigs/*/scanRuns/*}:stop" + body: "*" + }; + } + + // List CrawledUrls under a given ScanRun. + rpc ListCrawledUrls(ListCrawledUrlsRequest) returns (ListCrawledUrlsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/scanConfigs/*/scanRuns/*}/crawledUrls" + }; + } + + // Gets a Finding. + rpc GetFinding(GetFindingRequest) returns (Finding) { + option (google.api.http) = { + get: "/v1/{name=projects/*/scanConfigs/*/scanRuns/*/findings/*}" + }; + } + + // List Findings under a given ScanRun. + rpc ListFindings(ListFindingsRequest) returns (ListFindingsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/scanConfigs/*/scanRuns/*}/findings" + }; + } + + // List all FindingTypeStats under a given ScanRun. + rpc ListFindingTypeStats(ListFindingTypeStatsRequest) returns (ListFindingTypeStatsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/scanConfigs/*/scanRuns/*}/findingTypeStats" + }; + } +} + +// Request for the `CreateScanConfig` method. +message CreateScanConfigRequest { + // Required. The parent resource name where the scan is created, which should be a + // project resource name in the format 'projects/{projectId}'. + string parent = 1; + + // Required. The ScanConfig to be created. + ScanConfig scan_config = 2; +} + +// Request for the `DeleteScanConfig` method. +message DeleteScanConfigRequest { + // Required. The resource name of the ScanConfig to be deleted. The name follows the + // format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + string name = 1; +} + +// Request for the `GetScanConfig` method. +message GetScanConfigRequest { + // Required. The resource name of the ScanConfig to be returned. The name follows the + // format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + string name = 1; +} + +// Request for the `ListScanConfigs` method. +message ListScanConfigsRequest { + // Required. The parent resource name, which should be a project resource name in the + // format 'projects/{projectId}'. + string parent = 1; + + // A token identifying a page of results to be returned. This should be a + // `next_page_token` value returned from a previous List request. + // If unspecified, the first page of results is returned. + string page_token = 2; + + // The maximum number of ScanConfigs to return, can be limited by server. + // If not specified or not positive, the implementation will select a + // reasonable value. + int32 page_size = 3; +} + +// Request for the `UpdateScanConfigRequest` method. +message UpdateScanConfigRequest { + // Required. The ScanConfig to be updated. The name field must be set to identify the + // resource to be updated. The values of fields not covered by the mask + // will be ignored. + ScanConfig scan_config = 2; + + // Required. The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 3; +} + +// Response for the `ListScanConfigs` method. +message ListScanConfigsResponse { + // The list of ScanConfigs returned. + repeated ScanConfig scan_configs = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// Request for the `StartScanRun` method. +message StartScanRunRequest { + // Required. The resource name of the ScanConfig to be used. The name follows the + // format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + string name = 1; +} + +// Request for the `GetScanRun` method. +message GetScanRunRequest { + // Required. The resource name of the ScanRun to be returned. The name follows the + // format of + // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + string name = 1; +} + +// Request for the `ListScanRuns` method. +message ListScanRunsRequest { + // Required. The parent resource name, which should be a scan resource name in the + // format 'projects/{projectId}/scanConfigs/{scanConfigId}'. + string parent = 1; + + // A token identifying a page of results to be returned. This should be a + // `next_page_token` value returned from a previous List request. + // If unspecified, the first page of results is returned. + string page_token = 2; + + // The maximum number of ScanRuns to return, can be limited by server. + // If not specified or not positive, the implementation will select a + // reasonable value. + int32 page_size = 3; +} + +// Response for the `ListScanRuns` method. +message ListScanRunsResponse { + // The list of ScanRuns returned. + repeated ScanRun scan_runs = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// Request for the `StopScanRun` method. +message StopScanRunRequest { + // Required. The resource name of the ScanRun to be stopped. The name follows the + // format of + // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + string name = 1; +} + +// Request for the `ListCrawledUrls` method. +message ListCrawledUrlsRequest { + // Required. The parent resource name, which should be a scan run resource name in the + // format + // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + string parent = 1; + + // A token identifying a page of results to be returned. This should be a + // `next_page_token` value returned from a previous List request. + // If unspecified, the first page of results is returned. + string page_token = 2; + + // The maximum number of CrawledUrls to return, can be limited by server. + // If not specified or not positive, the implementation will select a + // reasonable value. + int32 page_size = 3; +} + +// Response for the `ListCrawledUrls` method. +message ListCrawledUrlsResponse { + // The list of CrawledUrls returned. + repeated CrawledUrl crawled_urls = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// Request for the `GetFinding` method. +message GetFindingRequest { + // Required. The resource name of the Finding to be returned. The name follows the + // format of + // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. + string name = 1; +} + +// Request for the `ListFindings` method. +message ListFindingsRequest { + // Required. The parent resource name, which should be a scan run resource name in the + // format + // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + string parent = 1; + + // The filter expression. The expression must be in the format: + // . + // Supported field: 'finding_type'. + // Supported operator: '='. + string filter = 2; + + // A token identifying a page of results to be returned. This should be a + // `next_page_token` value returned from a previous List request. + // If unspecified, the first page of results is returned. + string page_token = 3; + + // The maximum number of Findings to return, can be limited by server. + // If not specified or not positive, the implementation will select a + // reasonable value. + int32 page_size = 4; +} + +// Response for the `ListFindings` method. +message ListFindingsResponse { + // The list of Findings returned. + repeated Finding findings = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// Request for the `ListFindingTypeStats` method. +message ListFindingTypeStatsRequest { + // Required. The parent resource name, which should be a scan run resource name in the + // format + // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + string parent = 1; +} + +// Response for the `ListFindingTypeStats` method. +message ListFindingTypeStatsResponse { + // The list of FindingTypeStats returned. + repeated FindingTypeStats finding_type_stats = 1; +} diff --git a/google/cloud/websecurityscanner/v1/websecurityscanner_gapic.yaml b/google/cloud/websecurityscanner/v1/websecurityscanner_gapic.yaml new file mode 100644 index 000000000..6c634317b --- /dev/null +++ b/google/cloud/websecurityscanner/v1/websecurityscanner_gapic.yaml @@ -0,0 +1,19 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.websecurityscanner.v1 + python: + package_name: google.cloud.websecurityscanner_v1.gapic + go: + package_name: cloud.google.com/go/websecurityscanner/apiv1 + csharp: + package_name: Google.Cloud.Websecurityscanner.V1 + ruby: + package_name: Google::Cloud::Websecurityscanner::V1 + php: + package_name: Google\Cloud\WebSecurityScanner\V1 + nodejs: + package_name: websecurityscanner.v1 + domain_layer_location: google-cloud diff --git a/google/cloud/websecurityscanner/v1/websecurityscanner_grpc_service_config.json b/google/cloud/websecurityscanner/v1/websecurityscanner_grpc_service_config.json new file mode 100644 index 000000000..d680c4456 --- /dev/null +++ b/google/cloud/websecurityscanner/v1/websecurityscanner_grpc_service_config.json @@ -0,0 +1,75 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.websecurityscanner.v1.WebSecurityScanner", + "method": "CreateScanConfig" + }, + { + "service": "google.cloud.websecurityscanner.v1.WebSecurityScanner", + "method": "UpdateScanConfig" + }, + { + "service": "google.cloud.websecurityscanner.v1.WebSecurityScanner", + "method": "StartScanRun" + }, + { + "service": "google.cloud.websecurityscanner.v1.WebSecurityScanner", + "method": "StopScanRun" + } + ], + "timeout": "600s" + }, + { + "name": [ + { + "service": "google.cloud.websecurityscanner.v1.WebSecurityScanner", + "method": "DeleteScanConfig" + }, + { + "service": "google.cloud.websecurityscanner.v1.WebSecurityScanner", + "method": "GetScanConfig" + }, + { + "service": "google.cloud.websecurityscanner.v1.WebSecurityScanner", + "method": "ListScanConfigs" + }, + { + "service": "google.cloud.websecurityscanner.v1.WebSecurityScanner", + "method": "GetScanRun" + }, + { + "service": "google.cloud.websecurityscanner.v1.WebSecurityScanner", + "method": "ListScanRuns" + }, + { + "service": "google.cloud.websecurityscanner.v1.WebSecurityScanner", + "method": "GetFinding" + }, + { + "service": "google.cloud.websecurityscanner.v1.WebSecurityScanner", + "method": "ListFindings" + }, + { + "service": "google.cloud.websecurityscanner.v1.WebSecurityScanner", + "method": "ListFindingTypeStats" + }, + { + "service": "google.cloud.websecurityscanner.v1.WebSecurityScanner", + "method": "ListCrawledUrls" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/websecurityscanner/v1/websecurityscanner_v1.yaml b/google/cloud/websecurityscanner/v1/websecurityscanner_v1.yaml new file mode 100644 index 000000000..b79ef6f20 --- /dev/null +++ b/google/cloud/websecurityscanner/v1/websecurityscanner_v1.yaml @@ -0,0 +1,22 @@ +type: google.api.Service +config_version: 3 +name: websecurityscanner.googleapis.com +title: Web Security Scanner API + +apis: +- name: google.cloud.websecurityscanner.v1.WebSecurityScanner + +documentation: + summary: Scans your Compute and App Engine apps for common web vulnerabilities. + +backend: + rules: + - selector: 'google.cloud.websecurityscanner.v1.WebSecurityScanner.*' + deadline: 60.0 + +authentication: + rules: + - selector: 'google.cloud.websecurityscanner.v1.WebSecurityScanner.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/websecurityscanner/v1alpha/BUILD.bazel b/google/cloud/websecurityscanner/v1alpha/BUILD.bazel index 33c9e29ff..d94c332d1 100644 --- a/google/cloud/websecurityscanner/v1alpha/BUILD.bazel +++ b/google/cloud/websecurityscanner/v1alpha/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -19,6 +22,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:field_mask_proto", "@com_google_protobuf//:timestamp_proto", @@ -27,7 +33,10 @@ proto_library( proto_library_with_info( name = "websecurityscanner_proto_with_info", - deps = [":websecurityscanner_proto"], + deps = [ + ":websecurityscanner_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -35,18 +44,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "websecurityscanner_java_proto", deps = [":websecurityscanner_proto"], @@ -55,49 +59,40 @@ java_proto_library( java_grpc_library( name = "websecurityscanner_java_grpc", srcs = [":websecurityscanner_proto"], - deps = [":websecurityscanner_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "websecurityscanner_resource_name_java_proto", - gapic_yaml = "websecurityscanner_gapic.yaml", - deps = [":websecurityscanner_proto"], + deps = [":websecurityscanner_java_proto"], ) java_gapic_library( name = "websecurityscanner_java_gapic", src = ":websecurityscanner_proto_with_info", gapic_yaml = "websecurityscanner_gapic.yaml", - service_yaml = "//google/cloud/websecurityscanner:web_security_scanner_v1alpha.yaml", - test_deps = [":websecurityscanner_java_grpc"], + package = "google.cloud.websecurityscanner.v1alpha", + service_yaml = "websecurityscanner_v1alpha.yaml", + test_deps = [ + ":websecurityscanner_java_grpc", + ], deps = [ ":websecurityscanner_java_proto", - ":websecurityscanner_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, +java_gapic_test( + name = "websecurityscanner_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.websecurityscanner.v1alpha.WebSecurityScannerClientTest", + ], runtime_deps = [":websecurityscanner_java_gapic_test"], -) for test_name in [ - "com.google.cloud.websecurityscanner.v1alpha.WebSecurityScannerClientTest", -]] +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-websecurityscanner-v1alpha-java", - client_deps = [":websecurityscanner_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":websecurityscanner_java_gapic_test"], - grpc_deps = [":websecurityscanner_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":websecurityscanner_resource_name_java_proto", + deps = [ + ":websecurityscanner_java_gapic", + ":websecurityscanner_java_grpc", ":websecurityscanner_java_proto", ":websecurityscanner_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -105,10 +100,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -116,16 +111,20 @@ go_proto_library( compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha", protos = [":websecurityscanner_proto"], - deps = ["//google/api:annotations_go_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], ) go_gapic_library( name = "websecurityscanner_go_gapic", - src = ":websecurityscanner_proto_with_info", - gapic_yaml = "websecurityscanner_gapic.yaml", - importpath = "cloud.google.com/go/cloud/websecurityscanner/apiv1alpha", - service_yaml = "//google/cloud/websecurityscanner:web_security_scanner_v1alpha.yaml", - deps = [":websecurityscanner_go_proto"], + srcs = [":websecurityscanner_proto_with_info"], + grpc_service_config = "websecurityscanner_grpc_service_config.json", + importpath = "cloud.google.com/go/cloud/websecurityscanner/apiv1alpha;websecurityscanner", + service_yaml = "websecurityscanner_v1alpha.yaml", + deps = [ + ":websecurityscanner_go_proto", + ], ) go_test( @@ -135,13 +134,235 @@ go_test( importpath = "cloud.google.com/go/cloud/websecurityscanner/apiv1alpha", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-websecurityscanner-v1alpha-go", deps = [ ":websecurityscanner_go_gapic", - ":websecurityscanner_go_gapic_srcjar-smoke-test.srcjar", ":websecurityscanner_go_gapic_srcjar-test.srcjar", ":websecurityscanner_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "websecurityscanner_moved_proto", + srcs = [":websecurityscanner_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "websecurityscanner_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":websecurityscanner_moved_proto"], +) + +py_grpc_library( + name = "websecurityscanner_py_grpc", + srcs = [":websecurityscanner_moved_proto"], + deps = [":websecurityscanner_py_proto"], +) + +py_gapic_library( + name = "websecurityscanner_py_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1alpha", + service_yaml = "websecurityscanner_v1alpha.yaml", + deps = [ + ":websecurityscanner_py_grpc", + ":websecurityscanner_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "websecurityscanner-v1alpha-py", + deps = [ + ":websecurityscanner_py_gapic", + ":websecurityscanner_py_grpc", + ":websecurityscanner_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "websecurityscanner_php_proto", + deps = [":websecurityscanner_proto"], +) + +php_grpc_library( + name = "websecurityscanner_php_grpc", + srcs = [":websecurityscanner_proto"], + deps = [":websecurityscanner_php_proto"], +) + +php_gapic_library( + name = "websecurityscanner_php_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1alpha", + service_yaml = "websecurityscanner_v1alpha.yaml", + deps = [ + ":websecurityscanner_php_grpc", + ":websecurityscanner_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-websecurityscanner-v1alpha-php", + deps = [ + ":websecurityscanner_php_gapic", + ":websecurityscanner_php_grpc", + ":websecurityscanner_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "websecurityscanner_nodejs_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1alpha", + service_yaml = "websecurityscanner_v1alpha.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "websecurityscanner-v1alpha-nodejs", + deps = [ + ":websecurityscanner_nodejs_gapic", + ":websecurityscanner_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "websecurityscanner_ruby_proto", + deps = [":websecurityscanner_proto"], +) + +ruby_grpc_library( + name = "websecurityscanner_ruby_grpc", + srcs = [":websecurityscanner_proto"], + deps = [":websecurityscanner_ruby_proto"], +) + +ruby_gapic_library( + name = "websecurityscanner_ruby_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1alpha", + service_yaml = "websecurityscanner_v1alpha.yaml", + deps = [ + ":websecurityscanner_ruby_grpc", + ":websecurityscanner_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-websecurityscanner-v1alpha-ruby", + deps = [ + ":websecurityscanner_ruby_gapic", + ":websecurityscanner_ruby_grpc", + ":websecurityscanner_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "websecurityscanner_csharp_proto", + deps = [":websecurityscanner_proto"], +) + +csharp_grpc_library( + name = "websecurityscanner_csharp_grpc", + srcs = [":websecurityscanner_proto"], + deps = [":websecurityscanner_csharp_proto"], +) + +csharp_gapic_library( + name = "websecurityscanner_csharp_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1alpha", + service_yaml = "websecurityscanner_v1alpha.yaml", + deps = [ + ":websecurityscanner_csharp_grpc", + ":websecurityscanner_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-websecurityscanner-v1alpha-csharp", + deps = [ + ":websecurityscanner_csharp_gapic", + ":websecurityscanner_csharp_grpc", + ":websecurityscanner_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/websecurityscanner/v1alpha/crawled_url.proto b/google/cloud/websecurityscanner/v1alpha/crawled_url.proto index d4c40eae8..c22f4272f 100644 --- a/google/cloud/websecurityscanner/v1alpha/crawled_url.proto +++ b/google/cloud/websecurityscanner/v1alpha/crawled_url.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.websecurityscanner.v1alpha; -import "google/api/annotations.proto"; - option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha;websecurityscanner"; option java_multiple_files = true; option java_outer_classname = "CrawledUrlProto"; @@ -27,16 +26,13 @@ option java_package = "com.google.cloud.websecurityscanner.v1alpha"; // Security Scanner Service crawls the web applications, following all links // within the scope of sites, to find the URLs to test against. message CrawledUrl { - // Output only. - // The http method of the request that was used to visit the URL, in + // Output only. The http method of the request that was used to visit the URL, in // uppercase. string http_method = 1; - // Output only. - // The URL that was crawled. + // Output only. The URL that was crawled. string url = 2; - // Output only. - // The body of the request that was used to visit the URL. + // Output only. The body of the request that was used to visit the URL. string body = 3; } diff --git a/google/cloud/websecurityscanner/v1alpha/finding.proto b/google/cloud/websecurityscanner/v1alpha/finding.proto index 07140e276..c02020f34 100644 --- a/google/cloud/websecurityscanner/v1alpha/finding.proto +++ b/google/cloud/websecurityscanner/v1alpha/finding.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.websecurityscanner.v1alpha; -import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/websecurityscanner/v1alpha/finding_addon.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha;websecurityscanner"; @@ -27,6 +28,11 @@ option java_package = "com.google.cloud.websecurityscanner.v1alpha"; // A Finding resource represents a vulnerability instance identified during a // ScanRun. message Finding { + option (google.api.resource) = { + type: "websecurityscanner.googleapis.com/Finding" + pattern: "projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}" + }; + // Types of Findings. enum FindingType { // The invalid finding type. @@ -71,70 +77,76 @@ message Finding { // An application appears to be transmitting a password field in clear text. // An attacker can eavesdrop network traffic and sniff the password field. CLEAR_TEXT_PASSWORD = 6; + + // An application returns sensitive content with an invalid content type, + // or without an 'X-Content-Type-Options: nosniff' header. + INVALID_CONTENT_TYPE = 7; + + // A cross-site scripting (XSS) vulnerability in AngularJS module that + // occurs when a user-provided string is interpolated by Angular. + XSS_ANGULAR_CALLBACK = 8; + + // A malformed or invalid valued header. + INVALID_HEADER = 9; + + // Misspelled security header name. + MISSPELLED_SECURITY_HEADER_NAME = 10; + + // Mismatching values in a duplicate security header. + MISMATCHING_SECURITY_HEADER_VALUES = 11; } - // Output only. // The resource name of the Finding. The name follows the format of // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. // The finding IDs are generated by the system. string name = 1; - // Output only. // The type of the Finding. FindingType finding_type = 2; - // Output only. // The http method of the request that triggered the vulnerability, in // uppercase. string http_method = 3; - // Output only. // The URL produced by the server-side fuzzer and used in the request that // triggered the vulnerability. string fuzzed_url = 4; - // Output only. // The body of the request that triggered the vulnerability. string body = 5; - // Output only. // The description of the vulnerability. string description = 6; - // Output only. // The URL containing human-readable payload that user can leverage to // reproduce the vulnerability. string reproduction_url = 7; - // Output only. // If the vulnerability was originated from nested IFrame, the immediate // parent IFrame is reported. string frame_url = 8; - // Output only. // The URL where the browser lands when the vulnerability is detected. string final_url = 9; - // Output only. // The tracking ID uniquely identifies a vulnerability instance across // multiple ScanRuns. string tracking_id = 10; - // Output only. // An addon containing information about outdated libraries. OutdatedLibrary outdated_library = 11; - // Output only. // An addon containing detailed information regarding any resource causing the // vulnerability such as JavaScript sources, image, audio files, etc. ViolatingResource violating_resource = 12; - // Output only. + // An addon containing information about vulnerable or missing HTTP headers. + VulnerableHeaders vulnerable_headers = 15; + // An addon containing information about request parameters which were found // to be vulnerable. VulnerableParameters vulnerable_parameters = 13; - // Output only. // An addon containing information reported for an XSS, if any. Xss xss = 14; } diff --git a/google/cloud/websecurityscanner/v1alpha/finding_addon.proto b/google/cloud/websecurityscanner/v1alpha/finding_addon.proto index a7d344b84..3fafdb402 100644 --- a/google/cloud/websecurityscanner/v1alpha/finding_addon.proto +++ b/google/cloud/websecurityscanner/v1alpha/finding_addon.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.websecurityscanner.v1alpha; -import "google/api/annotations.proto"; - option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha;websecurityscanner"; option java_multiple_files = true; option java_outer_classname = "FindingAddonProto"; @@ -51,6 +50,24 @@ message VulnerableParameters { repeated string parameter_names = 1; } +// Information about vulnerable or missing HTTP Headers. +message VulnerableHeaders { + // Describes a HTTP Header. + message Header { + // Header name. + string name = 1; + + // Header value. + string value = 2; + } + + // List of vulnerable headers. + repeated Header headers = 1; + + // List of missing headers. + repeated Header missing_headers = 2; +} + // Information reported for an XSS. message Xss { // Stack traces leading to the point where the XSS occurred. diff --git a/google/cloud/websecurityscanner/v1alpha/finding_type_stats.proto b/google/cloud/websecurityscanner/v1alpha/finding_type_stats.proto index 73115667f..e46b330c6 100644 --- a/google/cloud/websecurityscanner/v1alpha/finding_type_stats.proto +++ b/google/cloud/websecurityscanner/v1alpha/finding_type_stats.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.websecurityscanner.v1alpha; -import "google/api/annotations.proto"; import "google/cloud/websecurityscanner/v1alpha/finding.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha;websecurityscanner"; @@ -27,11 +27,9 @@ option java_package = "com.google.cloud.websecurityscanner.v1alpha"; // A FindingTypeStats resource represents stats regarding a specific FindingType // of Findings under a given ScanRun. message FindingTypeStats { - // Output only. // The finding type associated with the stats. Finding.FindingType finding_type = 1; - // Output only. // The count of findings belonging to this finding type. int32 finding_count = 2; } diff --git a/google/cloud/websecurityscanner/v1alpha/scan_config.proto b/google/cloud/websecurityscanner/v1alpha/scan_config.proto index 144f7f2b5..5497b1a0f 100644 --- a/google/cloud/websecurityscanner/v1alpha/scan_config.proto +++ b/google/cloud/websecurityscanner/v1alpha/scan_config.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.websecurityscanner.v1alpha; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/websecurityscanner/v1alpha/scan_run.proto"; import "google/protobuf/timestamp.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha;websecurityscanner"; @@ -25,37 +28,42 @@ option java_outer_classname = "ScanConfigProto"; option java_package = "com.google.cloud.websecurityscanner.v1alpha"; // A ScanConfig resource contains the configurations to launch a scan. +// next id: 12 message ScanConfig { + option (google.api.resource) = { + type: "websecurityscanner.googleapis.com/ScanConfig" + pattern: "projects/{project}/scanConfigs/{scan_config}" + }; + // Scan authentication configuration. message Authentication { // Describes authentication configuration that uses a Google account. message GoogleAccount { - // Required. - // The user name of the Google account. - string username = 1; - - // Input only. - // Required. - // The password of the Google account. The credential is stored encrypted - // and not returned in any response. - string password = 2; + // Required. The user name of the Google account. + string username = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Input only. The password of the Google account. The credential is stored encrypted + // and not returned in any response nor included in audit logs. + string password = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = INPUT_ONLY + ]; } // Describes authentication configuration that uses a custom account. message CustomAccount { - // Required. - // The user name of the custom account. - string username = 1; - - // Input only. - // Required. - // The password of the custom account. The credential is stored encrypted - // and not returned in any response. - string password = 2; - - // Required. - // The login form URL of the website. - string login_url = 3; + // Required. The user name of the custom account. + string username = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Input only. The password of the custom account. The credential is stored encrypted + // and not returned in any response nor included in audit logs. + string password = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = INPUT_ONLY + ]; + + // Required. The login form URL of the website. + string login_url = 3 [(google.api.field_behavior) = REQUIRED]; } // Required. @@ -77,9 +85,8 @@ message ScanConfig { // immediately. google.protobuf.Timestamp schedule_time = 1; - // Required. - // The duration of time between executions in days. - int32 interval_duration_days = 2; + // Required. The duration of time between executions in days. + int32 interval_duration_days = 2 [(google.api.field_behavior) = REQUIRED]; } // Type of user agents used for scanning. @@ -115,9 +122,8 @@ message ScanConfig { // generated by the system. string name = 1; - // Required. - // The user provided display name of the ScanConfig. - string display_name = 2; + // Required. The user provided display name of the ScanConfig. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; // The maximum QPS during scanning. A valid value ranges from 5 to 20 // inclusively. If the field is unspecified or its value is set 0, server will @@ -125,9 +131,8 @@ message ScanConfig { // INVALID_ARGUMENT error. int32 max_qps = 3; - // Required. - // The starting URLs from which the scanner finds site pages. - repeated string starting_urls = 4; + // Required. The starting URLs from which the scanner finds site pages. + repeated string starting_urls = 4 [(google.api.field_behavior) = REQUIRED]; // The authentication configuration. If specified, service will use the // authentication configuration during scanning. @@ -146,4 +151,7 @@ message ScanConfig { // Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be // used as a default. repeated TargetPlatform target_platforms = 9; + + // Latest ScanRun if available. + ScanRun latest_run = 11; } diff --git a/google/cloud/websecurityscanner/v1alpha/scan_run.proto b/google/cloud/websecurityscanner/v1alpha/scan_run.proto index 36e2d0925..79c541949 100644 --- a/google/cloud/websecurityscanner/v1alpha/scan_run.proto +++ b/google/cloud/websecurityscanner/v1alpha/scan_run.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.websecurityscanner.v1alpha; -import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha;websecurityscanner"; @@ -26,6 +27,11 @@ option java_package = "com.google.cloud.websecurityscanner.v1alpha"; // A ScanRun is a output-only resource representing an actual run of the scan. message ScanRun { + option (google.api.resource) = { + type: "websecurityscanner.googleapis.com/ScanRun" + pattern: "projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}" + }; + // Types of ScanRun execution state. enum ExecutionState { // Represents an invalid state caused by internal server error. This value @@ -58,47 +64,38 @@ message ScanRun { KILLED = 3; } - // Output only. // The resource name of the ScanRun. The name follows the format of // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. // The ScanRun IDs are generated by the system. string name = 1; - // Output only. // The execution state of the ScanRun. ExecutionState execution_state = 2; - // Output only. // The result state of the ScanRun. This field is only available after the // execution state reaches "FINISHED". ResultState result_state = 3; - // Output only. // The time at which the ScanRun started. google.protobuf.Timestamp start_time = 4; - // Output only. // The time at which the ScanRun reached termination state - that the ScanRun // is either finished or stopped by user. google.protobuf.Timestamp end_time = 5; - // Output only. // The number of URLs crawled during this ScanRun. If the scan is in progress, // the value represents the number of URLs crawled up to now. int64 urls_crawled_count = 6; - // Output only. // The number of URLs tested during this ScanRun. If the scan is in progress, // the value represents the number of URLs tested up to now. The number of // URLs tested is usually larger than the number URLS crawled because // typically a crawled URL is tested with multiple test payloads. int64 urls_tested_count = 7; - // Output only. // Whether the scan run has found any vulnerabilities. bool has_vulnerabilities = 8; - // Output only. // The percentage of total completion ranging from 0 to 100. // If the scan is in queue, the value is 0. // If the scan is running, the value ranges from 0 to 100. diff --git a/google/cloud/websecurityscanner/v1alpha/web_security_scanner.proto b/google/cloud/websecurityscanner/v1alpha/web_security_scanner.proto index b07516aaf..f34bd74d5 100644 --- a/google/cloud/websecurityscanner/v1alpha/web_security_scanner.proto +++ b/google/cloud/websecurityscanner/v1alpha/web_security_scanner.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.websecurityscanner.v1alpha; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/websecurityscanner/v1alpha/crawled_url.proto"; import "google/cloud/websecurityscanner/v1alpha/finding.proto"; import "google/cloud/websecurityscanner/v1alpha/finding_type_stats.proto"; @@ -34,20 +38,24 @@ option java_package = "com.google.cloud.websecurityscanner.v1alpha"; // applications hosted on Google Cloud Platform. It crawls your application, and // attempts to exercise as many user inputs and event handlers as possible. service WebSecurityScanner { + option (google.api.default_host) = "websecurityscanner.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Creates a new ScanConfig. rpc CreateScanConfig(CreateScanConfigRequest) returns (ScanConfig) { option (google.api.http) = { post: "/v1alpha/{parent=projects/*}/scanConfigs" body: "scan_config" }; + option (google.api.method_signature) = "parent,scan_config"; } // Deletes an existing ScanConfig and its child resources. - rpc DeleteScanConfig(DeleteScanConfigRequest) - returns (google.protobuf.Empty) { + rpc DeleteScanConfig(DeleteScanConfigRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1alpha/{name=projects/*/scanConfigs/*}" }; + option (google.api.method_signature) = "name"; } // Gets a ScanConfig. @@ -55,14 +63,15 @@ service WebSecurityScanner { option (google.api.http) = { get: "/v1alpha/{name=projects/*/scanConfigs/*}" }; + option (google.api.method_signature) = "name"; } // Lists ScanConfigs under a given project. - rpc ListScanConfigs(ListScanConfigsRequest) - returns (ListScanConfigsResponse) { + rpc ListScanConfigs(ListScanConfigsRequest) returns (ListScanConfigsResponse) { option (google.api.http) = { get: "/v1alpha/{parent=projects/*}/scanConfigs" }; + option (google.api.method_signature) = "parent"; } // Updates a ScanConfig. This method support partial update of a ScanConfig. @@ -71,6 +80,7 @@ service WebSecurityScanner { patch: "/v1alpha/{scan_config.name=projects/*/scanConfigs/*}" body: "scan_config" }; + option (google.api.method_signature) = "scan_config,update_mask"; } // Start a ScanRun according to the given ScanConfig. @@ -79,6 +89,7 @@ service WebSecurityScanner { post: "/v1alpha/{name=projects/*/scanConfigs/*}:start" body: "*" }; + option (google.api.method_signature) = "name"; } // Gets a ScanRun. @@ -86,6 +97,7 @@ service WebSecurityScanner { option (google.api.http) = { get: "/v1alpha/{name=projects/*/scanConfigs/*/scanRuns/*}" }; + option (google.api.method_signature) = "name"; } // Lists ScanRuns under a given ScanConfig, in descending order of ScanRun @@ -94,6 +106,7 @@ service WebSecurityScanner { option (google.api.http) = { get: "/v1alpha/{parent=projects/*/scanConfigs/*}/scanRuns" }; + option (google.api.method_signature) = "parent"; } // Stops a ScanRun. The stopped ScanRun is returned. @@ -102,14 +115,15 @@ service WebSecurityScanner { post: "/v1alpha/{name=projects/*/scanConfigs/*/scanRuns/*}:stop" body: "*" }; + option (google.api.method_signature) = "name"; } // List CrawledUrls under a given ScanRun. - rpc ListCrawledUrls(ListCrawledUrlsRequest) - returns (ListCrawledUrlsResponse) { + rpc ListCrawledUrls(ListCrawledUrlsRequest) returns (ListCrawledUrlsResponse) { option (google.api.http) = { get: "/v1alpha/{parent=projects/*/scanConfigs/*/scanRuns/*}/crawledUrls" }; + option (google.api.method_signature) = "parent"; } // Gets a Finding. @@ -117,6 +131,7 @@ service WebSecurityScanner { option (google.api.http) = { get: "/v1alpha/{name=projects/*/scanConfigs/*/scanRuns/*/findings/*}" }; + option (google.api.method_signature) = "name"; } // List Findings under a given ScanRun. @@ -124,51 +139,67 @@ service WebSecurityScanner { option (google.api.http) = { get: "/v1alpha/{parent=projects/*/scanConfigs/*/scanRuns/*}/findings" }; + option (google.api.method_signature) = "parent,filter"; } // List all FindingTypeStats under a given ScanRun. - rpc ListFindingTypeStats(ListFindingTypeStatsRequest) - returns (ListFindingTypeStatsResponse) { + rpc ListFindingTypeStats(ListFindingTypeStatsRequest) returns (ListFindingTypeStatsResponse) { option (google.api.http) = { get: "/v1alpha/{parent=projects/*/scanConfigs/*/scanRuns/*}/findingTypeStats" }; + option (google.api.method_signature) = "parent"; } } // Request for the `CreateScanConfig` method. message CreateScanConfigRequest { - // Required. - // The parent resource name where the scan is created, which should be a + // Required. The parent resource name where the scan is created, which should be a // project resource name in the format 'projects/{projectId}'. - string parent = 1; - - // Required. - // The ScanConfig to be created. - ScanConfig scan_config = 2; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The ScanConfig to be created. + ScanConfig scan_config = 2 [(google.api.field_behavior) = REQUIRED]; } // Request for the `DeleteScanConfig` method. message DeleteScanConfigRequest { - // Required. - // The resource name of the ScanConfig to be deleted. The name follows the + // Required. The resource name of the ScanConfig to be deleted. The name follows the // format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanConfig" + } + ]; } // Request for the `GetScanConfig` method. message GetScanConfigRequest { - // Required. - // The resource name of the ScanConfig to be returned. The name follows the + // Required. The resource name of the ScanConfig to be returned. The name follows the // format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanConfig" + } + ]; } // Request for the `ListScanConfigs` method. message ListScanConfigsRequest { - // Required. - // The parent resource name, which should be a project resource name in the + // Required. The parent resource name, which should be a project resource name in the // format 'projects/{projectId}'. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // A token identifying a page of results to be returned. This should be a // `next_page_token` value returned from a previous List request. @@ -183,17 +214,15 @@ message ListScanConfigsRequest { // Request for the `UpdateScanConfigRequest` method. message UpdateScanConfigRequest { - // Required. - // The ScanConfig to be updated. The name field must be set to identify the + // Required. The ScanConfig to be updated. The name field must be set to identify the // resource to be updated. The values of fields not covered by the mask // will be ignored. - ScanConfig scan_config = 2; + ScanConfig scan_config = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. - // The update mask applies to the resource. For the `FieldMask` definition, + // Required. The update mask applies to the resource. For the `FieldMask` definition, // see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 3; + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; } // Response for the `ListScanConfigs` method. @@ -208,27 +237,39 @@ message ListScanConfigsResponse { // Request for the `StartScanRun` method. message StartScanRunRequest { - // Required. - // The resource name of the ScanConfig to be used. The name follows the + // Required. The resource name of the ScanConfig to be used. The name follows the // format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanConfig" + } + ]; } // Request for the `GetScanRun` method. message GetScanRunRequest { - // Required. - // The resource name of the ScanRun to be returned. The name follows the + // Required. The resource name of the ScanRun to be returned. The name follows the // format of // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanRun" + } + ]; } // Request for the `ListScanRuns` method. message ListScanRunsRequest { - // Required. - // The parent resource name, which should be a scan resource name in the + // Required. The parent resource name, which should be a scan resource name in the // format 'projects/{projectId}/scanConfigs/{scanConfigId}'. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanConfig" + } + ]; // A token identifying a page of results to be returned. This should be a // `next_page_token` value returned from a previous List request. @@ -253,20 +294,28 @@ message ListScanRunsResponse { // Request for the `StopScanRun` method. message StopScanRunRequest { - // Required. - // The resource name of the ScanRun to be stopped. The name follows the + // Required. The resource name of the ScanRun to be stopped. The name follows the // format of // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanRun" + } + ]; } // Request for the `ListCrawledUrls` method. message ListCrawledUrlsRequest { - // Required. - // The parent resource name, which should be a scan run resource name in the + // Required. The parent resource name, which should be a scan run resource name in the // format // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanRun" + } + ]; // A token identifying a page of results to be returned. This should be a // `next_page_token` value returned from a previous List request. @@ -291,26 +340,34 @@ message ListCrawledUrlsResponse { // Request for the `GetFinding` method. message GetFindingRequest { - // Required. - // The resource name of the Finding to be returned. The name follows the + // Required. The resource name of the Finding to be returned. The name follows the // format of // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/Finding" + } + ]; } // Request for the `ListFindings` method. message ListFindingsRequest { - // Required. - // The parent resource name, which should be a scan run resource name in the + // Required. The parent resource name, which should be a scan run resource name in the // format // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - string parent = 1; - - // The filter expression. The expression must be in the format: + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanRun" + } + ]; + + // Required. The filter expression. The expression must be in the format: // . // Supported field: 'finding_type'. // Supported operator: '='. - string filter = 2; + string filter = 2 [(google.api.field_behavior) = REQUIRED]; // A token identifying a page of results to be returned. This should be a // `next_page_token` value returned from a previous List request. @@ -335,11 +392,15 @@ message ListFindingsResponse { // Request for the `ListFindingTypeStats` method. message ListFindingTypeStatsRequest { - // Required. - // The parent resource name, which should be a scan run resource name in the + // Required. The parent resource name, which should be a scan run resource name in the // format // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanRun" + } + ]; } // Response for the `ListFindingTypeStats` method. diff --git a/google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.legacy.yaml b/google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.legacy.yaml new file mode 100644 index 000000000..3b2c313c6 --- /dev/null +++ b/google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.legacy.yaml @@ -0,0 +1,356 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.websecurityscanner.v1alpha + python: + package_name: google.cloud.websecurityscanner_v1alpha.gapic + go: + package_name: cloud.google.com/go/cloud/websecurityscanner/apiv1alpha + csharp: + package_name: Google.Cloud.Websecurityscanner.V1Alpha + ruby: + package_name: Google::Cloud::Websecurityscanner::V1alpha + php: + package_name: Google\Cloud\Websecurityscanner\V1alpha + nodejs: + package_name: websecurityscanner.v1alpha +# A list of API interface configurations. +interfaces: + # The fully qualified name of the API interface. +- name: google.cloud.websecurityscanner.v1alpha.WebSecurityScanner + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + - name_pattern: projects/{project}/scanConfigs/{scan_config} + entity_name: scan_config + - name_pattern: projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run} + entity_name: scan_run + - name_pattern: projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding} + entity_name: finding + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateScanConfig + flattening: + groups: + - parameters: + - parent + - scan_config + required_fields: + - parent + - scan_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: DeleteScanConfig + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: scan_config + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: GetScanConfig + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: scan_config + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: ListScanConfigs + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: scan_configs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: UpdateScanConfig + flattening: + groups: + - parameters: + - scan_config + - update_mask + required_fields: + - scan_config + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + scan_config.name: scan_config + timeout_millis: 60000 + - name: StartScanRun + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: scan_config + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: GetScanRun + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: scan_run + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: ListScanRuns + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: scan_runs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: scan_config + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: StopScanRun + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: scan_run + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: ListCrawledUrls + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: crawled_urls + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: scan_run + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: GetFinding + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: finding + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: ListFindings + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + - filter + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: findings + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: scan_run + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: ListFindingTypeStats + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: scan_run + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES +resource_name_generation: +- message_name: CreateScanConfigRequest + field_entity_map: + parent: project +- message_name: DeleteScanConfigRequest + field_entity_map: + name: scan_config +- message_name: GetScanConfigRequest + field_entity_map: + name: scan_config +- message_name: ListScanConfigsRequest + field_entity_map: + parent: project +- message_name: StartScanRunRequest + field_entity_map: + name: scan_config +- message_name: GetScanRunRequest + field_entity_map: + name: scan_run +- message_name: ListScanRunsRequest + field_entity_map: + parent: scan_config +- message_name: StopScanRunRequest + field_entity_map: + name: scan_run +- message_name: ListCrawledUrlsRequest + field_entity_map: + parent: scan_run +- message_name: GetFindingRequest + field_entity_map: + name: finding +- message_name: ListFindingsRequest + field_entity_map: + parent: scan_run +- message_name: ListFindingTypeStatsRequest + field_entity_map: + parent: scan_run diff --git a/google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.yaml b/google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.yaml index 3b2c313c6..d0dc6de6c 100644 --- a/google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.yaml +++ b/google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.yaml @@ -1,6 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 -# The settings of generated code in a specific language. +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.websecurityscanner.v1alpha @@ -16,341 +15,8 @@ language_settings: package_name: Google\Cloud\Websecurityscanner\V1alpha nodejs: package_name: websecurityscanner.v1alpha -# A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.cloud.websecurityscanner.v1alpha.WebSecurityScanner - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - - name_pattern: projects/{project}/scanConfigs/{scan_config} - entity_name: scan_config - - name_pattern: projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run} - entity_name: scan_run - - name_pattern: projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding} - entity_name: finding - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: CreateScanConfig - flattening: - groups: - - parameters: - - parent - - scan_config - required_fields: - - parent - - scan_config - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: DeleteScanConfig - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: scan_config - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: GetScanConfig - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: scan_config - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: ListScanConfigs - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: scan_configs - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: UpdateScanConfig - flattening: - groups: - - parameters: - - scan_config - - update_mask - required_fields: - - scan_config - - update_mask - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - scan_config.name: scan_config - timeout_millis: 60000 - - name: StartScanRun - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: scan_config - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: GetScanRun - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: scan_run - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: ListScanRuns - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: scan_runs - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: scan_config - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: StopScanRun - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: scan_run - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: ListCrawledUrls - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: crawled_urls - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: scan_run - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: GetFinding - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: finding - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: ListFindings - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - - parent - - filter - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: findings - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: scan_run - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: ListFindingTypeStats - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: scan_run - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES -resource_name_generation: -- message_name: CreateScanConfigRequest - field_entity_map: - parent: project -- message_name: DeleteScanConfigRequest - field_entity_map: - name: scan_config -- message_name: GetScanConfigRequest - field_entity_map: - name: scan_config -- message_name: ListScanConfigsRequest - field_entity_map: - parent: project -- message_name: StartScanRunRequest - field_entity_map: - name: scan_config -- message_name: GetScanRunRequest - field_entity_map: - name: scan_run -- message_name: ListScanRunsRequest - field_entity_map: - parent: scan_config -- message_name: StopScanRunRequest - field_entity_map: - name: scan_run -- message_name: ListCrawledUrlsRequest - field_entity_map: - parent: scan_run -- message_name: GetFindingRequest - field_entity_map: - name: finding -- message_name: ListFindingsRequest - field_entity_map: - parent: scan_run -- message_name: ListFindingTypeStatsRequest - field_entity_map: - parent: scan_run diff --git a/google/cloud/websecurityscanner/v1alpha/websecurityscanner_grpc_service_config.json b/google/cloud/websecurityscanner/v1alpha/websecurityscanner_grpc_service_config.json new file mode 100755 index 000000000..b14900e8d --- /dev/null +++ b/google/cloud/websecurityscanner/v1alpha/websecurityscanner_grpc_service_config.json @@ -0,0 +1,75 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.websecurityscanner.v1alpha.WebSecurityScanner", + "method": "CreateScanConfig" + }, + { + "service": "google.cloud.websecurityscanner.v1alpha.WebSecurityScanner", + "method": "UpdateScanConfig" + }, + { + "service": "google.cloud.websecurityscanner.v1alpha.WebSecurityScanner", + "method": "StartScanRun" + }, + { + "service": "google.cloud.websecurityscanner.v1alpha.WebSecurityScanner", + "method": "StopScanRun" + } + ], + "timeout": "600s" + }, + { + "name": [ + { + "service": "google.cloud.websecurityscanner.v1alpha.WebSecurityScanner", + "method": "DeleteScanConfig" + }, + { + "service": "google.cloud.websecurityscanner.v1alpha.WebSecurityScanner", + "method": "GetScanConfig" + }, + { + "service": "google.cloud.websecurityscanner.v1alpha.WebSecurityScanner", + "method": "ListScanConfigs" + }, + { + "service": "google.cloud.websecurityscanner.v1alpha.WebSecurityScanner", + "method": "GetScanRun" + }, + { + "service": "google.cloud.websecurityscanner.v1alpha.WebSecurityScanner", + "method": "ListScanRuns" + }, + { + "service": "google.cloud.websecurityscanner.v1alpha.WebSecurityScanner", + "method": "ListCrawledUrls" + }, + { + "service": "google.cloud.websecurityscanner.v1alpha.WebSecurityScanner", + "method": "GetFinding" + }, + { + "service": "google.cloud.websecurityscanner.v1alpha.WebSecurityScanner", + "method": "ListFindings" + }, + { + "service": "google.cloud.websecurityscanner.v1alpha.WebSecurityScanner", + "method": "ListFindingTypeStats" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/cloud/websecurityscanner/web_security_scanner_v1alpha.yaml b/google/cloud/websecurityscanner/v1alpha/websecurityscanner_v1alpha.yaml similarity index 54% rename from google/cloud/websecurityscanner/web_security_scanner_v1alpha.yaml rename to google/cloud/websecurityscanner/v1alpha/websecurityscanner_v1alpha.yaml index a31df929a..2baa9745c 100644 --- a/google/cloud/websecurityscanner/web_security_scanner_v1alpha.yaml +++ b/google/cloud/websecurityscanner/v1alpha/websecurityscanner_v1alpha.yaml @@ -7,11 +7,16 @@ apis: - name: google.cloud.websecurityscanner.v1alpha.WebSecurityScanner documentation: - summary: Web Security Scanner API (under development). + summary: Scans your Compute and App Engine apps for common web vulnerabilities. + +backend: + rules: + - selector: 'google.cloud.websecurityscanner.v1alpha.WebSecurityScanner.*' + deadline: 60.0 authentication: rules: - - selector: '*' + - selector: 'google.cloud.websecurityscanner.v1alpha.WebSecurityScanner.*' oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/websecurityscanner/v1beta/BUILD.bazel b/google/cloud/websecurityscanner/v1beta/BUILD.bazel new file mode 100644 index 000000000..1bbf53867 --- /dev/null +++ b/google/cloud/websecurityscanner/v1beta/BUILD.bazel @@ -0,0 +1,371 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "websecurityscanner_proto", + srcs = [ + "crawled_url.proto", + "finding.proto", + "finding_addon.proto", + "finding_type_stats.proto", + "scan_config.proto", + "scan_config_error.proto", + "scan_run.proto", + "scan_run_error_trace.proto", + "scan_run_warning_trace.proto", + "web_security_scanner.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "websecurityscanner_proto_with_info", + deps = [ + ":websecurityscanner_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "websecurityscanner_java_proto", + deps = [":websecurityscanner_proto"], +) + +java_grpc_library( + name = "websecurityscanner_java_grpc", + srcs = [":websecurityscanner_proto"], + deps = [":websecurityscanner_java_proto"], +) + +java_gapic_library( + name = "websecurityscanner_java_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1beta", + service_yaml = "websecurityscanner_v1beta.yaml", + test_deps = [ + ":websecurityscanner_java_grpc", + ], + deps = [ + ":websecurityscanner_java_proto", + ], +) + +java_gapic_test( + name = "websecurityscanner_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.websecurityscanner.v1beta.WebSecurityScannerClientTest", + ], + runtime_deps = [":websecurityscanner_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-websecurityscanner-v1beta-java", + deps = [ + ":websecurityscanner_java_gapic", + ":websecurityscanner_java_grpc", + ":websecurityscanner_java_proto", + ":websecurityscanner_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "websecurityscanner_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1beta", + protos = [":websecurityscanner_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "websecurityscanner_go_gapic", + srcs = [":websecurityscanner_proto_with_info"], + grpc_service_config = "websecurityscanner_grpc_service_config.json", + importpath = "cloud.google.com/go/websecurityscanner/apiv1beta;websecurityscanner", + service_yaml = "websecurityscanner_v1beta.yaml", + deps = [ + ":websecurityscanner_go_proto", + ], +) + +go_test( + name = "websecurityscanner_go_gapic_test", + srcs = [":websecurityscanner_go_gapic_srcjar_test"], + embed = [":websecurityscanner_go_gapic"], + importpath = "cloud.google.com/go/websecurityscanner/apiv1beta", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-websecurityscanner-v1beta-go", + deps = [ + ":websecurityscanner_go_gapic", + ":websecurityscanner_go_gapic_srcjar-test.srcjar", + ":websecurityscanner_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "websecurityscanner_moved_proto", + srcs = [":websecurityscanner_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "websecurityscanner_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":websecurityscanner_moved_proto"], +) + +py_grpc_library( + name = "websecurityscanner_py_grpc", + srcs = [":websecurityscanner_moved_proto"], + deps = [":websecurityscanner_py_proto"], +) + +py_gapic_library( + name = "websecurityscanner_py_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1beta", + service_yaml = "websecurityscanner_v1beta.yaml", + deps = [ + ":websecurityscanner_py_grpc", + ":websecurityscanner_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "websecurityscanner-v1beta-py", + deps = [ + ":websecurityscanner_py_gapic", + ":websecurityscanner_py_grpc", + ":websecurityscanner_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "websecurityscanner_php_proto", + deps = [":websecurityscanner_proto"], +) + +php_grpc_library( + name = "websecurityscanner_php_grpc", + srcs = [":websecurityscanner_proto"], + deps = [":websecurityscanner_php_proto"], +) + +php_gapic_library( + name = "websecurityscanner_php_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1beta", + service_yaml = "websecurityscanner_v1beta.yaml", + deps = [ + ":websecurityscanner_php_grpc", + ":websecurityscanner_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-websecurityscanner-v1beta-php", + deps = [ + ":websecurityscanner_php_gapic", + ":websecurityscanner_php_grpc", + ":websecurityscanner_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "websecurityscanner_nodejs_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1beta", + service_yaml = "websecurityscanner_v1beta.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "websecurityscanner-v1beta-nodejs", + deps = [ + ":websecurityscanner_nodejs_gapic", + ":websecurityscanner_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "websecurityscanner_ruby_proto", + deps = [":websecurityscanner_proto"], +) + +ruby_grpc_library( + name = "websecurityscanner_ruby_grpc", + srcs = [":websecurityscanner_proto"], + deps = [":websecurityscanner_ruby_proto"], +) + +ruby_gapic_library( + name = "websecurityscanner_ruby_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1beta", + service_yaml = "websecurityscanner_v1beta.yaml", + deps = [ + ":websecurityscanner_ruby_grpc", + ":websecurityscanner_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-websecurityscanner-v1beta-ruby", + deps = [ + ":websecurityscanner_ruby_gapic", + ":websecurityscanner_ruby_grpc", + ":websecurityscanner_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "websecurityscanner_csharp_proto", + deps = [":websecurityscanner_proto"], +) + +csharp_grpc_library( + name = "websecurityscanner_csharp_grpc", + srcs = [":websecurityscanner_proto"], + deps = [":websecurityscanner_csharp_proto"], +) + +csharp_gapic_library( + name = "websecurityscanner_csharp_gapic", + src = ":websecurityscanner_proto_with_info", + gapic_yaml = "websecurityscanner_gapic.yaml", + package = "google.cloud.websecurityscanner.v1beta", + service_yaml = "websecurityscanner_v1beta.yaml", + deps = [ + ":websecurityscanner_csharp_grpc", + ":websecurityscanner_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-websecurityscanner-v1beta-csharp", + deps = [ + ":websecurityscanner_csharp_gapic", + ":websecurityscanner_csharp_grpc", + ":websecurityscanner_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/cloud/websecurityscanner/v1beta/crawled_url.proto b/google/cloud/websecurityscanner/v1beta/crawled_url.proto index 92a0dc663..9316f8b2a 100644 --- a/google/cloud/websecurityscanner/v1beta/crawled_url.proto +++ b/google/cloud/websecurityscanner/v1beta/crawled_url.proto @@ -17,8 +17,6 @@ syntax = "proto3"; package google.cloud.websecurityscanner.v1beta; -import "google/api/annotations.proto"; - option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1beta;websecurityscanner"; option java_multiple_files = true; option java_outer_classname = "CrawledUrlProto"; @@ -29,16 +27,13 @@ option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; // Security Scanner Service crawls the web applications, following all links // within the scope of sites, to find the URLs to test against. message CrawledUrl { - // Output only. // The http method of the request that was used to visit the URL, in // uppercase. string http_method = 1; - // Output only. // The URL that was crawled. string url = 2; - // Output only. // The body of the request that was used to visit the URL. string body = 3; } diff --git a/google/cloud/websecurityscanner/v1beta/finding.proto b/google/cloud/websecurityscanner/v1beta/finding.proto index 5e25abb5d..5f86c9c71 100644 --- a/google/cloud/websecurityscanner/v1beta/finding.proto +++ b/google/cloud/websecurityscanner/v1beta/finding.proto @@ -17,7 +17,7 @@ syntax = "proto3"; package google.cloud.websecurityscanner.v1beta; -import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/websecurityscanner/v1beta/finding_addon.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1beta;websecurityscanner"; @@ -29,79 +29,68 @@ option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; // A Finding resource represents a vulnerability instance identified during a // ScanRun. message Finding { - // Output only. + option (google.api.resource) = { + type: "websecurityscanner.googleapis.com/Finding" + pattern: "projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}" + }; + // The resource name of the Finding. The name follows the format of // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. // The finding IDs are generated by the system. string name = 1; - // Output only. // The type of the Finding. // Detailed and up-to-date information on findings can be found here: // https://cloud.google.com/security-scanner/docs/scan-result-details string finding_type = 2; - // Output only. // The http method of the request that triggered the vulnerability, in // uppercase. string http_method = 3; - // Output only. // The URL produced by the server-side fuzzer and used in the request that // triggered the vulnerability. string fuzzed_url = 4; - // Output only. // The body of the request that triggered the vulnerability. string body = 5; - // Output only. // The description of the vulnerability. string description = 6; - // Output only. // The URL containing human-readable payload that user can leverage to // reproduce the vulnerability. string reproduction_url = 7; - // Output only. // If the vulnerability was originated from nested IFrame, the immediate // parent IFrame is reported. string frame_url = 8; - // Output only. // The URL where the browser lands when the vulnerability is detected. string final_url = 9; - // Output only. // The tracking ID uniquely identifies a vulnerability instance across // multiple ScanRuns. string tracking_id = 10; - // Output only. // An addon containing information reported for a vulnerability with an HTML // form, if any. Form form = 16; - // Output only. // An addon containing information about outdated libraries. OutdatedLibrary outdated_library = 11; - // Output only. // An addon containing detailed information regarding any resource causing the // vulnerability such as JavaScript sources, image, audio files, etc. ViolatingResource violating_resource = 12; - // Output only. // An addon containing information about vulnerable or missing HTTP headers. VulnerableHeaders vulnerable_headers = 15; - // Output only. // An addon containing information about request parameters which were found // to be vulnerable. VulnerableParameters vulnerable_parameters = 13; - // Output only. // An addon containing information reported for an XSS, if any. Xss xss = 14; } diff --git a/google/cloud/websecurityscanner/v1beta/finding_addon.proto b/google/cloud/websecurityscanner/v1beta/finding_addon.proto index d2759b831..ea5989a13 100644 --- a/google/cloud/websecurityscanner/v1beta/finding_addon.proto +++ b/google/cloud/websecurityscanner/v1beta/finding_addon.proto @@ -17,8 +17,6 @@ syntax = "proto3"; package google.cloud.websecurityscanner.v1beta; -import "google/api/annotations.proto"; - option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1beta;websecurityscanner"; option java_multiple_files = true; option java_outer_classname = "FindingAddonProto"; diff --git a/google/cloud/websecurityscanner/v1beta/finding_type_stats.proto b/google/cloud/websecurityscanner/v1beta/finding_type_stats.proto index cbace23d3..97f4882d1 100644 --- a/google/cloud/websecurityscanner/v1beta/finding_type_stats.proto +++ b/google/cloud/websecurityscanner/v1beta/finding_type_stats.proto @@ -17,8 +17,6 @@ syntax = "proto3"; package google.cloud.websecurityscanner.v1beta; -import "google/api/annotations.proto"; - option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1beta;websecurityscanner"; option java_multiple_files = true; option java_outer_classname = "FindingTypeStatsProto"; @@ -28,11 +26,9 @@ option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; // A FindingTypeStats resource represents stats regarding a specific FindingType // of Findings under a given ScanRun. message FindingTypeStats { - // Output only. // The finding type associated with the stats. string finding_type = 1; - // Output only. // The count of findings belonging to this finding type. int32 finding_count = 2; } diff --git a/google/cloud/websecurityscanner/v1beta/scan_config.proto b/google/cloud/websecurityscanner/v1beta/scan_config.proto index d698bb4f8..c2b7dcb31 100644 --- a/google/cloud/websecurityscanner/v1beta/scan_config.proto +++ b/google/cloud/websecurityscanner/v1beta/scan_config.proto @@ -17,7 +17,8 @@ syntax = "proto3"; package google.cloud.websecurityscanner.v1beta; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/websecurityscanner/v1beta/scan_run.proto"; import "google/protobuf/timestamp.proto"; @@ -29,36 +30,40 @@ option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; // A ScanConfig resource contains the configurations to launch a scan. message ScanConfig { + option (google.api.resource) = { + type: "websecurityscanner.googleapis.com/ScanConfig" + pattern: "projects/{project}/scanConfigs/{scan_config}" + }; + // Scan authentication configuration. message Authentication { // Describes authentication configuration that uses a Google account. message GoogleAccount { - // Required. - // The user name of the Google account. - string username = 1; + // Required. The user name of the Google account. + string username = 1 [(google.api.field_behavior) = REQUIRED]; - // Input only. - // Required. - // The password of the Google account. The credential is stored encrypted + // Required. Input only. The password of the Google account. The credential is stored encrypted // and not returned in any response nor included in audit logs. - string password = 2; + string password = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = INPUT_ONLY + ]; } // Describes authentication configuration that uses a custom account. message CustomAccount { - // Required. - // The user name of the custom account. - string username = 1; + // Required. The user name of the custom account. + string username = 1 [(google.api.field_behavior) = REQUIRED]; - // Input only. - // Required. - // The password of the custom account. The credential is stored encrypted + // Required. Input only. The password of the custom account. The credential is stored encrypted // and not returned in any response nor included in audit logs. - string password = 2; + string password = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = INPUT_ONLY + ]; - // Required. - // The login form URL of the website. - string login_url = 3; + // Required. The login form URL of the website. + string login_url = 3 [(google.api.field_behavior) = REQUIRED]; } // Required. @@ -80,9 +85,8 @@ message ScanConfig { // immediately. google.protobuf.Timestamp schedule_time = 1; - // Required. - // The duration of time between executions in days. - int32 interval_duration_days = 2; + // Required. The duration of time between executions in days. + int32 interval_duration_days = 2 [(google.api.field_behavior) = REQUIRED]; } // Type of user agents used for scanning. @@ -145,9 +149,8 @@ message ScanConfig { // generated by the system. string name = 1; - // Required. - // The user provided display name of the ScanConfig. - string display_name = 2; + // Required. The user provided display name of the ScanConfig. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; // The maximum QPS during scanning. A valid value ranges from 5 to 20 // inclusively. If the field is unspecified or its value is set 0, server will @@ -155,9 +158,8 @@ message ScanConfig { // INVALID_ARGUMENT error. int32 max_qps = 3; - // Required. - // The starting URLs from which the scanner finds site pages. - repeated string starting_urls = 4; + // Required. The starting URLs from which the scanner finds site pages. + repeated string starting_urls = 4 [(google.api.field_behavior) = REQUIRED]; // The authentication configuration. If specified, service will use the // authentication configuration during scanning. diff --git a/google/cloud/websecurityscanner/v1beta/scan_config_error.proto b/google/cloud/websecurityscanner/v1beta/scan_config_error.proto index c55c744c6..a50bdcaf3 100644 --- a/google/cloud/websecurityscanner/v1beta/scan_config_error.proto +++ b/google/cloud/websecurityscanner/v1beta/scan_config_error.proto @@ -30,7 +30,7 @@ option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; message ScanConfigError { // Output only. // Defines an error reason code. - // Next id: 43 + // Next id: 44 enum Code { option allow_alias = true; @@ -106,6 +106,9 @@ message ScanConfigError { // Google Compute Engine Scanning Alpha access. FORBIDDEN_TO_SCAN_COMPUTE = 21; + // User tries to update managed scan + FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43; + // The supplied filter is malformed. For example, it can not be parsed, does // not have a filter type in expression, or the same filter type appears // more than once. @@ -174,11 +177,9 @@ message ScanConfigError { UNSUPPORTED_URL_SCHEME = 42; } - // Output only. // Indicates the reason code for a configuration failure. Code code = 1; - // Output only. // Indicates the full name of the ScanConfig field that triggers this error, // for example "scan_config.max_qps". This field is provided for // troubleshooting purposes only and its actual value can change in the diff --git a/google/cloud/websecurityscanner/v1beta/scan_run.proto b/google/cloud/websecurityscanner/v1beta/scan_run.proto index 497edc39b..84564c6e2 100644 --- a/google/cloud/websecurityscanner/v1beta/scan_run.proto +++ b/google/cloud/websecurityscanner/v1beta/scan_run.proto @@ -17,7 +17,7 @@ syntax = "proto3"; package google.cloud.websecurityscanner.v1beta; -import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto"; import "google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto"; import "google/protobuf/timestamp.proto"; @@ -31,6 +31,11 @@ option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; // A ScanRun is a output-only resource representing an actual run of the scan. // Next id: 12 message ScanRun { + option (google.api.resource) = { + type: "websecurityscanner.googleapis.com/ScanRun" + pattern: "projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}" + }; + // Types of ScanRun execution state. enum ExecutionState { // Represents an invalid state caused by internal server error. This value @@ -63,59 +68,48 @@ message ScanRun { KILLED = 3; } - // Output only. // The resource name of the ScanRun. The name follows the format of // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. // The ScanRun IDs are generated by the system. string name = 1; - // Output only. // The execution state of the ScanRun. ExecutionState execution_state = 2; - // Output only. // The result state of the ScanRun. This field is only available after the // execution state reaches "FINISHED". ResultState result_state = 3; - // Output only. // The time at which the ScanRun started. google.protobuf.Timestamp start_time = 4; - // Output only. // The time at which the ScanRun reached termination state - that the ScanRun // is either finished or stopped by user. google.protobuf.Timestamp end_time = 5; - // Output only. // The number of URLs crawled during this ScanRun. If the scan is in progress, // the value represents the number of URLs crawled up to now. int64 urls_crawled_count = 6; - // Output only. // The number of URLs tested during this ScanRun. If the scan is in progress, // the value represents the number of URLs tested up to now. The number of // URLs tested is usually larger than the number URLS crawled because // typically a crawled URL is tested with multiple test payloads. int64 urls_tested_count = 7; - // Output only. // Whether the scan run has found any vulnerabilities. bool has_vulnerabilities = 8; - // Output only. // The percentage of total completion ranging from 0 to 100. // If the scan is in queue, the value is 0. // If the scan is running, the value ranges from 0 to 100. // If the scan is finished, the value is 100. int32 progress_percent = 9; - // Output only. // If result_state is an ERROR, this field provides the primary reason for // scan's termination and more details, if such are available. ScanRunErrorTrace error_trace = 10; - // Output only. // A list of warnings, if such are encountered during this scan run. repeated ScanRunWarningTrace warning_traces = 11; } diff --git a/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto b/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto index 3d1a391dc..248967d24 100644 --- a/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto +++ b/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto @@ -55,21 +55,18 @@ message ScanRunErrorTrace { // Indicates that a scan encountered numerous errors from the web site // pages. When available, most_common_http_error_code field indicates the - // the most common HTTP error code encountered during the scan. + // most common HTTP error code encountered during the scan. TOO_MANY_HTTP_ERRORS = 6; } - // Output only. // Indicates the error reason code. Code code = 1; - // Output only. // If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error // message encountered during scan configuration validation that is performed // before each scan run. ScanConfigError scan_config_error = 2; - // Output only. // If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most // common HTTP error code, if such is available. For example, if this code is // 404, the scan has encountered too many NOT_FOUND responses. diff --git a/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto b/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto index e461ad0b5..8207a0290 100644 --- a/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto +++ b/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto @@ -29,7 +29,7 @@ option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; message ScanRunWarningTrace { // Output only. // Defines a warning message code. - // Next id: 5 + // Next id: 6 enum Code { // Default value is never used. CODE_UNSPECIFIED = 0; @@ -52,7 +52,6 @@ message ScanRunWarningTrace { BLOCKED_BY_IAP = 4; } - // Output only. // Indicates the warning code. Code code = 1; } diff --git a/google/cloud/websecurityscanner/v1beta/web_security_scanner.proto b/google/cloud/websecurityscanner/v1beta/web_security_scanner.proto index d328a2860..9ea6207c2 100644 --- a/google/cloud/websecurityscanner/v1beta/web_security_scanner.proto +++ b/google/cloud/websecurityscanner/v1beta/web_security_scanner.proto @@ -18,6 +18,9 @@ syntax = "proto3"; package google.cloud.websecurityscanner.v1beta; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/websecurityscanner/v1beta/crawled_url.proto"; import "google/cloud/websecurityscanner/v1beta/finding.proto"; import "google/cloud/websecurityscanner/v1beta/finding_type_stats.proto"; @@ -36,12 +39,16 @@ option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; // applications hosted on Google Cloud Platform. It crawls your application, and // attempts to exercise as many user inputs and event handlers as possible. service WebSecurityScanner { + option (google.api.default_host) = "websecurityscanner.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Creates a new ScanConfig. rpc CreateScanConfig(CreateScanConfigRequest) returns (ScanConfig) { option (google.api.http) = { post: "/v1beta/{parent=projects/*}/scanConfigs" body: "scan_config" }; + option (google.api.method_signature) = "parent,scan_config"; } // Deletes an existing ScanConfig and its child resources. @@ -49,6 +56,7 @@ service WebSecurityScanner { option (google.api.http) = { delete: "/v1beta/{name=projects/*/scanConfigs/*}" }; + option (google.api.method_signature) = "name"; } // Gets a ScanConfig. @@ -56,6 +64,7 @@ service WebSecurityScanner { option (google.api.http) = { get: "/v1beta/{name=projects/*/scanConfigs/*}" }; + option (google.api.method_signature) = "name"; } // Lists ScanConfigs under a given project. @@ -63,6 +72,7 @@ service WebSecurityScanner { option (google.api.http) = { get: "/v1beta/{parent=projects/*}/scanConfigs" }; + option (google.api.method_signature) = "parent"; } // Updates a ScanConfig. This method support partial update of a ScanConfig. @@ -71,6 +81,7 @@ service WebSecurityScanner { patch: "/v1beta/{scan_config.name=projects/*/scanConfigs/*}" body: "scan_config" }; + option (google.api.method_signature) = "scan_config,update_mask"; } // Start a ScanRun according to the given ScanConfig. @@ -79,6 +90,7 @@ service WebSecurityScanner { post: "/v1beta/{name=projects/*/scanConfigs/*}:start" body: "*" }; + option (google.api.method_signature) = "name"; } // Gets a ScanRun. @@ -86,6 +98,7 @@ service WebSecurityScanner { option (google.api.http) = { get: "/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}" }; + option (google.api.method_signature) = "name"; } // Lists ScanRuns under a given ScanConfig, in descending order of ScanRun @@ -94,6 +107,7 @@ service WebSecurityScanner { option (google.api.http) = { get: "/v1beta/{parent=projects/*/scanConfigs/*}/scanRuns" }; + option (google.api.method_signature) = "parent"; } // Stops a ScanRun. The stopped ScanRun is returned. @@ -102,6 +116,7 @@ service WebSecurityScanner { post: "/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}:stop" body: "*" }; + option (google.api.method_signature) = "name"; } // List CrawledUrls under a given ScanRun. @@ -109,6 +124,7 @@ service WebSecurityScanner { option (google.api.http) = { get: "/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/crawledUrls" }; + option (google.api.method_signature) = "parent"; } // Gets a Finding. @@ -116,6 +132,7 @@ service WebSecurityScanner { option (google.api.http) = { get: "/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*/findings/*}" }; + option (google.api.method_signature) = "name"; } // List Findings under a given ScanRun. @@ -123,6 +140,7 @@ service WebSecurityScanner { option (google.api.http) = { get: "/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findings" }; + option (google.api.method_signature) = "parent,filter"; } // List all FindingTypeStats under a given ScanRun. @@ -130,43 +148,59 @@ service WebSecurityScanner { option (google.api.http) = { get: "/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findingTypeStats" }; + option (google.api.method_signature) = "parent"; } } // Request for the `CreateScanConfig` method. message CreateScanConfigRequest { - // Required. - // The parent resource name where the scan is created, which should be a + // Required. The parent resource name where the scan is created, which should be a // project resource name in the format 'projects/{projectId}'. - string parent = 1; - - // Required. - // The ScanConfig to be created. - ScanConfig scan_config = 2; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The ScanConfig to be created. + ScanConfig scan_config = 2 [(google.api.field_behavior) = REQUIRED]; } // Request for the `DeleteScanConfig` method. message DeleteScanConfigRequest { - // Required. - // The resource name of the ScanConfig to be deleted. The name follows the + // Required. The resource name of the ScanConfig to be deleted. The name follows the // format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanConfig" + } + ]; } // Request for the `GetScanConfig` method. message GetScanConfigRequest { - // Required. - // The resource name of the ScanConfig to be returned. The name follows the + // Required. The resource name of the ScanConfig to be returned. The name follows the // format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanConfig" + } + ]; } // Request for the `ListScanConfigs` method. message ListScanConfigsRequest { - // Required. - // The parent resource name, which should be a project resource name in the + // Required. The parent resource name, which should be a project resource name in the // format 'projects/{projectId}'. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // A token identifying a page of results to be returned. This should be a // `next_page_token` value returned from a previous List request. @@ -181,17 +215,15 @@ message ListScanConfigsRequest { // Request for the `UpdateScanConfigRequest` method. message UpdateScanConfigRequest { - // Required. - // The ScanConfig to be updated. The name field must be set to identify the + // Required. The ScanConfig to be updated. The name field must be set to identify the // resource to be updated. The values of fields not covered by the mask // will be ignored. - ScanConfig scan_config = 2; + ScanConfig scan_config = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. - // The update mask applies to the resource. For the `FieldMask` definition, + // Required. The update mask applies to the resource. For the `FieldMask` definition, // see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 3; + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; } // Response for the `ListScanConfigs` method. @@ -206,27 +238,39 @@ message ListScanConfigsResponse { // Request for the `StartScanRun` method. message StartScanRunRequest { - // Required. - // The resource name of the ScanConfig to be used. The name follows the + // Required. The resource name of the ScanConfig to be used. The name follows the // format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanConfig" + } + ]; } // Request for the `GetScanRun` method. message GetScanRunRequest { - // Required. - // The resource name of the ScanRun to be returned. The name follows the + // Required. The resource name of the ScanRun to be returned. The name follows the // format of // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanRun" + } + ]; } // Request for the `ListScanRuns` method. message ListScanRunsRequest { - // Required. - // The parent resource name, which should be a scan resource name in the + // Required. The parent resource name, which should be a scan resource name in the // format 'projects/{projectId}/scanConfigs/{scanConfigId}'. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanConfig" + } + ]; // A token identifying a page of results to be returned. This should be a // `next_page_token` value returned from a previous List request. @@ -251,20 +295,28 @@ message ListScanRunsResponse { // Request for the `StopScanRun` method. message StopScanRunRequest { - // Required. - // The resource name of the ScanRun to be stopped. The name follows the + // Required. The resource name of the ScanRun to be stopped. The name follows the // format of // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanRun" + } + ]; } // Request for the `ListCrawledUrls` method. message ListCrawledUrlsRequest { - // Required. - // The parent resource name, which should be a scan run resource name in the + // Required. The parent resource name, which should be a scan run resource name in the // format // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanRun" + } + ]; // A token identifying a page of results to be returned. This should be a // `next_page_token` value returned from a previous List request. @@ -289,26 +341,34 @@ message ListCrawledUrlsResponse { // Request for the `GetFinding` method. message GetFindingRequest { - // Required. - // The resource name of the Finding to be returned. The name follows the + // Required. The resource name of the Finding to be returned. The name follows the // format of // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/Finding" + } + ]; } // Request for the `ListFindings` method. message ListFindingsRequest { - // Required. - // The parent resource name, which should be a scan run resource name in the + // Required. The parent resource name, which should be a scan run resource name in the // format // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - string parent = 1; - - // The filter expression. The expression must be in the format: + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanRun" + } + ]; + + // Required. The filter expression. The expression must be in the format: // . // Supported field: 'finding_type'. // Supported operator: '='. - string filter = 2; + string filter = 2 [(google.api.field_behavior) = REQUIRED]; // A token identifying a page of results to be returned. This should be a // `next_page_token` value returned from a previous List request. @@ -333,11 +393,15 @@ message ListFindingsResponse { // Request for the `ListFindingTypeStats` method. message ListFindingTypeStatsRequest { - // Required. - // The parent resource name, which should be a scan run resource name in the + // Required. The parent resource name, which should be a scan run resource name in the // format // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "websecurityscanner.googleapis.com/ScanRun" + } + ]; } // Response for the `ListFindingTypeStats` method. diff --git a/google/cloud/websecurityscanner/v1beta/websecurityscanner_gapic.legacy.yaml b/google/cloud/websecurityscanner/v1beta/websecurityscanner_gapic.legacy.yaml new file mode 100644 index 000000000..89cfd29f0 --- /dev/null +++ b/google/cloud/websecurityscanner/v1beta/websecurityscanner_gapic.legacy.yaml @@ -0,0 +1,294 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.websecurityscanner.v1beta + python: + package_name: google.cloud.websecurityscanner_v1beta.gapic + go: + package_name: cloud.google.com/go/websecurityscanner/apiv1beta + csharp: + package_name: Google.Cloud.Websecurityscanner.V1beta + ruby: + package_name: Google::Cloud::Websecurityscanner::V1beta + php: + package_name: Google\Cloud\WebSecurityScanner\V1beta + nodejs: + package_name: websecurityscanner.v1beta +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.cloud.websecurityscanner.v1beta.WebSecurityScanner + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + - name_pattern: projects/{project}/scanConfigs/{scan_config} + entity_name: scan_config + - name_pattern: projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run} + entity_name: scan_run + - name_pattern: projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding} + entity_name: finding + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateScanConfig + flattening: + groups: + - parameters: + - parent + - scan_config + required_fields: + - parent + - scan_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: DeleteScanConfig + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: scan_config + timeout_millis: 60000 + - name: GetScanConfig + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: scan_config + timeout_millis: 60000 + - name: ListScanConfigs + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: scan_configs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: UpdateScanConfig + flattening: + groups: + - parameters: + - scan_config + - update_mask + required_fields: + - scan_config + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + scan_config.name: scan_config + timeout_millis: 60000 + - name: StartScanRun + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: scan_config + timeout_millis: 60000 + - name: GetScanRun + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: scan_run + timeout_millis: 60000 + - name: ListScanRuns + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: scan_runs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: scan_config + timeout_millis: 60000 + - name: StopScanRun + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: scan_run + timeout_millis: 60000 + - name: ListCrawledUrls + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: crawled_urls + retry_params_name: default + field_name_patterns: + parent: scan_run + timeout_millis: 60000 + - name: GetFinding + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: finding + timeout_millis: 60000 + - name: ListFindings + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + - filter + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: findings + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: scan_run + timeout_millis: 60000 + - name: ListFindingTypeStats + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: scan_run + timeout_millis: 60000 diff --git a/google/cloud/websecurityscanner/v1beta/websecurityscanner_gapic.yaml b/google/cloud/websecurityscanner/v1beta/websecurityscanner_gapic.yaml index 89cfd29f0..13033ded3 100644 --- a/google/cloud/websecurityscanner/v1beta/websecurityscanner_gapic.yaml +++ b/google/cloud/websecurityscanner/v1beta/websecurityscanner_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -16,279 +16,8 @@ language_settings: package_name: Google\Cloud\WebSecurityScanner\V1beta nodejs: package_name: websecurityscanner.v1beta -# A list of API interface configurations. interfaces: -# The fully qualified name of the API interface. - name: google.cloud.websecurityscanner.v1beta.WebSecurityScanner - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - - name_pattern: projects/{project}/scanConfigs/{scan_config} - entity_name: scan_config - - name_pattern: projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run} - entity_name: scan_run - - name_pattern: projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding} - entity_name: finding - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: CreateScanConfig - flattening: - groups: - - parameters: - - parent - - scan_config - required_fields: - - parent - - scan_config - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - name: DeleteScanConfig - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: scan_config - timeout_millis: 60000 - - name: GetScanConfig - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: scan_config - timeout_millis: 60000 - - name: ListScanConfigs - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: scan_configs - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - - name: UpdateScanConfig - flattening: - groups: - - parameters: - - scan_config - - update_mask - required_fields: - - scan_config - - update_mask - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - scan_config.name: scan_config - timeout_millis: 60000 - - name: StartScanRun - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: scan_config - timeout_millis: 60000 - - name: GetScanRun - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: scan_run - timeout_millis: 60000 - - name: ListScanRuns - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: scan_runs - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: scan_config - timeout_millis: 60000 - - name: StopScanRun - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: scan_run - timeout_millis: 60000 - - name: ListCrawledUrls - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: crawled_urls - retry_params_name: default - field_name_patterns: - parent: scan_run - timeout_millis: 60000 - - name: GetFinding - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: finding - timeout_millis: 60000 - - name: ListFindings - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - - parent - - filter - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: findings - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: scan_run - timeout_millis: 60000 - - name: ListFindingTypeStats - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: scan_run - timeout_millis: 60000 diff --git a/google/cloud/websecurityscanner/v1beta/websecurityscanner_grpc_service_config.json b/google/cloud/websecurityscanner/v1beta/websecurityscanner_grpc_service_config.json new file mode 100755 index 000000000..09e52474f --- /dev/null +++ b/google/cloud/websecurityscanner/v1beta/websecurityscanner_grpc_service_config.json @@ -0,0 +1,75 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner", + "method": "CreateScanConfig" + }, + { + "service": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner", + "method": "UpdateScanConfig" + }, + { + "service": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner", + "method": "StartScanRun" + }, + { + "service": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner", + "method": "StopScanRun" + } + ], + "timeout": "600s" + }, + { + "name": [ + { + "service": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner", + "method": "DeleteScanConfig" + }, + { + "service": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner", + "method": "GetScanConfig" + }, + { + "service": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner", + "method": "ListScanConfigs" + }, + { + "service": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner", + "method": "GetScanRun" + }, + { + "service": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner", + "method": "ListScanRuns" + }, + { + "service": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner", + "method": "GetFinding" + }, + { + "service": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner", + "method": "ListFindings" + }, + { + "service": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner", + "method": "ListFindingTypeStats" + }, + { + "service": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner", + "method": "ListCrawledUrls" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/websecurityscanner/websecurityscanner_v1beta.yaml b/google/cloud/websecurityscanner/v1beta/websecurityscanner_v1beta.yaml similarity index 100% rename from google/cloud/websecurityscanner/websecurityscanner_v1beta.yaml rename to google/cloud/websecurityscanner/v1beta/websecurityscanner_v1beta.yaml diff --git a/google/container/artman_container_v1.yaml b/google/container/artman_container_v1.yaml index fc01e9631..30121e141 100644 --- a/google/container/artman_container_v1.yaml +++ b/google/container/artman_container_v1.yaml @@ -3,11 +3,12 @@ common: api_version: v1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1 - service_yaml: container_v1.yaml + service_yaml: v1/container_v1.yaml gapic_yaml: v1/container_gapic.yaml + proto_package: google.container.v1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/container/artman_container_v1beta1.yaml b/google/container/artman_container_v1beta1.yaml index 9a81ab4b2..befe0780a 100644 --- a/google/container/artman_container_v1beta1.yaml +++ b/google/container/artman_container_v1beta1.yaml @@ -3,11 +3,12 @@ common: api_version: v1beta1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1beta1 - service_yaml: container_v1beta1.yaml + service_yaml: v1beta1/container_v1beta1.yaml gapic_yaml: v1beta1/container_gapic.yaml + proto_package: google.container.v1beta1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/container/container_v1.yaml b/google/container/container_v1.yaml deleted file mode 100644 index 65e5001bd..000000000 --- a/google/container/container_v1.yaml +++ /dev/null @@ -1,82 +0,0 @@ -type: google.api.Service -config_version: 3 -name: container.googleapis.com -title: Kubernetes Engine API - -apis: -- name: google.container.v1.ClusterManager - -documentation: - summary: |- - The Google Kubernetes Engine API is used for building and managing container - based applications, powered by the open source Kubernetes technology. - -backend: - rules: - - selector: google.container.v1.ClusterManager.ListClusters - deadline: 20.0 - - selector: google.container.v1.ClusterManager.GetCluster - deadline: 20.0 - - selector: google.container.v1.ClusterManager.CreateCluster - deadline: 45.0 - - selector: google.container.v1.ClusterManager.UpdateCluster - deadline: 20.0 - - selector: google.container.v1.ClusterManager.UpdateNodePool - deadline: 20.0 - - selector: google.container.v1.ClusterManager.SetNodePoolAutoscaling - deadline: 20.0 - - selector: google.container.v1.ClusterManager.SetLoggingService - deadline: 20.0 - - selector: google.container.v1.ClusterManager.SetMonitoringService - deadline: 20.0 - - selector: google.container.v1.ClusterManager.SetAddonsConfig - deadline: 20.0 - - selector: google.container.v1.ClusterManager.SetLocations - deadline: 20.0 - - selector: google.container.v1.ClusterManager.UpdateMaster - deadline: 20.0 - - selector: google.container.v1.ClusterManager.SetMasterAuth - deadline: 20.0 - - selector: google.container.v1.ClusterManager.DeleteCluster - deadline: 20.0 - - selector: google.container.v1.ClusterManager.ListOperations - deadline: 20.0 - - selector: google.container.v1.ClusterManager.GetOperation - deadline: 20.0 - - selector: google.container.v1.ClusterManager.CancelOperation - deadline: 20.0 - - selector: google.container.v1.ClusterManager.GetServerConfig - deadline: 20.0 - - selector: google.container.v1.ClusterManager.ListNodePools - deadline: 20.0 - - selector: google.container.v1.ClusterManager.GetNodePool - deadline: 20.0 - - selector: google.container.v1.ClusterManager.CreateNodePool - deadline: 20.0 - - selector: google.container.v1.ClusterManager.DeleteNodePool - deadline: 20.0 - - selector: google.container.v1.ClusterManager.RollbackNodePoolUpgrade - deadline: 20.0 - - selector: google.container.v1.ClusterManager.SetNodePoolManagement - deadline: 20.0 - - selector: google.container.v1.ClusterManager.SetLabels - deadline: 20.0 - - selector: google.container.v1.ClusterManager.SetLegacyAbac - deadline: 20.0 - - selector: google.container.v1.ClusterManager.StartIPRotation - deadline: 20.0 - - selector: google.container.v1.ClusterManager.CompleteIPRotation - deadline: 20.0 - - selector: google.container.v1.ClusterManager.SetNodePoolSize - deadline: 20.0 - - selector: google.container.v1.ClusterManager.SetNetworkPolicy - deadline: 20.0 - - selector: google.container.v1.ClusterManager.SetMaintenancePolicy - deadline: 20.0 - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform diff --git a/google/container/container_v1beta1.yaml b/google/container/container_v1beta1.yaml deleted file mode 100644 index 223e518be..000000000 --- a/google/container/container_v1beta1.yaml +++ /dev/null @@ -1,86 +0,0 @@ -type: google.api.Service -config_version: 3 -name: container.googleapis.com -title: Kubernetes Engine API - -apis: -- name: google.container.v1beta1.ClusterManager - -documentation: - summary: |- - Builds and manages container-based applications, powered by the open source - Kubernetes technology. - -backend: - rules: - - selector: google.container.v1beta1.ClusterManager.ListClusters - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.GetCluster - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.CreateCluster - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.UpdateCluster - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.UpdateNodePool - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.SetNodePoolAutoscaling - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.SetLoggingService - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.SetMonitoringService - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.SetAddonsConfig - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.SetLocations - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.UpdateMaster - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.SetMasterAuth - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.DeleteCluster - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.ListOperations - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.GetOperation - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.CancelOperation - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.GetServerConfig - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.ListNodePools - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.GetNodePool - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.CreateNodePool - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.DeleteNodePool - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.RollbackNodePoolUpgrade - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.SetNodePoolManagement - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.SetLabels - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.SetLegacyAbac - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.StartIPRotation - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.CompleteIPRotation - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.SetNodePoolSize - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.SetNetworkPolicy - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.SetMaintenancePolicy - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.ListUsableSubnetworks - deadline: 20.0 - - selector: google.container.v1beta1.ClusterManager.ListLocations - deadline: 20.0 - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform diff --git a/google/container/v1/BUILD.bazel b/google/container/v1/BUILD.bazel index 810fe713b..9d0e279d9 100644 --- a/google/container/v1/BUILD.bazel +++ b/google/container/v1/BUILD.bazel @@ -1,23 +1,34 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( name = "container_proto", - srcs = ["cluster_service.proto"], + srcs = [ + "cluster_service.proto", + ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", ], ) proto_library_with_info( name = "container_proto_with_info", - deps = [":container_proto"], + deps = [ + ":container_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -25,17 +36,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "container_java_proto", deps = [":container_proto"], @@ -44,39 +51,40 @@ java_proto_library( java_grpc_library( name = "container_java_grpc", srcs = [":container_proto"], - deps = [":container_java_proto"] + _JAVA_GRPC_DEPS, + deps = [":container_java_proto"], ) java_gapic_library( name = "container_java_gapic", src = ":container_proto_with_info", gapic_yaml = "container_gapic.yaml", - service_yaml = "//google/container:container_v1.yaml", - test_deps = [":container_java_grpc"], - deps = [":container_java_proto"] + _JAVA_GRPC_DEPS, + package = "google.container.v1", + service_yaml = "container_v1.yaml", + test_deps = [ + ":container_java_grpc", + ], + deps = [ + ":container_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, +java_gapic_test( + name = "container_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.container.v1.ClusterManagerClientTest", + ], runtime_deps = [":container_java_gapic_test"], -) for test_name in [ - "com.google.cloud.container.v1.ClusterManagerClientTest", -]] +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-container-v1-java", - client_deps = [":container_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":container_java_gapic_test"], - grpc_deps = [":container_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":container_java_gapic", + ":container_java_grpc", ":container_java_proto", ":container_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -84,10 +92,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -95,16 +103,20 @@ go_proto_library( compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/container/v1", protos = [":container_proto"], - deps = ["//google/api:annotations_go_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], ) go_gapic_library( name = "container_go_gapic", - src = ":container_proto_with_info", - gapic_yaml = "container_gapic.yaml", - importpath = "cloud.google.com/go/container/apiv1", - service_yaml = "//google/container:container_v1.yaml", - deps = [":container_go_proto"], + srcs = [":container_proto_with_info"], + grpc_service_config = "container_grpc_service_config.json", + importpath = "cloud.google.com/go/container/apiv1;container", + service_yaml = "container_v1.yaml", + deps = [ + ":container_go_proto", + ], ) go_test( @@ -114,13 +126,233 @@ go_test( importpath = "cloud.google.com/go/container/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-container-v1-go", deps = [ ":container_go_gapic", - ":container_go_gapic_srcjar-smoke-test.srcjar", ":container_go_gapic_srcjar-test.srcjar", ":container_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "container_moved_proto", + srcs = [":container_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "container_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":container_moved_proto"], +) + +py_grpc_library( + name = "container_py_grpc", + srcs = [":container_moved_proto"], + deps = [":container_py_proto"], +) + +py_gapic_library( + name = "container_py_gapic", + src = ":container_proto_with_info", + gapic_yaml = "container_gapic.yaml", + package = "google.container.v1", + service_yaml = "container_v1.yaml", + deps = [ + ":container_py_grpc", + ":container_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "container-v1-py", + deps = [ + ":container_py_gapic", + ":container_py_grpc", + ":container_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "container_php_proto", + deps = [":container_proto"], +) + +php_grpc_library( + name = "container_php_grpc", + srcs = [":container_proto"], + deps = [":container_php_proto"], +) + +php_gapic_library( + name = "container_php_gapic", + src = ":container_proto_with_info", + gapic_yaml = "container_gapic.yaml", + package = "google.container.v1", + service_yaml = "container_v1.yaml", + deps = [ + ":container_php_grpc", + ":container_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-container-v1-php", + deps = [ + ":container_php_gapic", + ":container_php_grpc", + ":container_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "container_nodejs_gapic", + src = ":container_proto_with_info", + gapic_yaml = "container_gapic.yaml", + package = "google.container.v1", + service_yaml = "container_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "container-v1-nodejs", + deps = [ + ":container_nodejs_gapic", + ":container_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "container_ruby_proto", + deps = [":container_proto"], +) + +ruby_grpc_library( + name = "container_ruby_grpc", + srcs = [":container_proto"], + deps = [":container_ruby_proto"], +) + +ruby_gapic_library( + name = "container_ruby_gapic", + src = ":container_proto_with_info", + gapic_yaml = "container_gapic.yaml", + package = "google.container.v1", + service_yaml = "container_v1.yaml", + deps = [ + ":container_ruby_grpc", + ":container_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-container-v1-ruby", + deps = [ + ":container_ruby_gapic", + ":container_ruby_grpc", + ":container_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "container_csharp_proto", + deps = [":container_proto"], +) + +csharp_grpc_library( + name = "container_csharp_grpc", + srcs = [":container_proto"], + deps = [":container_csharp_proto"], +) + +csharp_gapic_library( + name = "container_csharp_gapic", + src = ":container_proto_with_info", + gapic_yaml = "container_gapic.yaml", + package = "google.container.v1", + service_yaml = "container_v1.yaml", + deps = [ + ":container_csharp_grpc", + ":container_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-container-v1-csharp", + deps = [ + ":container_csharp_gapic", + ":container_csharp_grpc", + ":container_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/container/v1/cluster_service.proto b/google/container/v1/cluster_service.proto index db7744d04..3a798ca12 100644 --- a/google/container/v1/cluster_service.proto +++ b/google/container/v1/cluster_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,18 +18,24 @@ syntax = "proto3"; package google.container.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +option csharp_namespace = "Google.Cloud.Container.V1"; option go_package = "google.golang.org/genproto/googleapis/container/v1;container"; option java_multiple_files = true; option java_outer_classname = "ClusterServiceProto"; option java_package = "com.google.container.v1"; -option csharp_namespace = "Google.Cloud.Container.V1"; option php_namespace = "Google\\Cloud\\Container\\V1"; - +option ruby_package = "Google::Cloud::Container::V1"; // Google Kubernetes Engine Cluster Manager v1 service ClusterManager { + option (google.api.default_host) = "container.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Lists all clusters owned by a project in either the specified zone or all // zones. rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { @@ -39,6 +45,8 @@ service ClusterManager { get: "/v1/projects/{project_id}/zones/{zone}/clusters" } }; + option (google.api.method_signature) = "project_id,zone"; + option (google.api.method_signature) = "parent"; } // Gets the details of a specific cluster. @@ -49,21 +57,23 @@ service ClusterManager { get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + option (google.api.method_signature) = "name"; } // Creates a cluster, consisting of the specified number and type of Google // Compute Engine instances. // // By default, the cluster is created in the project's - // [default network](/compute/docs/networks-and-firewalls#networks). + // [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). // // One firewall is added for the cluster. After cluster creation, - // the cluster creates routes for each node to allow the containers + // the Kubelet creates routes for each node to allow the containers // on that node to communicate with all other instances in the // cluster. // // Finally, an entry is added to the project's global metadata indicating - // which CIDR range is being used by the cluster. + // which CIDR range the cluster is using. rpc CreateCluster(CreateClusterRequest) returns (Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/clusters" @@ -73,6 +83,8 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster"; + option (google.api.method_signature) = "parent,cluster"; } // Updates the settings of a specific cluster. @@ -85,9 +97,11 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,update"; + option (google.api.method_signature) = "name,update"; } - // Updates the version and/or image type for a specific node pool. + // Updates the version and/or image type for the specified node pool. rpc UpdateNodePool(UpdateNodePoolRequest) returns (Operation) { option (google.api.http) = { put: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}" @@ -99,7 +113,7 @@ service ClusterManager { }; } - // Sets the autoscaling settings for a specific node pool. + // Sets the autoscaling settings for the specified node pool. rpc SetNodePoolAutoscaling(SetNodePoolAutoscalingRequest) returns (Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling" @@ -121,6 +135,8 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,logging_service"; + option (google.api.method_signature) = "name,logging_service"; } // Sets the monitoring service for a specific cluster. @@ -133,6 +149,8 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,monitoring_service"; + option (google.api.method_signature) = "name,monitoring_service"; } // Sets the addons for a specific cluster. @@ -145,6 +163,8 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,addons_config"; + option (google.api.method_signature) = "name,addons_config"; } // Sets the locations for a specific cluster. @@ -157,6 +177,8 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,locations"; + option (google.api.method_signature) = "name,locations"; } // Updates the master for a specific cluster. @@ -169,11 +191,13 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,master_version"; + option (google.api.method_signature) = "name,master_version"; } - // Used to set master auth materials. Currently supports :- - // Changing the admin password for a specific cluster. - // This can be either via password generation or explicitly set the password. + // Sets master auth materials. Currently supports changing the admin password + // or a specific cluster, either via password generation or explicitly setting + // the password. rpc SetMasterAuth(SetMasterAuthRequest) returns (Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/clusters/*}:setMasterAuth" @@ -191,9 +215,9 @@ service ClusterManager { // Firewalls and routes that were configured during cluster creation // are also deleted. // - // Other Google Compute Engine resources that might be in use by the cluster - // (e.g. load balancer resources) will not be deleted if they weren't present - // at the initial create time. + // Other Google Compute Engine resources that might be in use by the cluster, + // such as load balancer resources, are not deleted if they weren't present + // when the cluster was initially created. rpc DeleteCluster(DeleteClusterRequest) returns (Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/clusters/*}" @@ -201,6 +225,8 @@ service ClusterManager { delete: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + option (google.api.method_signature) = "name"; } // Lists all operations in a project in a specific zone or all zones. @@ -211,6 +237,7 @@ service ClusterManager { get: "/v1/projects/{project_id}/zones/{zone}/operations" } }; + option (google.api.method_signature) = "project_id,zone"; } // Gets the specified operation. @@ -221,6 +248,7 @@ service ClusterManager { get: "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}" } }; + option (google.api.method_signature) = "project_id,zone,operation_id"; } // Cancels the specified operation. @@ -233,9 +261,11 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,operation_id"; + option (google.api.method_signature) = "name"; } - // Returns configuration info about the Kubernetes Engine service. + // Returns configuration info about the Google Kubernetes Engine service. rpc GetServerConfig(GetServerConfigRequest) returns (ServerConfig) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*}/serverConfig" @@ -243,6 +273,8 @@ service ClusterManager { get: "/v1/projects/{project_id}/zones/{zone}/serverconfig" } }; + option (google.api.method_signature) = "project_id,zone"; + option (google.api.method_signature) = "name"; } // Lists the node pools for a cluster. @@ -253,9 +285,11 @@ service ClusterManager { get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + option (google.api.method_signature) = "parent"; } - // Retrieves the node pool requested. + // Retrieves the requested node pool. rpc GetNodePool(GetNodePoolRequest) returns (NodePool) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}" @@ -263,6 +297,8 @@ service ClusterManager { get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,node_pool_id"; + option (google.api.method_signature) = "name"; } // Creates a node pool for a cluster. @@ -275,6 +311,8 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,node_pool"; + option (google.api.method_signature) = "parent,node_pool"; } // Deletes a node pool from a cluster. @@ -285,10 +323,12 @@ service ClusterManager { delete: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,node_pool_id"; + option (google.api.method_signature) = "name"; } - // Roll back the previously Aborted or Failed NodePool upgrade. - // This will be an no-op if the last upgrade successfully completed. + // Rolls back a previously Aborted or Failed NodePool upgrade. + // This makes no changes if the last upgrade successfully completed. rpc RollbackNodePoolUpgrade(RollbackNodePoolUpgradeRequest) returns (Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback" @@ -298,6 +338,8 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,node_pool_id"; + option (google.api.method_signature) = "name"; } // Sets the NodeManagement options for a node pool. @@ -334,9 +376,11 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,enabled"; + option (google.api.method_signature) = "name,enabled"; } - // Start master IP rotation. + // Starts master IP rotation. rpc StartIPRotation(StartIPRotationRequest) returns (Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/clusters/*}:startIpRotation" @@ -346,6 +390,8 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + option (google.api.method_signature) = "name"; } // Completes master IP rotation. @@ -358,6 +404,8 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + option (google.api.method_signature) = "name"; } // Sets the size for a specific node pool. @@ -372,7 +420,7 @@ service ClusterManager { }; } - // Enables/Disables Network Policy for a cluster. + // Enables or disables Network Policy for a cluster. rpc SetNetworkPolicy(SetNetworkPolicyRequest) returns (Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy" @@ -382,6 +430,8 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,network_policy"; + option (google.api.method_signature) = "name,network_policy"; } // Sets the maintenance policy for a cluster. @@ -394,13 +444,22 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,maintenance_policy"; + option (google.api.method_signature) = "name,maintenance_policy"; + } + + // Lists subnetworks that are usable for creating clusters in a project. + rpc ListUsableSubnetworks(ListUsableSubnetworksRequest) returns (ListUsableSubnetworksResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/aggregated/usableSubnetworks" + }; } } // Parameters that describe the nodes in a cluster. message NodeConfig { // The name of a Google Compute Engine [machine - // type](/compute/docs/machine-types) (e.g. + // type](https://cloud.google.com/compute/docs/machine-types) (e.g. // `n1-standard-1`). // // If unspecified, the default machine type is @@ -423,7 +482,7 @@ message NodeConfig { // persistent storage on your nodes. // * `https://www.googleapis.com/auth/devstorage.read_only` is required for // communicating with **gcr.io** - // (the [Google Container Registry](/container-registry/)). + // (the [Google Container Registry](https://cloud.google.com/container-registry/)). // // If unspecified, no scopes are added, unless Cloud Logging or Cloud // Monitoring are enabled, in which case their required scopes will be added. @@ -443,6 +502,7 @@ message NodeConfig { // "cluster-name" // "cluster-uid" // "configure-sh" + // "containerd-configure-sh" // "enable-os-login" // "gci-update-strategy" // "gci-ensure-gke-docker" @@ -450,6 +510,13 @@ message NodeConfig { // "kube-env" // "startup-script" // "user-data" + // "disable-address-manager" + // "windows-startup-script-ps1" + // "common-psm1" + // "k8s-node-setup-psm1" + // "install-ssh-psm1" + // "user-profile-psm1" + // "serial-port-logging-enable" // // Values are free-form strings, and only have meaning as interpreted by // the image running in the instance. The only restriction placed on them is @@ -474,9 +541,9 @@ message NodeConfig { // The number of local SSD disks to be attached to the node. // - // The limit for this value is dependant upon the maximum number of + // The limit for this value is dependent upon the maximum number of // disks available on a machine per zone. See: - // https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits + // https://cloud.google.com/compute/docs/disks/local-ssd // for more information. int32 local_ssd_count = 7; @@ -509,6 +576,64 @@ message NodeConfig { // information, read [how to specify min CPU // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) string min_cpu_platform = 13; + + // List of kubernetes taints to be applied to each node. + // + // For more information, including usage and the valid values, see: + // https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + repeated NodeTaint taints = 15; + + // Shielded Instance options. + ShieldedInstanceConfig shielded_instance_config = 20; +} + +// A set of Shielded Instance options. +message ShieldedInstanceConfig { + // Defines whether the instance has Secure Boot enabled. + // + // Secure Boot helps ensure that the system only runs authentic software by + // verifying the digital signature of all boot components, and halting the + // boot process if signature verification fails. + bool enable_secure_boot = 1; + + // Defines whether the instance has integrity monitoring enabled. + // + // Enables monitoring and attestation of the boot integrity of the instance. + // The attestation is performed against the integrity policy baseline. This + // baseline is initially derived from the implicitly trusted boot image when + // the instance is created. + bool enable_integrity_monitoring = 2; +} + +// Kubernetes taint is comprised of three fields: key, value, and effect. Effect +// can only be one of three types: NoSchedule, PreferNoSchedule or NoExecute. +// +// For more information, including usage and the valid values, see: +// https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +message NodeTaint { + // Possible values for Effect in taint. + enum Effect { + // Not set + EFFECT_UNSPECIFIED = 0; + + // NoSchedule + NO_SCHEDULE = 1; + + // PreferNoSchedule + PREFER_NO_SCHEDULE = 2; + + // NoExecute + NO_EXECUTE = 3; + } + + // Key for taint. + string key = 1; + + // Value for taint. + string value = 2; + + // Effect for taint. + Effect effect = 3; } // The authentication information for accessing the master endpoint. @@ -516,8 +641,8 @@ message NodeConfig { // certificates. message MasterAuth { // The username to use for HTTP basic authentication to the master endpoint. - // For clusters v1.6.0 and later, you can disable basic authentication by - // providing an empty username. + // For clusters v1.6.0 and later, basic authentication can be disabled by + // leaving username unspecified (or setting it to the empty string). string username = 1; // The password to use for HTTP basic authentication to the master endpoint. @@ -563,12 +688,20 @@ message AddonsConfig { HorizontalPodAutoscaling horizontal_pod_autoscaling = 2; // Configuration for the Kubernetes Dashboard. - KubernetesDashboard kubernetes_dashboard = 3; + // This addon is deprecated, and will be disabled in 1.15. It is recommended + // to use the Cloud Console to manage and monitor your Kubernetes clusters, + // workloads and applications. For more information, see: + // https://cloud.google.com/kubernetes-engine/docs/concepts/dashboards + KubernetesDashboard kubernetes_dashboard = 3 [deprecated = true]; // Configuration for NetworkPolicy. This only tracks whether the addon // is enabled or not on the Master, it does not track whether network policy // is enabled for the nodes. NetworkPolicyConfig network_policy_config = 4; + + // Configuration for the Cloud Run addon, which allows the user to use a + // managed Knative service. + CloudRunConfig cloud_run_config = 7; } // Configuration options for the HTTP (L7) load balancing controller addon, @@ -627,6 +760,23 @@ message PrivateClusterConfig { string public_endpoint = 5; } +// Configuration for returning group information from authenticators. +message AuthenticatorGroupsConfig { + // Whether this cluster should return group membership lookups + // during authentication using a group of security groups. + bool enabled = 1; + + // The name of the security group-of-groups to be used. Only relevant + // if enabled = true. + string security_group = 2; +} + +// Configuration options for the Cloud Run feature. +message CloudRunConfig { + // Whether Cloud Run addon is enabled for this cluster. + bool disabled = 1; +} + // Configuration options for the master authorized networks feature. Enabled // master authorized networks will disallow all external traffic to access // Kubernetes master through HTTPS except traffic from the given CIDR blocks, @@ -644,7 +794,7 @@ message MasterAuthorizedNetworksConfig { // Whether or not master authorized networks is enabled. bool enabled = 1; - // cidr_blocks define up to 10 external networks that could access + // cidr_blocks define up to 50 external networks that could access // Kubernetes master through HTTPS. repeated CidrBlock cidr_blocks = 2; } @@ -678,6 +828,13 @@ message NetworkPolicy { bool enabled = 2; } +// Configuration for Binary Authorization. +message BinaryAuthorization { + // Enable Binary Authorization for this cluster. If enabled, all container + // images will be validated by Binary Authorization. + bool enabled = 1; +} + // Configuration for controlling how IPs are allocated in the cluster. message IPAllocationPolicy { // Whether alias IPs will be used for pod IPs in the cluster. @@ -769,6 +926,23 @@ message IPAllocationPolicy { // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range // to use. string services_ipv4_cidr_block = 11; + + // The IP address range of the Cloud TPUs in this cluster. If unspecified, a + // range will be automatically chosen with the default size. + // + // This field is only applicable when `use_ip_aliases` is true. + // + // If unspecified, the range will use the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + string tpu_ipv4_cidr_block = 13; } // A Google Kubernetes Engine cluster. @@ -803,7 +977,8 @@ message Cluster { } // The name of this cluster. The name must be unique within this project - // and zone, and can be up to 40 characters with the following restrictions: + // and location (e.g. zone or region), and can be up to 40 characters with + // the following restrictions: // // * Lowercase letters, numbers, and hyphens only. // * Must start with a letter. @@ -821,26 +996,35 @@ message Cluster { // "node_pool" object, since this configuration (along with the // "node_config") will be used to create a "NodePool" object with an // auto-generated name. Do not use this and a node_pool at the same time. - int32 initial_node_count = 3; + // + // This field is deprecated, use node_pool.initial_node_count instead. + int32 initial_node_count = 3 [deprecated = true]; // Parameters used in creating the cluster's nodes. - // See `nodeConfig` for the description of its properties. // For requests, this field should only be used in lieu of a // "node_pool" object, since this configuration (along with the // "initial_node_count") will be used to create a "NodePool" object with an // auto-generated name. Do not use this and a node_pool at the same time. // For responses, this field will be populated with the node configuration of - // the first node pool. + // the first node pool. (For configuration of each node pool, see + // `node_pool.config`) // // If unspecified, the defaults are used. - NodeConfig node_config = 4; + // This field is deprecated, use node_pool.config instead. + NodeConfig node_config = 4 [deprecated = true]; // The authentication information for accessing the master endpoint. + // If unspecified, the defaults are used: + // For clusters before v1.12, if master_auth is unspecified, `username` will + // be set to "admin", a random password will be generated, and a client + // certificate will be issued. MasterAuth master_auth = 5; // The logging service the cluster should use to write logs. // Currently available options: // + // * "logging.googleapis.com/kubernetes" - the Google Cloud Logging + // service with Kubernetes-native resource model // * `logging.googleapis.com` - the Google Cloud Logging service. // * `none` - no logs will be exported from the cluster. // * if left as an empty string,`logging.googleapis.com` will be used. @@ -855,7 +1039,7 @@ message Cluster { string monitoring_service = 7; // The name of the Google Compute Engine - // [network](/compute/docs/networks-and-firewalls#networks) to which the + // [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which the // cluster is connected. If left unspecified, the `default` network // will be used. string network = 8; @@ -870,7 +1054,7 @@ message Cluster { AddonsConfig addons_config = 10; // The name of the Google Compute Engine - // [subnetwork](/compute/docs/subnetworks) to which the + // [subnetwork](https://cloud.google.com/compute/docs/subnetworks) to which the // cluster is connected. string subnetwork = 11; @@ -880,7 +1064,7 @@ message Cluster { repeated NodePool node_pools = 12; // The list of Google Compute Engine - // [locations](/compute/docs/zones#available) in which the cluster's nodes + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes // should be located. repeated string locations = 13; @@ -914,17 +1098,41 @@ message Cluster { // Configure the maintenance policy for this cluster. MaintenancePolicy maintenance_policy = 23; + // Configuration for Binary Authorization. + BinaryAuthorization binary_authorization = 24; + + // Cluster-level autoscaling configuration. + ClusterAutoscaling autoscaling = 26; + // Configuration for cluster networking. NetworkConfig network_config = 27; + // The default constraint on the maximum number of pods that can be run + // simultaneously on a node in the node pool of this cluster. Only honored + // if cluster created with IP Alias support. + MaxPodsConstraint default_max_pods_constraint = 30; + + // Configuration for exporting resource usages. Resource usage export is + // disabled when this config is unspecified. + ResourceUsageExportConfig resource_usage_export_config = 33; + + // Configuration controlling RBAC group membership information. + AuthenticatorGroupsConfig authenticator_groups_config = 34; + // Configuration for private cluster. PrivateClusterConfig private_cluster_config = 37; + // Configuration of etcd encryption. + DatabaseEncryption database_encryption = 38; + + // Cluster-level Vertical Pod Autoscaling configuration. + VerticalPodAutoscaling vertical_pod_autoscaling = 39; + // [Output only] Server-defined URL for the resource. string self_link = 100; // [Output only] The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field is deprecated, use location instead. string zone = 101 [deprecated = true]; @@ -956,7 +1164,7 @@ message Cluster { string current_master_version = 104; // [Output only] Deprecated, use - // [NodePool.version](/kubernetes-engine/docs/reference/rest/v1/projects.zones.clusters.nodePool) + // [NodePools.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.zones.clusters.nodePools) // instead. The current version of the node software components. If they are // currently at multiple versions because they're in the process of being // upgraded, this reflects the minimum version of all nodes. @@ -975,7 +1183,8 @@ message Cluster { // [Output only] The size of the address space on each node for hosting // containers. This is provisioned from within the `container_ipv4_cidr` - // range. + // range. This field will only be set when cluster is in route-based network + // mode. int32 node_ipv4_cidr_size = 109; // [Output only] The IP address range of the Kubernetes services in @@ -988,18 +1197,30 @@ message Cluster { // Deprecated. Use node_pools.instance_group_urls. repeated string instance_group_urls = 111 [deprecated = true]; - // [Output only] The number of nodes currently in the cluster. - int32 current_node_count = 112; + // [Output only] The number of nodes currently in the cluster. Deprecated. + // Call Kubernetes API directly to retrieve node information. + int32 current_node_count = 112 [deprecated = true]; // [Output only] The time the cluster will be automatically // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. string expire_time = 113; // [Output only] The name of the Google Compute Engine - // [zone](/compute/docs/regions-zones/regions-zones#available) or - // [region](/compute/docs/regions-zones/regions-zones#available) in which + // [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or + // [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which // the cluster resides. string location = 114; + + // Enable the ability to use Cloud TPUs in this cluster. + bool enable_tpu = 115; + + // [Output only] The IP address range of the Cloud TPUs in this cluster, in + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `1.2.3.4/29`). + string tpu_ipv4_cidr_block = 116; + + // Which conditions caused the current cluster state. + repeated StatusCondition conditions = 118; } // ClusterUpdate describes an update to the cluster. Exactly one update can @@ -1022,6 +1243,8 @@ message ClusterUpdate { // The monitoring service the cluster should use to write metrics. // Currently available options: // + // * "monitoring.googleapis.com/kubernetes" - the Google Cloud Monitoring + // service with Kubernetes-native resource model // * "monitoring.googleapis.com" - the Google Cloud Monitoring service // * "none" - no metrics will be exported from the cluster string desired_monitoring_service = 5; @@ -1039,6 +1262,9 @@ message ClusterUpdate { // NOTE: Set the "desired_node_pool" field as well. string desired_image_type = 8; + // Configuration of etcd encryption. + DatabaseEncryption desired_database_encryption = 46; + // Autoscaler configuration for the node pool specified in // desired_node_pool_id. If there is only one pool in the // cluster and desired_node_pool_id is not provided then @@ -1046,7 +1272,7 @@ message ClusterUpdate { NodePoolAutoscaling desired_node_pool_autoscaling = 9; // The desired list of Google Compute Engine - // [locations](/compute/docs/zones#available) in which the cluster's nodes + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes // should be located. Changing the locations a cluster is in will result // in nodes being either created or removed from the cluster, depending on // whether locations are being added or removed. @@ -1057,6 +1283,30 @@ message ClusterUpdate { // The desired configuration options for master authorized networks feature. MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12; + // Cluster-level autoscaling configuration. + ClusterAutoscaling desired_cluster_autoscaling = 15; + + // The desired configuration options for the Binary Authorization feature. + BinaryAuthorization desired_binary_authorization = 16; + + // The logging service the cluster should use to write logs. + // Currently available options: + // + // * "logging.googleapis.com/kubernetes" - the Google Cloud Logging + // service with Kubernetes-native resource model + // * "logging.googleapis.com" - the Google Cloud Logging service + // * "none" - no logs will be exported from the cluster + string desired_logging_service = 19; + + // The desired configuration for exporting resource usage. + ResourceUsageExportConfig desired_resource_usage_export_config = 21; + + // Cluster-level Vertical Pod Autoscaling configuration. + VerticalPodAutoscaling desired_vertical_pod_autoscaling = 22; + + // The desired config of Intra-node visibility. + IntraNodeVisibilityConfig desired_intra_node_visibility_config = 26; + // The Kubernetes version to change the master to. // // Users may specify either explicit versions offered by @@ -1149,7 +1399,7 @@ message Operation { string name = 1; // The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the operation + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation // is taking place. // This field is deprecated, use location instead. string zone = 2 [deprecated = true]; @@ -1173,8 +1423,8 @@ message Operation { string target_link = 7; // [Output only] The name of the Google Compute Engine - // [zone](/compute/docs/regions-zones/regions-zones#available) or - // [region](/compute/docs/regions-zones/regions-zones#available) in which + // [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or + // [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which // the cluster resides. string location = 9; @@ -1185,6 +1435,12 @@ message Operation { // [Output only] The time the operation completed, in // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. string end_time = 11; + + // Which conditions caused the current cluster state. + repeated StatusCondition cluster_conditions = 13; + + // Which conditions caused the current node pool state. + repeated StatusCondition nodepool_conditions = 14; } // CreateClusterRequest creates a cluster. @@ -1195,17 +1451,17 @@ message CreateClusterRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the parent field. string zone = 2 [deprecated = true]; - // A [cluster - // resource](/container-engine/reference/rest/v1/projects.zones.clusters) - Cluster cluster = 3; + // Required. A [cluster + // resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters) + Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; // The parent (project and location) where the cluster will be created. - // Specified in the format 'projects/*/locations/*'. + // Specified in the format `projects/*/locations/*`. string parent = 5; } @@ -1217,7 +1473,7 @@ message GetClusterRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1227,7 +1483,7 @@ message GetClusterRequest { string cluster_id = 3 [deprecated = true]; // The name (project, location, cluster) of the cluster to retrieve. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 5; } @@ -1239,7 +1495,7 @@ message UpdateClusterRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1248,11 +1504,11 @@ message UpdateClusterRequest { // This field has been deprecated and replaced by the name field. string cluster_id = 3 [deprecated = true]; - // A description of the update. - ClusterUpdate update = 4; + // Required. A description of the update. + ClusterUpdate update = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster) of the cluster to update. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 5; } @@ -1264,7 +1520,7 @@ message UpdateNodePoolRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1277,7 +1533,7 @@ message UpdateNodePoolRequest { // This field has been deprecated and replaced by the name field. string node_pool_id = 4 [deprecated = true]; - // The Kubernetes version to change the nodes to (typically an + // Required. The Kubernetes version to change the nodes to (typically an // upgrade). // // Users may specify either explicit versions offered by Kubernetes Engine or @@ -1288,14 +1544,14 @@ message UpdateNodePoolRequest { // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version // - "1.X.Y-gke.N": picks an explicit Kubernetes version // - "-": picks the Kubernetes master version - string node_version = 5; + string node_version = 5 [(google.api.field_behavior) = REQUIRED]; - // The desired image type for the node pool. - string image_type = 6; + // Required. The desired image type for the node pool. + string image_type = 6 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster, node pool) of the node pool to // update. Specified in the format - // 'projects/*/locations/*/clusters/*/nodePools/*'. + // `projects/*/locations/*/clusters/*/nodePools/*`. string name = 8; } @@ -1307,7 +1563,7 @@ message SetNodePoolAutoscalingRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1320,12 +1576,12 @@ message SetNodePoolAutoscalingRequest { // This field has been deprecated and replaced by the name field. string node_pool_id = 4 [deprecated = true]; - // Autoscaling configuration for the node pool. - NodePoolAutoscaling autoscaling = 5; + // Required. Autoscaling configuration for the node pool. + NodePoolAutoscaling autoscaling = 5 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster, node pool) of the node pool to set // autoscaler settings. Specified in the format - // 'projects/*/locations/*/clusters/*/nodePools/*'. + // `projects/*/locations/*/clusters/*/nodePools/*`. string name = 6; } @@ -1337,24 +1593,24 @@ message SetLoggingServiceRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2; + string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to upgrade. // This field has been deprecated and replaced by the name field. string cluster_id = 3 [deprecated = true]; - // The logging service the cluster should use to write metrics. + // Required. The logging service the cluster should use to write metrics. // Currently available options: // // * "logging.googleapis.com" - the Google Cloud Logging service // * "none" - no metrics will be exported from the cluster - string logging_service = 4; + string logging_service = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster) of the cluster to set logging. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 5; } @@ -1366,7 +1622,7 @@ message SetMonitoringServiceRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1375,15 +1631,17 @@ message SetMonitoringServiceRequest { // This field has been deprecated and replaced by the name field. string cluster_id = 3 [deprecated = true]; - // The monitoring service the cluster should use to write metrics. + // Required. The monitoring service the cluster should use to write metrics. // Currently available options: // + // * "monitoring.googleapis.com/kubernetes" - the Google Cloud Monitoring + // service with Kubernetes-native resource model // * "monitoring.googleapis.com" - the Google Cloud Monitoring service // * "none" - no metrics will be exported from the cluster - string monitoring_service = 4; + string monitoring_service = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster) of the cluster to set monitoring. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 6; } @@ -1395,7 +1653,7 @@ message SetAddonsConfigRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1404,12 +1662,12 @@ message SetAddonsConfigRequest { // This field has been deprecated and replaced by the name field. string cluster_id = 3 [deprecated = true]; - // The desired configurations for the various addons available to run in the + // Required. The desired configurations for the various addons available to run in the // cluster. - AddonsConfig addons_config = 4; + AddonsConfig addons_config = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster) of the cluster to set addons. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 6; } @@ -1421,7 +1679,7 @@ message SetLocationsRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1430,17 +1688,17 @@ message SetLocationsRequest { // This field has been deprecated and replaced by the name field. string cluster_id = 3 [deprecated = true]; - // The desired list of Google Compute Engine - // [locations](/compute/docs/zones#available) in which the cluster's nodes + // Required. The desired list of Google Compute Engine + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes // should be located. Changing the locations a cluster is in will result // in nodes being either created or removed from the cluster, depending on // whether locations are being added or removed. // // This list must always include the cluster's primary zone. - repeated string locations = 4; + repeated string locations = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster) of the cluster to set locations. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 6; } @@ -1452,7 +1710,7 @@ message UpdateMasterRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1461,7 +1719,7 @@ message UpdateMasterRequest { // This field has been deprecated and replaced by the name field. string cluster_id = 3 [deprecated = true]; - // The Kubernetes version to change the master to. + // Required. The Kubernetes version to change the master to. // // Users may specify either explicit versions offered by Kubernetes Engine or // version aliases, which have the following behavior: @@ -1471,10 +1729,10 @@ message UpdateMasterRequest { // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version // - "1.X.Y-gke.N": picks an explicit Kubernetes version // - "-": picks the default Kubernetes version - string master_version = 4; + string master_version = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster) of the cluster to update. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 7; } @@ -1504,7 +1762,7 @@ message SetMasterAuthRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1513,14 +1771,14 @@ message SetMasterAuthRequest { // This field has been deprecated and replaced by the name field. string cluster_id = 3 [deprecated = true]; - // The exact form of action to be taken on the master auth. - Action action = 4; + // Required. The exact form of action to be taken on the master auth. + Action action = 4 [(google.api.field_behavior) = REQUIRED]; - // A description of the update. - MasterAuth update = 5; + // Required. A description of the update. + MasterAuth update = 5 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster) of the cluster to set auth. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 7; } @@ -1532,7 +1790,7 @@ message DeleteClusterRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1542,7 +1800,7 @@ message DeleteClusterRequest { string cluster_id = 3 [deprecated = true]; // The name (project, location, cluster) of the cluster to delete. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 4; } @@ -1554,13 +1812,13 @@ message ListClustersRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides, or "-" for all zones. // This field has been deprecated and replaced by the parent field. string zone = 2 [deprecated = true]; // The parent (project and location) where the clusters will be listed. - // Specified in the format 'projects/*/locations/*'. + // Specified in the format `projects/*/locations/*`. // Location "-" matches all zones and all regions. string parent = 4; } @@ -1584,7 +1842,7 @@ message GetOperationRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1594,7 +1852,7 @@ message GetOperationRequest { string operation_id = 3 [deprecated = true]; // The name (project, location, operation id) of the operation to get. - // Specified in the format 'projects/*/locations/*/operations/*'. + // Specified in the format `projects/*/locations/*/operations/*`. string name = 5; } @@ -1606,12 +1864,12 @@ message ListOperationsRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) to return operations for, or `-` for + // [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for, or `-` for // all zones. This field has been deprecated and replaced by the parent field. string zone = 2 [deprecated = true]; // The parent (project and location) where the operations will be listed. - // Specified in the format 'projects/*/locations/*'. + // Specified in the format `projects/*/locations/*`. // Location "-" matches all zones and all regions. string parent = 4; } @@ -1624,7 +1882,7 @@ message CancelOperationRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the operation resides. + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1633,7 +1891,7 @@ message CancelOperationRequest { string operation_id = 3 [deprecated = true]; // The name (project, location, operation id) of the operation to cancel. - // Specified in the format 'projects/*/locations/*/operations/*'. + // Specified in the format `projects/*/locations/*/operations/*`. string name = 4; } @@ -1655,12 +1913,12 @@ message GetServerConfigRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) to return operations for. + // [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; - // The name (project and location) of the server config to get - // Specified in the format 'projects/*/locations/*'. + // The name (project and location) of the server config to get, + // specified in the format `projects/*/locations/*`. string name = 4; } @@ -1690,7 +1948,7 @@ message CreateNodePoolRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the parent field. string zone = 2 [deprecated = true]; @@ -1699,12 +1957,12 @@ message CreateNodePoolRequest { // This field has been deprecated and replaced by the parent field. string cluster_id = 3 [deprecated = true]; - // The node pool to create. - NodePool node_pool = 4; + // Required. The node pool to create. + NodePool node_pool = 4 [(google.api.field_behavior) = REQUIRED]; // The parent (project, location, cluster id) where the node pool will be // created. Specified in the format - // 'projects/*/locations/*/clusters/*'. + // `projects/*/locations/*/clusters/*`. string parent = 6; } @@ -1716,7 +1974,7 @@ message DeleteNodePoolRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1731,7 +1989,7 @@ message DeleteNodePoolRequest { // The name (project, location, cluster, node pool id) of the node pool to // delete. Specified in the format - // 'projects/*/locations/*/clusters/*/nodePools/*'. + // `projects/*/locations/*/clusters/*/nodePools/*`. string name = 6; } @@ -1743,7 +2001,7 @@ message ListNodePoolsRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the parent field. string zone = 2 [deprecated = true]; @@ -1753,7 +2011,7 @@ message ListNodePoolsRequest { string cluster_id = 3 [deprecated = true]; // The parent (project, location, cluster id) where the node pools will be - // listed. Specified in the format 'projects/*/locations/*/clusters/*'. + // listed. Specified in the format `projects/*/locations/*/clusters/*`. string parent = 5; } @@ -1765,7 +2023,7 @@ message GetNodePoolRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1780,7 +2038,7 @@ message GetNodePoolRequest { // The name (project, location, cluster, node pool id) of the node pool to // get. Specified in the format - // 'projects/*/locations/*/clusters/*/nodePools/*'. + // `projects/*/locations/*/clusters/*/nodePools/*`. string name = 6; } @@ -1841,7 +2099,7 @@ message NodePool { string version = 101; // [Output only] The resource URLs of the [managed instance - // groups](/compute/docs/instance-groups/creating-groups-of-managed-instances) + // groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) // associated with this node pool. repeated string instance_group_urls = 102; @@ -1858,6 +2116,16 @@ message NodePool { // NodeManagement configuration for this NodePool. NodeManagement management = 5; + + // The constraint on the maximum number of pods that can be run + // simultaneously on a node in the node pool. + MaxPodsConstraint max_pods_constraint = 6; + + // Which conditions caused the current node pool state. + repeated StatusCondition conditions = 105; + + // [Output only] The pod CIDR block size per node in this node pool. + int32 pod_ipv4_cidr_size = 7; } // NodeManagement defines the set of node management services turned on for the @@ -1895,6 +2163,13 @@ message AutoUpgradeOptions { message MaintenancePolicy { // Specifies the maintenance window in which maintenance may be performed. MaintenanceWindow window = 1; + + // A hash identifying the version of this policy, so that updates to fields of + // the policy won't accidentally undo intermediate changes (and so that users + // of the API unaware of some fields won't accidentally remove other fields). + // Make a get() request to the cluster to get the current + // resource version and include it with requests to set the policy. + string resource_version = 3; } // MaintenanceWindow defines the maintenance window to be used for the cluster. @@ -1902,14 +2177,68 @@ message MaintenanceWindow { oneof policy { // DailyMaintenanceWindow specifies a daily maintenance operation window. DailyMaintenanceWindow daily_maintenance_window = 2; + + // RecurringWindow specifies some number of recurring time periods for + // maintenance to occur. The time windows may be overlapping. If no + // maintenance windows are set, maintenance can occur at any time. + RecurringTimeWindow recurring_window = 3; } + + // Exceptions to maintenance window. Non-emergency maintenance should not + // occur in these windows. + map maintenance_exclusions = 4; +} + +// Represents an arbitrary window of time. +message TimeWindow { + // The time that the window first starts. + google.protobuf.Timestamp start_time = 1; + + // The time that the window ends. The end time should take place after the + // start time. + google.protobuf.Timestamp end_time = 2; +} + +// Represents an arbitrary window of time that recurs. +message RecurringTimeWindow { + // The window of the first recurrence. + TimeWindow window = 1; + + // An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how + // this window reccurs. They go on for the span of time between the start and + // end time. + // + // For example, to have something repeat every weekday, you'd use: + // FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR + // To repeat some window daily (equivalent to the DailyMaintenanceWindow): + // FREQ=DAILY + // For the first weekend of every month: + // FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU + // This specifies how frequently the window starts. Eg, if you wanted to have + // a 9-5 UTC-4 window every weekday, you'd use something like: + // + // start time = 2019-01-01T09:00:00-0400 + // end time = 2019-01-01T17:00:00-0400 + // recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR + // + // Windows can span multiple days. Eg, to make the window encompass every + // weekend from midnight Saturday till the last minute of Sunday UTC: + // + // start time = 2019-01-05T00:00:00Z + // end time = 2019-01-07T23:59:00Z + // recurrence = FREQ=WEEKLY;BYDAY=SA + // + // Note the start and end time's specific dates are largely arbitrary except + // to specify duration of the window and when it first starts. + // The FREQ values of HOURLY, MINUTELY, and SECONDLY are not supported. + string recurrence = 2; } // Time window specified for daily maintenance operations. message DailyMaintenanceWindow { // Time within the maintenance window to start the maintenance operations. // Time format should be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) - // format "HH:MM”, where HH : [00-23] and MM : [00-59] GMT. + // format "HH:MM", where HH : [00-23] and MM : [00-59] GMT. string start_time = 2; // [Output only] Duration of the time window, automatically chosen to be @@ -1928,7 +2257,7 @@ message SetNodePoolManagementRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1941,12 +2270,12 @@ message SetNodePoolManagementRequest { // This field has been deprecated and replaced by the name field. string node_pool_id = 4 [deprecated = true]; - // NodeManagement configuration for the node pool. - NodeManagement management = 5; + // Required. NodeManagement configuration for the node pool. + NodeManagement management = 5 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster, node pool id) of the node pool to set // management properties. Specified in the format - // 'projects/*/locations/*/clusters/*/nodePools/*'. + // `projects/*/locations/*/clusters/*/nodePools/*`. string name = 7; } @@ -1959,7 +2288,7 @@ message SetNodePoolSizeRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -1972,12 +2301,12 @@ message SetNodePoolSizeRequest { // This field has been deprecated and replaced by the name field. string node_pool_id = 4 [deprecated = true]; - // The desired node count for the pool. - int32 node_count = 5; + // Required. The desired node count for the pool. + int32 node_count = 5 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster, node pool id) of the node pool to set // size. - // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. + // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. string name = 7; } @@ -1991,7 +2320,7 @@ message RollbackNodePoolUpgradeRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -2006,7 +2335,7 @@ message RollbackNodePoolUpgradeRequest { // The name (project, location, cluster, node pool id) of the node poll to // rollback upgrade. - // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. + // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. string name = 6; } @@ -2016,6 +2345,52 @@ message ListNodePoolsResponse { repeated NodePool node_pools = 1; } +// ClusterAutoscaling contains global, per-cluster information +// required by Cluster Autoscaler to automatically adjust +// the size of the cluster and create/delete +// node pools based on the current needs. +message ClusterAutoscaling { + // Enables automatic node pool creation and deletion. + bool enable_node_autoprovisioning = 1; + + // Contains global constraints regarding minimum and maximum + // amount of resources in the cluster. + repeated ResourceLimit resource_limits = 2; + + // AutoprovisioningNodePoolDefaults contains defaults for a node pool + // created by NAP. + AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; + + // The list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) + // in which the NodePool's nodes can be created by NAP. + repeated string autoprovisioning_locations = 5; +} + +// AutoprovisioningNodePoolDefaults contains defaults for a node pool created +// by NAP. +message AutoprovisioningNodePoolDefaults { + // Scopes that are used by NAP when creating node pools. If oauth_scopes are + // specified, service_account should be empty. + repeated string oauth_scopes = 1; + + // The Google Cloud Platform Service Account to be used by the node VMs. If + // service_account is specified, scopes should be empty. + string service_account = 2; +} + +// Contains information about amount of some resource in the cluster. +// For memory, value should be in GB. +message ResourceLimit { + // Resource name "cpu", "memory" or gpu-specific string. + string resource_type = 1; + + // Minimum amount of the resource in the cluster. + int64 minimum = 2; + + // Maximum amount of the resource in the cluster. + int64 maximum = 3; +} + // NodePoolAutoscaling contains information required by cluster autoscaler to // adjust the size of the node pool to the current cluster usage. message NodePoolAutoscaling { @@ -2029,6 +2404,9 @@ message NodePoolAutoscaling { // Maximum number of nodes in the NodePool. Must be >= min_node_count. There // has to enough quota to scale up the cluster. int32 max_node_count = 3; + + // Can this node pool be deleted automatically. + bool autoprovisioned = 4; } // SetLabelsRequest sets the Google Cloud Platform labels on a Google Container @@ -2041,7 +2419,7 @@ message SetLabelsRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -2050,19 +2428,19 @@ message SetLabelsRequest { // This field has been deprecated and replaced by the name field. string cluster_id = 3 [deprecated = true]; - // The labels to set for that cluster. - map resource_labels = 4; + // Required. The labels to set for that cluster. + map resource_labels = 4 [(google.api.field_behavior) = REQUIRED]; - // The fingerprint of the previous set of labels for this resource, + // Required. The fingerprint of the previous set of labels for this resource, // used to detect conflicts. The fingerprint is initially generated by // Kubernetes Engine and changes after every request to modify or update // labels. You must always provide an up-to-date fingerprint hash when // updating or changing labels. Make a get() request to the // resource to get the latest fingerprint. - string label_fingerprint = 5; + string label_fingerprint = 5 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster id) of the cluster to set labels. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 7; } @@ -2075,7 +2453,7 @@ message SetLegacyAbacRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -2084,11 +2462,11 @@ message SetLegacyAbacRequest { // This field has been deprecated and replaced by the name field. string cluster_id = 3 [deprecated = true]; - // Whether ABAC authorization will be enabled in the cluster. - bool enabled = 4; + // Required. Whether ABAC authorization will be enabled in the cluster. + bool enabled = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster id) of the cluster to set legacy abac. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 6; } @@ -2101,7 +2479,7 @@ message StartIPRotationRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -2111,7 +2489,7 @@ message StartIPRotationRequest { string cluster_id = 3 [deprecated = true]; // The name (project, location, cluster id) of the cluster to start IP - // rotation. Specified in the format 'projects/*/locations/*/clusters/*'. + // rotation. Specified in the format `projects/*/locations/*/clusters/*`. string name = 6; // Whether to rotate credentials during IP rotation. @@ -2126,7 +2504,7 @@ message CompleteIPRotationRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -2136,7 +2514,7 @@ message CompleteIPRotationRequest { string cluster_id = 3 [deprecated = true]; // The name (project, location, cluster id) of the cluster to complete IP - // rotation. Specified in the format 'projects/*/locations/*/clusters/*'. + // rotation. Specified in the format `projects/*/locations/*/clusters/*`. string name = 7; } @@ -2146,7 +2524,7 @@ message AcceleratorConfig { int64 accelerator_count = 1; // The accelerator type resource name. List of supported accelerators - // [here](/compute/docs/gpus/#Introduction) + // [here](https://cloud.google.com/compute/docs/gpus) string accelerator_type = 2; } @@ -2158,7 +2536,7 @@ message SetNetworkPolicyRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. string zone = 2 [deprecated = true]; @@ -2167,48 +2545,253 @@ message SetNetworkPolicyRequest { // This field has been deprecated and replaced by the name field. string cluster_id = 3 [deprecated = true]; - // Configuration options for the NetworkPolicy feature. - NetworkPolicy network_policy = 4; + // Required. Configuration options for the NetworkPolicy feature. + NetworkPolicy network_policy = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster id) of the cluster to set networking - // policy. Specified in the format 'projects/*/locations/*/clusters/*'. + // policy. Specified in the format `projects/*/locations/*/clusters/*`. string name = 6; } // SetMaintenancePolicyRequest sets the maintenance policy for a cluster. message SetMaintenancePolicyRequest { - // The Google Developers Console [project ID or project + // Required. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + string zone = 2 [(google.api.field_behavior) = REQUIRED]; - // The name of the cluster to update. - string cluster_id = 3; + // Required. The name of the cluster to update. + string cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; - // The maintenance policy to be set for the cluster. An empty field + // Required. The maintenance policy to be set for the cluster. An empty field // clears the existing maintenance policy. - MaintenancePolicy maintenance_policy = 4; + MaintenancePolicy maintenance_policy = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster id) of the cluster to set maintenance // policy. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 5; } +// StatusCondition describes why a cluster or a node pool has a certain status +// (e.g., ERROR or DEGRADED). +message StatusCondition { + // Code for each condition + enum Code { + // UNKNOWN indicates a generic condition. + UNKNOWN = 0; + + // GCE_STOCKOUT indicates a Google Compute Engine stockout. + GCE_STOCKOUT = 1; + + // GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot + // service account. + GKE_SERVICE_ACCOUNT_DELETED = 2; + + // Google Compute Engine quota was exceeded. + GCE_QUOTA_EXCEEDED = 3; + + // Cluster state was manually changed by an SRE due to a system logic error. + SET_BY_OPERATOR = 4; + + // Unable to perform an encrypt operation against the CloudKMS key used for + // etcd level encryption. + // More codes TBA + CLOUD_KMS_KEY_ERROR = 7; + } + + // Machine-friendly representation of the condition + Code code = 1; + + // Human-friendly representation of the condition + string message = 2; +} + // NetworkConfig reports the relative names of network & subnetwork. message NetworkConfig { // Output only. The relative name of the Google Compute Engine - // [network][google.container.v1.NetworkConfig.network](/compute/docs/networks-and-firewalls#networks) to which + // [network][google.container.v1.NetworkConfig.network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which // the cluster is connected. // Example: projects/my-project/global/networks/my-network string network = 1; // Output only. The relative name of the Google Compute Engine - // [subnetwork](/compute/docs/vpc) to which the cluster is connected. + // [subnetwork](https://cloud.google.com/compute/docs/vpc) to which the cluster is connected. // Example: projects/my-project/regions/us-central1/subnetworks/my-subnet string subnetwork = 2; + + // Whether Intra-node visibility is enabled for this cluster. + // This makes same node pod to pod traffic visible for VPC network. + bool enable_intra_node_visibility = 5; +} + +// IntraNodeVisibilityConfig contains the desired config of the intra-node +// visibility on this cluster. +message IntraNodeVisibilityConfig { + // Enables intra node visibility for this cluster. + bool enabled = 1; +} + +// Constraints applied to pods. +message MaxPodsConstraint { + // Constraint enforced on the max num of pods per node. + int64 max_pods_per_node = 1; +} + +// Configuration of etcd encryption. +message DatabaseEncryption { + // State of etcd encryption. + enum State { + // Should never be set + UNKNOWN = 0; + + // Secrets in etcd are encrypted. + ENCRYPTED = 1; + + // Secrets in etcd are stored in plain text (at etcd level) - this is + // unrelated to GCE level full disk encryption. + DECRYPTED = 2; + } + + // Denotes the state of etcd encryption. + State state = 2; + + // Name of CloudKMS key to use for the encryption of secrets in etcd. + // Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key + string key_name = 1; +} + +// ListUsableSubnetworksRequest requests the list of usable subnetworks +// available to a user for creating clusters. +message ListUsableSubnetworksRequest { + // The parent project where subnetworks are usable. + // Specified in the format `projects/*`. + string parent = 1; + + // Filtering currently only supports equality on the networkProjectId and must + // be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` + // is the project which owns the listed subnetworks. This defaults to the + // parent project ID. + string filter = 2; + + // The max number of results per page that should be returned. If the number + // of available results is larger than `page_size`, a `next_page_token` is + // returned which can be used to get the next page of results in subsequent + // requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + int32 page_size = 3; + + // Specifies a page token to use. Set this to the nextPageToken returned by + // previous list requests to get the next page of results. + string page_token = 4; +} + +// ListUsableSubnetworksResponse is the response of +// ListUsableSubnetworksRequest. +message ListUsableSubnetworksResponse { + // A list of usable subnetworks in the specified network project. + repeated UsableSubnetwork subnetworks = 1; + + // This token allows you to get the next page of results for list requests. + // If the number of results is larger than `page_size`, use the + // `next_page_token` as a value for the query parameter `page_token` in the + // next request. The value will become empty when there are no more pages. + string next_page_token = 2; +} + +// Secondary IP range of a usable subnetwork. +message UsableSubnetworkSecondaryRange { + // Status shows the current usage of a secondary IP range. + enum Status { + // UNKNOWN is the zero value of the Status enum. It's not a valid status. + UNKNOWN = 0; + + // UNUSED denotes that this range is unclaimed by any cluster. + UNUSED = 1; + + // IN_USE_SERVICE denotes that this range is claimed by a cluster for + // services. It cannot be used for other clusters. + IN_USE_SERVICE = 2; + + // IN_USE_SHAREABLE_POD denotes this range was created by the network admin + // and is currently claimed by a cluster for pods. It can only be used by + // other clusters as a pod range. + IN_USE_SHAREABLE_POD = 3; + + // IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed + // for pods. It cannot be used for other clusters. + IN_USE_MANAGED_POD = 4; + } + + // The name associated with this subnetwork secondary range, used when adding + // an alias IP range to a VM instance. + string range_name = 1; + + // The range of IP addresses belonging to this subnetwork secondary range. + string ip_cidr_range = 2; + + // This field is to determine the status of the secondary range programmably. + Status status = 3; +} + +// UsableSubnetwork resource returns the subnetwork name, its associated network +// and the primary CIDR range. +message UsableSubnetwork { + // Subnetwork Name. + // Example: projects/my-project/regions/us-central1/subnetworks/my-subnet + string subnetwork = 1; + + // Network Name. + // Example: projects/my-project/global/networks/my-network + string network = 2; + + // The range of internal addresses that are owned by this subnetwork. + string ip_cidr_range = 3; + + // Secondary IP ranges. + repeated UsableSubnetworkSecondaryRange secondary_ip_ranges = 4; + + // A human readable status message representing the reasons for cases where + // the caller cannot use the secondary ranges under the subnet. For example if + // the secondary_ip_ranges is empty due to a permission issue, an insufficient + // permission message will be given by status_message. + string status_message = 5; +} + +// Configuration for exporting cluster resource usages. +message ResourceUsageExportConfig { + // Parameters for using BigQuery as the destination of resource usage export. + message BigQueryDestination { + // The ID of a BigQuery Dataset. + string dataset_id = 1; + } + + // Parameters for controlling consumption metering. + message ConsumptionMeteringConfig { + // Whether to enable consumption metering for this cluster. If enabled, a + // second BigQuery table will be created to hold resource consumption + // records. + bool enabled = 1; + } + + // Configuration to use BigQuery as usage export destination. + BigQueryDestination bigquery_destination = 1; + + // Whether to enable network egress metering for this cluster. If enabled, a + // daemonset will be created in the cluster to meter network egress traffic. + bool enable_network_egress_metering = 2; + + // Configuration to enable resource consumption metering. + ConsumptionMeteringConfig consumption_metering_config = 3; +} + +// VerticalPodAutoscaling contains global, per-cluster information +// required by Vertical Pod Autoscaler to automatically adjust +// the resources of pods controlled by it. +message VerticalPodAutoscaling { + // Enables vertical pod autoscaling. + bool enabled = 1; } diff --git a/google/container/v1/container_gapic.legacy.yaml b/google/container/v1/container_gapic.legacy.yaml new file mode 100644 index 000000000..17d5d60ec --- /dev/null +++ b/google/container/v1/container_gapic.legacy.yaml @@ -0,0 +1,524 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.container.v1 + python: + package_name: google.cloud.container_v1.gapic + go: + package_name: cloud.google.com/go/container/apiv1 + csharp: + package_name: Google.Cloud.Container.V1 + ruby: + package_name: Google::Cloud::Container::V1 + release_level: BETA + php: + package_name: Google\Cloud\Container\V1 + nodejs: + package_name: container.v1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: +- name: google.container.v1.ClusterManager + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for smoke test + smoke_test: + method: ListClusters + init_fields: + - project_id=$PROJECT_ID + - zone="us-central1-a" + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # name - The simple name of the method. + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce + # method overloads which allow a client to directly pass request message + # fields as method parameters. This information may or may not be used, + # depending on the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request + # message. + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the + # resource name formats defined in the field_name_patterns + # and response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a + # paging list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It + # defines which fields match the paging pattern in the request. The + # request consists of a page_size_field and a token_field. The + # page_size_field is the name of the optional field specifying the + # maximum number of elements to be returned in the response. The + # token_field is the name of the field in the request containing the + # page token. + # The response specifies response information of the list method. It + # defines which fields match the paging pattern in the response. The + # response consists of a token_field and a resources_field. The + # token_field is the name of the field in the response containing the + # next page token. The resources_field is the name of the field in the + # response containing the list of resources belonging to the page. + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListClusters + flattening: + groups: + - parameters: + - project_id + - zone + required_fields: + - project_id + - zone + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: GetCluster + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + required_fields: + - project_id + - zone + - cluster_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: CreateCluster + flattening: + groups: + - parameters: + - project_id + - zone + - cluster + required_fields: + - project_id + - zone + - cluster + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 45000 + - name: UpdateCluster + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - update + required_fields: + - project_id + - zone + - cluster_id + - update + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: UpdateNodePool + required_fields: + - project_id + - zone + - cluster_id + - node_pool_id + - node_version + - image_type + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetNodePoolAutoscaling + required_fields: + - project_id + - zone + - cluster_id + - node_pool_id + - autoscaling + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetLoggingService + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - logging_service + required_fields: + - project_id + - zone + - cluster_id + - logging_service + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetMonitoringService + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - monitoring_service + required_fields: + - project_id + - zone + - cluster_id + - monitoring_service + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetAddonsConfig + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - addons_config + required_fields: + - project_id + - zone + - cluster_id + - addons_config + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetLocations + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - locations + required_fields: + - project_id + - zone + - cluster_id + - locations + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: UpdateMaster + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - master_version + required_fields: + - project_id + - zone + - cluster_id + - master_version + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetMasterAuth + required_fields: + - project_id + - zone + - cluster_id + - action + - update + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: DeleteCluster + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + required_fields: + - project_id + - zone + - cluster_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: ListOperations + flattening: + groups: + - parameters: + - project_id + - zone + required_fields: + - project_id + - zone + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: GetOperation + flattening: + groups: + - parameters: + - project_id + - zone + - operation_id + required_fields: + - project_id + - zone + - operation_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: CancelOperation + flattening: + groups: + - parameters: + - project_id + - zone + - operation_id + required_fields: + - project_id + - zone + - operation_id + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: GetServerConfig + flattening: + groups: + - parameters: + - project_id + - zone + required_fields: + - project_id + - zone + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: ListNodePools + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + required_fields: + - project_id + - zone + - cluster_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: GetNodePool + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - node_pool_id + required_fields: + - project_id + - zone + - cluster_id + - node_pool_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: CreateNodePool + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - node_pool + required_fields: + - project_id + - zone + - cluster_id + - node_pool + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: DeleteNodePool + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - node_pool_id + required_fields: + - project_id + - zone + - cluster_id + - node_pool_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: RollbackNodePoolUpgrade + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - node_pool_id + required_fields: + - project_id + - zone + - cluster_id + - node_pool_id + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetNodePoolManagement + required_fields: + - project_id + - zone + - cluster_id + - node_pool_id + - management + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetLabels + required_fields: + - project_id + - zone + - cluster_id + - resource_labels + - label_fingerprint + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetLegacyAbac + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - enabled + required_fields: + - project_id + - zone + - cluster_id + - enabled + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: StartIPRotation + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + required_fields: + - project_id + - zone + - cluster_id + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: CompleteIPRotation + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + required_fields: + - project_id + - zone + - cluster_id + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetNodePoolSize + required_fields: + - project_id + - zone + - cluster_id + - node_pool_id + - node_count + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetNetworkPolicy + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - network_policy + required_fields: + - project_id + - zone + - cluster_id + - network_policy + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetMaintenancePolicy + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - maintenance_policy + required_fields: + - project_id + - zone + - cluster_id + - maintenance_policy + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 diff --git a/google/container/v1/container_gapic.yaml b/google/container/v1/container_gapic.yaml index 020cd74c9..4af278964 100644 --- a/google/container/v1/container_gapic.yaml +++ b/google/container/v1/container_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -20,506 +20,14 @@ language_settings: domain_layer_location: google-cloud # A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.container.v1.ClusterManager - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: [] - # Definition for smoke test smoke_test: method: ListClusters init_fields: - project_id=$PROJECT_ID - zone="us-central1-a" - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # name - The simple name of the method. - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce - # method overloads which allow a client to directly pass request message - # fields as method parameters. This information may or may not be used, - # depending on the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request - # message. - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the - # resource name formats defined in the field_name_patterns - # and response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a - # paging list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It - # defines which fields match the paging pattern in the request. The - # request consists of a page_size_field and a token_field. The - # page_size_field is the name of the optional field specifying the - # maximum number of elements to be returned in the response. The - # token_field is the name of the field in the request containing the - # page token. - # The response specifies response information of the list method. It - # defines which fields match the paging pattern in the response. The - # response consists of a token_field and a resources_field. The - # token_field is the name of the field in the response containing the - # next page token. The resources_field is the name of the field in the - # response containing the list of resources belonging to the page. - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: ListClusters - flattening: - groups: - - parameters: - - project_id - - zone - required_fields: - - project_id - - zone - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: GetCluster - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - required_fields: - - project_id - - zone - - cluster_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: CreateCluster - flattening: - groups: - - parameters: - - project_id - - zone - - cluster - required_fields: - - project_id - - zone - - cluster - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 45000 - - name: UpdateCluster - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - update - required_fields: - - project_id - - zone - - cluster_id - - update - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: UpdateNodePool - required_fields: - - project_id - - zone - - cluster_id - - node_pool_id - - node_version - - image_type - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetNodePoolAutoscaling - required_fields: - - project_id - - zone - - cluster_id - - node_pool_id - - autoscaling - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetLoggingService - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - logging_service - required_fields: - - project_id - - zone - - cluster_id - - logging_service - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetMonitoringService - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - monitoring_service - required_fields: - - project_id - - zone - - cluster_id - - monitoring_service - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetAddonsConfig - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - addons_config - required_fields: - - project_id - - zone - - cluster_id - - addons_config - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetLocations - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - locations - required_fields: - - project_id - - zone - - cluster_id - - locations - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: UpdateMaster - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - master_version - required_fields: - - project_id - - zone - - cluster_id - - master_version - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetMasterAuth - required_fields: - - project_id - - zone - - cluster_id - - action - - update - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - name: DeleteCluster - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - required_fields: - - project_id - - zone - - cluster_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: ListOperations - flattening: - groups: - - parameters: - - project_id - - zone - required_fields: - - project_id - - zone - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: GetOperation - flattening: - groups: - - parameters: - - project_id - - zone - - operation_id - required_fields: - - project_id - - zone - - operation_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: CancelOperation - flattening: - groups: - - parameters: - - project_id - - zone - - operation_id - required_fields: - - project_id - - zone - - operation_id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: GetServerConfig - flattening: - groups: - - parameters: - - project_id - - zone - required_fields: - - project_id - - zone - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: ListNodePools - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - required_fields: - - project_id - - zone - - cluster_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: GetNodePool - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - node_pool_id - required_fields: - - project_id - - zone - - cluster_id - - node_pool_id retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: CreateNodePool - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - node_pool - required_fields: - - project_id - - zone - - cluster_id - - node_pool - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - name: DeleteNodePool - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - node_pool_id - required_fields: - - project_id - - zone - - cluster_id - - node_pool_id retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: RollbackNodePoolUpgrade - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - node_pool_id - required_fields: - - project_id - - zone - - cluster_id - - node_pool_id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetNodePoolManagement - required_fields: - - project_id - - zone - - cluster_id - - node_pool_id - - management - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetLabels - required_fields: - - project_id - - zone - - cluster_id - - resource_labels - - label_fingerprint - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetLegacyAbac - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - enabled - required_fields: - - project_id - - zone - - cluster_id - - enabled - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: StartIPRotation - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - required_fields: - - project_id - - zone - - cluster_id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: CompleteIPRotation - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - required_fields: - - project_id - - zone - - cluster_id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetNodePoolSize - required_fields: - - project_id - - zone - - cluster_id - - node_pool_id - - node_count - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetNetworkPolicy - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - network_policy - required_fields: - - project_id - - zone - - cluster_id - - network_policy - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetMaintenancePolicy - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - maintenance_policy - required_fields: - - project_id - - zone - - cluster_id - - maintenance_policy - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 diff --git a/google/container/v1/container_grpc_service_config.json b/google/container/v1/container_grpc_service_config.json new file mode 100755 index 000000000..29f4a3502 --- /dev/null +++ b/google/container/v1/container_grpc_service_config.json @@ -0,0 +1,143 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.container.v1.ClusterManager", + "method": "ListClusters" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "GetCluster" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "DeleteCluster" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "ListOperations" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "GetOperation" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "GetServerConfig" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "ListNodePools" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "GetNodePool" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "DeleteNodePool" + } + ], + "timeout": "20s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.container.v1.ClusterManager", + "method": "CreateCluster" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "UpdateCluster" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "UpdateNodePool" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "SetNodePoolAutoscaling" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "SetLoggingService" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "SetMonitoringService" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "SetAddonsConfig" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "SetLocations" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "UpdateMaster" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "SetMasterAuth" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "CancelOperation" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "CreateNodePool" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "RollbackNodePoolUpgrade" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "SetNodePoolManagement" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "SetLabels" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "SetLegacyAbac" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "StartIPRotation" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "CompleteIPRotation" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "SetNodePoolSize" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "SetNetworkPolicy" + }, + { + "service": "google.container.v1.ClusterManager", + "method": "SetMaintenancePolicy" + } + ], + "timeout": "45s" + } + ] +} diff --git a/google/container/v1/container_v1.yaml b/google/container/v1/container_v1.yaml new file mode 100644 index 000000000..fae84fcd2 --- /dev/null +++ b/google/container/v1/container_v1.yaml @@ -0,0 +1,26 @@ +type: google.api.Service +config_version: 3 +name: container.googleapis.com +title: Kubernetes Engine API + +apis: +- name: google.container.v1.ClusterManager + +documentation: + summary: |- + Builds and manages container-based applications, powered by the open source + Kubernetes technology. + +backend: + rules: + - selector: 'google.container.v1.ClusterManager.*' + deadline: 20.0 + - selector: google.container.v1.ClusterManager.CreateCluster + deadline: 45.0 + +authentication: + rules: + - selector: 'google.container.v1.ClusterManager.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/container/v1beta1/BUILD.bazel b/google/container/v1beta1/BUILD.bazel new file mode 100644 index 000000000..113720e78 --- /dev/null +++ b/google/container/v1beta1/BUILD.bazel @@ -0,0 +1,358 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "container_proto", + srcs = [ + "cluster_service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "container_proto_with_info", + deps = [ + ":container_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "container_java_proto", + deps = [":container_proto"], +) + +java_grpc_library( + name = "container_java_grpc", + srcs = [":container_proto"], + deps = [":container_java_proto"], +) + +java_gapic_library( + name = "container_java_gapic", + src = ":container_proto_with_info", + gapic_yaml = "container_gapic.yaml", + package = "google.container.v1beta1", + service_yaml = "container_v1beta1.yaml", + test_deps = [ + ":container_java_grpc", + ], + deps = [ + ":container_java_proto", + ], +) + +java_gapic_test( + name = "container_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.container.v1beta1.ClusterManagerClientTest", + ], + runtime_deps = [":container_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-container-v1beta1-java", + deps = [ + ":container_java_gapic", + ":container_java_grpc", + ":container_java_proto", + ":container_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "container_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/container/v1beta1", + protos = [":container_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "container_go_gapic", + srcs = [":container_proto_with_info"], + grpc_service_config = "container_grpc_service_config.json", + importpath = "cloud.google.com/go/container/apiv1beta1;container", + service_yaml = "container_v1beta1.yaml", + deps = [ + ":container_go_proto", + ], +) + +go_test( + name = "container_go_gapic_test", + srcs = [":container_go_gapic_srcjar_test"], + embed = [":container_go_gapic"], + importpath = "cloud.google.com/go/container/apiv1beta1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-container-v1beta1-go", + deps = [ + ":container_go_gapic", + ":container_go_gapic_srcjar-test.srcjar", + ":container_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "container_moved_proto", + srcs = [":container_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "container_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":container_moved_proto"], +) + +py_grpc_library( + name = "container_py_grpc", + srcs = [":container_moved_proto"], + deps = [":container_py_proto"], +) + +py_gapic_library( + name = "container_py_gapic", + src = ":container_proto_with_info", + gapic_yaml = "container_gapic.yaml", + package = "google.container.v1beta1", + service_yaml = "container_v1beta1.yaml", + deps = [ + ":container_py_grpc", + ":container_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "container-v1beta1-py", + deps = [ + ":container_py_gapic", + ":container_py_grpc", + ":container_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "container_php_proto", + deps = [":container_proto"], +) + +php_grpc_library( + name = "container_php_grpc", + srcs = [":container_proto"], + deps = [":container_php_proto"], +) + +php_gapic_library( + name = "container_php_gapic", + src = ":container_proto_with_info", + gapic_yaml = "container_gapic.yaml", + package = "google.container.v1beta1", + service_yaml = "container_v1beta1.yaml", + deps = [ + ":container_php_grpc", + ":container_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-container-v1beta1-php", + deps = [ + ":container_php_gapic", + ":container_php_grpc", + ":container_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "container_nodejs_gapic", + src = ":container_proto_with_info", + gapic_yaml = "container_gapic.yaml", + package = "google.container.v1beta1", + service_yaml = "container_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "container-v1beta1-nodejs", + deps = [ + ":container_nodejs_gapic", + ":container_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "container_ruby_proto", + deps = [":container_proto"], +) + +ruby_grpc_library( + name = "container_ruby_grpc", + srcs = [":container_proto"], + deps = [":container_ruby_proto"], +) + +ruby_gapic_library( + name = "container_ruby_gapic", + src = ":container_proto_with_info", + gapic_yaml = "container_gapic.yaml", + package = "google.container.v1beta1", + service_yaml = "container_v1beta1.yaml", + deps = [ + ":container_ruby_grpc", + ":container_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-container-v1beta1-ruby", + deps = [ + ":container_ruby_gapic", + ":container_ruby_grpc", + ":container_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "container_csharp_proto", + deps = [":container_proto"], +) + +csharp_grpc_library( + name = "container_csharp_grpc", + srcs = [":container_proto"], + deps = [":container_csharp_proto"], +) + +csharp_gapic_library( + name = "container_csharp_gapic", + src = ":container_proto_with_info", + gapic_yaml = "container_gapic.yaml", + package = "google.container.v1beta1", + service_yaml = "container_v1beta1.yaml", + deps = [ + ":container_csharp_grpc", + ":container_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-container-v1beta1-csharp", + deps = [ + ":container_csharp_gapic", + ":container_csharp_grpc", + ":container_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/container/v1beta1/cluster_service.proto b/google/container/v1beta1/cluster_service.proto index 37918d7c1..711ea2a9b 100644 --- a/google/container/v1beta1/cluster_service.proto +++ b/google/container/v1beta1/cluster_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,9 +18,10 @@ syntax = "proto3"; package google.container.v1beta1; import "google/api/annotations.proto"; -import "google/iam/v1/iam_policy.proto"; -import "google/iam/v1/policy.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Container.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/container/v1beta1;container"; @@ -28,10 +29,13 @@ option java_multiple_files = true; option java_outer_classname = "ClusterServiceProto"; option java_package = "com.google.container.v1beta1"; option php_namespace = "Google\\Cloud\\Container\\V1beta1"; - +option ruby_package = "Google::Cloud::Container::V1beta1"; // Google Kubernetes Engine Cluster Manager v1beta1 service ClusterManager { + option (google.api.default_host) = "container.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Lists all clusters owned by a project in either the specified zone or all // zones. rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { @@ -41,6 +45,7 @@ service ClusterManager { get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters" } }; + option (google.api.method_signature) = "project_id,zone"; } // Gets the details for a specific cluster. @@ -51,21 +56,22 @@ service ClusterManager { get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; } // Creates a cluster, consisting of the specified number and type of Google // Compute Engine instances. // // By default, the cluster is created in the project's - // [default network](/compute/docs/networks-and-firewalls#networks). + // [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). // // One firewall is added for the cluster. After cluster creation, - // the cluster creates routes for each node to allow the containers + // the Kubelet creates routes for each node to allow the containers // on that node to communicate with all other instances in the // cluster. // // Finally, an entry is added to the project's global metadata indicating - // which CIDR range is being used by the cluster. + // which CIDR range the cluster is using. rpc CreateCluster(CreateClusterRequest) returns (Operation) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*/locations/*}/clusters" @@ -75,6 +81,7 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster"; } // Updates the settings for a specific cluster. @@ -87,6 +94,7 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,update"; } // Updates the version and/or image type of a specific node pool. @@ -123,6 +131,7 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,logging_service"; } // Sets the monitoring service for a specific cluster. @@ -135,6 +144,7 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,monitoring_service"; } // Sets the addons for a specific cluster. @@ -147,6 +157,7 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,addons_config"; } // Sets the locations for a specific cluster. @@ -159,6 +170,7 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,locations"; } // Updates the master for a specific cluster. @@ -171,12 +183,12 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,master_version"; } - // Used to set master auth materials. Currently supports :- - // Changing the admin password for a specific cluster. - // This can be either via password generation or explicitly set. - // Modify basic_auth.csv and reset the K8S API server. + // Sets master auth materials. Currently supports changing the admin password + // or a specific cluster, either via password generation or explicitly setting + // the password. rpc SetMasterAuth(SetMasterAuthRequest) returns (Operation) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMasterAuth" @@ -194,9 +206,9 @@ service ClusterManager { // Firewalls and routes that were configured during cluster creation // are also deleted. // - // Other Google Compute Engine resources that might be in use by the cluster - // (e.g. load balancer resources) will not be deleted if they weren't present - // at the initial create time. + // Other Google Compute Engine resources that might be in use by the cluster, + // such as load balancer resources, are not deleted if they weren't present + // when the cluster was initially created. rpc DeleteCluster(DeleteClusterRequest) returns (Operation) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/clusters/*}" @@ -204,9 +216,10 @@ service ClusterManager { delete: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; } - // Lists all operations in a project in a specific zone or all zones. + // Lists all operations in a project in the specified zone or all zones. rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*}/operations" @@ -214,6 +227,7 @@ service ClusterManager { get: "/v1beta1/projects/{project_id}/zones/{zone}/operations" } }; + option (google.api.method_signature) = "project_id,zone"; } // Gets the specified operation. @@ -224,6 +238,7 @@ service ClusterManager { get: "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}" } }; + option (google.api.method_signature) = "project_id,zone,operation_id"; } // Cancels the specified operation. @@ -236,9 +251,10 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,operation_id"; } - // Returns configuration info about the Kubernetes Engine service. + // Returns configuration info about the Google Kubernetes Engine service. rpc GetServerConfig(GetServerConfigRequest) returns (ServerConfig) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*}/serverConfig" @@ -246,6 +262,7 @@ service ClusterManager { get: "/v1beta1/projects/{project_id}/zones/{zone}/serverconfig" } }; + option (google.api.method_signature) = "project_id,zone"; } // Lists the node pools for a cluster. @@ -256,9 +273,10 @@ service ClusterManager { get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; } - // Retrieves the node pool requested. + // Retrieves the requested node pool. rpc GetNodePool(GetNodePoolRequest) returns (NodePool) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}" @@ -266,6 +284,7 @@ service ClusterManager { get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,node_pool_id"; } // Creates a node pool for a cluster. @@ -278,6 +297,7 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,node_pool"; } // Deletes a node pool from a cluster. @@ -288,10 +308,11 @@ service ClusterManager { delete: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,node_pool_id"; } - // Roll back the previously Aborted or Failed NodePool upgrade. - // This will be an no-op if the last upgrade successfully completed. + // Rolls back a previously Aborted or Failed NodePool upgrade. + // This makes no changes if the last upgrade successfully completed. rpc RollbackNodePoolUpgrade(RollbackNodePoolUpgradeRequest) returns (Operation) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback" @@ -301,6 +322,7 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,node_pool_id"; } // Sets the NodeManagement options for a node pool. @@ -313,6 +335,7 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,node_pool_id,management"; } // Sets labels on a cluster. @@ -325,6 +348,7 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,resource_labels,label_fingerprint"; } // Enables or disables the ABAC authorization mechanism on a cluster. @@ -337,9 +361,10 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,enabled"; } - // Start master IP rotation. + // Starts master IP rotation. rpc StartIPRotation(StartIPRotationRequest) returns (Operation) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:startIpRotation" @@ -349,6 +374,7 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; } // Completes master IP rotation. @@ -361,6 +387,7 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; } // Sets the size for a specific node pool. @@ -375,7 +402,7 @@ service ClusterManager { }; } - // Enables/Disables Network Policy for a cluster. + // Enables or disables Network Policy for a cluster. rpc SetNetworkPolicy(SetNetworkPolicyRequest) returns (Operation) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy" @@ -385,6 +412,7 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,network_policy"; } // Sets the maintenance policy for a cluster. @@ -397,27 +425,30 @@ service ClusterManager { body: "*" } }; + option (google.api.method_signature) = "project_id,zone,cluster_id,maintenance_policy"; } - // Lists subnetworks that are usable for creating clusters in a project. + // Lists subnetworks that can be used for creating clusters in a project. rpc ListUsableSubnetworks(ListUsableSubnetworksRequest) returns (ListUsableSubnetworksResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*}/aggregated/usableSubnetworks" }; + option (google.api.method_signature) = "parent"; } - // Used to fetch locations that offer GKE. + // Fetches locations that offer Google Kubernetes Engine. rpc ListLocations(ListLocationsRequest) returns (ListLocationsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*}/locations" }; + option (google.api.method_signature) = "parent"; } } // Parameters that describe the nodes in a cluster. message NodeConfig { // The name of a Google Compute Engine [machine - // type](/compute/docs/machine-types) (e.g. + // type](https://cloud.google.com/compute/docs/machine-types) (e.g. // `n1-standard-1`). // // If unspecified, the default machine type is @@ -440,7 +471,7 @@ message NodeConfig { // persistent storage on your nodes. // * `https://www.googleapis.com/auth/devstorage.read_only` is required for // communicating with **gcr.io** - // (the [Google Container Registry](/container-registry/)). + // (the [Google Container Registry](https://cloud.google.com/container-registry/)). // // If unspecified, no scopes are added, unless Cloud Logging or Cloud // Monitoring are enabled, in which case their required scopes will be added. @@ -460,14 +491,22 @@ message NodeConfig { // "cluster-name" // "cluster-uid" // "configure-sh" + // "containerd-configure-sh" // "enable-oslogin" // "gci-ensure-gke-docker" + // "gci-metrics-enabled" // "gci-update-strategy" // "instance-template" // "kube-env" // "startup-script" // "user-data" - // + // "disable-address-manager" + // "windows-startup-script-ps1" + // "common-psm1" + // "k8s-node-setup-psm1" + // "install-ssh-psm1" + // "user-profile-psm1" + // "serial-port-logging-enable" // Values are free-form strings, and only have meaning as interpreted by // the image running in the instance. The only restriction placed on them is // that each value's size must be less than or equal to 32 KB. @@ -491,9 +530,9 @@ message NodeConfig { // The number of local SSD disks to be attached to the node. // - // The limit for this value is dependant upon the maximum number of + // The limit for this value is dependent upon the maximum number of // disks available on a machine per zone. See: - // https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits + // https://cloud.google.com/compute/docs/disks/local-ssd // for more information. int32 local_ssd_count = 7; @@ -525,6 +564,7 @@ message NodeConfig { // minCpuPlatform: "Intel Sandy Bridge". For more // information, read [how to specify min CPU // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) + // To unset the min cpu platform field pass "automatic" as field value. string min_cpu_platform = 13; // The workload metadata configuration for this node. @@ -535,6 +575,27 @@ message NodeConfig { // For more information, including usage and the valid values, see: // https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ repeated NodeTaint taints = 15; + + // Shielded Instance options. + ShieldedInstanceConfig shielded_instance_config = 20; +} + +// A set of Shielded Instance options. +message ShieldedInstanceConfig { + // Defines whether the instance has Secure Boot enabled. + // + // Secure Boot helps ensure that the system only runs authentic software by + // verifying the digital signature of all boot components, and halting the + // boot process if signature verification fails. + bool enable_secure_boot = 1; + + // Defines whether the instance has integrity monitoring enabled. + // + // Enables monitoring and attestation of the boot integrity of the instance. + // The attestation is performed against the integrity policy baseline. This + // baseline is initially derived from the implicitly trusted boot image when + // the instance is created. + bool enable_integrity_monitoring = 2; } // Kubernetes taint is comprised of three fields: key, value, and effect. Effect @@ -620,7 +681,11 @@ message AddonsConfig { HorizontalPodAutoscaling horizontal_pod_autoscaling = 2; // Configuration for the Kubernetes Dashboard. - KubernetesDashboard kubernetes_dashboard = 3; + // This addon is deprecated, and will be disabled in 1.15. It is recommended + // to use the Cloud Console to manage and monitor your Kubernetes clusters, + // workloads and applications. For more information, see: + // https://cloud.google.com/kubernetes-engine/docs/concepts/dashboards + KubernetesDashboard kubernetes_dashboard = 3 [deprecated = true]; // Configuration for NetworkPolicy. This only tracks whether the addon // is enabled or not on the Master, it does not track whether network policy @@ -906,6 +971,17 @@ message PodSecurityPolicyConfig { bool enabled = 1; } +// Configuration for returning group information from authenticators. +message AuthenticatorGroupsConfig { + // Whether this cluster should return group membership lookups + // during authentication using a group of security groups. + bool enabled = 1; + + // The name of the security group-of-groups to be used. Only relevant + // if enabled = true. + string security_group = 2; +} + // A Google Kubernetes Engine cluster. message Cluster { // The current status of the cluster. @@ -938,7 +1014,8 @@ message Cluster { } // The name of this cluster. The name must be unique within this project - // and zone, and can be up to 40 characters with the following restrictions: + // and location (e.g. zone or region), and can be up to 40 characters with + // the following restrictions: // // * Lowercase letters, numbers, and hyphens only. // * Must start with a letter. @@ -956,19 +1033,22 @@ message Cluster { // "node_pool" object, since this configuration (along with the // "node_config") will be used to create a "NodePool" object with an // auto-generated name. Do not use this and a node_pool at the same time. - int32 initial_node_count = 3; + // + // This field is deprecated, use node_pool.initial_node_count instead. + int32 initial_node_count = 3 [deprecated = true]; // Parameters used in creating the cluster's nodes. - // See `nodeConfig` for the description of its properties. // For requests, this field should only be used in lieu of a // "node_pool" object, since this configuration (along with the // "initial_node_count") will be used to create a "NodePool" object with an // auto-generated name. Do not use this and a node_pool at the same time. // For responses, this field will be populated with the node configuration of - // the first node pool. + // the first node pool. (For configuration of each node pool, see + // `node_pool.config`) // // If unspecified, the defaults are used. - NodeConfig node_config = 4; + // This field is deprecated, use node_pool.config instead. + NodeConfig node_config = 4 [deprecated = true]; // The authentication information for accessing the master endpoint. // If unspecified, the defaults are used: @@ -994,7 +1074,7 @@ message Cluster { string monitoring_service = 7; // The name of the Google Compute Engine - // [network](/compute/docs/networks-and-firewalls#networks) to which the + // [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which the // cluster is connected. If left unspecified, the `default` network // will be used. On output this shows the network ID instead of // the name. @@ -1010,7 +1090,7 @@ message Cluster { AddonsConfig addons_config = 10; // The name of the Google Compute Engine - // [subnetwork](/compute/docs/subnetworks) to which the + // [subnetwork](https://cloud.google.com/compute/docs/subnetworks) to which the // cluster is connected. On output this shows the subnetwork ID instead of // the name. string subnetwork = 11; @@ -1021,7 +1101,7 @@ message Cluster { repeated NodePool node_pools = 12; // The list of Google Compute Engine - // [zones](/compute/docs/zones#available) in which the cluster's nodes + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes // should be located. repeated string locations = 13; @@ -1090,6 +1170,9 @@ message Cluster { // disabled when this config unspecified. ResourceUsageExportConfig resource_usage_export_config = 33; + // Configuration controlling RBAC group membership information. + AuthenticatorGroupsConfig authenticator_groups_config = 34; + // Configuration for private cluster. PrivateClusterConfig private_cluster_config = 37; @@ -1100,7 +1183,7 @@ message Cluster { string self_link = 100; // [Output only] The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field is deprecated, use location instead. string zone = 101 [deprecated = true]; @@ -1132,7 +1215,7 @@ message Cluster { string current_master_version = 104; // [Output only] Deprecated, use - // [NodePool.version](/kubernetes-engine/docs/reference/rest/v1beta1/projects.zones.clusters.nodePool) + // [NodePool.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters.nodePools) // instead. The current version of the node software components. // If they are currently at multiple versions because they're in the process // of being upgraded, this reflects the minimum version of all nodes. @@ -1147,11 +1230,12 @@ message Cluster { // [Output only] Additional information about the current status of this // cluster, if available. - string status_message = 108; + string status_message = 108 [deprecated = true]; // [Output only] The size of the address space on each node for hosting // containers. This is provisioned from within the `container_ipv4_cidr` - // range. + // range. This field will only be set when cluster is in route-based network + // mode. int32 node_ipv4_cidr_size = 109; // [Output only] The IP address range of the Kubernetes services in @@ -1173,8 +1257,8 @@ message Cluster { string expire_time = 113; // [Output only] The name of the Google Compute Engine - // [zone](/compute/docs/regions-zones/regions-zones#available) or - // [region](/compute/docs/regions-zones/regions-zones#available) in which + // [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or + // [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which // the cluster resides. string location = 114; @@ -1186,6 +1270,9 @@ message Cluster { // notation (e.g. `1.2.3.4/29`). string tpu_ipv4_cidr_block = 116; + // Configuration of etcd encryption. + DatabaseEncryption database_encryption = 38; + // Which conditions caused the current cluster state. repeated StatusCondition conditions = 118; } @@ -1211,7 +1298,7 @@ message ClusterUpdate { // Currently available options: // // * "monitoring.googleapis.com/kubernetes" - the Google Cloud Monitoring - // service with Kubernetes-native resource model in Stackdriver + // service with Kubernetes-native resource model // * "monitoring.googleapis.com" - the Google Cloud Monitoring service // * "none" - no metrics will be exported from the cluster string desired_monitoring_service = 5; @@ -1220,9 +1307,9 @@ message ClusterUpdate { AddonsConfig desired_addons_config = 6; // The node pool to be upgraded. This field is mandatory if - // "desired_node_version", "desired_image_family" or - // "desired_node_pool_autoscaling" is specified and there is more than one - // node pool on the cluster. + // "desired_node_version", "desired_image_family", + // "desired_node_pool_autoscaling", or "desired_workload_metadata_config" + // is specified and there is more than one node pool on the cluster. string desired_node_pool_id = 7; // The desired image type for the node pool. @@ -1236,7 +1323,7 @@ message ClusterUpdate { NodePoolAutoscaling desired_node_pool_autoscaling = 9; // The desired list of Google Compute Engine - // [zones](/compute/docs/zones#available) in which the cluster's nodes + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes // should be located. Changing the locations a cluster is in will result // in nodes being either created or removed from the cluster, depending on // whether locations are being added or removed. @@ -1260,7 +1347,7 @@ message ClusterUpdate { // Currently available options: // // * "logging.googleapis.com/kubernetes" - the Google Cloud Logging - // service with Kubernetes-native resource model in Stackdriver + // service with Kubernetes-native resource model // * "logging.googleapis.com" - the Google Cloud Logging service // * "none" - no logs will be exported from the cluster string desired_logging_service = 19; @@ -1271,6 +1358,9 @@ message ClusterUpdate { // Cluster-level Vertical Pod Autoscaling configuration. VerticalPodAutoscaling desired_vertical_pod_autoscaling = 22; + // The desired config of Intra-node visibility. + IntraNodeVisibilityConfig desired_intra_node_visibility_config = 26; + // The Kubernetes version to change the master to. The only valid value is the // latest supported version. // @@ -1364,7 +1454,7 @@ message Operation { string name = 1; // The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the operation + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation // is taking place. // This field is deprecated, use location instead. string zone = 2 [deprecated = true]; @@ -1379,7 +1469,7 @@ message Operation { string detail = 8; // If an error has occurred, a textual description of the error. - string status_message = 5; + string status_message = 5 [deprecated = true]; // Server-defined URL for the resource. string self_link = 6; @@ -1388,8 +1478,8 @@ message Operation { string target_link = 7; // [Output only] The name of the Google Compute Engine - // [zone](/compute/docs/regions-zones/regions-zones#available) or - // [region](/compute/docs/regions-zones/regions-zones#available) in which + // [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or + // [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which // the cluster resides. string location = 9; @@ -1454,95 +1544,131 @@ message OperationProgress { // CreateClusterRequest creates a cluster. message CreateClusterRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the parent field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the parent field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // A [cluster - // resource](/container-engine/reference/rest/v1beta1/projects.zones.clusters) - Cluster cluster = 3; + // Required. A [cluster + // resource](https://cloud.google.com/container-engine/reference/rest/v1beta1/projects.zones.clusters) + Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; // The parent (project and location) where the cluster will be created. - // Specified in the format 'projects/*/locations/*'. + // Specified in the format `projects/*/locations/*`. string parent = 5; } // GetClusterRequest gets the settings of a cluster. message GetClusterRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to retrieve. + // Required. Deprecated. The name of the cluster to retrieve. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; // The name (project, location, cluster) of the cluster to retrieve. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 5; } // UpdateClusterRequest updates the settings of a cluster. message UpdateClusterRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to upgrade. + // Required. Deprecated. The name of the cluster to upgrade. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // A description of the update. - ClusterUpdate update = 4; + // Required. A description of the update. + ClusterUpdate update = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster) of the cluster to update. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 5; } // SetNodePoolVersionRequest updates the version of a node pool. message UpdateNodePoolRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to upgrade. + // Required. Deprecated. The name of the cluster to upgrade. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the node pool to upgrade. + // Required. Deprecated. The name of the node pool to upgrade. // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 [deprecated = true]; + string node_pool_id = 4 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // The Kubernetes version to change the nodes to (typically an + // Required. The Kubernetes version to change the nodes to (typically an // upgrade). // // Users may specify either explicit versions offered by Kubernetes Engine or @@ -1553,180 +1679,240 @@ message UpdateNodePoolRequest { // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version // - "1.X.Y-gke.N": picks an explicit Kubernetes version // - "-": picks the Kubernetes master version - string node_version = 5; + string node_version = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. The desired image type for the node pool. + string image_type = 6 [(google.api.field_behavior) = REQUIRED]; // The desired image type for the node pool. - string image_type = 6; + WorkloadMetadataConfig workload_metadata_config = 14; // The name (project, location, cluster, node pool) of the node pool to // update. Specified in the format - // 'projects/*/locations/*/clusters/*/nodePools/*'. + // `projects/*/locations/*/clusters/*/nodePools/*`. string name = 8; } // SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. message SetNodePoolAutoscalingRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to upgrade. + // Required. Deprecated. The name of the cluster to upgrade. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the node pool to upgrade. + // Required. Deprecated. The name of the node pool to upgrade. // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 [deprecated = true]; + string node_pool_id = 4 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Autoscaling configuration for the node pool. - NodePoolAutoscaling autoscaling = 5; + // Required. Autoscaling configuration for the node pool. + NodePoolAutoscaling autoscaling = 5 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster, node pool) of the node pool to set // autoscaler settings. Specified in the format - // 'projects/*/locations/*/clusters/*/nodePools/*'. + // `projects/*/locations/*/clusters/*/nodePools/*`. string name = 6; } // SetLoggingServiceRequest sets the logging service of a cluster. message SetLoggingServiceRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to upgrade. + // Required. Deprecated. The name of the cluster to upgrade. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // The logging service the cluster should use to write metrics. + // Required. The logging service the cluster should use to write metrics. // Currently available options: // // * "logging.googleapis.com" - the Google Cloud Logging service // * "none" - no metrics will be exported from the cluster - string logging_service = 4; + string logging_service = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster) of the cluster to set logging. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 5; } // SetMonitoringServiceRequest sets the monitoring service of a cluster. message SetMonitoringServiceRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to upgrade. + // Required. Deprecated. The name of the cluster to upgrade. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // The monitoring service the cluster should use to write metrics. + // Required. The monitoring service the cluster should use to write metrics. // Currently available options: // // * "monitoring.googleapis.com" - the Google Cloud Monitoring service // * "none" - no metrics will be exported from the cluster - string monitoring_service = 4; + string monitoring_service = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster) of the cluster to set monitoring. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 6; } // SetAddonsRequest sets the addons associated with the cluster. message SetAddonsConfigRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to upgrade. + // Required. Deprecated. The name of the cluster to upgrade. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // The desired configurations for the various addons available to run in the + // Required. The desired configurations for the various addons available to run in the // cluster. - AddonsConfig addons_config = 4; + AddonsConfig addons_config = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster) of the cluster to set addons. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 6; } // SetLocationsRequest sets the locations of the cluster. message SetLocationsRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to upgrade. + // Required. Deprecated. The name of the cluster to upgrade. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // The desired list of Google Compute Engine - // [zones](/compute/docs/zones#available) in which the cluster's nodes + // Required. The desired list of Google Compute Engine + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes // should be located. Changing the locations a cluster is in will result // in nodes being either created or removed from the cluster, depending on // whether locations are being added or removed. // // This list must always include the cluster's primary zone. - repeated string locations = 4; + repeated string locations = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster) of the cluster to set locations. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 6; } // UpdateMasterRequest updates the master of the cluster. message UpdateMasterRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to upgrade. + // Required. Deprecated. The name of the cluster to upgrade. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // The Kubernetes version to change the master to. + // Required. The Kubernetes version to change the master to. // // Users may specify either explicit versions offered by // Kubernetes Engine or version aliases, which have the following behavior: @@ -1736,10 +1922,10 @@ message UpdateMasterRequest { // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version // - "1.X.Y-gke.N": picks an explicit Kubernetes version // - "-": picks the default Kubernetes version - string master_version = 4; + string master_version = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster) of the cluster to update. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 7; } @@ -1763,69 +1949,93 @@ message SetMasterAuthRequest { SET_USERNAME = 3; } - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to upgrade. + // Required. Deprecated. The name of the cluster to upgrade. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // The exact form of action to be taken on the master auth. - Action action = 4; + // Required. The exact form of action to be taken on the master auth. + Action action = 4 [(google.api.field_behavior) = REQUIRED]; - // A description of the update. - MasterAuth update = 5; + // Required. A description of the update. + MasterAuth update = 5 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster) of the cluster to set auth. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 7; } // DeleteClusterRequest deletes a cluster. message DeleteClusterRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to delete. + // Required. Deprecated. The name of the cluster to delete. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; // The name (project, location, cluster) of the cluster to delete. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 4; } // ListClustersRequest lists clusters. message ListClustersRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the parent field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides, or "-" for all zones. // This field has been deprecated and replaced by the parent field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; // The parent (project and location) where the clusters will be listed. - // Specified in the format 'projects/*/locations/*'. + // Specified in the format `projects/*/locations/*`. // Location "-" matches all zones and all regions. string parent = 4; } @@ -1843,62 +2053,86 @@ message ListClustersResponse { // GetOperationRequest gets a single operation. message GetOperationRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The server-assigned `name` of the operation. + // Required. Deprecated. The server-assigned `name` of the operation. // This field has been deprecated and replaced by the name field. - string operation_id = 3 [deprecated = true]; + string operation_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; // The name (project, location, operation id) of the operation to get. - // Specified in the format 'projects/*/locations/*/operations/*'. + // Specified in the format `projects/*/locations/*/operations/*`. string name = 5; } // ListOperationsRequest lists operations. message ListOperationsRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the parent field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) to return operations for, or `-` for + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for, or `-` for // all zones. This field has been deprecated and replaced by the parent field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; // The parent (project and location) where the operations will be listed. - // Specified in the format 'projects/*/locations/*'. + // Specified in the format `projects/*/locations/*`. // Location "-" matches all zones and all regions. string parent = 4; } // CancelOperationRequest cancels a single operation. message CancelOperationRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the operation resides. + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The server-assigned `name` of the operation. + // Required. Deprecated. The server-assigned `name` of the operation. // This field has been deprecated and replaced by the name field. - string operation_id = 3 [deprecated = true]; + string operation_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; // The name (project, location, operation id) of the operation to cancel. - // Specified in the format 'projects/*/locations/*/operations/*'. + // Specified in the format `projects/*/locations/*/operations/*`. string name = 4; } @@ -1914,18 +2148,24 @@ message ListOperationsResponse { // Gets the current Kubernetes Engine service configuration. message GetServerConfigRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) to return operations for. + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // The name (project and location) of the server config to get - // Specified in the format 'projects/*/locations/*'. + // The name (project and location) of the server config to get, + // specified in the format `projects/*/locations/*`. string name = 4; } @@ -1949,103 +2189,145 @@ message ServerConfig { // CreateNodePoolRequest creates a node pool for a cluster. message CreateNodePoolRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). // This field has been deprecated and replaced by the parent field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the parent field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster. + // Required. Deprecated. The name of the cluster. // This field has been deprecated and replaced by the parent field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // The node pool to create. - NodePool node_pool = 4; + // Required. The node pool to create. + NodePool node_pool = 4 [(google.api.field_behavior) = REQUIRED]; // The parent (project, location, cluster id) where the node pool will be // created. Specified in the format - // 'projects/*/locations/*/clusters/*'. + // `projects/*/locations/*/clusters/*`. string parent = 6; } // DeleteNodePoolRequest deletes a node pool for a cluster. message DeleteNodePoolRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster. + // Required. Deprecated. The name of the cluster. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the node pool to delete. + // Required. Deprecated. The name of the node pool to delete. // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 [deprecated = true]; + string node_pool_id = 4 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; // The name (project, location, cluster, node pool id) of the node pool to // delete. Specified in the format - // 'projects/*/locations/*/clusters/*/nodePools/*'. + // `projects/*/locations/*/clusters/*/nodePools/*`. string name = 6; } // ListNodePoolsRequest lists the node pool(s) for a cluster. message ListNodePoolsRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). // This field has been deprecated and replaced by the parent field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the parent field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster. + // Required. Deprecated. The name of the cluster. // This field has been deprecated and replaced by the parent field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; // The parent (project, location, cluster id) where the node pools will be - // listed. Specified in the format 'projects/*/locations/*/clusters/*'. + // listed. Specified in the format `projects/*/locations/*/clusters/*`. string parent = 5; } // GetNodePoolRequest retrieves a node pool for a cluster. message GetNodePoolRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster. + // Required. Deprecated. The name of the cluster. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the node pool. + // Required. Deprecated. The name of the node pool. // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 [deprecated = true]; + string node_pool_id = 4 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; // The name (project, location, cluster, node pool id) of the node pool to // get. Specified in the format - // 'projects/*/locations/*/clusters/*/nodePools/*'. + // `projects/*/locations/*/clusters/*/nodePools/*`. string name = 6; } @@ -2106,7 +2388,7 @@ message NodePool { string version = 101; // [Output only] The resource URLs of the [managed instance - // groups](/compute/docs/instance-groups/creating-groups-of-managed-instances) + // groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) // associated with this node pool. repeated string instance_group_urls = 102; @@ -2115,7 +2397,7 @@ message NodePool { // [Output only] Additional information about the current status of this // node pool instance, if available. - string status_message = 104; + string status_message = 104 [deprecated = true]; // Autoscaler configuration for this NodePool. Autoscaler is enabled // only if a valid configuration is present. @@ -2130,6 +2412,9 @@ message NodePool { // Which conditions caused the current node pool state. repeated StatusCondition conditions = 105; + + // [Output only] The pod CIDR block size per node in this node pool. + int32 pod_ipv4_cidr_size = 7; } // NodeManagement defines the set of node management services turned on for the @@ -2162,6 +2447,13 @@ message AutoUpgradeOptions { message MaintenancePolicy { // Specifies the maintenance window in which maintenance may be performed. MaintenanceWindow window = 1; + + // A hash identifying the version of this policy, so that updates to fields of + // the policy won't accidentally undo intermediate changes (and so that users + // of the API unaware of some fields won't accidentally remove other fields). + // Make a get() request to the cluster to get the current + // resource version and include it with requests to set the policy. + string resource_version = 3; } // MaintenanceWindow defines the maintenance window to be used for the cluster. @@ -2171,13 +2463,67 @@ message MaintenanceWindow { oneof policy { // DailyMaintenanceWindow specifies a daily maintenance operation window. DailyMaintenanceWindow daily_maintenance_window = 2; + + // RecurringWindow specifies some number of recurring time periods for + // maintenance to occur. The time windows may be overlapping. If no + // maintenance windows are set, maintenance can occur at any time. + RecurringTimeWindow recurring_window = 3; } + + // Exceptions to maintenance window. Non-emergency maintenance should not + // occur in these windows. + map maintenance_exclusions = 4; +} + +// Represents an arbitrary window of time. +message TimeWindow { + // The time that the window first starts. + google.protobuf.Timestamp start_time = 1; + + // The time that the window ends. The end time should take place after the + // start time. + google.protobuf.Timestamp end_time = 2; +} + +// Represents an arbitrary window of time that recurs. +message RecurringTimeWindow { + // The window of the first recurrence. + TimeWindow window = 1; + + // An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how + // this window reccurs. They go on for the span of time between the start and + // end time. + // + // For example, to have something repeat every weekday, you'd use: + // FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR + // To repeat some window daily (equivalent to the DailyMaintenanceWindow): + // FREQ=DAILY + // For the first weekend of every month: + // FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU + // This specifies how frequently the window starts. Eg, if you wanted to have + // a 9-5 UTC-4 window every weekday, you'd use something like: + // + // start time = 2019-01-01T09:00:00-0400 + // end time = 2019-01-01T17:00:00-0400 + // recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR + // + // Windows can span multiple days. Eg, to make the window encompass every + // weekend from midnight Saturday till the last minute of Sunday UTC: + // + // start time = 2019-01-05T00:00:00Z + // end time = 2019-01-07T23:59:00Z + // recurrence = FREQ=WEEKLY;BYDAY=SA + // + // Note the start and end time's specific dates are largely arbitrary except + // to specify duration of the window and when it first starts. + // The FREQ values of HOURLY, MINUTELY, and SECONDLY are not supported. + string recurrence = 2; } // Time window specified for daily maintenance operations. message DailyMaintenanceWindow { // Time within the maintenance window to start the maintenance operations. - // It must be in format "HH:MM”, where HH : [00-23] and MM : [00-59] GMT. + // It must be in format "HH:MM", where HH : [00-23] and MM : [00-59] GMT. string start_time = 2; // [Output only] Duration of the time window, automatically chosen to be @@ -2188,62 +2534,86 @@ message DailyMaintenanceWindow { // SetNodePoolManagementRequest sets the node management properties of a node // pool. message SetNodePoolManagementRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to update. + // Required. Deprecated. The name of the cluster to update. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the node pool to update. + // Required. Deprecated. The name of the node pool to update. // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 [deprecated = true]; + string node_pool_id = 4 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // NodeManagement configuration for the node pool. - NodeManagement management = 5; + // Required. NodeManagement configuration for the node pool. + NodeManagement management = 5 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster, node pool id) of the node pool to set // management properties. Specified in the format - // 'projects/*/locations/*/clusters/*/nodePools/*'. + // `projects/*/locations/*/clusters/*/nodePools/*`. string name = 7; } // SetNodePoolSizeRequest sets the size a node // pool. message SetNodePoolSizeRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to update. + // Required. Deprecated. The name of the cluster to update. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the node pool to update. + // Required. Deprecated. The name of the node pool to update. // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 [deprecated = true]; + string node_pool_id = 4 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // The desired node count for the pool. - int32 node_count = 5; + // Required. The desired node count for the pool. + int32 node_count = 5 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster, node pool id) of the node pool to set // size. - // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. + // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. string name = 7; } @@ -2251,28 +2621,40 @@ message SetNodePoolSizeRequest { // NodePool upgrade. This will be an no-op if the last upgrade successfully // completed. message RollbackNodePoolUpgradeRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to rollback. + // Required. Deprecated. The name of the cluster to rollback. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the node pool to rollback. + // Required. Deprecated. The name of the node pool to rollback. // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 [deprecated = true]; + string node_pool_id = 4 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; // The name (project, location, cluster, node pool id) of the node poll to // rollback upgrade. - // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. + // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. string name = 6; } @@ -2293,6 +2675,26 @@ message ClusterAutoscaling { // Contains global constraints regarding minimum and maximum // amount of resources in the cluster. repeated ResourceLimit resource_limits = 2; + + // AutoprovisioningNodePoolDefaults contains defaults for a node pool + // created by NAP. + AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; + + // The list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) + // in which the NodePool's nodes can be created by NAP. + repeated string autoprovisioning_locations = 5; +} + +// AutoprovisioningNodePoolDefaults contains defaults for a node pool created +// by NAP. +message AutoprovisioningNodePoolDefaults { + // Scopes that are used by NAP when creating node pools. If oauth_scopes are + // specified, service_account should be empty. + repeated string oauth_scopes = 1; + + // The Google Cloud Platform Service Account to be used by the node VMs. If + // service_account is specified, scopes should be empty. + string service_account = 2; } // Contains information about amount of some resource in the cluster. @@ -2330,83 +2732,110 @@ message NodePoolAutoscaling { // Engine cluster, which will in turn set them for Google Compute Engine // resources used by that cluster message SetLabelsRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster. + // Required. Deprecated. The name of the cluster. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // The labels to set for that cluster. - map resource_labels = 4; + // Required. The labels to set for that cluster. + map resource_labels = 4 [(google.api.field_behavior) = REQUIRED]; - // The fingerprint of the previous set of labels for this resource, + // Required. The fingerprint of the previous set of labels for this resource, // used to detect conflicts. The fingerprint is initially generated by // Kubernetes Engine and changes after every request to modify or update // labels. You must always provide an up-to-date fingerprint hash when // updating or changing labels. Make a get() request to the // resource to get the latest fingerprint. - string label_fingerprint = 5; + string label_fingerprint = 5 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster id) of the cluster to set labels. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 7; } // SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for // a cluster. message SetLegacyAbacRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster to update. + // Required. Deprecated. The name of the cluster to update. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Whether ABAC authorization will be enabled in the cluster. - bool enabled = 4; + // Required. Whether ABAC authorization will be enabled in the cluster. + bool enabled = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster id) of the cluster to set legacy abac. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 6; } // StartIPRotationRequest creates a new IP for the cluster and then performs // a node upgrade on each node pool to point to the new IP. message StartIPRotationRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster. + // Required. Deprecated. The name of the cluster. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; // The name (project, location, cluster id) of the cluster to start IP - // rotation. Specified in the format 'projects/*/locations/*/clusters/*'. + // rotation. Specified in the format `projects/*/locations/*/clusters/*`. string name = 6; // Whether to rotate credentials during IP rotation. @@ -2415,23 +2844,32 @@ message StartIPRotationRequest { // CompleteIPRotationRequest moves the cluster master back into single-IP mode. message CompleteIPRotationRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster. + // Required. Deprecated. The name of the cluster. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; // The name (project, location, cluster id) of the cluster to complete IP - // rotation. Specified in the format 'projects/*/locations/*/clusters/*'. + // rotation. Specified in the format `projects/*/locations/*/clusters/*`. string name = 7; } @@ -2441,7 +2879,7 @@ message AcceleratorConfig { int64 accelerator_count = 1; // The accelerator type resource name. List of supported accelerators - // [here](/compute/docs/gpus/#Introduction) + // [here](https://cloud.google.com/compute/docs/gpus) string accelerator_type = 2; } @@ -2468,65 +2906,74 @@ message WorkloadMetadataConfig { EXPOSE = 2; } - // NodeMetadata is the configuration for how to expose the node metadata to - // the workload running on the node. + // NodeMetadata is the configuration for how to expose metadata to the + // workloads running on the node. NodeMetadata node_metadata = 1; } // SetNetworkPolicyRequest enables/disables network policy for a cluster. message SetNetworkPolicyRequest { - // Deprecated. The Google Developers Console [project ID or project + // Required. Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; + string project_id = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. // This field has been deprecated and replaced by the name field. - string zone = 2 [deprecated = true]; + string zone = 2 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Deprecated. The name of the cluster. + // Required. Deprecated. The name of the cluster. // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; + string cluster_id = 3 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; - // Configuration options for the NetworkPolicy feature. - NetworkPolicy network_policy = 4; + // Required. Configuration options for the NetworkPolicy feature. + NetworkPolicy network_policy = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster id) of the cluster to set networking - // policy. Specified in the format 'projects/*/locations/*/clusters/*'. + // policy. Specified in the format `projects/*/locations/*/clusters/*`. string name = 6; } // SetMaintenancePolicyRequest sets the maintenance policy for a cluster. message SetMaintenancePolicyRequest { - // The Google Developers Console [project ID or project + // Required. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The name of the Google Compute Engine - // [zone](/compute/docs/zones#available) in which the cluster + // Required. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + string zone = 2 [(google.api.field_behavior) = REQUIRED]; - // The name of the cluster to update. - string cluster_id = 3; + // Required. The name of the cluster to update. + string cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; - // The maintenance policy to be set for the cluster. An empty field + // Required. The maintenance policy to be set for the cluster. An empty field // clears the existing maintenance policy. - MaintenancePolicy maintenance_policy = 4; + MaintenancePolicy maintenance_policy = 4 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster id) of the cluster to set maintenance // policy. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // Specified in the format `projects/*/locations/*/clusters/*`. string name = 5; } // ListLocationsRequest is used to request the locations that offer GKE. message ListLocationsRequest { - // Contains the name of the resource requested. - // Specified in the format 'projects/*'. - string parent = 1; + // Required. Contains the name of the resource requested. + // Specified in the format `projects/*`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; } // ListLocationsResponse returns the list of all GKE locations and their @@ -2562,7 +3009,7 @@ message Location { LocationType type = 1; // Contains the name of the resource requested. - // Specified in the format 'projects/*/locations/*'. + // Specified in the format `projects/*/locations/*`. string name = 2; // Whether the location is recomended for GKE cluster scheduling. @@ -2588,8 +3035,12 @@ message StatusCondition { GCE_QUOTA_EXCEEDED = 3; // Cluster state was manually changed by an SRE due to a system logic error. - // More codes TBA SET_BY_OPERATOR = 4; + + // Unable to perform an encrypt operation against the CloudKMS key used for + // etcd level encryption. + // More codes TBA + CLOUD_KMS_KEY_ERROR = 7; } // Machine-friendly representation of the condition @@ -2602,23 +3053,27 @@ message StatusCondition { // NetworkConfig reports the relative names of network & subnetwork. message NetworkConfig { // Output only. The relative name of the Google Compute Engine - // [network][google.container.v1beta1.NetworkConfig.network](/compute/docs/networks-and-firewalls#networks) to which + // [network][google.container.v1beta1.NetworkConfig.network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which // the cluster is connected. // Example: projects/my-project/global/networks/my-network string network = 1; // Output only. The relative name of the Google Compute Engine - // [subnetwork](/compute/docs/vpc) to which the cluster is connected. + // [subnetwork](https://cloud.google.com/compute/docs/vpc) to which the cluster is connected. // Example: projects/my-project/regions/us-central1/subnetworks/my-subnet string subnetwork = 2; + + // Whether Intra-node visibility is enabled for this cluster. + // This makes same node pod to pod traffic visible for VPC network. + bool enable_intra_node_visibility = 5; } // ListUsableSubnetworksRequest requests the list of usable subnetworks. // available to a user for creating clusters. message ListUsableSubnetworksRequest { - // The parent project where subnetworks are usable. - // Specified in the format 'projects/*'. - string parent = 1; + // Required. The parent project where subnetworks are usable. + // Specified in the format `projects/*`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; // Filtering currently only supports equality on the networkProjectId and must // be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` @@ -2717,12 +3172,42 @@ message VerticalPodAutoscaling { bool enabled = 1; } +// IntraNodeVisibilityConfig contains the desired config of the intra-node +// visibility on this cluster. +message IntraNodeVisibilityConfig { + // Enables intra node visibility for this cluster. + bool enabled = 1; +} + // Constraints applied to pods. message MaxPodsConstraint { // Constraint enforced on the max num of pods per node. int64 max_pods_per_node = 1; } +// Configuration of etcd encryption. +message DatabaseEncryption { + // State of etcd encryption. + enum State { + // Should never be set + UNKNOWN = 0; + + // Secrets in etcd are encrypted. + ENCRYPTED = 1; + + // Secrets in etcd are stored in plain text (at etcd level) - this is + // unrelated to Google Compute Engine level full disk encryption. + DECRYPTED = 2; + } + + // Denotes the state of etcd encryption. + State state = 2; + + // Name of CloudKMS key to use for the encryption of secrets in etcd. + // Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key + string key_name = 1; +} + // Configuration for exporting cluster resource usages. message ResourceUsageExportConfig { // Parameters for using BigQuery as the destination of resource usage export. @@ -2731,10 +3216,21 @@ message ResourceUsageExportConfig { string dataset_id = 1; } + // Parameters for controlling consumption metering. + message ConsumptionMeteringConfig { + // Whether to enable consumption metering for this cluster. If enabled, a + // second BigQuery table will be created to hold resource consumption + // records. + bool enabled = 1; + } + // Configuration to use BigQuery as usage export destination. BigQueryDestination bigquery_destination = 1; // Whether to enable network egress metering for this cluster. If enabled, a // daemonset will be created in the cluster to meter network egress traffic. bool enable_network_egress_metering = 2; + + // Configuration to enable resource consumption metering. + ConsumptionMeteringConfig consumption_metering_config = 3; } diff --git a/google/container/v1beta1/container_gapic.legacy.yaml b/google/container/v1beta1/container_gapic.legacy.yaml new file mode 100644 index 000000000..f3e63dd0a --- /dev/null +++ b/google/container/v1beta1/container_gapic.legacy.yaml @@ -0,0 +1,551 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.container.v1beta1 + python: + package_name: google.cloud.container_v1beta1.gapic + go: + package_name: cloud.google.com/go/container/apiv1beta1 + csharp: + package_name: Google.Cloud.Container.V1beta1 + ruby: + package_name: Google::Cloud::Container::V1beta1 + release_level: BETA + php: + package_name: Google\Cloud\Container\V1beta1 + nodejs: + package_name: container.v1beta1 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: +- name: google.container.v1beta1.ClusterManager + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for smoke test + smoke_test: + method: ListClusters + init_fields: + - project_id=$PROJECT_ID + - zone="us-central1-a" + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # name - The simple name of the method. + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce + # method overloads which allow a client to directly pass request message + # fields as method parameters. This information may or may not be used, + # depending on the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request + # message. + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the + # resource name formats defined in the field_name_patterns + # and response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a + # paging list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It + # defines which fields match the paging pattern in the request. The + # request consists of a page_size_field and a token_field. The + # page_size_field is the name of the optional field specifying the + # maximum number of elements to be returned in the response. The + # token_field is the name of the field in the request containing the + # page token. + # The response specifies response information of the list method. It + # defines which fields match the paging pattern in the response. The + # response consists of a token_field and a resources_field. The + # token_field is the name of the field in the response containing the + # next page token. The resources_field is the name of the field in the + # response containing the list of resources belonging to the page. + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListClusters + flattening: + groups: + - parameters: + - project_id + - zone + required_fields: + - project_id + - zone + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: GetCluster + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + required_fields: + - project_id + - zone + - cluster_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: CreateCluster + flattening: + groups: + - parameters: + - project_id + - zone + - cluster + required_fields: + - project_id + - zone + - cluster + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: UpdateCluster + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - update + required_fields: + - project_id + - zone + - cluster_id + - update + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: UpdateNodePool + required_fields: + - project_id + - zone + - cluster_id + - node_pool_id + - node_version + - image_type + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetNodePoolAutoscaling + required_fields: + - project_id + - zone + - cluster_id + - node_pool_id + - autoscaling + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetLoggingService + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - logging_service + required_fields: + - project_id + - zone + - cluster_id + - logging_service + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetMonitoringService + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - monitoring_service + required_fields: + - project_id + - zone + - cluster_id + - monitoring_service + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetAddonsConfig + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - addons_config + required_fields: + - project_id + - zone + - cluster_id + - addons_config + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetLocations + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - locations + required_fields: + - project_id + - zone + - cluster_id + - locations + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: UpdateMaster + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - master_version + required_fields: + - project_id + - zone + - cluster_id + - master_version + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetMasterAuth + required_fields: + - project_id + - zone + - cluster_id + - action + - update + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: DeleteCluster + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + required_fields: + - project_id + - zone + - cluster_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: ListOperations + flattening: + groups: + - parameters: + - project_id + - zone + required_fields: + - project_id + - zone + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: GetOperation + flattening: + groups: + - parameters: + - project_id + - zone + - operation_id + required_fields: + - project_id + - zone + - operation_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: CancelOperation + flattening: + groups: + - parameters: + - project_id + - zone + - operation_id + required_fields: + - project_id + - zone + - operation_id + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: GetServerConfig + flattening: + groups: + - parameters: + - project_id + - zone + required_fields: + - project_id + - zone + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: ListNodePools + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + required_fields: + - project_id + - zone + - cluster_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: GetNodePool + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - node_pool_id + required_fields: + - project_id + - zone + - cluster_id + - node_pool_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: CreateNodePool + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - node_pool + required_fields: + - project_id + - zone + - cluster_id + - node_pool + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: DeleteNodePool + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - node_pool_id + required_fields: + - project_id + - zone + - cluster_id + - node_pool_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: RollbackNodePoolUpgrade + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - node_pool_id + required_fields: + - project_id + - zone + - cluster_id + - node_pool_id + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetNodePoolManagement + required_fields: + - project_id + - zone + - cluster_id + - node_pool_id + - management + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetLabels + required_fields: + - project_id + - zone + - cluster_id + - resource_labels + - label_fingerprint + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetLegacyAbac + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - enabled + required_fields: + - project_id + - zone + - cluster_id + - enabled + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: StartIPRotation + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + required_fields: + - project_id + - zone + - cluster_id + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: CompleteIPRotation + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + required_fields: + - project_id + - zone + - cluster_id + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetNodePoolSize + required_fields: + - project_id + - zone + - cluster_id + - node_pool_id + - node_count + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetNetworkPolicy + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - network_policy + required_fields: + - project_id + - zone + - cluster_id + - network_policy + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SetMaintenancePolicy + flattening: + groups: + - parameters: + - project_id + - zone + - cluster_id + - maintenance_policy + required_fields: + - project_id + - zone + - cluster_id + - maintenance_policy + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: ListUsableSubnetworks + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: subnetworks + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 + - name: ListLocations + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 20000 diff --git a/google/container/v1beta1/container_gapic.yaml b/google/container/v1beta1/container_gapic.yaml index 20dcd1511..725f78bcb 100644 --- a/google/container/v1beta1/container_gapic.yaml +++ b/google/container/v1beta1/container_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -20,533 +20,9 @@ language_settings: domain_layer_location: google-cloud # A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.container.v1beta1.ClusterManager - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: [] - # Definition for smoke test smoke_test: method: ListClusters init_fields: - project_id=$PROJECT_ID - zone="us-central1-a" - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # name - The simple name of the method. - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce - # method overloads which allow a client to directly pass request message - # fields as method parameters. This information may or may not be used, - # depending on the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request - # message. - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the - # resource name formats defined in the field_name_patterns - # and response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a - # paging list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It - # defines which fields match the paging pattern in the request. The - # request consists of a page_size_field and a token_field. The - # page_size_field is the name of the optional field specifying the - # maximum number of elements to be returned in the response. The - # token_field is the name of the field in the request containing the - # page token. - # The response specifies response information of the list method. It - # defines which fields match the paging pattern in the response. The - # response consists of a token_field and a resources_field. The - # token_field is the name of the field in the response containing the - # next page token. The resources_field is the name of the field in the - # response containing the list of resources belonging to the page. - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: ListClusters - flattening: - groups: - - parameters: - - project_id - - zone - required_fields: - - project_id - - zone - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: GetCluster - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - required_fields: - - project_id - - zone - - cluster_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: CreateCluster - flattening: - groups: - - parameters: - - project_id - - zone - - cluster - required_fields: - - project_id - - zone - - cluster - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: UpdateCluster - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - update - required_fields: - - project_id - - zone - - cluster_id - - update - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: UpdateNodePool - required_fields: - - project_id - - zone - - cluster_id - - node_pool_id - - node_version - - image_type - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetNodePoolAutoscaling - required_fields: - - project_id - - zone - - cluster_id - - node_pool_id - - autoscaling - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetLoggingService - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - logging_service - required_fields: - - project_id - - zone - - cluster_id - - logging_service - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetMonitoringService - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - monitoring_service - required_fields: - - project_id - - zone - - cluster_id - - monitoring_service - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetAddonsConfig - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - addons_config - required_fields: - - project_id - - zone - - cluster_id - - addons_config - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetLocations - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - locations - required_fields: - - project_id - - zone - - cluster_id - - locations - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: UpdateMaster - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - master_version - required_fields: - - project_id - - zone - - cluster_id - - master_version - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetMasterAuth - required_fields: - - project_id - - zone - - cluster_id - - action - - update - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: DeleteCluster - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - required_fields: - - project_id - - zone - - cluster_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: ListOperations - flattening: - groups: - - parameters: - - project_id - - zone - required_fields: - - project_id - - zone - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: GetOperation - flattening: - groups: - - parameters: - - project_id - - zone - - operation_id - required_fields: - - project_id - - zone - - operation_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: CancelOperation - flattening: - groups: - - parameters: - - project_id - - zone - - operation_id - required_fields: - - project_id - - zone - - operation_id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: GetServerConfig - flattening: - groups: - - parameters: - - project_id - - zone - required_fields: - - project_id - - zone - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: ListNodePools - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - required_fields: - - project_id - - zone - - cluster_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: GetNodePool - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - node_pool_id - required_fields: - - project_id - - zone - - cluster_id - - node_pool_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: CreateNodePool - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - node_pool - required_fields: - - project_id - - zone - - cluster_id - - node_pool - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: DeleteNodePool - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - node_pool_id - required_fields: - - project_id - - zone - - cluster_id - - node_pool_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: RollbackNodePoolUpgrade - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - node_pool_id - required_fields: - - project_id - - zone - - cluster_id - - node_pool_id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetNodePoolManagement - required_fields: - - project_id - - zone - - cluster_id - - node_pool_id - - management - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetLabels - required_fields: - - project_id - - zone - - cluster_id - - resource_labels - - label_fingerprint - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetLegacyAbac - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - enabled - required_fields: - - project_id - - zone - - cluster_id - - enabled - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: StartIPRotation - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - required_fields: - - project_id - - zone - - cluster_id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: CompleteIPRotation - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - required_fields: - - project_id - - zone - - cluster_id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetNodePoolSize - required_fields: - - project_id - - zone - - cluster_id - - node_pool_id - - node_count - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetNetworkPolicy - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - network_policy - required_fields: - - project_id - - zone - - cluster_id - - network_policy - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SetMaintenancePolicy - flattening: - groups: - - parameters: - - project_id - - zone - - cluster_id - - maintenance_policy - required_fields: - - project_id - - zone - - cluster_id - - maintenance_policy - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: ListUsableSubnetworks - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: subnetworks - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 - - name: ListLocations - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 20000 diff --git a/google/container/v1beta1/container_grpc_service_config.json b/google/container/v1beta1/container_grpc_service_config.json new file mode 100755 index 000000000..38dbefdb0 --- /dev/null +++ b/google/container/v1beta1/container_grpc_service_config.json @@ -0,0 +1,152 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.container.v1beta1.ClusterManager", + "method": "ListClusters" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "GetCluster" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "DeleteCluster" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "ListOperations" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "GetOperation" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "GetServerConfig" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "ListNodePools" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "GetNodePool" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "DeleteNodePool" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "ListUsableSubnetworks" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "ListLocations" + } + ], + "timeout": "20s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.container.v1beta1.ClusterManager", + "method": "CreateCluster" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "UpdateCluster" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "UpdateNodePool" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "SetNodePoolAutoscaling" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "SetLoggingService" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "SetMonitoringService" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "SetAddonsConfig" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "SetLocations" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "UpdateMaster" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "SetMasterAuth" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "CancelOperation" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "CreateNodePool" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "RollbackNodePoolUpgrade" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "SetNodePoolManagement" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "SetLabels" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "SetLegacyAbac" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "StartIPRotation" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "CompleteIPRotation" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "SetNodePoolSize" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "SetNetworkPolicy" + }, + { + "service": "google.container.v1beta1.ClusterManager", + "method": "SetMaintenancePolicy" + } + ], + "timeout": "45s" + } + ] +} diff --git a/google/container/v1beta1/container_v1beta1.yaml b/google/container/v1beta1/container_v1beta1.yaml new file mode 100644 index 000000000..ca2ecfa05 --- /dev/null +++ b/google/container/v1beta1/container_v1beta1.yaml @@ -0,0 +1,24 @@ +type: google.api.Service +config_version: 3 +name: container.googleapis.com +title: Kubernetes Engine API + +apis: +- name: google.container.v1beta1.ClusterManager + +documentation: + summary: |- + Builds and manages container-based applications, powered by the open source + Kubernetes technology. + +backend: + rules: + - selector: 'google.container.v1beta1.ClusterManager.*' + deadline: 20.0 + +authentication: + rules: + - selector: 'google.container.v1beta1.ClusterManager.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/datastore/BUILD.bazel b/google/datastore/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/datastore/BUILD.bazel +++ b/google/datastore/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/datastore/admin/BUILD.bazel b/google/datastore/admin/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/datastore/admin/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/datastore/admin/artman_datastore_admin.yaml b/google/datastore/admin/artman_datastore_admin.yaml index 78048169a..c0a4c9e5f 100644 --- a/google/datastore/admin/artman_datastore_admin.yaml +++ b/google/datastore/admin/artman_datastore_admin.yaml @@ -3,11 +3,12 @@ common: api_version: v1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1 - service_yaml: datastore_admin.yaml + service_yaml: v1/datastore_admin_v1.yaml gapic_yaml: v1/datastore_admin_gapic.yaml + proto_package: google.datastore.admin.v1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/datastore/admin/v1/BUILD.bazel b/google/datastore/admin/v1/BUILD.bazel new file mode 100644 index 000000000..9f001d168 --- /dev/null +++ b/google/datastore/admin/v1/BUILD.bazel @@ -0,0 +1,364 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "admin_proto", + srcs = [ + "datastore_admin.proto", + "index.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "admin_proto_with_info", + deps = [ + ":admin_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "admin_java_proto", + deps = [":admin_proto"], +) + +java_grpc_library( + name = "admin_java_grpc", + srcs = [":admin_proto"], + deps = [":admin_java_proto"], +) + +java_gapic_library( + name = "admin_java_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "datastore_admin_gapic.yaml", + package = "google.datastore.admin.v1", + service_yaml = "datastore_admin_v1.yaml", + test_deps = [ + ":admin_java_grpc", + ], + deps = [ + ":admin_java_proto", + ], +) + +java_gapic_test( + name = "admin_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.datastore.admin.v1.DatastoreAdminClientTest", + ], + runtime_deps = [":admin_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-datastore-admin-v1-java", + deps = [ + ":admin_java_gapic", + ":admin_java_grpc", + ":admin_java_proto", + ":admin_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "admin_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/datastore/admin/v1", + protos = [":admin_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "admin_go_gapic", + srcs = [":admin_proto_with_info"], + grpc_service_config = "datastore_admin_grpc_service_config.json", + importpath = "cloud.google.com/go/datastore/admin/apiv1;admin", + service_yaml = "datastore_admin_v1.yaml", + deps = [ + ":admin_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + ], +) + +go_test( + name = "admin_go_gapic_test", + srcs = [":admin_go_gapic_srcjar_test"], + embed = [":admin_go_gapic"], + importpath = "cloud.google.com/go/datastore/admin/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-datastore-admin-v1-go", + deps = [ + ":admin_go_gapic", + ":admin_go_gapic_srcjar-test.srcjar", + ":admin_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "admin_moved_proto", + srcs = [":admin_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "admin_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":admin_moved_proto"], +) + +py_grpc_library( + name = "admin_py_grpc", + srcs = [":admin_moved_proto"], + deps = [":admin_py_proto"], +) + +py_gapic_library( + name = "admin_py_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "datastore_admin_gapic.yaml", + package = "google.datastore.admin.v1", + service_yaml = "datastore_admin_v1.yaml", + deps = [ + ":admin_py_grpc", + ":admin_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "datastore-admin-v1-py", + deps = [ + ":admin_py_gapic", + ":admin_py_grpc", + ":admin_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "admin_php_proto", + deps = [":admin_proto"], +) + +php_grpc_library( + name = "admin_php_grpc", + srcs = [":admin_proto"], + deps = [":admin_php_proto"], +) + +php_gapic_library( + name = "admin_php_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "datastore_admin_gapic.yaml", + package = "google.datastore.admin.v1", + service_yaml = "datastore_admin_v1.yaml", + deps = [ + ":admin_php_grpc", + ":admin_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-datastore-admin-v1-php", + deps = [ + ":admin_php_gapic", + ":admin_php_grpc", + ":admin_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "admin_nodejs_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "datastore_admin_gapic.yaml", + package = "google.datastore.admin.v1", + service_yaml = "datastore_admin_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "datastore-admin-v1-nodejs", + deps = [ + ":admin_nodejs_gapic", + ":admin_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "admin_ruby_proto", + deps = [":admin_proto"], +) + +ruby_grpc_library( + name = "admin_ruby_grpc", + srcs = [":admin_proto"], + deps = [":admin_ruby_proto"], +) + +ruby_gapic_library( + name = "admin_ruby_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "datastore_admin_gapic.yaml", + package = "google.datastore.admin.v1", + service_yaml = "datastore_admin_v1.yaml", + deps = [ + ":admin_ruby_grpc", + ":admin_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-datastore-admin-v1-ruby", + deps = [ + ":admin_ruby_gapic", + ":admin_ruby_grpc", + ":admin_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "admin_csharp_proto", + deps = [":admin_proto"], +) + +csharp_grpc_library( + name = "admin_csharp_grpc", + srcs = [":admin_proto"], + deps = [":admin_csharp_proto"], +) + +csharp_gapic_library( + name = "admin_csharp_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "datastore_admin_gapic.yaml", + package = "google.datastore.admin.v1", + service_yaml = "datastore_admin_v1.yaml", + deps = [ + ":admin_csharp_grpc", + ":admin_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-datastore-admin-v1-csharp", + deps = [ + ":admin_csharp_gapic", + ":admin_csharp_grpc", + ":admin_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/datastore/admin/v1/datastore_admin.proto b/google/datastore/admin/v1/datastore_admin.proto index ffcdc00fb..849b1453d 100644 --- a/google/datastore/admin/v1/datastore_admin.proto +++ b/google/datastore/admin/v1/datastore_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,8 @@ syntax = "proto3"; package google.datastore.admin.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/datastore/admin/v1/index.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/timestamp.proto"; @@ -29,6 +31,7 @@ option java_package = "com.google.datastore.admin.v1"; // Google Cloud Datastore Admin API // +// // The Datastore Admin API provides several admin services for Cloud Datastore. // // ----------------------------------------------------------------------------- @@ -88,6 +91,11 @@ option java_package = "com.google.datastore.admin.v1"; // Operations are created by service DatastoreAdmin, // but are accessed via service google.longrunning.Operations. service DatastoreAdmin { + option (google.api.default_host) = "datastore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/datastore"; + // Exports a copy of all or a subset of entities from Google Cloud Datastore // to another storage system, such as Google Cloud Storage. Recent updates to // entities may not be reflected in the export. The export occurs in the @@ -96,12 +104,16 @@ service DatastoreAdmin { // used once the associated operation is done. If an export operation is // cancelled before completion it may leave partial data behind in Google // Cloud Storage. - rpc ExportEntities(ExportEntitiesRequest) - returns (google.longrunning.Operation) { + rpc ExportEntities(ExportEntitiesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/projects/{project_id}:export" body: "*" }; + option (google.api.method_signature) = "project_id,labels,entity_filter,output_url_prefix"; + option (google.longrunning.operation_info) = { + response_type: "ExportEntitiesResponse" + metadata_type: "ExportEntitiesMetadata" + }; } // Imports entities into Google Cloud Datastore. Existing entities with the @@ -109,12 +121,16 @@ service DatastoreAdmin { // progress can be monitored and managed via the Operation resource that is // created. If an ImportEntities operation is cancelled, it is possible // that a subset of the data has already been imported to Cloud Datastore. - rpc ImportEntities(ImportEntitiesRequest) - returns (google.longrunning.Operation) { + rpc ImportEntities(ImportEntitiesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/projects/{project_id}:import" body: "*" }; + option (google.api.method_signature) = "project_id,labels,input_url,entity_filter"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "ImportEntitiesMetadata" + }; } // Gets an index. @@ -183,6 +199,24 @@ message CommonMetadata { State state = 5; } +// Operation types. +enum OperationType { + // Unspecified. + OPERATION_TYPE_UNSPECIFIED = 0; + + // ExportEntities. + EXPORT_ENTITIES = 1; + + // ImportEntities. + IMPORT_ENTITIES = 2; + + // CreateIndex. + CREATE_INDEX = 3; + + // DeleteIndex. + DELETE_INDEX = 4; +} + // Measures the progress of a particular metric. message Progress { // The amount of work that has been completed. Note that this may be greater @@ -197,8 +231,8 @@ message Progress { // The request for // [google.datastore.admin.v1.DatastoreAdmin.ExportEntities][google.datastore.admin.v1.DatastoreAdmin.ExportEntities]. message ExportEntitiesRequest { - // Project ID against which to make the request. - string project_id = 1; + // Required. Project ID against which to make the request. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; // Client-assigned labels. map labels = 2; @@ -206,7 +240,7 @@ message ExportEntitiesRequest { // Description of what data from the project is included in the export. EntityFilter entity_filter = 3; - // Location for the export metadata and data files. + // Required. Location for the export metadata and data files. // // The full resource URL of the external storage location. Currently, only // Google Cloud Storage is supported. So output_url_prefix should be of the @@ -219,24 +253,24 @@ message ExportEntitiesRequest { // // The resulting files will be nested deeper than the specified URL prefix. // The final output URL will be provided in the - // [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url] - // field. That value should be used for subsequent ImportEntities operations. + // [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url] field. That + // value should be used for subsequent ImportEntities operations. // // By nesting the data files deeper, the same Cloud Storage bucket can be used // in multiple ExportEntities operations without conflict. - string output_url_prefix = 4; + string output_url_prefix = 4 [(google.api.field_behavior) = REQUIRED]; } // The request for // [google.datastore.admin.v1.DatastoreAdmin.ImportEntities][google.datastore.admin.v1.DatastoreAdmin.ImportEntities]. message ImportEntitiesRequest { - // Project ID against which to make the request. - string project_id = 1; + // Required. Project ID against which to make the request. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; // Client-assigned labels. map labels = 2; - // The full resource URL of the external storage location. Currently, only + // Required. The full resource URL of the external storage location. Currently, only // Google Cloud Storage is supported. So input_url should be of the form: // `gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE`, where // `BUCKET_NAME` is the name of the Cloud Storage bucket, `NAMESPACE_PATH` is @@ -249,7 +283,7 @@ message ImportEntitiesRequest { // // For more information, see // [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url]. - string input_url = 3; + string input_url = 3 [(google.api.field_behavior) = REQUIRED]; // Optionally specify which kinds/namespaces are to be imported. If provided, // the list must be a subset of the EntityFilter used in creating the export, @@ -305,9 +339,7 @@ message ImportEntitiesMetadata { EntityFilter entity_filter = 4; // The location of the import metadata file. This will be the same value as - // the - // [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url] - // field. + // the [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url] field. string input_url = 5; } @@ -344,8 +376,7 @@ message EntityFilter { repeated string namespace_ids = 2; } -// The request for -// [google.datastore.admin.v1.DatastoreAdmin.GetIndex][google.datastore.admin.v1.DatastoreAdmin.GetIndex]. +// The request for [google.datastore.admin.v1.DatastoreAdmin.GetIndex][google.datastore.admin.v1.DatastoreAdmin.GetIndex]. message GetIndexRequest { // Project ID against which to make the request. string project_id = 1; @@ -391,21 +422,3 @@ message IndexOperationMetadata { // The index resource ID that this operation is acting on. string index_id = 3; } - -// Operation types. -enum OperationType { - // Unspecified. - OPERATION_TYPE_UNSPECIFIED = 0; - - // ExportEntities. - EXPORT_ENTITIES = 1; - - // ImportEntities. - IMPORT_ENTITIES = 2; - - // CreateIndex. - CREATE_INDEX = 3; - - // DeleteIndex. - DELETE_INDEX = 4; -} diff --git a/google/datastore/admin/v1/datastore_admin_gapic.legacy.yaml b/google/datastore/admin/v1/datastore_admin_gapic.legacy.yaml new file mode 100644 index 000000000..b56eeb0ad --- /dev/null +++ b/google/datastore/admin/v1/datastore_admin_gapic.legacy.yaml @@ -0,0 +1,133 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.datastore.admin.v1 + python: + package_name: google.cloud.datastore.admin_v1.gapic + go: + package_name: cloud.google.com/go/datastore/admin/apiv1 + csharp: + package_name: Google.Datastore.Admin.V1 + ruby: + package_name: Google::Cloud::Datastore::Admin::V1 + php: + package_name: Google\Cloud\Datastore\Admin\V1 + nodejs: + package_name: admin.v1 +# A list of API interface configurations. +interfaces: +- name: google.datastore.admin.v1.DatastoreAdmin + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ExportEntities + flattening: + groups: + - parameters: + - project_id + - labels + - entity_filter + - output_url_prefix + required_fields: + - project_id + - output_url_prefix + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 295000 + - name: ImportEntities + flattening: + groups: + - parameters: + - project_id + - labels + - input_url + - entity_filter + required_fields: + - project_id + - input_url + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 295000 diff --git a/google/datastore/admin/v1/datastore_admin_gapic.yaml b/google/datastore/admin/v1/datastore_admin_gapic.yaml index 9d3ad8f88..4febad26a 100644 --- a/google/datastore/admin/v1/datastore_admin_gapic.yaml +++ b/google/datastore/admin/v1/datastore_admin_gapic.yaml @@ -1,11 +1,11 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: package_name: com.google.cloud.datastore.admin.v1 python: - package_name: google.cloud.datastore.admin_v1.gapic + package_name: google.cloud.datastore_admin_v1.gapic go: package_name: cloud.google.com/go/datastore/admin/apiv1 csharp: @@ -16,119 +16,3 @@ language_settings: package_name: Google\Cloud\Datastore\Admin\V1 nodejs: package_name: admin.v1 -# A list of API interface configurations. -interfaces: - # The fully qualified name of the API interface. -- name: google.datastore.admin.v1.DatastoreAdmin - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: [] - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: ExportEntities - flattening: - groups: - - parameters: - - project_id - - labels - - entity_filter - - output_url_prefix - required_fields: - - project_id - - output_url_prefix - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 295000 - - name: ImportEntities - flattening: - groups: - - parameters: - - project_id - - labels - - input_url - - entity_filter - required_fields: - - project_id - - input_url - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 295000 diff --git a/google/datastore/admin/v1/datastore_admin_grpc_service_config.json b/google/datastore/admin/v1/datastore_admin_grpc_service_config.json new file mode 100755 index 000000000..af05db143 --- /dev/null +++ b/google/datastore/admin/v1/datastore_admin_grpc_service_config.json @@ -0,0 +1,48 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.datastore.admin.v1.DatastoreAdmin", + "method": "ExportEntities" + }, + { + "service": "google.datastore.admin.v1.DatastoreAdmin", + "method": "ImportEntities" + }, + { + "service": "google.datastore.admin.v1.DatastoreAdmin", + "method": "CreateIndex" + }, + { + "service": "google.datastore.admin.v1.DatastoreAdmin", + "method": "DeleteIndex" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.datastore.admin.v1.DatastoreAdmin", + "method": "GetIndex" + }, + { + "service": "google.datastore.admin.v1.DatastoreAdmin", + "method": "ListIndexes" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/datastore/admin/datastore_admin.yaml b/google/datastore/admin/v1/datastore_admin_v1.yaml similarity index 71% rename from google/datastore/admin/datastore_admin.yaml rename to google/datastore/admin/v1/datastore_admin_v1.yaml index 112229c5d..836385ebd 100644 --- a/google/datastore/admin/datastore_admin.yaml +++ b/google/datastore/admin/v1/datastore_admin_v1.yaml @@ -1,7 +1,7 @@ type: google.api.Service config_version: 3 name: datastore.googleapis.com -title: Google Cloud Datastore Admin API +title: Cloud Datastore API apis: - name: google.datastore.admin.v1.DatastoreAdmin @@ -17,23 +17,32 @@ documentation: Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application. -http: +backend: rules: - - selector: google.longrunning.Operations.ListOperations - get: '/v1/{name=projects/*}/operations' - - - selector: google.longrunning.Operations.GetOperation - get: '/v1/{name=projects/*/operations/*}' - - - selector: google.longrunning.Operations.DeleteOperation - delete: '/v1/{name=projects/*/operations/*}' + - selector: 'google.datastore.admin.v1.DatastoreAdmin.*' + deadline: 295.0 + - selector: 'google.longrunning.Operations.*' + deadline: 295.0 +http: + rules: - selector: google.longrunning.Operations.CancelOperation post: '/v1/{name=projects/*/operations/*}:cancel' + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=projects/*/operations/*}' + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=projects/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=projects/*}/operations' authentication: rules: - - selector: '*' + - selector: 'google.datastore.admin.v1.DatastoreAdmin.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/datastore + - selector: 'google.longrunning.Operations.*' oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform, diff --git a/google/datastore/admin/v1/index.proto b/google/datastore/admin/v1/index.proto index 15013d557..8907ae0b1 100644 --- a/google/datastore/admin/v1/index.proto +++ b/google/datastore/admin/v1/index.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ syntax = "proto3"; package google.datastore.admin.v1; +import "google/api/field_behavior.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Datastore.Admin.V1"; @@ -25,17 +26,14 @@ option java_outer_classname = "IndexProto"; option java_package = "com.google.datastore.admin.v1"; // A minimal index definition. -// Next tag: 8 message Index { - // Next tag: 3 + // A property of an index. message IndexedProperty { - // The property name to index. - // Required. - string name = 1; + // Required. The property name to index. + string name = 1 [(google.api.field_behavior) = REQUIRED]; - // The indexed property's direction. Must not be DIRECTION_UNSPECIFIED. - // Required. - Direction direction = 2; + // Required. The indexed property's direction. Must not be DIRECTION_UNSPECIFIED. + Direction direction = 2 [(google.api.field_behavior) = REQUIRED]; } // For an ordered index, specifies whether each of the entity's ancestors @@ -96,27 +94,21 @@ message Index { ERROR = 4; } - // Project ID. - // Output only. - string project_id = 1; + // Output only. Project ID. + string project_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The resource ID of the index. - // Output only. - string index_id = 3; + // Output only. The resource ID of the index. + string index_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The entity kind to which this index applies. - // Required. - string kind = 4; + // Required. The entity kind to which this index applies. + string kind = 4 [(google.api.field_behavior) = REQUIRED]; - // The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED. - // Required. - AncestorMode ancestor = 5; + // Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED. + AncestorMode ancestor = 5 [(google.api.field_behavior) = REQUIRED]; - // An ordered sequence of property names and their index attributes. - // Required. - repeated IndexedProperty properties = 6; + // Required. An ordered sequence of property names and their index attributes. + repeated IndexedProperty properties = 6 [(google.api.field_behavior) = REQUIRED]; - // The state of the index. - // Output only. - State state = 7; + // Output only. The state of the index. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/datastore/artman_datastore.legacy.yaml b/google/datastore/artman_datastore.legacy.yaml new file mode 100644 index 000000000..67c0775eb --- /dev/null +++ b/google/datastore/artman_datastore.legacy.yaml @@ -0,0 +1,36 @@ +common: + api_name: datastore + api_version: v1 + organization_name: google-cloud + service_yaml: v1/datastore_v1.yaml + gapic_yaml: v1/datastore_gapic.legacy.yaml + proto_package: google.datastore.v1 + src_proto_paths: + - v1 + proto_deps: + - name: google-common-protos +artifacts: +- name: java_proto + type: PROTOBUF + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON + release_level: BETA +- name: php_gapic + type: GAPIC + language: PHP +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: go_gapic + type: GAPIC + language: GO +- name: csharp_gapic + type: GAPIC + language: CSHARP +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: gapic_config + type: GAPIC_CONFIG diff --git a/google/datastore/artman_datastore.yaml b/google/datastore/artman_datastore.yaml index 787c8fd97..9f5629ba5 100644 --- a/google/datastore/artman_datastore.yaml +++ b/google/datastore/artman_datastore.yaml @@ -2,8 +2,9 @@ common: api_name: datastore api_version: v1 organization_name: google-cloud - service_yaml: datastore.yaml + service_yaml: v1/datastore_v1.yaml gapic_yaml: v1/datastore_gapic.yaml + proto_package: google.datastore.v1 src_proto_paths: - v1 proto_deps: diff --git a/google/datastore/datastore.yaml b/google/datastore/datastore.yaml deleted file mode 100644 index 26822278f..000000000 --- a/google/datastore/datastore.yaml +++ /dev/null @@ -1,20 +0,0 @@ -type: google.api.Service -config_version: 3 -name: datastore.googleapis.com -title: Google Cloud Datastore API - -apis: -- name: google.datastore.v1.Datastore - -documentation: - summary: |- - Accesses the schemaless NoSQL database to provide fully managed, robust, - scalable storage for your application. - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/datastore diff --git a/google/datastore/v1/BUILD.bazel b/google/datastore/v1/BUILD.bazel index 30f787ba9..e7a5111c9 100644 --- a/google/datastore/v1/BUILD.bazel +++ b/google/datastore/v1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -15,6 +18,8 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/type:latlng_proto", "@com_google_protobuf//:struct_proto", "@com_google_protobuf//:timestamp_proto", @@ -24,7 +29,10 @@ proto_library( proto_library_with_info( name = "datastore_proto_with_info", - deps = [":datastore_proto"], + deps = [ + ":datastore_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -32,18 +40,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "datastore_java_proto", deps = [":datastore_proto"], @@ -52,51 +55,40 @@ java_proto_library( java_grpc_library( name = "datastore_java_grpc", srcs = [":datastore_proto"], - deps = [":datastore_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "datastore_resource_name_java_proto", - gapic_yaml = "datastore_gapic.yaml", - deps = [":datastore_proto"], + deps = [":datastore_java_proto"], ) java_gapic_library( name = "datastore_java_gapic", src = ":datastore_proto_with_info", gapic_yaml = "datastore_gapic.yaml", - service_yaml = "//google/datastore:datastore.yaml", - test_deps = [":datastore_java_grpc"], + package = "google.datastore.v1", + service_yaml = "datastore_v1.yaml", + test_deps = [ + ":datastore_java_grpc", + ], deps = [ ":datastore_java_proto", - ":datastore_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":datastore_java_gapic_test", +java_gapic_test( + name = "datastore_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.datastore.v1.DatastoreClientTest", ], -) for test_name in [ - "com.google.cloud.datastore.v1.DatastoreClientTest", -]] + runtime_deps = [":datastore_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-datastore-v1-java", - client_deps = [":datastore_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":datastore_java_gapic_test"], - grpc_deps = [":datastore_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":datastore_java_gapic", + ":datastore_java_grpc", ":datastore_java_proto", ":datastore_proto", - ":datastore_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -104,10 +96,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -123,10 +115,10 @@ go_proto_library( go_gapic_library( name = "datastore_go_gapic", - src = ":datastore_proto_with_info", - gapic_yaml = "datastore_gapic.yaml", - importpath = "cloud.google.com/go/datastore/apiv1", - service_yaml = "//google/datastore:datastore.yaml", + srcs = [":datastore_proto_with_info"], + grpc_service_config = "datastore_grpc_service_config.json", + importpath = "cloud.google.com/go/datastore/apiv1;datastore", + service_yaml = "datastore_v1.yaml", deps = [ ":datastore_go_proto", ], @@ -139,13 +131,235 @@ go_test( importpath = "cloud.google.com/go/datastore/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-datastore-v1-go", deps = [ ":datastore_go_gapic", - ":datastore_go_gapic_srcjar-smoke-test.srcjar", ":datastore_go_gapic_srcjar-test.srcjar", ":datastore_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "datastore_moved_proto", + srcs = [":datastore_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "datastore_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":datastore_moved_proto"], +) + +py_grpc_library( + name = "datastore_py_grpc", + srcs = [":datastore_moved_proto"], + deps = [":datastore_py_proto"], +) + +py_gapic_library( + name = "datastore_py_gapic", + src = ":datastore_proto_with_info", + gapic_yaml = "datastore_gapic.yaml", + package = "google.datastore.v1", + service_yaml = "datastore_v1.yaml", + deps = [ + ":datastore_py_grpc", + ":datastore_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "datastore-v1-py", + deps = [ + ":datastore_py_gapic", + ":datastore_py_grpc", + ":datastore_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "datastore_php_proto", + deps = [":datastore_proto"], +) + +php_grpc_library( + name = "datastore_php_grpc", + srcs = [":datastore_proto"], + deps = [":datastore_php_proto"], +) + +php_gapic_library( + name = "datastore_php_gapic", + src = ":datastore_proto_with_info", + gapic_yaml = "datastore_gapic.legacy.yaml", + package = "google.datastore.v1", + service_yaml = "datastore_v1.yaml", + deps = [ + ":datastore_php_grpc", + ":datastore_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-datastore-v1-php", + deps = [ + ":datastore_php_gapic", + ":datastore_php_grpc", + ":datastore_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "datastore_nodejs_gapic", + src = ":datastore_proto_with_info", + gapic_yaml = "datastore_gapic.yaml", + package = "google.datastore.v1", + service_yaml = "datastore_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "datastore-v1-nodejs", + deps = [ + ":datastore_nodejs_gapic", + ":datastore_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "datastore_ruby_proto", + deps = [":datastore_proto"], +) + +ruby_grpc_library( + name = "datastore_ruby_grpc", + srcs = [":datastore_proto"], + deps = [":datastore_ruby_proto"], +) + +ruby_gapic_library( + name = "datastore_ruby_gapic", + src = ":datastore_proto_with_info", + gapic_yaml = "datastore_gapic.yaml", + package = "google.datastore.v1", + service_yaml = "datastore_v1.yaml", + deps = [ + ":datastore_ruby_grpc", + ":datastore_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-datastore-v1-ruby", + deps = [ + ":datastore_ruby_gapic", + ":datastore_ruby_grpc", + ":datastore_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "datastore_csharp_proto", + deps = [":datastore_proto"], +) + +csharp_grpc_library( + name = "datastore_csharp_grpc", + srcs = [":datastore_proto"], + deps = [":datastore_csharp_proto"], +) + +csharp_gapic_library( + name = "datastore_csharp_gapic", + src = ":datastore_proto_with_info", + gapic_yaml = "datastore_gapic.yaml", + package = "google.datastore.v1", + service_yaml = "datastore_v1.yaml", + deps = [ + ":datastore_csharp_grpc", + ":datastore_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-datastore-v1-csharp", + deps = [ + ":datastore_csharp_gapic", + ":datastore_csharp_grpc", + ":datastore_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/datastore/v1/datastore.proto b/google/datastore/v1/datastore.proto index 51d69acb9..0df65c447 100644 --- a/google/datastore/v1/datastore.proto +++ b/google/datastore/v1/datastore.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,8 @@ syntax = "proto3"; package google.datastore.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/datastore/v1/entity.proto"; import "google/datastore/v1/query.proto"; @@ -35,12 +37,18 @@ option php_namespace = "Google\\Cloud\\Datastore\\V1"; // the request. // service Datastore { + option (google.api.default_host) = "datastore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/datastore"; + // Looks up entities by key. rpc Lookup(LookupRequest) returns (LookupResponse) { option (google.api.http) = { post: "/v1/projects/{project_id}:lookup" body: "*" }; + option (google.api.method_signature) = "project_id,read_options,keys"; } // Queries for entities. @@ -52,12 +60,12 @@ service Datastore { } // Begins a new transaction. - rpc BeginTransaction(BeginTransactionRequest) - returns (BeginTransactionResponse) { + rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) { option (google.api.http) = { post: "/v1/projects/{project_id}:beginTransaction" body: "*" }; + option (google.api.method_signature) = "project_id"; } // Commits a transaction, optionally creating, deleting or modifying some @@ -67,6 +75,8 @@ service Datastore { post: "/v1/projects/{project_id}:commit" body: "*" }; + option (google.api.method_signature) = "project_id,mode,transaction,mutations"; + option (google.api.method_signature) = "project_id,mode,mutations"; } // Rolls back a transaction. @@ -75,6 +85,7 @@ service Datastore { post: "/v1/projects/{project_id}:rollback" body: "*" }; + option (google.api.method_signature) = "project_id,transaction"; } // Allocates IDs for the given keys, which is useful for referencing an entity @@ -84,6 +95,7 @@ service Datastore { post: "/v1/projects/{project_id}:allocateIds" body: "*" }; + option (google.api.method_signature) = "project_id,keys"; } // Prevents the supplied keys' IDs from being auto-allocated by Cloud @@ -93,19 +105,20 @@ service Datastore { post: "/v1/projects/{project_id}:reserveIds" body: "*" }; + option (google.api.method_signature) = "project_id,keys"; } } // The request for [Datastore.Lookup][google.datastore.v1.Datastore.Lookup]. message LookupRequest { - // The ID of the project against which to make the request. - string project_id = 8; + // Required. The ID of the project against which to make the request. + string project_id = 8 [(google.api.field_behavior) = REQUIRED]; // The options for this lookup request. ReadOptions read_options = 1; - // Keys of entities to look up. - repeated Key keys = 3; + // Required. Keys of entities to look up. + repeated Key keys = 3 [(google.api.field_behavior) = REQUIRED]; } // The response for [Datastore.Lookup][google.datastore.v1.Datastore.Lookup]. @@ -128,8 +141,8 @@ message LookupResponse { // The request for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery]. message RunQueryRequest { - // The ID of the project against which to make the request. - string project_id = 8; + // Required. The ID of the project against which to make the request. + string project_id = 8 [(google.api.field_behavior) = REQUIRED]; // Entities are partitioned into subsets, identified by a partition ID. // Queries are scoped to a single partition. @@ -150,8 +163,7 @@ message RunQueryRequest { } } -// The response for -// [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery]. +// The response for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery]. message RunQueryResponse { // A batch of query results (always present). QueryResultBatch batch = 1; @@ -160,18 +172,16 @@ message RunQueryResponse { Query query = 2; } -// The request for -// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction]. +// The request for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction]. message BeginTransactionRequest { - // The ID of the project against which to make the request. - string project_id = 8; + // Required. The ID of the project against which to make the request. + string project_id = 8 [(google.api.field_behavior) = REQUIRED]; // Options for a new transaction. TransactionOptions transaction_options = 10; } -// The response for -// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction]. +// The response for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction]. message BeginTransactionResponse { // The transaction identifier (always present). bytes transaction = 1; @@ -179,18 +189,19 @@ message BeginTransactionResponse { // The request for [Datastore.Rollback][google.datastore.v1.Datastore.Rollback]. message RollbackRequest { - // The ID of the project against which to make the request. - string project_id = 8; + // Required. The ID of the project against which to make the request. + string project_id = 8 [(google.api.field_behavior) = REQUIRED]; - // The transaction identifier, returned by a call to + // Required. The transaction identifier, returned by a call to // [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction]. - bytes transaction = 1; + bytes transaction = 1 [(google.api.field_behavior) = REQUIRED]; } -// The response for -// [Datastore.Rollback][google.datastore.v1.Datastore.Rollback]. (an empty -// message). -message RollbackResponse {} +// The response for [Datastore.Rollback][google.datastore.v1.Datastore.Rollback]. +// (an empty message). +message RollbackResponse { + +} // The request for [Datastore.Commit][google.datastore.v1.Datastore.Commit]. message CommitRequest { @@ -208,8 +219,8 @@ message CommitRequest { NON_TRANSACTIONAL = 2; } - // The ID of the project against which to make the request. - string project_id = 8; + // Required. The ID of the project against which to make the request. + string project_id = 8 [(google.api.field_behavior) = REQUIRED]; // The type of commit to perform. Defaults to `TRANSACTIONAL`. Mode mode = 5; @@ -249,42 +260,40 @@ message CommitResponse { int32 index_updates = 4; } -// The request for -// [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds]. +// The request for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds]. message AllocateIdsRequest { - // The ID of the project against which to make the request. - string project_id = 8; + // Required. The ID of the project against which to make the request. + string project_id = 8 [(google.api.field_behavior) = REQUIRED]; - // A list of keys with incomplete key paths for which to allocate IDs. + // Required. A list of keys with incomplete key paths for which to allocate IDs. // No key may be reserved/read-only. - repeated Key keys = 1; + repeated Key keys = 1 [(google.api.field_behavior) = REQUIRED]; } -// The response for -// [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds]. +// The response for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds]. message AllocateIdsResponse { // The keys specified in the request (in the same order), each with // its key path completed with a newly allocated ID. repeated Key keys = 1; } -// The request for -// [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds]. +// The request for [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds]. message ReserveIdsRequest { - // The ID of the project against which to make the request. - string project_id = 8; + // Required. The ID of the project against which to make the request. + string project_id = 8 [(google.api.field_behavior) = REQUIRED]; // If not empty, the ID of the database against which to make the request. string database_id = 9; - // A list of keys with complete key paths whose numeric IDs should not be + // Required. A list of keys with complete key paths whose numeric IDs should not be // auto-allocated. - repeated Key keys = 1; + repeated Key keys = 1 [(google.api.field_behavior) = REQUIRED]; } -// The response for -// [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds]. -message ReserveIdsResponse {} +// The response for [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds]. +message ReserveIdsResponse { + +} // A mutation to apply to an entity. message Mutation { @@ -374,10 +383,8 @@ message ReadOptions { // Options for beginning a new transaction. // // Transactions can be created explicitly with calls to -// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction] -// or implicitly by setting -// [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction] -// in read requests. +// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction] or implicitly by setting +// [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction] in read requests. message TransactionOptions { // Options specific to read / write transactions. message ReadWrite { @@ -386,7 +393,9 @@ message TransactionOptions { } // Options specific to read-only transactions. - message ReadOnly {} + message ReadOnly { + + } // The `mode` of the transaction, indicating whether write operations are // supported. diff --git a/google/datastore/v1/datastore_gapic.legacy.yaml b/google/datastore/v1/datastore_gapic.legacy.yaml new file mode 100644 index 000000000..bbdf7200e --- /dev/null +++ b/google/datastore/v1/datastore_gapic.legacy.yaml @@ -0,0 +1,126 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.datastore.v1 + python: + package_name: google.cloud.datastore_v1.gapic + go: + package_name: cloud.google.com/go/datastore/apiv1 + csharp: + package_name: Google.Cloud.Datastore.V1 + release_level: GA + ruby: + package_name: Google::Cloud::Datastore::V1 + release_level: GA + php: + package_name: Google\Cloud\Datastore\V1 + nodejs: + package_name: datastore.v1 + domain_layer_location: google-cloud +interfaces: +- name: google.datastore.v1.Datastore + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: Lookup + flattening: + groups: + - parameters: + - project_id + - read_options + - keys + required_fields: + - project_id + - keys + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: RunQuery + # NOTE: Add flattening with oneof when oneofs implemented + required_fields: + - project_id + - partition_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: BeginTransaction + flattening: + groups: + - parameters: + - project_id + required_fields: + - project_id + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: Commit + flattening: + groups: + - parameters: + - project_id + - mode + - transaction + - mutations + - parameters: + - project_id + - mode + - mutations + required_fields: + - project_id + - mode + - mutations + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: Rollback + flattening: + groups: + - parameters: + - project_id + - transaction + required_fields: + - project_id + - transaction + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: AllocateIds + flattening: + groups: + - parameters: + - project_id + - keys + required_fields: + - project_id + - keys + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: ReserveIds + flattening: + groups: + - parameters: + - project_id + - keys + required_fields: + - project_id + - keys + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/datastore/v1/datastore_gapic.yaml b/google/datastore/v1/datastore_gapic.yaml index bbdf7200e..e9860d5ef 100644 --- a/google/datastore/v1/datastore_gapic.yaml +++ b/google/datastore/v1/datastore_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.datastore.v1 @@ -20,14 +20,6 @@ language_settings: domain_layer_location: google-cloud interfaces: - name: google.datastore.v1.Datastore - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -39,88 +31,8 @@ interfaces: total_timeout_millis: 600000 methods: - name: Lookup - flattening: - groups: - - parameters: - - project_id - - read_options - - keys - required_fields: - - project_id - - keys retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - name: RunQuery - # NOTE: Add flattening with oneof when oneofs implemented - required_fields: - - project_id - - partition_id retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - - name: BeginTransaction - flattening: - groups: - - parameters: - - project_id - required_fields: - - project_id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: Commit - flattening: - groups: - - parameters: - - project_id - - mode - - transaction - - mutations - - parameters: - - project_id - - mode - - mutations - required_fields: - - project_id - - mode - - mutations - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: Rollback - flattening: - groups: - - parameters: - - project_id - - transaction - required_fields: - - project_id - - transaction - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: AllocateIds - flattening: - groups: - - parameters: - - project_id - - keys - required_fields: - - project_id - - keys - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - name: ReserveIds - flattening: - groups: - - parameters: - - project_id - - keys - required_fields: - - project_id - - keys retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 diff --git a/google/datastore/v1/datastore_grpc_service_config.json b/google/datastore/v1/datastore_grpc_service_config.json new file mode 100755 index 000000000..48a210a8e --- /dev/null +++ b/google/datastore/v1/datastore_grpc_service_config.json @@ -0,0 +1,51 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.datastore.v1.Datastore", + "method": "Lookup" + }, + { + "service": "google.datastore.v1.Datastore", + "method": "RunQuery" + }, + { + "service": "google.datastore.v1.Datastore", + "method": "ReserveIds" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.datastore.v1.Datastore", + "method": "BeginTransaction" + }, + { + "service": "google.datastore.v1.Datastore", + "method": "Commit" + }, + { + "service": "google.datastore.v1.Datastore", + "method": "Rollback" + }, + { + "service": "google.datastore.v1.Datastore", + "method": "AllocateIds" + } + ], + "timeout": "60s" + } + ] +} diff --git a/google/datastore/v1/datastore_v1.yaml b/google/datastore/v1/datastore_v1.yaml new file mode 100644 index 000000000..bd26ed778 --- /dev/null +++ b/google/datastore/v1/datastore_v1.yaml @@ -0,0 +1,43 @@ +type: google.api.Service +config_version: 3 +name: datastore.googleapis.com +title: Cloud Datastore API + +apis: +- name: google.datastore.v1.Datastore + +documentation: + summary: |- + Accesses the schemaless NoSQL database to provide fully managed, robust, + scalable storage for your application. + +backend: + rules: + - selector: 'google.datastore.v1.Datastore.*' + deadline: 295.0 + - selector: 'google.longrunning.Operations.*' + deadline: 295.0 + +http: + rules: + - selector: google.longrunning.Operations.CancelOperation + post: '/v1/{name=projects/*/operations/*}:cancel' + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=projects/*/operations/*}' + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=projects/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=projects/*}/operations' + +authentication: + rules: + - selector: 'google.datastore.v1.Datastore.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/datastore + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/datastore diff --git a/google/datastore/v1/entity.proto b/google/datastore/v1/entity.proto index 9decd2b53..dc3a60120 100644 --- a/google/datastore/v1/entity.proto +++ b/google/datastore/v1/entity.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -114,8 +114,8 @@ message Key { // An array value. message ArrayValue { // Values in the array. - // The order of this array may not be preserved if it contains a mix of - // indexed and unindexed values. + // The order of values in an array is preserved as long as all values have + // identical settings for 'exclude_from_indexes'. repeated Value values = 1; } @@ -145,8 +145,8 @@ message Value { Key key_value = 5; // A UTF-8 encoded string value. - // When `exclude_from_indexes` is false (it is indexed) , may have at most - // 1500 bytes. Otherwise, may be set to at least 1,000,000 bytes. + // When `exclude_from_indexes` is false (it is indexed), may have at most + // 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes. string string_value = 17; // A blob value. diff --git a/google/datastore/v1/query.proto b/google/datastore/v1/query.proto index 872612c5d..ef9f1c658 100644 --- a/google/datastore/v1/query.proto +++ b/google/datastore/v1/query.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -55,12 +55,12 @@ message EntityResult { // The version of the entity, a strictly positive number that monotonically // increases with changes to the entity. // - // This field is set for - // [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results. + // This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + // results. // - // For [missing][google.datastore.v1.LookupResponse.missing] entities in - // `LookupResponse`, this is the version of the snapshot that was used to look - // up the entity, and it is always set except for eventually consistent reads. + // For [missing][google.datastore.v1.LookupResponse.missing] entities in `LookupResponse`, this + // is the version of the snapshot that was used to look up the entity, and it + // is always set except for eventually consistent reads. int64 version = 4; // A cursor that points to the position after the result entity. diff --git a/google/datastore/v1beta3/entity.proto b/google/datastore/v1beta3/entity.proto index 65863236a..070036e3f 100644 --- a/google/datastore/v1beta3/entity.proto +++ b/google/datastore/v1beta3/entity.proto @@ -145,8 +145,8 @@ message Value { Key key_value = 5; // A UTF-8 encoded string value. - // When `exclude_from_indexes` is false (it is indexed) , may have at most - // 1500 bytes. Otherwise, may be set to at least 1,000,000 bytes. + // When `exclude_from_indexes` is false (it is indexed), may have at most + // 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes. string string_value = 17; // A blob value. diff --git a/google/devtools/artman_clouddebugger.yaml b/google/devtools/artman_clouddebugger.yaml index 8dee0080f..42a0825d2 100644 --- a/google/devtools/artman_clouddebugger.yaml +++ b/google/devtools/artman_clouddebugger.yaml @@ -2,13 +2,14 @@ common: api_name: debugger api_version: v2 organization_name: google-cloud - service_yaml: clouddebugger/clouddebugger.yaml + service_yaml: clouddebugger/v2/clouddebugger_v2.yaml gapic_yaml: clouddebugger/v2/clouddebugger_gapic.yaml src_proto_paths: - clouddebugger/v2 - source/v1 proto_deps: - name: google-common-protos + proto_package: google.devtools.clouddebugger.v2 artifacts: - name: java_gapic type: GAPIC diff --git a/google/devtools/build/BUILD.bazel b/google/devtools/build/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/devtools/build/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/devtools/build/v1/BUILD.bazel b/google/devtools/build/v1/BUILD.bazel new file mode 100644 index 000000000..b2b2c88be --- /dev/null +++ b/google/devtools/build/v1/BUILD.bazel @@ -0,0 +1,367 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "build_proto", + srcs = [ + "build_events.proto", + "build_status.proto", + "publish_build_event.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library_with_info( + name = "build_proto_with_info", + deps = [ + ":build_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "build_java_proto", + deps = [":build_proto"], +) + +java_grpc_library( + name = "build_java_grpc", + srcs = [":build_proto"], + deps = [":build_java_proto"], +) + +java_gapic_library( + name = "build_java_gapic", + src = ":build_proto_with_info", + gapic_yaml = "buildeventservice_gapic.yaml", + package = "google.devtools.build.v1", + service_yaml = "buildeventservice_v1.yaml", + test_deps = [ + ":build_java_grpc", + ], + deps = [ + ":build_java_proto", + ], +) + +java_gapic_test( + name = "build_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.devtools.build.v1.PublishBuildEventClientTest", + ], + runtime_deps = [":build_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-devtools-build-v1-java", + deps = [ + ":build_java_gapic", + ":build_java_grpc", + ":build_java_proto", + ":build_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "build_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/build/v1", + protos = [":build_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "build_go_gapic", + srcs = [":build_proto_with_info"], + grpc_service_config = "buildeventservice_grpc_service_config.json", + importpath = "cloud.google.com/go/devtools/build/apiv1;build", + service_yaml = "buildeventservice_v1.yaml", + deps = [ + ":build_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +go_test( + name = "build_go_gapic_test", + srcs = [":build_go_gapic_srcjar_test"], + embed = [":build_go_gapic"], + importpath = "cloud.google.com/go/devtools/build/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-devtools-build-v1-go", + deps = [ + ":build_go_gapic", + ":build_go_gapic_srcjar-test.srcjar", + ":build_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "build_moved_proto", + srcs = [":build_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "build_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":build_moved_proto"], +) + +py_grpc_library( + name = "build_py_grpc", + srcs = [":build_moved_proto"], + deps = [":build_py_proto"], +) + +py_gapic_library( + name = "build_py_gapic", + src = ":build_proto_with_info", + gapic_yaml = "buildeventservice_gapic.yaml", + package = "google.devtools.build.v1", + service_yaml = "buildeventservice_v1.yaml", + deps = [ + ":build_py_grpc", + ":build_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "devtools-build-v1-py", + deps = [ + ":build_py_gapic", + ":build_py_grpc", + ":build_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "build_php_proto", + deps = [":build_proto"], +) + +php_grpc_library( + name = "build_php_grpc", + srcs = [":build_proto"], + deps = [":build_php_proto"], +) + +php_gapic_library( + name = "build_php_gapic", + src = ":build_proto_with_info", + gapic_yaml = "buildeventservice_gapic.yaml", + package = "google.devtools.build.v1", + service_yaml = "buildeventservice_v1.yaml", + deps = [ + ":build_php_grpc", + ":build_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-devtools-build-v1-php", + deps = [ + ":build_php_gapic", + ":build_php_grpc", + ":build_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "build_nodejs_gapic", + src = ":build_proto_with_info", + gapic_yaml = "buildeventservice_gapic.yaml", + package = "google.devtools.build.v1", + service_yaml = "buildeventservice_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "devtools-build-v1-nodejs", + deps = [ + ":build_nodejs_gapic", + ":build_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "build_ruby_proto", + deps = [":build_proto"], +) + +ruby_grpc_library( + name = "build_ruby_grpc", + srcs = [":build_proto"], + deps = [":build_ruby_proto"], +) + +ruby_gapic_library( + name = "build_ruby_gapic", + src = ":build_proto_with_info", + gapic_yaml = "buildeventservice_gapic.yaml", + package = "google.devtools.build.v1", + service_yaml = "buildeventservice_v1.yaml", + deps = [ + ":build_ruby_grpc", + ":build_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-devtools-build-v1-ruby", + deps = [ + ":build_ruby_gapic", + ":build_ruby_grpc", + ":build_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "build_csharp_proto", + deps = [":build_proto"], +) + +csharp_grpc_library( + name = "build_csharp_grpc", + srcs = [":build_proto"], + deps = [":build_csharp_proto"], +) + +csharp_gapic_library( + name = "build_csharp_gapic", + src = ":build_proto_with_info", + gapic_yaml = "buildeventservice_gapic.yaml", + package = "google.devtools.build.v1", + service_yaml = "buildeventservice_v1.yaml", + deps = [ + ":build_csharp_grpc", + ":build_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-devtools-build-v1-csharp", + deps = [ + ":build_csharp_gapic", + ":build_csharp_grpc", + ":build_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/devtools/build/v1/build_events.proto b/google/devtools/build/v1/build_events.proto index 8b29a4521..35615136b 100644 --- a/google/devtools/build/v1/build_events.proto +++ b/google/devtools/build/v1/build_events.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,11 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.devtools.build.v1; -import "google/api/annotations.proto"; import "google/devtools/build/v1/build_status.proto"; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; @@ -38,7 +36,7 @@ message BuildEvent { // invocation attempt replacing the current one a client is processing. int64 attempt_number = 1; - // Additional details about the invocation. + // Arbitrary details about the invocation attempt. google.protobuf.Any details = 2; } @@ -46,6 +44,9 @@ message BuildEvent { message InvocationAttemptFinished { // Final status of the invocation. BuildStatus invocation_status = 3; + + // Arbitrary details about the invocation attempt. + google.protobuf.Any details = 4; } // Notification that the build request is enqueued. @@ -60,6 +61,9 @@ message BuildEvent { message BuildFinished { // Final status of the build. BuildStatus status = 1; + + // Additional details about the Build. + google.protobuf.Any details = 2; } // Textual output written to standard output or standard error. @@ -112,8 +116,7 @@ message BuildEvent { // An invocation attempt has finished. InvocationAttemptFinished invocation_attempt_finished = 52; - // The build is enqueued (just inserted to the build queue or put back - // into the build queue due to a previous build failure). + // The build is enqueued. BuildEnqueued build_enqueued = 53; // The build has finished. Set when the build is terminated. diff --git a/google/devtools/build/v1/build_status.proto b/google/devtools/build/v1/build_status.proto index 8d108e36c..8de104816 100644 --- a/google/devtools/build/v1/build_status.proto +++ b/google/devtools/build/v1/build_status.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.devtools.build.v1; -import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; import "google/protobuf/any.proto"; option cc_enable_arenas = true; @@ -61,6 +60,14 @@ message BuildStatus { // The end result. Result result = 1; + // Final invocation ID of the build, if there was one. + // This field is only set on a status in BuildFinished event. + string final_invocation_id = 3; + + // Build tool exit code. Integer value returned by the executed build tool. + // Might not be available in some cases, e.g., a build timeout. + google.protobuf.Int32Value build_tool_exit_code = 4; + // Fine-grained diagnostic information to complement the status. google.protobuf.Any details = 2; } diff --git a/google/devtools/build/v1/buildeventservice_gapic.legacy.yaml b/google/devtools/build/v1/buildeventservice_gapic.legacy.yaml new file mode 100644 index 000000000..cabd6db30 --- /dev/null +++ b/google/devtools/build/v1/buildeventservice_gapic.legacy.yaml @@ -0,0 +1,126 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.devtools.build.v1 + python: + package_name: google.cloud.devtools.build_v1.gapic + go: + package_name: cloud.google.com/go/devtools/build/apiv1 + csharp: + package_name: Google.Devtools.Build.V1 + ruby: + package_name: Google::Cloud::Devtools::Build::V1 + php: + package_name: Google\Cloud\Devtools\Build\V1 + nodejs: + package_name: build.v1 +# A list of API interface configurations. +interfaces: + # The fully qualified name of the API interface. +- name: google.devtools.build.v1.PublishBuildEvent + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: PublishLifecycleEvent + required_fields: + - build_event + - project_id + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: PublishBuildToolEventStream + flattening: + groups: + - parameters: + - ordered_build_event + - notification_keywords + - project_id + required_fields: + - ordered_build_event + - project_id + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/devtools/build/v1/buildeventservice_gapic.yaml b/google/devtools/build/v1/buildeventservice_gapic.yaml index cabd6db30..99b3a8152 100644 --- a/google/devtools/build/v1/buildeventservice_gapic.yaml +++ b/google/devtools/build/v1/buildeventservice_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -20,107 +20,3 @@ language_settings: interfaces: # The fully qualified name of the API interface. - name: google.devtools.build.v1.PublishBuildEvent - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: [] - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - DEADLINE_EXCEEDED - - UNAVAILABLE - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: PublishLifecycleEvent - required_fields: - - build_event - - project_id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: PublishBuildToolEventStream - flattening: - groups: - - parameters: - - ordered_build_event - - notification_keywords - - project_id - required_fields: - - ordered_build_event - - project_id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 diff --git a/google/devtools/build/v1/buildeventservice_grpc_service_config.json b/google/devtools/build/v1/buildeventservice_grpc_service_config.json new file mode 100755 index 000000000..b56183daf --- /dev/null +++ b/google/devtools/build/v1/buildeventservice_grpc_service_config.json @@ -0,0 +1,17 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.devtools.build.v1.PublishBuildEvent", + "method": "PublishLifecycleEvent" + }, + { + "service": "google.devtools.build.v1.PublishBuildEvent", + "method": "PublishBuildToolEventStream" + } + ], + "timeout": "600s" + } + ] +} diff --git a/google/devtools/build/v1/buildeventservice_v1.yaml b/google/devtools/build/v1/buildeventservice_v1.yaml new file mode 100644 index 000000000..b92d5223e --- /dev/null +++ b/google/devtools/build/v1/buildeventservice_v1.yaml @@ -0,0 +1,21 @@ +type: google.api.Service +config_version: 3 +name: buildeventservice.googleapis.com +title: Build Event Service Backend API + +apis: +- name: google.devtools.build.v1.PublishBuildEvent + +documentation: + summary: Handles build events from tools such as bazel. + +authentication: + rules: + - selector: google.devtools.build.v1.PublishBuildEvent.PublishBuildToolEventStream + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.devtools.build.v1.PublishBuildEvent.PublishLifecycleEvent + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/devtools/build/v1/publish_build_event.proto b/google/devtools/build/v1/publish_build_event.proto index 5e483d679..df63a01f2 100644 --- a/google/devtools/build/v1/publish_build_event.proto +++ b/google/devtools/build/v1/publish_build_event.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.devtools.build.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/devtools/build/v1/build_events.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; @@ -44,6 +45,9 @@ option java_package = "com.google.devtools.build.v1"; // target objects produced via compilation, tests run, et cetera. There could be // more than one build tool stream for an invocation attempt of a build. service PublishBuildEvent { + option (google.api.default_host) = "buildeventservice.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Publish a build event stating the new state of a build (typically from the // build queue). The BuildEnqueued event must be publishd before all other // events for the same build ID. @@ -54,24 +58,29 @@ service PublishBuildEvent { // The commit status of the request is reported by the RPC's util_status() // function. The error code is the canoncial error code defined in // //util/task/codes.proto. - rpc PublishLifecycleEvent(PublishLifecycleEventRequest) - returns (google.protobuf.Empty) { + rpc PublishLifecycleEvent(PublishLifecycleEventRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1/projects/{project_id=*}/lifecycleEvents:publish" body: "*" - additional_bindings { post: "/v1/lifecycleEvents:publish" body: "*" } + additional_bindings { + post: "/v1/lifecycleEvents:publish" + body: "*" + } }; } // Publish build tool events belonging to the same stream to a backend job // using bidirectional streaming. - rpc PublishBuildToolEventStream(stream PublishBuildToolEventStreamRequest) - returns (stream PublishBuildToolEventStreamResponse) { + rpc PublishBuildToolEventStream(stream PublishBuildToolEventStreamRequest) returns (stream PublishBuildToolEventStreamResponse) { option (google.api.http) = { post: "/v1/projects/{project_id=*}/events:publish" body: "*" - additional_bindings { post: "/v1/events:publish" body: "*" } + additional_bindings { + post: "/v1/events:publish" + body: "*" + } }; + option (google.api.method_signature) = "ordered_build_event,notification_keywords,project_id"; } } @@ -97,9 +106,9 @@ message PublishLifecycleEventRequest { // The interactivity of this build. ServiceLevel service_level = 1; - // The lifecycle build event. If this is a build tool event, the RPC will fail + // Required. The lifecycle build event. If this is a build tool event, the RPC will fail // with INVALID_REQUEST. - OrderedBuildEvent build_event = 2; + OrderedBuildEvent build_event = 2 [(google.api.field_behavior) = REQUIRED]; // If the next event for this build or invocation (depending on the event // type) hasn't been published after this duration from when {build_event} @@ -114,10 +123,10 @@ message PublishLifecycleEventRequest { // BuildEnqueued/InvocationAttemptStarted. repeated string notification_keywords = 4; - // The project this build is associated with. + // Required. The project this build is associated with. // This should match the project used for the initial call to // PublishLifecycleEvent (containing a BuildEnqueued message). - string project_id = 6; + string project_id = 6 [(google.api.field_behavior) = REQUIRED]; } // States which event has been committed. Any failure to commit will cause @@ -147,9 +156,9 @@ message OrderedBuildEvent { // Streaming request message for PublishBuildToolEventStream. message PublishBuildToolEventStreamRequest { - // The build event with position info. + // Required. The build event with position info. // New publishing clients should use this field rather than the 3 above. - OrderedBuildEvent ordered_build_event = 4; + OrderedBuildEvent ordered_build_event = 4 [(google.api.field_behavior) = REQUIRED]; // The keywords to be attached to the notification which notifies the start // of a new build event stream. BES only reads this field when sequence_number @@ -157,8 +166,8 @@ message PublishBuildToolEventStreamRequest { // is empty, BES will not publish notification messages for this stream. repeated string notification_keywords = 5; - // The project this build is associated with. + // Required. The project this build is associated with. // This should match the project used for the initial call to // PublishLifecycleEvent (containing a BuildEnqueued message). - string project_id = 6; + string project_id = 6 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/devtools/cloudbuild/v1/BUILD.bazel b/google/devtools/cloudbuild/v1/BUILD.bazel new file mode 100644 index 000000000..789f14f84 --- /dev/null +++ b/google/devtools/cloudbuild/v1/BUILD.bazel @@ -0,0 +1,369 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "cloudbuild_proto", + srcs = [ + "cloudbuild.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "cloudbuild_proto_with_info", + deps = [ + ":cloudbuild_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "cloudbuild_java_proto", + deps = [":cloudbuild_proto"], +) + +java_grpc_library( + name = "cloudbuild_java_grpc", + srcs = [":cloudbuild_proto"], + deps = [":cloudbuild_java_proto"], +) + +java_gapic_library( + name = "cloudbuild_java_gapic", + src = ":cloudbuild_proto_with_info", + gapic_yaml = "cloudbuild_gapic.yaml", + package = "google.devtools.cloudbuild.v1", + service_yaml = "cloudbuild_v1.yaml", + test_deps = [ + ":cloudbuild_java_grpc", + ], + deps = [ + ":cloudbuild_java_proto", + ], +) + +java_gapic_test( + name = "cloudbuild_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.devtools.cloudbuild.v1.CloudBuildClientTest", + ], + runtime_deps = [":cloudbuild_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-devtools-cloudbuild-v1-java", + deps = [ + ":cloudbuild_java_gapic", + ":cloudbuild_java_grpc", + ":cloudbuild_java_proto", + ":cloudbuild_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "cloudbuild_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1", + protos = [":cloudbuild_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "cloudbuild_go_gapic", + srcs = [":cloudbuild_proto_with_info"], + grpc_service_config = "cloudbuild_grpc_service_config.json", + importpath = "cloud.google.com/go/cloudbuild/apiv1;cloudbuild", + service_yaml = "cloudbuild_v1.yaml", + deps = [ + ":cloudbuild_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +go_test( + name = "cloudbuild_go_gapic_test", + srcs = [":cloudbuild_go_gapic_srcjar_test"], + embed = [":cloudbuild_go_gapic"], + importpath = "cloud.google.com/go/cloudbuild/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-devtools-cloudbuild-v1-go", + deps = [ + ":cloudbuild_go_gapic", + ":cloudbuild_go_gapic_srcjar-test.srcjar", + ":cloudbuild_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "cloudbuild_moved_proto", + srcs = [":cloudbuild_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "cloudbuild_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":cloudbuild_moved_proto"], +) + +py_grpc_library( + name = "cloudbuild_py_grpc", + srcs = [":cloudbuild_moved_proto"], + deps = [":cloudbuild_py_proto"], +) + +py_gapic_library( + name = "cloudbuild_py_gapic", + src = ":cloudbuild_proto_with_info", + gapic_yaml = "cloudbuild_gapic.yaml", + package = "google.devtools.cloudbuild.v1", + service_yaml = "cloudbuild_v1.yaml", + deps = [ + ":cloudbuild_py_grpc", + ":cloudbuild_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "devtools-cloudbuild-v1-py", + deps = [ + ":cloudbuild_py_gapic", + ":cloudbuild_py_grpc", + ":cloudbuild_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "cloudbuild_php_proto", + deps = [":cloudbuild_proto"], +) + +php_grpc_library( + name = "cloudbuild_php_grpc", + srcs = [":cloudbuild_proto"], + deps = [":cloudbuild_php_proto"], +) + +# Add api.http options to all RPCs in the services to enable PHP GAPIC +#php_gapic_library( +# name = "cloudbuild_php_gapic", +# src = ":cloudbuild_proto_with_info", +# gapic_yaml = "cloudbuild_gapic.yaml", +# package = "google.devtools.cloudbuild.v1", +# service_yaml = "cloudbuild_v1.yaml", +# deps = [ +# ":cloudbuild_php_grpc", +# ":cloudbuild_php_proto", +# ], +#) +# +## Open Source Packages +#php_gapic_assembly_pkg( +# name = "google-cloud-devtools-cloudbuild-v1-php", +# deps = [ +# ":cloudbuild_php_gapic", +# ":cloudbuild_php_grpc", +# ":cloudbuild_php_proto", +# ], +#) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "cloudbuild_nodejs_gapic", + src = ":cloudbuild_proto_with_info", + gapic_yaml = "cloudbuild_gapic.yaml", + package = "google.devtools.cloudbuild.v1", + service_yaml = "cloudbuild_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "devtools-cloudbuild-v1-nodejs", + deps = [ + ":cloudbuild_nodejs_gapic", + ":cloudbuild_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "cloudbuild_ruby_proto", + deps = [":cloudbuild_proto"], +) + +ruby_grpc_library( + name = "cloudbuild_ruby_grpc", + srcs = [":cloudbuild_proto"], + deps = [":cloudbuild_ruby_proto"], +) + +ruby_gapic_library( + name = "cloudbuild_ruby_gapic", + src = ":cloudbuild_proto_with_info", + gapic_yaml = "cloudbuild_gapic.yaml", + package = "google.devtools.cloudbuild.v1", + service_yaml = "cloudbuild_v1.yaml", + deps = [ + ":cloudbuild_ruby_grpc", + ":cloudbuild_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-devtools-cloudbuild-v1-ruby", + deps = [ + ":cloudbuild_ruby_gapic", + ":cloudbuild_ruby_grpc", + ":cloudbuild_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "cloudbuild_csharp_proto", + deps = [":cloudbuild_proto"], +) + +csharp_grpc_library( + name = "cloudbuild_csharp_grpc", + srcs = [":cloudbuild_proto"], + deps = [":cloudbuild_csharp_proto"], +) + +csharp_gapic_library( + name = "cloudbuild_csharp_gapic", + src = ":cloudbuild_proto_with_info", + gapic_yaml = "cloudbuild_gapic.yaml", + package = "google.devtools.cloudbuild.v1", + service_yaml = "cloudbuild_v1.yaml", + deps = [ + ":cloudbuild_csharp_grpc", + ":cloudbuild_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-devtools-cloudbuild-v1-csharp", + deps = [ + ":cloudbuild_csharp_gapic", + ":cloudbuild_csharp_grpc", + ":cloudbuild_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/devtools/cloudbuild/v1/cloudbuild.proto b/google/devtools/cloudbuild/v1/cloudbuild.proto index e3adace15..aedf05478 100644 --- a/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,19 +11,17 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.devtools.cloudbuild.v1; import "google/api/annotations.proto"; -import "google/api/httpbody.proto"; -import "google/cloud/audit/audit_log.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option go_package = "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1;cloudbuild"; @@ -31,7 +29,6 @@ option java_multiple_files = true; option java_package = "com.google.cloudbuild.v1"; option objc_class_prefix = "GCB"; - // Creates and manages builds on Google Cloud Platform. // // The main concept used by this API is a `Build`, which describes the location @@ -41,6 +38,10 @@ option objc_class_prefix = "GCB"; // A user can list previously-requested builds or get builds by their ID to // determine the status of the build. service CloudBuild { + option (google.api.default_host) = "cloudbuild.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + // Starts a build with the specified configuration. // // This method returns a long-running `Operation`, which includes the build @@ -51,6 +52,11 @@ service CloudBuild { post: "/v1/projects/{project_id}/builds" body: "build" }; + option (google.api.method_signature) = "project_id,build"; + option (google.longrunning.operation_info) = { + response_type: "Build" + metadata_type: "BuildOperationMetadata" + }; } // Returns information about a previously requested build. @@ -61,6 +67,7 @@ service CloudBuild { option (google.api.http) = { get: "/v1/projects/{project_id}/builds/{id}" }; + option (google.api.method_signature) = "project_id,id"; } // Lists previously requested builds. @@ -71,6 +78,7 @@ service CloudBuild { option (google.api.http) = { get: "/v1/projects/{project_id}/builds" }; + option (google.api.method_signature) = "project_id,filter"; } // Cancels a build in progress. @@ -79,6 +87,7 @@ service CloudBuild { post: "/v1/projects/{project_id}/builds/{id}:cancel" body: "*" }; + option (google.api.method_signature) = "project_id,id"; } // Creates a new build based on the specified build. @@ -113,6 +122,11 @@ service CloudBuild { post: "/v1/projects/{project_id}/builds/{id}:retry" body: "*" }; + option (google.api.method_signature) = "project_id,id"; + option (google.longrunning.operation_info) = { + response_type: "Build" + metadata_type: "BuildOperationMetadata" + }; } // Creates a new `BuildTrigger`. @@ -123,6 +137,7 @@ service CloudBuild { post: "/v1/projects/{project_id}/triggers" body: "trigger" }; + option (google.api.method_signature) = "project_id,trigger"; } // Returns information about a `BuildTrigger`. @@ -132,24 +147,29 @@ service CloudBuild { option (google.api.http) = { get: "/v1/projects/{project_id}/triggers/{trigger_id}" }; + option (google.api.method_signature) = "project_id,trigger_id"; } // Lists existing `BuildTrigger`s. // // This API is experimental. - rpc ListBuildTriggers(ListBuildTriggersRequest) returns (ListBuildTriggersResponse) { + rpc ListBuildTriggers(ListBuildTriggersRequest) + returns (ListBuildTriggersResponse) { option (google.api.http) = { get: "/v1/projects/{project_id}/triggers" }; + option (google.api.method_signature) = "project_id"; } // Deletes a `BuildTrigger` by its project ID and trigger ID. // // This API is experimental. - rpc DeleteBuildTrigger(DeleteBuildTriggerRequest) returns (google.protobuf.Empty) { + rpc DeleteBuildTrigger(DeleteBuildTriggerRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/projects/{project_id}/triggers/{trigger_id}" }; + option (google.api.method_signature) = "project_id,trigger_id"; } // Updates a `BuildTrigger` by its project ID and trigger ID. @@ -160,36 +180,70 @@ service CloudBuild { patch: "/v1/projects/{project_id}/triggers/{trigger_id}" body: "trigger" }; + option (google.api.method_signature) = "project_id,trigger_id,trigger"; } // Runs a `BuildTrigger` at a particular source revision. - rpc RunBuildTrigger(RunBuildTriggerRequest) returns (google.longrunning.Operation) { + rpc RunBuildTrigger(RunBuildTriggerRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/projects/{project_id}/triggers/{trigger_id}:run" body: "source" }; + option (google.api.method_signature) = "project_id,trigger_id,source"; + option (google.longrunning.operation_info) = { + response_type: "Build" + metadata_type: "BuildOperationMetadata" + }; } + + // Creates a `WorkerPool` to run the builds, and returns the new worker pool. + // + // This API is experimental. + rpc CreateWorkerPool(CreateWorkerPoolRequest) returns (WorkerPool) {} + + // Returns information about a `WorkerPool`. + // + // This API is experimental. + rpc GetWorkerPool(GetWorkerPoolRequest) returns (WorkerPool) {} + + // Deletes a `WorkerPool` by its project ID and WorkerPool name. + // + // This API is experimental. + rpc DeleteWorkerPool(DeleteWorkerPoolRequest) + returns (google.protobuf.Empty) {} + + // Update a `WorkerPool`. + // + // This API is experimental. + rpc UpdateWorkerPool(UpdateWorkerPoolRequest) returns (WorkerPool) {} + + // List project's `WorkerPool`s. + // + // This API is experimental. + rpc ListWorkerPools(ListWorkerPoolsRequest) + returns (ListWorkerPoolsResponse) {} } // Specifies a build to retry. message RetryBuildRequest { - // ID of the project. - string project_id = 1; + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Build ID of the original build. - string id = 2; + // Required. Build ID of the original build. + string id = 2 [(google.api.field_behavior) = REQUIRED]; } // Specifies a build trigger to run and the source to use. message RunBuildTriggerRequest { - // ID of the project. - string project_id = 1; + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // ID of the trigger. - string trigger_id = 2; + // Required. ID of the trigger. + string trigger_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Source to build against this trigger. - RepoSource source = 3; + // Required. Source to build against this trigger. + RepoSource source = 3 [(google.api.field_behavior) = REQUIRED]; } // Location of the source in an archive file in Google Cloud Storage. @@ -216,17 +270,22 @@ message RepoSource { // project ID requesting the build is assumed. string project_id = 1; - // Name of the Cloud Source Repository. If omitted, the name "default" is - // assumed. + // Required. Name of the Cloud Source Repository. string repo_name = 2; // A revision within the Cloud Source Repository must be specified in // one of these ways. oneof revision { - // Name of the branch to build. + // Regex matching branches to build. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax string branch_name = 3; - // Name of the tag to build. + // Regex matching tags to build. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax string tag_name = 4; // Explicit commit SHA to build. @@ -238,6 +297,14 @@ message RepoSource { // This must be a relative path. If a step's `dir` is specified and is an // absolute path, this value is ignored for that step's execution. string dir = 7; + + // Only trigger a build if the revision regex does NOT match the revision + // regex. + bool invert_regex = 8; + + // Substitutions to use in a triggered build. + // Should only be used with RunBuildTrigger + map substitutions = 9; } // Location of the source in a supported storage service. @@ -263,7 +330,7 @@ message BuiltImage { string digest = 3; // Output only. Stores timing information for pushing the specified image. - TimeSpan push_timing = 4; + TimeSpan push_timing = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A step in the build pipeline. @@ -344,7 +411,7 @@ message BuildStep { repeated Volume volumes = 9; // Output only. Stores timing information for executing this build step. - TimeSpan timing = 10; + TimeSpan timing = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Stores timing information for pulling this build step's // builder image only. @@ -399,6 +466,9 @@ message Results { // can produce this output by writing to `$BUILDER_OUTPUT/output`. // Only the first 4KB of data is stored. repeated bytes build_step_outputs = 6; + + // Time to push all non-container artifacts. + TimeSpan artifact_timing = 7; } // An artifact that was uploaded during a build. This @@ -456,13 +526,16 @@ message Build { // Build or step was canceled by a user. CANCELLED = 7; + + // Build was enqueued for longer than the value of `queue_ttl`. + EXPIRED = 9; } // Output only. Unique identifier of the build. - string id = 1; + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. ID of the project. - string project_id = 16; + string project_id = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Status of the build. Status status = 2; @@ -477,19 +550,22 @@ message Build { repeated BuildStep steps = 11; // Output only. Results of the build. - Results results = 10; + Results results = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time at which the request to create the build was received. - google.protobuf.Timestamp create_time = 6; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time at which execution of the build was started. - google.protobuf.Timestamp start_time = 7; + google.protobuf.Timestamp start_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time at which execution of the build was finished. // // The difference between finish_time and start_time is the duration of the // build's execution. - google.protobuf.Timestamp finish_time = 8; + google.protobuf.Timestamp finish_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Amount of time that this build should be allowed to run, to second // granularity. If this amount of time elapses, work on the build will cease @@ -510,6 +586,13 @@ message Build { // `FAILURE`. repeated string images = 13; + // TTL in queue for this build. If provided and the build is enqueued longer + // than this value, the build will expire and the build status will be + // `EXPIRED`. + // + // The TTL starts ticking from create_time. + google.protobuf.Duration queue_ttl = 40; + // Artifacts produced by the build that should be uploaded upon // successful completion of all build steps. Artifacts artifacts = 37; @@ -531,7 +614,7 @@ message Build { BuildOptions options = 23; // Output only. URL to logs for this build in Google Cloud Console. - string log_url = 25; + string log_url = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; // Substitutions data for `Build` resource. map substitutions = 29; @@ -551,7 +634,7 @@ message Build { // // If the build does not specify source or images, // these keys will not be included. - map timing = 33; + map timing = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Artifacts produced by a build that should be uploaded upon @@ -627,8 +710,8 @@ message SourceProvenance { RepoSource resolved_repo_source = 6; // Output only. Hash(es) of the build source, which can be used to verify that - // the originalsource integrity was maintained in the build. Note that - // `FileHashes` willonly be populated if `BuildOptions` has requested a + // the original source integrity was maintained in the build. Note that + // `FileHashes` will only be populated if `BuildOptions` has requested a // `SourceProvenanceHash`. // // The keys to this map are file paths used as build source and the values @@ -636,7 +719,8 @@ message SourceProvenance { // // If the build source came in a single package such as a gzipped tarfile // (`.tar.gz`), the `FileHash` will be for the single path to that file. - map file_hashes = 4; + map file_hashes = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Container message for hashes of byte content of files, used in @@ -684,26 +768,26 @@ message Secret { // Request to create a new build. message CreateBuildRequest { - // ID of the project. - string project_id = 1; + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Build resource to create. - Build build = 2; + // Required. Build resource to create. + Build build = 2 [(google.api.field_behavior) = REQUIRED]; } // Request to get a build. message GetBuildRequest { - // ID of the project. - string project_id = 1; + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // ID of the build. - string id = 2; + // Required. ID of the build. + string id = 2 [(google.api.field_behavior) = REQUIRED]; } // Request to list builds. message ListBuildsRequest { - // ID of the project. - string project_id = 1; + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; // Number of results to return in the list. int32 page_size = 2; @@ -726,29 +810,48 @@ message ListBuildsResponse { // Request to cancel an ongoing build. message CancelBuildRequest { - // ID of the project. - string project_id = 1; + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // ID of the build. - string id = 2; + // Required. ID of the build. + string id = 2 [(google.api.field_behavior) = REQUIRED]; } // Configuration for an automated build in response to source repository // changes. message BuildTrigger { // Output only. Unique identifier of the trigger. - string id = 1; + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Human-readable description of this trigger. string description = 10; + // User-assigned name of the trigger. Must be unique within the project. + // Trigger names must meet the following requirements: + // + // + They must contain only alphanumeric characters and dashes. + // + They can be 1-64 characters long. + // + They must begin and end with an alphanumeric character. + string name = 21; + + // Tags for annotation of a `BuildTrigger` + repeated string tags = 19; + // Template describing the types of source changes to trigger a build. // // Branch and tag names in trigger templates are interpreted as regular // expressions. Any branch or tag change that matches that regular expression // will trigger a build. + // + // Mutually exclusive with `github`. RepoSource trigger_template = 7; + // GitHubEventsConfig describes the configuration of a trigger that creates + // a build whenever a GitHub event is received. + // + // Mutually exclusive with `trigger_template`. + GitHubEventsConfig github = 13; + // Template describing the Build request to make when the trigger is matched. oneof build_template { // Contents of the build template. @@ -760,16 +863,19 @@ message BuildTrigger { } // Output only. Time when the trigger was created. - google.protobuf.Timestamp create_time = 5; + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // If true, the trigger will never result in a build. bool disabled = 9; - // Substitutions data for Build resource. + // Substitutions for Build resource. The keys must match the following + // regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the + // keys in bindings. map substitutions = 11; // ignored_files and included_files are file glob matches using - // http://godoc/pkg/path/filepath#Match extended with support for "**". + // https://golang.org/pkg/path/filepath/#Match extended with support for "**". // // If ignored_files and changed files are both empty, then they are // not used to determine whether or not to trigger a build. @@ -790,55 +896,146 @@ message BuildTrigger { repeated string included_files = 16; } +// GitHubEventsConfig describes the configuration of a trigger that creates a +// build whenever a GitHub event is received. +// +// This message is experimental. +message GitHubEventsConfig { + // The installationID that emits the GitHub event. + int64 installation_id = 1 [deprecated = true]; + + // Owner of the repository. For example: The owner for + // https://github.com/googlecloudplatform/cloud-builders is + // "googlecloudplatform". + string owner = 6; + + // Name of the repository. For example: The name for + // https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". + string name = 7; + + // Filter describing the types of events to trigger a build. + // Currently supported event types: push, pull_request. + oneof event { + // filter to match changes in pull requests. + PullRequestFilter pull_request = 4; + + // filter to match changes in refs like branches, tags. + PushFilter push = 5; + } +} + +// PullRequestFilter contains filter properties for matching GitHub Pull +// Requests. +message PullRequestFilter { + // Controls behavior of Pull Request comments. + enum CommentControl { + // Do not require comments on Pull Requests before builds are triggered. + COMMENTS_DISABLED = 0; + + // Enforce that repository owners or collaborators must comment on Pull + // Requests before builds are triggered. + COMMENTS_ENABLED = 1; + } + + // Target refs to match. + // A target ref is the git reference where the pull request will be applied. + oneof git_ref { + // Regex of branches to match. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + string branch = 2; + } + + // Whether to block builds on a "/gcbrun" comment from a repository admin or + // collaborator. + CommentControl comment_control = 5; + + // If true, branches that do NOT match the git_ref will trigger a build. + bool invert_regex = 6; +} + +// Push contains filter properties for matching GitHub git pushes. +message PushFilter { + // Modified refs to match. + // A modified refs are the refs modified by a git push operation. + oneof git_ref { + // Regexes matching branches to build. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + string branch = 2; + + // Regexes matching tags to build. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + string tag = 3; + } + + // When true, only trigger a build if the revision regex does NOT match the + // git_ref regex. + bool invert_regex = 4; +} + // Request to create a new `BuildTrigger`. message CreateBuildTriggerRequest { - // ID of the project for which to configure automatic builds. - string project_id = 1; + // Required. ID of the project for which to configure automatic builds. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // `BuildTrigger` to create. - BuildTrigger trigger = 2; + // Required. `BuildTrigger` to create. + BuildTrigger trigger = 2 [(google.api.field_behavior) = REQUIRED]; } // Returns the `BuildTrigger` with the specified ID. message GetBuildTriggerRequest { - // ID of the project that owns the trigger. - string project_id = 1; + // Required. ID of the project that owns the trigger. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // ID of the `BuildTrigger` to get. - string trigger_id = 2; + // Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. + string trigger_id = 2 [(google.api.field_behavior) = REQUIRED]; } // Request to list existing `BuildTriggers`. message ListBuildTriggersRequest { - // ID of the project for which to list BuildTriggers. - string project_id = 1; + // Required. ID of the project for which to list BuildTriggers. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Number of results to return in the list. + int32 page_size = 2; + + // Token to provide to skip to a particular spot in the list. + string page_token = 3; } // Response containing existing `BuildTriggers`. message ListBuildTriggersResponse { // `BuildTriggers` for the project, sorted by `create_time` descending. repeated BuildTrigger triggers = 1; + + // Token to receive the next page of results. + string next_page_token = 2; } // Request to delete a `BuildTrigger`. message DeleteBuildTriggerRequest { - // ID of the project that owns the trigger. - string project_id = 1; + // Required. ID of the project that owns the trigger. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // ID of the `BuildTrigger` to delete. - string trigger_id = 2; + // Required. ID of the `BuildTrigger` to delete. + string trigger_id = 2 [(google.api.field_behavior) = REQUIRED]; } // Request to update an existing `BuildTrigger`. message UpdateBuildTriggerRequest { - // ID of the project that owns the trigger. - string project_id = 1; + // Required. ID of the project that owns the trigger. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // ID of the `BuildTrigger` to update. - string trigger_id = 2; + // Required. ID of the `BuildTrigger` to update. + string trigger_id = 2 [(google.api.field_behavior) = REQUIRED]; - // `BuildTrigger` to update. - BuildTrigger trigger = 3; + // Required. `BuildTrigger` to update. + BuildTrigger trigger = 3 [(google.api.field_behavior) = REQUIRED]; } // Optional arguments to enable specific features of builds. @@ -925,9 +1122,10 @@ message BuildOptions { // Storage. LogStreamingOption log_streaming_option = 5; - // Option to specify a `WorkerPool` for the build. User specifies the pool - // with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]". - // This is an experimental field. + // Option to specify a `WorkerPool` for the build. + // Format: projects/{project}/workerPools/{workerPool} + // + // This field is experimental. string worker_pool = 7; // Option to specify the logging mode, which determines where the logs are @@ -959,3 +1157,184 @@ message BuildOptions { // it is indicative of a build request with an incorrect configuration. repeated Volume volumes = 14; } + +// Configuration for a WorkerPool to run the builds. +// +// Workers are machines that Cloud Build uses to run your builds. By default, +// all workers run in a project owned by Cloud Build. To have full control over +// the workers that execute your builds -- such as enabling them to access +// private resources on your private network -- you can request Cloud Build to +// run the workers in your own project by creating a custom workers pool. +message WorkerPool { + // Supported GCP regions to create the `WorkerPool`. + enum Region { + // no region + REGION_UNSPECIFIED = 0; + + // us-central1 region + US_CENTRAL1 = 1; + + // us-west1 region + US_WEST1 = 2; + + // us-east1 region + US_EAST1 = 3; + + // us-east4 region + US_EAST4 = 4; + } + + // `WorkerPool` status + enum Status { + // Status of the `WorkerPool` is unknown. + STATUS_UNSPECIFIED = 0; + + // `WorkerPool` is being created. + CREATING = 1; + + // `WorkerPool` is running. + RUNNING = 2; + + // `WorkerPool` is being deleted: cancelling builds and draining workers. + DELETING = 3; + + // `WorkerPool` is deleted. + DELETED = 4; + } + + // User-defined name of the `WorkerPool`. + string name = 14; + + // The project ID of the GCP project for which the `WorkerPool` is created. + string project_id = 2; + + // Output only. The service account used to manage the `WorkerPool`. The + // service account must have the Compute Instance Admin (Beta) permission at + // the project level. + string service_account_email = 3; + + // Total number of workers to be created across all requested regions. + int64 worker_count = 4; + + // Configuration to be used for a creating workers in the `WorkerPool`. + WorkerConfig worker_config = 16; + + // List of regions to create the `WorkerPool`. Regions can't be empty. + // If Cloud Build adds a new GCP region in the future, the existing + // `WorkerPool` will not be enabled in the new region automatically; + // you must add the new region to the `regions` field to enable the + // `WorkerPool` in that region. + repeated Region regions = 9; + + // Output only. Time at which the request to create the `WorkerPool` was + // received. + google.protobuf.Timestamp create_time = 11; + + // Output only. Time at which the request to update the `WorkerPool` was + // received. + google.protobuf.Timestamp update_time = 17; + + // Output only. Time at which the request to delete the `WorkerPool` was + // received. + google.protobuf.Timestamp delete_time = 12; + + // Output only. WorkerPool Status. + Status status = 13; +} + +// WorkerConfig defines the configuration to be used for a creating workers in +// the pool. +message WorkerConfig { + // Machine Type of the worker, such as n1-standard-1. + // See https://cloud.google.com/compute/docs/machine-types. + // If left blank, Cloud Build will use a standard unspecified machine to + // create the worker pool. + // `machine_type` is overridden if you specify a different machine type in + // `build_options`. In this case, the VM specified in the `build_options` + // will be created on demand at build time. For more information see + // https://cloud.google.com/cloud-build/docs/speeding-up-builds#using_custom_virtual_machine_sizes + string machine_type = 1; + + // Size of the disk attached to the worker, in GB. + // See https://cloud.google.com/compute/docs/disks/ + // If `0` is specified, Cloud Build will use a standard disk size. + // `disk_size` is overridden if you specify a different disk size in + // `build_options`. In this case, a VM with a disk size specified in the + // `build_options` will be created on demand at build time. For more + // information see + // https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions + int64 disk_size_gb = 2; + + // The network definition used to create the worker. + // If this section is left empty, the workers will be created in + // WorkerPool.project_id on the default network. + Network network = 3; + + // The tag applied to the worker, and the same tag used by the firewall rule. + // It is used to identify the Cloud Build workers among other VMs. + // The default value for tag is `worker`. + string tag = 4; +} + +// Network describes the GCP network used to create workers in. +message Network { + // Project id containing the defined network and subnetwork. For a peered VPC, + // this will be the same as the project_id in which the workers are created. + // For a shared VPC, this will be the project sharing the network with the + // project_id project in which workers will be created. For custom workers + // with no VPC, this will be the same as project_id. + string project_id = 1; + + // Network on which the workers are created. + // "default" network is used if empty. + string network = 2; + + // Subnetwork on which the workers are created. + // "default" subnetwork is used if empty. + string subnetwork = 3; +} + +// Request to create a new `WorkerPool`. +message CreateWorkerPoolRequest { + // ID of the parent project. + string parent = 1; + + // `WorkerPool` resource to create. + WorkerPool worker_pool = 2; +} + +// Request to get a `WorkerPool` with the specified name. +message GetWorkerPoolRequest { + // The field will contain name of the resource requested, for example: + // "projects/project-1/workerPools/workerpool-name" + string name = 1; +} + +// Request to delete a `WorkerPool`. +message DeleteWorkerPoolRequest { + // The field will contain name of the resource requested, for example: + // "projects/project-1/workerPools/workerpool-name" + string name = 1; +} + +// Request to update a `WorkerPool`. +message UpdateWorkerPoolRequest { + // The field will contain name of the resource requested, for example: + // "projects/project-1/workerPools/workerpool-name" + string name = 2; + + // `WorkerPool` resource to update. + WorkerPool worker_pool = 3; +} + +// Request to list `WorkerPool`s. +message ListWorkerPoolsRequest { + // ID of the parent project. + string parent = 1; +} + +// Response containing existing `WorkerPools`. +message ListWorkerPoolsResponse { + // `WorkerPools` for the project. + repeated WorkerPool worker_pools = 1; +} diff --git a/google/devtools/containeranalysis/v1alpha1/containeranalysis_gapic.yaml b/google/devtools/cloudbuild/v1/cloudbuild_gapic.legacy.yaml similarity index 61% rename from google/devtools/containeranalysis/v1alpha1/containeranalysis_gapic.yaml rename to google/devtools/cloudbuild/v1/cloudbuild_gapic.legacy.yaml index 30c5abc92..69c9bbf13 100644 --- a/google/devtools/containeranalysis/v1alpha1/containeranalysis_gapic.yaml +++ b/google/devtools/cloudbuild/v1/cloudbuild_gapic.legacy.yaml @@ -3,23 +3,25 @@ config_schema_version: 1.0.0 # The settings of generated code in a specific language. language_settings: java: - package_name: com.google.cloud.devtools.containeranalysis.v1alpha1 + package_name: com.google.cloud.devtools.cloudbuild.v1 python: - package_name: google.cloud.devtools.containeranalysis_v1alpha1.gapic + package_name: google.cloud.devtools.cloudbuild_v1.gapic go: - package_name: cloud.google.com/go/devtools/containeranalysis/apiv1alpha1 + package_name: cloud.google.com/go/cloudbuild/apiv1 + release_level: GA csharp: - package_name: Google.Devtools.Containeranalysis.V1Alpha1 + package_name: Google.Devtools.Cloudbuild.V1 ruby: - package_name: Google::Cloud::Devtools::Containeranalysis::V1alpha1 + package_name: Google::Cloud::Devtools::Cloudbuild::V1 php: - package_name: Google\Cloud\Devtools\Containeranalysis\V1alpha1 + package_name: Google\Cloud\Devtools\Cloudbuild\V1 nodejs: - package_name: containeranalysis.v1alpha1 + package_name: cloudbuild.v1 + domain_layer_location: google-cloud # A list of API interface configurations. interfaces: -# The fully qualified name of the API interface. -- name: google.devtools.containeranalysis.v1alpha1.ContainerAnalysis + # The fully qualified name of the API interface. +- name: google.devtools.cloudbuild.v1.CloudBuild # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. # The name_pattern is a pattern to describe the names of the resources of this @@ -30,16 +32,7 @@ interfaces: # methods. If empty, no name methods are generated. # The entity_name is the name to be used as a basis for generated methods and # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - - name_pattern: projects/{project}/notes/{note} - entity_name: note - - name_pattern: projects/{project}/occurrences/{occurrence} - entity_name: occurrence + collections: [] # Definition for retryable codes. retry_codes_def: - name: idempotent @@ -107,230 +100,143 @@ interfaces: # timeout_millis - Specifies the default timeout for a non-retrying call. If # the call is retrying, refer to retry_params_name instead. methods: - - name: GetOccurrence + - name: CreateBuild flattening: groups: - parameters: - - name + - project_id + - build required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: occurrence - timeout_millis: 60000 - - name: ListOccurrences - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: occurrences - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - - name: DeleteOccurrence - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: occurrence - timeout_millis: 60000 - - name: CreateOccurrence - flattening: - groups: - - parameters: - - parent - - occurrence - required_fields: - - parent - - occurrence + - project_id + - build retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - parent: project timeout_millis: 60000 - - name: UpdateOccurrence + - name: GetBuild flattening: groups: - parameters: - - name - - occurrence + - project_id + - id required_fields: - - name - - occurrence - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: occurrence - timeout_millis: 60000 - - name: GetOccurrenceNote - flattening: - groups: - - parameters: - - name - required_fields: - - name + - project_id + - id retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: occurrence timeout_millis: 60000 - - name: GetNote + - name: ListBuilds flattening: groups: - parameters: - - name + - project_id + - filter required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: note - timeout_millis: 60000 - - name: ListNotes - flattening: - groups: - - parameters: - - parent - required_fields: - - parent + - project_id page_streaming: request: page_size_field: page_size token_field: page_token response: token_field: next_page_token - resources_field: notes + resources_field: builds retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - parent: project timeout_millis: 60000 - - name: DeleteNote + - name: CancelBuild flattening: groups: - parameters: - - name + - project_id + - id required_fields: - - name - retry_codes_name: idempotent + - project_id + - id + retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - name: note timeout_millis: 60000 - - name: CreateNote + - name: CreateBuildTrigger flattening: groups: - parameters: - - parent - - note_id - - note + - project_id + - trigger required_fields: - - parent - - note_id - - note + - project_id + - trigger retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - parent: project timeout_millis: 60000 - - name: UpdateNote + - name: GetBuildTrigger flattening: groups: - parameters: - - name - - note + - project_id + - trigger_id required_fields: - - name - - note - retry_codes_name: non_idempotent + - project_id + - trigger_id + retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: note timeout_millis: 60000 - - name: ListNoteOccurrences + - name: ListBuildTriggers flattening: groups: - parameters: - - name + - project_id required_fields: - - name - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: occurrences + - project_id retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: note timeout_millis: 60000 - - name: GetVulnzOccurrencesSummary + - name: DeleteBuildTrigger flattening: groups: - parameters: - - parent + - project_id + - trigger_id required_fields: - - parent + - project_id + - trigger_id retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - parent: project timeout_millis: 60000 - - name: SetIamPolicy + - name: UpdateBuildTrigger flattening: groups: - parameters: - - resource - - policy + - project_id + - trigger_id + - trigger required_fields: - - resource - - policy + - project_id + - trigger_id + - trigger retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - resource: note timeout_millis: 60000 - - name: GetIamPolicy + - name: RunBuildTrigger flattening: groups: - parameters: - - resource + - project_id + - trigger_id + - source required_fields: - - resource + - project_id + - trigger_id + - source retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - resource: note timeout_millis: 60000 - - name: TestIamPermissions + - name: RetryBuild flattening: groups: - parameters: - - resource - - permissions + - project_id + - id required_fields: - - resource - - permissions + - project_id + - id retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - resource: note timeout_millis: 60000 diff --git a/google/devtools/cloudbuild/v1/cloudbuild_gapic.yaml b/google/devtools/cloudbuild/v1/cloudbuild_gapic.yaml index 7b7d8c00c..7224ee027 100644 --- a/google/devtools/cloudbuild/v1/cloudbuild_gapic.yaml +++ b/google/devtools/cloudbuild/v1/cloudbuild_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -7,7 +7,8 @@ language_settings: python: package_name: google.cloud.devtools.cloudbuild_v1.gapic go: - package_name: cloud.google.com/go/devtools/cloudbuild/apiv1 + package_name: cloud.google.com/go/cloudbuild/apiv1 + release_level: GA csharp: package_name: Google.Devtools.Cloudbuild.V1 ruby: @@ -16,120 +17,13 @@ language_settings: package_name: Google\Cloud\Devtools\Cloudbuild\V1 nodejs: package_name: cloudbuild.v1 + domain_layer_location: google-cloud # A list of API interface configurations. interfaces: # The fully qualified name of the API interface. - name: google.devtools.cloudbuild.v1.CloudBuild - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: [] - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # name - The simple name of the method. - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce - # method overloads which allow a client to directly pass request message - # fields as method parameters. This information may or may not be used, - # depending on the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request - # message. - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the - # resource name formats defined in the field_name_patterns - # and response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a - # paging list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It - # defines which fields match the paging pattern in the request. The - # request consists of a page_size_field and a token_field. The - # page_size_field is the name of the optional field specifying the - # maximum number of elements to be returned in the response. The - # token_field is the name of the field in the request containing the - # page token. - # The response specifies response information of the list method. It - # defines which fields match the paging pattern in the response. The - # response consists of a token_field and a resources_field. The - # token_field is the name of the field in the response containing the - # next page token. The resources_field is the name of the field in the - # response containing the list of resources belonging to the page. - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: CreateBuild - flattening: - groups: - - parameters: - - project_id - - build - required_fields: - - project_id - - build - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: GetBuild - flattening: - groups: - - parameters: - - project_id - - id - required_fields: - - project_id - - id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - name: ListBuilds - flattening: - groups: - - parameters: - - project_id - - filter - required_fields: - - project_id page_streaming: request: page_size_field: page_size @@ -137,104 +31,5 @@ interfaces: response: token_field: next_page_token resources_field: builds - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - - name: CancelBuild - flattening: - groups: - - parameters: - - project_id - - id - required_fields: - - project_id - - id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: CreateBuildTrigger - flattening: - groups: - - parameters: - - project_id - - trigger - required_fields: - - project_id - - trigger - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: GetBuildTrigger - flattening: - groups: - - parameters: - - project_id - - trigger_id - required_fields: - - project_id - - trigger_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - - name: ListBuildTriggers - flattening: - groups: - - parameters: - - project_id - required_fields: - - project_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - name: DeleteBuildTrigger - flattening: - groups: - - parameters: - - project_id - - trigger_id - required_fields: - - project_id - - trigger_id retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - - name: UpdateBuildTrigger - flattening: - groups: - - parameters: - - project_id - - trigger_id - - trigger - required_fields: - - project_id - - trigger_id - - trigger - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: RunBuildTrigger - flattening: - groups: - - parameters: - - project_id - - trigger_id - - source - required_fields: - - project_id - - trigger_id - - source - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: RetryBuild - flattening: - groups: - - parameters: - - project_id - - id - required_fields: - - project_id - - id - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 diff --git a/google/devtools/cloudbuild/v1/cloudbuild_grpc_service_config.json b/google/devtools/cloudbuild/v1/cloudbuild_grpc_service_config.json new file mode 100755 index 000000000..30032d00a --- /dev/null +++ b/google/devtools/cloudbuild/v1/cloudbuild_grpc_service_config.json @@ -0,0 +1,67 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.devtools.cloudbuild.v1.CloudBuild", + "method": "GetBuild" + }, + { + "service": "google.devtools.cloudbuild.v1.CloudBuild", + "method": "ListBuilds" + }, + { + "service": "google.devtools.cloudbuild.v1.CloudBuild", + "method": "GetBuildTrigger" + }, + { + "service": "google.devtools.cloudbuild.v1.CloudBuild", + "method": "ListBuildTriggers" + }, + { + "service": "google.devtools.cloudbuild.v1.CloudBuild", + "method": "DeleteBuildTrigger" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.devtools.cloudbuild.v1.CloudBuild", + "method": "CreateBuild" + }, + { + "service": "google.devtools.cloudbuild.v1.CloudBuild", + "method": "CancelBuild" + }, + { + "service": "google.devtools.cloudbuild.v1.CloudBuild", + "method": "CreateBuildTrigger" + }, + { + "service": "google.devtools.cloudbuild.v1.CloudBuild", + "method": "UpdateBuildTrigger" + }, + { + "service": "google.devtools.cloudbuild.v1.CloudBuild", + "method": "RunBuildTrigger" + }, + { + "service": "google.devtools.cloudbuild.v1.CloudBuild", + "method": "RetryBuild" + } + ], + "timeout": "600s" + } + ] +} diff --git a/google/devtools/cloudbuild/v1/cloudbuild_v1.yaml b/google/devtools/cloudbuild/v1/cloudbuild_v1.yaml new file mode 100644 index 000000000..12efdd2a5 --- /dev/null +++ b/google/devtools/cloudbuild/v1/cloudbuild_v1.yaml @@ -0,0 +1,54 @@ +type: google.api.Service +config_version: 3 +name: cloudbuild.googleapis.com +title: Cloud Build API + +apis: +- name: google.devtools.cloudbuild.v1.CloudBuild + +types: +- name: google.devtools.cloudbuild.v1.ArtifactResult +- name: google.devtools.cloudbuild.v1.BuildOperationMetadata + +documentation: + summary: Creates and manages builds on Google Cloud Platform. + overview: |- + The Cloud Build API lets you to build an application or part of an + application from source code stored in Cloud Storage, Cloud Source + Repository, or GitHub, and package it into container images or artifacts. + The images are then stored in Container Registry and the artifacts are + stored in Cloud Storage. + +backend: + rules: + - selector: 'google.devtools.cloudbuild.v1.CloudBuild.*' + deadline: 5.0 + - selector: google.devtools.cloudbuild.v1.CloudBuild.CreateBuild + deadline: 60.0 + - selector: google.devtools.cloudbuild.v1.CloudBuild.CreateBuildTrigger + deadline: 60.0 + - selector: google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPool + deadline: 320.0 + - selector: google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPool + deadline: 320.0 + - selector: google.devtools.cloudbuild.v1.CloudBuild.ListBuilds + deadline: 20.0 + - selector: google.devtools.cloudbuild.v1.CloudBuild.RetryBuild + deadline: 60.0 + - selector: google.devtools.cloudbuild.v1.CloudBuild.RunBuildTrigger + deadline: 180.0 + - selector: google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPool + deadline: 20.0 + - selector: 'google.longrunning.Operations.*' + deadline: 5.0 + +authentication: + rules: + - selector: 'google.devtools.cloudbuild.v1.CloudBuild.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/devtools/clouddebugger/BUILD.bazel b/google/devtools/clouddebugger/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/devtools/clouddebugger/BUILD.bazel +++ b/google/devtools/clouddebugger/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/devtools/clouddebugger/clouddebugger.yaml b/google/devtools/clouddebugger/clouddebugger.yaml deleted file mode 100644 index be75bd23f..000000000 --- a/google/devtools/clouddebugger/clouddebugger.yaml +++ /dev/null @@ -1,40 +0,0 @@ -type: google.api.Service -config_version: 2 -name: clouddebugger.googleapis.com -title: Stackdriver Debugger API - -apis: -- name: google.devtools.clouddebugger.v2.Controller2 -- name: google.devtools.clouddebugger.v2.Debugger2 - -documentation: - summary: |- - Examines the call stack and variables of a running application without - stopping or slowing it down. - -backend: - rules: - - selector: google.devtools.clouddebugger.v2.Controller2.RegisterDebuggee - deadline: 300.0 - - selector: google.devtools.clouddebugger.v2.Controller2.ListActiveBreakpoints - deadline: 300.0 - - selector: google.devtools.clouddebugger.v2.Controller2.UpdateActiveBreakpoint - deadline: 300.0 - - selector: google.devtools.clouddebugger.v2.Debugger2.SetBreakpoint - deadline: 300.0 - - selector: google.devtools.clouddebugger.v2.Debugger2.GetBreakpoint - deadline: 300.0 - - selector: google.devtools.clouddebugger.v2.Debugger2.DeleteBreakpoint - deadline: 300.0 - - selector: google.devtools.clouddebugger.v2.Debugger2.ListBreakpoints - deadline: 300.0 - - selector: google.devtools.clouddebugger.v2.Debugger2.ListDebuggees - deadline: 300.0 - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/cloud_debugger diff --git a/google/devtools/clouddebugger/v2/BUILD.bazel b/google/devtools/clouddebugger/v2/BUILD.bazel index 6b33ee4df..7be200131 100644 --- a/google/devtools/clouddebugger/v2/BUILD.bazel +++ b/google/devtools/clouddebugger/v2/BUILD.bazel @@ -1,13 +1,16 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "debugger_proto", + name = "clouddebugger_proto", srcs = [ "controller.proto", "data.proto", @@ -15,8 +18,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/devtools/source/v1:source_proto", - "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:timestamp_proto", "@com_google_protobuf//:wrappers_proto", @@ -24,8 +28,11 @@ proto_library( ) proto_library_with_info( - name = "debugger_proto_with_info", - deps = [":debugger_proto"], + name = "clouddebugger_proto_with_info", + deps = [ + ":clouddebugger_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -33,74 +40,56 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( - name = "debugger_java_proto", - deps = [":debugger_proto"], + name = "clouddebugger_java_proto", + deps = [":clouddebugger_proto"], ) java_grpc_library( - name = "debugger_java_grpc", - srcs = [":debugger_proto"], - deps = [":debugger_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "debugger_resource_name_java_proto", - gapic_yaml = "clouddebugger_gapic.yaml", - deps = [":debugger_proto"], + name = "clouddebugger_java_grpc", + srcs = [":clouddebugger_proto"], + deps = [":clouddebugger_java_proto"], ) java_gapic_library( - name = "debugger_java_gapic", - src = ":debugger_proto_with_info", + name = "clouddebugger_java_gapic", + src = ":clouddebugger_proto_with_info", gapic_yaml = "clouddebugger_gapic.yaml", - service_yaml = "//google/devtools/clouddebugger:clouddebugger.yaml", - test_deps = [":debugger_java_grpc"], + package = "google.devtools.clouddebugger.v2", + service_yaml = "clouddebugger_v2.yaml", + test_deps = [ + ":clouddebugger_java_grpc", + ], deps = [ - ":debugger_java_proto", - ":debugger_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ":clouddebugger_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":debugger_java_gapic_test", +java_gapic_test( + name = "clouddebugger_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.debugger.v2.Controller2ClientTest", + "com.google.cloud.debugger.v2.Debugger2ClientTest", ], -) for test_name in [ - "com.google.cloud.debugger.v2.Debugger2ClientTest", - "com.google.cloud.debugger.v2.Controller2ClientTest", -]] + runtime_deps = [":clouddebugger_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-debugger-v2-java", - client_deps = [":debugger_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":debugger_java_gapic_test"], - grpc_deps = [":debugger_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - "//google/devtools/source/v1:source_java_proto", - "//google/devtools/source/v1:source_proto", - ":debugger_java_proto", - ":debugger_proto", - ":debugger_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + name = "google-cloud-devtools-clouddebugger-v2-java", + deps = [ + ":clouddebugger_java_gapic", + ":clouddebugger_java_grpc", + ":clouddebugger_java_proto", + ":clouddebugger_proto", + ], ) ############################################################################## @@ -108,17 +97,17 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "debugger_go_proto", + name = "clouddebugger_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/devtools/clouddebugger/v2", - protos = [":debugger_proto"], + protos = [":clouddebugger_proto"], deps = [ "//google/api:annotations_go_proto", "//google/devtools/source/v1:source_go_proto", @@ -126,28 +115,269 @@ go_proto_library( ) go_gapic_library( - name = "debugger_go_gapic", - src = ":debugger_proto_with_info", - gapic_yaml = "clouddebugger_gapic.yaml", - importpath = "cloud.google.com/go/debugger/apiv2", - service_yaml = "//google/devtools/clouddebugger:clouddebugger.yaml", - deps = [":debugger_go_proto"], + name = "clouddebugger_go_gapic", + srcs = [":clouddebugger_proto_with_info"], + grpc_service_config = "clouddebugger_grpc_service_config.json", + importpath = "cloud.google.com/go/debugger/apiv2;clouddebugger", + service_yaml = "clouddebugger_v2.yaml", + deps = [ + ":clouddebugger_go_proto", + ], ) go_test( - name = "debugger_go_gapic_test", - srcs = [":debugger_go_gapic_srcjar_test"], - embed = [":debugger_go_gapic"], + name = "clouddebugger_go_gapic_test", + srcs = [":clouddebugger_go_gapic_srcjar_test"], + embed = [":clouddebugger_go_gapic"], importpath = "cloud.google.com/go/debugger/apiv2", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-debugger-v2-go", + name = "gapi-cloud-devtools-clouddebugger-v2-go", + deps = [ + ":clouddebugger_go_gapic", + ":clouddebugger_go_gapic_srcjar-test.srcjar", + ":clouddebugger_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "clouddebugger_moved_proto", + srcs = [":clouddebugger_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/devtools/source/v1:source_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "clouddebugger_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":clouddebugger_moved_proto"], +) + +py_grpc_library( + name = "clouddebugger_py_grpc", + srcs = [":clouddebugger_moved_proto"], + deps = [":clouddebugger_py_proto"], +) + +py_gapic_library( + name = "clouddebugger_py_gapic", + src = ":clouddebugger_proto_with_info", + gapic_yaml = "clouddebugger_gapic.yaml", + package = "google.devtools.clouddebugger.v2", + service_yaml = "clouddebugger_v2.yaml", + deps = [ + ":clouddebugger_py_grpc", + ":clouddebugger_py_proto", + "//google/devtools/source/v1:source_py_grpc", + "//google/devtools/source/v1:source_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "devtools-clouddebugger-v2-py", deps = [ - ":debugger_go_gapic", - ":debugger_go_gapic_srcjar-smoke-test.srcjar", - ":debugger_go_gapic_srcjar-test.srcjar", - ":debugger_go_proto", + ":clouddebugger_py_gapic", + ":clouddebugger_py_grpc", + ":clouddebugger_py_proto", + "//google/devtools/source/v1:source_py_grpc", + "//google/devtools/source/v1:source_py_proto", ], ) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "clouddebugger_php_proto", + deps = [":clouddebugger_proto"], +) + +php_grpc_library( + name = "clouddebugger_php_grpc", + srcs = [":clouddebugger_proto"], + deps = [":clouddebugger_php_proto"], +) + +php_gapic_library( + name = "clouddebugger_php_gapic", + src = ":clouddebugger_proto_with_info", + gapic_yaml = "clouddebugger_gapic.yaml", + package = "google.devtools.clouddebugger.v2", + service_yaml = "clouddebugger_v2.yaml", + deps = [ + ":clouddebugger_php_grpc", + ":clouddebugger_php_proto", + "//google/devtools/source/v1:source_php_grpc", + "//google/devtools/source/v1:source_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-devtools-clouddebugger-v2-php", + deps = [ + ":clouddebugger_php_gapic", + ":clouddebugger_php_grpc", + ":clouddebugger_php_proto", + "//google/devtools/source/v1:source_php_grpc", + "//google/devtools/source/v1:source_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "clouddebugger_nodejs_gapic", + src = ":clouddebugger_proto_with_info", + gapic_yaml = "clouddebugger_gapic.yaml", + package = "google.devtools.clouddebugger.v2", + service_yaml = "clouddebugger_v2.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "devtools-clouddebugger-v2-nodejs", + deps = [ + ":clouddebugger_nodejs_gapic", + ":clouddebugger_proto", + "//google/devtools/source/v1:source_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "clouddebugger_ruby_proto", + deps = [":clouddebugger_proto"], +) + +ruby_grpc_library( + name = "clouddebugger_ruby_grpc", + srcs = [":clouddebugger_proto"], + deps = [":clouddebugger_ruby_proto"], +) + +ruby_gapic_library( + name = "clouddebugger_ruby_gapic", + src = ":clouddebugger_proto_with_info", + gapic_yaml = "clouddebugger_gapic.yaml", + package = "google.devtools.clouddebugger.v2", + service_yaml = "clouddebugger_v2.yaml", + deps = [ + ":clouddebugger_ruby_grpc", + ":clouddebugger_ruby_proto", + "//google/devtools/source/v1:source_ruby_grpc", + "//google/devtools/source/v1:source_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-devtools-clouddebugger-v2-ruby", + deps = [ + ":clouddebugger_ruby_gapic", + ":clouddebugger_ruby_grpc", + ":clouddebugger_ruby_proto", + "//google/devtools/source/v1:source_ruby_grpc", + "//google/devtools/source/v1:source_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "clouddebugger_csharp_proto", + deps = [":clouddebugger_proto"], +) + +csharp_grpc_library( + name = "clouddebugger_csharp_grpc", + srcs = [":clouddebugger_proto"], + deps = [":clouddebugger_csharp_proto"], +) + +csharp_gapic_library( + name = "clouddebugger_csharp_gapic", + src = ":clouddebugger_proto_with_info", + gapic_yaml = "clouddebugger_gapic.yaml", + package = "google.devtools.clouddebugger.v2", + service_yaml = "clouddebugger_v2.yaml", + deps = [ + ":clouddebugger_csharp_grpc", + ":clouddebugger_csharp_proto", + "//google/devtools/source/v1:source_csharp_grpc", + "//google/devtools/source/v1:source_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-devtools-clouddebugger-v2-csharp", + deps = [ + ":clouddebugger_csharp_gapic", + ":clouddebugger_csharp_grpc", + ":clouddebugger_csharp_proto", + "//google/devtools/source/v1:source_csharp_grpc", + "//google/devtools/source/v1:source_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/devtools/clouddebugger/v2/clouddebugger_gapic.legacy.yaml b/google/devtools/clouddebugger/v2/clouddebugger_gapic.legacy.yaml new file mode 100644 index 000000000..1e910b192 --- /dev/null +++ b/google/devtools/clouddebugger/v2/clouddebugger_gapic.legacy.yaml @@ -0,0 +1,156 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.debugger.v2 + python: + package_name: google.cloud.debugger_v2.gapic + go: + package_name: cloud.google.com/go/debugger/apiv2 + domain_layer_location: cloud.google.com/go/cmd/go-cloud-debug-agent + csharp: + package_name: Google.Cloud.Debugger.V2 + ruby: + package_name: Google::Cloud::Debugger::V2 + php: + package_name: Google\Cloud\Debugger\V2 + nodejs: + package_name: debugger.v2 + domain_layer_location: google-cloud +interfaces: +- name: google.devtools.clouddebugger.v2.Debugger2 + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: SetBreakpoint + required_fields: + - debuggee_id + - breakpoint + - client_version + flattening: + groups: + - parameters: + - debuggee_id + - breakpoint + - client_version + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: GetBreakpoint + required_fields: + - debuggee_id + - breakpoint_id + - client_version + flattening: + groups: + - parameters: + - debuggee_id + - breakpoint_id + - client_version + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: DeleteBreakpoint + required_fields: + - debuggee_id + - breakpoint_id + - client_version + flattening: + groups: + - parameters: + - debuggee_id + - breakpoint_id + - client_version + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: ListBreakpoints + required_fields: + - debuggee_id + - client_version + flattening: + groups: + - parameters: + - debuggee_id + - client_version + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: ListDebuggees + required_fields: + - project + - client_version + flattening: + groups: + - parameters: + - project + - client_version + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 +- name: google.devtools.clouddebugger.v2.Controller2 + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: RegisterDebuggee + required_fields: + - debuggee + flattening: + groups: + - parameters: + - debuggee + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: ListActiveBreakpoints + required_fields: + - debuggee_id + flattening: + groups: + - parameters: + - debuggee_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: UpdateActiveBreakpoint + required_fields: + - debuggee_id + - breakpoint + flattening: + groups: + - parameters: + - debuggee_id + - breakpoint + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/devtools/clouddebugger/v2/clouddebugger_gapic.yaml b/google/devtools/clouddebugger/v2/clouddebugger_gapic.yaml index 1e910b192..2c4d3717e 100644 --- a/google/devtools/clouddebugger/v2/clouddebugger_gapic.yaml +++ b/google/devtools/clouddebugger/v2/clouddebugger_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.debugger.v2 @@ -19,14 +19,6 @@ language_settings: domain_layer_location: google-cloud interfaces: - name: google.devtools.clouddebugger.v2.Debugger2 - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -37,81 +29,10 @@ interfaces: max_rpc_timeout_millis: 60000 total_timeout_millis: 600000 methods: - - name: SetBreakpoint - required_fields: - - debuggee_id - - breakpoint - - client_version - flattening: - groups: - - parameters: - - debuggee_id - - breakpoint - - client_version - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: GetBreakpoint - required_fields: - - debuggee_id - - breakpoint_id - - client_version - flattening: - groups: - - parameters: - - debuggee_id - - breakpoint_id - - client_version - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - name: DeleteBreakpoint - required_fields: - - debuggee_id - - breakpoint_id - - client_version - flattening: - groups: - - parameters: - - debuggee_id - - breakpoint_id - - client_version - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - - name: ListBreakpoints - required_fields: - - debuggee_id - - client_version - flattening: - groups: - - parameters: - - debuggee_id - - client_version retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - - name: ListDebuggees - required_fields: - - project - - client_version - flattening: - groups: - - parameters: - - project - - client_version - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - name: google.devtools.clouddebugger.v2.Controller2 - collections: [] - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -122,35 +43,6 @@ interfaces: max_rpc_timeout_millis: 60000 total_timeout_millis: 600000 methods: - - name: RegisterDebuggee - required_fields: - - debuggee - flattening: - groups: - - parameters: - - debuggee - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: ListActiveBreakpoints - required_fields: - - debuggee_id - flattening: - groups: - - parameters: - - debuggee_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - name: UpdateActiveBreakpoint - required_fields: - - debuggee_id - - breakpoint - flattening: - groups: - - parameters: - - debuggee_id - - breakpoint retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 diff --git a/google/devtools/clouddebugger/v2/clouddebugger_grpc_service_config.json b/google/devtools/clouddebugger/v2/clouddebugger_grpc_service_config.json new file mode 100755 index 000000000..01f991354 --- /dev/null +++ b/google/devtools/clouddebugger/v2/clouddebugger_grpc_service_config.json @@ -0,0 +1,74 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.devtools.clouddebugger.v2.Debugger2", + "method": "SetBreakpoint" + } + ], + "timeout": "600s" + }, + { + "name": [ + { + "service": "google.devtools.clouddebugger.v2.Debugger2", + "method": "GetBreakpoint" + }, + { + "service": "google.devtools.clouddebugger.v2.Debugger2", + "method": "DeleteBreakpoint" + }, + { + "service": "google.devtools.clouddebugger.v2.Debugger2", + "method": "ListBreakpoints" + }, + { + "service": "google.devtools.clouddebugger.v2.Debugger2", + "method": "ListDebuggees" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.devtools.clouddebugger.v2.Controller2", + "method": "RegisterDebuggee" + } + ], + "timeout": "600s" + }, + { + "name": [ + { + "service": "google.devtools.clouddebugger.v2.Controller2", + "method": "ListActiveBreakpoints" + }, + { + "service": "google.devtools.clouddebugger.v2.Controller2", + "method": "UpdateActiveBreakpoint" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/devtools/clouddebugger/v2/clouddebugger_v2.yaml b/google/devtools/clouddebugger/v2/clouddebugger_v2.yaml new file mode 100644 index 000000000..b1ad712d5 --- /dev/null +++ b/google/devtools/clouddebugger/v2/clouddebugger_v2.yaml @@ -0,0 +1,33 @@ +type: google.api.Service +config_version: 2 +name: clouddebugger.googleapis.com +title: Stackdriver Debugger API + +apis: +- name: google.devtools.clouddebugger.v2.Controller2 +- name: google.devtools.clouddebugger.v2.Debugger2 + +documentation: + summary: |- + Examines the call stack and variables of a running application without + stopping or slowing it down. + +backend: + rules: + - selector: 'google.devtools.clouddebugger.v2.Controller2.*' + deadline: 300.0 + - selector: 'google.devtools.clouddebugger.v2.Debugger2.*' + deadline: 300.0 + +authentication: + rules: + - selector: 'google.devtools.clouddebugger.v2.Controller2.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud_debugger + - selector: 'google.devtools.clouddebugger.v2.Debugger2.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud_debugger diff --git a/google/devtools/clouddebugger/v2/controller.proto b/google/devtools/clouddebugger/v2/controller.proto index 3c9da584d..8cb5fd0c6 100644 --- a/google/devtools/clouddebugger/v2/controller.proto +++ b/google/devtools/clouddebugger/v2/controller.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,8 @@ syntax = "proto3"; package google.devtools.clouddebugger.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/devtools/clouddebugger/v2/data.proto"; import "google/protobuf/empty.proto"; @@ -49,6 +51,11 @@ option php_namespace = "Google\\Cloud\\Debugger\\V2"; // a completed breakpoint. This functionality is available using the Debugger // service. service Controller2 { + option (google.api.default_host) = "clouddebugger.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud_debugger"; + // Registers the debuggee with the controller service. // // All agents attached to the same application must call this method with @@ -59,12 +66,12 @@ service Controller2 { // This protocol allows the controller service to disable debuggees, recover // from data loss, or change the `debuggee_id` format. Agents must handle // `debuggee_id` value changing upon re-registration. - rpc RegisterDebuggee(RegisterDebuggeeRequest) - returns (RegisterDebuggeeResponse) { + rpc RegisterDebuggee(RegisterDebuggeeRequest) returns (RegisterDebuggeeResponse) { option (google.api.http) = { post: "/v2/controller/debuggees/register" body: "*" }; + option (google.api.method_signature) = "debuggee"; } // Returns the list of all active breakpoints for the debuggee. @@ -80,11 +87,11 @@ service Controller2 { // Moreover, an agent should remember the breakpoints that are completed // until the controller removes them from the active list to avoid // setting those breakpoints again. - rpc ListActiveBreakpoints(ListActiveBreakpointsRequest) - returns (ListActiveBreakpointsResponse) { + rpc ListActiveBreakpoints(ListActiveBreakpointsRequest) returns (ListActiveBreakpointsResponse) { option (google.api.http) = { get: "/v2/controller/debuggees/{debuggee_id}/breakpoints" }; + option (google.api.method_signature) = "debuggee_id"; } // Updates the breakpoint state or mutable fields. @@ -95,21 +102,21 @@ service Controller2 { // `condition` and `expressions` fields should not alter the breakpoint // semantics. These may only make changes such as canonicalizing a value // or snapping the location to the correct line of code. - rpc UpdateActiveBreakpoint(UpdateActiveBreakpointRequest) - returns (UpdateActiveBreakpointResponse) { + rpc UpdateActiveBreakpoint(UpdateActiveBreakpointRequest) returns (UpdateActiveBreakpointResponse) { option (google.api.http) = { put: "/v2/controller/debuggees/{debuggee_id}/breakpoints/{breakpoint.id}" body: "*" }; + option (google.api.method_signature) = "debuggee_id,breakpoint"; } } // Request to register a debuggee. message RegisterDebuggeeRequest { - // Debuggee information to register. + // Required. Debuggee information to register. // The fields `project`, `uniquifier`, `description` and `agent_version` // of the debuggee must be set. - Debuggee debuggee = 1; + Debuggee debuggee = 1 [(google.api.field_behavior) = REQUIRED]; } // Response for registering a debuggee. @@ -124,8 +131,8 @@ message RegisterDebuggeeResponse { // Request to list active breakpoints. message ListActiveBreakpointsRequest { - // Identifies the debuggee. - string debuggee_id = 1; + // Required. Identifies the debuggee. + string debuggee_id = 1 [(google.api.field_behavior) = REQUIRED]; // A token that, if specified, blocks the method call until the list // of active breakpoints has changed, or a server-selected timeout has @@ -160,15 +167,17 @@ message ListActiveBreakpointsResponse { // Request to update an active breakpoint. message UpdateActiveBreakpointRequest { - // Identifies the debuggee being debugged. - string debuggee_id = 1; + // Required. Identifies the debuggee being debugged. + string debuggee_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Updated breakpoint information. + // Required. Updated breakpoint information. // The field `id` must be set. // The agent must echo all Breakpoint specification fields in the update. - Breakpoint breakpoint = 2; + Breakpoint breakpoint = 2 [(google.api.field_behavior) = REQUIRED]; } // Response for updating an active breakpoint. // The message is defined to allow future extensions. -message UpdateActiveBreakpointResponse {} +message UpdateActiveBreakpointResponse { + +} diff --git a/google/devtools/clouddebugger/v2/data.proto b/google/devtools/clouddebugger/v2/data.proto index c2659a9fa..863385717 100644 --- a/google/devtools/clouddebugger/v2/data.proto +++ b/google/devtools/clouddebugger/v2/data.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,11 +17,10 @@ syntax = "proto3"; package google.devtools.clouddebugger.v2; -import "google/api/annotations.proto"; import "google/devtools/source/v1/source_context.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Debugger.V2"; @@ -445,8 +444,7 @@ message Debuggee { // References to the locations and revisions of the source code used in the // deployed application. - repeated google.devtools.source.v1.ExtendedSourceContext ext_source_contexts = - 13 [deprecated = true]; + repeated google.devtools.source.v1.ExtendedSourceContext ext_source_contexts = 13 [deprecated = true]; // A set of custom debuggee properties, populated by the agent, to be // displayed to the user. diff --git a/google/devtools/clouddebugger/v2/debugger.proto b/google/devtools/clouddebugger/v2/debugger.proto index 046f77076..546570e73 100644 --- a/google/devtools/clouddebugger/v2/debugger.proto +++ b/google/devtools/clouddebugger/v2/debugger.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,9 +17,11 @@ syntax = "proto3"; package google.devtools.clouddebugger.v2; -import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/devtools/clouddebugger/v2/data.proto"; import "google/protobuf/empty.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Debugger.V2"; option go_package = "google.golang.org/genproto/googleapis/devtools/clouddebugger/v2;clouddebugger"; @@ -41,12 +43,18 @@ option php_namespace = "Google\\Cloud\\Debugger\\V2"; // The Debugger service enables the client to set one or more Breakpoints on a // Debuggee and collect the results of the set Breakpoints. service Debugger2 { + option (google.api.default_host) = "clouddebugger.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud_debugger"; + // Sets the breakpoint to the debuggee. rpc SetBreakpoint(SetBreakpointRequest) returns (SetBreakpointResponse) { option (google.api.http) = { post: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/set" body: "breakpoint" }; + option (google.api.method_signature) = "debuggee_id,breakpoint,client_version"; } // Gets breakpoint information. @@ -54,22 +62,23 @@ service Debugger2 { option (google.api.http) = { get: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/{breakpoint_id}" }; + option (google.api.method_signature) = "debuggee_id,breakpoint_id,client_version"; } // Deletes the breakpoint from the debuggee. - rpc DeleteBreakpoint(DeleteBreakpointRequest) - returns (google.protobuf.Empty) { + rpc DeleteBreakpoint(DeleteBreakpointRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/{breakpoint_id}" }; + option (google.api.method_signature) = "debuggee_id,breakpoint_id,client_version"; } // Lists all breakpoints for the debuggee. - rpc ListBreakpoints(ListBreakpointsRequest) - returns (ListBreakpointsResponse) { + rpc ListBreakpoints(ListBreakpointsRequest) returns (ListBreakpointsResponse) { option (google.api.http) = { get: "/v2/debugger/debuggees/{debuggee_id}/breakpoints" }; + option (google.api.method_signature) = "debuggee_id,client_version"; } // Lists all the debuggees that the user has access to. @@ -77,21 +86,22 @@ service Debugger2 { option (google.api.http) = { get: "/v2/debugger/debuggees" }; + option (google.api.method_signature) = "project,client_version"; } } // Request to set a breakpoint message SetBreakpointRequest { - // ID of the debuggee where the breakpoint is to be set. - string debuggee_id = 1; + // Required. ID of the debuggee where the breakpoint is to be set. + string debuggee_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Breakpoint specification to set. + // Required. Breakpoint specification to set. // The field `location` of the breakpoint must be set. - Breakpoint breakpoint = 2; + Breakpoint breakpoint = 2 [(google.api.field_behavior) = REQUIRED]; - // The client version making the call. + // Required. The client version making the call. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). - string client_version = 4; + string client_version = 4 [(google.api.field_behavior) = REQUIRED]; } // Response for setting a breakpoint. @@ -103,15 +113,15 @@ message SetBreakpointResponse { // Request to get breakpoint information. message GetBreakpointRequest { - // ID of the debuggee whose breakpoint to get. - string debuggee_id = 1; + // Required. ID of the debuggee whose breakpoint to get. + string debuggee_id = 1 [(google.api.field_behavior) = REQUIRED]; - // ID of the breakpoint to get. - string breakpoint_id = 2; + // Required. ID of the breakpoint to get. + string breakpoint_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The client version making the call. + // Required. The client version making the call. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). - string client_version = 4; + string client_version = 4 [(google.api.field_behavior) = REQUIRED]; } // Response for getting breakpoint information. @@ -123,15 +133,15 @@ message GetBreakpointResponse { // Request to delete a breakpoint. message DeleteBreakpointRequest { - // ID of the debuggee whose breakpoint to delete. - string debuggee_id = 1; + // Required. ID of the debuggee whose breakpoint to delete. + string debuggee_id = 1 [(google.api.field_behavior) = REQUIRED]; - // ID of the breakpoint to delete. - string breakpoint_id = 2; + // Required. ID of the breakpoint to delete. + string breakpoint_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The client version making the call. + // Required. The client version making the call. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). - string client_version = 3; + string client_version = 3 [(google.api.field_behavior) = REQUIRED]; } // Request to list breakpoints. @@ -143,8 +153,8 @@ message ListBreakpointsRequest { Breakpoint.Action value = 1; } - // ID of the debuggee whose breakpoints to list. - string debuggee_id = 1; + // Required. ID of the debuggee whose breakpoints to list. + string debuggee_id = 1 [(google.api.field_behavior) = REQUIRED]; // When set to `true`, the response includes the list of breakpoints set by // any user. Otherwise, it includes only breakpoints set by the caller. @@ -168,9 +178,9 @@ message ListBreakpointsRequest { // should be called again with the same `wait_token`. string wait_token = 6; - // The client version making the call. + // Required. The client version making the call. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). - string client_version = 8; + string client_version = 8 [(google.api.field_behavior) = REQUIRED]; } // Response for listing breakpoints. @@ -188,16 +198,16 @@ message ListBreakpointsResponse { // Request to list debuggees. message ListDebuggeesRequest { - // Project number of a Google Cloud project whose debuggees to list. - string project = 2; + // Required. Project number of a Google Cloud project whose debuggees to list. + string project = 2 [(google.api.field_behavior) = REQUIRED]; // When set to `true`, the result includes all debuggees. Otherwise, the // result includes only debuggees that are active. bool include_inactive = 3; - // The client version making the call. + // Required. The client version making the call. // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). - string client_version = 4; + string client_version = 4 [(google.api.field_behavior) = REQUIRED]; } // Response for listing debuggees. diff --git a/google/devtools/clouderrorreporting/BUILD.bazel b/google/devtools/clouderrorreporting/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/devtools/clouderrorreporting/BUILD.bazel +++ b/google/devtools/clouderrorreporting/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/devtools/clouderrorreporting/artman_errorreporting.legacy.yaml b/google/devtools/clouderrorreporting/artman_errorreporting.legacy.yaml new file mode 100644 index 000000000..6493aa47a --- /dev/null +++ b/google/devtools/clouderrorreporting/artman_errorreporting.legacy.yaml @@ -0,0 +1,34 @@ +common: + api_name: error-reporting + api_version: v1beta1 + organization_name: google-cloud + service_yaml: v1beta1/clouderrorreporting_v1beta1.yaml + gapic_yaml: v1beta1/errorreporting_gapic.legacy.yaml + src_proto_paths: + - v1beta1 + proto_deps: + - name: google-common-protos +artifacts: +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: php_gapic + type: GAPIC + language: PHP +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: go_gapic + type: GAPIC + language: GO +- name: csharp_gapic + type: GAPIC + language: CSHARP +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: gapic_config + type: GAPIC_CONFIG diff --git a/google/devtools/clouderrorreporting/artman_errorreporting.yaml b/google/devtools/clouderrorreporting/artman_errorreporting.yaml index 0e5a573a4..a4dd9f0c8 100644 --- a/google/devtools/clouderrorreporting/artman_errorreporting.yaml +++ b/google/devtools/clouderrorreporting/artman_errorreporting.yaml @@ -2,7 +2,7 @@ common: api_name: error-reporting api_version: v1beta1 organization_name: google-cloud - service_yaml: errorreporting.yaml + service_yaml: v1beta1/clouderrorreporting_v1beta1.yaml gapic_yaml: v1beta1/errorreporting_gapic.yaml src_proto_paths: - v1beta1 diff --git a/google/devtools/clouderrorreporting/errorreporting.yaml b/google/devtools/clouderrorreporting/errorreporting.yaml deleted file mode 100644 index 75df65ced..000000000 --- a/google/devtools/clouderrorreporting/errorreporting.yaml +++ /dev/null @@ -1,24 +0,0 @@ -type: google.api.Service -config_version: 3 -title: Stackdriver Error Reporting API -name: clouderrorreporting.googleapis.com - -documentation: - summary: >- - - Stackdriver Error Reporting groups and counts similar errors - from cloud services. - The Stackdriver Error Reporting API provides a way to report new errors and - read access to error groups and their associated errors. - -apis: -- name: google.devtools.clouderrorreporting.v1beta1.ErrorGroupService -- name: google.devtools.clouderrorreporting.v1beta1.ErrorStatsService -- name: google.devtools.clouderrorreporting.v1beta1.ReportErrorsService - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: - https://www.googleapis.com/auth/cloud-platform diff --git a/google/devtools/clouderrorreporting/v1beta1/BUILD.bazel b/google/devtools/clouderrorreporting/v1beta1/BUILD.bazel index 4b912abfb..d78bcd0f3 100644 --- a/google/devtools/clouderrorreporting/v1beta1/BUILD.bazel +++ b/google/devtools/clouderrorreporting/v1beta1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -16,7 +19,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", - "//google/api:monitored_resource_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:timestamp_proto", ], @@ -24,7 +29,10 @@ proto_library( proto_library_with_info( name = "clouderrorreporting_proto_with_info", - deps = [":clouderrorreporting_proto"], + deps = [ + ":clouderrorreporting_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -32,18 +40,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "clouderrorreporting_java_proto", deps = [":clouderrorreporting_proto"], @@ -52,53 +55,42 @@ java_proto_library( java_grpc_library( name = "clouderrorreporting_java_grpc", srcs = [":clouderrorreporting_proto"], - deps = [":clouderrorreporting_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "clouderrorreporting_resource_name_java_proto", - gapic_yaml = "errorreporting_gapic.yaml", - deps = [":clouderrorreporting_proto"], + deps = [":clouderrorreporting_java_proto"], ) java_gapic_library( name = "clouderrorreporting_java_gapic", src = ":clouderrorreporting_proto_with_info", gapic_yaml = "errorreporting_gapic.yaml", - service_yaml = "//google/devtools/clouderrorreporting:errorreporting.yaml", - test_deps = [":clouderrorreporting_java_grpc"], + package = "google.devtools.clouderrorreporting.v1beta1", + service_yaml = "clouderrorreporting_v1beta1.yaml", + test_deps = [ + ":clouderrorreporting_java_grpc", + ], deps = [ ":clouderrorreporting_java_proto", - ":clouderrorreporting_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":clouderrorreporting_java_gapic_test", +java_gapic_test( + name = "clouderrorreporting_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.errorreporting.v1beta1.ErrorGroupServiceClientTest", + "com.google.cloud.errorreporting.v1beta1.ErrorStatsServiceClientTest", + "com.google.cloud.errorreporting.v1beta1.ReportErrorsServiceClientTest", ], -) for test_name in [ - "com.google.cloud.errorreporting.v1beta1.ErrorGroupServiceClientTest", - "com.google.cloud.errorreporting.v1beta1.ErrorStatsServiceClientTest", - "com.google.cloud.errorreporting.v1beta1.ReportErrorsServiceClientTest", -]] + runtime_deps = [":clouderrorreporting_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-error-reporting-v1beta1-java", - client_deps = [":clouderrorreporting_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":clouderrorreporting_java_gapic_test"], - grpc_deps = [":clouderrorreporting_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + name = "google-cloud-devtools-clouderrorreporting-v1beta1-java", + deps = [ + ":clouderrorreporting_java_gapic", + ":clouderrorreporting_java_grpc", ":clouderrorreporting_java_proto", ":clouderrorreporting_proto", - ":clouderrorreporting_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -106,10 +98,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -119,17 +111,19 @@ go_proto_library( protos = [":clouderrorreporting_proto"], deps = [ "//google/api:annotations_go_proto", - "//google/api:monitoredres_go_proto", ], ) go_gapic_library( name = "clouderrorreporting_go_gapic", - src = ":clouderrorreporting_proto_with_info", - gapic_yaml = "errorreporting_gapic.yaml", - importpath = "cloud.google.com/go/errorreporting/apiv1beta1", - service_yaml = "//google/devtools/clouderrorreporting:errorreporting.yaml", - deps = [":clouderrorreporting_go_proto"], + srcs = [":clouderrorreporting_proto_with_info"], + grpc_service_config = "errorreporting_grpc_service_config.json", + importpath = "cloud.google.com/go/errorreporting/apiv1beta1;clouderrorreporting", + service_yaml = "clouderrorreporting_v1beta1.yaml", + deps = [ + ":clouderrorreporting_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], ) go_test( @@ -139,13 +133,234 @@ go_test( importpath = "cloud.google.com/go/errorreporting/apiv1beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-error-reporting-v1beta1-go", + name = "gapi-cloud-devtools-clouderrorreporting-v1beta1-go", deps = [ ":clouderrorreporting_go_gapic", - ":clouderrorreporting_go_gapic_srcjar-smoke-test.srcjar", ":clouderrorreporting_go_gapic_srcjar-test.srcjar", ":clouderrorreporting_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "clouderrorreporting_moved_proto", + srcs = [":clouderrorreporting_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "clouderrorreporting_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":clouderrorreporting_moved_proto"], +) + +py_grpc_library( + name = "clouderrorreporting_py_grpc", + srcs = [":clouderrorreporting_moved_proto"], + deps = [":clouderrorreporting_py_proto"], +) + +py_gapic_library( + name = "clouderrorreporting_py_gapic", + src = ":clouderrorreporting_proto_with_info", + gapic_yaml = "errorreporting_gapic.yaml", + package = "google.devtools.clouderrorreporting.v1beta1", + service_yaml = "clouderrorreporting_v1beta1.yaml", + deps = [ + ":clouderrorreporting_py_grpc", + ":clouderrorreporting_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "devtools-clouderrorreporting-v1beta1-py", + deps = [ + ":clouderrorreporting_py_gapic", + ":clouderrorreporting_py_grpc", + ":clouderrorreporting_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "clouderrorreporting_php_proto", + deps = [":clouderrorreporting_proto"], +) + +php_grpc_library( + name = "clouderrorreporting_php_grpc", + srcs = [":clouderrorreporting_proto"], + deps = [":clouderrorreporting_php_proto"], +) + +php_gapic_library( + name = "clouderrorreporting_php_gapic", + src = ":clouderrorreporting_proto_with_info", + gapic_yaml = "errorreporting_gapic.yaml", + package = "google.devtools.clouderrorreporting.v1beta1", + service_yaml = "clouderrorreporting_v1beta1.yaml", + deps = [ + ":clouderrorreporting_php_grpc", + ":clouderrorreporting_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-devtools-clouderrorreporting-v1beta1-php", + deps = [ + ":clouderrorreporting_php_gapic", + ":clouderrorreporting_php_grpc", + ":clouderrorreporting_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "clouderrorreporting_nodejs_gapic", + src = ":clouderrorreporting_proto_with_info", + gapic_yaml = "errorreporting_gapic.yaml", + package = "google.devtools.clouderrorreporting.v1beta1", + service_yaml = "clouderrorreporting_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "devtools-clouderrorreporting-v1beta1-nodejs", + deps = [ + ":clouderrorreporting_nodejs_gapic", + ":clouderrorreporting_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "clouderrorreporting_ruby_proto", + deps = [":clouderrorreporting_proto"], +) + +ruby_grpc_library( + name = "clouderrorreporting_ruby_grpc", + srcs = [":clouderrorreporting_proto"], + deps = [":clouderrorreporting_ruby_proto"], +) + +ruby_gapic_library( + name = "clouderrorreporting_ruby_gapic", + src = ":clouderrorreporting_proto_with_info", + gapic_yaml = "errorreporting_gapic.yaml", + package = "google.devtools.clouderrorreporting.v1beta1", + service_yaml = "clouderrorreporting_v1beta1.yaml", + deps = [ + ":clouderrorreporting_ruby_grpc", + ":clouderrorreporting_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-devtools-clouderrorreporting-v1beta1-ruby", + deps = [ + ":clouderrorreporting_ruby_gapic", + ":clouderrorreporting_ruby_grpc", + ":clouderrorreporting_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "clouderrorreporting_csharp_proto", + deps = [":clouderrorreporting_proto"], +) + +csharp_grpc_library( + name = "clouderrorreporting_csharp_grpc", + srcs = [":clouderrorreporting_proto"], + deps = [":clouderrorreporting_csharp_proto"], +) + +csharp_gapic_library( + name = "clouderrorreporting_csharp_gapic", + src = ":clouderrorreporting_proto_with_info", + gapic_yaml = "errorreporting_gapic.yaml", + package = "google.devtools.clouderrorreporting.v1beta1", + service_yaml = "clouderrorreporting_v1beta1.yaml", + deps = [ + ":clouderrorreporting_csharp_grpc", + ":clouderrorreporting_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-devtools-clouderrorreporting-v1beta1-csharp", + deps = [ + ":clouderrorreporting_csharp_gapic", + ":clouderrorreporting_csharp_grpc", + ":clouderrorreporting_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/devtools/clouderrorreporting/v1beta1/clouderrorreporting_v1beta1.yaml b/google/devtools/clouderrorreporting/v1beta1/clouderrorreporting_v1beta1.yaml new file mode 100644 index 000000000..7c311cc23 --- /dev/null +++ b/google/devtools/clouderrorreporting/v1beta1/clouderrorreporting_v1beta1.yaml @@ -0,0 +1,34 @@ +type: google.api.Service +config_version: 3 +name: clouderrorreporting.googleapis.com +title: Stackdriver Error Reporting API + +apis: +- name: google.devtools.clouderrorreporting.v1beta1.ErrorGroupService +- name: google.devtools.clouderrorreporting.v1beta1.ErrorStatsService +- name: google.devtools.clouderrorreporting.v1beta1.ReportErrorsService + +documentation: + summary: |- + Groups and counts similar errors from cloud services and applications, + reports new errors, and provides access to error groups and their + associated errors. + +authentication: + rules: + - selector: google.devtools.clouderrorreporting.v1beta1.ErrorGroupService.GetGroup + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.devtools.clouderrorreporting.v1beta1.ErrorGroupService.UpdateGroup + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.devtools.clouderrorreporting.v1beta1.ReportErrorsService.ReportErrorEvent + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/devtools/clouderrorreporting/v1beta1/common.proto b/google/devtools/clouderrorreporting/v1beta1/common.proto index 132f1a646..5a4f02523 100644 --- a/google/devtools/clouderrorreporting/v1beta1/common.proto +++ b/google/devtools/clouderrorreporting/v1beta1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,9 +17,10 @@ syntax = "proto3"; package google.devtools.clouderrorreporting.v1beta1; import "google/api/annotations.proto"; -import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; +option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.ErrorReporting.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting"; option java_multiple_files = true; @@ -29,6 +30,11 @@ option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1"; // Description of a group of similar error events. message ErrorGroup { + option (google.api.resource) = { + type: "clouderrorreporting.googleapis.com/ErrorGroup" + pattern: "projects/{project}/groups/{group}" + }; + // The group resource name. // Example: projects/my-project-123/groups/my-groupid string name = 1; @@ -79,6 +85,8 @@ message ServiceContext { // Represents the source code version that the developer provided, // which could represent a version label or a Git SHA-1 hash, for example. + // For App Engine standard environment, the version is set to the version of + // the app. string version = 3; // Type of the MonitoredResource. List of possible values: @@ -112,8 +120,7 @@ message ErrorContext { // report the error, usually the place where it was logged. // For a logged exception this would be the source line where the // exception is logged, usually close to the place where it was - // caught. This value is in contrast to `Exception.cause_location`, - // which describes the source line where the exception was thrown. + // caught. SourceLocation report_location = 3; } @@ -144,11 +151,10 @@ message HttpRequestContext { string remote_ip = 6; } -// Indicates a location in the source code of the service for which -// errors are reported. -// This data should be provided by the application when reporting an error, -// unless the error report has been generated automatically from Google App -// Engine logs. All fields are optional. +// Indicates a location in the source code of the service for which errors are +// reported. `functionName` must be provided by the application when reporting +// an error, unless the error report contains a `message` with a supported +// exception stack trace. All fields are optional for the later case. message SourceLocation { // The source code filename, which can include a truncated relative // path, or a full path from a production machine. diff --git a/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto b/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto index 15086a9ea..ab14ab316 100644 --- a/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto +++ b/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,19 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.devtools.clouderrorreporting.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/devtools/clouderrorreporting/v1beta1/common.proto"; +option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.ErrorReporting.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting"; option java_multiple_files = true; @@ -28,11 +33,15 @@ option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1"; // Service for retrieving and updating individual error groups. service ErrorGroupService { + option (google.api.default_host) = "clouderrorreporting.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Get the specified group. rpc GetGroup(GetGroupRequest) returns (ErrorGroup) { option (google.api.http) = { get: "/v1beta1/{group_name=projects/*/groups/*}" }; + option (google.api.method_signature) = "group_name"; } // Replace the data for the specified group. @@ -42,12 +51,13 @@ service ErrorGroupService { put: "/v1beta1/{group.name=projects/*/groups/*}" body: "group" }; + option (google.api.method_signature) = "group"; } } // A request to return an individual group. message GetGroupRequest { - // [Required] The group resource name. Written as + // Required. The group resource name. Written as // projects/projectID/groups/group_name. // Call // @@ -55,11 +65,16 @@ message GetGroupRequest { // this project. // // Example: projects/my-project-123/groups/my-group - string group_name = 1; + string group_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouderrorreporting.googleapis.com/ErrorGroup" + } + ]; } // A request to replace the existing data for the given group. message UpdateGroupRequest { - // [Required] The group which replaces the resource on the server. - ErrorGroup group = 1; + // Required. The group which replaces the resource on the server. + ErrorGroup group = 1 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto b/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto index ffb25b2b8..8f4c909e2 100644 --- a/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto +++ b/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,16 +11,21 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.devtools.clouderrorreporting.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/devtools/clouderrorreporting/v1beta1/common.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; +option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.ErrorReporting.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting"; option java_multiple_files = true; @@ -31,11 +36,15 @@ option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1"; // An API for retrieving and managing error statistics as well as data for // individual events. service ErrorStatsService { + option (google.api.default_host) = "clouderrorreporting.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Lists the specified groups. rpc ListGroupStats(ListGroupStatsRequest) returns (ListGroupStatsResponse) { option (google.api.http) = { get: "/v1beta1/{project_name=projects/*}/groupStats" }; + option (google.api.method_signature) = "project_name,time_range"; } // Lists the specified events. @@ -43,6 +52,7 @@ service ErrorStatsService { option (google.api.http) = { get: "/v1beta1/{project_name=projects/*}/events" }; + option (google.api.method_signature) = "project_name,group_id"; } // Deletes all error events of a given project. @@ -50,60 +60,67 @@ service ErrorStatsService { option (google.api.http) = { delete: "/v1beta1/{project_name=projects/*}/events" }; + option (google.api.method_signature) = "project_name"; } } // Specifies a set of `ErrorGroupStats` to return. message ListGroupStatsRequest { - // [Required] The resource name of the Google Cloud Platform project. Written + // Required. The resource name of the Google Cloud Platform project. Written // as projects/ plus the // Google Cloud // Platform project ID. // // Example: projects/my-project-123. - string project_name = 1; + string project_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; - // [Optional] List all ErrorGroupStats with these IDs. - repeated string group_id = 2; + // Optional. List all ErrorGroupStats with these IDs. + repeated string group_id = 2 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] List only ErrorGroupStats which belong to a service + // Optional. List only ErrorGroupStats which belong to a service // context that matches the filter. // Data for all service contexts is returned if this field is not specified. - ServiceContextFilter service_filter = 3; + ServiceContextFilter service_filter = 3 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] List data for the given time range. - // If not set a default time range is used. The field time_range_begin - // in the response will specify the beginning of this time range. + // Optional. List data for the given time range. + // If not set, a default time range is used. The field + // time_range_begin in the response will specify the beginning + // of this time range. // Only ErrorGroupStats with a non-zero count in the given time - // range are returned, unless the request contains an explicit group_id list. - // If a group_id list is given, also ErrorGroupStats with zero - // occurrences are returned. - QueryTimeRange time_range = 5; + // range are returned, unless the request contains an explicit + // group_id list. If a group_id list is given, also + // ErrorGroupStats with zero occurrences are returned. + QueryTimeRange time_range = 5 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] The preferred duration for a single returned `TimedCount`. + // Optional. The preferred duration for a single returned `TimedCount`. // If not set, no timed counts are returned. - google.protobuf.Duration timed_count_duration = 6; + google.protobuf.Duration timed_count_duration = 6 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] The alignment of the timed counts to be returned. + // Optional. The alignment of the timed counts to be returned. // Default is `ALIGNMENT_EQUAL_AT_END`. - TimedCountAlignment alignment = 7; + TimedCountAlignment alignment = 7 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] Time where the timed counts shall be aligned if rounded + // Optional. Time where the timed counts shall be aligned if rounded // alignment is chosen. Default is 00:00 UTC. - google.protobuf.Timestamp alignment_time = 8; + google.protobuf.Timestamp alignment_time = 8 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] The sort order in which the results are returned. + // Optional. The sort order in which the results are returned. // Default is `COUNT_DESC`. - ErrorGroupOrder order = 9; + ErrorGroupOrder order = 9 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] The maximum number of results to return per response. + // Optional. The maximum number of results to return per response. // Default is 20. - int32 page_size = 11; + int32 page_size = 11 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] A `next_page_token` provided by a previous response. To view + // Optional. A `next_page_token` provided by a previous response. To view // additional results, pass this token along with the identical query // parameters as the first request. - string page_token = 12; + string page_token = 12 [(google.api.field_behavior) = OPTIONAL]; } // Contains a set of requested error group stats. @@ -196,33 +213,79 @@ message TimedCount { google.protobuf.Timestamp end_time = 3; } +// Specifies how the time periods of error group counts are aligned. +enum TimedCountAlignment { + // No alignment specified. + ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0; + + // The time periods shall be consecutive, have width equal to the + // requested duration, and be aligned at the `alignment_time` provided in + // the request. + // The `alignment_time` does not have to be inside the query period but + // even if it is outside, only time periods are returned which overlap + // with the query period. + // A rounded alignment will typically result in a + // different size of the first or the last time period. + ALIGNMENT_EQUAL_ROUNDED = 1; + + // The time periods shall be consecutive, have width equal to the + // requested duration, and be aligned at the end of the requested time + // period. This can result in a different size of the + // first time period. + ALIGNMENT_EQUAL_AT_END = 2; +} + +// A sorting order of error groups. +enum ErrorGroupOrder { + // No group order specified. + GROUP_ORDER_UNSPECIFIED = 0; + + // Total count of errors in the given time window in descending order. + COUNT_DESC = 1; + + // Timestamp when the group was last seen in the given time window + // in descending order. + LAST_SEEN_DESC = 2; + + // Timestamp when the group was created in descending order. + CREATED_DESC = 3; + + // Number of affected users in the given time window in descending order. + AFFECTED_USERS_DESC = 4; +} + // Specifies a set of error events to return. message ListEventsRequest { - // [Required] The resource name of the Google Cloud Platform project. Written + // Required. The resource name of the Google Cloud Platform project. Written // as `projects/` plus the // [Google Cloud Platform project // ID](https://support.google.com/cloud/answer/6158840). // Example: `projects/my-project-123`. - string project_name = 1; + string project_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; - // [Required] The group for which events shall be returned. - string group_id = 2; + // Required. The group for which events shall be returned. + string group_id = 2 [(google.api.field_behavior) = REQUIRED]; - // [Optional] List only ErrorGroups which belong to a service context that + // Optional. List only ErrorGroups which belong to a service context that // matches the filter. // Data for all service contexts is returned if this field is not specified. - ServiceContextFilter service_filter = 3; + ServiceContextFilter service_filter = 3 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] List only data for the given time range. + // Optional. List only data for the given time range. // If not set a default time range is used. The field time_range_begin // in the response will specify the beginning of this time range. - QueryTimeRange time_range = 4; + QueryTimeRange time_range = 4 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] The maximum number of results to return per response. - int32 page_size = 6; + // Optional. The maximum number of results to return per response. + int32 page_size = 6 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] A `next_page_token` provided by a previous response. - string page_token = 7; + // Optional. A `next_page_token` provided by a previous response. + string page_token = 7 [(google.api.field_behavior) = OPTIONAL]; } // Contains a set of requested error events. @@ -277,69 +340,35 @@ message QueryTimeRange { // Only exact, case-sensitive matches are supported. // If a field is unset or empty, it matches arbitrary values. message ServiceContextFilter { - // [Optional] The exact value to match against + // Optional. The exact value to match against // [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). - string service = 2; + string service = 2 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] The exact value to match against + // Optional. The exact value to match against // [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). - string version = 3; + string version = 3 [(google.api.field_behavior) = OPTIONAL]; - // [Optional] The exact value to match against + // Optional. The exact value to match against // [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). - string resource_type = 4; + string resource_type = 4 [(google.api.field_behavior) = OPTIONAL]; } // Deletes all events in the project. message DeleteEventsRequest { - // [Required] The resource name of the Google Cloud Platform project. Written + // Required. The resource name of the Google Cloud Platform project. Written // as `projects/` plus the // [Google Cloud Platform project // ID](https://support.google.com/cloud/answer/6158840). // Example: `projects/my-project-123`. - string project_name = 1; + string project_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; } // Response message for deleting error events. -message DeleteEventsResponse {} - -// Specifies how the time periods of error group counts are aligned. -enum TimedCountAlignment { - // No alignment specified. - ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0; - - // The time periods shall be consecutive, have width equal to the - // requested duration, and be aligned at the `alignment_time` provided in - // the request. - // The `alignment_time` does not have to be inside the query period but - // even if it is outside, only time periods are returned which overlap - // with the query period. - // A rounded alignment will typically result in a - // different size of the first or the last time period. - ALIGNMENT_EQUAL_ROUNDED = 1; - - // The time periods shall be consecutive, have width equal to the - // requested duration, and be aligned at the end of the requested time - // period. This can result in a different size of the - // first time period. - ALIGNMENT_EQUAL_AT_END = 2; -} +message DeleteEventsResponse { -// A sorting order of error groups. -enum ErrorGroupOrder { - // No group order specified. - GROUP_ORDER_UNSPECIFIED = 0; - - // Total count of errors in the given time window in descending order. - COUNT_DESC = 1; - - // Timestamp when the group was last seen in the given time window - // in descending order. - LAST_SEEN_DESC = 2; - - // Timestamp when the group was created in descending order. - CREATED_DESC = 3; - - // Number of affected users in the given time window in descending order. - AFFECTED_USERS_DESC = 4; } diff --git a/google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.legacy.yaml b/google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.legacy.yaml new file mode 100644 index 000000000..32e70a5b9 --- /dev/null +++ b/google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.legacy.yaml @@ -0,0 +1,223 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.errorreporting.v1beta1 + python: + package_name: google.cloud.errorreporting_v1beta1.gapic + go: + package_name: cloud.google.com/go/errorreporting/apiv1beta1 + domain_layer_location: cloud.google.com/go/errorreporting + csharp: + package_name: Google.Cloud.ErrorReporting.V1Beta1 + ruby: + package_name: Google::Cloud::ErrorReporting::V1beta1 + php: + package_name: Google\Cloud\ErrorReporting\V1beta1 + nodejs: + package_name: errorreporting.v1beta1 + domain_layer_location: google-cloud +collections: +- name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName +- name_pattern: projects/{project}/groups/{group} + entity_name: group +interfaces: +- name: google.devtools.clouderrorreporting.v1beta1.ErrorGroupService + collections: + - name_pattern: projects/{project}/groups/{group} + entity_name: group + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + methods: + - name: GetGroup + flattening: + groups: + - parameters: + - group_name + required_fields: + - group_name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + group_name: group + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: UpdateGroup + flattening: + groups: + - parameters: + - group + required_fields: + - group + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + group.name: group + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 +- name: google.devtools.clouderrorreporting.v1beta1.ReportErrorsService + smoke_test: + method: ReportErrorEvent + init_fields: + - project_name%project=$PROJECT_ID + - event.message="[MESSAGE]" + - event.service_context.service="[SERVICE]" + - event.context.report_location.file_path="path/to/file.lang" + - event.context.report_location.line_number=42 + - event.context.report_location.function_name="meaningOfLife" + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + methods: + - name: ReportErrorEvent + flattening: + groups: + - parameters: + - project_name + - event + required_fields: + - project_name + - event + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + project_name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 +- name: google.devtools.clouderrorreporting.v1beta1.ErrorStatsService + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + methods: + - name: ListGroupStats + flattening: + groups: + - parameters: + - project_name + - time_range + required_fields: + - project_name + - time_range + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: error_group_stats + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + project_name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: ListEvents + flattening: + groups: + - parameters: + - project_name + - group_id + required_fields: + - project_name + - group_id + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: error_events + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + project_name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: DeleteEvents + flattening: + groups: + - parameters: + - project_name + required_fields: + - project_name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + project_name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 +resource_name_generation: +- message_name: ErrorGroup + field_entity_map: + name: group +- message_name: GetGroupRequest + field_entity_map: + group_name: group +- message_name: ListGroupStatsRequest + field_entity_map: + project_name: project +- message_name: ListEventsRequest + field_entity_map: + project_name: project +- message_name: DeleteEventsRequest + field_entity_map: + project_name: project +- message_name: ReportErrorEventRequest + field_entity_map: + project_name: project diff --git a/google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.yaml b/google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.yaml index c373fa8d9..4b2f20899 100644 --- a/google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.yaml +++ b/google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.errorreporting.v1beta1 @@ -17,62 +17,7 @@ language_settings: nodejs: package_name: errorreporting.v1beta1 domain_layer_location: google-cloud -collections: -- name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName -- name_pattern: projects/{project}/groups/{group} - entity_name: group interfaces: -- name: google.devtools.clouderrorreporting.v1beta1.ErrorGroupService - collections: - - name_pattern: projects/{project}/groups/{group} - entity_name: group - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - methods: - - name: GetGroup - flattening: - groups: - - parameters: - - group_name - required_fields: - - group_name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - group_name: group - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - - name: UpdateGroup - flattening: - groups: - - parameters: - - group - required_fields: - - group - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - group.name: group - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - name: google.devtools.clouderrorreporting.v1beta1.ReportErrorsService smoke_test: method: ReportErrorEvent @@ -83,141 +28,11 @@ interfaces: - event.context.report_location.file_path="path/to/file.lang" - event.context.report_location.line_number=42 - event.context.report_location.function_name="meaningOfLife" - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 +- name: google.devtools.clouderrorreporting.v1beta1.ErrorGroupService methods: - - name: ReportErrorEvent - flattening: - groups: - - parameters: - - project_name - - event - required_fields: - - project_name - - event - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - project_name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + - name: UpdateGroup + retry_codes_name: idempotent - name: google.devtools.clouderrorreporting.v1beta1.ErrorStatsService - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 methods: - - name: ListGroupStats - flattening: - groups: - - parameters: - - project_name - - time_range - required_fields: - - project_name - - time_range - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: error_group_stats - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - project_name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - - name: ListEvents - flattening: - groups: - - parameters: - - project_name - - group_id - required_fields: - - project_name - - group_id - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: error_events - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - project_name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - name: DeleteEvents - flattening: - groups: - - parameters: - - project_name - required_fields: - - project_name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - project_name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 -resource_name_generation: -- message_name: ErrorGroup - field_entity_map: - name: group -- message_name: GetGroupRequest - field_entity_map: - group_name: group -- message_name: ListGroupStatsRequest - field_entity_map: - project_name: project -- message_name: ListEventsRequest - field_entity_map: - project_name: project -- message_name: DeleteEventsRequest - field_entity_map: - project_name: project -- message_name: ReportErrorEventRequest - field_entity_map: - project_name: project diff --git a/google/devtools/clouderrorreporting/v1beta1/errorreporting_grpc_service_config.json b/google/devtools/clouderrorreporting/v1beta1/errorreporting_grpc_service_config.json new file mode 100755 index 000000000..d2515bba6 --- /dev/null +++ b/google/devtools/clouderrorreporting/v1beta1/errorreporting_grpc_service_config.json @@ -0,0 +1,32 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.devtools.clouderrorreporting.v1beta1.ErrorStatsService" + }, + { + "service": "google.devtools.clouderrorreporting.v1beta1.ErrorGroupService" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.devtools.clouderrorreporting.v1beta1.ReportErrorsService" + } + ], + "timeout": "600s" + } + ] +} diff --git a/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto b/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto index d77f646ce..fe80fcef0 100644 --- a/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto +++ b/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,20 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.devtools.clouderrorreporting.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/devtools/clouderrorreporting/v1beta1/common.proto"; import "google/protobuf/timestamp.proto"; +option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.ErrorReporting.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting"; option java_multiple_files = true; @@ -29,57 +34,87 @@ option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1"; // An API for reporting error events. service ReportErrorsService { + option (google.api.default_host) = "clouderrorreporting.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Report an individual error event. // - // This endpoint accepts either an OAuth token, - // or an - // API key + // This endpoint accepts **either** an OAuth token, + // **or** an [API key](https://support.google.com/cloud/answer/6158862) // for authentication. To use an API key, append it to the URL as the value of // a `key` parameter. For example: - //
POST
-  // https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456
- rpc ReportErrorEvent(ReportErrorEventRequest) - returns (ReportErrorEventResponse) { + // + // `POST + // https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456` + rpc ReportErrorEvent(ReportErrorEventRequest) returns (ReportErrorEventResponse) { option (google.api.http) = { post: "/v1beta1/{project_name=projects/*}/events:report" body: "event" }; + option (google.api.method_signature) = "project_name,event"; } } // A request for reporting an individual error event. message ReportErrorEventRequest { - // [Required] The resource name of the Google Cloud Platform project. Written + // Required. The resource name of the Google Cloud Platform project. Written // as `projects/` plus the // [Google Cloud Platform project // ID](https://support.google.com/cloud/answer/6158840). Example: // `projects/my-project-123`. - string project_name = 1; + string project_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; - // [Required] The error event to be reported. - ReportedErrorEvent event = 2; + // Required. The error event to be reported. + ReportedErrorEvent event = 2 [(google.api.field_behavior) = REQUIRED]; } // Response for reporting an individual error event. // Data may be added to this message in the future. -message ReportErrorEventResponse {} +message ReportErrorEventResponse { + +} // An error event which is reported to the Error Reporting system. message ReportedErrorEvent { - // [Optional] Time when the event occurred. + // Optional. Time when the event occurred. // If not provided, the time when the event was received by the // Error Reporting system will be used. - google.protobuf.Timestamp event_time = 1; + google.protobuf.Timestamp event_time = 1 [(google.api.field_behavior) = OPTIONAL]; - // [Required] The service context in which this error has occurred. - ServiceContext service_context = 2; + // Required. The service context in which this error has occurred. + ServiceContext service_context = 2 [(google.api.field_behavior) = REQUIRED]; - // [Required] A message describing the error. The message can contain an - // exception stack in one of the supported programming languages and formats. - // In that case, the message is parsed and detailed exception information - // is returned when retrieving the error event again. - string message = 3; + // Required. The error message. + // If no `context.reportLocation` is provided, the message must contain a + // header (typically consisting of the exception type name and an error + // message) and an exception stack trace in one of the supported programming + // languages and formats. + // Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. + // Supported stack trace formats are: + // + // * **Java**: Must be the return value of + // [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). + // * **Python**: Must be the return value of + // [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). + // * **JavaScript**: Must be the value of + // [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned + // by V8. + // * **Ruby**: Must contain frames returned by + // [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). + // * **C#**: Must be the return value of + // [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). + // * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` + // and contain the result of + // [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). + // * **Go**: Must be the return value of + // [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). + string message = 3 [(google.api.field_behavior) = REQUIRED]; - // [Optional] A description of the context in which the error occurred. - ErrorContext context = 4; + // Optional. A description of the context in which the error occurred. + ErrorContext context = 4 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/google/devtools/cloudtrace/BUILD.bazel b/google/devtools/cloudtrace/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/devtools/cloudtrace/BUILD.bazel +++ b/google/devtools/cloudtrace/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/devtools/cloudtrace/artman_cloudtrace_v1.yaml b/google/devtools/cloudtrace/artman_cloudtrace_v1.yaml index 595cf1040..d607933df 100644 --- a/google/devtools/cloudtrace/artman_cloudtrace_v1.yaml +++ b/google/devtools/cloudtrace/artman_cloudtrace_v1.yaml @@ -3,11 +3,12 @@ common: api_version: v1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1 - service_yaml: cloudtrace_v1.yaml + service_yaml: v1/cloudtrace_v1.yaml gapic_yaml: v1/cloudtrace_gapic.yaml + proto_package: google.devtools.cloudtrace.v1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/devtools/cloudtrace/artman_cloudtrace_v2.yaml b/google/devtools/cloudtrace/artman_cloudtrace_v2.yaml index c4fad37fe..c58bf9ee4 100644 --- a/google/devtools/cloudtrace/artman_cloudtrace_v2.yaml +++ b/google/devtools/cloudtrace/artman_cloudtrace_v2.yaml @@ -3,11 +3,12 @@ common: api_version: v2 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v2 - service_yaml: cloudtrace_v2.yaml + service_yaml: v2/cloudtrace_v2.yaml gapic_yaml: v2/cloudtrace_gapic.yaml + proto_package: google.devtools.cloudtrace.v2 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/devtools/cloudtrace/v1/BUILD.bazel b/google/devtools/cloudtrace/v1/BUILD.bazel index 1626d051a..fd43a7575 100644 --- a/google/devtools/cloudtrace/v1/BUILD.bazel +++ b/google/devtools/cloudtrace/v1/BUILD.bazel @@ -1,26 +1,35 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "trace_proto", + name = "cloudtrace_proto", srcs = [ "trace.proto", ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:timestamp_proto", ], ) proto_library_with_info( - name = "trace_proto_with_info", - deps = [":trace_proto"], + name = "cloudtrace_proto_with_info", + deps = [ + ":cloudtrace_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -28,69 +37,55 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( - name = "trace_java_proto", - deps = [":trace_proto"], + name = "cloudtrace_java_proto", + deps = [":cloudtrace_proto"], ) java_grpc_library( - name = "trace_java_grpc", - srcs = [":trace_proto"], - deps = [":trace_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "trace_resource_name_java_proto", - gapic_yaml = "cloudtrace_gapic.yaml", - deps = [":trace_proto"], + name = "cloudtrace_java_grpc", + srcs = [":cloudtrace_proto"], + deps = [":cloudtrace_java_proto"], ) java_gapic_library( - name = "trace_java_gapic", - src = ":trace_proto_with_info", + name = "cloudtrace_java_gapic", + src = ":cloudtrace_proto_with_info", gapic_yaml = "cloudtrace_gapic.yaml", - service_yaml = "//google/devtools/cloudtrace:cloudtrace_v1.yaml", - test_deps = [":trace_java_grpc"], + package = "google.devtools.cloudtrace.v1", + service_yaml = "cloudtrace_v1.yaml", + test_deps = [ + ":cloudtrace_java_grpc", + ], deps = [ - ":trace_java_proto", - ":trace_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ":cloudtrace_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [":trace_java_gapic_test"], -) for test_name in [ - "com.google.cloud.trace.v1.TraceServiceClientTest", -]] +java_gapic_test( + name = "cloudtrace_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.trace.v1.TraceServiceClientTest", + ], + runtime_deps = [":cloudtrace_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-trace-v1-java", - client_deps = [":trace_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":trace_java_gapic_test"], - grpc_deps = [":trace_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":trace_java_proto", - ":trace_proto", - ":trace_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + name = "google-cloud-devtools-cloudtrace-v1-java", + deps = [ + ":cloudtrace_java_gapic", + ":cloudtrace_java_grpc", + ":cloudtrace_java_proto", + ":cloudtrace_proto", + ], ) ############################################################################## @@ -98,43 +93,286 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "trace_go_proto", + name = "cloudtrace_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/devtools/cloudtrace/v1", - protos = [":trace_proto"], - deps = ["//google/api:annotations_go_proto"], + protos = [":cloudtrace_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], ) go_gapic_library( - name = "trace_go_gapic", - src = ":trace_proto_with_info", - gapic_yaml = "cloudtrace_gapic.yaml", - importpath = "cloud.google.com/go/trace/apiv1", - service_yaml = "//google/devtools/cloudtrace:cloudtrace_v1.yaml", - deps = [":trace_go_proto"], + name = "cloudtrace_go_gapic", + srcs = [":cloudtrace_proto_with_info"], + grpc_service_config = "cloudtrace_grpc_service_config.json", + importpath = "cloud.google.com/go/trace/apiv1;trace", + service_yaml = "cloudtrace_v1.yaml", + deps = [ + ":cloudtrace_go_proto", + ], ) go_test( - name = "trace_go_gapic_test", - srcs = [":trace_go_gapic_srcjar_test"], - embed = [":trace_go_gapic"], + name = "cloudtrace_go_gapic_test", + srcs = [":cloudtrace_go_gapic_srcjar_test"], + embed = [":cloudtrace_go_gapic"], importpath = "cloud.google.com/go/trace/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-trace-v1-go", + name = "gapi-cloud-devtools-cloudtrace-v1-go", + deps = [ + ":cloudtrace_go_gapic", + ":cloudtrace_go_gapic_srcjar-test.srcjar", + ":cloudtrace_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "cloudtrace_moved_proto", + srcs = [":cloudtrace_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "cloudtrace_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":cloudtrace_moved_proto"], +) + +py_grpc_library( + name = "cloudtrace_py_grpc", + srcs = [":cloudtrace_moved_proto"], + deps = [":cloudtrace_py_proto"], +) + +py_gapic_library( + name = "cloudtrace_py_gapic", + src = ":cloudtrace_proto_with_info", + gapic_yaml = "cloudtrace_gapic.yaml", + package = "google.devtools.cloudtrace.v1", + service_yaml = "cloudtrace_v1.yaml", + deps = [ + ":cloudtrace_py_grpc", + ":cloudtrace_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "devtools-cloudtrace-v1-py", + deps = [ + ":cloudtrace_py_gapic", + ":cloudtrace_py_grpc", + ":cloudtrace_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "cloudtrace_php_proto", + deps = [":cloudtrace_proto"], +) + +php_grpc_library( + name = "cloudtrace_php_grpc", + srcs = [":cloudtrace_proto"], + deps = [":cloudtrace_php_proto"], +) + +php_gapic_library( + name = "cloudtrace_php_gapic", + src = ":cloudtrace_proto_with_info", + gapic_yaml = "cloudtrace_gapic.yaml", + package = "google.devtools.cloudtrace.v1", + service_yaml = "cloudtrace_v1.yaml", + deps = [ + ":cloudtrace_php_grpc", + ":cloudtrace_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-devtools-cloudtrace-v1-php", + deps = [ + ":cloudtrace_php_gapic", + ":cloudtrace_php_grpc", + ":cloudtrace_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "cloudtrace_nodejs_gapic", + src = ":cloudtrace_proto_with_info", + gapic_yaml = "cloudtrace_gapic.yaml", + package = "google.devtools.cloudtrace.v1", + service_yaml = "cloudtrace_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "devtools-cloudtrace-v1-nodejs", deps = [ - ":trace_go_gapic", - ":trace_go_gapic_srcjar-smoke-test.srcjar", - ":trace_go_gapic_srcjar-test.srcjar", - ":trace_go_proto", + ":cloudtrace_nodejs_gapic", + ":cloudtrace_proto", ], ) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "cloudtrace_ruby_proto", + deps = [":cloudtrace_proto"], +) + +ruby_grpc_library( + name = "cloudtrace_ruby_grpc", + srcs = [":cloudtrace_proto"], + deps = [":cloudtrace_ruby_proto"], +) + +ruby_gapic_library( + name = "cloudtrace_ruby_gapic", + src = ":cloudtrace_proto_with_info", + gapic_yaml = "cloudtrace_gapic.yaml", + package = "google.devtools.cloudtrace.v1", + service_yaml = "cloudtrace_v1.yaml", + deps = [ + ":cloudtrace_ruby_grpc", + ":cloudtrace_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-devtools-cloudtrace-v1-ruby", + deps = [ + ":cloudtrace_ruby_gapic", + ":cloudtrace_ruby_grpc", + ":cloudtrace_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "cloudtrace_csharp_proto", + deps = [":cloudtrace_proto"], +) + +csharp_grpc_library( + name = "cloudtrace_csharp_grpc", + srcs = [":cloudtrace_proto"], + deps = [":cloudtrace_csharp_proto"], +) + +csharp_gapic_library( + name = "cloudtrace_csharp_gapic", + src = ":cloudtrace_proto_with_info", + gapic_yaml = "cloudtrace_gapic.yaml", + package = "google.devtools.cloudtrace.v1", + service_yaml = "cloudtrace_v1.yaml", + deps = [ + ":cloudtrace_csharp_grpc", + ":cloudtrace_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-devtools-cloudtrace-v1-csharp", + deps = [ + ":cloudtrace_csharp_gapic", + ":cloudtrace_csharp_grpc", + ":cloudtrace_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "cloudtrace_cc_proto", + deps = [":cloudtrace_proto"], +) + +cc_grpc_library( + name = "cloudtrace_cc_grpc", + srcs = [":cloudtrace_proto"], + generate_mocks = True, + grpc_only = True, + deps = [":cloudtrace_cc_proto"], +) + diff --git a/google/devtools/cloudtrace/v1/cloudtrace_gapic.legacy.yaml b/google/devtools/cloudtrace/v1/cloudtrace_gapic.legacy.yaml new file mode 100644 index 000000000..df4df5eb4 --- /dev/null +++ b/google/devtools/cloudtrace/v1/cloudtrace_gapic.legacy.yaml @@ -0,0 +1,84 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.trace.v1 + python: + package_name: google.cloud.trace_v1.gapic + ruby: + package_name: Google::Cloud::Trace::V1 + php: + package_name: Google\Cloud\Trace\V1 + nodejs: + package_name: trace.v1 + domain_layer_location: google-cloud + go: + package_name: cloud.google.com/go/trace/apiv1 + domain_layer_location: cloud.google.com/go/trace + csharp: + package_name: Google.Cloud.Trace.V1 + release_level: GA +interfaces: +- name: google.devtools.cloudtrace.v1.TraceService + smoke_test: + method: ListTraces + init_fields: + - project_id=$PROJECT_ID + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.2 + max_retry_delay_millis: 1000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1.5 + max_rpc_timeout_millis: 30000 + total_timeout_millis: 45000 + methods: + - name: PatchTraces + flattening: + groups: + - parameters: + - project_id + - traces + required_fields: + - project_id + - traces + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 + - name: GetTrace + flattening: + groups: + - parameters: + - project_id + - trace_id + required_fields: + - project_id + - trace_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 + - name: ListTraces + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: traces + flattening: + groups: + - parameters: + - project_id + required_fields: + - project_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 diff --git a/google/devtools/cloudtrace/v1/cloudtrace_gapic.yaml b/google/devtools/cloudtrace/v1/cloudtrace_gapic.yaml index aba476351..0fbe03a80 100644 --- a/google/devtools/cloudtrace/v1/cloudtrace_gapic.yaml +++ b/google/devtools/cloudtrace/v1/cloudtrace_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.trace.v1 @@ -24,13 +24,6 @@ interfaces: method: ListTraces init_fields: - project_id=$PROJECT_ID - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -42,43 +35,4 @@ interfaces: total_timeout_millis: 45000 methods: - name: PatchTraces - flattening: - groups: - - parameters: - - project_id - - traces - required_fields: - - project_id - - traces retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 30000 - - name: GetTrace - flattening: - groups: - - parameters: - - project_id - - trace_id - required_fields: - - project_id - - trace_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 30000 - - name: ListTraces - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: traces - flattening: - groups: - - parameters: - - project_id - required_fields: - - project_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 30000 diff --git a/google/devtools/cloudtrace/v1/cloudtrace_grpc_service_config.json b/google/devtools/cloudtrace/v1/cloudtrace_grpc_service_config.json new file mode 100755 index 000000000..b2158e7d6 --- /dev/null +++ b/google/devtools/cloudtrace/v1/cloudtrace_grpc_service_config.json @@ -0,0 +1,30 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.devtools.cloudtrace.v1.TraceService", + "method": "PatchTraces" + }, + { + "service": "google.devtools.cloudtrace.v1.TraceService", + "method": "GetTrace" + }, + { + "service": "google.devtools.cloudtrace.v1.TraceService", + "method": "ListTraces" + } + ], + "timeout": "45s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "1s", + "backoffMultiplier": 1.2, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/devtools/cloudtrace/cloudtrace_v1.yaml b/google/devtools/cloudtrace/v1/cloudtrace_v1.yaml similarity index 60% rename from google/devtools/cloudtrace/cloudtrace_v1.yaml rename to google/devtools/cloudtrace/v1/cloudtrace_v1.yaml index 6bbe06460..a913f7988 100644 --- a/google/devtools/cloudtrace/cloudtrace_v1.yaml +++ b/google/devtools/cloudtrace/v1/cloudtrace_v1.yaml @@ -8,30 +8,31 @@ apis: documentation: summary: |- - Sends application trace data to Stackdriver Trace for viewing. Trace data is - collected for all App Engine applications by default. Trace data from other - applications can be provided using this API. + Sends application trace data to Stackdriver Trace for viewing. Trace data + is collected for all App Engine applications by default. Trace data from + other applications can be provided using this API. This library is used to + interact with the Trace API directly. If you are looking to instrument + your application for Stackdriver Trace, we recommend using OpenCensus. backend: rules: - - selector: google.devtools.cloudtrace.v1.TraceService.ListTraces - deadline: 60.0 - - selector: google.devtools.cloudtrace.v1.TraceService.GetTrace - deadline: 60.0 - - selector: google.devtools.cloudtrace.v1.TraceService.PatchTraces + - selector: 'google.devtools.cloudtrace.v1.TraceService.*' deadline: 60.0 authentication: rules: - - selector: '*' + - selector: google.devtools.cloudtrace.v1.TraceService.GetTrace oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/trace.append - - selector: |- - google.devtools.cloudtrace.v1.TraceService.GetTrace, - google.devtools.cloudtrace.v1.TraceService.ListTraces + https://www.googleapis.com/auth/trace.readonly + - selector: google.devtools.cloudtrace.v1.TraceService.ListTraces oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/trace.readonly + - selector: google.devtools.cloudtrace.v1.TraceService.PatchTraces + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/trace.append diff --git a/google/devtools/cloudtrace/v1/trace.proto b/google/devtools/cloudtrace/v1/trace.proto index 16af3a6ec..00cc14db3 100644 --- a/google/devtools/cloudtrace/v1/trace.proto +++ b/google/devtools/cloudtrace/v1/trace.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,9 @@ syntax = "proto3"; package google.devtools.cloudtrace.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; @@ -33,11 +36,18 @@ option php_namespace = "Google\\Cloud\\Trace\\V1"; // timed event which forms a node of the trace tree. Spans for a single trace // may span multiple services. service TraceService { + option (google.api.default_host) = "cloudtrace.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/trace.append," + "https://www.googleapis.com/auth/trace.readonly"; + // Returns of a list of traces that match the specified filter conditions. rpc ListTraces(ListTracesRequest) returns (ListTracesResponse) { option (google.api.http) = { get: "/v1/projects/{project_id}/traces" }; + option (google.api.method_signature) = "project_id"; } // Gets a single trace by its ID. @@ -45,6 +55,7 @@ service TraceService { option (google.api.http) = { get: "/v1/projects/{project_id}/traces/{trace_id}" }; + option (google.api.method_signature) = "project_id,trace_id"; } // Sends new traces to Stackdriver Trace or updates existing traces. If the ID @@ -57,6 +68,7 @@ service TraceService { patch: "/v1/projects/{project_id}/traces" body: "traces" }; + option (google.api.method_signature) = "project_id,traces"; } } @@ -68,7 +80,8 @@ message Trace { string project_id = 1; // Globally unique identifier for the trace. This identifier is a 128-bit - // numeric value formatted as a 32-byte hex string. + // numeric value formatted as a 32-byte hex string. For example, + // `382d4f4c6b7bb2f4a972559d9085001d`. string trace_id = 2; // Collection of spans in the trace. @@ -103,7 +116,7 @@ message TraceSpan { } // Identifier for the span. Must be a 64-bit integer other than 0 and - // unique within a trace. + // unique within a trace. For example, `2205310701640571284`. fixed64 span_id = 1; // Distinguishes between spans generated in a particular context. For example, @@ -113,7 +126,7 @@ message TraceSpan { // Name of the span. Must be less than 128 bytes. The span name is sanitized // and displayed in the Stackdriver Trace tool in the - // {% dynamic print site_values.console_name %}. + // Google Cloud Platform Console. // The name may be a method name or some other per-call site name. // For the same executable and the same call point, a best practice is // to use a consistent name, which makes it easier to correlate @@ -126,8 +139,8 @@ message TraceSpan { // End time of the span in nanoseconds from the UNIX epoch. google.protobuf.Timestamp end_time = 5; - // ID of the parent span, if any. Optional. - fixed64 parent_span_id = 6; + // Optional. ID of the parent span, if any. + fixed64 parent_span_id = 6 [(google.api.field_behavior) = OPTIONAL]; // Collection of labels associated with the span. Label keys must be less than // 128 bytes. Label values must be less than 16 kilobytes (10MB for @@ -189,20 +202,20 @@ message ListTracesRequest { COMPLETE = 3; } - // ID of the Cloud project where the trace data is stored. - string project_id = 1; + // Required. ID of the Cloud project where the trace data is stored. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Type of data returned for traces in the list. Optional. Default is + // Optional. Type of data returned for traces in the list. Default is // `MINIMAL`. - ViewType view = 2; + ViewType view = 2 [(google.api.field_behavior) = OPTIONAL]; - // Maximum number of traces to return. If not specified or <= 0, the + // Optional. Maximum number of traces to return. If not specified or <= 0, the // implementation selects a reasonable value. The implementation may - // return fewer traces than the requested page size. Optional. - int32 page_size = 3; + // return fewer traces than the requested page size. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; // Token identifying the page of results to return. If provided, use the - // value of the `next_page_token` field from a previous request. Optional. + // value of the `next_page_token` field from a previous request. string page_token = 4; // Start of the time interval (inclusive) during which the trace data was @@ -213,7 +226,7 @@ message ListTracesRequest { // collected from the application. google.protobuf.Timestamp end_time = 6; - // An optional filter against labels for the request. + // Optional. A filter against labels for the request. // // By default, searches use prefix matching. To specify exact match, prepend // a plus symbol (`+`) to the search term. @@ -243,9 +256,9 @@ message ListTracesRequest { // specified. // * `method:VALUE`: Equivalent to `/http/method:VALUE`. // * `url:VALUE`: Equivalent to `/http/url:VALUE`. - string filter = 7; + string filter = 7 [(google.api.field_behavior) = OPTIONAL]; - // Field used to sort the returned traces. Optional. + // Optional. Field used to sort the returned traces. // Can be one of the following: // // * `trace_id` @@ -258,12 +271,12 @@ message ListTracesRequest { // (for example, `name desc`). // // Only one sort field is permitted. - string order_by = 8; + string order_by = 8 [(google.api.field_behavior) = OPTIONAL]; } // The response message for the `ListTraces` method. message ListTracesResponse { - // List of trace records returned. + // List of trace records as specified by the view parameter. repeated Trace traces = 1; // If defined, indicates that there are more traces that match the request @@ -274,18 +287,18 @@ message ListTracesResponse { // The request message for the `GetTrace` method. message GetTraceRequest { - // ID of the Cloud project where the trace data is stored. - string project_id = 1; + // Required. ID of the Cloud project where the trace data is stored. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // ID of the trace to return. - string trace_id = 2; + // Required. ID of the trace to return. + string trace_id = 2 [(google.api.field_behavior) = REQUIRED]; } // The request message for the `PatchTraces` method. message PatchTracesRequest { - // ID of the Cloud project where the trace data is stored. - string project_id = 1; + // Required. ID of the Cloud project where the trace data is stored. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The body of the message. - Traces traces = 2; + // Required. The body of the message. + Traces traces = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/devtools/cloudtrace/v2/BUILD.bazel b/google/devtools/cloudtrace/v2/BUILD.bazel index 7b0b77dcb..0006efaf1 100644 --- a/google/devtools/cloudtrace/v2/BUILD.bazel +++ b/google/devtools/cloudtrace/v2/BUILD.bazel @@ -1,19 +1,25 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "trace_proto", + name = "cloudtrace_proto", srcs = [ "trace.proto", "tracing.proto", ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/rpc:status_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:timestamp_proto", @@ -22,8 +28,11 @@ proto_library( ) proto_library_with_info( - name = "trace_proto_with_info", - deps = [":trace_proto"], + name = "cloudtrace_proto_with_info", + deps = [ + ":cloudtrace_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -31,69 +40,55 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( - name = "trace_java_proto", - deps = [":trace_proto"], + name = "cloudtrace_java_proto", + deps = [":cloudtrace_proto"], ) java_grpc_library( - name = "trace_java_grpc", - srcs = [":trace_proto"], - deps = [":trace_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "trace_resource_name_java_proto", - gapic_yaml = "cloudtrace_gapic.yaml", - deps = [":trace_proto"], + name = "cloudtrace_java_grpc", + srcs = [":cloudtrace_proto"], + deps = [":cloudtrace_java_proto"], ) java_gapic_library( - name = "trace_java_gapic", - src = ":trace_proto_with_info", + name = "cloudtrace_java_gapic", + src = ":cloudtrace_proto_with_info", gapic_yaml = "cloudtrace_gapic.yaml", - service_yaml = "//google/devtools/cloudtrace:cloudtrace_v2.yaml", - test_deps = [":trace_java_grpc"], + package = "google.devtools.cloudtrace.v2", + service_yaml = "cloudtrace_v2.yaml", + test_deps = [ + ":cloudtrace_java_grpc", + ], deps = [ - ":trace_java_proto", - ":trace_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ":cloudtrace_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [":trace_java_gapic_test"], -) for test_name in [ - "com.google.cloud.trace.v2.TraceServiceClientTest", -]] +java_gapic_test( + name = "cloudtrace_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.trace.v2.TraceServiceClientTest", + ], + runtime_deps = [":cloudtrace_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-trace-v2-java", - client_deps = [":trace_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":trace_java_gapic_test"], - grpc_deps = [":trace_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":trace_java_proto", - ":trace_proto", - ":trace_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + name = "google-cloud-devtools-cloudtrace-v2-java", + deps = [ + ":cloudtrace_java_gapic", + ":cloudtrace_java_grpc", + ":cloudtrace_java_proto", + ":cloudtrace_proto", + ], ) ############################################################################## @@ -101,17 +96,17 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "trace_go_proto", + name = "cloudtrace_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/devtools/cloudtrace/v2", - protos = [":trace_proto"], + protos = [":cloudtrace_proto"], deps = [ "//google/api:annotations_go_proto", "//google/rpc:status_go_proto", @@ -119,29 +114,249 @@ go_proto_library( ) go_gapic_library( - name = "trace_go_gapic", - src = ":trace_proto_with_info", - gapic_yaml = "cloudtrace_gapic.yaml", - importpath = "cloud.google.com/go/trace/apiv2", - service_yaml = "//google/devtools/cloudtrace:cloudtrace_v2.yaml", - deps = [":trace_go_proto"], + name = "cloudtrace_go_gapic", + srcs = [":cloudtrace_proto_with_info"], + grpc_service_config = "cloudtrace_grpc_service_config.json", + importpath = "cloud.google.com/go/trace/apiv2;trace", + service_yaml = "cloudtrace_v2.yaml", + deps = [ + ":cloudtrace_go_proto", + ], ) go_test( - name = "trace_go_gapic_test", - srcs = [":trace_go_gapic_srcjar_test"], - embed = [":trace_go_gapic"], + name = "cloudtrace_go_gapic_test", + srcs = [":cloudtrace_go_gapic_srcjar_test"], + embed = [":cloudtrace_go_gapic"], importpath = "cloud.google.com/go/trace/apiv2", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-trace-v2-go", + name = "gapi-cloud-devtools-cloudtrace-v2-go", + deps = [ + ":cloudtrace_go_gapic", + ":cloudtrace_go_gapic_srcjar-test.srcjar", + ":cloudtrace_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "cloudtrace_moved_proto", + srcs = [":cloudtrace_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "cloudtrace_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":cloudtrace_moved_proto"], +) + +py_grpc_library( + name = "cloudtrace_py_grpc", + srcs = [":cloudtrace_moved_proto"], + deps = [":cloudtrace_py_proto"], +) + +py_gapic_library( + name = "cloudtrace_py_gapic", + src = ":cloudtrace_proto_with_info", + gapic_yaml = "cloudtrace_gapic.yaml", + package = "google.devtools.cloudtrace.v2", + service_yaml = "cloudtrace_v2.yaml", + deps = [ + ":cloudtrace_py_grpc", + ":cloudtrace_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "devtools-cloudtrace-v2-py", + deps = [ + ":cloudtrace_py_gapic", + ":cloudtrace_py_grpc", + ":cloudtrace_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "cloudtrace_php_proto", + deps = [":cloudtrace_proto"], +) + +php_grpc_library( + name = "cloudtrace_php_grpc", + srcs = [":cloudtrace_proto"], + deps = [":cloudtrace_php_proto"], +) + +php_gapic_library( + name = "cloudtrace_php_gapic", + src = ":cloudtrace_proto_with_info", + gapic_yaml = "cloudtrace_gapic.yaml", + package = "google.devtools.cloudtrace.v2", + service_yaml = "cloudtrace_v2.yaml", + deps = [ + ":cloudtrace_php_grpc", + ":cloudtrace_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-devtools-cloudtrace-v2-php", + deps = [ + ":cloudtrace_php_gapic", + ":cloudtrace_php_grpc", + ":cloudtrace_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "cloudtrace_nodejs_gapic", + src = ":cloudtrace_proto_with_info", + gapic_yaml = "cloudtrace_gapic.yaml", + package = "google.devtools.cloudtrace.v2", + service_yaml = "cloudtrace_v2.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "devtools-cloudtrace-v2-nodejs", + deps = [ + ":cloudtrace_nodejs_gapic", + ":cloudtrace_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "cloudtrace_ruby_proto", + deps = [":cloudtrace_proto"], +) + +ruby_grpc_library( + name = "cloudtrace_ruby_grpc", + srcs = [":cloudtrace_proto"], + deps = [":cloudtrace_ruby_proto"], +) + +ruby_gapic_library( + name = "cloudtrace_ruby_gapic", + src = ":cloudtrace_proto_with_info", + gapic_yaml = "cloudtrace_gapic.yaml", + package = "google.devtools.cloudtrace.v2", + service_yaml = "cloudtrace_v2.yaml", + deps = [ + ":cloudtrace_ruby_grpc", + ":cloudtrace_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-devtools-cloudtrace-v2-ruby", + deps = [ + ":cloudtrace_ruby_gapic", + ":cloudtrace_ruby_grpc", + ":cloudtrace_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "cloudtrace_csharp_proto", + deps = [":cloudtrace_proto"], +) + +csharp_grpc_library( + name = "cloudtrace_csharp_grpc", + srcs = [":cloudtrace_proto"], + deps = [":cloudtrace_csharp_proto"], +) + +csharp_gapic_library( + name = "cloudtrace_csharp_gapic", + src = ":cloudtrace_proto_with_info", + gapic_yaml = "cloudtrace_gapic.yaml", + package = "google.devtools.cloudtrace.v2", + service_yaml = "cloudtrace_v2.yaml", + deps = [ + ":cloudtrace_csharp_grpc", + ":cloudtrace_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-devtools-cloudtrace-v2-csharp", deps = [ - ":trace_go_gapic", - ":trace_go_gapic_srcjar-smoke-test.srcjar", - ":trace_go_gapic_srcjar-test.srcjar", - ":trace_go_proto", + ":cloudtrace_csharp_gapic", + ":cloudtrace_csharp_grpc", + ":cloudtrace_csharp_proto", ], ) @@ -155,13 +370,14 @@ load( ) cc_proto_library( - name = "trace_cc_proto", - deps = [":trace_proto"], + name = "cloudtrace_cc_proto", + deps = [":cloudtrace_proto"], ) cc_grpc_library( - name = "trace_cc_grpc", - srcs = [":trace_proto"], - deps = [":trace_cc_proto"], + name = "cloudtrace_cc_grpc", + srcs = [":cloudtrace_proto"], + generate_mocks = True, grpc_only = True, + deps = [":cloudtrace_cc_proto"], ) diff --git a/google/devtools/cloudtrace/v2/cloudtrace_gapic.legacy.yaml b/google/devtools/cloudtrace/v2/cloudtrace_gapic.legacy.yaml new file mode 100644 index 000000000..e910ce446 --- /dev/null +++ b/google/devtools/cloudtrace/v2/cloudtrace_gapic.legacy.yaml @@ -0,0 +1,141 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.trace.v2 + python: + package_name: google.cloud.trace_v2.gapic + ruby: + package_name: Google::Cloud::Trace::V2 + release_level: BETA + php: + package_name: Google\Cloud\Trace\V2 + nodejs: + package_name: trace.v2 + domain_layer_location: google-cloud + go: + package_name: cloud.google.com/go/trace/apiv2 + csharp: + package_name: Google.Cloud.Trace.V2 +# A list of API interface configurations. +interfaces: +- name: google.devtools.cloudtrace.v2.TraceService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + - name_pattern: projects/{project}/traces/{trace}/spans/{span} + entity_name: span + # Definition for smoke test. + smoke_test: + method: BatchWriteSpans + init_fields: + - name%project=$PROJECT_ID + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.2 + max_retry_delay_millis: 1000 + initial_rpc_timeout_millis: 30000 + rpc_timeout_multiplier: 1.5 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 120000 + + # A list of method configurations. + # Common properties: + # name - The simple name of the method. + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce + # method overloads which allow a client to directly pass request message + # fields as method parameters. This information may or may not be used, + # depending on the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request + # message. + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a + # paging list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It + # defines which fields match the paging pattern in the request. The + # request consists of a page_size_field and a token_field. The + # page_size_field is the name of the optional field specifying the + # maximum number of elements to be returned in the response. The + # token_field is the name of the field in the request containing the + # page token. + # The response specifies response information of the list method. It + # defines which fields match the paging pattern in the response. The + # response consists of a token_field and a resources_field. The + # token_field is the name of the field in the response containing the + # next page token. The resources_field is the name of the field in the + # response containing the list of resources belonging to the page. + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: BatchWriteSpans + flattening: + groups: + - parameters: + - name + - spans + required_fields: + - name + - spans + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: project + timeout_millis: 30000 + resource_name_treatment: STATIC_TYPES + - name: CreateSpan + required_fields: + - name + - span_id + - display_name + - start_time + - end_time + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: span + timeout_millis: 30000 + resource_name_treatment: STATIC_TYPES +resource_name_generation: +- message_name: BatchWriteSpansRequest + field_entity_map: + name: project +- message_name: Span + field_entity_map: + name: span diff --git a/google/devtools/cloudtrace/v2/cloudtrace_gapic.yaml b/google/devtools/cloudtrace/v2/cloudtrace_gapic.yaml index ec5e02a20..b76bb7b2e 100644 --- a/google/devtools/cloudtrace/v2/cloudtrace_gapic.yaml +++ b/google/devtools/cloudtrace/v2/cloudtrace_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -20,40 +20,11 @@ language_settings: package_name: Google.Cloud.Trace.V2 # A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. - name: google.devtools.cloudtrace.v2.TraceService - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - - name_pattern: projects/{project}/traces/{trace}/spans/{span} - entity_name: span - # Definition for smoke test. smoke_test: method: BatchWriteSpans init_fields: - name%project=$PROJECT_ID - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -63,80 +34,6 @@ interfaces: rpc_timeout_multiplier: 1.5 max_rpc_timeout_millis: 60000 total_timeout_millis: 120000 - - # A list of method configurations. - # Common properties: - # name - The simple name of the method. - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce - # method overloads which allow a client to directly pass request message - # fields as method parameters. This information may or may not be used, - # depending on the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request - # message. - # required_fields - Fields that are always required for a request to be - # valid. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a - # paging list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It - # defines which fields match the paging pattern in the request. The - # request consists of a page_size_field and a token_field. The - # page_size_field is the name of the optional field specifying the - # maximum number of elements to be returned in the response. The - # token_field is the name of the field in the request containing the - # page token. - # The response specifies response information of the list method. It - # defines which fields match the paging pattern in the response. The - # response consists of a token_field and a resources_field. The - # token_field is the name of the field in the response containing the - # next page token. The resources_field is the name of the field in the - # response containing the list of resources belonging to the page. - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: BatchWriteSpans - flattening: - groups: - - parameters: - - name - - spans - required_fields: - - name - - spans - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: project - timeout_millis: 30000 - resource_name_treatment: STATIC_TYPES - name: CreateSpan - required_fields: - - name - - span_id - - display_name - - start_time - - end_time retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: span - timeout_millis: 30000 - resource_name_treatment: STATIC_TYPES -resource_name_generation: -- message_name: BatchWriteSpansRequest - field_entity_map: - name: project -- message_name: Span - field_entity_map: - name: span diff --git a/google/devtools/cloudtrace/v2/cloudtrace_grpc_service_config.json b/google/devtools/cloudtrace/v2/cloudtrace_grpc_service_config.json new file mode 100755 index 000000000..5cc9b15ae --- /dev/null +++ b/google/devtools/cloudtrace/v2/cloudtrace_grpc_service_config.json @@ -0,0 +1,31 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.devtools.cloudtrace.v2.TraceService", + "method": "BatchWriteSpans" + } + ], + "timeout": "120s" + }, + { + "name": [ + { + "service": "google.devtools.cloudtrace.v2.TraceService", + "method": "CreateSpan" + } + ], + "timeout": "120s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "1s", + "backoffMultiplier": 1.2, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/devtools/cloudtrace/cloudtrace_v2.yaml b/google/devtools/cloudtrace/v2/cloudtrace_v2.yaml similarity index 50% rename from google/devtools/cloudtrace/cloudtrace_v2.yaml rename to google/devtools/cloudtrace/v2/cloudtrace_v2.yaml index 91cffdfee..6adad6520 100644 --- a/google/devtools/cloudtrace/cloudtrace_v2.yaml +++ b/google/devtools/cloudtrace/v2/cloudtrace_v2.yaml @@ -8,9 +8,11 @@ apis: documentation: summary: |- - Sends application trace data to Stackdriver Trace for viewing. Trace data is - collected for all App Engine applications by default. Trace data from other - applications can be provided using this API. + Sends application trace data to Stackdriver Trace for viewing. Trace data + is collected for all App Engine applications by default. Trace data from + other applications can be provided using this API. This library is used to + interact with the Trace API directly. If you are looking to instrument + your application for Stackdriver Trace, we recommend using OpenCensus. backend: rules: @@ -21,7 +23,12 @@ backend: authentication: rules: - - selector: '*' + - selector: google.devtools.cloudtrace.v2.TraceService.BatchWriteSpans + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/trace.append + - selector: google.devtools.cloudtrace.v2.TraceService.CreateSpan oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform, diff --git a/google/devtools/cloudtrace/v2/trace.proto b/google/devtools/cloudtrace/v2/trace.proto index d9fbe663b..f5e628329 100644 --- a/google/devtools/cloudtrace/v2/trace.proto +++ b/google/devtools/cloudtrace/v2/trace.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,8 @@ syntax = "proto3"; package google.devtools.cloudtrace.v2; import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; @@ -35,11 +37,16 @@ option php_namespace = "Google\\Cloud\\Trace\\V2"; // or none at all. Spans do not need to be contiguous—there may be // gaps or overlaps between spans in a trace. message Span { + option (google.api.resource) = { + type: "cloudtrace.googleapis.com/Span" + pattern: "projects/{project}/traces/{trace}/spans/{span}" + }; + // A set of attributes, each in the format `[KEY]:[VALUE]`. message Attributes { // The set of attributes. Each attribute's key can be up to 128 bytes - // long. The value can be a string up to 256 bytes, an integer, or the - // Boolean values `true` and `false`. For example: + // long. The value can be a string up to 256 bytes, a signed 64-bit integer, + // or the Boolean values `true` and `false`. For example: // // "/instance_id": "my-instance" // "/http/user_agent": "" @@ -179,10 +186,10 @@ message Span { // // [SPAN_ID] is a unique identifier for a span within a trace; it // is a 16-character hexadecimal encoding of an 8-byte array. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // The [SPAN_ID] portion of the span's resource name. - string span_id = 2; + string span_id = 2 [(google.api.field_behavior) = REQUIRED]; // The [SPAN_ID] of this span's parent span. If this is a root span, // then this field must be empty. @@ -190,22 +197,24 @@ message Span { // A description of the span's operation (up to 128 bytes). // Stackdriver Trace displays the description in the - // {% dynamic print site_values.console_name %}. + // Google Cloud Platform Console. // For example, the display name can be a qualified method name or a file name // and a line number where the operation is called. A best practice is to use // the same display name within an application and at the same call point. // This makes it easier to correlate spans in different traces. - TruncatableString display_name = 4; + TruncatableString display_name = 4 [(google.api.field_behavior) = REQUIRED]; // The start time of the span. On the client side, this is the time kept by // the local machine where the span execution starts. On the server side, this // is the time when the server's application handler starts running. - google.protobuf.Timestamp start_time = 5; + google.protobuf.Timestamp start_time = 5 + [(google.api.field_behavior) = REQUIRED]; // The end time of the span. On the client side, this is the time kept by // the local machine where the span execution ends. On the server side, this // is the time when the server application handler stops running. - google.protobuf.Timestamp end_time = 6; + google.protobuf.Timestamp end_time = 6 + [(google.api.field_behavior) = REQUIRED]; // A set of attributes on the span. You can have up to 32 attributes per // span. @@ -221,18 +230,18 @@ message Span { // Links associated with the span. You can have up to 128 links per Span. Links links = 10; - // An optional final status for this span. - google.rpc.Status status = 11; + // Optional. The final status for this span. + google.rpc.Status status = 11 [(google.api.field_behavior) = OPTIONAL]; - // (Optional) Set this parameter to indicate whether this span is in + // Optional. Set this parameter to indicate whether this span is in // the same process as its parent. If you do not set this parameter, // Stackdriver Trace is unable to take advantage of this helpful // information. - google.protobuf.BoolValue same_process_as_parent_span = 12; + google.protobuf.BoolValue same_process_as_parent_span = 12 [(google.api.field_behavior) = OPTIONAL]; - // An optional number of child spans that were generated while this span + // Optional. The number of child spans that were generated while this span // was active. If set, allows implementation to detect missing child spans. - google.protobuf.Int32Value child_span_count = 13; + google.protobuf.Int32Value child_span_count = 13 [(google.api.field_behavior) = OPTIONAL]; } // The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute. diff --git a/google/devtools/cloudtrace/v2/tracing.proto b/google/devtools/cloudtrace/v2/tracing.proto index 2990d4606..966a81791 100644 --- a/google/devtools/cloudtrace/v2/tracing.proto +++ b/google/devtools/cloudtrace/v2/tracing.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.devtools.cloudtrace.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/devtools/cloudtrace/v2/trace.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; @@ -34,6 +38,11 @@ option php_namespace = "Google\\Cloud\\Trace\\V2"; // timed event which forms a node of the trace tree. A single trace may // contain span(s) from multiple services. service TraceService { + option (google.api.default_host) = "cloudtrace.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/trace.append"; + // Sends new spans to new or existing traces. You cannot update // existing spans. rpc BatchWriteSpans(BatchWriteSpansRequest) returns (google.protobuf.Empty) { @@ -41,12 +50,13 @@ service TraceService { post: "/v2/{name=projects/*}/traces:batchWrite" body: "*" }; + option (google.api.method_signature) = "name,spans"; } // Creates a new span. rpc CreateSpan(Span) returns (Span) { option (google.api.http) = { - post: "/v2/{name=projects/*/traces/*}/spans" + post: "/v2/{name=projects/*/traces/*/spans/*}" body: "*" }; } @@ -56,9 +66,14 @@ service TraceService { message BatchWriteSpansRequest { // Required. The name of the project where the spans belong. The format is // `projects/[PROJECT_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; - // A list of new spans. The span names must not match existing + // Required. A list of new spans. The span names must not match existing // spans, or the results are undefined. - repeated Span spans = 2; + repeated Span spans = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/devtools/containeranalysis/BUILD.bazel b/google/devtools/containeranalysis/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/devtools/containeranalysis/BUILD.bazel +++ b/google/devtools/containeranalysis/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/devtools/containeranalysis/artman_containeranalysis_v1.yaml b/google/devtools/containeranalysis/artman_containeranalysis_v1.yaml index 4de2d28e8..1b24b227d 100644 --- a/google/devtools/containeranalysis/artman_containeranalysis_v1.yaml +++ b/google/devtools/containeranalysis/artman_containeranalysis_v1.yaml @@ -7,8 +7,9 @@ common: - name: google-iam-v1 src_proto_paths: - v1 - service_yaml: containeranalysis_v1.yaml + service_yaml: v1/containeranalysis_v1.yaml gapic_yaml: v1/containeranalysis_gapic.yaml + proto_package: google.devtools.containeranalysis.v1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/devtools/containeranalysis/containeranalysis.yaml b/google/devtools/containeranalysis/containeranalysis.yaml deleted file mode 100644 index 352192422..000000000 --- a/google/devtools/containeranalysis/containeranalysis.yaml +++ /dev/null @@ -1,25 +0,0 @@ -type: google.api.Service -config_version: 3 -name: containeranalysis.googleapis.com -title: Container Analysis API - -apis: -- name: google.devtools.containeranalysis.v1alpha1.ContainerAnalysis - -types: -- name: google.devtools.containeranalysis.v1alpha1.OperationMetadata - -documentation: - summary: |- - An implementation of the Grafeas API, which stores, and enables querying and - retrieval of critical metadata about all of your software artifacts. - overview: |- - The Container Analysis API allows you to store and retrieve metadata for a - container resource. - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform diff --git a/google/devtools/containeranalysis/v1/BUILD.bazel b/google/devtools/containeranalysis/v1/BUILD.bazel new file mode 100644 index 000000000..ee1615f37 --- /dev/null +++ b/google/devtools/containeranalysis/v1/BUILD.bazel @@ -0,0 +1,365 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "containeranalysis_proto", + srcs = [ + "containeranalysis.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "containeranalysis_proto_with_info", + deps = [ + ":containeranalysis_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "containeranalysis_java_proto", + deps = [":containeranalysis_proto"], +) + +java_grpc_library( + name = "containeranalysis_java_grpc", + srcs = [":containeranalysis_proto"], + deps = [":containeranalysis_java_proto"], +) + +java_gapic_library( + name = "containeranalysis_java_gapic", + src = ":containeranalysis_proto_with_info", + gapic_yaml = "containeranalysis_gapic.yaml", + package = "google.devtools.containeranalysis.v1", + service_yaml = "containeranalysis_v1.yaml", + test_deps = [ + ":containeranalysis_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":containeranalysis_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "containeranalysis_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.devtools.containeranalysis.v1.ContainerAnalysisClientTest", + ], + runtime_deps = [":containeranalysis_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-devtools-containeranalysis-v1-java", + deps = [ + ":containeranalysis_java_gapic", + ":containeranalysis_java_grpc", + ":containeranalysis_java_proto", + ":containeranalysis_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "containeranalysis_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1", + protos = [":containeranalysis_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) +# Fix compilation error +# cloud.google.com/go/containeranalysis/apiv1/container_analysis_client.go:66:9: undefined: containeranalysispb +#go_gapic_library( +# name = "containeranalysis_go_gapic", +# src = ":containeranalysis_proto_with_info", +# gapic_yaml = "containeranalysis_gapic.yaml", +# importpath = "cloud.google.com/go/containeranalysis/apiv1", +# package = "google.devtools.containeranalysis.v1", +# service_yaml = "//google/devtools/containeranalysis:containeranalysis_v1.yaml", +# deps = [ +# ":containeranalysis_go_proto", +# "//google/iam/v1:iam_go_proto", +# ], +#) +# +#go_test( +# name = "containeranalysis_go_gapic_test", +# srcs = [":containeranalysis_go_gapic_srcjar_test"], +# embed = [":containeranalysis_go_gapic"], +# importpath = "cloud.google.com/go/containeranalysis/apiv1", +#) +# +## Open Source Packages +#go_gapic_assembly_pkg( +# name = "gapi-cloud-devtools-containeranalysis-v1-go", +# deps = [ +# ":containeranalysis_go_gapic", +# ":containeranalysis_go_gapic_srcjar-smoke-test.srcjar", +# ":containeranalysis_go_gapic_srcjar-test.srcjar", +# ":containeranalysis_go_proto", +# ], +#) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "containeranalysis_moved_proto", + srcs = [":containeranalysis_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "containeranalysis_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":containeranalysis_moved_proto"], +) + +py_grpc_library( + name = "containeranalysis_py_grpc", + srcs = [":containeranalysis_moved_proto"], + deps = [":containeranalysis_py_proto"], +) + +py_gapic_library( + name = "containeranalysis_py_gapic", + src = ":containeranalysis_proto_with_info", + gapic_yaml = "containeranalysis_gapic.yaml", + package = "google.devtools.containeranalysis.v1", + service_yaml = "containeranalysis_v1.yaml", + deps = [ + ":containeranalysis_py_grpc", + ":containeranalysis_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "devtools-containeranalysis-v1-py", + deps = [ + ":containeranalysis_py_gapic", + ":containeranalysis_py_grpc", + ":containeranalysis_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "containeranalysis_php_proto", + deps = [":containeranalysis_proto"], +) + +php_grpc_library( + name = "containeranalysis_php_grpc", + srcs = [":containeranalysis_proto"], + deps = [":containeranalysis_php_proto"], +) + +php_gapic_library( + name = "containeranalysis_php_gapic", + src = ":containeranalysis_proto_with_info", + gapic_yaml = "containeranalysis_gapic.yaml", + package = "google.devtools.containeranalysis.v1", + service_yaml = "containeranalysis_v1.yaml", + deps = [ + ":containeranalysis_php_grpc", + ":containeranalysis_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-devtools-containeranalysis-v1-php", + deps = [ + ":containeranalysis_php_gapic", + ":containeranalysis_php_grpc", + ":containeranalysis_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "containeranalysis_nodejs_gapic", + src = ":containeranalysis_proto_with_info", + gapic_yaml = "containeranalysis_gapic.yaml", + package = "google.devtools.containeranalysis.v1", + service_yaml = "containeranalysis_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "devtools-containeranalysis-v1-nodejs", + deps = [ + ":containeranalysis_nodejs_gapic", + ":containeranalysis_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "containeranalysis_ruby_proto", + deps = [":containeranalysis_proto"], +) + +ruby_grpc_library( + name = "containeranalysis_ruby_grpc", + srcs = [":containeranalysis_proto"], + deps = [":containeranalysis_ruby_proto"], +) + +ruby_gapic_library( + name = "containeranalysis_ruby_gapic", + src = ":containeranalysis_proto_with_info", + gapic_yaml = "containeranalysis_gapic.yaml", + package = "google.devtools.containeranalysis.v1", + service_yaml = "containeranalysis_v1.yaml", + deps = [ + ":containeranalysis_ruby_grpc", + ":containeranalysis_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-devtools-containeranalysis-v1-ruby", + deps = [ + ":containeranalysis_ruby_gapic", + ":containeranalysis_ruby_grpc", + ":containeranalysis_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "containeranalysis_csharp_proto", + deps = [":containeranalysis_proto"], +) + +csharp_grpc_library( + name = "containeranalysis_csharp_grpc", + srcs = [":containeranalysis_proto"], + deps = [":containeranalysis_csharp_proto"], +) + +csharp_gapic_library( + name = "containeranalysis_csharp_gapic", + src = ":containeranalysis_proto_with_info", + gapic_yaml = "containeranalysis_gapic.yaml", + package = "google.devtools.containeranalysis.v1", + service_yaml = "containeranalysis_v1.yaml", + deps = [ + ":containeranalysis_csharp_grpc", + ":containeranalysis_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-devtools-containeranalysis-v1-csharp", + deps = [ + ":containeranalysis_csharp_gapic", + ":containeranalysis_csharp_grpc", + ":containeranalysis_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/devtools/containeranalysis/v1/containeranalysis.proto b/google/devtools/containeranalysis/v1/containeranalysis.proto index 0a54ccc6e..55b842a00 100644 --- a/google/devtools/containeranalysis/v1/containeranalysis.proto +++ b/google/devtools/containeranalysis/v1/containeranalysis.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package google.devtools.containeranalysis.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/protobuf/timestamp.proto"; @@ -43,6 +44,9 @@ option ruby_package = "Google::Cloud::ContainerAnalysis::V1"; // there would be one note for the vulnerability and an occurrence for each // image with the vulnerability referring to that note. service ContainerAnalysis { + option (google.api.default_host) = "containeranalysis.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Sets the access control policy on the specified note or occurrence. // Requires `containeranalysis.notes.setIamPolicy` or // `containeranalysis.occurrences.setIamPolicy` permission if the resource is @@ -60,6 +64,7 @@ service ContainerAnalysis { body: "*" } }; + option (google.api.method_signature) = "resource,policy"; } // Gets the access control policy for a note or an occurrence resource. @@ -79,6 +84,7 @@ service ContainerAnalysis { body: "*" } }; + option (google.api.method_signature) = "resource"; } // Returns the permissions that a caller has on the specified note or @@ -97,5 +103,6 @@ service ContainerAnalysis { body: "*" } }; + option (google.api.method_signature) = "resource,permissions"; } } diff --git a/google/devtools/containeranalysis/v1/containeranalysis_gapic.legacy.yaml b/google/devtools/containeranalysis/v1/containeranalysis_gapic.legacy.yaml new file mode 100644 index 000000000..bed399c30 --- /dev/null +++ b/google/devtools/containeranalysis/v1/containeranalysis_gapic.legacy.yaml @@ -0,0 +1,181 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.devtools.containeranalysis.v1 + python: + package_name: google.cloud.devtools.containeranalysis_v1.gapic + go: + package_name: cloud.google.com/go/containeranalysis/apiv1 + release_level: BETA + csharp: + package_name: Google.Cloud.DevTools.ContainerAnalysis.V1 + ruby: + package_name: Google::Cloud::ContainerAnalysis::V1 + php: + package_name: Google\Cloud\Devtools\Containeranalysis\V1 + nodejs: + package_name: containeranalysis.v1 + domain_layer_location: google-cloud +# A list of resource collection configurations. +# Consists of a name_pattern and an entity_name. +# The name_pattern is a pattern to describe the names of the resources of this +# collection, using the platform's conventions for URI patterns. A generator +# may use this to generate methods to compose and decompose such names. The +# pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; +# those will be taken as hints for the parameter names of the generated +# methods. If empty, no name methods are generated. +# The entity_name is the name to be used as a basis for generated methods and +# classes. +collections: +- name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Grafeas.V1.ProjectName +- name_pattern: projects/{project}/notes/{note} + entity_name: note + language_overrides: + - language: csharp + common_resource_name: Grafeas.V1.NoteName +- name_pattern: projects/{project}/occurrences/{occurrence} + entity_name: occurrence + language_overrides: + - language: csharp + common_resource_name: Grafeas.V1.OccurrenceName +collection_oneofs: +- oneof_name: iam_resource_oneof + collection_names: + - note + - occurrence +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.devtools.containeranalysis.v1.ContainerAnalysis + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: SetIamPolicy + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: iam_resource_oneof + timeout_millis: 30000 + - name: GetIamPolicy + flattening: + groups: + - parameters: + - resource + required_fields: + - resource + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: iam_resource_oneof + timeout_millis: 30000 + - name: TestIamPermissions + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: iam_resource_oneof + timeout_millis: 30000 +resource_name_generation: +- message_name: google.iam.v1.SetIamPolicyRequest + field_entity_map: + resource: '*' +- message_name: google.iam.v1.GetIamPolicyRequest + field_entity_map: + resource: '*' +- message_name: google.iam.v1.TestIamPermissionsRequest + field_entity_map: + resource: '*' diff --git a/google/devtools/containeranalysis/v1/containeranalysis_gapic.yaml b/google/devtools/containeranalysis/v1/containeranalysis_gapic.yaml index bed399c30..5666f96d6 100644 --- a/google/devtools/containeranalysis/v1/containeranalysis_gapic.yaml +++ b/google/devtools/containeranalysis/v1/containeranalysis_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -18,164 +18,3 @@ language_settings: nodejs: package_name: containeranalysis.v1 domain_layer_location: google-cloud -# A list of resource collection configurations. -# Consists of a name_pattern and an entity_name. -# The name_pattern is a pattern to describe the names of the resources of this -# collection, using the platform's conventions for URI patterns. A generator -# may use this to generate methods to compose and decompose such names. The -# pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; -# those will be taken as hints for the parameter names of the generated -# methods. If empty, no name methods are generated. -# The entity_name is the name to be used as a basis for generated methods and -# classes. -collections: -- name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Grafeas.V1.ProjectName -- name_pattern: projects/{project}/notes/{note} - entity_name: note - language_overrides: - - language: csharp - common_resource_name: Grafeas.V1.NoteName -- name_pattern: projects/{project}/occurrences/{occurrence} - entity_name: occurrence - language_overrides: - - language: csharp - common_resource_name: Grafeas.V1.OccurrenceName -collection_oneofs: -- oneof_name: iam_resource_oneof - collection_names: - - note - - occurrence -# A list of API interface configurations. -interfaces: -# The fully qualified name of the API interface. -- name: google.devtools.containeranalysis.v1.ContainerAnalysis - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: SetIamPolicy - flattening: - groups: - - parameters: - - resource - - policy - required_fields: - - resource - - policy - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: iam_resource_oneof - timeout_millis: 30000 - - name: GetIamPolicy - flattening: - groups: - - parameters: - - resource - required_fields: - - resource - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: iam_resource_oneof - timeout_millis: 30000 - - name: TestIamPermissions - flattening: - groups: - - parameters: - - resource - - permissions - required_fields: - - resource - - permissions - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: iam_resource_oneof - timeout_millis: 30000 -resource_name_generation: -- message_name: google.iam.v1.SetIamPolicyRequest - field_entity_map: - resource: '*' -- message_name: google.iam.v1.GetIamPolicyRequest - field_entity_map: - resource: '*' -- message_name: google.iam.v1.TestIamPermissionsRequest - field_entity_map: - resource: '*' diff --git a/google/devtools/containeranalysis/v1/containeranalysis_grpc_service_config.json b/google/devtools/containeranalysis/v1/containeranalysis_grpc_service_config.json new file mode 100755 index 000000000..ee15e6efa --- /dev/null +++ b/google/devtools/containeranalysis/v1/containeranalysis_grpc_service_config.json @@ -0,0 +1,21 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.devtools.containeranalysis.v1.ContainerAnalysis", + "method": "SetIamPolicy" + }, + { + "service": "google.devtools.containeranalysis.v1.ContainerAnalysis", + "method": "GetIamPolicy" + }, + { + "service": "google.devtools.containeranalysis.v1.ContainerAnalysis", + "method": "TestIamPermissions" + } + ], + "timeout": "30s" + } + ] +} diff --git a/google/devtools/containeranalysis/containeranalysis_v1.yaml b/google/devtools/containeranalysis/v1/containeranalysis_v1.yaml similarity index 79% rename from google/devtools/containeranalysis/containeranalysis_v1.yaml rename to google/devtools/containeranalysis/v1/containeranalysis_v1.yaml index c59b10186..e1015739f 100644 --- a/google/devtools/containeranalysis/containeranalysis_v1.yaml +++ b/google/devtools/containeranalysis/v1/containeranalysis_v1.yaml @@ -18,6 +18,8 @@ backend: rules: - selector: 'google.devtools.containeranalysis.v1.ContainerAnalysis.*' deadline: 30.0 + - selector: 'google.longrunning.Operations.*' + deadline: 30.0 authentication: rules: @@ -25,3 +27,7 @@ authentication: oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/devtools/containeranalysis/v1alpha1/bill_of_materials.proto b/google/devtools/containeranalysis/v1alpha1/bill_of_materials.proto deleted file mode 100644 index 0cd60f053..000000000 --- a/google/devtools/containeranalysis/v1alpha1/bill_of_materials.proto +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2018 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.containeranalysis.v1alpha1; - -import "google/api/annotations.proto"; -import "google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto"; - -option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1;containeranalysis"; -option java_multiple_files = true; -option java_package = "com.google.containeranalysis.v1alpha1"; -option objc_class_prefix = "GCA"; - -// PackageManager provides metadata about available / installed packages. -message PackageManager { - // This represents a particular channel of distribution for a given package. - // e.g. Debian's jessie-backports dpkg mirror - message Distribution { - // The cpe_uri in [cpe format](https://cpe.mitre.org/specification/) - // denoting the package manager version distributing a package. - string cpe_uri = 1; - - // The CPU architecture for which packages in this distribution - // channel were built - Architecture architecture = 2; - - // The latest available version of this package in - // this distribution channel. - VulnerabilityType.Version latest_version = 3; - - // A freeform string denoting the maintainer of this package. - string maintainer = 4; - - // The distribution channel-specific homepage for this package. - string url = 6; - - // The distribution channel-specific description of this package. - string description = 7; - } - - // An occurrence of a particular package installation found within a - // system's filesystem. - // e.g. glibc was found in /var/lib/dpkg/status - message Location { - // The cpe_uri in [cpe format](https://cpe.mitre.org/specification/) - // denoting the package manager version distributing a package. - string cpe_uri = 1; - - // The version installed at this location. - VulnerabilityType.Version version = 2; - - // The path from which we gathered that this package/version is installed. - string path = 3; - } - - // This represents a particular package that is distributed over - // various channels. - // e.g. glibc (aka libc6) is distributed by many, at various versions. - message Package { - // The name of the package. - string name = 1; - - // The various channels by which a package is distributed. - repeated Distribution distribution = 10; - } - - // This represents how a particular software package may be installed on - // a system. - message Installation { - // Output only. The name of the installed package. - string name = 1; - - // All of the places within the filesystem versions of this package - // have been found. - repeated Location location = 2; - } - - // Instruction set architectures supported by various package managers. - enum Architecture { - // Unknown architecture - ARCHITECTURE_UNSPECIFIED = 0; - - // X86 architecture - X86 = 1; - - // X64 architecture - X64 = 2; - } -} diff --git a/google/devtools/containeranalysis/v1alpha1/containeranalysis.proto b/google/devtools/containeranalysis/v1alpha1/containeranalysis.proto deleted file mode 100644 index c94aed7c8..000000000 --- a/google/devtools/containeranalysis/v1alpha1/containeranalysis.proto +++ /dev/null @@ -1,994 +0,0 @@ -// Copyright 2018 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.containeranalysis.v1alpha1; - -import "google/api/annotations.proto"; -import "google/devtools/containeranalysis/v1alpha1/bill_of_materials.proto"; -import "google/devtools/containeranalysis/v1alpha1/image_basis.proto"; -import "google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto"; -import "google/devtools/containeranalysis/v1alpha1/provenance.proto"; -import "google/iam/v1/iam_policy.proto"; -import "google/iam/v1/policy.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1;containeranalysis"; -option java_multiple_files = true; -option java_package = "com.google.containeranalysis.v1alpha1"; -option objc_class_prefix = "GCA"; - -// Retrieves the results of vulnerability scanning of cloud components such as -// container images. The Container Analysis API is an implementation of the -// [Grafeas](grafeas.io) API. -// -// The vulnerability results are stored as a series of Occurrences. -// An `Occurrence` contains information about a specific vulnerability in a -// resource. An `Occurrence` references a `Note`. A `Note` contains details -// about the vulnerability and is stored in a stored in a separate project. -// Multiple `Occurrences` can reference the same `Note`. For example, an SSL -// vulnerability could affect multiple packages in an image. In this case, -// there would be one `Note` for the vulnerability and an `Occurrence` for -// each package with the vulnerability referencing that `Note`. -service ContainerAnalysis { - // Returns the requested `Occurrence`. - rpc GetOccurrence(GetOccurrenceRequest) returns (Occurrence) { - option (google.api.http) = { - get: "/v1alpha1/{name=projects/*/occurrences/*}" - }; - } - - // Lists active `Occurrences` for a given project matching the filters. - rpc ListOccurrences(ListOccurrencesRequest) - returns (ListOccurrencesResponse) { - option (google.api.http) = { - get: "/v1alpha1/{parent=projects/*}/occurrences" - }; - } - - // Deletes the given `Occurrence` from the system. Use this when - // an `Occurrence` is no longer applicable for the given resource. - rpc DeleteOccurrence(DeleteOccurrenceRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1alpha1/{name=projects/*/occurrences/*}" - }; - } - - // Creates a new `Occurrence`. Use this method to create `Occurrences` - // for a resource. - rpc CreateOccurrence(CreateOccurrenceRequest) returns (Occurrence) { - option (google.api.http) = { - post: "/v1alpha1/{parent=projects/*}/occurrences" - body: "occurrence" - }; - } - - // Updates an existing occurrence. - rpc UpdateOccurrence(UpdateOccurrenceRequest) returns (Occurrence) { - option (google.api.http) = { - patch: "/v1alpha1/{name=projects/*/occurrences/*}" - body: "occurrence" - }; - } - - // Gets the `Note` attached to the given `Occurrence`. - rpc GetOccurrenceNote(GetOccurrenceNoteRequest) returns (Note) { - option (google.api.http) = { - get: "/v1alpha1/{name=projects/*/occurrences/*}/notes" - }; - } - - // Returns the requested `Note`. - rpc GetNote(GetNoteRequest) returns (Note) { - option (google.api.http) = { - get: "/v1alpha1/{name=projects/*/notes/*}" - }; - } - - // Lists all `Notes` for a given project. - rpc ListNotes(ListNotesRequest) returns (ListNotesResponse) { - option (google.api.http) = { - get: "/v1alpha1/{parent=projects/*}/notes" - }; - } - - // Deletes the given `Note` from the system. - rpc DeleteNote(DeleteNoteRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1alpha1/{name=projects/*/notes/*}" - }; - } - - // Creates a new `Note`. - rpc CreateNote(CreateNoteRequest) returns (Note) { - option (google.api.http) = { - post: "/v1alpha1/{parent=projects/*}/notes" - body: "note" - }; - } - - // Updates an existing `Note`. - rpc UpdateNote(UpdateNoteRequest) returns (Note) { - option (google.api.http) = { - patch: "/v1alpha1/{name=projects/*/notes/*}" - body: "note" - }; - } - - // Lists `Occurrences` referencing the specified `Note`. Use this method to - // get all occurrences referencing your `Note` across all your customer - // projects. - rpc ListNoteOccurrences(ListNoteOccurrencesRequest) - returns (ListNoteOccurrencesResponse) { - option (google.api.http) = { - get: "/v1alpha1/{name=projects/*/notes/*}/occurrences" - }; - } - - // Gets a summary of the number and severity of occurrences. - rpc GetVulnzOccurrencesSummary(GetVulnzOccurrencesSummaryRequest) - returns (GetVulnzOccurrencesSummaryResponse) { - option (google.api.http) = { - get: "/v1alpha1/{parent=projects/*}/occurrences:vulnerabilitySummary" - }; - } - - // Sets the access control policy on the specified `Note` or `Occurrence`. - // Requires `containeranalysis.notes.setIamPolicy` or - // `containeranalysis.occurrences.setIamPolicy` permission if the resource is - // a `Note` or an `Occurrence`, respectively. - // Attempting to call this method without these permissions will result in a ` - // `PERMISSION_DENIED` error. - // Attempting to call this method on a non-existent resource will result in a - // `NOT_FOUND` error if the user has `containeranalysis.notes.list` permission - // on a `Note` or `containeranalysis.occurrences.list` on an `Occurrence`, or - // a `PERMISSION_DENIED` error otherwise. The resource takes the following - // formats: `projects/{projectid}/occurrences/{occurrenceid}` for occurrences - // and projects/{projectid}/notes/{noteid} for notes - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1alpha1/{resource=projects/*/notes/*}:setIamPolicy" - body: "*" - additional_bindings { - post: "/v1alpha1/{resource=projects/*/occurrences/*}:setIamPolicy" - body: "*" - } - }; - } - - // Gets the access control policy for a note or an `Occurrence` resource. - // Requires `containeranalysis.notes.setIamPolicy` or - // `containeranalysis.occurrences.setIamPolicy` permission if the resource is - // a note or occurrence, respectively. - // Attempting to call this method on a resource without the required - // permission will result in a `PERMISSION_DENIED` error. Attempting to call - // this method on a non-existent resource will result in a `NOT_FOUND` error - // if the user has list permission on the project, or a `PERMISSION_DENIED` - // error otherwise. The resource takes the following formats: - // `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for occurrences and - // projects/{PROJECT_ID}/notes/{NOTE_ID} for notes - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1alpha1/{resource=projects/*/notes/*}:getIamPolicy" - body: "*" - additional_bindings { - post: "/v1alpha1/{resource=projects/*/occurrences/*}:getIamPolicy" - body: "*" - } - }; - } - - // Returns the permissions that a caller has on the specified note or - // occurrence resource. Requires list permission on the project (for example, - // "storage.objects.list" on the containing bucket for testing permission of - // an object). Attempting to call this method on a non-existent resource will - // result in a `NOT_FOUND` error if the user has list permission on the - // project, or a `PERMISSION_DENIED` error otherwise. The resource takes the - // following formats: `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for - // `Occurrences` and `projects/{PROJECT_ID}/notes/{NOTE_ID}` for `Notes` - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1alpha1/{resource=projects/*/notes/*}:testIamPermissions" - body: "*" - additional_bindings { - post: "/v1alpha1/{resource=projects/*/occurrences/*}:testIamPermissions" - body: "*" - } - }; - } - - // Creates a new `Operation`. - rpc CreateOperation(CreateOperationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha1/{parent=projects/*}/operations" - body: "*" - }; - } - - // Updates an existing operation returns an error if operation - // does not exist. The only valid operations are to update mark the done bit - // change the result. - rpc UpdateOperation(UpdateOperationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1alpha1/{name=projects/*/operations/*}" - body: "*" - }; - } - - // Gets a specific scan configuration for a project. - rpc GetScanConfig(GetScanConfigRequest) returns (ScanConfig) { - option (google.api.http) = { - get: "/v1alpha1/{name=projects/*/scan_configs/*}" - }; - } - - // Lists scan configurations for a project. - rpc ListScanConfigs(ListScanConfigsRequest) - returns (ListScanConfigsResponse) { - option (google.api.http) = { - get: "/v1alpha1/{parent=projects/*}/scan_configs" - }; - } - - // Updates the scan configuration to a new value. - rpc UpdateScanConfig(UpdateScanConfigRequest) returns (ScanConfig) { - option (google.api.http) = { - patch: "/v1alpha1/{name=projects/*/scan_configs/*}" - body: "scan_config" - }; - } -} - -// `Occurrence` includes information about analysis occurrences for an image. -message Occurrence { - // Output only. The name of the `Occurrence` in the form - // "projects/{project_id}/occurrences/{OCCURRENCE_ID}" - string name = 1; - - // The unique URL of the image or the container for which the `Occurrence` - // applies. For example, https://gcr.io/project/image@sha256:foo This field - // can be used as a filter in list requests. - string resource_url = 2; - - // The resource for which the `Occurrence` applies. - Resource resource = 17; - - // An analysis note associated with this image, in the form - // "providers/{provider_id}/notes/{NOTE_ID}" - // This field can be used as a filter in list requests. - string note_name = 3; - - // Output only. This explicitly denotes which of the `Occurrence` details are - // specified. This field can be used as a filter in list requests. - Note.Kind kind = 6; - - // Describes the details of the vulnerability `Note` found in this resource. - oneof details { - // Details of a security vulnerability note. - VulnerabilityType.VulnerabilityDetails vulnerability_details = 8; - - // Build details for a verifiable build. - BuildDetails build_details = 7; - - // Describes how this resource derives from the basis - // in the associated note. - DockerImage.Derived derived_image = 11; - - // Describes the installation of a package on the linked resource. - PackageManager.Installation installation = 12; - - // Describes the deployment of an artifact on a runtime. - Deployable.Deployment deployment = 14; - - // Describes the initial scan status for this resource. - Discovery.Discovered discovered = 15; - - // Describes an attestation of an artifact. - AttestationAuthority.Attestation attestation = 16; - } - - // A description of actions that can be taken to remedy the `Note` - string remediation = 5; - - // Output only. The time this `Occurrence` was created. - google.protobuf.Timestamp create_time = 9; - - // Output only. The time this `Occurrence` was last updated. - google.protobuf.Timestamp update_time = 10; -} - -// Resource is an entity that can have metadata. E.g., a Docker image. -message Resource { - // The name of the resource. E.g., the name of a Docker image - "Debian". - string name = 1; - - // The unique URI of the resource. E.g., - // "https://gcr.io/project/image@sha256:foo" for a Docker image. - string uri = 2; - - // The hash of the resource content. E.g., the Docker digest. - Hash content_hash = 3; -} - -// Provides a detailed description of a `Note`. -message Note { - // Metadata for any related URL information - message RelatedUrl { - // Specific URL to associate with the note - string url = 1; - - // Label to describe usage of the URL - string label = 2; - } - - // This must be 1:1 with members of our oneofs, it can be used for filtering - // Note and Occurrence on their kind. - enum Kind { - // Unknown - KIND_UNSPECIFIED = 0; - - // The note and occurrence represent a package vulnerability. - PACKAGE_VULNERABILITY = 2; - - // The note and occurrence assert build provenance. - BUILD_DETAILS = 3; - - // This represents an image basis relationship. - IMAGE_BASIS = 4; - - // This represents a package installed via a package manager. - PACKAGE_MANAGER = 5; - - // The note and occurrence track deployment events. - DEPLOYABLE = 6; - - // The note and occurrence track the initial discovery status of a resource. - DISCOVERY = 7; - - // This represents a logical "role" that can attest to artifacts. - ATTESTATION_AUTHORITY = 8; - } - - // The name of the note in the form - // "providers/{provider_id}/notes/{NOTE_ID}" - string name = 1; - - // A one sentence description of this `Note`. - string short_description = 3; - - // A detailed description of this `Note`. - string long_description = 4; - - // Output only. This explicitly denotes which kind of note is specified. This - // field can be used as a filter in list requests. - Kind kind = 9; - - // The type of note. - oneof note_type { - // A package vulnerability type of note. - VulnerabilityType vulnerability_type = 6; - - // Build provenance type for a verifiable build. - BuildType build_type = 8; - - // A note describing a base image. - DockerImage.Basis base_image = 13; - - // A note describing a package hosted by various package managers. - PackageManager.Package package = 14; - - // A note describing something that can be deployed. - Deployable deployable = 17; - - // A note describing a provider/analysis type. - Discovery discovery = 18; - - // A note describing an attestation role. - AttestationAuthority attestation_authority = 19; - } - - // URLs associated with this note - repeated RelatedUrl related_url = 7; - - // Time of expiration for this note, null if note does not expire. - google.protobuf.Timestamp expiration_time = 10; - - // Output only. The time this note was created. This field can be used as a - // filter in list requests. - google.protobuf.Timestamp create_time = 11; - - // Output only. The time this note was last updated. This field can be used as - // a filter in list requests. - google.protobuf.Timestamp update_time = 12; -} - -// An artifact that can be deployed in some runtime. -message Deployable { - // The period during which some deployable was active in a runtime. - message Deployment { - // Types of platforms. - enum Platform { - // Unknown - PLATFORM_UNSPECIFIED = 0; - - // Google Container Engine - GKE = 1; - - // Google App Engine: Flexible Environment - FLEX = 2; - - // Custom user-defined platform - CUSTOM = 3; - } - - // Identity of the user that triggered this deployment. - string user_email = 1; - - // Beginning of the lifetime of this deployment. - google.protobuf.Timestamp deploy_time = 2; - - // End of the lifetime of this deployment. - google.protobuf.Timestamp undeploy_time = 3; - - // Configuration used to create this deployment. - string config = 8; - - // Address of the runtime element hosting this deployment. - string address = 5; - - // Output only. Resource URI for the artifact being deployed taken from the - // deployable field with the same name. - repeated string resource_uri = 6; - - // Platform hosting this deployment. - Platform platform = 7; - } - - // Resource URI for the artifact being deployed. - repeated string resource_uri = 1; -} - -// A note that indicates a type of analysis a provider would perform. This note -// exists in a provider's project. A `Discovery` occurrence is created in a -// consumer's project at the start of analysis. The occurrence's operation will -// indicate the status of the analysis. Absence of an occurrence linked to this -// note for a resource indicates that analysis hasn't started. -message Discovery { - // Provides information about the scan status of a discovered resource. - message Discovered { - // Analysis status for a resource. - enum AnalysisStatus { - // Unknown - ANALYSIS_STATUS_UNSPECIFIED = 0; - - // Resource is known but no action has been taken yet. - PENDING = 1; - - // Resource is being analyzed. - SCANNING = 2; - - // Analysis has finished successfully. - FINISHED_SUCCESS = 3; - - // Analysis has finished unsuccessfully, the analysis itself is in a bad - // state. - FINISHED_FAILED = 4; - - // Analysis will not happen, the resource is not supported. - UNSUPPORTED_RESOURCE = 5; - } - - // Output only. An operation that indicates the status of the current scan. - google.longrunning.Operation operation = 1; - - // The status of discovery for the resource. - AnalysisStatus analysis_status = 5; - - // When an error is encountered this will contain a LocalizedMessage under - // details to show to the user. The LocalizedMessage output only and - // populated by the API. - google.rpc.Status analysis_status_error = 6; - } - - // The kind of analysis that is handled by this discovery. - Note.Kind analysis_kind = 1; -} - -// Note holding the version of the provider's builder and the signature of -// the provenance message in linked BuildDetails. -message BuildType { - // Version of the builder which produced this Note. - string builder_version = 1; - - // Signature of the build in Occurrences pointing to the Note containing this - // `BuilderDetails`. - BuildSignature signature = 2; -} - -// Message encapsulating the signature of the verified build. -message BuildSignature { - // Public key formats - enum KeyType { - // `KeyType` is not set. - KEY_TYPE_UNSPECIFIED = 0; - - // `PGP ASCII Armored` public key. - PGP_ASCII_ARMORED = 1; - - // `PKIX PEM` public key. - PKIX_PEM = 2; - } - - // Public key of the builder which can be used to verify that the related - // findings are valid and unchanged. If `key_type` is empty, this defaults - // to PEM encoded public keys. - // - // This field may be empty if `key_id` references an external key. - // - // For Cloud Build based signatures, this is a PEM encoded public - // key. To verify the Cloud Build signature, place the contents of - // this field into a file (public.pem). The signature field is base64-decoded - // into its binary representation in signature.bin, and the provenance bytes - // from `BuildDetails` are base64-decoded into a binary representation in - // signed.bin. OpenSSL can then verify the signature: - // `openssl sha256 -verify public.pem -signature signature.bin signed.bin` - string public_key = 1; - - // Signature of the related `BuildProvenance`, encoded in a base64 string. - string signature = 2; - - // An Id for the key used to sign. This could be either an Id for the key - // stored in `public_key` (such as the Id or fingerprint for a PGP key, or the - // CN for a cert), or a reference to an external key (such as a reference to a - // key in Cloud Key Management Service). - string key_id = 3; - - // The type of the key, either stored in `public_key` or referenced in - // `key_id` - KeyType key_type = 4; -} - -// An attestation wrapper with a PGP-compatible signature. -// This message only supports `ATTACHED` signatures, where the payload that is -// signed is included alongside the signature itself in the same file. -message PgpSignedAttestation { - // Type (for example schema) of the attestation payload that was signed. - enum ContentType { - // `ContentType` is not set. - CONTENT_TYPE_UNSPECIFIED = 0; - - // Atomic format attestation signature. See - // https://github.com/containers/image/blob/8a5d2f82a6e3263290c8e0276c3e0f64e77723e7/docs/atomic-signature.md - // The payload extracted from `signature` is a JSON blob conforming to the - // linked schema. - SIMPLE_SIGNING_JSON = 1; - } - - // The raw content of the signature, as output by GNU Privacy Guard (GPG) or - // equivalent. Since this message only supports attached signatures, the - // payload that was signed must be attached. While the signature format - // supported is dependent on the verification implementation, currently only - // ASCII-armored (`--armor` to gpg), non-clearsigned (`--sign` rather than - // `--clearsign` to gpg) are supported. Concretely, `gpg --sign --armor - // --output=signature.gpg payload.json` will create the signature content - // expected in this field in `signature.gpg` for the `payload.json` - // attestation payload. - string signature = 1; - - // Type (for example schema) of the attestation payload that was signed. - // The verifier must ensure that the provided type is one that the verifier - // supports, and that the attestation payload is a valid instantiation of that - // type (for example by validating a JSON schema). - ContentType content_type = 3; - - // This field is used by verifiers to select the public key used to validate - // the signature. Note that the policy of the verifier ultimately determines - // which public keys verify a signature based on the context of the - // verification. There is no guarantee validation will succeed if the - // verifier has no key matching this ID, even if it has a key under a - // different ID that would verify the signature. Note that this ID should also - // be present in the signature content above, but that is not expected to be - // used by the verifier. - oneof key_id { - // The cryptographic fingerprint of the key used to generate the signature, - // as output by, e.g. `gpg --list-keys`. This should be the version 4, full - // 160-bit fingerprint, expressed as a 40 character hexadecimal string. See - // https://tools.ietf.org/html/rfc4880#section-12.2 for details. - // Implementations may choose to acknowledge "LONG", "SHORT", or other - // abbreviated key IDs, but only the full fingerprint is guaranteed to work. - // In gpg, the full fingerprint can be retrieved from the `fpr` field - // returned when calling --list-keys with --with-colons. For example: - // ``` - // gpg --with-colons --with-fingerprint --force-v4-certs \ - // --list-keys attester@example.com - // tru::1:1513631572:0:3:1:5 - // pub:...... - // fpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB: - // ``` - // Above, the fingerprint is `24FF6481B76AC91E66A00AC657A93A81EF3AE6FB`. - string pgp_key_id = 2; - } -} - -// Note kind that represents a logical attestation "role" or "authority". For -// example, an organization might have one `AttestationAuthority` for "QA" and -// one for "build". This Note is intended to act strictly as a grouping -// mechanism for the attached Occurrences (Attestations). This grouping -// mechanism also provides a security boundary, since IAM ACLs gate the ability -// for a principle to attach an Occurrence to a given Note. It also provides a -// single point of lookup to find all attached Attestation Occurrences, even if -// they don't all live in the same project. -message AttestationAuthority { - // This submessage provides human-readable hints about the purpose of the - // AttestationAuthority. Because the name of a Note acts as its resource - // reference, it is important to disambiguate the canonical name of the Note - // (which might be a UUID for security purposes) from "readable" names more - // suitable for debug output. Note that these hints should NOT be used to - // look up AttestationAuthorities in security sensitive contexts, such as when - // looking up Attestations to verify. - message AttestationAuthorityHint { - // The human readable name of this Attestation Authority, for example "qa". - string human_readable_name = 1; - } - - // Occurrence that represents a single "attestation". The authenticity of an - // Attestation can be verified using the attached signature. If the verifier - // trusts the public key of the signer, then verifying the signature is - // sufficient to establish trust. In this circumstance, the - // AttestationAuthority to which this Attestation is attached is primarily - // useful for look-up (how to find this Attestation if you already know the - // Authority and artifact to be verified) and intent (which authority was this - // attestation intended to sign for). - message Attestation { - // The signature, generally over the `resource_url`, that verifies this - // attestation. The semantics of the signature veracity are ultimately - // determined by the verification engine. - oneof signature { - PgpSignedAttestation pgp_signed_attestation = 1; - } - } - - AttestationAuthorityHint hint = 1; -} - -// Message encapsulating build provenance details. -message BuildDetails { - // The actual provenance - BuildProvenance provenance = 1; - - // Serialized JSON representation of the provenance, used in generating the - // `BuildSignature` in the corresponding Result. After verifying the - // signature, `provenance_bytes` can be unmarshalled and compared to the - // provenance to confirm that it is unchanged. A base64-encoded string - // representation of the provenance bytes is used for the signature in order - // to interoperate with openssl which expects this format for signature - // verification. - // - // The serialized form is captured both to avoid ambiguity in how the - // provenance is marshalled to json as well to prevent incompatibilities with - // future changes. - string provenance_bytes = 2; -} - -// Indicates various scans and whether they are turned on or off. -message ScanConfig { - // Output only. The name of the ScanConfig in the form - // “projects/{project_id}/ScanConfigs/{ScanConfig_id}". - string name = 1; - - // Output only. A human-readable description of what the `ScanConfig` does. - string description = 2; - - // Indicates whether the Scan is enabled. - bool enabled = 3; -} - -// Request to get a Occurrence. -message GetOccurrenceRequest { - // The name of the occurrence of the form - // "projects/{project_id}/occurrences/{OCCURRENCE_ID}" - string name = 1; -} - -// Request to list occurrences. -message ListOccurrencesRequest { - // The name field contains the project Id. For example: - // "projects/{project_id} - // @Deprecated - string name = 1; - - // This contains the project Id for example: projects/{project_id}. - string parent = 5; - - // The filter expression. - string filter = 2; - - // Number of occurrences to return in the list. - int32 page_size = 3; - - // Token to provide to skip to a particular spot in the list. - string page_token = 4; - - // The kind of occurrences to filter on. - Note.Kind kind = 6; -} - -// Response including listed active occurrences. -message ListOccurrencesResponse { - // The occurrences requested. - repeated Occurrence occurrences = 1; - - // The next pagination token in the list response. It should be used as - // `page_token` for the following request. An empty value means no more - // results. - string next_page_token = 2; -} - -// Request to delete a occurrence -message DeleteOccurrenceRequest { - // The name of the occurrence in the form of - // "projects/{project_id}/occurrences/{OCCURRENCE_ID}" - string name = 1; -} - -// Request to insert a new occurrence. -message CreateOccurrenceRequest { - // The name of the project. Should be of the form "projects/{project_id}". - // @Deprecated - string name = 1; - - // This field contains the project Id for example: "projects/{project_id}" - string parent = 3; - - // The occurrence to be inserted - Occurrence occurrence = 2; -} - -// Request to update an existing occurrence -message UpdateOccurrenceRequest { - // The name of the occurrence. - // Should be of the form "projects/{project_id}/occurrences/{OCCURRENCE_ID}". - string name = 1; - - // The updated occurrence. - Occurrence occurrence = 2; - - // The fields to update. - google.protobuf.FieldMask update_mask = 3; -} - -// Request to get a Note. -message GetNoteRequest { - // The name of the note in the form of - // "providers/{provider_id}/notes/{NOTE_ID}" - string name = 1; -} - -// Request to get the note to which this occurrence is attached. -message GetOccurrenceNoteRequest { - // The name of the occurrence in the form - // "projects/{project_id}/occurrences/{OCCURRENCE_ID}" - string name = 1; -} - -// Request to list notes. -message ListNotesRequest { - // The name field will contain the project Id for example: - // "providers/{provider_id} - // @Deprecated - string name = 1; - - // This field contains the project Id for example: "projects/{PROJECT_ID}". - string parent = 5; - - // The filter expression. - string filter = 2; - - // Number of notes to return in the list. - int32 page_size = 3; - - // Token to provide to skip to a particular spot in the list. - string page_token = 4; -} - -// Response including listed notes. -message ListNotesResponse { - // The occurrences requested - repeated Note notes = 1; - - // The next pagination token in the list response. It should be used as - // page_token for the following request. An empty value means no more result. - string next_page_token = 2; -} - -// Request to delete a note -message DeleteNoteRequest { - // The name of the note in the form of - // "providers/{provider_id}/notes/{NOTE_ID}" - string name = 1; -} - -// Request to insert a new note -message CreateNoteRequest { - // The name of the project. - // Should be of the form "providers/{provider_id}". - // @Deprecated - string name = 1; - - // This field contains the project Id for example: - // "projects/{project_id} - string parent = 4; - - // The ID to use for this note. - string note_id = 2; - - // The Note to be inserted - Note note = 3; -} - -// Request to update an existing note -message UpdateNoteRequest { - // The name of the note. - // Should be of the form "projects/{provider_id}/notes/{note_id}". - string name = 1; - - // The updated note. - Note note = 2; - - // The fields to update. - google.protobuf.FieldMask update_mask = 3; -} - -// Request to list occurrences. -message ListNoteOccurrencesRequest { - // The name field will contain the note name for example: - // "provider/{provider_id}/notes/{note_id}" - string name = 1; - - // The filter expression. - string filter = 2; - - // Number of notes to return in the list. - int32 page_size = 3; - - // Token to provide to skip to a particular spot in the list. - string page_token = 4; -} - -// Response including listed occurrences for a note. -message ListNoteOccurrencesResponse { - // The occurrences attached to the specified note. - repeated Occurrence occurrences = 1; - - // Token to receive the next page of notes. - string next_page_token = 2; -} - -// Request for creating an operation -message CreateOperationRequest { - // The project Id that this operation should be created under. - string parent = 1; - - // The ID to use for this operation. - string operation_id = 2; - - // The operation to create. - google.longrunning.Operation operation = 3; -} - -// Request for updating an existing operation -message UpdateOperationRequest { - // The name of the Operation. - // Should be of the form "projects/{provider_id}/operations/{operation_id}". - string name = 1; - - // The operation to create. - google.longrunning.Operation operation = 3; - - google.protobuf.FieldMask update_mask = 4; -} - -// Metadata for all operations used and required for all operations -// that created by Container Analysis Providers -message OperationMetadata { - // Output only. The time this operation was created. - google.protobuf.Timestamp create_time = 1; - - // Output only. The time that this operation was marked completed or failed. - google.protobuf.Timestamp end_time = 2; -} - -// Request to get the vulnz summary for some set of vulnerability Occurrences. -message GetVulnzOccurrencesSummaryRequest { - // This contains the project Id for example: projects/{project_id} - string parent = 1; - - // The filter expression. - string filter = 2; -} - -// A summary of how many vulnz occurrences there are per severity type. -// counts by groups, or if we should have different summary messages -// like this. -message GetVulnzOccurrencesSummaryResponse { - // The number of occurrences created for a specific severity. - message SeverityCount { - // The severity of the occurrences. - VulnerabilityType.Severity severity = 1; - - // The number of occurrences with the severity. - int64 count = 2; - } - - // A map of how many occurrences were found for each severity. - repeated SeverityCount counts = 1; -} - -// Request to get a ScanConfig. -message GetScanConfigRequest { - // The name of the ScanConfig in the form - // projects/{project_id}/scan_configs/{ScanConfig_id} - // instead. - string name = 1; -} - -// Request to list the available scan configurations. -message ListScanConfigsRequest { - // This containers the project Id i.e.: projects/{project_id} - // instead. - string parent = 1; - - // The filter expression. - string filter = 2; - - // The number of items to return. - int32 page_size = 3; - - // The page token to use for the next request. - string page_token = 4; -} - -// A list of ScanConfigs for the project. -message ListScanConfigsResponse { - // The set of scan configs - repeated ScanConfig scan_configs = 1; - - // A page token to pass in order to get more scans. - string next_page_token = 2; -} - -// A request to update a ScanConfig. -message UpdateScanConfigRequest { - // The scan config to update of the form - // projects/{project_id}/scan_configs/{ScanConfig_id} - // instead. - string name = 1; - - // The new scan configuration - ScanConfig scan_config = 2; - - google.protobuf.FieldMask update_mask = 3; -} diff --git a/google/devtools/containeranalysis/v1alpha1/image_basis.proto b/google/devtools/containeranalysis/v1alpha1/image_basis.proto deleted file mode 100644 index f97296969..000000000 --- a/google/devtools/containeranalysis/v1alpha1/image_basis.proto +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright 2018 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.containeranalysis.v1alpha1; - -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1;containeranalysis"; -option java_multiple_files = true; -option java_package = "com.google.containeranalysis.v1alpha1"; -option objc_class_prefix = "GCA"; - -// DockerImage holds types defining base image notes -// and derived image occurrences. -message DockerImage { - // Layer holds metadata specific to a layer of a Docker image. - message Layer { - // Instructions from dockerfile - enum Directive { - // Default value for unsupported/missing directive - DIRECTIVE_UNSPECIFIED = 0; - - // https://docs.docker.com/reference/builder/#maintainer - MAINTAINER = 1; - - // https://docs.docker.com/reference/builder/#run - RUN = 2; - - // https://docs.docker.com/reference/builder/#cmd - CMD = 3; - - // https://docs.docker.com/reference/builder/#label - LABEL = 4; - - // https://docs.docker.com/reference/builder/#expose - EXPOSE = 5; - - // https://docs.docker.com/reference/builder/#env - ENV = 6; - - // https://docs.docker.com/reference/builder/#add - ADD = 7; - - // https://docs.docker.com/reference/builder/#copy - COPY = 8; - - // https://docs.docker.com/reference/builder/#entrypoint - ENTRYPOINT = 9; - - // https://docs.docker.com/reference/builder/#volume - VOLUME = 10; - - // https://docs.docker.com/reference/builder/#user - USER = 11; - - // https://docs.docker.com/reference/builder/#workdir - WORKDIR = 12; - - // https://docs.docker.com/reference/builder/#arg - ARG = 13; - - // https://docs.docker.com/reference/builder/#onbuild - ONBUILD = 14; - - // https://docs.docker.com/reference/builder/#stopsignal - STOPSIGNAL = 15; - - // https://docs.docker.com/reference/builder/#healthcheck - HEALTHCHECK = 16; - - // https://docs.docker.com/reference/builder/#shell - SHELL = 17; - } - - // The recovered Dockerfile directive used to construct this layer. - Directive directive = 1; - - // The recovered arguments to the Dockerfile directive. - string arguments = 2; - } - - // A set of properties that uniquely identify a given Docker image. - message Fingerprint { - // The layer-id of the final layer in the Docker image's v1 - // representation. - // This field can be used as a filter in list requests. - string v1_name = 1; - - // The ordered list of v2 blobs that represent a given image. - repeated string v2_blob = 2; - - // Output only. The name of the image's v2 blobs computed via: - // [bottom] := v2_blob[bottom] - // [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) - // Only the name of the final blob is kept. - // This field can be used as a filter in list requests. - string v2_name = 3; - } - - // Basis describes the base image portion (Note) of the DockerImage - // relationship. Linked occurrences are derived from this or an - // equivalent image via: - // FROM - // Or an equivalent reference, e.g. a tag of the resource_url. - message Basis { - // The resource_url for the resource representing the basis of - // associated occurrence images. - string resource_url = 1; - - // The fingerprint of the base image. - Fingerprint fingerprint = 2; - } - - // Derived describes the derived image portion (Occurrence) of the - // DockerImage relationship. This image would be produced from a Dockerfile - // with FROM . - message Derived { - // The fingerprint of the derived image. - Fingerprint fingerprint = 1; - - // Output only. The number of layers by which this image differs from the - // associated image basis. - uint32 distance = 2; - - // This contains layer-specific metadata, if populated it has length - // "distance" and is ordered with [distance] being the layer immediately - // following the base image and [1] being the final layer. - repeated Layer layer_info = 3; - - // Output only. This contains the base image URL for the derived image - // occurrence. - string base_resource_url = 4; - } -} diff --git a/google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto b/google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto deleted file mode 100644 index e56dd6c38..000000000 --- a/google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright 2018 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.containeranalysis.v1alpha1; - -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1;containeranalysis"; -option java_multiple_files = true; -option java_package = "com.google.containeranalysis.v1alpha1"; -option objc_class_prefix = "GCA"; - -// VulnerabilityType provides metadata about a security vulnerability. -message VulnerabilityType { - // Version contains structured information about the version of the package. - // For a discussion of this in Debian/Ubuntu: - // http://serverfault.com/questions/604541/debian-packages-version-convention - // For a discussion of this in Redhat/Fedora/Centos: - // http://blog.jasonantman.com/2014/07/how-yum-and-rpm-compare-versions/ - message Version { - // Whether this is an ordinary package version or a - // sentinel MIN/MAX version. - enum VersionKind { - // A standard package version, defined by the other fields. - NORMAL = 0; - - // A special version representing negative infinity, - // other fields are ignored. - MINIMUM = 1; - - // A special version representing positive infinity, - // other fields are ignored. - MAXIMUM = 2; - } - - // Used to correct mistakes in the version numbering scheme. - int32 epoch = 1; - - // The main part of the version name. - string name = 2; - - // The iteration of the package build from the above version. - string revision = 3; - - // Distinguish between sentinel MIN/MAX versions and normal versions. - // If kind is not NORMAL, then the other fields are ignored. - VersionKind kind = 5; - } - - // Identifies all occurrences of this vulnerability in the package for a - // specific distro/location - // For example: glibc in cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2 - message Detail { - // The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) in - // which the vulnerability manifests. Examples include distro or storage - // location for vulnerable jar. - // This field can be used as a filter in list requests. - string cpe_uri = 1; - - // The name of the package where the vulnerability was found. - // This field can be used as a filter in list requests. - string package = 8; - - // The min version of the package in which the vulnerability exists. - Version min_affected_version = 6; - - // The max version of the package in which the vulnerability exists. - // This field can be used as a filter in list requests. - Version max_affected_version = 7; - - // The severity (eg: distro assigned severity) for this vulnerability. - string severity_name = 4; - - // A vendor-specific description of this note. - string description = 9; - - // The fix for this specific package version. - VulnerabilityLocation fixed_location = 5; - - // The type of package; whether native or non native(ruby gems, - // node.js packages etc) - string package_type = 10; - - // Whether this Detail is obsolete. Occurrences are expected not to point to - // obsolete details. - bool is_obsolete = 11; - } - - // Used by Occurrence to point to where the vulnerability exists and how - // to fix it. - message VulnerabilityDetails { - // The type of package; whether native or non native(ruby gems, - // node.js packages etc) - string type = 3; - - // Output only. The note provider assigned Severity of the vulnerability. - Severity severity = 4; - - // Output only. The CVSS score of this vulnerability. CVSS score is on a - // scale of 0-10 where 0 indicates low severity and 10 indicates high - // severity. - float cvss_score = 5; - - // The set of affected locations and their fixes (if available) within - // the associated resource. - repeated PackageIssue package_issue = 6; - } - - // This message wraps a location affected by a vulnerability and its - // associated fix (if one is available). - message PackageIssue { - // The location of the vulnerability. - VulnerabilityLocation affected_location = 1; - - // The location of the available fix for vulnerability. - VulnerabilityLocation fixed_location = 2; - - // The severity (eg: distro assigned severity) for this vulnerability. - string severity_name = 3; - } - - // The location of the vulnerability - message VulnerabilityLocation { - // The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) - // format. Examples include distro or storage location for vulnerable jar. - // This field can be used as a filter in list requests. - string cpe_uri = 1; - - // The package being described. - string package = 2; - - // The version of the package being described. - // This field can be used as a filter in list requests. - Version version = 4; - } - - // Note provider-assigned severity/impact ranking - enum Severity { - // Unknown Impact - SEVERITY_UNSPECIFIED = 0; - - // Minimal Impact - MINIMAL = 1; - - // Low Impact - LOW = 2; - - // Medium Impact - MEDIUM = 3; - - // High Impact - HIGH = 4; - - // Critical Impact - CRITICAL = 5; - } - - // The CVSS score for this Vulnerability. - float cvss_score = 2; - - // Note provider assigned impact of the vulnerability - Severity severity = 3; - - // All information about the package to specifically identify this - // vulnerability. One entry per (version range and cpe_uri) the - // package vulnerability has manifested in. - repeated Detail details = 4; -} diff --git a/google/devtools/containeranalysis/v1alpha1/provenance.proto b/google/devtools/containeranalysis/v1alpha1/provenance.proto deleted file mode 100644 index ce2b53202..000000000 --- a/google/devtools/containeranalysis/v1alpha1/provenance.proto +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright 2018 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.containeranalysis.v1alpha1; - -import "google/api/annotations.proto"; -import "google/devtools/containeranalysis/v1alpha1/source_context.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1;containeranalysis"; -option java_multiple_files = true; -option java_package = "com.google.containeranalysis.v1alpha1"; -option objc_class_prefix = "GCA"; - -// Provenance of a build. Contains all information needed to verify the full -// details about the build from source to completion. -message BuildProvenance { - // Unique identifier of the build. - string id = 1; - - // ID of the project. - string project_id = 2; - - // Commands requested by the build. - repeated Command commands = 5; - - // Output of the build. - repeated Artifact built_artifacts = 6; - - // Time at which the build was created. - google.protobuf.Timestamp create_time = 7; - - // Time at which execution of the build was started. - google.protobuf.Timestamp start_time = 8; - - // Time at which execution of the build was finished. - google.protobuf.Timestamp finish_time = 9; - - // E-mail address of the user who initiated this build. Note that this was the - // user's e-mail address at the time the build was initiated; this address may - // not represent the same end-user for all time. - string creator = 11; - - // Google Cloud Storage bucket where logs were written. - string logs_bucket = 13; - - // Details of the Source input to the build. - Source source_provenance = 14; - - // Trigger identifier if the build was triggered automatically; empty if not. - string trigger_id = 15; - - // Special options applied to this build. This is a catch-all field where - // build providers can enter any desired additional details. - map build_options = 16; - - // Version string of the builder at the time this build was executed. - string builder_version = 17; -} - -// Source describes the location of the source used for the build. -message Source { - // Source location information. - oneof source { - // If provided, get the source from this location in in Google Cloud - // Storage. - StorageSource storage_source = 1; - - // If provided, get source from this location in a Cloud Repo. - RepoSource repo_source = 2; - } - - // If provided, the input binary artifacts for the build came from this - // location. - StorageSource artifact_storage_source = 4; - - // Hash(es) of the build source, which can be used to verify that the original - // source integrity was maintained in the build. - // - // The keys to this map are file paths used as build source and the values - // contain the hash values for those files. - // - // If the build source came in a single package such as a gzipped tarfile - // (.tar.gz), the FileHash will be for the single path to that file. - map file_hashes = 3; - - // If provided, the source code used for the build came from this location. - SourceContext context = 7; - - // If provided, some of the source code used for the build may be found in - // these locations, in the case where the source repository had multiple - // remotes or submodules. This list will not include the context specified in - // the context field. - repeated SourceContext additional_contexts = 8; -} - -// Container message for hashes of byte content of files, used in Source -// messages to verify integrity of source input to the build. -message FileHashes { - // Collection of file hashes. - repeated Hash file_hash = 1; -} - -// Container message for hash values. -message Hash { - // Specifies the hash algorithm, if any. - enum HashType { - // No hash requested. - NONE = 0; - - // A sha256 hash. - SHA256 = 1; - } - - // The type of hash that was performed. - HashType type = 1; - - // The hash value. - bytes value = 2; -} - -// StorageSource describes the location of the source in an archive file in -// Google Cloud Storage. -message StorageSource { - // Google Cloud Storage bucket containing source (see [Bucket Name - // Requirements] - // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). - string bucket = 1; - - // Google Cloud Storage object containing source. - string object = 2; - - // Google Cloud Storage generation for the object. - int64 generation = 3; -} - -// RepoSource describes the location of the source in a Google Cloud Source -// Repository. -message RepoSource { - // ID of the project that owns the repo. - string project_id = 1; - - // Name of the repo. - string repo_name = 2; - - // A revision within the source repository must be specified in - // one of these ways. - oneof revision { - // Name of the branch to build. - string branch_name = 3; - - // Name of the tag to build. - string tag_name = 4; - - // Explicit commit SHA to build. - string commit_sha = 5; - } -} - -// Command describes a step performed as part of the build pipeline. -message Command { - // Name of the command, as presented on the command line, or if the command is - // packaged as a Docker container, as presented to `docker pull`. - string name = 1; - - // Environment variables set before running this Command. - repeated string env = 2; - - // Command-line arguments used when executing this Command. - repeated string args = 3; - - // Working directory (relative to project source root) used when running - // this Command. - string dir = 4; - - // Optional unique identifier for this Command, used in wait_for to reference - // this Command as a dependency. - string id = 5; - - // The ID(s) of the Command(s) that this Command depends on. - repeated string wait_for = 6; -} - -// Artifact describes a build product. -message Artifact { - // Name of the artifact. This may be the path to a binary or jar file, or in - // the case of a container build, the name used to push the container image to - // Google Container Registry, as presented to `docker push`. - // - // This field is deprecated in favor of the plural `names` field; it continues - // to exist here to allow existing BuildProvenance serialized to json in - // google.devtools.containeranalysis.v1alpha1.BuildDetails.provenance_bytes to - // deserialize back into proto. - string name = 1; - - // Hash or checksum value of a binary, or Docker Registry 2.0 digest of a - // container. - string checksum = 2; - - // Artifact ID, if any; for container images, this will be a URL by digest - // like gcr.io/projectID/imagename@sha256:123456 - string id = 3; - - // Related artifact names. This may be the path to a binary or jar file, or in - // the case of a container build, the name used to push the container image to - // Google Container Registry, as presented to `docker push`. Note that a - // single Artifact ID can have multiple names, for example if two tags are - // applied to one image. - repeated string names = 4; -} diff --git a/google/devtools/containeranalysis/v1alpha1/source_context.proto b/google/devtools/containeranalysis/v1alpha1/source_context.proto deleted file mode 100644 index e9d16643d..000000000 --- a/google/devtools/containeranalysis/v1alpha1/source_context.proto +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2018 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.containeranalysis.v1alpha1; - -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1;containeranalysis"; -option java_multiple_files = true; -option java_package = "com.google.containeranalysis.v1alpha1"; -option objc_class_prefix = "GCA"; - -// A SourceContext is a reference to a tree of files. A SourceContext together -// with a path point to a unique revision of a single file or directory. -message SourceContext { - // A SourceContext can refer any one of the following types of repositories. - oneof context { - // A SourceContext referring to a revision in a Google Cloud Source Repo. - CloudRepoSourceContext cloud_repo = 1; - - // A SourceContext referring to a Gerrit project. - GerritSourceContext gerrit = 2; - - // A SourceContext referring to any third party Git repo (e.g., GitHub). - GitSourceContext git = 3; - } - - // Labels with user defined metadata. - map labels = 4; -} - -// An alias to a repo revision. -message AliasContext { - // The type of an alias. - enum Kind { - // Unknown. - KIND_UNSPECIFIED = 0; - - // Git tag. - FIXED = 1; - - // Git branch. - MOVABLE = 2; - - // Used to specify non-standard aliases. For example, if a Git repo has a - // ref named "refs/foo/bar". - OTHER = 4; - } - - // The alias kind. - Kind kind = 1; - - // The alias name. - string name = 2; -} - -// A CloudRepoSourceContext denotes a particular revision in a Google Cloud -// Source Repo. -message CloudRepoSourceContext { - // The ID of the repo. - RepoId repo_id = 1; - - // A revision in a Cloud Repo can be identified by either its revision ID or - // its alias. - oneof revision { - // A revision ID. - string revision_id = 2; - - // An alias, which may be a branch or tag. - AliasContext alias_context = 3; - } -} - -// A SourceContext referring to a Gerrit project. -message GerritSourceContext { - // The URI of a running Gerrit instance. - string host_uri = 1; - - // The full project name within the host. Projects may be nested, so - // "project/subproject" is a valid project name. The "repo name" is - // the hostURI/project. - string gerrit_project = 2; - - // A revision in a Gerrit project can be identified by either its revision ID - // or its alias. - oneof revision { - // A revision (commit) ID. - string revision_id = 3; - - // An alias, which may be a branch or tag. - AliasContext alias_context = 4; - } -} - -// A GitSourceContext denotes a particular revision in a third party Git -// repository (e.g., GitHub). -message GitSourceContext { - // Git repository URL. - string url = 1; - - // Required. - // Git commit hash. - string revision_id = 2; -} - -// A unique identifier for a Cloud Repo. -message RepoId { - // A cloud repo can be identified by either its project ID and repository name - // combination, or its globally unique identifier. - oneof id { - // A combination of a project ID and a repo name. - ProjectRepoId project_repo_id = 1; - - // A server-assigned, globally unique identifier. - string uid = 2; - } -} - -// Selects a repo using a Google Cloud Platform project ID (e.g., -// winged-cargo-31) and a repo name within that project. -message ProjectRepoId { - // The ID of the project. - string project_id = 1; - - // The name of the repo. Leave empty for the default repo. - string repo_name = 2; -} diff --git a/google/devtools/containeranalysis/v1beta1/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/BUILD.bazel index b5133a10f..992f053c0 100644 --- a/google/devtools/containeranalysis/v1beta1/BUILD.bazel +++ b/google/devtools/containeranalysis/v1beta1/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -27,6 +29,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/iam/v1:iam_policy_proto", "//google/iam/v1:policy_proto", "@com_google_protobuf//:timestamp_proto", @@ -36,6 +41,7 @@ proto_library( proto_library_with_info( name = "containeranalysis_proto_with_info", deps = [ + "//google/cloud:common_resources_proto", ":containeranalysis_proto", ] + _PROTO_SUBPACKAGE_DEPS, ) @@ -47,19 +53,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", - "@com_google_api_grpc_proto_google_iam_v1//jar", -] - _JAVA_PROTO_SUBPACKAGE_DEPS = [ "//google/devtools/containeranalysis/v1beta1/attestation:attestation_java_proto", "//google/devtools/containeranalysis/v1beta1/build:build_java_proto", @@ -88,20 +88,6 @@ _JAVA_GRPC_SUBPACKAGE_DEPS = [ "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_java_grpc", ] -_RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS = [ - "//google/devtools/containeranalysis/v1beta1/attestation:attestation_resource_name_java_proto", - "//google/devtools/containeranalysis/v1beta1/build:build_resource_name_java_proto", - "//google/devtools/containeranalysis/v1beta1/common:common_resource_name_java_proto", - "//google/devtools/containeranalysis/v1beta1/deployment:deployment_resource_name_java_proto", - "//google/devtools/containeranalysis/v1beta1/discovery:discovery_resource_name_java_proto", - "//google/devtools/containeranalysis/v1beta1/grafeas:grafeas_resource_name_java_proto", - "//google/devtools/containeranalysis/v1beta1/image:image_resource_name_java_proto", - "//google/devtools/containeranalysis/v1beta1/package:package_resource_name_java_proto", - "//google/devtools/containeranalysis/v1beta1/provenance:provenance_resource_name_java_proto", - "//google/devtools/containeranalysis/v1beta1/source:source_resource_name_java_proto", - "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_resource_name_java_proto", -] - java_proto_library( name = "containeranalysis_java_proto", deps = [":containeranalysis_proto"], @@ -110,13 +96,7 @@ java_proto_library( java_grpc_library( name = "containeranalysis_java_grpc", srcs = [":containeranalysis_proto"], - deps = [":containeranalysis_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "containeranalysis_resource_name_java_proto", - gapic_yaml = "containeranalysis_gapic.yaml", - deps = [":containeranalysis_proto"], + deps = [":containeranalysis_java_proto"], ) java_gapic_library( @@ -129,33 +109,28 @@ java_gapic_library( ] + _JAVA_GRPC_SUBPACKAGE_DEPS, deps = [ ":containeranalysis_java_proto", - ":containeranalysis_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS, + "//google/iam/v1:iam_java_proto", + ] + _JAVA_PROTO_SUBPACKAGE_DEPS, ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [":containeranalysis_java_gapic_test"], -) for test_name in [ - "com.google.cloud.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1ClientTest", - "com.google.cloud.devtools.containeranalysis.v1beta1.GrafeasV1Beta1ClientTest", -]] +java_gapic_test( + name = "containeranalysis_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1ClientTest", + "com.google.cloud.devtools.containeranalysis.v1beta1.GrafeasV1Beta1ClientTest", + ], + runtime_deps = ["containeranalysis_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-containeranalysis-v1-java", - client_deps = [":containeranalysis_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":containeranalysis_java_gapic_test"], - grpc_deps = [":containeranalysis_java_grpc"] + _JAVA_GRPC_SUBPACKAGE_DEPS, - grpc_group = "com.google.api.grpc", - proto_deps = [ + name = "google-cloud-devtools-containeranalysis-v1beta1-java", + deps = [ + ":containeranalysis_java_gapic", + ":containeranalysis_java_grpc", ":containeranalysis_java_proto", ":containeranalysis_proto", - ":containeranalysis_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS + _PROTO_SUBPACKAGE_DEPS + _RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS, - version = "0.0.0-SNAPSHOT", + ] + _JAVA_GRPC_SUBPACKAGE_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS + _PROTO_SUBPACKAGE_DEPS, ) ############################################################################## @@ -163,10 +138,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -182,9 +157,9 @@ go_proto_library( go_gapic_library( name = "containeranalysis_go_gapic", - src = ":containeranalysis_proto_with_info", - gapic_yaml = "containeranalysis_gapic.yaml", - importpath = "cloud.google.com/go/containeranalysis/apiv1beta1", + srcs = [":containeranalysis_proto_with_info"], + grpc_service_config = "containeranalysis_grpc_service_config.json", + importpath = "cloud.google.com/go/containeranalysis/apiv1beta1;containeranalysis", service_yaml = "//google/devtools/containeranalysis:containeranalysis_v1beta1.yaml", deps = [ ":containeranalysis_go_proto", @@ -210,12 +185,11 @@ go_test( importpath = "cloud.google.com/go/containeranalysis/apiv1beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-containeranalysis-v1-go", + name = "gapi-cloud-devtools-containeranalysis-v1beta1-go", deps = [ ":containeranalysis_go_gapic", - ":containeranalysis_go_gapic_srcjar-smoke-test.srcjar", ":containeranalysis_go_gapic_srcjar-test.srcjar", ":containeranalysis_go_proto", "//google/devtools/containeranalysis/v1beta1/attestation:attestation_go_proto", diff --git a/google/devtools/containeranalysis/v1beta1/attestation/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/attestation/BUILD.bazel index 05e1086f5..347abf1a5 100644 --- a/google/devtools/containeranalysis/v1beta1/attestation/BUILD.bazel +++ b/google/devtools/containeranalysis/v1beta1/attestation/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -11,7 +13,9 @@ proto_library( srcs = [ "attestation.proto", ], - deps = [], + deps = [ + "//google/devtools/containeranalysis/v1beta1/common:common_proto", + ], ) proto_library_with_info( @@ -26,7 +30,6 @@ load( "@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", ) java_proto_library( @@ -40,12 +43,6 @@ java_grpc_library( deps = [":attestation_java_proto"], ) -java_resource_name_proto_library( - name = "attestation_resource_name_java_proto", - gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml", - deps = [":attestation_proto"], -) - ############################################################################## # Go ############################################################################## @@ -56,5 +53,7 @@ go_proto_library( compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/attestation", protos = [":attestation_proto"], - deps = [], + deps = [ + "//google/devtools/containeranalysis/v1beta1/common:common_go_proto", + ], ) diff --git a/google/devtools/containeranalysis/v1beta1/attestation/attestation.proto b/google/devtools/containeranalysis/v1beta1/attestation/attestation.proto index e60b6e91a..0d3d6c9fd 100644 --- a/google/devtools/containeranalysis/v1beta1/attestation/attestation.proto +++ b/google/devtools/containeranalysis/v1beta1/attestation/attestation.proto @@ -16,6 +16,8 @@ syntax = "proto3"; package grafeas.v1beta1.attestation; +import "google/devtools/containeranalysis/v1beta1/common/common.proto"; + option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/attestation;attestation"; option java_multiple_files = true; option java_package = "io.grafeas.v1beta1.attestation"; @@ -25,9 +27,9 @@ option objc_class_prefix = "GRA"; // supports `ATTACHED` signatures, where the payload that is signed is included // alongside the signature itself in the same file. message PgpSignedAttestation { - // The raw content of the signature, as output by GNU Privacy Guard (GPG) or - // equivalent. Since this message only supports attached signatures, the - // payload that was signed must be attached. While the signature format + // Required. The raw content of the signature, as output by GNU Privacy Guard + // (GPG) or equivalent. Since this message only supports attached signatures, + // the payload that was signed must be attached. While the signature format // supported is dependent on the verification implementation, currently only // ASCII-armored (`--armor` to gpg), non-clearsigned (`--sign` rather than // `--clearsign` to gpg) are supported. Concretely, `gpg --sign --armor @@ -54,9 +56,9 @@ message PgpSignedAttestation { ContentType content_type = 3; // This field is used by verifiers to select the public key used to validate - // the signature. Note that the policy of the verifier ultimately determines + // the signature. Note that the policy of the verifier ultimately determines // which public keys verify a signature based on the context of the - // verification. There is no guarantee validation will succeed if the + // verification. There is no guarantee validation will succeed if the // verifier has no key matching this ID, even if it has a key under a // different ID that would verify the signature. Note that this ID should also // be present in the signature content above, but that is not expected to be @@ -82,24 +84,59 @@ message PgpSignedAttestation { } } +// An attestation wrapper that uses the Grafeas `Signature` message. +// This attestation must define the `serialized_payload` that the `signatures` +// verify and any metadata necessary to interpret that plaintext. The +// signatures should always be over the `serialized_payload` bytestring. +message GenericSignedAttestation { + // Type of the attestation plaintext that was signed. + enum ContentType { + // `ContentType` is not set. + CONTENT_TYPE_UNSPECIFIED = 0; + // Atomic format attestation signature. See + // https://github.com/containers/image/blob/8a5d2f82a6e3263290c8e0276c3e0f64e77723e7/docs/atomic-signature.md + // The payload extracted in `plaintext` is a JSON blob conforming to the + // linked schema. + SIMPLE_SIGNING_JSON = 1; + } + + // Type (for example schema) of the attestation payload that was signed. + // The verifier must ensure that the provided type is one that the verifier + // supports, and that the attestation payload is a valid instantiation of that + // type (for example by validating a JSON schema). + ContentType content_type = 1; + + // The serialized payload that is verified by one or more `signatures`. + // The encoding and semantic meaning of this payload must match what is set in + // `content_type`. + bytes serialized_payload = 2; + + // One or more signatures over `serialized_payload`. Verifier implementations + // should consider this attestation message verified if at least one + // `signature` verifies `serialized_payload`. See `Signature` in common.proto + // for more details on signature structure and verification. + repeated Signature signatures = 3; +} + // Note kind that represents a logical attestation "role" or "authority". For // example, an organization might have one `Authority` for "QA" and one for -// "build". This Note is intended to act strictly as a grouping mechanism for -// the attached Occurrences (Attestations). This grouping mechanism also +// "build". This note is intended to act strictly as a grouping mechanism for +// the attached occurrences (Attestations). This grouping mechanism also // provides a security boundary, since IAM ACLs gate the ability for a principle -// to attach an Occurrence to a given Note. It also provides a single point of -// lookup to find all attached Attestation Occurrences, even if they don't all +// to attach an occurrence to a given note. It also provides a single point of +// lookup to find all attached attestation occurrences, even if they don't all // live in the same project. message Authority { // This submessage provides human-readable hints about the purpose of the - // Authority. Because the name of a Note acts as its resource reference, it is + // authority. Because the name of a note acts as its resource reference, it is // important to disambiguate the canonical name of the Note (which might be a // UUID for security purposes) from "readable" names more suitable for debug - // output. Note that these hints should NOT be used to look up authorities in - // security sensitive contexts, such as when looking up Attestations to + // output. Note that these hints should not be used to look up authorities in + // security sensitive contexts, such as when looking up attestations to // verify. message Hint { - // The human readable name of this Attestation Authority, for example "qa". + // Required. The human readable name of this attestation authority, for + // example "qa". string human_readable_name = 1; } @@ -109,24 +146,25 @@ message Authority { // Details of an attestation occurrence. message Details { - // Attestation for the resource. + // Required. Attestation for the resource. Attestation attestation = 1; } // Occurrence that represents a single "attestation". The authenticity of an -// Attestation can be verified using the attached signature. If the verifier +// attestation can be verified using the attached signature. If the verifier // trusts the public key of the signer, then verifying the signature is -// sufficient to establish trust. In this circumstance, the Authority to which -// this Attestation is attached is primarily useful for look-up (how to find -// this Attestation if you already know the Authority and artifact to be +// sufficient to establish trust. In this circumstance, the authority to which +// this attestation is attached is primarily useful for look-up (how to find +// this attestation if you already know the authority and artifact to be // verified) and intent (which authority was this attestation intended to sign // for). message Attestation { - // The signature, generally over the `resource_url`, that verifies this - // attestation. The semantics of the signature veracity are ultimately + // Required. The signature, generally over the `resource_url`, that verifies + // this attestation. The semantics of the signature veracity are ultimately // determined by the verification engine. oneof signature { // A PGP signed attestation. PgpSignedAttestation pgp_signed_attestation = 1; + GenericSignedAttestation generic_signed_attestation = 2; } } diff --git a/google/devtools/containeranalysis/v1beta1/build/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/build/BUILD.bazel index fda8cda8b..7d478fa5d 100644 --- a/google/devtools/containeranalysis/v1beta1/build/BUILD.bazel +++ b/google/devtools/containeranalysis/v1beta1/build/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -27,7 +29,6 @@ proto_library_with_info( load( "@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", - "java_resource_name_proto_library", ) java_proto_library( @@ -41,12 +42,6 @@ java_grpc_library( deps = [":build_java_proto"], ) -java_resource_name_proto_library( - name = "build_resource_name_java_proto", - gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml", - deps = [":build_proto"], -) - ############################################################################## # Go ############################################################################## diff --git a/google/devtools/containeranalysis/v1beta1/build/build.proto b/google/devtools/containeranalysis/v1beta1/build/build.proto index 32b357f00..0a5a2950b 100644 --- a/google/devtools/containeranalysis/v1beta1/build/build.proto +++ b/google/devtools/containeranalysis/v1beta1/build/build.proto @@ -24,13 +24,13 @@ option java_package = "io.grafeas.v1beta1.build"; option objc_class_prefix = "GRA"; // Note holding the version of the provider's builder and the signature of the -// provenance message in linked BuildDetails. +// provenance message in the build details occurrence. message Build { - // Version of the builder which produced this Note. + // Required. Immutable. Version of the builder which produced this build. string builder_version = 1; - // Signature of the build in Occurrences pointing to the Note containing this - // `BuilderDetails`. + // Signature of the build in occurrences pointing to this build note + // containing build details. BuildSignature signature = 2; } @@ -42,8 +42,8 @@ message BuildSignature { // // This field may be empty if `key_id` references an external key. // - // For Cloud Container Builder based signatures, this is a PEM encoded public - // key. To verify the Cloud Container Builder signature, place the contents of + // For Cloud Build based signatures, this is a PEM encoded public + // key. To verify the Cloud Build signature, place the contents of // this field into a file (public.pem). The signature field is base64-decoded // into its binary representation in signature.bin, and the provenance bytes // from `BuildDetails` are base64-decoded into a binary representation in @@ -51,17 +51,17 @@ message BuildSignature { // `openssl sha256 -verify public.pem -signature signature.bin signed.bin` string public_key = 1; - // Signature of the related `BuildProvenance`. In JSON, this is base-64 - // encoded. + // Required. Signature of the related `BuildProvenance`. In JSON, this is + // base-64 encoded. bytes signature = 2; - // An ID for the key used to sign. This could be either an Id for the key - // stored in `public_key` (such as the Id or fingerprint for a PGP key, or the + // An ID for the key used to sign. This could be either an ID for the key + // stored in `public_key` (such as the ID or fingerprint for a PGP key, or the // CN for a cert), or a reference to an external key (such as a reference to a // key in Cloud Key Management Service). string key_id = 3; - // Public key formats + // Public key formats. enum KeyType { // `KeyType` is not set. KEY_TYPE_UNSPECIFIED = 0; @@ -72,17 +72,17 @@ message BuildSignature { } // The type of the key, either stored in `public_key` or referenced in - // `key_id` + // `key_id`. KeyType key_type = 4; } // Details of a build occurrence. message Details { - // The actual provenance for the build. + // Required. The actual provenance for the build. grafeas.v1beta1.provenance.BuildProvenance provenance = 1; // Serialized JSON representation of the provenance, used in generating the - // `BuildSignature` in the corresponding Result. After verifying the + // build signature in the corresponding build note. After verifying the // signature, `provenance_bytes` can be unmarshalled and compared to the // provenance to confirm that it is unchanged. A base64-encoded string // representation of the provenance bytes is used for the signature in order diff --git a/google/devtools/containeranalysis/v1beta1/common/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/common/BUILD.bazel index 55758bb99..8654a536d 100644 --- a/google/devtools/containeranalysis/v1beta1/common/BUILD.bazel +++ b/google/devtools/containeranalysis/v1beta1/common/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -26,7 +28,6 @@ load( "@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", ) java_proto_library( @@ -40,12 +41,6 @@ java_grpc_library( deps = [":common_java_proto"], ) -java_resource_name_proto_library( - name = "common_resource_name_java_proto", - gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml", - deps = [":common_proto"], -) - ############################################################################## # Go ############################################################################## diff --git a/google/devtools/containeranalysis/v1beta1/common/common.proto b/google/devtools/containeranalysis/v1beta1/common/common.proto index a8a2ddad2..bb97a3175 100644 --- a/google/devtools/containeranalysis/v1beta1/common/common.proto +++ b/google/devtools/containeranalysis/v1beta1/common/common.proto @@ -48,3 +48,54 @@ message RelatedUrl { // Label to describe usage of the URL. string label = 2; } + +// Verifiers (e.g. Kritis implementations) MUST verify signatures +// with respect to the trust anchors defined in policy (e.g. a Kritis policy). +// Typically this means that the verifier has been configured with a map from +// `public_key_id` to public key material (and any required parameters, e.g. +// signing algorithm). +// +// In particular, verification implementations MUST NOT treat the signature +// `public_key_id` as anything more than a key lookup hint. The `public_key_id` +// DOES NOT validate or authenticate a public key; it only provides a mechanism +// for quickly selecting a public key ALREADY CONFIGURED on the verifier through +// a trusted channel. Verification implementations MUST reject signatures in any +// of the following circumstances: +// * The `public_key_id` is not recognized by the verifier. +// * The public key that `public_key_id` refers to does not verify the +// signature with respect to the payload. +// +// The `signature` contents SHOULD NOT be "attached" (where the payload is +// included with the serialized `signature` bytes). Verifiers MUST ignore any +// "attached" payload and only verify signatures with respect to explicitly +// provided payload (e.g. a `payload` field on the proto message that holds +// this Signature, or the canonical serialization of the proto message that +// holds this signature). +message Signature { + // The content of the signature, an opaque bytestring. + // The payload that this signature verifies MUST be unambiguously provided + // with the Signature during verification. A wrapper message might provide + // the payload explicitly. Alternatively, a message might have a canonical + // serialization that can always be unambiguously computed to derive the + // payload. + bytes signature = 1; + + // The identifier for the public key that verifies this signature. + // * The `public_key_id` is required. + // * The `public_key_id` MUST be an RFC3986 conformant URI. + // * When possible, the `public_key_id` SHOULD be an immutable reference, + // such as a cryptographic digest. + // + // Examples of valid `public_key_id`s: + // + // OpenPGP V4 public key fingerprint: + // * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" + // See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more + // details on this scheme. + // + // RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER + // serialization): + // * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" + // * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" + string public_key_id = 2; +} diff --git a/google/devtools/containeranalysis/v1beta1/containeranalysis.proto b/google/devtools/containeranalysis/v1beta1/containeranalysis.proto index b15153384..59f3ecd94 100644 --- a/google/devtools/containeranalysis/v1beta1/containeranalysis.proto +++ b/google/devtools/containeranalysis/v1beta1/containeranalysis.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.devtools.containeranalysis.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/protobuf/timestamp.proto"; @@ -40,6 +44,9 @@ option objc_class_prefix = "GCA"; // there would be one note for the vulnerability and an occurrence for each // image with the vulnerability referring to that note. service ContainerAnalysisV1Beta1 { + option (google.api.default_host) = "containeranalysis.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Sets the access control policy on the specified note or occurrence. // Requires `containeranalysis.notes.setIamPolicy` or // `containeranalysis.occurrences.setIamPolicy` permission if the resource is @@ -48,8 +55,7 @@ service ContainerAnalysisV1Beta1 { // The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for // notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for // occurrences. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1beta1/{resource=projects/*/notes/*}:setIamPolicy" body: "*" @@ -58,6 +64,7 @@ service ContainerAnalysisV1Beta1 { body: "*" } }; + option (google.api.method_signature) = "resource,policy"; } // Gets the access control policy for a note or an occurrence resource. @@ -68,8 +75,7 @@ service ContainerAnalysisV1Beta1 { // The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for // notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for // occurrences. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1beta1/{resource=projects/*/notes/*}:getIamPolicy" body: "*" @@ -78,6 +84,7 @@ service ContainerAnalysisV1Beta1 { body: "*" } }; + option (google.api.method_signature) = "resource"; } // Returns the permissions that a caller has on the specified note or @@ -87,8 +94,7 @@ service ContainerAnalysisV1Beta1 { // The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for // notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for // occurrences. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1beta1/{resource=projects/*/notes/*}:testIamPermissions" body: "*" @@ -97,6 +103,7 @@ service ContainerAnalysisV1Beta1 { body: "*" } }; + option (google.api.method_signature) = "resource,permissions"; } // Gets the specified scan configuration. @@ -104,14 +111,15 @@ service ContainerAnalysisV1Beta1 { option (google.api.http) = { get: "/v1beta1/{name=projects/*/scanConfigs/*}" }; + option (google.api.method_signature) = "name"; } // Lists scan configurations for the specified project. - rpc ListScanConfigs(ListScanConfigsRequest) - returns (ListScanConfigsResponse) { + rpc ListScanConfigs(ListScanConfigsRequest) returns (ListScanConfigsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*}/scanConfigs" }; + option (google.api.method_signature) = "parent,filter"; } // Updates the specified scan configuration. @@ -120,6 +128,7 @@ service ContainerAnalysisV1Beta1 { put: "/v1beta1/{name=projects/*/scanConfigs/*}" body: "scan_config" }; + option (google.api.method_signature) = "name,scan_config"; } } @@ -127,6 +136,11 @@ service ContainerAnalysisV1Beta1 { // particular type of analysis being run. For example, it can configure whether // vulnerability scanning is being done on Docker images or not. message ScanConfig { + option (google.api.resource) = { + type: "containeranalysis.googleapis.com/ScanConfig" + pattern: "projects/{project}/scanConfigs/{scan_config}" + }; + // Output only. The name of the scan configuration in the form of // `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. string name = 1; @@ -147,19 +161,29 @@ message ScanConfig { // Request to get a scan configuration. message GetScanConfigRequest { - // The name of the scan configuration in the form of + // Required. The name of the scan configuration in the form of // `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "containeranalysis.googleapis.com/ScanConfig" + } + ]; } // Request to list scan configurations. message ListScanConfigsRequest { - // The name of the project to list scan configurations for in the form of + // Required. The name of the project to list scan configurations for in the form of // `projects/[PROJECT_ID]`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; - // The filter expression. - string filter = 2; + // Required. The filter expression. + string filter = 2 [(google.api.field_behavior) = REQUIRED]; // The number of scan configs to return in the list. int32 page_size = 3; @@ -181,10 +205,15 @@ message ListScanConfigsResponse { // A request to update a scan configuration. message UpdateScanConfigRequest { - // The name of the scan configuration in the form of + // Required. The name of the scan configuration in the form of // `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. - string name = 1; - - // The updated scan configuration. - ScanConfig scan_config = 2; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "containeranalysis.googleapis.com/ScanConfig" + } + ]; + + // Required. The updated scan configuration. + ScanConfig scan_config = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/devtools/containeranalysis/v1beta1/containeranalysis_grpc_service_config.json b/google/devtools/containeranalysis/v1beta1/containeranalysis_grpc_service_config.json new file mode 100755 index 000000000..fb50770fc --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/containeranalysis_grpc_service_config.json @@ -0,0 +1,128 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1", + "method": "SetIamPolicy" + }, + { + "service": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1", + "method": "GetIamPolicy" + }, + { + "service": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1", + "method": "TestIamPermissions" + }, + { + "service": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1", + "method": "UpdateScanConfig" + } + ], + "timeout": "30s" + }, + { + "name": [ + { + "service": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1", + "method": "GetScanConfig" + }, + { + "service": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1", + "method": "ListScanConfigs" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "GetOccurrence" + }, + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "ListOccurrences" + }, + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "DeleteOccurrence" + }, + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "GetOccurrenceNote" + }, + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "GetNote" + }, + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "ListNotes" + }, + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "DeleteNote" + }, + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "ListNoteOccurrences" + }, + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "GetVulnerabilityOccurrencesSummary" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "CreateOccurrence" + }, + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "BatchCreateOccurrences" + }, + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "UpdateOccurrence" + }, + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "CreateNote" + }, + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "BatchCreateNotes" + }, + { + "service": "grafeas.v1beta1.GrafeasV1Beta1", + "method": "UpdateNote" + } + ], + "timeout": "30s" + } + ] +} diff --git a/google/devtools/containeranalysis/v1beta1/containeranalysis_v1beta1.yaml b/google/devtools/containeranalysis/v1beta1/containeranalysis_v1beta1.yaml new file mode 100644 index 000000000..d07177f86 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/containeranalysis_v1beta1.yaml @@ -0,0 +1,33 @@ +type: google.api.Service +config_version: 3 +name: containeranalysis.googleapis.com +title: Container Analysis API + +apis: +- name: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1 + +documentation: + summary: |- + An implementation of the Grafeas API, which stores, and enables querying + and retrieval of critical metadata about all of your software artifacts. + overview: |- + The Container Analysis API allows you to store and retrieve metadata for a + container resource. + +backend: + rules: + - selector: 'google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.*' + deadline: 30.0 + - selector: 'google.longrunning.Operations.*' + deadline: 30.0 + +authentication: + rules: + - selector: 'google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/devtools/containeranalysis/v1beta1/cvss/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/cvss/BUILD.bazel new file mode 100644 index 000000000..4422f237e --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/cvss/BUILD.bazel @@ -0,0 +1,55 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "cvss_proto", + srcs = [ + "cvss.proto", + ], + deps = [], +) + +proto_library_with_info( + name = "cvss_proto_with_info", + deps = [":cvss_proto"], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "cvss_java_proto", + deps = [":cvss_proto"], +) + +java_grpc_library( + name = "cvss_java_grpc", + srcs = [":cvss_proto"], + deps = [":cvss_java_proto"], +) + +############################################################################## +# Go +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "cvss_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/cvss", + protos = [":cvss_proto"], + deps = [], +) diff --git a/google/devtools/containeranalysis/v1beta1/cvss/cvss.proto b/google/devtools/containeranalysis/v1beta1/cvss/cvss.proto new file mode 100644 index 000000000..348444161 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/cvss/cvss.proto @@ -0,0 +1,85 @@ +// Copyright 2018 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1beta1.vulnerability; + +option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/cvss;cvss"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1beta1.vulnerability"; +option objc_class_prefix = "GRA"; + +// Common Vulnerability Scoring System version 3. +// For details, see https://www.first.org/cvss/specification-document +message CVSSv3 { + // The base score is a function of the base metric scores. + float base_score = 1; + + float exploitability_score = 2; + + float impact_score = 3; + + // Base Metrics + // Represents the intrinsic characteristics of a vulnerability that are + // constant over time and across user environments. + AttackVector attack_vector = 5; + AttackComplexity attack_complexity = 6; + PrivilegesRequired privileges_required = 7; + UserInteraction user_interaction = 8; + Scope scope = 9; + Impact confidentiality_impact = 10; + Impact integrity_impact = 11; + Impact availability_impact = 12; + + enum AttackVector { + ATTACK_VECTOR_UNSPECIFIED = 0; + ATTACK_VECTOR_NETWORK = 1; + ATTACK_VECTOR_ADJACENT = 2; + ATTACK_VECTOR_LOCAL = 3; + ATTACK_VECTOR_PHYSICAL = 4; + } + + enum AttackComplexity { + ATTACK_COMPLEXITY_UNSPECIFIED = 0; + ATTACK_COMPLEXITY_LOW = 1; + ATTACK_COMPLEXITY_HIGH = 2; + } + + enum PrivilegesRequired { + PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + PRIVILEGES_REQUIRED_NONE = 1; + PRIVILEGES_REQUIRED_LOW = 2; + PRIVILEGES_REQUIRED_HIGH = 3; + } + + enum UserInteraction { + USER_INTERACTION_UNSPECIFIED = 0; + USER_INTERACTION_NONE = 1; + USER_INTERACTION_REQUIRED = 2; + } + + enum Scope { + SCOPE_UNSPECIFIED = 0; + SCOPE_UNCHANGED = 1; + SCOPE_CHANGED = 2; + } + + enum Impact { + IMPACT_UNSPECIFIED = 0; + IMPACT_HIGH = 1; + IMPACT_LOW = 2; + IMPACT_NONE = 3; + } +} diff --git a/google/devtools/containeranalysis/v1beta1/deployment/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/deployment/BUILD.bazel index 670c8c763..921d48921 100644 --- a/google/devtools/containeranalysis/v1beta1/deployment/BUILD.bazel +++ b/google/devtools/containeranalysis/v1beta1/deployment/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -27,7 +29,6 @@ proto_library_with_info( load( "@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", - "java_resource_name_proto_library", ) java_proto_library( @@ -41,12 +42,6 @@ java_grpc_library( deps = [":deployment_java_proto"], ) -java_resource_name_proto_library( - name = "deployment_resource_name_java_proto", - gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml", - deps = [":deployment_proto"], -) - ############################################################################## # Go ############################################################################## diff --git a/google/devtools/containeranalysis/v1beta1/deployment/deployment.proto b/google/devtools/containeranalysis/v1beta1/deployment/deployment.proto index 96a81aeb3..7bc8dc897 100644 --- a/google/devtools/containeranalysis/v1beta1/deployment/deployment.proto +++ b/google/devtools/containeranalysis/v1beta1/deployment/deployment.proto @@ -25,13 +25,13 @@ option objc_class_prefix = "GRA"; // An artifact that can be deployed in some runtime. message Deployable { - // Resource URI for the artifact being deployed. + // Required. Resource URI for the artifact being deployed. repeated string resource_uri = 1; } // Details of a deployment occurrence. message Details { - // Deployment history for the resource. + // Required. Deployment history for the resource. Deployment deployment = 1; } @@ -40,7 +40,7 @@ message Deployment { // Identity of the user that triggered this deployment. string user_email = 1; - // Beginning of the lifetime of this deployment. + // Required. Beginning of the lifetime of this deployment. google.protobuf.Timestamp deploy_time = 2; // End of the lifetime of this deployment. diff --git a/google/devtools/containeranalysis/v1beta1/discovery/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/discovery/BUILD.bazel index dfe0bae7c..58a4b6cb5 100644 --- a/google/devtools/containeranalysis/v1beta1/discovery/BUILD.bazel +++ b/google/devtools/containeranalysis/v1beta1/discovery/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -29,7 +31,6 @@ proto_library_with_info( load( "@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", - "java_resource_name_proto_library", ) java_proto_library( @@ -43,12 +44,6 @@ java_grpc_library( deps = [":discovery_java_proto"], ) -java_resource_name_proto_library( - name = "discovery_resource_name_java_proto", - gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml", - deps = [":discovery_proto"], -) - ############################################################################## # Go ############################################################################## diff --git a/google/devtools/containeranalysis/v1beta1/discovery/discovery.proto b/google/devtools/containeranalysis/v1beta1/discovery/discovery.proto index 4ed5aeba6..edfa043bc 100644 --- a/google/devtools/containeranalysis/v1beta1/discovery/discovery.proto +++ b/google/devtools/containeranalysis/v1beta1/discovery/discovery.proto @@ -29,13 +29,14 @@ option objc_class_prefix = "GRA"; // exists in a provider's project. A `Discovery` occurrence is created in a // consumer's project at the start of analysis. message Discovery { - // The kind of analysis that is handled by this discovery. + // Required. Immutable. The kind of analysis that is handled by this + // discovery. grafeas.v1beta1.NoteKind analysis_kind = 1; } // Details of a discovery occurrence. message Details { - // Analysis status for the discovered resource. + // Required. Analysis status for the discovered resource. Discovered discovered = 1; } diff --git a/google/devtools/containeranalysis/v1beta1/grafeas/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/grafeas/BUILD.bazel index 41e0d234f..dccc9ec49 100644 --- a/google/devtools/containeranalysis/v1beta1/grafeas/BUILD.bazel +++ b/google/devtools/containeranalysis/v1beta1/grafeas/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -13,6 +15,7 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", "//google/devtools/containeranalysis/v1beta1/attestation:attestation_proto", "//google/devtools/containeranalysis/v1beta1/build:build_proto", "//google/devtools/containeranalysis/v1beta1/common:common_proto", @@ -41,7 +44,6 @@ load( "@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", ) java_proto_library( @@ -55,12 +57,6 @@ java_grpc_library( deps = [":grafeas_java_proto"], ) -java_resource_name_proto_library( - name = "grafeas_resource_name_java_proto", - gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml", - deps = [":grafeas_proto"], -) - ############################################################################## # Go ############################################################################## diff --git a/google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto b/google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto index 9c2ac8b0b..8952164eb 100644 --- a/google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto +++ b/google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package grafeas.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; import "google/devtools/containeranalysis/v1beta1/attestation/attestation.proto"; import "google/devtools/containeranalysis/v1beta1/build/build.proto"; import "google/devtools/containeranalysis/v1beta1/common/common.proto"; @@ -50,6 +51,9 @@ option objc_class_prefix = "GRA"; // there would be one note for the vulnerability and an occurrence for each // image with the vulnerability referring to that note. service GrafeasV1Beta1 { + option (google.api.default_host) = "containeranalysis.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Gets the specified occurrence. rpc GetOccurrence(GetOccurrenceRequest) returns (Occurrence) { option (google.api.http) = { @@ -184,8 +188,8 @@ message Occurrence { Resource resource = 2; // Required. Immutable. The analysis note associated with this occurrence, in - // the form of `projects[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used - // as a filter in list requests. + // the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be + // used as a filter in list requests. string note_name = 3; // Output only. This explicitly denotes which of the occurrence details are @@ -229,7 +233,7 @@ message Resource { // The name of the resource. For example, the name of a Docker image - // "Debian". string name = 1; - // The unique URI of the resource. For example, + // Required. The unique URI of the resource. For example, // `https://gcr.io/project/image@sha256:foo` for a Docker image. string uri = 2; // The hash of the resource content. For example, the Docker digest. @@ -487,7 +491,7 @@ message VulnerabilityOccurrencesSummary { // A listing by resource of the number of fixable and total vulnerabilities. repeated FixableTotalByDigest counts = 1; - // Per resource and severity counts of fixable and total vulnerabilites. + // Per resource and severity counts of fixable and total vulnerabilities. message FixableTotalByDigest { // The affected resource. Resource resource = 1; diff --git a/google/devtools/containeranalysis/v1beta1/image/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/image/BUILD.bazel index 99737d9dd..7fbc648f8 100644 --- a/google/devtools/containeranalysis/v1beta1/image/BUILD.bazel +++ b/google/devtools/containeranalysis/v1beta1/image/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -25,7 +27,6 @@ proto_library_with_info( load( "@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", - "java_resource_name_proto_library", ) java_proto_library( @@ -39,12 +40,6 @@ java_grpc_library( deps = [":image_java_proto"], ) -java_resource_name_proto_library( - name = "image_resource_name_java_proto", - gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml", - deps = [":image_proto"], -) - ############################################################################## # Go ############################################################################## diff --git a/google/devtools/containeranalysis/v1beta1/image/image.proto b/google/devtools/containeranalysis/v1beta1/image/image.proto index 01f5305a5..91ee33e05 100644 --- a/google/devtools/containeranalysis/v1beta1/image/image.proto +++ b/google/devtools/containeranalysis/v1beta1/image/image.proto @@ -28,59 +28,59 @@ message Layer { // Default value for unsupported/missing directive. DIRECTIVE_UNSPECIFIED = 0; - // https://docs.docker.com/reference/builder/#maintainer + // https://docs.docker.com/engine/reference/builder/ MAINTAINER = 1; - // https://docs.docker.com/reference/builder/#run + // https://docs.docker.com/engine/reference/builder/ RUN = 2; - // https://docs.docker.com/reference/builder/#cmd + // https://docs.docker.com/engine/reference/builder/ CMD = 3; - // https://docs.docker.com/reference/builder/#label + // https://docs.docker.com/engine/reference/builder/ LABEL = 4; - // https://docs.docker.com/reference/builder/#expose + // https://docs.docker.com/engine/reference/builder/ EXPOSE = 5; - // https://docs.docker.com/reference/builder/#env + // https://docs.docker.com/engine/reference/builder/ ENV = 6; - // https://docs.docker.com/reference/builder/#add + // https://docs.docker.com/engine/reference/builder/ ADD = 7; - // https://docs.docker.com/reference/builder/#copy + // https://docs.docker.com/engine/reference/builder/ COPY = 8; - // https://docs.docker.com/reference/builder/#entrypoint + // https://docs.docker.com/engine/reference/builder/ ENTRYPOINT = 9; - // https://docs.docker.com/reference/builder/#volume + // https://docs.docker.com/engine/reference/builder/ VOLUME = 10; - // https://docs.docker.com/reference/builder/#user + // https://docs.docker.com/engine/reference/builder/ USER = 11; - // https://docs.docker.com/reference/builder/#workdir + // https://docs.docker.com/engine/reference/builder/ WORKDIR = 12; - // https://docs.docker.com/reference/builder/#arg + // https://docs.docker.com/engine/reference/builder/ ARG = 13; - // https://docs.docker.com/reference/builder/#onbuild + // https://docs.docker.com/engine/reference/builder/ ONBUILD = 14; - // https://docs.docker.com/reference/builder/#stopsignal + // https://docs.docker.com/engine/reference/builder/ STOPSIGNAL = 15; - // https://docs.docker.com/reference/builder/#healthcheck + // https://docs.docker.com/engine/reference/builder/ HEALTHCHECK = 16; - // https://docs.docker.com/reference/builder/#shell + // https://docs.docker.com/engine/reference/builder/ SHELL = 17; } - // The recovered Dockerfile directive used to construct this layer. + // Required. The recovered Dockerfile directive used to construct this layer. Directive directive = 1; // The recovered arguments to the Dockerfile directive. @@ -89,10 +89,11 @@ message Layer { // A set of properties that uniquely identify a given Docker image. message Fingerprint { - // The layer-id of the final layer in the Docker image's v1 representation. + // Required. The layer ID of the final layer in the Docker image's v1 + // representation. string v1_name = 1; - // The ordered list of v2 blobs that represent a given image. + // Required. The ordered list of v2 blobs that represent a given image. repeated string v2_blob = 2; // Output only. The name of the image's v2 blobs computed via: @@ -108,17 +109,17 @@ message Fingerprint { // FROM // Or an equivalent reference, e.g. a tag of the resource_url. message Basis { - // The resource_url for the resource representing the basis of - // associated occurrence images. + // Required. Immutable. The resource_url for the resource representing the + // basis of associated occurrence images. string resource_url = 1; - // The fingerprint of the base image. + // Required. Immutable. The fingerprint of the base image. Fingerprint fingerprint = 2; } // Details of an image occurrence. message Details { - // The child image derived from the base image. + // Required. Immutable. The child image derived from the base image. Derived derived_image = 1; } @@ -126,7 +127,7 @@ message Details { // relationship. This image would be produced from a Dockerfile with FROM // . message Derived { - // The fingerprint of the derived image. + // Required. The fingerprint of the derived image. Fingerprint fingerprint = 1; // Output only. The number of layers by which this image differs from the diff --git a/google/devtools/containeranalysis/v1beta1/package/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/package/BUILD.bazel index e3e3e0013..93d7e02f9 100644 --- a/google/devtools/containeranalysis/v1beta1/package/BUILD.bazel +++ b/google/devtools/containeranalysis/v1beta1/package/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -26,7 +28,6 @@ load( "@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", ) java_proto_library( @@ -40,12 +41,6 @@ java_grpc_library( deps = [":package_java_proto"], ) -java_resource_name_proto_library( - name = "package_resource_name_java_proto", - gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml", - deps = [":package_proto"], -) - ############################################################################## # Go ############################################################################## diff --git a/google/devtools/containeranalysis/v1beta1/package/package.proto b/google/devtools/containeranalysis/v1beta1/package/package.proto index 07031d500..88f288d4f 100644 --- a/google/devtools/containeranalysis/v1beta1/package/package.proto +++ b/google/devtools/containeranalysis/v1beta1/package/package.proto @@ -34,7 +34,7 @@ enum Architecture { // This represents a particular channel of distribution for a given package. // E.g., Debian's jessie-backports dpkg mirror. message Distribution { - // The cpe_uri in [cpe format](https://cpe.mitre.org/specification/) + // Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) // denoting the package manager version distributing a package. string cpe_uri = 1; @@ -42,8 +42,7 @@ message Distribution { // built. Architecture architecture = 2; - // The latest available version of this package in this distribution - // channel. + // The latest available version of this package in this distribution channel. Version latest_version = 3; // A freeform string denoting the maintainer of this package. @@ -57,9 +56,9 @@ message Distribution { } // An occurrence of a particular package installation found within a system's -// filesystem. E.g., glibc was found in /var/lib/dpkg/status. +// filesystem. E.g., glibc was found in `/var/lib/dpkg/status`. message Location { - // The cpe_uri in [cpe format](https://cpe.mitre.org/specification/) + // Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/) // denoting the package manager version distributing a package. string cpe_uri = 1; @@ -74,7 +73,7 @@ message Location { // channels. E.g., glibc (aka libc6) is distributed by many, at various // versions. message Package { - // The name of the package. + // Required. Immutable. The name of the package. string name = 1; // The various channels by which a package is distributed. @@ -83,7 +82,7 @@ message Package { // Details of a package occurrence. message Details { - // Where the package was installed. + // Required. Where the package was installed. Installation installation = 1; } @@ -93,7 +92,7 @@ message Installation { // Output only. The name of the installed package. string name = 1; - // All of the places within the filesystem versions of this package + // Required. All of the places within the filesystem versions of this package // have been found. repeated Location location = 2; } @@ -102,8 +101,11 @@ message Installation { message Version { // Used to correct mistakes in the version numbering scheme. int32 epoch = 1; - // The main part of the version name. + + // Required only when version kind is NORMAL. The main part of the version + // name. string name = 2; + // The iteration of the package build from the above version. string revision = 3; @@ -111,17 +113,15 @@ message Version { enum VersionKind { // Unknown. VERSION_KIND_UNSPECIFIED = 0; - // A standard package version, defined by the other fields. + // A standard package version. NORMAL = 1; - // A special version representing negative infinity, other fields are - // ignored. + // A special version representing negative infinity. MINIMUM = 2; - // A special version representing positive infinity, other fields are - // ignored. + // A special version representing positive infinity. MAXIMUM = 3; }; - // Distinguish between sentinel MIN/MAX versions and normal versions. If - // kind is not NORMAL, then the other fields are ignored. + // Required. Distinguishes between sentinel MIN/MAX versions and normal + // versions. VersionKind kind = 4; } diff --git a/google/devtools/containeranalysis/v1beta1/provenance/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/provenance/BUILD.bazel index a4fbdff49..acb9f6946 100644 --- a/google/devtools/containeranalysis/v1beta1/provenance/BUILD.bazel +++ b/google/devtools/containeranalysis/v1beta1/provenance/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -29,7 +31,6 @@ load( "@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", ) java_proto_library( @@ -43,12 +44,6 @@ java_grpc_library( deps = [":provenance_java_proto"], ) -java_resource_name_proto_library( - name = "provenance_resource_name_java_proto", - gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml", - deps = [":provenance_proto"], -) - ############################################################################## # Go ############################################################################## diff --git a/google/devtools/containeranalysis/v1beta1/provenance/provenance.proto b/google/devtools/containeranalysis/v1beta1/provenance/provenance.proto index 3d3342845..761877cdb 100644 --- a/google/devtools/containeranalysis/v1beta1/provenance/provenance.proto +++ b/google/devtools/containeranalysis/v1beta1/provenance/provenance.proto @@ -27,7 +27,7 @@ option objc_class_prefix = "GRA"; // Provenance of a build. Contains all information needed to verify the full // details about the build from source to completion. message BuildProvenance { - // Unique identifier of the build. + // Required. Unique identifier of the build. string id = 1; // ID of the project. @@ -98,16 +98,16 @@ message Source { repeated grafeas.v1beta1.source.SourceContext additional_contexts = 4; } -// Container message for hashes of byte content of files, used in Source +// Container message for hashes of byte content of files, used in source // messages to verify integrity of source input to the build. message FileHashes { - // Collection of file hashes. + // Required. Collection of file hashes. repeated Hash file_hash = 1; } // Container message for hash values. message Hash { - // Specifies the hash algorithm, if any. + // Specifies the hash algorithm. enum HashType { // Unknown. HASH_TYPE_UNSPECIFIED = 0; @@ -115,16 +115,16 @@ message Hash { SHA256 = 1; } - // The type of hash that was performed. + // Required. The type of hash that was performed. HashType type = 1; - // The hash value. + // Required. The hash value. bytes value = 2; } // Command describes a step performed as part of the build pipeline. message Command { - // Name of the command, as presented on the command line, or if the command is - // packaged as a Docker container, as presented to `docker pull`. + // Required. Name of the command, as presented on the command line, or if the + // command is packaged as a Docker container, as presented to `docker pull`. string name = 1; // Environment variables set before running this command. diff --git a/google/devtools/containeranalysis/v1beta1/source/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/source/BUILD.bazel index 3e0b9c554..4369b3ce9 100644 --- a/google/devtools/containeranalysis/v1beta1/source/BUILD.bazel +++ b/google/devtools/containeranalysis/v1beta1/source/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -26,7 +28,6 @@ load( "@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", ) java_proto_library( @@ -40,12 +41,6 @@ java_grpc_library( deps = [":source_java_proto"], ) -java_resource_name_proto_library( - name = "source_resource_name_java_proto", - gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml", - deps = [":source_proto"], -) - ############################################################################## # Go ############################################################################## diff --git a/google/devtools/containeranalysis/v1beta1/vulnerability/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/vulnerability/BUILD.bazel index dcb12c536..a72146480 100644 --- a/google/devtools/containeranalysis/v1beta1/vulnerability/BUILD.bazel +++ b/google/devtools/containeranalysis/v1beta1/vulnerability/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -13,7 +15,9 @@ proto_library( ], deps = [ "//google/devtools/containeranalysis/v1beta1/common:common_proto", + "//google/devtools/containeranalysis/v1beta1/cvss:cvss_proto", "//google/devtools/containeranalysis/v1beta1/package:package_proto", + "@com_google_protobuf//:timestamp_proto", ], ) @@ -29,7 +33,6 @@ load( "@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", ) java_proto_library( @@ -43,12 +46,6 @@ java_grpc_library( deps = [":vulnerability_java_proto"], ) -java_resource_name_proto_library( - name = "vulnerability_resource_name_java_proto", - gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml", - deps = [":vulnerability_proto"], -) - ############################################################################## # Go ############################################################################## @@ -61,6 +58,7 @@ go_proto_library( protos = [":vulnerability_proto"], deps = [ "//google/devtools/containeranalysis/v1beta1/common:common_go_proto", + "//google/devtools/containeranalysis/v1beta1/cvss:cvss_go_proto", "//google/devtools/containeranalysis/v1beta1/package:package_go_proto", ], ) diff --git a/google/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.proto b/google/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.proto index aef35c4e2..d83c7e4c5 100644 --- a/google/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.proto +++ b/google/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.proto @@ -16,7 +16,9 @@ syntax = "proto3"; package grafeas.v1beta1.vulnerability; +import "google/protobuf/timestamp.proto"; import "google/devtools/containeranalysis/v1beta1/common/common.proto"; +import "google/devtools/containeranalysis/v1beta1/cvss/cvss.proto"; import "google/devtools/containeranalysis/v1beta1/package/package.proto"; option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/vulnerability;vulnerability"; @@ -40,7 +42,7 @@ enum Severity { CRITICAL = 5; } -// Vulnerability provides metadata about a security vulnerability. +// Vulnerability provides metadata about a security vulnerability in a Note. message Vulnerability { // The CVSS score for this vulnerability. float cvss_score = 1; @@ -53,16 +55,17 @@ message Vulnerability { // vulnerability has manifested in. repeated Detail details = 3; - // Identifies all occurrences of this vulnerability in the package for a + // Identifies all appearances of this vulnerability in the package for a // specific distro/location. For example: glibc in // cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2 message Detail { - // The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) in - // which the vulnerability manifests. Examples include distro or storage - // location for vulnerable jar. + // Required. The CPE URI in + // [cpe format](https://cpe.mitre.org/specification/) in which the + // vulnerability manifests. Examples include distro or storage location for + // vulnerable jar. string cpe_uri = 1; - // The name of the package where the vulnerability was found. + // Required. The name of the package where the vulnerability was found. string package = 2; // The min version of the package in which the vulnerability exists. @@ -87,10 +90,59 @@ message Vulnerability { // Whether this detail is obsolete. Occurrences are expected not to point to // obsolete details. bool is_obsolete = 9; + + // The time this information was last changed at the source. This is an + // upstream timestamp from the underlying information source - e.g. Ubuntu + // security tracker. + google.protobuf.Timestamp source_update_time = 10; + } + + // The full description of the CVSSv3. + CVSSv3 cvss_v3 = 4; + + // Windows details get their own format because the information format and + // model don't match a normal detail. Specifically Windows updates are done as + // patches, thus Windows vulnerabilities really are a missing package, rather + // than a package being at an incorrect version. + repeated WindowsDetail windows_details = 5; + + message WindowsDetail { + // Required. The CPE URI in + // [cpe format](https://cpe.mitre.org/specification/) in which the + // vulnerability manifests. Examples include distro or storage location for + // vulnerable jar. + string cpe_uri = 1; + + // Required. The name of the vulnerability. + string name = 2; + + // The description of the vulnerability. + string description = 3; + + // Required. The names of the KBs which have hotfixes to mitigate this + // vulnerability. Note that there may be multiple hotfixes (and thus + // multiple KBs) that mitigate a given vulnerability. Currently any listed + // kb's presence is considered a fix. + repeated KnowledgeBase fixing_kbs = 4; + + message KnowledgeBase { + // The KB name (generally of the form KB[0-9]+ i.e. KB123456). + string name = 1; + // A link to the KB in the Windows update catalog - + // https://www.catalog.update.microsoft.com/ + string url = 2; + } } + + // The time this information was last changed at the source. This is an + // upstream timestamp from the underlying information source - e.g. Ubuntu + // security tracker. + google.protobuf.Timestamp source_update_time = 6; + + // Next free ID is 7. } -// Details of a vulnerability occurrence. +// Details of a vulnerability Occurrence. message Details { // The type of package; whether native or non native(ruby gems, node.js // packages etc) @@ -104,8 +156,8 @@ message Details { // severity. float cvss_score = 3; - // The set of affected locations and their fixes (if available) within the - // associated resource. + // Required. The set of affected locations and their fixes (if available) + // within the associated resource. repeated PackageIssue package_issue = 4; // Output only. A one sentence description of this vulnerability. @@ -116,30 +168,36 @@ message Details { // Output only. URLs related to this vulnerability. repeated grafeas.v1beta1.RelatedUrl related_urls = 7; + + // The distro assigned severity for this vulnerability when it is + // available, and note provider assigned severity when distro has not yet + // assigned a severity for this vulnerability. + Severity effective_severity = 8; } // This message wraps a location affected by a vulnerability and its // associated fix (if one is available). message PackageIssue { - // The location of the vulnerability. + // Required. The location of the vulnerability. VulnerabilityLocation affected_location = 1; // The location of the available fix for vulnerability. VulnerabilityLocation fixed_location = 2; + // Deprecated, use Details.effective_severity instead // The severity (e.g., distro assigned severity) for this vulnerability. string severity_name = 3; } // The location of the vulnerability. message VulnerabilityLocation { - // The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) + // Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) // format. Examples include distro or storage location for vulnerable jar. string cpe_uri = 1; - // The package being described. + // Required. The package being described. string package = 2; - // The version of the package being described. + // Required. The version of the package being described. grafeas.v1beta1.package.Version version = 3; } diff --git a/google/devtools/remoteexecution/v1test/remote_execution.proto b/google/devtools/remoteexecution/v1test/remote_execution.proto deleted file mode 100644 index 578040fbd..000000000 --- a/google/devtools/remoteexecution/v1test/remote_execution.proto +++ /dev/null @@ -1,1044 +0,0 @@ -// Copyright 2017 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.remoteexecution.v1test; - -import "google/api/annotations.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/duration.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.RemoteExecution.V1Test"; -option go_package = "google.golang.org/genproto/googleapis/devtools/remoteexecution/v1test;remoteexecution"; -option java_multiple_files = true; -option java_outer_classname = "RemoteExecutionProto"; -option java_package = "com.google.devtools.remoteexecution.v1test"; -option objc_class_prefix = "REX"; - -// The Remote Execution API is used to execute an -// [Action][google.devtools.remoteexecution.v1test.Action] on the remote -// workers. -// -// As with other services in the Remote Execution API, any call may return an -// error with a [RetryInfo][google.rpc.RetryInfo] error detail providing -// information about when the client should retry the request; clients SHOULD -// respect the information provided. -service Execution { - // Execute an action remotely. - // - // In order to execute an action, the client must first upload all of the - // inputs, as well as the - // [Command][google.devtools.remoteexecution.v1test.Command] to run, into the - // [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage]. - // It then calls `Execute` with an - // [Action][google.devtools.remoteexecution.v1test.Action] referring to them. - // The server will run the action and eventually return the result. - // - // The input `Action`'s fields MUST meet the various canonicalization - // requirements specified in the documentation for their types so that it has - // the same digest as other logically equivalent `Action`s. The server MAY - // enforce the requirements and return errors if a non-canonical input is - // received. It MAY also proceed without verifying some or all of the - // requirements, such as for performance reasons. If the server does not - // verify the requirement, then it will treat the `Action` as distinct from - // another logically equivalent action if they hash differently. - // - // Returns a [google.longrunning.Operation][google.longrunning.Operation] - // describing the resulting execution, with eventual `response` - // [ExecuteResponse][google.devtools.remoteexecution.v1test.ExecuteResponse]. - // The `metadata` on the operation is of type - // [ExecuteOperationMetadata][google.devtools.remoteexecution.v1test.ExecuteOperationMetadata]. - // - // To query the operation, you can use the - // [Operations API][google.longrunning.Operations.GetOperation]. If you wish - // to allow the server to stream operations updates, rather than requiring - // client polling, you can use the - // [Watcher API][google.watcher.v1.Watcher.Watch] with the Operation's `name` - // as the `target`. - // - // When using the Watcher API, the initial `data` will be the `Operation` at - // the time of the request. Updates will be provided periodically by the - // server until the `Operation` completes, at which point the response message - // will (assuming no error) be at `data.response`. - // - // The server NEED NOT implement other methods or functionality of the - // Operation and Watcher APIs. - // - // Errors discovered during creation of the `Operation` will be reported - // as gRPC Status errors, while errors that occurred while running the - // action will be reported in the `status` field of the `ExecuteResponse`. The - // server MUST NOT set the `error` field of the `Operation` proto. - // The possible errors include: - // * `INVALID_ARGUMENT`: One or more arguments are invalid. - // * `FAILED_PRECONDITION`: One or more errors occurred in setting up the - // action requested, such as a missing input or command or no worker being - // available. The client may be able to fix the errors and retry. - // * `RESOURCE_EXHAUSTED`: There is insufficient quota of some resource to run - // the action. - // * `UNAVAILABLE`: Due to a transient condition, such as all workers being - // occupied (and the server does not support a queue), the action could not - // be started. The client should retry. - // * `INTERNAL`: An internal error occurred in the execution engine or the - // worker. - // * `DEADLINE_EXCEEDED`: The execution timed out. - // - // In the case of a missing input or command, the server SHOULD additionally - // send a [PreconditionFailure][google.rpc.PreconditionFailure] error detail - // where, for each requested blob not present in the CAS, there is a - // `Violation` with a `type` of `MISSING` and a `subject` of - // `"blobs/{hash}/{size}"` indicating the digest of the missing blob. - rpc Execute(ExecuteRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1test/{instance_name=**}/actions:execute" - body: "*" - }; - } -} - -// The action cache API is used to query whether a given action has already been -// performed and, if so, retrieve its result. Unlike the -// [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage], -// which addresses blobs by their own content, the action cache addresses the -// [ActionResult][google.devtools.remoteexecution.v1test.ActionResult] by a -// digest of the encoded [Action][google.devtools.remoteexecution.v1test.Action] -// which produced them. -// -// The lifetime of entries in the action cache is implementation-specific, but -// the server SHOULD assume that more recently used entries are more likely to -// be used again. Additionally, action cache implementations SHOULD ensure that -// any blobs referenced in the -// [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage] -// are still valid when returning a result. -// -// As with other services in the Remote Execution API, any call may return an -// error with a [RetryInfo][google.rpc.RetryInfo] error detail providing -// information about when the client should retry the request; clients SHOULD -// respect the information provided. -service ActionCache { - // Retrieve a cached execution result. - // - // Errors: - // * `NOT_FOUND`: The requested `ActionResult` is not in the cache. - rpc GetActionResult(GetActionResultRequest) returns (ActionResult) { - option (google.api.http) = { - get: "/v1test/{instance_name=**}/actionResults/{action_digest.hash}/{action_digest.size_bytes}" - }; - } - - // Upload a new execution result. - // - // This method is intended for servers which implement the distributed cache - // independently of the - // [Execution][google.devtools.remoteexecution.v1test.Execution] API. As a - // result, it is OPTIONAL for servers to implement. - // - // Errors: - // * `NOT_IMPLEMENTED`: This method is not supported by the server. - // * `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the - // entry to the cache. - rpc UpdateActionResult(UpdateActionResultRequest) returns (ActionResult) { - option (google.api.http) = { - put: "/v1test/{instance_name=**}/actionResults/{action_digest.hash}/{action_digest.size_bytes}" - body: "action_result" - }; - } -} - -// The CAS (content-addressable storage) is used to store the inputs to and -// outputs from the execution service. Each piece of content is addressed by the -// digest of its binary data. -// -// Most of the binary data stored in the CAS is opaque to the execution engine, -// and is only used as a communication medium. In order to build an -// [Action][google.devtools.remoteexecution.v1test.Action], -// however, the client will need to also upload the -// [Command][google.devtools.remoteexecution.v1test.Command] and input root -// [Directory][google.devtools.remoteexecution.v1test.Directory] for the Action. -// The Command and Directory messages must be marshalled to wire format and then -// uploaded under the hash as with any other piece of content. In practice, the -// input root directory is likely to refer to other Directories in its -// hierarchy, which must also each be uploaded on their own. -// -// For small file uploads the client should group them together and call -// [BatchUpdateBlobs][google.devtools.remoteexecution.v1test.ContentAddressableStorage.BatchUpdateBlobs] -// on chunks of no more than 10 MiB. For large uploads, the client must use the -// [Write method][google.bytestream.ByteStream.Write] of the ByteStream API. The -// `resource_name` is `{instance_name}/uploads/{uuid}/blobs/{hash}/{size}`, -// where `instance_name` is as described in the next paragraph, `uuid` is a -// version 4 UUID generated by the client, and `hash` and `size` are the -// [Digest][google.devtools.remoteexecution.v1test.Digest] of the blob. The -// `uuid` is used only to avoid collisions when multiple clients try to upload -// the same file (or the same client tries to upload the file multiple times at -// once on different threads), so the client MAY reuse the `uuid` for uploading -// different blobs. The `resource_name` may optionally have a trailing filename -// (or other metadata) for a client to use if it is storing URLs, as in -// `{instance}/uploads/{uuid}/blobs/{hash}/{size}/foo/bar/baz.cc`. Anything -// after the `size` is ignored. -// -// A single server MAY support multiple instances of the execution system, each -// with their own workers, storage, cache, etc. The exact relationship between -// instances is up to the server. If the server does, then the `instance_name` -// is an identifier, possibly containing multiple path segments, used to -// distinguish between the various instances on the server, in a manner defined -// by the server. For servers which do not support multiple instances, then the -// `instance_name` is the empty path and the leading slash is omitted, so that -// the `resource_name` becomes `uploads/{uuid}/blobs/{hash}/{size}`. -// -// When attempting an upload, if another client has already completed the upload -// (which may occur in the middle of a single upload if another client uploads -// the same blob concurrently), the request will terminate immediately with -// a response whose `committed_size` is the full size of the uploaded file -// (regardless of how much data was transmitted by the client). If the client -// completes the upload but the -// [Digest][google.devtools.remoteexecution.v1test.Digest] does not match, an -// `INVALID_ARGUMENT` error will be returned. In either case, the client should -// not attempt to retry the upload. -// -// For downloading blobs, the client must use the -// [Read method][google.bytestream.ByteStream.Read] of the ByteStream API, with -// a `resource_name` of `"{instance_name}/blobs/{hash}/{size}"`, where -// `instance_name` is the instance name (see above), and `hash` and `size` are -// the [Digest][google.devtools.remoteexecution.v1test.Digest] of the blob. -// -// The lifetime of entries in the CAS is implementation specific, but it SHOULD -// be long enough to allow for newly-added and recently looked-up entries to be -// used in subsequent calls (e.g. to -// [Execute][google.devtools.remoteexecution.v1test.Execution.Execute]). -// -// As with other services in the Remote Execution API, any call may return an -// error with a [RetryInfo][google.rpc.RetryInfo] error detail providing -// information about when the client should retry the request; clients SHOULD -// respect the information provided. -service ContentAddressableStorage { - // Determine if blobs are present in the CAS. - // - // Clients can use this API before uploading blobs to determine which ones are - // already present in the CAS and do not need to be uploaded again. - // - // There are no method-specific errors. - rpc FindMissingBlobs(FindMissingBlobsRequest) - returns (FindMissingBlobsResponse) { - option (google.api.http) = { - post: "/v1test/{instance_name=**}/blobs:findMissing" - body: "*" - }; - } - - // Upload many blobs at once. - // - // The client MUST NOT upload blobs with a combined total size of more than 10 - // MiB using this API. Such requests should either be split into smaller - // chunks or uploaded using the - // [ByteStream API][google.bytestream.ByteStream], as appropriate. - // - // This request is equivalent to calling [UpdateBlob][] on each individual - // blob, in parallel. The requests may succeed or fail independently. - // - // Errors: - // * `INVALID_ARGUMENT`: The client attempted to upload more than 10 MiB of - // data. - // - // Individual requests may return the following errors, additionally: - // * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the blob. - // * `INVALID_ARGUMENT`: The - // [Digest][google.devtools.remoteexecution.v1test.Digest] does not match the - // provided data. - rpc BatchUpdateBlobs(BatchUpdateBlobsRequest) - returns (BatchUpdateBlobsResponse) { - option (google.api.http) = { - post: "/v1test/{instance_name=**}/blobs:batchUpdate" - body: "*" - }; - } - - // Fetch the entire directory tree rooted at a node. - // - // This request must be targeted at a - // [Directory][google.devtools.remoteexecution.v1test.Directory] stored in the - // [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage] - // (CAS). The server will enumerate the `Directory` tree recursively and - // return every node descended from the root. - // The exact traversal order is unspecified and, unless retrieving subsequent - // pages from an earlier request, is not guaranteed to be stable across - // multiple invocations of `GetTree`. - // - // If part of the tree is missing from the CAS, the server will return the - // portion present and omit the rest. - // - // * `NOT_FOUND`: The requested tree root is not present in the CAS. - rpc GetTree(GetTreeRequest) returns (GetTreeResponse) { - option (google.api.http) = { - get: "/v1test/{instance_name=**}/blobs/{root_digest.hash}/{root_digest.size_bytes}:getTree" - }; - } -} - -// An `Action` captures all the information about an execution which is required -// to reproduce it. -// -// `Action`s are the core component of the [Execution] service. A single -// `Action` represents a repeatable action that can be performed by the -// execution service. `Action`s can be succinctly identified by the digest of -// their wire format encoding and, once an `Action` has been executed, will be -// cached in the action cache. Future requests can then use the cached result -// rather than needing to run afresh. -// -// When a server completes execution of an -// [Action][google.devtools.remoteexecution.v1test.Action], it MAY choose to -// cache the [result][google.devtools.remoteexecution.v1test.ActionResult] in -// the [ActionCache][google.devtools.remoteexecution.v1test.ActionCache] unless -// `do_not_cache` is `true`. Clients SHOULD expect the server to do so. By -// default, future calls to [Execute][] the same `Action` will also serve their -// results from the cache. Clients must take care to understand the caching -// behaviour. Ideally, all `Action`s will be reproducible so that serving a -// result from cache is always desirable and correct. -message Action { - // The digest of the [Command][google.devtools.remoteexecution.v1test.Command] - // to run, which MUST be present in the - // [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage]. - Digest command_digest = 1; - - // The digest of the root - // [Directory][google.devtools.remoteexecution.v1test.Directory] for the input - // files. The files in the directory tree are available in the correct - // location on the build machine before the command is executed. The root - // directory, as well as every subdirectory and content blob referred to, MUST - // be in the - // [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage]. - Digest input_root_digest = 2; - - // A list of the output files that the client expects to retrieve from the - // action. Only the listed files, as well as directories listed in - // `output_directories`, will be returned to the client as output. - // Other files that may be created during command execution are discarded. - // - // The paths are relative to the working directory of the action execution. - // The paths are specified using a single forward slash (`/`) as a path - // separator, even if the execution platform natively uses a different - // separator. The path MUST NOT include a trailing slash, nor a leading slash, - // being a relative path. - // - // In order to ensure consistent hashing of the same Action, the output paths - // MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 - // bytes). - repeated string output_files = 3; - - // A list of the output directories that the client expects to retrieve from - // the action. Only the contents of the indicated directories (recursively - // including the contents of their subdirectories) will be - // returned, as well as files listed in `output_files`. Other files that may - // be created during command execution are discarded. - // - // The paths are relative to the working directory of the action execution. - // The paths are specified using a single forward slash (`/`) as a path - // separator, even if the execution platform natively uses a different - // separator. The path MUST NOT include a trailing slash, nor a leading slash, - // being a relative path. - // The special value of empty string is allowed, although not recommended, and - // can be used to capture the entire working directory tree, including inputs. - // - // In order to ensure consistent hashing of the same Action, the output paths - // MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 - // bytes). - repeated string output_directories = 4; - - // The platform requirements for the execution environment. The server MAY - // choose to execute the action on any worker satisfying the requirements, so - // the client SHOULD ensure that running the action on any such worker will - // have the same result. - Platform platform = 5; - - // A timeout after which the execution should be killed. If the timeout is - // absent, then the client is specifying that the execution should continue - // as long as the server will let it. The server SHOULD impose a timeout if - // the client does not specify one, however, if the client does specify a - // timeout that is longer than the server's maximum timeout, the server MUST - // reject the request. - // - // The timeout is a part of the - // [Action][google.devtools.remoteexecution.v1test.Action] message, and - // therefore two `Actions` with different timeouts are different, even if they - // are otherwise identical. This is because, if they were not, running an - // `Action` with a lower timeout than is required might result in a cache hit - // from an execution run with a longer timeout, hiding the fact that the - // timeout is too short. By encoding it directly in the `Action`, a lower - // timeout will result in a cache miss and the execution timeout will fail - // immediately, rather than whenever the cache entry gets evicted. - google.protobuf.Duration timeout = 6; - - // If true, then the `Action`'s result cannot be cached. - bool do_not_cache = 7; -} - -// A `Command` is the actual command executed by a worker running an -// [Action][google.devtools.remoteexecution.v1test.Action]. -// -// Except as otherwise required, the environment (such as which system -// libraries or binaries are available, and what filesystems are mounted where) -// is defined by and specific to the implementation of the remote execution API. -message Command { - // An `EnvironmentVariable` is one variable to set in the running program's - // environment. - message EnvironmentVariable { - // The variable name. - string name = 1; - - // The variable value. - string value = 2; - } - - // The arguments to the command. The first argument must be the path to the - // executable, which must be either a relative path, in which case it is - // evaluated with respect to the input root, or an absolute path. - // - // The working directory will always be the input root. - repeated string arguments = 1; - - // The environment variables to set when running the program. The worker may - // provide its own default environment variables; these defaults can be - // overridden using this field. Additional variables can also be specified. - // - // In order to ensure that equivalent `Command`s always hash to the same - // value, the environment variables MUST be lexicographically sorted by name. - // Sorting of strings is done by code point, equivalently, by the UTF-8 bytes. - repeated EnvironmentVariable environment_variables = 2; -} - -// A `Platform` is a set of requirements, such as hardware, operating system, or -// compiler toolchain, for an -// [Action][google.devtools.remoteexecution.v1test.Action]'s execution -// environment. A `Platform` is represented as a series of key-value pairs -// representing the properties that are required of the platform. -// -// This message is currently being redeveloped since it is an overly simplistic -// model of platforms. -message Platform { - // A single property for the environment. The server is responsible for - // specifying the property `name`s that it accepts. If an unknown `name` is - // provided in the requirements for an - // [Action][google.devtools.remoteexecution.v1test.Action], the server SHOULD - // reject the execution request. If permitted by the server, the same `name` - // may occur multiple times. - // - // The server is also responsible for specifying the interpretation of - // property `value`s. For instance, a property describing how much RAM must be - // available may be interpreted as allowing a worker with 16GB to fulfill a - // request for 8GB, while a property describing the OS environment on which - // the action must be performed may require an exact match with the worker's - // OS. - // - // The server MAY use the `value` of one or more properties to determine how - // it sets up the execution environment, such as by making specific system - // files available to the worker. - message Property { - // The property name. - string name = 1; - - // The property value. - string value = 2; - } - - // The properties that make up this platform. In order to ensure that - // equivalent `Platform`s always hash to the same value, the properties MUST - // be lexicographically sorted by name, and then by value. Sorting of strings - // is done by code point, equivalently, by the UTF-8 bytes. - repeated Property properties = 1; -} - -// A `Directory` represents a directory node in a file tree, containing zero or -// more children [FileNodes][google.devtools.remoteexecution.v1test.FileNode] -// and [DirectoryNodes][google.devtools.remoteexecution.v1test.DirectoryNode]. -// Each `Node` contains its name in the directory, the digest of its content -// (either a file blob or a `Directory` proto), as well as possibly some -// metadata about the file or directory. -// -// In order to ensure that two equivalent directory trees hash to the same -// value, the following restrictions MUST be obeyed when constructing a -// a `Directory`: -// - Every child in the directory must have a path of exactly one segment. -// Multiple levels of directory hierarchy may not be collapsed. -// - Each child in the directory must have a unique path segment (file name). -// - The files and directories in the directory must each be sorted in -// lexicographical order by path. The path strings must be sorted by code -// point, equivalently, by UTF-8 bytes. -// -// A `Directory` that obeys the restrictions is said to be in canonical form. -// -// As an example, the following could be used for a file named `bar` and a -// directory named `foo` with an executable file named `baz` (hashes shortened -// for readability): -// -// ```json -// // (Directory proto) -// { -// files: [ -// { -// name: "bar", -// digest: { -// hash: "4a73bc9d03...", -// size: 65534 -// } -// } -// ], -// directories: [ -// { -// name: "foo", -// digest: { -// hash: "4cf2eda940...", -// size: 43 -// } -// } -// ] -// } -// -// // (Directory proto with hash "4cf2eda940..." and size 43) -// { -// files: [ -// { -// name: "baz", -// digest: { -// hash: "b2c941073e...", -// size: 1294, -// }, -// is_executable: true -// } -// ] -// } -// ``` -message Directory { - // The files in the directory. - repeated FileNode files = 1; - - // The subdirectories in the directory. - repeated DirectoryNode directories = 2; -} - -// A `FileNode` represents a single file and associated metadata. -message FileNode { - // The name of the file. - string name = 1; - - // The digest of the file's content. - Digest digest = 2; - - // True if file is executable, false otherwise. - bool is_executable = 4; -} - -// A `DirectoryNode` represents a child of a -// [Directory][google.devtools.remoteexecution.v1test.Directory] which is itself -// a `Directory` and its associated metadata. -message DirectoryNode { - // The name of the directory. - string name = 1; - - // The digest of the - // [Directory][google.devtools.remoteexecution.v1test.Directory] object - // represented. See [Digest][google.devtools.remoteexecution.v1test.Digest] - // for information about how to take the digest of a proto message. - Digest digest = 2; -} - -// A content digest. A digest for a given blob consists of the size of the blob -// and its hash. The hash algorithm to use is defined by the server, but servers -// SHOULD use SHA-256. -// -// The size is considered to be an integral part of the digest and cannot be -// separated. That is, even if the `hash` field is correctly specified but -// `size_bytes` is not, the server MUST reject the request. -// -// The reason for including the size in the digest is as follows: in a great -// many cases, the server needs to know the size of the blob it is about to work -// with prior to starting an operation with it, such as flattening Merkle tree -// structures or streaming it to a worker. Technically, the server could -// implement a separate metadata store, but this results in a significantly more -// complicated implementation as opposed to having the client specify the size -// up-front (or storing the size along with the digest in every message where -// digests are embedded). This does mean that the API leaks some implementation -// details of (what we consider to be) a reasonable server implementation, but -// we consider this to be a worthwhile tradeoff. -// -// When a `Digest` is used to refer to a proto message, it always refers to the -// message in binary encoded form. To ensure consistent hashing, clients and -// servers MUST ensure that they serialize messages according to the following -// rules, even if there are alternate valid encodings for the same message. -// - Fields are serialized in tag order. -// - There are no unknown fields. -// - There are no duplicate fields. -// - Fields are serialized according to the default semantics for their type. -// -// Most protocol buffer implementations will always follow these rules when -// serializing, but care should be taken to avoid shortcuts. For instance, -// concatenating two messages to merge them may produce duplicate fields. -message Digest { - // The hash. In the case of SHA-256, it will always be a lowercase hex string - // exactly 64 characters long. - string hash = 1; - - // The size of the blob, in bytes. - int64 size_bytes = 2; -} - -// An ActionResult represents the result of an -// [Action][google.devtools.remoteexecution.v1test.Action] being run. -message ActionResult { - // The output files of the action. For each output file requested in the - // `output_files` field of the Action, if the corresponding file existed after - // the action completed, a single entry will be present in the output list. - // - // If the action does not produce the requested output, or produces a - // directory where a regular file is expected or vice versa, then that output - // will be omitted from the list. The server is free to arrange the output - // list as desired; clients MUST NOT assume that the output list is sorted. - repeated OutputFile output_files = 2; - - // The output directories of the action. For each output directory requested - // in the `output_directories` field of the Action, if the corresponding - // directory existed after the action completed, a single entry will be - // present in the output list, which will contain the digest of - // a [Tree][google.devtools.remoteexecution.v1test.Tree] message containing - // the directory tree, and the path equal exactly to the corresponding Action - // output_directories member. - // As an example, suppose the Action had an output directory `a/b/dir` and the - // execution produced the following contents in `a/b/dir`: a file named `bar` - // and a directory named `foo` with an executable file named `baz`. Then, - // output_directory will contain (hashes shortened for readability): - // - // ```json - // // OutputDirectory proto: - // { - // path: "a/b/dir" - // tree_digest: { - // hash: "4a73bc9d03...", - // size: 55 - // } - // } - // // Tree proto with hash "4a73bc9d03..." and size 55: - // { - // root: { - // files: [ - // { - // name: "bar", - // digest: { - // hash: "4a73bc9d03...", - // size: 65534 - // } - // } - // ], - // directories: [ - // { - // name: "foo", - // digest: { - // hash: "4cf2eda940...", - // size: 43 - // } - // } - // ] - // } - // children : { - // // (Directory proto with hash "4cf2eda940..." and size 43) - // files: [ - // { - // name: "baz", - // digest: { - // hash: "b2c941073e...", - // size: 1294, - // }, - // is_executable: true - // } - // ] - // } - // } - // ``` - repeated OutputDirectory output_directories = 3; - - // The exit code of the command. - int32 exit_code = 4; - - // The standard output buffer of the action. The server will determine, based - // on the size of the buffer, whether to return it in raw form or to return - // a digest in `stdout_digest` that points to the buffer. If neither is set, - // then the buffer is empty. The client SHOULD NOT assume it will get one of - // the raw buffer or a digest on any given request and should be prepared to - // handle either. - bytes stdout_raw = 5; - - // The digest for a blob containing the standard output of the action, which - // can be retrieved from the - // [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage]. - // See `stdout_raw` for when this will be set. - Digest stdout_digest = 6; - - // The standard error buffer of the action. The server will determine, based - // on the size of the buffer, whether to return it in raw form or to return - // a digest in `stderr_digest` that points to the buffer. If neither is set, - // then the buffer is empty. The client SHOULD NOT assume it will get one of - // the raw buffer or a digest on any given request and should be prepared to - // handle either. - bytes stderr_raw = 7; - - // The digest for a blob containing the standard error of the action, which - // can be retrieved from the - // [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage]. - // See `stderr_raw` for when this will be set. - Digest stderr_digest = 8; -} - -// An `OutputFile` is similar to a -// [FileNode][google.devtools.remoteexecution.v1test.FileNode], but it is -// tailored for output as part of an `ActionResult`. It allows a full file path -// rather than only a name, and allows the server to include content inline. -// -// `OutputFile` is binary-compatible with `FileNode`. -message OutputFile { - // The full path of the file relative to the input root, including the - // filename. The path separator is a forward slash `/`. Since this is a - // relative path, it MUST NOT begin with a leading forward slash. - string path = 1; - - // The digest of the file's content. - Digest digest = 2; - - // The raw content of the file. - // - // This field may be used by the server to provide the content of a file - // inline in an - // [ActionResult][google.devtools.remoteexecution.v1test.ActionResult] and - // avoid requiring that the client make a separate call to - // [ContentAddressableStorage.GetBlob] to retrieve it. - // - // The client SHOULD NOT assume that it will get raw content with any request, - // and always be prepared to retrieve it via `digest`. - bytes content = 3; - - // True if file is executable, false otherwise. - bool is_executable = 4; -} - -// A `Tree` contains all the -// [Directory][google.devtools.remoteexecution.v1test.Directory] protos in a -// single directory Merkle tree, compressed into one message. -message Tree { - // The root directory in the tree. - Directory root = 1; - - // All the child directories: the directories referred to by the root and, - // recursively, all its children. In order to reconstruct the directory tree, - // the client must take the digests of each of the child directories and then - // build up a tree starting from the `root`. - repeated Directory children = 2; -} - -// An `OutputDirectory` is the output in an `ActionResult` corresponding to a -// directory's full contents rather than a single file. -message OutputDirectory { - // The full path of the directory relative to the working directory. The path - // separator is a forward slash `/`. Since this is a relative path, it MUST - // NOT begin with a leading forward slash. The empty string value is allowed, - // and it denotes the entire working directory. - string path = 1; - - // DEPRECATED: This field is deprecated and should no longer be used. - Digest digest = 2; - - // The digest of the encoded - // [Tree][google.devtools.remoteexecution.v1test.Tree] proto containing the - // directory's contents. - Digest tree_digest = 3; -} - -// A request message for -// [Execution.Execute][google.devtools.remoteexecution.v1test.Execution.Execute]. -message ExecuteRequest { - // The instance of the execution system to operate against. A server may - // support multiple instances of the execution system (with their own workers, - // storage, caches, etc.). The server MAY require use of this field to select - // between them in an implementation-defined fashion, otherwise it can be - // omitted. - string instance_name = 1; - - // The action to be performed. - Action action = 2; - - // If true, the action will be executed anew even if its result was already - // present in the cache. If false, the result may be served from the - // [ActionCache][google.devtools.remoteexecution.v1test.ActionCache]. - bool skip_cache_lookup = 3; - - // DEPRECATED: This field should be ignored by clients and servers and will be - // removed. - int32 total_input_file_count = 4; - - // DEPRECATED: This field should be ignored by clients and servers and will be - // removed. - int64 total_input_file_bytes = 5; -} - -// A `LogFile` is a log stored in the CAS. -message LogFile { - // The digest of the log contents. - Digest digest = 1; - - // This is a hint as to the purpose of the log, and is set to true if the log - // is human-readable text that can be usefully displayed to a user, and false - // otherwise. For instance, if a command-line client wishes to print the - // server logs to the terminal for a failed action, this allows it to avoid - // displaying a binary file. - bool human_readable = 2; -} - -// The response message for -// [Execution.Execute][google.devtools.remoteexecution.v1test.Execution.Execute], -// which will be contained in the [response -// field][google.longrunning.Operation.response] of the -// [Operation][google.longrunning.Operation]. -message ExecuteResponse { - // The result of the action. - ActionResult result = 1; - - // True if the result was served from cache, false if it was executed. - bool cached_result = 2; - - // If the status has a code other than `OK`, it indicates that the action did - // not finish execution. For example, if the operation times out during - // execution, the status will have a `DEADLINE_EXCEEDED` code. Servers MUST - // use this field for errors in execution, rather than the error field on the - // `Operation` object. - // - // If the status code is other than `OK`, then the result MUST NOT be cached. - // For an error status, the `result` field is optional; the server may - // populate the output-, stdout-, and stderr-related fields if it has any - // information available, such as the stdout and stderr of a timed-out action. - google.rpc.Status status = 3; - - // An optional list of additional log outputs the server wishes to provide. A - // server can use this to return execution-specific logs however it wishes. - // This is intended primarily to make it easier for users to debug issues that - // may be outside of the actual job execution, such as by identifying the - // worker executing the action or by providing logs from the worker's setup - // phase. The keys SHOULD be human readable so that a client can display them - // to a user. - map server_logs = 4; -} - -// Metadata about an ongoing -// [execution][google.devtools.remoteexecution.v1test.Execution.Execute], which -// will be contained in the [metadata -// field][google.longrunning.Operation.response] of the -// [Operation][google.longrunning.Operation]. -message ExecuteOperationMetadata { - // The current stage of execution. - enum Stage { - UNKNOWN = 0; - - // Checking the result against the cache. - CACHE_CHECK = 1; - - // Currently idle, awaiting a free machine to execute. - QUEUED = 2; - - // Currently being executed by a worker. - EXECUTING = 3; - - // Finished execution. - COMPLETED = 4; - } - - Stage stage = 1; - - // The digest of the [Action][google.devtools.remoteexecution.v1test.Action] - // being executed. - Digest action_digest = 2; - - // If set, the client can use this name with - // [ByteStream.Read][google.bytestream.ByteStream.Read] to stream the - // standard output. - string stdout_stream_name = 3; - - // If set, the client can use this name with - // [ByteStream.Read][google.bytestream.ByteStream.Read] to stream the - // standard error. - string stderr_stream_name = 4; -} - -// A request message for -// [ActionCache.GetActionResult][google.devtools.remoteexecution.v1test.ActionCache.GetActionResult]. -message GetActionResultRequest { - // The instance of the execution system to operate against. A server may - // support multiple instances of the execution system (with their own workers, - // storage, caches, etc.). The server MAY require use of this field to select - // between them in an implementation-defined fashion, otherwise it can be - // omitted. - string instance_name = 1; - - // The digest of the [Action][google.devtools.remoteexecution.v1test.Action] - // whose result is requested. - Digest action_digest = 2; -} - -// A request message for -// [ActionCache.UpdateActionResult][google.devtools.remoteexecution.v1test.ActionCache.UpdateActionResult]. -message UpdateActionResultRequest { - // The instance of the execution system to operate against. A server may - // support multiple instances of the execution system (with their own workers, - // storage, caches, etc.). The server MAY require use of this field to select - // between them in an implementation-defined fashion, otherwise it can be - // omitted. - string instance_name = 1; - - // The digest of the [Action][google.devtools.remoteexecution.v1test.Action] - // whose result is being uploaded. - Digest action_digest = 2; - - // The [ActionResult][google.devtools.remoteexecution.v1test.ActionResult] - // to store in the cache. - ActionResult action_result = 3; -} - -// A request message for -// [ContentAddressableStorage.FindMissingBlobs][google.devtools.remoteexecution.v1test.ContentAddressableStorage.FindMissingBlobs]. -message FindMissingBlobsRequest { - // The instance of the execution system to operate against. A server may - // support multiple instances of the execution system (with their own workers, - // storage, caches, etc.). The server MAY require use of this field to select - // between them in an implementation-defined fashion, otherwise it can be - // omitted. - string instance_name = 1; - - // A list of the blobs to check. - repeated Digest blob_digests = 2; -} - -// A response message for -// [ContentAddressableStorage.FindMissingBlobs][google.devtools.remoteexecution.v1test.ContentAddressableStorage.FindMissingBlobs]. -message FindMissingBlobsResponse { - // A list of the blobs requested *not* present in the storage. - repeated Digest missing_blob_digests = 2; -} - -// A single request message for -// [ContentAddressableStorage.BatchUpdateBlobs][google.devtools.remoteexecution.v1test.ContentAddressableStorage.BatchUpdateBlobs]. -message UpdateBlobRequest { - // The digest of the blob. This MUST be the digest of `data`. - Digest content_digest = 1; - - // The raw binary data. - bytes data = 2; -} - -// A request message for -// [ContentAddressableStorage.BatchUpdateBlobs][google.devtools.remoteexecution.v1test.ContentAddressableStorage.BatchUpdateBlobs]. -message BatchUpdateBlobsRequest { - // The instance of the execution system to operate against. A server may - // support multiple instances of the execution system (with their own workers, - // storage, caches, etc.). The server MAY require use of this field to select - // between them in an implementation-defined fashion, otherwise it can be - // omitted. - string instance_name = 1; - - // The individual upload requests. - repeated UpdateBlobRequest requests = 2; -} - -// A response message for -// [ContentAddressableStorage.BatchUpdateBlobs][google.devtools.remoteexecution.v1test.ContentAddressableStorage.BatchUpdateBlobs]. -message BatchUpdateBlobsResponse { - // A response corresponding to a single blob that the client tried to upload. - message Response { - // The digest to which this response corresponds. - Digest blob_digest = 1; - - // The result of attempting to upload that blob. - google.rpc.Status status = 2; - } - - // The responses to the requests. - repeated Response responses = 1; -} - -// A request message for -// [ContentAddressableStorage.GetTree][google.devtools.remoteexecution.v1test.ContentAddressableStorage.GetTree]. -message GetTreeRequest { - // The instance of the execution system to operate against. A server may - // support multiple instances of the execution system (with their own workers, - // storage, caches, etc.). The server MAY require use of this field to select - // between them in an implementation-defined fashion, otherwise it can be - // omitted. - string instance_name = 1; - - // The digest of the root, which must be an encoded - // [Directory][google.devtools.remoteexecution.v1test.Directory] message - // stored in the - // [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage]. - Digest root_digest = 2; - - // A maximum page size to request. If present, the server will request no more - // than this many items. Regardless of whether a page size is specified, the - // server may place its own limit on the number of items to be returned and - // require the client to retrieve more items using a subsequent request. - int32 page_size = 3; - - // A page token, which must be a value received in a previous - // [GetTreeResponse][google.devtools.remoteexecution.v1test.GetTreeResponse]. - // If present, the server will use it to return the following page of results. - string page_token = 4; -} - -// A response message for -// [ContentAddressableStorage.GetTree][google.devtools.remoteexecution.v1test.ContentAddressableStorage.GetTree]. -message GetTreeResponse { - // The directories descended from the requested root. - repeated Directory directories = 1; - - // If present, signifies that there are more results which the client can - // retrieve by passing this as the page_token in a subsequent - // [request][google.devtools.remoteexecution.v1test.GetTreeRequest]. - // If empty, signifies that this is the last page of results. - string next_page_token = 2; -} - -// Details for the tool used to call the API. -message ToolDetails { - // Name of the tool, e.g. bazel. - string tool_name = 1; - - // Version of the tool used for the request, e.g. 5.0.3. - string tool_version = 2; -} - -// An optional Metadata to attach to any RPC request to tell the server about an -// external context of the request. The server may use this for logging or other -// purposes. To use it, the client attaches the header to the call using the -// canonical proto serialization: -// name: google.devtools.remoteexecution.v1test.requestmetadata-bin -// contents: the base64 encoded binary RequestMetadata message. -message RequestMetadata { - // The details for the tool invoking the requests. - ToolDetails tool_details = 1; - - // An identifier that ties multiple requests to the same action. - // For example, multiple requests to the CAS, Action Cache, and Execution - // API are used in order to compile foo.cc. - string action_id = 2; - - // An identifier that ties multiple actions together to a final result. - // For example, multiple actions are required to build and run foo_test. - string tool_invocation_id = 3; - - // An identifier to tie multiple tool invocations together. For example, - // runs of foo_test, bar_test and baz_test on a post-submit of a given patch. - string correlated_invocations_id = 4; -} diff --git a/google/devtools/remoteexecution/v1test/remote_execution.yaml b/google/devtools/remoteexecution/v1test/remote_execution.yaml deleted file mode 100644 index 3d4503bba..000000000 --- a/google/devtools/remoteexecution/v1test/remote_execution.yaml +++ /dev/null @@ -1,19 +0,0 @@ -type: google.api.Service -config_version: 3 -name: remoteexecution.googleapis.com -title: Remote Execution API - -apis: -- name: google.bytestream.ByteStream -- name: google.devtools.remoteexecution.v1test.ActionCache -- name: google.devtools.remoteexecution.v1test.ContentAddressableStorage -- name: google.devtools.remoteexecution.v1test.Execution -- name: google.longrunning.Operations -- name: google.watcher.v1.Watcher - -types: -- name: google.devtools.remoteexecution.v1test.Command -- name: google.devtools.remoteexecution.v1test.ExecuteResponse -- name: google.devtools.remoteexecution.v1test.ExecuteOperationMetadata -- name: google.devtools.remoteexecution.v1test.RequestMetadata -- name: google.devtools.remoteexecution.v1test.Tree diff --git a/google/devtools/remoteworkers/v1test2/BUILD.bazel b/google/devtools/remoteworkers/v1test2/BUILD.bazel new file mode 100644 index 000000000..91497a257 --- /dev/null +++ b/google/devtools/remoteworkers/v1test2/BUILD.bazel @@ -0,0 +1,372 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "remoteworkers_proto", + srcs = [ + "bots.proto", + "command.proto", + "tasks.proto", + "worker.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "remoteworkers_proto_with_info", + deps = [ + ":remoteworkers_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "remoteworkers_java_proto", + deps = [":remoteworkers_proto"], +) + +java_grpc_library( + name = "remoteworkers_java_grpc", + srcs = [":remoteworkers_proto"], + deps = [":remoteworkers_java_proto"], +) + +java_gapic_library( + name = "remoteworkers_java_gapic", + src = ":remoteworkers_proto_with_info", + gapic_yaml = "remoteworkers_gapic.yaml", + package = "google.devtools.remoteworkers.v1test2", + service_yaml = "remoteworkers.yaml", + test_deps = [ + ":remoteworkers_java_grpc", + ], + deps = [ + ":remoteworkers_java_proto", + ], +) + +java_gapic_test( + name = "remoteworkers_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.devtools.remoteworkers.v1test2.BotsClientTest", + "com.google.cloud.devtools.remoteworkers.v1test2.TasksClientTest", + ], + runtime_deps = [":remoteworkers_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-devtools-remoteworkers-v1test2-java", + deps = [ + ":remoteworkers_java_gapic", + ":remoteworkers_java_grpc", + ":remoteworkers_java_proto", + ":remoteworkers_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "remoteworkers_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2", + protos = [":remoteworkers_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + ], +) + +go_gapic_library( + name = "remoteworkers_go_gapic", + srcs = [":remoteworkers_proto_with_info"], + grpc_service_config = "remoteworkers_grpc_service_config.json", + importpath = "cloud.google.com/go/devtools/remoteworkers/apiv1test2;remoteworkers", + service_yaml = "remoteworkers.yaml", + deps = [ + ":remoteworkers_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +go_test( + name = "remoteworkers_go_gapic_test", + srcs = [":remoteworkers_go_gapic_srcjar_test"], + embed = [":remoteworkers_go_gapic"], + importpath = "cloud.google.com/go/devtools/remoteworkers/apiv1test2", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-devtools-remoteworkers-v1test2-go", + deps = [ + ":remoteworkers_go_gapic", + ":remoteworkers_go_gapic_srcjar-test.srcjar", + ":remoteworkers_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "remoteworkers_moved_proto", + srcs = [":remoteworkers_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "remoteworkers_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":remoteworkers_moved_proto"], +) + +py_grpc_library( + name = "remoteworkers_py_grpc", + srcs = [":remoteworkers_moved_proto"], + deps = [":remoteworkers_py_proto"], +) + +py_gapic_library( + name = "remoteworkers_py_gapic", + src = ":remoteworkers_proto_with_info", + gapic_yaml = "remoteworkers_gapic.yaml", + package = "google.devtools.remoteworkers.v1test2", + service_yaml = "remoteworkers.yaml", + deps = [ + ":remoteworkers_py_grpc", + ":remoteworkers_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "devtools-remoteworkers-v1test2-py", + deps = [ + ":remoteworkers_py_gapic", + ":remoteworkers_py_grpc", + ":remoteworkers_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "remoteworkers_php_proto", + deps = [":remoteworkers_proto"], +) + +php_grpc_library( + name = "remoteworkers_php_grpc", + srcs = [":remoteworkers_proto"], + deps = [":remoteworkers_php_proto"], +) + +php_gapic_library( + name = "remoteworkers_php_gapic", + src = ":remoteworkers_proto_with_info", + gapic_yaml = "remoteworkers_gapic.yaml", + package = "google.devtools.remoteworkers.v1test2", + service_yaml = "remoteworkers.yaml", + deps = [ + ":remoteworkers_php_grpc", + ":remoteworkers_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-devtools-remoteworkers-v1test2-php", + deps = [ + ":remoteworkers_php_gapic", + ":remoteworkers_php_grpc", + ":remoteworkers_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "remoteworkers_nodejs_gapic", + src = ":remoteworkers_proto_with_info", + gapic_yaml = "remoteworkers_gapic.yaml", + package = "google.devtools.remoteworkers.v1test2", + service_yaml = "remoteworkers.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "devtools-remoteworkers-v1test2-nodejs", + deps = [ + ":remoteworkers_nodejs_gapic", + ":remoteworkers_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "remoteworkers_ruby_proto", + deps = [":remoteworkers_proto"], +) + +ruby_grpc_library( + name = "remoteworkers_ruby_grpc", + srcs = [":remoteworkers_proto"], + deps = [":remoteworkers_ruby_proto"], +) + +ruby_gapic_library( + name = "remoteworkers_ruby_gapic", + src = ":remoteworkers_proto_with_info", + gapic_yaml = "remoteworkers_gapic.yaml", + package = "google.devtools.remoteworkers.v1test2", + service_yaml = "remoteworkers.yaml", + deps = [ + ":remoteworkers_ruby_grpc", + ":remoteworkers_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-devtools-remoteworkers-v1test2-ruby", + deps = [ + ":remoteworkers_ruby_gapic", + ":remoteworkers_ruby_grpc", + ":remoteworkers_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "remoteworkers_csharp_proto", + deps = [":remoteworkers_proto"], +) + +csharp_grpc_library( + name = "remoteworkers_csharp_grpc", + srcs = [":remoteworkers_proto"], + deps = [":remoteworkers_csharp_proto"], +) + +csharp_gapic_library( + name = "remoteworkers_csharp_gapic", + src = ":remoteworkers_proto_with_info", + gapic_yaml = "remoteworkers_gapic.yaml", + package = "google.devtools.remoteworkers.v1test2", + service_yaml = "remoteworkers.yaml", + deps = [ + ":remoteworkers_csharp_grpc", + ":remoteworkers_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-devtools-remoteworkers-v1test2-csharp", + deps = [ + ":remoteworkers_csharp_gapic", + ":remoteworkers_csharp_grpc", + ":remoteworkers_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/devtools/remoteworkers/v1test2/bots.proto b/google/devtools/remoteworkers/v1test2/bots.proto index fbad1bf4f..662cc10a2 100644 --- a/google/devtools/remoteworkers/v1test2/bots.proto +++ b/google/devtools/remoteworkers/v1test2/bots.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,18 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.devtools.remoteworkers.v1test2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/devtools/remoteworkers/v1test2/worker.proto"; import "google/protobuf/any.proto"; -import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -59,6 +62,8 @@ option objc_class_prefix = "RW"; // take the form "projects/{project_id}". This is referred to below as "the farm // resource." service Bots { + option (google.api.default_host) = "remoteworkers.googleapis.com"; + // CreateBotSession is called when the bot first joins the farm, and // establishes a session ID to ensure that multiple machines do not register // using the same name accidentally. @@ -67,6 +72,7 @@ service Bots { post: "/v1test2/{parent=**}/botSessions" body: "bot_session" }; + option (google.api.method_signature) = "parent,bot_session"; } // UpdateBotSession must be called periodically by the bot (on a schedule @@ -77,18 +83,7 @@ service Bots { patch: "/v1test2/{name=**/botSessions/*}" body: "bot_session" }; - } - - // PostBotEventTemp may be called by the bot to indicate that some exceptional - // event has occurred. This method is subject to change or removal in future - // revisions of this API; we may simply want to replace it with StackDriver or - // some other common interface. - rpc PostBotEventTemp(PostBotEventTempRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1test2/{name=**/botSessions/*}:postEvent" - body: "*" - }; + option (google.api.method_signature) = "name,bot_session,update_mask"; } } @@ -100,6 +95,11 @@ service Bots { // of the view of this API, which communicates solely with the bot and not // directly with the underlying worker. message BotSession { + option (google.api.resource) = { + type: "remoteworkers.googleapis.com/BotSession" + pattern: "{unknown_path=**}/botSessions/{bot_session}" + }; + // The bot session name, as selected by the server. Output only during a call // to CreateBotSession. string name = 1; @@ -253,52 +253,6 @@ message AdminTemp { string arg = 2; } -// Request message for CreateBotSession. -message CreateBotSessionRequest { - // The farm resource. - string parent = 1; - - // The bot session to create. Server-assigned fields like name must be unset. - BotSession bot_session = 2; -} - -// Request message for UpdateBotSession. -message UpdateBotSessionRequest { - // The bot session name. Must match bot_session.name. - string name = 1; - - // The bot session resource to update. - BotSession bot_session = 2; - - // The fields on the bot that should be updated. See the BotSession resource - // for which fields are updatable by which caller. - google.protobuf.FieldMask update_mask = 3; -} - -// Request message for PostBotEventTemp -message PostBotEventTempRequest { - // Types of bot events. - enum Type { - // Illegal value. - UNSPECIFIED = 0; - - // Interesting but harmless event. - INFO = 1; - - // Error condition. - ERROR = 2; - } - - // The bot session name. - string name = 1; - - // The type of bot event. - Type type = 2; - - // A human-readable message. - string msg = 3; -} - // A coarse description of the status of the bot that the server uses to // determine whether to assign the bot new leases. enum BotStatus { @@ -326,6 +280,9 @@ enum BotStatus { // Bots are typically only asked to shut down if its host computer will be // modified in some way, such as deleting a VM. BOT_TERMINATING = 4; + + // The bot is initializing and is not ready to accept leases. + INITIALIZING = 5; } // The state of the lease. All leases start in the PENDING state. A bot can @@ -352,3 +309,30 @@ enum LeaseState { // the lease. This may only be set by the server. CANCELLED = 5; } + +// Request message for CreateBotSession. +message CreateBotSessionRequest { + // Required. The farm resource. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The bot session to create. Server-assigned fields like name must be unset. + BotSession bot_session = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateBotSession. +message UpdateBotSessionRequest { + // Required. The bot session name. Must match bot_session.name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "remoteworkers.googleapis.com/BotSession" + } + ]; + + // Required. The bot session resource to update. + BotSession bot_session = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The fields on the bot that should be updated. See the BotSession resource + // for which fields are updatable by which caller. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/google/devtools/remoteworkers/v1test2/command.proto b/google/devtools/remoteworkers/v1test2/command.proto index 9d5befec7..933b9cf9f 100644 --- a/google/devtools/remoteworkers/v1test2/command.proto +++ b/google/devtools/remoteworkers/v1test2/command.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; @@ -64,8 +65,22 @@ message CommandTask { // that don't (eg, standard header files). repeated Digest files = 2; + // Inline contents for blobs expected to be needed by the bot to execute the + // task. For example, contents of entries in `files` or blobs that are + // indirectly referenced by an entry there. + // + // The bot should check against this list before downloading required task + // inputs to reduce the number of communications between itself and the + // remote CAS server. + repeated Blob inline_blobs = 4; + // All environment variables required by the task. repeated EnvironmentVariable environment_variables = 3; + + // Directory from which a command is executed. It is a relative directory + // with respect to the bot's working directory (i.e., "./"). If it is + // non-empty, then it must exist under "./". Otherwise, "./" will be used. + string working_directory = 5; } // Describes the expected outputs of the command. @@ -182,13 +197,13 @@ message CommandResult { // uploading/downloading files). google.protobuf.Duration overhead = 5 [deprecated = true]; - // Implementation-dependent statistics about the task. Both servers and bots + // Implementation-dependent metadata about the task. Both servers and bots // may define messages which can be encoded here; bots are free to provide - // statistics in multiple formats, and servers are free to choose one or more + // metadata in multiple formats, and servers are free to choose one or more // of the values to process and ignore others. In particular, it is *not* // considered an error for the bot to provide the server with a field that it // doesn't know about. - repeated google.protobuf.Any statistics = 6; + repeated google.protobuf.Any metadata = 6; } // The metadata for a file. Similar to the equivalent message in the Remote @@ -216,8 +231,7 @@ message FileMetadata { // The metadata for a directory. Similar to the equivalent message in the Remote // Execution API. message DirectoryMetadata { - // The path of the directory, as in - // [FileMetadata.path][google.devtools.remoteworkers.v1test2.FileMetadata.path]. + // The path of the directory, as in [FileMetadata.path][google.devtools.remoteworkers.v1test2.FileMetadata.path]. string path = 1; // A pointer to the contents of the directory, in the form of a marshalled @@ -246,6 +260,15 @@ message Digest { int64 size_bytes = 2; } +// Describes a blob of binary content with its digest. +message Blob { + // The digest of the blob. This should be verified by the receiver. + Digest digest = 1; + + // The contents of the blob. + bytes contents = 2; +} + // The contents of a directory. Similar to the equivalent message in the Remote // Execution API. message Directory { diff --git a/google/devtools/remoteworkers/v1test2/remoteworkers.yaml b/google/devtools/remoteworkers/v1test2/remoteworkers.yaml new file mode 100644 index 000000000..ea05361d9 --- /dev/null +++ b/google/devtools/remoteworkers/v1test2/remoteworkers.yaml @@ -0,0 +1,18 @@ +type: google.api.Service +config_version: 3 +name: remoteworkers.googleapis.com +title: Remote Workers API + +apis: +- name: google.devtools.remoteworkers.v1test2.Bots +- name: google.devtools.remoteworkers.v1test2.Tasks + +types: +- name: google.devtools.remoteworkers.v1test2.AdminTemp +- name: google.devtools.remoteworkers.v1test2.CommandOutputs +- name: google.devtools.remoteworkers.v1test2.CommandOverhead +- name: google.devtools.remoteworkers.v1test2.CommandResult +- name: google.devtools.remoteworkers.v1test2.CommandTask +- name: google.devtools.remoteworkers.v1test2.Directory +- name: google.devtools.remoteworkers.v1test2.DirectoryMetadata +- name: google.devtools.remoteworkers.v1test2.FileMetadata diff --git a/google/api/expr/v1alpha1/cel_gapic.yaml b/google/devtools/remoteworkers/v1test2/remoteworkers_gapic.legacy.yaml similarity index 85% rename from google/api/expr/v1alpha1/cel_gapic.yaml rename to google/devtools/remoteworkers/v1test2/remoteworkers_gapic.legacy.yaml index d2213fc7e..07a21813e 100644 --- a/google/api/expr/v1alpha1/cel_gapic.yaml +++ b/google/devtools/remoteworkers/v1test2/remoteworkers_gapic.legacy.yaml @@ -3,23 +3,23 @@ config_schema_version: 1.0.0 # The settings of generated code in a specific language. language_settings: java: - package_name: com.google.cloud.api.expr.v1alpha1 + package_name: com.google.cloud.devtools.remoteworkers.v1test2 python: - package_name: google.cloud.api.expr_v1alpha1.gapic + package_name: google.cloud.devtools.remoteworkers.v1test2.gapic go: - package_name: cloud.google.com/go/expr/apiv1alpha1 + package_name: cloud.google.com/go/devtools/remoteworkers/apiv1test2 csharp: - package_name: Google.Api.Expr.V1alpha1 + package_name: Google.Devtools.Remoteworkers.V1test2 ruby: - package_name: Google::Cloud::Api::Expr::V1alpha1 + package_name: Google::Cloud::Devtools::Remoteworkers::V1test2 php: - package_name: Google\Cloud\Api\Expr\V1alpha1 + package_name: Google\Cloud\Devtools\Remoteworkers\V1test2 nodejs: - package_name: expr.v1alpha1 + package_name: remoteworkers.v1test2 # A list of API interface configurations. interfaces: # The fully qualified name of the API interface. -- name: google.api.expr.v1alpha1.CelService +- name: google.devtools.remoteworkers.v1test2.Bots # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. # The name_pattern is a pattern to describe the names of the resources of this @@ -30,7 +30,9 @@ interfaces: # methods. If empty, no name methods are generated. # The entity_name is the name to be used as a basis for generated methods and # classes. - collections: [] + collections: + - name_pattern: "{unknown_path=**}/botSessions/{bot_session}" + entity_name: bot_session # Definition for retryable codes. retry_codes_def: - name: idempotent @@ -104,36 +106,36 @@ interfaces: # timeout_millis - Specifies the default timeout for a non-retrying call. If # the call is retrying, refer to retry_params_name instead. methods: - - name: Parse + - name: CreateBotSession flattening: groups: - parameters: - - cel_source + - parent + - bot_session required_fields: - - cel_source + - parent + - bot_session retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 - - name: Check - flattening: - groups: - - parameters: - - parsed_expr - required_fields: - - parsed_expr - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: Eval + - name: UpdateBotSession flattening: groups: - parameters: + - name + - bot_session + - update_mask required_fields: + - name + - bot_session + - update_mask retry_codes_name: non_idempotent retry_params_name: default + field_name_patterns: + name: bot_session timeout_millis: 60000 # The fully qualified name of the API interface. -- name: google.api.expr.v1alpha1.ConformanceService +- name: google.devtools.remoteworkers.v1test2.Tasks # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. # The name_pattern is a pattern to describe the names of the resources of this @@ -144,7 +146,11 @@ interfaces: # methods. If empty, no name methods are generated. # The entity_name is the name to be used as a basis for generated methods and # classes. - collections: [] + collections: + - name_pattern: "{unknown_path=**}/tasks/{task}" + entity_name: task + - name_pattern: "{unknown_path=**}/tasks/{task}/result" + entity_name: task_2 # Definition for retryable codes. retry_codes_def: - name: idempotent @@ -218,31 +224,48 @@ interfaces: # timeout_millis - Specifies the default timeout for a non-retrying call. If # the call is retrying, refer to retry_params_name instead. methods: - - name: Parse + - name: GetTask flattening: groups: - parameters: - - cel_source + - name required_fields: - - cel_source - retry_codes_name: non_idempotent + - name + retry_codes_name: idempotent retry_params_name: default + field_name_patterns: + name: task timeout_millis: 60000 - - name: Check + - name: UpdateTaskResult flattening: groups: - parameters: - - parsed_expr + - name + - result + - update_mask + - source required_fields: - - parsed_expr + - name + - result + - update_mask + - source retry_codes_name: non_idempotent retry_params_name: default + field_name_patterns: + name: task_2 timeout_millis: 60000 - - name: Eval + - name: AddTaskLog + # params. flattening: groups: - parameters: + - name + - log_id required_fields: + - name + - log_id retry_codes_name: non_idempotent retry_params_name: default + field_name_patterns: + name: task timeout_millis: 60000 diff --git a/google/devtools/remoteworkers/v1test2/remoteworkers_gapic.yaml b/google/devtools/remoteworkers/v1test2/remoteworkers_gapic.yaml index 1ee027d48..171d05a3d 100644 --- a/google/devtools/remoteworkers/v1test2/remoteworkers_gapic.yaml +++ b/google/devtools/remoteworkers/v1test2/remoteworkers_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -20,268 +20,5 @@ language_settings: interfaces: # The fully qualified name of the API interface. - name: google.devtools.remoteworkers.v1test2.Bots - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: "{unknown_path=**}/botSessions/{bot_session}" - entity_name: bot_session - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: CreateBotSession - flattening: - groups: - - parameters: - - parent - - bot_session - required_fields: - - parent - - bot_session - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: UpdateBotSession - flattening: - groups: - - parameters: - - name - - bot_session - - update_mask - required_fields: - - name - - bot_session - - update_mask - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: bot_session - timeout_millis: 60000 - - name: PostBotEventTemp - flattening: - groups: - - parameters: - - name - - type - - msg - required_fields: - - name - - type - - msg - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: bot_session - timeout_millis: 60000 - # The fully qualified name of the API interface. + - name: google.devtools.remoteworkers.v1test2.Tasks - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: "{unknown_path=**}/tasks/{task}" - entity_name: task - - name_pattern: "{unknown_path=**}/tasks/{task}/result" - entity_name: task_2 - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: GetTask - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: task - timeout_millis: 60000 - - name: UpdateTaskResult - flattening: - groups: - - parameters: - - name - - result - - update_mask - - source - required_fields: - - name - - result - - update_mask - - source - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: task_2 - timeout_millis: 60000 - - name: AddTaskLog - # params. - flattening: - groups: - - parameters: - - name - - log_id - required_fields: - - name - - log_id - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: task - timeout_millis: 60000 diff --git a/google/devtools/remoteworkers/v1test2/remoteworkers_grpc_service_config.json b/google/devtools/remoteworkers/v1test2/remoteworkers_grpc_service_config.json new file mode 100755 index 000000000..351621275 --- /dev/null +++ b/google/devtools/remoteworkers/v1test2/remoteworkers_grpc_service_config.json @@ -0,0 +1,52 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.devtools.remoteworkers.v1test2.Bots", + "method": "CreateBotSession" + }, + { + "service": "google.devtools.remoteworkers.v1test2.Bots", + "method": "UpdateBotSession" + }, + { + "service": "google.devtools.remoteworkers.v1test2.Bots", + "method": "PostBotEventTemp" + } + ], + "timeout": "600s" + }, + { + "name": [ + { + "service": "google.devtools.remoteworkers.v1test2.Tasks", + "method": "GetTask" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.devtools.remoteworkers.v1test2.Tasks", + "method": "UpdateTaskResult" + }, + { + "service": "google.devtools.remoteworkers.v1test2.Tasks", + "method": "AddTaskLog" + } + ], + "timeout": "600s" + } + ] +} diff --git a/google/devtools/remoteworkers/v1test2/tasks.proto b/google/devtools/remoteworkers/v1test2/tasks.proto index 236112aa5..f2e85fd6c 100644 --- a/google/devtools/remoteworkers/v1test2/tasks.proto +++ b/google/devtools/remoteworkers/v1test2/tasks.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.devtools.remoteworkers.v1test2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/any.proto"; import "google/protobuf/field_mask.proto"; import "google/rpc/status.proto"; @@ -32,6 +36,8 @@ option objc_class_prefix = "RW"; // Lease.result and logs should be precreated prior to sending to the bot (eg, // via CommandTask.expected_outputs.stdout_destination). service Tasks { + option (google.api.default_host) = "remoteworkers.googleapis.com"; + // DEPRECATED - use Lease.payload instead. // GetTask reads the current state of the task. Tasks must be created through // some other interface, and should be immutable once created and exposed to @@ -40,6 +46,7 @@ service Tasks { option (google.api.http) = { get: "/v1test2/{name=**/tasks/*}" }; + option (google.api.method_signature) = "name"; } // DEPRECATED - use Lease.result instead. @@ -49,6 +56,7 @@ service Tasks { patch: "/v1test2/{name=**/tasks/*/result}" body: "result" }; + option (google.api.method_signature) = "name,result,update_mask,source"; } // DEPRECATED - precreate logs prior to sending to bot. @@ -61,6 +69,7 @@ service Tasks { post: "/v1test2/{name=**/tasks/*}:addLog" body: "*" }; + option (google.api.method_signature) = "name,log_id"; } } @@ -75,6 +84,11 @@ service Tasks { // servers should implement partial responses in order to reduce unnecessry // overhead. message Task { + option (google.api.resource) = { + type: "remoteworkers.googleapis.com/Task" + pattern: "{unknown_path=**}/tasks/{task}" + }; + // The name of this task. Output only. string name = 1; @@ -94,8 +108,11 @@ message Task { // DEPRECATED - use Lease.assignment_result instead. // The result and metadata of the task. message TaskResult { - // The name of the task result; must be a name of a `Task` followed by - // `/result`. + option (google.api.resource) = { + type: "remoteworkers.googleapis.com/TaskResult" + pattern: "{unknown_path=**}/tasks/{task}/result" + }; + string name = 1; // The result may be updated several times; the client must only set @@ -123,34 +140,49 @@ message TaskResult { // Request message for `GetTask`. message GetTaskRequest { - // The task name. - string name = 1; + // Required. The task name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "remoteworkers.googleapis.com/Task" + } + ]; } // Request message for `UpdateTaskResult`. message UpdateTaskResultRequest { - // The task result name; must match `result.name`. - string name = 1; + // Required. The task result name; must match `result.name`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "remoteworkers.googleapis.com/TaskResult" + } + ]; - // The result being updated. - TaskResult result = 2; + // Required. The result being updated. + TaskResult result = 2 [(google.api.field_behavior) = REQUIRED]; - // The fields within `result` that are specified. - google.protobuf.FieldMask update_mask = 3; + // Required. The fields within `result` that are specified. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; - // If this is being updated by a bot from BotManager, the source should be + // Required. If this is being updated by a bot from BotManager, the source should be // bot.session_id. That way, if two bots accidentally get the same name, we'll // know to reject updates from the older one. - string source = 4; + string source = 4 [(google.api.field_behavior) = REQUIRED]; } // Request message for `AddTaskLog`. message AddTaskLogRequest { - // The name of the task that will own the new log. - string name = 1; - - // The human-readable name of the log, like `stdout` or a relative file path. - string log_id = 2; + // Required. The name of the task that will own the new log. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "remoteworkers.googleapis.com/Task" + } + ]; + + // Required. The human-readable name of the log, like `stdout` or a relative file path. + string log_id = 2 [(google.api.field_behavior) = REQUIRED]; } // Response message for `AddTaskLog`. diff --git a/google/devtools/remoteworkers/v1test2/worker.proto b/google/devtools/remoteworkers/v1test2/worker.proto index 747226066..b7553382b 100644 --- a/google/devtools/remoteworkers/v1test2/worker.proto +++ b/google/devtools/remoteworkers/v1test2/worker.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; diff --git a/google/devtools/resultstore/resultstore-service.yaml b/google/devtools/resultstore/resultstore-service.yaml deleted file mode 100644 index 8f79a90ff..000000000 --- a/google/devtools/resultstore/resultstore-service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -type: google.api.Service -config_version: 3 -name: resultstore.googleapis.com -title: Result Store API - -apis: -- name: google.devtools.resultstore.v2.ResultStoreDownload -- name: google.devtools.resultstore.v2.ResultStoreFileDownload -- name: google.devtools.resultstore.v2.ResultStoreUpload - -documentation: - summary: The Result Store API v2. - overview: An API for reading Invocation results from previous runs. - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform diff --git a/google/devtools/resultstore/v2/action.proto b/google/devtools/resultstore/v2/action.proto index 1b4659ef3..18faa32fe 100644 --- a/google/devtools/resultstore/v2/action.proto +++ b/google/devtools/resultstore/v2/action.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ package google.devtools.resultstore.v2; import "google/devtools/resultstore/v2/common.proto"; import "google/devtools/resultstore/v2/coverage.proto"; import "google/devtools/resultstore/v2/file.proto"; +import "google/devtools/resultstore/v2/file_processing_error.proto"; import "google/devtools/resultstore/v2/test_suite.proto"; import "google/protobuf/duration.proto"; @@ -28,12 +29,14 @@ option java_multiple_files = true; option java_package = "com.google.devtools.resultstore.v2"; // An action that happened as part of a configured target. This action could be -// a build, a test, or another type of action. +// a build, a test, or another type of action, as specified in action_type +// oneof. +// // Each parent ConfiguredTarget resource should have at least one Action as its -// child resource before the invocation is finalized. ResultStore is a tool to -// store build & test results. ConfiguredTarget proto by itself does not contain -// enough fields to fully represent such results. For a simple build, at least -// one build action is required to represent the build result. +// child resource before the invocation is finalized. For a simple build, at +// least one build action should be created to represent the build result, and +// at at least one test action should be created to represent the test result, +// if any. message Action { // The resource ID components that identify the Action. message Id { @@ -51,7 +54,9 @@ message Action { } // The resource name. Its format must be: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID}/actions/${ACTION_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/url_encode(${CONFIG_ID})/actions/${url_encode(ACTION_ID)} + // + // See CreateActionRequest proto for more information. string name = 1; // The resource ID components that identify the Action. They must match the @@ -95,8 +100,10 @@ message Action { // A list of file references for action level files. // The file IDs must be unique within this list. Duplicate file IDs will // result in an error. Files will be returned in lexicographical order by ID. + // // Files with the following reserved file IDs cause specific post-processing - // or have special handling: + // or have special handling. These files must be immediately available to + // ResultStore for processing when the reference is uploaded. // // For build actions: // stdout: The stdout of the action @@ -113,6 +120,11 @@ message Action { // http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php repeated File files = 8; + // List of names of file sets that are referenced from this Action. + // Each name must point to a file set under the same Invocation. The name + // format must be: invocations/${INVOCATION_ID}/fileSets/${FILE_SET_ID} + repeated string file_sets = 15; + // Coverage data was collected while running the build or test action. This // usually includes line coverage, and may also include branch coverage. // For test actions, this is usually only for the source files which were @@ -300,24 +312,6 @@ message TestWarning { string warning_message = 1; } -// Stores errors reading or parsing a file during post-processing. -message FileProcessingErrors { - // The uid of the File being read or parsed. - string file_uid = 1; - - // What went wrong. - repeated FileProcessingError file_processing_errors = 3; -} - -// Stores an error reading or parsing a file during post-processing. -message FileProcessingError { - // The type of error that occurred. - FileProcessingErrorType type = 1; - - // Error message describing the problem. - string message = 2; -} - // Indicates how/where this Action was executed. enum ExecutionStrategy { // The action did not indicate how it was executed. @@ -352,30 +346,3 @@ enum TestCaching { // The test result was not found in any cache, so it had to be run again. CACHE_MISS = 3; } - -// Errors in file post-processing are categorized using this enum. -enum FileProcessingErrorType { - // Type unspecified or not listed here. - FILE_PROCESSING_ERROR_TYPE_UNSPECIFIED = 0; - - // A read error occurred trying to read the file. - GENERIC_READ_ERROR = 1; - - // There was an error trying to parse the file. - GENERIC_PARSE_ERROR = 2; - - // File is exceeds size limit. - FILE_TOO_LARGE = 3; - - // The result of parsing the file exceeded size limit. - OUTPUT_TOO_LARGE = 4; - - // Read access to the file was denied by file system. - ACCESS_DENIED = 5; - - // Deadline exceeded trying to read the file. - DEADLINE_EXCEEDED = 6; - - // File not found. - NOT_FOUND = 7; -} diff --git a/google/devtools/resultstore/v2/common.proto b/google/devtools/resultstore/v2/common.proto index ea962c91d..1a77f2369 100644 --- a/google/devtools/resultstore/v2/common.proto +++ b/google/devtools/resultstore/v2/common.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -61,17 +61,17 @@ message Dependency { // Action. oneof resource { // The name of a target. Its format must be: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)} // This must point to an target under the same invocation. string target = 1; // The name of a configured target. Its format must be: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIG_ID)} // This must point to an configured target under the same invocation. string configured_target = 2; // The name of an action. Its format must be: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID}/actions/${ACTION_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIG_ID)}/actions/${url_encode(ACTION_ID)} // This must point to an action under the same invocation. string action = 3; } @@ -146,6 +146,9 @@ enum Language { // Protocol Buffer PROTO = 21; + + // Extensible Markup Language + XML = 22; } // Status of a resource. @@ -202,3 +205,20 @@ enum Status { // (E.g. Restricted to a different configuration.) SKIPPED = 13; } + +// Indicates the upload status of the invocation, whether it is +// post-processing, or immutable, etc. +enum UploadStatus { + // The implicit default enum value. Should never be set. + UPLOAD_STATUS_UNSPECIFIED = 0; + + // The invocation is still uploading to the ResultStore. + UPLOADING = 1; + + // The invocation upload is complete. The ResultStore is still post-processing + // the invocation. + POST_PROCESSING = 2; + + // All post-processing is complete, and the invocation is now immutable. + IMMUTABLE = 3; +} diff --git a/google/devtools/resultstore/v2/configuration.proto b/google/devtools/resultstore/v2/configuration.proto index eb3068625..ba37d16d9 100644 --- a/google/devtools/resultstore/v2/configuration.proto +++ b/google/devtools/resultstore/v2/configuration.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ message Configuration { } // The format of this Configuration resource name must be: - // invocations/${INVOCATION_ID}/configs/${CONFIG_ID} + // invocations/${INVOCATION_ID}/configs/${url_encode(CONFIG_ID)} // The configuration ID of "default" should be preferred for the default // configuration in a single-config invocation. string name = 1; @@ -56,6 +56,11 @@ message Configuration { // This is implemented as a multi-map. Multiple properties are allowed with // the same key. Properties will be returned in lexicographical order by key. repeated Property properties = 6; + + // A human-readable name for Configuration. + // It is recommended that this name be unique. + // If omitted, the configuration_id should be used as display_name instead. + string display_name = 8; } // Attributes that apply only to the configuration. diff --git a/google/devtools/resultstore/v2/configured_target.proto b/google/devtools/resultstore/v2/configured_target.proto index 39d2e1d93..a7c337ccd 100644 --- a/google/devtools/resultstore/v2/configured_target.proto +++ b/google/devtools/resultstore/v2/configured_target.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ message ConfiguredTarget { } // The resource name. Its format must be: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIG_ID)} // where ${CONFIG_ID} must match the ID of an existing Configuration under // this Invocation. string name = 1; diff --git a/google/devtools/resultstore/v2/coverage.proto b/google/devtools/resultstore/v2/coverage.proto index 50415a9b0..786f8afb3 100644 --- a/google/devtools/resultstore/v2/coverage.proto +++ b/google/devtools/resultstore/v2/coverage.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -66,9 +66,9 @@ message BranchCoverage { // As each branch can have any one of the following three states: not // executed, executed but not taken, executed and taken. // - // This is a bitfield where i-th bit corresponds to the i-th line. Divide line - // number by 8 to get index into byte array. Mod line number by 8 to get bit - // number (0 = LSB, 7 = MSB). + // This is a bitfield where i-th bit corresponds to the i-th branch. Divide + // branch number by 8 to get index into byte array. Mod branch number by 8 to + // get bit number (0 = LSB, 7 = MSB). // // i-th bit of the following two byte arrays are used to denote the above // mentioned states. @@ -100,3 +100,11 @@ message ActionCoverage { // List of coverage info for all source files that the TestResult covers. repeated FileCoverage file_coverages = 2; } + +// Describes aggregate code coverage for a collection of build or test Actions. +// A line or branch is covered if and only if it is covered in any of the build +// or test actions. +message AggregateCoverage { + // Aggregated coverage info for all source files that the actions cover. + repeated FileCoverage file_coverages = 1; +} diff --git a/google/devtools/resultstore/v2/coverage_summary.proto b/google/devtools/resultstore/v2/coverage_summary.proto index 16f84e3bc..69c599f4d 100644 --- a/google/devtools/resultstore/v2/coverage_summary.proto +++ b/google/devtools/resultstore/v2/coverage_summary.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/devtools/resultstore/v2/download_metadata.proto b/google/devtools/resultstore/v2/download_metadata.proto new file mode 100644 index 000000000..7ace7e989 --- /dev/null +++ b/google/devtools/resultstore/v2/download_metadata.proto @@ -0,0 +1,35 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.devtools.resultstore.v2; + +import "google/devtools/resultstore/v2/common.proto"; + +option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore"; +option java_multiple_files = true; +option java_package = "com.google.devtools.resultstore.v2"; + +// The download metadata for an invocation +message DownloadMetadata { + // The name of the download metadata. Its format will be: + // invocations/${INVOCATION_ID}/downloadMetadata + string name = 1; + + // Indicates the upload status of the invocation, whether it is + // post-processing, or immutable, etc. + UploadStatus upload_status = 2; +} diff --git a/google/devtools/resultstore/v2/file.proto b/google/devtools/resultstore/v2/file.proto index 93217dc97..b10cdfc6a 100644 --- a/google/devtools/resultstore/v2/file.proto +++ b/google/devtools/resultstore/v2/file.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/devtools/resultstore/v2/file_processing_error.proto b/google/devtools/resultstore/v2/file_processing_error.proto new file mode 100644 index 000000000..0b137169b --- /dev/null +++ b/google/devtools/resultstore/v2/file_processing_error.proto @@ -0,0 +1,70 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.devtools.resultstore.v2; + +option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore"; +option java_multiple_files = true; +option java_package = "com.google.devtools.resultstore.v2"; + +// Stores errors reading or parsing a file during post-processing. +message FileProcessingErrors { + // The uid of the File being read or parsed. + string file_uid = 1; + + // What went wrong. + repeated FileProcessingError file_processing_errors = 3; +} + +// Stores an error reading or parsing a file during post-processing. +message FileProcessingError { + // The type of error that occurred. + FileProcessingErrorType type = 1; + + // Error message describing the problem. + string message = 2; +} + +// Errors in file post-processing are categorized using this enum. +enum FileProcessingErrorType { + // Type unspecified or not listed here. + FILE_PROCESSING_ERROR_TYPE_UNSPECIFIED = 0; + + // A read error occurred trying to read the file. + GENERIC_READ_ERROR = 1; + + // There was an error trying to parse the file. + GENERIC_PARSE_ERROR = 2; + + // File is exceeds size limit. + FILE_TOO_LARGE = 3; + + // The result of parsing the file exceeded size limit. + OUTPUT_TOO_LARGE = 4; + + // Read access to the file was denied by file system. + ACCESS_DENIED = 5; + + // Deadline exceeded trying to read the file. + DEADLINE_EXCEEDED = 6; + + // File not found. + NOT_FOUND = 7; + + // File is empty but was expected to have content. + FILE_EMPTY = 8; +} diff --git a/google/devtools/resultstore/v2/file_set.proto b/google/devtools/resultstore/v2/file_set.proto index d46307fc7..06a584377 100644 --- a/google/devtools/resultstore/v2/file_set.proto +++ b/google/devtools/resultstore/v2/file_set.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,7 +23,18 @@ option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/ option java_multiple_files = true; option java_package = "com.google.devtools.resultstore.v2"; -// Represents a set of files within an Invocation. Can contain other file sets. +// This resource represents a set of Files and other (nested) FileSets. +// A FileSet is a node in the graph, and the file_sets field represents the +// outgoing edges. A resource may reference various nodes in the graph to +// represent the transitive closure of all files from those nodes. +// The FileSets must form a directed acyclic graph. The Upload API is unable to +// enforce that the graph is acyclic at write time, and if cycles are written, +// it may cause issues at read time. +// +// A FileSet may be referenced by other resources in conjunction with Files. A +// File is preferred for something that can only be ever referenced by one +// resource, and a FileSet is preferred if it can be reference by multiple +// resources. message FileSet { // The resource ID components that identify the FileSet. message Id { @@ -35,7 +46,7 @@ message FileSet { } // The format of this FileSet resource name must be: - // invocations/${INVOCATION_ID}/fileSets/${FILE_SET_ID} + // invocations/${INVOCATION_ID}/fileSets/${url_encode(FILE_SET_ID)} string name = 1; // The resource ID components that identify the file set. They must match the @@ -48,5 +59,6 @@ message FileSet { repeated string file_sets = 3; // Files that are contained within this file set. + // The uid field in the file should be unique for the Invocation. repeated File files = 4; } diff --git a/google/devtools/resultstore/v2/invocation.proto b/google/devtools/resultstore/v2/invocation.proto index d26266789..253b6daa1 100644 --- a/google/devtools/resultstore/v2/invocation.proto +++ b/google/devtools/resultstore/v2/invocation.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,8 +18,10 @@ syntax = "proto3"; package google.devtools.resultstore.v2; import "google/devtools/resultstore/v2/common.proto"; +import "google/devtools/resultstore/v2/coverage.proto"; import "google/devtools/resultstore/v2/coverage_summary.proto"; import "google/devtools/resultstore/v2/file.proto"; +import "google/devtools/resultstore/v2/file_processing_error.proto"; option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore"; option java_multiple_files = true; @@ -64,15 +66,40 @@ message Invocation { // The file IDs must be unique within this list. Duplicate file IDs will // result in an error. Files will be returned in lexicographical order by ID. // Use this field to specify build logs, and other invocation level logs. + // + // Files with the following reserved file IDs cause specific post-processing + // or have special handling. These files must be immediately available to + // ResultStore for processing when the reference is uploaded. + // + // build.log: The primary log for the Invocation. + // coverage_report.lcov: Aggregate coverage report for the invocation. repeated File files = 8; // Summary of aggregate coverage across all Actions in this Invocation. - // the server populates this for you in the post-processing phase. + // If missing, this data will be populated by the server from the + // coverage_report.lcov file or the union of all ActionCoverages under this + // invocation (in that order). repeated LanguageCoverageSummary coverage_summaries = 9; + + // Aggregate code coverage for all build and test Actions within this + // Invocation. If missing, this data will be populated by the server + // from the coverage_report.lcov file or the union of all ActionCoverages + // under this invocation (in that order). + AggregateCoverage aggregate_coverage = 10; + + // NOT IMPLEMENTED. + // ResultStore will read and parse Files with reserved IDs listed above. Read + // and parse errors for all these Files are reported here. + // This is implemented as a map, with one FileProcessingErrors for each file. + // Typically produced when parsing Files, but may also be provided directly + // by clients. + repeated FileProcessingErrors file_processing_errors = 11; } // If known, represents the state of the user/build-system workspace. -message WorkspaceContext {} +message WorkspaceContext { + +} // Describes the workspace under which the tool was invoked, this includes // information that was fed into the command, the source code referenced, and @@ -115,22 +142,25 @@ message CommandLine { // Attributes that apply to all invocations. message InvocationAttributes { - // The project ID this invocation is associated with. This must be - // set in the CreateInvocation call, and can't be changed. + // Immutable. The Cloud Project that owns this invocation (this is different than the + // Consumer Cloud Project that calls this API). + // This must be set in the CreateInvocation call, and can't be changed. string project_id = 1; // The list of users in the command chain. The first user in this sequence - // is the one who instigated the first command in the chain. + // is the one who instigated the first command in the chain. For example, + // this might contain just the user that ran a Bazel command, or a robot + // that tested a change as part of a CI system. It could also contain the user + // that manually triggered a CI test, then the robot that ran the test. repeated string users = 2; // Labels to categorize this invocation. // This is implemented as a set. All labels will be unique. Any duplicate // labels added will be ignored. Labels will be returned in lexicographical - // order. Labels should be short, easy to read, and you - // shouldn't have more than a handful. - // Labels should match regex \w([- \w]*\w)? - // Labels should not be used for unique properties such as unique IDs. - // Use properties in cases that don't meet these conditions. + // order. Labels should be a list of words describing the Invocation. Labels + // should be short, easy to read, and you shouldn't have more than a handful. + // Labels should not be used for unique properties such as unique IDs. Use + // properties in cases that don't meet these conditions. repeated string labels = 3; // This field describes the overall context or purpose of this invocation. diff --git a/google/devtools/resultstore/v2/resultstore_download.proto b/google/devtools/resultstore/v2/resultstore_download.proto index 23f86d754..902f32445 100644 --- a/google/devtools/resultstore/v2/resultstore_download.proto +++ b/google/devtools/resultstore/v2/resultstore_download.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,24 +19,27 @@ package google.devtools.resultstore.v2; import "google/api/annotations.proto"; import "google/devtools/resultstore/v2/action.proto"; -import "google/devtools/resultstore/v2/common.proto"; import "google/devtools/resultstore/v2/configuration.proto"; import "google/devtools/resultstore/v2/configured_target.proto"; +import "google/devtools/resultstore/v2/download_metadata.proto"; import "google/devtools/resultstore/v2/file_set.proto"; import "google/devtools/resultstore/v2/invocation.proto"; import "google/devtools/resultstore/v2/target.proto"; +import "google/api/client.proto"; option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore"; option java_multiple_files = true; option java_package = "com.google.devtools.resultstore.v2"; -// This is the interface used to download information from the database. +// This is the interface used to download information from the ResultStore +// database. // // Most APIs require setting a response FieldMask via the 'fields' URL query // parameter or the X-Goog-FieldMask HTTP/gRPC header. -// Each resource in this interface carries a name field that -// identifies the resource. service ResultStoreDownload { + option (google.api.default_host) = "resultstore.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Retrieves the invocation with the given name. // // An error will be reported in the following cases: @@ -49,19 +52,32 @@ service ResultStoreDownload { }; } - // Searches for invocations matching the given query parameters. + // Searches for invocations matching the given query parameters. Results will + // be ordered by timing.start_time with most recent first, but total ordering + // of results is not guaranteed when difference in timestamps is very small. + // Results may be stale. // // // An error will be reported in the following cases: // - If a query string is not provided // - If no field mask was given. - rpc SearchInvocations(SearchInvocationsRequest) - returns (SearchInvocationsResponse) { + rpc SearchInvocations(SearchInvocationsRequest) returns (SearchInvocationsResponse) { option (google.api.http) = { get: "/v2/invocations:search" }; } + // Retrieves the metadata for an invocation with the given name. + // + // An error will be reported in the following cases: + // - If the invocation is not found. + // - If the given invocation name is badly formatted. + rpc GetInvocationDownloadMetadata(GetInvocationDownloadMetadataRequest) returns (DownloadMetadata) { + option (google.api.http) = { + get: "/v2/{name=invocations/*/downloadMetadata}" + }; + } + // Retrieves the configuration with the given name. // // An error will be reported in the following cases: @@ -77,13 +93,13 @@ service ResultStoreDownload { // Retrieves all configurations for a parent invocation. // This might be limited by user or server, // in which case a continuation token is provided. + // The order in which results are returned is undefined, but stable. // // An error will be reported in the following cases: // - If the parent invocation is not found. // - If the given parent invocation name is badly formatted. // - If no field mask was given. - rpc ListConfigurations(ListConfigurationsRequest) - returns (ListConfigurationsResponse) { + rpc ListConfigurations(ListConfigurationsRequest) returns (ListConfigurationsResponse) { option (google.api.http) = { get: "/v2/{parent=invocations/*}/configs" }; @@ -103,6 +119,7 @@ service ResultStoreDownload { // Retrieves all targets for a parent invocation. This might be limited by // user or server, in which case a continuation token is provided. + // The order in which results are returned is undefined, but stable. // // An error will be reported in the following cases: // - If the parent is not found. @@ -120,8 +137,7 @@ service ResultStoreDownload { // - If the configured target is not found. // - If the given name is badly formatted. // - If no field mask was given. - rpc GetConfiguredTarget(GetConfiguredTargetRequest) - returns (ConfiguredTarget) { + rpc GetConfiguredTarget(GetConfiguredTargetRequest) returns (ConfiguredTarget) { option (google.api.http) = { get: "/v2/{name=invocations/*/targets/*/configuredTargets/*}" }; @@ -130,13 +146,13 @@ service ResultStoreDownload { // Retrieves all configured targets for a parent invocation/target. // This might be limited by user or server, in which case a continuation // token is provided. Supports '-' for targetId meaning all targets. + // The order in which results are returned is undefined, but stable. // // An error will be reported in the following cases: // - If the parent is not found. // - If the given parent name is badly formatted. // - If no field mask was given. - rpc ListConfiguredTargets(ListConfiguredTargetsRequest) - returns (ListConfiguredTargetsResponse) { + rpc ListConfiguredTargets(ListConfiguredTargetsRequest) returns (ListConfiguredTargetsResponse) { option (google.api.http) = { get: "/v2/{parent=invocations/*/targets/*}/configuredTargets" }; @@ -160,6 +176,7 @@ service ResultStoreDownload { // actions for all configurations for a target, or '-' for targetId and // configurationId to mean all actions for all configurations and all targets. // Does not support targetId '-' with a specified configuration. + // The order in which results are returned is undefined, but stable. // // An error will be reported in the following cases: // - If the parent is not found. @@ -186,6 +203,7 @@ service ResultStoreDownload { // Retrieves all file sets for a parent invocation. // This might be limited by user or server, // in which case a continuation token is provided. + // The order in which results are returned is undefined, but stable. // // An error will be reported in the following cases: // - If the parent invocation is not found. @@ -196,6 +214,24 @@ service ResultStoreDownload { get: "/v2/{parent=invocations/*}/fileSets" }; } + + // Returns the transitive closure of FileSets. This might be limited by user + // or server, in which case a continuation token is provided. + // The order in which results are returned is undefined, and unstable. + // + // An error will be reported in the following cases: + // - If page_token is too large to continue the calculation. + // - If the resource is not found. + // - If the given resource name is badly formatted. + // - If no field mask was given. + rpc TraverseFileSets(TraverseFileSetsRequest) returns (TraverseFileSetsResponse) { + option (google.api.http) = { + get: "/v2/{name=invocations/*/fileSets/*}:traverseFileSets" + additional_bindings { + get: "/v2/{name=invocations/*/targets/*/configuredTargets/*/actions/*}:traverseFileSets" + } + }; + } } // Request passed into GetInvocation @@ -218,15 +254,42 @@ message SearchInvocationsRequest { // any. string page_token = 2; - // Absolute number of results to skip. + // Absolute number of results to skip. May be rejected if too high. int64 offset = 3; } // A filtering query string. + // + // Only a limited number of fields and operators are supported. Not every + // field supports every operator. + // + // Fields that support equals ("=") restrictions: + // + // name + // status_attributes.status + // workspace_info.hostname + // + // Fields that support contains (":") restrictions: + // + // invocation_attributes.users + // invocation_attributes.labels + // + // Fields that support comparison ("<", "<=", ">", ">=") restrictions; + // + // timing.start_time + // + // Supported custom function global restrictions: + // + // propertyEquals("key", "value") string query = 4; // The project id to search under. string project_id = 5; + + // If true, all equals or contains restrictions on string fields in query will + // require exact match. Otherwise, a string field restriction may ignore case + // and punctuation. + bool exact_match = 7; } // Response from calling SearchInvocations @@ -240,10 +303,18 @@ message SearchInvocationsResponse { string next_page_token = 2; } +// Request passed into GetInvocationDownloadMetadata +message GetInvocationDownloadMetadataRequest { + // The name of the download metadata to retrieve. It must match this format: + // invocations/${INVOCATION_ID}/downloadMetadata + // where INVOCATION_ID must be an RFC 4122-compliant random UUID. + string name = 1; +} + // Request passed into GetConfiguration message GetConfigurationRequest { // The name of the configuration to retrieve. It must match this format: - // invocations/${INVOCATION_ID}/configs/${CONFIGURATION_ID} + // invocations/${INVOCATION_ID}/configs/${url_encode(CONFIGURATION_ID)} string name = 1; } @@ -265,6 +336,11 @@ message ListConfigurationsRequest { // Absolute number of results to skip. int64 offset = 4; } + + // A filter to return only resources that match it. + // Any fields used in the filter must be also specified in the field mask. + // May cause pages with 0 results and a next_page_token to be returned. + string filter = 5; } // Response from calling ListConfigurations @@ -281,7 +357,7 @@ message ListConfigurationsResponse { // Request passed into GetTarget message GetTargetRequest { // The name of the target to retrieve. It must match this format: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)} string name = 1; } @@ -303,6 +379,11 @@ message ListTargetsRequest { // Absolute number of results to skip. int64 offset = 4; } + + // A filter to return only resources that match it. + // Any fields used in the filter must be also specified in the field mask. + // May cause pages with 0 results and a next_page_token to be returned. + string filter = 5; } // Response from calling ListTargetsResponse @@ -319,7 +400,7 @@ message ListTargetsResponse { // Request passed into GetConfiguredTarget message GetConfiguredTargetRequest { // The name of the configured target to retrieve. It must match this format: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIGURATION_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIGURATION_ID)} string name = 1; } @@ -327,7 +408,8 @@ message GetConfiguredTargetRequest { message ListConfiguredTargetsRequest { // The invocation and target name of the configured targets to retrieve. // It must match this format: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)} + // Supports '-' for ${TARGET_ID} meaning all targets. string parent = 1; // The maximum number of items to return. @@ -342,6 +424,11 @@ message ListConfiguredTargetsRequest { // Absolute number of results to skip. int64 offset = 4; } + + // A filter to return only resources that match it. + // Any fields used in the filter must be also specified in the field mask. + // May cause pages with 0 results and a next_page_token to be returned. + string filter = 5; } // Response from calling ListConfiguredTargets @@ -358,7 +445,7 @@ message ListConfiguredTargetsResponse { // Request passed into GetAction message GetActionRequest { // The name of the action to retrieve. It must match this format: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIGURATION_ID}/actions/${ACTION_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIGURATION_ID)}/actions/${url_encode(ACTION_ID)} string name = 1; } @@ -366,7 +453,11 @@ message GetActionRequest { message ListActionsRequest { // The invocation, target, and configuration name of the action to retrieve. // It must match this format: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIGURATION_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIGURATION_ID)} + // Supports '-' for ${CONFIGURATION_ID} to mean all Actions for all + // Configurations for a Target, or '-' for ${TARGET_ID} and + // ${CONFIGURATION_ID} to mean all Actions for all Configurations and all + // Targets. Does not support ${TARGET_ID} '-' with a specified configuration. string parent = 1; // The maximum number of items to return. @@ -381,6 +472,11 @@ message ListActionsRequest { // Absolute number of results to skip. int64 offset = 4; } + + // A filter to return only resources that match it. + // Any fields used in the filter must be also specified in the field mask. + // May cause pages with 0 results and a next_page_token to be returned. + string filter = 5; } // Response from calling ListActions @@ -397,7 +493,7 @@ message ListActionsResponse { // Request passed into GetFileSet message GetFileSetRequest { // The name of the file set to retrieve. It must match this format: - // invocations/${INVOCATION_ID}/fileSets/${FILE_SET_ID} + // invocations/${INVOCATION_ID}/fileSets/${url_encode(FILE_SET_ID)} string name = 1; } @@ -419,6 +515,11 @@ message ListFileSetsRequest { // Absolute number of results to skip. int64 offset = 4; } + + // A filter to return only resources that match it. + // Any fields used in the filter must be also specified in the field mask. + // May cause pages with 0 results and a next_page_token to be returned. + string filter = 5; } // Response from calling ListFileSets @@ -431,3 +532,49 @@ message ListFileSetsResponse { // more results in the list. string next_page_token = 2; } + +// Request passed into TraverseFileSets +message TraverseFileSetsRequest { + // The name of the resource to traverse. + // It must match one of the following formats: + // + // invocations/${INVOCATION_ID}/fileSets/${url_encode(FILE_SET_ID)} + // This returns the transitive closure of FileSets referenced by the given + // FileSet, including itself. + // + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIGURATION_ID)}/actions/${url_encode(ACTION_ID)} + // This returns the transitive closure of FileSets referenced by the given + // Action. If ${ACTION_ID} is "-", this returns the transitive closure of + // FileSets referenced by all Actions under the given ConfiguredTarget. + string name = 1; + + // The maximum number of items to return. + // Zero means all, but may be capped by the server. + int32 page_size = 2; + + // Options for pagination. + oneof page_start { + // The next_page_token value returned from a previous List request, if any. + // Page tokens will become larger with every page returned, and if a page + // token becomes too large, it will no longer be possible to continue to + // calculate the transitive dependencies. The API will return a 400 + // Bad request (HTTPS), or a INVALID_ARGUMENT (gRPC ) when + // this happens. + string page_token = 3; + + // Absolute number of results to skip. + // Not yet implemented. 0 for default. + int64 offset = 4; + } +} + +// Response from calling TraverseFileSets +message TraverseFileSetsResponse { + // File sets matching the request. + // The order in which results are returned is undefined, but stable. + repeated FileSet file_sets = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} diff --git a/google/devtools/resultstore/v2/resultstore_file_download.proto b/google/devtools/resultstore/v2/resultstore_file_download.proto index 5d2c5ec5c..184813eb0 100644 --- a/google/devtools/resultstore/v2/resultstore_file_download.proto +++ b/google/devtools/resultstore/v2/resultstore_file_download.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ syntax = "proto3"; package google.devtools.resultstore.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore"; option java_multiple_files = true; @@ -26,6 +27,9 @@ option java_package = "com.google.devtools.resultstore.v2"; // This API allows download of File messages referenced in // ResultStore resources. service ResultStoreFileDownload { + option (google.api.default_host) = "resultstore.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Retrieves the File with the given uri. // returns a stream of bytes to be stitched together in order. // @@ -70,6 +74,11 @@ message GetFileRequest { // error occurred, the stream includes all data from the `read_offset` to the // end of the resource. int64 read_limit = 3; + + // Only applies if the referenced file is a known archive type (ar, jar, zip) + // The above read_offset and read_limit fields are applied to this entry. + // If this file is not an archive, INVALID_ARGUMENT is thrown. + string archive_entry = 4; } // Response object for GetFile @@ -96,6 +105,11 @@ message GetFileTailRequest { // A `read_limit` of zero indicates that there is no limit, and a negative // `read_limit` will cause an error. int64 read_limit = 3; + + // Only applies if the referenced file is a known archive type (ar, jar, zip) + // The above read_offset and read_limit fields are applied to this entry. + // If this file is not an archive, INVALID_ARGUMENT is thrown. + string archive_entry = 4; } // Response object for GetFileTail diff --git a/google/devtools/resultstore/v2/resultstore_upload.proto b/google/devtools/resultstore/v2/resultstore_upload.proto index 685f17782..85367283c 100644 --- a/google/devtools/resultstore/v2/resultstore_upload.proto +++ b/google/devtools/resultstore/v2/resultstore_upload.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,8 +24,11 @@ import "google/devtools/resultstore/v2/configured_target.proto"; import "google/devtools/resultstore/v2/file_set.proto"; import "google/devtools/resultstore/v2/invocation.proto"; import "google/devtools/resultstore/v2/target.proto"; +import "google/devtools/resultstore/v2/upload_metadata.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/client.proto"; option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore"; option java_multiple_files = true; @@ -33,12 +36,20 @@ option java_package = "com.google.devtools.resultstore.v2"; // This is the interface used to upload information to the ResultStore database, // to update that information as necessary, and to make it immutable at the end. -// Every Update and Append method supports an update_mask field for restricting -// the affected fields. +// +// This interface intentionally does not support user read-modify-write +// operations. They may corrupt data, and are too expensive. For the same +// reason, all upload RPCs will return no resource fields except name and ID. An +// uploader should hold as little state as possible in memory to avoid running +// out of memory. service ResultStoreUpload { - // Creates the given invocation. Generally, a unique ID will be assigned to - // the invocation's name field by the server. This is not an implicitly - // idempotent API, so a request id is required to make it idempotent. + option (google.api.default_host) = "resultstore.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates the given invocation. + // + // This is not an implicitly idempotent API, so a request id is required to + // make it idempotent. // // Returns an empty Invocation proto with only the name and ID fields // populated. @@ -63,7 +74,7 @@ service ResultStoreUpload { // // An error will be reported in the following cases: // - If the invocation does not exist. - // - If the invocation is finished. + // - If the invocation is finalized. // - If no field mask was given. rpc UpdateInvocation(UpdateInvocationRequest) returns (Invocation) { option (google.api.http) = { @@ -72,22 +83,73 @@ service ResultStoreUpload { }; } - // Declares the invocation with the given name as finished and immutable. - // This is an implicitly idempotent API. + // Applies a merge update to the invocation identified by the given proto's + // name. For primitive and message fields, replaces them with the ones in + // the given proto if they are covered under the field mask paths. For + // repeated fields, merges to them with the given ones if they are covered + // under the field mask paths. This is not an implicitly idempotent API, so a + // request id is required to make it idempotent. + // + // Returns an empty Invocation proto with only the name and ID fields + // populated. + // + // + // An error will be reported in the following cases: + // - If the invocation does not exist. + // - If the invocation is finalized. + // - If no field mask was given. + rpc MergeInvocation(MergeInvocationRequest) returns (Invocation) { + option (google.api.http) = { + post: "/v2/{invocation.name=invocations/*}:merge" + body: "*" + }; + } + + // Touches the invocation identified by the given proto's name. + // + // This is useful when you need to notify ResultStore that you haven't + // abandoned the upload, since abandoned uploads will be automatically + // finalized after a set period. + // + // An error will be reported in the following cases: + // - If the invocation does not exist. + // - If the invocation is finalized. + rpc TouchInvocation(TouchInvocationRequest) returns (TouchInvocationResponse) { + option (google.api.http) = { + post: "/v2/{name=invocations/*}:touch" + body: "*" + }; + } + + // Declares the invocation with the given name as finalized and immutable by + // the user. It may still be mutated by post-processing. This is an implicitly + // idempotent API. // // If an Invocation is not updated for 24 hours, some time after that // this will be called automatically. // // An error will be reported in the following cases: // - If the invocation does not exist. - rpc FinishInvocation(FinishInvocationRequest) - returns (FinishInvocationResponse) { + rpc FinalizeInvocation(FinalizeInvocationRequest) returns (FinalizeInvocationResponse) { option (google.api.http) = { - post: "/v2/{name=invocations/*}:finish" + post: "/v2/{name=invocations/*}:finalize" body: "*" }; } + // Deletes an immutable invocation (permanently) + // Note: this does not delete indirect data, e.g. files stored in other + // services. + // + // An error will be reported in the following cases: + // - If the invocation does not exist. + // - If the invocation is not finalized. This can be retried until it is. + rpc DeleteInvocation(DeleteInvocationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=invocations/*}" + }; + } + // Creates the given target under the given parent invocation. The given // target ID is URL encoded, converted to the full resource name, and assigned // to the target's name field. This is not an implicitly idempotent API, so a @@ -98,7 +160,7 @@ service ResultStoreUpload { // An error will be reported in the following cases: // - If no target ID is provided. // - If the parent invocation does not exist. - // - If the parent invocation is finished. + // - If the parent invocation is finalized. // - If a target with the same name already exists. rpc CreateTarget(CreateTargetRequest) returns (Target) { option (google.api.http) = { @@ -117,7 +179,7 @@ service ResultStoreUpload { // // An error will be reported in the following cases: // - If the target does not exist. - // - If the target or parent invocation is finished. + // - If the target or parent invocation is finalized. // - If no field mask was given. rpc UpdateTarget(UpdateTargetRequest) returns (Target) { option (google.api.http) = { @@ -126,14 +188,36 @@ service ResultStoreUpload { }; } - // Declares the target with the given name as finished and immutable. - // This is an implicitly idempotent API. + // Applies a merge update to the target identified by the given proto's + // name. For primitive and message fields, replaces them with the ones in the + // given proto if they are covered under the field mask paths. For repeated + // fields, merges to them with the given ones if they are covered under the + // field mask paths. This is not an implicitly idempotent API, so a request + // id is required to make it idempotent. + // + // Returns an empty Target proto with only the name and ID fields populated. + // + // + // An error will be reported in the following cases: + // - If the target does not exist. + // - If the target or parent invocation is finalized. + // - If no field mask was given. + rpc MergeTarget(MergeTargetRequest) returns (Target) { + option (google.api.http) = { + post: "/v2/{target.name=invocations/*/targets/*}:merge" + body: "*" + }; + } + + // Declares the target with the given name as finalized and immutable by the + // user. It may still be mutated by post-processing. This is an implicitly + // idempotent API. // // An error will be reported in the following cases: // - If the target does not exist. - rpc FinishTarget(FinishTargetRequest) returns (FinishTargetResponse) { + rpc FinalizeTarget(FinalizeTargetRequest) returns (FinalizeTargetResponse) { option (google.api.http) = { - post: "/v2/{name=invocations/*/targets/*}:finish" + post: "/v2/{name=invocations/*/targets/*}:finalize" body: "*" }; } @@ -151,9 +235,8 @@ service ResultStoreUpload { // - If no config ID is provided. // - If a configured target with the same ID already exists. // - If the parent target does not exist. - // - If the parent target or invocation is finished. - rpc CreateConfiguredTarget(CreateConfiguredTargetRequest) - returns (ConfiguredTarget) { + // - If the parent target or invocation is finalized. + rpc CreateConfiguredTarget(CreateConfiguredTargetRequest) returns (ConfiguredTarget) { option (google.api.http) = { post: "/v2/{parent=invocations/*/targets/*}/configuredTargets" body: "configured_target" @@ -171,25 +254,46 @@ service ResultStoreUpload { // // An error will be reported in the following cases: // - If the configured target does not exist. - // - If the parent target or invocation is finished. + // - If the parent target or invocation is finalized. // - If no field mask was given. - rpc UpdateConfiguredTarget(UpdateConfiguredTargetRequest) - returns (ConfiguredTarget) { + rpc UpdateConfiguredTarget(UpdateConfiguredTargetRequest) returns (ConfiguredTarget) { option (google.api.http) = { patch: "/v2/{configured_target.name=invocations/*/targets/*/configuredTargets/*}" body: "configured_target" }; } - // Declares the configured target with the given name as finished and - // immutable. This is an implicitly idempotent API. + // Applies a merge update to the configured target identified by the given + // proto's name. For primitive and message fields, replaces them with the + // ones in the given proto if they are covered under the field mask paths. + // For repeated fields, merges to them with the given ones if they are + // covered under the field mask paths. This is not an implicitly idempotent + // API, so a request id is required to make it idempotent. + // + // Returns an empty ConfiguredTarget proto with only the name and ID fields + // populated. + // + // + // An error will be reported in the following cases: + // - If the configured target does not exist. + // - If the parent target or invocation is finalized. + // - If no field mask was given. + rpc MergeConfiguredTarget(MergeConfiguredTargetRequest) returns (ConfiguredTarget) { + option (google.api.http) = { + post: "/v2/{configured_target.name=invocations/*/targets/*/configuredTargets/*}:merge" + body: "*" + }; + } + + // Declares the configured target with the given name as finalized and + // immutable by the user. It may still be mutated by post-processing. This is + // an implicitly idempotent API. // // An error will be reported in the following cases: // - If the configured target does not exist. - rpc FinishConfiguredTarget(FinishConfiguredTargetRequest) - returns (FinishConfiguredTargetResponse) { + rpc FinalizeConfiguredTarget(FinalizeConfiguredTargetRequest) returns (FinalizeConfiguredTargetResponse) { option (google.api.http) = { - post: "/v2/{name=invocations/*/targets/*/configuredTargets/*}:finish" + post: "/v2/{name=invocations/*/targets/*/configuredTargets/*}:finalize" body: "*" }; } @@ -204,7 +308,7 @@ service ResultStoreUpload { // An error will be reported in the following cases: // - If no action ID provided. // - If the parent configured target does not exist. - // - If the parent target or invocation is finished. + // - If the parent target or invocation is finalized. // - If an action with the same name already exists. rpc CreateAction(CreateActionRequest) returns (Action) { option (google.api.http) = { @@ -223,7 +327,7 @@ service ResultStoreUpload { // // An error will be reported in the following cases: // - If the action does not exist. - // - If the parent target or invocation is finished. + // - If the parent target or invocation is finalized. // - If no field mask was given. rpc UpdateAction(UpdateActionRequest) returns (Action) { option (google.api.http) = { @@ -232,6 +336,27 @@ service ResultStoreUpload { }; } + // Applies a merge update to the action identified by the given + // proto's name. For primitive and message fields, replaces them with the + // ones in the given proto if they are covered under the field mask paths. + // For repeated fields, merges to them with the given ones if they are + // covered under the field mask paths. This is not an implicitly idempotent + // API, so a request id is required to make it idempotent. + // + // Returns an empty Action proto with only the name and ID fields populated. + // + // + // An error will be reported in the following cases: + // - If the action does not exist. + // - If the parent target or invocation is finalized. + // - If no field mask was given. + rpc MergeAction(MergeActionRequest) returns (Action) { + option (google.api.http) = { + post: "/v2/{action.name=invocations/*/targets/*/configuredTargets/*/actions/*}:merge" + body: "*" + }; + } + // Creates the given configuration under the given parent invocation. The // given configuration ID is URL encoded, converted to the full resource name, // and assigned to the configuration's name field. The configuration ID of @@ -245,7 +370,7 @@ service ResultStoreUpload { // An error will be reported in the following cases: // - If no configuration ID is provided. // - If the parent invocation does not exist. - // - If the parent invocation is finished. + // - If the parent invocation is finalized. // - If a configuration with the same name already exists. rpc CreateConfiguration(CreateConfigurationRequest) returns (Configuration) { option (google.api.http) = { @@ -265,7 +390,7 @@ service ResultStoreUpload { // // An error will be reported in the following cases: // - If the configuration does not exist. - // - If the parent invocation is finished. + // - If the parent invocation is finalized. // - If no field mask was given. // - If a given field mask path is not valid. rpc UpdateConfiguration(UpdateConfigurationRequest) returns (Configuration) { @@ -286,7 +411,7 @@ service ResultStoreUpload { // - If no file set ID is provided. // - If a file set with the same name already exists. // - If the parent invocation does not exist. - // - If the parent invocation is finished. + // - If the parent invocation is finalized. rpc CreateFileSet(CreateFileSetRequest) returns (FileSet) { option (google.api.http) = { post: "/v2/{parent=invocations/*}/fileSets" @@ -304,7 +429,7 @@ service ResultStoreUpload { // // An error will be reported in the following cases: // - If the file set does not exist. - // - If the parent invocation is finished. + // - If the parent invocation is finalized. // - If no field mask was given. // - If a given field mask path is not valid. rpc UpdateFileSet(UpdateFileSetRequest) returns (FileSet) { @@ -313,6 +438,61 @@ service ResultStoreUpload { body: "file_set" }; } + + // Applies a merge update to the file set identified by the given proto's + // name. For primitive and message fields, updates them with the ones in the + // given proto if they are covered under the field mask paths. For repeated + // fields, merges to them with the given ones if they are covered under the + // field mask paths. This is not an implicitly idempotent API, so a request + // id is required to make it idempotent. + // + // Returns an empty FileSet proto with only the name and ID fields populated. + // + // + // An error will be reported in the following cases: + // - If the file set does not exist. + // - If the parent invocation is finalized. + // - If a given field mask path is not valid. + // - If no field mask was given. + rpc MergeFileSet(MergeFileSetRequest) returns (FileSet) { + option (google.api.http) = { + post: "/v2/{file_set.name=invocations/*/fileSets/*}:merge" + body: "*" + }; + } + + // This is the RPC used for batch upload. It supports uploading multiple + // resources for an invocation in a transaction safe manner. + // + // To use this RPC, the CreateInvocationRequest must have been provided a + // resume_token. + // + // Combining batch upload with normal upload on a single Invocation is not + // supported. If an Invocation is created with a resume_token, all further + // calls must be through UploadBatch. If an Invocation is created without + // resume_token normal upload, all further upload calls must be through normal + // upload RPCs. + rpc UploadBatch(UploadBatchRequest) returns (UploadBatchResponse) { + option (google.api.http) = { + post: "/v2/{parent=invocations/*}/batch:upload" + body: "*" + }; + } + + // Provides a way to read the metadata for an invocation. + // The UploadMetadata could still be retrieved by this RPC even the Invocation + // has been finalized. + // This API requires setting a response FieldMask via 'fields' URL query + // parameter or X-Goog-FieldMask HTTP/gRPC header. + // + // An error will be reported in the following case: + // - If the invocation does not exist. + // - If no field mask was given. + rpc GetInvocationUploadMetadata(GetInvocationUploadMetadataRequest) returns (UploadMetadata) { + option (google.api.http) = { + get: "/v2/{name=invocations/*/uploadMetadata}" + }; + } } // Request passed into CreateInvocation @@ -322,12 +502,14 @@ message CreateInvocationRequest { // for the operation to be idempotent. This is achieved by ignoring this // request if the last successful operation on the resource had the same // request ID. If set, invocation_id must also be provided. - // Restricted to 36 utf-8 bytes. + // Restricted to 36 Unicode characters. string request_id = 1; - // The invocation ID. If left empty then a new unique ID will be - // assigned by the server. If populated, a RFC 4122-compliant v4 UUID is - // preferred, but v3 or v5 UUIDs are allowed too. + // The invocation ID. It is optional, but strongly recommended. + // + // If left empty then a new unique ID will be assigned by the server. If + // populated, a RFC 4122-compliant v4 UUID is preferred, but v3 or v5 UUIDs + // are allowed too. string invocation_id = 2; // The invocation to create. Its name field will be ignored, since the name @@ -348,10 +530,42 @@ message CreateInvocationRequest { // a "password" to the invocation. string authorization_token = 4; - // By default, Invocations are auto-finished if they are not modified for 24 - // hours. If you need auto-finish to happen sooner, set this field to the time - // you'd like auto-finish to occur. - google.protobuf.Timestamp auto_finish_time = 5; + // By default, Invocations are auto-finalized if they are not modified for 24 + // hours. If you need auto-finalize to happen sooner, set this field to the + // time you'd like auto-finalize to occur. + google.protobuf.Timestamp auto_finalize_time = 6; + + // Client provided unique token for batch upload to ensure data integrity and + // to provide a way to resume batch upload in case of a distributed failure on + // the client side. The standard uploading client is presumed to have many + // machines uploading to ResultStore, and that any given machine could process + // any given Invocation at any time. This field is used to coordinate between + // the client's machines, resolve concurrency issues, and enforce "exactly + // once" semantics on each batch within the upload. + // + // The typical usage of the resume_token is that it should contain a "key" + // indicating to the client where it is in the upload process, so that the + // client can use it to resume the upload by reconstructing the state of + // upload from the point where it was interrupted. + // + // If this matches the previously uploaded resume_token, then this request + // will silently do nothing, making CreateInvocation idempotent. + // If this token is provided, all further upload RPCs must be done through + // UploadBatch. This token must not be combined with request_id. + // Must be web safe Base64 encoded bytes. + string initial_resume_token = 7; + + // Client-specific data used to resume batch upload if an error occurs and + // retry is needed. This serves a role closely related to resume_token, as + // both fields may be used to provide state required to restore a Batch + // Upload, but they differ in two important aspects: + // - it is not compared to previous values, and as such does not provide + // concurrency control; + // - it allows for a larger payload, since the contents are never + // inspected/compared; + // The size of the message must be within 1 MiB. Too large requests will be + // rejected. + bytes uploader_state = 8; } // Request passed into UpdateInvocation @@ -368,8 +582,57 @@ message UpdateInvocationRequest { string authorization_token = 5; } -// Request passed into FinishInvocation -message FinishInvocationRequest { +// Request passed into MergeInvocation +message MergeInvocationRequest { + // A unique identifier for this request. Must be set to a different value for + // each request that affects a given resource (eg. a random UUID). Required + // for the operation to be idempotent. This is achieved by ignoring this + // request if the last successful operation on the resource had the same + // request ID. Restricted to 36 Unicode characters. + string request_id = 1; + + // Contains the name and the fields of the invocation to be merged. The + // name format must be: invocations/${INVOCATION_ID} + Invocation invocation = 3; + + // Indicates which fields to merge. + google.protobuf.FieldMask update_mask = 4; + + // This is a token to authorize access to this invocation. It must be set to + // the same value that was provided in the CreateInvocationRequest. + string authorization_token = 5; +} + +// Request passed into TouchInvocation +message TouchInvocationRequest { + // The name of the invocation. Its format must be: + // invocations/${INVOCATION_ID} + string name = 1; + + // This is a token to authorize access to this invocation. It must be set to + // the same value that was provided in the CreateInvocationRequest. + string authorization_token = 2; +} + +// Response returned from TouchInvocation +message TouchInvocationResponse { + // The name of the invocation. Its format will be: + // invocations/${INVOCATION_ID} + string name = 1; + + // The resource ID components that identify the Invocation. + Invocation.Id id = 2; +} + +// Request passed into DeleteInvocation +message DeleteInvocationRequest { + // The name of the invocation. Its format must be: + // invocations/${INVOCATION_ID} + string name = 1; +} + +// Request passed into FinalizeInvocation +message FinalizeInvocationRequest { // The name of the invocation. Its format must be: // invocations/${INVOCATION_ID} string name = 1; @@ -379,8 +642,8 @@ message FinishInvocationRequest { string authorization_token = 3; } -// Response returned from FinishInvocation -message FinishInvocationResponse { +// Response returned from FinalizeInvocation +message FinalizeInvocationResponse { // The name of the invocation. Its format will be: // invocations/${INVOCATION_ID} string name = 1; @@ -395,15 +658,15 @@ message CreateTargetRequest { // each request that affects a given resource (eg. a random UUID). Required // for the operation to be idempotent. This is achieved by ignoring this // request if the last successful operation on the resource had the same - // request ID. Restricted to 36 utf-8 bytes. + // request ID. Restricted to 36 Unicode characters. string request_id = 1; // The name of the parent invocation in which the target is created. // Its format must be invocations/${INVOCATION_ID} string parent = 2; - // The target identifier. It can be any UTF-8 string up to 1024 bytes long - // except for the reserved id '-'. + // The target identifier. It can be any string up to 1024 Unicode characters + // long except for the reserved id '-'. string target_id = 3; // The target to create. Its name field will be ignored, since the name will @@ -418,7 +681,8 @@ message CreateTargetRequest { // Request passed into UpdateTarget message UpdateTargetRequest { // Contains the name and the fields of the target to be updated. The name - // format must be: invocations/${INVOCATION_ID}/targets/${TARGET_ID} + // format must be: + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)} Target target = 3; // Indicates which fields to update. @@ -427,12 +691,42 @@ message UpdateTargetRequest { // This is a token to authorize access to this invocation. It must be set to // the same value that was provided in the CreateInvocationRequest. string authorization_token = 5; + + // If true then the Update operation will become a Create operation if the + // Target is NOT_FOUND. + bool create_if_not_found = 6; } -// Request passed into FinishTarget -message FinishTargetRequest { +// Request passed into MergeTarget +message MergeTargetRequest { + // A unique identifier for this request. Must be set to a different value for + // each request that affects a given resource (eg. a random UUID). Required + // for the operation to be idempotent. This is achieved by ignoring this + // request if the last successful operation on the resource had the same + // request ID. Restricted to 36 Unicode characters. + string request_id = 1; + + // Contains the name and the fields of the target to be merged. The name + // format must be: + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)} + Target target = 3; + + // Indicates which fields to merge. + google.protobuf.FieldMask update_mask = 4; + + // This is a token to authorize access to this invocation. It must be set to + // the same value that was provided in the CreateInvocationRequest. + string authorization_token = 5; + + // If true then the Merge operation will become a Create operation if the + // Target is NOT_FOUND. + bool create_if_not_found = 6; +} + +// Request passed into FinalizeTarget +message FinalizeTargetRequest { // The name of the target. Its format must be: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)} string name = 1; // This is a token to authorize access to this invocation. It must be set to @@ -440,10 +734,10 @@ message FinishTargetRequest { string authorization_token = 3; } -// Response returned from FinishTarget -message FinishTargetResponse { +// Response returned from FinalizeTarget +message FinalizeTargetResponse { // The name of the target. Its format will be: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)} string name = 1; // The resource ID components that identify the Target. @@ -456,12 +750,12 @@ message CreateConfiguredTargetRequest { // each request that affects a given resource (eg. a random UUID). Required // for the operation to be idempotent. This is achieved by ignoring this // request if the last successful operation on the resource had the same - // request ID. Restricted to 36 utf-8 bytes. + // request ID. Restricted to 36 Unicode characters. string request_id = 1; // The name of the parent target in which the configured target is created. // Its format must be: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)} string parent = 2; // The configuration identifier. This must match the ID of an existing @@ -481,7 +775,7 @@ message CreateConfiguredTargetRequest { message UpdateConfiguredTargetRequest { // Contains the name and the fields of the configured target to be updated. // The name format must be: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIG_ID)} ConfiguredTarget configured_target = 3; // Indicates which fields to update. @@ -490,12 +784,42 @@ message UpdateConfiguredTargetRequest { // This is a token to authorize access to this invocation. It must be set to // the same value that was provided in the CreateInvocationRequest. string authorization_token = 5; + + // If true then the Update operation will become a Create operation if the + // ConfiguredTarget is NOT_FOUND. + bool create_if_not_found = 6; } -// Request passed into FinishConfiguredTarget -message FinishConfiguredTargetRequest { +// Request passed into MergeConfiguredTarget +message MergeConfiguredTargetRequest { + // A unique identifier for this request. Must be set to a different value for + // each request that affects a given resource (eg. a random UUID). Required + // for the operation to be idempotent. This is achieved by ignoring this + // request if the last successful operation on the resource had the same + // request ID. Restricted to 36 Unicode characters. + string request_id = 1; + + // Contains the name and the fields of the configured target to be merged. + // The name format must be: + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIG_ID)} + ConfiguredTarget configured_target = 3; + + // Indicates which fields to merge. + google.protobuf.FieldMask update_mask = 4; + + // This is a token to authorize access to this invocation. It must be set to + // the same value that was provided in the CreateInvocationRequest. + string authorization_token = 5; + + // If true then the Merge operation will become a Create operation if the + // ConfiguredTarget is NOT_FOUND. + bool create_if_not_found = 6; +} + +// Request passed into FinalizeConfiguredTarget +message FinalizeConfiguredTargetRequest { // The name of the configured target. Its format must be: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIG_ID)} string name = 1; // This is a token to authorize access to this invocation. It must be set to @@ -503,10 +827,10 @@ message FinishConfiguredTargetRequest { string authorization_token = 3; } -// Response returned from FinishConfiguredTarget -message FinishConfiguredTargetResponse { +// Response returned from FinalizeConfiguredTarget +message FinalizeConfiguredTargetResponse { // The name of the configured target. Its format must be: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIG_ID)} string name = 1; // The resource ID components that identify the ConfiguredTarget. @@ -519,16 +843,24 @@ message CreateActionRequest { // each request that affects a given resource (eg. a random UUID). Required // for the operation to be idempotent. This is achieved by ignoring this // request if the last successful operation on the resource had the same - // request ID. Restricted to 36 utf-8 bytes. + // request ID. Restricted to 36 Unicode characters. string request_id = 1; // The name of the parent configured target in which the action is created. // Its format must be: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIG_ID)} string parent = 2; - // The action identifier. It can be any UTF-8 string up to 512 bytes long, - // except for the reserved id '-'. + // The action identifier. It can be any string up to 512 Unicode characters + // long, except for the reserved id '-'. + // + // Recommended IDs for Test Actions: + // "test": For a single test action. + // "test_shard0_run0_attempt0" ... "test_shard9_run9_attempt9": For tests with + // shard/run/attempts. + // + // Recommended IDs for Build Actions: + // "build": If you only have a single build action. string action_id = 3; // The action to create. Its name field will be ignored, since the @@ -544,7 +876,7 @@ message CreateActionRequest { message UpdateActionRequest { // Contains the name and the fields of the action to be updated. The // name format must be: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID}/actions/${ACTION_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIG_ID)}/actions/${url_encode(ACTION_ID)} Action action = 3; // Indicates which fields to update. @@ -553,6 +885,36 @@ message UpdateActionRequest { // This is a token to authorize access to this invocation. It must be set to // the same value that was provided in the CreateInvocationRequest. string authorization_token = 5; + + // If true then the Update operation will become a Create operation if the + // Action is NOT_FOUND. + bool create_if_not_found = 6; +} + +// Request passed into MergeAction +message MergeActionRequest { + // A unique identifier for this request. Must be set to a different value for + // each request that affects a given resource (eg. a random UUID). Required + // for the operation to be idempotent. This is achieved by ignoring this + // request if the last successful operation on the resource had the same + // request ID. Restricted to 36 Unicode characters. + string request_id = 1; + + // Contains the name and the fields of the action to be merged. The + // name format must be: + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIG_ID)}/actions/${url_encode(ACTION_ID)} + Action action = 3; + + // Indicates which fields to merge. + google.protobuf.FieldMask update_mask = 4; + + // This is a token to authorize access to this invocation. It must be set to + // the same value that was provided in the CreateInvocationRequest. + string authorization_token = 5; + + // If true then the Merge operation will become a Create operation if the + // Action is NOT_FOUND. + bool create_if_not_found = 6; } // Request passed into CreateConfiguration @@ -561,16 +923,17 @@ message CreateConfigurationRequest { // each request that affects a given resource (eg. a random UUID). Required // for the operation to be idempotent. This is achieved by ignoring this // request if the last successful operation on the resource had the same - // request ID. Restricted to 36 utf-8 bytes. + // request ID. Restricted to 36 Unicode characters. string request_id = 1; // The name of the parent invocation in which the configuration is created. // Its format must be invocations/${INVOCATION_ID} string parent = 2; - // The configuration identifier. It can be any UTF-8 string up to 256 bytes - // long. The configuration ID of "default" should be preferred for the default - // configuration in a single-config invocation. Cannot be the reserved id '-'. + // The configuration identifier. It can be any string up to 256 Unicode + // characters long. The configuration ID of "default" should be preferred for + // the default configuration in a single-config invocation. Cannot be the + // reserved id '-'. string config_id = 3; // The configuration to create. Its name field will be ignored, since the name @@ -585,7 +948,8 @@ message CreateConfigurationRequest { // Request passed into UpdateConfiguration message UpdateConfigurationRequest { // Contains the name and fields of the configuration to be updated. The name - // format must be: invocations/${INVOCATION_ID}/configs/${CONFIG_ID} + // format must be: + // invocations/${INVOCATION_ID}/configs/${url_encode(CONFIG_ID)} Configuration configuration = 3; // Indicates which fields to update. @@ -594,6 +958,10 @@ message UpdateConfigurationRequest { // This is a token to authorize access to this invocation. It must be set to // the same value that was provided in the CreateInvocationRequest. string authorization_token = 5; + + // If true then the Update operation will become a Create operation if the + // Configuration is NOT_FOUND. + bool create_if_not_found = 6; } // Request passed into CreateFileSet @@ -602,14 +970,15 @@ message CreateFileSetRequest { // each request that affects a given resource (eg. a random UUID). Required // for the operation to be idempotent. This is achieved by ignoring this // request if the last successful operation on the resource had the same - // request ID. Restricted to 36 utf-8 bytes. + // request ID. Restricted to 36 Unicode characters. string request_id = 1; // The name of the parent invocation in which the file set is created. // Its format must be invocations/${INVOCATION_ID} string parent = 2; - // The file set identifier. It can be any UTF-8 string up to 256 bytes long. + // The file set identifier. It can be any string up to 256 Unicode characters + // long. string file_set_id = 3; // The file set to create. Its name field will be ignored, since the name will @@ -624,7 +993,7 @@ message CreateFileSetRequest { // Request passed into UpdateFileSet message UpdateFileSetRequest { // Contains the name and fields of the file set to be updated. The name format - // must be: invocations/${INVOCATION_ID}/fileSets/${FILE_SET_ID} + // must be: invocations/${INVOCATION_ID}/fileSets/${url_encode(FILE_SET_ID)} FileSet file_set = 1; // Indicates which fields to update. @@ -633,4 +1002,195 @@ message UpdateFileSetRequest { // This is a token to authorize access to this invocation. It must be set to // the same value that was provided in the CreateInvocationRequest. string authorization_token = 3; + + // If true then the Update operation will become a Create operation if the + // FileSet is NOT_FOUND. + bool create_if_not_found = 4; +} + +// Request passed into MergeFileSet +message MergeFileSetRequest { + // A unique identifier for this request. Must be set to a different value for + // each request that affects a given resource (eg. a random UUID). Required + // for the operation to be idempotent. This is achieved by ignoring this + // request if the last successful operation on the resource had the same + // request ID. Restricted to 36 Unicode characters. + string request_id = 1; + + // Contains the name and fields of the file set to be merged. The name + // format must be: + // invocations/${INVOCATION_ID}/fileSets/${url_encode(FILE_SET_ID)} + FileSet file_set = 2; + + // Indicates which fields to merge. + google.protobuf.FieldMask update_mask = 3; + + // This is a token to authorize access to this invocation. It must be set to + // the same value that was provided in the CreateInvocationRequest. + string authorization_token = 4; + + // If true then the Merge operation will become a Create operation if the + // FileSet is NOT_FOUND. + bool create_if_not_found = 5; +} + +// Request passed into UploadBatch +message UploadBatchRequest { + // Required. The name of the invocation being modified. + // The name format must be: invocations/${INVOCATION_ID} + string parent = 1; + + // Required. A UUID that must match the value provided in CreateInvocationRequest. + string authorization_token = 2; + + // Required. The token of this batch, that will be committed in this UploadBatchRequest. + // If this matches the previously uploaded resume_token, then this request + // will silently do nothing. + // See CreateInvocationRequest.initial_resume_token for more information. + // Must be web safe Base64 encoded bytes. + string next_resume_token = 3; + + // Required. The token of the previous batch that was committed in a UploadBatchRequest. + // This will be checked after next_resume_token match is checked. If this does + // not match the previously uploaded resume_token, a 409 Conflict (HTTPS) or + // ABORTED (gRPC ) error code indicating a concurrency + // failure will be returned, and that the user should call + // GetInvocationUploadMetadata to fetch the current resume_token to + // reconstruct the state of the upload to resume it. + // See CreateInvocationRequest.initial_resume_token for more information. + // Must be web safe Base64 encoded bytes. + string resume_token = 4; + + // Client-specific data used to resume batch upload if an error occurs and + // retry is needed. This serves a role closely related to resume_token, as + // both fields may be used to provide state required to restore a Batch + // Upload, but they differ in two important aspects: + // - it is not compared to previous values, and as such does not provide + // concurrency control; + // - it allows for a larger payload, since the contents are never + // inspected/compared; + // The size of the message must be within 1 MiB. Too large requests will be + // rejected. + bytes uploader_state = 6; + + // The individual upload requests for this batch. + // The recommend total size for a batch is 10 MiB. Too large requests may be + // rejected. + // This field may be empty, allowing this RPC to be used like TouchInvocation. + repeated UploadRequest upload_requests = 5; +} + +// Response for UploadBatch +message UploadBatchResponse { + +} + +// The individual upload requests for this batch. +message UploadRequest { + // The resource ID components that identify the resource being uploaded. + message Id { + // Required for Target, ConfiguredTarget, or Action. + // The Target ID. + string target_id = 1; + + // Required for Configuration, ConfiguredTarget, or Action. + // The Configuration ID. + string configuration_id = 2; + + // Required for Action. + // The Action ID. + string action_id = 3; + + // Required for FileSet. + // The FileSet ID. + string file_set_id = 4; + } + + // The operation for the request (e.g. Create(), Update(), etc.) + enum UploadOperation { + // Unspecified + UPLOAD_OPERATION_UNSPECIFIED = 0; + + // Create the given resources. + // For more information, check the Create APIs. + CREATE = 1; + + // Applies a standard update to the resource identified by the given + // proto's name. For more information, see the Update APIs. + // UploadBatch does not support arbitrary field masks. The list of allowed + // field masks can be found below. + UPDATE = 2; + + // Applies an merge update to the resource identified by the given + // proto's name. For more information, see the Merge APIs. + // Currently, only the "files" and "file_processing_errors" fields are + // supported by this operation. + MERGE = 3; + + // Declares the resource with the given name as finalized and immutable by + // the uploader. Only supported for Invocation, Target, ConfiguredTarget. + // There must be no operation on child resources after parent resource is + // Finalized. If there is a Finalize of Invocation, it must be the final + // UploadRequest. For more information, see the Finalize APIs. + // An empty resource should be provided below. + FINALIZE = 4; + } + + // The resource ID components that identify the resource being uploaded. + Id id = 1; + + // The operation for the request (e.g. Create(), Update(), etc.) + UploadOperation upload_operation = 2; + + // Required for Update and Merge operations. + // Ignored for Create and Finalize operations. + // Masks the fields of the resource being uploaded. Provides support for a + // more granular upload. + // FieldMask must match one of the follow patterns, where * means any single + // field name: + // Invocation: [*, status_attributes.*, timing.*, invocation_attributes.*, + // workspace_info.*]. + // Target: [*, status_attributes.*, timing.*]. + // Configuration: [*, status_attributes.*]. + // ConfiguredTarget: [*, status_attributes.*]. + // Action: [*, status_attributes.*, timing.*, test_action.test_suite, + // test_action.infrastructure_failure_info]. + // FileSet: [*]. + google.protobuf.FieldMask update_mask = 3; + + // If true then the Update, Merge operation will become a Create operation if + // the resource is NOT_FOUND. Not supported for Invocation resource. + bool create_if_not_found = 10; + + // The proto of the resource being uploaded. + oneof resource { + // The Invocation Resource + Invocation invocation = 4; + + // The Target Resource + Target target = 5; + + // The Configuration Resource + Configuration configuration = 6; + + // The ConfiguredTarget Resource + ConfiguredTarget configured_target = 7; + + // The Action Resource + Action action = 8; + + // The FileSet Resource + FileSet file_set = 9; + } +} + +// Request passed into GetInvocationUploadMetadata +message GetInvocationUploadMetadataRequest { + // Required + // The name of the UploadMetadata being requested. + // The name format must be: invocations/${INVOCATION_ID}/uploadMetadata + string name = 1; + + // Required. A UUID that must match the value provided in CreateInvocationRequest. + string authorization_token = 2; } diff --git a/google/devtools/resultstore/v2/resultstore_v2.yaml b/google/devtools/resultstore/v2/resultstore_v2.yaml new file mode 100644 index 000000000..a22bba1b3 --- /dev/null +++ b/google/devtools/resultstore/v2/resultstore_v2.yaml @@ -0,0 +1,32 @@ +type: google.api.Service +config_version: 3 +name: resultstore.googleapis.com +title: Result Store API + +apis: +- name: google.devtools.resultstore.v2.ResultStoreDownload +- name: google.devtools.resultstore.v2.ResultStoreFileDownload +- name: google.devtools.resultstore.v2.ResultStoreUpload + +documentation: + summary: The Result Store API v2. + overview: An API for reading Invocation results from previous runs. + +authentication: + rules: + - selector: 'google.devtools.resultstore.v2.ResultStoreDownload.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.devtools.resultstore.v2.ResultStoreFileDownload.GetFile + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.devtools.resultstore.v2.ResultStoreFileDownload.GetFileTail + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.devtools.resultstore.v2.ResultStoreUpload.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/devtools/resultstore/v2/target.proto b/google/devtools/resultstore/v2/target.proto index dac53d949..721994b9c 100644 --- a/google/devtools/resultstore/v2/target.proto +++ b/google/devtools/resultstore/v2/target.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -38,7 +38,7 @@ message Target { } // The resource name. Its format must be: - // invocations/${INVOCATION_ID}/targets/${TARGET_ID} + // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)} string name = 1; // The resource ID components that identify the Target. They must match the diff --git a/google/devtools/resultstore/v2/test_suite.proto b/google/devtools/resultstore/v2/test_suite.proto index c892f906d..c1084544b 100644 --- a/google/devtools/resultstore/v2/test_suite.proto +++ b/google/devtools/resultstore/v2/test_suite.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/devtools/resultstore/v2/upload_metadata.proto b/google/devtools/resultstore/v2/upload_metadata.proto new file mode 100644 index 000000000..d9b35fbf7 --- /dev/null +++ b/google/devtools/resultstore/v2/upload_metadata.proto @@ -0,0 +1,39 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.devtools.resultstore.v2; + +option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore"; +option java_multiple_files = true; +option java_package = "com.google.devtools.resultstore.v2"; + +// The upload metadata for an invocation +message UploadMetadata { + // The name of the upload metadata. Its format will be: + // invocations/${INVOCATION_ID}/uploadMetadata + string name = 1; + + // The resume token of the last batch that was committed in the most recent + // batch upload. + // More information with resume_token could be found in + // resultstore_upload.proto + string resume_token = 2; + + // Client-specific data used to resume batch upload if an error occurs and + // retry action is needed. + bytes uploader_state = 3; +} diff --git a/google/devtools/source/v1/BUILD.bazel b/google/devtools/source/v1/BUILD.bazel index c94106fb9..9ee0c0a78 100644 --- a/google/devtools/source/v1/BUILD.bazel +++ b/google/devtools/source/v1/BUILD.bazel @@ -1,3 +1,5 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -8,7 +10,9 @@ load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( name = "source_proto", - srcs = ["source_context.proto"], + srcs = [ + "source_context.proto", + ], deps = [ "//google/api:annotations_proto", ], @@ -16,19 +20,29 @@ proto_library( proto_library_with_info( name = "source_proto_with_info", - deps = [":source_proto"], + deps = [ + ":source_proto", + ], ) ############################################################################## # Java ############################################################################## -load("@com_google_googleapis_imports//:imports.bzl", "java_proto_library") +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", +) java_proto_library( name = "source_java_proto", - deps = [ - ":source_proto", - ], + deps = [":source_proto"], +) + +java_grpc_library( + name = "source_java_grpc", + srcs = [":source_proto"], + deps = [":source_java_proto"], ) ############################################################################## @@ -37,11 +51,11 @@ java_proto_library( load( "@com_google_googleapis_imports//:imports.bzl", "go_proto_library", - "go_gapic_assembly_pkg", ) go_proto_library( name = "source_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/devtools/source/v1", protos = [":source_proto"], deps = [ @@ -49,10 +63,107 @@ go_proto_library( ], ) -# Opensource Packages -go_gapic_assembly_pkg( - name = "gapi-cloud-source-v1-go", +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "source_moved_proto", + srcs = [":source_proto"], deps = [ - ":source_go_proto", + "//google/api:annotations_proto", ], ) + +py_proto_library( + name = "source_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":source_moved_proto"], +) + +py_grpc_library( + name = "source_py_grpc", + srcs = [":source_moved_proto"], + deps = [":source_py_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "source_php_proto", + deps = [":source_proto"], +) + +php_grpc_library( + name = "source_php_grpc", + srcs = [":source_proto"], + deps = [":source_php_proto"], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "source_ruby_proto", + deps = [":source_proto"], +) + +ruby_grpc_library( + name = "source_ruby_grpc", + srcs = [":source_proto"], + deps = [":source_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "source_csharp_proto", + deps = [":source_proto"], +) + +csharp_grpc_library( + name = "source_csharp_grpc", + srcs = [":source_proto"], + deps = [":source_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ code here diff --git a/google/devtools/source/v1/source_context.proto b/google/devtools/source/v1/source_context.proto index 6d6a4dedd..90b02c928 100644 --- a/google/devtools/source/v1/source_context.proto +++ b/google/devtools/source/v1/source_context.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/example/library/artman_library_example_v1.yaml b/google/example/library/artman_library_example_v1.yaml index 3bc2fffb3..8217d9467 100644 --- a/google/example/library/artman_library_example_v1.yaml +++ b/google/example/library/artman_library_example_v1.yaml @@ -1,3 +1,4 @@ +--- common: api_name: library_example api_version: v1 diff --git a/google/example/library/v1/BUILD.bazel b/google/example/library/v1/BUILD.bazel index d5f2b8c90..d3bdfe61f 100644 --- a/google/example/library/v1/BUILD.bazel +++ b/google/example/library/v1/BUILD.bazel @@ -1,14 +1,19 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( name = "library_proto", - srcs = ["library.proto"], + srcs = [ + "library.proto", + ], deps = [ "//google/api:annotations_proto", "//google/api:client_proto", @@ -20,7 +25,10 @@ proto_library( proto_library_with_info( name = "library_proto_with_info", - deps = [":library_proto"], + deps = [ + ":library_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -28,18 +36,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "library_java_proto", deps = [":library_proto"], @@ -48,49 +51,40 @@ java_proto_library( java_grpc_library( name = "library_java_grpc", srcs = [":library_proto"], - deps = [":library_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "library_resource_name_java_proto", - gapic_yaml = "library_example_gapic.yaml", - deps = [":library_proto"], + deps = [":library_java_proto"], ) java_gapic_library( name = "library_java_gapic", src = ":library_proto_with_info", gapic_yaml = "library_example_gapic.yaml", + package = "google.example.library.v1", service_yaml = "//google/example/library:library_example_v1.yaml", - test_deps = [":library_java_grpc"], + test_deps = [ + ":library_java_grpc", + ], deps = [ ":library_java_proto", - ":library_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, +java_gapic_test( + name = "library_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.example.library.v1.LibraryServiceClientTest", + ], runtime_deps = [":library_java_gapic_test"], -) for test_name in [ - "com.google.cloud.example.library.v1.LibraryServiceClientTest", -]] +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-library-v1-java", - client_deps = [":library_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":library_java_gapic_test"], - grpc_deps = [":library_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + name = "google-cloud-example-library-v1-java", + deps = [ + ":library_java_gapic", + ":library_java_grpc", ":library_java_proto", ":library_proto", - ":library_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -98,10 +92,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -109,16 +103,20 @@ go_proto_library( compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/example/library/v1", protos = [":library_proto"], - deps = ["//google/api:annotations_go_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], ) go_gapic_library( name = "library_go_gapic", - src = ":library_proto_with_info", - gapic_yaml = "library_example_gapic.yaml", - importpath = "cloud.google.com/go/example/library/apiv1", + srcs = [":library_proto_with_info"], + grpc_service_config = "", + importpath = "cloud.google.com/go/example/library/apiv1;library", service_yaml = "//google/example/library:library_example_v1.yaml", - deps = [":library_go_proto"], + deps = [ + ":library_go_proto", + ], ) go_test( @@ -128,13 +126,233 @@ go_test( importpath = "cloud.google.com/go/example/library/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-library-v1-go", + name = "gapi-cloud-example-library-v1-go", deps = [ ":library_go_gapic", - ":library_go_gapic_srcjar-smoke-test.srcjar", ":library_go_gapic_srcjar-test.srcjar", ":library_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "library_moved_proto", + srcs = [":library_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + ], +) + +py_proto_library( + name = "library_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":library_moved_proto"], +) + +py_grpc_library( + name = "library_py_grpc", + srcs = [":library_moved_proto"], + deps = [":library_py_proto"], +) + +py_gapic_library( + name = "library_py_gapic", + src = ":library_proto_with_info", + gapic_yaml = "library_example_gapic.yaml", + package = "google.example.library.v1", + service_yaml = "//google/example/library:library_example_v1.yaml", + deps = [ + ":library_py_grpc", + ":library_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "example-library-v1-py", + deps = [ + ":library_py_gapic", + ":library_py_grpc", + ":library_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "library_php_proto", + deps = [":library_proto"], +) + +php_grpc_library( + name = "library_php_grpc", + srcs = [":library_proto"], + deps = [":library_php_proto"], +) + +php_gapic_library( + name = "library_php_gapic", + src = ":library_proto_with_info", + gapic_yaml = "library_example_gapic.yaml", + package = "google.example.library.v1", + service_yaml = "//google/example/library:library_example_v1.yaml", + deps = [ + ":library_php_grpc", + ":library_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-example-library-v1-php", + deps = [ + ":library_php_gapic", + ":library_php_grpc", + ":library_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "library_nodejs_gapic", + src = ":library_proto_with_info", + gapic_yaml = "library_example_gapic.yaml", + package = "google.example.library.v1", + service_yaml = "//google/example/library:library_example_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "example-library-v1-nodejs", + deps = [ + ":library_nodejs_gapic", + ":library_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "library_ruby_proto", + deps = [":library_proto"], +) + +ruby_grpc_library( + name = "library_ruby_grpc", + srcs = [":library_proto"], + deps = [":library_ruby_proto"], +) + +ruby_gapic_library( + name = "library_ruby_gapic", + src = ":library_proto_with_info", + gapic_yaml = "library_example_gapic.yaml", + package = "google.example.library.v1", + service_yaml = "//google/example/library:library_example_v1.yaml", + deps = [ + ":library_ruby_grpc", + ":library_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-example-library-v1-ruby", + deps = [ + ":library_ruby_gapic", + ":library_ruby_grpc", + ":library_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "library_csharp_proto", + deps = [":library_proto"], +) + +csharp_grpc_library( + name = "library_csharp_grpc", + srcs = [":library_proto"], + deps = [":library_csharp_proto"], +) + +csharp_gapic_library( + name = "library_csharp_gapic", + src = ":library_proto_with_info", + gapic_yaml = "library_example_gapic.yaml", + package = "google.example.library.v1", + service_yaml = "//google/example/library:library_example_v1.yaml", + deps = [ + ":library_csharp_grpc", + ":library_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-example-library-v1-csharp", + deps = [ + ":library_csharp_gapic", + ":library_csharp_grpc", + ":library_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/example/library/v1/library.proto b/google/example/library/v1/library.proto index bc36c31d1..80912cf64 100644 --- a/google/example/library/v1/library.proto +++ b/google/example/library/v1/library.proto @@ -38,6 +38,8 @@ option java_package = "com.google.example.library.v1"; // - Each Shelf has a collection of [Book][google.example.library.v1.Book] // resources, named `shelves/*/books/*` service LibraryService { + option (google.api.default_host) = "library-example.googleapis.com"; + // Creates a shelf, and returns the new Shelf. rpc CreateShelf(CreateShelfRequest) returns (Shelf) { option (google.api.http) = { diff --git a/google/firestore/BUILD.bazel b/google/firestore/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/firestore/BUILD.bazel +++ b/google/firestore/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/firestore/admin/BUILD.bazel b/google/firestore/admin/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/firestore/admin/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/firestore/admin/v1/BUILD.bazel b/google/firestore/admin/v1/BUILD.bazel new file mode 100644 index 000000000..46291191f --- /dev/null +++ b/google/firestore/admin/v1/BUILD.bazel @@ -0,0 +1,376 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "admin_proto", + srcs = [ + "field.proto", + "firestore_admin.proto", + "index.proto", + "location.proto", + "operation.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "admin_proto_with_info", + deps = [ + ":admin_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "admin_java_proto", + deps = [":admin_proto"], +) + +java_grpc_library( + name = "admin_java_grpc", + srcs = [":admin_proto"], + deps = [":admin_java_proto"], +) + +java_gapic_library( + name = "admin_java_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.admin.v1", + service_yaml = "//google/firestore/admin:firestore_admin_v1.yaml", + test_deps = [ + ":admin_java_grpc", + ], + deps = [ + ":admin_java_proto", + ], +) + +java_gapic_test( + name = "admin_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.firestore.v1.FirestoreAdminClientTest", + ], + runtime_deps = [":admin_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-firestore-admin-v1-java", + deps = [ + ":admin_java_gapic", + ":admin_java_grpc", + ":admin_java_proto", + ":admin_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "admin_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/firestore/admin/v1", + protos = [":admin_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + "//google/type:latlng_go_proto", + ], +) + +go_gapic_library( + name = "admin_go_gapic", + srcs = [":admin_proto_with_info"], + grpc_service_config = "firestore_admin_grpc_service_config.json", + importpath = "cloud.google.com/go/firestore/apiv1/admin;admin", + service_yaml = "//google/firestore/admin:firestore_admin_v1.yaml", + deps = [ + ":admin_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + ], +) + +go_test( + name = "admin_go_gapic_test", + srcs = [":admin_go_gapic_srcjar_test"], + embed = [":admin_go_gapic"], + importpath = "cloud.google.com/go/firestore/apiv1/admin", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-firestore-admin-v1-go", + deps = [ + ":admin_go_gapic", + ":admin_go_gapic_srcjar-test.srcjar", + ":admin_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "admin_moved_proto", + srcs = [":admin_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "admin_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":admin_moved_proto"], +) + +py_grpc_library( + name = "admin_py_grpc", + srcs = [":admin_moved_proto"], + deps = [":admin_py_proto"], +) + +py_gapic_library( + name = "admin_py_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.admin.v1", + service_yaml = "//google/firestore/admin:firestore_admin_v1.yaml", + deps = [ + ":admin_py_grpc", + ":admin_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "firestore-admin-v1-py", + deps = [ + ":admin_py_gapic", + ":admin_py_grpc", + ":admin_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "admin_php_proto", + deps = [":admin_proto"], +) + +php_grpc_library( + name = "admin_php_grpc", + srcs = [":admin_proto"], + deps = [":admin_php_proto"], +) + +php_gapic_library( + name = "admin_php_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "firestore_gapic.legacy.yaml", + package = "google.firestore.admin.v1", + service_yaml = "//google/firestore/admin:firestore_admin_v1.yaml", + deps = [ + ":admin_php_grpc", + ":admin_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-firestore-admin-v1-php", + deps = [ + ":admin_php_gapic", + ":admin_php_grpc", + ":admin_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "admin_nodejs_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.admin.v1", + service_yaml = "//google/firestore/admin:firestore_admin_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "firestore-admin-v1-nodejs", + deps = [ + ":admin_nodejs_gapic", + ":admin_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "admin_ruby_proto", + deps = [":admin_proto"], +) + +ruby_grpc_library( + name = "admin_ruby_grpc", + srcs = [":admin_proto"], + deps = [":admin_ruby_proto"], +) + +ruby_gapic_library( + name = "admin_ruby_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.admin.v1", + service_yaml = "//google/firestore/admin:firestore_admin_v1.yaml", + deps = [ + ":admin_ruby_grpc", + ":admin_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-firestore-admin-v1-ruby", + deps = [ + ":admin_ruby_gapic", + ":admin_ruby_grpc", + ":admin_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "admin_csharp_proto", + deps = [":admin_proto"], +) + +csharp_grpc_library( + name = "admin_csharp_grpc", + srcs = [":admin_proto"], + deps = [":admin_csharp_proto"], +) + +csharp_gapic_library( + name = "admin_csharp_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.admin.v1", + service_yaml = "//google/firestore/admin:firestore_admin_v1.yaml", + deps = [ + ":admin_csharp_grpc", + ":admin_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-firestore-admin-v1-csharp", + deps = [ + ":admin_csharp_gapic", + ":admin_csharp_grpc", + ":admin_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/firestore/admin/v1/field.proto b/google/firestore/admin/v1/field.proto index a24e1aaf1..48430d87c 100644 --- a/google/firestore/admin/v1/field.proto +++ b/google/firestore/admin/v1/field.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.firestore.admin.v1; +import "google/api/resource.proto"; import "google/firestore/admin/v1/index.proto"; import "google/api/annotations.proto"; @@ -28,25 +29,27 @@ option java_package = "com.google.firestore.admin.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; - // Represents a single field in the database. // // Fields are grouped by their "Collection Group", which represent all // collections in the database with the same id. message Field { + option (google.api.resource) = { + type: "firestore.googleapis.com/Field" + pattern: "projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}" + }; + // The index configuration for this field. message IndexConfig { // The indexes supported for this field. repeated Index indexes = 1; - // Output only. - // When true, the `Field`'s index configuration is set from the + // Output only. When true, the `Field`'s index configuration is set from the // configuration specified by the `ancestor_field`. // When false, the `Field`'s index configuration is defined explicitly. bool uses_ancestor_config = 2; - // Output only. - // Specifies the resource name of the `Field` from which this field's + // Output only. Specifies the resource name of the `Field` from which this field's // index configuration is set (when `uses_ancestor_config` is true), // or from which it *would* be set if this field had no index configuration // (when `uses_ancestor_config` is false). diff --git a/google/firestore/admin/v1/firestore_admin.proto b/google/firestore/admin/v1/firestore_admin.proto index e753686b2..75dd2d311 100644 --- a/google/firestore/admin/v1/firestore_admin.proto +++ b/google/firestore/admin/v1/firestore_admin.proto @@ -18,6 +18,9 @@ syntax = "proto3"; package google.firestore.admin.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/firestore/admin/v1/field.proto"; import "google/firestore/admin/v1/index.proto"; import "google/longrunning/operations.proto"; @@ -31,11 +34,23 @@ option java_outer_classname = "FirestoreAdminProto"; option java_package = "com.google.firestore.admin.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; - +option (google.api.resource_definition) = { + type: "firestore.googleapis.com/Database" + pattern: "projects/{project}/databases/{database}" +}; +option (google.api.resource_definition) = { + type: "firestore.googleapis.com/CollectionGroup" + pattern: "projects/{project}/databases/{database}/collectionGroups/{collection}" +}; // Operations are created by service `FirestoreAdmin`, but are accessed via // service `google.longrunning.Operations`. service FirestoreAdmin { + option (google.api.default_host) = "firestore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/datastore"; + // Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] // which may be used to track the status of the creation. The metadata for // the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. @@ -44,6 +59,11 @@ service FirestoreAdmin { post: "/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes" body: "index" }; + option (google.api.method_signature) = "parent,index"; + option (google.longrunning.operation_info) = { + response_type: "Index" + metadata_type: "IndexOperationMetadata" + }; } // Lists composite indexes. @@ -51,6 +71,7 @@ service FirestoreAdmin { option (google.api.http) = { get: "/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes" }; + option (google.api.method_signature) = "parent"; } // Gets a composite index. @@ -58,6 +79,7 @@ service FirestoreAdmin { option (google.api.http) = { get: "/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}" }; + option (google.api.method_signature) = "name"; } // Deletes a composite index. @@ -65,6 +87,7 @@ service FirestoreAdmin { option (google.api.http) = { delete: "/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}" }; + option (google.api.method_signature) = "name"; } // Gets the metadata and configuration for a Field. @@ -72,6 +95,7 @@ service FirestoreAdmin { option (google.api.http) = { get: "/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}" }; + option (google.api.method_signature) = "name"; } // Updates a field configuration. Currently, field updates apply only to @@ -92,6 +116,11 @@ service FirestoreAdmin { patch: "/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}" body: "field" }; + option (google.api.method_signature) = "field"; + option (google.longrunning.operation_info) = { + response_type: "Field" + metadata_type: "FieldOperationMetadata" + }; } // Lists the field configuration and metadata for this database. @@ -104,6 +133,7 @@ service FirestoreAdmin { option (google.api.http) = { get: "/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields" }; + option (google.api.method_signature) = "parent"; } // Exports a copy of all or a subset of documents from Google Cloud Firestore @@ -119,6 +149,11 @@ service FirestoreAdmin { post: "/v1/{name=projects/*/databases/*}:exportDocuments" body: "*" }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "ExportDocumentsResponse" + metadata_type: "ExportDocumentsMetadata" + }; } // Imports documents into Google Cloud Firestore. Existing documents with the @@ -131,24 +166,39 @@ service FirestoreAdmin { post: "/v1/{name=projects/*/databases/*}:importDocuments" body: "*" }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "ImportDocumentsMetadata" + }; } } // The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex]. message CreateIndexRequest { - // A parent name of the form + // Required. A parent name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - string parent = 1; - - // The composite index to create. - Index index = 2; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/CollectionGroup" + } + ]; + + // Required. The composite index to create. + Index index = 2 [(google.api.field_behavior) = REQUIRED]; } // The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes]. message ListIndexesRequest { - // A parent name of the form + // Required. A parent name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/CollectionGroup" + } + ]; // The filter to apply to list results. string filter = 2; @@ -174,22 +224,32 @@ message ListIndexesResponse { // The request for [FirestoreAdmin.GetIndex][google.firestore.admin.v1.FirestoreAdmin.GetIndex]. message GetIndexRequest { - // A name of the form + // Required. A name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/Index" + } + ]; } // The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1.FirestoreAdmin.DeleteIndex]. message DeleteIndexRequest { - // A name of the form + // Required. A name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/Index" + } + ]; } // The request for [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]. message UpdateFieldRequest { - // The field to be updated. - Field field = 1; + // Required. The field to be updated. + Field field = 1 [(google.api.field_behavior) = REQUIRED]; // A mask, relative to the field. If specified, only configuration specified // by this field_mask will be updated in the field. @@ -198,16 +258,26 @@ message UpdateFieldRequest { // The request for [FirestoreAdmin.GetField][google.firestore.admin.v1.FirestoreAdmin.GetField]. message GetFieldRequest { - // A name of the form + // Required. A name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/Field" + } + ]; } // The request for [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]. message ListFieldsRequest { - // A parent name of the form + // Required. A parent name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/CollectionGroup" + } + ]; // The filter to apply to list results. Currently, // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields @@ -237,9 +307,14 @@ message ListFieldsResponse { // The request for [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments]. message ExportDocumentsRequest { - // Database to export. Should be of the form: + // Required. Database to export. Should be of the form: // `projects/{project_id}/databases/{database_id}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/Database" + } + ]; // Which collection ids to export. Unspecified means all collections. repeated string collection_ids = 2; @@ -257,9 +332,14 @@ message ExportDocumentsRequest { // The request for [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments]. message ImportDocumentsRequest { - // Database to import into. Should be of the form: + // Required. Database to import into. Should be of the form: // `projects/{project_id}/databases/{database_id}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/Database" + } + ]; // Which collection ids to import. Unspecified means all collections included // in the import. diff --git a/google/firestore/admin/v1/firestore_admin_grpc_service_config.json b/google/firestore/admin/v1/firestore_admin_grpc_service_config.json new file mode 100755 index 000000000..1460a8b7c --- /dev/null +++ b/google/firestore/admin/v1/firestore_admin_grpc_service_config.json @@ -0,0 +1,61 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.firestore.admin.v1.FirestoreAdmin", + "method": "ListIndexes" + }, + { + "service": "google.firestore.admin.v1.FirestoreAdmin", + "method": "GetIndex" + }, + { + "service": "google.firestore.admin.v1.FirestoreAdmin", + "method": "DeleteIndex" + }, + { + "service": "google.firestore.admin.v1.FirestoreAdmin", + "method": "GetField" + }, + { + "service": "google.firestore.admin.v1.FirestoreAdmin", + "method": "ListFields" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.firestore.admin.v1.FirestoreAdmin", + "method": "CreateIndex" + }, + { + "service": "google.firestore.admin.v1.FirestoreAdmin", + "method": "ImportDocuments" + }, + { + "service": "google.firestore.admin.v1.FirestoreAdmin", + "method": "ExportDocuments" + }, + { + "service": "google.firestore.admin.v1.FirestoreAdmin", + "method": "UpdateField" + } + ], + "timeout": "60s" + } + ] +} diff --git a/google/firestore/admin/v1/firestore_gapic.legacy.yaml b/google/firestore/admin/v1/firestore_gapic.legacy.yaml new file mode 100644 index 000000000..6ebcee036 --- /dev/null +++ b/google/firestore/admin/v1/firestore_gapic.legacy.yaml @@ -0,0 +1,199 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.firestore.v1 + python: + package_name: google.cloud.firestore_admin_v1.gapic + go: + package_name: cloud.google.com/go/firestore/apiv1/admin + csharp: + package_name: Google.Cloud.Firestore.Admin.V1 + ruby: + package_name: Google::Cloud::Firestore::Admin::V1 + php: + package_name: Google\Cloud\Firestore\Admin\V1 + nodejs: + package_name: firestore.v1 + domain_layer_location: google-cloud +interfaces: +- name: google.firestore.admin.v1.FirestoreAdmin + collections: + - name_pattern: projects/{project}/databases/{database} + entity_name: database + - name_pattern: projects/{project}/databases/{database}/collectionGroups/{collection_id} + entity_name: parent + - name_pattern: projects/{project}/databases/{database}/collectionGroups/{collection_id}/indexes/{index_id} + entity_name: index + - name_pattern: projects/{project}/databases/{database}/collectionGroups/{collection_id}/fields/{field_id} + entity_name: field + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - INTERNAL + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: CreateIndex + flattening: + groups: + - parameters: + - parent + - index + required_fields: + - parent + - index + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: parent + timeout_millis: 60000 + - name: ListIndexes + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: indexes + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: parent + timeout_millis: 60000 + - name: GetIndex + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: index + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: DeleteIndex + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: index + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: ImportDocuments + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: database + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: ExportDocuments + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: database + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: GetField + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: field + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: ListFields + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: fields + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: parent + timeout_millis: 60000 + - name: UpdateField + flattening: + groups: + - parameters: + - field + required_fields: + - field + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 +resource_name_generation: +- message_name: CreateIndexRequest + field_entity_map: + parent: parent +- message_name: GetIndexRequest + field_entity_map: + name: index +- message_name: DeleteIndexRequest + field_entity_map: + name: index +- message_name: ImportDocumentsRequest + field_entity_map: + name: database +- message_name: ExportDocumentsRequest + field_entity_map: + name: database +- message_name: GetFieldRequest + field_entity_map: + name: field +- message_name: ListFieldsRequest + field_entity_map: + parent: parent +- message_name: ListIndexesRequest + field_entity_map: + parent: parent diff --git a/google/firestore/admin/v1/firestore_gapic.yaml b/google/firestore/admin/v1/firestore_gapic.yaml index bda86e4e5..55522c0c1 100644 --- a/google/firestore/admin/v1/firestore_gapic.yaml +++ b/google/firestore/admin/v1/firestore_gapic.yaml @@ -1,16 +1,16 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.firestore.v1 python: - package_name: google.cloud.firestore_v1.gapic + package_name: google.cloud.firestore_admin_v1.gapic go: package_name: cloud.google.com/go/firestore/apiv1/admin csharp: package_name: Google.Cloud.Firestore.Admin.V1 ruby: - package_name: Google::Cloud::Firestore::V1 + package_name: Google::Cloud::Firestore::Admin::V1 php: package_name: Google\Cloud\Firestore\Admin\V1 nodejs: @@ -18,181 +18,23 @@ language_settings: domain_layer_location: google-cloud interfaces: - name: google.firestore.admin.v1.FirestoreAdmin - collections: - - name_pattern: projects/{project}/databases/{database} - entity_name: database - - name_pattern: projects/{project}/databases/{database}/collectionGroups/{collection_id} - entity_name: parent - - name_pattern: projects/{project}/databases/{database}/collectionGroups/{collection_id}/indexes/{index_id} - entity_name: index - - name_pattern: projects/{project}/databases/{database}/collectionGroups/{collection_id}/fields/{field_id} - entity_name: field retry_codes_def: - name: idempotent retry_codes: - UNAVAILABLE + - INTERNAL - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 retry_delay_multiplier: 1.3 max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 + initial_rpc_timeout_millis: 60000 rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 + max_rpc_timeout_millis: 60000 total_timeout_millis: 600000 methods: - - name: CreateIndex - flattening: - groups: - - parameters: - - parent - - index - required_fields: - - parent - - index - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: parent - timeout_millis: 60000 - - name: ListIndexes - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: indexes - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: parent - timeout_millis: 60000 - - name: GetIndex - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: index - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: DeleteIndex - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: index - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: ImportDocuments - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: database - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: ExportDocuments - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: database - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: GetField - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: field - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: ListFields - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: fields retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: parent - timeout_millis: 60000 - name: UpdateField - flattening: - groups: - - parameters: - - field - required_fields: - - field retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 -resource_name_generation: -- message_name: CreateIndexRequest - field_entity_map: - parent: parent -- message_name: GetIndexRequest - field_entity_map: - name: index -- message_name: DeleteIndexRequest - field_entity_map: - name: index -- message_name: ImportDocumentsRequest - field_entity_map: - name: database -- message_name: ExportDocumentsRequest - field_entity_map: - name: database -- message_name: GetFieldRequest - field_entity_map: - name: field -- message_name: ListFieldsRequest - field_entity_map: - parent: parent -- message_name: ListIndexesRequest - field_entity_map: - parent: parent diff --git a/google/firestore/admin/v1/firestore_v1.yaml b/google/firestore/admin/v1/firestore_v1.yaml new file mode 100644 index 000000000..030118d40 --- /dev/null +++ b/google/firestore/admin/v1/firestore_v1.yaml @@ -0,0 +1,52 @@ +type: google.api.Service +config_version: 3 +name: firestore.googleapis.com +title: Cloud Firestore API + +apis: +- name: google.firestore.admin.v1.FirestoreAdmin + +types: +- name: google.firestore.admin.v1.ExportDocumentsMetadata +- name: google.firestore.admin.v1.ExportDocumentsResponse +- name: google.firestore.admin.v1.FieldOperationMetadata +- name: google.firestore.admin.v1.ImportDocumentsMetadata +- name: google.firestore.admin.v1.IndexOperationMetadata +- name: google.firestore.admin.v1.LocationMetadata + +documentation: + summary: |- + Accesses the NoSQL document database built for automatic scaling, high + performance, and ease of application development. + +backend: + rules: + - selector: 'google.firestore.admin.v1.FirestoreAdmin.*' + deadline: 295.0 + - selector: 'google.longrunning.Operations.*' + deadline: 295.0 + +http: + rules: + - selector: google.longrunning.Operations.CancelOperation + post: '/v1/{name=projects/*/databases/*/operations/*}:cancel' + body: '*' + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=projects/*/databases/*/operations/*}' + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=projects/*/databases/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=projects/*/databases/*}/operations' + +authentication: + rules: + - selector: 'google.firestore.admin.v1.FirestoreAdmin.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/datastore + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/datastore diff --git a/google/firestore/admin/v1/index.proto b/google/firestore/admin/v1/index.proto index 94941d3a0..4b9c6e35b 100644 --- a/google/firestore/admin/v1/index.proto +++ b/google/firestore/admin/v1/index.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.firestore.admin.v1; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; @@ -27,10 +28,14 @@ option java_package = "com.google.firestore.admin.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; - // Cloud Firestore indexes enable simple and complex queries against // documents in a database. message Index { + option (google.api.resource) = { + type: "firestore.googleapis.com/Index" + pattern: "projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}" + }; + // A field in an index. // The field_path describes which field is indexed, the value_mode describes // how the field value is indexed. @@ -82,6 +87,11 @@ message Index { // against a collection that is the child of a specific document, specified // at query time, and that has the collection id specified by the index. COLLECTION = 1; + + // Indexes with a collection group query scope specified allow queries + // against all collections that has the collection id specified by the + // index. + COLLECTION_GROUP = 2; } // The state of an index. During index creation, an index will be in the @@ -114,8 +124,7 @@ message Index { NEEDS_REPAIR = 3; } - // Output only. - // A server defined name for this index. + // Output only. A server defined name for this index. // The form of this name for composite indexes will be: // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` // For single field indexes, this field will be empty. @@ -143,7 +152,6 @@ message Index { // field path equal to the field path of the associated field. repeated IndexField fields = 3; - // Output only. - // The serving state of the index. + // Output only. The serving state of the index. State state = 4; } diff --git a/google/firestore/admin/v1/location.proto b/google/firestore/admin/v1/location.proto index 7b56051a5..d9dc6f9b9 100644 --- a/google/firestore/admin/v1/location.proto +++ b/google/firestore/admin/v1/location.proto @@ -28,7 +28,6 @@ option java_package = "com.google.firestore.admin.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; - // The metadata message for [google.cloud.location.Location.metadata][google.cloud.location.Location.metadata]. message LocationMetadata { diff --git a/google/firestore/admin/v1/operation.proto b/google/firestore/admin/v1/operation.proto index d333d9b7d..08194fe09 100644 --- a/google/firestore/admin/v1/operation.proto +++ b/google/firestore/admin/v1/operation.proto @@ -29,7 +29,6 @@ option java_package = "com.google.firestore.admin.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; - // Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from // [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex]. message IndexOperationMetadata { @@ -163,6 +162,17 @@ message ExportDocumentsResponse { string output_uri_prefix = 1; } +// Describes the progress of the operation. +// Unit of work is generic and must be interpreted based on where [Progress][google.firestore.admin.v1.Progress] +// is used. +message Progress { + // The amount of work estimated. + int64 estimated_work = 1; + + // The amount of work completed. + int64 completed_work = 2; +} + // Describes the state of the operation. enum OperationState { // Unspecified. @@ -191,14 +201,3 @@ enum OperationState { // google.longrunning.Operations.CancelOperation. CANCELLED = 7; } - -// Describes the progress of the operation. -// Unit of work is generic and must be interpreted based on where [Progress][google.firestore.admin.v1.Progress] -// is used. -message Progress { - // The amount of work estimated. - int64 estimated_work = 1; - - // The amount of work completed. - int64 completed_work = 2; -} diff --git a/google/firestore/admin/v1beta1/firestore_admin.proto b/google/firestore/admin/v1beta1/firestore_admin.proto index 505872259..5d7908b93 100644 --- a/google/firestore/admin/v1beta1/firestore_admin.proto +++ b/google/firestore/admin/v1beta1/firestore_admin.proto @@ -22,6 +22,7 @@ import "google/firestore/admin/v1beta1/index.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta1;admin"; @@ -30,7 +31,6 @@ option java_outer_classname = "FirestoreAdminProto"; option java_package = "com.google.firestore.admin.v1beta1"; option objc_class_prefix = "GCFS"; - // The Cloud Firestore Admin API. // // This API provides several administrative services for Cloud Firestore. @@ -75,6 +75,11 @@ option objc_class_prefix = "GCFS"; // Operations are created by service `FirestoreAdmin`, but are accessed via // service `google.longrunning.Operations`. service FirestoreAdmin { + option (google.api.default_host) = "firestore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/datastore"; + // Creates the specified index. // A newly created index's initial state is `CREATING`. On completion of the // returned [google.longrunning.Operation][google.longrunning.Operation], the state will be `READY`. diff --git a/google/firestore/admin/v1beta1/index.proto b/google/firestore/admin/v1beta1/index.proto index 285e0a533..0ca95985b 100644 --- a/google/firestore/admin/v1beta1/index.proto +++ b/google/firestore/admin/v1beta1/index.proto @@ -26,7 +26,6 @@ option java_outer_classname = "IndexProto"; option java_package = "com.google.firestore.admin.v1beta1"; option objc_class_prefix = "GCFS"; - // A field of an index. message IndexField { // The mode determines how a field is indexed. diff --git a/google/firestore/admin/v1beta1/location.proto b/google/firestore/admin/v1beta1/location.proto index 2e6dff1b9..2201b07dd 100644 --- a/google/firestore/admin/v1beta1/location.proto +++ b/google/firestore/admin/v1beta1/location.proto @@ -27,7 +27,6 @@ option java_outer_classname = "LocationProto"; option java_package = "com.google.firestore.admin.v1beta1"; option objc_class_prefix = "GCFS"; - // The metadata message for [google.cloud.location.Location.metadata][google.cloud.location.Location.metadata]. message LocationMetadata { diff --git a/google/firestore/admin/v1beta2/field.proto b/google/firestore/admin/v1beta2/field.proto index 8b2599caf..cec355190 100644 --- a/google/firestore/admin/v1beta2/field.proto +++ b/google/firestore/admin/v1beta2/field.proto @@ -27,7 +27,6 @@ option java_outer_classname = "FieldProto"; option java_package = "com.google.firestore.admin.v1beta2"; option objc_class_prefix = "GCFS"; - // Represents a single field in the database. // // Fields are grouped by their "Collection Group", which represent all @@ -38,14 +37,12 @@ message Field { // The indexes supported for this field. repeated Index indexes = 1; - // Output only. - // When true, the `Field`'s index configuration is set from the + // Output only. When true, the `Field`'s index configuration is set from the // configuration specified by the `ancestor_field`. // When false, the `Field`'s index configuration is defined explicitly. bool uses_ancestor_config = 2; - // Output only. - // Specifies the resource name of the `Field` from which this field's + // Output only. Specifies the resource name of the `Field` from which this field's // index configuration is set (when `uses_ancestor_config` is true), // or from which it *would* be set if this field had no index configuration // (when `uses_ancestor_config` is false). diff --git a/google/firestore/admin/v1beta2/firestore_admin.proto b/google/firestore/admin/v1beta2/firestore_admin.proto index a1ec525c6..56ca764bd 100644 --- a/google/firestore/admin/v1beta2/firestore_admin.proto +++ b/google/firestore/admin/v1beta2/firestore_admin.proto @@ -23,6 +23,7 @@ import "google/firestore/admin/v1beta2/index.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta2"; option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta2;admin"; @@ -31,10 +32,14 @@ option java_outer_classname = "FirestoreAdminProto"; option java_package = "com.google.firestore.admin.v1beta2"; option objc_class_prefix = "GCFS"; - // Operations are created by service `FirestoreAdmin`, but are accessed via // service `google.longrunning.Operations`. service FirestoreAdmin { + option (google.api.default_host) = "firestore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/datastore"; + // Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] // which may be used to track the status of the creation. The metadata for // the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1beta2.IndexOperationMetadata]. diff --git a/google/firestore/admin/v1beta2/index.proto b/google/firestore/admin/v1beta2/index.proto index d6c738d87..c5dc6b982 100644 --- a/google/firestore/admin/v1beta2/index.proto +++ b/google/firestore/admin/v1beta2/index.proto @@ -26,7 +26,6 @@ option java_outer_classname = "IndexProto"; option java_package = "com.google.firestore.admin.v1beta2"; option objc_class_prefix = "GCFS"; - // Cloud Firestore indexes enable simple and complex queries against // documents in a database. message Index { @@ -81,6 +80,11 @@ message Index { // against a collection that is the child of a specific document, specified // at query time, and that has the collection id specified by the index. COLLECTION = 1; + + // Indexes with a collection group query scope specified allow queries + // against all collections that has the collection id specified by the + // index. + COLLECTION_GROUP = 2; } // The state of an index. During index creation, an index will be in the @@ -113,8 +117,7 @@ message Index { NEEDS_REPAIR = 3; } - // Output only. - // A server defined name for this index. + // Output only. A server defined name for this index. // The form of this name for composite indexes will be: // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` // For single field indexes, this field will be empty. @@ -142,7 +145,6 @@ message Index { // field path equal to the field path of the associated field. repeated IndexField fields = 3; - // Output only. - // The serving state of the index. + // Output only. The serving state of the index. State state = 4; } diff --git a/google/firestore/admin/v1beta2/operation.proto b/google/firestore/admin/v1beta2/operation.proto index 871f1c16f..d9a1f84ee 100644 --- a/google/firestore/admin/v1beta2/operation.proto +++ b/google/firestore/admin/v1beta2/operation.proto @@ -28,7 +28,6 @@ option java_outer_classname = "OperationProto"; option java_package = "com.google.firestore.admin.v1beta2"; option objc_class_prefix = "GCFS"; - // Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from // [FirestoreAdmin.CreateIndex][google.firestore.admin.v1beta2.FirestoreAdmin.CreateIndex]. message IndexOperationMetadata { diff --git a/google/firestore/v1/BUILD.bazel b/google/firestore/v1/BUILD.bazel new file mode 100644 index 000000000..185854651 --- /dev/null +++ b/google/firestore/v1/BUILD.bazel @@ -0,0 +1,372 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "firestore_proto", + srcs = [ + "common.proto", + "document.proto", + "firestore.proto", + "query.proto", + "write.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/rpc:status_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library_with_info( + name = "firestore_proto_with_info", + deps = [ + ":firestore_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "firestore_java_proto", + deps = [":firestore_proto"], +) + +java_grpc_library( + name = "firestore_java_grpc", + srcs = [":firestore_proto"], + deps = [":firestore_java_proto"], +) + +java_gapic_library( + name = "firestore_java_gapic", + src = ":firestore_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.v1", + service_yaml = "//google/firestore:firestore_v1.yaml", + test_deps = [ + ":firestore_java_grpc", + ], + deps = [ + ":firestore_java_proto", + ], +) + +java_gapic_test( + name = "firestore_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.firestore.v1.FirestoreClientTest", + ], + runtime_deps = [":firestore_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-firestore-v1-java", + deps = [ + ":firestore_java_gapic", + ":firestore_java_grpc", + ":firestore_java_proto", + ":firestore_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "firestore_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/firestore/v1", + protos = [":firestore_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + "//google/type:latlng_go_proto", + ], +) + +go_gapic_library( + name = "firestore_go_gapic", + srcs = [":firestore_proto_with_info"], + grpc_service_config = "firestore_grpc_service_config.json", + importpath = "cloud.google.com/go/firestore/apiv1;firestore", + service_yaml = "//google/firestore:firestore_v1.yaml", + deps = [ + ":firestore_go_proto", + ], +) + +go_test( + name = "firestore_go_gapic_test", + srcs = [":firestore_go_gapic_srcjar_test"], + embed = [":firestore_go_gapic"], + importpath = "cloud.google.com/go/firestore/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-firestore-v1-go", + deps = [ + ":firestore_go_gapic", + ":firestore_go_gapic_srcjar-test.srcjar", + ":firestore_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "firestore_moved_proto", + srcs = [":firestore_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/rpc:status_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "firestore_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":firestore_moved_proto"], +) + +py_grpc_library( + name = "firestore_py_grpc", + srcs = [":firestore_moved_proto"], + deps = [":firestore_py_proto"], +) + +py_gapic_library( + name = "firestore_py_gapic", + src = ":firestore_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.v1", + service_yaml = "//google/firestore:firestore_v1.yaml", + deps = [ + ":firestore_py_grpc", + ":firestore_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "firestore-v1-py", + deps = [ + ":firestore_py_gapic", + ":firestore_py_grpc", + ":firestore_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "firestore_php_proto", + deps = [":firestore_proto"], +) + +php_grpc_library( + name = "firestore_php_grpc", + srcs = [":firestore_proto"], + deps = [":firestore_php_proto"], +) + +php_gapic_library( + name = "firestore_php_gapic", + src = ":firestore_proto_with_info", + gapic_yaml = "firestore_gapic.legacy.yaml", + package = "google.firestore.v1", + service_yaml = "//google/firestore:firestore_v1.yaml", + deps = [ + ":firestore_php_grpc", + ":firestore_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-firestore-v1-php", + deps = [ + ":firestore_php_gapic", + ":firestore_php_grpc", + ":firestore_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "firestore_nodejs_gapic", + src = ":firestore_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.v1", + service_yaml = "//google/firestore:firestore_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "firestore-v1-nodejs", + deps = [ + ":firestore_nodejs_gapic", + ":firestore_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "firestore_ruby_proto", + deps = [":firestore_proto"], +) + +ruby_grpc_library( + name = "firestore_ruby_grpc", + srcs = [":firestore_proto"], + deps = [":firestore_ruby_proto"], +) + +ruby_gapic_library( + name = "firestore_ruby_gapic", + src = ":firestore_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.v1", + service_yaml = "//google/firestore:firestore_v1.yaml", + deps = [ + ":firestore_ruby_grpc", + ":firestore_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-firestore-v1-ruby", + deps = [ + ":firestore_ruby_gapic", + ":firestore_ruby_grpc", + ":firestore_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "firestore_csharp_proto", + deps = [":firestore_proto"], +) + +csharp_grpc_library( + name = "firestore_csharp_grpc", + srcs = [":firestore_proto"], + deps = [":firestore_csharp_proto"], +) + +csharp_gapic_library( + name = "firestore_csharp_gapic", + src = ":firestore_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.v1", + service_yaml = "//google/firestore:firestore_v1.yaml", + deps = [ + ":firestore_csharp_grpc", + ":firestore_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-firestore-v1-csharp", + deps = [ + ":firestore_csharp_gapic", + ":firestore_csharp_grpc", + ":firestore_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/firestore/v1/common.proto b/google/firestore/v1/common.proto index 59c62997a..b6de070a5 100644 --- a/google/firestore/v1/common.proto +++ b/google/firestore/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -28,7 +27,6 @@ option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1"; - // A set of field paths on a document. // Used to restrict a get or update operation on a document to a subset of its // fields. diff --git a/google/firestore/v1/document.proto b/google/firestore/v1/document.proto index d3d9c11c7..43f69478e 100644 --- a/google/firestore/v1/document.proto +++ b/google/firestore/v1/document.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -30,7 +29,6 @@ option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1"; - // A Firestore document. // // Must not exceed 1 MiB - 4 bytes. diff --git a/google/firestore/v1/firestore.proto b/google/firestore/v1/firestore.proto index 5dc9667e2..5f9b6d732 100644 --- a/google/firestore/v1/firestore.proto +++ b/google/firestore/v1/firestore.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.firestore.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/firestore/v1/common.proto"; import "google/firestore/v1/document.proto"; import "google/firestore/v1/query.proto"; @@ -33,25 +34,23 @@ option java_outer_classname = "FirestoreProto"; option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1"; + // Specification of the Firestore API. // The Cloud Firestore service. // -// This service exposes several types of comparable timestamps: -// -// * `create_time` - The time at which a document was created. Changes only -// when a document is deleted, then re-created. Increases in a strict -// monotonic fashion. -// * `update_time` - The time at which a document was last updated. Changes -// every time a document is modified. Does not change when a write results -// in no modifications. Increases in a strict monotonic fashion. -// * `read_time` - The time at which a particular state was observed. Used -// to denote a consistent snapshot of the database or the time at which a -// Document was observed to not exist. -// * `commit_time` - The time at which the writes in a transaction were -// committed. Any read with an equal or greater `read_time` is guaranteed -// to see the effects of the transaction. +// Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL +// document database that simplifies storing, syncing, and querying data for +// your mobile, web, and IoT apps at global scale. Its client libraries provide +// live synchronization and offline support, while its security features and +// integrations with Firebase and Google Cloud Platform (GCP) accelerate +// building truly serverless apps. service Firestore { + option (google.api.default_host) = "firestore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/datastore"; + // Gets a single document. rpc GetDocument(GetDocumentRequest) returns (Document) { option (google.api.http) = { @@ -66,20 +65,13 @@ service Firestore { }; } - // Creates a new document. - rpc CreateDocument(CreateDocumentRequest) returns (Document) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/databases/*/documents/**}/{collection_id}" - body: "document" - }; - } - // Updates or inserts a document. rpc UpdateDocument(UpdateDocumentRequest) returns (Document) { option (google.api.http) = { patch: "/v1/{document.name=projects/*/databases/*/documents/*/**}" body: "document" }; + option (google.api.method_signature) = "document,update_mask"; } // Deletes a document. @@ -87,6 +79,7 @@ service Firestore { option (google.api.http) = { delete: "/v1/{name=projects/*/databases/*/documents/*/**}" }; + option (google.api.method_signature) = "name"; } // Gets multiple documents. @@ -106,6 +99,7 @@ service Firestore { post: "/v1/{database=projects/*/databases/*}/documents:beginTransaction" body: "*" }; + option (google.api.method_signature) = "database"; } // Commits a transaction, while optionally updating documents. @@ -114,6 +108,7 @@ service Firestore { post: "/v1/{database=projects/*/databases/*}/documents:commit" body: "*" }; + option (google.api.method_signature) = "database,writes"; } // Rolls back a transaction. @@ -122,6 +117,7 @@ service Firestore { post: "/v1/{database=projects/*/databases/*}/documents:rollback" body: "*" }; + option (google.api.method_signature) = "database,transaction"; } // Runs a query. @@ -162,14 +158,23 @@ service Firestore { body: "*" } }; + option (google.api.method_signature) = "parent"; + } + + // Creates a new document. + rpc CreateDocument(CreateDocumentRequest) returns (Document) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/databases/*/documents/**}/{collection_id}" + body: "document" + }; } } // The request for [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument]. message GetDocumentRequest { - // The resource name of the Document to get. In the format: + // Required. The resource name of the Document to get. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // The fields to return. If not set, returns all fields. // @@ -191,17 +196,17 @@ message GetDocumentRequest { // The request for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. message ListDocumentsRequest { - // The parent resource name. In the format: + // Required. The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. // For example: // `projects/my-project/databases/my-database/documents` or // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - string parent = 1; + string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // The collection ID, relative to `parent`, to list. For example: `chatrooms` + // Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` // or `messages`. - string collection_id = 2; + string collection_id = 2 [(google.api.field_behavior) = REQUIRED]; // The maximum number of documents to return. int32 page_size = 3; @@ -250,21 +255,21 @@ message ListDocumentsResponse { // The request for [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument]. message CreateDocumentRequest { - // The parent resource. For example: + // Required. The parent resource. For example: // `projects/{project_id}/databases/{database_id}/documents` or // `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - string parent = 1; + string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // The collection ID, relative to `parent`, to list. For example: `chatrooms`. - string collection_id = 2; + // Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`. + string collection_id = 2 [(google.api.field_behavior) = REQUIRED]; // The client-assigned document ID to use for this document. // // Optional. If not specified, an ID will be assigned by the service. string document_id = 3; - // The document to create. `name` must not be set. - Document document = 4; + // Required. The document to create. `name` must not be set. + Document document = 4 [(google.api.field_behavior) = REQUIRED]; // The fields to return. If not set, returns all fields. // @@ -275,9 +280,9 @@ message CreateDocumentRequest { // The request for [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument]. message UpdateDocumentRequest { - // The updated document. + // Required. The updated document. // Creates the document if it does not already exist. - Document document = 1; + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The fields to update. // None of the field paths in the mask may contain a reserved name. @@ -301,9 +306,9 @@ message UpdateDocumentRequest { // The request for [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument]. message DeleteDocumentRequest { - // The resource name of the Document to delete. In the format: + // Required. The resource name of the Document to delete. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // An optional precondition on the document. // The request will fail if this is set and not met by the target document. @@ -312,9 +317,9 @@ message DeleteDocumentRequest { // The request for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. message BatchGetDocumentsRequest { - // The database name. In the format: + // Required. The database name. In the format: // `projects/{project_id}/databases/{database_id}`. - string database = 1; + string database = 1 [(google.api.field_behavior) = REQUIRED]; // The names of the documents to retrieve. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -373,9 +378,9 @@ message BatchGetDocumentsResponse { // The request for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. message BeginTransactionRequest { - // The database name. In the format: + // Required. The database name. In the format: // `projects/{project_id}/databases/{database_id}`. - string database = 1; + string database = 1 [(google.api.field_behavior) = REQUIRED]; // The options for the transaction. // Defaults to a read-write transaction. @@ -390,9 +395,9 @@ message BeginTransactionResponse { // The request for [Firestore.Commit][google.firestore.v1.Firestore.Commit]. message CommitRequest { - // The database name. In the format: + // Required. The database name. In the format: // `projects/{project_id}/databases/{database_id}`. - string database = 1; + string database = 1 [(google.api.field_behavior) = REQUIRED]; // The writes to apply. // @@ -411,29 +416,30 @@ message CommitResponse { // request. repeated WriteResult write_results = 1; - // The time at which the commit occurred. + // The time at which the commit occurred. Any read with an equal or greater + // `read_time` is guaranteed to see the effects of the commit. google.protobuf.Timestamp commit_time = 2; } // The request for [Firestore.Rollback][google.firestore.v1.Firestore.Rollback]. message RollbackRequest { - // The database name. In the format: + // Required. The database name. In the format: // `projects/{project_id}/databases/{database_id}`. - string database = 1; + string database = 1 [(google.api.field_behavior) = REQUIRED]; - // The transaction to roll back. - bytes transaction = 2; + // Required. The transaction to roll back. + bytes transaction = 2 [(google.api.field_behavior) = REQUIRED]; } // The request for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery]. message RunQueryRequest { - // The parent resource name. In the format: + // Required. The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. // For example: // `projects/my-project/databases/my-database/documents` or // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - string parent = 1; + string parent = 1 [(google.api.field_behavior) = REQUIRED]; // The query to run. oneof query_type { @@ -496,10 +502,10 @@ message RunQueryResponse { // given token, then a response containing only an up-to-date token, to use in // the next request. message WriteRequest { - // The database name. In the format: + // Required. The database name. In the format: // `projects/{project_id}/databases/{database_id}`. // This is only required in the first message. - string database = 1; + string database = 1 [(google.api.field_behavior) = REQUIRED]; // The ID of the write stream to resume. // This may only be set in the first message. When left empty, a new write @@ -552,15 +558,16 @@ message WriteResponse { // request. repeated WriteResult write_results = 3; - // The time at which the commit occurred. + // The time at which the commit occurred. Any read with an equal or greater + // `read_time` is guaranteed to see the effects of the write. google.protobuf.Timestamp commit_time = 4; } // A request for [Firestore.Listen][google.firestore.v1.Firestore.Listen] message ListenRequest { - // The database name. In the format: + // Required. The database name. In the format: // `projects/{project_id}/databases/{database_id}`. - string database = 1; + string database = 1 [(google.api.field_behavior) = REQUIRED]; // The supported target changes. oneof target_change { @@ -654,14 +661,8 @@ message Target { google.protobuf.Timestamp read_time = 11; } - // A client provided target ID. - // - // If not set, the server will assign an ID for the target. - // - // Used for resuming a target without changing IDs. The IDs can either be - // client-assigned or be server-assigned in a previous stream. All targets - // with client provided IDs must be added before adding a target that needs - // a server-assigned id. + // The target ID that identifies the target on the stream. Must be a positive + // number and non-zero. int32 target_id = 5; // If the target should be removed once it is current and consistent. @@ -706,11 +707,7 @@ message TargetChange { // // If empty, the change applies to all targets. // - // For `target_change_type=ADD`, the order of the target IDs matches the order - // of the requests to add the targets. This allows clients to unambiguously - // associate server-assigned target IDs with added targets. - // - // For other states, the order of the target IDs is not defined. + // The order of the target IDs is not defined. repeated int32 target_ids = 2; // The error that resulted in this change, if applicable. @@ -737,11 +734,11 @@ message TargetChange { // The request for [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. message ListCollectionIdsRequest { - // The parent document. In the format: + // Required. The parent document. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. // For example: // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - string parent = 1; + string parent = 1 [(google.api.field_behavior) = REQUIRED]; // The maximum number of results to return. int32 page_size = 2; diff --git a/google/firestore/v1/firestore_gapic.legacy.yaml b/google/firestore/v1/firestore_gapic.legacy.yaml new file mode 100644 index 000000000..6200c7bfa --- /dev/null +++ b/google/firestore/v1/firestore_gapic.legacy.yaml @@ -0,0 +1,232 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.firestore.v1 + release_level: GA + python: + package_name: google.cloud.firestore_v1.gapic + release_level: BETA + go: + package_name: cloud.google.com/go/firestore/apiv1 + domain_layer_location: cloud.google.com/go/firestore + release_level: GA + csharp: + package_name: Google.Cloud.Firestore.V1 + release_level: GA + ruby: + package_name: Google::Cloud::Firestore::V1 + release_level: GA + php: + package_name: Google\Cloud\Firestore\V1 + release_level: GA + nodejs: + package_name: firestore.v1 + domain_layer_location: google-cloud + release_level: GA +interfaces: +- name: google.firestore.v1.Firestore + collections: + - name_pattern: projects/{project}/databases/{database} + entity_name: database_root + - name_pattern: projects/{project}/databases/{database}/documents + entity_name: document_root + - name_pattern: projects/{project}/databases/{database}/documents/{document_path=**} + entity_name: document_path + - name_pattern: projects/{project}/databases/{database}/documents/{document}/{any_path=**} + entity_name: any_path + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - INTERNAL + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + - name: streaming + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: GetDocument + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: any_path + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: ListDocuments + required_fields: + - parent + - collection_id + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: documents + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: document_root + parent: any_path + timeout_millis: 60000 + - name: CreateDocument + required_fields: + - parent + - collection_id + - document_id + - document + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: document_root + parent: any_path + timeout_millis: 60000 + - name: UpdateDocument + flattening: + groups: + - parameters: + - document + - update_mask + required_fields: + - document + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + document.name: any_path + timeout_millis: 60000 + - name: DeleteDocument + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: any_path + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: BatchGetDocuments + required_fields: + - database + - documents + retry_codes_name: idempotent + retry_params_name: streaming + field_name_patterns: + database: database_root + # Five minutes + timeout_millis: 300000 + - name: BeginTransaction + flattening: + groups: + - parameters: + - database + required_fields: + - database + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + database: database_root + timeout_millis: 60000 + - name: Commit + flattening: + groups: + - parameters: + - database + - writes + required_fields: + - database + - writes + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + database: database_root + timeout_millis: 60000 + - name: Rollback + flattening: + groups: + - parameters: + - database + - transaction + required_fields: + - database + - transaction + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + database: database_root + timeout_millis: 60000 + - name: RunQuery + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: streaming + field_name_patterns: + parent: document_root + parent: any_path + timeout_millis: 60000 + - name: Write + required_fields: + - database + retry_codes_name: non_idempotent + retry_params_name: streaming + field_name_patterns: + database: database_root + # One day + timeout_millis: 86400000 + - name: Listen + required_fields: + - database + retry_codes_name: idempotent + retry_params_name: streaming + field_name_patterns: + database: database_root + # One day + timeout_millis: 86400000 + - name: ListCollectionIds + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: collection_ids + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: document_root + parent: any_path + timeout_millis: 60000 +resource_name_generation: +- message_name: GetDocumentRequest + field_entity_map: + name: any_path +- message_name: DeleteDocumentRequest + field_entity_map: + name: any_path diff --git a/google/firestore/v1/firestore_gapic.yaml b/google/firestore/v1/firestore_gapic.yaml index a15408c10..7c7e24527 100644 --- a/google/firestore/v1/firestore_gapic.yaml +++ b/google/firestore/v1/firestore_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.firestore.v1 @@ -26,207 +26,60 @@ language_settings: release_level: GA interfaces: - name: google.firestore.v1.Firestore - collections: - - name_pattern: projects/{project}/databases/{database} - entity_name: database_root - - name_pattern: projects/{project}/databases/{database}/documents - entity_name: document_root - - name_pattern: projects/{project}/databases/{database}/documents/{document_path=**} - entity_name: document_path - - name_pattern: projects/{project}/databases/{database}/documents/{document}/{any_path=**} - entity_name: any_path retry_codes_def: - name: idempotent retry_codes: - UNAVAILABLE + - INTERNAL - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 retry_delay_multiplier: 1.3 max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 + initial_rpc_timeout_millis: 60000 rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 + max_rpc_timeout_millis: 60000 total_timeout_millis: 600000 - name: streaming initial_retry_delay_millis: 100 retry_delay_multiplier: 1.3 max_retry_delay_millis: 60000 - # Five minutes - initial_rpc_timeout_millis: 300000 + initial_rpc_timeout_millis: 60000 rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 300000 + max_rpc_timeout_millis: 60000 total_timeout_millis: 600000 methods: - name: GetDocument - required_fields: - - name - retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: any_path - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: ListDocuments - required_fields: - - parent - - collection_id - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: documents - retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - parent: document_root - parent: any_path - timeout_millis: 60000 - name: CreateDocument - required_fields: - - parent - - collection_id - - document_id - - document - retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - parent: document_root - parent: any_path - timeout_millis: 60000 - name: UpdateDocument - flattening: - groups: - - parameters: - - document - - update_mask - required_fields: - - document - - update_mask - retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - document.name: any_path - timeout_millis: 60000 - name: DeleteDocument - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: any_path - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: BatchGetDocuments - required_fields: - - database - - documents retry_codes_name: idempotent retry_params_name: streaming - field_name_patterns: - database: database_root - # Five minutes - timeout_millis: 300000 - name: BeginTransaction - flattening: - groups: - - parameters: - - database - required_fields: - - database retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - database: database_root - timeout_millis: 60000 - name: Commit - flattening: - groups: - - parameters: - - database - - writes - required_fields: - - database - - writes - retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - database: database_root - timeout_millis: 60000 - name: Rollback - flattening: - groups: - - parameters: - - database - - transaction - required_fields: - - database - - transaction retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - database: database_root - timeout_millis: 60000 - name: RunQuery - required_fields: - - parent retry_codes_name: idempotent retry_params_name: streaming - field_name_patterns: - parent: document_root - parent: any_path - timeout_millis: 60000 - name: Write - required_fields: - - database - retry_codes_name: non_idempotent retry_params_name: streaming - field_name_patterns: - database: database_root - # One day - timeout_millis: 86400000 - name: Listen - required_fields: - - database retry_codes_name: idempotent retry_params_name: streaming - field_name_patterns: - database: database_root - # One day - timeout_millis: 86400000 - name: ListCollectionIds - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: collection_ids retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - parent: document_root - parent: any_path - timeout_millis: 60000 -resource_name_generation: -- message_name: GetDocumentRequest - field_entity_map: - name: any_path -- message_name: DeleteDocumentRequest - field_entity_map: - name: any_path diff --git a/google/firestore/v1/firestore_grpc_service_config.json b/google/firestore/v1/firestore_grpc_service_config.json new file mode 100755 index 000000000..0c6f86d9c --- /dev/null +++ b/google/firestore/v1/firestore_grpc_service_config.json @@ -0,0 +1,114 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.firestore.v1.Firestore", + "method": "CreateDocument" + }, + { + "service": "google.firestore.v1.Firestore", + "method": "UpdateDocument" + }, + { + "service": "google.firestore.v1.Firestore", + "method": "Commit" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.firestore.v1.Firestore", + "method": "BatchGetDocuments" + }, + { + "service": "google.firestore.v1.Firestore", + "method": "RunQuery" + } + ], + "timeout": "300s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.firestore.v1.Firestore", + "method": "Listen" + } + ], + "timeout": "86400s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.firestore.v1.Firestore", + "method": "Write" + } + ], + "timeout": "86400s" + }, + { + "name": [ + { + "service": "google.firestore.v1.Firestore", + "method": "GetDocument" + }, + { + "service": "google.firestore.v1.Firestore", + "method": "ListDocuments" + }, + { + "service": "google.firestore.v1.Firestore", + "method": "DeleteDocument" + }, + { + "service": "google.firestore.v1.Firestore", + "method": "BeginTransaction" + }, + { + "service": "google.firestore.v1.Firestore", + "method": "Rollback" + }, + { + "service": "google.firestore.v1.Firestore", + "method": "ListCollectionIds" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/firestore/v1/firestore_v1.yaml b/google/firestore/v1/firestore_v1.yaml new file mode 100644 index 000000000..e3e6409bc --- /dev/null +++ b/google/firestore/v1/firestore_v1.yaml @@ -0,0 +1,44 @@ +type: google.api.Service +config_version: 3 +name: firestore.googleapis.com +title: Cloud Firestore API + +apis: +- name: google.firestore.v1.Firestore + +documentation: + summary: |- + Accesses the NoSQL document database built for automatic scaling, high + performance, and ease of application development. + +backend: + rules: + - selector: 'google.firestore.v1.Firestore.*' + deadline: 295.0 + - selector: 'google.longrunning.Operations.*' + deadline: 295.0 + +http: + rules: + - selector: google.longrunning.Operations.CancelOperation + post: '/v1/{name=projects/*/databases/*/operations/*}:cancel' + body: '*' + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=projects/*/databases/*/operations/*}' + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=projects/*/databases/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=projects/*/databases/*}/operations' + +authentication: + rules: + - selector: 'google.firestore.v1.Firestore.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/datastore + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/datastore diff --git a/google/firestore/v1/query.proto b/google/firestore/v1/query.proto index 48684c060..226d32418 100644 --- a/google/firestore/v1/query.proto +++ b/google/firestore/v1/query.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -29,7 +28,6 @@ option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1"; - // A Firestore query. message StructuredQuery { // A selection of a collection, such as `messages as m1`. @@ -103,6 +101,14 @@ message StructuredQuery { // Contains. Requires that the field is an array. ARRAY_CONTAINS = 7; + + // In. Requires that `value` is a non-empty ArrayValue with at most 10 + // values. + IN = 8; + + // Contains any. Requires that the field is an array and + // `value` is a non-empty ArrayValue with at most 10 values. + ARRAY_CONTAINS_ANY = 9; } // The field to filter by. @@ -115,6 +121,15 @@ message StructuredQuery { Value value = 3; } + // The projection of document's fields to return. + message Projection { + // The fields to return. + // + // If empty, all fields are returned. To only return the name + // of the document, use `['__name__']`. + repeated FieldReference fields = 2; + } + // A filter with a single operand. message UnaryFilter { // A unary operator. @@ -125,7 +140,7 @@ message StructuredQuery { // Test if a field is equal to NaN. IS_NAN = 2; - // Test if an exprestion evaluates to Null. + // Test if an expression evaluates to Null. IS_NULL = 3; } @@ -153,15 +168,6 @@ message StructuredQuery { Direction direction = 2; } - // The projection of document's fields to return. - message Projection { - // The fields to return. - // - // If empty, all fields are returned. To only return the name - // of the document, use `['__name__']`. - repeated FieldReference fields = 2; - } - // A sort direction. enum Direction { // Unspecified. diff --git a/google/firestore/v1/write.proto b/google/firestore/v1/write.proto index 4ab5d833e..403c80f81 100644 --- a/google/firestore/v1/write.proto +++ b/google/firestore/v1/write.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -30,7 +29,6 @@ option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1"; - // A write on a document. message Write { // The operation to execute. @@ -43,9 +41,6 @@ message Write { string delete = 2; // Applies a transformation to a document. - // At most one `transform` per document is allowed in a given request. - // An `update` cannot follow a `transform` on the same document in a given - // request. DocumentTransform transform = 6; } @@ -61,6 +56,13 @@ message Write { // The field paths in this mask must not contain a reserved field name. DocumentMask update_mask = 3; + // The transforms to perform after update. + // + // This field can be set only when the operation is `update`. If present, this + // write is equivalent to performing `update` and `transform` to the same + // document atomically and in order. + repeated DocumentTransform.FieldTransform update_transforms = 7; + // An optional precondition on the document. // // The write will fail if this is set and not met by the target document. diff --git a/google/firestore/v1beta1/BUILD.bazel b/google/firestore/v1beta1/BUILD.bazel index 8d4aa5895..d7036fbc0 100644 --- a/google/firestore/v1beta1/BUILD.bazel +++ b/google/firestore/v1beta1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -17,6 +20,8 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/rpc:status_proto", "//google/type:latlng_proto", "@com_google_protobuf//:empty_proto", @@ -28,7 +33,10 @@ proto_library( proto_library_with_info( name = "firestore_proto_with_info", - deps = [":firestore_proto"], + deps = [ + ":firestore_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -36,18 +44,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "firestore_java_proto", deps = [":firestore_proto"], @@ -56,51 +59,40 @@ java_proto_library( java_grpc_library( name = "firestore_java_grpc", srcs = [":firestore_proto"], - deps = [":firestore_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "firestore_resource_name_java_proto", - gapic_yaml = "firestore_gapic.yaml", - deps = [":firestore_proto"], + deps = [":firestore_java_proto"], ) java_gapic_library( name = "firestore_java_gapic", src = ":firestore_proto_with_info", gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.v1beta1", service_yaml = "//google/firestore:firestore_v1beta1.yaml", - test_deps = [":firestore_java_grpc"], + test_deps = [ + ":firestore_java_grpc", + ], deps = [ ":firestore_java_proto", - ":firestore_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":firestore_java_gapic_test", +java_gapic_test( + name = "firestore_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.firestore.v1beta1.FirestoreClientTest", ], -) for test_name in [ - "com.google.cloud.firestore.v1beta1.FirestoreClientTest", -]] + runtime_deps = [":firestore_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-firestore-v1beta1-java", - client_deps = [":firestore_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":firestore_java_gapic_test"], - grpc_deps = [":firestore_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":firestore_java_gapic", + ":firestore_java_grpc", ":firestore_java_proto", ":firestore_proto", - ":firestore_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -108,10 +100,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -128,11 +120,13 @@ go_proto_library( go_gapic_library( name = "firestore_go_gapic", - src = ":firestore_proto_with_info", - gapic_yaml = "firestore_gapic.yaml", - importpath = "cloud.google.com/go/firestore/apiv1beta1", + srcs = [":firestore_proto_with_info"], + grpc_service_config = "firestore_grpc_service_config.json", + importpath = "cloud.google.com/go/firestore/apiv1beta1;firestore", service_yaml = "//google/firestore:firestore_v1beta1.yaml", - deps = [":firestore_go_proto"], + deps = [ + ":firestore_go_proto", + ], ) go_test( @@ -142,13 +136,237 @@ go_test( importpath = "cloud.google.com/go/firestore/apiv1beta1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-firestore-v1beta1-go", deps = [ ":firestore_go_gapic", - ":firestore_go_gapic_srcjar-smoke-test.srcjar", ":firestore_go_gapic_srcjar-test.srcjar", ":firestore_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "firestore_moved_proto", + srcs = [":firestore_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/rpc:status_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "firestore_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":firestore_moved_proto"], +) + +py_grpc_library( + name = "firestore_py_grpc", + srcs = [":firestore_moved_proto"], + deps = [":firestore_py_proto"], +) + +py_gapic_library( + name = "firestore_py_gapic", + src = ":firestore_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.v1beta1", + service_yaml = "//google/firestore:firestore_v1beta1.yaml", + deps = [ + ":firestore_py_grpc", + ":firestore_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "firestore-v1beta1-py", + deps = [ + ":firestore_py_gapic", + ":firestore_py_grpc", + ":firestore_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "firestore_php_proto", + deps = [":firestore_proto"], +) + +php_grpc_library( + name = "firestore_php_grpc", + srcs = [":firestore_proto"], + deps = [":firestore_php_proto"], +) + +php_gapic_library( + name = "firestore_php_gapic", + src = ":firestore_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.v1beta1", + service_yaml = "//google/firestore:firestore_v1beta1.yaml", + deps = [ + ":firestore_php_grpc", + ":firestore_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-firestore-v1beta1-php", + deps = [ + ":firestore_php_gapic", + ":firestore_php_grpc", + ":firestore_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "firestore_nodejs_gapic", + src = ":firestore_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.v1beta1", + service_yaml = "//google/firestore:firestore_v1beta1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "firestore-v1beta1-nodejs", + deps = [ + ":firestore_nodejs_gapic", + ":firestore_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "firestore_ruby_proto", + deps = [":firestore_proto"], +) + +ruby_grpc_library( + name = "firestore_ruby_grpc", + srcs = [":firestore_proto"], + deps = [":firestore_ruby_proto"], +) + +ruby_gapic_library( + name = "firestore_ruby_gapic", + src = ":firestore_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.v1beta1", + service_yaml = "//google/firestore:firestore_v1beta1.yaml", + deps = [ + ":firestore_ruby_grpc", + ":firestore_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-firestore-v1beta1-ruby", + deps = [ + ":firestore_ruby_gapic", + ":firestore_ruby_grpc", + ":firestore_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "firestore_csharp_proto", + deps = [":firestore_proto"], +) + +csharp_grpc_library( + name = "firestore_csharp_grpc", + srcs = [":firestore_proto"], + deps = [":firestore_csharp_proto"], +) + +csharp_gapic_library( + name = "firestore_csharp_gapic", + src = ":firestore_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + package = "google.firestore.v1beta1", + service_yaml = "//google/firestore:firestore_v1beta1.yaml", + deps = [ + ":firestore_csharp_grpc", + ":firestore_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-firestore-v1beta1-csharp", + deps = [ + ":firestore_csharp_gapic", + ":firestore_csharp_grpc", + ":firestore_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/firestore/v1beta1/common.proto b/google/firestore/v1beta1/common.proto index 87c88a3be..2eaa18347 100644 --- a/google/firestore/v1beta1/common.proto +++ b/google/firestore/v1beta1/common.proto @@ -28,7 +28,6 @@ option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; - // A set of field paths on a document. // Used to restrict a get or update operation on a document to a subset of its // fields. diff --git a/google/firestore/v1beta1/document.proto b/google/firestore/v1beta1/document.proto index 8a043df59..7caae4688 100644 --- a/google/firestore/v1beta1/document.proto +++ b/google/firestore/v1beta1/document.proto @@ -30,7 +30,6 @@ option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; - // A Firestore document. // // Must not exceed 1 MiB - 4 bytes. diff --git a/google/firestore/v1beta1/firestore.proto b/google/firestore/v1beta1/firestore.proto index b7ba79075..c2b15b048 100644 --- a/google/firestore/v1beta1/firestore.proto +++ b/google/firestore/v1beta1/firestore.proto @@ -18,6 +18,8 @@ syntax = "proto3"; package google.firestore.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/firestore/v1beta1/common.proto"; import "google/firestore/v1beta1/document.proto"; import "google/firestore/v1beta1/query.proto"; @@ -33,6 +35,7 @@ option java_outer_classname = "FirestoreProto"; option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; + // Specification of the Firestore API. // The Cloud Firestore service. @@ -52,6 +55,11 @@ option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; // committed. Any read with an equal or greater `read_time` is guaranteed // to see the effects of the transaction. service Firestore { + option (google.api.default_host) = "firestore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/datastore"; + // Gets a single document. rpc GetDocument(GetDocumentRequest) returns (Document) { option (google.api.http) = { @@ -80,6 +88,7 @@ service Firestore { patch: "/v1beta1/{document.name=projects/*/databases/*/documents/*/**}" body: "document" }; + option (google.api.method_signature) = "document,update_mask"; } // Deletes a document. @@ -87,6 +96,7 @@ service Firestore { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/databases/*/documents/*/**}" }; + option (google.api.method_signature) = "name"; } // Gets multiple documents. @@ -106,6 +116,7 @@ service Firestore { post: "/v1beta1/{database=projects/*/databases/*}/documents:beginTransaction" body: "*" }; + option (google.api.method_signature) = "database"; } // Commits a transaction, while optionally updating documents. @@ -114,6 +125,7 @@ service Firestore { post: "/v1beta1/{database=projects/*/databases/*}/documents:commit" body: "*" }; + option (google.api.method_signature) = "database,writes"; } // Rolls back a transaction. @@ -122,6 +134,7 @@ service Firestore { post: "/v1beta1/{database=projects/*/databases/*}/documents:rollback" body: "*" }; + option (google.api.method_signature) = "database,transaction"; } // Runs a query. @@ -162,14 +175,15 @@ service Firestore { body: "*" } }; + option (google.api.method_signature) = "parent"; } } // The request for [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument]. message GetDocumentRequest { - // The resource name of the Document to get. In the format: + // Required. The resource name of the Document to get. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // The fields to return. If not set, returns all fields. // @@ -191,17 +205,17 @@ message GetDocumentRequest { // The request for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments]. message ListDocumentsRequest { - // The parent resource name. In the format: + // Required. The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. // For example: // `projects/my-project/databases/my-database/documents` or // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - string parent = 1; + string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // The collection ID, relative to `parent`, to list. For example: `chatrooms` + // Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` // or `messages`. - string collection_id = 2; + string collection_id = 2 [(google.api.field_behavior) = REQUIRED]; // The maximum number of documents to return. int32 page_size = 3; @@ -250,21 +264,21 @@ message ListDocumentsResponse { // The request for [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument]. message CreateDocumentRequest { - // The parent resource. For example: + // Required. The parent resource. For example: // `projects/{project_id}/databases/{database_id}/documents` or // `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - string parent = 1; + string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // The collection ID, relative to `parent`, to list. For example: `chatrooms`. - string collection_id = 2; + // Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`. + string collection_id = 2 [(google.api.field_behavior) = REQUIRED]; // The client-assigned document ID to use for this document. // // Optional. If not specified, an ID will be assigned by the service. string document_id = 3; - // The document to create. `name` must not be set. - Document document = 4; + // Required. The document to create. `name` must not be set. + Document document = 4 [(google.api.field_behavior) = REQUIRED]; // The fields to return. If not set, returns all fields. // @@ -275,9 +289,9 @@ message CreateDocumentRequest { // The request for [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument]. message UpdateDocumentRequest { - // The updated document. + // Required. The updated document. // Creates the document if it does not already exist. - Document document = 1; + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The fields to update. // None of the field paths in the mask may contain a reserved name. @@ -301,9 +315,9 @@ message UpdateDocumentRequest { // The request for [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument]. message DeleteDocumentRequest { - // The resource name of the Document to delete. In the format: + // Required. The resource name of the Document to delete. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // An optional precondition on the document. // The request will fail if this is set and not met by the target document. @@ -312,9 +326,9 @@ message DeleteDocumentRequest { // The request for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments]. message BatchGetDocumentsRequest { - // The database name. In the format: + // Required. The database name. In the format: // `projects/{project_id}/databases/{database_id}`. - string database = 1; + string database = 1 [(google.api.field_behavior) = REQUIRED]; // The names of the documents to retrieve. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -373,9 +387,9 @@ message BatchGetDocumentsResponse { // The request for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction]. message BeginTransactionRequest { - // The database name. In the format: + // Required. The database name. In the format: // `projects/{project_id}/databases/{database_id}`. - string database = 1; + string database = 1 [(google.api.field_behavior) = REQUIRED]; // The options for the transaction. // Defaults to a read-write transaction. @@ -390,9 +404,9 @@ message BeginTransactionResponse { // The request for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit]. message CommitRequest { - // The database name. In the format: + // Required. The database name. In the format: // `projects/{project_id}/databases/{database_id}`. - string database = 1; + string database = 1 [(google.api.field_behavior) = REQUIRED]; // The writes to apply. // @@ -417,23 +431,23 @@ message CommitResponse { // The request for [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback]. message RollbackRequest { - // The database name. In the format: + // Required. The database name. In the format: // `projects/{project_id}/databases/{database_id}`. - string database = 1; + string database = 1 [(google.api.field_behavior) = REQUIRED]; - // The transaction to roll back. - bytes transaction = 2; + // Required. The transaction to roll back. + bytes transaction = 2 [(google.api.field_behavior) = REQUIRED]; } // The request for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery]. message RunQueryRequest { - // The parent resource name. In the format: + // Required. The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. // For example: // `projects/my-project/databases/my-database/documents` or // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - string parent = 1; + string parent = 1 [(google.api.field_behavior) = REQUIRED]; // The query to run. oneof query_type { @@ -496,10 +510,10 @@ message RunQueryResponse { // given token, then a response containing only an up-to-date token, to use in // the next request. message WriteRequest { - // The database name. In the format: + // Required. The database name. In the format: // `projects/{project_id}/databases/{database_id}`. // This is only required in the first message. - string database = 1; + string database = 1 [(google.api.field_behavior) = REQUIRED]; // The ID of the write stream to resume. // This may only be set in the first message. When left empty, a new write @@ -558,9 +572,9 @@ message WriteResponse { // A request for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen] message ListenRequest { - // The database name. In the format: + // Required. The database name. In the format: // `projects/{project_id}/databases/{database_id}`. - string database = 1; + string database = 1 [(google.api.field_behavior) = REQUIRED]; // The supported target changes. oneof target_change { @@ -654,14 +668,8 @@ message Target { google.protobuf.Timestamp read_time = 11; } - // A client provided target ID. - // - // If not set, the server will assign an ID for the target. - // - // Used for resuming a target without changing IDs. The IDs can either be - // client-assigned or be server-assigned in a previous stream. All targets - // with client provided IDs must be added before adding a target that needs - // a server-assigned id. + // The target ID that identifies the target on the stream. Must be a positive + // number and non-zero. int32 target_id = 5; // If the target should be removed once it is current and consistent. @@ -706,11 +714,7 @@ message TargetChange { // // If empty, the change applies to all targets. // - // For `target_change_type=ADD`, the order of the target IDs matches the order - // of the requests to add the targets. This allows clients to unambiguously - // associate server-assigned target IDs with added targets. - // - // For other states, the order of the target IDs is not defined. + // The order of the target IDs is not defined. repeated int32 target_ids = 2; // The error that resulted in this change, if applicable. @@ -737,11 +741,11 @@ message TargetChange { // The request for [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds]. message ListCollectionIdsRequest { - // The parent document. In the format: + // Required. The parent document. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. // For example: // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - string parent = 1; + string parent = 1 [(google.api.field_behavior) = REQUIRED]; // The maximum number of results to return. int32 page_size = 2; diff --git a/google/firestore/v1beta1/firestore_gapic.legacy.yaml b/google/firestore/v1beta1/firestore_gapic.legacy.yaml new file mode 100644 index 000000000..257e0e247 --- /dev/null +++ b/google/firestore/v1beta1/firestore_gapic.legacy.yaml @@ -0,0 +1,228 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.firestore.v1beta1 + python: + package_name: google.cloud.firestore_v1beta1.gapic + release_level: ALPHA + go: + package_name: cloud.google.com/go/firestore/apiv1beta1 + domain_layer_location: cloud.google.com/go/firestore + release_level: BETA + csharp: + package_name: Google.Cloud.Firestore.V1Beta1 + ruby: + package_name: Google::Cloud::Firestore::V1beta1 + release_level: GA + php: + package_name: Google\Cloud\Firestore\V1beta1 + nodejs: + package_name: firestore.v1beta1 + domain_layer_location: google-cloud +interfaces: +- name: google.firestore.v1beta1.Firestore + collections: + - name_pattern: projects/{project}/databases/{database} + entity_name: database_root + - name_pattern: projects/{project}/databases/{database}/documents + entity_name: document_root + - name_pattern: projects/{project}/databases/{database}/documents/{document_path=**} + entity_name: document_path + - name_pattern: projects/{project}/databases/{database}/documents/{document}/{any_path=**} + entity_name: any_path + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + - name: streaming + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + # Five minutes + initial_rpc_timeout_millis: 300000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 300000 + total_timeout_millis: 600000 + methods: + - name: GetDocument + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: any_path + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: ListDocuments + required_fields: + - parent + - collection_id + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: documents + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: document_root + parent: any_path + timeout_millis: 60000 + - name: CreateDocument + required_fields: + - parent + - collection_id + - document_id + - document + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: document_root + parent: any_path + timeout_millis: 60000 + - name: UpdateDocument + flattening: + groups: + - parameters: + - document + - update_mask + required_fields: + - document + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + document.name: any_path + timeout_millis: 60000 + - name: DeleteDocument + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: any_path + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: BatchGetDocuments + required_fields: + - database + - documents + retry_codes_name: idempotent + retry_params_name: streaming + field_name_patterns: + database: database_root + # Five minutes + timeout_millis: 300000 + - name: BeginTransaction + flattening: + groups: + - parameters: + - database + required_fields: + - database + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + database: database_root + timeout_millis: 60000 + - name: Commit + flattening: + groups: + - parameters: + - database + - writes + required_fields: + - database + - writes + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + database: database_root + timeout_millis: 60000 + - name: Rollback + flattening: + groups: + - parameters: + - database + - transaction + required_fields: + - database + - transaction + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + database: database_root + timeout_millis: 60000 + - name: RunQuery + required_fields: + - parent + retry_codes_name: idempotent + retry_params_name: streaming + field_name_patterns: + parent: document_root + parent: any_path + timeout_millis: 60000 + - name: Write + required_fields: + - database + retry_codes_name: non_idempotent + retry_params_name: streaming + field_name_patterns: + database: database_root + # One day + timeout_millis: 86400000 + - name: Listen + required_fields: + - database + retry_codes_name: idempotent + retry_params_name: streaming + field_name_patterns: + database: database_root + # One day + timeout_millis: 86400000 + - name: ListCollectionIds + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: collection_ids + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: document_root + parent: any_path + timeout_millis: 60000 +resource_name_generation: +- message_name: GetDocumentRequest + field_entity_map: + name: any_path +- message_name: DeleteDocumentRequest + field_entity_map: + name: any_path diff --git a/google/firestore/v1beta1/firestore_gapic.yaml b/google/firestore/v1beta1/firestore_gapic.yaml index 9f4f05aaa..ffa1b0da6 100644 --- a/google/firestore/v1beta1/firestore_gapic.yaml +++ b/google/firestore/v1beta1/firestore_gapic.yaml @@ -1,10 +1,11 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.firestore.v1beta1 python: package_name: google.cloud.firestore_v1beta1.gapic + release_level: ALPHA go: package_name: cloud.google.com/go/firestore/apiv1beta1 domain_layer_location: cloud.google.com/go/firestore @@ -13,7 +14,7 @@ language_settings: package_name: Google.Cloud.Firestore.V1Beta1 ruby: package_name: Google::Cloud::Firestore::V1beta1 - release_level: BETA + release_level: GA php: package_name: Google\Cloud\Firestore\V1beta1 nodejs: @@ -21,22 +22,6 @@ language_settings: domain_layer_location: google-cloud interfaces: - name: google.firestore.v1beta1.Firestore - collections: - - name_pattern: projects/{project}/databases/{database} - entity_name: database_root - - name_pattern: projects/{project}/databases/{database}/documents - entity_name: document_root - - name_pattern: projects/{project}/databases/{database}/documents/{document_path=**} - entity_name: document_path - - name_pattern: projects/{project}/databases/{database}/documents/{document}/{any_path=**} - entity_name: any_path - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -56,172 +41,22 @@ interfaces: max_rpc_timeout_millis: 300000 total_timeout_millis: 600000 methods: - - name: GetDocument - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: any_path - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: ListDocuments - required_fields: - - parent - - collection_id - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: documents - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: document_root - parent: any_path - timeout_millis: 60000 - - name: CreateDocument - required_fields: - - parent - - collection_id - - document_id - - document - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: document_root - parent: any_path - timeout_millis: 60000 - - name: UpdateDocument - flattening: - groups: - - parameters: - - document - - update_mask - required_fields: - - document - - update_mask - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - document.name: any_path - timeout_millis: 60000 - name: DeleteDocument - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: any_path - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: BatchGetDocuments - required_fields: - - database - - documents retry_codes_name: idempotent retry_params_name: streaming - field_name_patterns: - database: database_root - # Five minutes - timeout_millis: 300000 - name: BeginTransaction - flattening: - groups: - - parameters: - - database - required_fields: - - database retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - database: database_root - timeout_millis: 60000 - - name: Commit - flattening: - groups: - - parameters: - - database - - writes - required_fields: - - database - - writes - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - database: database_root - timeout_millis: 60000 - name: Rollback - flattening: - groups: - - parameters: - - database - - transaction - required_fields: - - database - - transaction retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - database: database_root - timeout_millis: 60000 - name: RunQuery - required_fields: - - parent retry_codes_name: idempotent retry_params_name: streaming - field_name_patterns: - parent: document_root - parent: any_path - timeout_millis: 60000 - name: Write - required_fields: - - database - retry_codes_name: non_idempotent retry_params_name: streaming - field_name_patterns: - database: database_root - # One day - timeout_millis: 86400000 - name: Listen - required_fields: - - database retry_codes_name: idempotent retry_params_name: streaming - field_name_patterns: - database: database_root - # One day - timeout_millis: 86400000 - name: ListCollectionIds - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: collection_ids retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: document_root - parent: any_path - timeout_millis: 60000 -resource_name_generation: -- message_name: GetDocumentRequest - field_entity_map: - name: any_path -- message_name: DeleteDocumentRequest - field_entity_map: - name: any_path diff --git a/google/firestore/v1beta1/firestore_grpc_service_config.json b/google/firestore/v1beta1/firestore_grpc_service_config.json new file mode 100755 index 000000000..8f435df8f --- /dev/null +++ b/google/firestore/v1beta1/firestore_grpc_service_config.json @@ -0,0 +1,111 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.firestore.v1beta1.Firestore", + "method": "GetDocument" + }, + { + "service": "google.firestore.v1beta1.Firestore", + "method": "ListDocuments" + }, + { + "service": "google.firestore.v1beta1.Firestore", + "method": "DeleteDocument" + }, + { + "service": "google.firestore.v1beta1.Firestore", + "method": "BeginTransaction" + }, + { + "service": "google.firestore.v1beta1.Firestore", + "method": "Rollback" + }, + { + "service": "google.firestore.v1beta1.Firestore", + "method": "ListCollectionIds" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.firestore.v1beta1.Firestore", + "method": "CreateDocument" + }, + { + "service": "google.firestore.v1beta1.Firestore", + "method": "UpdateDocument" + }, + { + "service": "google.firestore.v1beta1.Firestore", + "method": "Commit" + } + ], + "timeout": "60s" + }, + { + "name": [ + { + "service": "google.firestore.v1beta1.Firestore", + "method": "BatchGetDocuments" + }, + { + "service": "google.firestore.v1beta1.Firestore", + "method": "RunQuery" + } + ], + "timeout": "300s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.firestore.v1beta1.Firestore", + "method": "Listen" + } + ], + "timeout": "86400s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.firestore.v1beta1.Firestore", + "method": "Write" + } + ], + "timeout": "86400s" + } + ] +} diff --git a/google/firestore/v1beta1/firestore_v1beta1.yaml b/google/firestore/v1beta1/firestore_v1beta1.yaml new file mode 100644 index 000000000..819b0d6d3 --- /dev/null +++ b/google/firestore/v1beta1/firestore_v1beta1.yaml @@ -0,0 +1,32 @@ +type: google.api.Service +config_version: 3 +name: firestore.googleapis.com +title: Cloud Firestore API + +apis: +- name: google.firestore.v1beta1.Firestore + +documentation: + summary: |- + Accesses the NoSQL document database built for automatic scaling, high + performance, and ease of application development. + +backend: + rules: + - selector: 'google.firestore.v1beta1.Firestore.*' + deadline: 295.0 + - selector: 'google.longrunning.Operations.*' + deadline: 295.0 + +authentication: + rules: + - selector: 'google.firestore.v1beta1.Firestore.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/datastore + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/datastore diff --git a/google/firestore/v1beta1/query.proto b/google/firestore/v1beta1/query.proto index 94eec9cbb..4f515fabe 100644 --- a/google/firestore/v1beta1/query.proto +++ b/google/firestore/v1beta1/query.proto @@ -29,7 +29,6 @@ option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; - // A Firestore query. message StructuredQuery { // A selection of a collection, such as `messages as m1`. @@ -103,6 +102,14 @@ message StructuredQuery { // Contains. Requires that the field is an array. ARRAY_CONTAINS = 7; + + // In. Requires that `value` is a non-empty ArrayValue with at most 10 + // values. + IN = 8; + + // Contains any. Requires that the field is an array and + // `value` is a non-empty ArrayValue with at most 10 values. + ARRAY_CONTAINS_ANY = 9; } // The field to filter by. @@ -115,15 +122,6 @@ message StructuredQuery { Value value = 3; } - // The projection of document's fields to return. - message Projection { - // The fields to return. - // - // If empty, all fields are returned. To only return the name - // of the document, use `['__name__']`. - repeated FieldReference fields = 2; - } - // A filter with a single operand. message UnaryFilter { // A unary operator. @@ -134,7 +132,7 @@ message StructuredQuery { // Test if a field is equal to NaN. IS_NAN = 2; - // Test if an exprestion evaluates to Null. + // Test if an expression evaluates to Null. IS_NULL = 3; } @@ -157,6 +155,20 @@ message StructuredQuery { Direction direction = 2; } + // A reference to a field, such as `max(messages.time) as max_time`. + message FieldReference { + string field_path = 2; + } + + // The projection of document's fields to return. + message Projection { + // The fields to return. + // + // If empty, all fields are returned. To only return the name + // of the document, use `['__name__']`. + repeated FieldReference fields = 2; + } + // A sort direction. enum Direction { // Unspecified. @@ -169,11 +181,6 @@ message StructuredQuery { DESCENDING = 2; } - // A reference to a field, such as `max(messages.time) as max_time`. - message FieldReference { - string field_path = 2; - } - // The projection to return. Projection select = 1; diff --git a/google/firestore/v1beta1/write.proto b/google/firestore/v1beta1/write.proto index 4e58cc121..c02a2a8a1 100644 --- a/google/firestore/v1beta1/write.proto +++ b/google/firestore/v1beta1/write.proto @@ -30,7 +30,6 @@ option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; - // A write on a document. message Write { // The operation to execute. diff --git a/google/geo/type/BUILD.bazel b/google/geo/type/BUILD.bazel new file mode 100644 index 000000000..125d37de2 --- /dev/null +++ b/google/geo/type/BUILD.bazel @@ -0,0 +1,41 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "cc_proto_library", "go_proto_library", "java_proto_library") + +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +proto_library( + name = "viewport_proto", + srcs = ["viewport.proto"], + deps = ["//google/type:latlng_proto"], +) + +############################################################################## +# Java +############################################################################## +java_proto_library( + name = "viewport_java_proto", + deps = [ + ":viewport_proto", + ], +) + +############################################################################## +# Go +############################################################################## +go_proto_library( + name = "viewport_go_proto", + importpath = "google.golang.org/genproto/googleapis/geo/type", + protos = [":viewport_proto"], + deps = ["//google/type:latlng_go_proto"], +) + +############################################################################## +# C++ +############################################################################## +cc_proto_library( + name = "viewport_cc_proto", + deps = [":viewport_proto"], +) diff --git a/google/geo/type/type_geo.yaml b/google/geo/type/type_geo.yaml new file mode 100644 index 000000000..f39f9dcc1 --- /dev/null +++ b/google/geo/type/type_geo.yaml @@ -0,0 +1,18 @@ +type: google.api.Service +config_version: 1 +name: type.geo.googleapis.com +title: Common Geo Types + +types: +- name: google.geo.type.Viewport + +documentation: + summary: Defines common types for Google Geo APIs. + overview: |- + # Google Common Geo Types + + This package contains definitions of common types for Google Geo APIs. All + types defined in this package are suitable for different APIs to exchange + data, and will never break binary compatibility. They should have design + quality + comparable to major programming languages like Java and C#. diff --git a/google/geo/type/viewport.proto b/google/geo/type/viewport.proto new file mode 100644 index 000000000..ad5029f83 --- /dev/null +++ b/google/geo/type/viewport.proto @@ -0,0 +1,69 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.geo.type; + +import "google/type/latlng.proto"; + +option go_package = "google.golang.org/genproto/googleapis/geo/type/viewport;viewport"; +option java_multiple_files = true; +option java_outer_classname = "ViewportProto"; +option java_package = "com.google.geo.type"; +option objc_class_prefix = "GGTP"; + +// A latitude-longitude viewport, represented as two diagonally opposite `low` +// and `high` points. A viewport is considered a closed region, i.e. it includes +// its boundary. The latitude bounds must range between -90 to 90 degrees +// inclusive, and the longitude bounds must range between -180 to 180 degrees +// inclusive. Various cases include: +// +// - If `low` = `high`, the viewport consists of that single point. +// +// - If `low.longitude` > `high.longitude`, the longitude range is inverted +// (the viewport crosses the 180 degree longitude line). +// +// - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, +// the viewport includes all longitudes. +// +// - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, +// the longitude range is empty. +// +// - If `low.latitude` > `high.latitude`, the latitude range is empty. +// +// Both `low` and `high` must be populated, and the represented box cannot be +// empty (as specified by the definitions above). An empty viewport will result +// in an error. +// +// For example, this viewport fully encloses New York City: +// +// { +// "low": { +// "latitude": 40.477398, +// "longitude": -74.259087 +// }, +// "high": { +// "latitude": 40.91618, +// "longitude": -73.70018 +// } +// } +message Viewport { + // Required. The low point of the viewport. + google.type.LatLng low = 1; + + // Required. The high point of the viewport. + google.type.LatLng high = 2; +} diff --git a/google/home/graph/BUILD.bazel b/google/home/graph/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/home/graph/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/home/graph/v1/BUILD.bazel b/google/home/graph/v1/BUILD.bazel new file mode 100644 index 000000000..a6829a35d --- /dev/null +++ b/google/home/graph/v1/BUILD.bazel @@ -0,0 +1,361 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "graph_proto", + srcs = [ + "device.proto", + "homegraph.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:struct_proto", + ], +) + +proto_library_with_info( + name = "graph_proto_with_info", + deps = [ + ":graph_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "graph_java_proto", + deps = [":graph_proto"], +) + +java_grpc_library( + name = "graph_java_grpc", + srcs = [":graph_proto"], + deps = [":graph_java_proto"], +) + +java_gapic_library( + name = "graph_java_gapic", + src = ":graph_proto_with_info", + gapic_yaml = "homegraph_gapic.yaml", + package = "google.home.graph.v1", + service_yaml = "homegraph_v1.yaml", + test_deps = [ + ":graph_java_grpc", + ], + deps = [ + ":graph_java_proto", + ], +) + +java_gapic_test( + name = "graph_java_gapic_test_suite", + test_classes = [ + "com.google.home.graph.v1.HomeGraphApiServiceClientTest", + ], + runtime_deps = [":graph_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-home-graph-v1-java", + deps = [ + ":graph_java_gapic", + ":graph_java_grpc", + ":graph_java_proto", + ":graph_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "graph_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/home/graph/v1", + protos = [":graph_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "graph_go_gapic", + srcs = [":graph_proto_with_info"], + grpc_service_config = "homegraph_grpc_service_config.json", + importpath = "google.golang.org/api/homegraph/v1;graph", + service_yaml = "homegraph_v1.yaml", + deps = [ + ":graph_go_proto", + ], +) + +go_test( + name = "graph_go_gapic_test", + srcs = [":graph_go_gapic_srcjar_test"], + embed = [":graph_go_gapic"], + importpath = "google.golang.org/api/homegraph/v1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-home-graph-v1-go", + deps = [ + ":graph_go_gapic", + ":graph_go_gapic_srcjar-test.srcjar", + ":graph_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "graph_moved_proto", + srcs = [":graph_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:struct_proto", + ], +) + +py_proto_library( + name = "graph_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":graph_moved_proto"], +) + +py_grpc_library( + name = "graph_py_grpc", + srcs = [":graph_moved_proto"], + deps = [":graph_py_proto"], +) + +py_gapic_library( + name = "graph_py_gapic", + src = ":graph_proto_with_info", + gapic_yaml = "homegraph_gapic.yaml", + package = "google.home.graph.v1", + service_yaml = "homegraph_v1.yaml", + deps = [ + ":graph_py_grpc", + ":graph_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "home-graph-v1-py", + deps = [ + ":graph_py_gapic", + ":graph_py_grpc", + ":graph_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "graph_php_proto", + deps = [":graph_proto"], +) + +php_grpc_library( + name = "graph_php_grpc", + srcs = [":graph_proto"], + deps = [":graph_php_proto"], +) + +php_gapic_library( + name = "graph_php_gapic", + src = ":graph_proto_with_info", + gapic_yaml = "homegraph_gapic.yaml", + package = "google.home.graph.v1", + service_yaml = "homegraph_v1.yaml", + deps = [ + ":graph_php_grpc", + ":graph_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-home-graph-v1-php", + deps = [ + ":graph_php_gapic", + ":graph_php_grpc", + ":graph_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "graph_nodejs_gapic", + src = ":graph_proto_with_info", + gapic_yaml = "homegraph_gapic.yaml", + package = "google.home.graph.v1", + service_yaml = "homegraph_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "home-graph-v1-nodejs", + deps = [ + ":graph_nodejs_gapic", + ":graph_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "graph_ruby_proto", + deps = [":graph_proto"], +) + +ruby_grpc_library( + name = "graph_ruby_grpc", + srcs = [":graph_proto"], + deps = [":graph_ruby_proto"], +) + +ruby_gapic_library( + name = "graph_ruby_gapic", + src = ":graph_proto_with_info", + gapic_yaml = "homegraph_gapic.yaml", + package = "google.home.graph.v1", + service_yaml = "homegraph_v1.yaml", + deps = [ + ":graph_ruby_grpc", + ":graph_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-home-graph-v1-ruby", + deps = [ + ":graph_ruby_gapic", + ":graph_ruby_grpc", + ":graph_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "graph_csharp_proto", + deps = [":graph_proto"], +) + +csharp_grpc_library( + name = "graph_csharp_grpc", + srcs = [":graph_proto"], + deps = [":graph_csharp_proto"], +) + +csharp_gapic_library( + name = "graph_csharp_gapic", + src = ":graph_proto_with_info", + gapic_yaml = "homegraph_gapic.yaml", + package = "google.home.graph.v1", + service_yaml = "homegraph_v1.yaml", + deps = [ + ":graph_csharp_grpc", + ":graph_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-home-graph-v1-csharp", + deps = [ + ":graph_csharp_gapic", + ":graph_csharp_grpc", + ":graph_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/home/graph/v1/device.proto b/google/home/graph/v1/device.proto index 78a480ec5..336c378b7 100644 --- a/google/home/graph/v1/device.proto +++ b/google/home/graph/v1/device.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -22,31 +22,35 @@ option go_package = "google.golang.org/genproto/googleapis/home/graph/v1;graph"; option java_outer_classname = "DeviceProto"; option java_package = "com.google.home.graph.v1"; -// Third-party partner's device definition. +// Third-party device definition. message Device { - // Third-party partner's device ID. + // Third-party device ID. string id = 1; - // Hardware type of the device (e.g. light, outlet, etc). + // Hardware type of the device. + // See [device + // types](https://developers.google.com/assistant/smarthome/guides). string type = 2; // Traits supported by the device. + // See [device + // traits](https://developers.google.com/assistant/smarthome/traits). repeated string traits = 3; - // Name of the device given by the third party. This includes names given to - // the device via third party device manufacturer's app, model names for the - // device, etc. + // Names given to this device by your smart home Action. DeviceNames name = 4; - // Indicates whether the state of this device is being reported to Google - // through ReportStateAndNotification call. + // Indicates whether your smart home Action will report state of this device + // to Google via + // [ReportStateAndNotification][google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification]. bool will_report_state = 5; - // If the third-party partner's cloud configuration includes placing devices - // in rooms, the name of the room can be provided here. + // Suggested name for the room where this device is installed. + // Google attempts to use this value during user setup. string room_hint = 6; - // As in roomHint, for structures that users set up in the partner's system. + // Suggested name for the structure where this device is installed. + // Google attempts to use this value during user setup. string structure_hint = 7; // Device manufacturer, model, hardware version, and software version. @@ -55,21 +59,30 @@ message Device { // Attributes for the traits supported by the device. google.protobuf.Struct attributes = 9; - // Custom JSON data provided by the manufacturer and attached to QUERY and - // EXECUTE requests in AoG. - string custom_data = 10; + // Custom device attributes stored in Home Graph and provided to your + // smart home Action in each + // [QUERY](https://developers.google.com/assistant/smarthome/reference/intent/query) + // and + // [EXECUTE](https://developers.google.com/assistant/smarthome/reference/intent/execute) + // intent. + google.protobuf.Struct custom_data = 10; + + // Alternate IDs associated with this device. + // This is used to identify cloud synced devices enabled for [local + // fulfillment](https://developers.google.com/assistant/smarthome/concepts/local). + repeated AgentOtherDeviceId other_device_ids = 11; - // IDs of other devices associated with this device. This is used to - // represent a device group (e.g. bonded zone) or "facets" synced - // through different flows (e.g. Google Nest Hub Max with a Nest Camera). + // Indicates whether your smart home Action will report notifications + // to Google for this device via + // [ReportStateAndNotification][google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification]. // - // This may also be used to pass in alternate IDs used to identify a cloud - // synced device for local execution (i.e. local verification). If used for - // local verification, this field is synced from the cloud. - repeated AgentOtherDeviceId other_device_ids = 11; + // If your smart home Action enables users to control device notifications, + // you should update this field and call + // [RequestSyncDevices][google.home.graph.v1.HomeGraphApiService.RequestSyncDevices]. + bool notification_supported_by_agent = 12; } -// Different names for the device. +// Identifiers used to describe the device. message DeviceNames { // Primary name of the device, generally provided by the user. string name = 1; @@ -77,8 +90,8 @@ message DeviceNames { // Additional names provided by the user for the device. repeated string nicknames = 2; - // List of names provided by the partner rather than the user, often - // manufacturer names, SKUs, etc. + // List of names provided by the manufacturer rather than the user, such as + // serial numbers, SKUs, etc. repeated string default_names = 3; } @@ -97,11 +110,11 @@ message DeviceInfo { string sw_version = 4; } -// Identifies a device in the third party or first party system. +// Alternate third-party device ID. message AgentOtherDeviceId { - // The agent's ID. Generally it is the agent's AoG project id. + // Project ID for your smart home Action. string agent_id = 1; - // Device ID defined by the agent. The device_id must be unique. + // Unique third-party device ID. string device_id = 2; } diff --git a/google/home/graph/v1/homegraph.proto b/google/home/graph/v1/homegraph.proto index b8b277add..57638d14b 100644 --- a/google/home/graph/v1/homegraph.proto +++ b/google/home/graph/v1/homegraph.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,9 @@ syntax = "proto3"; package google.home.graph.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/home/graph/v1/device.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; @@ -24,114 +27,145 @@ import "google/protobuf/struct.proto"; option go_package = "google.golang.org/genproto/googleapis/home/graph/v1;graph"; option java_outer_classname = "HomeGraphApiServiceProto"; option java_package = "com.google.home.graph.v1"; - -// Google HomeGraph API. HomeGraph Service provides the support for storing -// and querying first-party and third-party devices, rooms and structures, -// the relationships among them and their state in the home. It stores -// entities and their relationships in the home. +option (google.api.resource_definition) = { + type: "homegraph.googleapis.com/AgentUserPath" + pattern: "agentUsers/{agent_user_path=**}" +}; + +// Google Home Graph API service. The Home Graph service provides support for +// accessing first-party and third-party devices stored in Google's Home Graph. +// The Home Graph database provides contextual data about the relationships +// between devices and the home. +// +// For more details, see the [Home Graph developer +// guide](https://developers.google.com/assistant/smarthome/concepts/homegraph). service HomeGraphApiService { - // Requests a Sync call from Google to a 3p partner's home control agent for - // a user. + option (google.api.default_host) = "homegraph.googleapis.com"; + + // Requests Google to send an `action.devices.SYNC` + // [intent](https://developers.google.com/assistant/smarthome/reference/intent/sync) + // to your smart home Action to update device metadata for the given user. // // - // Third-party user's identity is passed in as agent_user_id. + // The third-party user's identity is passed via the `agent_user_id` // (see - // [RequestSyncDevicesRequest][google.home.graph.v1.RequestSyncDevicesRequest]) - // and forwarded back to the agent. Agent is identified by the API key or JWT - // signed by the partner's service account. + // [RequestSyncDevicesRequest][google.home.graph.v1.RequestSyncDevicesRequest]). + // This request must be authorized using service account credentials from your + // Actions console project. rpc RequestSyncDevices(RequestSyncDevicesRequest) returns (RequestSyncDevicesResponse) { option (google.api.http) = { post: "/v1/devices:requestSync" body: "*" }; + option (google.api.method_signature) = "agent_user_id"; } - // Reports device state and optionally sends device notifications. Called by - // an agent when the device state of a third-party changes or the agent wants - // to send a notification about the device. - // This method updates a predefined set of States for a device, which all - // devices have (for example a light will have OnOff, Color, Brightness). - // A new State may not be created and an INVALID_ARGUMENT code will be thrown - // if so. It also optionally takes in a list of Notifications that may be - // created, which are associated to this State change. + // Reports device state and optionally sends device notifications. + // Called by your smart home Action when the state of a third-party device + // changes or you need to send a notification about the device. + // See [Implement Report + // State](https://developers.google.com/assistant/smarthome/develop/report-state) + // for more information. // - // Third-party user's identity is passed in as agent_user_id. - // Agent is identified by the JWT signed by the partner's service account. + // This method updates the device state according to its declared + // [traits](https://developers.google.com/assistant/smarthome/concepts/devices-traits). + // Publishing a new state value outside of these traits will result in an + // `INVALID_ARGUMENT` error response. + // + // The third-party user's identity is passed in via the `agent_user_id` + // (see + // [ReportStateAndNotificationRequest][google.home.graph.v1.ReportStateAndNotificationRequest]). + // This request must be authorized using service account credentials from your + // Actions console project. rpc ReportStateAndNotification(ReportStateAndNotificationRequest) returns (ReportStateAndNotificationResponse) { option (google.api.http) = { post: "/v1/devices:reportStateAndNotification" body: "*" }; + option (google.api.method_signature) = + "request_id,event_id,agent_user_id,payload"; } - // Unlink an agent user from Google. As result, all data related to this user - // will be deleted. + // Unlinks the given third-party user from your smart home Action. + // All data related to this user will be deleted. // - // Here is how the agent user is created in Google: - // When users open their Google Home App, they can begin linking a 3p - // partner. User is guided through the OAuth process. After entering the 3p - // credentials, Google gets the 3p OAuth token, and uses it to make a - // Sync call to the 3p partner and gets back all the user's data, including - // agent_user_id and devices. - // Google then creates the agent user and stores a mapping from the - // agent_user_id -> Google ID mapping. Google also stores all user's devices - // under that Google ID. - // The mapping from agent_user_id -> Google ID is many to many, since one - // Google user can have multiple 3p accounts, and multiple Google users can - // map to one agent_user_id (e.g. husband and wife share one Nest account - // username/password). + // For more details on how users link their accounts, see + // [fulfillment and + // authentication](https://developers.google.com/assistant/smarthome/concepts/fulfillment-authentication). // - // Third-party user's identity is passed in as agent_user_id - // Agent is identified by the JWT signed by the partner's service account. - // - // Note: Special characters (except "/") in agent_user_id must be URL encoded. + // The third-party user's identity is passed in via the `agent_user_id` + // (see + // [DeleteAgentUserRequest][google.home.graph.v1.DeleteAgentUserRequest]). + // This request must be authorized using service account credentials from your + // Actions console project. rpc DeleteAgentUser(DeleteAgentUserRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{agent_user_id=agentUsers/**}" }; + option (google.api.method_signature) = "request_id,agent_user_id"; } - // Gets the device states for the devices in QueryRequest. - // Third-party user's identity is passed in as agent_user_id. Agent is - // identified by the JWT signed by the third-party partner's service account. + // Gets the current states in Home Graph for the given set of the third-party + // user's devices. + // + // The third-party user's identity is passed in via the `agent_user_id` + // (see [QueryRequest][google.home.graph.v1.QueryRequest]). + // This request must be authorized using service account credentials from your + // Actions console project. rpc Query(QueryRequest) returns (QueryResponse) { option (google.api.http) = { post: "/v1/devices:query" body: "*" }; + option (google.api.method_signature) = "request_id,agent_user_id,inputs"; } // Gets all the devices associated with the given third-party user. - // Third-party user's identity is passed in as agent_user_id. Agent is - // identified by the JWT signed by the third-party partner's service account. + // + // The third-party user's identity is passed in via the `agent_user_id` + // (see [SyncRequest][google.home.graph.v1.SyncRequest]). + // This request must be authorized using service account credentials from your + // Actions console project. rpc Sync(SyncRequest) returns (SyncResponse) { option (google.api.http) = { post: "/v1/devices:sync" body: "*" }; + option (google.api.method_signature) = "request_id,agent_user_id"; } } -// Request type for RequestSyncDevices call. +// Request type for the +// [`RequestSyncDevices`](#google.home.graph.v1.HomeGraphApiService.RequestSyncDevices) +// call. message RequestSyncDevicesRequest { - // Required. Third-party user id issued by agent's third-party identity - // provider. - string agent_user_id = 1; + // Required. Third-party user ID. + string agent_user_id = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. If set, the request will be added to a queue and a response will - // be returned immediately. The queue allows for de-duplication of - // simultaneous requests. - bool async = 2; + // be returned immediately. This enables concurrent requests for the given + // `agent_user_id`, but the caller will not receive any error responses. + bool async = 2 [(google.api.field_behavior) = OPTIONAL]; } -// Response type for RequestSyncDevices call. Intentionally empty upon success. -// An HTTP response code is returned with more details upon failure. +// Response type for the +// [`RequestSyncDevices`](#google.home.graph.v1.HomeGraphApiService.RequestSyncDevices) +// call. +// +// Intentionally empty upon success. An HTTP response code is returned +// with more details upon failure. message RequestSyncDevicesResponse {} -// Sample ReportStateAndNotificationRequest, with states and notifications -// defined per device_id (eg: "123" and "456" in the following example): +// Request type for the +// [`ReportStateAndNotification`](#google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification) +// call. It may include states, notifications, or both. States and notifications +// are defined per `device_id` (for example, "123" and "456" in the following +// example). +// # Example +// +// ```json // { // "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", // "agentUserId": "1234", @@ -146,130 +180,137 @@ message RequestSyncDevicesResponse {} // "brightness": 10 // } // }, -// "notifications": { -// "123": { -// "ObjectDetected": { -// "priority": 0, -// "objects": { -// "NAMED": ["Alice", "Bob", "Carol", "Eve"] -// } -// }, -// "DoorUnlocked": { -// "priority": 0, -// "keyUsed": { -// "keyName": "Wife's key" -// } -// } -// }, -// "456": { -// "SprinklersOn": { -// "priority": 0, -// "timeStarted": "1513792702" -// } -// } -// } // } // } // } -// Request type for ReportStateAndNotification call. It may include States, -// Notifications, or both. This request uses globally unique flattened state -// names instead of namespaces based on traits to align with the existing QUERY -// and EXECUTE APIs implemented by 90+ Smart Home partners. -// Next tag: 6. +// ``` message ReportStateAndNotificationRequest { - // Request id used for debugging. + // Request ID used for debugging. string request_id = 1; - // Unique identifier per event (eg: doorbell press). + // Unique identifier per event (for example, a doorbell press). string event_id = 4; - // Required. Third-party user id. - string agent_user_id = 2; + // Required. Third-party user ID. + string agent_user_id = 2 [(google.api.field_behavior) = REQUIRED]; // Token to maintain state in the follow up notification response. - string follow_up_token = 5; - - // State of devices to update and notification metadata for devices. For - // example, if a user turns a light on manually, a State update should be - // sent so that the information is always the current status of the device. - // Notifications are independent from the state and its piece of the payload - // should contain everything necessary to notify the user. Although it may be - // related to a state change, it does not need to be. For example, if a - // device can turn on/off and change temperature, the states reported would - // include both "on" and "70 degrees" but the 3p may choose not to send any - // notification for that, or to only say that the "the room is heating up", - // keeping state and notification independent. - StateAndNotificationPayload payload = 3; + // Deprecated. See the [notifications + // guide](https://developers.google.com/assistant/smarthome/develop/notifications) + // for details on implementing follow up notifications. + string follow_up_token = 5 [deprecated = true]; + + // Required. State of devices to update and notification metadata for devices. + StateAndNotificationPayload payload = 3 + [(google.api.field_behavior) = REQUIRED]; } -// Response type for ReportStateAndNotification call. +// Response type for the +// [`ReportStateAndNotification`](#google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification) +// call. message ReportStateAndNotificationResponse { - // Request id copied from ReportStateAndNotificationRequest. + // Request ID copied from + // [ReportStateAndNotificationRequest][google.home.graph.v1.ReportStateAndNotificationRequest]. string request_id = 1; } -// Payload containing the State and Notification information for devices. +// Payload containing the state and notification information for devices. message StateAndNotificationPayload { - // The devices for updating State and sending Notifications. + // The devices for updating state and sending notifications. ReportStateAndNotificationDevice devices = 1; } -// The States and Notifications specific to a device. +// The states and notifications specific to a device. message ReportStateAndNotificationDevice { - // States of devices to update. + // States of devices to update. See the **Device STATES** section + // of the individual trait [reference + // guides](https://developers.google.com/assistant/smarthome/traits). google.protobuf.Struct states = 1; - // Notifications metadata for devices. + // Notifications metadata for devices. See the **Device NOTIFICATIONS** + // section of the individual trait [reference + // guides](https://developers.google.com/assistant/smarthome/traits). google.protobuf.Struct notifications = 2; } -// Request type for DeleteAgentUser call. +// Request type for the +// [`DeleteAgentUser`](#google.home.graph.v1.HomeGraphApiService.DeleteAgentUser) +// call. message DeleteAgentUserRequest { - // Request id used for debugging. + // Request ID used for debugging. string request_id = 1; - // Required. Third-party user id. - string agent_user_id = 2; + // Required. Third-party user ID. + string agent_user_id = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "homegraph.googleapis.com/AgentUserPath" + } + ]; } -// Request type for Query call. This should be the same format as the AoG -// action.devices.QUERY request -// (https://developers.google.com/actions/smarthome/create-app#actiondevicesquery) -// with the exception of the extra "agent_user_id" and no "intent" and -// "customData" field. +// Request type for the +// [`Query`](#google.home.graph.v1.HomeGraphApiService.Query) call. message QueryRequest { // Request ID used for debugging. string request_id = 1; // Required. Third-party user ID. - string agent_user_id = 2; + string agent_user_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. Inputs containing third-party partner's device IDs for which to + // Required. Inputs containing third-party device IDs for which to // get the device states. - repeated QueryRequestInput inputs = 3; + repeated QueryRequestInput inputs = 3 + [(google.api.field_behavior) = REQUIRED]; } -// Device ID inputs to QueryRequest. +// Device ID inputs to [QueryRequest][google.home.graph.v1.QueryRequest]. message QueryRequestInput { - // Payload containing third-party partner's device IDs. + // Payload containing third-party device IDs. QueryRequestPayload payload = 1; } // Payload containing device IDs. message QueryRequestPayload { - // Third-party partner's device IDs to get device states for. + // Third-party device IDs for which to get the device states. repeated AgentDeviceId devices = 1; } -// Third-party partner's device ID for one device. +// Third-party device ID for one device. message AgentDeviceId { - // Third-party partner's device ID. + // Third-party device ID. string id = 1; } -// Response type for Query call. This should follow the same format as AoG -// action.devices.QUERY response -// (https://developers.google.com/actions/smarthome/create-app#actiondevicesquery). +// Response type for the +// [`Query`](#google.home.graph.v1.HomeGraphApiService.Query) call. +// This should follow the same format as the Google smart home +// `action.devices.QUERY` +// [response](https://developers.google.com/assistant/smarthome/reference/intent/query). +// # Example +// +// ```json +// { +// "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", +// "payload": { +// "devices": { +// "123": { +// "on": true, +// "online": true +// }, +// "456": { +// "on": true, +// "online": true, +// "brightness": 80, +// "color": { +// "name": "cerulean", +// "spectrumRGB": 31655 +// } +// } +// } +// } +// } +// ``` message QueryResponse { // Request ID used for debugging. Copied from the request. string request_id = 1; @@ -285,19 +326,24 @@ message QueryResponsePayload { map devices = 1; } -// Request type for Sync call. This should follow the same format as AoG -// action.devices.SYNC request -// (https://developers.google.com/actions/smarthome/create-app#actiondevicessync) -// with the exception of the extra "agent_user_id" and no "intent" field. +// Request type for the [`Sync`](#google.home.graph.v1.HomeGraphApiService.Sync) +// call. message SyncRequest { // Request ID used for debugging. string request_id = 1; // Required. Third-party user ID. - string agent_user_id = 2; + string agent_user_id = 2 [(google.api.field_behavior) = REQUIRED]; } -// Example SyncResponse: +// Response type for the +// [`Sync`](#google.home.graph.v1.HomeGraphApiService.Sync) call. +// This should follow the same format as the Google smart home +// `action.devices.SYNC` +// [response](https://developers.google.com/assistant/smarthome/reference/intent/sync). +// # Example +// +// ```json // { // "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", // "payload": { @@ -328,10 +374,7 @@ message SyncRequest { // }] // } // } -// -// Response type for Sync call. This should follow the same format as AoG -// action.devices.SYNC response -// (https://developers.google.com/actions/smarthome/create-app#actiondevicessync). +// ``` message SyncResponse { // Request ID used for debugging. Copied from the request. string request_id = 1; @@ -346,5 +389,5 @@ message SyncResponsePayload { string agent_user_id = 1; // Devices associated with the third-party user. - repeated google.home.graph.v1.Device devices = 2; + repeated Device devices = 2; } diff --git a/google/home/graph/v1/homegraph_grpc_service_config.json b/google/home/graph/v1/homegraph_grpc_service_config.json new file mode 100755 index 000000000..32b4eadbb --- /dev/null +++ b/google/home/graph/v1/homegraph_grpc_service_config.json @@ -0,0 +1,44 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.home.graph.v1.HomeGraphApiService", + "method": "RequestSyncDevices" + }, + { + "service": "google.home.graph.v1.HomeGraphApiService", + "method": "ReportStateAndNotification" + } + ], + "timeout": "10s" + }, + { + "name": [ + { + "service": "google.home.graph.v1.HomeGraphApiService", + "method": "DeleteAgentUser" + }, + { + "service": "google.home.graph.v1.HomeGraphApiService", + "method": "Query" + }, + { + "service": "google.home.graph.v1.HomeGraphApiService", + "method": "Sync" + } + ], + "timeout": "10s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/home/graph/v1/homegraph_v1.yaml b/google/home/graph/v1/homegraph_v1.yaml new file mode 100644 index 000000000..ae04cedc6 --- /dev/null +++ b/google/home/graph/v1/homegraph_v1.yaml @@ -0,0 +1,12 @@ +type: google.api.Service +config_version: 3 +name: homegraph.googleapis.com +title: HomeGraph API + +apis: +- name: google.home.graph.v1.HomeGraphApiService + +backend: + rules: + - selector: 'google.home.graph.v1.HomeGraphApiService.*' + deadline: 60.0 diff --git a/google/iam/BUILD.bazel b/google/iam/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/iam/BUILD.bazel +++ b/google/iam/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/iam/admin/v1/BUILD.bazel b/google/iam/admin/v1/BUILD.bazel index 9ca130dd5..2e6a2cde8 100644 --- a/google/iam/admin/v1/BUILD.bazel +++ b/google/iam/admin/v1/BUILD.bazel @@ -1,16 +1,24 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "iam_admin_proto", - srcs = ["iam.proto"], + name = "admin_proto", + srcs = [ + "iam.proto", + ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/iam/v1:iam_policy_proto", "//google/iam/v1:policy_proto", "@com_google_protobuf//:empty_proto", @@ -20,8 +28,69 @@ proto_library( ) proto_library_with_info( - name = "iam_admin_proto_with_info", - deps = [":iam_admin_proto"], + name = "admin_proto_with_info", + deps = [ + ":admin_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "admin_java_proto", + deps = [":admin_proto"], +) + +java_grpc_library( + name = "admin_java_grpc", + srcs = [":admin_proto"], + deps = [":admin_java_proto"], +) + +java_gapic_library( + name = "admin_java_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "iam_gapic.yaml", + package = "google.iam.admin.v1", + service_yaml = "iam.yaml", + test_deps = [ + ":admin_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":admin_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "admin_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.iam.admin.v1.IamClientTest", + ], + runtime_deps = [":admin_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-iam-admin-v1-java", + deps = [ + ":admin_java_gapic", + ":admin_java_grpc", + ":admin_java_proto", + ":admin_proto", + ], ) ############################################################################## @@ -29,17 +98,17 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "iam_admin_go_proto", + name = "admin_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/iam/admin/v1", - protos = [":iam_admin_proto"], + protos = [":admin_proto"], deps = [ "//google/api:annotations_go_proto", "//google/iam/v1:iam_go_proto", @@ -47,32 +116,270 @@ go_proto_library( ) go_gapic_library( - name = "iam_admin_go_gapic", - src = ":iam_admin_proto_with_info", - gapic_yaml = "iam_gapic.yaml", - importpath = "cloud.google.com/go/iam/admin/apiv1", - service_yaml = "//google/iam:iam.yaml", + name = "admin_go_gapic", + srcs = [":admin_proto_with_info"], + grpc_service_config = "iam_grpc_service_config.json", + importpath = "cloud.google.com/go/iam/admin/apiv1;admin", + service_yaml = "iam.yaml", deps = [ - ":iam_admin_go_proto", + ":admin_go_proto", "//google/iam/v1:iam_go_proto", ], ) go_test( - name = "iam_admin_go_gapic_test", - srcs = [":iam_admin_go_gapic_srcjar_test"], - embed = [":iam_admin_go_gapic"], + name = "admin_go_gapic_test", + srcs = [":admin_go_gapic_srcjar_test"], + embed = [":admin_go_gapic"], importpath = "cloud.google.com/go/iam/admin/apiv1", - deps = ["//google/iam/v1:iam_go_proto"], ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-iam-admin-v1-go", deps = [ - ":iam_admin_go_gapic", - ":iam_admin_go_gapic_srcjar-smoke-test.srcjar", - ":iam_admin_go_gapic_srcjar-test.srcjar", - ":iam_admin_go_proto", + ":admin_go_gapic", + ":admin_go_gapic_srcjar-test.srcjar", + ":admin_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "admin_moved_proto", + srcs = [":admin_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "admin_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":admin_moved_proto"], +) + +py_grpc_library( + name = "admin_py_grpc", + srcs = [":admin_moved_proto"], + deps = [":admin_py_proto"], +) + +py_gapic_library( + name = "admin_py_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "iam_gapic.yaml", + package = "google.iam.admin.v1", + service_yaml = "iam.yaml", + deps = [ + ":admin_py_grpc", + ":admin_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "iam-admin-v1-py", + deps = [ + ":admin_py_gapic", + ":admin_py_grpc", + ":admin_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "admin_php_proto", + deps = [":admin_proto"], +) + +php_grpc_library( + name = "admin_php_grpc", + srcs = [":admin_proto"], + deps = [":admin_php_proto"], +) + +php_gapic_library( + name = "admin_php_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "iam_gapic.yaml", + package = "google.iam.admin.v1", + service_yaml = "iam.yaml", + deps = [ + ":admin_php_grpc", + ":admin_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-iam-admin-v1-php", + deps = [ + ":admin_php_gapic", + ":admin_php_grpc", + ":admin_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "admin_nodejs_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "iam_gapic.yaml", + package = "google.iam.admin.v1", + service_yaml = "iam.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "iam-admin-v1-nodejs", + deps = [ + ":admin_nodejs_gapic", + ":admin_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "admin_ruby_proto", + deps = [":admin_proto"], +) + +ruby_grpc_library( + name = "admin_ruby_grpc", + srcs = [":admin_proto"], + deps = [":admin_ruby_proto"], +) + +ruby_gapic_library( + name = "admin_ruby_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "iam_gapic.yaml", + package = "google.iam.admin.v1", + service_yaml = "iam.yaml", + deps = [ + ":admin_ruby_grpc", + ":admin_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-iam-admin-v1-ruby", + deps = [ + ":admin_ruby_gapic", + ":admin_ruby_grpc", + ":admin_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "admin_csharp_proto", + deps = [":admin_proto"], +) + +csharp_grpc_library( + name = "admin_csharp_grpc", + srcs = [":admin_proto"], + deps = [":admin_csharp_proto"], +) + +csharp_gapic_library( + name = "admin_csharp_gapic", + src = ":admin_proto_with_info", + gapic_yaml = "iam_gapic.yaml", + package = "google.iam.admin.v1", + service_yaml = "iam.yaml", + deps = [ + ":admin_csharp_grpc", + ":admin_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-iam-admin-v1-csharp", + deps = [ + ":admin_csharp_gapic", + ":admin_csharp_grpc", + ":admin_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_proto_library", + "cc_grpc_library") + +cc_proto_library( + name = "admin_cc_proto", + deps = [":admin_proto"], +) + +cc_grpc_library( + name = "admin_cc_grpc", + srcs = [":admin_proto"], + grpc_only = True, + deps = [":admin_cc_proto"], +) diff --git a/google/iam/admin/v1/iam.proto b/google/iam/admin/v1/iam.proto index 174e79bd4..804162a41 100644 --- a/google/iam/admin/v1/iam.proto +++ b/google/iam/admin/v1/iam.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,9 @@ syntax = "proto3"; package google.iam.admin.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/protobuf/empty.proto"; @@ -41,17 +44,20 @@ option java_package = "com.google.iam.admin.v1"; // `unique_id`. // // All other methods can identify accounts using the format -// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. -// Using `-` as a wildcard for the project will infer the project from -// the account. The `account` value can be the `email` address or the +// `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. +// Using `-` as a wildcard for the `PROJECT_ID` will infer the project from +// the account. The `ACCOUNT` value can be the `email` address or the // `unique_id` of the service account. service IAM { + option (google.api.default_host) = "iam.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Lists [ServiceAccounts][google.iam.admin.v1.ServiceAccount] for a project. - rpc ListServiceAccounts(ListServiceAccountsRequest) - returns (ListServiceAccountsResponse) { + rpc ListServiceAccounts(ListServiceAccountsRequest) returns (ListServiceAccountsResponse) { option (google.api.http) = { get: "/v1/{name=projects/*}/serviceAccounts" }; + option (google.api.method_signature) = "name"; } // Gets a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. @@ -59,23 +65,23 @@ service IAM { option (google.api.http) = { get: "/v1/{name=projects/*/serviceAccounts/*}" }; + option (google.api.method_signature) = "name"; } // Creates a [ServiceAccount][google.iam.admin.v1.ServiceAccount] // and returns it. - rpc CreateServiceAccount(CreateServiceAccountRequest) - returns (ServiceAccount) { + rpc CreateServiceAccount(CreateServiceAccountRequest) returns (ServiceAccount) { option (google.api.http) = { post: "/v1/{name=projects/*}/serviceAccounts" body: "*" }; + option (google.api.method_signature) = "name,account_id,service_account"; } // Updates a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. // // Currently, only the following fields are updatable: - // `display_name` . - // The `etag` is mandatory. + // `display_name` and `description`. rpc UpdateServiceAccount(ServiceAccount) returns (ServiceAccount) { option (google.api.http) = { put: "/v1/{name=projects/*/serviceAccounts/*}" @@ -84,46 +90,46 @@ service IAM { } // Deletes a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. - rpc DeleteServiceAccount(DeleteServiceAccountRequest) - returns (google.protobuf.Empty) { + rpc DeleteServiceAccount(DeleteServiceAccountRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/serviceAccounts/*}" }; + option (google.api.method_signature) = "name"; } // Lists [ServiceAccountKeys][google.iam.admin.v1.ServiceAccountKey]. - rpc ListServiceAccountKeys(ListServiceAccountKeysRequest) - returns (ListServiceAccountKeysResponse) { + rpc ListServiceAccountKeys(ListServiceAccountKeysRequest) returns (ListServiceAccountKeysResponse) { option (google.api.http) = { get: "/v1/{name=projects/*/serviceAccounts/*}/keys" }; + option (google.api.method_signature) = "name,key_types"; } // Gets the [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey] // by key id. - rpc GetServiceAccountKey(GetServiceAccountKeyRequest) - returns (ServiceAccountKey) { + rpc GetServiceAccountKey(GetServiceAccountKeyRequest) returns (ServiceAccountKey) { option (google.api.http) = { get: "/v1/{name=projects/*/serviceAccounts/*/keys/*}" }; + option (google.api.method_signature) = "name,public_key_type"; } // Creates a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey] // and returns it. - rpc CreateServiceAccountKey(CreateServiceAccountKeyRequest) - returns (ServiceAccountKey) { + rpc CreateServiceAccountKey(CreateServiceAccountKeyRequest) returns (ServiceAccountKey) { option (google.api.http) = { post: "/v1/{name=projects/*/serviceAccounts/*}/keys" body: "*" }; + option (google.api.method_signature) = "name,private_key_type,key_algorithm"; } // Deletes a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]. - rpc DeleteServiceAccountKey(DeleteServiceAccountKeyRequest) - returns (google.protobuf.Empty) { + rpc DeleteServiceAccountKey(DeleteServiceAccountKeyRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/serviceAccounts/*/keys/*}" }; + option (google.api.method_signature) = "name"; } // Signs a blob using a service account's system-managed private key. @@ -132,6 +138,7 @@ service IAM { post: "/v1/{name=projects/*/serviceAccounts/*}:signBlob" body: "*" }; + option (google.api.method_signature) = "name,bytes_to_sign"; } // Signs a JWT using a service account's system-managed private key. @@ -144,53 +151,86 @@ service IAM { post: "/v1/{name=projects/*/serviceAccounts/*}:signJwt" body: "*" }; + option (google.api.method_signature) = "name,payload"; } - // Returns the IAM access control policy for a + // Returns the Cloud IAM access control policy for a // [ServiceAccount][google.iam.admin.v1.ServiceAccount]. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { + // + // Note: Service accounts are both + // [resources and + // identities](/iam/docs/service-accounts#service_account_permissions). This + // method treats the service account as a resource. It returns the Cloud IAM + // policy that reflects what members have access to the service account. + // + // This method does not return what resources the service account has access + // to. To see if a service account has access to a resource, call the + // `getIamPolicy` method on the target resource. For example, to view grants + // for a project, call the + // [projects.getIamPolicy](/resource-manager/reference/rest/v1/projects/getIamPolicy) + // method. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/serviceAccounts/*}:getIamPolicy" - body: "" }; + option (google.api.method_signature) = "resource"; } - // Sets the IAM access control policy for a + // Sets the Cloud IAM access control policy for a // [ServiceAccount][google.iam.admin.v1.ServiceAccount]. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { + // + // Note: Service accounts are both + // [resources and + // identities](/iam/docs/service-accounts#service_account_permissions). This + // method treats the service account as a resource. Use it to grant members + // access to the service account, such as when they need to impersonate it. + // + // This method does not grant the service account access to other resources, + // such as projects. To grant a service account access to resources, include + // the service account in the Cloud IAM policy for the desired resource, then + // call the appropriate `setIamPolicy` method on the target resource. For + // example, to grant a service account access to a project, call the + // [projects.setIamPolicy](/resource-manager/reference/rest/v1/projects/setIamPolicy) + // method. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/serviceAccounts/*}:setIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource,policy"; } // Tests the specified permissions against the IAM access control policy // for a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1/{resource=projects/*/serviceAccounts/*}:testIamPermissions" body: "*" }; + option (google.api.method_signature) = "resource,permissions"; } // Queries roles that can be granted on a particular resource. // A role is grantable if it can be used as the role in a binding for a policy // for that resource. - rpc QueryGrantableRoles(QueryGrantableRolesRequest) - returns (QueryGrantableRolesResponse) { + rpc QueryGrantableRoles(QueryGrantableRolesRequest) returns (QueryGrantableRolesResponse) { option (google.api.http) = { post: "/v1/roles:queryGrantableRoles" body: "*" }; + option (google.api.method_signature) = "full_resource_name"; } // Lists the Roles defined on a resource. rpc ListRoles(ListRolesRequest) returns (ListRolesResponse) { option (google.api.http) = { get: "/v1/roles" + additional_bindings { + get: "/v1/{parent=organizations/*}/roles" + } + additional_bindings { + get: "/v1/{parent=projects/*}/roles" + } }; } @@ -198,6 +238,12 @@ service IAM { rpc GetRole(GetRoleRequest) returns (Role) { option (google.api.http) = { get: "/v1/{name=roles/*}" + additional_bindings { + get: "/v1/{name=organizations/*/roles/*}" + } + additional_bindings { + get: "/v1/{name=projects/*/roles/*}" + } }; } @@ -206,6 +252,10 @@ service IAM { option (google.api.http) = { post: "/v1/{parent=organizations/*}/roles" body: "*" + additional_bindings { + post: "/v1/{parent=projects/*}/roles" + body: "*" + } }; } @@ -214,6 +264,10 @@ service IAM { option (google.api.http) = { patch: "/v1/{name=organizations/*/roles/*}" body: "role" + additional_bindings { + patch: "/v1/{name=projects/*/roles/*}" + body: "role" + } }; } @@ -227,6 +281,9 @@ service IAM { rpc DeleteRole(DeleteRoleRequest) returns (Role) { option (google.api.http) = { delete: "/v1/{name=organizations/*/roles/*}" + additional_bindings { + delete: "/v1/{name=projects/*/roles/*}" + } }; } @@ -235,13 +292,16 @@ service IAM { option (google.api.http) = { post: "/v1/{name=organizations/*/roles/*}:undelete" body: "*" + additional_bindings { + post: "/v1/{name=projects/*/roles/*}:undelete" + body: "*" + } }; } // Lists the permissions testable on a resource. // A permission is testable if it can be tested for an identity on a resource. - rpc QueryTestablePermissions(QueryTestablePermissionsRequest) - returns (QueryTestablePermissionsResponse) { + rpc QueryTestablePermissions(QueryTestablePermissionsRequest) returns (QueryTestablePermissionsResponse) { option (google.api.http) = { post: "/v1/permissions:queryTestablePermissions" body: "*" @@ -257,25 +317,29 @@ service IAM { // `unique_id`. // // If the account already exists, the account's resource name is returned -// in util::Status's ResourceInfo.resource_name in the format of -// projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}. The caller can -// use the name in other methods to access the account. +// in the format of projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}. The caller +// can use the name in other methods to access the account. // // All other methods can identify the service account using the format -// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. -// Using `-` as a wildcard for the project will infer the project from -// the account. The `account` value can be the `email` address or the +// `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. +// Using `-` as a wildcard for the `PROJECT_ID` will infer the project from +// the account. The `ACCOUNT` value can be the `email` address or the // `unique_id` of the service account. message ServiceAccount { + option (google.api.resource) = { + type: "iam.googleapis.com/ServiceAccount" + pattern: "projects/{project}/serviceAccounts/{service_account}" + }; + // The resource name of the service account in the following format: - // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. // - // Requests using `-` as a wildcard for the project will infer the project - // from the `account` and the `account` value can be the `email` address or - // the `unique_id` of the service account. + // Requests using `-` as a wildcard for the `PROJECT_ID` will infer the + // project from the `account` and the `ACCOUNT` value can be the `email` + // address or the `unique_id` of the service account. // // In responses the resource name will always be in the format - // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. string name = 1; // @OutputOnly The id of the project that owns the service account. @@ -287,11 +351,12 @@ message ServiceAccount { // @OutputOnly The email address of the service account. string email = 5; - // Optional. A user-specified description of the service account. Must be - // fewer than 100 UTF-8 bytes. + // Optional. A user-specified name for the service account. + // Must be less than or equal to 100 UTF-8 bytes. string display_name = 6; - // Used to perform a consistent read-modify-write. + // Optional. Note: `etag` is an inoperable legacy field that is only returned + // for backwards compatibility. bytes etag = 7; // @OutputOnly. The OAuth2 client id for the service account. @@ -304,17 +369,22 @@ message ServiceAccount { message CreateServiceAccountRequest { // Required. The resource name of the project associated with the service // accounts, such as `projects/my-project-123`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Required. The account id that is used to generate the service account // email address and a stable unique id. It is unique within a project, // must be 6-30 characters long, and match the regular expression // `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035. - string account_id = 2; + string account_id = 2 [(google.api.field_behavior) = REQUIRED]; // The [ServiceAccount][google.iam.admin.v1.ServiceAccount] resource to // create. Currently, only the following values are user assignable: - // `display_name` . + // `display_name` and `description`. ServiceAccount service_account = 3; } @@ -322,7 +392,12 @@ message CreateServiceAccountRequest { message ListServiceAccountsRequest { // Required. The resource name of the project associated with the service // accounts, such as `projects/my-project-123`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Optional limit on the number of service accounts to include in the // response. Further accounts can subsequently be obtained by including the @@ -348,22 +423,32 @@ message ListServiceAccountsResponse { // The service account get request. message GetServiceAccountRequest { - // The resource name of the service account in the following format: - // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. - // Using `-` as a wildcard for the project will infer the project from - // the account. The `account` value can be the `email` address or the + // Required. The resource name of the service account in the following format: + // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. + // Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + // the account. The `ACCOUNT` value can be the `email` address or the // `unique_id` of the service account. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; } // The service account delete request. message DeleteServiceAccountRequest { - // The resource name of the service account in the following format: - // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. - // Using `-` as a wildcard for the project will infer the project from - // the account. The `account` value can be the `email` address or the + // Required. The resource name of the service account in the following format: + // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. + // Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + // the account. The `ACCOUNT` value can be the `email` address or the // `unique_id` of the service account. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; } // The service account keys list request. @@ -382,13 +467,18 @@ message ListServiceAccountKeysRequest { SYSTEM_MANAGED = 2; } - // The resource name of the service account in the following format: - // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + // Required. The resource name of the service account in the following format: + // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. // - // Using `-` as a wildcard for the project, will infer the project from - // the account. The `account` value can be the `email` address or the + // Using `-` as a wildcard for the `PROJECT_ID`, will infer the project from + // the account. The `ACCOUNT` value can be the `email` address or the // `unique_id` of the service account. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; // Filters the types of keys the user wants to include in the list // response. Duplicate key types are not allowed. If no key type @@ -404,13 +494,18 @@ message ListServiceAccountKeysResponse { // The service account key get by id request. message GetServiceAccountKeyRequest { - // The resource name of the service account key in the following format: - // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`. + // Required. The resource name of the service account key in the following format: + // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. // - // Using `-` as a wildcard for the project will infer the project from - // the account. The `account` value can be the `email` address or the + // Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + // the account. The `ACCOUNT` value can be the `email` address or the // `unique_id` of the service account. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/Key" + } + ]; // The output format of the public key requested. // X509_PEM is the default output format. @@ -427,15 +522,22 @@ message GetServiceAccountKeyRequest { // their service accounts. Users retain the private key of these key-pairs, // and Google retains ONLY the public key. // -// System-managed key-pairs are managed automatically by Google, and rotated -// daily without user intervention. The private key never leaves Google's -// servers to maximize security. +// System-managed keys are automatically rotated by Google, and are used for +// signing for a maximum of two weeks. The rotation process is probabilistic, +// and usage of the new key will gradually ramp up and down over the key's +// lifetime. We recommend caching the public key set for a service account for +// no more than 24 hours to ensure you have access to the latest keys. // // Public keys for all service accounts are also published at the OAuth2 // Service Account API. message ServiceAccountKey { + option (google.api.resource) = { + type: "iam.googleapis.com/Key" + pattern: "projects/{project}/serviceAccounts/{service_account}/keys/{key}" + }; + // The resource name of the service account key in the following format - // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`. + // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. string name = 1; // The output format for the private key. @@ -452,7 +554,7 @@ message ServiceAccountKey { // The private key data. Only provided in `CreateServiceAccountKey` // responses. Make sure to keep the private key data secure because it // allows for the assertion of the service account identity. - // When decoded, the private key data can be used to authenticate with + // When base64 decoded, the private key data can be used to authenticate with // Google API client libraries and with // gcloud // auth activate-service-account. @@ -465,20 +567,29 @@ message ServiceAccountKey { google.protobuf.Timestamp valid_after_time = 4; // The key can be used before this timestamp. + // For system-managed key pairs, this timestamp is the end time for the + // private key signing operation. The public key could still be used + // for verification for a few hours after this time. google.protobuf.Timestamp valid_before_time = 5; } // The service account key create request. message CreateServiceAccountKeyRequest { - // The resource name of the service account in the following format: - // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. - // Using `-` as a wildcard for the project will infer the project from - // the account. The `account` value can be the `email` address or the + // Required. The resource name of the service account in the following format: + // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. + // Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + // the account. The `ACCOUNT` value can be the `email` address or the // `unique_id` of the service account. - string name = 1; - - // The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the - // default output format. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; + + // The output format of the private key. The default value is + // `TYPE_GOOGLE_CREDENTIALS_FILE`, which is the Google Credentials File + // format. ServiceAccountPrivateKeyType private_key_type = 2; // Which type of key and algorithm to use for the key. @@ -489,25 +600,35 @@ message CreateServiceAccountKeyRequest { // The service account key delete request. message DeleteServiceAccountKeyRequest { - // The resource name of the service account key in the following format: - // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`. - // Using `-` as a wildcard for the project will infer the project from - // the account. The `account` value can be the `email` address or the + // Required. The resource name of the service account key in the following format: + // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. + // Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + // the account. The `ACCOUNT` value can be the `email` address or the // `unique_id` of the service account. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/Key" + } + ]; } // The service account sign blob request. message SignBlobRequest { - // The resource name of the service account in the following format: - // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. - // Using `-` as a wildcard for the project will infer the project from - // the account. The `account` value can be the `email` address or the + // Required. The resource name of the service account in the following format: + // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. + // Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + // the account. The `ACCOUNT` value can be the `email` address or the // `unique_id` of the service account. - string name = 1; - - // The bytes to sign. - bytes bytes_to_sign = 2; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; + + // Required. The bytes to sign. + bytes bytes_to_sign = 2 [(google.api.field_behavior) = REQUIRED]; } // The service account sign blob response. @@ -521,15 +642,20 @@ message SignBlobResponse { // The service account sign JWT request. message SignJwtRequest { - // The resource name of the service account in the following format: - // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. - // Using `-` as a wildcard for the project will infer the project from - // the account. The `account` value can be the `email` address or the + // Required. The resource name of the service account in the following format: + // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. + // Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + // the account. The `ACCOUNT` value can be the `email` address or the // `unique_id` of the service account. - string name = 1; - - // The JWT payload to sign, a JSON JWT Claim set. - string payload = 2; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; + + // Required. The JWT payload to sign, a JSON JWT Claim set. + string payload = 2 [(google.api.field_behavior) = REQUIRED]; } // The service account sign JWT response. @@ -545,10 +671,12 @@ message SignJwtResponse { message Role { // A stage representing a role's lifecycle phase. enum RoleLaunchStage { - // The user has indicated this role is currently in an alpha phase. + // The user has indicated this role is currently in an Alpha phase. If this + // launch stage is selected, the `stage` field will not be included when + // requesting the definition for a given role. ALPHA = 0; - // The user has indicated this role is currently in a beta phase. + // The user has indicated this role is currently in a Beta phase. BETA = 1; // The user has indicated this role is generally available. @@ -561,7 +689,7 @@ message Role { // it is granted to in policies. DISABLED = 5; - // The user has indicated this role is currently in an eap phase. + // The user has indicated this role is currently in an EAP phase. EAP = 6; } @@ -570,21 +698,23 @@ message Role { // When Role is used in CreateRole, the role name must not be set. // // When Role is used in output and other input such as UpdateRole, the role - // name is the complete path, e.g., roles/logging.viewer for curated roles + // name is the complete path, e.g., roles/logging.viewer for predefined roles // and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles. string name = 1; - // Optional. A human-readable title for the role. Typically this + // Optional. A human-readable title for the role. Typically this // is limited to 100 UTF-8 bytes. string title = 2; - // Optional. A human-readable description for the role. + // Optional. A human-readable description for the role. string description = 3; // The names of the permissions this role grants when bound in an IAM policy. repeated string included_permissions = 7; - // The current launch stage of the role. + // The current launch stage of the role. If the `ALPHA` launch stage has been + // selected for a role, the `stage` field will not be included in the + // returned definition for the role. RoleLaunchStage stage = 8; // Used to perform a consistent read-modify-write. @@ -602,7 +732,7 @@ message QueryGrantableRolesRequest { // The name follows the Google Cloud Platform resource format. // For example, a Cloud Platform project with id `my-project` will be named // `//cloudresourcemanager.googleapis.com/projects/my-project`. - string full_resource_name = 1; + string full_resource_name = 1 [(google.api.field_behavior) = REQUIRED]; RoleView view = 2; @@ -626,11 +756,34 @@ message QueryGrantableRolesResponse { // The request to get all roles defined under a resource. message ListRolesRequest { - // The resource name of the parent resource in one of the following formats: - // `` (empty string) -- this refers to curated roles. - // `organizations/{ORGANIZATION_ID}` - // `projects/{PROJECT_ID}` - string parent = 1; + // The `parent` parameter's value depends on the target resource for the + // request, namely + // [`roles`](/iam/reference/rest/v1/roles), + // [`projects`](/iam/reference/rest/v1/projects.roles), or + // [`organizations`](/iam/reference/rest/v1/organizations.roles). Each + // resource type's `parent` value format is described below: + // + // * [`roles.list()`](/iam/reference/rest/v1/roles/list): An empty string. + // This method doesn't require a resource; it simply returns all + // [predefined roles](/iam/docs/understanding-roles#predefined_roles) in + // Cloud IAM. Example request URL: + // `https://iam.googleapis.com/v1/roles` + // + // * [`projects.roles.list()`](/iam/reference/rest/v1/projects.roles/list): + // `projects/{PROJECT_ID}`. This method lists all project-level + // [custom roles](/iam/docs/understanding-custom-roles). + // Example request URL: + // `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` + // + // * [`organizations.roles.list()`](/iam/reference/rest/v1/organizations.roles/list): + // `organizations/{ORGANIZATION_ID}`. This method lists all + // organization-level [custom roles](/iam/docs/understanding-custom-roles). + // Example request URL: + // `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles` + // + // Note: Wildcard (*) values are invalid; you must specify a complete project + // ID or organization ID. + string parent = 1 [(google.api.resource_reference).type = "*"]; // Optional limit on the number of roles to include in the response. int32 page_size = 2; @@ -638,7 +791,10 @@ message ListRolesRequest { // Optional pagination token returned in an earlier ListRolesResponse. string page_token = 3; - // Optional view for the returned Role objects. + // Optional view for the returned Role objects. When `FULL` is specified, + // the `includedPermissions` field is returned, which includes a list of all + // permissions in the role. The default value is `BASIC`, which does not + // return the `includedPermissions` field. RoleView view = 4; // Include Roles that have been deleted. @@ -657,21 +813,61 @@ message ListRolesResponse { // The request to get the definition of an existing role. message GetRoleRequest { - // The resource name of the role in one of the following formats: - // `roles/{ROLE_NAME}` - // `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}` - // `projects/{PROJECT_ID}/roles/{ROLE_NAME}` - string name = 1; + // The `name` parameter's value depends on the target resource for the + // request, namely + // [`roles`](/iam/reference/rest/v1/roles), + // [`projects`](/iam/reference/rest/v1/projects.roles), or + // [`organizations`](/iam/reference/rest/v1/organizations.roles). Each + // resource type's `name` value format is described below: + // + // * [`roles.get()`](/iam/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`. + // This method returns results from all + // [predefined roles](/iam/docs/understanding-roles#predefined_roles) in + // Cloud IAM. Example request URL: + // `https://iam.googleapis.com/v1/roles/{ROLE_NAME}` + // + // * [`projects.roles.get()`](/iam/reference/rest/v1/projects.roles/get): + // `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only + // [custom roles](/iam/docs/understanding-custom-roles) that have been + // created at the project level. Example request URL: + // `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}` + // + // * [`organizations.roles.get()`](/iam/reference/rest/v1/organizations.roles/get): + // `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method + // returns only [custom roles](/iam/docs/understanding-custom-roles) that + // have been created at the organization level. Example request URL: + // `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}` + // + // Note: Wildcard (*) values are invalid; you must specify a complete project + // ID or organization ID. + string name = 1 [(google.api.resource_reference).type = "*"]; } // The request to create a new role. message CreateRoleRequest { - // The resource name of the parent resource in one of the following formats: - // `organizations/{ORGANIZATION_ID}` - // `projects/{PROJECT_ID}` - string parent = 1; + // The `parent` parameter's value depends on the target resource for the + // request, namely + // [`projects`](/iam/reference/rest/v1/projects.roles) or + // [`organizations`](/iam/reference/rest/v1/organizations.roles). Each + // resource type's `parent` value format is described below: + // + // * [`projects.roles.create()`](/iam/reference/rest/v1/projects.roles/create): + // `projects/{PROJECT_ID}`. This method creates project-level + // [custom roles](/iam/docs/understanding-custom-roles). + // Example request URL: + // `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` + // + // * [`organizations.roles.create()`](/iam/reference/rest/v1/organizations.roles/create): + // `organizations/{ORGANIZATION_ID}`. This method creates organization-level + // [custom roles](/iam/docs/understanding-custom-roles). Example request + // URL: + // `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles` + // + // Note: Wildcard (*) values are invalid; you must specify a complete project + // ID or organization ID. + string parent = 1 [(google.api.resource_reference).type = "*"]; - // The role id to use for this role. + // The role ID to use for this role. string role_id = 2; // The Role resource to create. @@ -680,11 +876,27 @@ message CreateRoleRequest { // The request to update a role. message UpdateRoleRequest { - // The resource name of the role in one of the following formats: - // `roles/{ROLE_NAME}` - // `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}` - // `projects/{PROJECT_ID}/roles/{ROLE_NAME}` - string name = 1; + // The `name` parameter's value depends on the target resource for the + // request, namely + // [`projects`](/iam/reference/rest/v1/projects.roles) or + // [`organizations`](/iam/reference/rest/v1/organizations.roles). Each + // resource type's `name` value format is described below: + // + // * [`projects.roles.patch()`](/iam/reference/rest/v1/projects.roles/patch): + // `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates only + // [custom roles](/iam/docs/understanding-custom-roles) that have been + // created at the project level. Example request URL: + // `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}` + // + // * [`organizations.roles.patch()`](/iam/reference/rest/v1/organizations.roles/patch): + // `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method + // updates only [custom roles](/iam/docs/understanding-custom-roles) that + // have been created at the organization level. Example request URL: + // `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}` + // + // Note: Wildcard (*) values are invalid; you must specify a complete project + // ID or organization ID. + string name = 1 [(google.api.resource_reference).type = "*"]; // The updated role. Role role = 2; @@ -695,10 +907,27 @@ message UpdateRoleRequest { // The request to delete an existing role. message DeleteRoleRequest { - // The resource name of the role in one of the following formats: - // `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}` - // `projects/{PROJECT_ID}/roles/{ROLE_NAME}` - string name = 1; + // The `name` parameter's value depends on the target resource for the + // request, namely + // [`projects`](/iam/reference/rest/v1/projects.roles) or + // [`organizations`](/iam/reference/rest/v1/organizations.roles). Each + // resource type's `name` value format is described below: + // + // * [`projects.roles.delete()`](/iam/reference/rest/v1/projects.roles/delete): + // `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes only + // [custom roles](/iam/docs/understanding-custom-roles) that have been + // created at the project level. Example request URL: + // `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}` + // + // * [`organizations.roles.delete()`](/iam/reference/rest/v1/organizations.roles/delete): + // `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method + // deletes only [custom roles](/iam/docs/understanding-custom-roles) that + // have been created at the organization level. Example request URL: + // `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}` + // + // Note: Wildcard (*) values are invalid; you must specify a complete project + // ID or organization ID. + string name = 1 [(google.api.resource_reference).type = "*"]; // Used to perform a consistent read-modify-write. bytes etag = 2; @@ -706,10 +935,27 @@ message DeleteRoleRequest { // The request to undelete an existing role. message UndeleteRoleRequest { - // The resource name of the role in one of the following formats: - // `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}` - // `projects/{PROJECT_ID}/roles/{ROLE_NAME}` - string name = 1; + // The `name` parameter's value depends on the target resource for the + // request, namely + // [`projects`](/iam/reference/rest/v1/projects.roles) or + // [`organizations`](/iam/reference/rest/v1/organizations.roles). Each + // resource type's `name` value format is described below: + // + // * [`projects.roles.undelete()`](/iam/reference/rest/v1/projects.roles/undelete): + // `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes + // only [custom roles](/iam/docs/understanding-custom-roles) that have been + // created at the project level. Example request URL: + // `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}` + // + // * [`organizations.roles.undelete()`](/iam/reference/rest/v1/organizations.roles/undelete): + // `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method + // undeletes only [custom roles](/iam/docs/understanding-custom-roles) that + // have been created at the organization level. Example request URL: + // `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}` + // + // Note: Wildcard (*) values are invalid; you must specify a complete project + // ID or organization ID. + string name = 1 [(google.api.resource_reference).type = "*"]; // Used to perform a consistent read-modify-write. bytes etag = 2; @@ -751,6 +997,7 @@ message Permission { string title = 2; // A brief description of what this Permission is used for. + // This permission can ONLY be used in predefined roles. string description = 3; // This permission can ONLY be used in predefined roles. diff --git a/google/iam/admin/v1/iam.yaml b/google/iam/admin/v1/iam.yaml new file mode 100644 index 000000000..df0851e3f --- /dev/null +++ b/google/iam/admin/v1/iam.yaml @@ -0,0 +1,20 @@ +type: google.api.Service +config_version: 2 +name: iam.googleapis.com +title: Identity and Access Management (IAM) API + +apis: +- name: google.iam.admin.v1.IAM + +documentation: + summary: |- + Manages identity and access control for Google Cloud Platform resources, + including the creation of service accounts, which you can use to + authenticate to Google and make API calls. + +authentication: + rules: + - selector: 'google.iam.admin.v1.IAM.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/iam/admin/v1/iam_gapic.legacy.yaml b/google/iam/admin/v1/iam_gapic.legacy.yaml new file mode 100644 index 000000000..4c568c2f9 --- /dev/null +++ b/google/iam/admin/v1/iam_gapic.legacy.yaml @@ -0,0 +1,249 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.iam.admin.v1 + python: + package_name: google.cloud.iam_admin_v1.gapic + go: + package_name: cloud.google.com/go/iam/admin/apiv1 + csharp: + package_name: Google.Iam.Admin.V1 + ruby: + package_name: Google::Cloud::Iam::Admin::V1 + php: + package_name: Google\Cloud\Iam\Admin\V1 + nodejs: + package_name: iam.v1 + domain_layer_location: google-cloud +interfaces: +- name: google.iam.admin.v1.IAM + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + - name_pattern: projects/{project}/serviceAccounts/{service_account} + entity_name: service_account + - name_pattern: projects/{project}/serviceAccounts/{service_account}/keys/{key} + entity_name: key + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + methods: + - name: ListServiceAccounts + flattening: + groups: + - parameters: + - name + required_fields: + - name + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: accounts + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: project + timeout_millis: 60000 + - name: GetServiceAccount + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: service_account + timeout_millis: 60000 + - name: CreateServiceAccount + flattening: + groups: + - parameters: + - name + - account_id + - service_account + required_fields: + - name + - account_id + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: project + timeout_millis: 60000 + - name: UpdateServiceAccount + required_fields: + - etag + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: service_account + timeout_millis: 60000 + - name: DeleteServiceAccount + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: service_account + timeout_millis: 60000 + - name: ListServiceAccountKeys + flattening: + groups: + - parameters: + - name + - key_types + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: service_account + timeout_millis: 60000 + - name: GetServiceAccountKey + flattening: + groups: + - parameters: + - name + - public_key_type + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: key + timeout_millis: 60000 + - name: CreateServiceAccountKey + flattening: + groups: + - parameters: + - name + - private_key_type + - key_algorithm + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: service_account + timeout_millis: 60000 + - name: DeleteServiceAccountKey + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: key + timeout_millis: 60000 + - name: SignBlob + flattening: + groups: + - parameters: + - name + - bytes_to_sign + required_fields: + - name + - bytes_to_sign + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: service_account + timeout_millis: 60000 + - name: GetIamPolicy + flattening: + groups: + - parameters: + - resource + required_fields: + - resource + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: service_account + timeout_millis: 60000 + surface_treatments: + - include_languages: + - go + visibility: PRIVATE + - name: SetIamPolicy + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: service_account + timeout_millis: 60000 + surface_treatments: + - include_languages: + - go + visibility: PRIVATE + - name: TestIamPermissions + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: service_account + timeout_millis: 60000 + - name: QueryGrantableRoles + flattening: + groups: + - parameters: + - full_resource_name + required_fields: + - full_resource_name + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: SignJwt + flattening: + groups: + - parameters: + - name + - payload + required_fields: + - name + - payload + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/iam/admin/v1/iam_gapic.yaml b/google/iam/admin/v1/iam_gapic.yaml index cf122127a..5f63acb7b 100644 --- a/google/iam/admin/v1/iam_gapic.yaml +++ b/google/iam/admin/v1/iam_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.iam.admin.v1 @@ -16,234 +16,3 @@ language_settings: nodejs: package_name: iam.v1 domain_layer_location: google-cloud -interfaces: -- name: google.iam.admin.v1.IAM - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - - name_pattern: projects/{project}/serviceAccounts/{service_account} - entity_name: service_account - - name_pattern: projects/{project}/serviceAccounts/{service_account}/keys/{key} - entity_name: key - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - methods: - - name: ListServiceAccounts - flattening: - groups: - - parameters: - - name - required_fields: - - name - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: accounts - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: project - timeout_millis: 60000 - - name: GetServiceAccount - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: service_account - timeout_millis: 60000 - - name: CreateServiceAccount - flattening: - groups: - - parameters: - - name - - account_id - - service_account - required_fields: - - name - - account_id - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: project - timeout_millis: 60000 - - name: UpdateServiceAccount - required_fields: - - etag - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: service_account - timeout_millis: 60000 - - name: DeleteServiceAccount - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: service_account - timeout_millis: 60000 - - name: ListServiceAccountKeys - flattening: - groups: - - parameters: - - name - - key_types - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: service_account - timeout_millis: 60000 - - name: GetServiceAccountKey - flattening: - groups: - - parameters: - - name - - public_key_type - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: key - timeout_millis: 60000 - - name: CreateServiceAccountKey - flattening: - groups: - - parameters: - - name - - private_key_type - - key_algorithm - required_fields: - - name - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: service_account - timeout_millis: 60000 - - name: DeleteServiceAccountKey - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: key - timeout_millis: 60000 - - name: SignBlob - flattening: - groups: - - parameters: - - name - - bytes_to_sign - required_fields: - - name - - bytes_to_sign - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: service_account - timeout_millis: 60000 - - name: GetIamPolicy - flattening: - groups: - - parameters: - - resource - required_fields: - - resource - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: service_account - timeout_millis: 60000 - surface_treatments: - - include_languages: - - go - visibility: PRIVATE - - name: SetIamPolicy - flattening: - groups: - - parameters: - - resource - - policy - required_fields: - - resource - - policy - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: service_account - timeout_millis: 60000 - surface_treatments: - - include_languages: - - go - visibility: PRIVATE - - name: TestIamPermissions - flattening: - groups: - - parameters: - - resource - - permissions - required_fields: - - resource - - permissions - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: service_account - timeout_millis: 60000 - - name: QueryGrantableRoles - flattening: - groups: - - parameters: - - full_resource_name - required_fields: - - full_resource_name - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - - name: SignJwt - flattening: - groups: - - parameters: - - name - - payload - required_fields: - - name - - payload - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 diff --git a/google/iam/admin/v1/iam_grpc_service_config.json b/google/iam/admin/v1/iam_grpc_service_config.json new file mode 100755 index 000000000..deff5a716 --- /dev/null +++ b/google/iam/admin/v1/iam_grpc_service_config.json @@ -0,0 +1,84 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.iam.admin.v1.IAM", + "method": "ListServiceAccounts" + }, + { + "service": "google.iam.admin.v1.IAM", + "method": "GetServiceAccount" + }, + { + "service": "google.iam.admin.v1.IAM", + "method": "UpdateServiceAccount" + }, + { + "service": "google.iam.admin.v1.IAM", + "method": "DeleteServiceAccount" + }, + { + "service": "google.iam.admin.v1.IAM", + "method": "ListServiceAccountKeys" + }, + { + "service": "google.iam.admin.v1.IAM", + "method": "GetServiceAccountKey" + }, + { + "service": "google.iam.admin.v1.IAM", + "method": "DeleteServiceAccountKey" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.iam.admin.v1.IAM", + "method": "CreateServiceAccount" + }, + { + "service": "google.iam.admin.v1.IAM", + "method": "CreateServiceAccountKey" + }, + { + "service": "google.iam.admin.v1.IAM", + "method": "SignBlob" + }, + { + "service": "google.iam.admin.v1.IAM", + "method": "GetIamPolicy" + }, + { + "service": "google.iam.admin.v1.IAM", + "method": "SetIamPolicy" + }, + { + "service": "google.iam.admin.v1.IAM", + "method": "TestIamPermissions" + }, + { + "service": "google.iam.admin.v1.IAM", + "method": "QueryGrantableRoles" + }, + { + "service": "google.iam.admin.v1.IAM", + "method": "SignJwt" + } + ], + "timeout": "60s" + } + ] +} diff --git a/google/iam/artman_iam.yaml b/google/iam/artman_iam.yaml index 7ef4e85a5..01eac1011 100644 --- a/google/iam/artman_iam.yaml +++ b/google/iam/artman_iam.yaml @@ -2,7 +2,7 @@ common: api_name: iam api_version: v1 organization_name: google - gapic_yaml: v1/iam_gapic.yaml + gapic_yaml: v1/iam_gapic.legacy.yaml src_proto_paths: - v1 proto_deps: diff --git a/google/iam/artman_iam_admin.yaml b/google/iam/artman_iam_admin.yaml index a973d6c6a..fea9d9d06 100644 --- a/google/iam/artman_iam_admin.yaml +++ b/google/iam/artman_iam_admin.yaml @@ -2,8 +2,9 @@ common: api_name: iam-admin api_version: v1 organization_name: google - service_yaml: iam.yaml + service_yaml: admin/v1/iam.yaml gapic_yaml: admin/v1/iam_gapic.yaml + proto_package: google.iam.admin.v1 src_proto_paths: - admin/v1 proto_deps: diff --git a/google/iam/artman_iam_meta_api.yaml b/google/iam/artman_iam_meta_api.yaml index 5d8c9a83c..a3356ae26 100644 --- a/google/iam/artman_iam_meta_api.yaml +++ b/google/iam/artman_iam_meta_api.yaml @@ -7,7 +7,7 @@ common: src_proto_paths: - v1 service_yaml: iam_meta_api.yaml - gapic_yaml: v1/iam_meta_api_gapic.yaml + gapic_yaml: v1/iam_meta_api_gapic.legacy.yaml artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/iam/credentials/BUILD.bazel b/google/iam/credentials/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/iam/credentials/BUILD.bazel +++ b/google/iam/credentials/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/iam/credentials/v1/BUILD.bazel b/google/iam/credentials/v1/BUILD.bazel index d3ac16d3c..70878c684 100644 --- a/google/iam/credentials/v1/BUILD.bazel +++ b/google/iam/credentials/v1/BUILD.bazel @@ -1,27 +1,36 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "iamcredentials_proto", + name = "credentials_proto", srcs = [ "common.proto", "iamcredentials.proto", ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:timestamp_proto", ], ) proto_library_with_info( - name = "iamcredentials_proto_with_info", - deps = [":iamcredentials_proto"], + name = "credentials_proto_with_info", + deps = [ + ":credentials_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -29,69 +38,55 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( - name = "iamcredentials_java_proto", - deps = [":iamcredentials_proto"], + name = "credentials_java_proto", + deps = [":credentials_proto"], ) java_grpc_library( - name = "iamcredentials_java_grpc", - srcs = [":iamcredentials_proto"], - deps = [":iamcredentials_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "iamcredentials_resource_name_java_proto", - gapic_yaml = "iamcredentials_gapic.yaml", - deps = [":iamcredentials_proto"], + name = "credentials_java_grpc", + srcs = [":credentials_proto"], + deps = [":credentials_java_proto"], ) java_gapic_library( - name = "iamcredentials_java_gapic", - src = ":iamcredentials_proto_with_info", + name = "credentials_java_gapic", + src = ":credentials_proto_with_info", gapic_yaml = "iamcredentials_gapic.yaml", + package = "google.iam.credentials.v1", service_yaml = "//google/iam/credentials:iamcredentials_v1.yaml", - test_deps = [":iamcredentials_java_grpc"], + test_deps = [ + ":credentials_java_grpc", + ], deps = [ - ":iamcredentials_java_proto", - ":iamcredentials_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ":credentials_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [":iamcredentials_java_gapic_test"], -) for test_name in [ - "com.google.cloud.iam.credentials.v1.IamCredentialsClientTest", -]] +java_gapic_test( + name = "credentials_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.iam.credentials.v1.IamCredentialsClientTest", + ], + runtime_deps = [":credentials_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-iamcredentials-v1-java", - client_deps = [":iamcredentials_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":iamcredentials_java_gapic_test"], - grpc_deps = [":iamcredentials_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":iamcredentials_resource_name_java_proto", - ":iamcredentials_java_proto", - ":iamcredentials_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + name = "google-cloud-iam-credentials-v1-java", + deps = [ + ":credentials_java_gapic", + ":credentials_java_grpc", + ":credentials_java_proto", + ":credentials_proto", + ], ) ############################################################################## @@ -99,43 +94,284 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "iamcredentials_go_proto", + name = "credentials_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/iam/credentials/v1", - protos = [":iamcredentials_proto"], - deps = ["//google/api:annotations_go_proto"], + protos = [":credentials_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], ) go_gapic_library( - name = "iamcredentials_go_gapic", - src = ":iamcredentials_proto_with_info", - gapic_yaml = "iamcredentials_gapic.yaml", - importpath = "cloud.google.com/go/iam/credentials/apiv1", + name = "credentials_go_gapic", + srcs = [":credentials_proto_with_info"], + grpc_service_config = "iamcredentials_grpc_service_config.json", + importpath = "cloud.google.com/go/iam/credentials/apiv1;credentials", service_yaml = "//google/iam/credentials:iamcredentials_v1.yaml", - deps = [":iamcredentials_go_proto"], + deps = [ + ":credentials_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], ) go_test( - name = "iamcredentials_go_gapic_test", - srcs = [":iamcredentials_go_gapic_srcjar_test"], - embed = [":iamcredentials_go_gapic"], + name = "credentials_go_gapic_test", + srcs = [":credentials_go_gapic_srcjar_test"], + embed = [":credentials_go_gapic"], importpath = "cloud.google.com/go/iam/credentials/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-iamcredentials-v1-go", + name = "gapi-cloud-iam-credentials-v1-go", deps = [ - ":iamcredentials_go_gapic", - ":iamcredentials_go_gapic_srcjar-smoke-test.srcjar", - ":iamcredentials_go_gapic_srcjar-test.srcjar", - ":iamcredentials_go_proto", + ":credentials_go_gapic", + ":credentials_go_gapic_srcjar-test.srcjar", + ":credentials_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "credentials_moved_proto", + srcs = [":credentials_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "credentials_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":credentials_moved_proto"], +) + +py_grpc_library( + name = "credentials_py_grpc", + srcs = [":credentials_moved_proto"], + deps = [":credentials_py_proto"], +) + +py_gapic_library( + name = "credentials_py_gapic", + src = ":credentials_proto_with_info", + gapic_yaml = "iamcredentials_gapic.yaml", + package = "google.iam.credentials.v1", + service_yaml = "//google/iam/credentials:iamcredentials_v1.yaml", + deps = [ + ":credentials_py_grpc", + ":credentials_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "iam-credentials-v1-py", + deps = [ + ":credentials_py_gapic", + ":credentials_py_grpc", + ":credentials_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "credentials_php_proto", + deps = [":credentials_proto"], +) + +php_grpc_library( + name = "credentials_php_grpc", + srcs = [":credentials_proto"], + deps = [":credentials_php_proto"], +) + +php_gapic_library( + name = "credentials_php_gapic", + src = ":credentials_proto_with_info", + gapic_yaml = "iamcredentials_gapic.yaml", + package = "google.iam.credentials.v1", + service_yaml = "//google/iam/credentials:iamcredentials_v1.yaml", + deps = [ + ":credentials_php_grpc", + ":credentials_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-iam-credentials-v1-php", + deps = [ + ":credentials_php_gapic", + ":credentials_php_grpc", + ":credentials_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "credentials_nodejs_gapic", + src = ":credentials_proto_with_info", + gapic_yaml = "iamcredentials_gapic.yaml", + package = "google.iam.credentials.v1", + service_yaml = "//google/iam/credentials:iamcredentials_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "iam-credentials-v1-nodejs", + deps = [ + ":credentials_nodejs_gapic", + ":credentials_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "credentials_ruby_proto", + deps = [":credentials_proto"], +) + +ruby_grpc_library( + name = "credentials_ruby_grpc", + srcs = [":credentials_proto"], + deps = [":credentials_ruby_proto"], +) + +ruby_gapic_library( + name = "credentials_ruby_gapic", + src = ":credentials_proto_with_info", + gapic_yaml = "iamcredentials_gapic.yaml", + package = "google.iam.credentials.v1", + service_yaml = "//google/iam/credentials:iamcredentials_v1.yaml", + deps = [ + ":credentials_ruby_grpc", + ":credentials_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-iam-credentials-v1-ruby", + deps = [ + ":credentials_ruby_gapic", + ":credentials_ruby_grpc", + ":credentials_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "credentials_csharp_proto", + deps = [":credentials_proto"], +) + +csharp_grpc_library( + name = "credentials_csharp_grpc", + srcs = [":credentials_proto"], + deps = [":credentials_csharp_proto"], +) + +csharp_gapic_library( + name = "credentials_csharp_gapic", + src = ":credentials_proto_with_info", + gapic_yaml = "iamcredentials_gapic.yaml", + package = "google.iam.credentials.v1", + service_yaml = "//google/iam/credentials:iamcredentials_v1.yaml", + deps = [ + ":credentials_csharp_grpc", + ":credentials_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-iam-credentials-v1-csharp", + deps = [ + ":credentials_csharp_gapic", + ":credentials_csharp_grpc", + ":credentials_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_proto_library", + "cc_grpc_library") + +cc_proto_library( + name = "credentials_cc_proto", + deps = [":credentials_proto"], +) + +cc_grpc_library( + name = "credentials_cc_grpc", + srcs = [":credentials_proto"], + grpc_only = True, + deps = [":credentials_cc_proto"], +) diff --git a/google/iam/credentials/v1/common.proto b/google/iam/credentials/v1/common.proto index 6ba010199..361f2e90c 100644 --- a/google/iam/credentials/v1/common.proto +++ b/google/iam/credentials/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,11 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.iam.credentials.v1; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -24,12 +27,22 @@ option go_package = "google.golang.org/genproto/googleapis/iam/credentials/v1;cr option java_multiple_files = true; option java_outer_classname = "IAMCredentialsCommonProto"; option java_package = "com.google.cloud.iam.credentials.v1"; +option (google.api.resource_definition) = { + type: "iam.googleapis.com/ServiceAccount" + pattern: "projects/{project}/serviceAccounts/{service_account}" +}; message GenerateAccessTokenRequest { - // The resource name of the service account for which the credentials + // Required. The resource name of the service account for which the credentials // are requested, in the following format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. - string name = 1; + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + // character is required; replacing it with a project ID is invalid. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; // The sequence of service accounts in a delegation chain. Each service // account must be granted the `roles/iam.serviceAccountTokenCreator` role @@ -39,14 +52,15 @@ message GenerateAccessTokenRequest { // request. // // The delegates must have the following format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}` + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + // character is required; replacing it with a project ID is invalid. repeated string delegates = 2; - // Code to identify the scopes to be included in the OAuth 2.0 access token. + // Required. Code to identify the scopes to be included in the OAuth 2.0 access token. // See https://developers.google.com/identity/protocols/googlescopes for more // information. // At least one value required. - repeated string scope = 4; + repeated string scope = 4 [(google.api.field_behavior) = REQUIRED]; // The desired lifetime duration of the access token in seconds. // Must be set to a value less than or equal to 3600 (1 hour). If a value is @@ -65,10 +79,16 @@ message GenerateAccessTokenResponse { } message SignBlobRequest { - // The resource name of the service account for which the credentials + // Required. The resource name of the service account for which the credentials // are requested, in the following format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. - string name = 1; + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + // character is required; replacing it with a project ID is invalid. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; // The sequence of service accounts in a delegation chain. Each service // account must be granted the `roles/iam.serviceAccountTokenCreator` role @@ -78,11 +98,12 @@ message SignBlobRequest { // request. // // The delegates must have the following format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}` + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + // character is required; replacing it with a project ID is invalid. repeated string delegates = 3; - // The bytes to sign. - bytes payload = 5; + // Required. The bytes to sign. + bytes payload = 5 [(google.api.field_behavior) = REQUIRED]; } message SignBlobResponse { @@ -94,10 +115,16 @@ message SignBlobResponse { } message SignJwtRequest { - // The resource name of the service account for which the credentials + // Required. The resource name of the service account for which the credentials // are requested, in the following format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. - string name = 1; + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + // character is required; replacing it with a project ID is invalid. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; // The sequence of service accounts in a delegation chain. Each service // account must be granted the `roles/iam.serviceAccountTokenCreator` role @@ -107,11 +134,12 @@ message SignJwtRequest { // request. // // The delegates must have the following format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}` + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + // character is required; replacing it with a project ID is invalid. repeated string delegates = 3; - // The JWT payload to sign: a JSON object that contains a JWT Claims Set. - string payload = 5; + // Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. + string payload = 5 [(google.api.field_behavior) = REQUIRED]; } message SignJwtResponse { @@ -123,10 +151,16 @@ message SignJwtResponse { } message GenerateIdTokenRequest { - // The resource name of the service account for which the credentials + // Required. The resource name of the service account for which the credentials // are requested, in the following format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. - string name = 1; + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + // character is required; replacing it with a project ID is invalid. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; // The sequence of service accounts in a delegation chain. Each service // account must be granted the `roles/iam.serviceAccountTokenCreator` role @@ -136,12 +170,13 @@ message GenerateIdTokenRequest { // request. // // The delegates must have the following format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}` + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + // character is required; replacing it with a project ID is invalid. repeated string delegates = 2; - // The audience for the token, such as the API or account that this token + // Required. The audience for the token, such as the API or account that this token // grants access to. - string audience = 3; + string audience = 3 [(google.api.field_behavior) = REQUIRED]; // Include the service account email in the token. If set to `true`, the // token will contain `email` and `email_verified` claims. diff --git a/google/iam/credentials/v1/iamcredentials.proto b/google/iam/credentials/v1/iamcredentials.proto index 3308d63a4..29554c567 100644 --- a/google/iam/credentials/v1/iamcredentials.proto +++ b/google/iam/credentials/v1/iamcredentials.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.iam.credentials.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; import "google/iam/credentials/v1/common.proto"; option cc_enable_arenas = true; @@ -35,22 +37,25 @@ option java_package = "com.google.cloud.iam.credentials.v1"; // tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and // more. service IAMCredentials { + option (google.api.default_host) = "iamcredentials.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Generates an OAuth 2.0 access token for a service account. - rpc GenerateAccessToken(GenerateAccessTokenRequest) - returns (GenerateAccessTokenResponse) { + rpc GenerateAccessToken(GenerateAccessTokenRequest) returns (GenerateAccessTokenResponse) { option (google.api.http) = { post: "/v1/{name=projects/*/serviceAccounts/*}:generateAccessToken" body: "*" }; + option (google.api.method_signature) = "name,delegates,scope,lifetime"; } // Generates an OpenID Connect ID token for a service account. - rpc GenerateIdToken(GenerateIdTokenRequest) - returns (GenerateIdTokenResponse) { + rpc GenerateIdToken(GenerateIdTokenRequest) returns (GenerateIdTokenResponse) { option (google.api.http) = { post: "/v1/{name=projects/*/serviceAccounts/*}:generateIdToken" body: "*" }; + option (google.api.method_signature) = "name,delegates,audience,include_email"; } // Signs a blob using a service account's system-managed private key. @@ -59,6 +64,7 @@ service IAMCredentials { post: "/v1/{name=projects/*/serviceAccounts/*}:signBlob" body: "*" }; + option (google.api.method_signature) = "name,delegates,payload"; } // Signs a JWT using a service account's system-managed private key. @@ -67,5 +73,6 @@ service IAMCredentials { post: "/v1/{name=projects/*/serviceAccounts/*}:signJwt" body: "*" }; + option (google.api.method_signature) = "name,delegates,payload"; } } diff --git a/google/iam/credentials/v1/iamcredentials_gapic.legacy.yaml b/google/iam/credentials/v1/iamcredentials_gapic.legacy.yaml new file mode 100644 index 000000000..7524a1853 --- /dev/null +++ b/google/iam/credentials/v1/iamcredentials_gapic.legacy.yaml @@ -0,0 +1,133 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.iam.credentials.v1 + python: + package_name: google.cloud.iam_credentials_v1.gapic + go: + package_name: cloud.google.com/go/iam/credentials/apiv1 + csharp: + package_name: Google.Iam.Credentials.V1 + ruby: + package_name: Google::Cloud::Iam::Credentials::V1 + php: + package_name: Google\Cloud\Iam\Credentials\V1 + nodejs: + package_name: credentials.v1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.iam.credentials.v1.IAMCredentials + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project}/serviceAccounts/{service_account} + entity_name: service_account + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + methods: + - name: GenerateAccessToken + flattening: + groups: + - parameters: + - name + - delegates + - scope + - lifetime + required_fields: + - name + - scope + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: service_account + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: GenerateIdToken + flattening: + groups: + - parameters: + - name + - delegates + - audience + - include_email + required_fields: + - name + - audience + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: service_account + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: SignBlob + flattening: + groups: + - parameters: + - name + - delegates + - payload + required_fields: + - name + - payload + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: service_account + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: SignJwt + flattening: + groups: + - parameters: + - name + - delegates + - payload + required_fields: + - name + - payload + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: service_account + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES +resource_name_generation: +- message_name: GenerateAccessTokenRequest + field_entity_map: + name: service_account +- message_name: GenerateIdTokenRequest + field_entity_map: + name: service_account +- message_name: SignBlobRequest + field_entity_map: + name: service_account +- message_name: SignJwtRequest + field_entity_map: + name: service_account diff --git a/google/iam/credentials/v1/iamcredentials_gapic.yaml b/google/iam/credentials/v1/iamcredentials_gapic.yaml index 7524a1853..6368f96b5 100644 --- a/google/iam/credentials/v1/iamcredentials_gapic.yaml +++ b/google/iam/credentials/v1/iamcredentials_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -20,114 +20,12 @@ language_settings: interfaces: # The fully qualified name of the API interface. - name: google.iam.credentials.v1.IAMCredentials - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: projects/{project}/serviceAccounts/{service_account} - entity_name: service_account - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 methods: - name: GenerateAccessToken - flattening: - groups: - - parameters: - - name - - delegates - - scope - - lifetime - required_fields: - - name - - scope retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: service_account - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: GenerateIdToken - flattening: - groups: - - parameters: - - name - - delegates - - audience - - include_email - required_fields: - - name - - audience retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: service_account - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: SignBlob - flattening: - groups: - - parameters: - - name - - delegates - - payload - required_fields: - - name - - payload retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: service_account - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - name: SignJwt - flattening: - groups: - - parameters: - - name - - delegates - - payload - required_fields: - - name - - payload retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: service_account - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES -resource_name_generation: -- message_name: GenerateAccessTokenRequest - field_entity_map: - name: service_account -- message_name: GenerateIdTokenRequest - field_entity_map: - name: service_account -- message_name: SignBlobRequest - field_entity_map: - name: service_account -- message_name: SignJwtRequest - field_entity_map: - name: service_account diff --git a/google/iam/credentials/v1/iamcredentials_grpc_service_config.json b/google/iam/credentials/v1/iamcredentials_grpc_service_config.json new file mode 100755 index 000000000..360bca92d --- /dev/null +++ b/google/iam/credentials/v1/iamcredentials_grpc_service_config.json @@ -0,0 +1,35 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.iam.credentials.v1.IAMCredentials", + "method": "GenerateAccessToken" + }, + { + "service": "google.iam.credentials.v1.IAMCredentials", + "method": "GenerateIdToken" + }, + { + "service": "google.iam.credentials.v1.IAMCredentials", + "method": "SignBlob" + }, + { + "service": "google.iam.credentials.v1.IAMCredentials", + "method": "SignJwt" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + } + ] +} diff --git a/google/iam/credentials/v1/iamcredentials_v1.yaml b/google/iam/credentials/v1/iamcredentials_v1.yaml new file mode 100644 index 000000000..51b504b70 --- /dev/null +++ b/google/iam/credentials/v1/iamcredentials_v1.yaml @@ -0,0 +1,17 @@ +type: google.api.Service +config_version: 3 +name: iamcredentials.googleapis.com +title: IAM Service Account Credentials API + +apis: +- name: google.iam.credentials.v1.IAMCredentials + +documentation: + summary: 'Creates short-lived, limited-privilege credentials for IAM service accounts.' + +authentication: + rules: + - selector: 'google.iam.credentials.v1.IAMCredentials.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/iam/iam.yaml b/google/iam/iam.yaml deleted file mode 100644 index ccff586b8..000000000 --- a/google/iam/iam.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# The IAM API Definition. - -type: google.api.Service -config_version: 2 -name: iam.googleapis.com - -title: Google Identity and Access Management (IAM) API - -documentation: - summary: - Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. - -apis: -- name: google.iam.admin.v1.IAM - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: https://www.googleapis.com/auth/iam, - https://www.googleapis.com/auth/cloud-platform diff --git a/google/iam/v1/BUILD.bazel b/google/iam/v1/BUILD.bazel index 2a00de815..0053d05f4 100644 --- a/google/iam/v1/BUILD.bazel +++ b/google/iam/v1/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -10,8 +12,11 @@ proto_library( name = "iam_policy_proto", srcs = ["iam_policy.proto"], deps = [ + ":options_proto", ":policy_proto", "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/api:resource_proto", ], ) @@ -25,10 +30,19 @@ proto_library( ], ) +proto_library( + name = "options_proto", + srcs = ["options.proto"], + deps = [ + "//google/api:annotations_proto", + ], +) + proto_library_with_info( name = "iam_proto_with_info", deps = [ ":iam_policy_proto", + ":options_proto", ":policy_proto", ], ) @@ -36,13 +50,14 @@ proto_library_with_info( ############################################################################## # Java ############################################################################## -load("@com_google_googleapis_imports//:imports.bzl", "java_proto_library", "java_grpc_library") +load("@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", "java_proto_library") java_proto_library( name = "iam_java_proto", deps = [ ":iam_policy_proto", ":policy_proto", + ":options_proto", ], ) @@ -57,8 +72,8 @@ java_grpc_library( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "go_proto_library", "go_gapic_assembly_pkg", + "go_proto_library", ) go_proto_library( @@ -67,6 +82,7 @@ go_proto_library( importpath = "google.golang.org/genproto/googleapis/iam/v1", protos = [ ":iam_policy_proto", + ":options_proto", ":policy_proto", ], deps = [ @@ -81,3 +97,33 @@ go_gapic_assembly_pkg( ":iam_go_proto", ], ) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_proto_library", + "cc_grpc_library") + +cc_proto_library( + name = "iam_policy_cc_proto", + deps = [":iam_policy_proto"], +) + +cc_proto_library( + name = "options_cc_proto", + deps = [":options_proto"], +) + +cc_proto_library( + name = "policy_cc_proto", + deps = [":policy_proto"], +) + +cc_grpc_library( + name = "iam_cc_grpc", + srcs = [":iam_policy_proto"], + grpc_only = True, + deps = [":iam_policy_cc_proto"], +) diff --git a/google/iam/v1/iam_gapic.yaml b/google/iam/v1/iam_gapic.legacy.yaml similarity index 100% rename from google/iam/v1/iam_gapic.yaml rename to google/iam/v1/iam_gapic.legacy.yaml diff --git a/google/iam/v1/iam_meta_api.yaml b/google/iam/v1/iam_meta_api.yaml new file mode 100644 index 000000000..939856790 --- /dev/null +++ b/google/iam/v1/iam_meta_api.yaml @@ -0,0 +1,85 @@ +type: google.api.Service +config_version: 2 +name: iam-meta-api.googleapis.com +title: IAM Meta API + +apis: +- name: google.iam.v1.IAMPolicy + +types: +- name: google.iam.v1.PolicyDelta + +documentation: + summary: Manages access control for Google Cloud Platform resources. + overview: |- + # Google Identity and Access Management (IAM) API + + Documentation of the access control API that will be implemented by all + 1st party services provided by the Google Cloud Platform (like Cloud + Storage, Compute Engine, App Engine). + + Any implementation of an API that offers access control features + will implement the google.iam.v1.IAMPolicy interface. + + ## Data model + + Access control is applied when a principal (user or service account), + takes some action on a resource exposed by a service. Resources, + identified by + URI-like names, are the unit of access control specification. It is up to + the service implementations to choose what granularity of access control + to support and what set of actions (permissions) to support for the + resources + they provide. For example one database service may allow access control to + be specified only at the Table level, whereas another might allow access + control to also be specified at the Column level. + + This is intentionally not a CRUD style API because access control policies + are created and deleted implicitly with the resources to which they are + attached. + + ## Policy + + A `Policy` consists of a list of bindings. A `Binding` binds a set of + members to a role, where the members can include user accounts, user + groups, user + domains, and service accounts. A role is a named set of permissions, + defined by the IAM system. The definition of a role is outside the + policy. + + A permission check involves determining the roles that include the + specified permission, and then determining if the principal specified by + the check is a member of a binding to at least one of these roles. The + membership check is recursive when a group is bound to a role. + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + description: |- + Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + description: |- + Sets the access control policy on the specified resource. Replaces + any existing policy. + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + description: |- + Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + +http: + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + post: '/v1/{resource=**}:getIamPolicy' + body: '*' + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + post: '/v1/{resource=**}:setIamPolicy' + body: '*' + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + post: '/v1/{resource=**}:testIamPermissions' + body: '*' diff --git a/google/iam/v1/iam_meta_api_gapic.yaml b/google/iam/v1/iam_meta_api_gapic.legacy.yaml similarity index 100% rename from google/iam/v1/iam_meta_api_gapic.yaml rename to google/iam/v1/iam_meta_api_gapic.legacy.yaml diff --git a/google/iam/v1/iam_policy.proto b/google/iam/v1/iam_policy.proto index 7fee0c39b..7072854e4 100644 --- a/google/iam/v1/iam_policy.proto +++ b/google/iam/v1/iam_policy.proto @@ -21,6 +21,8 @@ import "google/iam/v1/options.proto"; import "google/iam/v1/policy.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Iam.V1"; @@ -96,20 +98,24 @@ service IAMPolicy { message SetIamPolicyRequest { // REQUIRED: The resource for which the policy is being specified. // See the operation documentation for the appropriate value for this field. - string resource = 1; + string resource = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "*"]; // REQUIRED: The complete policy to be applied to the `resource`. The size of // the policy is limited to a few 10s of KB. An empty policy is a // valid policy but certain Cloud Platform services (such as Projects) // might reject them. - Policy policy = 2; + Policy policy = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for `GetIamPolicy` method. message GetIamPolicyRequest { // REQUIRED: The resource for which the policy is being requested. // See the operation documentation for the appropriate value for this field. - string resource = 1; + string resource = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "*"]; // OPTIONAL: A `GetPolicyOptions` object for specifying options to // `GetIamPolicy`. This field is only used by Cloud IAM. @@ -120,13 +126,15 @@ message GetIamPolicyRequest { message TestIamPermissionsRequest { // REQUIRED: The resource for which the policy detail is being requested. // See the operation documentation for the appropriate value for this field. - string resource = 1; + string resource = 1[ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "*"]; // The set of permissions to check for the `resource`. Permissions with // wildcards (such as '*' or 'storage.*') are not allowed. For more // information see // [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - repeated string permissions = 2; + repeated string permissions = 2 [(google.api.field_behavior) = REQUIRED]; } // Response message for `TestIamPermissions` method. diff --git a/google/iam/v1/logging/BUILD.bazel b/google/iam/v1/logging/BUILD.bazel index 0824cdbdf..cf95b5c37 100644 --- a/google/iam/v1/logging/BUILD.bazel +++ b/google/iam/v1/logging/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -37,8 +39,8 @@ java_proto_library( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "go_proto_library", "go_gapic_assembly_pkg", + "go_proto_library", ) go_proto_library( diff --git a/google/iam/v1/options.proto b/google/iam/v1/options.proto index 24e886366..a4e17e588 100644 --- a/google/iam/v1/options.proto +++ b/google/iam/v1/options.proto @@ -30,8 +30,12 @@ option php_namespace = "Google\\Cloud\\Iam\\V1"; // Encapsulates settings provided to GetIamPolicy. message GetPolicyOptions { // Optional. The policy format version to be returned. - // Acceptable values are 0 and 1. - // If the value is 0, or the field is omitted, policy format version 1 will be - // returned. + // + // Valid values are 0, 1, and 3. Requests specifying an invalid value will be + // rejected. + // + // Requests for policies with any conditional bindings must specify version 3. + // Policies without any conditional bindings may specify any valid value or + // leave the field unset. int32 requested_policy_version = 1; } diff --git a/google/iam/v1/policy.proto b/google/iam/v1/policy.proto index e0d2e331f..e3aba47e8 100644 --- a/google/iam/v1/policy.proto +++ b/google/iam/v1/policy.proto @@ -32,27 +32,36 @@ option php_namespace = "Google\\Cloud\\Iam\\V1"; // specify access control policies for Cloud Platform resources. // // -// A `Policy` consists of a list of `bindings`. A `binding` binds a list of -// `members` to a `role`, where the members can be user accounts, Google groups, -// Google domains, and service accounts. A `role` is a named list of permissions -// defined by IAM. +// A `Policy` is a collection of `bindings`. A `binding` binds one or more +// `members` to a single `role`. Members can be user accounts, service accounts, +// Google groups, and domains (such as G Suite). A `role` is a named list of +// permissions (defined by IAM or configured by users). A `binding` can +// optionally specify a `condition`, which is a logic expression that further +// constrains the role binding based on attributes about the request and/or +// target resource. // // **JSON Example** // // { // "bindings": [ // { -// "role": "roles/owner", +// "role": "roles/resourcemanager.organizationAdmin", // "members": [ // "user:mike@example.com", // "group:admins@example.com", // "domain:google.com", -// "serviceAccount:my-other-app@appspot.gserviceaccount.com" +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" // ] // }, // { -// "role": "roles/viewer", -// "members": ["user:sean@example.com"] +// "role": "roles/resourcemanager.organizationViewer", +// "members": ["user:eve@example.com"], +// "condition": { +// "title": "expirable access", +// "description": "Does not grant access after Sep 2020", +// "expression": "request.time < +// timestamp('2020-10-01T00:00:00.000Z')", +// } // } // ] // } @@ -64,20 +73,37 @@ option php_namespace = "Google\\Cloud\\Iam\\V1"; // - user:mike@example.com // - group:admins@example.com // - domain:google.com -// - serviceAccount:my-other-app@appspot.gserviceaccount.com -// role: roles/owner +// - serviceAccount:my-project-id@appspot.gserviceaccount.com +// role: roles/resourcemanager.organizationAdmin // - members: -// - user:sean@example.com -// role: roles/viewer -// +// - user:eve@example.com +// role: roles/resourcemanager.organizationViewer +// condition: +// title: expirable access +// description: Does not grant access after Sep 2020 +// expression: request.time < timestamp('2020-10-01T00:00:00.000Z') // // For a description of IAM and its features, see the // [IAM developer's guide](https://cloud.google.com/iam/docs). message Policy { - // Deprecated. + // Specifies the format of the policy. + // + // Valid values are 0, 1, and 3. Requests specifying an invalid value will be + // rejected. + // + // Operations affecting conditional bindings must specify version 3. This can + // be either setting a conditional policy, modifying a conditional binding, + // or removing a binding (conditional or unconditional) from the stored + // conditional policy. + // Operations on non-conditional policies may specify any valid value or + // leave the field unset. + // + // If no etag is provided in the call to `setIamPolicy`, version compliance + // checks against the stored policy is skipped. int32 version = 1; - // Associates a list of `members` to a `role`. + // Associates a list of `members` to a `role`. Optionally may specify a + // `condition` that determines when binding is in effect. // `bindings` with no members will result in an error. repeated Binding bindings = 4; @@ -90,7 +116,9 @@ message Policy { // ensure that their change will be applied to the same version of the policy. // // If no `etag` is provided in the call to `setIamPolicy`, then the existing - // policy is overwritten blindly. + // policy is overwritten. Due to blind-set semantics of an etag-less policy, + // 'setIamPolicy' will not fail even if the incoming policy version does not + // meet the requirements for modifying the stored policy. bytes etag = 3; } @@ -110,7 +138,7 @@ message Binding { // who is authenticated with a Google account or a service account. // // * `user:{emailid}`: An email address that represents a specific Google - // account. For example, `alice@gmail.com` . + // account. For example, `alice@example.com` . // // // * `serviceAccount:{emailid}`: An email address that represents a service @@ -171,8 +199,7 @@ message BindingDelta { // Required string member = 3; - // Unimplemented. The condition that is associated with this binding. - // This field is logged only for Cloud Audit Logging. + // The condition that is associated with this binding. google.type.Expr condition = 4; } diff --git a/google/identity/accesscontextmanager/type/BUILD.bazel b/google/identity/accesscontextmanager/type/BUILD.bazel new file mode 100644 index 000000000..51d7bc6f9 --- /dev/null +++ b/google/identity/accesscontextmanager/type/BUILD.bazel @@ -0,0 +1,173 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "type_proto", + srcs = [ + "device_resources.proto", + ], + deps = [ + "//google/api:annotations_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", + "java_gapic_assembly_gradle_pkg", +) + +java_proto_library( + name = "type_java_proto", + deps = [":type_proto"], +) + +java_grpc_library( + name = "type_java_grpc", + srcs = [":type_proto"], + deps = [":type_java_proto"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-accesscontextmanager-type-java", + deps = [ + ":type_java_grpc", + ":type_java_proto", + ":type_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", +) + +go_proto_library( + name = "type_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/identity/accesscontextmanager/type", + protos = [":type_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "type_moved_proto", + srcs = [":type_proto"], + deps = [ + "//google/api:annotations_proto", + ], +) + +py_proto_library( + name = "type_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":type_moved_proto"], +) + +py_grpc_library( + name = "type_py_grpc", + srcs = [":type_moved_proto"], + deps = [":type_py_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "type_php_proto", + deps = [":type_proto"], +) + +php_grpc_library( + name = "type_php_grpc", + srcs = [":type_proto"], + deps = [":type_php_proto"], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "type_ruby_proto", + deps = [":type_proto"], +) + +ruby_grpc_library( + name = "type_ruby_grpc", + srcs = [":type_proto"], + deps = [":type_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "type_csharp_proto", + deps = [":type_proto"], +) + +csharp_grpc_library( + name = "type_csharp_grpc", + srcs = [":type_proto"], + deps = [":type_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ code here diff --git a/google/identity/accesscontextmanager/type/device_resources.proto b/google/identity/accesscontextmanager/type/device_resources.proto new file mode 100644 index 000000000..f05791033 --- /dev/null +++ b/google/identity/accesscontextmanager/type/device_resources.proto @@ -0,0 +1,85 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.identity.accesscontextmanager.type; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Identity.AccessContextManager.Type"; +option go_package = "google.golang.org/genproto/googleapis/identity/accesscontextmanager/type;type"; +option java_package = "com.google.identity.accesscontextmanager.type"; +option java_multiple_files = true; +option java_outer_classname = "TypeProto"; +option php_namespace = "Google\\Identity\\AccessContextManager\\Type"; +option ruby_package = "Google::Identity::AccessContextManager::Type"; + +// The encryption state of the device. +enum DeviceEncryptionStatus { + // The encryption status of the device is not specified or not known. + ENCRYPTION_UNSPECIFIED = 0; + + // The device does not support encryption. + ENCRYPTION_UNSUPPORTED = 1; + + // The device supports encryption, but is currently unencrypted. + UNENCRYPTED = 2; + + // The device is encrypted. + ENCRYPTED = 3; +} + +// The operating system type of the device. +// Next id: 7 +enum OsType { + // The operating system of the device is not specified or not known. + OS_UNSPECIFIED = 0; + + // A desktop Mac operating system. + DESKTOP_MAC = 1; + + // A desktop Windows operating system. + DESKTOP_WINDOWS = 2; + + // A desktop Linux operating system. + DESKTOP_LINUX = 3; + + // A desktop ChromeOS operating system. + DESKTOP_CHROME_OS = 6; + + // An Android operating system. + ANDROID = 4; + + // An iOS operating system. + IOS = 5; +} + +// The degree to which the device is managed by the Cloud organization. +enum DeviceManagementLevel { + // The device's management level is not specified or not known. + MANAGEMENT_UNSPECIFIED = 0; + + // The device is not managed. + NONE = 1; + + // Basic management is enabled, which is generally limited to monitoring and + // wiping the corporate account. + BASIC = 2; + + // Complete device management. This includes more thorough monitoring and the + // ability to directly manage the device (such as remote wiping). This can be + // enabled through the Android Enterprise Platform. + COMPLETE = 3; +} diff --git a/google/identity/accesscontextmanager/v1/BUILD.bazel b/google/identity/accesscontextmanager/v1/BUILD.bazel new file mode 100644 index 000000000..b4feecca9 --- /dev/null +++ b/google/identity/accesscontextmanager/v1/BUILD.bazel @@ -0,0 +1,182 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "accesscontextmanager_proto", + srcs = [ + "access_level.proto", + "access_policy.proto", + "service_perimeter.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/identity/accesscontextmanager/type:type_proto", + "//google/type:expr_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", + "java_gapic_assembly_gradle_pkg", +) + +java_proto_library( + name = "accesscontextmanager_java_proto", + deps = [":accesscontextmanager_proto"], +) + +java_grpc_library( + name = "accesscontextmanager_java_grpc", + srcs = [":accesscontextmanager_proto"], + deps = [":accesscontextmanager_java_proto"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-accesscontextmanager-v1-java", + deps = [ + ":accesscontextmanager_java_grpc", + ":accesscontextmanager_java_proto", + ":accesscontextmanager_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", +) + +go_proto_library( + name = "accesscontextmanager_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1", + protos = [":accesscontextmanager_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/identity/accesscontextmanager/type:type_go_proto", + "//google/type:expr_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "accesscontextmanager_moved_proto", + srcs = [":accesscontextmanager_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/identity/accesscontextmanager/type:type_proto", + "//google/type:expr_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "accesscontextmanager_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":accesscontextmanager_moved_proto"], +) + +py_grpc_library( + name = "accesscontextmanager_py_grpc", + srcs = [":accesscontextmanager_moved_proto"], + deps = [":accesscontextmanager_py_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "accesscontextmanager_php_proto", + deps = [":accesscontextmanager_proto"], +) + +php_grpc_library( + name = "accesscontextmanager_php_grpc", + srcs = [":accesscontextmanager_proto"], + deps = [":accesscontextmanager_php_proto"], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "accesscontextmanager_ruby_proto", + deps = [":accesscontextmanager_proto"], +) + +ruby_grpc_library( + name = "accesscontextmanager_ruby_grpc", + srcs = [":accesscontextmanager_proto"], + deps = [":accesscontextmanager_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "accesscontextmanager_csharp_proto", + deps = [":accesscontextmanager_proto"], +) + +csharp_grpc_library( + name = "accesscontextmanager_csharp_grpc", + srcs = [":accesscontextmanager_proto"], + deps = [":accesscontextmanager_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ code here diff --git a/google/identity/accesscontextmanager/v1/access_level.proto b/google/identity/accesscontextmanager/v1/access_level.proto new file mode 100644 index 000000000..0ebd1936c --- /dev/null +++ b/google/identity/accesscontextmanager/v1/access_level.proto @@ -0,0 +1,187 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.identity.accesscontextmanager.v1; + +import "google/identity/accesscontextmanager/type/device_resources.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/expr.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Identity.AccessContextManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1;accesscontextmanager"; +option java_multiple_files = true; +option java_outer_classname = "AccessLevelProto"; +option java_package = "com.google.identity.accesscontextmanager.v1"; +option php_namespace = "Google\\Identity\\AccessContextManager\\V1"; +option ruby_package = "Google::Identity::AccessContextManager::V1"; +option objc_class_prefix = "GACM"; + +// An `AccessLevel` is a label that can be applied to requests to Google Cloud +// services, along with a list of requirements necessary for the label to be +// applied. +message AccessLevel { + // Required. Resource name for the Access Level. The `short_name` component + // must begin with a letter and only include alphanumeric and '_'. Format: + // `accessPolicies/{policy_id}/accessLevels/{short_name}`. The maximum length + // of the `short_name` component is 50 characters. + string name = 1; + + // Human readable title. Must be unique within the Policy. + string title = 2; + + // Description of the `AccessLevel` and its use. Does not affect behavior. + string description = 3; + + // Required. Describes the necessary conditions for the level to apply. + oneof level { + // A `BasicLevel` composed of `Conditions`. + BasicLevel basic = 4; + + // A `CustomLevel` written in the Common Expression Language. + CustomLevel custom = 5; + } + + // Output only. Time the `AccessLevel` was created in UTC. + google.protobuf.Timestamp create_time = 6; + + // Output only. Time the `AccessLevel` was updated in UTC. + google.protobuf.Timestamp update_time = 7; +} + +// `BasicLevel` is an `AccessLevel` using a set of recommended features. +message BasicLevel { + // Options for how the `conditions` list should be combined to determine if + // this `AccessLevel` is applied. Default is AND. + enum ConditionCombiningFunction { + // All `Conditions` must be true for the `BasicLevel` to be true. + AND = 0; + + // If at least one `Condition` is true, then the `BasicLevel` is true. + OR = 1; + } + + // Required. A list of requirements for the `AccessLevel` to be granted. + repeated Condition conditions = 1; + + // How the `conditions` list should be combined to determine if a request is + // granted this `AccessLevel`. If AND is used, each `Condition` in + // `conditions` must be satisfied for the `AccessLevel` to be applied. If OR + // is used, at least one `Condition` in `conditions` must be satisfied for the + // `AccessLevel` to be applied. Default behavior is AND. + ConditionCombiningFunction combining_function = 2; +} + +// A condition necessary for an `AccessLevel` to be granted. The Condition is an +// AND over its fields. So a Condition is true if: 1) the request IP is from one +// of the listed subnetworks AND 2) the originating device complies with the +// listed device policy AND 3) all listed access levels are granted AND 4) the +// request was sent at a time allowed by the DateTimeRestriction. +message Condition { + // CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for + // a CIDR IP address block, the specified IP address portion must be properly + // truncated (i.e. all the host bits must be zero) or the input is considered + // malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is + // not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas + // "2001:db8::1/32" is not. The originating IP of a request must be in one of + // the listed subnets in order for this Condition to be true. If empty, all IP + // addresses are allowed. + repeated string ip_subnetworks = 1; + + // Device specific restrictions, all restrictions must hold for the + // Condition to be true. If not specified, all devices are allowed. + DevicePolicy device_policy = 2; + + // A list of other access levels defined in the same `Policy`, referenced by + // resource name. Referencing an `AccessLevel` which does not exist is an + // error. All access levels listed must be granted for the Condition + // to be true. Example: + // "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"` + repeated string required_access_levels = 3; + + // Whether to negate the Condition. If true, the Condition becomes a NAND over + // its non-empty fields, each field must be false for the Condition overall to + // be satisfied. Defaults to false. + bool negate = 5; + + // The request must be made by one of the provided user or service + // accounts. Groups are not supported. + // Syntax: + // `user:{emailid}` + // `serviceAccount:{emailid}` + // If not specified, a request may come from any user. + repeated string members = 6; + + // The request must originate from one of the provided countries/regions. + // Must be valid ISO 3166-1 alpha-2 codes. + repeated string regions = 7; +} + +// `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language +// to represent the necessary conditions for the level to apply to a request. +// See CEL spec at: https://github.com/google/cel-spec +message CustomLevel { + // Required. A Cloud CEL expression evaluating to a boolean. + google.type.Expr expr = 1; +} + +// `DevicePolicy` specifies device specific restrictions necessary to acquire a +// given access level. A `DevicePolicy` specifies requirements for requests from +// devices to be granted access levels, it does not do any enforcement on the +// device. `DevicePolicy` acts as an AND over all specified fields, and each +// repeated field is an OR over its elements. Any unset fields are ignored. For +// example, if the proto is { os_type : DESKTOP_WINDOWS, os_type : +// DESKTOP_LINUX, encryption_status: ENCRYPTED}, then the DevicePolicy will be +// true for requests originating from encrypted Linux desktops and encrypted +// Windows desktops. +message DevicePolicy { + // Whether or not screenlock is required for the DevicePolicy to be true. + // Defaults to `false`. + bool require_screenlock = 1; + + // Allowed encryptions statuses, an empty list allows all statuses. + repeated google.identity.accesscontextmanager.type.DeviceEncryptionStatus allowed_encryption_statuses = 2; + + // Allowed OS versions, an empty list allows all types and all versions. + repeated OsConstraint os_constraints = 3; + + // Allowed device management levels, an empty list allows all management + // levels. + repeated google.identity.accesscontextmanager.type.DeviceManagementLevel allowed_device_management_levels = 6; + + // Whether the device needs to be approved by the customer admin. + bool require_admin_approval = 7; + + // Whether the device needs to be corp owned. + bool require_corp_owned = 8; +} + +// A restriction on the OS type and version of devices making requests. +message OsConstraint { + // Required. The allowed OS type. + google.identity.accesscontextmanager.type.OsType os_type = 1; + + // The minimum allowed OS version. If not set, any version of this OS + // satisfies the constraint. Format: `"major.minor.patch"`. + // Examples: `"10.5.301"`, `"9.2.1"`. + string minimum_version = 2; + + // Only allows requests from devices with a verified Chrome OS. + // Verifications includes requirements that the device is enterprise-managed, + // conformant to domain policies, and the caller has permission to call + // the API targeted by the request. + bool require_verified_chrome_os = 3; +} diff --git a/google/identity/accesscontextmanager/v1/access_policy.proto b/google/identity/accesscontextmanager/v1/access_policy.proto new file mode 100644 index 000000000..9ec59d1c1 --- /dev/null +++ b/google/identity/accesscontextmanager/v1/access_policy.proto @@ -0,0 +1,60 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.identity.accesscontextmanager.v1; + +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Identity.AccessContextManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1;accesscontextmanager"; +option java_multiple_files = true; +option java_outer_classname = "PolicyProto"; +option java_package = "com.google.identity.accesscontextmanager.v1"; +option php_namespace = "Google\\Identity\\AccessContextManager\\V1"; +option ruby_package = "Google::Identity::AccessContextManager::V1"; +option objc_class_prefix = "GACM"; + +// `AccessPolicy` is a container for `AccessLevels` (which define the necessary +// attributes to use Google Cloud services) and `ServicePerimeters` (which +// define regions of services able to freely pass data within a perimeter). An +// access policy is globally visible within an organization, and the +// restrictions it specifies apply to all projects within an organization. +message AccessPolicy { + // Output only. Resource name of the `AccessPolicy`. Format: + // `accessPolicies/{policy_id}` + string name = 1; + + // Required. The parent of this `AccessPolicy` in the Cloud Resource + // Hierarchy. Currently immutable once created. Format: + // `organizations/{organization_id}` + string parent = 2; + + // Required. Human readable title. Does not affect behavior. + string title = 3; + + // Output only. Time the `AccessPolicy` was created in UTC. + google.protobuf.Timestamp create_time = 4; + + // Output only. Time the `AccessPolicy` was updated in UTC. + google.protobuf.Timestamp update_time = 5; + + // Output only. An opaque identifier for the current version of the + // `AccessPolicy`. This will always be a strongly validated etag, meaning that + // two Access Polices will be identical if and only if their etags are + // identical. Clients should not expect this to be in any specific format. + string etag = 6; +} diff --git a/google/identity/accesscontextmanager/v1/service_perimeter.proto b/google/identity/accesscontextmanager/v1/service_perimeter.proto new file mode 100644 index 000000000..89d76818d --- /dev/null +++ b/google/identity/accesscontextmanager/v1/service_perimeter.proto @@ -0,0 +1,152 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.identity.accesscontextmanager.v1; + +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Identity.AccessContextManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1;accesscontextmanager"; +option java_multiple_files = true; +option java_outer_classname = "ServicePerimeterProto"; +option java_package = "com.google.identity.accesscontextmanager.v1"; +option php_namespace = "Google\\Identity\\AccessContextManager\\V1"; +option ruby_package = "Google::Identity::AccessContextManager::V1"; +option objc_class_prefix = "GACM"; + +// `ServicePerimeter` describes a set of Google Cloud resources which can freely +// import and export data amongst themselves, but not export outside of the +// `ServicePerimeter`. If a request with a source within this `ServicePerimeter` +// has a target outside of the `ServicePerimeter`, the request will be blocked. +// Otherwise the request is allowed. There are two types of Service Perimeter - +// Regular and Bridge. Regular Service Perimeters cannot overlap, a single +// Google Cloud project can only belong to a single regular Service Perimeter. +// Service Perimeter Bridges can contain only Google Cloud projects as members, +// a single Google Cloud project may belong to multiple Service Perimeter +// Bridges. +message ServicePerimeter { + // Specifies the type of the Perimeter. There are two types: regular and + // bridge. Regular Service Perimeter contains resources, access levels, and + // restricted services. Every resource can be in at most ONE + // regular Service Perimeter. + // + // In addition to being in a regular service perimeter, a resource can also + // be in zero or more perimeter bridges. A perimeter bridge only contains + // resources. Cross project operations are permitted if all effected + // resources share some perimeter (whether bridge or regular). Perimeter + // Bridge does not contain access levels or services: those are governed + // entirely by the regular perimeter that resource is in. + // + // Perimeter Bridges are typically useful when building more complex toplogies + // with many independent perimeters that need to share some data with a common + // perimeter, but should not be able to share data among themselves. + enum PerimeterType { + // Regular Perimeter. + PERIMETER_TYPE_REGULAR = 0; + + // Perimeter Bridge. + PERIMETER_TYPE_BRIDGE = 1; + } + + // Required. Resource name for the ServicePerimeter. The `short_name` + // component must begin with a letter and only include alphanumeric and '_'. + // Format: `accessPolicies/{policy_id}/servicePerimeters/{short_name}` + string name = 1; + + // Human readable title. Must be unique within the Policy. + string title = 2; + + // Description of the `ServicePerimeter` and its use. Does not affect + // behavior. + string description = 3; + + // Output only. Time the `ServicePerimeter` was created in UTC. + google.protobuf.Timestamp create_time = 4; + + // Output only. Time the `ServicePerimeter` was updated in UTC. + google.protobuf.Timestamp update_time = 5; + + // Perimeter type indicator. A single project is + // allowed to be a member of single regular perimeter, but multiple service + // perimeter bridges. A project cannot be a included in a perimeter bridge + // without being included in regular perimeter. For perimeter bridges, + // the restricted service list as well as access level lists must be + // empty. + PerimeterType perimeter_type = 6; + + // Current ServicePerimeter configuration. Specifies sets of resources, + // restricted services and access levels that determine perimeter + // content and boundaries. + ServicePerimeterConfig status = 7; + + // Proposed (or dry run) ServicePerimeter configuration. This configuration + // allows to specify and test ServicePerimeter configuration without enforcing + // actual access restrictions. Only allowed to be set when the + // "use_explicit_dry_run_spec" flag is set. + ServicePerimeterConfig spec = 8; + + // Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly + // exists for all Service Perimeters, and that spec is identical to the + // status for those Service Perimeters. When this flag is set, it inhibits the + // generation of the implicit spec, thereby allowing the user to explicitly + // provide a configuration ("spec") to use in a dry-run version of the Service + // Perimeter. This allows the user to test changes to the enforced config + // ("status") without actually enforcing them. This testing is done through + // analyzing the differences between currently enforced and suggested + // restrictions. use_explicit_dry_run_spec must bet set to True if any of the + // fields in the spec are set to non-default values. + bool use_explicit_dry_run_spec = 9; +} + +// `ServicePerimeterConfig` specifies a set of Google Cloud resources that +// describe specific Service Perimeter configuration. +message ServicePerimeterConfig { + // Specifies how APIs are allowed to communicate within the Service + // Perimeter. + message VpcAccessibleServices { + // Whether to restrict API calls within the Service Perimeter to the list of + // APIs specified in 'allowed_services'. + bool enable_restriction = 1; + + // The list of APIs usable within the Service Perimeter. Must be empty + // unless 'enable_restriction' is True. + repeated string allowed_services = 2; + } + + // A list of Google Cloud resources that are inside of the service perimeter. + // Currently only projects are allowed. Format: `projects/{project_number}` + repeated string resources = 1; + + // A list of `AccessLevel` resource names that allow resources within the + // `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed + // must be in the same policy as this `ServicePerimeter`. Referencing a + // nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are + // listed, resources within the perimeter can only be accessed via Google + // Cloud calls with request origins within the perimeter. Example: + // `"accessPolicies/MY_POLICY/accessLevels/MY_LEVEL"`. + // For Service Perimeter Bridge, must be empty. + repeated string access_levels = 2; + + // Google Cloud services that are subject to the Service Perimeter + // restrictions. For example, if `storage.googleapis.com` is specified, access + // to the storage buckets inside the perimeter must meet the perimeter's + // access restrictions. + repeated string restricted_services = 4; + + // Configuration for APIs allowed within Perimeter. + VpcAccessibleServices vpc_accessible_services = 10; +} diff --git a/google/logging/BUILD.bazel b/google/logging/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/logging/BUILD.bazel +++ b/google/logging/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/logging/artman_logging.yaml b/google/logging/artman_logging.yaml index d99387d32..78a26ab37 100644 --- a/google/logging/artman_logging.yaml +++ b/google/logging/artman_logging.yaml @@ -3,11 +3,13 @@ common: api_version: v2 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: + - type - v2 - service_yaml: logging.yaml + service_yaml: v2/logging.yaml gapic_yaml: v2/logging_gapic.yaml + proto_package: google.logging.v2 artifacts: - name: gapic_config type: GAPIC_CONFIG @@ -29,6 +31,3 @@ artifacts: - name: ruby_gapic type: GAPIC language: RUBY -- name: csharp_gapic - type: GAPIC - language: CSHARP diff --git a/google/logging/logging.yaml b/google/logging/logging.yaml deleted file mode 100644 index d84a57a80..000000000 --- a/google/logging/logging.yaml +++ /dev/null @@ -1,100 +0,0 @@ -type: google.api.Service -config_version: 3 -name: logging.googleapis.com -title: Stackdriver Logging API - -apis: -- name: google.logging.v2.LoggingServiceV2 -- name: google.logging.v2.ConfigServiceV2 -- name: google.logging.v2.MetricsServiceV2 - -documentation: - summary: Writes log entries and manages your Logging configuration. - overview: |- - # Introduction - - The Stackdriver Logging service. - -backend: - rules: - - selector: google.logging.v2.LoggingServiceV2.DeleteLog - deadline: 60.0 - - selector: google.logging.v2.LoggingServiceV2.WriteLogEntries - deadline: 60.0 - - selector: google.logging.v2.LoggingServiceV2.ListLogEntries - deadline: 10.0 - - selector: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors - deadline: 60.0 - - selector: google.logging.v2.LoggingServiceV2.ListLogs - deadline: 60.0 - - selector: google.logging.v2.ConfigServiceV2.ListSinks - deadline: 60.0 - - selector: google.logging.v2.ConfigServiceV2.GetSink - deadline: 60.0 - - selector: google.logging.v2.ConfigServiceV2.CreateSink - deadline: 120.0 - - selector: google.logging.v2.ConfigServiceV2.UpdateSink - deadline: 120.0 - - selector: google.logging.v2.ConfigServiceV2.DeleteSink - deadline: 60.0 - - selector: google.logging.v2.ConfigServiceV2.ListExclusions - deadline: 60.0 - - selector: google.logging.v2.ConfigServiceV2.GetExclusion - deadline: 60.0 - - selector: google.logging.v2.ConfigServiceV2.CreateExclusion - deadline: 60.0 - - selector: google.logging.v2.ConfigServiceV2.UpdateExclusion - deadline: 60.0 - - selector: google.logging.v2.ConfigServiceV2.DeleteExclusion - deadline: 60.0 - - selector: google.logging.v2.MetricsServiceV2.ListLogMetrics - deadline: 60.0 - - selector: google.logging.v2.MetricsServiceV2.GetLogMetric - deadline: 60.0 - - selector: google.logging.v2.MetricsServiceV2.CreateLogMetric - deadline: 60.0 - - selector: google.logging.v2.MetricsServiceV2.UpdateLogMetric - deadline: 60.0 - - selector: google.logging.v2.MetricsServiceV2.DeleteLogMetric - deadline: 60.0 - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/cloud-platform.read-only, - https://www.googleapis.com/auth/logging.admin, - https://www.googleapis.com/auth/logging.read - - selector: |- - google.logging.v2.ConfigServiceV2.CreateExclusion, - google.logging.v2.ConfigServiceV2.CreateSink, - google.logging.v2.ConfigServiceV2.DeleteExclusion, - google.logging.v2.ConfigServiceV2.DeleteSink, - google.logging.v2.ConfigServiceV2.UpdateExclusion, - google.logging.v2.ConfigServiceV2.UpdateSink - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/logging.admin - - selector: |- - google.logging.v2.MetricsServiceV2.CreateLogMetric, - google.logging.v2.MetricsServiceV2.DeleteLogMetric, - google.logging.v2.MetricsServiceV2.UpdateLogMetric - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/logging.admin, - https://www.googleapis.com/auth/logging.write - - selector: google.logging.v2.LoggingServiceV2.DeleteLog - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/logging.admin - - selector: google.logging.v2.LoggingServiceV2.WriteLogEntries - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/logging.admin, - https://www.googleapis.com/auth/logging.write diff --git a/google/logging/type/BUILD.bazel b/google/logging/type/BUILD.bazel index 641e02392..9bfcc10cd 100644 --- a/google/logging/type/BUILD.bazel +++ b/google/logging/type/BUILD.bazel @@ -1,74 +1,165 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## -load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") +load("@rules_proto//proto:defs.bzl", "proto_library") proto_library( - name = "http_request_proto", - srcs = ["http_request.proto"], - deps = [ - "//google/api:annotations_proto", - "@com_google_protobuf//:duration_proto", + name = "type_proto", + srcs = [ + "http_request.proto", + "log_severity.proto", ], -) - -proto_library( - name = "log_severity_proto", - srcs = ["log_severity.proto"], deps = [ "//google/api:annotations_proto", "@com_google_protobuf//:duration_proto", ], ) -proto_library_with_info( - name = "type_proto_with_info", - deps = [ - ":http_request_proto", - ":log_severity_proto", - ], -) - ############################################################################## # Java ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", ) java_proto_library( name = "type_java_proto", - deps = [ - ":http_request_proto", - ":log_severity_proto", - ], + deps = [":type_proto"], ) -java_resource_name_proto_library( - name = "type_resource_name_java_proto", - gapic_yaml = "//google/logging/v2:logging_gapic.yaml", - deps = [ - ":http_request_proto", - ":log_severity_proto", - ], +java_grpc_library( + name = "type_java_grpc", + srcs = [":type_proto"], + deps = [":type_java_proto"], ) ############################################################################## # Go ############################################################################## -load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", +) go_proto_library( - name = "ltype_go_proto", + name = "type_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/logging/type", - protos = [ - ":http_request_proto", - ":log_severity_proto", + protos = [":type_proto"], + deps = [ + "//google/api:annotations_go_proto", ], - deps = ["//google/api:annotations_go_proto"], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "type_moved_proto", + srcs = [":type_proto"], + deps = [ + "//google/api:annotations_proto", + "@com_google_protobuf//:duration_proto", + ], +) + +py_proto_library( + name = "type_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":type_moved_proto"], +) + +py_grpc_library( + name = "type_py_grpc", + srcs = [":type_moved_proto"], + deps = [":type_py_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "type_php_proto", + deps = [":type_proto"], +) + +php_grpc_library( + name = "type_php_grpc", + srcs = [":type_proto"], + deps = [":type_php_proto"], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "type_ruby_proto", + deps = [":type_proto"], +) + +ruby_grpc_library( + name = "type_ruby_grpc", + srcs = [":type_proto"], + deps = [":type_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "type_csharp_proto", + deps = [":type_proto"], +) + +csharp_grpc_library( + name = "type_csharp_grpc", + srcs = [":type_proto"], + deps = [":type_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ code here diff --git a/google/logging/type/http_request.proto b/google/logging/type/http_request.proto index 974fdf71f..f5002062f 100644 --- a/google/logging/type/http_request.proto +++ b/google/logging/type/http_request.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.logging.type; -import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Logging.Type"; option go_package = "google.golang.org/genproto/googleapis/logging/type;ltype"; diff --git a/google/logging/type/log_severity.proto b/google/logging/type/log_severity.proto index e6556dddc..108cd7c73 100644 --- a/google/logging/type/log_severity.proto +++ b/google/logging/type/log_severity.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/google/logging/v2/BUILD.bazel b/google/logging/v2/BUILD.bazel index 7a6ae416f..f972727d5 100644 --- a/google/logging/v2/BUILD.bazel +++ b/google/logging/v2/BUILD.bazel @@ -1,16 +1,14 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") -_PROTO_SUBPACKAGE_DEPS = [ - "//google/logging/type:http_request_proto", - "//google/logging/type:log_severity_proto", -] - proto_library( name = "logging_proto", srcs = [ @@ -21,57 +19,43 @@ proto_library( ], deps = [ "//google/api:annotations_proto", - "//google/api:monitored_resource_proto", + "//google/api:client_proto", "//google/api:distribution_proto", + "//google/api:field_behavior_proto", "//google/api:metric_proto", + "//google/api:monitored_resource_proto", + "//google/api:resource_proto", + "//google/logging/type:type_proto", "//google/rpc:status_proto", "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", "@com_google_protobuf//:struct_proto", "@com_google_protobuf//:timestamp_proto", - "@com_google_protobuf//:field_mask_proto", - "@com_google_protobuf//:empty_proto", - "@com_google_protobuf//:duration_proto", - ] + _PROTO_SUBPACKAGE_DEPS, + ], ) proto_library_with_info( name = "logging_proto_with_info", deps = [ ":logging_proto", - ] + _PROTO_SUBPACKAGE_DEPS, + "//google/cloud:common_resources_proto", + ], ) -"//google/devtools/logging/v1beta1/attestation:_proto" - ############################################################################## # Java ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - -_JAVA_PROTO_SUBPACKAGE_DEPS = [ - "//google/logging/type:type_java_proto", -] - -_JAVA_GRPC_SUBPACKAGE_DEPS = [ - # "//google/logging/type:type_java_grpc", -] - -_RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS = [ - "//google/logging/type:type_resource_name_java_proto", -] - java_proto_library( name = "logging_java_proto", deps = [":logging_proto"], @@ -80,53 +64,43 @@ java_proto_library( java_grpc_library( name = "logging_java_grpc", srcs = [":logging_proto"], - deps = [":logging_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "logging_resource_name_java_proto", - gapic_yaml = "logging_gapic.yaml", - deps = [":logging_proto"], + deps = [":logging_java_proto"], ) java_gapic_library( name = "logging_java_gapic", src = ":logging_proto_with_info", gapic_yaml = "logging_gapic.yaml", - service_yaml = "//google/logging:logging.yaml", + package = "google.logging.v2", + service_yaml = "logging.yaml", test_deps = [ ":logging_java_grpc", - ] + _JAVA_GRPC_SUBPACKAGE_DEPS, + ], deps = [ ":logging_java_proto", - ":logging_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS, + "//google/api:api_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, +java_gapic_test( + name = "logging_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.logging.v2.ConfigClientTest", + "com.google.cloud.logging.v2.LoggingClientTest", + "com.google.cloud.logging.v2.MetricsClientTest", + ], runtime_deps = [":logging_java_gapic_test"], -) for test_name in [ - "com.google.cloud.logging.v2.LoggingClientTest", - "com.google.cloud.logging.v2.ConfigClientTest", - "com.google.cloud.logging.v2.MetricsClientTest", -]] +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-logging-v2-java", - client_deps = [":logging_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":logging_java_gapic_test"], - grpc_deps = [":logging_java_grpc"] + _JAVA_GRPC_SUBPACKAGE_DEPS, - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":logging_java_gapic", + ":logging_java_grpc", ":logging_java_proto", ":logging_proto", - ":logging_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS + _PROTO_SUBPACKAGE_DEPS + _RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -134,10 +108,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -150,20 +124,21 @@ go_proto_library( "//google/api:distribution_go_proto", "//google/api:metric_go_proto", "//google/api:monitoredres_go_proto", - "//google/logging/type:ltype_go_proto", + "//google/logging/type:type_go_proto", "//google/rpc:status_go_proto", ], ) go_gapic_library( name = "logging_go_gapic", - src = ":logging_proto_with_info", - gapic_yaml = "logging_gapic.yaml", - importpath = "cloud.google.com/go/logging/apiv2", - service_yaml = "//google/logging:logging.yaml", + srcs = [":logging_proto_with_info"], + grpc_service_config = "logging_grpc_service_config.json", + importpath = "cloud.google.com/go/logging/apiv2;logging", + service_yaml = "logging.yaml", deps = [ - ":logging_go_proto", "//google/api:monitoredres_go_proto", + ":logging_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", ], ) @@ -174,14 +149,243 @@ go_test( importpath = "cloud.google.com/go/logging/apiv2", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-logging-v2-go", deps = [ ":logging_go_gapic", - ":logging_go_gapic_srcjar-smoke-test.srcjar", ":logging_go_gapic_srcjar-test.srcjar", ":logging_go_proto", - "//google/logging/type:ltype_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "logging_moved_proto", + srcs = [":logging_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:distribution_proto", + "//google/api:field_behavior_proto", + "//google/api:metric_proto", + "//google/api:monitored_resource_proto", + "//google/api:resource_proto", + "//google/logging/type:type_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "logging_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":logging_moved_proto"], +) + +py_grpc_library( + name = "logging_py_grpc", + srcs = [":logging_moved_proto"], + deps = [":logging_py_proto"], +) + +py_gapic_library( + name = "logging_py_gapic", + src = ":logging_proto_with_info", + gapic_yaml = "logging_gapic.yaml", + package = "google.logging.v2", + service_yaml = "logging.yaml", + deps = [ + ":logging_py_grpc", + ":logging_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "logging-v2-py", + deps = [ + ":logging_py_gapic", + ":logging_py_grpc", + ":logging_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "logging_php_proto", + deps = [":logging_proto"], +) + +php_grpc_library( + name = "logging_php_grpc", + srcs = [":logging_proto"], + deps = [":logging_php_proto"], +) + +php_gapic_library( + name = "logging_php_gapic", + src = ":logging_proto_with_info", + gapic_yaml = "logging_gapic.yaml", + package = "google.logging.v2", + service_yaml = "logging.yaml", + deps = [ + ":logging_php_grpc", + ":logging_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-logging-v2-php", + deps = [ + ":logging_php_gapic", + ":logging_php_grpc", + ":logging_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "logging_nodejs_gapic", + src = ":logging_proto_with_info", + gapic_yaml = "logging_gapic.yaml", + package = "google.logging.v2", + service_yaml = "logging.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "logging-v2-nodejs", + deps = [ + ":logging_nodejs_gapic", + ":logging_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "logging_ruby_proto", + deps = [":logging_proto"], +) + +ruby_grpc_library( + name = "logging_ruby_grpc", + srcs = [":logging_proto"], + deps = [":logging_ruby_proto"], +) + +ruby_gapic_library( + name = "logging_ruby_gapic", + src = ":logging_proto_with_info", + gapic_yaml = "logging_gapic.yaml", + package = "google.logging.v2", + service_yaml = "logging.yaml", + deps = [ + ":logging_ruby_grpc", + ":logging_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-logging-v2-ruby", + deps = [ + ":logging_ruby_gapic", + ":logging_ruby_grpc", + ":logging_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "logging_csharp_proto", + deps = [":logging_proto"], +) + +csharp_grpc_library( + name = "logging_csharp_grpc", + srcs = [":logging_proto"], + deps = [":logging_csharp_proto"], +) + +csharp_gapic_library( + name = "logging_csharp_gapic", + src = ":logging_proto_with_info", + gapic_yaml = "logging_gapic.yaml", + package = "google.logging.v2", + service_yaml = "logging.yaml", + deps = [ + ":logging_csharp_grpc", + ":logging_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-logging-v2-csharp", + deps = [ + ":logging_csharp_gapic", + ":logging_csharp_grpc", + ":logging_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/logging/v2/log_entry.proto b/google/logging/v2/log_entry.proto index de9786daf..351f9e632 100644 --- a/google/logging/v2/log_entry.proto +++ b/google/logging/v2/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,19 +11,21 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.logging.v2; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/logging/type/http_request.proto"; import "google/logging/type/log_severity.proto"; import "google/protobuf/any.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -34,7 +36,18 @@ option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; // An individual entry in a log. +// +// message LogEntry { + option (google.api.resource) = { + type: "logging.googleapis.com/Log" + pattern: "projects/{project}/logs/{log}" + pattern: "organizations/{organization}/logs/{log}" + pattern: "folders/{folder}/logs/{log}" + pattern: "billingAccounts/{billing_account}/logs/{log}" + name_field: "log_name" + }; + // Required. The resource name of the log to which this log entry belongs: // // "projects/[PROJECT_ID]/logs/[LOG_ID]" @@ -42,9 +55,9 @@ message LogEntry { // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" // "folders/[FOLDER_ID]/logs/[LOG_ID]" // - // A project number may optionally be used in place of PROJECT_ID. The - // project number is translated to its corresponding PROJECT_ID internally - // and the `log_name` field will contain PROJECT_ID in queries and exports. + // A project number may be used in place of PROJECT_ID. The project number is + // translated to its corresponding PROJECT_ID internally and the `log_name` + // field will contain PROJECT_ID in queries and exports. // // `[LOG_ID]` must be URL-encoded within `log_name`. Example: // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. @@ -57,19 +70,25 @@ message LogEntry { // forward-slash is removed. Listing the log entry will not show the leading // slash and filtering for a log name with a leading slash will never return // any results. - string log_name = 12; + string log_name = 12 [(google.api.field_behavior) = REQUIRED]; - // Required. The primary monitored resource associated with this log entry. - // Example: a log entry that reports a database error would be - // associated with the monitored resource designating the particular - // database that reported the error. - google.api.MonitoredResource resource = 8; + // Required. The monitored resource that produced this log entry. + // + // Example: a log entry that reports a database error would be associated with + // the monitored resource designating the particular database that reported + // the error. + google.api.MonitoredResource resource = 8 [(google.api.field_behavior) = REQUIRED]; - // Optional. The log entry payload, which can be one of multiple types. + // The log entry payload, which can be one of multiple types. oneof payload { - // The log entry payload, represented as a protocol buffer. Some - // Google Cloud Platform services use this field for their log - // entry payloads. + // The log entry payload, represented as a protocol buffer. Some Google + // Cloud Platform services use this field for their log entry payloads. + // + // The following protocol buffer types are supported; user-defined types + // are not supported: + // + // "type.googleapis.com/google.cloud.audit.AuditLog" + // "type.googleapis.com/google.appengine.logging.v1.RequestLog" google.protobuf.Any proto_payload = 2; // The log entry payload, represented as a Unicode string (UTF-8). @@ -80,95 +99,93 @@ message LogEntry { google.protobuf.Struct json_payload = 6; } - // Optional. The time the event described by the log entry occurred. - // This time is used to compute the log entry's age and to enforce - // the logs retention period. If this field is omitted in a new log - // entry, then Logging assigns it the current time. - // Timestamps have nanosecond accuracy, but trailing zeros in the fractional - // seconds might be omitted when the timestamp is displayed. + // Optional. The time the event described by the log entry occurred. This time is used + // to compute the log entry's age and to enforce the logs retention period. + // If this field is omitted in a new log entry, then Logging assigns it the + // current time. Timestamps have nanosecond accuracy, but trailing zeros in + // the fractional seconds might be omitted when the timestamp is displayed. // - // Incoming log entries should have timestamps that are no more than - // the [logs retention period](/logging/quotas) in the past, - // and no more than 24 hours in the future. Log entries outside those time - // boundaries will not be available when calling `entries.list`, but - // those log entries can still be exported with - // [LogSinks](/logging/docs/api/tasks/exporting-logs). - google.protobuf.Timestamp timestamp = 9; + // Incoming log entries should have timestamps that are no more than the [logs + // retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours + // in the future. Log entries outside those time boundaries will not be + // available when calling `entries.list`, but those log entries can still be + // [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + google.protobuf.Timestamp timestamp = 9 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time the log entry was received by Logging. - google.protobuf.Timestamp receive_timestamp = 24; + google.protobuf.Timestamp receive_timestamp = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The severity of the log entry. The default value is - // `LogSeverity.DEFAULT`. - google.logging.type.LogSeverity severity = 10; + // Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`. + google.logging.type.LogSeverity severity = 10 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A unique identifier for the log entry. If you provide a value, - // then Logging considers other log entries in the same project, - // with the same `timestamp`, and with the same `insert_id` to be duplicates - // which can be removed. If omitted in new log entries, then - // Logging assigns its own unique identifier. The `insert_id` is also used - // to order log entries that have the same `timestamp` value. - string insert_id = 4; + // Optional. A unique identifier for the log entry. If you provide a value, then + // Logging considers other log entries in the same project, with the same + // `timestamp`, and with the same `insert_id` to be duplicates which are + // removed in a single query result. However, there are no guarantees of + // de-duplication in the export of logs. + // + // If the `insert_id` is omitted when writing a log entry, the Logging API + // assigns its own unique identifier in this field. + // + // In queries, the `insert_id` is also used to order log entries that have + // the same `log_name` and `timestamp` values. + string insert_id = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Information about the HTTP request associated with this - // log entry, if applicable. - google.logging.type.HttpRequest http_request = 7; + // Optional. Information about the HTTP request associated with this log entry, if + // applicable. + google.logging.type.HttpRequest http_request = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. A set of user-defined (key, value) data that provides additional // information about the log entry. - map labels = 11; - - // Output only. Additional metadata about the monitored resource. - // Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have - // this field populated. - google.api.MonitoredResourceMetadata metadata = 25; + map labels = 11 [(google.api.field_behavior) = OPTIONAL]; // Optional. Information about an operation associated with the log entry, if // applicable. - LogEntryOperation operation = 15; + LogEntryOperation operation = 15 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Resource name of the trace associated with the log entry, if any. - // If it contains a relative resource name, the name is assumed to be relative - // to `//tracing.googleapis.com`. Example: + // Optional. Resource name of the trace associated with the log entry, if any. If it + // contains a relative resource name, the name is assumed to be relative to + // `//tracing.googleapis.com`. Example: // `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` - string trace = 22; + string trace = 22 [(google.api.field_behavior) = OPTIONAL]; // Optional. The span ID within the trace associated with the log entry. - // For Trace spans, this is the same format that the Trace - // API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such - // as "000000000000004a". - string span_id = 27; + // + // For Trace spans, this is the same format that the Trace API v2 uses: a + // 16-character hexadecimal encoding of an 8-byte array, such as + // `000000000000004a`. + string span_id = 27 [(google.api.field_behavior) = OPTIONAL]; // Optional. The sampling decision of the trace associated with the log entry. + // // True means that the trace resource name in the `trace` field was sampled // for storage in a trace backend. False means that the trace was not sampled // for storage when this log entry was written, or the sampling decision was // unknown at the time. A non-sampled `trace` value is still useful as a // request correlation identifier. The default is False. - bool trace_sampled = 30; + bool trace_sampled = 30 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Source code location information associated with the log entry, - // if any. - LogEntrySourceLocation source_location = 23; + // Optional. Source code location information associated with the log entry, if any. + LogEntrySourceLocation source_location = 23 [(google.api.field_behavior) = OPTIONAL]; } // Additional information about a potentially long-running operation with which // a log entry is associated. message LogEntryOperation { - // Optional. An arbitrary operation identifier. Log entries with the - // same identifier are assumed to be part of the same operation. - string id = 1; + // Optional. An arbitrary operation identifier. Log entries with the same + // identifier are assumed to be part of the same operation. + string id = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. An arbitrary producer identifier. The combination of - // `id` and `producer` must be globally unique. Examples for `producer`: + // Optional. An arbitrary producer identifier. The combination of `id` and + // `producer` must be globally unique. Examples for `producer`: // `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - string producer = 2; + string producer = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Set this to True if this is the first log entry in the operation. - bool first = 3; + bool first = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Set this to True if this is the last log entry in the operation. - bool last = 4; + bool last = 4 [(google.api.field_behavior) = OPTIONAL]; } // Additional information about the source code location that produced the log @@ -176,11 +193,11 @@ message LogEntryOperation { message LogEntrySourceLocation { // Optional. Source file name. Depending on the runtime environment, this // might be a simple name or a fully-qualified name. - string file = 1; + string file = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Line within the source file. 1-based; 0 indicates no line number // available. - int64 line = 2; + int64 line = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Human-readable name of the function or method being invoked, with // optional context such as the class or package name. This information may be @@ -188,5 +205,5 @@ message LogEntrySourceLocation { // less meaningful. The format can vary by language. For example: // `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` // (Python). - string function = 3; + string function = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/google/logging/v2/logging.proto b/google/logging/v2/logging.proto index d04cd5c03..36a81dcc2 100644 --- a/google/logging/v2/logging.proto +++ b/google/logging/v2/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,19 +11,22 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.logging.v2; -import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/logging/v2/log_entry.proto"; +import "google/logging/v2/logging_config.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -35,17 +38,35 @@ option php_namespace = "Google\\Cloud\\Logging\\V2"; // Service for ingesting and querying logs. service LoggingServiceV2 { - // Deletes all the log entries in a log. - // The log reappears if it receives new entries. - // Log entries written shortly before the delete operation might not be - // deleted. + option (google.api.default_host) = "logging.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only," + "https://www.googleapis.com/auth/logging.admin," + "https://www.googleapis.com/auth/logging.read," + "https://www.googleapis.com/auth/logging.write"; + + // Deletes all the log entries in a log. The log reappears if it receives new + // entries. Log entries written shortly before the delete operation might not + // be deleted. Entries received after the delete operation with a timestamp + // before the operation will be deleted. rpc DeleteLog(DeleteLogRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{log_name=projects/*/logs/*}" - additional_bindings { delete: "/v2/{log_name=organizations/*/logs/*}" } - additional_bindings { delete: "/v2/{log_name=folders/*/logs/*}" } - additional_bindings { delete: "/v2/{log_name=billingAccounts/*/logs/*}" } + additional_bindings { + delete: "/v2/{log_name=*/*/logs/*}" + } + additional_bindings { + delete: "/v2/{log_name=organizations/*/logs/*}" + } + additional_bindings { + delete: "/v2/{log_name=folders/*/logs/*}" + } + additional_bindings { + delete: "/v2/{log_name=billingAccounts/*/logs/*}" + } }; + option (google.api.method_signature) = "log_name"; } // Writes log entries to Logging. This API method is the @@ -55,27 +76,27 @@ service LoggingServiceV2 { // A single request may contain log entries for a maximum of 1000 // different resources (projects, organizations, billing accounts or // folders) - rpc WriteLogEntries(WriteLogEntriesRequest) - returns (WriteLogEntriesResponse) { + rpc WriteLogEntries(WriteLogEntriesRequest) returns (WriteLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:write" body: "*" }; + option (google.api.method_signature) = "log_name,resource,labels,entries"; } - // Lists log entries. Use this method to retrieve log entries from - // Logging. For ways to export log entries, see - // [Exporting Logs](/logging/docs/export). + // Lists log entries. Use this method to retrieve log entries that originated + // from a project/folder/organization/billing account. For ways to export log + // entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export). rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:list" body: "*" }; + option (google.api.method_signature) = "resource_names,filter,order_by"; } // Lists the descriptors for monitored resource types used by Logging. - rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) - returns (ListMonitoredResourceDescriptorsResponse) { + rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { option (google.api.http) = { get: "/v2/monitoredResourceDescriptors" }; @@ -86,11 +107,20 @@ service LoggingServiceV2 { rpc ListLogs(ListLogsRequest) returns (ListLogsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/logs" - additional_bindings { get: "/v2/{parent=projects/*}/logs" } - additional_bindings { get: "/v2/{parent=organizations/*}/logs" } - additional_bindings { get: "/v2/{parent=folders/*}/logs" } - additional_bindings { get: "/v2/{parent=billingAccounts/*}/logs" } + additional_bindings { + get: "/v2/{parent=projects/*}/logs" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/logs" + } + additional_bindings { + get: "/v2/{parent=folders/*}/logs" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/logs" + } }; + option (google.api.method_signature) = "parent"; } } @@ -108,7 +138,12 @@ message DeleteLogRequest { // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. // For more information about log names, see // [LogEntry][google.logging.v2.LogEntry]. - string log_name = 1; + string log_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Log" + } + ]; } // The parameters to WriteLogEntries. @@ -126,11 +161,16 @@ message WriteLogEntriesRequest { // "projects/my-project-id/logs/syslog" // "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" // - // The permission logging.logEntries.create is needed on each - // project, organization, billing account, or folder that is receiving - // new log entries, whether the resource is specified in - // logName or in an individual log entry. - string log_name = 1; + // The permission `logging.logEntries.create` is needed on each project, + // organization, billing account, or folder that is receiving new log + // entries, whether the resource is specified in `logName` or in an + // individual log entry. + string log_name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Log" + } + ]; // Optional. A default monitored resource object that is assigned to all log // entries in `entries` that do not specify a value for `resource`. Example: @@ -140,13 +180,13 @@ message WriteLogEntriesRequest { // "zone": "us-central1-a", "instance_id": "00000000000000000000" }} // // See [LogEntry][google.logging.v2.LogEntry]. - google.api.MonitoredResource resource = 2; + google.api.MonitoredResource resource = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Default labels that are added to the `labels` field of all log // entries in `entries`. If a log entry already has a label with the same key // as a label in this parameter, then the log entry's label is not changed. // See [LogEntry][google.logging.v2.LogEntry]. - map labels = 3; + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; // Required. The log entries to send to Logging. The order of log // entries in this list does not matter. Values supplied in this method's @@ -162,32 +202,31 @@ message WriteLogEntriesRequest { // the entries later in the list. See the `entries.list` method. // // Log entries with timestamps that are more than the - // [logs retention period](/logging/quota-policy) in the past or more than + // [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than // 24 hours in the future will not be available when calling `entries.list`. - // However, those log entries can still be exported with - // [LogSinks](/logging/docs/api/tasks/exporting-logs). + // However, those log entries can still be + // [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). // // To improve throughput and to avoid exceeding the - // [quota limit](/logging/quota-policy) for calls to `entries.write`, + // [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, // you should try to include several log entries in this list, // rather than calling this method for each individual log entry. - repeated LogEntry entries = 4; + repeated LogEntry entries = 4 [(google.api.field_behavior) = REQUIRED]; // Optional. Whether valid entries should be written even if some other // entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any // entry is not written, then the response status is the error associated // with one of the failed entries and the response includes error details // keyed by the entries' zero-based index in the `entries.write` method. - bool partial_success = 5; + bool partial_success = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. If true, the request should expect normal response, but the // entries won't be persisted nor exported. Useful for checking whether the // logging API endpoints are working properly before sending valuable data. - bool dry_run = 6; + bool dry_run = 6 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from WriteLogEntries. -// empty message WriteLogEntriesResponse {} // Error details for WriteLogEntries with partial success. @@ -203,13 +242,6 @@ message WriteLogEntriesPartialErrors { // The parameters to `ListLogEntries`. message ListLogEntriesRequest { - // Deprecated. Use `resource_names` instead. One or more project identifiers - // or project numbers from which to retrieve log entries. Example: - // `"my-project-1A"`. If present, these project identifiers are converted to - // resource name format and added to the list of resources in - // `resource_names`. - repeated string project_ids = 1 [deprecated = true]; - // Required. Names of one or more parent resources from which to // retrieve log entries: // @@ -218,17 +250,23 @@ message ListLogEntriesRequest { // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" // + // // Projects listed in the `project_ids` field are added to this list. - repeated string resource_names = 8; + repeated string resource_names = 8 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/Log" + } + ]; // Optional. A filter that chooses which log entries to return. See [Advanced - // Logs Filters](/logging/docs/view/advanced_filters). Only log entries that + // Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). Only log entries that // match the filter are returned. An empty filter matches all log entries in // the resources listed in `resource_names`. Referencing a parent resource // that is not listed in `resource_names` will cause the filter to return no // results. // The maximum length of the filter is 20000 characters. - string filter = 2; + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. How the results should be sorted. Presently, the only permitted // values are `"timestamp asc"` (default) and `"timestamp desc"`. The first @@ -236,18 +274,18 @@ message ListLogEntriesRequest { // `LogEntry.timestamp` (oldest first), and the second option returns entries // in order of decreasing timestamps (newest first). Entries with equal // timestamps are returned in order of their `insert_id` values. - string order_by = 3; + string order_by = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `next_page_token` in the // response indicates that more results might be available. - int32 page_size = 4; + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `page_token` must be the value of // `next_page_token` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 5; + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from `ListLogEntries`. @@ -275,13 +313,13 @@ message ListMonitoredResourceDescriptorsRequest { // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 1; + int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListMonitoredResourceDescriptors. @@ -303,25 +341,30 @@ message ListLogsRequest { // "organizations/[ORGANIZATION_ID]" // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/Log" + } + ]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListLogs. message ListLogsResponse { // A list of log names. For example, - // `"projects/my-project/syslog"` or - // `"organizations/123/cloudresourcemanager.googleapis.com%2Factivity"`. + // `"projects/my-project/logs/syslog"` or + // `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. repeated string log_names = 3; // If there might be more results than those appearing in this response, then diff --git a/google/logging/v2/logging.yaml b/google/logging/v2/logging.yaml new file mode 100644 index 000000000..5d04a82e9 --- /dev/null +++ b/google/logging/v2/logging.yaml @@ -0,0 +1,126 @@ +type: google.api.Service +config_version: 3 +name: logging.googleapis.com +title: Stackdriver Logging API + +apis: +- name: google.logging.v2.ConfigServiceV2 +- name: google.logging.v2.LoggingServiceV2 +- name: google.logging.v2.MetricsServiceV2 + +documentation: + summary: |- + Writes log entries and manages your Stackdriver Logging configuration. The + table entries below are presented in alphabetical order, not in order of + common use. For explanations of the concepts found in the table entries, + read the Stackdriver Logging + documentation. + overview: '# Introduction + +The Stackdriver Logging service.' + +backend: + rules: + - selector: 'google.logging.v2.ConfigServiceV2.*' + deadline: 60.0 + - selector: 'google.logging.v2.LoggingServiceV2.*' + deadline: 60.0 + - selector: google.logging.v2.LoggingServiceV2.ListLogEntries + deadline: 10.0 + - selector: 'google.logging.v2.MetricsServiceV2.*' + deadline: 60.0 + +authentication: + rules: + - selector: 'google.logging.v2.ConfigServiceV2.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/logging.admin + - selector: google.logging.v2.ConfigServiceV2.GetBucket + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/logging.admin, + https://www.googleapis.com/auth/logging.read + - selector: google.logging.v2.ConfigServiceV2.GetCmekSettings + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/logging.admin, + https://www.googleapis.com/auth/logging.read + - selector: google.logging.v2.ConfigServiceV2.GetExclusion + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/logging.admin, + https://www.googleapis.com/auth/logging.read + - selector: google.logging.v2.ConfigServiceV2.GetSink + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/logging.admin, + https://www.googleapis.com/auth/logging.read + - selector: google.logging.v2.ConfigServiceV2.ListBuckets + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/logging.admin, + https://www.googleapis.com/auth/logging.read + - selector: google.logging.v2.ConfigServiceV2.ListExclusions + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/logging.admin, + https://www.googleapis.com/auth/logging.read + - selector: google.logging.v2.ConfigServiceV2.ListSinks + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/logging.admin, + https://www.googleapis.com/auth/logging.read + - selector: 'google.logging.v2.LoggingServiceV2.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/logging.admin, + https://www.googleapis.com/auth/logging.read + - selector: google.logging.v2.LoggingServiceV2.DeleteLog + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/logging.admin + - selector: google.logging.v2.LoggingServiceV2.WriteLogEntries + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/logging.admin, + https://www.googleapis.com/auth/logging.write + - selector: 'google.logging.v2.MetricsServiceV2.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/logging.admin, + https://www.googleapis.com/auth/logging.write + - selector: google.logging.v2.MetricsServiceV2.GetLogMetric + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/logging.admin, + https://www.googleapis.com/auth/logging.read + - selector: google.logging.v2.MetricsServiceV2.ListLogMetrics + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/logging.admin, + https://www.googleapis.com/auth/logging.read diff --git a/google/logging/v2/logging_config.proto b/google/logging/v2/logging_config.proto index 2afea1062..b7cb9c94a 100644 --- a/google/logging/v2/logging_config.proto +++ b/google/logging/v2/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,16 +11,19 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.logging.v2; -import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -29,55 +32,172 @@ option java_multiple_files = true; option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/FolderLocation" + pattern: "folders/{folder}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/BillingAccountLocation" + pattern: "billingAccounts/{billing_account}/locations/{location}" +}; -// Service for configuring sinks used to export log entries out of -// Logging. +// Service for configuring sinks used to route log entries. service ConfigServiceV2 { + option (google.api.default_host) = "logging.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only," + "https://www.googleapis.com/auth/logging.admin," + "https://www.googleapis.com/auth/logging.read"; + + // Lists buckets (Beta). + rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) { + option (google.api.http) = { + get: "/v2/{parent=*/*/locations/*}/buckets" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=folders/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*/locations/*}/buckets" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a bucket (Beta). + rpc GetBucket(GetBucketRequest) returns (LogBucket) { + option (google.api.http) = { + get: "/v2/{name=*/*/locations/*/buckets/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=folders/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=billingAccounts/*/buckets/*}" + } + }; + } + + // Updates a bucket. This method replaces the following fields in the + // existing bucket with values from the new bucket: `retention_period` + // + // If the retention period is decreased and the bucket is locked, + // FAILED_PRECONDITION will be returned. + // + // If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION + // will be returned. + // + // A buckets region may not be modified after it is created. + // This method is in Beta. + rpc UpdateBucket(UpdateBucketRequest) returns (LogBucket) { + option (google.api.http) = { + patch: "/v2/{name=*/*/locations/*/buckets/*}" + body: "bucket" + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=folders/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=billingAccounts/*/locations/*/buckets/*}" + body: "bucket" + } + }; + } + // Lists sinks. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/sinks" - additional_bindings { get: "/v2/{parent=projects/*}/sinks" } - additional_bindings { get: "/v2/{parent=organizations/*}/sinks" } - additional_bindings { get: "/v2/{parent=folders/*}/sinks" } - additional_bindings { get: "/v2/{parent=billingAccounts/*}/sinks" } + additional_bindings { + get: "/v2/{parent=projects/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=folders/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/sinks" + } }; + option (google.api.method_signature) = "parent"; } // Gets a sink. rpc GetSink(GetSinkRequest) returns (LogSink) { option (google.api.http) = { get: "/v2/{sink_name=*/*/sinks/*}" - additional_bindings { get: "/v2/{sink_name=projects/*/sinks/*}" } - additional_bindings { get: "/v2/{sink_name=organizations/*/sinks/*}" } - additional_bindings { get: "/v2/{sink_name=folders/*/sinks/*}" } - additional_bindings { get: "/v2/{sink_name=billingAccounts/*/sinks/*}" } + additional_bindings { + get: "/v2/{sink_name=projects/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=organizations/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=folders/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=billingAccounts/*/sinks/*}" + } }; + option (google.api.method_signature) = "sink_name"; } - // Creates a sink that exports specified log entries to a destination. The + // Creates a sink that exports specified log entries to a destination. The // export of newly-ingested log entries begins immediately, unless the sink's - // `writer_identity` is not permitted to write to the destination. A sink can + // `writer_identity` is not permitted to write to the destination. A sink can // export log entries only from the resource owning the sink. rpc CreateSink(CreateSinkRequest) returns (LogSink) { option (google.api.http) = { post: "/v2/{parent=*/*}/sinks" body: "sink" - additional_bindings { post: "/v2/{parent=projects/*}/sinks" body: "sink" } + additional_bindings { + post: "/v2/{parent=projects/*}/sinks" + body: "sink" + } additional_bindings { post: "/v2/{parent=organizations/*}/sinks" body: "sink" } - additional_bindings { post: "/v2/{parent=folders/*}/sinks" body: "sink" } + additional_bindings { + post: "/v2/{parent=folders/*}/sinks" + body: "sink" + } additional_bindings { post: "/v2/{parent=billingAccounts/*}/sinks" body: "sink" } }; + option (google.api.method_signature) = "parent,sink"; } - // Updates a sink. This method replaces the following fields in the existing + // Updates a sink. This method replaces the following fields in the existing // sink with values from the new sink: `destination`, and `filter`. + // // The updated sink might also have a new `writer_identity`; see the // `unique_writer_identity` field. rpc UpdateSink(UpdateSinkRequest) returns (LogSink) { @@ -117,6 +237,8 @@ service ConfigServiceV2 { body: "sink" } }; + option (google.api.method_signature) = "sink_name,sink,update_mask"; + option (google.api.method_signature) = "sink_name,sink"; } // Deletes a sink. If the sink has a unique `writer_identity`, then that @@ -124,35 +246,60 @@ service ConfigServiceV2 { rpc DeleteSink(DeleteSinkRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{sink_name=*/*/sinks/*}" - additional_bindings { delete: "/v2/{sink_name=projects/*/sinks/*}" } - additional_bindings { delete: "/v2/{sink_name=organizations/*/sinks/*}" } - additional_bindings { delete: "/v2/{sink_name=folders/*/sinks/*}" } + additional_bindings { + delete: "/v2/{sink_name=projects/*/sinks/*}" + } + additional_bindings { + delete: "/v2/{sink_name=organizations/*/sinks/*}" + } + additional_bindings { + delete: "/v2/{sink_name=folders/*/sinks/*}" + } additional_bindings { delete: "/v2/{sink_name=billingAccounts/*/sinks/*}" } }; + option (google.api.method_signature) = "sink_name"; } // Lists all the exclusions in a parent resource. rpc ListExclusions(ListExclusionsRequest) returns (ListExclusionsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/exclusions" - additional_bindings { get: "/v2/{parent=projects/*}/exclusions" } - additional_bindings { get: "/v2/{parent=organizations/*}/exclusions" } - additional_bindings { get: "/v2/{parent=folders/*}/exclusions" } - additional_bindings { get: "/v2/{parent=billingAccounts/*}/exclusions" } + additional_bindings { + get: "/v2/{parent=projects/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=folders/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/exclusions" + } }; + option (google.api.method_signature) = "parent"; } // Gets the description of an exclusion. rpc GetExclusion(GetExclusionRequest) returns (LogExclusion) { option (google.api.http) = { get: "/v2/{name=*/*/exclusions/*}" - additional_bindings { get: "/v2/{name=projects/*/exclusions/*}" } - additional_bindings { get: "/v2/{name=organizations/*/exclusions/*}" } - additional_bindings { get: "/v2/{name=folders/*/exclusions/*}" } - additional_bindings { get: "/v2/{name=billingAccounts/*/exclusions/*}" } + additional_bindings { + get: "/v2/{name=projects/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=organizations/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=folders/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=billingAccounts/*/exclusions/*}" + } }; + option (google.api.method_signature) = "name"; } // Creates a new exclusion in a specified parent resource. @@ -179,6 +326,7 @@ service ConfigServiceV2 { body: "exclusion" } }; + option (google.api.method_signature) = "parent,exclusion"; } // Changes one or more properties of an existing exclusion. @@ -203,28 +351,128 @@ service ConfigServiceV2 { body: "exclusion" } }; + option (google.api.method_signature) = "name,exclusion,update_mask"; } // Deletes an exclusion. rpc DeleteExclusion(DeleteExclusionRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=*/*/exclusions/*}" - additional_bindings { delete: "/v2/{name=projects/*/exclusions/*}" } - additional_bindings { delete: "/v2/{name=organizations/*/exclusions/*}" } - additional_bindings { delete: "/v2/{name=folders/*/exclusions/*}" } + additional_bindings { + delete: "/v2/{name=projects/*/exclusions/*}" + } + additional_bindings { + delete: "/v2/{name=organizations/*/exclusions/*}" + } + additional_bindings { + delete: "/v2/{name=folders/*/exclusions/*}" + } additional_bindings { delete: "/v2/{name=billingAccounts/*/exclusions/*}" } }; + option (google.api.method_signature) = "name"; } + + // Gets the Logs Router CMEK settings for the given resource. + // + // Note: CMEK for the Logs Router can currently only be configured for GCP + // organizations. Once configured, it applies to all projects and folders in + // the GCP organization. + // + // See [Enabling CMEK for Logs + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + rpc GetCmekSettings(GetCmekSettingsRequest) returns (CmekSettings) { + option (google.api.http) = { + get: "/v2/{name=*/*}/cmekSettings" + additional_bindings { + get: "/v2/{name=organizations/*}/cmekSettings" + } + }; + } + + // Updates the Logs Router CMEK settings for the given resource. + // + // Note: CMEK for the Logs Router can currently only be configured for GCP + // organizations. Once configured, it applies to all projects and folders in + // the GCP organization. + // + // [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] + // will fail if 1) `kms_key_name` is invalid, or 2) the associated service + // account does not have the required + // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or + // 3) access to the key is disabled. + // + // See [Enabling CMEK for Logs + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + rpc UpdateCmekSettings(UpdateCmekSettingsRequest) returns (CmekSettings) { + option (google.api.http) = { + patch: "/v2/{name=*/*}/cmekSettings" + body: "cmek_settings" + additional_bindings { + patch: "/v2/{name=organizations/*}/cmekSettings" + body: "cmek_settings" + } + }; + } +} + +// Describes a repository of logs (Beta). +message LogBucket { + option (google.api.resource) = { + type: "logging.googleapis.com/LogBucket" + pattern: "projects/{project}/locations/{location}/buckets/{bucket}" + pattern: "organizations/{organization}/locations/{location}/buckets/{bucket}" + pattern: "folders/{folder}/locations/{location}/buckets/{bucket}" + pattern: "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}" + }; + + // The resource name of the bucket. + // For example: + // "projects/my-project-id/locations/my-location/buckets/my-bucket-id The + // supported locations are: + // "global" + // "us-central1" + // + // For the location of `global` it is unspecified where logs are actually + // stored. + // Once a bucket has been created, the location can not be changed. + string name = 1; + + // Describes this bucket. + string description = 3; + + // Output only. The creation timestamp of the bucket. This is not set for any of the + // default buckets. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of the bucket. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Logs will be retained by default for this amount of time, after which they + // will automatically be deleted. The minimum retention period is 1 day. + // If this value is set to zero at bucket creation time, the default time of + // 30 days will be used. + int32 retention_days = 11; + + // Output only. The bucket lifecycle state. + LifecycleState lifecycle_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Describes a sink used to export log entries to one of the following // destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a -// Cloud Pub/Sub topic. A logs filter controls which log entries are -// exported. The sink must be created within a project, organization, billing -// account, or folder. +// Cloud Pub/Sub topic. A logs filter controls which log entries are exported. +// The sink must be created within a project, organization, billing account, or +// folder. message LogSink { + option (google.api.resource) = { + type: "logging.googleapis.com/LogSink" + pattern: "projects/{project}/sinks/{sink}" + pattern: "organizations/{organization}/sinks/{sink}" + pattern: "folders/{folder}/sinks/{sink}" + pattern: "billingAccounts/{billing_account}/sinks/{sink}" + }; + // Available log entry formats. Log entries can be written to // Logging in either format and can be exported in either format. // Version 2 is the preferred format. @@ -239,12 +487,12 @@ message LogSink { V1 = 2; } - // Required. The client-assigned sink identifier, unique within the - // project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are - // limited to 100 characters and can include only the following characters: - // upper and lower-case alphanumeric characters, underscores, hyphens, and - // periods. - string name = 1; + // Required. The client-assigned sink identifier, unique within the project. Example: + // `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100 + // characters and can include only the following characters: upper and + // lower-case alphanumeric characters, underscores, hyphens, and periods. + // First character has to be alphanumeric. + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The export destination: // @@ -254,37 +502,47 @@ message LogSink { // // The sink's `writer_identity`, set when the sink is created, must // have permission to write to the destination or else the log - // entries are not exported. For more information, see - // [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs). - string destination = 3; + // entries are not exported. For more information, see + // [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + string destination = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "*" + } + ]; - // Optional. - // An [advanced logs filter](/logging/docs/view/advanced_filters). The only + // Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only // exported log entries are those that are in the resource owning the sink and - // that match the filter. For example: + // that match the filter. For example: // // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - string filter = 5; + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A description of this sink. + // The maximum length of the description is 8000 characters. + string description = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to True, then this sink is disabled and it does not + // export any log entries. + bool disabled = 19 [(google.api.field_behavior) = OPTIONAL]; // Deprecated. The log entry format to use for this sink's exported log - // entries. The v2 format is used by default and cannot be changed. + // entries. The v2 format is used by default and cannot be changed. VersionFormat output_version_format = 6 [deprecated = true]; - // Output only. An IAM identity—a service account or group—under - // which Logging writes the exported log entries to the sink's - // destination. This field is set by - // [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create) - // and - // [sinks.update](/logging/docs/api/reference/rest/v2/projects.sinks/update), - // based on the setting of `unique_writer_identity` in those methods. + // Output only. An IAM identity–a service account or group—under which Logging + // writes the exported log entries to the sink's destination. This field is + // set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and + // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the + // value of `unique_writer_identity` in those methods. // // Until you grant this identity write-access to the destination, log entry // exports from this sink will fail. For more information, - // see [Granting access for a - // resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). + // see [Granting Access for a + // Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). // Consult the destination service's documentation to determine the // appropriate IAM roles to assign to the identity. - string writer_identity = 8; + string writer_identity = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. This field applies only to sinks owned by organizations and // folders. If the field is false, the default, only the logs owned by the @@ -299,13 +557,150 @@ message LogSink { // // logName:("projects/test-project1/" OR "projects/test-project2/") AND // resource.type=gce_instance - bool include_children = 9; + bool include_children = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Destination dependent options. + oneof options { + // Optional. Options that affect sinks exporting data to BigQuery. + BigQueryOptions bigquery_options = 12 [(google.api.field_behavior) = OPTIONAL]; + } + + // Output only. The creation timestamp of the sink. + // + // This field may not be present for older sinks. + google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of the sink. + // + // This field may not be present for older sinks. + google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Options that change functionality of a sink exporting data to BigQuery. +message BigQueryOptions { + // Optional. Whether to use [BigQuery's partition + // tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging + // creates dated tables based on the log entries' timestamps, e.g. + // syslog_20170523. With partitioned tables the date suffix is no longer + // present and [special query + // syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead. + // In both cases, tables are sharded based on UTC timezone. + bool use_partitioned_tables = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. True if new timestamp column based partitioning is in use, + // false if legacy ingestion-time partitioning is in use. + // All new sinks will have this field set true and will use timestamp column + // based partitioning. If use_partitioned_tables is false, this value has no + // meaning and will be false. Legacy sinks using partitioned tables will have + // this field set to false. + bool uses_timestamp_column_partitioning = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// LogBucket lifecycle states (Beta). +enum LifecycleState { + // Unspecified state. This is only used/useful for distinguishing + // unset values. + LIFECYCLE_STATE_UNSPECIFIED = 0; + + // The normal and active state. + ACTIVE = 1; + + // The bucket has been marked for deletion by the user. + DELETE_REQUESTED = 2; +} + +// The parameters to `ListBuckets` (Beta). +message ListBucketsRequest { + // Required. The parent resource whose buckets are to be listed: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + // + // Note: The locations portion of the resource must be specified, but + // supplying the character `-` in place of [LOCATION_ID] will return all + // buckets. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/LogBucket" + }]; + + // Optional. If present, then retrieve the next batch of results from the + // preceding call to this method. `pageToken` must be the value of + // `nextPageToken` from the previous response. The values of other method + // parameters should be identical to those in the previous call. + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of results to return from this request. + // Non-positive values are ignored. The presence of `nextPageToken` in the + // response indicates that more results might be available. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from ListBuckets (Beta). +message ListBucketsResponse { + // A list of buckets. + repeated LogBucket buckets = 1; + + // If there might be more results than appear in this response, then + // `nextPageToken` is included. To get the next set of results, call the same + // method again using the value of `nextPageToken` as `pageToken`. + string next_page_token = 2; +} + +// The parameters to `UpdateBucket` (Beta). +message UpdateBucketRequest { + // Required. The full resource name of the bucket to update. + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also + // requires permission "resourcemanager.projects.updateLiens" to set the + // locked property + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogBucket" + } + ]; - // Deprecated. This field is ignored when creating or updating sinks. - google.protobuf.Timestamp start_time = 10 [deprecated = true]; + // Required. The updated bucket. + LogBucket bucket = 2 [(google.api.field_behavior) = REQUIRED]; - // Deprecated. This field is ignored when creating or updating sinks. - google.protobuf.Timestamp end_time = 11 [deprecated = true]; + // Required. Field mask that specifies the fields in `bucket` that need an update. A + // bucket field will be overwritten if, and only if, it is in the update + // mask. `name` and output only fields cannot be updated. + // + // For a detailed `FieldMask` definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + // + // Example: `updateMask=retention_days`. + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// The parameters to `GetBucket` (Beta). +message GetBucketRequest { + // Required. The resource name of the bucket: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogBucket" + } + ]; } // The parameters to `ListSinks`. @@ -316,18 +711,23 @@ message ListSinksRequest { // "organizations/[ORGANIZATION_ID]" // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/LogSink" + } + ]; // Optional. If present, then retrieve the next batch of results from the - // preceding call to this method. `pageToken` must be the value of - // `nextPageToken` from the previous response. The values of other method + // preceding call to this method. `pageToken` must be the value of + // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. - // Non-positive values are ignored. The presence of `nextPageToken` in the + // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from `ListSinks`. @@ -336,7 +736,7 @@ message ListSinksResponse { repeated LogSink sinks = 1; // If there might be more results than appear in this response, then - // `nextPageToken` is included. To get the next set of results, call the same + // `nextPageToken` is included. To get the next set of results, call the same // method again using the value of `nextPageToken` as `pageToken`. string next_page_token = 2; } @@ -351,7 +751,12 @@ message GetSinkRequest { // "folders/[FOLDER_ID]/sinks/[SINK_ID]" // // Example: `"projects/my-project-id/sinks/my-sink-id"`. - string sink_name = 1; + string sink_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogSink" + } + ]; } // The parameters to `CreateSink`. @@ -364,31 +769,35 @@ message CreateSinkRequest { // "folders/[FOLDER_ID]" // // Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/LogSink" + } + ]; // Required. The new sink, whose `name` parameter is a sink identifier that // is not already in use. - LogSink sink = 2; + LogSink sink = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Determines the kind of IAM identity returned as `writer_identity` - // in the new sink. If this value is omitted or set to false, and if the + // in the new sink. If this value is omitted or set to false, and if the // sink's parent is a project, then the value returned as `writer_identity` is - // the same group or service account used by Logging before the - // addition of writer identities to this API. The sink's destination must be - // in the same project as the sink itself. + // the same group or service account used by Logging before the addition of + // writer identities to this API. The sink's destination must be in the same + // project as the sink itself. // // If this field is set to true, or if the sink is owned by a non-project // resource such as an organization, then the value of `writer_identity` will - // be a unique service account used only for exports from the new sink. For - // more information, see `writer_identity` in - // [LogSink][google.logging.v2.LogSink]. - bool unique_writer_identity = 3; + // be a unique service account used only for exports from the new sink. For + // more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink]. + bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL]; } // The parameters to `UpdateSink`. message UpdateSinkRequest { - // Required. The full resource name of the sink to update, including the - // parent resource and the sink identifier: + // Required. The full resource name of the sink to update, including the parent + // resource and the sink identifier: // // "projects/[PROJECT_ID]/sinks/[SINK_ID]" // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" @@ -396,15 +805,19 @@ message UpdateSinkRequest { // "folders/[FOLDER_ID]/sinks/[SINK_ID]" // // Example: `"projects/my-project-id/sinks/my-sink-id"`. - string sink_name = 1; + string sink_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogSink" + } + ]; - // Required. The updated sink, whose name is the same identifier that appears - // as part of `sink_name`. - LogSink sink = 2; + // Required. The updated sink, whose name is the same identifier that appears as part + // of `sink_name`. + LogSink sink = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. See - // [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create) - // for a description of this field. When updating a sink, the effect of this + // Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] + // for a description of this field. When updating a sink, the effect of this // field on the value of `writer_identity` in the updated sink depends on both // the old and new values of this field: // @@ -414,11 +827,11 @@ message UpdateSinkRequest { // `writer_identity` is changed to a unique service account. // + It is an error if the old value is true and the new value is // set to false or defaulted to false. - bool unique_writer_identity = 3; + bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Field mask that specifies the fields in `sink` that need // an update. A sink field will be overwritten if, and only if, it is - // in the update mask. `name` and output only fields cannot be updated. + // in the update mask. `name` and output only fields cannot be updated. // // An empty updateMask is temporarily treated as using the following mask // for backwards compatibility purposes: @@ -430,13 +843,13 @@ message UpdateSinkRequest { // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask // // Example: `updateMask=filter`. - google.protobuf.FieldMask update_mask = 4; + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; } // The parameters to `DeleteSink`. message DeleteSinkRequest { - // Required. The full resource name of the sink to delete, including the - // parent resource and the sink identifier: + // Required. The full resource name of the sink to delete, including the parent + // resource and the sink identifier: // // "projects/[PROJECT_ID]/sinks/[SINK_ID]" // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" @@ -444,40 +857,63 @@ message DeleteSinkRequest { // "folders/[FOLDER_ID]/sinks/[SINK_ID]" // // Example: `"projects/my-project-id/sinks/my-sink-id"`. - string sink_name = 1; + string sink_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogSink" + } + ]; } // Specifies a set of log entries that are not to be stored in -// Logging. If your project receives a large volume of logs, you might be able -// to use exclusions to reduce your chargeable logs. Exclusions are processed -// after log sinks, so you can export log entries before they are excluded. -// Audit log entries and log entries from Amazon Web Services are never -// excluded. +// Logging. If your GCP resource receives a large volume of logs, you can +// use exclusions to reduce your chargeable logs. Exclusions are +// processed after log sinks, so you can export log entries before they are +// excluded. Note that organization-level and folder-level exclusions don't +// apply to child resources, and that you can't exclude audit log entries. message LogExclusion { - // Required. A client-assigned identifier, such as - // `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and - // can include only letters, digits, underscores, hyphens, and periods. - string name = 1; + option (google.api.resource) = { + type: "logging.googleapis.com/LogExclusion" + pattern: "projects/{project}/exclusions/{exclusion}" + pattern: "organizations/{organization}/exclusions/{exclusion}" + pattern: "folders/{folder}/exclusions/{exclusion}" + pattern: "billingAccounts/{billing_account}/exclusions/{exclusion}" + }; + + // Required. A client-assigned identifier, such as `"load-balancer-exclusion"`. + // Identifiers are limited to 100 characters and can include only letters, + // digits, underscores, hyphens, and periods. First character has to be + // alphanumeric. + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A description of this exclusion. - string description = 2; + string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. - // An [advanced logs filter](/logging/docs/view/advanced_filters) + // Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries) // that matches the log entries to be excluded. By using the - // [sample function](/logging/docs/view/advanced_filters#sample), + // [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), // you can exclude less than 100% of the matching log entries. - // For example, the following filter matches 99% of low-severity log - // entries from load balancers: + // For example, the following query matches 99% of low-severity log + // entries from Google Cloud Storage buckets: // - // `"resource.type=http_load_balancer severity=ERROR" // // The maximum length of the filter is 20000 characters. - string filter = 3; + string filter = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. The metric descriptor associated with the logs-based metric. // If unspecified, it uses a default metric descriptor with a DELTA metric @@ -139,7 +159,7 @@ message LogMetric { // be updated once initially configured. New labels can be added in the // `metric_descriptor`, but existing labels cannot be modified except for // their description. - google.api.MetricDescriptor metric_descriptor = 5; + google.api.MetricDescriptor metric_descriptor = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. A `value_extractor` is required when using a distribution // logs-based metric to extract the values to record from a log entry. @@ -160,7 +180,7 @@ message LogMetric { // distribution. // // Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - string value_extractor = 6; + string value_extractor = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. A map from a label key string to an extractor expression which is // used to extract data from a log entry field and assign as the label value. @@ -176,12 +196,22 @@ message LogMetric { // // Note that there are upper bounds on the maximum number of labels and the // number of active time series that are allowed in a project. - map label_extractors = 7; + map label_extractors = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The `bucket_options` are required when the logs-based metric is // using a DISTRIBUTION value type and it describes the bucket boundaries // used to create a histogram of the extracted values. - google.api.Distribution.BucketOptions bucket_options = 8; + google.api.Distribution.BucketOptions bucket_options = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The creation timestamp of the metric. + // + // This field may not be present for older metrics. + google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of the metric. + // + // This field may not be present for older metrics. + google.protobuf.Timestamp update_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Deprecated. The API version that created or updated this metric. // The v2 format is used by default and cannot be changed. @@ -193,18 +223,23 @@ message ListLogMetricsRequest { // Required. The name of the project containing the metrics: // // "projects/[PROJECT_ID]" - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Optional. If present, then retrieve the next batch of results from the - // preceding call to this method. `pageToken` must be the value of - // `nextPageToken` from the previous response. The values of other method + // preceding call to this method. `pageToken` must be the value of + // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. - // Non-positive values are ignored. The presence of `nextPageToken` in the + // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListLogMetrics. @@ -213,52 +248,72 @@ message ListLogMetricsResponse { repeated LogMetric metrics = 1; // If there might be more results than appear in this response, then - // `nextPageToken` is included. To get the next set of results, call this + // `nextPageToken` is included. To get the next set of results, call this // method again using the value of `nextPageToken` as `pageToken`. string next_page_token = 2; } // The parameters to GetLogMetric. message GetLogMetricRequest { - // The resource name of the desired metric: + // Required. The resource name of the desired metric: // // "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - string metric_name = 1; + string metric_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogMetric" + } + ]; } // The parameters to CreateLogMetric. message CreateLogMetricRequest { - // The resource name of the project in which to create the metric: + // Required. The resource name of the project in which to create the metric: // // "projects/[PROJECT_ID]" // // The new metric must be provided in the request. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/LogMetric" + } + ]; - // The new logs-based metric, which must not have an identifier that + // Required. The new logs-based metric, which must not have an identifier that // already exists. - LogMetric metric = 2; + LogMetric metric = 2 [(google.api.field_behavior) = REQUIRED]; } // The parameters to UpdateLogMetric. message UpdateLogMetricRequest { - // The resource name of the metric to update: + // Required. The resource name of the metric to update: // // "projects/[PROJECT_ID]/metrics/[METRIC_ID]" // // The updated metric must be provided in the request and it's // `name` field must be the same as `[METRIC_ID]` If the metric // does not exist in `[PROJECT_ID]`, then a new metric is created. - string metric_name = 1; + string metric_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogMetric" + } + ]; - // The updated metric. - LogMetric metric = 2; + // Required. The updated metric. + LogMetric metric = 2 [(google.api.field_behavior) = REQUIRED]; } // The parameters to DeleteLogMetric. message DeleteLogMetricRequest { - // The resource name of the metric to delete: + // Required. The resource name of the metric to delete: // // "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - string metric_name = 1; + string metric_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogMetric" + } + ]; } diff --git a/google/longrunning/BUILD.bazel b/google/longrunning/BUILD.bazel index c9d7ff4ed..2ae3ccff0 100644 --- a/google/longrunning/BUILD.bazel +++ b/google/longrunning/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -11,6 +13,7 @@ proto_library( srcs = ["operations.proto"], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", "//google/rpc:status_proto", "@com_google_protobuf//:any_proto", "@com_google_protobuf//:descriptor_proto", @@ -27,7 +30,7 @@ proto_library_with_info( ############################################################################## # Java ############################################################################## -load("@com_google_googleapis_imports//:imports.bzl", "java_proto_library", "java_grpc_library") +load("@com_google_googleapis_imports//:imports.bzl", "java_grpc_library", "java_proto_library") java_proto_library( name = "longrunning_java_proto", @@ -45,10 +48,10 @@ java_grpc_library( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -65,9 +68,9 @@ go_proto_library( go_gapic_library( name = "longrunning_go_gapic", - src = ":longrunning_proto_with_info", - gapic_yaml = "longrunning_gapic.yaml", - importpath = "cloud.google.com/go/longrunning/autogen", + srcs = [":longrunning_proto_with_info"], + grpc_service_config = "longrunning_grpc_service_config.json", + importpath = "cloud.google.com/go/longrunning/autogen;longrunning", service_yaml = "//google/longrunning:longrunning.yaml", deps = [":longrunning_go_proto"], ) @@ -79,12 +82,11 @@ go_test( importpath = "cloud.google.com/go/longrunning/autogen", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-longrunning-go", deps = [ ":longrunning_go_gapic", - ":longrunning_go_gapic_srcjar-smoke-test.srcjar", ":longrunning_go_gapic_srcjar-test.srcjar", ":longrunning_go_proto", ], @@ -107,6 +109,6 @@ cc_proto_library( cc_grpc_library( name = "longrunning_cc_grpc", srcs = [":operations_proto"], - deps = [":longrunning_cc_proto"], grpc_only = True, + deps = [":longrunning_cc_proto"], ) diff --git a/google/longrunning/artman_longrunning.yaml b/google/longrunning/artman_longrunning.yaml index ddda18b02..1b93f4510 100644 --- a/google/longrunning/artman_longrunning.yaml +++ b/google/longrunning/artman_longrunning.yaml @@ -8,6 +8,7 @@ common: - . proto_deps: - name: google-common-protos + proto_package: google.longrunning artifacts: - name: java_gapic type: GAPIC_ONLY diff --git a/google/longrunning/longrunning.yaml b/google/longrunning/longrunning.yaml index ff8fccf06..ffb6bf3b0 100644 --- a/google/longrunning/longrunning.yaml +++ b/google/longrunning/longrunning.yaml @@ -4,10 +4,10 @@ name: longrunning.googleapis.com title: Long Running Operations API apis: - - name: google.longrunning.Operations +- name: google.longrunning.Operations types: - - name: google.longrunning.OperationInfo +- name: google.longrunning.OperationInfo documentation: overview: |- @@ -20,11 +20,11 @@ documentation: ## What are Long Running Operations? A Long Running Operation (LRO) is a way of representing an action that may - take a significant amount of time to complete. For example, an API call that - starts exporting a large amount of data could take quite a while to complete - and is therefore best represented as an LRO. A common rule of thumb is to - think of LROs as "API promises" that represent the result of some on-going - action. + take a significant amount of time to complete. For example, an API call + that starts exporting a large amount of data could take quite a while to + complete and is therefore best represented as an LRO. A common rule of + thumb is to think of LROs as "API promises" that represent the result of + some on-going action. ## Using LROs @@ -32,31 +32,33 @@ documentation: should return a long running operation instead of a direct response. This means that even if there are situations where the response could be immediate, the API should still return an LRO -- it just may be already - marked as completed. For example, if a data export operation is called on an - empty resource, the operation itself may be possible to execute immediately, - and would result in an already completed LRO. + marked as completed. + For example, if a data export operation is called on an empty resource, + the operation itself may be possible to execute immediately, and would + result in an already completed LRO. - Additionally, the operation should be managed using the LRO interface, which - allows clients to poll the operation for status updates or cancel it + Additionally, the operation should be managed using the LRO interface, + which allows clients to poll the operation for status updates or cancel it entirely. Finally, an LRO represents an action and as a result, the operation is not created directly. Instead, the operation comes into existence as a side-effect of the action it represents. For example, an RPC called - `ExportData` would create and return an LRO. This means that there should - never be an RPC called `CreateOperation`. + `ExportData` would + create and return an LRO. This means that there should never be an RPC + called `CreateOperation`. This also means that any permissions on the operation would be based on action it represents. Any immediate side effects of starting the operation - must be visible in the service as soon as the LRO is returned. For example, - if an LRO is returned when creating a resource, that resource should be - visible in the API immediately, but be in a non-final state until the LRO is - completed. + must be visible in the service as soon as the LRO is returned. For + example, if an LRO is returned when creating a resource, that resource + should be visible in the API immediately, but be in a non-final state + until the LRO is completed. ## LROs versus Jobs - A job is a common design pattern often used in data processing that tends to - be used to represent some contained piece of work that would be stored, + A job is a common design pattern often used in data processing that tends + to be used to represent some contained piece of work that would be stored, re-run, and modified over time. Jobs also typically interact with multiple resources and are created, deleted, and updated directly as independent resources. @@ -67,6 +69,6 @@ documentation: In general, if an action may take a while but it represents a single piece of work, it's best to represent the response as an LRO. If the action is - something more complex (for example, it involves lots of resources and can't - be created as a byproduct of a single action), it may make more sense to - represent it as a job. + something more complex (for example, it involves lots of resources and + can't be created as a byproduct of a single action), it may make more + sense to represent it as a job. diff --git a/google/longrunning/longrunning_gapic.legacy.yaml b/google/longrunning/longrunning_gapic.legacy.yaml new file mode 100644 index 000000000..acd110f63 --- /dev/null +++ b/google/longrunning/longrunning_gapic.legacy.yaml @@ -0,0 +1,100 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.longrunning + python: + package_name: google.longrunning.gapic + go: + package_name: cloud.google.com/go/longrunning/autogen + domain_layer_location: cloud.google.com/go/longrunning + csharp: + package_name: Google.LongRunning + ruby: + package_name: Google::Longrunning + php: + package_name: Google\ApiCore\LongRunning + nodejs: + package_name: longrunning +interfaces: +- name: google.longrunning.Operations + required_constructor_params: + - service_address + - scopes + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 90000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 90000 + total_timeout_millis: 600000 + methods: + - name: GetOperation + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: ListOperations + flattening: + groups: + - parameters: + - name + - filter + required_fields: + - name + - filter + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: operations + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: CancelOperation + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: DeleteOperation + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: WaitOperation + surface_treatments: + - include_languages: + - go + - java + - csharp + - ruby + - nodejs + - python + - php + visibility: DISABLED diff --git a/google/longrunning/longrunning_gapic.yaml b/google/longrunning/longrunning_gapic.yaml index acd110f63..ce7fbf4aa 100644 --- a/google/longrunning/longrunning_gapic.yaml +++ b/google/longrunning/longrunning_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.longrunning @@ -21,13 +21,6 @@ interfaces: required_constructor_params: - service_address - scopes - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -39,54 +32,15 @@ interfaces: total_timeout_millis: 600000 methods: - name: GetOperation - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - name: ListOperations - flattening: - groups: - - parameters: - - name - - filter - required_fields: - - name - - filter - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: operations - retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - name: CancelOperation - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - name: DeleteOperation - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent retry_params_name: default - timeout_millis: 60000 - name: WaitOperation surface_treatments: - include_languages: diff --git a/google/longrunning/longrunning_grpc_service_config.json b/google/longrunning/longrunning_grpc_service_config.json new file mode 100644 index 000000000..a5a9ae95d --- /dev/null +++ b/google/longrunning/longrunning_grpc_service_config.json @@ -0,0 +1,34 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.longrunning.Operations", + "method": "GetOperation" + }, + { + "service": "google.longrunning.Operations", + "method": "ListOperations" + }, + { + "service": "google.longrunning.Operations", + "method": "CancelOperation" + }, + { + "service": "google.longrunning.Operations", + "method": "DeleteOperation" + } + ], + "timeout": "10s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.5s", + "maxBackoff": "10s", + "backoffMultiplier": 2.0, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/longrunning/operations.proto b/google/longrunning/operations.proto index 90778e03e..299eefb2e 100644 --- a/google/longrunning/operations.proto +++ b/google/longrunning/operations.proto @@ -11,13 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.longrunning; import "google/api/annotations.proto"; +import "google/api/client.proto"; import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; @@ -52,6 +52,8 @@ extend google.protobuf.MethodOptions { // returns long-running operations should implement the `Operations` interface // so developers can have a consistent client experience. service Operations { + option (google.api.default_host) = "longrunning.googleapis.com"; + // Lists operations that match the specified filter in the request. If the // server doesn't support this method, it returns `UNIMPLEMENTED`. // @@ -66,6 +68,7 @@ service Operations { option (google.api.http) = { get: "/v1/{name=operations}" }; + option (google.api.method_signature) = "name,filter"; } // Gets the latest state of a long-running operation. Clients can use this @@ -75,6 +78,7 @@ service Operations { option (google.api.http) = { get: "/v1/{name=operations/**}" }; + option (google.api.method_signature) = "name"; } // Deletes a long-running operation. This method indicates that the client is @@ -85,6 +89,7 @@ service Operations { option (google.api.http) = { delete: "/v1/{name=operations/**}" }; + option (google.api.method_signature) = "name"; } // Starts asynchronous cancellation on a long-running operation. The server @@ -102,6 +107,7 @@ service Operations { post: "/v1/{name=operations/**}:cancel" body: "*" }; + option (google.api.method_signature) = "name"; } // Waits for the specified long-running operation until it is done or reaches @@ -122,7 +128,7 @@ service Operations { message Operation { // The server-assigned name, which is only unique within the same service that // originally returns it. If you use the default HTTP mapping, the - // `name` should have the format of `operations/some/unique/name`. + // `name` should be a resource name ending with `operations/{unique_id}`. string name = 1; // Service-specific metadata associated with the operation. It typically diff --git a/google/maps/BUILD.bazel b/google/maps/BUILD.bazel new file mode 100644 index 000000000..d796eca1d --- /dev/null +++ b/google/maps/BUILD.bazel @@ -0,0 +1,11 @@ +package(default_visibility = ["//google/maps:__subpackages__"]) + +sh_binary( + name = "postprocessing_java", + srcs = ["postprocessing_java.sh"], +) + +sh_binary( + name = "postprocessing_py", + srcs = ["postprocessing_py.sh"], +) diff --git a/google/maps/playablelocations/v3/playablelocations.proto b/google/maps/playablelocations/v3/playablelocations.proto new file mode 100644 index 000000000..1f3328edd --- /dev/null +++ b/google/maps/playablelocations/v3/playablelocations.proto @@ -0,0 +1,178 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.playablelocations.v3; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/maps/playablelocations/v3/resources.proto"; +import "google/maps/playablelocations/v3/sample/resources.proto"; +import "google/maps/unity/clientinfo.proto"; +import "google/protobuf/duration.proto"; +import "google/api/client.proto"; + +option csharp_namespace = "Google.Maps.PlayableLocations.V3"; +option go_package = "google.golang.org/genproto/googleapis/maps/playablelocations/v3;playablelocations"; +option java_multiple_files = true; +option java_outer_classname = "PlayableLocationsProto"; +option java_package = "com.google.maps.playablelocations.v3"; +option objc_class_prefix = "GMPL"; + +// The Playable Locations API for v3. +service PlayableLocations { + option (google.api.default_host) = "playablelocations.googleapis.com"; + + // Returns a set of playable locations that lie within a specified area, + // that satisfy optional filter criteria. + // + // Note: Identical `SamplePlayableLocations` requests can return different + // results as the state of the world changes over time. + rpc SamplePlayableLocations(SamplePlayableLocationsRequest) returns (SamplePlayableLocationsResponse) { + option (google.api.http) = { + post: "/v3:samplePlayableLocations" + body: "*" + }; + } + + // Logs bad playable location reports submitted by players. + // + // Reports are not partially saved; either all reports are saved and this + // request succeeds, or no reports are saved, and this request fails. + rpc LogPlayerReports(LogPlayerReportsRequest) returns (LogPlayerReportsResponse) { + option (google.api.http) = { + post: "/v3:logPlayerReports" + body: "*" + }; + } + + // Logs new events when playable locations are displayed, and when they are + // interacted with. + // + // Impressions are not partially saved; either all impressions are saved and + // this request succeeds, or no impressions are saved, and this request fails. + rpc LogImpressions(LogImpressionsRequest) returns (LogImpressionsResponse) { + option (google.api.http) = { + post: "/v3:logImpressions" + body: "*" + }; + } +} + +// +// Life of a query: +// +// - When a game starts in a new location, your game server issues a +// [SamplePlayableLocations][google.maps.playablelocations.v3.PlayableLocations.SamplePlayableLocations] +// request. The request specifies the S2 cell, and contains one or more +// "criteria" for filtering: +// +// - Criterion 0: i locations for long-lived bases, or level 0 monsters, or... +// - Criterion 1: j locations for short-lived bases, or level 1 monsters, ... +// - Criterion 2: k locations for random objects. +// - etc (up to 5 criterion may be specified). +// +// `PlayableLocationList` will then contain mutually +// exclusive lists of `PlayableLocation` objects that satisfy each of +// the criteria. Think of it as a collection of real-world locations that you +// can then associate with your game state. +// +// Note: These points are impermanent in nature. E.g, parks can close, and +// places can be removed. +// +// The response specifies how long you can expect the playable locations to +// last. Once they expire, you should query the `samplePlayableLocations` API +// again to get a fresh view of the real world. +message SamplePlayableLocationsRequest { + // Required. Specifies the area to search within for playable locations. + google.maps.playablelocations.v3.sample.AreaFilter area_filter = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Specifies one or more (up to 5) criteria for filtering the + // returned playable locations. + repeated google.maps.playablelocations.v3.sample.Criterion criteria = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// +// Response for the +// [SamplePlayableLocations][google.maps.playablelocations.v3.PlayableLocations.SamplePlayableLocations] +// method. +message SamplePlayableLocationsResponse { + // Each PlayableLocation object corresponds to a game_object_type specified + // in the request. + map locations_per_game_object_type = 1; + + // Required. Specifies the "time-to-live" for the set of playable locations. You can use + // this value to determine how long to cache the set of playable locations. + // After this length of time, your back-end game server should issue a new + // [SamplePlayableLocations][google.maps.playablelocations.v3.PlayableLocations.SamplePlayableLocations] + // request to get a fresh set of playable locations (because for example, they + // might have been removed, a park might have closed for the day, a + // business might have closed permanently). + google.protobuf.Duration ttl = 9; +} + +// A request for logging your player's bad location reports. +message LogPlayerReportsRequest { + // Required. Player reports. The maximum number of player reports that you can log at + // once is 50. + repeated PlayerReport player_reports = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A string that uniquely identifies the log player reports request. This + // allows you to detect duplicate requests. We recommend that you use UUIDs + // for this value. The value must not exceed 50 characters. + // + // You should reuse the `request_id` only when retrying a request in the case + // of a failure. In that case, the request must be identical to the one that + // failed. + string request_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Information about the client device (for example, device model and + // operating system). + google.maps.unity.ClientInfo client_info = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A response for the [LogPlayerReports][google.maps.playablelocations.v3.PlayableLocations.LogPlayerReports] +// method. +// +// This method returns no data upon success. +message LogPlayerReportsResponse { + +} + +// A request for logging impressions. +message LogImpressionsRequest { + // Required. Impression event details. The maximum number of impression reports that you + // can log at once is 50. + repeated Impression impressions = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A string that uniquely identifies the log impressions request. This allows + // you to detect duplicate requests. We recommend that you use UUIDs for this + // value. The value must not exceed 50 characters. + // + // You should reuse the `request_id` only when retrying a request in case of + // failure. In this case, the request must be identical to the one that + // failed. + string request_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Information about the client device. For example, device model and + // operating system. + google.maps.unity.ClientInfo client_info = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A response for the [LogImpressions][google.maps.playablelocations.v3.PlayableLocations.LogImpressions] method. +// This method returns no data upon success. +message LogImpressionsResponse { + +} diff --git a/google/maps/playablelocations/v3/playablelocations_grpc_service_config.json b/google/maps/playablelocations/v3/playablelocations_grpc_service_config.json new file mode 100644 index 000000000..60c475959 --- /dev/null +++ b/google/maps/playablelocations/v3/playablelocations_grpc_service_config.json @@ -0,0 +1,14 @@ +{ + "methodConfig": [{ + "name": [{ "service": "google.maps.roads.v3.PlayableLocations" }], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE", "UNKNOWN"] + } + } + ] +} diff --git a/google/maps/playablelocations/v3/playablelocations_v3.yaml b/google/maps/playablelocations/v3/playablelocations_v3.yaml new file mode 100644 index 000000000..e2df611bd --- /dev/null +++ b/google/maps/playablelocations/v3/playablelocations_v3.yaml @@ -0,0 +1,12 @@ +type: google.api.Service +config_version: 3 +name: playablelocations.googleapis.com +title: Playable Locations API + +apis: +- name: google.maps.playablelocations.v3.PlayableLocations + +backend: + rules: + - selector: 'google.maps.playablelocations.v3.PlayableLocations.*' + deadline: 60.0 diff --git a/google/maps/playablelocations/v3/resources.proto b/google/maps/playablelocations/v3/resources.proto new file mode 100644 index 000000000..5fe0a4151 --- /dev/null +++ b/google/maps/playablelocations/v3/resources.proto @@ -0,0 +1,106 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.playablelocations.v3; + +import "google/api/field_behavior.proto"; +import "google/protobuf/field_mask.proto"; +import "google/type/latlng.proto"; + +option csharp_namespace = "Google.Maps.PlayableLocations.V3"; +option go_package = "google.golang.org/genproto/googleapis/maps/playablelocations/v3;playablelocations"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.maps.playablelocations.v3"; +option objc_class_prefix = "GMPL"; + +// A report submitted by a player about a playable location that is considered +// inappropriate for use in the game. +message PlayerReport { + // The reason why the playable location is considered bad. + enum BadLocationReason { + // Unspecified reason. Do not use. + BAD_LOCATION_REASON_UNSPECIFIED = 0; + + // The reason isn't one of the reasons in this enumeration. + OTHER = 1; + + // The playable location isn't accessible to pedestrians. For example, if + // it's in the middle of a highway. + NOT_PEDESTRIAN_ACCESSIBLE = 2; + + // The playable location isn't open to the public. For example, a private + // office building. + NOT_OPEN_TO_PUBLIC = 4; + + // The playable location is permanently closed. For example, when a business + // has been shut down. + PERMANENTLY_CLOSED = 5; + + // The playable location is temporarily inaccessible. For example, when a + // business has closed for renovations. + TEMPORARILY_INACCESSIBLE = 6; + } + + // Required. The name of the playable location. + string location_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. One or more reasons why this playable location is considered bad. + repeated BadLocationReason reasons = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A free-form description detailing why the playable location is + // considered bad. + string reason_details = 3 [(google.api.field_behavior) = REQUIRED]; + + // Language code (in BCP-47 format) indicating the language of the freeform + // description provided in `reason_details`. Examples are "en", "en-US" or + // "ja-Latn". For more information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 4; +} + +// Encapsulates impression event details. +message Impression { + // The type of impression event. + enum ImpressionType { + // Unspecified type. Do not use. + IMPRESSION_TYPE_UNSPECIFIED = 0; + + // The playable location was presented to a player. + PRESENTED = 1; + + // A player interacted with the playable location. + INTERACTED = 2; + } + + // Required. The name of the playable location. + string location_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of impression event. + ImpressionType impression_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // An arbitrary, developer-defined type identifier for each type of game + // object used in your game. + // + // Since players interact with differ types of game objects in different ways, + // this field allows you to segregate impression data by type for analysis. + // + // You should assign a unique `game_object_type` ID to represent a distinct + // type of game object in your game. + // + // For example, 1=monster location, 2=powerup location. + int32 game_object_type = 4; +} diff --git a/google/maps/playablelocations/v3/sample/resources.proto b/google/maps/playablelocations/v3/sample/resources.proto new file mode 100644 index 000000000..6a8f8b2c6 --- /dev/null +++ b/google/maps/playablelocations/v3/sample/resources.proto @@ -0,0 +1,206 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.playablelocations.v3.sample; + +import "google/api/field_behavior.proto"; +import "google/protobuf/field_mask.proto"; +import "google/type/latlng.proto"; + +option csharp_namespace = "Google.Maps.PlayableLocations.V3.Sample"; +option go_package = "google.golang.org/genproto/googleapis/maps/playablelocations/v3/sample;sample"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.maps.playablelocations.v3.sample"; +option objc_class_prefix = "GMPL"; + +// A geographical point suitable for placing game objects in location-based +// games. +message PlayableLocation { + // Required. The name of this playable location. + string name = 1; + + // Required. + // Each location has one of the following identifiers: + oneof location_id { + // A [place ID] (https://developers.google.com/places/place-id) + string place_id = 2; + + // A [plus code] (http://openlocationcode.com) + string plus_code = 3; + } + + // A collection of [Playable Location Types](/maps/tt/games/types) for this + // playable location. The first type in the collection is the primary type. + // + // Type information might not be available for all playable locations. + repeated string types = 4; + + // Required. The latitude and longitude associated with the center of the playable + // location. + // + // By default, the set of playable locations returned from + // [SamplePlayableLocations][google.maps.playablelocations.v3.PlayableLocations.SamplePlayableLocations] use + // center-point coordinates. + google.type.LatLng center_point = 5; + + // The playable location's coordinates, snapped to the sidewalk of the + // nearest road, if a nearby road exists. + google.type.LatLng snapped_point = 6; +} + +// A set of options that specifies the separation between playable locations. +message SpacingOptions { + // Specifies whether the playable location's geographic coordinates (latitude + // and longitude) correspond to its center-point, or to its location snapped + // to the sidewalk of the nearest road. + enum PointType { + // Unspecified point type. Do not use this value. + POINT_TYPE_UNSPECIFIED = 0; + + // The geographic coordinates correspond to the center of the location. + CENTER_POINT = 1; + + // The geographic coordinates correspond to the location snapped to the + // sidewalk of the nearest road (when a nearby road exists). + SNAPPED_POINT = 2; + } + + // Required. The minimum spacing between any two playable locations, measured in meters. + // The minimum value is 200. + // The maximum value is 1000. + // + // Inputs will be rounded up to the next 10 meter interval. + // + // The default value is 200m. + // + // Set this field to remove tight clusters of playable locations. + // + // Note: + // + // The spacing is a greedy algorithm. It optimizes for selecting the highest + // ranking locations first, not to maximize the number of locations selected. + // Consider the following scenario: + // + // * Rank: A: 2, B: 1, C: 3. + // * Distance: A--200m--B--200m--C + // + // If spacing=250, it will pick the highest ranked location [B], not [A, C]. + // + // + // Note: + // + // Spacing works within the game object type itself, as well as the previous + // ones. + // Suppose three game object types, each with the following spacing: + // + // * X: 400m, Y: undefined, Z: 200m. + // + // 1. Add locations for X, within 400m of each other. + // 2. Add locations for Y, without any spacing. + // 3. Finally, add locations for Z within 200m of each other as well X and Y. + // + // The distance diagram between those locations end up as: + // + // * From->To. + // * X->X: 400m + // * Y->X, Y->Y: unspecified. + // * Z->X, Z->Y, Z->Z: 200m. + double min_spacing_meters = 1 [(google.api.field_behavior) = REQUIRED]; + + // Specifies whether the minimum spacing constraint applies to the + // center-point or to the snapped point of playable locations. The default + // value is `CENTER_POINT`. + // + // If a snapped point is not available for a playable location, its + // center-point is used instead. + // + // Set this to the point type used in your game. + PointType point_type = 2; +} + +// Specifies the filters to use when searching for playable locations. +message Filter { + // Specifies the maximum number of playable locations to return. This value + // must not be greater than 500. The default value is 100. + // + // Only the top-ranking playable locations are returned. + int32 max_location_count = 1; + + // A set of options that control the spacing between playable locations. By + // default the minimum distance between locations is 200m. + SpacingOptions spacing = 2; + + // Restricts the set of playable locations to just the + // [types](/maps/tt/games/types) that you want. + repeated string included_types = 3; +} + +// Encapsulates a filter criterion for searching for a set of playable +// locations. +message Criterion { + // Required. An arbitrary, developer-defined identifier of the type of game object that + // the playable location is used for. This field allows you to specify + // criteria per game object type when searching for playable locations. + // + // You should assign a unique `game_object_type` ID across all + // `request_criteria` to represent a distinct type of game object. For + // example, 1=monster location, 2=powerup location. + // + // The response contains a map. + int32 game_object_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Specifies filtering options, and specifies what will be included in the + // result set. + Filter filter = 2; + + // Specifies which `PlayableLocation` fields are returned. + // + // `name` (which is used for logging impressions), `center_point` and + // `place_id` (or `plus_code`) are always returned. + // + // The following fields are omitted unless you specify them here: + // + // * snapped_point + // * types + // + // Note: The more fields you include, the more expensive in terms of data and + // associated latency your query will be. + google.protobuf.FieldMask fields_to_return = 3; +} + +// Specifies the area to search for playable locations. +message AreaFilter { + // Required. The S2 cell ID of the area you want. This must be between cell level 11 and + // 14 (inclusive). + // + // S2 cells are 64-bit integers that identify areas on the Earth. They are + // hierarchical, and can therefore be used for spatial indexing. + // + // The S2 geometry library is available in a number of languages: + // + // * [C++](https://github.com/google/s2geometry) + // * [Java](https://github.com/google/s2-geometry-library-java) + // * [Go](https://github.com/golang/geo) + // * [Python](https://github.com/google/s2geometry/tree/master/src/python) + fixed64 s2_cell_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// A list of PlayableLocation objects that satisfies a single Criterion. +message PlayableLocationList { + // A list of playable locations for this game object type. + repeated PlayableLocation locations = 1; +} diff --git a/google/maps/postprocessing.bzl b/google/maps/postprocessing.bzl new file mode 100644 index 000000000..b2a1b7f7c --- /dev/null +++ b/google/maps/postprocessing.bzl @@ -0,0 +1,58 @@ +""" +Defines the postprocessing build rule for the Google Maps APIs. +""" + +def maps_assembly_pkg(name, srcs, language, visibility = None): + """Target to build a post-processed ads-specific GAPIC assembly package. + + Explodes a GAPIC assembly package, runs language-specific post-processing, and repackages. + + This macro assumes srcs contains in a single input, namely a {{language}}_assembly_pkg target + produced by a gapic-generator build target. + + There must be a corresponding postprocessing_{language}.sh script to invoke. + + Args: + name: defines the name of the main target + srcs: collection containing exactly 1 build target, namely a + {{language}}_assembly_pkg target produced by gapic-generator + language: the programming language to post-process + (e.g., "java", "csharp", "php", etc.); there must be a matching + post-processin script of the form `postprocessing_{language}.sh + in this package + visibility (optional): marco visibility setting; + (see https://docs.bazel.build/versions/master/skylark/macros.html) + """ + cmd = """ + set -eu + + tar xzf $(SRCS); + $(location //google/maps:postprocessing_%s) %s; + tar czf $@ %s + """ + dir_name = _extract_path(srcs) + + native.genrule( + name = name, + srcs = srcs, + outs = ["%s.tar.gz" % name], + cmd = cmd % (language, dir_name, dir_name), + tools = ["//google/maps:postprocessing_%s" % language], + visibility = visibility, + ) + +def _extract_path(srcs): + """Takes the first label in srcs and returns its target name. + + Args: + srcs: a collection of build labels of the form "//package/name:target" + + Returns: + The first element's target (i.e.- the part after the ":"), else None if empty. + """ + + for s in srcs: + toks = s.split(":") + if len(toks) == 2: + return toks[1] + return None diff --git a/google/maps/postprocessing_java.sh b/google/maps/postprocessing_java.sh new file mode 100755 index 000000000..eb0ccccea --- /dev/null +++ b/google/maps/postprocessing_java.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +set -eu + +# Performs Maps-specific post-processing on a .tar.gz archive produced by rule +# java_gapic_assembly_gradle_pkg + +# Add gradle publish plugin +# +# Arguments: +# postprocess_dir: The directory that contains the Java files to postprocess. +add_gradle_publish() { + postprocess_dir="${1}" + cat >> "${postprocess_dir}/build.gradle" < "${f}.new" && mv "${f}.new" "${f}" + sed -e "s/= 'com\.google\.api\.grpc'/= 'com\.google\.maps'/g" "${f}" > "${f}.new" && mv "${f}.new" "${f}" +done +} + +# Main entry point +# +# Arguments: +# postprocess_dir: The directory that contains the Java files to postprocess. +main() { + postprocess_dir="$1" + + if [ "${postprocess_dir}" = "" ]; then + echo "postprocess_dir is required" + exit 1 + fi + + add_gradle_publish "${postprocess_dir}" + change_group "${postprocess_dir}" +} + +main "$@" diff --git a/google/maps/postprocessing_py.sh b/google/maps/postprocessing_py.sh new file mode 100755 index 000000000..ad903bc18 --- /dev/null +++ b/google/maps/postprocessing_py.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +set -eu + +# Performs Maps specific post-processing on a .tar.gz archive + +use_map_namespace() { + f="${1}/setup.py" + sed -e "s/google.cloud/google.maps/g" "${f}" > "${f}.new" && mv "${f}.new" "${f}" +} + +use_markdown_readme() { + f="${1}/setup.py" + sed -e "s/README.rst/README.md/g" "${f}" > "${f}.new" && mv "${f}.new" "${f}" + rm -f "${1}/README.rst" +} + +update_python_versions() { + f="${1}/setup.py" + sed -e "/Python :: 2/d" "${f}" > "${f}.new" && mv "${f}.new" "${f}" + sed -e "/Python :: 3.4/d" "${f}" > "${f}.new" && mv "${f}.new" "${f}" + sed -e "/enum34/d" "${f}" > "${f}.new" && mv "${f}.new" "${f}" + sed -e "s/'Programming Language :: Python :: 3.6',/'Programming Language :: Python :: 3.6',\n 'Programming Language :: Python :: 3.7',/g" "${f}" > "${f}.new" && mv "${f}.new" "${f}" +} + +# Main entry point +# +# Arguments: +# postprocess_dir: The directory that contains the Java files to postprocess. +main() { + postprocess_dir="$1" + + if [ "${postprocess_dir}" = "" ]; then + echo "postprocess_dir is required" + exit 1 + fi + + use_markdown_readme "${postprocess_dir}" + update_python_versions "${postprocess_dir}" + use_map_namespace "${postprocess_dir}" +} + +main "$@" diff --git a/google/maps/postprocessing_python.sh b/google/maps/postprocessing_python.sh new file mode 100755 index 000000000..91c9b8e70 --- /dev/null +++ b/google/maps/postprocessing_python.sh @@ -0,0 +1,50 @@ +#!/bin/bash +#!/bin/bash + +set -eu + +# Performs Maps-specific post-processing on a .tar.gz archive produced by rule +# java_gapic_assembly_gradle_pkg + +# Add gradle publish plugin +# +# Arguments: +# postprocess_dir: The directory that contains the Java files to postprocess. +add_gradle_publish() { + postprocess_dir="${1}" + cat >> "${postprocess_dir}/build.gradle" < "${f}.new" && mv "${f}.new" "${f}" + sed -e "s/= 'com\.google\.api\.grpc'/= 'com\.google\.maps'/g" "${f}" > "${f}.new" && mv "${f}.new" "${f}" +done +} + +# Main entry point +# +# Arguments: +# postprocess_dir: The directory that contains the Java files to postprocess. +main() { + postprocess_dir="$1" + + if [ "${postprocess_dir}" = "" ]; then + echo "postprocess_dir is required" + exit 1 + fi + + add_gradle_publish "${postprocess_dir}" + change_group "${postprocess_dir}" +} + +main "$@" diff --git a/google/maps/roads/v1op/BUILD.bazel b/google/maps/roads/v1op/BUILD.bazel new file mode 100644 index 000000000..c1705d08d --- /dev/null +++ b/google/maps/roads/v1op/BUILD.bazel @@ -0,0 +1,379 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") +load("//google/maps:postprocessing.bzl", "maps_assembly_pkg") + +proto_library( + name = "roads_proto", + srcs = [ + "roads.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:resource_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library_with_info( + name = "roads_proto_with_info", + deps = [ + ":roads_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "roads_java_proto", + deps = [":roads_proto"], +) + +java_grpc_library( + name = "roads_java_grpc", + srcs = [":roads_proto"], + deps = [":roads_java_proto"], +) + +java_gapic_library( + name = "roads_java_gapic", + src = ":roads_proto_with_info", + gapic_yaml = "roads_gapic.yaml", + package = "google.maps.roads.v1op", + service_yaml = "roads_v1op.yaml", + test_deps = [ + ":roads_java_grpc", + ], + deps = [ + ":roads_java_proto", + ], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-maps-roads-v1op-java", + deps = [ + ":roads_java_gapic", + ":roads_java_grpc", + ":roads_java_proto", + ":roads_proto", + ], +) + +maps_assembly_pkg( + name = "google-maps-roads-v1op-java-postprocess", + srcs = [":google-maps-roads-v1op-java"], + language = "java", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "roads_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/maps/roads/v1op", + protos = [":roads_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/type:latlng_go_proto", + ], +) + +go_gapic_library( + name = "roads_go_gapic", + srcs = [":roads_proto_with_info"], + grpc_service_config = "roads_grpc_service_config.json", + importpath = "developers.google.com/maps/go/roads/v1op;roads", + service_yaml = "roads_v1op.yaml", + deps = [ + ":roads_go_proto", + ], +) + +go_test( + name = "roads_go_gapic_test", + srcs = [":roads_go_gapic_srcjar_test"], + embed = [":roads_go_gapic"], + importpath = "developers.google.com/maps/go/roads/v1op", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapic-maps-roads-v1op-go", + deps = [ + ":roads_go_gapic", + ":roads_go_gapic_srcjar-test.srcjar", + ":roads_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +py_proto_library( + name = "roads_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":roads_proto"], +) + +py_grpc_library( + name = "roads_py_grpc", + srcs = [":roads_proto"], + deps = [":roads_py_proto"], +) + +py_gapic_library( + name = "roads_py_gapic", + src = ":roads_proto_with_info", + gapic_yaml = "roads_gapic.yaml", + package = "google.maps.roads.v1op", + service_yaml = "roads_v1op.yaml", + deps = [ + ":roads_py_grpc", + ":roads_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "roads-v1op-py", + deps = [ + ":roads_py_gapic", + ":roads_py_grpc", + ":roads_py_proto", + ], +) + +maps_assembly_pkg( + name = "roads-v1op-py-postprocess", + srcs = [":roads-v1op-py"], + language = "py", +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "roads_php_proto", + deps = [":roads_proto"], +) + +php_grpc_library( + name = "roads_php_grpc", + srcs = [":roads_proto"], + deps = [":roads_php_proto"], +) +# A HttpRule option must be defined +# php_gapic_library( +# name = "roads_php_gapic", +# src = ":roads_proto_with_info", +# gapic_yaml = "roads_gapic.yaml", +# package = "google.maps.roads.v1op", +# service_yaml = "roads_v1op.yaml", +# deps = [ +# ":roads_php_grpc", +# ":roads_php_proto", +# ], +# ) + +# # Open Source Packages +# php_gapic_assembly_pkg( +# name = "google-maps-roads-v1op-php", +# deps = [ +# ":roads_php_gapic", +# ":roads_php_grpc", +# ":roads_php_proto", +# ], +# ) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "roads_nodejs_gapic", + src = ":roads_proto_with_info", + gapic_yaml = "roads_gapic.yaml", + package = "google.maps.roads.v1op", + service_yaml = "roads_v1op.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "roads-v1op-nodejs", + deps = [ + ":roads_nodejs_gapic", + ":roads_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "roads_ruby_proto", + deps = [":roads_proto"], +) + +ruby_grpc_library( + name = "roads_ruby_grpc", + srcs = [":roads_proto"], + deps = [":roads_ruby_proto"], +) + +ruby_gapic_library( + name = "roads_ruby_gapic", + src = ":roads_proto_with_info", + gapic_yaml = "roads_gapic.yaml", + package = "google.maps.roads.v1op", + service_yaml = "roads_v1op.yaml", + deps = [ + ":roads_ruby_grpc", + ":roads_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-maps-roads-v1op-ruby", + deps = [ + ":roads_ruby_gapic", + ":roads_ruby_grpc", + ":roads_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "roads_csharp_proto", + deps = [":roads_proto"], +) + +csharp_grpc_library( + name = "roads_csharp_grpc", + srcs = [":roads_proto"], + deps = [":roads_csharp_proto"], +) + +csharp_gapic_library( + name = "roads_csharp_gapic", + src = ":roads_proto_with_info", + gapic_yaml = "roads_gapic.yaml", + package = "google.maps.roads.v1op", + service_yaml = "roads_v1op.yaml", + deps = [ + ":roads_csharp_grpc", + ":roads_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-maps-roads-v1op-csharp", + deps = [ + ":roads_csharp_gapic", + ":roads_csharp_grpc", + ":roads_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_gapic_library", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "roads_cc_proto", + deps = [":roads_proto"], +) + +cc_grpc_library( + name = "roads_cc_grpc", + srcs = [":roads_proto"], + generate_mocks = True, + grpc_only = True, + deps = [":roads_cc_proto"], +) + +cc_gapic_library( + name = "roads_cc_gapic", + src = ":roads_proto_with_info", + package = "google.maps.roads.v1op", + deps = [ + ":roads_cc_grpc", + ":roads_cc_proto", + ], +) diff --git a/google/maps/roads/v1op/roads.proto b/google/maps/roads/v1op/roads.proto new file mode 100644 index 000000000..fd019e1e4 --- /dev/null +++ b/google/maps/roads/v1op/roads.proto @@ -0,0 +1,115 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.maps.roads.v1op; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/protobuf/wrappers.proto"; +import "google/type/latlng.proto"; + +option go_package = "google.golang.org/genproto/googleapis/maps/roads/v1op;roads"; +option java_multiple_files = true; +option java_outer_classname = "RoadsProto"; +option java_package = "com.google.maps.roads.v1op"; + +service RoadsService { + option (google.api.default_host) = "roads.googleapis.com"; + + // This method takes a sequence of latitude,longitude points and snaps them to + // the most likely road segments. Optionally returns additional points giving + // the full road geometry. Also returns a place ID for each snapped point. + rpc SnapToRoads(SnapToRoadsRequest) returns (SnapToRoadsResponse) {} + + // This method takes a list of latitude,longitude points and snaps them each + // to their nearest road. Also returns a place ID for each snapped point. + rpc ListNearestRoads(ListNearestRoadsRequest) + returns (ListNearestRoadsResponse) {} +} + +// A request to the SnapToRoads method, requesting that a sequence of points be +// snapped to road segments. +message SnapToRoadsRequest { + // The path to be snapped as a series of lat, lng points. Specified as + // a string of the format: lat,lng|lat,lng|... + string path = 1; + + // Whether to interpolate the points to return full road geometry. + bool interpolate = 2; + + // The asset ID of the asset to which this path relates. This is used for + // abuse detection purposes for clients with asset-based SKUs. + string asset_id = 3; + + // The type of travel being tracked. This will constrain the paths we snap to. + TravelMode travel_mode = 4; +} + +// An enum representing the mode of travel used for snapping. +enum TravelMode { + TRAVEL_MODE_UNSPECIFIED = 0; + + DRIVING = 1; + + CYCLING = 2; + + WALKING = 3; +} + +// A snapped point object, representing the result of snapping. +message SnappedPoint { + // The lat,lng of the snapped location. + google.type.LatLng location = 1; + + // The index into the original path of the equivalent pre-snapped point. + // This allows for identification of points which have been interpolated if + // this index is missing. + google.protobuf.UInt32Value original_index = 2; + + // The place ID for this snapped location (road segment). These are the same + // as are currently used by the Places API. + string place_id = 3; +} + +// The response from the SnapToRoads method, returning a sequence of snapped +// points. +message SnapToRoadsResponse { + // A list of snapped points. + repeated SnappedPoint snapped_points = 1; + + // User-visible warning message, if any, which can be shown alongside a valid + // result. + string warning_message = 2; +} + +// A request to the ListNearestRoads method, requesting that a sequence of +// points be snapped individually to the road segment that each is closest to. +message ListNearestRoadsRequest { + // The points to be snapped as a series of lat, lng points. Specified as + // a string of the format: lat,lng|lat,lng|... + string points = 1; + + // The type of travel being tracked. This will constrain the roads we snap to. + TravelMode travel_mode = 2; +} + +// The response from the ListNearestRoads method, returning a list of snapped +// points. +message ListNearestRoadsResponse { + // A list of snapped points. + repeated SnappedPoint snapped_points = 1; +} diff --git a/google/maps/roads/v1op/roads_gapic.yaml b/google/maps/roads/v1op/roads_gapic.yaml new file mode 100644 index 000000000..d7ff6a249 --- /dev/null +++ b/google/maps/roads/v1op/roads_gapic.yaml @@ -0,0 +1,50 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.maps.roads.v1op + python: + package_name: google.maps.roads.v1op.gapic + go: + package_name: developers.google.com/maps/go/roads/v1op + csharp: + package_name: Google.Maps.Roads.V1 + ruby: + package_name: Google::Maps::Roads::V1 + php: + package_name: Google\Maps\Roads\V1 + nodejs: + package_name: roads.v1op + domain_layer_location: googlemaps # becomes @googlemaps/roads +interfaces: +- name: google.maps.roads.v1op.RoadsService + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: SnapToRoads + required_fields: + - path + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: ListNearestRoads + required_fields: + - points + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/maps/roads/v1op/roads_grpc_service_config.json b/google/maps/roads/v1op/roads_grpc_service_config.json new file mode 100644 index 000000000..7fd7579fc --- /dev/null +++ b/google/maps/roads/v1op/roads_grpc_service_config.json @@ -0,0 +1,14 @@ +{ + "methodConfig": [{ + "name": [{ "service": "google.maps.roads.v1op.RoadsService" }], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE", "UNKNOWN"] + } + } + ] +} diff --git a/google/maps/roads/v1op/roads_v1op.yaml b/google/maps/roads/v1op/roads_v1op.yaml new file mode 100644 index 000000000..abd1ec1e3 --- /dev/null +++ b/google/maps/roads/v1op/roads_v1op.yaml @@ -0,0 +1,12 @@ +type: google.api.Service +config_version: 3 +name: roads.googleapis.com +title: Roads API + +apis: +- name: google.maps.roads.v1op.RoadsService # must stay as v1op + +documentation: + summary: |- + Snap GPS points to roads to identify the roads a vehicle was traveling + along, making up for GPS error. diff --git a/google/maps/routes/v1/BUILD.bazel b/google/maps/routes/v1/BUILD.bazel new file mode 100644 index 000000000..e2fc7c328 --- /dev/null +++ b/google/maps/routes/v1/BUILD.bazel @@ -0,0 +1,226 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") +load("//google/maps:postprocessing.bzl", "maps_assembly_pkg") + +proto_library( + name = "routes_proto", + srcs = [ + "compute_route_matrix_request.proto", + "compute_routes_request.proto", + "compute_routes_response.proto", + "fallback_info.proto", + "polyline.proto", + "route.proto", + "route_matrix_element.proto", + "route_service.proto", + "toll_passes.proto", + "vehicle_emission_type.proto", + "waypoint.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/geo/type:viewport_proto", + "//google/rpc:status_proto", + "//google/type:latlng_proto", + "//google/type:money_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library_with_info( + name = "routes_proto_with_info", + deps = [ + ":routes_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "routes_java_proto", + deps = [":routes_proto"], +) + +java_grpc_library( + name = "routes_java_grpc", + srcs = [":routes_proto"], + deps = [":routes_java_proto"], +) + +java_gapic_assembly_gradle_pkg( + name = "google-maps-routes-v1-java", + deps = [ + "//google/maps/routes/v1:routes_java_grpc", + "//google/maps/routes/v1:routes_java_proto", + "//google/maps/routes/v1:routes_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "routes_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/maps/routes/v1", + protos = [":routes_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/geo/type:viewport_go_proto", + "//google/rpc:status_go_proto", + "//google/type:latlng_go_proto", + "//google/type:money_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "routes_moved_proto", + srcs = [":routes_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/geo/type:viewport_proto", + "//google/rpc:status_proto", + "//google/type:latlng_proto", + "//google/type:money_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "routes_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":routes_moved_proto"], +) + +py_grpc_library( + name = "routes_py_grpc", + srcs = [":routes_moved_proto"], + deps = [":routes_py_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "routes_php_proto", + deps = [":routes_proto"], +) + +php_grpc_library( + name = "routes_php_grpc", + srcs = [":routes_proto"], + deps = [":routes_php_proto"], +) + +############################################################################## +# Node.js +############################################################################## + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "routes_ruby_proto", + deps = [":routes_proto"], +) + +ruby_grpc_library( + name = "routes_ruby_grpc", + srcs = [":routes_proto"], + deps = [":routes_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "routes_csharp_proto", + deps = [":routes_proto"], +) + +csharp_grpc_library( + name = "routes_csharp_grpc", + srcs = [":routes_proto"], + deps = [":routes_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "routes_cc_proto", + deps = [":routes_proto"], +) + +cc_grpc_library( + name = "routes_cc_grpc", + srcs = [":routes_proto"], + generate_mocks = True, + grpc_only = True, + deps = [":routes_cc_proto"], +) diff --git a/google/maps/routes/v1/compute_route_matrix_request.proto b/google/maps/routes/v1/compute_route_matrix_request.proto new file mode 100644 index 000000000..e9a60fe89 --- /dev/null +++ b/google/maps/routes/v1/compute_route_matrix_request.proto @@ -0,0 +1,72 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.routes.v1; + +import "google/api/field_behavior.proto"; +import "google/maps/routes/v1/compute_routes_request.proto"; +import "google/maps/routes/v1/waypoint.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Routes.V1"; +option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes"; +option java_multiple_files = true; +option java_outer_classname = "ComputeRouteMatrixRequestProto"; +option java_package = "com.google.maps.routes.v1"; +option objc_class_prefix = "GMRS"; +option php_namespace = "Google\\Maps\\Routes\\V1"; + +// ComputeRouteMatrix request message +message ComputeRouteMatrixRequest { + // Required. Array of origins, which determines the rows of the response matrix. + repeated RouteMatrixOrigin origins = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Array of destinations, which determines the columns of the response matrix. + repeated RouteMatrixDestination destinations = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Specifies the mode of transportation. + RouteTravelMode travel_mode = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies how to compute the route. The server attempts to use the selected + // routing preference to compute the route. If the routing preference results + // in an error or an extra long latency, an error is returned. In the future, + // we might implement a fallback mechanism to use a different option when the + // preferred option does not give a valid result. You can specify this option + // only when the `travel_mode` is `DRIVE` or `TWO_WHEELER`, otherwise the + // request fails. + RoutingPreference routing_preference = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The departure time. If you don't set this value, this defaults to the time + // that you made the request. If you set this value to a time that has already + // occurred, the request fails. + google.protobuf.Timestamp departure_time = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A single origin for ComputeRouteMatrixRequest +message RouteMatrixOrigin { + // Required. Origin waypoint + Waypoint waypoint = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Modifiers for every route that takes this as the origin + RouteModifiers route_modifiers = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A single destination for ComputeRouteMatrixRequest +message RouteMatrixDestination { + // Required. Destination waypoint + Waypoint waypoint = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/google/maps/routes/v1/compute_routes_request.proto b/google/maps/routes/v1/compute_routes_request.proto new file mode 100644 index 000000000..058599080 --- /dev/null +++ b/google/maps/routes/v1/compute_routes_request.proto @@ -0,0 +1,180 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.routes.v1; + +import "google/maps/routes/v1/polyline.proto"; +import "google/maps/routes/v1/toll_passes.proto"; +import "google/maps/routes/v1/vehicle_emission_type.proto"; +import "google/maps/routes/v1/waypoint.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Routes.V1"; +option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes"; +option java_multiple_files = true; +option java_outer_classname = "ComputeRoutesRequestProto"; +option java_package = "com.google.maps.routes.v1"; +option objc_class_prefix = "GMRS"; +option php_namespace = "Google\\Maps\\Routes\\V1"; + +// ComputeRoutes request message. +message ComputeRoutesRequest { + // Required. Origin waypoint. + Waypoint origin = 1; + + // Required. Destination waypoint. + Waypoint destination = 2; + + // Optional. A set of waypoints along the route (excluding terminal points), + // for either stopping at or passing by. + repeated Waypoint intermediates = 3; + + // Optional. Specifies the mode of transportation. + RouteTravelMode travel_mode = 4; + + // Optional. Specifies how to compute the route. The server + // attempts to use the selected routing preference to compute the route. If + // the routing preference results in an error or an extra long latency, then + // an error is returned. In the future, we might implement a fallback + // mechanism to use a different option when the preferred option does not give + // a valid result. You can specify this option only when the `travel_mode` is + // `DRIVE` or `TWO_WHEELER`, otherwise the request fails. + RoutingPreference routing_preference = 5; + + // Optional. Specifies your preference for the quality of the polyline. + PolylineQuality polyline_quality = 6; + + // Optional. The departure time. If you don't set this value, then this value + // defaults to the time that you made the request. If you set this value to a + // time that has already occurred, then the request fails. + google.protobuf.Timestamp departure_time = 7; + + // Specifies whether to calculate alternate routes in addition to the route. + bool compute_alternative_routes = 8; + + // Optional. A set of conditions to satisfy that affect the way routes are + // calculated. + RouteModifiers route_modifiers = 9; + + // Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. See + // [Language Support](https://developers.google.com/maps/faq#languagesupport) + // for the list of supported languages. When you don't provide this value, the + // display language is inferred from the location of the route request. + string language_code = 10; + + // Optional. Specifies the units of measure for the display fields. This + // includes the `instruction` field in `NavigationInstruction`. The units of + // measure used for the route, leg, step distance, and duration are not + // affected by this value. If you don't provide this value, then the display + // units are inferred from the location of the request. + Units units = 11; +} + +// A set of values used to specify the mode of travel. +enum RouteTravelMode { + // No travel mode specified. Defaults to `DRIVE`. + TRAVEL_MODE_UNSPECIFIED = 0; + + // Travel by passenger car. + DRIVE = 1; + + // Travel by bicycle. + BICYCLE = 2; + + // Travel by walking. + WALK = 3; + + // Two-wheeled, motorized vehicle. For example, motorcycle. Note that this + // differs from the `BICYCLE` travel mode which covers human-powered mode. + TWO_WHEELER = 4; +} + +// A set of values that specify factors to take into consideration when +// calculating the route. +enum RoutingPreference { + // No routing preference specified. Default to `TRAFFIC_AWARE`. + ROUTING_PREFERENCE_UNSPECIFIED = 0; + + // Computes routes without taking traffic conditions into consideration. + // Suitable when traffic conditions don't matter. Using this value produces + // the lowest latency. + TRAFFIC_UNAWARE = 1; + + // Calculates routes taking traffic conditions into consideration. In contrast + // to `TRAFFIC_AWARE_OPTIMAL`, some optimizations are applied to significantly + // reduce latency. + TRAFFIC_AWARE = 2; + + // Calculates the routes taking traffic conditions into consideration, + // without applying most performance optimizations. Using this value produces + // the highest latency. + TRAFFIC_AWARE_OPTIMAL = 3; +} + +// Encapsulates a set of optional conditions to satisfy when calculating the +// routes. +message RouteModifiers { + // Specifies whether to avoid toll roads. Applies only to the `DRIVE` and + // `TWO_WHEELER` travel modes. + bool avoid_tolls = 1; + + // Specifies whether to avoid highways. Applies only to the `DRIVE` and + // `TWO_WHEELER` travel modes. + bool avoid_highways = 2; + + // Specifies whether to avoid ferries. Applies only to the `DRIVE` and + // `TWO_WHEELER` travel modes. + bool avoid_ferries = 3; + + // Specifies whether to avoid navigating indoors. Applies only to the `WALK` + // travel mode. + bool avoid_indoor = 4; + + // Optional. Specifies the vehicle information. + VehicleInfo vehicle_info = 5; + + // Encapsulates information about toll passes. + // TollPass is unset means no available pass. + // Applies only to the DRIVE and TWO_WHEELER travel modes. + repeated TollPass toll_passes = 6; +} + +// Encapsulates the vehicle information, such as the license plate last +// character. +message VehicleInfo { + // Specifies the license plate last character. Could be a digit or a letter. + string license_plate_last_character = 1; + + // Describes the vehicle's emission type. + // Applies only to the DRIVE travel mode. + VehicleEmissionType emission_type = 2; +} + +// A set of values that specify the unit of measure used in the display. +enum Units { + // Units of measure not specified. Defaults to the unit of measure inferred + // from the request. + UNITS_UNSPECIFIED = 0; + + // Metric units of measure. + METRIC = 1; + + // Imperial (English) units of measure. + IMPERIAL = 2; +} diff --git a/google/maps/routes/v1/compute_routes_response.proto b/google/maps/routes/v1/compute_routes_response.proto new file mode 100644 index 000000000..cf74d8389 --- /dev/null +++ b/google/maps/routes/v1/compute_routes_response.proto @@ -0,0 +1,45 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.routes.v1; + +import "google/maps/routes/v1/fallback_info.proto"; +import "google/maps/routes/v1/route.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Routes.V1"; +option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes"; +option java_multiple_files = true; +option java_outer_classname = "ComputeRoutesResponseProto"; +option java_package = "com.google.maps.routes.v1"; +option objc_class_prefix = "GMRS"; +option php_namespace = "Google\\Maps\\Routes\\V1"; + +// ComputeRoutes the response message. +message ComputeRoutesResponse { + // Contains an array of computed routes (up to three) when you specify + // compute_alternatives_routes, and contains just one route when you don't. + // When this array contains multiple entries, the first one is the most + // recommended route. If the array is empty, then it means no route could be + // found. + repeated Route routes = 1; + + // In some cases when the server is not able to compute the route results with + // all of the input preferences, it may fallback to using a different way of + // computation. When fallback mode is used, this field contains detailed info + // about the fallback response. Otherwise this field is unset. + FallbackInfo fallback_info = 2; +} diff --git a/google/maps/routes/v1/fallback_info.proto b/google/maps/routes/v1/fallback_info.proto new file mode 100644 index 000000000..6a00d5333 --- /dev/null +++ b/google/maps/routes/v1/fallback_info.proto @@ -0,0 +1,71 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.routes.v1; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Routes.V1"; +option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes"; +option java_multiple_files = true; +option java_outer_classname = "FallbackInfoProto"; +option java_package = "com.google.maps.routes.v1"; +option objc_class_prefix = "GMRS"; +option php_namespace = "Google\\Maps\\Routes\\V1"; + +// Information related to how and why a fallback result was used. If this field +// is set, then it means the server used a different routing mode from your +// preferred mode as fallback. +message FallbackInfo { + // Routing mode used for the response. If fallback was triggered, the mode + // may be different from routing preference set in the original client + // request. + FallbackRoutingMode routing_mode = 1; + + // The reason why fallback response was used instead of the original response. + // This field is only populated when the fallback mode is triggered and the + // fallback response is returned. + FallbackReason reason = 2; +} + +// Reasons for using fallback response. +enum FallbackReason { + // No fallback reason specified. + FALLBACK_REASON_UNSPECIFIED = 0; + + // A server error happened while calculating routes with your preferred + // routing mode, but we were able to return a result calculated by an + // alternative mode. + SERVER_ERROR = 1; + + // We were not able to finish the calculation with your preferred routing mode + // on time, but we were able to return a result calculated by an alternative + // mode. + LATENCY_EXCEEDED = 2; +} + +// Actual routing mode used for returned fallback response. +enum FallbackRoutingMode { + // Not used. + FALLBACK_ROUTING_MODE_UNSPECIFIED = 0; + + // Indicates the "TRAFFIC_UNAWARE" routing mode was used to compute the + // response. + FALLBACK_TRAFFIC_UNAWARE = 1; + + // Indicates the "TRAFFIC_AWARE" routing mode was used to compute the + // response. + FALLBACK_TRAFFIC_AWARE = 2; +} diff --git a/google/maps/routes/v1/polyline.proto b/google/maps/routes/v1/polyline.proto new file mode 100644 index 000000000..53806b4b0 --- /dev/null +++ b/google/maps/routes/v1/polyline.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.routes.v1; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Routes.V1"; +option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes"; +option java_multiple_files = true; +option java_outer_classname = "PolylineProto"; +option java_package = "com.google.maps.routes.v1"; +option objc_class_prefix = "GMRS"; +option php_namespace = "Google\\Maps\\Routes\\V1"; + +// Encapsulates an encoded polyline. +message Polyline { + // Encapsulates the type of polyline. Defaults to encoded_polyline. + oneof polyline_type { + // The string encoding of the polyline using the [polyline encoding + // algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm) + string encoded_polyline = 1; + } +} + +// A set of values that specify the quality of the polyline. +enum PolylineQuality { + // No polyline quality preference specified. Defaults to `OVERVIEW`. + POLYLINE_QUALITY_UNSPECIFIED = 0; + + // Specifies a high-quality polyline - which is composed using more points + // than `OVERVIEW`, at the cost of increased response size. Use this value + // when you need more precision. + HIGH_QUALITY = 1; + + // Specifies an overview polyline - which is composed using a small number of + // points. Use this value when displaying an overview of the route. Using this + // option has a lower request latency compared to using the + // `HIGH_QUALITY` option. + OVERVIEW = 2; +} diff --git a/google/maps/routes/v1/route.proto b/google/maps/routes/v1/route.proto new file mode 100644 index 000000000..119853adb --- /dev/null +++ b/google/maps/routes/v1/route.proto @@ -0,0 +1,263 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.routes.v1; + +import "google/geo/type/viewport.proto"; +import "google/maps/routes/v1/polyline.proto"; +import "google/maps/routes/v1/waypoint.proto"; +import "google/protobuf/duration.proto"; +import "google/type/money.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Routes.V1"; +option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes"; +option java_multiple_files = true; +option java_outer_classname = "RouteProto"; +option java_package = "com.google.maps.routes.v1"; +option objc_class_prefix = "GMRS"; +option php_namespace = "Google\\Maps\\Routes\\V1"; + +// Encapsulates a route, which consists of a series of connected road segments +// that join beginning, ending, and intermediate waypoints. +message Route { + // A collection of legs (path segments between waypoints) that make-up the + // route. Each leg corresponds to the trip between two non-`via` Waypoints. + // For example, a route with no intermediate waypoints has only one leg. A + // route that includes one non-`via` intermediate waypoint has two legs. A + // route that includes one `via` intermediate waypoint has one leg. The order + // of the legs matches the order of Waypoints from `origin` to `intermediates` + // to `destination`. + repeated RouteLeg legs = 1; + + // The travel distance of the route, in meters. + int32 distance_meters = 2; + + // The length of time needed to navigate the route. If you set the + // `route_preference` to `TRAFFIC_UNAWARE`, then this value is the same as + // `static_duration`. If you set the `route_preference` to either + // `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated + // taking traffic conditions into account. + google.protobuf.Duration duration = 3; + + // The duration of traveling through the route without taking traffic + // conditions into consideration. + google.protobuf.Duration static_duration = 4; + + // The overall route polyline. This polyline will be the combined polyline of + // all `legs`. + Polyline polyline = 5; + + // A description of the route. + string description = 6; + + // An array of warnings to show when displaying the route. + repeated string warnings = 7; + + // The viewport bounding box of the polyline. + google.geo.type.Viewport viewport = 8; + + // Additional information about the route. + RouteTravelAdvisory travel_advisory = 9; +} + +// Encapsulates the additional information that the user should be informed +// about, such as possible traffic zone restriction etc. +message RouteTravelAdvisory { + // The traffic restriction that applies to the route. A vehicle that is + // subject to the restriction is not allowed to travel on the route. As of + // October 2019, only Jakarta, Indonesia takes into consideration. + TrafficRestriction traffic_restriction = 1; + + // Encapsulates information about tolls on the Route. + // This field is only populated if we expect there are tolls on the Route. + // If this field is set but the estimated_price subfield is not populated, + // we expect that road contains tolls but we do not know an estimated price. + // If this field is not set, then we expect there is no toll on the Route. + TollInfo toll_info = 2; +} + +// Encapsulates the additional information that the user should be informed +// about, such as possible traffic zone restriction etc. on a route leg. +message RouteLegTravelAdvisory { + // Encapsulates information about tolls on the specific RouteLeg. + // This field is only populated if we expect there are tolls on the RouteLeg. + // If this field is set but the estimated_price subfield is not populated, + // we expect that road contains tolls but we do not know an estimated price. + // If this field does not exist, then there is no toll on the RouteLeg. + TollInfo toll_info = 1; +} + +// Encapsulates the traffic restriction applied to the route. As of October +// 2019, only Jakarta, Indonesia takes into consideration. +message TrafficRestriction { + // The restriction based on the vehicle's license plate last character. If + // this field does not exist, then no restriction on route. + LicensePlateLastCharacterRestriction license_plate_last_character_restriction = 1; +} + +// Encapsulates the license plate last character restriction. +message LicensePlateLastCharacterRestriction { + // The allowed last character of a license plate of a vehicle. Only vehicles + // whose license plate's last characters match these are allowed to travel on + // the route. If empty, no vehicle is allowed. + repeated string allowed_last_characters = 1; +} + +// Encapsulates a segment between non-`via` waypoints. +message RouteLeg { + // The travel distance of the route leg, in meters. + int32 distance_meters = 1; + + // The length of time needed to navigate the leg. If the `route_preference` + // is set to `TRAFFIC_UNAWARE`, then this value is the same as + // `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or + // `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic + // conditions into account. + google.protobuf.Duration duration = 2; + + // The duration of traveling through the leg, calculated without taking + // traffic conditions into consideration. + google.protobuf.Duration static_duration = 3; + + // The overall polyline for this leg. This includes that each `step`'s + // polyline. + Polyline polyline = 4; + + // The start location of this leg. This might be different from the provided + // `origin`. For example, when the provided `origin` is not near a road, this + // is a point on the road. + Location start_location = 5; + + // The end location of this leg. This might be different from the provided + // `destination`. For example, when the provided `destination` is not near a + // road, this is a point on the road. + Location end_location = 6; + + // An array of steps denoting segments within this leg. Each step represents + // one navigation instruction. + repeated RouteLegStep steps = 7; + + // Encapsulates the additional information that the user should be informed + // about, such as possible traffic zone restriction etc. on a route leg. + RouteLegTravelAdvisory travel_advisory = 8; +} + +// Encapsulates toll information on a `Route` or on a `RouteLeg`. +message TollInfo { + // The monetary amount of tolls for the corresponding Route or RouteLeg. + // This list contains a money amount for each currency that is expected + // to be charged by the toll stations. Typically this list will contain only + // one item for routes with tolls in one currency. For international trips, + // this list may contain multiple items to reflect tolls in different + // currencies. + repeated google.type.Money estimated_price = 1; +} + +// Encapsulates a segment of a `RouteLeg`. A step corresponds to a single +// navigation instruction. Route legs are made up of steps. +message RouteLegStep { + // The travel distance of this step, in meters. In some circumstances, this + // field might not have a value. + int32 distance_meters = 1; + + // The duration of travel through this step without taking traffic conditions + // into consideration. In some circumstances, this field might not have a + // value. + google.protobuf.Duration static_duration = 2; + + // The polyline associated with this step. + Polyline polyline = 3; + + // The start location of this step. + Location start_location = 4; + + // The end location of this step. + Location end_location = 5; + + // Navigation instructions. + NavigationInstruction navigation_instruction = 6; +} + +message NavigationInstruction { + // Encapsulates the navigation instructions for the current step (e.g., turn + // left, merge, straight, etc.). This field determines which icon to display. + Maneuver maneuver = 1; + + // Instructions for navigating this step. + string instructions = 2; +} + +// A set of values that specify the navigation action to take for the current +// step (e.g., turn left, merge, straight, etc.). +enum Maneuver { + // Not used. + MANEUVER_UNSPECIFIED = 0; + + // Turn slightly to the left. + TURN_SLIGHT_LEFT = 1; + + // Turn sharply to the left. + TURN_SHARP_LEFT = 2; + + // Make a left u-turn. + UTURN_LEFT = 3; + + // Turn left. + TURN_LEFT = 4; + + // Turn slightly to the right. + TURN_SLIGHT_RIGHT = 5; + + // Turn sharply to the right. + TURN_SHARP_RIGHT = 6; + + // Make a right u-turn. + UTURN_RIGHT = 7; + + // Turn right. + TURN_RIGHT = 8; + + // Go straight. + STRAIGHT = 9; + + // Take the left ramp. + RAMP_LEFT = 10; + + // Take the right ramp. + RAMP_RIGHT = 11; + + // Merge into traffic. + MERGE = 12; + + // Take the left fork. + FORK_LEFT = 13; + + // Take the right fork. + FORK_RIGHT = 14; + + // Take the ferry. + FERRY = 15; + + // Take the train leading onto the ferry. + FERRY_TRAIN = 16; + + // Turn left at the roundabout. + ROUNDABOUT_LEFT = 17; + + // Turn right at the roundabout. + ROUNDABOUT_RIGHT = 18; +} diff --git a/google/maps/routes/v1/route_matrix_element.proto b/google/maps/routes/v1/route_matrix_element.proto new file mode 100644 index 000000000..66211ebaa --- /dev/null +++ b/google/maps/routes/v1/route_matrix_element.proto @@ -0,0 +1,69 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.routes.v1; + +import "google/maps/routes/v1/fallback_info.proto"; +import "google/maps/routes/v1/route.proto"; +import "google/protobuf/duration.proto"; +import "google/rpc/status.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Routes.V1"; +option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes"; +option java_multiple_files = true; +option java_outer_classname = "ComputeRouteMatrixElementProto"; +option java_package = "com.google.maps.routes.v1"; +option objc_class_prefix = "GMRS"; +option php_namespace = "Google\\Maps\\Routes\\V1"; + +// Encapsulates route information computed for an origin/destination pair in the +// ComputeRouteMatrix API. This proto can be streamed to the client. +message RouteMatrixElement { + // Zero-based index of the origin in the request. + int32 origin_index = 1; + + // Zero-based index of the destination in the request. + int32 destination_index = 2; + + // Error status code for this element. + google.rpc.Status status = 3; + + // The travel distance of the route, in meters. + int32 distance_meters = 4; + + // The length of time needed to navigate the route. If you set the + // `route_preference` to `TRAFFIC_UNAWARE`, then this value is the same as + // `static_duration`. If you set the `route_preference` to either + // `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated + // taking traffic conditions into account. + google.protobuf.Duration duration = 5; + + // The duration of traveling through the route without taking traffic + // conditions into consideration. + google.protobuf.Duration static_duration = 6; + + // Additional information about the route. For example: restriction + // information and toll information + RouteTravelAdvisory travel_advisory = 7; + + // In some cases when the server is not able to compute the route with the + // given preferences for this particular origin/destination pair, it may + // fall back to using a different mode of computation. When fallback mode is + // used, this field contains detailed information about the fallback response. + // Otherwise this field is unset. + FallbackInfo fallback_info = 8; +} diff --git a/google/maps/routes/v1/route_service.proto b/google/maps/routes/v1/route_service.proto new file mode 100644 index 000000000..602ba9280 --- /dev/null +++ b/google/maps/routes/v1/route_service.proto @@ -0,0 +1,78 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.routes.v1; + +import "google/api/annotations.proto"; +import "google/maps/routes/v1/compute_routes_request.proto"; +import "google/maps/routes/v1/compute_routes_response.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Routes.V1"; +option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes"; +option java_multiple_files = true; +option java_outer_classname = "RoutesServiceProto"; +option java_package = "com.google.maps.routes.v1"; +option objc_class_prefix = "GMRS"; +option php_namespace = "Google\\Maps\\Routes\\V1"; + +// The Routes Preferred API. +service RoutesPreferred { + option (google.api.default_host) = "routespreferred.googleapis.com"; + + // Returns the primary route along with optional alternate routes, given a set + // of terminal and intermediate waypoints. + // + // **NOTE:** This method requires that you specify a response field mask in + // the input. You can provide the response field mask by using URL parameter + // `$fields` or `fields`, or by using an HTTP/gRPC header `X-Goog-FieldMask` + // (see the [available URL parameters and + // headers](https://cloud.google.com/apis/docs/system-parameters). The value + // is a comma separated list of field paths. See detailed documentation about + // [how to construct the field + // paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto). + // + // For example, in this method: + // + // * Field mask of all available fields (for manual inspection): + // `X-Goog-FieldMask: *` + // * Field mask of Route-level duration, distance, and polyline (an example + // production setup): + // `X-Goog-FieldMask: + // routes.duration,routes.distanceMeters,routes.polyline.encodedPolyline` + // + // Google discourage the use of the wildcard (`*`) response field mask, or + // specifying the field mask at the top level (`routes`), because: + // + // * Selecting only the fields that you need helps our server save computation + // cycles, allowing us to return the result to you with a lower latency. + // * Selecting only the fields that you need + // in your production job ensures stable latency performance. We might add + // more response fields in the future, and those new fields might require + // extra computation time. If you select all fields, or if you select all + // fields at the top level, then you might experience performance degradation + // because any new field we add will be automatically included in the + // response. + // * Selecting only the fields that you need results in a smaller response + // size, and thus higher network throughput. + rpc ComputeRoutes(ComputeRoutesRequest) returns (ComputeRoutesResponse) { + option (google.api.http) = { + post: "/v1:computeRoutes" + body: "*" + }; + } +} diff --git a/google/maps/routes/v1/toll_passes.proto b/google/maps/routes/v1/toll_passes.proto new file mode 100644 index 000000000..f823e9d63 --- /dev/null +++ b/google/maps/routes/v1/toll_passes.proto @@ -0,0 +1,39 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.routes.v1; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Routes.V1"; +option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes"; +option java_multiple_files = true; +option java_outer_classname = "TollPassesProto"; +option java_package = "com.google.maps.routes.v1"; +option objc_class_prefix = "GMRS"; +option php_namespace = "Google\\Maps\\Routes\\V1"; + +// List of toll passes around the world that we support. +enum TollPass { + // Not used. If this value is used, then the request fails. + TOLL_PASS_UNSPECIFIED = 0; + + // State pass of the Washington state, United States. + US_WA_GOOD_TO_GO = 1; + + // Australia-wide toll pass. + // See additional details at https://www.linkt.com.au/. + AU_LINKT = 2; +} diff --git a/google/maps/routes/v1/vehicle_emission_type.proto b/google/maps/routes/v1/vehicle_emission_type.proto new file mode 100644 index 000000000..79f578909 --- /dev/null +++ b/google/maps/routes/v1/vehicle_emission_type.proto @@ -0,0 +1,42 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.routes.v1; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Routes.V1"; +option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes"; +option java_multiple_files = true; +option java_outer_classname = "VehicleEmissionTypeProto"; +option java_package = "com.google.maps.routes.v1"; +option objc_class_prefix = "GMRS"; +option php_namespace = "Google\\Maps\\Routes\\V1"; + +// A set of values describing the vehicle's emission type. +// Applies only to the DRIVE travel mode. +enum VehicleEmissionType { + // No emission type specified. Default to GASOLINE. + VEHICLE_EMISSION_TYPE_UNSPECIFIED = 0; + + // Gasoline/petrol fueled vehicle. + GASOLINE = 1; + + // Electricity powered vehicle. + ELECTRIC = 2; + + // Hybrid fuel (such as gasoline + electric) vehicle. + HYBRID = 3; +} diff --git a/google/maps/routes/v1/waypoint.proto b/google/maps/routes/v1/waypoint.proto new file mode 100644 index 000000000..df606f4e1 --- /dev/null +++ b/google/maps/routes/v1/waypoint.proto @@ -0,0 +1,81 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.routes.v1; + +import "google/protobuf/wrappers.proto"; +import "google/type/latlng.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Routes.V1"; +option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes"; +option java_multiple_files = true; +option java_outer_classname = "WaypointProto"; +option java_package = "com.google.maps.routes.v1"; +option objc_class_prefix = "GMRS"; +option php_namespace = "Google\\Maps\\Routes\\V1"; + +// Encapsulates a waypoint. Waypoints mark both the beginning and end of a +// route, and include intermediate stops along the route. +message Waypoint { + // Different ways to represent a location. + oneof location_type { + // A point specified using geographic coordinates, including an optional + // heading. + Location location = 1; + + // The POI Place ID associated with the waypoint. + string place_id = 2; + } + + // Marks this waypoint as a milestone, as opposed to a stopping point. For + // each non-via waypoint in the request, the response appends an entry to the + // `legs` array to provide the details for stopovers on that leg of the + // trip. Set this value to true when you want the route to pass through this + // waypoint without stopping over. Via waypoints don't cause an entry to be + // added to the `legs` array, but they do route the journey through the + // waypoint. You can only set this value on waypoints that are intermediates. + // If you set this field on terminal waypoints, then the request fails. + bool via = 3; + + // Indicates that the waypoint is meant for vehicles to stop at, where the + // intention is to either pickup or drop-off. When you set this value, the + // calculated route won't include non-`via` waypoints on roads that are + // unsuitable for pickup and drop-off. This option works only for `DRIVE` and + // `TWO_WHEELER` travel modes, and when the `location_type` is `location`. + bool vehicle_stopover = 4; + + // Indicates that the location of this waypoint is meant to have a preference + // for the vehicle to stop at a particular side of road. When you set this + // value, the route will pass through the location so that the vehicle can + // stop at the side of road that the location is biased towards from the + // center of the road. This option works only for 'DRIVE' and 'TWO_WHEELER' + // travel modes, and when the 'location_type' is set to 'location'. + bool side_of_road = 5; +} + +// Encapsulates a location (a geographic point, and an optional heading). +message Location { + // The waypoint's geographic coordinates. + google.type.LatLng lat_lng = 1; + + // The compass heading associated with the direction of the flow of traffic. + // This value is used to specify the side of the road to use for pickup and + // drop-off. Heading values can be from 0 to 360, where 0 specifies a heading + // of due North, 90 specifies a heading of due East, etc. You can use this + // field only for `DRIVE` and `TWO_WHEELER` travel modes. + google.protobuf.Int32Value heading = 2; +} diff --git a/google/maps/routes/v1alpha/BUILD.bazel b/google/maps/routes/v1alpha/BUILD.bazel new file mode 100644 index 000000000..fd5a46c28 --- /dev/null +++ b/google/maps/routes/v1alpha/BUILD.bazel @@ -0,0 +1,167 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "routes_proto", + srcs = [ + "route_service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/maps/routes/v1:routes_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "routes_java_proto", + deps = [":routes_proto"], +) + +java_grpc_library( + name = "routes_java_grpc", + srcs = [":routes_proto"], + deps = [":routes_java_proto"], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", +) + +go_proto_library( + name = "routes_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/maps/routes/v1alpha", + protos = [":routes_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/maps/routes/v1:routes_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "routes_moved_proto", + srcs = [":routes_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/maps/routes/v1:routes_proto", + ], +) + +py_proto_library( + name = "routes_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":routes_moved_proto"], +) + +py_grpc_library( + name = "routes_py_grpc", + srcs = [":routes_moved_proto"], + deps = [":routes_py_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "routes_php_proto", + deps = [":routes_proto"], +) + +php_grpc_library( + name = "routes_php_grpc", + srcs = [":routes_proto"], + deps = [":routes_php_proto"], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "routes_ruby_proto", + deps = [":routes_proto"], +) + +ruby_grpc_library( + name = "routes_ruby_grpc", + srcs = [":routes_proto"], + deps = [":routes_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "routes_csharp_proto", + deps = [":routes_proto"], +) + +csharp_grpc_library( + name = "routes_csharp_grpc", + srcs = [":routes_proto"], + deps = [":routes_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ code here diff --git a/google/maps/routes/v1alpha/route_service.proto b/google/maps/routes/v1alpha/route_service.proto new file mode 100644 index 000000000..00858c7f6 --- /dev/null +++ b/google/maps/routes/v1alpha/route_service.proto @@ -0,0 +1,89 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.routes.v1alpha; + +import "google/api/annotations.proto"; +import "google/maps/routes/v1/compute_route_matrix_request.proto"; +import "google/maps/routes/v1/compute_routes_request.proto"; +import "google/maps/routes/v1/compute_routes_response.proto"; +import "google/maps/routes/v1/route_matrix_element.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Routes.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1alpha;routes"; +option java_multiple_files = true; +option java_outer_classname = "RoutesServiceAlphaProto"; +option java_package = "com.google.maps.routes.v1alpha"; +option objc_class_prefix = "GMRS"; +option php_namespace = "Google\\Maps\\Routes\\V1alpha"; + +// The Routes Preferred API. +service RoutesAlpha { + option (google.api.default_host) = "routespreferred.googleapis.com"; + + // Returns the primary route along with optional alternate routes, given a set + // of terminal and intermediate waypoints. + // + // **NOTE:** This method requires that you specify a response field mask in + // the input. You can provide the response field mask by using URL parameter + // `$fields` or `fields`, or by using an HTTP/gRPC header `X-Goog-FieldMask` + // (see the [available URL parameters and + // headers](https://cloud.google.com/apis/docs/system-parameters). The value + // is a comma separated list of field paths. See detailed documentation about + // [how to construct the field + // paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto). + // + // For example, in this method: + // + // * Field mask of all available fields (for manual inspection): + // `X-Goog-FieldMask: *` + // * Field mask of Route-level duration, distance, and polyline (an example + // production setup): + // `X-Goog-FieldMask: + // routes.duration,routes.distanceMeters,routes.polyline.encodedPolyline` + // + // Google discourage the use of the wildcard (`*`) response field mask, or + // specifying the field mask at the top level (`routes`), because: + // + // * Selecting only the fields that you need helps our server save computation + // cycles, allowing us to return the result to you with a lower latency. + // * Selecting only the fields that you need + // in your production job ensures stable latency performance. We might add + // more response fields in the future, and those new fields might require + // extra computation time. If you select all fields, or if you select all + // fields at the top level, then you might experience performance degradation + // because any new field we add will be automatically included in the + // response. + // * Selecting only the fields that you need results in a smaller response + // size, and thus higher network throughput. + rpc ComputeRoutes(google.maps.routes.v1.ComputeRoutesRequest) returns (google.maps.routes.v1.ComputeRoutesResponse) { + option (google.api.http) = { + post: "/v1alpha:computeRoutes" + body: "*" + }; + } + + // Takes in a list of origins and destinations and returns a stream containing + // route information for each combination of origin and destination. + rpc ComputeRouteMatrix(google.maps.routes.v1.ComputeRouteMatrixRequest) returns (stream google.maps.routes.v1.RouteMatrixElement) { + option (google.api.http) = { + post: "/v1alpha:computeRouteMatrix" + body: "*" + }; + } +} diff --git a/google/maps/routes/v1alpha/routespreferred_v1alpha.yaml b/google/maps/routes/v1alpha/routespreferred_v1alpha.yaml new file mode 100644 index 000000000..6d87f361c --- /dev/null +++ b/google/maps/routes/v1alpha/routespreferred_v1alpha.yaml @@ -0,0 +1,7 @@ +type: google.api.Service +config_version: 3 +name: routespreferred.googleapis.com +title: Routes Preferred API + +apis: +- name: google.maps.routes.v1alpha.RoutesAlpha diff --git a/google/maps/routespreferred/v1/BUILD.bazel b/google/maps/routespreferred/v1/BUILD.bazel new file mode 100644 index 000000000..3f063176f --- /dev/null +++ b/google/maps/routespreferred/v1/BUILD.bazel @@ -0,0 +1,109 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") +load("//google/maps:postprocessing.bzl", "maps_assembly_pkg") + +alias( + name = "routes_proto", + actual = "//google/maps/routes/v1:routes_proto", +) + +alias( + name = "routes_proto_with_info", + actual = "//google/maps/routes/v1:routes_proto_with_info", +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_gapic_library( + name = "routespreferred_java_gapic", + src = ":routes_proto_with_info", + gapic_yaml = "routespreferred_gapic.yaml", + package = "google.maps.routespreferred.v1", + service_yaml = "routespreferred_v1.yaml", + test_deps = [ + "//google/maps/routes/v1:routes_java_grpc", + ], + deps = [ + "//google/maps/routes/v1:routes_java_proto", + ], +) + +java_gapic_test( + name = "routespreferred_java_gapic_test_suite", + test_classes = [ + "com.google.maps.routespreferred.v1.RoutesPreferredClientTest", + ], + runtime_deps = [":routespreferred_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-maps-routespreferred-v1-java", + deps = [ + ":routespreferred_java_gapic", + "//google/maps/routes/v1:routes_java_grpc", # needed for test mocks + ], +) + +maps_assembly_pkg( + name = "google-maps-routespreferred-v1-java-postprocess", + srcs = [":google-maps-routespreferred-v1-java"], + language = "java", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_gapic_library( + name = "routespreferred_go_gapic", + srcs = [":routes_proto_with_info"], + grpc_service_config = "", + importpath = "developers.google.com/maps/go/routespreferred/v1;routes", + service_yaml = "routespreferred_v1.yaml", + deps = [ + "//google/maps/routes/v1:routes_go_proto", + ], +) + +go_test( + name = "routespreferred_go_gapic_test", + srcs = [":routespreferred_go_gapic_srcjar_test"], + embed = [":routespreferred_go_gapic"], + importpath = "developers.google.com/maps/go/routespreferred/v1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapic-maps-routespreferred-v1-go", + deps = [ + ":routespreferred_go_gapic", + ":routespreferred_go_gapic_srcjar-test.srcjar", + "//google/maps/routes/v1:routes_go_proto", + ], +) diff --git a/google/maps/routespreferred/v1/routespreferred_gapic.yaml b/google/maps/routespreferred/v1/routespreferred_gapic.yaml new file mode 100644 index 000000000..1d2a10060 --- /dev/null +++ b/google/maps/routespreferred/v1/routespreferred_gapic.yaml @@ -0,0 +1,33 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.maps.routespreferred.v1 + go: + package_name: developers.google.com/maps/go/routespreferred/v1 +interfaces: +- name: google.maps.routes.v1.RoutesPreferred + collections: [] + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 30000 + initial_rpc_timeout_millis: 30000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 30000 + total_timeout_millis: 300000 + methods: + - name: ComputeRoutes + required_fields: + - origin + - destination + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 30000 diff --git a/google/maps/routespreferred/v1/routespreferred_v1.yaml b/google/maps/routespreferred/v1/routespreferred_v1.yaml new file mode 100644 index 000000000..a365ce2e9 --- /dev/null +++ b/google/maps/routespreferred/v1/routespreferred_v1.yaml @@ -0,0 +1,7 @@ +type: google.api.Service +config_version: 3 +name: routespreferred.googleapis.com +title: Routes Preferred API + +apis: +- name: google.maps.routes.v1.RoutesPreferred diff --git a/google/maps/unity/clientinfo.proto b/google/maps/unity/clientinfo.proto new file mode 100644 index 000000000..a6c3010da --- /dev/null +++ b/google/maps/unity/clientinfo.proto @@ -0,0 +1,87 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.unity; + +option csharp_namespace = "Google.Maps.Unity"; +option go_package = "google.golang.org/genproto/googleapis/maps/unity;unity"; +option java_multiple_files = true; +option java_outer_classname = "ClientInfoProto"; +option java_package = "com.google.maps.unity"; +option objc_class_prefix = "GMU"; + +// Client information. +message ClientInfo { + // Platform enum. + enum Platform { + // Unspecified or unknown OS. + PLATFORM_UNSPECIFIED = 0; + + // Development environment. + EDITOR = 1; + + // macOS. + MAC_OS = 2; + + // Windows. + WINDOWS = 3; + + // Linux + LINUX = 4; + + // Android + ANDROID = 5; + + // iOS + IOS = 6; + + // WebGL. + WEB_GL = 7; + } + + // Application ID, such as the package name on Android and the bundle + // identifier on iOS platforms. + string application_id = 1; + + // Application version number, such as "1.2.3". The exact format is + // application-dependent. + string application_version = 2; + + // Platform where the application is running. + Platform platform = 3; + + // Operating system name and version as reported by the OS. For example, + // "Mac OS X 10.10.4". The exact format is platform-dependent. + string operating_system = 4; + + // API client name and version. For example, the SDK calling the API. The + // exact format is up to the client. + string api_client = 5; + + // Device model as reported by the device. The exact format is + // platform-dependent. + string device_model = 6; + + // Language code (in BCP-47 format) indicating the UI language of the client. + // Examples are "en", "en-US" or "ja-Latn". For more information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 7; + + // Build number/version of the operating system. e.g., the contents of + // android.os.Build.ID in Android, or the contents of sysctl "kern.osversion" + // in iOS. + string operating_system_build = 8; +} diff --git a/google/monitoring/BUILD.bazel b/google/monitoring/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/monitoring/BUILD.bazel +++ b/google/monitoring/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/monitoring/artman_monitoring.yaml b/google/monitoring/artman_monitoring.yaml index 8ff5101ac..096ace1d0 100644 --- a/google/monitoring/artman_monitoring.yaml +++ b/google/monitoring/artman_monitoring.yaml @@ -2,8 +2,8 @@ common: api_name: monitoring api_version: v3 organization_name: google-cloud - service_yaml: monitoring.yaml - gapic_yaml: v3/monitoring_gapic.yaml + service_yaml: v3/monitoring.yaml + gapic_yaml: v3/monitoring_gapic.legacy.yaml src_proto_paths: - v3 proto_deps: diff --git a/google/monitoring/dashboard/v1/BUILD.bazel b/google/monitoring/dashboard/v1/BUILD.bazel new file mode 100644 index 000000000..31164b6a8 --- /dev/null +++ b/google/monitoring/dashboard/v1/BUILD.bazel @@ -0,0 +1,388 @@ +# This file was created manually + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "dashboard_proto", + srcs = [ + "common.proto", + "dashboard.proto", + "dashboards_service.proto", + "drilldowns.proto", + "layouts.proto", + "metrics.proto", + "scorecard.proto", + "service.proto", + "text.proto", + "widget.proto", + "xychart.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + ], +) + +proto_library_with_info( + name = "dashboard_proto_with_info", + deps = [ + ":dashboard_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "dashboard_java_proto", + deps = [":dashboard_proto"], +) + +java_grpc_library( + name = "dashboard_java_grpc", + srcs = [":dashboard_proto"], + deps = [":dashboard_java_proto"], +) + +java_gapic_library( + name = "dashboard_java_gapic", + src = ":dashboard_proto_with_info", + gapic_yaml = "monitoring_gapic.yaml", + package = "google.monitoring.dashboard.v1", + service_yaml = "monitoring.yaml", + test_deps = [ + ":dashboard_java_grpc", + ], + deps = [ + ":dashboard_java_proto", + ], +) + +java_gapic_test( + name = "dashboard_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.monitoring.dashboard.v1.DashboardsServiceClientTest", + ], + runtime_deps = [":dashboard_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-monitoring-dashboard-v1-java", + deps = [ + ":dashboard_java_gapic", + ":dashboard_java_grpc", + ":dashboard_java_proto", + ":dashboard_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "dashboard_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1", + protos = [":dashboard_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "dashboard_go_gapic", + srcs = [":dashboard_proto_with_info"], + grpc_service_config = "", + importpath = "cloud.google.com/go/monitoring/dashboard/apiv1;dashboard", + service_yaml = "monitoring.yaml", + deps = [ + ":dashboard_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +go_test( + name = "dashboard_go_gapic_test", + srcs = [":dashboard_go_gapic_srcjar_test"], + embed = [":dashboard_go_gapic"], + importpath = "cloud.google.com/go/monitoring/dashboard/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-monitoring-dashboard-v1-go", + deps = [ + ":dashboard_go_gapic", + ":dashboard_go_gapic_srcjar-test.srcjar", + ":dashboard_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "dashboard_moved_proto", + srcs = [":dashboard_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + ], +) + +py_proto_library( + name = "dashboard_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":dashboard_moved_proto"], +) + +py_grpc_library( + name = "dashboard_py_grpc", + srcs = [":dashboard_moved_proto"], + deps = [":dashboard_py_proto"], +) + +py_gapic_library( + name = "dashboard_py_gapic", + src = ":dashboard_proto_with_info", + gapic_yaml = "monitoring_gapic.yaml", + package = "google.monitoring.dashboard.v1", + service_yaml = "monitoring.yaml", + deps = [ + ":dashboard_py_grpc", + ":dashboard_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "monitoring-dashboard-v1-py", + deps = [ + ":dashboard_py_gapic", + ":dashboard_py_grpc", + ":dashboard_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "dashboard_php_proto", + deps = [":dashboard_proto"], +) + +php_grpc_library( + name = "dashboard_php_grpc", + srcs = [":dashboard_proto"], + deps = [":dashboard_php_proto"], +) + +php_gapic_library( + name = "dashboard_php_gapic", + src = ":dashboard_proto_with_info", + gapic_yaml = "monitoring_gapic.yaml", + package = "google.monitoring.dashboard.v1", + service_yaml = "monitoring.yaml", + deps = [ + ":dashboard_php_grpc", + ":dashboard_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-monitoring-dashboard-v1-php", + deps = [ + ":dashboard_php_gapic", + ":dashboard_php_grpc", + ":dashboard_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "dashboard_nodejs_gapic", + src = ":dashboard_proto_with_info", + gapic_yaml = "monitoring_gapic.yaml", + package = "google.monitoring.dashboard.v1", + service_yaml = "monitoring.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "monitoring-dashboard-v1-nodejs", + deps = [ + ":dashboard_nodejs_gapic", + ":dashboard_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "dashboard_ruby_proto", + deps = [":dashboard_proto"], +) + +ruby_grpc_library( + name = "dashboard_ruby_grpc", + srcs = [":dashboard_proto"], + deps = [":dashboard_ruby_proto"], +) + +ruby_gapic_library( + name = "dashboard_ruby_gapic", + src = ":dashboard_proto_with_info", + gapic_yaml = "monitoring_gapic.yaml", + package = "google.monitoring.dashboard.v1", + service_yaml = "monitoring.yaml", + deps = [ + ":dashboard_ruby_grpc", + ":dashboard_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-monitoring-dashboard-v1-ruby", + deps = [ + ":dashboard_ruby_gapic", + ":dashboard_ruby_grpc", + ":dashboard_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "dashboard_csharp_proto", + deps = [":dashboard_proto"], +) + +csharp_grpc_library( + name = "dashboard_csharp_grpc", + srcs = [":dashboard_proto"], + deps = [":dashboard_csharp_proto"], +) + +csharp_gapic_library( + name = "dashboard_csharp_gapic", + src = ":dashboard_proto_with_info", + gapic_yaml = "monitoring_gapic.yaml", + package = "google.monitoring.dashboard.v1", + service_yaml = "monitoring.yaml", + deps = [ + ":dashboard_csharp_grpc", + ":dashboard_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-monitoring-dashboard-v1-csharp", + deps = [ + ":dashboard_csharp_gapic", + ":dashboard_csharp_grpc", + ":dashboard_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "dashboard_cc_proto", + deps = [":dashboard_proto"], +) + +cc_grpc_library( + name = "dashboard_cc_grpc", + srcs = [":dashboard_proto"], + generate_mocks = True, + grpc_only = True, + deps = [":dashboard_cc_proto"], +) diff --git a/google/monitoring/dashboard/v1/artman_monitoring.yaml b/google/monitoring/dashboard/v1/artman_monitoring.yaml new file mode 100644 index 000000000..8ddee16bb --- /dev/null +++ b/google/monitoring/dashboard/v1/artman_monitoring.yaml @@ -0,0 +1,36 @@ +common: + api_name: monitoring + api_version: v1 + organization_name: google-cloud + service_yaml: monitoring.yaml + gapic_yaml: monitoring_gapic.yaml + src_proto_paths: + - . + proto_deps: + - name: google-common-protos +artifacts: +- name: java_gapic + type: GAPIC + language: JAVA + release_level: GA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: php_gapic + type: GAPIC + language: PHP +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: go_gapic + type: GAPIC + language: GO +- name: csharp_gapic + type: GAPIC + language: CSHARP +- name: nodejs_gapic + type: GAPIC + language: NODEJS + release_level: BETA +- name: gapic_config + type: GAPIC_CONFIG diff --git a/google/monitoring/dashboard/v1/common.proto b/google/monitoring/dashboard/v1/common.proto new file mode 100644 index 000000000..4ab3f5312 --- /dev/null +++ b/google/monitoring/dashboard/v1/common.proto @@ -0,0 +1,398 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// Describes how to combine multiple time series to provide different views of +// the data. Aggregation consists of an alignment step on individual time +// series (`alignment_period` and `per_series_aligner`) followed by an optional +// reduction step of the data across the aligned time series +// (`cross_series_reducer` and `group_by_fields`). For more details, see +// [Aggregation](/monitoring/api/learn_more#aggregation). +message Aggregation { + // The Aligner describes how to bring the data points in a single + // time series into temporal alignment. + enum Aligner { + // No alignment. Raw data is returned. Not valid if cross-time + // series reduction is requested. The value type of the result is + // the same as the value type of the input. + ALIGN_NONE = 0; + + // Align and convert to delta metric type. This alignment is valid + // for cumulative metrics and delta metrics. Aligning an existing + // delta metric to a delta metric requires that the alignment + // period be increased. The value type of the result is the same + // as the value type of the input. + // + // One can think of this aligner as a rate but without time units; that + // is, the output is conceptually (second_point - first_point). + ALIGN_DELTA = 1; + + // Align and convert to a rate. This alignment is valid for + // cumulative metrics and delta metrics with numeric values. The output is a + // gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // + // One can think of this aligner as conceptually providing the slope of + // the line that passes through the value at the start and end of the + // window. In other words, this is conceptually ((y1 - y0)/(t1 - t0)), + // and the output unit is one that has a "/time" dimension. + // + // If, by rate, you are looking for percentage change, see the + // `ALIGN_PERCENT_CHANGE` aligner option. + ALIGN_RATE = 2; + + // Align by interpolating between adjacent points around the + // period boundary. This alignment is valid for gauge + // metrics with numeric values. The value type of the result is the same + // as the value type of the input. + ALIGN_INTERPOLATE = 3; + + // Align by shifting the oldest data point before the period + // boundary to the boundary. This alignment is valid for gauge + // metrics. The value type of the result is the same as the + // value type of the input. + ALIGN_NEXT_OLDER = 4; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the minimum of all data points in the + // period. This alignment is valid for gauge and delta metrics with numeric + // values. The value type of the result is the same as the value + // type of the input. + ALIGN_MIN = 10; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the maximum of all data points in the + // period. This alignment is valid for gauge and delta metrics with numeric + // values. The value type of the result is the same as the value + // type of the input. + ALIGN_MAX = 11; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the average or arithmetic mean of all + // data points in the period. This alignment is valid for gauge and delta + // metrics with numeric values. The value type of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_MEAN = 12; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the count of all data points in the + // period. This alignment is valid for gauge and delta metrics with numeric + // or Boolean values. The value type of the output is + // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + ALIGN_COUNT = 13; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the sum of all data points in the + // period. This alignment is valid for gauge and delta metrics with numeric + // and distribution values. The value type of the output is the + // same as the value type of the input. + ALIGN_SUM = 14; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the standard deviation of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with numeric values. The value type of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_STDDEV = 15; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the count of True-valued data points in the + // period. This alignment is valid for gauge metrics with + // Boolean values. The value type of the output is + // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + ALIGN_COUNT_TRUE = 16; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the count of False-valued data points in the + // period. This alignment is valid for gauge metrics with + // Boolean values. The value type of the output is + // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + ALIGN_COUNT_FALSE = 24; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the fraction of True-valued data points in the + // period. This alignment is valid for gauge metrics with Boolean values. + // The output value is in the range [0, 1] and has value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_FRACTION_TRUE = 17; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the 99th percentile of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with distribution values. The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENTILE_99 = 18; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the 95th percentile of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with distribution values. The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENTILE_95 = 19; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the 50th percentile of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with distribution values. The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENTILE_50 = 20; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the 5th percentile of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with distribution values. The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENTILE_05 = 21; + + // Align and convert to a percentage change. This alignment is valid for + // gauge and delta metrics with numeric values. This alignment conceptually + // computes the equivalent of "((current - previous)/previous)*100" + // where previous value is determined based on the alignmentPeriod. + // In the event that previous is 0 the calculated value is infinity with the + // exception that if both (current - previous) and previous are 0 the + // calculated value is 0. + // A 10 minute moving mean is computed at each point of the time window + // prior to the above calculation to smooth the metric and prevent false + // positives from very short lived spikes. + // Only applicable for data that is >= 0. Any values < 0 are treated as + // no data. While delta metrics are accepted by this alignment special care + // should be taken that the values for the metric will always be positive. + // The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENT_CHANGE = 23; + } + + // A Reducer describes how to aggregate data points from multiple + // time series into a single time series. + enum Reducer { + // No cross-time series reduction. The output of the aligner is + // returned. + REDUCE_NONE = 0; + + // Reduce by computing the mean across time series for each + // alignment period. This reducer is valid for delta and + // gauge metrics with numeric or distribution values. The value type of the + // output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + REDUCE_MEAN = 1; + + // Reduce by computing the minimum across time series for each + // alignment period. This reducer is valid for delta and + // gauge metrics with numeric values. The value type of the output + // is the same as the value type of the input. + REDUCE_MIN = 2; + + // Reduce by computing the maximum across time series for each + // alignment period. This reducer is valid for delta and + // gauge metrics with numeric values. The value type of the output + // is the same as the value type of the input. + REDUCE_MAX = 3; + + // Reduce by computing the sum across time series for each + // alignment period. This reducer is valid for delta and + // gauge metrics with numeric and distribution values. The value type of + // the output is the same as the value type of the input. + REDUCE_SUM = 4; + + // Reduce by computing the standard deviation across time series + // for each alignment period. This reducer is valid for delta + // and gauge metrics with numeric or distribution values. The value type of + // the output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + REDUCE_STDDEV = 5; + + // Reduce by computing the count of data points across time series + // for each alignment period. This reducer is valid for delta + // and gauge metrics of numeric, Boolean, distribution, and string value + // type. The value type of the output is + // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + REDUCE_COUNT = 6; + + // Reduce by computing the count of True-valued data points across time + // series for each alignment period. This reducer is valid for delta + // and gauge metrics of Boolean value type. The value type of + // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. + REDUCE_COUNT_TRUE = 7; + + // Reduce by computing the count of False-valued data points across time + // series for each alignment period. This reducer is valid for delta + // and gauge metrics of Boolean value type. The value type of + // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. + REDUCE_COUNT_FALSE = 15; + + // Reduce by computing the fraction of True-valued data points across time + // series for each alignment period. This reducer is valid for delta + // and gauge metrics of Boolean value type. The output value is in the + // range [0, 1] and has value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + REDUCE_FRACTION_TRUE = 8; + + // Reduce by computing 99th percentile of data points across time series + // for each alignment period. This reducer is valid for gauge and delta + // metrics of numeric and distribution type. The value of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + REDUCE_PERCENTILE_99 = 9; + + // Reduce by computing 95th percentile of data points across time series + // for each alignment period. This reducer is valid for gauge and delta + // metrics of numeric and distribution type. The value of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + REDUCE_PERCENTILE_95 = 10; + + // Reduce by computing 50th percentile of data points across time series + // for each alignment period. This reducer is valid for gauge and delta + // metrics of numeric and distribution type. The value of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + REDUCE_PERCENTILE_50 = 11; + + // Reduce by computing 5th percentile of data points across time series + // for each alignment period. This reducer is valid for gauge and delta + // metrics of numeric and distribution type. The value of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + REDUCE_PERCENTILE_05 = 12; + } + + // The alignment period for per-[time series][TimeSeries] + // alignment. If present, `alignmentPeriod` must be at least 60 + // seconds. After per-time series alignment, each time series will + // contain data points only on the period boundaries. If + // `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then + // this field is ignored. If `perSeriesAligner` is specified and + // does not equal `ALIGN_NONE`, then this field must be defined; + // otherwise an error is returned. + google.protobuf.Duration alignment_period = 1; + + // The approach to be used to align individual time series. Not all + // alignment functions may be applied to all time series, depending + // on the metric type and value type of the original time + // series. Alignment may change the metric type or the value type of + // the time series. + // + // Time series data must be aligned in order to perform cross-time + // series reduction. If `crossSeriesReducer` is specified, then + // `perSeriesAligner` must be specified and not equal `ALIGN_NONE` + // and `alignmentPeriod` must be specified; otherwise, an error is + // returned. + Aligner per_series_aligner = 2; + + // The approach to be used to combine time series. Not all reducer + // functions may be applied to all time series, depending on the + // metric type and the value type of the original time + // series. Reduction may change the metric type of value type of the + // time series. + // + // Time series data must be aligned in order to perform cross-time + // series reduction. If `crossSeriesReducer` is specified, then + // `perSeriesAligner` must be specified and not equal `ALIGN_NONE` + // and `alignmentPeriod` must be specified; otherwise, an error is + // returned. + Reducer cross_series_reducer = 4; + + // The set of fields to preserve when `crossSeriesReducer` is + // specified. The `groupByFields` determine how the time series are + // partitioned into subsets prior to applying the aggregation + // function. Each subset contains time series that have the same + // value for each of the grouping fields. Each individual time + // series is a member of exactly one subset. The + // `crossSeriesReducer` is applied to each subset of time series. + // It is not possible to reduce across different resource types, so + // this field implicitly contains `resource.type`. Fields not + // specified in `groupByFields` are aggregated away. If + // `groupByFields` is not specified and all the time series have + // the same resource type, then the time series are aggregated into + // a single output time series. If `crossSeriesReducer` is not + // defined, this field is ignored. + repeated string group_by_fields = 5; +} + +// Describes a ranking-based time series filter. Each input time series is +// ranked with an aligner. The filter lets through up to `num_time_series` time +// series, selecting them based on the relative ranking. +message PickTimeSeriesFilter { + // The value reducers that can be applied to a PickTimeSeriesFilter. + enum Method { + // Not allowed in well-formed requests. + METHOD_UNSPECIFIED = 0; + + // Select the mean of all values. + METHOD_MEAN = 1; + + // Select the maximum value. + METHOD_MAX = 2; + + // Select the minimum value. + METHOD_MIN = 3; + + // Compute the sum of all values. + METHOD_SUM = 4; + + // Select the most recent value. + METHOD_LATEST = 5; + } + + // Describes the ranking directions. + enum Direction { + // Not allowed in well-formed requests. + DIRECTION_UNSPECIFIED = 0; + + // Pass the highest ranking inputs. + TOP = 1; + + // Pass the lowest ranking inputs. + BOTTOM = 2; + } + + // `rankingMethod` is applied to each time series independently to produce the + // value which will be used to compare the time series to other time series. + Method ranking_method = 1; + + // How many time series to return. + int32 num_time_series = 2; + + // How to use the ranking to select time series that pass through the filter. + Direction direction = 3; +} + +// A filter that ranks streams based on their statistical relation to other +// streams in a request. +message StatisticalTimeSeriesFilter { + // The filter methods that can be applied to a stream. + enum Method { + // Not allowed in well-formed requests. + METHOD_UNSPECIFIED = 0; + + // Compute the outlier score of each stream. + METHOD_CLUSTER_OUTLIER = 1; + } + + // `rankingMethod` is applied to a set of time series, and then the produced + // value for each individual time series is used to compare a given time + // series to others. + // These are methods that cannot be applied stream-by-stream, but rather + // require the full context of a request to evaluate time series. + Method ranking_method = 1; + + // How many time series to output. + int32 num_time_series = 2; +} diff --git a/google/monitoring/dashboard/v1/dashboard.proto b/google/monitoring/dashboard/v1/dashboard.proto new file mode 100644 index 000000000..b973f4e47 --- /dev/null +++ b/google/monitoring/dashboard/v1/dashboard.proto @@ -0,0 +1,60 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/monitoring/dashboard/v1/layouts.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; +option java_multiple_files = true; +option java_outer_classname = "DashboardsProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// A Google Stackdriver dashboard. Dashboards define the content and layout +// of pages in the Stackdriver web application. +message Dashboard { + // The resource name of the dashboard. + string name = 1; + + // The mutable, human-readable name. + string display_name = 2; + + // `etag` is used for optimistic concurrency control as a way to help + // prevent simultaneous updates of a policy from overwriting each other. + // An `etag` is returned in the response to `GetDashboard`, and + // users are expected to put that etag in the request to `UpdateDashboard` to + // ensure that their change will be applied to the same version of the + // Dashboard configuration. The field should not be passed during + // dashboard creation. + string etag = 4; + + // A dashboard's root container element that defines the layout style. + oneof layout { + // Content is arranged with a basic layout that re-flows a simple list of + // informational elements like widgets or tiles. + GridLayout grid_layout = 5; + + // The content is divided into equally spaced rows and the widgets are + // arranged horizontally. + RowLayout row_layout = 8; + + // The content is divided into equally spaced columns and the widgets are + // arranged vertically. + ColumnLayout column_layout = 9; + } +} diff --git a/google/monitoring/dashboard/v1/dashboards_service.proto b/google/monitoring/dashboard/v1/dashboards_service.proto new file mode 100644 index 000000000..83dbc2149 --- /dev/null +++ b/google/monitoring/dashboard/v1/dashboards_service.proto @@ -0,0 +1,159 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/monitoring/dashboard/v1/dashboard.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/api/client.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; +option java_multiple_files = true; +option java_outer_classname = "DashboardsServiceProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// Manages Stackdriver dashboards. A dashboard is an arrangement of data display +// widgets in a specific layout. +service DashboardsService { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read," + "https://www.googleapis.com/auth/monitoring.write"; + + // Creates a new custom dashboard. + // + // This method requires the `monitoring.dashboards.create` permission + // on the specified project. For more information, see + // [Google Cloud IAM](https://cloud.google.com/iam). + rpc CreateDashboard(CreateDashboardRequest) returns (Dashboard) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/dashboards" + body: "dashboard" + }; + } + + // Lists the existing dashboards. + // + // This method requires the `monitoring.dashboards.list` permission + // on the specified project. For more information, see + // [Google Cloud IAM](https://cloud.google.com/iam). + rpc ListDashboards(ListDashboardsRequest) returns (ListDashboardsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/dashboards" + }; + } + + // Fetches a specific dashboard. + // + // This method requires the `monitoring.dashboards.get` permission + // on the specified dashboard. For more information, see + // [Google Cloud IAM](https://cloud.google.com/iam). + rpc GetDashboard(GetDashboardRequest) returns (Dashboard) { + option (google.api.http) = { + get: "/v1/{name=projects/*/dashboards/*}" + }; + } + + // Deletes an existing custom dashboard. + // + // This method requires the `monitoring.dashboards.delete` permission + // on the specified dashboard. For more information, see + // [Google Cloud IAM](https://cloud.google.com/iam). + rpc DeleteDashboard(DeleteDashboardRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/dashboards/*}" + }; + } + + // Replaces an existing custom dashboard with a new definition. + // + // This method requires the `monitoring.dashboards.update` permission + // on the specified dashboard. For more information, see + // [Google Cloud IAM](https://cloud.google.com/iam). + rpc UpdateDashboard(UpdateDashboardRequest) returns (Dashboard) { + option (google.api.http) = { + patch: "/v1/{dashboard.name=projects/*/dashboards/*}" + body: "dashboard" + }; + } +} + +// The `CreateDashboard` request. +message CreateDashboardRequest { + // Required. The project on which to execute the request. The format is + // `"projects/{project_id_or_number}"`. The {project_id_or_number} must match + // the dashboard resource name. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The initial dashboard specification. + Dashboard dashboard = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The `ListDashboards` request. +message ListDashboardsRequest { + // Required. The scope of the dashboards to list. A project scope must be + // specified in the form of `"projects/{project_id_or_number}"`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // A positive number that is the maximum number of results to return. + // If unspecified, a default of 1000 is used. + int32 page_size = 2; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return additional results from the previous method call. + string page_token = 3; +} + +// The `ListDashboards` request. +message ListDashboardsResponse { + // The list of requested dashboards. + repeated Dashboard dashboards = 1; + + // If there are more results than have been returned, then this field is set + // to a non-empty value. To see the additional results, + // use that value as `pageToken` in the next call to this method. + string next_page_token = 2; +} + +// The `GetDashboard` request. +message GetDashboardRequest { + // Required. The resource name of the Dashboard. The format is one of + // `"dashboards/{dashboard_id}"` (for system dashboards) or + // `"projects/{project_id_or_number}/dashboards/{dashboard_id}"` + // (for custom dashboards). + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The `DeleteDashboard` request. +message DeleteDashboardRequest { + // Required. The resource name of the Dashboard. The format is + // `"projects/{project_id_or_number}/dashboards/{dashboard_id}"`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The `UpdateDashboard` request. +message UpdateDashboardRequest { + // Required. The dashboard that will replace the existing dashboard. + Dashboard dashboard = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/google/monitoring/dashboard/v1/drilldowns.proto b/google/monitoring/dashboard/v1/drilldowns.proto new file mode 100644 index 000000000..d551b48d0 --- /dev/null +++ b/google/monitoring/dashboard/v1/drilldowns.proto @@ -0,0 +1,24 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; +option java_multiple_files = true; +option java_outer_classname = "DrilldownsProto"; +option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/google/monitoring/dashboard/v1/layouts.proto b/google/monitoring/dashboard/v1/layouts.proto new file mode 100644 index 000000000..278c77050 --- /dev/null +++ b/google/monitoring/dashboard/v1/layouts.proto @@ -0,0 +1,75 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/monitoring/dashboard/v1/widget.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; +option java_multiple_files = true; +option java_outer_classname = "LayoutsProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// A basic layout divides the available space into vertical columns of equal +// width and arranges a list of widgets using a row-first strategy. +message GridLayout { + // The number of columns into which the view's width is divided. If omitted + // or set to zero, a system default will be used while rendering. + int64 columns = 1; + + // The informational elements that are arranged into the columns row-first. + repeated Widget widgets = 2; +} + +// A simplified layout that divides the available space into rows +// and arranges a set of widgets horizontally in each row. +message RowLayout { + // Defines the layout properties and content for a row. + message Row { + // The relative weight of this row. The row weight is used to adjust the + // height of rows on the screen (relative to peers). Greater the weight, + // greater the height of the row on the screen. If omitted, a value + // of 1 is used while rendering. + int64 weight = 1; + + // The display widgets arranged horizontally in this row. + repeated Widget widgets = 2; + } + + // The rows of content to display. + repeated Row rows = 1; +} + +// A simplified layout that divides the available space into vertical columns +// and arranges a set of widgets vertically in each column. +message ColumnLayout { + // Defines the layout properties and content for a column. + message Column { + // The relative weight of this column. The column weight is used to adjust + // the width of columns on the screen (relative to peers). + // Greater the weight, greater the width of the column on the screen. + // If omitted, a value of 1 is used while rendering. + int64 weight = 1; + + // The display widgets arranged vertically in this column. + repeated Widget widgets = 2; + } + + // The columns of content to display. + repeated Column columns = 1; +} diff --git a/google/monitoring/dashboard/v1/metrics.proto b/google/monitoring/dashboard/v1/metrics.proto new file mode 100644 index 000000000..1487c3003 --- /dev/null +++ b/google/monitoring/dashboard/v1/metrics.proto @@ -0,0 +1,166 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/api/field_behavior.proto"; +import "google/monitoring/dashboard/v1/common.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; +option java_multiple_files = true; +option java_outer_classname = "MetricsProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// TimeSeriesQuery collects the set of supported methods for querying time +// series data from the Stackdriver metrics API. +message TimeSeriesQuery { + // Parameters needed to obtain data for the chart. + oneof source { + // Filter parameters to fetch time series. + TimeSeriesFilter time_series_filter = 1; + + // Parameters to fetch a ratio between two time series filters. + TimeSeriesFilterRatio time_series_filter_ratio = 2; + } + + // The unit of data contained in fetched time series. If non-empty, this + // unit will override any unit that accompanies fetched data. The format is + // the same as the + // [`unit`](/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors) + // field in `MetricDescriptor`. + string unit_override = 5; +} + +// A filter that defines a subset of time series data that is displayed in a +// widget. Time series data is fetched using the +// [`ListTimeSeries`](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) +// method. +message TimeSeriesFilter { + // Required. The [monitoring filter](/monitoring/api/v3/filters) that identifies the + // metric types, resources, and projects to query. + string filter = 1 [(google.api.field_behavior) = REQUIRED]; + + // By default, the raw time series data is returned. + // Use this field to combine multiple time series for different views of the + // data. + Aggregation aggregation = 2; + + // Selects an optional time series filter. + oneof output_filter { + // Ranking based time series filter. + PickTimeSeriesFilter pick_time_series_filter = 4; + + // Statistics based time series filter. + StatisticalTimeSeriesFilter statistical_time_series_filter = 5; + } +} + +// A pair of time series filters that define a ratio computation. The output +// time series is the pair-wise division of each aligned element from the +// numerator and denominator time series. +message TimeSeriesFilterRatio { + // Describes a query to build the numerator or denominator of a + // TimeSeriesFilterRatio. + message RatioPart { + // Required. The [monitoring filter](/monitoring/api/v3/filters) that identifies the + // metric types, resources, and projects to query. + string filter = 1 [(google.api.field_behavior) = REQUIRED]; + + // By default, the raw time series data is returned. + // Use this field to combine multiple time series for different views of the + // data. + Aggregation aggregation = 2; + } + + // The numerator of the ratio. + RatioPart numerator = 1; + + // The denominator of the ratio. + RatioPart denominator = 2; + + // Apply a second aggregation after the ratio is computed. + Aggregation secondary_aggregation = 3; + + // Selects an optional filter that is applied to the time series after + // computing the ratio. + oneof output_filter { + // Ranking based time series filter. + PickTimeSeriesFilter pick_time_series_filter = 4; + + // Statistics based time series filter. + StatisticalTimeSeriesFilter statistical_time_series_filter = 5; + } +} + +// Defines a threshold for categorizing time series values. +message Threshold { + // The color suggests an interpretation to the viewer when actual values cross + // the threshold. Comments on each color provide UX guidance on how users can + // be expected to interpret a given state color. + enum Color { + // Color is unspecified. Not allowed in well-formed requests. + COLOR_UNSPECIFIED = 0; + + // Crossing the threshold is "concerning" behavior. + YELLOW = 4; + + // Crossing the threshold is "emergency" behavior. + RED = 6; + } + + // Whether the threshold is considered crossed by an actual value above or + // below its threshold value. + enum Direction { + // Not allowed in well-formed requests. + DIRECTION_UNSPECIFIED = 0; + + // The threshold will be considered crossed if the actual value is above + // the threshold value. + ABOVE = 1; + + // The threshold will be considered crossed if the actual value is below + // the threshold value. + BELOW = 2; + } + + // A label for the threshold. + string label = 1; + + // The value of the threshold. The value should be defined in the native scale + // of the metric. + double value = 2; + + // The state color for this threshold. Color is not allowed in a XyChart. + Color color = 3; + + // The direction for the current threshold. Direction is not allowed in a + // XyChart. + Direction direction = 4; +} + +// Defines the possible types of spark chart supported by the `Scorecard`. +enum SparkChartType { + // Not allowed in well-formed requests. + SPARK_CHART_TYPE_UNSPECIFIED = 0; + + // The sparkline will be rendered as a small line chart. + SPARK_LINE = 1; + + // The sparkbar will be rendered as a small bar chart. + SPARK_BAR = 2; +} diff --git a/google/monitoring/dashboard/v1/monitoring.yaml b/google/monitoring/dashboard/v1/monitoring.yaml new file mode 100644 index 000000000..25f31317f --- /dev/null +++ b/google/monitoring/dashboard/v1/monitoring.yaml @@ -0,0 +1,32 @@ +type: google.api.Service +config_version: 3 +name: monitoring.googleapis.com +title: Stackdriver Monitoring Dashboards API + +apis: +- name: google.monitoring.dashboard.v1.DashboardsService + +documentation: + summary: |- + Manages dashboard configurations used in the Stackdriver UI. + +authentication: + rules: + - selector: 'google.monitoring.dashboard.v1.DashboardsService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.write + - selector: google.monitoring.dashboard.v1.DashboardsService.GetDashboard + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read + - selector: google.monitoring.dashboard.v1.DashboardsService.ListDashboards + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read diff --git a/google/monitoring/dashboard/v1/monitoring_gapic.yaml b/google/monitoring/dashboard/v1/monitoring_gapic.yaml new file mode 100644 index 000000000..d6d185985 --- /dev/null +++ b/google/monitoring/dashboard/v1/monitoring_gapic.yaml @@ -0,0 +1,20 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + java: + package_name: com.google.cloud.monitoring.dashboard.v1 + python: + package_name: google.cloud.monitoring_dashboard.v1.gapic + go: + package_name: cloud.google.com/go/monitoring/dashboard/apiv1 + csharp: + package_name: Google.Cloud.Monitoring.Dashboard.V1 + ruby: + package_name: Google::Cloud::Monitoring::Dashboard::V1 + php: + package_name: Google\Cloud\Monitoring\Dashboard\V1 + nodejs: + package_name: monitoring-dashboard.v1 + domain_layer_location: google-cloud +interfaces: +- name: google.monitoring.dashboard.v1.DashboardsService diff --git a/google/monitoring/dashboard/v1/scorecard.proto b/google/monitoring/dashboard/v1/scorecard.proto new file mode 100644 index 000000000..dd2633bec --- /dev/null +++ b/google/monitoring/dashboard/v1/scorecard.proto @@ -0,0 +1,111 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/monitoring/dashboard/v1/metrics.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; +option java_multiple_files = true; +option java_outer_classname = "ScorecardProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// A widget showing the latest value of a metric, and how this value relates to +// one or more thresholds. +message Scorecard { + // A gauge chart shows where the current value sits within a pre-defined + // range. The upper and lower bounds should define the possible range of + // values for the scorecard's query (inclusive). + message GaugeView { + // The lower bound for this gauge chart. The value of the chart should + // always be greater than or equal to this. + double lower_bound = 1; + + // The upper bound for this gauge chart. The value of the chart should + // always be less than or equal to this. + double upper_bound = 2; + } + + // A sparkChart is a small chart suitable for inclusion in a table-cell or + // inline in text. This message contains the configuration for a sparkChart + // to show up on a Scorecard, showing recent trends of the scorecard's + // timeseries. + message SparkChartView { + // The type of sparkchart to show in this chartView. + SparkChartType spark_chart_type = 1; + + // The lower bound on data point frequency in the chart implemented by + // specifying the minimum alignment period to use in a time series query. + // For example, if the data is published once every 10 minutes it would not + // make sense to fetch and align data at one minute intervals. This field is + // optional and exists only as a hint. + google.protobuf.Duration min_alignment_period = 2; + } + + // Fields for querying time series data from the + // Stackdriver metrics API. + TimeSeriesQuery time_series_query = 1; + + // Defines the optional additional chart shown on the scorecard. If + // neither is included - then a default scorecard is shown. + oneof data_view { + // Will cause the scorecard to show a gauge chart. + GaugeView gauge_view = 4; + + // Will cause the scorecard to show a spark chart. + SparkChartView spark_chart_view = 5; + } + + // The thresholds used to determine the state of the scorecard given the + // time series' current value. For an actual value x, the scorecard is in a + // danger state if x is less than or equal to a danger threshold that triggers + // below, or greater than or equal to a danger threshold that triggers above. + // Similarly, if x is above/below a warning threshold that triggers + // above/below, then the scorecard is in a warning state - unless x also puts + // it in a danger state. (Danger trumps warning.) + // + // As an example, consider a scorecard with the following four thresholds: + // { + // value: 90, + // category: 'DANGER', + // trigger: 'ABOVE', + // }, + // { + // value: 70, + // category: 'WARNING', + // trigger: 'ABOVE', + // }, + // { + // value: 10, + // category: 'DANGER', + // trigger: 'BELOW', + // }, + // { + // value: 20, + // category: 'WARNING', + // trigger: 'BELOW', + // } + // + // Then: values less than or equal to 10 would put the scorecard in a DANGER + // state, values greater than 10 but less than or equal to 20 a WARNING state, + // values strictly between 20 and 70 an OK state, values greater than or equal + // to 70 but less than 90 a WARNING state, and values greater than or equal to + // 90 a DANGER state. + repeated Threshold thresholds = 6; +} diff --git a/google/monitoring/dashboard/v1/service.proto b/google/monitoring/dashboard/v1/service.proto new file mode 100644 index 000000000..1d2151077 --- /dev/null +++ b/google/monitoring/dashboard/v1/service.proto @@ -0,0 +1,24 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; +option java_multiple_files = true; +option java_outer_classname = "ServiceMonitoringProto"; +option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/google/monitoring/dashboard/v1/text.proto b/google/monitoring/dashboard/v1/text.proto new file mode 100644 index 000000000..537daeacb --- /dev/null +++ b/google/monitoring/dashboard/v1/text.proto @@ -0,0 +1,45 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; +option java_multiple_files = true; +option java_outer_classname = "TextProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// A widget that displays textual content. +message Text { + // The format type of the text content. + enum Format { + // Format is unspecified. Defaults to MARKDOWN. + FORMAT_UNSPECIFIED = 0; + + // The text contains Markdown formatting. + MARKDOWN = 1; + + // The text contains no special formatting. + RAW = 2; + } + + // The text content to be displayed. + string content = 1; + + // How the text content is formatted. + Format format = 2; +} diff --git a/google/monitoring/dashboard/v1/widget.proto b/google/monitoring/dashboard/v1/widget.proto new file mode 100644 index 000000000..cb9282af8 --- /dev/null +++ b/google/monitoring/dashboard/v1/widget.proto @@ -0,0 +1,52 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/api/field_behavior.proto"; +import "google/monitoring/dashboard/v1/scorecard.proto"; +import "google/monitoring/dashboard/v1/text.proto"; +import "google/monitoring/dashboard/v1/xychart.proto"; +import "google/protobuf/empty.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; +option java_multiple_files = true; +option java_outer_classname = "WidgetProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// Widget contains a single dashboard component and configuration of how to +// present the component in the dashboard. +message Widget { + // Optional. The title of the widget. + string title = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Content defines the component used to populate the widget. + oneof content { + // A chart of time series data. + XyChart xy_chart = 2; + + // A scorecard summarizing time series data. + Scorecard scorecard = 3; + + // A raw string or markdown displaying textual content. + Text text = 4; + + // A blank space. + google.protobuf.Empty blank = 5; + } +} diff --git a/google/monitoring/dashboard/v1/xychart.proto b/google/monitoring/dashboard/v1/xychart.proto new file mode 100644 index 000000000..3d768b7bc --- /dev/null +++ b/google/monitoring/dashboard/v1/xychart.proto @@ -0,0 +1,147 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/api/field_behavior.proto"; +import "google/monitoring/dashboard/v1/metrics.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; +option java_multiple_files = true; +option java_outer_classname = "XyChartProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// A chart that displays data on a 2D (X and Y axes) plane. +message XyChart { + // Groups a time series query definition with charting options. + message DataSet { + // The types of plotting strategies for data sets. + enum PlotType { + // Plot type is unspecified. The view will default to `LINE`. + PLOT_TYPE_UNSPECIFIED = 0; + + // The data is plotted as a set of lines (one line per series). + LINE = 1; + + // The data is plotted as a set of filled areas (one area per series), + // with the areas stacked vertically (the base of each area is the top of + // its predecessor, and the base of the first area is the X axis). Since + // the areas do not overlap, each is filled with a different opaque color. + STACKED_AREA = 2; + + // The data is plotted as a set of rectangular boxes (one box per series), + // with the boxes stacked vertically (the base of each box is the top of + // its predecessor, and the base of the first box is the X axis). Since + // the boxes do not overlap, each is filled with a different opaque color. + STACKED_BAR = 3; + + // The data is plotted as a heatmap. The series being plotted must have a + // `DISTRIBUTION` value type. The value of each bucket in the distribution + // is displayed as a color. This type is not currently available in the + // Stackdriver Monitoring application. + HEATMAP = 4; + } + + // Fields for querying time series data from the + // Stackdriver metrics API. + TimeSeriesQuery time_series_query = 1; + + // How this data should be plotted on the chart. + PlotType plot_type = 2; + + // A template string for naming `TimeSeries` in the resulting data set. + // This should be a string with interpolations of the form ${label_name}, + // which will resolve to the label's value. + string legend_template = 3; + + // Optional. The lower bound on data point frequency for this data set, implemented by + // specifying the minimum alignment period to use in a time series query + // For example, if the data is published once every 10 minutes, the + // `min_alignment_period` should be at least 10 minutes. It would not + // make sense to fetch and align data at one minute intervals. + google.protobuf.Duration min_alignment_period = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // A chart axis. + message Axis { + // Types of scales used in axes. + enum Scale { + // Scale is unspecified. The view will default to `LINEAR`. + SCALE_UNSPECIFIED = 0; + + // Linear scale. + LINEAR = 1; + + // Logarithmic scale (base 10). + LOG10 = 2; + } + + // The label of the axis. + string label = 1; + + // The axis scale. By default, a linear scale is used. + Scale scale = 2; + } + + // The data displayed in this chart. + repeated DataSet data_sets = 1; + + // The duration used to display a comparison chart. A comparison chart + // simultaneously shows values from two similar-length time periods + // (e.g., week-over-week metrics). + // The duration must be positive, and it can only be applied to charts with + // data sets of LINE plot type. + google.protobuf.Duration timeshift_duration = 4; + + // Threshold lines drawn horizontally across the chart. + repeated Threshold thresholds = 5; + + // The properties applied to the X axis. + Axis x_axis = 6; + + // The properties applied to the Y axis. + Axis y_axis = 7; + + // Display options for the chart. + ChartOptions chart_options = 8; +} + +// Options to control visual rendering of a chart. +message ChartOptions { + // Chart mode options. + enum Mode { + // Mode is unspecified. The view will default to `COLOR`. + MODE_UNSPECIFIED = 0; + + // The chart distinguishes data series using different color. Line + // colors may get reused when there are many lines in the chart. + COLOR = 1; + + // The chart uses the Stackdriver x-ray mode, in which each + // data set is plotted using the same semi-transparent color. + X_RAY = 2; + + // The chart displays statistics such as average, median, 95th percentile, + // and more. + STATS = 3; + } + + // The chart mode. + Mode mode = 1; +} diff --git a/google/monitoring/monitoring.yaml b/google/monitoring/monitoring.yaml deleted file mode 100644 index 026a6b3ee..000000000 --- a/google/monitoring/monitoring.yaml +++ /dev/null @@ -1,159 +0,0 @@ -type: google.api.Service -config_version: 3 -name: monitoring.googleapis.com -title: Stackdriver Monitoring API - -apis: -- name: google.monitoring.v3.AlertPolicyService -- name: google.monitoring.v3.GroupService -- name: google.monitoring.v3.MetricService -- name: google.monitoring.v3.NotificationChannelService -- name: google.monitoring.v3.UptimeCheckService - -types: -- name: google.monitoring.v3.DroppedLabels -- name: google.monitoring.v3.SpanContext - -documentation: - summary: |- - Manages your Stackdriver Monitoring data and configurations. Most projects - must be associated with a Stackdriver account, with a few exceptions as - noted on the individual method pages. - -backend: - rules: - - selector: google.monitoring.v3.AgentTranslationService.CreateCollectdTimeSeries - deadline: 30.0 - - selector: google.monitoring.v3.AlertPolicyService.ListAlertPolicies - deadline: 30.0 - - selector: google.monitoring.v3.AlertPolicyService.GetAlertPolicy - deadline: 30.0 - - selector: google.monitoring.v3.AlertPolicyService.CreateAlertPolicy - deadline: 30.0 - - selector: google.monitoring.v3.AlertPolicyService.DeleteAlertPolicy - deadline: 30.0 - - selector: google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy - deadline: 30.0 - - selector: google.monitoring.v3.GroupService.ListGroups - deadline: 30.0 - - selector: google.monitoring.v3.GroupService.GetGroup - deadline: 30.0 - - selector: google.monitoring.v3.GroupService.CreateGroup - deadline: 30.0 - - selector: google.monitoring.v3.GroupService.UpdateGroup - deadline: 30.0 - - selector: google.monitoring.v3.GroupService.DeleteGroup - deadline: 30.0 - - selector: google.monitoring.v3.GroupService.ListGroupMembers - deadline: 30.0 - - selector: google.monitoring.v3.MetricService.ListMonitoredResourceDescriptors - deadline: 30.0 - - selector: google.monitoring.v3.MetricService.GetMonitoredResourceDescriptor - deadline: 30.0 - - selector: google.monitoring.v3.MetricService.ListMetricDescriptors - deadline: 30.0 - - selector: google.monitoring.v3.MetricService.GetMetricDescriptor - deadline: 30.0 - - selector: google.monitoring.v3.MetricService.CreateMetricDescriptor - deadline: 30.0 - - selector: google.monitoring.v3.MetricService.DeleteMetricDescriptor - deadline: 30.0 - - selector: google.monitoring.v3.MetricService.ListTimeSeries - deadline: 30.0 - - selector: google.monitoring.v3.MetricService.CreateTimeSeries - deadline: 12.0 - - selector: google.monitoring.v3.NotificationChannelService.ListNotificationChannelDescriptors - deadline: 30.0 - - selector: google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor - deadline: 30.0 - - selector: google.monitoring.v3.NotificationChannelService.ListNotificationChannels - deadline: 30.0 - - selector: google.monitoring.v3.NotificationChannelService.GetNotificationChannel - deadline: 30.0 - - selector: google.monitoring.v3.NotificationChannelService.CreateNotificationChannel - deadline: 30.0 - - selector: google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel - deadline: 30.0 - - selector: google.monitoring.v3.NotificationChannelService.DeleteNotificationChannel - deadline: 30.0 - - selector: google.monitoring.v3.NotificationChannelService.SendNotificationChannelVerificationCode - deadline: 30.0 - - selector: google.monitoring.v3.NotificationChannelService.GetNotificationChannelVerificationCode - deadline: 30.0 - - selector: google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel - deadline: 30.0 - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/monitoring - - selector: |- - google.monitoring.v3.MetricService.GetMetricDescriptor, - google.monitoring.v3.MetricService.GetMonitoredResourceDescriptor, - google.monitoring.v3.MetricService.ListMetricDescriptors, - google.monitoring.v3.MetricService.ListMonitoredResourceDescriptors - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/monitoring, - https://www.googleapis.com/auth/monitoring.read, - https://www.googleapis.com/auth/monitoring.write - - selector: |- - google.monitoring.v3.NotificationChannelService.GetNotificationChannel, - google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor, - google.monitoring.v3.NotificationChannelService.ListNotificationChannelDescriptors, - google.monitoring.v3.NotificationChannelService.ListNotificationChannels - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/monitoring, - https://www.googleapis.com/auth/monitoring.read - - selector: |- - google.monitoring.v3.GroupService.GetGroup, - google.monitoring.v3.GroupService.ListGroupMembers, - google.monitoring.v3.GroupService.ListGroups - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/monitoring, - https://www.googleapis.com/auth/monitoring.read - - selector: |- - google.monitoring.v3.UptimeCheckService.GetUptimeCheckConfig, - google.monitoring.v3.UptimeCheckService.ListUptimeCheckConfigs, - google.monitoring.v3.UptimeCheckService.ListUptimeCheckIps - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/monitoring, - https://www.googleapis.com/auth/monitoring.read - - selector: |- - google.monitoring.v3.AlertPolicyService.GetAlertPolicy, - google.monitoring.v3.AlertPolicyService.ListAlertPolicies - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/monitoring, - https://www.googleapis.com/auth/monitoring.read - - selector: |- - google.monitoring.v3.MetricService.CreateMetricDescriptor, - google.monitoring.v3.MetricService.CreateTimeSeries - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/monitoring, - https://www.googleapis.com/auth/monitoring.write - - selector: google.monitoring.v3.AgentTranslationService.CreateCollectdTimeSeries - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/monitoring, - https://www.googleapis.com/auth/monitoring.write - - selector: google.monitoring.v3.MetricService.ListTimeSeries - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/monitoring, - https://www.googleapis.com/auth/monitoring.read diff --git a/google/monitoring/v3/BUILD.bazel b/google/monitoring/v3/BUILD.bazel index 8294d5250..1808da10d 100644 --- a/google/monitoring/v3/BUILD.bazel +++ b/google/monitoring/v3/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -20,18 +23,24 @@ proto_library( "mutation_record.proto", "notification.proto", "notification_service.proto", + "service.proto", + "service_service.proto", "span_context.proto", "uptime.proto", "uptime_service.proto", ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/api:distribution_proto", "//google/api:label_proto", + "//google/api:launch_stage_proto", "//google/api:metric_proto", "//google/api:monitored_resource_proto", - "//google/longrunning:operations_proto", "//google/rpc:status_proto", + "//google/type:calendar_period_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:field_mask_proto", @@ -43,7 +52,10 @@ proto_library( proto_library_with_info( name = "monitoring_proto_with_info", - deps = [":monitoring_proto"], + deps = [ + ":monitoring_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -51,18 +63,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "monitoring_java_proto", deps = [":monitoring_proto"], @@ -71,55 +78,46 @@ java_proto_library( java_grpc_library( name = "monitoring_java_grpc", srcs = [":monitoring_proto"], - deps = [":monitoring_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "monitoring_resource_name_java_proto", - gapic_yaml = "monitoring_gapic.yaml", - deps = [":monitoring_proto"], + deps = [":monitoring_java_proto"], ) java_gapic_library( name = "monitoring_java_gapic", src = ":monitoring_proto_with_info", gapic_yaml = "monitoring_gapic.yaml", - service_yaml = "//google/monitoring:monitoring.yaml", - test_deps = [":monitoring_java_grpc"], + package = "google.monitoring.v3", + service_yaml = "monitoring.yaml", + test_deps = [ + ":monitoring_java_grpc", + ], deps = [ ":monitoring_java_proto", - ":monitoring_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + "//google/api:api_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":monitoring_java_gapic_test", +java_gapic_test( + name = "monitoring_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.monitoring.v3.AlertPolicyServiceClientTest", + "com.google.cloud.monitoring.v3.GroupServiceClientTest", + "com.google.cloud.monitoring.v3.MetricServiceClientTest", + "com.google.cloud.monitoring.v3.NotificationChannelServiceClientTest", + "com.google.cloud.monitoring.v3.ServiceMonitoringServiceClientTest", + "com.google.cloud.monitoring.v3.UptimeCheckServiceClientTest", ], -) for test_name in [ - "com.google.cloud.monitoring.v3.AlertPolicyServiceClientTest", - "com.google.cloud.monitoring.v3.GroupServiceClientTest", - "com.google.cloud.monitoring.v3.MetricServiceClientTest", - "com.google.cloud.monitoring.v3.NotificationChannelServiceClientTest", - "com.google.cloud.monitoring.v3.UptimeCheckServiceClientTest", -]] + runtime_deps = [":monitoring_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-monitoring-v3-java", - client_deps = [":monitoring_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":monitoring_java_gapic_test"], - grpc_deps = [":monitoring_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":monitoring_java_gapic", + ":monitoring_java_grpc", ":monitoring_java_proto", ":monitoring_proto", - ":monitoring_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -127,10 +125,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -140,21 +138,23 @@ go_proto_library( protos = [":monitoring_proto"], deps = [ "//google/api:annotations_go_proto", + "//google/api:api_go_proto", "//google/api:distribution_go_proto", "//google/api:label_go_proto", "//google/api:metric_go_proto", "//google/api:monitoredres_go_proto", "//google/longrunning:longrunning_go_proto", "//google/rpc:status_go_proto", + "//google/type:calendar_period_go_proto", ], ) go_gapic_library( name = "monitoring_go_gapic", - src = ":monitoring_proto_with_info", - gapic_yaml = "monitoring_gapic.yaml", - importpath = "cloud.google.com/go/monitoring/apiv3", - service_yaml = "//google/monitoring:monitoring.yaml", + srcs = [":monitoring_proto_with_info"], + grpc_service_config = "monitoring_grpc_service_config.json", + importpath = "cloud.google.com/go/monitoring/apiv3;monitoring", + service_yaml = "monitoring.yaml", deps = [ ":monitoring_go_proto", "//google/api:metric_go_proto", @@ -169,17 +169,244 @@ go_test( importpath = "cloud.google.com/go/monitoring/apiv3", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-monitoring-v3-go", deps = [ ":monitoring_go_gapic", - ":monitoring_go_gapic_srcjar-smoke-test.srcjar", ":monitoring_go_gapic_srcjar-test.srcjar", ":monitoring_go_proto", ], ) +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "monitoring_moved_proto", + srcs = [":monitoring_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/api:distribution_proto", + "//google/api:label_proto", + "//google/api:launch_stage_proto", + "//google/api:metric_proto", + "//google/api:monitored_resource_proto", + "//google/rpc:status_proto", + "//google/type:calendar_period_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "monitoring_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":monitoring_moved_proto"], +) + +py_grpc_library( + name = "monitoring_py_grpc", + srcs = [":monitoring_moved_proto"], + deps = [":monitoring_py_proto"], +) + +py_gapic_library( + name = "monitoring_py_gapic", + src = ":monitoring_proto_with_info", + gapic_yaml = "monitoring_gapic.yaml", + package = "google.monitoring.v3", + service_yaml = "monitoring.yaml", + deps = [ + ":monitoring_py_grpc", + ":monitoring_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "monitoring-v3-py", + deps = [ + ":monitoring_py_gapic", + ":monitoring_py_grpc", + ":monitoring_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "monitoring_php_proto", + deps = [":monitoring_proto"], +) + +php_grpc_library( + name = "monitoring_php_grpc", + srcs = [":monitoring_proto"], + deps = [":monitoring_php_proto"], +) + +php_gapic_library( + name = "monitoring_php_gapic", + src = ":monitoring_proto_with_info", + gapic_yaml = "monitoring_gapic.yaml", + package = "google.monitoring.v3", + service_yaml = "monitoring.yaml", + deps = [ + ":monitoring_php_grpc", + ":monitoring_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-monitoring-v3-php", + deps = [ + ":monitoring_php_gapic", + ":monitoring_php_grpc", + ":monitoring_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "monitoring_nodejs_gapic", + src = ":monitoring_proto_with_info", + gapic_yaml = "monitoring_gapic.yaml", + package = "google.monitoring.v3", + service_yaml = "monitoring.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "monitoring-v3-nodejs", + deps = [ + ":monitoring_nodejs_gapic", + ":monitoring_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "monitoring_ruby_proto", + deps = [":monitoring_proto"], +) + +ruby_grpc_library( + name = "monitoring_ruby_grpc", + srcs = [":monitoring_proto"], + deps = [":monitoring_ruby_proto"], +) + +ruby_gapic_library( + name = "monitoring_ruby_gapic", + src = ":monitoring_proto_with_info", + gapic_yaml = "monitoring_gapic.yaml", + package = "google.monitoring.v3", + service_yaml = "monitoring.yaml", + deps = [ + ":monitoring_ruby_grpc", + ":monitoring_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-monitoring-v3-ruby", + deps = [ + ":monitoring_ruby_gapic", + ":monitoring_ruby_grpc", + ":monitoring_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "monitoring_csharp_proto", + deps = [":monitoring_proto"], +) + +csharp_grpc_library( + name = "monitoring_csharp_grpc", + srcs = [":monitoring_proto"], + deps = [":monitoring_csharp_proto"], +) + +csharp_gapic_library( + name = "monitoring_csharp_gapic", + src = ":monitoring_proto_with_info", + gapic_yaml = "monitoring_gapic.yaml", + package = "google.monitoring.v3", + service_yaml = "monitoring.yaml", + deps = [ + ":monitoring_csharp_grpc", + ":monitoring_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-monitoring-v3-csharp", + deps = [ + ":monitoring_csharp_gapic", + ":monitoring_csharp_grpc", + ":monitoring_csharp_proto", + ], +) + ############################################################################## # C++ ############################################################################## @@ -197,6 +424,8 @@ cc_proto_library( cc_grpc_library( name = "monitoring_cc_grpc", srcs = [":monitoring_proto"], - deps = [":monitoring_cc_proto"], + generate_mocks = True, grpc_only = True, + deps = [":monitoring_cc_proto"], ) + diff --git a/google/monitoring/v3/alert.proto b/google/monitoring/v3/alert.proto index 3b3e1dca2..6662304d7 100644 --- a/google/monitoring/v3/alert.proto +++ b/google/monitoring/v3/alert.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,17 +11,17 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; -import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/mutation_record.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -29,12 +29,21 @@ option java_multiple_files = true; option java_outer_classname = "AlertProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A description of the conditions under which some aspect of your system is // considered to be "unhealthy" and the ways to notify people or services about // this state. For an overview of alert policies, see -// [Introduction to Alerting](/monitoring/alerts/). +// [Introduction to Alerting](https://cloud.google.com/monitoring/alerts/). message AlertPolicy { + option (google.api.resource) = { + type: "monitoring.googleapis.com/AlertPolicy" + pattern: "projects/{project}/alertPolicies/{alert_policy}" + pattern: "organizations/{organization}/alertPolicies/{alert_policy}" + pattern: "folders/{folder}/alertPolicies/{alert_policy}" + pattern: "*" + }; + // A content string and a MIME type that describes the content string's // format. message Documentation { @@ -54,6 +63,14 @@ message AlertPolicy { // should open an incident. If a condition evaluates to true, it signifies // that something is wrong. message Condition { + option (google.api.resource) = { + type: "monitoring.googleapis.com/AlertPolicyCondition" + pattern: "projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}" + pattern: "organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}" + pattern: "folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}" + pattern: "*" + }; + // Specifies how many time series must fail a predicate to trigger a // condition. If not specified, then a `{count: 1}` trigger is used. message Trigger { @@ -72,13 +89,13 @@ message AlertPolicy { // A condition type that compares a collection of time series // against a threshold. message MetricThreshold { - // A [filter](/monitoring/api/v3/filters) that + // A [filter](https://cloud.google.com/monitoring/api/v3/filters) that // identifies which time series should be compared with the threshold. // // The filter is similar to the one that is specified in the - // [`MetricService.ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that - // call is useful to verify the time series that will be retrieved / + // [`ListTimeSeries` + // request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) + // (that call is useful to verify the time series that will be retrieved / // processed) and must specify the metric type and optionally may contain // restrictions on resource type, resource labels, and metric labels. // This field may not exceed 2048 Unicode characters in length. @@ -91,24 +108,19 @@ message AlertPolicy { // members of a group of resrouces). Multiple aggregations // are applied in the order specified. // - // This field is similar to the one in the - // [`MetricService.ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It - // is advisable to use the `ListTimeSeries` method when debugging this + // This field is similar to the one in the [`ListTimeSeries` + // request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + // It is advisable to use the `ListTimeSeries` method when debugging this // field. repeated Aggregation aggregations = 8; - // A [filter](/monitoring/api/v3/filters) that identifies a time - // series that should be used as the denominator of a ratio that will be - // compared with the threshold. If a `denominator_filter` is specified, - // the time series specified by the `filter` field will be used as the - // numerator. + // A [filter](https://cloud.google.com/monitoring/api/v3/filters) that + // identifies a time series that should be used as the denominator of a + // ratio that will be compared with the threshold. If a + // `denominator_filter` is specified, the time series specified by the + // `filter` field will be used as the numerator. // - // The filter is similar to the one that is specified in the - // [`MetricService.ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that - // call is useful to verify the time series that will be retrieved / - // processed) and must specify the metric type and optionally may contain + // The filter must specify the metric type and optionally may contain // restrictions on resource type, resource labels, and metric labels. // This field may not exceed 2048 Unicode characters in length. string denominator_filter = 9; @@ -123,12 +135,6 @@ message AlertPolicy { // When computing ratios, the `aggregations` and // `denominator_aggregations` fields must use the same alignment period // and produce time series that have the same periodicity and labels. - // - // This field is similar to the one in the - // [`MetricService.ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It - // is advisable to use the `ListTimeSeries` method when debugging this - // field. repeated Aggregation denominator_aggregations = 10; // The comparison to apply between the time series (indicated by `filter` @@ -169,13 +175,13 @@ message AlertPolicy { // when a time series for the specified metric of a monitored // resource does not include any data in the specified `duration`. message MetricAbsence { - // A [filter](/monitoring/api/v3/filters) that + // A [filter](https://cloud.google.com/monitoring/api/v3/filters) that // identifies which time series should be compared with the threshold. // // The filter is similar to the one that is specified in the - // [`MetricService.ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that - // call is useful to verify the time series that will be retrieved / + // [`ListTimeSeries` + // request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) + // (that call is useful to verify the time series that will be retrieved / // processed) and must specify the metric type and optionally may contain // restrictions on resource type, resource labels, and metric labels. // This field may not exceed 2048 Unicode characters in length. @@ -188,10 +194,9 @@ message AlertPolicy { // members of a group of resrouces). Multiple aggregations // are applied in the order specified. // - // This field is similar to the - // one in the [`MetricService.ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It - // is advisable to use the `ListTimeSeries` method when debugging this + // This field is similar to the one in the [`ListTimeSeries` + // request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + // It is advisable to use the `ListTimeSeries` method when debugging this // field. repeated Aggregation aggregations = 5; @@ -211,9 +216,9 @@ message AlertPolicy { } // Required if the condition exists. The unique resource name for this - // condition. Its syntax is: + // condition. Its format is: // - // projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] + // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] // // `[CONDITION_ID]` is assigned by Stackdriver Monitoring when the // condition is created as part of a new or updated alerting policy. @@ -259,7 +264,7 @@ message AlertPolicy { COMBINE_UNSPECIFIED = 0; // Combine conditions using the logical `AND` operator. An - // incident is created only if all conditions are met + // incident is created only if all the conditions are met // simultaneously. This combiner is satisfied if all conditions are // met, even if they are met on completely different resources. AND = 1; @@ -275,9 +280,9 @@ message AlertPolicy { } // Required if the policy exists. The resource name for this policy. The - // syntax is: + // format is: // - // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] // // `[ALERT_POLICY_ID]` is assigned by Stackdriver Monitoring when the policy // is created. When calling the @@ -312,10 +317,14 @@ message AlertPolicy { // OR according to the `combiner` field. If the combined conditions evaluate // to true, then an incident is created. A policy can have from one to six // conditions. + // If `condition_time_series_query_language` is present, it must be the only + // `condition`. repeated Condition conditions = 12; - // How to combine the results of multiple conditions - // to determine if an incident should be opened. + // How to combine the results of multiple conditions to determine if an + // incident should be opened. + // If `condition_time_series_query_language` is present, this must be + // `COMBINE_UNSPECIFIED`. ConditionCombinerType combiner = 6; // Whether or not the policy is enabled. On write, the default interpretation @@ -325,6 +334,10 @@ message AlertPolicy { // a field projection has been specified that strips it out. google.protobuf.BoolValue enabled = 17; + // Read-only description of how the alert policy is invalid. OK if the alert + // policy is valid. If not OK, the alert policy will not generate incidents. + google.rpc.Status validity = 18; + // Identifies the notification channels to which notifications should be sent // when incidents are opened or closed or when new violations occur on // an already opened incident. Each element of this array corresponds to @@ -332,9 +345,9 @@ message AlertPolicy { // [`NotificationChannel`][google.monitoring.v3.NotificationChannel] // objects that are returned from the [`ListNotificationChannels`] // [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] - // method. The syntax of the entries in this field is: + // method. The format of the entries in this field is: // - // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] repeated string notification_channels = 14; // A read-only record of the creation of the alerting policy. If provided diff --git a/google/monitoring/v3/alert_service.proto b/google/monitoring/v3/alert_service.proto index 0dedca113..ea0c5ada3 100644 --- a/google/monitoring/v3/alert_service.proto +++ b/google/monitoring/v3/alert_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/alert.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -28,6 +30,7 @@ option java_multiple_files = true; option java_outer_classname = "AlertServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The AlertPolicyService API is used to manage (list, create, delete, // edit) alert policies in Stackdriver Monitoring. An alerting policy is @@ -39,12 +42,18 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // which can be reached by clicking the "Monitoring" tab in // [Cloud Console](https://console.cloud.google.com/). service AlertPolicyService { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read"; + // Lists the existing alerting policies for the project. - rpc ListAlertPolicies(ListAlertPoliciesRequest) - returns (ListAlertPoliciesResponse) { + rpc ListAlertPolicies(ListAlertPoliciesRequest) returns (ListAlertPoliciesResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/alertPolicies" }; + option (google.api.method_signature) = "name"; } // Gets a single alerting policy. @@ -52,6 +61,7 @@ service AlertPolicyService { option (google.api.http) = { get: "/v3/{name=projects/*/alertPolicies/*}" }; + option (google.api.method_signature) = "name"; } // Creates a new alerting policy. @@ -60,14 +70,15 @@ service AlertPolicyService { post: "/v3/{name=projects/*}/alertPolicies" body: "alert_policy" }; + option (google.api.method_signature) = "name,alert_policy"; } // Deletes an alerting policy. - rpc DeleteAlertPolicy(DeleteAlertPolicyRequest) - returns (google.protobuf.Empty) { + rpc DeleteAlertPolicy(DeleteAlertPolicyRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/alertPolicies/*}" }; + option (google.api.method_signature) = "name"; } // Updates an alerting policy. You can either replace the entire policy with @@ -79,53 +90,71 @@ service AlertPolicyService { patch: "/v3/{alert_policy.name=projects/*/alertPolicies/*}" body: "alert_policy" }; + option (google.api.method_signature) = "update_mask,alert_policy"; } } // The protocol for the `CreateAlertPolicy` request. message CreateAlertPolicyRequest { - // The project in which to create the alerting policy. The format is - // `projects/[PROJECT_ID]`. + // Required. The project in which to create the alerting policy. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] // // Note that this field names the parent container in which the alerting // policy will be written, not the name of the created policy. The alerting // policy that is returned will have a name that contains a normalized // representation of this name as a prefix but adds a suffix of the form - // `/alertPolicies/[POLICY_ID]`, identifying the policy in the container. - string name = 3; - - // The requested alerting policy. You should omit the `name` field in this + // `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the + // container. + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/AlertPolicy" + } + ]; + + // Required. The requested alerting policy. You should omit the `name` field in this // policy. The name will be returned in the new policy, including - // a new [ALERT_POLICY_ID] value. - AlertPolicy alert_policy = 2; + // a new `[ALERT_POLICY_ID]` value. + AlertPolicy alert_policy = 2 [(google.api.field_behavior) = REQUIRED]; } // The protocol for the `GetAlertPolicy` request. message GetAlertPolicyRequest { - // The alerting policy to retrieve. The format is + // Required. The alerting policy to retrieve. The format is: // - // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] - string name = 3; + // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/AlertPolicy" + } + ]; } // The protocol for the `ListAlertPolicies` request. message ListAlertPoliciesRequest { - // The project whose alert policies are to be listed. The format is + // Required. The project whose alert policies are to be listed. The format is: // - // projects/[PROJECT_ID] + // projects/[PROJECT_ID_OR_NUMBER] // // Note that this field names the parent container in which the alerting // policies to be listed are stored. To retrieve a single alerting policy // by name, use the // [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] // operation, instead. - string name = 4; + string name = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/AlertPolicy" + } + ]; // If provided, this field specifies the criteria that must be met by // alert policies to be included in the response. // // For more details, see [sorting and - // filtering](/monitoring/api/v3/sorting-and-filtering). + // filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). string filter = 5; // A comma-separated list of fields by which to sort the result. Supports @@ -133,7 +162,7 @@ message ListAlertPoliciesRequest { // prefixed with a minus sign to sort by the field in descending order. // // For more details, see [sorting and - // filtering](/monitoring/api/v3/sorting-and-filtering). + // filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). string order_by = 6; // The maximum number of results to return in a single response. @@ -152,7 +181,7 @@ message ListAlertPoliciesResponse { // If there might be more results than were returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } @@ -185,15 +214,20 @@ message UpdateAlertPolicyRequest { // fields listed in `update_mask`. // If `update_mask` is not empty, any fields in this policy that are // not in `update_mask` are ignored. - AlertPolicy alert_policy = 3; + AlertPolicy alert_policy = 3 [(google.api.field_behavior) = REQUIRED]; } // The protocol for the `DeleteAlertPolicy` request. message DeleteAlertPolicyRequest { - // The alerting policy to delete. The format is: + // Required. The alerting policy to delete. The format is: // - // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] // // For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/AlertPolicy" + } + ]; } diff --git a/google/monitoring/v3/artman_monitoring.yaml b/google/monitoring/v3/artman_monitoring.yaml new file mode 100644 index 000000000..4bc176dd1 --- /dev/null +++ b/google/monitoring/v3/artman_monitoring.yaml @@ -0,0 +1,34 @@ +common: + api_name: monitoring + api_version: v3 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - . + service_yaml: monitoring.yaml + gapic_yaml: monitoring_gapic.yaml +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: php_gapic + type: GAPIC + language: PHP +- name: go_gapic + type: GAPIC + language: GO +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: csharp_gapic + type: GAPIC + language: CSHARP diff --git a/google/monitoring/v3/common.proto b/google/monitoring/v3/common.proto index 73ca2c4ad..f1b38c234 100644 --- a/google/monitoring/v3/common.proto +++ b/google/monitoring/v3/common.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,11 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; -import "google/api/annotations.proto"; import "google/api/distribution.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -28,6 +26,7 @@ option java_multiple_files = true; option java_outer_classname = "CommonProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A single strongly-typed value. message TypedValue { @@ -52,9 +51,24 @@ message TypedValue { } } -// A time interval extending just after a start time through an end time. -// If the start time is the same as the end time, then the interval -// represents a single point in time. +// A closed time interval. It extends from the start time to the end time, and includes both: `[startTime, endTime]`. Valid time intervals depend on the [`MetricKind`](/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) of the metric value. In no case can the end time be earlier than the start time. +// +// * For a `GAUGE` metric, the `startTime` value is technically optional; if +// no value is specified, the start time defaults to the value of the +// end time, and the interval represents a single point in time. If both +// start and end times are specified, they must be identical. Such an +// interval is valid only for `GAUGE` metrics, which are point-in-time +// measurements. +// +// * For `DELTA` and `CUMULATIVE` metrics, the start time must be earlier +// than the end time. +// +// * In all cases, the start time of the next interval must be +// at least a millisecond after the end time of the previous interval. +// Because the interval is closed, if the start time of a new interval +// is the same as the end time of the previous interval, data written +// at the new start time could overwrite data written at the previous +// end time. message TimeInterval { // Required. The end of the time interval. google.protobuf.Timestamp end_time = 2; @@ -65,329 +79,372 @@ message TimeInterval { google.protobuf.Timestamp start_time = 1; } -// Describes how to combine multiple time series to provide different views of -// the data. Aggregation consists of an alignment step on individual time -// series (`alignment_period` and `per_series_aligner`) followed by an optional -// reduction step of the data across the aligned time series -// (`cross_series_reducer` and `group_by_fields`). For more details, see -// [Aggregation](/monitoring/api/learn_more#aggregation). +// Describes how to combine multiple time series to provide a different view of +// the data. Aggregation of time series is done in two steps. First, each time +// series in the set is _aligned_ to the same time interval boundaries, then the +// set of time series is optionally _reduced_ in number. +// +// Alignment consists of applying the `per_series_aligner` operation +// to each time series after its data has been divided into regular +// `alignment_period` time intervals. This process takes _all_ of the data +// points in an alignment period, applies a mathematical transformation such as +// averaging, minimum, maximum, delta, etc., and converts them into a single +// data point per period. +// +// Reduction is when the aligned and transformed time series can optionally be +// combined, reducing the number of time series through similar mathematical +// transformations. Reduction involves applying a `cross_series_reducer` to +// all the time series, optionally sorting the time series into subsets with +// `group_by_fields`, and applying the reducer to each subset. +// +// The raw time series data can contain a huge amount of information from +// multiple sources. Alignment and reduction transforms this mass of data into +// a more manageable and representative collection of data, for example "the +// 95% latency across the average of all tasks in a cluster". This +// representative data can be more easily graphed and comprehended, and the +// individual time series data is still available for later drilldown. For more +// details, see [Filtering and +// aggregation](https://cloud.google.com/monitoring/api/v3/aggregation). message Aggregation { - // The Aligner describes how to bring the data points in a single - // time series into temporal alignment. + // The `Aligner` specifies the operation that will be applied to the data + // points in each alignment period in a time series. Except for + // `ALIGN_NONE`, which specifies that no operation be applied, each alignment + // operation replaces the set of data values in each alignment period with + // a single value: the result of applying the operation to the data values. + // An aligned time series has a single data value at the end of each + // `alignment_period`. + // + // An alignment operation can change the data type of the values, too. For + // example, if you apply a counting operation to boolean values, the data + // `value_type` in the original time series is `BOOLEAN`, but the `value_type` + // in the aligned result is `INT64`. enum Aligner { - // No alignment. Raw data is returned. Not valid if cross-time - // series reduction is requested. The value type of the result is - // the same as the value type of the input. + // No alignment. Raw data is returned. Not valid if cross-series reduction + // is requested. The `value_type` of the result is the same as the + // `value_type` of the input. ALIGN_NONE = 0; - // Align and convert to delta metric type. This alignment is valid - // for cumulative metrics and delta metrics. Aligning an existing - // delta metric to a delta metric requires that the alignment - // period be increased. The value type of the result is the same - // as the value type of the input. + // Align and convert to + // [DELTA][google.api.MetricDescriptor.MetricKind.DELTA]. + // The output is `delta = y1 - y0`. // - // One can think of this aligner as a rate but without time units; that - // is, the output is conceptually (second_point - first_point). + // This alignment is valid for + // [CUMULATIVE][google.api.MetricDescriptor.MetricKind.CUMULATIVE] and + // `DELTA` metrics. If the selected alignment period results in periods + // with no data, then the aligned value for such a period is created by + // interpolation. The `value_type` of the aligned result is the same as + // the `value_type` of the input. ALIGN_DELTA = 1; - // Align and convert to a rate. This alignment is valid for - // cumulative metrics and delta metrics with numeric values. The output is a - // gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align and convert to a rate. The result is computed as + // `rate = (y1 - y0)/(t1 - t0)`, or "delta over time". + // Think of this aligner as providing the slope of the line that passes + // through the value at the start and at the end of the `alignment_period`. // - // One can think of this aligner as conceptually providing the slope of - // the line that passes through the value at the start and end of the - // window. In other words, this is conceptually ((y1 - y0)/(t1 - t0)), - // and the output unit is one that has a "/time" dimension. + // This aligner is valid for `CUMULATIVE` + // and `DELTA` metrics with numeric values. If the selected alignment + // period results in periods with no data, then the aligned value for + // such a period is created by interpolation. The output is a `GAUGE` + // metric with `value_type` `DOUBLE`. // - // If, by rate, you are looking for percentage change, see the - // `ALIGN_PERCENT_CHANGE` aligner option. + // If, by "rate", you mean "percentage change", see the + // `ALIGN_PERCENT_CHANGE` aligner instead. ALIGN_RATE = 2; - // Align by interpolating between adjacent points around the - // period boundary. This alignment is valid for gauge - // metrics with numeric values. The value type of the result is the same - // as the value type of the input. + // Align by interpolating between adjacent points around the alignment + // period boundary. This aligner is valid for `GAUGE` metrics with + // numeric values. The `value_type` of the aligned result is the same as the + // `value_type` of the input. ALIGN_INTERPOLATE = 3; - // Align by shifting the oldest data point before the period - // boundary to the boundary. This alignment is valid for gauge - // metrics. The value type of the result is the same as the - // value type of the input. + // Align by moving the most recent data point before the end of the + // alignment period to the boundary at the end of the alignment + // period. This aligner is valid for `GAUGE` metrics. The `value_type` of + // the aligned result is the same as the `value_type` of the input. ALIGN_NEXT_OLDER = 4; - // Align time series via aggregation. The resulting data point in - // the alignment period is the minimum of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // values. The value type of the result is the same as the value - // type of the input. + // Align the time series by returning the minimum value in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric values. The `value_type` of the aligned result is the same as + // the `value_type` of the input. ALIGN_MIN = 10; - // Align time series via aggregation. The resulting data point in - // the alignment period is the maximum of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // values. The value type of the result is the same as the value - // type of the input. + // Align the time series by returning the maximum value in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric values. The `value_type` of the aligned result is the same as + // the `value_type` of the input. ALIGN_MAX = 11; - // Align time series via aggregation. The resulting data point in - // the alignment period is the average or arithmetic mean of all - // data points in the period. This alignment is valid for gauge and delta - // metrics with numeric values. The value type of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by returning the mean value in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric values. The `value_type` of the aligned result is `DOUBLE`. ALIGN_MEAN = 12; - // Align time series via aggregation. The resulting data point in - // the alignment period is the count of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // or Boolean values. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Align the time series by returning the number of values in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric or Boolean values. The `value_type` of the aligned result is + // `INT64`. ALIGN_COUNT = 13; - // Align time series via aggregation. The resulting data point in - // the alignment period is the sum of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // and distribution values. The value type of the output is the - // same as the value type of the input. + // Align the time series by returning the sum of the values in each + // alignment period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with numeric and distribution values. The `value_type` of the + // aligned result is the same as the `value_type` of the input. ALIGN_SUM = 14; - // Align time series via aggregation. The resulting data point in - // the alignment period is the standard deviation of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with numeric values. The value type of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by returning the standard deviation of the values + // in each alignment period. This aligner is valid for `GAUGE` and + // `DELTA` metrics with numeric values. The `value_type` of the output is + // `DOUBLE`. ALIGN_STDDEV = 15; - // Align time series via aggregation. The resulting data point in - // the alignment period is the count of True-valued data points in the - // period. This alignment is valid for gauge metrics with - // Boolean values. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Align the time series by returning the number of `True` values in + // each alignment period. This aligner is valid for `GAUGE` metrics with + // Boolean values. The `value_type` of the output is `INT64`. ALIGN_COUNT_TRUE = 16; - // Align time series via aggregation. The resulting data point in - // the alignment period is the count of False-valued data points in the - // period. This alignment is valid for gauge metrics with - // Boolean values. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Align the time series by returning the number of `False` values in + // each alignment period. This aligner is valid for `GAUGE` metrics with + // Boolean values. The `value_type` of the output is `INT64`. ALIGN_COUNT_FALSE = 24; - // Align time series via aggregation. The resulting data point in - // the alignment period is the fraction of True-valued data points in the - // period. This alignment is valid for gauge metrics with Boolean values. - // The output value is in the range [0, 1] and has value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by returning the ratio of the number of `True` + // values to the total number of values in each alignment period. This + // aligner is valid for `GAUGE` metrics with Boolean values. The output + // value is in the range [0.0, 1.0] and has `value_type` `DOUBLE`. ALIGN_FRACTION_TRUE = 17; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 99th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 99th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_99 = 18; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 95th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 95th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_95 = 19; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 50th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 50th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_50 = 20; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 5th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 5th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_05 = 21; - // Align and convert to a percentage change. This alignment is valid for - // gauge and delta metrics with numeric values. This alignment conceptually - // computes the equivalent of "((current - previous)/previous)*100" - // where previous value is determined based on the alignmentPeriod. - // In the event that previous is 0 the calculated value is infinity with the - // exception that if both (current - previous) and previous are 0 the - // calculated value is 0. - // A 10 minute moving mean is computed at each point of the time window + // Align and convert to a percentage change. This aligner is valid for + // `GAUGE` and `DELTA` metrics with numeric values. This alignment returns + // `((current - previous)/previous) * 100`, where the value of `previous` is + // determined based on the `alignment_period`. + // + // If the values of `current` and `previous` are both 0, then the returned + // value is 0. If only `previous` is 0, the returned value is infinity. + // + // A 10-minute moving mean is computed at each point of the alignment period // prior to the above calculation to smooth the metric and prevent false - // positives from very short lived spikes. - // Only applicable for data that is >= 0. Any values < 0 are treated as - // no data. While delta metrics are accepted by this alignment special care - // should be taken that the values for the metric will always be positive. - // The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // positives from very short-lived spikes. The moving mean is only + // applicable for data whose values are `>= 0`. Any values `< 0` are + // treated as a missing datapoint, and are ignored. While `DELTA` + // metrics are accepted by this alignment, special care should be taken that + // the values for the metric will always be positive. The output is a + // `GAUGE` metric with `value_type` `DOUBLE`. ALIGN_PERCENT_CHANGE = 23; } - // A Reducer describes how to aggregate data points from multiple - // time series into a single time series. + // A Reducer operation describes how to aggregate data points from multiple + // time series into a single time series, where the value of each data point + // in the resulting series is a function of all the already aligned values in + // the input time series. enum Reducer { - // No cross-time series reduction. The output of the aligner is + // No cross-time series reduction. The output of the `Aligner` is // returned. REDUCE_NONE = 0; - // Reduce by computing the mean across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric or distribution values. The value type of the - // output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Reduce by computing the mean value across time series for each + // alignment period. This reducer is valid for + // [DELTA][google.api.MetricDescriptor.MetricKind.DELTA] and + // [GAUGE][google.api.MetricDescriptor.MetricKind.GAUGE] metrics with + // numeric or distribution values. The `value_type` of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. REDUCE_MEAN = 1; - // Reduce by computing the minimum across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric values. The value type of the output - // is the same as the value type of the input. + // Reduce by computing the minimum value across time series for each + // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + // with numeric values. The `value_type` of the output is the same as the + // `value_type` of the input. REDUCE_MIN = 2; - // Reduce by computing the maximum across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric values. The value type of the output - // is the same as the value type of the input. + // Reduce by computing the maximum value across time series for each + // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + // with numeric values. The `value_type` of the output is the same as the + // `value_type` of the input. REDUCE_MAX = 3; // Reduce by computing the sum across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric and distribution values. The value type of - // the output is the same as the value type of the input. + // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + // with numeric and distribution values. The `value_type` of the output is + // the same as the `value_type` of the input. REDUCE_SUM = 4; // Reduce by computing the standard deviation across time series - // for each alignment period. This reducer is valid for delta - // and gauge metrics with numeric or distribution values. The value type of - // the output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics with numeric or distribution values. The `value_type` + // of the output is `DOUBLE`. REDUCE_STDDEV = 5; - // Reduce by computing the count of data points across time series - // for each alignment period. This reducer is valid for delta - // and gauge metrics of numeric, Boolean, distribution, and string value - // type. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Reduce by computing the number of data points across time series + // for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics of numeric, Boolean, distribution, and string + // `value_type`. The `value_type` of the output is `INT64`. REDUCE_COUNT = 6; - // Reduce by computing the count of True-valued data points across time - // series for each alignment period. This reducer is valid for delta - // and gauge metrics of Boolean value type. The value type of - // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Reduce by computing the number of `True`-valued data points across time + // series for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output + // is `INT64`. REDUCE_COUNT_TRUE = 7; - // Reduce by computing the count of False-valued data points across time - // series for each alignment period. This reducer is valid for delta - // and gauge metrics of Boolean value type. The value type of - // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Reduce by computing the number of `False`-valued data points across time + // series for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output + // is `INT64`. REDUCE_COUNT_FALSE = 15; - // Reduce by computing the fraction of True-valued data points across time - // series for each alignment period. This reducer is valid for delta - // and gauge metrics of Boolean value type. The output value is in the - // range [0, 1] and has value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Reduce by computing the ratio of the number of `True`-valued data points + // to the total number of data points for each alignment period. This + // reducer is valid for `DELTA` and `GAUGE` metrics of Boolean `value_type`. + // The output value is in the range [0.0, 1.0] and has `value_type` + // `DOUBLE`. REDUCE_FRACTION_TRUE = 8; - // Reduce by computing 99th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [99th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_99 = 9; - // Reduce by computing 95th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [95th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_95 = 10; - // Reduce by computing 50th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [50th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_50 = 11; - // Reduce by computing 5th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [5th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_05 = 12; } - // The alignment period for per-[time series][google.monitoring.v3.TimeSeries] - // alignment. If present, `alignmentPeriod` must be at least 60 - // seconds. After per-time series alignment, each time series will - // contain data points only on the period boundaries. If - // `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then - // this field is ignored. If `perSeriesAligner` is specified and - // does not equal `ALIGN_NONE`, then this field must be defined; - // otherwise an error is returned. + // The `alignment_period` specifies a time interval, in seconds, that is used + // to divide the data in all the + // [time series][google.monitoring.v3.TimeSeries] into consistent blocks of + // time. This will be done before the per-series aligner can be applied to + // the data. + // + // The value must be at least 60 seconds. If a per-series aligner other than + // `ALIGN_NONE` is specified, this field is required or an error is returned. + // If no per-series aligner is specified, or the aligner `ALIGN_NONE` is + // specified, then this field is ignored. google.protobuf.Duration alignment_period = 1; - // The approach to be used to align individual time series. Not all - // alignment functions may be applied to all time series, depending - // on the metric type and value type of the original time - // series. Alignment may change the metric type or the value type of + // An `Aligner` describes how to bring the data points in a single + // time series into temporal alignment. Except for `ALIGN_NONE`, all + // alignments cause all the data points in an `alignment_period` to be + // mathematically grouped together, resulting in a single data point for + // each `alignment_period` with end timestamp at the end of the period. + // + // Not all alignment operations may be applied to all time series. The valid + // choices depend on the `metric_kind` and `value_type` of the original time + // series. Alignment can change the `metric_kind` or the `value_type` of // the time series. // // Time series data must be aligned in order to perform cross-time - // series reduction. If `crossSeriesReducer` is specified, then - // `perSeriesAligner` must be specified and not equal `ALIGN_NONE` - // and `alignmentPeriod` must be specified; otherwise, an error is + // series reduction. If `cross_series_reducer` is specified, then + // `per_series_aligner` must be specified and not equal to `ALIGN_NONE` + // and `alignment_period` must be specified; otherwise, an error is // returned. Aligner per_series_aligner = 2; - // The approach to be used to combine time series. Not all reducer - // functions may be applied to all time series, depending on the - // metric type and the value type of the original time - // series. Reduction may change the metric type of value type of the - // time series. + // The reduction operation to be used to combine time series into a single + // time series, where the value of each data point in the resulting series is + // a function of all the already aligned values in the input time series. // - // Time series data must be aligned in order to perform cross-time - // series reduction. If `crossSeriesReducer` is specified, then - // `perSeriesAligner` must be specified and not equal `ALIGN_NONE` - // and `alignmentPeriod` must be specified; otherwise, an error is - // returned. + // Not all reducer operations can be applied to all time series. The valid + // choices depend on the `metric_kind` and the `value_type` of the original + // time series. Reduction can yield a time series with a different + // `metric_kind` or `value_type` than the input time series. + // + // Time series data must first be aligned (see `per_series_aligner`) in order + // to perform cross-time series reduction. If `cross_series_reducer` is + // specified, then `per_series_aligner` must be specified, and must not be + // `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an + // error is returned. Reducer cross_series_reducer = 4; - // The set of fields to preserve when `crossSeriesReducer` is - // specified. The `groupByFields` determine how the time series are + // The set of fields to preserve when `cross_series_reducer` is + // specified. The `group_by_fields` determine how the time series are // partitioned into subsets prior to applying the aggregation - // function. Each subset contains time series that have the same + // operation. Each subset contains time series that have the same // value for each of the grouping fields. Each individual time // series is a member of exactly one subset. The - // `crossSeriesReducer` is applied to each subset of time series. + // `cross_series_reducer` is applied to each subset of time series. // It is not possible to reduce across different resource types, so // this field implicitly contains `resource.type`. Fields not - // specified in `groupByFields` are aggregated away. If - // `groupByFields` is not specified and all the time series have + // specified in `group_by_fields` are aggregated away. If + // `group_by_fields` is not specified and all the time series have // the same resource type, then the time series are aggregated into - // a single output time series. If `crossSeriesReducer` is not + // a single output time series. If `cross_series_reducer` is not // defined, this field is ignored. repeated string group_by_fields = 5; } -// Specifies an ordering relationship on two arguments, here called left and -// right. +// Specifies an ordering relationship on two arguments, called `left` and +// `right`. enum ComparisonType { // No ordering relationship is specified. COMPARISON_UNSPECIFIED = 0; - // The left argument is greater than the right argument. + // True if the left argument is greater than the right argument. COMPARISON_GT = 1; - // The left argument is greater than or equal to the right argument. + // True if the left argument is greater than or equal to the right argument. COMPARISON_GE = 2; - // The left argument is less than the right argument. + // True if the left argument is less than the right argument. COMPARISON_LT = 3; - // The left argument is less than or equal to the right argument. + // True if the left argument is less than or equal to the right argument. COMPARISON_LE = 4; - // The left argument is equal to the right argument. + // True if the left argument is equal to the right argument. COMPARISON_EQ = 5; - // The left argument is not equal to the right argument. + // True if the left argument is not equal to the right argument. COMPARISON_NE = 6; } diff --git a/google/monitoring/v3/dropped_labels.proto b/google/monitoring/v3/dropped_labels.proto index acbe8cf25..ce6e46e1f 100644 --- a/google/monitoring/v3/dropped_labels.proto +++ b/google/monitoring/v3/dropped_labels.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,18 +11,18 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; -import "google/api/annotations.proto"; - +option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; option java_multiple_files = true; option java_outer_classname = "DroppedLabelsProto"; option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A set of (label, value) pairs which were dropped during aggregation, attached // to google.api.Distribution.Exemplars in google.api.Distribution values during diff --git a/google/monitoring/v3/group.proto b/google/monitoring/v3/group.proto index ca46a0c0d..2d1ffbb61 100644 --- a/google/monitoring/v3/group.proto +++ b/google/monitoring/v3/group.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,18 +11,20 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; +import "google/api/resource.proto"; + option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; option java_multiple_files = true; option java_outer_classname = "GroupProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The description of a dynamic collection of monitored resources. Each group // has a filter that is matched against monitored resources and their associated @@ -51,19 +53,31 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // depending on what resources exist and what filters are associated with the // group and its ancestors. message Group { - // Output only. The name of this group. The format is - // `"projects/{project_id_or_number}/groups/{group_id}"`. + option (google.api.resource) = { + type: "monitoring.googleapis.com/Group" + pattern: "projects/{project}/groups/{group}" + pattern: "organizations/{organization}/groups/{group}" + pattern: "folders/{folder}/groups/{group}" + pattern: "*" + }; + + // Output only. The name of this group. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // // When creating a group, this field is ignored and a new name is created // consisting of the project specified in the call to `CreateGroup` - // and a unique `{group_id}` that is generated automatically. + // and a unique `[GROUP_ID]` that is generated automatically. string name = 1; // A user-assigned name for this group, used only for display purposes. string display_name = 2; - // The name of the group's parent, if it has one. - // The format is `"projects/{project_id_or_number}/groups/{group_id}"`. - // For groups with no parent, `parentName` is the empty string, `""`. + // The name of the group's parent, if it has one. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // + // For groups with no parent, `parent_name` is the empty string, `""`. string parent_name = 3; // The filter used to determine which monitored resources belong to this diff --git a/google/monitoring/v3/group_service.proto b/google/monitoring/v3/group_service.proto index 34e1d9e99..0163ab36e 100644 --- a/google/monitoring/v3/group_service.proto +++ b/google/monitoring/v3/group_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/group.proto"; import "google/protobuf/empty.proto"; @@ -29,6 +31,7 @@ option java_multiple_files = true; option java_outer_classname = "GroupServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The Group API lets you inspect and manage your // [groups](#google.monitoring.v3.Group). @@ -43,11 +46,18 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // updated automatically as monitored resources are added and removed // from the infrastructure. service GroupService { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read"; + // Lists the existing groups. rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/groups" }; + option (google.api.method_signature) = "name"; } // Gets a single group. @@ -55,6 +65,7 @@ service GroupService { option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}" }; + option (google.api.method_signature) = "name"; } // Creates a new group. @@ -63,6 +74,7 @@ service GroupService { post: "/v3/{name=projects/*}/groups" body: "group" }; + option (google.api.method_signature) = "name,group"; } // Updates an existing group. @@ -72,6 +84,7 @@ service GroupService { put: "/v3/{group.name=projects/*/groups/*}" body: "group" }; + option (google.api.method_signature) = "group"; } // Deletes an existing group. @@ -79,50 +92,72 @@ service GroupService { option (google.api.http) = { delete: "/v3/{name=projects/*/groups/*}" }; + option (google.api.method_signature) = "name"; } // Lists the monitored resources that are members of a group. - rpc ListGroupMembers(ListGroupMembersRequest) - returns (ListGroupMembersResponse) { + rpc ListGroupMembers(ListGroupMembersRequest) returns (ListGroupMembersResponse) { option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}/members" }; + option (google.api.method_signature) = "name"; } } // The `ListGroup` request. message ListGroupsRequest { - // The project whose groups are to be listed. The format is - // `"projects/{project_id_or_number}"`. - string name = 7; + // Required. The project whose groups are to be listed. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 7 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/Group" + } + ]; // An optional filter consisting of a single group name. The filters limit // the groups returned based on their parent-child relationship with the // specified group. If no filter is specified, all groups are returned. oneof filter { - // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - // Returns groups whose `parentName` field contains the group + // A group name. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // + // Returns groups whose `parent_name` field contains the group // name. If no groups have this parent, the results are empty. - string children_of_group = 2; - - // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + string children_of_group = 2 [(google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + }]; + + // A group name. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // // Returns groups that are ancestors of the specified group. // The groups are returned in order, starting with the immediate parent and // ending with the most distant ancestor. If the specified group has no // immediate parent, the results are empty. - string ancestors_of_group = 3; - - // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + string ancestors_of_group = 3 [(google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + }]; + + // A group name. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // // Returns the descendants of the specified group. This is a superset of - // the results returned by the `childrenOfGroup` filter, and includes + // the results returned by the `children_of_group` filter, and includes // children-of-children, and so forth. - string descendants_of_group = 4; + string descendants_of_group = 4 [(google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + }]; } // A positive number that is the maximum number of results to return. int32 page_size = 5; - // If this field is not empty then it must contain the `nextPageToken` value + // If this field is not empty then it must contain the `next_page_token` value // returned by a previous call to this method. Using this field causes the // method to return additional results from the previous method call. string page_token = 6; @@ -135,26 +170,38 @@ message ListGroupsResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } // The `GetGroup` request. message GetGroupRequest { - // The group to retrieve. The format is - // `"projects/{project_id_or_number}/groups/{group_id}"`. - string name = 3; + // Required. The group to retrieve. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + } + ]; } // The `CreateGroup` request. message CreateGroupRequest { - // The project in which to create the group. The format is - // `"projects/{project_id_or_number}"`. - string name = 4; - - // A group definition. It is an error to define the `name` field because + // Required. The project in which to create the group. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/Group" + } + ]; + + // Required. A group definition. It is an error to define the `name` field because // the system assigns the name. - Group group = 2; + Group group = 2 [(google.api.field_behavior) = REQUIRED]; // If true, validate this request but do not create the group. bool validate_only = 3; @@ -162,42 +209,61 @@ message CreateGroupRequest { // The `UpdateGroup` request. message UpdateGroupRequest { - // The new definition of the group. All fields of the existing group, + // Required. The new definition of the group. All fields of the existing group, // excepting `name`, are replaced with the corresponding fields of this group. - Group group = 2; + Group group = 2 [(google.api.field_behavior) = REQUIRED]; // If true, validate this request but do not update the existing group. bool validate_only = 3; } -// The `DeleteGroup` request. You can only delete a group if it has no children. +// The `DeleteGroup` request. The default behavior is to be able to delete a +// single group without any descendants. message DeleteGroupRequest { - // The group to delete. The format is - // `"projects/{project_id_or_number}/groups/{group_id}"`. - string name = 3; + // Required. The group to delete. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + } + ]; + + // If this field is true, then the request means to delete a group with all + // its descendants. Otherwise, the request means to delete a group only when + // it has no descendants. The default value is false. + bool recursive = 4; } // The `ListGroupMembers` request. message ListGroupMembersRequest { - // The group whose members are listed. The format is - // `"projects/{project_id_or_number}/groups/{group_id}"`. - string name = 7; + // Required. The group whose members are listed. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + string name = 7 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + } + ]; // A positive number that is the maximum number of results to return. int32 page_size = 3; - // If this field is not empty then it must contain the `nextPageToken` value + // If this field is not empty then it must contain the `next_page_token` value // returned by a previous call to this method. Using this field causes the // method to return additional results from the previous method call. string page_token = 4; - // An optional [list filter](/monitoring/api/learn_more#filtering) describing - // the members to be returned. The filter may reference the type, labels, and - // metadata of monitored resources that comprise the group. - // For example, to return only resources representing Compute Engine VM - // instances, use this filter: + // An optional [list + // filter](https://cloud.google.com/monitoring/api/learn_more#filtering) + // describing the members to be returned. The filter may reference the type, + // labels, and metadata of monitored resources that comprise the group. For + // example, to return only resources representing Compute Engine VM instances, + // use this filter: // - // resource.type = "gce_instance" + // `resource.type = "gce_instance"` string filter = 5; // An optional time interval for which results should be returned. Only @@ -214,7 +280,7 @@ message ListGroupMembersResponse { // If there are more results than have been returned, then this field is // set to a non-empty value. To see the additional results, use that value as - // `pageToken` in the next call to this method. + // `page_token` in the next call to this method. string next_page_token = 2; // The total number of elements matching this request. diff --git a/google/monitoring/v3/metric.proto b/google/monitoring/v3/metric.proto index c111d4fb4..5a4833b19 100644 --- a/google/monitoring/v3/metric.proto +++ b/google/monitoring/v3/metric.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,17 +11,17 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; -import "google/api/annotations.proto"; +import "google/api/distribution.proto"; import "google/api/label.proto"; import "google/api/metric.proto"; import "google/api/monitored_resource.proto"; import "google/monitoring/v3/common.proto"; +import "google/protobuf/duration.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -29,11 +29,13 @@ option java_multiple_files = true; option java_outer_classname = "MetricProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A single data point in a time series. message Point { // The time interval to which the data point applies. For `GAUGE` metrics, - // only the end time of the interval is used. For `DELTA` metrics, the start + // the start time is optional, but if it is supplied, it must equal the + // end time. For `DELTA` metrics, the start // and end time should specify a non-zero interval, with subsequent points // specifying contiguous and non-overlapping intervals. For `CUMULATIVE` // metrics, the start and end time should specify a non-zero interval, with @@ -93,3 +95,134 @@ message TimeSeries { // must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. repeated Point points = 5; } + +// A descriptor for the labels and points in a timeseries. +message TimeSeriesDescriptor { + // A descriptor for the value columns in a data point. + message ValueDescriptor { + // The value key. + string key = 1; + + // The value type. + google.api.MetricDescriptor.ValueType value_type = 2; + + // The value stream kind. + google.api.MetricDescriptor.MetricKind metric_kind = 3; + } + + // Descriptors for the labels. + repeated google.api.LabelDescriptor label_descriptors = 1; + + // Descriptors for the point data value columns. + repeated ValueDescriptor point_descriptors = 5; +} + +// Represents the values of a time series associated with a +// TimeSeriesDescriptor. +message TimeSeriesData { + // A point's value columns and time interval. Each point has one or more + // point values corresponding to the entries in `point_descriptors` field in + // the TimeSeriesDescriptor associated with this object. + message PointData { + // The values that make up the point. + repeated TypedValue values = 1; + + // The time interval associated with the point. + TimeInterval time_interval = 2; + } + + // The values of the labels in the time series identifier, given in the same + // order as the `label_descriptors` field of the TimeSeriesDescriptor + // associated with this object. Each value must have a value of the type + // given in the corresponding entry of `label_descriptors`. + repeated LabelValue label_values = 1; + + // The points in the time series. + repeated PointData point_data = 2; +} + +// A label value. +message LabelValue { + // The label value can be a bool, int64, or string. + oneof value { + // A bool label value. + bool bool_value = 1; + + // An int64 label value. + int64 int64_value = 2; + + // A string label value. + string string_value = 3; + } +} + +// An error associated with a query in the time series query language format. +message QueryError { + // The location of the time series query language text that this error applies + // to. + TextLocator locator = 1; + + // The error message. + string message = 2; +} + +// A locator for text. Indicates a particular part of the text of a request or +// of an object referenced in the request. +// +// For example, suppose the request field `text` contains: +// +// text: "The quick brown fox jumps over the lazy dog." +// +// Then the locator: +// +// source: "text" +// start_position { +// line: 1 +// column: 17 +// } +// end_position { +// line: 1 +// column: 19 +// } +// +// refers to the part of the text: "fox". +message TextLocator { + // The position of a byte within the text. + message Position { + // The line, starting with 1, where the byte is positioned. + int32 line = 1; + + // The column within the line, starting with 1, where the byte is + // positioned. This is a byte index even though the text is UTF-8. + int32 column = 2; + } + + // The source of the text. The source may be a field in the request, in which + // case its format is the format of the + // google.rpc.BadRequest.FieldViolation.field field in + // https://cloud.google.com/apis/design/errors#error_details. It may also be + // be a source other than the request field (e.g. a macro definition + // referenced in the text of the query), in which case this is the name of + // the source (e.g. the macro name). + string source = 1; + + // The position of the first byte within the text. + Position start_position = 2; + + // The position of the last byte within the text. + Position end_position = 3; + + // If `source`, `start_position`, and `end_position` describe a call on + // some object (e.g. a macro in the time series query language text) and a + // location is to be designated in that object's text, `nested_locator` + // identifies the location within that object. + TextLocator nested_locator = 4; + + // When `nested_locator` is set, this field gives the reason for the nesting. + // Usually, the reason is a macro invocation. In that case, the macro name + // (including the leading '@') signals the location of the macro call + // in the text and a macro argument name (including the leading '$') signals + // the location of the macro argument inside the macro body that got + // substituted away. + string nesting_reason = 5; +} diff --git a/google/monitoring/v3/metric_service.proto b/google/monitoring/v3/metric_service.proto index febd3f7b5..119990358 100644 --- a/google/monitoring/v3/metric_service.proto +++ b/google/monitoring/v3/metric_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,18 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/metric.proto"; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; +import "google/monitoring/v3/alert.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/metric.proto"; import "google/protobuf/duration.proto"; @@ -32,98 +35,124 @@ option java_multiple_files = true; option java_outer_classname = "MetricServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; +option (google.api.resource_definition) = { + type: "monitoring.googleapis.com/MetricDescriptor" + pattern: "projects/{project}/metricDescriptors/{metric_descriptor=**}" + pattern: "organizations/{organization}/metricDescriptors/{metric_descriptor=**}" + pattern: "folders/{folder}/metricDescriptors/{metric_descriptor=**}" + pattern: "*" + history: ORIGINALLY_SINGLE_PATTERN +}; +option (google.api.resource_definition) = { + type: "monitoring.googleapis.com/MonitoredResourceDescriptor" + pattern: "projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}" + pattern: "organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor}" + pattern: "folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor}" + pattern: "*" + history: ORIGINALLY_SINGLE_PATTERN +}; // Manages metric descriptors, monitored resource descriptors, and // time series data. service MetricService { - // Lists monitored resource descriptors that match a filter. This method does - // not require a Stackdriver account. - rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) - returns (ListMonitoredResourceDescriptorsResponse) { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read," + "https://www.googleapis.com/auth/monitoring.write"; + + // Lists monitored resource descriptors that match a filter. This method does not require a Workspace. + rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/monitoredResourceDescriptors" }; + option (google.api.method_signature) = "name"; } - // Gets a single monitored resource descriptor. This method does not require a - // Stackdriver account. - rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) - returns (google.api.MonitoredResourceDescriptor) { + // Gets a single monitored resource descriptor. This method does not require a Workspace. + rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) returns (google.api.MonitoredResourceDescriptor) { option (google.api.http) = { - get: "/v3/{name=projects/*/monitoredResourceDescriptors/*}" + get: "/v3/{name=projects/*/monitoredResourceDescriptors/**}" }; + option (google.api.method_signature) = "name"; } - // Lists metric descriptors that match a filter. This method does not require - // a Stackdriver account. - rpc ListMetricDescriptors(ListMetricDescriptorsRequest) - returns (ListMetricDescriptorsResponse) { + // Lists metric descriptors that match a filter. This method does not require a Workspace. + rpc ListMetricDescriptors(ListMetricDescriptorsRequest) returns (ListMetricDescriptorsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/metricDescriptors" }; + option (google.api.method_signature) = "name"; } - // Gets a single metric descriptor. This method does not require a Stackdriver - // account. - rpc GetMetricDescriptor(GetMetricDescriptorRequest) - returns (google.api.MetricDescriptor) { + // Gets a single metric descriptor. This method does not require a Workspace. + rpc GetMetricDescriptor(GetMetricDescriptorRequest) returns (google.api.MetricDescriptor) { option (google.api.http) = { get: "/v3/{name=projects/*/metricDescriptors/**}" }; + option (google.api.method_signature) = "name"; } // Creates a new metric descriptor. // User-created metric descriptors define - // [custom metrics](/monitoring/custom-metrics). - rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) - returns (google.api.MetricDescriptor) { + // [custom metrics](https://cloud.google.com/monitoring/custom-metrics). + rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) returns (google.api.MetricDescriptor) { option (google.api.http) = { post: "/v3/{name=projects/*}/metricDescriptors" body: "metric_descriptor" }; + option (google.api.method_signature) = "name,metric_descriptor"; } // Deletes a metric descriptor. Only user-created - // [custom metrics](/monitoring/custom-metrics) can be deleted. - rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest) - returns (google.protobuf.Empty) { + // [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be + // deleted. + rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/metricDescriptors/**}" }; + option (google.api.method_signature) = "name"; } - // Lists time series that match a filter. This method does not require a - // Stackdriver account. + // Lists time series that match a filter. This method does not require a Workspace. rpc ListTimeSeries(ListTimeSeriesRequest) returns (ListTimeSeriesResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/timeSeries" }; + option (google.api.method_signature) = "name,filter,interval,view"; } // Creates or adds data to one or more time series. // The response is empty if all time series in the request were written. // If any time series could not be written, a corresponding failure message is // included in the error response. - rpc CreateTimeSeries(CreateTimeSeriesRequest) - returns (google.protobuf.Empty) { + rpc CreateTimeSeries(CreateTimeSeriesRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v3/{name=projects/*}/timeSeries" body: "*" }; + option (google.api.method_signature) = "name,time_series"; } } // The `ListMonitoredResourceDescriptors` request. message ListMonitoredResourceDescriptorsRequest { - // The project on which to execute the request. The format is - // `"projects/{project_id_or_number}"`. - string name = 5; - - // An optional [filter](/monitoring/api/v3/filters) describing - // the descriptors to be returned. The filter can reference - // the descriptor's type and labels. For example, the - // following filter returns only Google Compute Engine descriptors - // that have an `id` label: + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/MonitoredResourceDescriptor" + } + ]; + + // An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) + // describing the descriptors to be returned. The filter can reference the + // descriptor's type and labels. For example, the following filter returns + // only Google Compute Engine descriptors that have an `id` label: // // resource.type = starts_with("gce_") AND resource.label:id string filter = 2; @@ -145,31 +174,44 @@ message ListMonitoredResourceDescriptorsResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } // The `GetMonitoredResourceDescriptor` request. message GetMonitoredResourceDescriptorRequest { - // The monitored resource descriptor to get. The format is - // `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. - // The `{resource_type}` is a predefined type, such as + // Required. The monitored resource descriptor to get. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] + // + // The `[RESOURCE_TYPE]` is a predefined type, such as // `cloudsql_database`. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/MonitoredResourceDescriptor" + } + ]; } // The `ListMetricDescriptors` request. message ListMetricDescriptorsRequest { - // The project on which to execute the request. The format is - // `"projects/{project_id_or_number}"`. - string name = 5; + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/MetricDescriptor" + } + ]; // If this field is empty, all custom and // system-defined metric descriptors are returned. - // Otherwise, the [filter](/monitoring/api/v3/filters) + // Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) // specifies which metric descriptors are to be // returned. For example, the following filter matches all - // [custom metrics](/monitoring/custom-metrics): + // [custom metrics](https://cloud.google.com/monitoring/custom-metrics): // // metric.type = starts_with("custom.googleapis.com/") string filter = 2; @@ -191,37 +233,57 @@ message ListMetricDescriptorsResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } // The `GetMetricDescriptor` request. message GetMetricDescriptorRequest { - // The metric descriptor on which to execute the request. The format is - // `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. - // An example value of `{metric_id}` is + // Required. The metric descriptor on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + // + // An example value of `[METRIC_ID]` is // `"compute.googleapis.com/instance/disk/read_bytes_count"`. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/MetricDescriptor" + } + ]; } // The `CreateMetricDescriptor` request. message CreateMetricDescriptorRequest { - // The project on which to execute the request. The format is - // `"projects/{project_id_or_number}"`. - string name = 3; - - // The new [custom metric](/monitoring/custom-metrics) + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/MetricDescriptor" + } + ]; + + // Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) // descriptor. - google.api.MetricDescriptor metric_descriptor = 2; + google.api.MetricDescriptor metric_descriptor = 2 [(google.api.field_behavior) = REQUIRED]; } // The `DeleteMetricDescriptor` request. message DeleteMetricDescriptorRequest { - // The metric descriptor on which to execute the request. The format is - // `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. - // An example of `{metric_id}` is: + // Required. The metric descriptor on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + // + // An example of `[METRIC_ID]` is: // `"custom.googleapis.com/my_test_metric"`. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/MetricDescriptor" + } + ]; } // The `ListTimeSeries` request. @@ -237,35 +299,43 @@ message ListTimeSeriesRequest { HEADERS = 1; } - // The project on which to execute the request. The format is - // "projects/{project_id_or_number}". - string name = 10; - - // A [monitoring filter](/monitoring/api/v3/filters) that specifies which time - // series should be returned. The filter must specify a single metric type, - // and can additionally specify metric labels and other information. For - // example: + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 10 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // that specifies which time series should be returned. The filter must + // specify a single metric type, and can additionally specify metric labels + // and other information. For example: // // metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - // metric.label.instance_name = "my-instance-name" - string filter = 2; + // metric.labels.instance_name = "my-instance-name" + string filter = 2 [(google.api.field_behavior) = REQUIRED]; - // The time interval for which results should be returned. Only time series + // Required. The time interval for which results should be returned. Only time series // that contain data points in the specified interval are included // in the response. - TimeInterval interval = 4; + TimeInterval interval = 4 [(google.api.field_behavior) = REQUIRED]; - // By default, the raw time series data is returned. - // Use this field to combine multiple time series for different - // views of the data. + // Specifies the alignment of data points in individual time series as + // well as how to combine the retrieved time series across specified labels. + // + // By default (if no `aggregation` is explicitly specified), the raw time + // series data is returned. Aggregation aggregation = 5; // Unsupported: must be left blank. The points in each time series are - // returned in reverse time order. + // currently returned in reverse time order (most recent to oldest). string order_by = 6; - // Specifies which information is returned about the time series. - TimeSeriesView view = 7; + // Required. Specifies which information is returned about the time series. + TimeSeriesView view = 7 [(google.api.field_behavior) = REQUIRED]; // A positive number that is the maximum number of results to return. If // `page_size` is empty or more than 100,000 results, the effective @@ -287,7 +357,7 @@ message ListTimeSeriesResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; // Query execution errors that may have caused the time series data returned @@ -297,26 +367,101 @@ message ListTimeSeriesResponse { // The `CreateTimeSeries` request. message CreateTimeSeriesRequest { - // The project on which to execute the request. The format is - // `"projects/{project_id_or_number}"`. - string name = 3; - - // The new data to be added to a list of time series. + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The new data to be added to a list of time series. // Adds at most one data point to each of several time series. The new data // point must be more recent than any other point in its time series. Each // `TimeSeries` value must fully specify a unique time series by supplying // all label values for the metric and the monitored resource. - repeated TimeSeries time_series = 2; + // + // The maximum number of `TimeSeries` objects per `Create` request is 200. + repeated TimeSeries time_series = 2 [(google.api.field_behavior) = REQUIRED]; } -// Describes the result of a failed request to write data to a time series. +// DEPRECATED. Used to hold per-time-series error status. message CreateTimeSeriesError { - // The time series, including the `Metric`, `MonitoredResource`, - // and `Point`s (including timestamp and value) that resulted - // in the error. This field provides all of the context that - // would be needed to retry the operation. - TimeSeries time_series = 1; - - // The status of the requested write operation. - google.rpc.Status status = 2; + // DEPRECATED. Time series ID that resulted in the `status` error. + TimeSeries time_series = 1 [deprecated = true]; + + // DEPRECATED. The status of the requested write operation for `time_series`. + google.rpc.Status status = 2 [deprecated = true]; +} + +// Summary of the result of a failed request to write data to a time series. +message CreateTimeSeriesSummary { + // Detailed information about an error category. + message Error { + // The status of the requested write operation. + google.rpc.Status status = 1; + + // The number of points that couldn't be written because of `status`. + int32 point_count = 2; + } + + // The number of points in the request. + int32 total_point_count = 1; + + // The number of points that were successfully written. + int32 success_point_count = 2; + + // The number of points that failed to be written. Order is not guaranteed. + repeated Error errors = 3; +} + +// The `QueryTimeSeries` request. +message QueryTimeSeriesRequest { + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 1; + + // Required. The query in the monitoring query language format. The default + // time zone is in UTC. + string query = 7; + + // A positive number that is the maximum number of time_series_data to return. + int32 page_size = 9; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return additional results from the previous method call. + string page_token = 10; +} + +// The `QueryTimeSeries` response. +message QueryTimeSeriesResponse { + // The descriptor for the time series data. + TimeSeriesDescriptor time_series_descriptor = 8; + + // The time series data. + repeated TimeSeriesData time_series_data = 9; + + // If there are more results than have been returned, then this field is set + // to a non-empty value. To see the additional results, use that value as + // `page_token` in the next call to this method. + string next_page_token = 10; + + // Query execution errors that may have caused the time series data returned + // to be incomplete. The available data will be available in the + // response. + repeated google.rpc.Status partial_errors = 11; +} + +// This is an error detail intended to be used with INVALID_ARGUMENT errors. +message QueryErrorList { + // Errors in parsing the time series query language text. The number of errors + // in the response may be limited. + repeated QueryError errors = 1; + + // A summary of all the errors. + string error_summary = 2; } diff --git a/google/monitoring/v3/monitoring.yaml b/google/monitoring/v3/monitoring.yaml new file mode 100644 index 000000000..4513a0cb0 --- /dev/null +++ b/google/monitoring/v3/monitoring.yaml @@ -0,0 +1,190 @@ +type: google.api.Service +config_version: 3 +name: monitoring.googleapis.com +title: Cloud Monitoring API + +apis: +- name: google.monitoring.v3.AlertPolicyService +- name: google.monitoring.v3.GroupService +- name: google.monitoring.v3.MetricService +- name: google.monitoring.v3.NotificationChannelService +- name: google.monitoring.v3.ServiceMonitoringService +- name: google.monitoring.v3.UptimeCheckService + +types: +- name: google.monitoring.v3.DroppedLabels +- name: google.monitoring.v3.SpanContext + +documentation: + summary: |- + Manages your Cloud Monitoring data and configurations. Most projects must + be associated with a Workspace, with a few exceptions as noted on the + individual method pages. The table entries below are presented in + alphabetical order, not in order of common use. For explanations of the + concepts found in the table entries, read the [Cloud Monitoring + documentation](https://cloud.google.com/monitoring/docs). + +backend: + rules: + - selector: 'google.monitoring.v3.AlertPolicyService.*' + deadline: 30.0 + - selector: 'google.monitoring.v3.GroupService.*' + deadline: 30.0 + - selector: 'google.monitoring.v3.MetricService.*' + deadline: 30.0 + - selector: google.monitoring.v3.MetricService.CreateTimeSeries + deadline: 12.0 + - selector: google.monitoring.v3.MetricService.ListTimeSeries + deadline: 90.0 + - selector: 'google.monitoring.v3.NotificationChannelService.*' + deadline: 30.0 + +authentication: + rules: + - selector: 'google.monitoring.v3.AlertPolicyService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring + - selector: google.monitoring.v3.AlertPolicyService.GetAlertPolicy + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read + - selector: google.monitoring.v3.AlertPolicyService.ListAlertPolicies + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read + - selector: 'google.monitoring.v3.GroupService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read + - selector: google.monitoring.v3.GroupService.CreateGroup + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring + - selector: google.monitoring.v3.GroupService.DeleteGroup + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring + - selector: google.monitoring.v3.GroupService.UpdateGroup + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring + - selector: 'google.monitoring.v3.MetricService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read, + https://www.googleapis.com/auth/monitoring.write + - selector: google.monitoring.v3.MetricService.CreateMetricDescriptor + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.write + - selector: google.monitoring.v3.MetricService.CreateTimeSeries + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.write + - selector: google.monitoring.v3.MetricService.DeleteMetricDescriptor + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring + - selector: google.monitoring.v3.MetricService.ListTimeSeries + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read + - selector: 'google.monitoring.v3.NotificationChannelService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring + - selector: google.monitoring.v3.NotificationChannelService.GetNotificationChannel + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read + - selector: google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read + - selector: google.monitoring.v3.NotificationChannelService.ListNotificationChannelDescriptors + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read + - selector: google.monitoring.v3.NotificationChannelService.ListNotificationChannels + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read + - selector: 'google.monitoring.v3.ServiceMonitoringService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring + - selector: google.monitoring.v3.ServiceMonitoringService.GetService + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read + - selector: google.monitoring.v3.ServiceMonitoringService.GetServiceLevelObjective + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read + - selector: google.monitoring.v3.ServiceMonitoringService.ListServiceLevelObjectives + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read + - selector: google.monitoring.v3.ServiceMonitoringService.ListServices + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read + - selector: 'google.monitoring.v3.UptimeCheckService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring, + https://www.googleapis.com/auth/monitoring.read + - selector: google.monitoring.v3.UptimeCheckService.CreateUptimeCheckConfig + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring + - selector: google.monitoring.v3.UptimeCheckService.DeleteUptimeCheckConfig + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring + - selector: google.monitoring.v3.UptimeCheckService.UpdateUptimeCheckConfig + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/monitoring diff --git a/google/monitoring/v3/monitoring_gapic.legacy.yaml b/google/monitoring/v3/monitoring_gapic.legacy.yaml new file mode 100644 index 000000000..2d869f505 --- /dev/null +++ b/google/monitoring/v3/monitoring_gapic.legacy.yaml @@ -0,0 +1,1336 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.monitoring.v3 + release_level: GA + python: + package_name: google.cloud.monitoring_v3.gapic + go: + package_name: cloud.google.com/go/monitoring/apiv3 + csharp: + package_name: Google.Cloud.Monitoring.V3 + release_level: GA + ruby: + package_name: Google::Cloud::Monitoring::V3 + release_level: BETA + php: + package_name: Google\Cloud\Monitoring\V3 + nodejs: + package_name: monitoring.v3 + domain_layer_location: google-cloud +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.monitoring.v3.AlertPolicyService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + # C#: Already GA, do not use common resource name for 'project' + - name_pattern: projects/{project}/alertPolicies/{alert_policy} + entity_name: alert_policy + - name_pattern: projects/{project}/alertPolicies/{alert_policy}/conditions/{condition} + entity_name: alert_policy_condition + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListAlertPolicies + flattening: + groups: + - parameters: + - name + required_fields: + - name + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: alert_policies + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: GetAlertPolicy + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: alert_policy + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: CreateAlertPolicy + flattening: + groups: + - parameters: + - name + - alert_policy + required_fields: + - name + - alert_policy + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: DeleteAlertPolicy + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: alert_policy + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: UpdateAlertPolicy + flattening: + groups: + - parameters: + - update_mask + - alert_policy + required_fields: + - alert_policy + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + alert_policy.name: alert_policy + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 +# The fully qualified name of the API interface. +- name: google.monitoring.v3.GroupService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + # C#: Already GA, do not use common resource name for 'project' + - name_pattern: projects/{project}/groups/{group} + entity_name: group + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListGroups + flattening: + groups: + - parameters: + - name + required_fields: + - name + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: group + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: GetGroup + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: group + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: CreateGroup + flattening: + groups: + - parameters: + - name + - group + required_fields: + - name + - group + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: UpdateGroup + flattening: + groups: + - parameters: + - group + required_fields: + - group + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + group.name: group + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: DeleteGroup + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: group + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: ListGroupMembers + flattening: + groups: + - parameters: + - name + required_fields: + - name + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: members + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: group + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 +# The fully qualified name of the API interface. +- name: google.monitoring.v3.MetricService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + smoke_test: + method: ListMonitoredResourceDescriptors + init_fields: + - name%project=$PROJECT_ID + collections: + - name_pattern: projects/{project} + entity_name: project + # C#: Already GA, do not use common resource name for 'project' + - name_pattern: projects/{project}/metricDescriptors/{metric_descriptor=**} + entity_name: metric_descriptor + - name_pattern: projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor} + entity_name: monitored_resource_descriptor + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 30000 + rpc_timeout_multiplier: 1.3 + max_rpc_timeout_millis: 90000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListMonitoredResourceDescriptors + flattening: + groups: + - parameters: + - name + required_fields: + - name + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: resource_descriptors + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: GetMonitoredResourceDescriptor + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: monitored_resource_descriptor + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: ListMetricDescriptors + flattening: + groups: + - parameters: + - name + required_fields: + - name + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: metric_descriptors + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: GetMetricDescriptor + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: metric_descriptor + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: CreateMetricDescriptor + flattening: + groups: + - parameters: + - name + - metric_descriptor + required_fields: + - name + - metric_descriptor + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: DeleteMetricDescriptor + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: metric_descriptor + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: ListTimeSeries + flattening: + groups: + - parameters: + - name + - filter + - interval + - view + required_fields: + - name + - filter + - interval + - view + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: time_series + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: CreateTimeSeries + flattening: + groups: + - parameters: + - name + - time_series + required_fields: + - name + - time_series + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 +# The fully qualified name of the API interface. +- name: google.monitoring.v3.NotificationChannelService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + - name_pattern: projects/{project}/notificationChannelDescriptors/{channel_descriptor} + entity_name: notification_channel_descriptor + # C#: Already GA, do not use common resource name for 'project' + - name_pattern: projects/{project}/notificationChannels/{notification_channel} + entity_name: notification_channel + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListNotificationChannelDescriptors + flattening: + groups: + - parameters: + - name + required_fields: + - name + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: channel_descriptors + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: GetNotificationChannelDescriptor + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: notification_channel_descriptor + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: ListNotificationChannels + flattening: + groups: + - parameters: + - name + required_fields: + - name + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: notification_channels + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: GetNotificationChannel + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: notification_channel + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: CreateNotificationChannel + flattening: + groups: + - parameters: + - name + - notification_channel + required_fields: + - name + - notification_channel + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: UpdateNotificationChannel + flattening: + groups: + - parameters: + - update_mask + - notification_channel + required_fields: + - notification_channel + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + notification_channel.name: notification_channel + timeout_millis: 60000 + - name: DeleteNotificationChannel + flattening: + groups: + - parameters: + - name + - force + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: notification_channel + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: SendNotificationChannelVerificationCode + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: notification_channel + timeout_millis: 60000 + - name: GetNotificationChannelVerificationCode + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: notification_channel + timeout_millis: 60000 + - name: VerifyNotificationChannel + flattening: + groups: + - parameters: + - name + - code + required_fields: + - name + - code + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: notification_channel + timeout_millis: 60000 +# The fully qualified name of the API interface. +- name: google.monitoring.v3.ServiceMonitoringService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + - name_pattern: projects/{project}/services/{service} + entity_name: service + - name_pattern: projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective} + entity_name: service_level_objective + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: CreateService + flattening: + groups: + - parameters: + - parent + - service + required_fields: + - parent + - service + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: GetService + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: service + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: ListServices + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: services + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: UpdateService + flattening: + groups: + - parameters: + - service + required_fields: + - service + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + service.name: service + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: DeleteService + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: service + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: CreateServiceLevelObjective + flattening: + groups: + - parameters: + - parent + - service_level_objective + required_fields: + - parent + - service_level_objective + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: service + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: GetServiceLevelObjective + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: service_level_objective + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: ListServiceLevelObjectives + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: service_level_objectives + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: service + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: UpdateServiceLevelObjective + flattening: + groups: + - parameters: + - service_level_objective + required_fields: + - service_level_objective + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + service_level_objective.name: service_level_objective + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 + - name: DeleteServiceLevelObjective + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: service_level_objective + resource_name_treatment: STATIC_TYPES + timeout_millis: 60000 +# The fully qualified name of the API interface. +- name: google.monitoring.v3.UptimeCheckService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: projects/{project} + entity_name: project + # C#: Already GA, do not use common resource name for 'project' + - name_pattern: projects/{project}/uptimeCheckConfigs/{uptime_check_config} + entity_name: uptime_check_config + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - DEADLINE_EXCEEDED + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListUptimeCheckConfigs + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: uptime_check_configs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: GetUptimeCheckConfig + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: uptime_check_config + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: CreateUptimeCheckConfig + flattening: + groups: + - parameters: + - parent + - uptime_check_config + required_fields: + - parent + - uptime_check_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + - name: UpdateUptimeCheckConfig + flattening: + groups: + - parameters: + - uptime_check_config + required_fields: + - uptime_check_config + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + uptime_check_config.name: uptime_check_config + timeout_millis: 60000 + - name: DeleteUptimeCheckConfig + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: uptime_check_config + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: ListUptimeCheckIps + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: uptime_check_ips + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + +resource_name_generation: +- message_name: Group + field_entity_map: + name: group + parent_name: group +- message_name: ListGroupsRequest + field_entity_map: + name: project + children_of_group: group + ancestors_of_group: group + descendants_of_group: group +- message_name: GetGroupRequest + field_entity_map: + name: group +- message_name: CreateGroupRequest + field_entity_map: + name: project +- message_name: DeleteGroupRequest + field_entity_map: + name: group +- message_name: ListGroupMembersRequest + field_entity_map: + name: group +- message_name: ListMonitoredResourceDescriptorsRequest + field_entity_map: + name: project +- message_name: GetMonitoredResourceDescriptorRequest + field_entity_map: + name: monitored_resource_descriptor +- message_name: ListMetricDescriptorsRequest + field_entity_map: + name: project +- message_name: GetMetricDescriptorRequest + field_entity_map: + name: metric_descriptor +- message_name: CreateMetricDescriptorRequest + field_entity_map: + name: project +- message_name: DeleteMetricDescriptorRequest + field_entity_map: + name: metric_descriptor +- message_name: ListTimeSeriesRequest + field_entity_map: + name: project +- message_name: CreateTimeSeriesRequest + field_entity_map: + name: project +- message_name: ListAlertPoliciesRequest + field_entity_map: + name: project +- message_name: GetAlertPolicyRequest + field_entity_map: + name: alert_policy +- message_name: CreateAlertPolicyRequest + field_entity_map: + name: project +- message_name: DeleteAlertPolicyRequest + field_entity_map: + name: alert_policy +- message_name: GetNotificationChannelDescriptorRequest + field_entity_map: + name: notification_channel_descriptor +- message_name: ListNotificationChannelDescriptorsRequest + field_entity_map: + name: project +- message_name: ListNotificationChannelsRequest + field_entity_map: + name: project +- message_name: GetNotificationChannelRequest + field_entity_map: + name: notification_channel +- message_name: CreateNotificationChannelRequest + field_entity_map: + name: project +- message_name: DeleteNotificationChannelRequest + field_entity_map: + name: notification_channel +- message_name: SendNotificationChannelVerificationCodeRequest + field_entity_map: + name: notification_channel +- message_name: GetNotificationChannelVerificationCodeRequest + field_entity_map: + name: notification_channel +- message_name: VerifyNotificationChannelRequest + field_entity_map: + name: notification_channel +- message_name: GetUptimeCheckConfigRequest + field_entity_map: + name: uptime_check_config +- message_name: DeleteUptimeCheckConfigRequest + field_entity_map: + name: uptime_check_config +- message_name: Service + field_entity_map: + name: service +- message_name: ServiceLevelObjective + field_entity_map: + name: service_level_objective +- message_name: CreateServiceRequest + field_entity_map: + parent: project +- message_name: GetServiceRequest + field_entity_map: + name: service +- message_name: ListServicesRequest + field_entity_map: + parent: project +- message_name: UpdateServiceRequest + field_entity_map: + name: service +- message_name: DeleteServiceRequest + field_entity_map: + name: service +- message_name: CreateServiceLevelObjectiveRequest + field_entity_map: + parent: service +- message_name: GetServiceLevelObjectiveRequest + field_entity_map: + name: service_level_objective +- message_name: ListServiceLevelObjectivesRequest + field_entity_map: + parent: service +- message_name: UpdateServiceLevelObjectiveRequest + field_entity_map: + name: service_level_objective +- message_name: DeleteServiceLevelObjectiveRequest + field_entity_map: + name: service_level_objective diff --git a/google/monitoring/v3/monitoring_gapic.yaml b/google/monitoring/v3/monitoring_gapic.yaml index c046ff042..dc3832b1f 100644 --- a/google/monitoring/v3/monitoring_gapic.yaml +++ b/google/monitoring/v3/monitoring_gapic.yaml @@ -1,5 +1,6 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 +# The settings of generated code in a specific language. language_settings: java: package_name: com.google.cloud.monitoring.v3 @@ -19,750 +20,71 @@ language_settings: nodejs: package_name: monitoring.v3 domain_layer_location: google-cloud +# A list of API interface configurations. interfaces: +# The fully qualified name of the API interface. - name: google.monitoring.v3.AlertPolicyService - collections: - - name_pattern: projects/{project} - entity_name: project - # C#: Already GA, do not use common resource name for 'project' - - name_pattern: projects/{project}/alertPolicies/{alert_policy} - entity_name: alert_policy - - name_pattern: projects/{project}/alertPolicies/{alert_policy}/conditions/{condition} - entity_name: alert_policy_condition - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 methods: - - name: ListAlertPolicies - flattening: - groups: - - parameters: - - name - required_fields: - - name - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: alert_policies - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - - name: GetAlertPolicy - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: alert_policy - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - - name: CreateAlertPolicy - flattening: - groups: - - parameters: - - name - - alert_policy - required_fields: - - name - - alert_policy - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - name: DeleteAlertPolicy - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: alert_policy - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - - name: UpdateAlertPolicy - flattening: - groups: - - parameters: - - update_mask - - alert_policy - required_fields: - - alert_policy - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - alert_policy.name: alert_policy - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + - name: google.monitoring.v3.GroupService - collections: - - name_pattern: projects/{project} - entity_name: project - # C#: Already GA, do not use common resource name for 'project' - - name_pattern: projects/{project}/groups/{group} - entity_name: group - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 methods: - - name: ListGroups - # Removing flattening until we figure out how to deal with oneof - required_fields: - - name - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: group - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - - name: GetGroup - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: group - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - - name: CreateGroup - flattening: - groups: - - parameters: - - name - - group - required_fields: - - name - - group - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - name: UpdateGroup - flattening: - groups: - - parameters: - - group - required_fields: - - group retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - group.name: group - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - name: DeleteGroup - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: group - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - - name: ListGroupMembers - flattening: - groups: - - parameters: - - name - required_fields: - - name - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: members - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: group - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + - name: google.monitoring.v3.MetricService smoke_test: method: ListMonitoredResourceDescriptors init_fields: - name%project=$PROJECT_ID - collections: - - name_pattern: projects/{project} - entity_name: project - # C#: Already GA, do not use common resource name for 'project' - - name_pattern: projects/{project}/metricDescriptors/{metric_descriptor=**} - entity_name: metric_descriptor - - name_pattern: projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor} - entity_name: monitored_resource_descriptor - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] retry_params_def: - name: default initial_retry_delay_millis: 100 retry_delay_multiplier: 1.3 max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 + initial_rpc_timeout_millis: 30000 + rpc_timeout_multiplier: 1.3 + max_rpc_timeout_millis: 90000 total_timeout_millis: 600000 methods: - name: ListMonitoredResourceDescriptors - flattening: - groups: - - parameters: - - name - required_fields: - - name - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: resource_descriptors - retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - name: GetMonitoredResourceDescriptor - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: monitored_resource_descriptor - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - name: ListMetricDescriptors - flattening: - groups: - - parameters: - - name - required_fields: - - name - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: metric_descriptors - retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - name: GetMetricDescriptor - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: metric_descriptor - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - name: CreateMetricDescriptor - flattening: - groups: - - parameters: - - name - - metric_descriptor - required_fields: - - name - - metric_descriptor - retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - name: DeleteMetricDescriptor - flattening: - groups: - - parameters: - - name - required_fields: - - name retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: metric_descriptor - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - name: ListTimeSeries - flattening: - groups: - - parameters: - - name - - filter - - interval - - view - required_fields: - - name - - filter - - interval - - view - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: time_series - retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - name: CreateTimeSeries - flattening: - groups: - - parameters: - - name - - time_series - required_fields: - - name - - time_series - retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + - name: google.monitoring.v3.NotificationChannelService - collections: - - name_pattern: projects/{project} - entity_name: project - # C#: Already GA, do not use common resource name for 'project' - - name_pattern: projects/{project}/notificationChannels/{notification_channel} - entity_name: notification_channel - - name_pattern: projects/{project}/notificationChannelDescriptors/{channel_descriptor} - entity_name: notification_channel_descriptor - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 methods: - - name: ListNotificationChannelDescriptors - flattening: - groups: - - parameters: - - name - required_fields: - - name - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: channel_descriptors - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - - name: GetNotificationChannelDescriptor - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: notification_channel_descriptor - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - - name: ListNotificationChannels - flattening: - groups: - - parameters: - - name - required_fields: - - name - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: notification_channels - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - - name: GetNotificationChannel - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: notification_channel - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - - name: CreateNotificationChannel - flattening: - groups: - - parameters: - - name - - notification_channel - required_fields: - - name - - notification_channel - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: project - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - - name: UpdateNotificationChannel - flattening: - groups: - - parameters: - - update_mask - - notification_channel - required_fields: - - notification_channel - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - notification_channel.name: notification_channel - timeout_millis: 60000 - name: DeleteNotificationChannel - flattening: - groups: - - parameters: - - name - - force - required_fields: - - name retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: notification_channel - resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 - - name: SendNotificationChannelVerificationCode - surface_treatments: - - include_languages: - - go - - java - - csharp - - ruby - - nodejs - - python - - php - visibility: DISABLED - name: GetNotificationChannelVerificationCode - surface_treatments: - - include_languages: - - go - - java - - csharp - - ruby - - nodejs - - python - - php - visibility: DISABLED + retry_codes_name: idempotent - name: VerifyNotificationChannel - surface_treatments: - - include_languages: - - go - - java - - csharp - - ruby - - nodejs - - python - - php - visibility: DISABLED -- name: google.monitoring.v3.UptimeCheckService - collections: - - name_pattern: projects/{project} - entity_name: project - # C#: Already GA, do not use common resource name for 'project' - - name_pattern: projects/{project}/uptimeCheckConfigs/{uptime_check_config} - entity_name: uptime_check_config - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 + retry_codes_name: idempotent + +- name: google.monitoring.v3.ServiceMonitoringService methods: - - name: ListUptimeCheckConfigs - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: uptime_check_configs + - name: DeleteService retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - - name: GetUptimeCheckConfig - flattening: - groups: - - parameters: - - name - required_fields: - - name + - name: DeleteServiceLevelObjective retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: uptime_check_config - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: CreateUptimeCheckConfig - flattening: - groups: - - parameters: - - parent - - uptime_check_config - required_fields: - - parent - - uptime_check_config - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 60000 - - name: UpdateUptimeCheckConfig - flattening: - groups: - - parameters: - - uptime_check_config - required_fields: - - uptime_check_config - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - uptime_check_config.name: uptime_check_config - timeout_millis: 60000 + +- name: google.monitoring.v3.UptimeCheckService + methods: - name: DeleteUptimeCheckConfig - flattening: - groups: - - parameters: - - name - required_fields: - - name - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: uptime_check_config - timeout_millis: 60000 - resource_name_treatment: STATIC_TYPES - - name: ListUptimeCheckIps - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: uptime_check_ips retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 -resource_name_generation: -- message_name: Group - field_entity_map: - name: group - parent_name: group -- message_name: ListGroupsRequest - field_entity_map: - name: project - children_of_group: group - ancestors_of_group: group - descendants_of_group: group -- message_name: GetGroupRequest - field_entity_map: - name: group -- message_name: CreateGroupRequest - field_entity_map: - name: project -- message_name: DeleteGroupRequest - field_entity_map: - name: group -- message_name: ListGroupMembersRequest - field_entity_map: - name: group -- message_name: ListMonitoredResourceDescriptorsRequest - field_entity_map: - name: project -- message_name: GetMonitoredResourceDescriptorRequest - field_entity_map: - name: monitored_resource_descriptor -- message_name: ListMetricDescriptorsRequest - field_entity_map: - name: project -- message_name: GetMetricDescriptorRequest - field_entity_map: - name: metric_descriptor -- message_name: CreateMetricDescriptorRequest - field_entity_map: - name: project -- message_name: DeleteMetricDescriptorRequest - field_entity_map: - name: metric_descriptor -- message_name: ListTimeSeriesRequest - field_entity_map: - name: project -- message_name: CreateTimeSeriesRequest - field_entity_map: - name: project -- message_name: ListAlertPoliciesRequest - field_entity_map: - name: project -- message_name: GetAlertPolicyRequest - field_entity_map: - name: alert_policy -- message_name: CreateAlertPolicyRequest - field_entity_map: - name: project -- message_name: DeleteAlertPolicyRequest - field_entity_map: - name: alert_policy -- message_name: GetNotificationChannelDescriptorRequest - field_entity_map: - name: notification_channel_descriptor -- message_name: ListNotificationChannelDescriptorsRequest - field_entity_map: - name: project -- message_name: ListNotificationChannelsRequest - field_entity_map: - name: project -- message_name: GetNotificationChannelRequest - field_entity_map: - name: notification_channel -- message_name: CreateNotificationChannelRequest - field_entity_map: - name: project -- message_name: DeleteNotificationChannelRequest - field_entity_map: - name: notification_channel -- message_name: SendNotificationChannelVerificationCodeRequest - field_entity_map: - name: notification_channel -- message_name: GetNotificationChannelVerificationCodeRequest - field_entity_map: - name: notification_channel -- message_name: VerifyNotificationChannelRequest - field_entity_map: - name: notification_channel -- message_name: GetUptimeCheckConfigRequest - field_entity_map: - name: uptime_check_config -- message_name: DeleteUptimeCheckConfigRequest - field_entity_map: - name: uptime_check_config diff --git a/google/monitoring/v3/monitoring_grpc_service_config.json b/google/monitoring/v3/monitoring_grpc_service_config.json new file mode 100755 index 000000000..8dd8b829e --- /dev/null +++ b/google/monitoring/v3/monitoring_grpc_service_config.json @@ -0,0 +1,304 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.monitoring.v3.AlertPolicyService", + "method": "CreateAlertPolicy" + }, + { + "service": "google.monitoring.v3.AlertPolicyService", + "method": "UpdateAlertPolicy" + } + ], + "timeout": "30s" + }, + { + "name": [ + { + "service": "google.monitoring.v3.GroupService", + "method": "ListGroups" + }, + { + "service": "google.monitoring.v3.GroupService", + "method": "GetGroup" + }, + { + "service": "google.monitoring.v3.GroupService", + "method": "UpdateGroup" + }, + { + "service": "google.monitoring.v3.GroupService", + "method": "DeleteGroup" + }, + { + "service": "google.monitoring.v3.GroupService", + "method": "ListGroupMembers" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "30s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.monitoring.v3.GroupService", + "method": "CreateGroup" + } + ], + "timeout": "30s" + }, + { + "name": [ + { + "service": "google.monitoring.v3.MetricService", + "method": "CreateMetricDescriptor" + }, + { + "service": "google.monitoring.v3.MetricService", + "method": "CreateTimeSeries" + } + ], + "timeout": "12s" + }, + { + "name": [ + { + "service": "google.monitoring.v3.NotificationChannelService", + "method": "ListNotificationChannelDescriptors" + }, + { + "service": "google.monitoring.v3.NotificationChannelService", + "method": "GetNotificationChannelDescriptor" + }, + { + "service": "google.monitoring.v3.NotificationChannelService", + "method": "ListNotificationChannels" + }, + { + "service": "google.monitoring.v3.NotificationChannelService", + "method": "GetNotificationChannel" + }, + { + "service": "google.monitoring.v3.NotificationChannelService", + "method": "DeleteNotificationChannel" + }, + { + "service": "google.monitoring.v3.NotificationChannelService", + "method": "GetNotificationChannelVerificationCode" + }, + { + "service": "google.monitoring.v3.NotificationChannelService", + "method": "VerifyNotificationChannel" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "30s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.monitoring.v3.ServiceMonitoringService", + "method": "CreateService" + }, + { + "service": "google.monitoring.v3.ServiceMonitoringService", + "method": "UpdateService" + }, + { + "service": "google.monitoring.v3.ServiceMonitoringService", + "method": "CreateServiceLevelObjective" + }, + { + "service": "google.monitoring.v3.ServiceMonitoringService", + "method": "UpdateServiceLevelObjective" + } + ], + "timeout": "30s" + }, + { + "name": [ + { + "service": "google.monitoring.v3.ServiceMonitoringService", + "method": "GetService" + }, + { + "service": "google.monitoring.v3.ServiceMonitoringService", + "method": "ListServices" + }, + { + "service": "google.monitoring.v3.ServiceMonitoringService", + "method": "DeleteService" + }, + { + "service": "google.monitoring.v3.ServiceMonitoringService", + "method": "GetServiceLevelObjective" + }, + { + "service": "google.monitoring.v3.ServiceMonitoringService", + "method": "ListServiceLevelObjectives" + }, + { + "service": "google.monitoring.v3.ServiceMonitoringService", + "method": "DeleteServiceLevelObjective" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "30s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.monitoring.v3.UptimeCheckService", + "method": "ListUptimeCheckConfigs" + }, + { + "service": "google.monitoring.v3.UptimeCheckService", + "method": "GetUptimeCheckConfig" + }, + { + "service": "google.monitoring.v3.UptimeCheckService", + "method": "DeleteUptimeCheckConfig" + }, + { + "service": "google.monitoring.v3.UptimeCheckService", + "method": "ListUptimeCheckIps" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "30s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.monitoring.v3.AlertPolicyService", + "method": "ListAlertPolicies" + }, + { + "service": "google.monitoring.v3.AlertPolicyService", + "method": "GetAlertPolicy" + }, + { + "service": "google.monitoring.v3.AlertPolicyService", + "method": "DeleteAlertPolicy" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "30s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.monitoring.v3.MetricService", + "method": "ListMonitoredResourceDescriptors" + }, + { + "service": "google.monitoring.v3.MetricService", + "method": "GetMonitoredResourceDescriptor" + }, + { + "service": "google.monitoring.v3.MetricService", + "method": "ListMetricDescriptors" + }, + { + "service": "google.monitoring.v3.MetricService", + "method": "GetMetricDescriptor" + }, + { + "service": "google.monitoring.v3.MetricService", + "method": "DeleteMetricDescriptor" + }, + { + "service": "google.monitoring.v3.MetricService", + "method": "ListTimeSeries" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "30s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.monitoring.v3.NotificationChannelService", + "method": "CreateNotificationChannel" + }, + { + "service": "google.monitoring.v3.NotificationChannelService", + "method": "UpdateNotificationChannel" + }, + { + "service": "google.monitoring.v3.NotificationChannelService", + "method": "SendNotificationChannelVerificationCode" + } + ], + "timeout": "30s" + }, + { + "name": [ + { + "service": "google.monitoring.v3.UptimeCheckService", + "method": "CreateUptimeCheckConfig" + }, + { + "service": "google.monitoring.v3.UptimeCheckService", + "method": "UpdateUptimeCheckConfig" + } + ], + "timeout": "30s" + } + ] +} diff --git a/google/monitoring/v3/mutation_record.proto b/google/monitoring/v3/mutation_record.proto index c87e2ebcc..b830eb626 100644 --- a/google/monitoring/v3/mutation_record.proto +++ b/google/monitoring/v3/mutation_record.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -25,6 +24,7 @@ option java_multiple_files = true; option java_outer_classname = "MutationRecordProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // Describes a change made to a configuration. message MutationRecord { diff --git a/google/monitoring/v3/notification.proto b/google/monitoring/v3/notification.proto index f2812548e..897a14c04 100644 --- a/google/monitoring/v3/notification.proto +++ b/google/monitoring/v3/notification.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; -import "google/api/annotations.proto"; import "google/api/label.proto"; +import "google/api/launch_stage.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/common.proto"; import "google/protobuf/wrappers.proto"; @@ -28,14 +28,23 @@ option java_multiple_files = true; option java_outer_classname = "NotificationProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A description of a notification channel. The descriptor includes // the properties of the channel and the set of labels or fields that // must be specified to configure channels of a given type. message NotificationChannelDescriptor { - // The full REST resource name for this descriptor. The syntax is: + option (google.api.resource) = { + type: "monitoring.googleapis.com/NotificationChannelDescriptor" + pattern: "projects/{project}/notificationChannelDescriptors/{channel_descriptor}" + pattern: "organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}" + pattern: "folders/{folder}/notificationChannelDescriptors/{channel_descriptor}" + pattern: "*" + }; + + // The full REST resource name for this descriptor. The format is: // - // projects/[PROJECT_ID]/notificationChannelDescriptors/[TYPE] + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE] // // In the above, `[TYPE]` is the value of the `type` field. string name = 6; @@ -61,6 +70,9 @@ message NotificationChannelDescriptor { // The tiers that support this notification channel; the project service tier // must be one of the supported_tiers. repeated ServiceTier supported_tiers = 5 [deprecated = true]; + + // The product launch stage for channels of this type. + google.api.LaunchStage launch_stage = 7; } // A `NotificationChannel` is a medium through which an alert is @@ -69,6 +81,14 @@ message NotificationChannelDescriptor { // containing sensitive information like authentication tokens or // contact info are only partially populated on retrieval. message NotificationChannel { + option (google.api.resource) = { + type: "monitoring.googleapis.com/NotificationChannel" + pattern: "projects/{project}/notificationChannels/{notification_channel}" + pattern: "organizations/{organization}/notificationChannels/{notification_channel}" + pattern: "folders/{folder}/notificationChannels/{notification_channel}" + pattern: "*" + }; + // Indicates whether the channel has been verified or not. It is illegal // to specify this field in a // [`CreateNotificationChannel`][google.monitoring.v3.NotificationChannelService.CreateNotificationChannel] @@ -94,14 +114,12 @@ message NotificationChannel { } // The type of the notification channel. This field matches the - // value of the - // [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] - // field. + // value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field. string type = 1; - // The full REST resource name for this channel. The syntax is: + // The full REST resource name for this channel. The format is: // - // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] // // The `[CHANNEL_ID]` is automatically assigned by the server on creation. string name = 6; @@ -114,13 +132,13 @@ message NotificationChannel { // An optional human-readable description of this notification channel. This // description may provide additional details, beyond the display - // name, for the channel. This may not exceeed 1024 Unicode characters. + // name, for the channel. This may not exceed 1024 Unicode characters. string description = 4; // Configuration fields that define the channel and its behavior. The // permissible and required labels are specified in the - // [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] - // of the `NotificationChannelDescriptor` corresponding to the `type` field. + // [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the + // `NotificationChannelDescriptor` corresponding to the `type` field. map labels = 5; // User-supplied key/value data that does not need to conform to diff --git a/google/monitoring/v3/notification_service.proto b/google/monitoring/v3/notification_service.proto index e178e0cad..20c9a8e9b 100644 --- a/google/monitoring/v3/notification_service.proto +++ b/google/monitoring/v3/notification_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/notification.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -30,35 +32,41 @@ option java_multiple_files = true; option java_outer_classname = "NotificationServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The Notification Channel API provides access to configuration that // controls how messages related to incidents are sent. service NotificationChannelService { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read"; + // Lists the descriptors for supported channel types. The use of descriptors // makes it possible for new channel types to be dynamically added. - rpc ListNotificationChannelDescriptors( - ListNotificationChannelDescriptorsRequest) - returns (ListNotificationChannelDescriptorsResponse) { + rpc ListNotificationChannelDescriptors(ListNotificationChannelDescriptorsRequest) returns (ListNotificationChannelDescriptorsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/notificationChannelDescriptors" }; + option (google.api.method_signature) = "name"; } // Gets a single channel descriptor. The descriptor indicates which fields // are expected / permitted for a notification channel of the given type. - rpc GetNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest) - returns (NotificationChannelDescriptor) { + rpc GetNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest) returns (NotificationChannelDescriptor) { option (google.api.http) = { get: "/v3/{name=projects/*/notificationChannelDescriptors/*}" }; + option (google.api.method_signature) = "name"; } // Lists the notification channels that have been created for the project. - rpc ListNotificationChannels(ListNotificationChannelsRequest) - returns (ListNotificationChannelsResponse) { + rpc ListNotificationChannels(ListNotificationChannelsRequest) returns (ListNotificationChannelsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/notificationChannels" }; + option (google.api.method_signature) = "name"; } // Gets a single notification channel. The channel includes the relevant @@ -66,50 +74,49 @@ service NotificationChannelService { // response may truncate or omit passwords, API keys, or other private key // matter and thus the response may not be 100% identical to the information // that was supplied in the call to the create method. - rpc GetNotificationChannel(GetNotificationChannelRequest) - returns (NotificationChannel) { + rpc GetNotificationChannel(GetNotificationChannelRequest) returns (NotificationChannel) { option (google.api.http) = { get: "/v3/{name=projects/*/notificationChannels/*}" }; + option (google.api.method_signature) = "name"; } // Creates a new notification channel, representing a single notification // endpoint such as an email address, SMS number, or PagerDuty service. - rpc CreateNotificationChannel(CreateNotificationChannelRequest) - returns (NotificationChannel) { + rpc CreateNotificationChannel(CreateNotificationChannelRequest) returns (NotificationChannel) { option (google.api.http) = { post: "/v3/{name=projects/*}/notificationChannels" body: "notification_channel" }; + option (google.api.method_signature) = "name,notification_channel"; } // Updates a notification channel. Fields not specified in the field mask // remain unchanged. - rpc UpdateNotificationChannel(UpdateNotificationChannelRequest) - returns (NotificationChannel) { + rpc UpdateNotificationChannel(UpdateNotificationChannelRequest) returns (NotificationChannel) { option (google.api.http) = { patch: "/v3/{notification_channel.name=projects/*/notificationChannels/*}" body: "notification_channel" }; + option (google.api.method_signature) = "update_mask,notification_channel"; } // Deletes a notification channel. - rpc DeleteNotificationChannel(DeleteNotificationChannelRequest) - returns (google.protobuf.Empty) { + rpc DeleteNotificationChannel(DeleteNotificationChannelRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/notificationChannels/*}" }; + option (google.api.method_signature) = "name,force"; } // Causes a verification code to be delivered to the channel. The code // can then be supplied in `VerifyNotificationChannel` to verify the channel. - rpc SendNotificationChannelVerificationCode( - SendNotificationChannelVerificationCodeRequest) - returns (google.protobuf.Empty) { + rpc SendNotificationChannelVerificationCode(SendNotificationChannelVerificationCodeRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode" body: "*" }; + option (google.api.method_signature) = "name"; } // Requests a verification code for an already verified channel that can then @@ -133,39 +140,43 @@ service NotificationChannelService { // have a shorter expiration (e.g. codes such as "G-123456") whereas // GetVerificationCode() will typically return a much longer, websafe base // 64 encoded string that has a longer expiration time. - rpc GetNotificationChannelVerificationCode( - GetNotificationChannelVerificationCodeRequest) - returns (GetNotificationChannelVerificationCodeResponse) { + rpc GetNotificationChannelVerificationCode(GetNotificationChannelVerificationCodeRequest) returns (GetNotificationChannelVerificationCodeResponse) { option (google.api.http) = { post: "/v3/{name=projects/*/notificationChannels/*}:getVerificationCode" body: "*" }; + option (google.api.method_signature) = "name"; } // Verifies a `NotificationChannel` by proving receipt of the code // delivered to the channel as a result of calling // `SendNotificationChannelVerificationCode`. - rpc VerifyNotificationChannel(VerifyNotificationChannelRequest) - returns (NotificationChannel) { + rpc VerifyNotificationChannel(VerifyNotificationChannelRequest) returns (NotificationChannel) { option (google.api.http) = { post: "/v3/{name=projects/*/notificationChannels/*}:verify" body: "*" }; + option (google.api.method_signature) = "name,code"; } } // The `ListNotificationChannelDescriptors` request. message ListNotificationChannelDescriptorsRequest { - // The REST resource name of the parent from which to retrieve + // Required. The REST resource name of the parent from which to retrieve // the notification channel descriptors. The expected syntax is: // - // projects/[PROJECT_ID] + // projects/[PROJECT_ID_OR_NUMBER] // // Note that this names the parent container in which to look for the // descriptors; to retrieve a single descriptor by name, use the // [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] // operation, instead. - string name = 4; + string name = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/NotificationChannelDescriptor" + } + ]; // The maximum number of results to return in a single response. If // not set to a positive number, a reasonable value will be chosen by the @@ -193,43 +204,62 @@ message ListNotificationChannelDescriptorsResponse { // The `GetNotificationChannelDescriptor` response. message GetNotificationChannelDescriptorRequest { - // The channel type for which to execute the request. The format is - // `projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}`. - string name = 3; + // Required. The channel type for which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/NotificationChannelDescriptor" + } + ]; } // The `CreateNotificationChannel` request. message CreateNotificationChannelRequest { - // The project on which to execute the request. The format is: + // Required. The project on which to execute the request. The format is: // - // projects/[PROJECT_ID] + // projects/[PROJECT_ID_OR_NUMBER] // - // Note that this names the container into which the channel will be - // written. This does not name the newly created channel. The resulting + // This names the container into which the channel will be + // written, this does not name the newly created channel. The resulting // channel's name will have a normalized version of this field as a prefix, // but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. - string name = 3; - - // The definition of the `NotificationChannel` to create. - NotificationChannel notification_channel = 2; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/NotificationChannel" + } + ]; + + // Required. The definition of the `NotificationChannel` to create. + NotificationChannel notification_channel = 2 [(google.api.field_behavior) = REQUIRED]; } // The `ListNotificationChannels` request. message ListNotificationChannelsRequest { - // The project on which to execute the request. The format is - // `projects/[PROJECT_ID]`. That is, this names the container + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + // + // This names the container // in which to look for the notification channels; it does not name a // specific channel. To query a specific channel by REST resource name, use // the // [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] // operation. - string name = 5; + string name = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/NotificationChannel" + } + ]; // If provided, this field specifies the criteria that must be met by // notification channels to be included in the response. // // For more details, see [sorting and - // filtering](/monitoring/api/v3/sorting-and-filtering). + // filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). string filter = 6; // A comma-separated list of fields by which to sort the result. Supports @@ -237,7 +267,7 @@ message ListNotificationChannelsRequest { // a minus sign to sort in descending rather than ascending order. // // For more details, see [sorting and - // filtering](/monitoring/api/v3/sorting-and-filtering). + // filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). string order_by = 7; // The maximum number of results to return in a single response. If @@ -265,9 +295,15 @@ message ListNotificationChannelsResponse { // The `GetNotificationChannel` request. message GetNotificationChannelRequest { - // The channel for which to execute the request. The format is - // `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. - string name = 3; + // Required. The channel for which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/NotificationChannel" + } + ]; } // The `UpdateNotificationChannel` request. @@ -275,18 +311,24 @@ message UpdateNotificationChannelRequest { // The fields to update. google.protobuf.FieldMask update_mask = 2; - // A description of the changes to be applied to the specified + // Required. A description of the changes to be applied to the specified // notification channel. The description must provide a definition for // fields to be updated; the names of these fields should also be // included in the `update_mask`. - NotificationChannel notification_channel = 3; + NotificationChannel notification_channel = 3 [(google.api.field_behavior) = REQUIRED]; } // The `DeleteNotificationChannel` request. message DeleteNotificationChannelRequest { - // The channel for which to execute the request. The format is - // `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. - string name = 3; + // Required. The channel for which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/NotificationChannel" + } + ]; // If true, the notification channel will be deleted regardless of its // use in alert policies (the policies will be updated to remove the @@ -297,16 +339,26 @@ message DeleteNotificationChannelRequest { // The `SendNotificationChannelVerificationCode` request. message SendNotificationChannelVerificationCodeRequest { - // The notification channel to which to send a verification code. - string name = 1; + // Required. The notification channel to which to send a verification code. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/NotificationChannel" + } + ]; } // The `GetNotificationChannelVerificationCode` request. message GetNotificationChannelVerificationCodeRequest { - // The notification channel for which a verification code is to be generated + // Required. The notification channel for which a verification code is to be generated // and retrieved. This must name a channel that is already verified; if // the specified channel is not verified, the request will fail. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/NotificationChannel" + } + ]; // The desired expiration time. If specified, the API will guarantee that // the returned code will not be valid after the specified timestamp; @@ -336,15 +388,20 @@ message GetNotificationChannelVerificationCodeResponse { // The `VerifyNotificationChannel` request. message VerifyNotificationChannelRequest { - // The notification channel to verify. - string name = 1; - - // The verification code that was delivered to the channel as + // Required. The notification channel to verify. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/NotificationChannel" + } + ]; + + // Required. The verification code that was delivered to the channel as // a result of invoking the `SendNotificationChannelVerificationCode` API // method or that was retrieved from a verified channel via // `GetNotificationChannelVerificationCode`. For example, one might have // "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only // guaranteed that the code is valid UTF-8; one should not // make any assumptions regarding the structure or format of the code). - string code = 2; + string code = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/monitoring/v3/service.proto b/google/monitoring/v3/service.proto new file mode 100644 index 000000000..a89c007c9 --- /dev/null +++ b/google/monitoring/v3/service.proto @@ -0,0 +1,419 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.v3; + +import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/calendar_period.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "ServiceMonitoringProto"; +option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; + +// A `Service` is a discrete, autonomous, and network-accessible unit, designed +// to solve an individual concern +// ([Wikipedia](https://en.wikipedia.org/wiki/Service-orientation)). In +// Cloud Monitoring, a `Service` acts as the root resource under which +// operational aspects of the service are accessible. +message Service { + option (google.api.resource) = { + type: "monitoring.googleapis.com/Service" + pattern: "projects/{project}/services/{service}" + pattern: "organizations/{organization}/services/{service}" + pattern: "folders/{folder}/services/{service}" + pattern: "*" + }; + + // Custom view of service telemetry. Currently a place-holder pending final + // design. + message Custom { + + } + + // App Engine service. Learn more at https://cloud.google.com/appengine. + message AppEngine { + // The ID of the App Engine module underlying this service. Corresponds to + // the `module_id` resource label in the `gae_app` monitored resource: + // https://cloud.google.com/monitoring/api/resources#tag_gae_app + string module_id = 1; + } + + // Cloud Endpoints service. Learn more at https://cloud.google.com/endpoints. + message CloudEndpoints { + // The name of the Cloud Endpoints service underlying this service. + // Corresponds to the `service` resource label in the `api` monitored + // resource: https://cloud.google.com/monitoring/api/resources#tag_api + string service = 1; + } + + // Istio service scoped to a single Kubernetes cluster. Learn more at + // http://istio.io. + message ClusterIstio { + option deprecated = true; + + // The location of the Kubernetes cluster in which this Istio service is + // defined. Corresponds to the `location` resource label in `k8s_cluster` + // resources. + string location = 1; + + // The name of the Kubernetes cluster in which this Istio service is + // defined. Corresponds to the `cluster_name` resource label in + // `k8s_cluster` resources. + string cluster_name = 2; + + // The namespace of the Istio service underlying this service. Corresponds + // to the `destination_service_namespace` metric label in Istio metrics. + string service_namespace = 3; + + // The name of the Istio service underlying this service. Corresponds to the + // `destination_service_name` metric label in Istio metrics. + string service_name = 4; + } + + // Istio service scoped to an Istio mesh + message MeshIstio { + // Identifier for the mesh in which this Istio service is defined. + // Corresponds to the `mesh_uid` metric label in Istio metrics. + string mesh_uid = 1; + + // The namespace of the Istio service underlying this service. Corresponds + // to the `destination_service_namespace` metric label in Istio metrics. + string service_namespace = 3; + + // The name of the Istio service underlying this service. Corresponds to the + // `destination_service_name` metric label in Istio metrics. + string service_name = 4; + } + + // Configuration for how to query telemetry on a Service. + message Telemetry { + // The full name of the resource that defines this service. Formatted as + // described in https://cloud.google.com/apis/design/resource_names. + string resource_name = 1; + } + + // Resource name for this Service. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + string name = 1; + + // Name used for UI elements listing this Service. + string display_name = 2; + + // REQUIRED. Service-identifying atoms specifying the underlying service. + oneof identifier { + // Custom service type. + Custom custom = 6; + + // Type used for App Engine services. + AppEngine app_engine = 7; + + // Type used for Cloud Endpoints services. + CloudEndpoints cloud_endpoints = 8; + + // Type used for Istio services that live in a Kubernetes cluster. + ClusterIstio cluster_istio = 9 [deprecated = true]; + + // Type used for Istio services scoped to an Istio mesh. + MeshIstio mesh_istio = 10; + } + + // Configuration for how to query telemetry on a Service. + Telemetry telemetry = 13; +} + +// A Service-Level Objective (SLO) describes a level of desired good service. It +// consists of a service-level indicator (SLI), a performance goal, and a period +// over which the objective is to be evaluated against that goal. The SLO can +// use SLIs defined in a number of different manners. Typical SLOs might include +// "99% of requests in each rolling week have latency below 200 milliseconds" or +// "99.5% of requests in each calendar month return successfully." +message ServiceLevelObjective { + option (google.api.resource) = { + type: "monitoring.googleapis.com/ServiceLevelObjective" + pattern: "projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}" + pattern: "organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}" + pattern: "folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}" + pattern: "*" + history: ORIGINALLY_SINGLE_PATTERN + }; + + // `ServiceLevelObjective.View` determines what form of + // `ServiceLevelObjective` is returned from `GetServiceLevelObjective`, + // `ListServiceLevelObjectives`, and `ListServiceLevelObjectiveVersions` RPCs. + enum View { + // Same as FULL. + VIEW_UNSPECIFIED = 0; + + // Return the embedded `ServiceLevelIndicator` in the form in which it was + // defined. If it was defined using a `BasicSli`, return that `BasicSli`. + FULL = 2; + + // For `ServiceLevelIndicator`s using `BasicSli` articulation, instead + // return the `ServiceLevelIndicator` with its mode of computation fully + // spelled out as a `RequestBasedSli`. For `ServiceLevelIndicator`s using + // `RequestBasedSli` or `WindowsBasedSli`, return the + // `ServiceLevelIndicator` as it was provided. + EXPLICIT = 1; + } + + // Resource name for this `ServiceLevelObjective`. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + string name = 1; + + // Name used for UI elements listing this SLO. + string display_name = 11; + + // The definition of good service, used to measure and calculate the quality + // of the `Service`'s performance with respect to a single aspect of service + // quality. + ServiceLevelIndicator service_level_indicator = 3; + + // The fraction of service that must be good in order for this objective to be + // met. `0 < goal <= 0.999`. + double goal = 4; + + // The time period over which the objective will be evaluated. + oneof period { + // A rolling time period, semantically "in the past ``". + // Must be an integer multiple of 1 day no larger than 30 days. + google.protobuf.Duration rolling_period = 5; + + // A calendar period, semantically "since the start of the current + // ``". At this time, only `DAY`, `WEEK`, `FORTNIGHT`, and + // `MONTH` are supported. + google.type.CalendarPeriod calendar_period = 6; + } +} + +// A Service-Level Indicator (SLI) describes the "performance" of a service. For +// some services, the SLI is well-defined. In such cases, the SLI can be +// described easily by referencing the well-known SLI and providing the needed +// parameters. Alternatively, a "custom" SLI can be defined with a query to the +// underlying metric store. An SLI is defined to be `good_service / +// total_service` over any queried time interval. The value of performance +// always falls into the range `0 <= performance <= 1`. A custom SLI describes +// how to compute this ratio, whether this is by dividing values from a pair of +// time series, cutting a `Distribution` into good and bad counts, or counting +// time windows in which the service complies with a criterion. For separation +// of concerns, a single Service-Level Indicator measures performance for only +// one aspect of service quality, such as fraction of successful queries or +// fast-enough queries. +message ServiceLevelIndicator { + // Service level indicators can be grouped by whether the "unit" of service + // being measured is based on counts of good requests or on counts of good + // time windows + oneof type { + // Basic SLI on a well-known service type. + BasicSli basic_sli = 4; + + // Request-based SLIs + RequestBasedSli request_based = 1; + + // Windows-based SLIs + WindowsBasedSli windows_based = 2; + } +} + +// An SLI measuring performance on a well-known service type. Performance will +// be computed on the basis of pre-defined metrics. The type of the +// `service_resource` determines the metrics to use and the +// `service_resource.labels` and `metric_labels` are used to construct a +// monitoring filter to filter that metric down to just the data relevant to +// this service. +message BasicSli { + // Future parameters for the availability SLI. + message AvailabilityCriteria { + + } + + // Parameters for a latency threshold SLI. + message LatencyCriteria { + // Good service is defined to be the count of requests made to this service + // that return in no more than `threshold`. + google.protobuf.Duration threshold = 3; + } + + // OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from + // other methods will not be used to calculate performance for this SLI. If + // omitted, this SLI applies to all the Service's methods. For service types + // that don't support breaking down by method, setting this field will result + // in an error. + repeated string method = 7; + + // OPTIONAL: The set of locations to which this SLI is relevant. Telemetry + // from other locations will not be used to calculate performance for this + // SLI. If omitted, this SLI applies to all locations in which the Service has + // activity. For service types that don't support breaking down by location, + // setting this field will result in an error. + repeated string location = 8; + + // OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry + // from other API versions will not be used to calculate performance for this + // SLI. If omitted, this SLI applies to all API versions. For service types + // that don't support breaking down by version, setting this field will result + // in an error. + repeated string version = 9; + + // This SLI can be evaluated on the basis of availability or latency. + oneof sli_criteria { + // Good service is defined to be the count of requests made to this service + // that return successfully. + AvailabilityCriteria availability = 2; + + // Good service is defined to be the count of requests made to this service + // that are fast enough with respect to `latency.threshold`. + LatencyCriteria latency = 3; + } +} + +// Range of numerical values, inclusive of `min` and exclusive of `max`. If the +// open range "< range.max" is desired, set `range.min = -infinity`. If the open +// range ">= range.min" is desired, set `range.max = infinity`. +message Range { + // Range minimum. + double min = 1; + + // Range maximum. + double max = 2; +} + +// Service Level Indicators for which atomic units of service are counted +// directly. +message RequestBasedSli { + // The means to compute a ratio of `good_service` to `total_service`. + oneof method { + // `good_total_ratio` is used when the ratio of `good_service` to + // `total_service` is computed from two `TimeSeries`. + TimeSeriesRatio good_total_ratio = 1; + + // `distribution_cut` is used when `good_service` is a count of values + // aggregated in a `Distribution` that fall into a good range. The + // `total_service` is the total count of all values aggregated in the + // `Distribution`. + DistributionCut distribution_cut = 3; + } +} + +// A `TimeSeriesRatio` specifies two `TimeSeries` to use for computing the +// `good_service / total_service` ratio. The specified `TimeSeries` must have +// `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = +// DELTA` or `MetricKind = CUMULATIVE`. The `TimeSeriesRatio` must specify +// exactly two of good, bad, and total, and the relationship `good_service + +// bad_service = total_service` will be assumed. +message TimeSeriesRatio { + // A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // specifying a `TimeSeries` quantifying good service provided. Must have + // `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + // DELTA` or `MetricKind = CUMULATIVE`. + string good_service_filter = 4; + + // A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // specifying a `TimeSeries` quantifying bad service, either demanded service + // that was not provided or demanded service that was of inadequate quality. + // Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have + // `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. + string bad_service_filter = 5; + + // A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // specifying a `TimeSeries` quantifying total demanded service. Must have + // `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + // DELTA` or `MetricKind = CUMULATIVE`. + string total_service_filter = 6; +} + +// A `DistributionCut` defines a `TimeSeries` and thresholds used for measuring +// good service and total service. The `TimeSeries` must have `ValueType = +// DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. The +// computed `good_service` will be the count of values x in the `Distribution` +// such that `range.min <= x < range.max`. +message DistributionCut { + // A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // specifying a `TimeSeries` aggregating values. Must have `ValueType = + // DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. + string distribution_filter = 4; + + // Range of values considered "good." For a one-sided range, set one bound to + // an infinite value. + Range range = 5; +} + +// A `WindowsBasedSli` defines `good_service` as the count of time windows for +// which the provided service was of good quality. Criteria for determining +// if service was good are embedded in the `window_criterion`. +message WindowsBasedSli { + // A `PerformanceThreshold` is used when each window is good when that window + // has a sufficiently high `performance`. + message PerformanceThreshold { + // The means, either a request-based SLI or a basic SLI, by which to compute + // performance over a window. + oneof type { + // `RequestBasedSli` to evaluate to judge window quality. + RequestBasedSli performance = 1; + + // `BasicSli` to evaluate to judge window quality. + BasicSli basic_sli_performance = 3; + } + + // If window `performance >= threshold`, the window is counted as good. + double threshold = 2; + } + + // A `MetricRange` is used when each window is good when the value x of a + // single `TimeSeries` satisfies `range.min <= x < range.max`. The provided + // `TimeSeries` must have `ValueType = INT64` or `ValueType = DOUBLE` and + // `MetricKind = GAUGE`. + message MetricRange { + // A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // specifying the `TimeSeries` to use for evaluating window quality. + string time_series = 1; + + // Range of values considered "good." For a one-sided range, set one bound + // to an infinite value. + Range range = 4; + } + + // The criterion to use for evaluating window goodness. + oneof window_criterion { + // A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // specifying a `TimeSeries` with `ValueType = BOOL`. The window is good if + // any `true` values appear in the window. + string good_bad_metric_filter = 5; + + // A window is good if its `performance` is high enough. + PerformanceThreshold good_total_ratio_threshold = 2; + + // A window is good if the metric's value is in a good range, averaged + // across returned streams. + MetricRange metric_mean_in_range = 6; + + // A window is good if the metric's value is in a good range, summed across + // returned streams. + MetricRange metric_sum_in_range = 7; + } + + // Duration over which window quality is evaluated. Must be an integer + // fraction of a day and at least `60s`. + google.protobuf.Duration window_period = 4; +} diff --git a/google/monitoring/v3/service_service.proto b/google/monitoring/v3/service_service.proto new file mode 100644 index 000000000..cd5f7db67 --- /dev/null +++ b/google/monitoring/v3/service_service.proto @@ -0,0 +1,346 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/monitoring/v3/service.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "ServiceMonitoringServiceProto"; +option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; + +// The Cloud Monitoring Service-Oriented Monitoring API has endpoints for +// managing and querying aspects of a workspace's services. These include the +// `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy +// of categorized Health Metrics. +service ServiceMonitoringService { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read"; + + // Create a `Service`. + rpc CreateService(CreateServiceRequest) returns (Service) { + option (google.api.http) = { + post: "/v3/{parent=*/*}/services" + body: "service" + }; + option (google.api.method_signature) = "parent,service"; + } + + // Get the named `Service`. + rpc GetService(GetServiceRequest) returns (Service) { + option (google.api.http) = { + get: "/v3/{name=*/*/services/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List `Service`s for this workspace. + rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { + option (google.api.http) = { + get: "/v3/{parent=*/*}/services" + }; + option (google.api.method_signature) = "parent"; + } + + // Update this `Service`. + rpc UpdateService(UpdateServiceRequest) returns (Service) { + option (google.api.http) = { + patch: "/v3/{service.name=*/*/services/*}" + body: "service" + }; + option (google.api.method_signature) = "service"; + } + + // Soft delete this `Service`. + rpc DeleteService(DeleteServiceRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=*/*/services/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Create a `ServiceLevelObjective` for the given `Service`. + rpc CreateServiceLevelObjective(CreateServiceLevelObjectiveRequest) returns (ServiceLevelObjective) { + option (google.api.http) = { + post: "/v3/{parent=*/*/services/*}/serviceLevelObjectives" + body: "service_level_objective" + }; + option (google.api.method_signature) = "parent,service_level_objective"; + } + + // Get a `ServiceLevelObjective` by name. + rpc GetServiceLevelObjective(GetServiceLevelObjectiveRequest) returns (ServiceLevelObjective) { + option (google.api.http) = { + get: "/v3/{name=*/*/services/*/serviceLevelObjectives/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List the `ServiceLevelObjective`s for the given `Service`. + rpc ListServiceLevelObjectives(ListServiceLevelObjectivesRequest) returns (ListServiceLevelObjectivesResponse) { + option (google.api.http) = { + get: "/v3/{parent=*/*/services/*}/serviceLevelObjectives" + }; + option (google.api.method_signature) = "parent"; + } + + // Update the given `ServiceLevelObjective`. + rpc UpdateServiceLevelObjective(UpdateServiceLevelObjectiveRequest) returns (ServiceLevelObjective) { + option (google.api.http) = { + patch: "/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}" + body: "service_level_objective" + }; + option (google.api.method_signature) = "service_level_objective"; + } + + // Delete the given `ServiceLevelObjective`. + rpc DeleteServiceLevelObjective(DeleteServiceLevelObjectiveRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=*/*/services/*/serviceLevelObjectives/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// The `CreateService` request. +message CreateServiceRequest { + // Required. Resource name of the parent workspace. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/Service" + } + ]; + + // Optional. The Service id to use for this Service. If omitted, an id will be + // generated instead. Must match the pattern `[a-z0-9\-]+` + string service_id = 3; + + // Required. The `Service` to create. + Service service = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The `GetService` request. +message GetServiceRequest { + // Required. Resource name of the `Service`. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Service" + } + ]; +} + +// The `ListServices` request. +message ListServicesRequest { + // Required. Resource name of the parent containing the listed services, either a + // project or a Monitoring Workspace. The formats are: + // + // projects/[PROJECT_ID_OR_NUMBER] + // workspaces/[HOST_PROJECT_ID_OR_NUMBER] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/Service" + } + ]; + + // A filter specifying what `Service`s to return. The filter currently + // supports the following fields: + // + // - `identifier_case` + // - `app_engine.module_id` + // - `cloud_endpoints.service` + // - `cluster_istio.location` + // - `cluster_istio.cluster_name` + // - `cluster_istio.service_namespace` + // - `cluster_istio.service_name` + // + // `identifier_case` refers to which option in the identifier oneof is + // populated. For example, the filter `identifier_case = "CUSTOM"` would match + // all services with a value for the `custom` field. Valid options are + // "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". + string filter = 2; + + // A non-negative number that is the maximum number of results to return. + // When 0, use default page size. + int32 page_size = 3; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return additional results from the previous method call. + string page_token = 4; +} + +// The `ListServices` response. +message ListServicesResponse { + // The `Service`s matching the specified filter. + repeated Service services = 1; + + // If there are more results than have been returned, then this field is set + // to a non-empty value. To see the additional results, + // use that value as `page_token` in the next call to this method. + string next_page_token = 2; +} + +// The `UpdateService` request. +message UpdateServiceRequest { + // Required. The `Service` to draw updates from. + // The given `name` specifies the resource to update. + Service service = 1 [(google.api.field_behavior) = REQUIRED]; + + // A set of field paths defining which fields to use for the update. + google.protobuf.FieldMask update_mask = 2; +} + +// The `DeleteService` request. +message DeleteServiceRequest { + // Required. Resource name of the `Service` to delete. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Service" + } + ]; +} + +// The `CreateServiceLevelObjective` request. +message CreateServiceLevelObjectiveRequest { + // Required. Resource name of the parent `Service`. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Service" + } + ]; + + // Optional. The ServiceLevelObjective id to use for this + // ServiceLevelObjective. If omitted, an id will be generated instead. Must + // match the pattern `[a-z0-9\-]+` + string service_level_objective_id = 3; + + // Required. The `ServiceLevelObjective` to create. + // The provided `name` will be respected if no `ServiceLevelObjective` exists + // with this name. + ServiceLevelObjective service_level_objective = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The `GetServiceLevelObjective` request. +message GetServiceLevelObjectiveRequest { + // Required. Resource name of the `ServiceLevelObjective` to get. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/ServiceLevelObjective" + } + ]; + + // View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the + // `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + // `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + // `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + ServiceLevelObjective.View view = 2; +} + +// The `ListServiceLevelObjectives` request. +message ListServiceLevelObjectivesRequest { + // Required. Resource name of the parent containing the listed SLOs, either a + // project or a Monitoring Workspace. The formats are: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + // workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Service" + } + ]; + + // A filter specifying what `ServiceLevelObjective`s to return. + string filter = 2; + + // A non-negative number that is the maximum number of results to return. + // When 0, use default page size. + int32 page_size = 3; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return additional results from the previous method call. + string page_token = 4; + + // View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each + // `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + // `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + // `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + ServiceLevelObjective.View view = 5; +} + +// The `ListServiceLevelObjectives` response. +message ListServiceLevelObjectivesResponse { + // The `ServiceLevelObjective`s matching the specified filter. + repeated ServiceLevelObjective service_level_objectives = 1; + + // If there are more results than have been returned, then this field is set + // to a non-empty value. To see the additional results, + // use that value as `page_token` in the next call to this method. + string next_page_token = 2; +} + +// The `UpdateServiceLevelObjective` request. +message UpdateServiceLevelObjectiveRequest { + // Required. The `ServiceLevelObjective` to draw updates from. + // The given `name` specifies the resource to update. + ServiceLevelObjective service_level_objective = 1 [(google.api.field_behavior) = REQUIRED]; + + // A set of field paths defining which fields to use for the update. + google.protobuf.FieldMask update_mask = 2; +} + +// The `DeleteServiceLevelObjective` request. +message DeleteServiceLevelObjectiveRequest { + // Required. Resource name of the `ServiceLevelObjective` to delete. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/ServiceLevelObjective" + } + ]; +} diff --git a/google/monitoring/v3/span_context.proto b/google/monitoring/v3/span_context.proto index f7977c288..72cce35f1 100644 --- a/google/monitoring/v3/span_context.proto +++ b/google/monitoring/v3/span_context.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -23,21 +22,24 @@ option java_multiple_files = true; option java_outer_classname = "SpanContextProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; -// The context of a span, attached to google.api.Distribution.Exemplars -// in google.api.Distribution values during aggregation. +// The context of a span, attached to +// [Exemplars][google.api.Distribution.Exemplars] +// in [Distribution][google.api.Distribution] values during aggregation. // // It contains the name of a span with format: -// projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] +// +// projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] message SpanContext { - // The resource name of the span in the following format: + // The resource name of the span. The format is: // - // projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] + // projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] // - // [TRACE_ID] is a unique identifier for a trace within a project; + // `[TRACE_ID]` is a unique identifier for a trace within a project; // it is a 32-character hexadecimal encoding of a 16-byte array. // - // [SPAN_ID] is a unique identifier for a span within a trace; it + // `[SPAN_ID]` is a unique identifier for a span within a trace; it // is a 16-character hexadecimal encoding of an 8-byte array. string span_name = 1; } diff --git a/google/monitoring/v3/uptime.proto b/google/monitoring/v3/uptime.proto index 2850301ac..54a9b11e1 100644 --- a/google/monitoring/v3/uptime.proto +++ b/google/monitoring/v3/uptime.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; @@ -26,17 +26,41 @@ option java_multiple_files = true; option java_outer_classname = "UptimeProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; -// An internal checker allows uptime checks to run on private/internal GCP +// An internal checker allows Uptime checks to run on private/internal GCP // resources. message InternalChecker { + option deprecated = true; + + // Operational states for an internal checker. + enum State { + // An internal checker should never be in the unspecified state. + UNSPECIFIED = 0; + + // The checker is being created, provisioned, and configured. A checker in + // this state can be returned by `ListInternalCheckers` or + // `GetInternalChecker`, as well as by examining the [long running + // Operation](https://cloud.google.com/apis/design/design_patterns#long_running_operations) + // that created it. + CREATING = 1; + + // The checker is running and available for use. A checker in this state + // can be returned by `ListInternalCheckers` or `GetInternalChecker` as + // well as by examining the [long running + // Operation](https://cloud.google.com/apis/design/design_patterns#long_running_operations) + // that created it. + // If a checker is being torn down, it is neither visible nor usable, so + // there is no "deleting" or "down" state. + RUNNING = 2; + } + // A unique resource name for this InternalChecker. The format is: // + // projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/[INTERNAL_CHECKER_ID] // - // `projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKER_ID]`. - // - // PROJECT_ID is the stackdriver workspace project for the - // uptime check config associated with the internal checker. + // `[PROJECT_ID_OR_NUMBER]` is the Stackdriver Workspace project for the + // Uptime check config associated with the internal checker. string name = 1; // The checker's human-readable name. The display name @@ -48,53 +72,118 @@ message InternalChecker { // internal resource lives (ex: "default"). string network = 3; - // The GCP zone the uptime check should egress from. Only respected for - // internal uptime checks, where internal_network is specified. + // The GCP zone the Uptime check should egress from. Only respected for + // internal Uptime checks, where internal_network is specified. string gcp_zone = 4; - // The GCP project_id where the internal checker lives. Not necessary - // the same as the workspace project. + // The GCP project ID where the internal checker lives. Not necessary + // the same as the Workspace project. string peer_project_id = 6; + + // The current operational state of the internal checker. + State state = 7; +} + +// The regions from which an Uptime check can be run. +enum UptimeCheckRegion { + // Default value if no region is specified. Will result in Uptime checks + // running from all regions. + REGION_UNSPECIFIED = 0; + + // Allows checks to run from locations within the United States of America. + USA = 1; + + // Allows checks to run from locations within the continent of Europe. + EUROPE = 2; + + // Allows checks to run from locations within the continent of South + // America. + SOUTH_AMERICA = 3; + + // Allows checks to run from locations within the Asia Pacific area (ex: + // Singapore). + ASIA_PACIFIC = 4; } // This message configures which resources and services to monitor for // availability. message UptimeCheckConfig { + option (google.api.resource) = { + type: "monitoring.googleapis.com/UptimeCheckConfig" + pattern: "projects/{project}/uptimeCheckConfigs/{uptime_check_config}" + pattern: "organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}" + pattern: "folders/{folder}/uptimeCheckConfigs/{uptime_check_config}" + pattern: "*" + }; + // The resource submessage for group checks. It can be used instead of a // monitored resource, when multiple resources are being monitored. message ResourceGroup { - // The group of resources being monitored. Should be only the - // group_id, not projects//groups/. + // The group of resources being monitored. Should be only the `[GROUP_ID]`, + // and not the full-path + // `projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]`. string group_id = 1; // The resource type of the group members. GroupResourceType resource_type = 2; } - // Information involved in an HTTP/HTTPS uptime check request. + // Information involved in an HTTP/HTTPS Uptime check request. message HttpCheck { - // A type of authentication to perform against the specified resource or URL - // that uses username and password. - // Currently, only Basic authentication is supported in Uptime Monitoring. + // The authentication parameters to provide to the specified resource or + // URL that requires a username and password. Currently, only + // [Basic HTTP authentication](https://tools.ietf.org/html/rfc7617) is + // supported in Uptime checks. message BasicAuthentication { - // The username to authenticate. + // The username to use when authenticating with the HTTP server. string username = 1; - // The password to authenticate. + // The password to use when authenticating with the HTTP server. string password = 2; } - // If true, use HTTPS instead of HTTP to run the check. + // The HTTP request method options. + enum RequestMethod { + // No request method specified. + METHOD_UNSPECIFIED = 0; + + // GET request. + GET = 1; + + // POST request. + POST = 2; + } + + // Header options corresponding to the Content-Type of the body in HTTP + // requests. Note that a `Content-Type` header cannot be present in the + // `headers` field if this field is specified. + enum ContentType { + // No content type specified. If the request method is POST, an + // unspecified content type results in a check creation rejection. + TYPE_UNSPECIFIED = 0; + + // `body` is in URL-encoded form. Equivalent to setting the `Content-Type` + // to `application/x-www-form-urlencoded` in the HTTP request. + URL_ENCODED = 1; + } + + // The HTTP request method to use for the check. + RequestMethod request_method = 8; + + // If `true`, use HTTPS instead of HTTP to run the check. bool use_ssl = 1; - // The path to the page to run the check against. Will be combined with the - // host (specified within the MonitoredResource) and port to construct the - // full URL. Optional (defaults to "/"). + // Optional (defaults to "/"). The path to the page against which to run + // the check. Will be combined with the `host` (specified within the + // `monitored_resource`) and `port` to construct the full URL. If the + // provided path does not begin with "/", a "/" will be prepended + // automatically. string path = 2; - // The port to the page to run the check against. Will be combined with host - // (specified within the MonitoredResource) and path to construct the full - // URL. Optional (defaults to 80 without SSL, or 443 with SSL). + // Optional (defaults to 80 when `use_ssl` is `false`, and 443 when + // `use_ssl` is `true`). The TCP port on the HTTP server against which to + // run the check. Will be combined with host (specified within the + // `monitored_resource`) and `path` to construct the full URL. int32 port = 3; // The authentication information. Optional when creating an HTTP check; @@ -105,11 +194,11 @@ message UptimeCheckConfig { // Encryption should be specified for any headers related to authentication // that you do not wish to be seen when retrieving the configuration. The // server will be responsible for encrypting the headers. - // On Get/List calls, if mask_headers is set to True then the headers - // will be obscured with ******. + // On Get/List calls, if `mask_headers` is set to `true` then the headers + // will be obscured with `******.` bool mask_headers = 5; - // The list of headers to send as part of the uptime check request. + // The list of headers to send as part of the Uptime check request. // If two headers have the same key and different values, they should // be entered as a single header, with the value being a comma-separated // list of all the desired values as described at @@ -118,34 +207,84 @@ message UptimeCheckConfig { // cause the first to be overwritten by the second. // The maximum number of headers allowed is 100. map headers = 6; + + // The content type to use for the check. + ContentType content_type = 9; + + // Boolean specifying whether to include SSL certificate validation as a + // part of the Uptime check. Only applies to checks where + // `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, + // setting `validate_ssl` to `true` has no effect. + bool validate_ssl = 7; + + // The request body associated with the HTTP request. If `content_type` is + // `URL_ENCODED`, the body passed in must be URL-encoded. Users can provide + // a `Content-Length` header via the `headers` field or the API will do + // so. The maximum byte size is 1 megabyte. Note: As with all `bytes` fields + // JSON representations are base64 encoded. + bytes body = 10; } - // Information required for a TCP uptime check request. + // Information required for a TCP Uptime check request. message TcpCheck { - // The port to the page to run the check against. Will be combined with host - // (specified within the MonitoredResource) to construct the full URL. - // Required. + // The TCP port on the server against which to run the check. Will be + // combined with host (specified within the `monitored_resource`) to + // construct the full URL. Required. int32 port = 1; } - // Used to perform string matching. It allows substring and regular - // expressions, together with their negations. + // Optional. Used to perform content matching. This allows matching based on + // substrings and regular expressions, together with their negations. Only the + // first 4 MB of an HTTP or HTTPS check's response (and the first + // 1 MB of a TCP check's response) are examined for purposes of content + // matching. message ContentMatcher { - // String or regex content to match (max 1024 bytes) + // Options to perform content matching. + enum ContentMatcherOption { + // No content matcher type specified (maintained for backward + // compatibility, but deprecated for future use). + // Treated as `CONTAINS_STRING`. + CONTENT_MATCHER_OPTION_UNSPECIFIED = 0; + + // Selects substring matching. The match succeeds if the output contains + // the `content` string. This is the default value for checks without + // a `matcher` option, or where the value of `matcher` is + // `CONTENT_MATCHER_OPTION_UNSPECIFIED`. + CONTAINS_STRING = 1; + + // Selects negation of substring matching. The match succeeds if the + // output does _NOT_ contain the `content` string. + NOT_CONTAINS_STRING = 2; + + // Selects regular-expression matching. The match succeeds of the output + // matches the regular expression specified in the `content` string. + MATCHES_REGEX = 3; + + // Selects negation of regular-expression matching. The match succeeds if + // the output does _NOT_ match the regular expression specified in the + // `content` string. + NOT_MATCHES_REGEX = 4; + } + + // String or regex content to match. Maximum 1024 bytes. An empty `content` + // string indicates no content matching is to be performed. string content = 1; + + // The type of content matcher that will be applied to the server output, + // compared to the `content` string when the check is run. + ContentMatcherOption matcher = 2; } - // A unique resource name for this UptimeCheckConfig. The format is: - // + // A unique resource name for this Uptime check configuration. The format is: // - // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + // projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] // - // This field should be omitted when creating the uptime check configuration; + // This field should be omitted when creating the Uptime check configuration; // on create, the resource name is assigned by the server and included in the // response. string name = 1; - // A human-friendly name for the uptime check configuration. The display name + // A human-friendly name for the Uptime check configuration. The display name // should be unique within a Stackdriver Workspace in order to make it easier // to identify; however, uniqueness is not enforced. Required. string display_name = 2; @@ -155,19 +294,19 @@ message UptimeCheckConfig { // The [monitored // resource](https://cloud.google.com/monitoring/api/resources) associated // with the configuration. - // The following monitored resource types are supported for uptime checks: - // uptime_url - // gce_instance - // gae_app - // aws_ec2_instance - // aws_elb_load_balancer + // The following monitored resource types are supported for Uptime checks: + // `uptime_url`, + // `gce_instance`, + // `gae_app`, + // `aws_ec2_instance`, + // `aws_elb_load_balancer` google.api.MonitoredResource monitored_resource = 3; // The group resource associated with the configuration. ResourceGroup resource_group = 4; } - // The type of uptime check request. + // The type of Uptime check request. oneof check_request_type { // Contains information needed to make an HTTP or HTTPS check. HttpCheck http_check = 5; @@ -176,41 +315,41 @@ message UptimeCheckConfig { TcpCheck tcp_check = 6; } - // How often, in seconds, the uptime check is performed. + // How often, in seconds, the Uptime check is performed. // Currently, the only supported values are `60s` (1 minute), `300s` // (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, - // defaults to `300s`. + // defaults to `60s`. google.protobuf.Duration period = 7; // The maximum amount of time to wait for the request to complete (must be // between 1 and 60 seconds). Required. google.protobuf.Duration timeout = 8; - // The expected content on the page the check is run against. - // Currently, only the first entry in the list is supported, and other entries - // will be ignored. The server will look for an exact match of the string in - // the page response's content. This field is optional and should only be - // specified if a content match is required. + // The content that is expected to appear in the data returned by the target + // server against which the check is run. Currently, only the first entry + // in the `content_matchers` list is supported, and additional entries will + // be ignored. This field is optional and should only be specified if a + // content match is required as part of the/ Uptime check. repeated ContentMatcher content_matchers = 9; // The list of regions from which the check will be run. // Some regions contain one location, and others contain more than one. - // If this field is specified, enough regions to include a minimum of - // 3 locations must be provided, or an error message is returned. - // Not specifying this field will result in uptime checks running from all - // regions. + // If this field is specified, enough regions must be provided to include a + // minimum of 3 locations. Not specifying this field will result in Uptime + // checks running from all available regions. repeated UptimeCheckRegion selected_regions = 10; - // If this is true, then checks are made only from the 'internal_checkers'. - // If it is false, then checks are made only from the 'selected_regions'. - // It is an error to provide 'selected_regions' when is_internal is true, - // or to provide 'internal_checkers' when is_internal is false. - bool is_internal = 15; + // If this is `true`, then checks are made only from the 'internal_checkers'. + // If it is `false`, then checks are made only from the 'selected_regions'. + // It is an error to provide 'selected_regions' when is_internal is `true`, + // or to provide 'internal_checkers' when is_internal is `false`. + bool is_internal = 15 [deprecated = true]; // The internal checkers that this check will egress from. If `is_internal` is - // true and this list is empty, the check will egress from all the - // InternalCheckers configured for the project that owns this CheckConfig. - repeated InternalChecker internal_checkers = 14; + // `true` and this list is empty, the check will egress from all the + // InternalCheckers configured for the project that owns this + // `UptimeCheckConfig`. + repeated InternalChecker internal_checkers = 14 [deprecated = true]; } // Contains the region, location, and list of IP @@ -224,35 +363,14 @@ message UptimeCheckIp { // within the broader umbrella region category. string location = 2; - // The IP address from which the uptime check originates. This is a full - // IP address (not an IP address range). Most IP addresses, as of this - // publication, are in IPv4 format; however, one should not rely on the - // IP addresses being in IPv4 format indefinitely and should support + // The IP address from which the Uptime check originates. This is a fully + // specified IP address (not an IP address range). Most IP addresses, as of + // this publication, are in IPv4 format; however, one should not rely on the + // IP addresses being in IPv4 format indefinitely, and should support // interpreting this field in either IPv4 or IPv6 format. string ip_address = 3; } -// The regions from which an uptime check can be run. -enum UptimeCheckRegion { - // Default value if no region is specified. Will result in uptime checks - // running from all regions. - REGION_UNSPECIFIED = 0; - - // Allows checks to run from locations within the United States of America. - USA = 1; - - // Allows checks to run from locations within the continent of Europe. - EUROPE = 2; - - // Allows checks to run from locations within the continent of South - // America. - SOUTH_AMERICA = 3; - - // Allows checks to run from locations within the Asia Pacific area (ex: - // Singapore). - ASIA_PACIFIC = 4; -} - // The supported resource types that can be used as values of // `group_resource.resource_type`. // `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. diff --git a/google/monitoring/v3/uptime_service.proto b/google/monitoring/v3/uptime_service.proto index ed59114d0..5e53934ed 100644 --- a/google/monitoring/v3/uptime_service.proto +++ b/google/monitoring/v3/uptime_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,17 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/uptime.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -28,9 +31,10 @@ option java_multiple_files = true; option java_outer_classname = "UptimeServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The UptimeCheckService API is used to manage (list, create, delete, edit) -// uptime check configurations in the Stackdriver Monitoring product. An uptime +// Uptime check configurations in the Stackdriver Monitoring product. An Uptime // check is a piece of configuration that determines which resources and // services to monitor for availability. These configurations can also be // configured interactively by navigating to the [Cloud Console] @@ -38,57 +42,62 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // clicking on "Monitoring" on the left-hand side to navigate to Stackdriver, // and then clicking on "Uptime". service UptimeCheckService { - // Lists the existing valid uptime check configurations for the project, - // leaving out any invalid configurations. - rpc ListUptimeCheckConfigs(ListUptimeCheckConfigsRequest) - returns (ListUptimeCheckConfigsResponse) { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read"; + + // Lists the existing valid Uptime check configurations for the project + // (leaving out any invalid configurations). + rpc ListUptimeCheckConfigs(ListUptimeCheckConfigsRequest) returns (ListUptimeCheckConfigsResponse) { option (google.api.http) = { get: "/v3/{parent=projects/*}/uptimeCheckConfigs" }; + option (google.api.method_signature) = "parent"; } - // Gets a single uptime check configuration. - rpc GetUptimeCheckConfig(GetUptimeCheckConfigRequest) - returns (UptimeCheckConfig) { + // Gets a single Uptime check configuration. + rpc GetUptimeCheckConfig(GetUptimeCheckConfigRequest) returns (UptimeCheckConfig) { option (google.api.http) = { get: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; + option (google.api.method_signature) = "name"; } - // Creates a new uptime check configuration. - rpc CreateUptimeCheckConfig(CreateUptimeCheckConfigRequest) - returns (UptimeCheckConfig) { + // Creates a new Uptime check configuration. + rpc CreateUptimeCheckConfig(CreateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { option (google.api.http) = { post: "/v3/{parent=projects/*}/uptimeCheckConfigs" body: "uptime_check_config" }; + option (google.api.method_signature) = "parent,uptime_check_config"; } - // Updates an uptime check configuration. You can either replace the entire + // Updates an Uptime check configuration. You can either replace the entire // configuration with a new one or replace only certain fields in the current - // configuration by specifying the fields to be updated via `"updateMask"`. + // configuration by specifying the fields to be updated via `updateMask`. // Returns the updated configuration. - rpc UpdateUptimeCheckConfig(UpdateUptimeCheckConfigRequest) - returns (UptimeCheckConfig) { + rpc UpdateUptimeCheckConfig(UpdateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { option (google.api.http) = { patch: "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}" body: "uptime_check_config" }; + option (google.api.method_signature) = "uptime_check_config"; } - // Deletes an uptime check configuration. Note that this method will fail - // if the uptime check configuration is referenced by an alert policy or + // Deletes an Uptime check configuration. Note that this method will fail + // if the Uptime check configuration is referenced by an alert policy or // other dependent configs that would be rendered invalid by the deletion. - rpc DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest) - returns (google.protobuf.Empty) { + rpc DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; + option (google.api.method_signature) = "name"; } - // Returns the list of IPs that checkers run from - rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest) - returns (ListUptimeCheckIpsResponse) { + // Returns the list of IP addresses that checkers run from + rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest) returns (ListUptimeCheckIpsResponse) { option (google.api.http) = { get: "/v3/uptimeCheckIps" }; @@ -97,9 +106,15 @@ service UptimeCheckService { // The protocol for the `ListUptimeCheckConfigs` request. message ListUptimeCheckConfigsRequest { - // The project whose uptime check configurations are listed. The format - // is `projects/[PROJECT_ID]`. - string parent = 1; + // Required. The project whose Uptime check configurations are listed. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/UptimeCheckConfig" + } + ]; // The maximum number of results to return in a single response. The server // may further constrain the maximum number of results returned in a single @@ -115,7 +130,7 @@ message ListUptimeCheckConfigsRequest { // The protocol for the `ListUptimeCheckConfigs` response. message ListUptimeCheckConfigsResponse { - // The returned uptime check configurations. + // The returned Uptime check configurations. repeated UptimeCheckConfig uptime_check_configs = 1; // This field represents the pagination token to retrieve the next page of @@ -125,55 +140,73 @@ message ListUptimeCheckConfigsResponse { // request message's page_token field). string next_page_token = 2; - // The total number of uptime check configurations for the project, + // The total number of Uptime check configurations for the project, // irrespective of any pagination. int32 total_size = 3; } // The protocol for the `GetUptimeCheckConfig` request. message GetUptimeCheckConfigRequest { - // The uptime check configuration to retrieve. The format - // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. - string name = 1; + // Required. The Uptime check configuration to retrieve. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/UptimeCheckConfig" + } + ]; } // The protocol for the `CreateUptimeCheckConfig` request. message CreateUptimeCheckConfigRequest { - // The project in which to create the uptime check. The format - // is `projects/[PROJECT_ID]`. - string parent = 1; - - // The new uptime check configuration. - UptimeCheckConfig uptime_check_config = 2; + // Required. The project in which to create the Uptime check. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/UptimeCheckConfig" + } + ]; + + // Required. The new Uptime check configuration. + UptimeCheckConfig uptime_check_config = 2 [(google.api.field_behavior) = REQUIRED]; } // The protocol for the `UpdateUptimeCheckConfig` request. message UpdateUptimeCheckConfigRequest { - // Optional. If present, only the listed fields in the current uptime check + // Optional. If present, only the listed fields in the current Uptime check // configuration are updated with values from the new configuration. If this // field is empty, then the current configuration is completely replaced with // the new configuration. google.protobuf.FieldMask update_mask = 2; - // Required. If an `"updateMask"` has been specified, this field gives - // the values for the set of fields mentioned in the `"updateMask"`. If an - // `"updateMask"` has not been given, this uptime check configuration replaces - // the current configuration. If a field is mentioned in `"updateMask"` but - // the corresonding field is omitted in this partial uptime check + // Required. If an `updateMask` has been specified, this field gives + // the values for the set of fields mentioned in the `updateMask`. If an + // `updateMask` has not been given, this Uptime check configuration replaces + // the current configuration. If a field is mentioned in `updateMask` but + // the corresonding field is omitted in this partial Uptime check // configuration, it has the effect of deleting/clearing the field from the // configuration on the server. // // The following fields can be updated: `display_name`, // `http_check`, `tcp_check`, `timeout`, `content_matchers`, and // `selected_regions`. - UptimeCheckConfig uptime_check_config = 3; + UptimeCheckConfig uptime_check_config = 3 [(google.api.field_behavior) = REQUIRED]; } // The protocol for the `DeleteUptimeCheckConfig` request. message DeleteUptimeCheckConfigRequest { - // The uptime check configuration to delete. The format - // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. - string name = 1; + // Required. The Uptime check configuration to delete. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/UptimeCheckConfig" + } + ]; } // The protocol for the `ListUptimeCheckIps` request. diff --git a/google/privacy/dlp/BUILD.bazel b/google/privacy/dlp/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/privacy/dlp/BUILD.bazel +++ b/google/privacy/dlp/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/privacy/dlp/artman_dlp_v2.yaml b/google/privacy/dlp/artman_dlp_v2.yaml index 03e4a2335..dbdd03381 100644 --- a/google/privacy/dlp/artman_dlp_v2.yaml +++ b/google/privacy/dlp/artman_dlp_v2.yaml @@ -6,8 +6,9 @@ common: - name: google-common-protos src_proto_paths: - v2 - service_yaml: dlp_v2.yaml + service_yaml: v2/dlp_v2.yaml gapic_yaml: v2/dlp_gapic.yaml + proto_package: google.privacy.dlp.v2 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/privacy/dlp/v2/BUILD.bazel b/google/privacy/dlp/v2/BUILD.bazel index 68d9e7cc9..d58be0fb9 100644 --- a/google/privacy/dlp/v2/BUILD.bazel +++ b/google/privacy/dlp/v2/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -15,6 +18,7 @@ proto_library( deps = [ "//google/api:annotations_proto", "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/api:resource_proto", "//google/rpc:status_proto", "//google/type:date_proto", @@ -31,6 +35,7 @@ proto_library_with_info( name = "dlp_proto_with_info", deps = [ ":dlp_proto", + "//google/cloud:common_resources_proto", ], ) @@ -39,18 +44,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "dlp_java_proto", deps = [":dlp_proto"], @@ -59,51 +59,40 @@ java_proto_library( java_grpc_library( name = "dlp_java_grpc", srcs = [":dlp_proto"], - deps = [":dlp_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "dlp_resource_name_java_proto", - gapic_yaml = "dlp_gapic.yaml", - deps = [":dlp_proto"], + deps = [":dlp_java_proto"], ) java_gapic_library( name = "dlp_java_gapic", src = ":dlp_proto_with_info", gapic_yaml = "dlp_gapic.yaml", - service_yaml = "//google/privacy/dlp:dlp_v2.yaml", + package = "google.privacy.dlp.v2", + service_yaml = "dlp_v2.yaml", test_deps = [ ":dlp_java_grpc", ], deps = [ ":dlp_java_proto", - ":dlp_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, +java_gapic_test( + name = "dlp_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.dlp.v2.DlpServiceClientTest", + ], runtime_deps = [":dlp_java_gapic_test"], -) for test_name in [ - # "com.google.cloud.dlp.v2.DlpServiceClientTest", -]] +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-dlp-v2-java", - client_deps = [":dlp_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":dlp_java_gapic_test"], - grpc_deps = [":dlp_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + name = "google-cloud-privacy-dlp-v2-java", + deps = [ + ":dlp_java_gapic", + ":dlp_java_grpc", ":dlp_java_proto", ":dlp_proto", - ":dlp_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -111,10 +100,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -133,11 +122,14 @@ go_proto_library( go_gapic_library( name = "dlp_go_gapic", - src = ":dlp_proto_with_info", - gapic_yaml = "dlp_gapic.yaml", - importpath = "cloud.google.com/go/dlp/apiv2", - service_yaml = "//google/privacy/dlp:dlp_v2.yaml", - deps = [":dlp_go_proto"], + srcs = [":dlp_proto_with_info"], + grpc_service_config = "dlp_grpc_service_config.json", + importpath = "cloud.google.com/go/dlp/apiv2;dlp", + service_yaml = "dlp_v2.yaml", + deps = [ + ":dlp_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], ) go_test( @@ -147,13 +139,240 @@ go_test( importpath = "cloud.google.com/go/dlp/apiv2", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-dlp-v2-go", + name = "gapi-cloud-privacy-dlp-v2-go", deps = [ ":dlp_go_gapic", - ":dlp_go_gapic_srcjar-smoke-test.srcjar", ":dlp_go_gapic_srcjar-test.srcjar", ":dlp_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "dlp_moved_proto", + srcs = [":dlp_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "//google/type:date_proto", + "//google/type:dayofweek_proto", + "//google/type:timeofday_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "dlp_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":dlp_moved_proto"], +) + +py_grpc_library( + name = "dlp_py_grpc", + srcs = [":dlp_moved_proto"], + deps = [":dlp_py_proto"], +) + +py_gapic_library( + name = "dlp_py_gapic", + src = ":dlp_proto_with_info", + gapic_yaml = "dlp_gapic.yaml", + package = "google.privacy.dlp.v2", + service_yaml = "dlp_v2.yaml", + deps = [ + ":dlp_py_grpc", + ":dlp_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "privacy-dlp-v2-py", + deps = [ + ":dlp_py_gapic", + ":dlp_py_grpc", + ":dlp_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "dlp_php_proto", + deps = [":dlp_proto"], +) + +php_grpc_library( + name = "dlp_php_grpc", + srcs = [":dlp_proto"], + deps = [":dlp_php_proto"], +) + +php_gapic_library( + name = "dlp_php_gapic", + src = ":dlp_proto_with_info", + gapic_yaml = "dlp_gapic.yaml", + package = "google.privacy.dlp.v2", + service_yaml = "dlp_v2.yaml", + deps = [ + ":dlp_php_grpc", + ":dlp_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-privacy-dlp-v2-php", + deps = [ + ":dlp_php_gapic", + ":dlp_php_grpc", + ":dlp_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "dlp_nodejs_gapic", + src = ":dlp_proto_with_info", + gapic_yaml = "dlp_gapic.yaml", + package = "google.privacy.dlp.v2", + service_yaml = "dlp_v2.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "privacy-dlp-v2-nodejs", + deps = [ + ":dlp_nodejs_gapic", + ":dlp_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "dlp_ruby_proto", + deps = [":dlp_proto"], +) + +ruby_grpc_library( + name = "dlp_ruby_grpc", + srcs = [":dlp_proto"], + deps = [":dlp_ruby_proto"], +) + +ruby_gapic_library( + name = "dlp_ruby_gapic", + src = ":dlp_proto_with_info", + gapic_yaml = "dlp_gapic.yaml", + package = "google.privacy.dlp.v2", + service_yaml = "dlp_v2.yaml", + deps = [ + ":dlp_ruby_grpc", + ":dlp_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-privacy-dlp-v2-ruby", + deps = [ + ":dlp_ruby_gapic", + ":dlp_ruby_grpc", + ":dlp_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "dlp_csharp_proto", + deps = [":dlp_proto"], +) + +csharp_grpc_library( + name = "dlp_csharp_grpc", + srcs = [":dlp_proto"], + deps = [":dlp_csharp_proto"], +) + +csharp_gapic_library( + name = "dlp_csharp_gapic", + src = ":dlp_proto_with_info", + gapic_yaml = "dlp_gapic.yaml", + package = "google.privacy.dlp.v2", + service_yaml = "dlp_v2.yaml", + deps = [ + ":dlp_csharp_grpc", + ":dlp_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-privacy-dlp-v2-csharp", + deps = [ + ":dlp_csharp_gapic", + ":dlp_csharp_grpc", + ":dlp_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/devtools/resultstore/artman_resultstore.yaml b/google/privacy/dlp/v2/artman_dlp_v2.yaml similarity index 77% rename from google/devtools/resultstore/artman_resultstore.yaml rename to google/privacy/dlp/v2/artman_dlp_v2.yaml index 6c3106964..22ae0fd4a 100644 --- a/google/devtools/resultstore/artman_resultstore.yaml +++ b/google/privacy/dlp/v2/artman_dlp_v2.yaml @@ -1,13 +1,13 @@ common: - api_name: resultstore + api_name: dlp api_version: v2 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - - v2 - service_yaml: resultstore-service.yaml - gapic_yaml: v2/resultstore_gapic.yaml + - . + service_yaml: dlp_v2.yaml + gapic_yaml: dlp_gapic.yaml artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/privacy/dlp/v2/dlp.proto b/google/privacy/dlp/v2/dlp.proto index b138c3b59..29291fa5a 100644 --- a/google/privacy/dlp/v2/dlp.proto +++ b/google/privacy/dlp/v2/dlp.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.privacy.dlp.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/privacy/dlp/v2/storage.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; @@ -27,7 +29,6 @@ import "google/rpc/status.proto"; import "google/type/date.proto"; import "google/type/dayofweek.proto"; import "google/type/timeofday.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Dlp.V2"; option go_package = "google.golang.org/genproto/googleapis/privacy/dlp/v2;dlp"; @@ -35,6 +36,11 @@ option java_multiple_files = true; option java_outer_classname = "DlpProto"; option java_package = "com.google.privacy.dlp.v2"; option php_namespace = "Google\\Cloud\\Dlp\\V2"; +option ruby_package = "Google::Cloud::Dlp::V2"; +option (google.api.resource_definition) = { + type: "dlp.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; // The Cloud Data Loss Prevention (DLP) API is a service that allows clients // to detect the presence of Personally Identifiable Information (PII) and other @@ -62,6 +68,10 @@ service DlpService { option (google.api.http) = { post: "/v2/{parent=projects/*}/content:inspect" body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/content:inspect" + body: "*" + } }; } @@ -77,6 +87,10 @@ service DlpService { option (google.api.http) = { post: "/v2/{parent=projects/*}/image:redact" body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/image:redact" + body: "*" + } }; } @@ -92,6 +106,10 @@ service DlpService { option (google.api.http) = { post: "/v2/{parent=projects/*}/content:deidentify" body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/content:deidentify" + body: "*" + } }; } @@ -103,6 +121,10 @@ service DlpService { option (google.api.http) = { post: "/v2/{parent=projects/*}/content:reidentify" body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/content:reidentify" + body: "*" + } }; } @@ -112,7 +134,11 @@ service DlpService { rpc ListInfoTypes(ListInfoTypesRequest) returns (ListInfoTypesResponse) { option (google.api.http) = { get: "/v2/infoTypes" + additional_bindings { + get: "/v2/{parent=locations/*}/infoTypes" + } }; + option (google.api.method_signature) = "parent"; } // Creates an InspectTemplate for re-using frequently used configuration @@ -122,11 +148,20 @@ service DlpService { option (google.api.http) = { post: "/v2/{parent=organizations/*}/inspectTemplates" body: "*" + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/inspectTemplates" + body: "*" + } additional_bindings { post: "/v2/{parent=projects/*}/inspectTemplates" body: "*" } + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/inspectTemplates" + body: "*" + } }; + option (google.api.method_signature) = "parent,inspect_template"; } // Updates the InspectTemplate. @@ -135,11 +170,20 @@ service DlpService { option (google.api.http) = { patch: "/v2/{name=organizations/*/inspectTemplates/*}" body: "*" + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" + body: "*" + } additional_bindings { patch: "/v2/{name=projects/*/inspectTemplates/*}" body: "*" } + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/inspectTemplates/*}" + body: "*" + } }; + option (google.api.method_signature) = "name,inspect_template,update_mask"; } // Gets an InspectTemplate. @@ -147,10 +191,17 @@ service DlpService { rpc GetInspectTemplate(GetInspectTemplateRequest) returns (InspectTemplate) { option (google.api.http) = { get: "/v2/{name=organizations/*/inspectTemplates/*}" + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" + } additional_bindings { get: "/v2/{name=projects/*/inspectTemplates/*}" } + additional_bindings { + get: "/v2/{name=projects/*/locations/*/inspectTemplates/*}" + } }; + option (google.api.method_signature) = "name"; } // Lists InspectTemplates. @@ -158,10 +209,17 @@ service DlpService { rpc ListInspectTemplates(ListInspectTemplatesRequest) returns (ListInspectTemplatesResponse) { option (google.api.http) = { get: "/v2/{parent=organizations/*}/inspectTemplates" + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/inspectTemplates" + } additional_bindings { get: "/v2/{parent=projects/*}/inspectTemplates" } + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/inspectTemplates" + } }; + option (google.api.method_signature) = "parent"; } // Deletes an InspectTemplate. @@ -169,10 +227,17 @@ service DlpService { rpc DeleteInspectTemplate(DeleteInspectTemplateRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=organizations/*/inspectTemplates/*}" + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" + } additional_bindings { delete: "/v2/{name=projects/*/inspectTemplates/*}" } + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/inspectTemplates/*}" + } }; + option (google.api.method_signature) = "name"; } // Creates a DeidentifyTemplate for re-using frequently used configuration @@ -183,11 +248,20 @@ service DlpService { option (google.api.http) = { post: "/v2/{parent=organizations/*}/deidentifyTemplates" body: "*" + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/deidentifyTemplates" + body: "*" + } additional_bindings { post: "/v2/{parent=projects/*}/deidentifyTemplates" body: "*" } + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/deidentifyTemplates" + body: "*" + } }; + option (google.api.method_signature) = "parent,deidentify_template"; } // Updates the DeidentifyTemplate. @@ -197,11 +271,20 @@ service DlpService { option (google.api.http) = { patch: "/v2/{name=organizations/*/deidentifyTemplates/*}" body: "*" + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" + body: "*" + } additional_bindings { patch: "/v2/{name=projects/*/deidentifyTemplates/*}" body: "*" } + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" + body: "*" + } }; + option (google.api.method_signature) = "name,deidentify_template,update_mask"; } // Gets a DeidentifyTemplate. @@ -210,10 +293,17 @@ service DlpService { rpc GetDeidentifyTemplate(GetDeidentifyTemplateRequest) returns (DeidentifyTemplate) { option (google.api.http) = { get: "/v2/{name=organizations/*/deidentifyTemplates/*}" + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" + } additional_bindings { get: "/v2/{name=projects/*/deidentifyTemplates/*}" } + additional_bindings { + get: "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" + } }; + option (google.api.method_signature) = "name"; } // Lists DeidentifyTemplates. @@ -222,10 +312,17 @@ service DlpService { rpc ListDeidentifyTemplates(ListDeidentifyTemplatesRequest) returns (ListDeidentifyTemplatesResponse) { option (google.api.http) = { get: "/v2/{parent=organizations/*}/deidentifyTemplates" + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/deidentifyTemplates" + } additional_bindings { get: "/v2/{parent=projects/*}/deidentifyTemplates" } + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/deidentifyTemplates" + } }; + option (google.api.method_signature) = "parent"; } // Deletes a DeidentifyTemplate. @@ -234,10 +331,17 @@ service DlpService { rpc DeleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=organizations/*/deidentifyTemplates/*}" + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" + } additional_bindings { delete: "/v2/{name=projects/*/deidentifyTemplates/*}" } + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" + } }; + option (google.api.method_signature) = "name"; } // Creates a job trigger to run DLP actions such as scanning storage for @@ -247,7 +351,12 @@ service DlpService { option (google.api.http) = { post: "/v2/{parent=projects/*}/jobTriggers" body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/jobTriggers" + body: "*" + } }; + option (google.api.method_signature) = "parent,job_trigger"; } // Updates a job trigger. @@ -256,7 +365,26 @@ service DlpService { option (google.api.http) = { patch: "/v2/{name=projects/*/jobTriggers/*}" body: "*" + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/jobTriggers/*}" + body: "*" + } }; + option (google.api.method_signature) = "name,job_trigger,update_mask"; + } + + // Inspect hybrid content and store findings to a trigger. The inspection + // will be processed asynchronously. To review the findings monitor the + // jobs within the trigger. + // Early access feature is in a pre-release state and might change or have + // limited support. For more information, see + // https://cloud.google.com/products#product-launch-stages. + rpc HybridInspectJobTrigger(HybridInspectJobTriggerRequest) returns (HybridInspectResponse) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/jobTriggers/*}:hybridInspect" + body: "*" + }; + option (google.api.method_signature) = "name"; } // Gets a job trigger. @@ -264,7 +392,11 @@ service DlpService { rpc GetJobTrigger(GetJobTriggerRequest) returns (JobTrigger) { option (google.api.http) = { get: "/v2/{name=projects/*/jobTriggers/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/jobTriggers/*}" + } }; + option (google.api.method_signature) = "name"; } // Lists job triggers. @@ -272,7 +404,11 @@ service DlpService { rpc ListJobTriggers(ListJobTriggersRequest) returns (ListJobTriggersResponse) { option (google.api.http) = { get: "/v2/{parent=projects/*}/jobTriggers" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/jobTriggers" + } }; + option (google.api.method_signature) = "parent"; } // Deletes a job trigger. @@ -280,7 +416,11 @@ service DlpService { rpc DeleteJobTrigger(DeleteJobTriggerRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=projects/*/jobTriggers/*}" + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/jobTriggers/*}" + } }; + option (google.api.method_signature) = "name"; } // Activate a job trigger. Causes the immediate execute of a trigger @@ -289,6 +429,10 @@ service DlpService { option (google.api.http) = { post: "/v2/{name=projects/*/jobTriggers/*}:activate" body: "*" + additional_bindings { + post: "/v2/{name=projects/*/locations/*/jobTriggers/*}:activate" + body: "*" + } }; } @@ -303,7 +447,13 @@ service DlpService { option (google.api.http) = { post: "/v2/{parent=projects/*}/dlpJobs" body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/dlpJobs" + body: "*" + } }; + option (google.api.method_signature) = "parent,inspect_job"; + option (google.api.method_signature) = "parent,risk_job"; } // Lists DlpJobs that match the specified filter in the request. @@ -312,7 +462,11 @@ service DlpService { rpc ListDlpJobs(ListDlpJobsRequest) returns (ListDlpJobsResponse) { option (google.api.http) = { get: "/v2/{parent=projects/*}/dlpJobs" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/dlpJobs" + } }; + option (google.api.method_signature) = "parent"; } // Gets the latest state of a long-running DlpJob. @@ -321,7 +475,11 @@ service DlpService { rpc GetDlpJob(GetDlpJobRequest) returns (DlpJob) { option (google.api.http) = { get: "/v2/{name=projects/*/dlpJobs/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/dlpJobs/*}" + } }; + option (google.api.method_signature) = "name"; } // Deletes a long-running DlpJob. This method indicates that the client is @@ -332,7 +490,11 @@ service DlpService { rpc DeleteDlpJob(DeleteDlpJobRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=projects/*/dlpJobs/*}" + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/dlpJobs/*}" + } }; + option (google.api.method_signature) = "name"; } // Starts asynchronous cancellation on a long-running DlpJob. The server @@ -344,6 +506,10 @@ service DlpService { option (google.api.http) = { post: "/v2/{name=projects/*/dlpJobs/*}:cancel" body: "*" + additional_bindings { + post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel" + body: "*" + } }; } @@ -354,11 +520,20 @@ service DlpService { option (google.api.http) = { post: "/v2/{parent=organizations/*}/storedInfoTypes" body: "*" + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/storedInfoTypes" + body: "*" + } additional_bindings { post: "/v2/{parent=projects/*}/storedInfoTypes" body: "*" } + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/storedInfoTypes" + body: "*" + } }; + option (google.api.method_signature) = "parent,config"; } // Updates the stored infoType by creating a new version. The existing version @@ -369,11 +544,20 @@ service DlpService { option (google.api.http) = { patch: "/v2/{name=organizations/*/storedInfoTypes/*}" body: "*" + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" + body: "*" + } additional_bindings { patch: "/v2/{name=projects/*/storedInfoTypes/*}" body: "*" } + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" + body: "*" + } }; + option (google.api.method_signature) = "name,config,update_mask"; } // Gets a stored infoType. @@ -382,10 +566,17 @@ service DlpService { rpc GetStoredInfoType(GetStoredInfoTypeRequest) returns (StoredInfoType) { option (google.api.http) = { get: "/v2/{name=organizations/*/storedInfoTypes/*}" + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" + } additional_bindings { get: "/v2/{name=projects/*/storedInfoTypes/*}" } + additional_bindings { + get: "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" + } }; + option (google.api.method_signature) = "name"; } // Lists stored infoTypes. @@ -394,10 +585,17 @@ service DlpService { rpc ListStoredInfoTypes(ListStoredInfoTypesRequest) returns (ListStoredInfoTypesResponse) { option (google.api.http) = { get: "/v2/{parent=organizations/*}/storedInfoTypes" + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/storedInfoTypes" + } additional_bindings { get: "/v2/{parent=projects/*}/storedInfoTypes" } + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/storedInfoTypes" + } }; + option (google.api.method_signature) = "parent"; } // Deletes a stored infoType. @@ -406,9 +604,42 @@ service DlpService { rpc DeleteStoredInfoType(DeleteStoredInfoTypeRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=organizations/*/storedInfoTypes/*}" + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" + } additional_bindings { delete: "/v2/{name=projects/*/storedInfoTypes/*}" } + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Inspect hybrid content and store findings to a job. + // To review the findings inspect the job. Inspection will occur + // asynchronously. + // Early access feature is in a pre-release state and might change or have + // limited support. For more information, see + // https://cloud.google.com/products#product-launch-stages. + rpc HybridInspectDlpJob(HybridInspectDlpJobRequest) returns (HybridInspectResponse) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Finish a running hybrid DlpJob. Triggers the finalization steps and running + // of any enabled actions that have not yet run. + // Early access feature is in a pre-release state and might change or have + // limited support. For more information, see + // https://cloud.google.com/products#product-launch-stages. + rpc FinishDlpJob(FinishDlpJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:finish" + body: "*" }; } } @@ -426,21 +657,10 @@ message ExcludeInfoTypes { repeated InfoType info_types = 1; } -// Options describing which parts of the provided content should be scanned. -enum ContentOption { - // Includes entire content of a file or a data stream. - CONTENT_UNSPECIFIED = 0; - - // Text content within the data, excluding any metadata. - CONTENT_TEXT = 1; - - // Images found in the data. - CONTENT_IMAGE = 2; -} - // The rule that specifies conditions when findings of infoTypes specified in // `InspectionRuleSet` are removed from results. message ExclusionRule { + // Exclusion rule types. oneof type { // Dictionary which defines the rule. CustomInfoType.Dictionary dictionary = 1; @@ -459,6 +679,7 @@ message ExclusionRule { // A single inspection rule to be applied to infoTypes, specified in // `InspectionRuleSet`. message InspectionRule { + // Inspection rule types. oneof type { // Hotword-based detection rule. CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; @@ -482,6 +703,7 @@ message InspectionRuleSet { // When used with redactContent only info_types and min_likelihood are currently // used. message InspectConfig { + // Configuration to control the number of findings returned. message FindingLimits { // Max findings configuration per infoType, per content item or long // running DlpJob. @@ -497,7 +719,7 @@ message InspectConfig { } // Max number of findings that will be returned for each item scanned. - // When set within `InspectDataSourceRequest`, + // When set within `InspectJobConfig`, // the maximum returned is 2000 regardless if this is set higher. // When set within `InspectContentRequest`, this field is ignored. int32 max_findings_per_item = 1; @@ -519,10 +741,9 @@ message InspectConfig { // system may automatically choose what detectors to run. By default this may // be all types, but may change over time as detectors are updated. // - // The special InfoType name "ALL_BASIC" can be used to trigger all detectors, - // but may change over time as new InfoTypes are added. If you need precise - // control and predictability as to what detectors are run you should specify - // specific InfoTypes listed in the reference. + // If you need precise control and predictability as to what detectors are + // run you should specify specific InfoTypes listed in the reference, + // otherwise a default list will be used, which may change over time. repeated InfoType info_types = 1; // Only returns findings equal or above this threshold. The default is @@ -530,6 +751,7 @@ message InspectConfig { // See https://cloud.google.com/dlp/docs/likelihood to learn more. Likelihood min_likelihood = 2; + // Configuration to control the number of findings returned. FindingLimits limits = 3; // When true, a contextual quote from the data that triggered a finding is @@ -555,21 +777,36 @@ message InspectConfig { // Container for bytes to inspect or redact. message ByteContentItem { + // The type of data being sent for inspection. enum BytesType { + // Unused BYTES_TYPE_UNSPECIFIED = 0; + // Any image type. IMAGE = 6; + // jpeg IMAGE_JPEG = 1; + // bmp IMAGE_BMP = 2; + // png IMAGE_PNG = 3; + // svg IMAGE_SVG = 4; + // plain text TEXT_UTF8 = 5; + // docx, docm, dotx, dotm + WORD_DOCUMENT = 7; + + // pdf + PDF = 8; + + // avro AVRO = 11; } @@ -601,12 +838,16 @@ message ContentItem { // See https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to // learn more. message Table { + // Values of the row. message Row { + // Individual cells. repeated Value values = 1; } + // Headers of the table. repeated FieldId headers = 1; + // Rows of the table. repeated Row rows = 2; } @@ -626,6 +867,16 @@ message InspectResult { // Represents a piece of potentially sensitive content. message Finding { + option (google.api.resource) = { + type: "dlp.googleapis.com/Finding" + pattern: "projects/{project}/locations/{location}/findings/{finding}" + }; + + // Resource name in format + // projects/{project}/locations/{location}/findings/{finding} + // Populated only when viewing persisted findings. + string name = 14; + // The content that was found. Even if the content is not textual, it // may be converted to a textual representation here. // Provided if `include_quote` is true and the finding is @@ -650,6 +901,39 @@ message Finding { // to true and a supported infoType was requested. Currently supported // infoTypes: DATE, DATE_OF_BIRTH and TIME. QuoteInfo quote_info = 7; + + // The job that stored the finding. + string resource_name = 8 [(google.api.resource_reference) = { + type: "dlp.googleapis.com/DlpJob" + }]; + + // Job trigger name, if applicable, for this finding. + string trigger_name = 9 [(google.api.resource_reference) = { + type: "dlp.googleapis.com/JobTrigger" + }]; + + // The labels associated with this `Finding`. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + // + // Label values must be between 0 and 63 characters long and must conform + // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + // + // No more than 10 labels can be associated with a given finding. + // + // Examples: + // * `"environment" : "production"` + // * `"pipeline" : "etl"` + map labels = 10; + + // Time the job started that produced this finding. + google.protobuf.Timestamp job_create_time = 11; + + // The job that stored the finding. + string job_name = 13 [(google.api.resource_reference) = { + type: "dlp.googleapis.com/DlpJob" + }]; } // Specifies the location of the finding. @@ -669,46 +953,21 @@ message Location { // List of nested objects pointing to the precise location of the finding // within the file or record. repeated ContentLocation content_locations = 7; -} -// Type of the match which can be applied to different ways of matching, like -// Dictionary, regular expression and intersecting with findings of another -// info type. -enum MatchingType { - // Invalid. - MATCHING_TYPE_UNSPECIFIED = 0; - - // Full match. - // - // - Dictionary: join of Dictionary results matched complete finding quote - // - Regex: all regex matches fill a finding quote start to end - // - Exclude info type: completely inside affecting info types findings - MATCHING_TYPE_FULL_MATCH = 1; - - // Partial match. - // - // - Dictionary: at least one of the tokens in the finding matches - // - Regex: substring of the finding matches - // - Exclude info type: intersects with affecting info types findings - MATCHING_TYPE_PARTIAL_MATCH = 2; - - // Inverse match. - // - // - Dictionary: no tokens in the finding match the dictionary - // - Regex: finding doesn't match the regex - // - Exclude info type: no intersection with affecting info types findings - MATCHING_TYPE_INVERSE_MATCH = 3; + // Information about the container where this finding occurred, if available. + Container container = 8; } -// Findings container location data. +// Precise location of the finding within a document, record, image, or metadata +// container. message ContentLocation { // Name of the container where the finding is located. // The top level name is the source file name or table name. Names of some // common storage containers are formatted as follows: // - // * BigQuery tables: `:.` - // * Cloud Storage files: `gs:///` - // * Datastore namespace: + // * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` + // * Cloud Storage files: `gs://{bucket}/{path}` + // * Datastore namespace: {namespace} // // Nested names could be absent if the embedded object has no string // identifier (for an example an image contained within a document). @@ -724,6 +983,9 @@ message ContentLocation { // Location data for document files. DocumentLocation document_location = 5; + + // Location within the metadata for inspected content. + MetadataLocation metadata_location = 8; } // Findings container modification timestamp, if applicable. @@ -737,6 +999,24 @@ message ContentLocation { string container_version = 7; } +// Metadata Location +message MetadataLocation { + // Type of metadata containing the finding. + MetadataType type = 1; + + // Label of the piece of metadata containing the finding, for example - + // latitude, author, caption. + oneof label { + // Storage metadata. + StorageMetadataLabel storage_label = 3; + } +} + +// Storage metadata label to indicate which metadata entry contains findings. +message StorageMetadataLabel { + string key = 1; +} + // Location of a finding within a document. message DocumentLocation { // Offset of the line, from the beginning of the file, where the finding @@ -758,10 +1038,58 @@ message RecordLocation { // Location of a finding within a table. message TableLocation { - // The zero-based index of the row where the finding is located. + // The zero-based index of the row where the finding is located. Only + // populated for resources that have a natural ordering, not BigQuery. In + // BigQuery, to identify the row a finding came from, populate + // BigQueryOptions.identifying_fields with your primary key column names and + // when you store the findings the value of those columns will be stored + // inside of Finding. int64 row_index = 1; } +// Represents a container that may contain DLP findings. +// Examples of a container include a file, table, or database record. +message Container { + // Container type, for example BigQuery or Google Cloud Storage. + string type = 1; + + // Project where the finding was found. + // Can be different from the project that owns the finding. + string project_id = 2; + + // A string representation of the full container name. + // Examples: + // - BigQuery: 'Project:DataSetId.TableId' + // - Google Cloud Storage: 'gs://Bucket/folders/filename.txt' + string full_path = 3; + + // The root of the container. + // Examples: + // - For BigQuery table `project_id:dataset_id.table_id`, the root is + // `dataset_id` + // - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root + // is `gs://bucket` + string root_path = 4; + + // The rest of the path after the root. + // Examples: + // - For BigQuery table `project_id:dataset_id.table_id`, the relative path is + // `table_id` + // - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative + // path is `folder/filename.txt` + string relative_path = 5; + + // Findings container modification timestamp, if applicable. + // For Google Cloud Storage contains last file modification timestamp. + // For BigQuery table contains last_modified_time property. + // For Datastore - not populated. + google.protobuf.Timestamp update_time = 6; + + // Findings container version, if available + // ("generation" for Google Cloud Storage). + string version = 7; +} + // Generic half-open interval [start, end) message Range { // Index of the first character of the range (inclusive). @@ -815,8 +1143,14 @@ message RedactImageRequest { Color redaction_color = 3; } - // The parent resource name, for example projects/my-project-id. - string parent = 1; + // The parent resource name, for example projects/my-project-id + // or projects/my-project-id/locations/{location_id}. + string parent = 1 [(google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + }]; + + // Deprecated. This field has no effect. + string location_id = 8; // Configuration for the inspector. InspectConfig inspect_config = 2; @@ -860,8 +1194,11 @@ message RedactImageResponse { // Request to de-identify a list of items. message DeidentifyContentRequest { - // The parent resource name, for example projects/my-project-id. - string parent = 1; + // The parent resource name, for example projects/my-project-id + // or projects/my-project-id/locations/{location_id}. + string parent = 1 [(google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + }]; // Configuration for the de-identification of the content item. // Items specified here will override the template referenced by the @@ -876,19 +1213,22 @@ message DeidentifyContentRequest { // The item to de-identify. Will be treated as text. ContentItem item = 4; - // Optional template to use. Any configuration directly specified in + // Template to use. Any configuration directly specified in // inspect_config will override those set in the template. Singular fields // that are set in this request will replace their corresponding fields in the // template. Repeated fields are appended. Singular sub-messages and groups // are recursively merged. string inspect_template_name = 5; - // Optional template to use. Any configuration directly specified in + // Template to use. Any configuration directly specified in // deidentify_config will override those set in the template. Singular fields // that are set in this request will replace their corresponding fields in the // template. Repeated fields are appended. Singular sub-messages and groups // are recursively merged. string deidentify_template_name = 6; + + // Deprecated. This field has no effect. + string location_id = 7; } // Results of de-identifying a ContentItem. @@ -902,8 +1242,13 @@ message DeidentifyContentResponse { // Request to re-identify an item. message ReidentifyContentRequest { - // The parent resource name. - string parent = 1; + // Required. The parent resource name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Configuration for the re-identification of the content item. // This field shares the same proto message type that is used for @@ -913,6 +1258,7 @@ message ReidentifyContentRequest { // reverse. This requires that only reversible transformations // be provided here. The reversible transformations are: // + // - `CryptoDeterministicConfig` // - `CryptoReplaceFfxFpeConfig` DeidentifyConfig reidentify_config = 2; @@ -922,20 +1268,23 @@ message ReidentifyContentRequest { // The item to re-identify. Will be treated as text. ContentItem item = 4; - // Optional template to use. Any configuration directly specified in + // Template to use. Any configuration directly specified in // `inspect_config` will override those set in the template. Singular fields // that are set in this request will replace their corresponding fields in the // template. Repeated fields are appended. Singular sub-messages and groups // are recursively merged. string inspect_template_name = 5; - // Optional template to use. References an instance of `DeidentifyTemplate`. + // Template to use. References an instance of `DeidentifyTemplate`. // Any configuration directly specified in `reidentify_config` or // `inspect_config` will override those set in the template. Singular fields // that are set in this request will replace their corresponding fields in the // template. Repeated fields are appended. Singular sub-messages and groups // are recursively merged. string reidentify_template_name = 6; + + // Deprecated. This field has no effect. + string location_id = 7; } // Results of re-identifying a item. @@ -949,8 +1298,11 @@ message ReidentifyContentResponse { // Request to search for potentially sensitive info in a ContentItem. message InspectContentRequest { - // The parent resource name, for example projects/my-project-id. - string parent = 1; + // The parent resource name, for example projects/my-project-id + // or projects/my-project-id/locations/{location_id} + string parent = 1 [(google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + }]; // Configuration for the inspector. What specified here will override // the template referenced by the inspect_template_name argument. @@ -959,12 +1311,15 @@ message InspectContentRequest { // The item to inspect. ContentItem item = 3; - // Optional template to use. Any configuration directly specified in + // Template to use. Any configuration directly specified in // inspect_config will override those set in the template. Singular fields // that are set in this request will replace their corresponding fields in the // template. Repeated fields are appended. Singular sub-messages and groups // are recursively merged. string inspect_template_name = 4; + + // Deprecated. This field has no effect. + string location_id = 5; } // Results of inspecting an item. @@ -976,7 +1331,9 @@ message InspectContentResponse { // Cloud repository for storing output. message OutputStorageConfig { // Predefined schemas for storing findings. + // Only for use with external storage. enum OutputSchema { + // Unused. OUTPUT_SCHEMA_UNSPECIFIED = 0; // Basic schema including only `info_type`, `quote`, `certainty`, and @@ -996,6 +1353,7 @@ message OutputStorageConfig { ALL_COLUMNS = 5; } + // Output storage types. oneof type { // Store findings in an existing table or a new table in an existing // dataset. If table_id is not set a new one will be generated @@ -1023,6 +1381,7 @@ message OutputStorageConfig { // If unspecified, then all available columns will be used for a new table or // an (existing) table with no schema, and no changes will be made to an // existing table that has a schema. + // Only for use with external storage. OutputSchema output_schema = 3; } @@ -1037,11 +1396,13 @@ message InfoTypeStats { // The results of an inspect DataSource job. message InspectDataSourceDetails { + // Snapshot of the inspection configuration. message RequestedOptions { // If run with an InspectTemplate, a snapshot of its state at the time of // this run. InspectTemplate snapshot_inspect_template = 1; + // Inspect config. InspectJobConfig job_config = 3; } @@ -1056,6 +1417,12 @@ message InspectDataSourceDetails { // Statistics of how many instances of each info type were found during // inspect job. repeated InfoTypeStats info_type_stats = 3; + + // Statistics related to the processing of hybrid inspect. + // Early access feature is in a pre-release state and might change or have + // limited support. For more information, see + // https://cloud.google.com/products#product-launch-stages. + HybridInspectStatistics hybrid_stats = 7; } // The configuration used for this job. @@ -1065,6 +1432,23 @@ message InspectDataSourceDetails { Result result = 3; } +// Statistics related to processing hybrid inspect requests.s +message HybridInspectStatistics { + // The number of hybrid inspection requests processed within this job. + int64 processed_count = 1; + + // The number of hybrid inspection requests aborted because the job ran + // out of quota or was ended before they could be processed. + int64 aborted_count = 2; + + // The number of hybrid requests currently being processed. Only populated + // when called via method `getDlpJob`. + // A burst of traffic may cause hybrid inspect requests to be enqueued. + // Processing will take place as quickly as possible, but resource limitations + // may impact how long a request is enqueued for. + int64 pending_count = 3; +} + // InfoType description. message InfoTypeDescription { // Internal name of the infoType. @@ -1083,14 +1467,19 @@ message InfoTypeDescription { // Request for the list of infoTypes. message ListInfoTypesRequest { - // Optional BCP-47 language code for localized infoType friendly + // The parent resource name, for example locations/{location_id} + string parent = 4; + // BCP-47 language code for localized infoType friendly // names. If omitted, or if localized strings are not available, // en-US strings will be returned. string language_code = 1; - // Optional filter to only return infoTypes supported by certain parts of the + // filter to only return infoTypes supported by certain parts of the // API. Defaults to supported_by=INSPECT. string filter = 2; + + // Deprecated. This field has no effect. + string location_id = 3; } // Response to the ListInfoTypes request. @@ -1115,8 +1504,8 @@ message RiskAnalysisJobConfig { // A column with a semantic tag attached. message QuasiId { - // Identifies the column. [required] - FieldId field = 1; + // Required. Identifies the column. + FieldId field = 1 [(google.api.field_behavior) = REQUIRED]; // Semantic tag that identifies what a column contains, to determine which // statistical model to use to estimate the reidentifiability of each @@ -1151,21 +1540,25 @@ message StatisticalTable { // A quasi-identifier column has a custom_tag, used to know which column // in the data corresponds to which column in the statistical model. message QuasiIdentifierField { + // Identifies the column. FieldId field = 1; + // A column can be tagged with a custom tag. In this case, the user must + // indicate an auxiliary table that contains statistical information on + // the possible values of this column (below). string custom_tag = 2; } - // Auxiliary table location. [required] - BigQueryTable table = 3; + // Required. Auxiliary table location. + BigQueryTable table = 3 [(google.api.field_behavior) = REQUIRED]; - // Quasi-identifier columns. [required] - repeated QuasiIdentifierField quasi_ids = 1; + // Required. Quasi-identifier columns. + repeated QuasiIdentifierField quasi_ids = 1 + [(google.api.field_behavior) = REQUIRED]; - // The relative frequency column must contain a floating-point number - // between 0 and 1 (inclusive). Null values are assumed to be zero. - // [required] - FieldId relative_frequency = 2; + // Required. The relative frequency column must contain a floating-point + // number between 0 and 1 (inclusive). Null values are assumed to be zero. + FieldId relative_frequency = 2 [(google.api.field_behavior) = REQUIRED]; } // Privacy metric to compute for reidentification risk analysis. @@ -1197,7 +1590,7 @@ message PrivacyMetric { // a repeated field. repeated FieldId quasi_ids = 1; - // Optional message indicating that multiple rows might be associated to a + // Message indicating that multiple rows might be associated to a // single individual. If the same entity_id is associated to multiple // quasi-identifier tuples over distinct rows, we consider the entire // collection of tuples as the composite quasi-identifier. This collection @@ -1227,11 +1620,11 @@ message PrivacyMetric { // using publicly available data (like the US Census), or using a custom // statistical model (indicated as one or several BigQuery tables), or by // extrapolating from the distribution of values in the input dataset. - // A column with a semantic tag attached. message KMapEstimationConfig { + // A column with a semantic tag attached. message TaggedField { - // Identifies the column. [required] - FieldId field = 1; + // Required. Identifies the column. + FieldId field = 1 [(google.api.field_behavior) = REQUIRED]; // Semantic tag that identifies what a column contains, to determine which // statistical model to use to estimate the reidentifiability of each @@ -1266,29 +1659,31 @@ message PrivacyMetric { // A quasi-identifier column has a custom_tag, used to know which column // in the data corresponds to which column in the statistical model. message QuasiIdField { + // Identifies the column. FieldId field = 1; + // A auxiliary field. string custom_tag = 2; } - // Auxiliary table location. [required] - BigQueryTable table = 3; + // Required. Auxiliary table location. + BigQueryTable table = 3 [(google.api.field_behavior) = REQUIRED]; - // Quasi-identifier columns. [required] - repeated QuasiIdField quasi_ids = 1; + // Required. Quasi-identifier columns. + repeated QuasiIdField quasi_ids = 1 + [(google.api.field_behavior) = REQUIRED]; - // The relative frequency column must contain a floating-point number - // between 0 and 1 (inclusive). Null values are assumed to be zero. - // [required] - FieldId relative_frequency = 2; + // Required. The relative frequency column must contain a floating-point + // number between 0 and 1 (inclusive). Null values are assumed to be zero. + FieldId relative_frequency = 2 [(google.api.field_behavior) = REQUIRED]; } - // Fields considered to be quasi-identifiers. No two columns can have the - // same tag. [required] - repeated TaggedField quasi_ids = 1; + // Required. Fields considered to be quasi-identifiers. No two columns can + // have the same tag. + repeated TaggedField quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; // ISO 3166-1 alpha-2 region code to use in the statistical modeling. - // Required if no column is tagged with a region-specific InfoType (like + // Set if no column is tagged with a region-specific InfoType (like // US_ZIP_5) or a region code. string region_code = 2; @@ -1303,12 +1698,12 @@ message PrivacyMetric { // Similarly to the k-map metric, we cannot compute δ-presence exactly without // knowing the attack dataset, so we use a statistical model instead. message DeltaPresenceEstimationConfig { - // Fields considered to be quasi-identifiers. No two fields can have the - // same tag. [required] - repeated QuasiId quasi_ids = 1; + // Required. Fields considered to be quasi-identifiers. No two fields can + // have the same tag. + repeated QuasiId quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; // ISO 3166-1 alpha-2 region code to use in the statistical modeling. - // Required if no column is tagged with a region-specific InfoType (like + // Set if no column is tagged with a region-specific InfoType (like // US_ZIP_5) or a region code. string region_code = 2; @@ -1318,17 +1713,24 @@ message PrivacyMetric { repeated StatisticalTable auxiliary_tables = 3; } + // Types of analysis. oneof type { + // Numerical stats NumericalStatsConfig numerical_stats_config = 1; + // Categorical stats CategoricalStatsConfig categorical_stats_config = 2; + // K-anonymity KAnonymityConfig k_anonymity_config = 3; + // l-diversity LDiversityConfig l_diversity_config = 4; + // k-map KMapEstimationConfig k_map_estimation_config = 5; + // delta-presence DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; } } @@ -1350,6 +1752,7 @@ message AnalyzeDataSourceRiskDetails { // Result of the categorical stats computation. message CategoricalStatsResult { + // Histogram of value frequencies in the column. message CategoricalStatsHistogramBucket { // Lower bound on the value frequency of the values in this bucket. int64 value_frequency_lower_bound = 1; @@ -1369,7 +1772,8 @@ message AnalyzeDataSourceRiskDetails { } // Histogram of value frequencies in the column. - repeated CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + repeated CategoricalStatsHistogramBucket value_frequency_histogram_buckets = + 5; } // Result of the k-anonymity computation. @@ -1386,6 +1790,7 @@ message AnalyzeDataSourceRiskDetails { int64 equivalence_class_size = 2; } + // Histogram of k-anonymity equivalence classes. message KAnonymityHistogramBucket { // Lower bound on the size of the equivalence classes in this bucket. int64 equivalence_class_size_lower_bound = 1; @@ -1426,6 +1831,7 @@ message AnalyzeDataSourceRiskDetails { repeated ValueFrequency top_sensitive_values = 4; } + // Histogram of l-diversity equivalence class sensitive value frequencies. message LDiversityHistogramBucket { // Lower bound on the sensitive value frequencies of the equivalence // classes in this bucket. @@ -1447,7 +1853,8 @@ message AnalyzeDataSourceRiskDetails { } // Histogram of l-diversity equivalence class sensitive value frequencies. - repeated LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + repeated LDiversityHistogramBucket + sensitive_value_frequency_histogram_buckets = 5; } // Result of the reidentifiability analysis. Note that these results are an @@ -1564,16 +1971,22 @@ message AnalyzeDataSourceRiskDetails { // Values associated with this metric. oneof result { + // Numerical stats result NumericalStatsResult numerical_stats_result = 3; + // Categorical stats result CategoricalStatsResult categorical_stats_result = 4; + // K-anonymity result KAnonymityResult k_anonymity_result = 5; + // L-divesity result LDiversityResult l_diversity_result = 6; + // K-map result KMapEstimationResult k_map_estimation_result = 7; + // Delta-presence result DeltaPresenceEstimationResult delta_presence_estimation_result = 9; } } @@ -1594,21 +2007,30 @@ message ValueFrequency { // 123456789, the number of bytes would be counted as 9, even though an // int64 only holds up to 8 bytes of data. message Value { + // Value types oneof type { + // integer int64 integer_value = 1; + // float double float_value = 2; + // string string string_value = 3; + // boolean bool boolean_value = 4; + // timestamp google.protobuf.Timestamp timestamp_value = 5; + // time of day google.type.TimeOfDay time_value = 6; + // date google.type.Date date_value = 7; + // day of week google.type.DayOfWeek day_of_week_value = 8; } } @@ -1625,20 +2047,24 @@ message QuoteInfo { // Message for a date time object. // e.g. 2018-01-01, 5th August. message DateTime { + // Time zone of the date time object. message TimeZone { // Set only if the offset can be determined. Positive for time ahead of UTC. // E.g. For "UTC-9", this value is -540. int32 offset_minutes = 1; } - // One or more of the following must be set. All fields are optional, but - // when set must be valid date or time values. + // One or more of the following must be set. + // Must be a valid date or time value. google.type.Date date = 1; + // Day of week google.type.DayOfWeek day_of_week = 2; + // Time of day google.type.TimeOfDay time = 3; + // Time zone TimeZone time_zone = 4; } @@ -1654,31 +2080,78 @@ message DeidentifyConfig { // a column within a table. RecordTransformations record_transformations = 2; } + + // Mode for handling transformation errors. If left unspecified, the default + // mode is `TransformationErrorHandling.ThrowError`. + TransformationErrorHandling transformation_error_handling = 3; +} + +// How to handle transformation errors during de-identification. A +// transformation error occurs when the requested transformation is incompatible +// with the data. For example, trying to de-identify an IP address using a +// `DateShift` transformation would result in a transformation error, since date +// info cannot be extracted from an IP address. +// Information about any incompatible transformations, and how they were +// handled, is returned in the response as part of the +// `TransformationOverviews`. +message TransformationErrorHandling { + // Throw an error and fail the request when a transformation error occurs. + message ThrowError { + + } + + // Skips the data without modifying it if the requested transformation would + // cause an error. For example, if a `DateShift` transformation were applied + // an an IP address, this mode would leave the IP address unchanged in the + // response. + message LeaveUntransformed { + + } + + // How transformation errors should be handled. + oneof mode { + // Throw an error + ThrowError throw_error = 1; + + // Ignore errors + LeaveUntransformed leave_untransformed = 2; + } } // A rule for transforming a value. message PrimitiveTransformation { oneof transformation { + // Replace ReplaceValueConfig replace_config = 1; + // Redact RedactConfig redact_config = 2; + // Mask CharacterMaskConfig character_mask_config = 3; + // Ffx-Fpe CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + // Fixed size bucketing FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + // Bucketing BucketingConfig bucketing_config = 6; + // Replace with infotype ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + // Time extraction TimePartConfig time_part_config = 8; + // Crypto CryptoHashConfig crypto_hash_config = 9; + // Date Shift DateShiftConfig date_shift_config = 11; + // Deterministic Crypto CryptoDeterministicConfig crypto_deterministic_config = 12; } } @@ -1686,7 +2159,9 @@ message PrimitiveTransformation { // For use with `Date`, `Timestamp`, and `TimeOfDay`, extract or preserve a // portion of the value. message TimePartConfig { + // Components that make up time. enum TimePart { + // Unused TIME_PART_UNSPECIFIED = 0; // [0-9999] @@ -1701,13 +2176,14 @@ message TimePartConfig { // [1-7] DAY_OF_WEEK = 4; - // [1-52] + // [1-53] WEEK_OF_YEAR = 5; // [0-23] HOUR_OF_DAY = 6; } + // The part of the time to keep. TimePart part_to_extract = 1; } @@ -1734,7 +2210,7 @@ message CryptoDeterministicConfig { // This annotation will be applied to the surrogate by prefixing it with // the name of the custom info type followed by the number of // characters comprising the surrogate. The following scheme defines the - // format: (): + // format: {info type name}({surrogate character count}):{surrogate} // // For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and // the surrogate is 'abc', the full replacement value @@ -1744,6 +2220,11 @@ message CryptoDeterministicConfig { // custom info type 'Surrogate'. This facilitates reversal of the // surrogate when it occurs in free text. // + // Note: For record transformations where the entire cell in a table is being + // transformed, surrogates are not mandatory. Surrogates are used to denote + // the location of the token and are necessary for re-identification in free + // form text. + // // In order for inspection to work properly, the name of this info type must // not occur naturally anywhere in your data; otherwise, inspection may either // @@ -1756,10 +2237,10 @@ message CryptoDeterministicConfig { // that are highly improbable to exist in your data. // For example, assuming your data is entered from a regular ASCII keyboard, // the symbol with the hex code point 29DD might be used like so: - // ⧝MY_TOKEN_TYPE + // ⧝MY_TOKEN_TYPE. InfoType surrogate_info_type = 2; - // Optional. A context may be used for higher security and maintaining + // A context may be used for higher security and maintaining // referential integrity such that the same identifier in two different // contexts will be given a distinct surrogate. The context is appended to // plaintext value being encrypted. On decryption the provided context is @@ -1787,21 +2268,19 @@ message ReplaceValueConfig { } // Replace each matching finding with the name of the info_type. -message ReplaceWithInfoTypeConfig { - -} +message ReplaceWithInfoTypeConfig {} // Redact a given value. For example, if used with an `InfoTypeTransformation` // transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the // output would be 'My phone number is '. -message RedactConfig { - -} +message RedactConfig {} // Characters to skip when doing deidentification of a value. These will be left // alone and skipped. message CharsToIgnore { + // Convenience enum for indication common characters to not transform. enum CommonCharsToIgnore { + // Unused. COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0; // 0-9 @@ -1821,8 +2300,11 @@ message CharsToIgnore { } oneof characters { + // Characters to not transform when masking. string characters_to_skip = 1; + // Common characters to not transform when masking. Useful to avoid removing + // punctuation. CommonCharsToIgnore common_characters_to_ignore = 2; } } @@ -1834,10 +2316,10 @@ message CharsToIgnore { // type. (This allows you to take a long like 123 and modify it to a string like // **3. message CharacterMaskConfig { - // Character to mask the sensitive values—for example, "*" for an - // alphabetic string such as name, or "0" for a numeric string such as ZIP - // code or credit card number. String must have length 1. If not supplied, we - // will default to "*" for strings, 0 for digits. + // Character to use to mask the sensitive values—for example, `*` for an + // alphabetic string such as a name, or `0` for a numeric string such as ZIP + // code or credit card number. This string must have a length of 1. If not + // supplied, this value defaults to `*` for strings, and `0` for digits. string masking_character = 1; // Number of characters to mask. If not set, all matching chars will be @@ -1845,15 +2327,16 @@ message CharacterMaskConfig { int32 number_to_mask = 2; // Mask characters in reverse order. For example, if `masking_character` is - // '0', number_to_mask is 14, and `reverse_order` is false, then - // 1234-5678-9012-3456 -> 00000000000000-3456 - // If `masking_character` is '*', `number_to_mask` is 3, and `reverse_order` - // is true, then 12345 -> 12*** + // `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the + // input string `1234-5678-9012-3456` is masked as `00000000000000-3456`. + // If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order` + // is `true`, then the string `12345` is masked as `12***`. bool reverse_order = 3; - // When masking a string, items in this list will be skipped when replacing. - // For example, if your string is 555-555-5555 and you ask us to skip `-` and - // mask 5 chars with * we would produce ***-*55-5555. + // When masking a string, items in this list will be skipped when replacing + // characters. For example, if the input string is `555-555-5555` and you + // instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP + // returns `***-**5-5555`. repeated CharsToIgnore characters_to_ignore = 4; } @@ -1863,7 +2346,7 @@ message CharacterMaskConfig { // the user for simple bucketing strategies. // // The transformed value will be a hyphenated string of -// -, i.e if lower_bound = 10 and upper_bound = 20 +// {lower_bound}-{upper_bound}, i.e if lower_bound = 10 and upper_bound = 20 // all values that are within this bucket will be replaced with "10-20". // // This can be used on data of type: double, long. @@ -1874,22 +2357,21 @@ message CharacterMaskConfig { // // See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. message FixedSizeBucketingConfig { - // Lower bound value of buckets. All values less than `lower_bound` are - // grouped together into a single bucket; for example if `lower_bound` = 10, - // then all values less than 10 are replaced with the value “-10”. [Required]. - Value lower_bound = 1; - - // Upper bound value of buckets. All values greater than upper_bound are - // grouped together into a single bucket; for example if `upper_bound` = 89, - // then all values greater than 89 are replaced with the value “89+”. - // [Required]. - Value upper_bound = 2; - - // Size of each bucket (except for minimum and maximum buckets). So if - // `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the + // Required. Lower bound value of buckets. All values less than `lower_bound` + // are grouped together into a single bucket; for example if `lower_bound` = + // 10, then all values less than 10 are replaced with the value “-10”. + Value lower_bound = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Upper bound value of buckets. All values greater than upper_bound + // are grouped together into a single bucket; for example if `upper_bound` = + // 89, then all values greater than 89 are replaced with the value “89+”. + Value upper_bound = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Size of each bucket (except for minimum and maximum buckets). So + // if `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the // following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60, - // 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. [Required]. - double bucket_size = 3; + // 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. + double bucket_size = 3 [(google.api.field_behavior) = REQUIRED]; } // Generalization function that buckets values based on ranges. The ranges and @@ -1938,6 +2420,7 @@ message CryptoReplaceFfxFpeConfig { // natively supports. In the algorithm, the alphabet is selected using // the "radix". Therefore each corresponds to particular radix. enum FfxCommonNativeAlphabet { + // Unused. FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0; // [0-9] (radix of 10) @@ -1953,8 +2436,8 @@ message CryptoReplaceFfxFpeConfig { ALPHA_NUMERIC = 4; } - // The key used by the encryption algorithm. [required] - CryptoKey crypto_key = 1; + // Required. The key used by the encryption algorithm. + CryptoKey crypto_key = 1 [(google.api.field_behavior) = REQUIRED]; // The 'tweak', a context may be used for higher security since the same // identifier in two different contexts won't be given the same surrogate. If @@ -1978,19 +2461,21 @@ message CryptoReplaceFfxFpeConfig { // - a string is encoded in UTF-8 format followed by a single byte of value 2 FieldId context = 2; + // Choose an alphabet which the data being transformed will be made up of. oneof alphabet { + // Common alphabets. FfxCommonNativeAlphabet common_alphabet = 4; // This is supported by mapping these to the alphanumeric characters // that the FFX mode natively supports. This happens before/after // encryption/decryption. // Each character listed must appear only once. - // Number of characters must be in the range [2, 62]. + // Number of characters must be in the range [2, 95]. // This must be encoded as ASCII. // The order of characters does not matter. string custom_alphabet = 5; - // The native way to select the alphabet. Must be in the range [2, 62]. + // The native way to select the alphabet. Must be in the range [2, 95]. int32 radix = 6; } @@ -2028,11 +2513,15 @@ message CryptoReplaceFfxFpeConfig { // IAM policy on the KMS CryptoKey (KEK) to ensure an attacker cannot // unwrap the data crypto key. message CryptoKey { + // Sources of crypto keys. oneof source { + // Transient crypto key TransientCryptoKey transient = 1; + // Unwrapped crypto key UnwrappedCryptoKey unwrapped = 2; + // Kms wrapped key KmsWrappedCryptoKey kms_wrapped = 3; } } @@ -2040,31 +2529,20 @@ message CryptoKey { // Use this to have a random data crypto key generated. // It will be discarded after the request finishes. message TransientCryptoKey { - // Name of the key. [required] + // Required. Name of the key. // This is an arbitrary string used to differentiate different keys. // A unique key is generated per name: two separate `TransientCryptoKey` // protos share the same generated key if their names are the same. // When the data crypto key is generated, this name is not used in any way // (repeating the api call will result in a different key being generated). - string name = 1; -} - -// Parts of the APIs which use certain infoTypes. -enum InfoTypeSupportedBy { - ENUM_TYPE_UNSPECIFIED = 0; - - // Supported by the inspect operations. - INSPECT = 1; - - // Supported by the risk analysis operations. - RISK_ANALYSIS = 2; + string name = 1 [(google.api.field_behavior) = REQUIRED]; } // Using raw keys is prone to security risks due to accidentally // leaking the key. Choose another type of key if possible. message UnwrappedCryptoKey { - // A 128/192/256 bit key. [required] - bytes key = 1; + // Required. A 128/192/256 bit key. + bytes key = 1 [(google.api.field_behavior) = REQUIRED]; } // Include to use an existing data crypto key wrapped by KMS. @@ -2073,31 +2551,30 @@ message UnwrappedCryptoKey { // to perform a crypto transformation using a kms-wrapped crypto key: // dlp.kms.encrypt message KmsWrappedCryptoKey { - // The wrapped data crypto key. [required] - bytes wrapped_key = 1; + // Required. The wrapped data crypto key. + bytes wrapped_key = 1 [(google.api.field_behavior) = REQUIRED]; - // The resource name of the KMS CryptoKey to use for unwrapping. [required] - string crypto_key_name = 2; + // Required. The resource name of the KMS CryptoKey to use for unwrapping. + string crypto_key_name = 2 [(google.api.field_behavior) = REQUIRED]; } // Shifts dates by random number of days, with option to be consistent for the // same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting // to learn more. message DateShiftConfig { - // Range of shift in days. Actual shift will be selected at random within this - // range (inclusive ends). Negative means shift to earlier in time. Must not - // be more than 365250 days (1000 years) each direction. + // Required. Range of shift in days. Actual shift will be selected at random + // within this range (inclusive ends). Negative means shift to earlier in + // time. Must not be more than 365250 days (1000 years) each direction. // // For example, 3 means shift date to at most 3 days into the future. - // [Required] - int32 upper_bound_days = 1; + int32 upper_bound_days = 1 [(google.api.field_behavior) = REQUIRED]; - // For example, -5 means shift date to at most 5 days back in the past. - // [Required] - int32 lower_bound_days = 2; + // Required. For example, -5 means shift date to at most 5 days back in the + // past. + int32 lower_bound_days = 2 [(google.api.field_behavior) = REQUIRED]; // Points to the field that contains the context, for example, an entity id. - // If set, must also set method. If set, shift will be consistent for the + // If set, must also set cryptoKey. If set, shift will be consistent for the // given context. FieldId context = 3; @@ -2105,7 +2582,8 @@ message DateShiftConfig { // set, must also set context. Can only be applied to table items. oneof method { // Causes the shift to be computed based on this key and the context. This - // results in the same shift for the same context and crypto_key. + // results in the same shift for the same context and crypto_key. If + // set, must also set context. Can only be applied to table items. CryptoKey crypto_key = 4; } } @@ -2123,23 +2601,23 @@ message InfoTypeTransformations { // infoTypes that were requested in `InspectConfig`. repeated InfoType info_types = 1; - // Primitive transformation to apply to the infoType. [required] - PrimitiveTransformation primitive_transformation = 2; + // Required. Primitive transformation to apply to the infoType. + PrimitiveTransformation primitive_transformation = 2 [(google.api.field_behavior) = REQUIRED]; } - // Transformation for each infoType. Cannot specify more than one - // for a given infoType. [required] - repeated InfoTypeTransformation transformations = 1; + // Required. Transformation for each infoType. Cannot specify more than one + // for a given infoType. + repeated InfoTypeTransformation transformations = 1 [(google.api.field_behavior) = REQUIRED]; } // The transformation to apply to the field. message FieldTransformation { - // Input field(s) to apply the transformation to. [required] - repeated FieldId fields = 1; + // Required. Input field(s) to apply the transformation to. + repeated FieldId fields = 1 [(google.api.field_behavior) = REQUIRED]; // Only apply the transformation if the condition evaluates to true for the // given `RecordCondition`. The conditions are allowed to reference fields - // that are not used in the actual transformation. [optional] + // that are not used in the actual transformation. // // Example Use Cases: // @@ -2166,7 +2644,7 @@ message RecordTransformations { repeated FieldTransformation field_transformations = 1; // Configuration defining which records get suppressed entirely. Records that - // match any suppression rule are omitted from the output [optional]. + // match any suppression rule are omitted from the output. repeated RecordSuppression record_suppressions = 2; } @@ -2201,26 +2679,30 @@ message RecordCondition { // If we fail to compare do to type mismatch, a warning will be given and // the condition will evaluate to false. message Condition { - // Field within the record this condition is evaluated against. [required] - FieldId field = 1; + // Required. Field within the record this condition is evaluated against. + FieldId field = 1 [(google.api.field_behavior) = REQUIRED]; - // Operator used to compare the field or infoType to the value. [required] - RelationalOperator operator = 3; + // Required. Operator used to compare the field or infoType to the value. + RelationalOperator operator = 3 [(google.api.field_behavior) = REQUIRED]; - // Value to compare against. [Required, except for `EXISTS` tests.] + // Value to compare against. [Mandatory, except for `EXISTS` tests.] Value value = 4; } // A collection of conditions. message Conditions { + // A collection of conditions. repeated Condition conditions = 1; } // An expression, consisting or an operator and conditions. message Expressions { + // Logical operators for conditional checks. enum LogicalOperator { + // Unused LOGICAL_OPERATOR_UNSPECIFIED = 0; + // Conditional AND AND = 1; } @@ -2228,7 +2710,9 @@ message RecordCondition { // only supported value is `AND`. LogicalOperator logical_operator = 1; + // Expression types. oneof type { + // Conditions to apply to the expression. Conditions conditions = 3; } } @@ -2253,8 +2737,10 @@ message TransformationSummary { // A collection that informs the user the number of times a particular // `TransformationResultCode` and error details occurred. message SummaryResult { + // Number of transformations counted by this result. int64 count = 1; + // Outcome of the transformation. TransformationResultCode code = 2; // A place for warnings or errors to show up if a transformation didn't @@ -2264,10 +2750,13 @@ message TransformationSummary { // Possible outcomes of transformations. enum TransformationResultCode { + // Unused TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0; + // Transformation completed without an error. SUCCESS = 1; + // Transformation had an error. ERROR = 2; } @@ -2288,6 +2777,7 @@ message TransformationSummary { // The specific suppression option these stats apply to. RecordSuppression record_suppress = 6; + // Collection of all transformations that took place or had an error. repeated SummaryResult results = 4; // Total size in bytes that were transformed in some way. @@ -2309,17 +2799,31 @@ message Schedule { } } +// Job trigger option for hybrid jobs. Jobs must be manually created +// and finished. +message Manual { + +} + // The inspectTemplate contains a configuration (set of types of sensitive data // to be detected) to be used anywhere you otherwise would normally specify // InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates // to learn more. message InspectTemplate { - // The template name. Output only. + option (google.api.resource) = { + type: "dlp.googleapis.com/InspectTemplate" + pattern: "organizations/{organization}/inspectTemplates/{inspect_template}" + pattern: "projects/{project}/inspectTemplates/{inspect_template}" + pattern: "organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}" + pattern: "projects/{project}/locations/{location}/inspectTemplates/{inspect_template}" + }; + + // Output only. The template name. // // The template will have one of the following formats: // `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR - // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID` - string name = 1; + // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`; + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Display name (max 256 chars). string display_name = 2; @@ -2327,25 +2831,33 @@ message InspectTemplate { // Short description (max 256 chars). string description = 3; - // The creation timestamp of a inspectTemplate, output only field. - google.protobuf.Timestamp create_time = 4; + // Output only. The creation timestamp of an inspectTemplate. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The last update timestamp of a inspectTemplate, output only field. - google.protobuf.Timestamp update_time = 5; + // Output only. The last update timestamp of an inspectTemplate. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // The core content of the template. Configuration of the scanning process. InspectConfig inspect_config = 6; } -// The DeidentifyTemplates contains instructions on how to deidentify content. +// DeidentifyTemplates contains instructions on how to de-identify content. // See https://cloud.google.com/dlp/docs/concepts-templates to learn more. message DeidentifyTemplate { - // The template name. Output only. + option (google.api.resource) = { + type: "dlp.googleapis.com/DeidentifyTemplate" + pattern: "organizations/{organization}/deidentifyTemplates/{deidentify_template}" + pattern: "projects/{project}/deidentifyTemplates/{deidentify_template}" + pattern: "organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}" + pattern: "projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}" + }; + + // Output only. The template name. // // The template will have one of the following formats: // `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR // `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` - string name = 1; + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Display name (max 256 chars). string display_name = 2; @@ -2353,11 +2865,11 @@ message DeidentifyTemplate { // Short description (max 256 chars). string description = 3; - // The creation timestamp of a inspectTemplate, output only field. - google.protobuf.Timestamp create_time = 4; + // Output only. The creation timestamp of an inspectTemplate. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The last update timestamp of a inspectTemplate, output only field. - google.protobuf.Timestamp update_time = 5; + // Output only. The last update timestamp of an inspectTemplate. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // ///////////// // The core content of the template // /////////////// DeidentifyConfig deidentify_config = 6; @@ -2365,8 +2877,8 @@ message DeidentifyTemplate { // Details information about an error encountered during job execution or // the results of an unsuccessful activation of the JobTrigger. -// Output only field. message Error { + // Detailed error codes and messages. google.rpc.Status details = 1; // The times the error occurred. @@ -2376,11 +2888,23 @@ message Error { // Contains a configuration to make dlp api calls on a repeating basis. // See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more. message JobTrigger { + option (google.api.resource) = { + type: "dlp.googleapis.com/JobTrigger" + pattern: "projects/{project}/jobTriggers/{job_trigger}" + pattern: "projects/{project}/locations/{location}/jobTriggers/{job_trigger}" + }; + // What event needs to occur for a new job to be started. message Trigger { oneof trigger { // Create a job on a repeating basis based on the elapse of time. Schedule schedule = 1; + + // For use with hybrid jobs. Jobs must be manually created and finished. + // Early access feature is in a pre-release state and might change or have + // limited support. For more information, see + // https://cloud.google.com/products#product-launch-stages. + Manual manual = 2; } } @@ -2389,6 +2913,7 @@ message JobTrigger { // pause triggers experiencing frequent errors. To restart a job, set the // status to HEALTHY after correcting user errors. enum Status { + // Unused. STATUS_UNSPECIFIED = 0; // Trigger is healthy. @@ -2403,7 +2928,7 @@ message JobTrigger { // Unique resource name for the triggeredJob, assigned by the service when the // triggeredJob is created, for example - // `projects/dlp-test-project/triggeredJobs/53234423`. + // `projects/dlp-test-project/jobTriggers/53234423`. string name = 1; // Display name (max 100 chars) @@ -2414,6 +2939,7 @@ message JobTrigger { // The configuration details for the specific type of job to run. oneof job { + // For inspect jobs, a snapshot of the configuration. InspectJobConfig inspect_job = 4; } @@ -2422,23 +2948,23 @@ message JobTrigger { // a single Schedule trigger and must have at least one object. repeated Trigger triggers = 5; - // A stream of errors encountered when the trigger was activated. Repeated + // Output only. A stream of errors encountered when the trigger was activated. Repeated // errors may result in the JobTrigger automatically being paused. // Will return the last 100 errors. Whenever the JobTrigger is modified - // this list will be cleared. Output only field. - repeated Error errors = 6; + // this list will be cleared. + repeated Error errors = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The creation timestamp of a triggeredJob, output only field. - google.protobuf.Timestamp create_time = 7; + // Output only. The creation timestamp of a triggeredJob. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The last update timestamp of a triggeredJob, output only field. - google.protobuf.Timestamp update_time = 8; + // Output only. The last update timestamp of a triggeredJob. + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The timestamp of the last time this trigger executed, output only field. - google.protobuf.Timestamp last_run_time = 9; + // Output only. The timestamp of the last time this trigger executed. + google.protobuf.Timestamp last_run_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A status for this trigger. [required] - Status status = 10; + // Required. A status for this trigger. + Status status = 10 [(google.api.field_behavior) = REQUIRED]; } // A task to execute on the completion of a job. @@ -2449,6 +2975,7 @@ message Action { // specified. // Compatible with: Inspect, Risk message SaveFindings { + // Location to store findings outside of DLP. OutputStorageConfig output_config = 1; } @@ -2499,6 +3026,14 @@ message Action { } + // Enable Stackdriver metric dlp.googleapis.com/finding_count. This + // will publish a metric to stack driver on each infotype requested and + // how many findings were found for it. CustomDetectors will be bucketed + // as 'Custom' under the Stackdriver label 'info_type'. + message PublishToStackdriver { + + } + oneof action { // Save resulting findings in a provided location. SaveFindings save_findings = 1; @@ -2512,34 +3047,50 @@ message Action { // Publish findings to Cloud Datahub. PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - // Enable email notification to project owners and editors on job's + // Enable email notification for project owners and editors on job's // completion/failure. JobNotificationEmails job_notification_emails = 8; + + // Enable Stackdriver metric dlp.googleapis.com/finding_count. + PublishToStackdriver publish_to_stackdriver = 9; } } // Request message for CreateInspectTemplate. message CreateInspectTemplateRequest { - // The parent resource name, for example projects/my-project-id or - // organizations/my-org-id. - string parent = 1; + // Required. The parent resource name, for example projects/my-project-id or + // organizations/my-org-id or projects/my-project-id/locations/{location-id}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/InspectTemplate" + } + ]; - // The InspectTemplate to create. - InspectTemplate inspect_template = 2; + // Required. The InspectTemplate to create. + InspectTemplate inspect_template = 2 [(google.api.field_behavior) = REQUIRED]; // The template id can contain uppercase and lowercase letters, // numbers, and hyphens; that is, it must match the regular // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 // characters. Can be empty to allow the system to generate one. string template_id = 3; + + // Deprecated. This field has no effect. + string location_id = 4; } // Request message for UpdateInspectTemplate. message UpdateInspectTemplateRequest { - // Resource name of organization and inspectTemplate to be updated, for - // example `organizations/433245324/inspectTemplates/432452342` or + // Required. Resource name of organization and inspectTemplate to be updated, + // for example `organizations/433245324/inspectTemplates/432452342` or // projects/project-id/inspectTemplates/432452342. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/InspectTemplate" + } + ]; // New InspectTemplate value. InspectTemplate inspect_template = 2; @@ -2550,27 +3101,37 @@ message UpdateInspectTemplateRequest { // Request message for GetInspectTemplate. message GetInspectTemplateRequest { - // Resource name of the organization and inspectTemplate to be read, for - // example `organizations/433245324/inspectTemplates/432452342` or + // Required. Resource name of the organization and inspectTemplate to be read, + // for example `organizations/433245324/inspectTemplates/432452342` or // projects/project-id/inspectTemplates/432452342. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/InspectTemplate" + } + ]; } // Request message for ListInspectTemplates. message ListInspectTemplatesRequest { - // The parent resource name, for example projects/my-project-id or - // organizations/my-org-id. - string parent = 1; + // Required. The parent resource name, for example projects/my-project-id or + // organizations/my-org-id or projects/my-project-id/locations/{location_id}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/InspectTemplate" + } + ]; - // Optional page token to continue retrieval. Comes from previous call + // Page token to continue retrieval. Comes from previous call // to `ListInspectTemplates`. string page_token = 2; - // Optional size of the page, can be limited by server. If zero server returns + // Size of the page, can be limited by server. If zero server returns // a page of max size 100. int32 page_size = 3; - // Optional comma separated list of fields to order by, + // Comma separated list of fields to order by, // followed by `asc` or `desc` postfix. This list is case-insensitive, // default sorting order is ascending, redundant space characters are // insignificant. @@ -2584,6 +3145,9 @@ message ListInspectTemplatesRequest { // - `name`: corresponds to template's name. // - `display_name`: corresponds to template's display name. string order_by = 4; + + // Deprecated. This field has no effect. + string location_id = 5; } // Response message for ListInspectTemplates. @@ -2598,39 +3162,59 @@ message ListInspectTemplatesResponse { // Request message for DeleteInspectTemplate. message DeleteInspectTemplateRequest { - // Resource name of the organization and inspectTemplate to be deleted, for - // example `organizations/433245324/inspectTemplates/432452342` or - // projects/project-id/inspectTemplates/432452342. - string name = 1; + // Required. Resource name of the organization and inspectTemplate to be + // deleted, for example `organizations/433245324/inspectTemplates/432452342` + // or projects/project-id/inspectTemplates/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/InspectTemplate" + } + ]; } // Request message for CreateJobTrigger. message CreateJobTriggerRequest { - // The parent resource name, for example projects/my-project-id. - string parent = 1; + // Required. The parent resource name, for example projects/my-project-id + // or projects/my-project-id/locations/{location_id}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; - // The JobTrigger to create. - JobTrigger job_trigger = 2; + // Required. The JobTrigger to create. + JobTrigger job_trigger = 2 [(google.api.field_behavior) = REQUIRED]; // The trigger id can contain uppercase and lowercase letters, // numbers, and hyphens; that is, it must match the regular // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 // characters. Can be empty to allow the system to generate one. string trigger_id = 3; + + // Deprecated. This field has no effect. + string location_id = 4; } // Request message for ActivateJobTrigger. message ActivateJobTriggerRequest { - // Resource name of the trigger to activate, for example + // Required. Resource name of the trigger to activate, for example // `projects/dlp-test-project/jobTriggers/53234423`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } + ]; } // Request message for UpdateJobTrigger. message UpdateJobTriggerRequest { - // Resource name of the project and the triggeredJob, for example + // Required. Resource name of the project and the triggeredJob, for example // `projects/dlp-test-project/jobTriggers/53234423`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } + ]; // New JobTrigger value. JobTrigger job_trigger = 2; @@ -2641,22 +3225,33 @@ message UpdateJobTriggerRequest { // Request message for GetJobTrigger. message GetJobTriggerRequest { - // Resource name of the project and the triggeredJob, for example + // Required. Resource name of the project and the triggeredJob, for example // `projects/dlp-test-project/jobTriggers/53234423`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } + ]; } // Request message for CreateDlpJobRequest. Used to initiate long running // jobs such as calculating risk metrics or inspecting Google Cloud // Storage. message CreateDlpJobRequest { - // The parent resource name, for example projects/my-project-id. - string parent = 1; + // Required. The parent resource name, for example projects/my-project-id + // or projects/my-project-id/locations/{location_id}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // The configuration details for the specific type of job to run. oneof job { + // Set to control what and how to inspect. InspectJobConfig inspect_job = 2; + // Set to choose what metric to calculate. RiskAnalysisJobConfig risk_job = 3; } @@ -2665,22 +3260,31 @@ message CreateDlpJobRequest { // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 // characters. Can be empty to allow the system to generate one. string job_id = 4; + + // Deprecated. This field has no effect. + string location_id = 5; } // Request message for ListJobTriggers. message ListJobTriggersRequest { - // The parent resource name, for example `projects/my-project-id`. - string parent = 1; + // Required. The parent resource name, for example `projects/my-project-id` + // or projects/my-project-id/locations/{location_id}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; - // Optional page token to continue retrieval. Comes from previous call + // Page token to continue retrieval. Comes from previous call // to ListJobTriggers. `order_by` field must not // change for subsequent calls. string page_token = 2; - // Optional size of the page, can be limited by a server. + // Size of the page, can be limited by a server. int32 page_size = 3; - // Optional comma separated list of triggeredJob fields to order by, + // Comma separated list of triggeredJob fields to order by, // followed by `asc` or `desc` postfix. This list is case-insensitive, // default sorting order is ascending, redundant space characters are // insignificant. @@ -2697,14 +3301,14 @@ message ListJobTriggersRequest { // - `status`: corresponds to JobTrigger's status. string order_by = 4; - // Optional. Allows filtering. + // Allows filtering. // // Supported syntax: // // * Filter expressions are made up of one or more restrictions. // * Restrictions can be combined by `AND` or `OR` logical operators. A // sequence of restrictions implicitly uses `AND`. - // * A restriction has the form of ` `. + // * A restriction has the form of `{field} {operator} {value}`. // * Supported fields/values for inspect jobs: // - `status` - HEALTHY|PAUSED|CANCELLED // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY @@ -2722,6 +3326,9 @@ message ListJobTriggersRequest { // // The length of this field should be no more than 500 characters. string filter = 5; + + // Deprecated. This field has no effect. + string location_id = 7; } // Response message for ListJobTriggers. @@ -2736,11 +3343,15 @@ message ListJobTriggersResponse { // Request message for DeleteJobTrigger. message DeleteJobTriggerRequest { - // Resource name of the project and the triggeredJob, for example + // Required. Resource name of the project and the triggeredJob, for example // `projects/dlp-test-project/jobTriggers/53234423`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } + ]; } +// Controls what and how to inspect for findings. message InspectJobConfig { // The data to scan. StorageConfig storage_config = 1; @@ -2759,13 +3370,22 @@ message InspectJobConfig { // Combines all of the information about a DLP job. message DlpJob { + option (google.api.resource) = { + type: "dlp.googleapis.com/DlpJob" + pattern: "projects/{project}/dlpJobs/{dlp_job}" + pattern: "projects/{project}/locations/{location}/dlpJobs/{dlp_job}" + }; + + // Possible states of a job. New items may be added. enum JobState { + // Unused. JOB_STATE_UNSPECIFIED = 0; // The job has not yet started. PENDING = 1; - // The job is currently running. + // The job is currently running. Once a job has finished it will transition + // to FAILED or DONE. RUNNING = 2; // The job is no longer running. @@ -2776,6 +3396,12 @@ message DlpJob { // The job had an error and did not complete. FAILED = 5; + + // The job is currently accepting findings via hybridInspect. + // A hybrid job in ACTIVE state may continue to have findings added to it + // through calling of hybridInspect. After the job has finished no more + // calls to hybridInspect may be made. ACTIVE jobs can transition to DONE. + ACTIVE = 6; } // The server-assigned name. @@ -2812,51 +3438,34 @@ message DlpJob { repeated Error errors = 11; } -// Operators available for comparing the value of fields. -enum RelationalOperator { - RELATIONAL_OPERATOR_UNSPECIFIED = 0; - - // Equal. Attempts to match even with incompatible types. - EQUAL_TO = 1; - - // Not equal to. Attempts to match even with incompatible types. - NOT_EQUAL_TO = 2; - - // Greater than. - GREATER_THAN = 3; - - // Less than. - LESS_THAN = 4; - - // Greater than or equals. - GREATER_THAN_OR_EQUALS = 5; - - // Less than or equals. - LESS_THAN_OR_EQUALS = 6; - - // Exists - EXISTS = 7; -} - // The request message for [DlpJobs.GetDlpJob][]. message GetDlpJobRequest { - // The name of the DlpJob resource. - string name = 1; + // Required. The name of the DlpJob resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } + ]; } // The request message for listing DLP jobs. message ListDlpJobsRequest { - // The parent resource name, for example projects/my-project-id. - string parent = 4; + // Required. The parent resource name, for example projects/my-project-id + // or projects/my-project-id/locations/{location_id}. + string parent = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; - // Optional. Allows filtering. + // Allows filtering. // // Supported syntax: // // * Filter expressions are made up of one or more restrictions. // * Restrictions can be combined by `AND` or `OR` logical operators. A // sequence of restrictions implicitly uses `AND`. - // * A restriction has the form of ` `. + // * A restriction has the form of `{field} {operator} {value}`. // * Supported fields/values for inspect jobs: // - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY @@ -2888,7 +3497,7 @@ message ListDlpJobsRequest { // The type of job. Defaults to `DlpJobType.INSPECT` DlpJobType type = 5; - // Optional comma separated list of fields to order by, + // Comma separated list of fields to order by, // followed by `asc` or `desc` postfix. This list is case-insensitive, // default sorting order is ascending, redundant space characters are // insignificant. @@ -2902,6 +3511,9 @@ message ListDlpJobsRequest { // - `name`: corresponds to job's name. // - `state`: corresponds to `state` string order_by = 6; + + // Deprecated. This field has no effect. + string location_id = 7; } // The response message for listing DLP jobs. @@ -2915,38 +3527,68 @@ message ListDlpJobsResponse { // The request message for canceling a DLP job. message CancelDlpJobRequest { - // The name of the DlpJob resource to be cancelled. - string name = 1; + // Required. The name of the DlpJob resource to be cancelled. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } + ]; +} + +// The request message for finishing a DLP hybrid job. +message FinishDlpJobRequest { + // Required. The name of the DlpJob resource to be cancelled. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } + ]; } // The request message for deleting a DLP job. message DeleteDlpJobRequest { - // The name of the DlpJob resource to be deleted. - string name = 1; + // Required. The name of the DlpJob resource to be deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } + ]; } // Request message for CreateDeidentifyTemplate. message CreateDeidentifyTemplateRequest { - // The parent resource name, for example projects/my-project-id or - // organizations/my-org-id. - string parent = 1; + // Required. The parent resource name, for example projects/my-project-id or + // organizations/my-org-id or projects/my-project-id/locations/{location_id}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; - // The DeidentifyTemplate to create. - DeidentifyTemplate deidentify_template = 2; + // Required. The DeidentifyTemplate to create. + DeidentifyTemplate deidentify_template = 2 + [(google.api.field_behavior) = REQUIRED]; // The template id can contain uppercase and lowercase letters, // numbers, and hyphens; that is, it must match the regular // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 // characters. Can be empty to allow the system to generate one. string template_id = 3; + + // Deprecated. This field has no effect. + string location_id = 4; } // Request message for UpdateDeidentifyTemplate. message UpdateDeidentifyTemplateRequest { - // Resource name of organization and deidentify template to be updated, for - // example `organizations/433245324/deidentifyTemplates/432452342` or + // Required. Resource name of organization and deidentify template to be + // updated, for example + // `organizations/433245324/deidentifyTemplates/432452342` or // projects/project-id/deidentifyTemplates/432452342. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; // New DeidentifyTemplate value. DeidentifyTemplate deidentify_template = 2; @@ -2957,27 +3599,37 @@ message UpdateDeidentifyTemplateRequest { // Request message for GetDeidentifyTemplate. message GetDeidentifyTemplateRequest { - // Resource name of the organization and deidentify template to be read, for - // example `organizations/433245324/deidentifyTemplates/432452342` or - // projects/project-id/deidentifyTemplates/432452342. - string name = 1; + // Required. Resource name of the organization and deidentify template to be + // read, for example `organizations/433245324/deidentifyTemplates/432452342` + // or projects/project-id/deidentifyTemplates/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; } // Request message for ListDeidentifyTemplates. message ListDeidentifyTemplatesRequest { - // The parent resource name, for example projects/my-project-id or - // organizations/my-org-id. - string parent = 1; + // Required. The parent resource name, for example projects/my-project-id or + // organizations/my-org-id or projects/my-project-id/locations/{location_id}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; - // Optional page token to continue retrieval. Comes from previous call + // Page token to continue retrieval. Comes from previous call // to `ListDeidentifyTemplates`. string page_token = 2; - // Optional size of the page, can be limited by server. If zero server returns + // Size of the page, can be limited by server. If zero server returns // a page of max size 100. int32 page_size = 3; - // Optional comma separated list of fields to order by, + // Comma separated list of fields to order by, // followed by `asc` or `desc` postfix. This list is case-insensitive, // default sorting order is ascending, redundant space characters are // insignificant. @@ -2991,6 +3643,9 @@ message ListDeidentifyTemplatesRequest { // - `name`: corresponds to template's name. // - `display_name`: corresponds to template's display name. string order_by = 4; + + // Deprecated. This field has no effect. + string location_id = 5; } // Response message for ListDeidentifyTemplates. @@ -3006,10 +3661,16 @@ message ListDeidentifyTemplatesResponse { // Request message for DeleteDeidentifyTemplate. message DeleteDeidentifyTemplateRequest { - // Resource name of the organization and deidentify template to be deleted, - // for example `organizations/433245324/deidentifyTemplates/432452342` or + // Required. Resource name of the organization and deidentify template to be + // deleted, for example + // `organizations/433245324/deidentifyTemplates/432452342` or // projects/project-id/deidentifyTemplates/432452342. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; } // Configuration for a custom dictionary created from a data source of any size @@ -3040,7 +3701,9 @@ message LargeCustomDictionaryStats { int64 approx_num_phrases = 1; } -// Configuration for a StoredInfoType. +// Configuration for stored infoTypes. All fields and subfield are provided +// by the user. For more information, see +// https://cloud.google.com/dlp/docs/creating-custom-infotypes. message StoredInfoTypeConfig { // Display name of the StoredInfoType (max 256 characters). string display_name = 1; @@ -3048,14 +3711,22 @@ message StoredInfoTypeConfig { // Description of the StoredInfoType (max 256 characters). string description = 2; + // Stored infotype types. oneof type { // StoredInfoType where findings are defined by a dictionary of phrases. LargeCustomDictionaryConfig large_custom_dictionary = 3; + + // Store dictionary-based CustomInfoType. + CustomInfoType.Dictionary dictionary = 4; + + // Store regular expression-based StoredInfoType. + CustomInfoType.Regex regex = 5; } } // Statistics for a StoredInfoType. message StoredInfoTypeStats { + // Stat types oneof type { // StoredInfoType where findings are defined by a dictionary of phrases. LargeCustomDictionaryStats large_custom_dictionary = 1; @@ -3080,10 +3751,12 @@ message StoredInfoTypeVersion { // anomalies detected in the storedInfoType data that render it unusable. Only // the five most recent errors will be displayed, with the most recent error // appearing first. - //

For example, some of the data for stored custom dictionaries is put in + // + // For example, some of the data for stored custom dictionaries is put in // the user's Google Cloud Storage bucket, and if this data is modified or // deleted by the user or another system, the dictionary becomes invalid. - //

If any errors occur, fix the problem indicated by the error message and + // + // If any errors occur, fix the problem indicated by the error message and // use the UpdateStoredInfoType API method to create another version of the // storedInfoType to continue using it, reusing the same `config` if it was // not the source of the error. @@ -3096,6 +3769,14 @@ message StoredInfoTypeVersion { // StoredInfoType resource message that contains information about the current // version and any pending updates. message StoredInfoType { + option (google.api.resource) = { + type: "dlp.googleapis.com/StoredInfoType" + pattern: "organizations/{organization}/storedInfoTypes/{stored_info_type}" + pattern: "projects/{project}/storedInfoTypes/{stored_info_type}" + pattern: "organizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}" + pattern: "projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}" + }; + // Resource name. string name = 1; @@ -3109,26 +3790,39 @@ message StoredInfoType { // Request message for CreateStoredInfoType. message CreateStoredInfoTypeRequest { - // The parent resource name, for example projects/my-project-id or - // organizations/my-org-id. - string parent = 1; + // Required. The parent resource name, for example projects/my-project-id or + // organizations/my-org-id or projects/my-project-id/locations/{location_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/StoredInfoType" + } + ]; - // Configuration of the storedInfoType to create. - StoredInfoTypeConfig config = 2; + // Required. Configuration of the storedInfoType to create. + StoredInfoTypeConfig config = 2 [(google.api.field_behavior) = REQUIRED]; // The storedInfoType ID can contain uppercase and lowercase letters, // numbers, and hyphens; that is, it must match the regular // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 // characters. Can be empty to allow the system to generate one. string stored_info_type_id = 3; + + // Deprecated. This field has no effect. + string location_id = 4; } // Request message for UpdateStoredInfoType. message UpdateStoredInfoTypeRequest { - // Resource name of organization and storedInfoType to be updated, for + // Required. Resource name of organization and storedInfoType to be updated, for // example `organizations/433245324/storedInfoTypes/432452342` or // projects/project-id/storedInfoTypes/432452342. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/StoredInfoType" + } + ]; // Updated configuration for the storedInfoType. If not provided, a new // version of the storedInfoType will be created with the existing @@ -3141,27 +3835,37 @@ message UpdateStoredInfoTypeRequest { // Request message for GetStoredInfoType. message GetStoredInfoTypeRequest { - // Resource name of the organization and storedInfoType to be read, for - // example `organizations/433245324/storedInfoTypes/432452342` or + // Required. Resource name of the organization and storedInfoType to be read, + // for example `organizations/433245324/storedInfoTypes/432452342` or // projects/project-id/storedInfoTypes/432452342. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/StoredInfoType" + } + ]; } // Request message for ListStoredInfoTypes. message ListStoredInfoTypesRequest { - // The parent resource name, for example projects/my-project-id or - // organizations/my-org-id. - string parent = 1; + // Required. The parent resource name, for example projects/my-project-id or + // organizations/my-org-id or projects/my-project-id/locations/{location_id}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/StoredInfoType" + } + ]; - // Optional page token to continue retrieval. Comes from previous call + // Page token to continue retrieval. Comes from previous call // to `ListStoredInfoTypes`. string page_token = 2; - // Optional size of the page, can be limited by server. If zero server returns + // Size of the page, can be limited by server. If zero server returns // a page of max size 100. int32 page_size = 3; - // Optional comma separated list of fields to order by, + // Comma separated list of fields to order by, // followed by `asc` or `desc` postfix. This list is case-insensitive, // default sorting order is ascending, redundant space characters are // insignificant. @@ -3176,6 +3880,9 @@ message ListStoredInfoTypesRequest { // - `name`: corresponds to resource name. // - `display_name`: corresponds to info type's display name. string order_by = 4; + + // Deprecated. This field has no effect. + string location_id = 5; } // Response message for ListStoredInfoTypes. @@ -3190,14 +3897,192 @@ message ListStoredInfoTypesResponse { // Request message for DeleteStoredInfoType. message DeleteStoredInfoTypeRequest { - // Resource name of the organization and storedInfoType to be deleted, for - // example `organizations/433245324/storedInfoTypes/432452342` or + // Required. Resource name of the organization and storedInfoType to be + // deleted, for example `organizations/433245324/storedInfoTypes/432452342` or // projects/project-id/storedInfoTypes/432452342. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/StoredInfoType" + } + ]; +} + +// Request to search for potentially sensitive info in a custom location. +message HybridInspectJobTriggerRequest { + // Required. Resource name of the trigger to execute a hybrid inspect on, for + // example `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } + ]; + + // The item to inspect. + HybridContentItem hybrid_item = 3; +} + +// Request to search for potentially sensitive info in a custom location. +message HybridInspectDlpJobRequest { + // Required. Resource name of the job to execute a hybrid inspect on, for + // example `projects/dlp-test-project/dlpJob/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } + ]; + + // The item to inspect. + HybridContentItem hybrid_item = 3; +} + +// An individual hybrid item to inspect. Will be stored temporarily during +// processing. +message HybridContentItem { + // The item to inspect. + ContentItem item = 1; + + // Supplementary information that will be added to each finding. + HybridFindingDetails finding_details = 2; +} + +// Populate to associate additional data with each finding. +message HybridFindingDetails { + // Details about the container where the content being inspected is from. + Container container_details = 1; + + // Offset in bytes of the line, from the beginning of the file, where the + // finding is located. Populate if the item being scanned is only part of a + // bigger item, such as a shard of a file and you want to track the absolute + // position of the finding. + int64 file_offset = 2; + + // Offset of the row for tables. Populate if the row(s) being scanned are + // part of a bigger dataset and you want to keep track of their absolute + // position. + int64 row_offset = 3; + + // If the container is a table, additional information to make findings + // meaningful such as the columns that are primary keys. If not known ahead + // of time, can also be set within each inspect hybrid call and the two + // will be merged. Note that identifying_fields will only be stored to + // BigQuery, and only if the BigQuery action has been included. + TableOptions table_options = 4; + + // Labels to represent user provided metadata about the data being inspected. + // If configured by the job, some key values may be required. + // The labels associated with `Finding`'s produced by hybrid + // inspection. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + // + // Label values must be between 0 and 63 characters long and must conform + // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + // + // No more than 10 labels can be associated with a given finding. + // + // Examples: + // * `"environment" : "production"` + // * `"pipeline" : "etl"` + map labels = 5; +} + +// Quota exceeded errors will be thrown once quota has been met. +message HybridInspectResponse { + +} + +// Operators available for comparing the value of fields. +enum RelationalOperator { + // Unused + RELATIONAL_OPERATOR_UNSPECIFIED = 0; + + // Equal. Attempts to match even with incompatible types. + EQUAL_TO = 1; + + // Not equal to. Attempts to match even with incompatible types. + NOT_EQUAL_TO = 2; + + // Greater than. + GREATER_THAN = 3; + + // Less than. + LESS_THAN = 4; + + // Greater than or equals. + GREATER_THAN_OR_EQUALS = 5; + + // Less than or equals. + LESS_THAN_OR_EQUALS = 6; + + // Exists + EXISTS = 7; +} + +// Type of the match which can be applied to different ways of matching, like +// Dictionary, regular expression and intersecting with findings of another +// info type. +enum MatchingType { + // Invalid. + MATCHING_TYPE_UNSPECIFIED = 0; + + // Full match. + // + // - Dictionary: join of Dictionary results matched complete finding quote + // - Regex: all regex matches fill a finding quote start to end + // - Exclude info type: completely inside affecting info types findings + MATCHING_TYPE_FULL_MATCH = 1; + + // Partial match. + // + // - Dictionary: at least one of the tokens in the finding matches + // - Regex: substring of the finding matches + // - Exclude info type: intersects with affecting info types findings + MATCHING_TYPE_PARTIAL_MATCH = 2; + + // Inverse match. + // + // - Dictionary: no tokens in the finding match the dictionary + // - Regex: finding doesn't match the regex + // - Exclude info type: no intersection with affecting info types findings + MATCHING_TYPE_INVERSE_MATCH = 3; +} + +// Options describing which parts of the provided content should be scanned. +enum ContentOption { + // Includes entire content of a file or a data stream. + CONTENT_UNSPECIFIED = 0; + + // Text content within the data, excluding any metadata. + CONTENT_TEXT = 1; + + // Images found in the data. + CONTENT_IMAGE = 2; +} + +// Type of metadata containing the finding. +enum MetadataType { + // Unused + METADATATYPE_UNSPECIFIED = 0; + + // General file metadata provided by GCS. + STORAGE_METADATA = 2; +} + +// Parts of the APIs which use certain infoTypes. +enum InfoTypeSupportedBy { + // Unused. + ENUM_TYPE_UNSPECIFIED = 0; + + // Supported by the inspect operations. + INSPECT = 1; + + // Supported by the risk analysis operations. + RISK_ANALYSIS = 2; } -// An enum to represent the various type of DLP jobs. +// An enum to represent the various types of DLP jobs. enum DlpJobType { + // Unused DLP_JOB_TYPE_UNSPECIFIED = 0; // The job inspected Google Cloud for sensitive data. @@ -3209,6 +4094,7 @@ enum DlpJobType { // State of a StoredInfoType version. enum StoredInfoTypeState { + // Unused STORED_INFO_TYPE_STATE_UNSPECIFIED = 0; // StoredInfoType version is being created. diff --git a/google/privacy/dlp/v2/dlp_gapic.legacy.yaml b/google/privacy/dlp/v2/dlp_gapic.legacy.yaml new file mode 100644 index 000000000..9357709f2 --- /dev/null +++ b/google/privacy/dlp/v2/dlp_gapic.legacy.yaml @@ -0,0 +1,566 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.dlp.v2 + python: + package_name: google.cloud.dlp_v2.gapic + go: + package_name: cloud.google.com/go/dlp/apiv2 + release_level: GA + csharp: + package_name: Google.Cloud.Dlp.V2 + ruby: + package_name: Google::Cloud::Dlp::V2 + php: + package_name: Google\Cloud\Dlp\V2 + nodejs: + package_name: dlp.v2 + domain_layer_location: google-cloud +collection_oneofs: +- oneof_name: deidentify_template_oneof + collection_names: + - organization_deidentify_template + - project_deidentify_template +- oneof_name: inspect_template_oneof + collection_names: + - organization_inspect_template + - project_inspect_template +- oneof_name: stored_info_type_oneof + collection_names: + - organization_stored_info_type + - project_stored_info_type +# A list of API interface configurations. +interfaces: +- name: google.privacy.dlp.v2.DlpService + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + collections: + - name_pattern: organizations/{organization} + entity_name: organization + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.OrganizationName + - name_pattern: organizations/{organization}/deidentifyTemplates/{deidentify_template} + entity_name: organization_deidentify_template + - name_pattern: projects/{project}/deidentifyTemplates/{deidentify_template} + entity_name: project_deidentify_template + - name_pattern: organizations/{organization}/inspectTemplates/{inspect_template} + entity_name: organization_inspect_template + - name_pattern: projects/{project}/inspectTemplates/{inspect_template} + entity_name: project_inspect_template + - name_pattern: projects/{project}/jobTriggers/{job_trigger} + entity_name: project_job_trigger + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + - name_pattern: projects/{project}/dlpJobs/{dlp_job} + entity_name: dlp_job + - name_pattern: organizations/{organization}/storedInfoTypes/{stored_info_type} + entity_name: organization_stored_info_type + - name_pattern: projects/{project}/storedInfoTypes/{stored_info_type} + entity_name: project_stored_info_type + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: InspectContent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 300000 + - name: RedactImage + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 300000 + - name: DeidentifyContent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 300000 + - name: ReidentifyContent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 300000 + - name: ListInfoTypes + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 300000 + - name: CreateInspectTemplate + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: organization + timeout_millis: 300000 + - name: UpdateInspectTemplate + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: inspect_template_oneof + timeout_millis: 300000 + - name: GetInspectTemplate + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: inspect_template_oneof + timeout_millis: 300000 + - name: ListInspectTemplates + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: inspect_templates + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: organization + timeout_millis: 300000 + - name: DeleteInspectTemplate + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: inspect_template_oneof + timeout_millis: 300000 + - name: CreateDeidentifyTemplate + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: organization + timeout_millis: 300000 + - name: UpdateDeidentifyTemplate + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: deidentify_template_oneof + timeout_millis: 300000 + - name: GetDeidentifyTemplate + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: deidentify_template_oneof + timeout_millis: 300000 + - name: ListDeidentifyTemplates + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: deidentify_templates + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: organization + timeout_millis: 300000 + - name: DeleteDeidentifyTemplate + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: deidentify_template_oneof + timeout_millis: 300000 + - name: CreateDlpJob + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 300000 + - name: ListDlpJobs + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: jobs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 300000 + - name: GetDlpJob + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: dlp_job + timeout_millis: 300000 + - name: DeleteDlpJob + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: dlp_job + timeout_millis: 300000 + - name: CancelDlpJob + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: dlp_job + timeout_millis: 300000 + - name: FinishDlpJob + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: dlp_job + timeout_millis: 300000 + - name: HybridInspectDlpJob + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 300000 + - name: ListJobTriggers + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: job_triggers + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 300000 + - name: GetJobTrigger + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: project_job_trigger + timeout_millis: 300000 + - name: DeleteJobTrigger + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 300000 + - name: ActivateJobTrigger + surface_treatments: + - include_languages: + - go + - java + - csharp + - ruby + - nodejs + - python + - php + visibility: DISABLED + - name: HybridInspectJobTrigger + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 300000 + - name: UpdateJobTrigger + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: project_job_trigger + timeout_millis: 300000 + - name: CreateJobTrigger + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 300000 + + - name: CreateStoredInfoType + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: organization + timeout_millis: 300000 + - name: UpdateStoredInfoType + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: stored_info_type_oneof + timeout_millis: 300000 + - name: GetStoredInfoType + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: stored_info_type_oneof + timeout_millis: 300000 + - name: ListStoredInfoTypes + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: stored_info_types + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: organization + timeout_millis: 300000 + - name: DeleteStoredInfoType + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: stored_info_type_oneof + timeout_millis: 300000 + +resource_name_generation: +- message_name: InspectContentRequest + field_entity_map: + parent: project +- message_name: RedactImageRequest + field_entity_map: + parent: project +- message_name: DeidentifyContentRequest + field_entity_map: + parent: project +- message_name: ReidentifyContentRequest + field_entity_map: + parent: project +- message_name: CreateInspectTemplateRequest + field_entity_map: + parent: organization +- message_name: UpdateInspectTemplateRequest + field_entity_map: + name: inspect_template_oneof +- message_name: GetInspectTemplateRequest + field_entity_map: + name: inspect_template_oneof +- message_name: ListInspectTemplatesRequest + field_entity_map: + parent: organization +- message_name: DeleteInspectTemplateRequest + field_entity_map: + name: inspect_template_oneof +- message_name: CreateDeidentifyTemplateRequest + field_entity_map: + parent: organization +- message_name: UpdateDeidentifyTemplateRequest + field_entity_map: + name: deidentify_template_oneof +- message_name: GetDeidentifyTemplateRequest + field_entity_map: + name: deidentify_template_oneof +- message_name: ListDeidentifyTemplatesRequest + field_entity_map: + parent: organization +- message_name: DeleteDeidentifyTemplateRequest + field_entity_map: + name: deidentify_template_oneof +- message_name: CreateJobTriggerRequest + field_entity_map: + parent: project +- message_name: UpdateJobTriggerRequest + field_entity_map: + name: project_job_trigger +- message_name: GetJobTriggerRequest + field_entity_map: + name: project_job_trigger +- message_name: ListJobTriggersRequest + field_entity_map: + parent: project +- message_name: DeleteJobTriggerRequest + field_entity_map: + name: project_job_trigger +- message_name: CreateDlpJobRequest + field_entity_map: + parent: project +- message_name: ListDlpJobsRequest + field_entity_map: + parent: project +- message_name: GetDlpJobRequest + field_entity_map: + name: dlp_job +- message_name: DeleteDlpJobRequest + field_entity_map: + name: dlp_job +- message_name: CancelDlpJobRequest + field_entity_map: + name: dlp_job +- message_name: FinishDlpJobRequest + field_entity_map: + name: dlp_job +- message_name: CreateStoredInfoTypeRequest + field_entity_map: + parent: organization +- message_name: UpdateStoredInfoTypeRequest + field_entity_map: + name: stored_info_type_oneof +- message_name: GetStoredInfoTypeRequest + field_entity_map: + name: stored_info_type_oneof +- message_name: ListStoredInfoTypesRequest + field_entity_map: + parent: organization +- message_name: DeleteStoredInfoTypeRequest + field_entity_map: + name: stored_info_type_oneof diff --git a/google/privacy/dlp/v2/dlp_gapic.yaml b/google/privacy/dlp/v2/dlp_gapic.yaml index 12b514849..8eaa16599 100644 --- a/google/privacy/dlp/v2/dlp_gapic.yaml +++ b/google/privacy/dlp/v2/dlp_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.dlp.v2 @@ -17,38 +17,9 @@ language_settings: nodejs: package_name: dlp.v2 domain_layer_location: google-cloud -collection_oneofs: -- oneof_name: deidentify_template_oneof - collection_names: - - organization_deidentify_template - - project_deidentify_template -- oneof_name: inspect_template_oneof - collection_names: - - organization_inspect_template - - project_inspect_template -- oneof_name: stored_info_type_oneof - collection_names: - - organization_stored_info_type - - project_stored_info_type -# A list of API interface configurations. interfaces: - name: google.privacy.dlp.v2.DlpService - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - collections: - - name_pattern: organizations/{organization} - entity_name: organization - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.OrganizationName + deprecated_collections: - name_pattern: organizations/{organization}/deidentifyTemplates/{deidentify_template} entity_name: organization_deidentify_template - name_pattern: projects/{project}/deidentifyTemplates/{deidentify_template} @@ -57,315 +28,110 @@ interfaces: entity_name: organization_inspect_template - name_pattern: projects/{project}/inspectTemplates/{inspect_template} entity_name: project_inspect_template - - name_pattern: projects/{project}/jobTriggers/{job_trigger} - entity_name: project_job_trigger - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - - name_pattern: projects/{project}/dlpJobs/{dlp_job} - entity_name: dlp_job - name_pattern: organizations/{organization}/storedInfoTypes/{stored_info_type} entity_name: organization_stored_info_type - name_pattern: projects/{project}/storedInfoTypes/{stored_info_type} entity_name: project_stored_info_type - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. + - name_pattern: projects/{project}/jobTriggers/{job_trigger} + entity_name: project_job_trigger methods: - name: InspectContent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - parent: project timeout_millis: 300000 - name: RedactImage - required_fields: - - parent - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - parent: project timeout_millis: 300000 - name: DeidentifyContent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - parent: project timeout_millis: 300000 - name: ReidentifyContent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - parent: project timeout_millis: 300000 - name: ListInfoTypes retry_codes_name: idempotent retry_params_name: default timeout_millis: 300000 - name: CreateInspectTemplate - required_fields: - - parent - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - parent: organization timeout_millis: 300000 - name: UpdateInspectTemplate - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - name: inspect_template_oneof timeout_millis: 300000 - name: GetInspectTemplate - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: inspect_template_oneof timeout_millis: 300000 - name: ListInspectTemplates - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: inspect_templates retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - parent: organization timeout_millis: 300000 - name: DeleteInspectTemplate - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: inspect_template_oneof timeout_millis: 300000 - name: CreateDeidentifyTemplate - required_fields: - - parent - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - parent: organization timeout_millis: 300000 - name: UpdateDeidentifyTemplate - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - name: deidentify_template_oneof timeout_millis: 300000 - name: GetDeidentifyTemplate - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: deidentify_template_oneof timeout_millis: 300000 - name: ListDeidentifyTemplates - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: deidentify_templates retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - parent: organization timeout_millis: 300000 - name: DeleteDeidentifyTemplate - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: deidentify_template_oneof timeout_millis: 300000 - name: CreateDlpJob - required_fields: - - parent - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - parent: project timeout_millis: 300000 - name: ListDlpJobs - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: jobs retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - parent: project timeout_millis: 300000 - name: GetDlpJob - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: dlp_job timeout_millis: 300000 - name: DeleteDlpJob - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: dlp_job timeout_millis: 300000 - name: CancelDlpJob - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - name: dlp_job + timeout_millis: 300000 + - name: FinishDlpJob + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 300000 + - name: HybridInspectDlpJob + retry_codes_name: non_idempotent + retry_params_name: default timeout_millis: 300000 - name: ListJobTriggers - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: job_triggers retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - parent: project timeout_millis: 300000 - name: GetJobTrigger - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: project_job_trigger timeout_millis: 300000 - name: DeleteJobTrigger - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default timeout_millis: 300000 @@ -380,163 +146,35 @@ interfaces: - python - php visibility: DISABLED + - name: HybridInspectJobTrigger + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 300000 - name: UpdateJobTrigger - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - name: project_job_trigger timeout_millis: 300000 - name: CreateJobTrigger - required_fields: - - parent - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - parent: project timeout_millis: 300000 - - name: CreateStoredInfoType - required_fields: - - parent - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - parent: organization timeout_millis: 300000 - name: UpdateStoredInfoType - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - name: stored_info_type_oneof timeout_millis: 300000 - name: GetStoredInfoType - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: stored_info_type_oneof timeout_millis: 300000 - name: ListStoredInfoTypes - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: stored_info_types retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - parent: organization timeout_millis: 300000 - name: DeleteStoredInfoType - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: stored_info_type_oneof - timeout_millis: 300000 - -resource_name_generation: -- message_name: InspectContentRequest - field_entity_map: - parent: project -- message_name: RedactImageRequest - field_entity_map: - parent: project -- message_name: DeidentifyContentRequest - field_entity_map: - parent: project -- message_name: ReidentifyContentRequest - field_entity_map: - parent: project -- message_name: CreateInspectTemplateRequest - field_entity_map: - parent: organization -- message_name: UpdateInspectTemplateRequest - field_entity_map: - name: inspect_template_oneof -- message_name: GetInspectTemplateRequest - field_entity_map: - name: inspect_template_oneof -- message_name: ListInspectTemplatesRequest - field_entity_map: - parent: organization -- message_name: DeleteInspectTemplateRequest - field_entity_map: - name: inspect_template_oneof -- message_name: CreateDeidentifyTemplateRequest - field_entity_map: - parent: organization -- message_name: UpdateDeidentifyTemplateRequest - field_entity_map: - name: deidentify_template_oneof -- message_name: GetDeidentifyTemplateRequest - field_entity_map: - name: deidentify_template_oneof -- message_name: ListDeidentifyTemplatesRequest - field_entity_map: - parent: organization -- message_name: DeleteDeidentifyTemplateRequest - field_entity_map: - name: deidentify_template_oneof -- message_name: CreateJobTriggerRequest - field_entity_map: - parent: project -- message_name: UpdateJobTriggerRequest - field_entity_map: - name: project_job_trigger -- message_name: GetJobTriggerRequest - field_entity_map: - name: project_job_trigger -- message_name: ListJobTriggersRequest - field_entity_map: - parent: project -- message_name: DeleteJobTriggerRequest - field_entity_map: - name: project_job_trigger -- message_name: CreateDlpJobRequest - field_entity_map: - parent: project -- message_name: ListDlpJobsRequest - field_entity_map: - parent: project -- message_name: GetDlpJobRequest - field_entity_map: - name: dlp_job -- message_name: DeleteDlpJobRequest - field_entity_map: - name: dlp_job -- message_name: CancelDlpJobRequest - field_entity_map: - name: dlp_job -- message_name: CreateStoredInfoTypeRequest - field_entity_map: - parent: organization -- message_name: UpdateStoredInfoTypeRequest - field_entity_map: - name: stored_info_type_oneof -- message_name: GetStoredInfoTypeRequest - field_entity_map: - name: stored_info_type_oneof -- message_name: ListStoredInfoTypesRequest - field_entity_map: - parent: organization -- message_name: DeleteStoredInfoTypeRequest - field_entity_map: - name: stored_info_type_oneof + timeout_millis: 300000 diff --git a/google/privacy/dlp/v2/dlp_grpc_service_config.json b/google/privacy/dlp/v2/dlp_grpc_service_config.json new file mode 100755 index 000000000..e2017e244 --- /dev/null +++ b/google/privacy/dlp/v2/dlp_grpc_service_config.json @@ -0,0 +1,160 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "InspectContent" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "RedactImage" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "DeidentifyContent" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "ReidentifyContent" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "ListInfoTypes" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "GetInspectTemplate" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "ListInspectTemplates" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "DeleteInspectTemplate" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "GetDeidentifyTemplate" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "ListDeidentifyTemplates" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "DeleteDeidentifyTemplate" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "ListDlpJobs" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "GetDlpJob" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "DeleteDlpJob" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "ListJobTriggers" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "GetJobTrigger" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "DeleteJobTrigger" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "GetStoredInfoType" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "ListStoredInfoTypes" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "DeleteStoredInfoType" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "FinishDlpJob" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "HybridInspectDlpJob" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "HybridInspectJobTrigger" + } + ], + "timeout": "300s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxAttempts": 5, + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "CreateInspectTemplate" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "UpdateInspectTemplate" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "CreateDeidentifyTemplate" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "UpdateDeidentifyTemplate" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "CreateDlpJob" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "CancelDlpJob" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "UpdateJobTrigger" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "CreateJobTrigger" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "CreateStoredInfoType" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "UpdateStoredInfoType" + }, + { + "service": "google.privacy.dlp.v2.DlpService", + "method": "ActivateJobTrigger" + } + ], + "timeout": "300s" + } + ] +} diff --git a/google/privacy/dlp/dlp_v2.yaml b/google/privacy/dlp/v2/dlp_v2.yaml similarity index 100% rename from google/privacy/dlp/dlp_v2.yaml rename to google/privacy/dlp/v2/dlp_v2.yaml diff --git a/google/privacy/dlp/v2/storage.proto b/google/privacy/dlp/v2/storage.proto index c2f38a613..9408d6de7 100644 --- a/google/privacy/dlp/v2/storage.proto +++ b/google/privacy/dlp/v2/storage.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.privacy.dlp.v2; -import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Dlp.V2"; @@ -26,6 +25,7 @@ option java_multiple_files = true; option java_outer_classname = "DlpStorage"; option java_package = "com.google.privacy.dlp.v2"; option php_namespace = "Google\\Cloud\\Dlp\\V2"; +option ruby_package = "Google::Cloud::Dlp::V2"; // Type of information detected by the API. message InfoType { @@ -33,7 +33,7 @@ message InfoType { // creating a CustomInfoType, or one of the names listed // at https://cloud.google.com/dlp/docs/infotypes-reference when specifying // a built-in type. InfoType names should conform to the pattern - // [a-zA-Z0-9_]{1,64}. + // `[a-zA-Z0-9_]{1,64}`. string name = 1; } @@ -393,6 +393,9 @@ message CloudStorageOptions { // If empty, all files are scanned and available data format processors // are applied. In addition, the binary content of the selected files // is always scanned as well. + // Images are scanned only as binary if the specified region + // does not support image inspection and no file_types were specified. + // Image inspection is restricted to 'global', 'us', 'asia', and 'europe'. repeated FileType file_types = 5; SampleMethod sample_method = 6; @@ -435,8 +438,11 @@ message BigQueryOptions { // Complete BigQuery table reference. BigQueryTable table_reference = 1; - // References to fields uniquely identifying rows within the table. - // Nested fields in the format, like `person.birthdate.year`, are allowed. + // Table fields that may uniquely identify a row within the table. When + // `actions.saveFindings.outputConfig.table` is specified, the values of + // columns specified here are available in the output table under + // `location.content_locations.record_location.record_key.id_values`. Nested + // fields such as `person.birthdate.year` are allowed. repeated FieldId identifying_fields = 2; // Max number of rows to scan. If the table has more rows than this value, the @@ -472,14 +478,19 @@ message StorageConfig { google.protobuf.Timestamp end_time = 2; // Specification of the field containing the timestamp of scanned items. - // Used for data sources like Datastore or BigQuery. - // If not specified for BigQuery, table last modification timestamp - // is checked against given time span. - // The valid data types of the timestamp field are: - // for BigQuery - timestamp, date, datetime; - // for Datastore - timestamp. - // Datastore entity will be scanned if the timestamp property does not exist - // or its value is empty or invalid. + // Used for data sources like Datastore and BigQuery. + // + // For BigQuery: + // Required to filter out rows based on the given start and + // end times. If not specified and the table was modified between the given + // start and end times, the entire table will be scanned. + // The valid data types of the timestamp field are: `INTEGER`, `DATE`, + // `TIMESTAMP`, or `DATETIME` BigQuery column. + // + // For Datastore. + // Valid data types of the timestamp field are: `TIMESTAMP`. + // Datastore entity will be scanned if the timestamp property does not + // exist or its value is empty or invalid. FieldId timestamp_field = 3; // When the job is started by a JobTrigger we will automatically figure out @@ -490,14 +501,20 @@ message StorageConfig { } oneof type { - // Google Cloud Datastore options specification. + // Google Cloud Datastore options. DatastoreOptions datastore_options = 2; - // Google Cloud Storage options specification. + // Google Cloud Storage options. CloudStorageOptions cloud_storage_options = 3; - // BigQuery options specification. + // BigQuery options. BigQueryOptions big_query_options = 4; + + // Hybrid inspection options. + // Early access feature is in a pre-release state and might change or have + // limited support. For more information, see + // https://cloud.google.com/products#product-launch-stages. + HybridOptions hybrid_options = 9; } TimespanConfig timespan_config = 6; @@ -522,20 +539,69 @@ enum FileType { // Included file extensions: // bmp, gif, jpg, jpeg, jpe, png. // bytes_limit_per_file has no effect on image files. + // Image inspection is restricted to 'global', 'us', 'asia', and 'europe'. IMAGE = 3; + // Included file extensions: + // docx, dotx, docm, dotm + WORD = 5; + + // Included file extensions: + // pdf + PDF = 6; + // Included file extensions: // avro AVRO = 7; } +// Configuration to control jobs where the content being inspected is outside +// of Google Cloud Platform. +message HybridOptions { + // A short description of where the data is coming from. Will be stored once + // in the job. 256 max length. + string description = 1; + + // These are labels that each inspection request must include within their + // 'finding_labels' map. Request may contain others, but any missing one of + // these will be rejected. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + // + // No more than 10 keys can be required. + repeated string required_finding_label_keys = 2; + + // To organize findings, these labels will be added to each finding. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + // + // Label values must be between 0 and 63 characters long and must conform + // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + // + // No more than 10 labels can be associated with a given finding. + // + // Examples: + // * `"environment" : "production"` + // * `"pipeline" : "etl"` + map labels = 3; + + // If the container is a table, additional information to make findings + // meaningful such as the columns that are primary keys. + TableOptions table_options = 4; +} + // Row key for identifying a record in BigQuery table. message BigQueryKey { // Complete BigQuery table reference. BigQueryTable table_reference = 1; - // Absolute number of the row from the beginning of the table at the time - // of scanning. + // Row number inferred at the time the table was scanned. This value is + // nondeterministic, cannot be queried, and may be null for inspection + // jobs. To locate findings within a table, specify + // `inspect_job.storage_config.big_query_options.identifying_fields` in + // `CreateDlpJobRequest`. int64 row_number = 2; } @@ -602,7 +668,7 @@ message RecordKey { } // Values of identifying columns in the given row. Order of values matches - // the order of field identifiers specified in the scanning request. + // the order of `identifying_fields` specified in the scanning request. repeated string id_values = 5; } @@ -641,3 +707,12 @@ message EntityId { // Composite key indicating which field contains the entity identifier. FieldId field = 1; } + +// Instructions regarding the table content being inspected. +message TableOptions { + // The columns that are the primary keys for table objects included in + // ContentItem. A copy of this cell's value will stored alongside alongside + // each finding so that the finding can be traced to the specific row it came + // from. No more than 3 may be provided. + repeated FieldId identifying_fields = 1; +} diff --git a/google/pubsub/artman_pubsub.yaml b/google/pubsub/artman_pubsub.yaml index 5ca885a93..0d354412c 100644 --- a/google/pubsub/artman_pubsub.yaml +++ b/google/pubsub/artman_pubsub.yaml @@ -2,7 +2,7 @@ common: api_name: pubsub api_version: v1 organization_name: google-cloud - service_yaml: pubsub.yaml + service_yaml: v1/pubsub_v1.yaml gapic_yaml: v1/pubsub_gapic.yaml src_proto_paths: - v1 diff --git a/google/pubsub/pubsub.yaml b/google/pubsub/pubsub.yaml deleted file mode 100644 index 77cc84c4b..000000000 --- a/google/pubsub/pubsub.yaml +++ /dev/null @@ -1,67 +0,0 @@ -type: google.api.Service -config_version: 3 -name: pubsub.googleapis.com -title: Google Cloud Pub/Sub API - -apis: -- name: google.pubsub.v1.Publisher -- name: google.pubsub.v1.Subscriber - -documentation: - summary: |- - Provides reliable, many-to-many, asynchronous messaging between - applications. - rules: - - selector: > - google.pubsub.v1.Topic.name, - description: | - The name of the topic. It must have the format - `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, - and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), - underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent - signs (`%`). It must be between 3 and 255 characters in length, and it - must not start with `"goog"`. - - selector: > - google.pubsub.v1.Subscription.name, - description: | - The name of the subscription. It must have the format - `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must - start with a letter, and contain only letters (`[A-Za-z]`), numbers - (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), - plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters - in length, and it must not start with `"goog"` - -http: - rules: - - selector: google.iam.v1.IAMPolicy.SetIamPolicy - post: '/v1/{resource=projects/*/topics/*}:setIamPolicy' - body: '*' - additional_bindings: - - post: '/v1/{resource=projects/*/subscriptions/*}:setIamPolicy' - body: '*' - - post: '/v1/{resource=projects/*/snapshots/*}:setIamPolicy' - body: '*' - - - selector: google.iam.v1.IAMPolicy.GetIamPolicy - get: '/v1/{resource=projects/*/topics/*}:getIamPolicy' - additional_bindings: - - get: '/v1/{resource=projects/*/subscriptions/*}:getIamPolicy' - - get: '/v1/{resource=projects/*/snapshots/*}:getIamPolicy' - - - selector: google.iam.v1.IAMPolicy.TestIamPermissions - post: '/v1/{resource=projects/*/subscriptions/*}:testIamPermissions' - body: '*' - additional_bindings: - - post: '/v1/{resource=projects/*/topics/*}:testIamPermissions' - body: '*' - - post: '/v1/{resource=projects/*/snapshots/*}:testIamPermissions' - body: '*' - - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/pubsub diff --git a/google/pubsub/v1/BUILD.bazel b/google/pubsub/v1/BUILD.bazel index acd485b0f..0185b6853 100644 --- a/google/pubsub/v1/BUILD.bazel +++ b/google/pubsub/v1/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -11,6 +13,8 @@ proto_library( srcs = ["pubsub.proto"], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/api:resource_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:empty_proto", @@ -23,6 +27,7 @@ proto_library_with_info( name = "pubsub_proto_with_info", deps = [ ":pubsub_proto", + "//google/cloud:common_resources_proto", "//google/iam/v1:iam_policy_proto", "//google/iam/v1:policy_proto", ], @@ -33,19 +38,14 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", - "@com_google_api_grpc_proto_google_iam_v1//jar", -] - java_proto_library( name = "pubsub_java_proto", deps = [":pubsub_proto"], @@ -54,53 +54,113 @@ java_proto_library( java_grpc_library( name = "pubsub_java_grpc", srcs = [":pubsub_proto"], - deps = [":pubsub_java_proto"] + _JAVA_GRPC_DEPS, + deps = [":pubsub_java_proto"], ) java_resource_name_proto_library( - name = "pubsub_resource_name_java_proto", + name = "pubsub_java_gapic_resource_name", gapic_yaml = "pubsub_gapic.yaml", - deps = [":pubsub_proto"], + deps = [ + ":pubsub_proto", + "//google/cloud:common_resources_proto", + ], ) java_gapic_library( name = "pubsub_java_gapic", src = ":pubsub_proto_with_info", gapic_yaml = "pubsub_gapic.yaml", - service_yaml = "//google/pubsub:pubsub.yaml", + gen_resource_name = False, + service_yaml = ":pubsub_v1.yaml", test_deps = [ ":pubsub_java_grpc", - "@com_google_api_grpc_grpc_google_iam_v1//jar", + "//google/iam/v1:iam_java_grpc", ], deps = [ + ":pubsub_java_gapic_resource_name", ":pubsub_java_proto", - ":pubsub_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + "//google/iam/v1:iam_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, +java_gapic_test( + name = "pubsub_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.pubsub.v1.SubscriptionAdminClientTest", + "com.google.cloud.pubsub.v1.TopicAdminClientTest", + ], runtime_deps = [":pubsub_java_gapic_test"], -) for test_name in [ - "com.google.cloud.pubsub.v1.SubscriptionAdminClientTest", - "com.google.cloud.pubsub.v1.TopicAdminClientTest", -]] +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-pubsub-v1-java", - client_deps = [":pubsub_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":pubsub_java_gapic_test"], - grpc_deps = [":pubsub_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":pubsub_java_gapic", + ":pubsub_java_gapic_resource_name", + ":pubsub_java_grpc", ":pubsub_java_proto", ":pubsub_proto", - ":pubsub_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_proto_library", + "py_grpc_library", + "py_gapic_library", + "py_gapic_assembly_pkg", +) + +moved_proto_library( + name = "pubsub_moved_proto", + srcs = [":pubsub_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "pubsub_py_proto", + deps = [":pubsub_moved_proto"], + plugin = "@protoc_docs_plugin//:docs_plugin", +) + +py_grpc_library( + name = "pubsub_py_grpc", + srcs = [":pubsub_moved_proto"], + deps = [":pubsub_py_proto"], +) + +py_gapic_library( + name = "pubsub_py_gapic", + src = ":pubsub_proto_with_info", + gapic_yaml = "pubsub_gapic.yaml", + service_yaml = ":pubsub_v1.yaml", + deps = [ + ":pubsub_py_proto", + ":pubsub_py_grpc" + ], +) + +py_gapic_assembly_pkg( + name = "pubsub-v1-py", + deps = [ + ":pubsub_py_gapic", + ":pubsub_py_grpc", + ":pubsub_py_proto", + ], ) ############################################################################## @@ -108,10 +168,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -124,11 +184,14 @@ go_proto_library( go_gapic_library( name = "pubsub_go_gapic", - src = ":pubsub_proto_with_info", - gapic_yaml = "pubsub_gapic.yaml", - importpath = "cloud.google.com/go/pubsub/apiv1", - service_yaml = "//google/pubsub:pubsub.yaml", - deps = [":pubsub_go_proto"], + srcs = [":pubsub_proto_with_info"], + grpc_service_config = "pubsub_grpc_service_config.json", + importpath = "cloud.google.com/go/pubsub/apiv1;pubsub", + service_yaml = ":pubsub_v1.yaml", + deps = [ + ":pubsub_go_proto", + "//google/iam/v1:iam_go_proto", + ], ) go_test( @@ -139,12 +202,11 @@ go_test( deps = ["//google/iam/v1:iam_go_proto"], ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-pubsub-v1-go", deps = [ ":pubsub_go_gapic", - ":pubsub_go_gapic_srcjar-smoke-test.srcjar", ":pubsub_go_gapic_srcjar-test.srcjar", ":pubsub_go_proto", ], @@ -155,10 +217,10 @@ go_gapic_assembly_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "php_proto_library", - "php_grpc_library", - "php_gapic_library", "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", ) php_proto_library( @@ -176,14 +238,14 @@ php_gapic_library( name = "pubsub_php_gapic", src = ":pubsub_proto_with_info", gapic_yaml = "pubsub_gapic.yaml", - service_yaml = "//google/pubsub:pubsub.yaml", + service_yaml = ":pubsub_v1.yaml", deps = [ ":pubsub_php_grpc", ":pubsub_php_proto", ], ) -# Opensource Packages +# Open Source Packages php_gapic_assembly_pkg( name = "google-cloud-pubsub-v1-php", deps = [ @@ -198,15 +260,15 @@ php_gapic_assembly_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "nodejs_gapic_library", "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", ) nodejs_gapic_library( name = "pubsub_nodejs_gapic", src = ":pubsub_proto_with_info", gapic_yaml = "pubsub_gapic.yaml", - service_yaml = "//google/pubsub:pubsub.yaml", + service_yaml = ":pubsub_v1.yaml", deps = [], ) @@ -217,3 +279,110 @@ nodejs_gapic_assembly_pkg( ":pubsub_proto", ], ) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "pubsub_ruby_proto", + deps = [":pubsub_proto"], +) + +ruby_grpc_library( + name = "pubsub_ruby_grpc", + srcs = [":pubsub_proto"], + deps = [":pubsub_ruby_proto"], +) + +ruby_gapic_library( + name = "pubsub_ruby_gapic", + src = ":pubsub_proto_with_info", + gapic_yaml = "pubsub_gapic.yaml", + service_yaml = ":pubsub_v1.yaml", + deps = [ + ":pubsub_ruby_grpc", + ":pubsub_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-pubsub-v1-ruby", + deps = [ + ":pubsub_ruby_gapic", + ":pubsub_ruby_grpc", + ":pubsub_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "pubsub_csharp_proto", + deps = [":pubsub_proto"], +) + +csharp_grpc_library( + name = "pubsub_csharp_grpc", + srcs = [":pubsub_proto"], + deps = [":pubsub_csharp_proto"], +) + +csharp_gapic_library( + name = "pubsub_csharp_gapic", + src = ":pubsub_proto_with_info", + gapic_yaml = "pubsub_gapic.yaml", + service_yaml = ":pubsub_v1.yaml", + deps = [ + ":pubsub_csharp_grpc", + ":pubsub_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-pubsub-v1-csharp", + deps = [ + ":pubsub_csharp_gapic", + ":pubsub_csharp_grpc", + ":pubsub_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "pubsub_cc_proto", + deps = [":pubsub_proto"], +) + +cc_grpc_library( + name = "pubsub_cc_grpc", + srcs = [":pubsub_proto"], + grpc_only = True, + deps = [":pubsub_cc_proto"], +) diff --git a/google/pubsub/v1/pubsub.proto b/google/pubsub/v1/pubsub.proto index 7cea47b1e..a42d03220 100644 --- a/google/pubsub/v1/pubsub.proto +++ b/google/pubsub/v1/pubsub.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.pubsub.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; @@ -36,6 +37,11 @@ option ruby_package = "Google::Cloud::PubSub::V1"; // The service that an application uses to manipulate topics, and to send // messages to a topic. service Publisher { + option (google.api.default_host) = "pubsub.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/pubsub"; + // Creates the given topic with the given name. See the // // resource name rules. @@ -44,6 +50,7 @@ service Publisher { put: "/v1/{name=projects/*/topics/*}" body: "*" }; + option (google.api.method_signature) = "name"; } // Updates an existing topic. Note that certain properties of a @@ -62,6 +69,7 @@ service Publisher { post: "/v1/{topic=projects/*/topics/*}:publish" body: "*" }; + option (google.api.method_signature) = "topic,messages"; } // Gets the configuration of a topic. @@ -69,6 +77,7 @@ service Publisher { option (google.api.http) = { get: "/v1/{topic=projects/*/topics/*}" }; + option (google.api.method_signature) = "topic"; } // Lists matching topics. @@ -76,6 +85,7 @@ service Publisher { option (google.api.http) = { get: "/v1/{project=projects/*}/topics" }; + option (google.api.method_signature) = "project"; } // Lists the names of the subscriptions on this topic. @@ -84,6 +94,7 @@ service Publisher { option (google.api.http) = { get: "/v1/{topic=projects/*/topics/*}/subscriptions" }; + option (google.api.method_signature) = "topic"; } // Lists the names of the snapshots on this topic. Snapshots are used in @@ -97,6 +108,7 @@ service Publisher { option (google.api.http) = { get: "/v1/{topic=projects/*/topics/*}/snapshots" }; + option (google.api.method_signature) = "topic"; } // Deletes the topic with the given name. Returns `NOT_FOUND` if the topic @@ -108,48 +120,48 @@ service Publisher { option (google.api.http) = { delete: "/v1/{topic=projects/*/topics/*}" }; + option (google.api.method_signature) = "topic"; } } message MessageStoragePolicy { - // The list of GCP region IDs where messages that are published to the topic + // A list of IDs of GCP regions where messages that are published to the topic // may be persisted in storage. Messages published by publishers running in // non-allowed GCP regions (or running outside of GCP altogether) will be - // routed for storage in one of the allowed regions. An empty list indicates a - // misconfiguration at the project or organization level, which will result in - // all Publish operations failing. + // routed for storage in one of the allowed regions. An empty list means that + // no regions are allowed, and is not a valid configuration. repeated string allowed_persistence_regions = 1; } // A topic resource. message Topic { - // The name of the topic. It must have the format + option (google.api.resource) = { + type: "pubsub.googleapis.com/Topic" + pattern: "projects/{project}/topics/{topic}" + pattern: "_deleted-topic_" + }; + + // Required. The name of the topic. It must have the format // `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, // and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), // underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent // signs (`%`). It must be between 3 and 255 characters in length, and it // must not start with `"goog"`. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // See Creating and // managing labels. map labels = 2; - // Policy constraining how messages published to the topic may be stored. It - // is determined when the topic is created based on the policy configured at - // the project level. It must not be set by the caller in the request to - // CreateTopic or to UpdateTopic. This field will be populated in the - // responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the - // response, then no constraints are in effect. + // Policy constraining the set of Google Cloud Platform regions where messages + // published to the topic may be stored. If not present, then no constraints + // are in effect. MessageStoragePolicy message_storage_policy = 3; // The resource name of the Cloud KMS CryptoKey to be used to protect access // to messages published on this topic. // // The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - // EXPERIMENTAL: This feature is part of a closed alpha release. This - // API might be changed in backward-incompatible ways and is not recommended - // for production use. It is not subject to any SLA or deprecation policy. string kms_key_name = 5; } @@ -166,7 +178,8 @@ message PubsubMessage { // at least one attribute. bytes data = 1; - // Optional attributes for this message. + // Attributes for this message. If this field is empty, the message must + // contain non-empty data. map attributes = 2; // ID of this message, assigned by the server when the message is published. @@ -180,10 +193,12 @@ message PubsubMessage { // publisher in a `Publish` call. google.protobuf.Timestamp publish_time = 4; - // Identifies related messages for which publish order should be respected. - // If a `Subscription` has `enable_message_ordering` set to `true`, messages - // published with the same `ordering_key` value will be delivered to - // subscribers in the order in which they are received by the Pub/Sub system. + // If non-empty, identifies related messages for which publish order should be + // respected. If a `Subscription` has `enable_message_ordering` set to `true`, + // messages published with the same non-empty `ordering_key` value will be + // delivered to subscribers in the order in which they are received by the + // Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest` + // must specify the same `ordering_key` value. // EXPERIMENTAL: This feature is part of a closed alpha release. This // API might be changed in backward-incompatible ways and is not recommended // for production use. It is not subject to any SLA or deprecation policy. @@ -192,32 +207,39 @@ message PubsubMessage { // Request for the GetTopic method. message GetTopicRequest { - // The name of the topic to get. + // Required. The name of the topic to get. // Format is `projects/{project}/topics/{topic}`. - string topic = 1; + string topic = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; } // Request for the UpdateTopic method. message UpdateTopicRequest { - // The updated topic object. - Topic topic = 1; - - // Indicates which fields in the provided topic to update. Must be specified - // and non-empty. Note that if `update_mask` contains - // "message_storage_policy" then the new value will be determined based on the - // policy configured at the project or organization level. The - // `message_storage_policy` must not be set in the `topic` provided above. - google.protobuf.FieldMask update_mask = 2; + // Required. The updated topic object. + Topic topic = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Indicates which fields in the provided topic to update. Must be + // specified and non-empty. Note that if `update_mask` contains + // "message_storage_policy" but the `message_storage_policy` is not set in + // the `topic` provided above, then the updated value is determined by the + // policy configured at the project or organization level. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request for the Publish method. message PublishRequest { - // The messages in the request will be published on this topic. + // Required. The messages in the request will be published on this topic. // Format is `projects/{project}/topics/{topic}`. - string topic = 1; + string topic = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; - // The messages to publish. - repeated PubsubMessage messages = 2; + // Required. The messages to publish. + repeated PubsubMessage messages = 2 [(google.api.field_behavior) = REQUIRED]; } // Response for the `Publish` method. @@ -230,9 +252,14 @@ message PublishResponse { // Request for the `ListTopics` method. message ListTopicsRequest { - // The name of the project in which to list topics. + // Required. The name of the project in which to list topics. // Format is `projects/{project-id}`. - string project = 1; + string project = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Maximum number of topics to return. int32 page_size = 2; @@ -255,9 +282,12 @@ message ListTopicsResponse { // Request for the `ListTopicSubscriptions` method. message ListTopicSubscriptionsRequest { - // The name of the topic that subscriptions are attached to. + // Required. The name of the topic that subscriptions are attached to. // Format is `projects/{project}/topics/{topic}`. - string topic = 1; + string topic = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; // Maximum number of subscription names to return. int32 page_size = 2; @@ -271,7 +301,9 @@ message ListTopicSubscriptionsRequest { // Response for the `ListTopicSubscriptions` method. message ListTopicSubscriptionsResponse { // The names of the subscriptions that match the request. - repeated string subscriptions = 1; + repeated string subscriptions = 1 [(google.api.resource_reference) = { + type: "pubsub.googleapis.com/Subscription" + }]; // If not empty, indicates that there may be more subscriptions that match // the request; this value should be passed in a new @@ -281,9 +313,12 @@ message ListTopicSubscriptionsResponse { // Request for the `ListTopicSnapshots` method. message ListTopicSnapshotsRequest { - // The name of the topic that snapshots are attached to. + // Required. The name of the topic that snapshots are attached to. // Format is `projects/{project}/topics/{topic}`. - string topic = 1; + string topic = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; // Maximum number of snapshot names to return. int32 page_size = 2; @@ -307,15 +342,23 @@ message ListTopicSnapshotsResponse { // Request for the `DeleteTopic` method. message DeleteTopicRequest { - // Name of the topic to delete. + // Required. Name of the topic to delete. // Format is `projects/{project}/topics/{topic}`. - string topic = 1; + string topic = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; } // The service that an application uses to manipulate subscriptions and to // consume messages from a subscription via the `Pull` method or by // establishing a bi-directional stream using the `StreamingPull` method. service Subscriber { + option (google.api.default_host) = "pubsub.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/pubsub"; + // Creates a subscription to a given topic. See the // // resource name rules. @@ -334,6 +377,8 @@ service Subscriber { put: "/v1/{name=projects/*/subscriptions/*}" body: "*" }; + option (google.api.method_signature) = + "name,topic,push_config,ack_deadline_seconds"; } // Gets the configuration details of a subscription. @@ -341,6 +386,7 @@ service Subscriber { option (google.api.http) = { get: "/v1/{subscription=projects/*/subscriptions/*}" }; + option (google.api.method_signature) = "subscription"; } // Updates an existing subscription. Note that certain properties of a @@ -358,6 +404,7 @@ service Subscriber { option (google.api.http) = { get: "/v1/{project=projects/*}/subscriptions" }; + option (google.api.method_signature) = "project"; } // Deletes an existing subscription. All messages retained in the subscription @@ -370,6 +417,7 @@ service Subscriber { option (google.api.http) = { delete: "/v1/{subscription=projects/*/subscriptions/*}" }; + option (google.api.method_signature) = "subscription"; } // Modifies the ack deadline for a specific message. This method is useful @@ -383,6 +431,8 @@ service Subscriber { post: "/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline" body: "*" }; + option (google.api.method_signature) = + "subscription,ack_ids,ack_deadline_seconds"; } // Acknowledges the messages associated with the `ack_ids` in the @@ -397,6 +447,7 @@ service Subscriber { post: "/v1/{subscription=projects/*/subscriptions/*}:acknowledge" body: "*" }; + option (google.api.method_signature) = "subscription,ack_ids"; } // Pulls messages from the server. The server may return `UNAVAILABLE` if @@ -407,6 +458,8 @@ service Subscriber { post: "/v1/{subscription=projects/*/subscriptions/*}:pull" body: "*" }; + option (google.api.method_signature) = + "subscription,return_immediately,max_messages"; } // Establishes a stream with the server, which sends messages down to the @@ -431,6 +484,7 @@ service Subscriber { post: "/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig" body: "*" }; + option (google.api.method_signature) = "subscription,push_config"; } // Gets the configuration details of a snapshot. Snapshots are used in @@ -442,6 +496,7 @@ service Subscriber { option (google.api.http) = { get: "/v1/{snapshot=projects/*/snapshots/*}" }; + option (google.api.method_signature) = "snapshot"; } // Lists the existing snapshots. Snapshots are used in @@ -454,6 +509,7 @@ service Subscriber { option (google.api.http) = { get: "/v1/{project=projects/*}/snapshots" }; + option (google.api.method_signature) = "project"; } // Creates a snapshot from the requested subscription. Snapshots are used in @@ -479,6 +535,7 @@ service Subscriber { put: "/v1/{name=projects/*/snapshots/*}" body: "*" }; + option (google.api.method_signature) = "name,subscription"; } // Updates an existing snapshot. Snapshots are used in @@ -508,6 +565,7 @@ service Subscriber { option (google.api.http) = { delete: "/v1/{snapshot=projects/*/snapshots/*}" }; + option (google.api.method_signature) = "snapshot"; } // Seeks an existing subscription to a point in time or to a given snapshot, @@ -528,19 +586,26 @@ service Subscriber { // A subscription resource. message Subscription { - // The name of the subscription. It must have the format + option (google.api.resource) = { + type: "pubsub.googleapis.com/Subscription" + pattern: "projects/{project}/subscriptions/{subscription}" + }; + + // Required. The name of the subscription. It must have the format // `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must // start with a letter, and contain only letters (`[A-Za-z]`), numbers // (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), // plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters // in length, and it must not start with `"goog"`. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; - // The name of the topic from which this subscription is receiving messages. - // Format is `projects/{project}/topics/{topic}`. - // The value of this field will be `_deleted-topic_` if the topic has been - // deleted. - string topic = 2; + // Required. The name of the topic from which this subscription is receiving + // messages. Format is `projects/{project}/topics/{topic}`. The value of this + // field will be `_deleted-topic_` if the topic has been deleted. + string topic = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; // If push delivery is used with this subscription, this field is // used to configure it. An empty `pushConfig` signifies that the subscriber @@ -606,6 +671,91 @@ message Subscription { // *default policy* with `ttl` of 31 days will be used. The minimum allowed // value for `expiration_policy.ttl` is 1 day. ExpirationPolicy expiration_policy = 11; + + // An expression written in the Cloud Pub/Sub filter language. If non-empty, + // then only `PubsubMessage`s whose `attributes` field matches the filter are + // delivered on this subscription. If empty, then no messages are filtered + // out. + // EXPERIMENTAL: This feature is part of a closed alpha release. This + // API might be changed in backward-incompatible ways and is not recommended + // for production use. It is not subject to any SLA or deprecation policy. + string filter = 12; + + // A policy that specifies the conditions for dead lettering messages in + // this subscription. If dead_letter_policy is not set, dead lettering + // is disabled. + // + // The Cloud Pub/Sub service account associated with this subscriptions's + // parent project (i.e., + // service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have + // permission to Acknowledge() messages on this subscription. + DeadLetterPolicy dead_letter_policy = 13; + + // A policy that specifies how Cloud Pub/Sub retries message delivery for this + // subscription. + // + // If not set, the default retry policy is applied. This generally implies + // that messages will be retried as soon as possible for healthy subscribers. + // RetryPolicy will be triggered on NACKs or acknowledgement deadline + // exceeded events for a given message. + // EXPERIMENTAL: This API might be changed in backward-incompatible + // ways and is not recommended for production use. It is not subject to any + // SLA or deprecation policy. + RetryPolicy retry_policy = 14; +} + +// A policy that specifies how Cloud Pub/Sub retries message delivery. +// +// Retry delay will be exponential based on provided minimum and maximum +// backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. +// +// RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded +// events for a given message. +// +// Retry Policy is implemented on a best effort basis. At times, the delay +// between consecutive deliveries may not match the configuration. That is, +// delay can be more or less than configured backoff. +message RetryPolicy { + // The minimum delay between consecutive deliveries of a given message. + // Value should be between 0 and 600 seconds. Defaults to 10 seconds. + google.protobuf.Duration minimum_backoff = 1; + + // The maximum delay between consecutive deliveries of a given message. + // Value should be between 0 and 600 seconds. Defaults to 600 seconds. + google.protobuf.Duration maximum_backoff = 2; +} + +// Dead lettering is done on a best effort basis. The same message might be +// dead lettered multiple times. +// +// If validation on any of the fields fails at subscription creation/updation, +// the create/update subscription request will fail. +message DeadLetterPolicy { + // The name of the topic to which dead letter messages should be published. + // Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service + // account associated with the enclosing subscription's parent project (i.e., + // service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have + // permission to Publish() to this topic. + // + // The operation will fail if the topic does not exist. + // Users should ensure that there is a subscription attached to this topic + // since messages published to a topic with no subscriptions are lost. + string dead_letter_topic = 1; + + // The maximum number of delivery attempts for any message. The value must be + // between 5 and 100. + // + // The number of delivery attempts is defined as 1 + (the sum of number of + // NACKs and number of times the acknowledgement deadline has been exceeded + // for the message). + // + // A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that + // client libraries may automatically extend ack_deadlines. + // + // This field will be honored on a best effort basis. + // + // If this parameter is 0, a default value of 5 is used. + int32 max_delivery_attempts = 2; } // A policy that specifies the conditions for resource expiration (i.e., @@ -643,30 +793,30 @@ message PushConfig { } // A URL locating the endpoint to which messages should be pushed. - // For example, a Webhook endpoint might use "https://example.com/push". + // For example, a Webhook endpoint might use `https://example.com/push`. string push_endpoint = 1; - // Endpoint configuration attributes. + // Endpoint configuration attributes that can be used to control different + // aspects of the message delivery. // - // Every endpoint has a set of API supported attributes that can be used to - // control different aspects of the message delivery. - // - // The currently supported attribute is `x-goog-version`, which you can + // The only currently supported attribute is `x-goog-version`, which you can // use to change the format of the pushed message. This attribute // indicates the version of the data expected by the endpoint. This // controls the shape of the pushed message (i.e., its fields and metadata). - // The endpoint version is based on the version of the Pub/Sub API. // // If not present during the `CreateSubscription` call, it will default to - // the version of the API used to make such call. If not present during a + // the version of the Pub/Sub API used to make such call. If not present in a // `ModifyPushConfig` call, its value will not be changed. `GetSubscription` // calls will always return a valid version, even if the subscription was // created without this attribute. // - // The possible values for this attribute are: + // The only supported values for the `x-goog-version` attribute are: // // * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. // * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. + // + // For example: + //

attributes { "x-goog-version": "v1" } 
map attributes = 2; // An authentication method used by push endpoints to verify the source of @@ -688,30 +838,59 @@ message ReceivedMessage { // The message. PubsubMessage message = 2; + + // The approximate number of times that Cloud Pub/Sub has attempted to deliver + // the associated message to a subscriber. + // + // More precisely, this is 1 + (number of NACKs) + + // (number of ack_deadline exceeds) for this message. + // + // A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline + // exceeds event is whenever a message is not acknowledged within + // ack_deadline. Note that ack_deadline is initially + // Subscription.ackDeadlineSeconds, but may get extended automatically by + // the client library. + // + // Upon the first delivery of a given message, `delivery_attempt` will have a + // value of 1. The value is calculated at best effort and is approximate. + // + // If a DeadLetterPolicy is not set on the subscription, this will be 0. + int32 delivery_attempt = 3; } // Request for the GetSubscription method. message GetSubscriptionRequest { - // The name of the subscription to get. + // Required. The name of the subscription to get. // Format is `projects/{project}/subscriptions/{sub}`. - string subscription = 1; + string subscription = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "pubsub.googleapis.com/Subscription" + } + ]; } // Request for the UpdateSubscription method. message UpdateSubscriptionRequest { - // The updated subscription object. - Subscription subscription = 1; + // Required. The updated subscription object. + Subscription subscription = 1 [(google.api.field_behavior) = REQUIRED]; - // Indicates which fields in the provided subscription to update. + // Required. Indicates which fields in the provided subscription to update. // Must be specified and non-empty. - google.protobuf.FieldMask update_mask = 2; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request for the `ListSubscriptions` method. message ListSubscriptionsRequest { - // The name of the project in which to list subscriptions. + // Required. The name of the project in which to list subscriptions. // Format is `projects/{project-id}`. - string project = 1; + string project = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Maximum number of subscriptions to return. int32 page_size = 2; @@ -735,41 +914,61 @@ message ListSubscriptionsResponse { // Request for the DeleteSubscription method. message DeleteSubscriptionRequest { - // The subscription to delete. + // Required. The subscription to delete. // Format is `projects/{project}/subscriptions/{sub}`. - string subscription = 1; + string subscription = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "pubsub.googleapis.com/Subscription" + } + ]; } // Request for the ModifyPushConfig method. message ModifyPushConfigRequest { - // The name of the subscription. + // Required. The name of the subscription. // Format is `projects/{project}/subscriptions/{sub}`. - string subscription = 1; - - // The push configuration for future deliveries. + string subscription = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "pubsub.googleapis.com/Subscription" + } + ]; + + // Required. The push configuration for future deliveries. // // An empty `pushConfig` indicates that the Pub/Sub system should // stop pushing messages from the given subscription and allow // messages to be pulled and acknowledged - effectively pausing // the subscription if `Pull` or `StreamingPull` is not called. - PushConfig push_config = 2; + PushConfig push_config = 2 [(google.api.field_behavior) = REQUIRED]; } // Request for the `Pull` method. message PullRequest { - // The subscription from which messages should be pulled. + // Required. The subscription from which messages should be pulled. // Format is `projects/{project}/subscriptions/{sub}`. - string subscription = 1; - - // If this field set to true, the system will respond immediately even if - // it there are no messages available to return in the `Pull` response. - // Otherwise, the system may wait (for a bounded amount of time) until at - // least one message is available, rather than returning no messages. - bool return_immediately = 2; - - // The maximum number of messages returned for this request. The Pub/Sub - // system may return fewer than the number specified. - int32 max_messages = 3; + string subscription = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "pubsub.googleapis.com/Subscription" + } + ]; + + // Optional. If this field set to true, the system will respond immediately + // even if it there are no messages available to return in the `Pull` + // response. Otherwise, the system may wait (for a bounded amount of time) + // until at least one message is available, rather than returning no messages. + // Warning: setting this field to `true` is discouraged because it adversely + // impacts the performance of `Pull` operations. We recommend that users do + // not set this field. + bool return_immediately = 2 + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; + + // Required. The maximum number of messages to return for this request. Must + // be a positive integer. The Pub/Sub system may return fewer than the number + // specified. + int32 max_messages = 3 [(google.api.field_behavior) = REQUIRED]; } // Response for the `Pull` method. @@ -783,44 +982,60 @@ message PullResponse { // Request for the ModifyAckDeadline method. message ModifyAckDeadlineRequest { - // The name of the subscription. + // Required. The name of the subscription. // Format is `projects/{project}/subscriptions/{sub}`. - string subscription = 1; - - // List of acknowledgment IDs. - repeated string ack_ids = 4; - - // The new ack deadline with respect to the time this request was sent to - // the Pub/Sub system. For example, if the value is 10, the new - // ack deadline will expire 10 seconds after the `ModifyAckDeadline` call - // was made. Specifying zero might immediately make the message available for + string subscription = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "pubsub.googleapis.com/Subscription" + } + ]; + + // Required. List of acknowledgment IDs. + repeated string ack_ids = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new ack deadline with respect to the time this request was + // sent to the Pub/Sub system. For example, if the value is 10, the new ack + // deadline will expire 10 seconds after the `ModifyAckDeadline` call was + // made. Specifying zero might immediately make the message available for // delivery to another subscriber client. This typically results in an // increase in the rate of message redeliveries (that is, duplicates). // The minimum deadline you can specify is 0 seconds. // The maximum deadline you can specify is 600 seconds (10 minutes). - int32 ack_deadline_seconds = 3; + int32 ack_deadline_seconds = 3 [(google.api.field_behavior) = REQUIRED]; } // Request for the Acknowledge method. message AcknowledgeRequest { - // The subscription whose message is being acknowledged. + // Required. The subscription whose message is being acknowledged. // Format is `projects/{project}/subscriptions/{sub}`. - string subscription = 1; - - // The acknowledgment ID for the messages being acknowledged that was returned - // by the Pub/Sub system in the `Pull` response. Must not be empty. - repeated string ack_ids = 2; + string subscription = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "pubsub.googleapis.com/Subscription" + } + ]; + + // Required. The acknowledgment ID for the messages being acknowledged that + // was returned by the Pub/Sub system in the `Pull` response. Must not be + // empty. + repeated string ack_ids = 2 [(google.api.field_behavior) = REQUIRED]; } // Request for the `StreamingPull` streaming RPC method. This request is used to // establish the initial stream as well as to stream acknowledgements and ack // deadline modifications from the client to the server. message StreamingPullRequest { - // The subscription for which to initialize the new stream. This must be - // provided in the first request on the stream, and must not be set in + // Required. The subscription for which to initialize the new stream. This + // must be provided in the first request on the stream, and must not be set in // subsequent requests from client to server. // Format is `projects/{project}/subscriptions/{sub}`. - string subscription = 1; + string subscription = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "pubsub.googleapis.com/Subscription" + } + ]; // List of acknowledgement IDs for acknowledging previously received messages // (received on this stream or a different stream). If an ack ID has expired, @@ -849,11 +1064,20 @@ message StreamingPullRequest { // processing was interrupted. repeated string modify_deadline_ack_ids = 4; - // The ack deadline to use for the stream. This must be provided in the - // first request on the stream, but it can also be updated on subsequent + // Required. The ack deadline to use for the stream. This must be provided in + // the first request on the stream, but it can also be updated on subsequent // requests from client to server. The minimum deadline you can specify is 10 // seconds. The maximum deadline you can specify is 600 seconds (10 minutes). - int32 stream_ack_deadline_seconds = 5; + int32 stream_ack_deadline_seconds = 5 + [(google.api.field_behavior) = REQUIRED]; + + // A unique identifier that is used to distinguish client instances from each + // other. Only needs to be provided on the initial request. When a stream + // disconnects and reconnects for the same stream, the client_id should be set + // to the same value so that state associated with the old stream can be + // transferred to the new stream. The same client_id should not be used for + // different client instances. + string client_id = 6; } // Response for the `StreamingPull` method. This response is used to stream @@ -865,16 +1089,18 @@ message StreamingPullResponse { // Request for the `CreateSnapshot` method. message CreateSnapshotRequest { - // Optional user-provided name for this snapshot. - // If the name is not provided in the request, the server will assign a random - // name for this snapshot on the same project as the subscription. - // Note that for REST API requests, you must specify a name. See the - // - // resource name rules. - // Format is `projects/{project}/snapshots/{snap}`. - string name = 1; - - // The subscription whose backlog the snapshot retains. + // Required. User-provided name for this snapshot. If the name is not provided + // in the request, the server will assign a random name for this snapshot on + // the same project as the subscription. Note that for REST API requests, you + // must specify a name. See the resource + // name rules. Format is `projects/{project}/snapshots/{snap}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" } + ]; + + // Required. The subscription whose backlog the snapshot retains. // Specifically, the created snapshot is guaranteed to retain: // (a) The existing backlog on the subscription. More precisely, this is // defined as the messages in the subscription's backlog that are @@ -883,7 +1109,12 @@ message CreateSnapshotRequest { // (b) Any messages published to the subscription's topic following the // successful completion of the CreateSnapshot request. // Format is `projects/{project}/subscriptions/{sub}`. - string subscription = 2; + string subscription = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "pubsub.googleapis.com/Subscription" + } + ]; // See Creating and // managing labels. @@ -892,12 +1123,13 @@ message CreateSnapshotRequest { // Request for the UpdateSnapshot method. message UpdateSnapshotRequest { - // The updated snapshot object. - Snapshot snapshot = 1; + // Required. The updated snapshot object. + Snapshot snapshot = 1 [(google.api.field_behavior) = REQUIRED]; - // Indicates which fields in the provided snapshot to update. + // Required. Indicates which fields in the provided snapshot to update. // Must be specified and non-empty. - google.protobuf.FieldMask update_mask = 2; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // A snapshot resource. Snapshots are used in @@ -907,11 +1139,18 @@ message UpdateSnapshotRequest { // acknowledgment state of messages in an existing subscription to the state // captured by a snapshot. message Snapshot { + option (google.api.resource) = { + type: "pubsub.googleapis.com/Snapshot" + pattern: "projects/{project}/snapshots/{snapshot}" + }; + // The name of the snapshot. string name = 1; // The name of the topic from which this snapshot is retaining messages. - string topic = 2; + string topic = 2 [ + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; // The snapshot is guaranteed to exist up until this time. // A newly-created snapshot expires no later than 7 days from the time of its @@ -932,16 +1171,24 @@ message Snapshot { // Request for the GetSnapshot method. message GetSnapshotRequest { - // The name of the snapshot to get. + // Required. The name of the snapshot to get. // Format is `projects/{project}/snapshots/{snap}`. - string snapshot = 1; + string snapshot = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" } + ]; } // Request for the `ListSnapshots` method. message ListSnapshotsRequest { - // The name of the project in which to list snapshots. + // Required. The name of the project in which to list snapshots. // Format is `projects/{project-id}`. - string project = 1; + string project = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Maximum number of snapshots to return. int32 page_size = 2; @@ -964,15 +1211,23 @@ message ListSnapshotsResponse { // Request for the `DeleteSnapshot` method. message DeleteSnapshotRequest { - // The name of the snapshot to delete. + // Required. The name of the snapshot to delete. // Format is `projects/{project}/snapshots/{snap}`. - string snapshot = 1; + string snapshot = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" } + ]; } // Request for the `Seek` method. message SeekRequest { - // The subscription to affect. - string subscription = 1; + // Required. The subscription to affect. + string subscription = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "pubsub.googleapis.com/Subscription" + } + ]; oneof target { // The time to seek to. @@ -991,7 +1246,9 @@ message SeekRequest { // The snapshot to seek to. The snapshot's topic must be the same as that of // the provided subscription. // Format is `projects/{project}/snapshots/{snap}`. - string snapshot = 3; + string snapshot = 3 [(google.api.resource_reference) = { + type: "pubsub.googleapis.com/Snapshot" + }]; } } diff --git a/google/pubsub/v1/pubsub_gapic.legacy.yaml b/google/pubsub/v1/pubsub_gapic.legacy.yaml new file mode 100644 index 000000000..5ce808d51 --- /dev/null +++ b/google/pubsub/v1/pubsub_gapic.legacy.yaml @@ -0,0 +1,706 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.pubsub.v1 + interface_names: + google.pubsub.v1.Publisher: TopicAdmin + google.pubsub.v1.Subscriber: SubscriptionAdmin + release_level: GA + python: + package_name: google.cloud.pubsub_v1.gapic + release_level: GA + go: + package_name: cloud.google.com/go/pubsub/apiv1 + domain_layer_location: cloud.google.com/go/pubsub + release_level: GA + csharp: + package_name: Google.Cloud.PubSub.V1 + interface_names: + google.pubsub.v1.Publisher: PublisherServiceApi + google.pubsub.v1.Subscriber: SubscriberServiceApi + release_level: GA + ruby: + package_name: Google::Cloud::PubSub::V1 + release_level: BETA + php: + package_name: Google\Cloud\PubSub\V1 + release_level: GA + nodejs: + package_name: pubsub.v1 + domain_layer_location: google-cloud + release_level: GA +collection_oneofs: +- oneof_name: topic_oneof + collection_names: + - topic + - deleted_topic +collections: +- name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName +- name_pattern: projects/{project}/snapshots/{snapshot} + entity_name: snapshot + language_overrides: + - language: java + entity_name: project_snapshot +- name_pattern: projects/{project}/subscriptions/{subscription} + entity_name: subscription + language_overrides: + - language: java + entity_name: project_subscription +- name_pattern: projects/{project}/topics/{topic} + entity_name: topic + language_overrides: + - language: java + entity_name: project_topic +- name_pattern: _deleted-topic_ + entity_name: deleted_topic +interfaces: +- name: google.pubsub.v1.Subscriber + lang_doc: + java: To retrieve messages from a subscription, see the Subscriber class. + retry_codes_def: + - name: idempotent + retry_codes: + - UNKNOWN + - ABORTED + - UNAVAILABLE + - name: non_idempotent + retry_codes: + - UNAVAILABLE + - name: streaming_pull + retry_codes: + - DEADLINE_EXCEEDED + - RESOURCE_EXHAUSTED + - ABORTED + - INTERNAL + - UNAVAILABLE + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 # 60 seconds + initial_rpc_timeout_millis: 60000 # 60 seconds + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 # 60 seconds + total_timeout_millis: 600000 # 10 minutes + - name: messaging + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 # 60 seconds + initial_rpc_timeout_millis: 25000 # 25 seconds + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 25000 # 25 seconds + total_timeout_millis: 600000 # 10 minutes + - name: streaming_messaging + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 # 60 seconds + initial_rpc_timeout_millis: 600000 # 10 minutes + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 600000 # 10 minutes + total_timeout_millis: 600000 # 10 minutes + methods: + - name: CreateSubscription + flattening: + groups: + - parameters: + - name + - topic + - push_config + - ack_deadline_seconds + required_fields: + - name + - topic + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: subscription + topic: topic + timeout_millis: 60000 + - name: GetSubscription + flattening: + groups: + - parameters: + - subscription + required_fields: + - subscription + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + subscription: subscription + timeout_millis: 60000 + - name: UpdateSubscription + required_fields: + - subscription + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + sample_code_init_fields: + - update_mask.paths[0]="ack_deadline_seconds" + - subscription.ack_deadline_seconds=42 + - name: ListSubscriptions + flattening: + groups: + - parameters: + - project + required_fields: + - project + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: subscriptions + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + project: project + timeout_millis: 60000 + - name: DeleteSubscription + flattening: + groups: + - parameters: + - subscription + required_fields: + - subscription + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + subscription: subscription + timeout_millis: 60000 + - name: GetSnapshot + surface_treatments: + - include_languages: + - go + - java + - csharp + - ruby + - nodejs + - python + - php + visibility: DISABLED + - name: ModifyAckDeadline + flattening: + groups: + - parameters: + - subscription + - ack_ids + - ack_deadline_seconds + required_fields: + - subscription + - ack_ids + - ack_deadline_seconds + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + subscription: subscription + timeout_millis: 60000 + surface_treatments: + - include_languages: + - java + visibility: PACKAGE + - name: Acknowledge + flattening: + groups: + - parameters: + - subscription + - ack_ids + required_fields: + - subscription + - ack_ids + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: messaging + field_name_patterns: + subscription: subscription + timeout_millis: 60000 + surface_treatments: + - include_languages: + - java + visibility: PACKAGE + - name: Pull + flattening: + groups: + - parameters: + - subscription + - return_immediately + - max_messages + required_fields: + - subscription + - max_messages + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: messaging + field_name_patterns: + subscription: subscription + timeout_millis: 60000 + surface_treatments: + - include_languages: + - java + visibility: PACKAGE + - name: StreamingPull + required_fields: + - subscription + - stream_ack_deadline_seconds + grpc_streaming: + response: + resources_field: received_messages + resource_name_treatment: STATIC_TYPES + retry_codes_name: streaming_pull + retry_params_name: streaming_messaging + field_name_patterns: + subscription: subscription + timeout_millis: 900000 + surface_treatments: + - include_languages: + - java + visibility: PACKAGE + - name: ModifyPushConfig + flattening: + groups: + - parameters: + - subscription + - push_config + required_fields: + - subscription + - push_config + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + subscription: subscription + timeout_millis: 60000 + - name: ListSnapshots + flattening: + groups: + - parameters: + - project + required_fields: + - project + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: snapshots + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + project: project + timeout_millis: 60000 + - name: CreateSnapshot + flattening: + groups: + - parameters: + - name + - subscription + required_fields: + - name + - subscription + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: snapshot + subscription: subscription + timeout_millis: 60000 + - name: UpdateSnapshot + required_fields: + - snapshot + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + sample_code_init_fields: + - update_mask.paths[0]="expire_time" + - snapshot.expire_time.seconds=123456 + - name: DeleteSnapshot + flattening: + groups: + - parameters: + - snapshot + required_fields: + - snapshot + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + snapshot: snapshot + timeout_millis: 60000 + - name: Seek + # Not including flattening until oneof support. + # https://github.com/googleapis/toolkit/issues/1057 + required_fields: + - subscription + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + subscription: subscription + timeout_millis: 60000 + - name: SetIamPolicy + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: subscription + timeout_millis: 60000 + reroute_to_grpc_interface: google.iam.v1.IAMPolicy + surface_treatments: + - include_languages: + - go + visibility: DISABLED + - name: GetIamPolicy + flattening: + groups: + - parameters: + - resource + required_fields: + - resource + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + resource: subscription + timeout_millis: 60000 + reroute_to_grpc_interface: google.iam.v1.IAMPolicy + surface_treatments: + - include_languages: + - go + visibility: DISABLED + - name: TestIamPermissions + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: subscription + timeout_millis: 60000 + reroute_to_grpc_interface: google.iam.v1.IAMPolicy + surface_treatments: + - include_languages: + - go + visibility: DISABLED +- name: google.pubsub.v1.Publisher + lang_doc: + java: To publish messages to a topic, see the Publisher class. + smoke_test: + method: ListTopics + init_fields: + - project%project=$PROJECT_ID + retry_codes_def: + - name: idempotent + retry_codes: + - UNKNOWN + - ABORTED + - UNAVAILABLE + - name: non_idempotent + retry_codes: + - UNAVAILABLE + - name: none + retry_codes: [] + - name: publish + retry_codes: + - ABORTED + - CANCELLED + - INTERNAL + - RESOURCE_EXHAUSTED + - UNKNOWN + - UNAVAILABLE + - DEADLINE_EXCEEDED + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 # 60 seconds + initial_rpc_timeout_millis: 60000 # 60 seconds + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 # 60 seconds + total_timeout_millis: 600000 # 10 minutes + - name: messaging + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 # 60 seconds + initial_rpc_timeout_millis: 5000 # 5 seconds + rpc_timeout_multiplier: 1.3 + max_rpc_timeout_millis: 60000 # 60 seconds + total_timeout_millis: 60000 # 60 seconds + methods: + - name: CreateTopic + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: topic + timeout_millis: 60000 + - name: UpdateTopic + required_fields: + - topic + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: Publish + flattening: + groups: + - parameters: + - topic + - messages + required_fields: + - topic + - messages + resource_name_treatment: STATIC_TYPES + retry_codes_name: publish + retry_params_name: messaging + batching: + thresholds: + element_count_threshold: 100 + element_count_limit: 1000 # TO BE REMOVED LATER + request_byte_threshold: 1048576 # 1 MiB + request_byte_limit: 10485760 # TO BE REMOVED LATER + delay_threshold_millis: 10 + batch_descriptor: + batched_field: messages + discriminator_fields: + - topic + subresponse_field: message_ids + field_name_patterns: + topic: topic + sample_code_init_fields: + - messages[0].data + timeout_millis: 60000 + surface_treatments: + - include_languages: + - java + visibility: PACKAGE + - name: GetTopic + flattening: + groups: + - parameters: + - topic + required_fields: + - topic + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + topic: topic + timeout_millis: 60000 + - name: ListTopics + flattening: + groups: + - parameters: + - project + required_fields: + - project + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: topics + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + project: project + timeout_millis: 60000 + - name: ListTopicSubscriptions + flattening: + groups: + - parameters: + - topic + required_fields: + - topic + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: subscriptions + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + topic: topic + timeout_millis: 60000 + - name: ListTopicSnapshots + surface_treatments: + - include_languages: + - go + - java + - csharp + - ruby + - nodejs + - python + - php + visibility: DISABLED + - name: DeleteTopic + flattening: + groups: + - parameters: + - topic + required_fields: + - topic + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + topic: topic + timeout_millis: 60000 + - name: SetIamPolicy + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: topic + timeout_millis: 60000 + reroute_to_grpc_interface: google.iam.v1.IAMPolicy + surface_treatments: + - include_languages: + - go + visibility: DISABLED + - name: GetIamPolicy + flattening: + groups: + - parameters: + - resource + required_fields: + - resource + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + resource: topic + timeout_millis: 60000 + reroute_to_grpc_interface: google.iam.v1.IAMPolicy + surface_treatments: + - include_languages: + - go + visibility: DISABLED + - name: TestIamPermissions + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: topic + timeout_millis: 60000 + reroute_to_grpc_interface: google.iam.v1.IAMPolicy + surface_treatments: + - include_languages: + - go + visibility: DISABLED +resource_name_generation: +- message_name: Topic + field_entity_map: + name: topic +- message_name: GetTopicRequest + field_entity_map: + topic: topic +- message_name: PublishRequest + field_entity_map: + topic: topic +- message_name: ListTopicsRequest + field_entity_map: + project: project +- message_name: ListTopicSubscriptionsRequest + field_entity_map: + topic: topic +- message_name: ListTopicSubscriptionsResponse + field_entity_map: + subscriptions: subscription +- message_name: DeleteTopicRequest + field_entity_map: + topic: topic +- message_name: Subscription + field_entity_map: + name: subscription + topic: topic_oneof +- message_name: GetSubscriptionRequest + field_entity_map: + subscription: subscription +- message_name: ListSubscriptionsRequest + field_entity_map: + project: project +- message_name: DeleteSubscriptionRequest + field_entity_map: + subscription: subscription +- message_name: ModifyPushConfigRequest + field_entity_map: + subscription: subscription +- message_name: PullRequest + field_entity_map: + subscription: subscription +- message_name: ModifyAckDeadlineRequest + field_entity_map: + subscription: subscription +- message_name: AcknowledgeRequest + field_entity_map: + subscription: subscription +- message_name: StreamingPullRequest + field_entity_map: + subscription: subscription +- message_name: Snapshot + field_entity_map: + name: snapshot + topic: topic +- message_name: CreateSnapshotRequest + field_entity_map: + name: snapshot + subscription: subscription +- message_name: ListSnapshotsRequest + field_entity_map: + project: project +- message_name: DeleteSnapshotRequest + field_entity_map: + snapshot: snapshot +- message_name: SeekRequest + field_entity_map: + subscription: subscription + snapshot: snapshot diff --git a/google/pubsub/v1/pubsub_gapic.yaml b/google/pubsub/v1/pubsub_gapic.yaml index 59354746e..e26d535fa 100644 --- a/google/pubsub/v1/pubsub_gapic.yaml +++ b/google/pubsub/v1/pubsub_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.pubsub.v1 @@ -30,36 +30,23 @@ language_settings: package_name: pubsub.v1 domain_layer_location: google-cloud release_level: GA -collection_oneofs: -- oneof_name: topic_oneof - collection_names: - - topic - - deleted_topic collections: -- name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName -- name_pattern: projects/{project}/snapshots/{snapshot} - entity_name: snapshot +# Language overrides are for backward-compatibility in Java. +- entity_name: snapshot language_overrides: - language: java entity_name: project_snapshot -- name_pattern: projects/{project}/subscriptions/{subscription} - entity_name: subscription +# Language overrides are for backward-compatibility in Java. +- entity_name: subscription language_overrides: - language: java entity_name: project_subscription -- name_pattern: projects/{project}/topics/{topic} - entity_name: topic - language_overrides: - - language: java - entity_name: project_topic -- name_pattern: _deleted-topic_ - entity_name: deleted_topic interfaces: - name: google.pubsub.v1.Subscriber + # Deprecated collections are for backward-compatibility in Ruby, PHP and Python + deprecated_collections: + - name_pattern: "projects/{project}/topics/{topic}" + entity_name: topic lang_doc: java: To retrieve messages from a subscription, see the Subscriber class. retry_codes_def: @@ -71,8 +58,13 @@ interfaces: - name: non_idempotent retry_codes: - UNAVAILABLE - - name: none - retry_codes: [] + - name: streaming_pull + retry_codes: + - DEADLINE_EXCEEDED + - RESOURCE_EXHAUSTED + - ABORTED + - INTERNAL + - UNAVAILABLE retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -99,80 +91,22 @@ interfaces: max_rpc_timeout_millis: 600000 # 10 minutes total_timeout_millis: 600000 # 10 minutes methods: + # TODO: remove the per method retry_codes_name field once + # https://github.com/googleapis/gapic-generator/issues/3137 + # is fixed - name: CreateSubscription - flattening: - groups: - - parameters: - - name - - topic - - push_config - - ack_deadline_seconds - required_fields: - - name - - topic - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: subscription - topic: topic - timeout_millis: 60000 - name: GetSubscription - flattening: - groups: - - parameters: - - subscription - required_fields: - - subscription - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - subscription: subscription - timeout_millis: 60000 - name: UpdateSubscription - required_fields: - - subscription - - update_mask retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 sample_code_init_fields: - update_mask.paths[0]="ack_deadline_seconds" - subscription.ack_deadline_seconds=42 - name: ListSubscriptions - flattening: - groups: - - parameters: - - project - required_fields: - - project - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: subscriptions retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - project: project - timeout_millis: 60000 - name: DeleteSubscription - flattening: - groups: - - parameters: - - subscription - required_fields: - - subscription - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - subscription: subscription - timeout_millis: 60000 - name: GetSnapshot surface_treatments: - include_languages: @@ -183,219 +117,66 @@ interfaces: - nodejs - python - php - visibility: DISABLED + visibility: PACKAGE - name: ModifyAckDeadline - flattening: - groups: - - parameters: - - subscription - - ack_ids - - ack_deadline_seconds - required_fields: - - subscription - - ack_ids - - ack_deadline_seconds - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - subscription: subscription - timeout_millis: 60000 surface_treatments: - include_languages: - java visibility: PACKAGE - name: Acknowledge - flattening: - groups: - - parameters: - - subscription - - ack_ids - required_fields: - - subscription - - ack_ids - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: messaging - field_name_patterns: - subscription: subscription - timeout_millis: 60000 surface_treatments: - include_languages: - java visibility: PACKAGE - name: Pull - flattening: - groups: - - parameters: - - subscription - - return_immediately - - max_messages - required_fields: - - subscription - - max_messages - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: messaging - field_name_patterns: - subscription: subscription - timeout_millis: 60000 surface_treatments: - include_languages: - java visibility: PACKAGE - name: StreamingPull - required_fields: - - subscription - - stream_ack_deadline_seconds - grpc_streaming: - response: - resources_field: received_messages - resource_name_treatment: STATIC_TYPES - retry_codes_name: none + retry_codes_name: streaming_pull retry_params_name: streaming_messaging - field_name_patterns: - subscription: subscription timeout_millis: 900000 surface_treatments: - include_languages: - java visibility: PACKAGE - name: ModifyPushConfig - flattening: - groups: - - parameters: - - subscription - - push_config - required_fields: - - subscription - - push_config - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - subscription: subscription - timeout_millis: 60000 - name: ListSnapshots - flattening: - groups: - - parameters: - - project - required_fields: - - project - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: snapshots retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - project: project - timeout_millis: 60000 - name: CreateSnapshot - flattening: - groups: - - parameters: - - name - - subscription - required_fields: - - name - - subscription - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: snapshot - subscription: subscription - timeout_millis: 60000 - name: UpdateSnapshot - required_fields: - - snapshot - - update_mask retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 sample_code_init_fields: - update_mask.paths[0]="expire_time" - snapshot.expire_time.seconds=123456 - name: DeleteSnapshot - flattening: - groups: - - parameters: - - snapshot - required_fields: - - snapshot - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - snapshot: snapshot - timeout_millis: 60000 - name: Seek - # Not including flattening until oneof support. - # https://github.com/googleapis/toolkit/issues/1057 - required_fields: - - subscription - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - subscription: subscription - timeout_millis: 60000 - name: SetIamPolicy - flattening: - groups: - - parameters: - - resource - - policy - required_fields: - - resource - - policy retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: subscription - timeout_millis: 60000 reroute_to_grpc_interface: google.iam.v1.IAMPolicy surface_treatments: - include_languages: - go visibility: DISABLED - name: GetIamPolicy - flattening: - groups: - - parameters: - - resource - required_fields: - - resource retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - resource: subscription - timeout_millis: 60000 reroute_to_grpc_interface: google.iam.v1.IAMPolicy surface_treatments: - include_languages: - go visibility: DISABLED - name: TestIamPermissions - flattening: - groups: - - parameters: - - resource - - permissions - required_fields: - - resource - - permissions retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: subscription - timeout_millis: 60000 reroute_to_grpc_interface: google.iam.v1.IAMPolicy surface_treatments: - include_languages: @@ -441,117 +222,42 @@ interfaces: initial_retry_delay_millis: 100 retry_delay_multiplier: 1.3 max_retry_delay_millis: 60000 # 60 seconds - initial_rpc_timeout_millis: 25000 # 25 seconds - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 30000 # 30 seconds - total_timeout_millis: 600000 # 10 minutes + initial_rpc_timeout_millis: 5000 # 5 seconds + rpc_timeout_multiplier: 1.3 + max_rpc_timeout_millis: 60000 # 60 seconds + total_timeout_millis: 60000 # 60 seconds methods: - name: CreateTopic - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: topic - timeout_millis: 60000 - name: UpdateTopic - required_fields: - - topic - - update_mask retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 60000 - name: Publish - flattening: - groups: - - parameters: - - topic - - messages - required_fields: - - topic - - messages - resource_name_treatment: STATIC_TYPES retry_codes_name: publish retry_params_name: messaging batching: thresholds: - element_count_threshold: 10 - element_count_limit: 1000 # TO BE REMOVED LATER - request_byte_threshold: 1024 # 1 Kb - request_byte_limit: 10485760 # TO BE REMOVED LATER + element_count_threshold: 100 + element_count_limit: 1000 # TO BE REMOVED LATER + request_byte_threshold: 1048576 # 1 MiB + request_byte_limit: 10485760 # TO BE REMOVED LATER delay_threshold_millis: 10 batch_descriptor: batched_field: messages discriminator_fields: - topic subresponse_field: message_ids - field_name_patterns: - topic: topic sample_code_init_fields: - messages[0].data - timeout_millis: 60000 surface_treatments: - include_languages: - java visibility: PACKAGE - name: GetTopic - flattening: - groups: - - parameters: - - topic - required_fields: - - topic - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - topic: topic - timeout_millis: 60000 - name: ListTopics - flattening: - groups: - - parameters: - - project - required_fields: - - project - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: topics retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - project: project - timeout_millis: 60000 - name: ListTopicSubscriptions - flattening: - groups: - - parameters: - - topic - required_fields: - - topic - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: subscriptions retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - topic: topic - timeout_millis: 60000 - name: ListTopicSnapshots surface_treatments: - include_languages: @@ -562,140 +268,29 @@ interfaces: - nodejs - python - php - visibility: DISABLED + visibility: PACKAGE - name: DeleteTopic - flattening: - groups: - - parameters: - - topic - required_fields: - - topic - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - topic: topic - timeout_millis: 60000 - name: SetIamPolicy - flattening: - groups: - - parameters: - - resource - - policy - required_fields: - - resource - - policy retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: topic - timeout_millis: 60000 reroute_to_grpc_interface: google.iam.v1.IAMPolicy + # TODO: surface_treatments are here only to make bazel presubmit pass + # they can be removed once presubmit starts using gapic-generator-go surface_treatments: - include_languages: - go visibility: DISABLED - name: GetIamPolicy - flattening: - groups: - - parameters: - - resource - required_fields: - - resource retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - resource: topic - timeout_millis: 60000 reroute_to_grpc_interface: google.iam.v1.IAMPolicy surface_treatments: - include_languages: - go visibility: DISABLED - name: TestIamPermissions - flattening: - groups: - - parameters: - - resource - - permissions - required_fields: - - resource - - permissions retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: topic - timeout_millis: 60000 reroute_to_grpc_interface: google.iam.v1.IAMPolicy surface_treatments: - include_languages: - go visibility: DISABLED -resource_name_generation: -- message_name: Topic - field_entity_map: - name: topic -- message_name: GetTopicRequest - field_entity_map: - topic: topic -- message_name: PublishRequest - field_entity_map: - topic: topic -- message_name: ListTopicsRequest - field_entity_map: - project: project -- message_name: ListTopicSubscriptionsRequest - field_entity_map: - topic: topic -- message_name: ListTopicSubscriptionsResponse - field_entity_map: - subscriptions: subscription -- message_name: DeleteTopicRequest - field_entity_map: - topic: topic -- message_name: Subscription - field_entity_map: - name: subscription - topic: topic_oneof -- message_name: GetSubscriptionRequest - field_entity_map: - subscription: subscription -- message_name: ListSubscriptionsRequest - field_entity_map: - project: project -- message_name: DeleteSubscriptionRequest - field_entity_map: - subscription: subscription -- message_name: ModifyPushConfigRequest - field_entity_map: - subscription: subscription -- message_name: PullRequest - field_entity_map: - subscription: subscription -- message_name: ModifyAckDeadlineRequest - field_entity_map: - subscription: subscription -- message_name: AcknowledgeRequest - field_entity_map: - subscription: subscription -- message_name: StreamingPullRequest - field_entity_map: - subscription: subscription -- message_name: Snapshot - field_entity_map: - name: snapshot - topic: topic -- message_name: CreateSnapshotRequest - field_entity_map: - name: snapshot - subscription: subscription -- message_name: ListSnapshotsRequest - field_entity_map: - project: project -- message_name: DeleteSnapshotRequest - field_entity_map: - snapshot: snapshot -- message_name: SeekRequest - field_entity_map: - subscription: subscription - snapshot: snapshot diff --git a/google/pubsub/v1/pubsub_grpc_service_config.json b/google/pubsub/v1/pubsub_grpc_service_config.json new file mode 100755 index 000000000..15abf6f93 --- /dev/null +++ b/google/pubsub/v1/pubsub_grpc_service_config.json @@ -0,0 +1,222 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.pubsub.v1.Publisher", + "method": "CreateTopic" + }, + { + "service": "google.pubsub.v1.Publisher", + "method": "UpdateTopic" + }, + { + "service": "google.pubsub.v1.Publisher", + "method": "DeleteTopic" + }, + { + "service": "google.pubsub.v1.Publisher", + "method": "SetIamPolicy" + }, + { + "service": "google.pubsub.v1.Publisher", + "method": "TestIamPermissions" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.pubsub.v1.Publisher", + "method": "Publish" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "ABORTED", + "CANCELLED", + "INTERNAL", + "RESOURCE_EXHAUSTED", + "UNKNOWN", + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.pubsub.v1.Publisher", + "method": "GetTopic" + }, + { + "service": "google.pubsub.v1.Publisher", + "method": "ListTopics" + }, + { + "service": "google.pubsub.v1.Publisher", + "method": "ListTopicSubscriptions" + }, + { + "service": "google.pubsub.v1.Publisher", + "method": "ListTopicSnapshots" + }, + { + "service": "google.pubsub.v1.Publisher", + "method": "GetIamPolicy" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNKNOWN", + "ABORTED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.pubsub.v1.Subscriber", + "method": "StreamingPull" + } + ], + "timeout": "900s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "RESOURCE_EXHAUSTED", + "ABORTED", + "INTERNAL", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.pubsub.v1.Subscriber", + "method": "CreateSubscription" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "GetSubscription" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "ListSubscriptions" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "ListSnapshots" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "GetSnapshot" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "Seek" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "Pull" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "GetIamPolicy" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNKNOWN", + "ABORTED", + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.pubsub.v1.Subscriber", + "method": "UpdateSubscription" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "DeleteSubscription" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "ModifyAckDeadline" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "ModifyPushConfig" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "CreateSnapshot" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "UpdateSnapshot" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "DeleteSnapshot" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "Acknowledge" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "SetIamPolicy" + }, + { + "service": "google.pubsub.v1.Subscriber", + "method": "TestIamPermissions" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/pubsub/v1/pubsub_v1.yaml b/google/pubsub/v1/pubsub_v1.yaml new file mode 100644 index 000000000..0178f428d --- /dev/null +++ b/google/pubsub/v1/pubsub_v1.yaml @@ -0,0 +1,87 @@ +type: google.api.Service +config_version: 3 +name: pubsub.googleapis.com +title: Cloud Pub/Sub API + +apis: +- name: google.pubsub.v1.Publisher +- name: google.pubsub.v1.Subscriber + +documentation: + summary: |- + Provides reliable, many-to-many, asynchronous messaging between + applications. + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + description: |- + Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + description: |- + Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + description: |- + Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + +backend: + rules: + - selector: 'google.pubsub.v1.Publisher.*' + deadline: 120.0 + - selector: google.pubsub.v1.Publisher.Publish + deadline: 20.0 + - selector: 'google.pubsub.v1.Subscriber.*' + deadline: 120.0 + +http: + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + get: '/v1/{resource=projects/*/topics/*}:getIamPolicy' + additional_bindings: + - get: '/v1/{resource=projects/*/subscriptions/*}:getIamPolicy' + - get: '/v1/{resource=projects/*/snapshots/*}:getIamPolicy' + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + post: '/v1/{resource=projects/*/topics/*}:setIamPolicy' + body: '*' + additional_bindings: + - post: '/v1/{resource=projects/*/subscriptions/*}:setIamPolicy' + body: '*' + - post: '/v1/{resource=projects/*/snapshots/*}:setIamPolicy' + body: '*' + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + post: '/v1/{resource=projects/*/subscriptions/*}:testIamPermissions' + body: '*' + additional_bindings: + - post: '/v1/{resource=projects/*/topics/*}:testIamPermissions' + body: '*' + - post: '/v1/{resource=projects/*/snapshots/*}:testIamPermissions' + body: '*' + +authentication: + rules: + - selector: 'google.iam.v1.IAMPolicy.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/pubsub + - selector: 'google.pubsub.v1.Publisher.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/pubsub + - selector: 'google.pubsub.v1.Subscriber.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/pubsub diff --git a/google/rpc/BUILD.bazel b/google/rpc/BUILD.bazel index 1daaf649d..645f329f3 100644 --- a/google/rpc/BUILD.bazel +++ b/google/rpc/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -85,3 +87,23 @@ cc_proto_library( name = "status_cc_proto", deps = [":status_proto"], ) + +############################################################################## +# Python +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "py_proto_library") + +py_proto_library( + name = "code_py_proto", + deps = [":code_proto"], +) + +py_proto_library( + name = "error_details_py_proto", + deps = [":error_details_proto"], +) + +py_proto_library( + name = "status_py_proto", + deps = [":status_proto"], +) diff --git a/google/rpc/README.md b/google/rpc/README.md index 509881429..164bc8098 100644 --- a/google/rpc/README.md +++ b/google/rpc/README.md @@ -1,5 +1,5 @@ # Google RPC This package contains type definitions for general RPC systems. While -[gRPC](https://github.com/grpc) is using these defintions, they +[gRPC](https://github.com/grpc) is using these definitions, they are not designed specifically to support gRPC. diff --git a/google/rpc/code.proto b/google/rpc/code.proto index 142e28d30..98ae0ac18 100644 --- a/google/rpc/code.proto +++ b/google/rpc/code.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ option java_outer_classname = "CodeProto"; option java_package = "com.google.rpc"; option objc_class_prefix = "RPC"; -// The canonical error codes for Google APIs. +// The canonical error codes for gRPC APIs. // // // Sometimes multiple error codes may apply. Services should return @@ -170,7 +170,8 @@ enum Code { // The service is currently unavailable. This is most likely a // transient condition, which can be corrected by retrying with - // a backoff. + // a backoff. Note that it is not always safe to retry + // non-idempotent operations. // // See the guidelines above for deciding between `FAILED_PRECONDITION`, // `ABORTED`, and `UNAVAILABLE`. diff --git a/google/rpc/context/BUILD.bazel b/google/rpc/context/BUILD.bazel new file mode 100644 index 000000000..bc584e867 --- /dev/null +++ b/google/rpc/context/BUILD.bazel @@ -0,0 +1,129 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "attribute_context_proto", + srcs = [ + "attribute_context.proto", + ], + deps = [ + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_proto_library", +) + +java_proto_library( + name = "attribute_context_java_proto", + deps = [":attribute_context_proto"], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", +) + +go_proto_library( + name = "attribute_context_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/rpc/context/attribute_context", + protos = [":attribute_context_proto"], + deps = [ + + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_proto_library", +) + +moved_proto_library( + name = "attribute_context_moved_proto", + srcs = [":attribute_context_proto"], + deps = [ + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "attribute_context_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":attribute_context_moved_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_proto_library", +) + +php_proto_library( + name = "attribute_context_php_proto", + deps = [":attribute_context_proto"], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_proto_library", +) + +ruby_proto_library( + name = "attribute_context_ruby_proto", + deps = [":attribute_context_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_proto_library", +) + +csharp_proto_library( + name = "attribute_context_csharp_proto", + deps = [":attribute_context_proto"], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_proto_library", +) + +cc_proto_library( + name = "attribute_context_cc_proto", + deps = [":attribute_context_proto"], +) + + diff --git a/google/rpc/context/attribute_context.proto b/google/rpc/context/attribute_context.proto new file mode 100644 index 000000000..e60a5ae94 --- /dev/null +++ b/google/rpc/context/attribute_context.proto @@ -0,0 +1,287 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.rpc.context; + +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/rpc/context/attribute_context;attribute_context"; +option java_multiple_files = true; +option java_outer_classname = "AttributeContextProto"; +option java_package = "com.google.rpc.context"; + +// This message defines the standard attribute vocabulary for Google APIs. +// +// An attribute is a piece of metadata that describes an activity on a network +// service. For example, the size of an HTTP request, or the status code of +// an HTTP response. +// +// Each attribute has a type and a name, which is logically defined as +// a proto message field in `AttributeContext`. The field type becomes the +// attribute type, and the field path becomes the attribute name. For example, +// the attribute `source.ip` maps to field `AttributeContext.source.ip`. +// +// This message definition is guaranteed not to have any wire breaking change. +// So you can use it directly for passing attributes across different systems. +// +// NOTE: Different system may generate different subset of attributes. Please +// verify the system specification before relying on an attribute generated +// a system. +message AttributeContext { + // This message defines attributes for a node that handles a network request. + // The node can be either a service or an application that sends, forwards, + // or receives the request. Service peers should fill in + // `principal` and `labels` as appropriate. + message Peer { + // The IP address of the peer. + string ip = 1; + + // The network port of the peer. + int64 port = 2; + + // The labels associated with the peer. + map labels = 6; + + // The identity of this peer. Similar to `Request.auth.principal`, but + // relative to the peer instead of the request. For example, the + // idenity associated with a load balancer that forwared the request. + string principal = 7; + + // The CLDR country/region code associated with the above IP address. + // If the IP address is private, the `region_code` should reflect the + // physical location where this peer is running. + string region_code = 8; + } + + // This message defines attributes associated with API operations, such as + // a network API request. The terminology is based on the conventions used + // by Google APIs, Istio, and OpenAPI. + message Api { + // The API service name. It is a logical identifier for a networked API, + // such as "pubsub.googleapis.com". The naming syntax depends on the + // API management system being used for handling the request. + string service = 1; + + // The API operation name. For gRPC requests, it is the fully qualified API + // method name, such as "google.pubsub.v1.Publisher.Publish". For OpenAPI + // requests, it is the `operationId`, such as "getPet". + string operation = 2; + + // The API protocol used for sending the request, such as "http", "https", + // "grpc", or "internal". + string protocol = 3; + + // The API version associated with the API operation above, such as "v1" or + // "v1alpha1". + string version = 4; + } + + // This message defines request authentication attributes. Terminology is + // based on the JSON Web Token (JWT) standard, but the terms also + // correlate to concepts in other standards. + message Auth { + // The authenticated principal. Reflects the issuer (`iss`) and subject + // (`sub`) claims within a JWT. The issuer and subject should be `/` + // delimited, with `/` percent-encoded within the subject fragment. For + // Google accounts, the principal format is: + // "https://accounts.google.com/{id}" + string principal = 1; + + // The intended audience(s) for this authentication information. Reflects + // the audience (`aud`) claim within a JWT. The audience + // value(s) depends on the `issuer`, but typically include one or more of + // the following pieces of information: + // + // * The services intended to receive the credential such as + // ["pubsub.googleapis.com", "storage.googleapis.com"] + // * A set of service-based scopes. For example, + // ["https://www.googleapis.com/auth/cloud-platform"] + // * The client id of an app, such as the Firebase project id for JWTs + // from Firebase Auth. + // + // Consult the documentation for the credential issuer to determine the + // information provided. + repeated string audiences = 2; + + // The authorized presenter of the credential. Reflects the optional + // Authorized Presenter (`azp`) claim within a JWT or the + // OAuth client id. For example, a Google Cloud Platform client id looks + // as follows: "123456789012.apps.googleusercontent.com". + string presenter = 3; + + // Structured claims presented with the credential. JWTs include + // `{key: value}` pairs for standard and private claims. The following + // is a subset of the standard required and optional claims that would + // typically be presented for a Google-based JWT: + // + // {'iss': 'accounts.google.com', + // 'sub': '113289723416554971153', + // 'aud': ['123456789012', 'pubsub.googleapis.com'], + // 'azp': '123456789012.apps.googleusercontent.com', + // 'email': 'jsmith@example.com', + // 'iat': 1353601026, + // 'exp': 1353604926} + // + // SAML assertions are similarly specified, but with an identity provider + // dependent structure. + google.protobuf.Struct claims = 4; + + // A list of access level resource names that allow resources to be + // accessed by authenticated requester. It is part of Secure GCP processing + // for the incoming request. An access level string has the format: + // "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}" + // + // Example: + // "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL" + repeated string access_levels = 5; + } + + // This message defines attributes for an HTTP request. If the actual + // request is not an HTTP request, the runtime system should try to map + // the actual request to an equivalent HTTP request. + message Request { + // The unique ID for a request, which can be propagated to downstream + // systems. The ID should have low probability of collision + // within a single day for a specific service. + string id = 1; + + // The HTTP request method, such as `GET`, `POST`. + string method = 2; + + // The HTTP request headers. If multiple headers share the same key, they + // must be merged according to the HTTP spec. All header keys must be + // lowercased, because HTTP header keys are case-insensitive. + map headers = 3; + + // The HTTP URL path. + string path = 4; + + // The HTTP request `Host` header value. + string host = 5; + + // The HTTP URL scheme, such as `http` and `https`. + string scheme = 6; + + // The HTTP URL query in the format of `name1=value1&name2=value2`, as it + // appears in the first line of the HTTP request. No decoding is performed. + string query = 7; + + // The timestamp when the `destination` service receives the first byte of + // the request. + google.protobuf.Timestamp time = 9; + + // The HTTP request size in bytes. If unknown, it must be -1. + int64 size = 10; + + // The network protocol used with the request, such as "http/1.1", + // "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See + // https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids + // for details. + string protocol = 11; + + // A special parameter for request reason. It is used by security systems + // to associate auditing information with a request. + string reason = 12; + + // The request authentication. May be absent for unauthenticated requests. + // Derived from the HTTP request `Authorization` header or equivalent. + Auth auth = 13; + } + + // This message defines attributes for a typical network response. It + // generally models semantics of an HTTP response. + message Response { + // The HTTP response status code, such as `200` and `404`. + int64 code = 1; + + // The HTTP response size in bytes. If unknown, it must be -1. + int64 size = 2; + + // The HTTP response headers. If multiple headers share the same key, they + // must be merged according to HTTP spec. All header keys must be + // lowercased, because HTTP header keys are case-insensitive. + map headers = 3; + + // The timestamp when the `destination` service generates the first byte of + // the response. + google.protobuf.Timestamp time = 4; + } + + // This message defines core attributes for a resource. A resource is an + // addressable (named) entity provided by the destination service. For + // example, a file stored on a network storage service. + message Resource { + // The name of the service that this resource belongs to, such as + // `pubsub.googleapis.com`. The service may be different from the DNS + // hostname that actually serves the request. + string service = 1; + + // The stable identifier (name) of a resource on the `service`. A resource + // can be logically identified as "//{resource.service}/{resource.name}". + // The differences between a resource name and a URI are: + // + // * Resource name is a logical identifier, independent of network + // protocol and API version. For example, + // `//pubsub.googleapis.com/projects/123/topics/news-feed`. + // * URI often includes protocol and version information, so it can + // be used directly by applications. For example, + // `https://pubsub.googleapis.com/v1/projects/123/topics/news-feed`. + // + // See https://cloud.google.com/apis/design/resource_names for details. + string name = 2; + + // The type of the resource. The syntax is platform-specific because + // different platforms define their resources differently. + // + // For Google APIs, the type format must be "{service}/{kind}". + string type = 3; + + // The labels or tags on the resource, such as AWS resource tags and + // Kubernetes resource labels. + map labels = 4; + } + + // The origin of a network activity. In a multi hop network activity, + // the origin represents the sender of the first hop. For the first hop, + // the `source` and the `origin` must have the same content. + Peer origin = 7; + + // The source of a network activity, such as starting a TCP connection. + // In a multi hop network activity, the source represents the sender of the + // last hop. + Peer source = 1; + + // The destination of a network activity, such as accepting a TCP connection. + // In a multi hop network activity, the destination represents the receiver of + // the last hop. + Peer destination = 2; + + // Represents a network request, such as an HTTP request. + Request request = 3; + + // Represents a network response, such as an HTTP response. + Response response = 4; + + // Represents a target resource that is involved with a network activity. + // If multiple resources are involved with an activity, this must be the + // primary one. + Resource resource = 5; + + // Represents an API operation that is involved to a network activity. + Api api = 6; +} diff --git a/google/rpc/error_details.proto b/google/rpc/error_details.proto index 1f9ad5314..fd9361a0c 100644 --- a/google/rpc/error_details.proto +++ b/google/rpc/error_details.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ option objc_class_prefix = "RPC"; // receiving the error response before retrying. If retrying requests also // fail, clients should use an exponential backoff scheme to gradually increase // the delay between retries based on `retry_delay`, until either a maximum -// number of retires have been reached or a maximum retry delay cap has been +// number of retries have been reached or a maximum retry delay cap has been // reached. message RetryInfo { // Clients should wait at least this long between retrying the same request. @@ -60,7 +60,7 @@ message DebugInfo { // a service could respond with the project id and set `service_disabled` // to true. // -// Also see RetryDetail and Help types for other details about handling a +// Also see RetryInfo and Help types for other details about handling a // quota failure. message QuotaFailure { // A message type used to describe a single quota violation. For example, a @@ -85,6 +85,53 @@ message QuotaFailure { repeated Violation violations = 1; } +// Describes the cause of the error with structured details. +// +// Example of an error when contacting the "pubsub.googleapis.com" API when it +// is not enabled: +// { "reason": "API_DISABLED" +// "domain": "googleapis.com" +// "metadata": { +// "resource": "projects/123", +// "service": "pubsub.googleapis.com" +// } +// } +// This response indicates that the pubsub.googleapis.com API is not enabled. +// +// Example of an error that is returned when attempting to create a Spanner +// instance in a region that is out of stock: +// { "reason": "STOCKOUT" +// "domain": "spanner.googleapis.com", +// "metadata": { +// "availableRegions": "us-central1,us-east2" +// } +// } +// +message ErrorInfo { + // The reason of the error. This is a constant value that identifies the + // proximate cause of the error. Error reasons are unique within a particular + // domain of errors. This should be at most 63 characters and match + // /[A-Z0-9_]+/. + string reason = 1; + + // The logical grouping to which the "reason" belongs. Often "domain" will + // contain the registered service name of the tool or product that is the + // source of the error. Example: "pubsub.googleapis.com". If the error is + // common across many APIs, the first segment of the example above will be + // omitted. The value will be, "googleapis.com". + string domain = 2; + + // Additional structured details about this error. + // + // Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in + // length. When identifying the current value of an exceeded limit, the units + // should be contained in the key, not the value. For example, rather than + // {"instanceLimit": "100/request"}, should be returned as, + // {"instanceLimitPerRequest": "100"}, if the client exceeds the number of + // instances that can be created in a single (batch) request. + map metadata = 3; +} + // Describes what preconditions have failed. // // For example, if an RPC failed because it required the Terms of Service to be @@ -94,13 +141,13 @@ message PreconditionFailure { // A message type used to describe a single precondition failure. message Violation { // The type of PreconditionFailure. We recommend using a service-specific - // enum type to define the supported precondition violation types. For + // enum type to define the supported precondition violation subjects. For // example, "TOS" for "Terms of Service violation". string type = 1; // The subject, relative to the type, that failed. - // For example, "google.com/cloud" relative to the "TOS" type would - // indicate which terms of service is being referenced. + // For example, "google.com/cloud" relative to the "TOS" type would indicate + // which terms of service is being referenced. string subject = 2; // A description of how the precondition failed. Developers can use this @@ -153,8 +200,7 @@ message ResourceInfo { // The name of the resource being accessed. For example, a shared calendar // name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current - // error is - // [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. + // error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. string resource_name = 2; // The owner of the resource (optional). diff --git a/google/rpc/rpc_publish.yaml b/google/rpc/rpc_publish.yaml index ea91204fb..90a91e07d 100644 --- a/google/rpc/rpc_publish.yaml +++ b/google/rpc/rpc_publish.yaml @@ -1,5 +1,5 @@ type: google.api.Service -config_version: 0 +config_version: 1 name: rpc.googleapis.com title: Google RPC Types diff --git a/google/rpc/status.proto b/google/rpc/status.proto index b0daa3695..3b1f7a932 100644 --- a/google/rpc/status.proto +++ b/google/rpc/status.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package google.rpc; import "google/protobuf/any.proto"; +option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/rpc/status;status"; option java_multiple_files = true; option java_outer_classname = "StatusProto"; @@ -26,66 +27,18 @@ option objc_class_prefix = "RPC"; // The `Status` type defines a logical error model that is suitable for // different programming environments, including REST APIs and RPC APIs. It is -// used by [gRPC](https://github.com/grpc). The error model is designed to be: +// used by [gRPC](https://github.com/grpc). Each `Status` message contains +// three pieces of data: error code, error message, and error details. // -// - Simple to use and understand for most users -// - Flexible enough to meet unexpected needs -// -// # Overview -// -// The `Status` message contains three pieces of data: error code, error -// message, and error details. The error code should be an enum value of -// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes -// if needed. The error message should be a developer-facing English message -// that helps developers *understand* and *resolve* the error. If a localized -// user-facing error message is needed, put the localized message in the error -// details or localize it in the client. The optional error details may contain -// arbitrary information about the error. There is a predefined set of error -// detail types in the package `google.rpc` that can be used for common error -// conditions. -// -// # Language mapping -// -// The `Status` message is the logical representation of the error model, but it -// is not necessarily the actual wire format. When the `Status` message is -// exposed in different client libraries and different wire protocols, it can be -// mapped differently. For example, it will likely be mapped to some exceptions -// in Java, but more likely mapped to some error codes in C. -// -// # Other uses -// -// The error model and the `Status` message can be used in a variety of -// environments, either with or without APIs, to provide a -// consistent developer experience across different environments. -// -// Example uses of this error model include: -// -// - Partial errors. If a service needs to return partial errors to the client, -// it may embed the `Status` in the normal response to indicate the partial -// errors. -// -// - Workflow errors. A typical workflow has multiple steps. Each step may -// have a `Status` message for error reporting. -// -// - Batch operations. If a client uses batch request and batch response, the -// `Status` message should be used directly inside batch response, one for -// each error sub-response. -// -// - Asynchronous operations. If an API call embeds asynchronous operation -// results in its response, the status of those operations should be -// represented directly using the `Status` message. -// -// - Logging. If some API errors are stored in logs, the message `Status` could -// be used directly after any stripping needed for security/privacy reasons. +// You can find out more about this error model and how to work with it in the +// [API Design Guide](https://cloud.google.com/apis/design/errors). message Status { - // The status code, which should be an enum value of - // [google.rpc.Code][google.rpc.Code]. + // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. int32 code = 1; // A developer-facing error message, which should be in English. Any // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized - // by the client. + // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. string message = 2; // A list of messages that carry the error details. There is a common set of diff --git a/google/search/partnerdataingestion/logging/v1/BUILD.bazel b/google/search/partnerdataingestion/logging/v1/BUILD.bazel new file mode 100644 index 000000000..4599fe856 --- /dev/null +++ b/google/search/partnerdataingestion/logging/v1/BUILD.bazel @@ -0,0 +1,162 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "logging_proto", + srcs = [ + "platformlog.proto", + ], + deps = [ + + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "logging_java_proto", + deps = [":logging_proto"], +) + +java_grpc_library( + name = "logging_java_grpc", + srcs = [":logging_proto"], + deps = [":logging_java_proto"], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", +) + +go_proto_library( + name = "logging_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/search/partnerdataingestion/logging/v1", + protos = [":logging_proto"], + deps = [ + + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "logging_moved_proto", + srcs = [":logging_proto"], + deps = [ + + ], +) + +py_proto_library( + name = "logging_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":logging_moved_proto"], +) + +py_grpc_library( + name = "logging_py_grpc", + srcs = [":logging_moved_proto"], + deps = [":logging_py_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "logging_php_proto", + deps = [":logging_proto"], +) + +php_grpc_library( + name = "logging_php_grpc", + srcs = [":logging_proto"], + deps = [":logging_php_proto"], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "logging_ruby_proto", + deps = [":logging_proto"], +) + +ruby_grpc_library( + name = "logging_ruby_grpc", + srcs = [":logging_proto"], + deps = [":logging_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "logging_csharp_proto", + deps = [":logging_proto"], +) + +csharp_grpc_library( + name = "logging_csharp_grpc", + srcs = [":logging_proto"], + deps = [":logging_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ code here diff --git a/google/search/partnerdataingestion/logging/v1/platformlog.proto b/google/search/partnerdataingestion/logging/v1/platformlog.proto new file mode 100644 index 000000000..917a32495 --- /dev/null +++ b/google/search/partnerdataingestion/logging/v1/platformlog.proto @@ -0,0 +1,32 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.search.partnerdataingestion.logging.v1; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/search/partnerdataingestion/logging/v1;logging"; +option java_multiple_files = true; +option java_outer_classname = "PlatformLogProto"; +option java_package = "com.google.search.partnerdataingestion.logging.v1"; + +// Log message used to send to Platform Logging. +message IngestDetailsLog { + // Identification of the successfully accepted request. + string ingestion_tracking_id = 1; + + // The message content will be sent to Platform Logging. + string content = 2; +} diff --git a/google/spanner/BUILD.bazel b/google/spanner/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/spanner/BUILD.bazel +++ b/google/spanner/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/spanner/admin/database/BUILD.bazel b/google/spanner/admin/database/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/spanner/admin/database/BUILD.bazel +++ b/google/spanner/admin/database/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/spanner/admin/database/artman_spanner_admin_database.legacy.yaml b/google/spanner/admin/database/artman_spanner_admin_database.legacy.yaml new file mode 100644 index 000000000..10a63652f --- /dev/null +++ b/google/spanner/admin/database/artman_spanner_admin_database.legacy.yaml @@ -0,0 +1,20 @@ +common: + api_name: spanner-admin-database + api_version: v1 + organization_name: google-cloud + service_yaml: v1/spanner_admin_database.yaml + gapic_yaml: v1/spanner_admin_database_gapic.legacy.yaml + proto_package: google.spanner.admin.database.v1 + src_proto_paths: + - v1 + proto_deps: + - name: google-common-protos + - name: google-iam-v1 + proto_path: google/iam/v1 +artifacts: +- name: php_gapic + type: GAPIC + language: PHP +- name: ruby_gapic + type: GAPIC + language: RUBY diff --git a/google/spanner/admin/database/artman_spanner_admin_database.yaml b/google/spanner/admin/database/artman_spanner_admin_database.yaml index dddb18d9a..07c22170f 100644 --- a/google/spanner/admin/database/artman_spanner_admin_database.yaml +++ b/google/spanner/admin/database/artman_spanner_admin_database.yaml @@ -2,8 +2,9 @@ common: api_name: spanner-admin-database api_version: v1 organization_name: google-cloud - service_yaml: spanner_admin_database.yaml + service_yaml: v1/spanner_admin_database.yaml gapic_yaml: v1/spanner_admin_database_gapic.yaml + proto_package: google.spanner.admin.database.v1 src_proto_paths: - v1 proto_deps: @@ -17,12 +18,6 @@ artifacts: - name: python_gapic type: GAPIC language: PYTHON -- name: php_gapic - type: GAPIC - language: PHP -- name: ruby_gapic - type: GAPIC - language: RUBY - name: go_gapic type: GAPIC language: GO diff --git a/google/spanner/admin/database/v1/BUILD.bazel b/google/spanner/admin/database/v1/BUILD.bazel index ff2e6e98a..2acb01f60 100644 --- a/google/spanner/admin/database/v1/BUILD.bazel +++ b/google/spanner/admin/database/v1/BUILD.bazel @@ -1,115 +1,99 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "spanner_admin_database_proto", + name = "database_proto", srcs = [ + "backup.proto", + "common.proto", "spanner_database_admin.proto", ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/iam/v1:iam_policy_proto", "//google/iam/v1:policy_proto", "//google/longrunning:operations_proto", "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", "@com_google_protobuf//:timestamp_proto", ], ) proto_library_with_info( - name = "spanner_admin_database_proto_with_info", - deps = [":spanner_admin_database_proto"], + name = "database_proto_with_info", + deps = [ + ":database_proto", + "//google/cloud:common_resources_proto", + ], ) -#proto_library( -# name = "spanner_admin_database_proto_with_info", -# deps = [ -# ":spanner_admin_database_proto", -# "//google/api:annotations_proto", -# "//google/iam/v1:iam_policy_proto", -# "//google/iam/v1:policy_proto", -# "//google/longrunning:operations_proto", -# "@com_google_protobuf//:empty_proto", -# "@com_google_protobuf//:timestamp_proto", -# ], -#) - ############################################################################## # Java ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", - "@com_google_api_grpc_proto_google_iam_v1//jar", -] - java_proto_library( - name = "spanner_admin_database_java_proto", - deps = [":spanner_admin_database_proto"], + name = "database_java_proto", + deps = [":database_proto"], ) java_grpc_library( - name = "spanner_admin_database_java_grpc", - srcs = [":spanner_admin_database_proto"], - deps = [":spanner_admin_database_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "spanner_admin_database_resource_name_java_proto", - gapic_yaml = "spanner_admin_database_gapic.yaml", - deps = [":spanner_admin_database_proto"], + name = "database_java_grpc", + srcs = [":database_proto"], + deps = [":database_java_proto"], ) java_gapic_library( - name = "spanner_admin_database_java_gapic", - src = ":spanner_admin_database_proto_with_info", + name = "database_java_gapic", + src = ":database_proto_with_info", gapic_yaml = "spanner_admin_database_gapic.yaml", - service_yaml = "//google/spanner/admin/database:spanner_admin_database.yaml", - test_deps = [":spanner_admin_database_java_grpc"], + package = "google.spanner.admin.database.v1", + service_yaml = "spanner_admin_database.yaml", + test_deps = [ + ":database_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], deps = [ - ":spanner_admin_database_java_proto", - ":spanner_admin_database_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ":database_java_proto", + "//google/iam/v1:iam_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":spanner_admin_database_java_gapic_test", +java_gapic_test( + name = "database_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.spanner.admin.database.v1.DatabaseAdminClientTest", ], -) for test_name in [ - "com.google.cloud.spanner.admin.database.v1.DatabaseAdminClientTest", -]] + runtime_deps = [":database_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-spanner-admin-database-v1-java", - client_deps = [":spanner_admin_database_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":spanner_admin_database_java_gapic_test"], - grpc_deps = [":spanner_admin_database_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":spanner_admin_database_java_proto", - ":spanner_admin_database_proto", - ":spanner_admin_database_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + name = "google-cloud-admin-database-v1-java", + deps = [ + ":database_java_gapic", + ":database_java_grpc", + ":database_java_proto", + ":database_proto", + ], ) ############################################################################## @@ -117,17 +101,17 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "spanner_admin_database_go_proto", + name = "database_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/spanner/admin/database/v1", - protos = [":spanner_admin_database_proto"], + protos = [":database_proto"], deps = [ "//google/api:annotations_go_proto", "//google/iam/v1:iam_go_proto", @@ -136,34 +120,275 @@ go_proto_library( ) go_gapic_library( - name = "spanner_admin_database_go_gapic", - src = ":spanner_admin_database_proto_with_info", - gapic_yaml = "spanner_admin_database_gapic.yaml", - importpath = "cloud.google.com/go/spanner/admin/database/apiv1", - service_yaml = "//google/spanner/admin/database:spanner_admin_database.yaml", + name = "database_go_gapic", + srcs = [":database_proto_with_info"], + grpc_service_config = "spanner_admin_database_grpc_service_config.json", + importpath = "cloud.google.com/go/spanner/admin/database/apiv1;database", + service_yaml = "spanner_admin_database.yaml", deps = [ - ":spanner_admin_database_go_proto", + ":database_go_proto", "//google/iam/v1:iam_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", ], ) go_test( - name = "spanner_admin_database_go_gapic_test", - srcs = [":spanner_admin_database_go_gapic_srcjar_test"], - embed = [":spanner_admin_database_go_gapic"], + name = "database_go_gapic_test", + srcs = [":database_go_gapic_srcjar_test"], + embed = [":database_go_gapic"], importpath = "cloud.google.com/go/spanner/admin/database/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-spanner-admin-database-v1-go", + name = "gapi-cloud-admin-database-v1-go", + deps = [ + ":database_go_gapic", + ":database_go_gapic_srcjar-test.srcjar", + ":database_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "database_moved_proto", + srcs = [":database_proto"], deps = [ - ":spanner_admin_database_go_gapic", - ":spanner_admin_database_go_gapic_srcjar-smoke-test.srcjar", - ":spanner_admin_database_go_gapic_srcjar-test.srcjar", - ":spanner_admin_database_go_proto", + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", ], ) + +py_proto_library( + name = "database_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":database_moved_proto"], +) + +py_grpc_library( + name = "database_py_grpc", + srcs = [":database_moved_proto"], + deps = [":database_py_proto"], +) + +py_gapic_library( + name = "database_py_gapic", + src = ":database_proto_with_info", + gapic_yaml = "spanner_admin_database_gapic.yaml", + package = "google.spanner.admin.database.v1", + service_yaml = "spanner_admin_database.yaml", + deps = [ + ":database_py_grpc", + ":database_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "admin-database-v1-py", + deps = [ + ":database_py_gapic", + ":database_py_grpc", + ":database_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "database_php_proto", + deps = [":database_proto"], +) + +php_grpc_library( + name = "database_php_grpc", + srcs = [":database_proto"], + deps = [":database_php_proto"], +) + +php_gapic_library( + name = "database_php_gapic", + src = ":database_proto_with_info", + gapic_yaml = "spanner_admin_database_gapic.yaml", + package = "google.spanner.admin.database.v1", + service_yaml = "spanner_admin_database.yaml", + deps = [ + ":database_php_grpc", + ":database_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-admin-database-v1-php", + deps = [ + ":database_php_gapic", + ":database_php_grpc", + ":database_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "database_nodejs_gapic", + src = ":database_proto_with_info", + gapic_yaml = "spanner_admin_database_gapic.yaml", + package = "google.spanner.admin.database.v1", + service_yaml = "spanner_admin_database.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "admin-database-v1-nodejs", + deps = [ + ":database_nodejs_gapic", + ":database_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "database_ruby_proto", + deps = [":database_proto"], +) + +ruby_grpc_library( + name = "database_ruby_grpc", + srcs = [":database_proto"], + deps = [":database_ruby_proto"], +) + +ruby_gapic_library( + name = "database_ruby_gapic", + src = ":database_proto_with_info", + gapic_yaml = "spanner_admin_database_gapic.yaml", + package = "google.spanner.admin.database.v1", + service_yaml = "spanner_admin_database.yaml", + deps = [ + ":database_ruby_grpc", + ":database_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-admin-database-v1-ruby", + deps = [ + ":database_ruby_gapic", + ":database_ruby_grpc", + ":database_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "database_csharp_proto", + deps = [":database_proto"], +) + +csharp_grpc_library( + name = "database_csharp_grpc", + srcs = [":database_proto"], + deps = [":database_csharp_proto"], +) + +csharp_gapic_library( + name = "database_csharp_gapic", + src = ":database_proto_with_info", + gapic_yaml = "spanner_admin_database_gapic.yaml", + package = "google.spanner.admin.database.v1", + service_yaml = "spanner_admin_database.yaml", + deps = [ + ":database_csharp_grpc", + ":database_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-admin-database-v1-csharp", + deps = [ + ":database_csharp_gapic", + ":database_csharp_grpc", + ":database_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library") + +cc_proto_library( + name = "database_cc_proto", + deps = [":database_proto"], +) + +cc_grpc_library( + name = "database_cc_grpc", + srcs = [":database_proto"], + grpc_only = True, + deps = [":database_cc_proto"], +) diff --git a/google/spanner/admin/database/v1/backup.proto b/google/spanner/admin/database/v1/backup.proto new file mode 100644 index 000000000..b883adf34 --- /dev/null +++ b/google/spanner/admin/database/v1/backup.proto @@ -0,0 +1,365 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.spanner.admin.database.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/spanner/admin/database/v1/common.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Spanner.Admin.Database.V1"; +option go_package = "google.golang.org/genproto/googleapis/spanner/admin/database/v1;database"; +option java_multiple_files = true; +option java_outer_classname = "BackupProto"; +option java_package = "com.google.spanner.admin.database.v1"; +option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Database\\V1"; + +// A backup of a Cloud Spanner database. +message Backup { + option (google.api.resource) = { + type: "spanner.googleapis.com/Backup" + pattern: "projects/{project}/instances/{instance}/backups/{backup}" + }; + + // Indicates the current state of the backup. + enum State { + // Not specified. + STATE_UNSPECIFIED = 0; + + // The pending backup is still being created. Operations on the + // backup may fail with `FAILED_PRECONDITION` in this state. + CREATING = 1; + + // The backup is complete and ready for use. + READY = 2; + } + + // Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + // Name of the database from which this backup was + // created. This needs to be in the same instance as the backup. + // Values are of the form + // `projects//instances//databases/`. + string database = 2 [(google.api.resource_reference) = { + type: "spanner.googleapis.com/Database" + }]; + + // Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + // operation. The expiration time of the backup, with microseconds + // granularity that must be at least 6 hours and at most 366 days + // from the time the CreateBackup request is processed. Once the `expire_time` + // has passed, the backup is eligible to be automatically deleted by Cloud + // Spanner to free the resources used by the backup. + google.protobuf.Timestamp expire_time = 3; + + // Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + // Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation. + // + // A globally unique identifier for the backup which cannot be + // changed. Values are of the form + // `projects//instances//backups/[a-z][a-z0-9_\-]*[a-z0-9]` + // The final segment of the name must be between 2 and 60 characters + // in length. + // + // The backup is stored in the location(s) specified in the instance + // configuration of the instance containing the backup, identified + // by the prefix of the backup name of the form + // `projects//instances/`. + string name = 1; + + // Output only. The backup will contain an externally consistent + // copy of the database at the timestamp specified by + // `create_time`. `create_time` is approximately the time the + // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request is received. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Size of the backup in bytes. + int64 size_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the backup. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The names of the restored databases that reference the backup. + // The database names are of + // the form `projects//instances//databases/`. + // Referencing databases may exist in different instances. The existence of + // any referencing database prevents the backup from being deleted. When a + // restored database from the backup enters the `READY` state, the reference + // to the backup is removed. + repeated string referencing_databases = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request for [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. +message CreateBackupRequest { + // Required. The name of the instance in which the backup will be + // created. This must be the same instance that contains the database the + // backup will be created from. The backup will be stored in the + // location(s) specified in the instance configuration of this + // instance. Values are of the form + // `projects//instances/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Instance" + } + ]; + + // Required. The id of the backup to be created. The `backup_id` appended to + // `parent` forms the full backup name of the form + // `projects//instances//backups/`. + string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The backup to create. + Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata type for the operation returned by +// [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. +message CreateBackupMetadata { + // The name of the backup being created. + string name = 1; + + // The name of the database the backup is created from. + string database = 2; + + // The progress of the + // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + OperationProgress progress = 3; + + // The time at which cancellation of this operation was received. + // [Operations.CancelOperation][google.longrunning.Operations.CancelOperation] + // starts asynchronous cancellation on a long-running operation. The server + // makes a best effort to cancel the operation, but success is not guaranteed. + // Clients can use + // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or + // other methods to check whether the cancellation succeeded or whether the + // operation completed despite cancellation. On successful cancellation, + // the operation is not deleted; instead, it becomes an operation with + // an [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + google.protobuf.Timestamp cancel_time = 4; +} + +// The request for [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup]. +message UpdateBackupRequest { + // Required. The backup to update. `backup.name`, and the fields to be updated + // as specified by `update_mask` are required. Other fields are ignored. + // Update is only supported for the following fields: + // * `backup.expire_time`. + Backup backup = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A mask specifying which fields (e.g. `expire_time`) in the + // Backup resource should be updated. This mask is relative to the Backup + // resource, not to the request message. The field mask must always be + // specified; this prevents any future fields from being erased accidentally + // by clients that do not know about them. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request for [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup]. +message GetBackupRequest { + // Required. Name of the backup. + // Values are of the form + // `projects//instances//backups/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Backup" + } + ]; +} + +// The request for [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup]. +message DeleteBackupRequest { + // Required. Name of the backup to delete. + // Values are of the form + // `projects//instances//backups/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Backup" + } + ]; +} + +// The request for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]. +message ListBackupsRequest { + // Required. The instance to list backups from. Values are of the + // form `projects//instances/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Instance" + } + ]; + + // An expression that filters the list of returned backups. + // + // A filter expression consists of a field name, a comparison operator, and a + // value for filtering. + // The value must be a string, a number, or a boolean. The comparison operator + // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + // Colon `:` is the contains operator. Filter rules are not case sensitive. + // + // The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering: + // + // * `name` + // * `database` + // * `state` + // * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + // * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + // * `size_bytes` + // + // You can combine multiple expressions by enclosing each expression in + // parentheses. By default, expressions are combined with AND logic, but + // you can specify AND, OR, and NOT logic explicitly. + // + // Here are a few examples: + // + // * `name:Howl` - The backup's name contains the string "howl". + // * `database:prod` + // - The database's name contains the string "prod". + // * `state:CREATING` - The backup is pending creation. + // * `state:READY` - The backup is fully created and ready for use. + // * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` + // - The backup name contains the string "howl" and `create_time` + // of the backup is before 2018-03-28T14:50:00Z. + // * `expire_time < \"2018-03-28T14:50:00Z\"` + // - The backup `expire_time` is before 2018-03-28T14:50:00Z. + // * `size_bytes > 10000000000` - The backup's size is greater than 10GB + string filter = 2; + + // Number of backups to be returned in the response. If 0 or + // less, defaults to the server's maximum allowed page size. + int32 page_size = 3; + + // If non-empty, `page_token` should contain a + // [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a + // previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same `parent` and with the same + // `filter`. + string page_token = 4; +} + +// The response for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]. +message ListBackupsResponse { + // The list of matching backups. Backups returned are ordered by `create_time` + // in descending order, starting from the most recent `create_time`. + repeated Backup backups = 1; + + // `next_page_token` can be sent in a subsequent + // [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more + // of the matching backups. + string next_page_token = 2; +} + +// The request for +// [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations]. +message ListBackupOperationsRequest { + // Required. The instance of the backup operations. Values are of + // the form `projects//instances/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Instance" + } + ]; + + // An expression that filters the list of returned backup operations. + // + // A filter expression consists of a field name, a + // comparison operator, and a value for filtering. + // The value must be a string, a number, or a boolean. The comparison operator + // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + // Colon `:` is the contains operator. Filter rules are not case sensitive. + // + // The following fields in the [operation][google.longrunning.Operation] + // are eligible for filtering: + // + // * `name` - The name of the long-running operation + // * `done` - False if the operation is in progress, else true. + // * `metadata.@type` - the type of metadata. For example, the type string + // for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is + // `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. + // * `metadata.` - any field in metadata.value. + // * `error` - Error associated with the long-running operation. + // * `response.@type` - the type of response. + // * `response.` - any field in response.value. + // + // You can combine multiple expressions by enclosing each expression in + // parentheses. By default, expressions are combined with AND logic, but + // you can specify AND, OR, and NOT logic explicitly. + // + // Here are a few examples: + // + // * `done:true` - The operation is complete. + // * `metadata.database:prod` - The database the backup was taken from has + // a name containing the string "prod". + // * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND`
+ // `(metadata.name:howl) AND`
+ // `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND`
+ // `(error:*)` - Returns operations where: + // * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + // * The backup name contains the string "howl". + // * The operation started before 2018-03-28T14:50:00Z. + // * The operation resulted in an error. + string filter = 2; + + // Number of operations to be returned in the response. If 0 or + // less, defaults to the server's maximum allowed page size. + int32 page_size = 3; + + // If non-empty, `page_token` should contain a + // [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token] + // from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the + // same `parent` and with the same `filter`. + string page_token = 4; +} + +// The response for +// [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations]. +message ListBackupOperationsResponse { + // The list of matching backup [long-running + // operations][google.longrunning.Operation]. Each operation's name will be + // prefixed by the backup's name and the operation's + // [metadata][google.longrunning.Operation.metadata] will be of type + // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are + // pending or have completed/failed/canceled within the last 7 days. + // Operations returned are ordered by + // `operation.metadata.value.progress.start_time` in descending order starting + // from the most recently started operation. + repeated google.longrunning.Operation operations = 1; + + // `next_page_token` can be sent in a subsequent + // [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations] + // call to fetch more of the matching metadata. + string next_page_token = 2; +} + +// Information about a backup. +message BackupInfo { + // Name of the backup. + string backup = 1; + + // The backup contains an externally consistent copy of `source_database` at + // the timestamp specified by `create_time`. + google.protobuf.Timestamp create_time = 2; + + // Name of the database the backup was created from. + string source_database = 3; +} diff --git a/google/spanner/admin/database/v1/common.proto b/google/spanner/admin/database/v1/common.proto new file mode 100644 index 000000000..4914cb8ac --- /dev/null +++ b/google/spanner/admin/database/v1/common.proto @@ -0,0 +1,43 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.spanner.admin.database.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Spanner.Admin.Database.V1"; +option go_package = "google.golang.org/genproto/googleapis/spanner/admin/database/v1;database"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.spanner.admin.database.v1"; +option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Database\\V1"; + +// Encapsulates progress related information for a Cloud Spanner long +// running operation. +message OperationProgress { + // Percent completion of the operation. + // Values are between 0 and 100 inclusive. + int32 progress_percent = 1; + + // Time the request was received. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation failed or was completed + // successfully. + google.protobuf.Timestamp end_time = 3; +} diff --git a/google/spanner/admin/database/spanner_admin_database.yaml b/google/spanner/admin/database/v1/spanner_admin_database.yaml similarity index 100% rename from google/spanner/admin/database/spanner_admin_database.yaml rename to google/spanner/admin/database/v1/spanner_admin_database.yaml diff --git a/google/spanner/admin/database/v1/spanner_admin_database_gapic.legacy.yaml b/google/spanner/admin/database/v1/spanner_admin_database_gapic.legacy.yaml new file mode 100644 index 000000000..6155bfda8 --- /dev/null +++ b/google/spanner/admin/database/v1/spanner_admin_database_gapic.legacy.yaml @@ -0,0 +1,396 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.spanner.admin.database.v1 + python: + package_name: google.cloud.spanner_admin_database_v1.gapic + go: + package_name: cloud.google.com/go/spanner/admin/database/apiv1 + csharp: + package_name: Google.Cloud.Spanner.Admin.Database.V1 + ruby: + package_name: Google::Cloud::Spanner::Admin::Database::V1 + php: + package_name: Google\Cloud\Spanner\Admin\Database\V1 + nodejs: + package_name: spanner.v1 + domain_layer_location: google-cloud +interfaces: +- name: google.spanner.admin.database.v1.DatabaseAdmin + collections: + - name_pattern: projects/{project}/instances/{instance} + entity_name: instance + language_overrides: + - language: csharp + common_resource_name: Google.Cloud.Spanner.Common.V1.InstanceName + - name_pattern: projects/{project}/instances/{instance}/backups/{backup} + entity_name: backup + - name_pattern: projects/{project}/instances/{instance}/databases/{database} + entity_name: database + language_overrides: + - language: csharp + common_resource_name: Google.Cloud.Spanner.Common.V1.DatabaseName + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 1000 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 32000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: ListDatabases + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: databases + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: instance + timeout_millis: 30000 + - name: CreateDatabase + flattening: + groups: + - parameters: + - parent + - create_statement + required_fields: + - parent + - create_statement + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: instance + timeout_millis: 3600000 + long_running: + return_type: google.spanner.admin.database.v1.Database + metadata_type: google.spanner.admin.database.v1.CreateDatabaseMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + - name: GetDatabase + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: database + timeout_millis: 30000 + - name: UpdateDatabaseDdl + flattening: + groups: + - parameters: + - database + - statements + required_fields: + - database + - statements + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + database: database + timeout_millis: 3600000 + long_running: + return_type: google.protobuf.Empty + metadata_type: google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + - name: DropDatabase + flattening: + groups: + - parameters: + - database + required_fields: + - database + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + database: database + timeout_millis: 3600000 + - name: GetDatabaseDdl + flattening: + groups: + - parameters: + - database + required_fields: + - database + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + database: database + timeout_millis: 30000 + - name: SetIamPolicy + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: database + timeout_millis: 30000 + - name: GetIamPolicy + flattening: + groups: + - parameters: + - resource + required_fields: + - resource + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + resource: database + timeout_millis: 30000 + - name: TestIamPermissions + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: database + timeout_millis: 30000 + - name: CreateBackup + flattening: + groups: + - parameters: + - parent + - backup_id + - backup + required_fields: + - parent + - backup_id + - backup + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: instance + long_running: + return_type: google.spanner.admin.database.v1.Backup + metadata_type: google.spanner.admin.database.v1.CreateBackupMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 172800000 + timeout_millis: 3600000 + - name: GetBackup + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: backup + timeout_millis: 600000 + - name: UpdateBackup + flattening: + groups: + - parameters: + - backup + - update_mask + required_fields: + - backup + - update_mask + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + backup.name: backup + timeout_millis: 600000 + - name: DeleteBackup + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: backup + timeout_millis: 3600000 + - name: ListBackups + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + - filter + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: backups + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: instance + timeout_millis: 600000 + - name: RestoreDatabase + flattening: + groups: + - parameters: + - parent + - database_id + required_fields: + - parent + - database_id + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: instance + long_running: + return_type: google.spanner.admin.database.v1.Database + metadata_type: google.spanner.admin.database.v1.RestoreDatabaseMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + timeout_millis: 3600000 + - name: ListDatabaseOperations + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + - filter + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: operations + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: instance + timeout_millis: 600000 + - name: ListBackupOperations + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + - filter + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: operations + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: instance + timeout_millis: 600000 +resource_name_generation: +- message_name: ListDatabasesRequest + field_entity_map: + parent: instance +- message_name: CreateDatabaseRequest + field_entity_map: + parent: instance +- message_name: CreateDatabaseMetadata + field_entity_map: + database: database +- message_name: GetDatabaseRequest + field_entity_map: + name: database +- message_name: UpdateDatabaseDdlRequest + field_entity_map: + database: database +- message_name: UpdateDatabaseDdlMetadata + field_entity_map: + database: database +- message_name: DropDatabaseRequest + field_entity_map: + database: database +- message_name: GetDatabaseDdlRequest + field_entity_map: + database: database +- message_name: Database + field_entity_map: + name: database +- message_name: Backup + field_entity_map: + name: backup +- message_name: CreateBackupRequest + field_entity_map: + parent: instance +- message_name: CreateBackupMetadata + field_entity_map: + name: backup + database: database +- message_name: UpdateBackupRequest +- message_name: GetBackupRequest + field_entity_map: + name: backup +- message_name: DeleteBackupRequest + field_entity_map: + name: backup +- message_name: ListBackupsRequest + field_entity_map: + parent: instance +- message_name: ListBackupsResponse +- message_name: ListDatabaseOperationsRequest + field_entity_map: + parent: instance +- message_name: ListDatabaseOperationsResponse +- message_name: RestoreDatabaseRequest + field_entity_map: + parent: instance + database_id: database +- message_name: RestoreDatabaseMetadata diff --git a/google/spanner/admin/database/v1/spanner_admin_database_gapic.yaml b/google/spanner/admin/database/v1/spanner_admin_database_gapic.yaml index 719839491..0df2c7710 100644 --- a/google/spanner/admin/database/v1/spanner_admin_database_gapic.yaml +++ b/google/spanner/admin/database/v1/spanner_admin_database_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.spanner.admin.database.v1 @@ -18,17 +18,6 @@ language_settings: domain_layer_location: google-cloud interfaces: - name: google.spanner.admin.database.v1.DatabaseAdmin - collections: - - name_pattern: projects/{project}/instances/{instance} - entity_name: instance - language_overrides: - - language: csharp - common_resource_name: Google.Cloud.Spanner.Common.V1.InstanceName - - name_pattern: projects/{project}/instances/{instance}/databases/{database} - entity_name: database - language_overrides: - - language: csharp - common_resource_name: Google.Cloud.Spanner.Common.V1.DatabaseName retry_codes_def: - name: idempotent retry_codes: @@ -46,174 +35,77 @@ interfaces: max_rpc_timeout_millis: 60000 total_timeout_millis: 600000 methods: - - name: ListDatabases - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: databases - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: instance - timeout_millis: 30000 - name: CreateDatabase - flattening: - groups: - - parameters: - - parent - - create_statement - required_fields: - - parent - - create_statement - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: instance - timeout_millis: 3600000 long_running: - return_type: google.spanner.admin.database.v1.Database - metadata_type: google.spanner.admin.database.v1.CreateDatabaseMetadata initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 + timeout_millis: 3600000 - name: GetDatabase - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: database timeout_millis: 30000 - name: UpdateDatabaseDdl - flattening: - groups: - - parameters: - - database - - statements - required_fields: - - database - - statements - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - database: database - timeout_millis: 3600000 long_running: - return_type: google.protobuf.Empty - metadata_type: google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 + timeout_millis: 3600000 - name: DropDatabase - flattening: - groups: - - parameters: - - database - required_fields: - - database - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - database: database timeout_millis: 3600000 - name: GetDatabaseDdl - flattening: - groups: - - parameters: - - database - required_fields: - - database - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - database: database timeout_millis: 30000 - name: SetIamPolicy - flattening: - groups: - - parameters: - - resource - - policy - required_fields: - - resource - - policy - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: database timeout_millis: 30000 - name: GetIamPolicy - flattening: - groups: - - parameters: - - resource - required_fields: - - resource retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - resource: database timeout_millis: 30000 - name: TestIamPermissions - flattening: - groups: - - parameters: - - resource - - permissions - required_fields: - - resource - - permissions + timeout_millis: 30000 + - name: CreateBackup retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - resource: database - timeout_millis: 30000 -resource_name_generation: -- message_name: ListDatabasesRequest - field_entity_map: - parent: instance -- message_name: CreateDatabaseRequest - field_entity_map: - parent: instance -- message_name: CreateDatabaseMetadata - field_entity_map: - database: database -- message_name: GetDatabaseRequest - field_entity_map: - name: database -- message_name: UpdateDatabaseDdlRequest - field_entity_map: - database: database -- message_name: UpdateDatabaseDdlMetadata - field_entity_map: - database: database -- message_name: DropDatabaseRequest - field_entity_map: - database: database -- message_name: GetDatabaseDdlRequest - field_entity_map: - database: database -- message_name: Database - field_entity_map: - name: database + long_running: + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 172800000 + timeout_millis: 3600000 + - name: GetBackup + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 600000 + - name: UpdateBackup + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 600000 + - name: DeleteBackup + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 3600000 + - name: ListBackups + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 600000 + - name: RestoreDatabase + retry_codes_name: non_idempotent + retry_params_name: default + long_running: + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + timeout_millis: 3600000 + - name: ListDatabaseOperations + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 600000 + - name: ListBackupOperations + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 600000 diff --git a/google/spanner/admin/database/v1/spanner_admin_database_grpc_service_config.json b/google/spanner/admin/database/v1/spanner_admin_database_grpc_service_config.json new file mode 100755 index 000000000..e19bb95b9 --- /dev/null +++ b/google/spanner/admin/database/v1/spanner_admin_database_grpc_service_config.json @@ -0,0 +1,91 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "ListDatabases" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "GetDatabase" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "UpdateDatabaseDdl" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "DropDatabase" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "GetDatabaseDdl" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "GetIamPolicy" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "GetBackup" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "UpdateBackup" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "DeleteBackup" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "ListBackups" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "RestoreDatabase" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "ListDatabaseOperations" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "ListBackupOperations" + } + ], + "timeout": "3600s", + "retryPolicy": { + "initialBackoff": "1s", + "maxBackoff": "32s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "CreateDatabase" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "SetIamPolicy" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "TestIamPermissions" + }, + { + "service": "google.spanner.admin.database.v1.DatabaseAdmin", + "method": "CreateBackup" + } + ], + "timeout": "3600s" + } + ] +} diff --git a/google/spanner/admin/database/v1/spanner_database_admin.proto b/google/spanner/admin/database/v1/spanner_database_admin.proto index 491606e6f..d48adc8ab 100644 --- a/google/spanner/admin/database/v1/spanner_database_admin.proto +++ b/google/spanner/admin/database/v1/spanner_database_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,11 +17,16 @@ syntax = "proto3"; package google.spanner.admin.database.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; +import "google/spanner/admin/database/v1/backup.proto"; +import "google/spanner/admin/database/v1/common.proto"; option csharp_namespace = "Google.Cloud.Spanner.Admin.Database.V1"; option go_package = "google.golang.org/genproto/googleapis/spanner/admin/database/v1;database"; @@ -29,18 +34,29 @@ option java_multiple_files = true; option java_outer_classname = "SpannerDatabaseAdminProto"; option java_package = "com.google.spanner.admin.database.v1"; option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Database\\V1"; +option (google.api.resource_definition) = { + type: "spanner.googleapis.com/Instance" + pattern: "projects/{project}/instances/{instance}" +}; // Cloud Spanner Database Admin API // // The Cloud Spanner Database Admin API can be used to create, drop, and // list databases. It also enables updating the schema of pre-existing -// databases. +// databases. It can be also used to create, delete and list backups for a +// database and to restore from an existing backup. service DatabaseAdmin { + option (google.api.default_host) = "spanner.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/spanner.admin"; + // Lists Cloud Spanner databases. rpc ListDatabases(ListDatabasesRequest) returns (ListDatabasesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/instances/*}/databases" }; + option (google.api.method_signature) = "parent"; } // Creates a new Cloud Spanner database and starts to prepare it for serving. @@ -48,15 +64,19 @@ service DatabaseAdmin { // have a name of the format `/operations/` and // can be used to track preparation of the database. The // [metadata][google.longrunning.Operation.metadata] field type is - // [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. - // The [response][google.longrunning.Operation.response] field type is + // [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The + // [response][google.longrunning.Operation.response] field type is // [Database][google.spanner.admin.database.v1.Database], if successful. - rpc CreateDatabase(CreateDatabaseRequest) - returns (google.longrunning.Operation) { + rpc CreateDatabase(CreateDatabaseRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/instances/*}/databases" body: "*" }; + option (google.api.method_signature) = "parent,create_statement"; + option (google.longrunning.operation_info) = { + response_type: "google.spanner.admin.database.v1.Database" + metadata_type: "google.spanner.admin.database.v1.CreateDatabaseMetadata" + }; } // Gets the state of a Cloud Spanner database. @@ -64,6 +84,7 @@ service DatabaseAdmin { option (google.api.http) = { get: "/v1/{name=projects/*/instances/*/databases/*}" }; + option (google.api.method_signature) = "name"; } // Updates the schema of a Cloud Spanner database by @@ -72,21 +93,27 @@ service DatabaseAdmin { // the format `/operations/` and can be used to // track execution of the schema change(s). The // [metadata][google.longrunning.Operation.metadata] field type is - // [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. - // The operation has no response. - rpc UpdateDatabaseDdl(UpdateDatabaseDdlRequest) - returns (google.longrunning.Operation) { + // [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response. + rpc UpdateDatabaseDdl(UpdateDatabaseDdlRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{database=projects/*/instances/*/databases/*}/ddl" body: "*" }; + option (google.api.method_signature) = "database,statements"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata" + }; } // Drops (aka deletes) a Cloud Spanner database. + // Completed backups for the database will be retained according to their + // `expire_time`. rpc DropDatabase(DropDatabaseRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{database=projects/*/instances/*/databases/*}" }; + option (google.api.method_signature) = "database"; } // Returns the schema of a Cloud Spanner database as a list of formatted @@ -96,51 +123,211 @@ service DatabaseAdmin { option (google.api.http) = { get: "/v1/{database=projects/*/instances/*/databases/*}/ddl" }; + option (google.api.method_signature) = "database"; } - // Sets the access control policy on a database resource. Replaces any - // existing policy. + // Sets the access control policy on a database or backup resource. + // Replaces any existing policy. // - // Authorization requires `spanner.databases.setIamPolicy` permission on - // [resource][google.iam.v1.SetIamPolicyRequest.resource]. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { + // Authorization requires `spanner.databases.setIamPolicy` + // permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. + // For backups, authorization requires `spanner.backups.setIamPolicy` + // permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy" body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/instances/*/backups/*}:setIamPolicy" + body: "*" + } }; + option (google.api.method_signature) = "resource,policy"; } - // Gets the access control policy for a database resource. Returns an empty - // policy if a database exists but does not have a policy set. + // Gets the access control policy for a database or backup resource. + // Returns an empty policy if a database or backup exists but does not have a + // policy set. // // Authorization requires `spanner.databases.getIamPolicy` permission on // [resource][google.iam.v1.GetIamPolicyRequest.resource]. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { + // For backups, authorization requires `spanner.backups.getIamPolicy` + // permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy" body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/instances/*/backups/*}:getIamPolicy" + body: "*" + } }; + option (google.api.method_signature) = "resource"; } - // Returns permissions that the caller has on the specified database resource. + // Returns permissions that the caller has on the specified database or backup + // resource. // - // Attempting this RPC on a non-existent Cloud Spanner database will result in - // a NOT_FOUND error if the user has `spanner.databases.list` permission on - // the containing Cloud Spanner instance. Otherwise returns an empty set of - // permissions. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { + // Attempting this RPC on a non-existent Cloud Spanner database will + // result in a NOT_FOUND error if the user has + // `spanner.databases.list` permission on the containing Cloud + // Spanner instance. Otherwise returns an empty set of permissions. + // Calling this method on a backup that does not exist will + // result in a NOT_FOUND error if the user has + // `spanner.backups.list` permission on the containing instance. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1/{resource=projects/*/instances/*/databases/*}:testIamPermissions" body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/instances/*/backups/*}:testIamPermissions" + body: "*" + } + }; + option (google.api.method_signature) = "resource,permissions"; + } + + // Starts creating a new Cloud Spanner Backup. + // The returned backup [long-running operation][google.longrunning.Operation] + // will have a name of the format + // `projects//instances//backups//operations/` + // and can be used to track creation of the backup. The + // [metadata][google.longrunning.Operation.metadata] field type is + // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The + // [response][google.longrunning.Operation.response] field type is + // [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the + // creation and delete the backup. + // There can be only one pending backup creation per database. Backup creation + // of different databases can run concurrently. + rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/instances/*}/backups" + body: "backup" + }; + option (google.api.method_signature) = "parent,backup,backup_id"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "google.spanner.admin.database.v1.CreateBackupMetadata" + }; + } + + // Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + rpc GetBackup(GetBackupRequest) returns (Backup) { + option (google.api.http) = { + get: "/v1/{name=projects/*/instances/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + rpc UpdateBackup(UpdateBackupRequest) returns (Backup) { + option (google.api.http) = { + patch: "/v1/{backup.name=projects/*/instances/*/backups/*}" + body: "backup" + }; + option (google.api.method_signature) = "backup,update_mask"; + } + + // Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + rpc DeleteBackup(DeleteBackupRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/instances/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists completed and pending backups. + // Backups returned are ordered by `create_time` in descending order, + // starting from the most recent `create_time`. + rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/instances/*}/backups" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a new database by restoring from a completed backup. The new + // database must be in the same project and in an instance with the same + // instance configuration as the instance containing + // the backup. The returned database [long-running + // operation][google.longrunning.Operation] has a name of the format + // `projects//instances//databases//operations/`, + // and can be used to track the progress of the operation, and to cancel it. + // The [metadata][google.longrunning.Operation.metadata] field type is + // [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. + // The [response][google.longrunning.Operation.response] type + // is [Database][google.spanner.admin.database.v1.Database], if + // successful. Cancelling the returned operation will stop the restore and + // delete the database. + // There can be only one database being restored into an instance at a time. + // Once the restore operation completes, a new restore operation can be + // initiated, without waiting for the optimize operation associated with the + // first restore to complete. + rpc RestoreDatabase(RestoreDatabaseRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/instances/*}/databases:restore" + body: "*" + }; + option (google.api.method_signature) = "parent,database_id,backup"; + option (google.longrunning.operation_info) = { + response_type: "google.spanner.admin.database.v1.Database" + metadata_type: "google.spanner.admin.database.v1.RestoreDatabaseMetadata" + }; + } + + // Lists database [longrunning-operations][google.longrunning.Operation]. + // A database operation has a name of the form + // `projects//instances//databases//operations/`. + // The long-running operation + // [metadata][google.longrunning.Operation.metadata] field type + // `metadata.type_url` describes the type of the metadata. Operations returned + // include those that have completed/failed/canceled within the last 7 days, + // and pending operations. + rpc ListDatabaseOperations(ListDatabaseOperationsRequest) returns (ListDatabaseOperationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/instances/*}/databaseOperations" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists the backup [long-running operations][google.longrunning.Operation] in + // the given instance. A backup operation has a name of the form + // `projects//instances//backups//operations/`. + // The long-running operation + // [metadata][google.longrunning.Operation.metadata] field type + // `metadata.type_url` describes the type of the metadata. Operations returned + // include those that have completed/failed/canceled within the last 7 days, + // and pending operations. Operations returned are ordered by + // `operation.metadata.value.progress.start_time` in descending order starting + // from the most recently started operation. + rpc ListBackupOperations(ListBackupOperationsRequest) returns (ListBackupOperationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/instances/*}/backupOperations" }; + option (google.api.method_signature) = "parent"; + } +} + +// Information about the database restore. +message RestoreInfo { + // The type of the restore source. + RestoreSourceType source_type = 1; + + // Information about the source used to restore the database. + oneof source_info { + // Information about the backup used to restore the database. The backup + // may no longer exist. + BackupInfo backup_info = 2; } } // A Cloud Spanner database. message Database { + option (google.api.resource) = { + type: "spanner.googleapis.com/Database" + pattern: "projects/{project}/instances/{instance}/databases/{database}" + }; + // Indicates the current state of the database. enum State { // Not specified. @@ -152,6 +339,16 @@ message Database { // The database is fully created and ready for use. READY = 2; + + // The database is fully created and ready for use, but is still + // being optimized for performance and cannot handle full load. + // + // In this state, the database still references the backup + // it was restore from, preventing the backup + // from being deleted. When optimizations are complete, the full performance + // of the database will be restored, and the database will transition to + // `READY` state. + READY_OPTIMIZING = 3; } // Required. The name of the database. Values are of the form @@ -159,76 +356,95 @@ message Database { // where `` is as specified in the `CREATE DATABASE` // statement. This name can be passed to other API methods to // identify the database. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Output only. The current database state. - State state = 2; + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If exists, the time at which the database creation started. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Applicable only for restored databases. Contains information + // about the restore source. + RestoreInfo restore_info = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// The request for -// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. +// The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. message ListDatabasesRequest { // Required. The instance whose databases should be listed. // Values are of the form `projects//instances/`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Instance" + } + ]; // Number of databases to be returned in the response. If 0 or less, // defaults to the server's maximum allowed page size. int32 page_size = 3; // If non-empty, `page_token` should contain a - // [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] - // from a previous - // [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse]. + // [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a + // previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse]. string page_token = 4; } -// The response for -// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. +// The response for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. message ListDatabasesResponse { // Databases that matched the request. repeated Database databases = 1; // `next_page_token` can be sent in a subsequent - // [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] - // call to fetch more of the matching databases. + // [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more + // of the matching databases. string next_page_token = 2; } -// The request for -// [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. +// The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. message CreateDatabaseRequest { // Required. The name of the instance that will serve the new database. // Values are of the form `projects//instances/`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Instance" + } + ]; // Required. A `CREATE DATABASE` statement, which specifies the ID of the // new database. The database ID must conform to the regular expression // `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length. // If the database ID is a reserved word or if it contains a hyphen, the // database ID must be enclosed in backticks (`` ` ``). - string create_statement = 2; + string create_statement = 2 [(google.api.field_behavior) = REQUIRED]; - // An optional list of DDL statements to run inside the newly created + // Optional. A list of DDL statements to run inside the newly created // database. Statements can create tables, indexes, etc. These // statements execute atomically with the creation of the database: // if there is an error in any statement, the database is not created. - repeated string extra_statements = 3; + repeated string extra_statements = 3 [(google.api.field_behavior) = OPTIONAL]; } // Metadata type for the operation returned by // [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. message CreateDatabaseMetadata { // The database being created. - string database = 1; + string database = 1 [(google.api.resource_reference) = { + type: "spanner.googleapis.com/Database" + }]; } -// The request for -// [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase]. +// The request for [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase]. message GetDatabaseRequest { // Required. The name of the requested database. Values are of the form // `projects//instances//databases/`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Database" + } + ]; } // Enqueues the given DDL statements to be applied, in order but not @@ -245,14 +461,19 @@ message GetDatabaseRequest { // Each batch of statements is assigned a name which can be used with // the [Operations][google.longrunning.Operations] API to monitor // progress. See the -// [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] -// field for more details. +// [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more +// details. message UpdateDatabaseDdlRequest { // Required. The database to update. - string database = 1; + string database = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Database" + } + ]; - // DDL statements to be applied to the database. - repeated string statements = 2; + // Required. DDL statements to be applied to the database. + repeated string statements = 2 [(google.api.field_behavior) = REQUIRED]; // If empty, the new update request is assigned an // automatically-generated operation ID. Otherwise, `operation_id` @@ -261,20 +482,18 @@ message UpdateDatabaseDdlRequest { // // Specifying an explicit operation ID simplifies determining // whether the statements were executed in the event that the - // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] - // call is replayed, or the return value is otherwise lost: the - // [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] - // and `operation_id` fields can be combined to form the + // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed, + // or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and + // `operation_id` fields can be combined to form the // [name][google.longrunning.Operation.name] of the resulting - // [longrunning.Operation][google.longrunning.Operation]: - // `/operations/`. + // [longrunning.Operation][google.longrunning.Operation]: `/operations/`. // // `operation_id` should be unique within the database, and must be // a valid identifier: `[a-z][a-z0-9_]*`. Note that // automatically-generated operation IDs always begin with an // underscore. If the named operation already exists, - // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] - // returns `ALREADY_EXISTS`. + // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns + // `ALREADY_EXISTS`. string operation_id = 3; } @@ -282,7 +501,9 @@ message UpdateDatabaseDdlRequest { // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. message UpdateDatabaseDdlMetadata { // The database being modified. - string database = 1; + string database = 1 [(google.api.resource_reference) = { + type: "spanner.googleapis.com/Database" + }]; // For an update this list contains all the statements. For an // individual statement, this list contains only that statement. @@ -294,24 +515,212 @@ message UpdateDatabaseDdlMetadata { repeated google.protobuf.Timestamp commit_timestamps = 3; } -// The request for -// [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase]. +// The request for [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase]. message DropDatabaseRequest { // Required. The database to be dropped. - string database = 1; + string database = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Database" + } + ]; } -// The request for -// [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. +// The request for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. message GetDatabaseDdlRequest { // Required. The database whose schema we wish to get. - string database = 1; + string database = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Database" + } + ]; } -// The response for -// [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. +// The response for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. message GetDatabaseDdlResponse { // A list of formatted DDL statements defining the schema of the database // specified in the request. repeated string statements = 1; } + +// The request for +// [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations]. +message ListDatabaseOperationsRequest { + // Required. The instance of the database operations. + // Values are of the form `projects//instances/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Instance" + } + ]; + + // An expression that filters the list of returned operations. + // + // A filter expression consists of a field name, a + // comparison operator, and a value for filtering. + // The value must be a string, a number, or a boolean. The comparison operator + // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + // Colon `:` is the contains operator. Filter rules are not case sensitive. + // + // The following fields in the [Operation][google.longrunning.Operation] + // are eligible for filtering: + // + // * `name` - The name of the long-running operation + // * `done` - False if the operation is in progress, else true. + // * `metadata.@type` - the type of metadata. For example, the type string + // for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is + // `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. + // * `metadata.` - any field in metadata.value. + // * `error` - Error associated with the long-running operation. + // * `response.@type` - the type of response. + // * `response.` - any field in response.value. + // + // You can combine multiple expressions by enclosing each expression in + // parentheses. By default, expressions are combined with AND logic. However, + // you can specify AND, OR, and NOT logic explicitly. + // + // Here are a few examples: + // + // * `done:true` - The operation is complete. + // * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND`
+ // `(metadata.source_type:BACKUP) AND`
+ // `(metadata.backup_info.backup:backup_howl) AND`
+ // `(metadata.name:restored_howl) AND`
+ // `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND`
+ // `(error:*)` - Return operations where: + // * The operation's metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. + // * The database is restored from a backup. + // * The backup name contains "backup_howl". + // * The restored database's name contains "restored_howl". + // * The operation started before 2018-03-28T14:50:00Z. + // * The operation resulted in an error. + string filter = 2; + + // Number of operations to be returned in the response. If 0 or + // less, defaults to the server's maximum allowed page size. + int32 page_size = 3; + + // If non-empty, `page_token` should contain a + // [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token] + // from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the + // same `parent` and with the same `filter`. + string page_token = 4; +} + +// The response for +// [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations]. +message ListDatabaseOperationsResponse { + // The list of matching database [long-running + // operations][google.longrunning.Operation]. Each operation's name will be + // prefixed by the database's name. The operation's + // [metadata][google.longrunning.Operation.metadata] field type + // `metadata.type_url` describes the type of the metadata. + repeated google.longrunning.Operation operations = 1; + + // `next_page_token` can be sent in a subsequent + // [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations] + // call to fetch more of the matching metadata. + string next_page_token = 2; +} + +// The request for +// [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase]. +message RestoreDatabaseRequest { + // Required. The name of the instance in which to create the + // restored database. This instance must be in the same project and + // have the same instance configuration as the instance containing + // the source backup. Values are of the form + // `projects//instances/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Instance" + } + ]; + + // Required. The id of the database to create and restore to. This + // database must not already exist. The `database_id` appended to + // `parent` forms the full database name of the form + // `projects//instances//databases/`. + string database_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The source from which to restore. + oneof source { + // Name of the backup from which to restore. Values are of the form + // `projects//instances//backups/`. + string backup = 3 [(google.api.resource_reference) = { + type: "spanner.googleapis.com/Backup" + }]; + } +} + +// Metadata type for the long-running operation returned by +// [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase]. +message RestoreDatabaseMetadata { + // Name of the database being created and restored to. + string name = 1; + + // The type of the restore source. + RestoreSourceType source_type = 2; + + // Information about the source used to restore the database, as specified by + // `source` in [RestoreDatabaseRequest][google.spanner.admin.database.v1.RestoreDatabaseRequest]. + oneof source_info { + // Information about the backup used to restore the database. + BackupInfo backup_info = 3; + } + + // The progress of the + // [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase] + // operation. + OperationProgress progress = 4; + + // The time at which cancellation of this operation was received. + // [Operations.CancelOperation][google.longrunning.Operations.CancelOperation] + // starts asynchronous cancellation on a long-running operation. The server + // makes a best effort to cancel the operation, but success is not guaranteed. + // Clients can use + // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or + // other methods to check whether the cancellation succeeded or whether the + // operation completed despite cancellation. On successful cancellation, + // the operation is not deleted; instead, it becomes an operation with + // an [Operation.error][google.longrunning.Operation.error] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`. + google.protobuf.Timestamp cancel_time = 5; + + // If exists, the name of the long-running operation that will be used to + // track the post-restore optimization process to optimize the performance of + // the restored database, and remove the dependency on the restore source. + // The name is of the form + // `projects//instances//databases//operations/` + // where the is the name of database being created and restored to. + // The metadata type of the long-running operation is + // [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be + // automatically created by the system after the RestoreDatabase long-running + // operation completes successfully. This operation will not be created if the + // restore was not successful. + string optimize_database_operation_name = 6; +} + +// Metadata type for the long-running operation used to track the progress +// of optimizations performed on a newly restored database. This long-running +// operation is automatically created by the system after the successful +// completion of a database restore, and cannot be cancelled. +message OptimizeRestoredDatabaseMetadata { + // Name of the restored database being optimized. + string name = 1; + + // The progress of the post-restore optimizations. + OperationProgress progress = 2; +} + +// Indicates the type of the restore source. +enum RestoreSourceType { + // No restore associated. + TYPE_UNSPECIFIED = 0; + + // A backup was used as the source of the restore. + BACKUP = 1; +} diff --git a/google/spanner/admin/instance/BUILD.bazel b/google/spanner/admin/instance/BUILD.bazel index 1e5b8c2af..a87c57fec 100644 --- a/google/spanner/admin/instance/BUILD.bazel +++ b/google/spanner/admin/instance/BUILD.bazel @@ -1 +1 @@ -exports_files(glob(["*.yaml"])) \ No newline at end of file +exports_files(glob(["*.yaml"])) diff --git a/google/spanner/admin/instance/artman_spanner_admin_instance.legacy.yaml b/google/spanner/admin/instance/artman_spanner_admin_instance.legacy.yaml new file mode 100644 index 000000000..daed7dc29 --- /dev/null +++ b/google/spanner/admin/instance/artman_spanner_admin_instance.legacy.yaml @@ -0,0 +1,20 @@ +common: + api_name: spanner-admin-instance + api_version: v1 + organization_name: google-cloud + service_yaml: v1/spanner_admin_instance.yaml + gapic_yaml: v1/spanner_admin_instance_gapic.legacy.yaml + proto_package: google.spanner.admin.instance.v1 + src_proto_paths: + - v1 + proto_deps: + - name: google-common-protos + - name: google-iam-v1 + proto_path: google/iam/v1 +artifacts: +- name: php_gapic + type: GAPIC + language: PHP +- name: ruby_gapic + type: GAPIC + language: RUBY diff --git a/google/spanner/admin/instance/artman_spanner_admin_instance.yaml b/google/spanner/admin/instance/artman_spanner_admin_instance.yaml index 7317d92a4..23ae80aaa 100644 --- a/google/spanner/admin/instance/artman_spanner_admin_instance.yaml +++ b/google/spanner/admin/instance/artman_spanner_admin_instance.yaml @@ -2,8 +2,9 @@ common: api_name: spanner-admin-instance api_version: v1 organization_name: google-cloud - service_yaml: spanner_admin_instance.yaml + service_yaml: v1/spanner_admin_instance.yaml gapic_yaml: v1/spanner_admin_instance_gapic.yaml + proto_package: google.spanner.admin.instance.v1 src_proto_paths: - v1 proto_deps: @@ -17,12 +18,6 @@ artifacts: - name: python_gapic type: GAPIC language: PYTHON -- name: php_gapic - type: GAPIC - language: PHP -- name: ruby_gapic - type: GAPIC - language: RUBY - name: go_gapic type: GAPIC language: GO diff --git a/google/spanner/admin/instance/v1/BUILD.bazel b/google/spanner/admin/instance/v1/BUILD.bazel index 9736c7aa1..41bcb7d1f 100644 --- a/google/spanner/admin/instance/v1/BUILD.bazel +++ b/google/spanner/admin/instance/v1/BUILD.bazel @@ -1,18 +1,24 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( - name = "spanner_admin_instance_proto", + name = "instance_proto", srcs = [ "spanner_instance_admin.proto", ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/iam/v1:iam_policy_proto", "//google/iam/v1:policy_proto", "//google/longrunning:operations_proto", @@ -23,8 +29,11 @@ proto_library( ) proto_library_with_info( - name = "spanner_admin_instance_proto_with_info", - deps = [":spanner_admin_instance_proto"], + name = "instance_proto_with_info", + deps = [ + ":instance_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -32,72 +41,57 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", - "@com_google_api_grpc_proto_google_iam_v1//jar", -] - java_proto_library( - name = "spanner_admin_instance_java_proto", - deps = [":spanner_admin_instance_proto"], + name = "instance_java_proto", + deps = [":instance_proto"], ) java_grpc_library( - name = "spanner_admin_instance_java_grpc", - srcs = [":spanner_admin_instance_proto"], - deps = [":spanner_admin_instance_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "spanner_admin_instance_resource_name_java_proto", - gapic_yaml = "spanner_admin_instance_gapic.yaml", - deps = [":spanner_admin_instance_proto"], + name = "instance_java_grpc", + srcs = [":instance_proto"], + deps = [":instance_java_proto"], ) java_gapic_library( - name = "spanner_admin_instance_java_gapic", - src = ":spanner_admin_instance_proto_with_info", + name = "instance_java_gapic", + src = ":instance_proto_with_info", gapic_yaml = "spanner_admin_instance_gapic.yaml", - service_yaml = "//google/spanner/admin/instance:spanner_admin_instance.yaml", - test_deps = [":spanner_admin_instance_java_grpc"], + package = "google.spanner.admin.instance.v1", + service_yaml = "spanner_admin_instance.yaml", + test_deps = [ + ":instance_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], deps = [ - ":spanner_admin_instance_java_proto", - ":spanner_admin_instance_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ":instance_java_proto", + "//google/iam/v1:iam_java_proto", + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":spanner_admin_instance_java_gapic_test", +java_gapic_test( + name = "instance_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.spanner.admin.instance.v1.InstanceAdminClientTest", ], -) for test_name in [ - "com.google.cloud.spanner.admin.instance.v1.InstanceAdminClientTest", -]] + runtime_deps = [":instance_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( - name = "google-cloud-spanner-admin-instance-v1-java", - client_deps = [":spanner_admin_instance_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":spanner_admin_instance_java_gapic_test"], - grpc_deps = [":spanner_admin_instance_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ - ":spanner_admin_instance_java_proto", - ":spanner_admin_instance_proto", - ":spanner_admin_instance_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + name = "google-cloud-admin-instance-v1-java", + deps = [ + ":instance_java_gapic", + ":instance_java_grpc", + ":instance_java_proto", + ":instance_proto", + ], ) ############################################################################## @@ -105,17 +99,17 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( - name = "spanner_admin_instance_go_proto", + name = "instance_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/spanner/admin/instance/v1", - protos = [":spanner_admin_instance_proto"], + protos = [":instance_proto"], deps = [ "//google/api:annotations_go_proto", "//google/iam/v1:iam_go_proto", @@ -124,34 +118,275 @@ go_proto_library( ) go_gapic_library( - name = "spanner_admin_instance_go_gapic", - src = ":spanner_admin_instance_proto_with_info", - gapic_yaml = "spanner_admin_instance_gapic.yaml", - importpath = "cloud.google.com/go/spanner/admin/instance/apiv1", - service_yaml = "//google/spanner/admin/instance:spanner_admin_instance.yaml", + name = "instance_go_gapic", + srcs = [":instance_proto_with_info"], + grpc_service_config = "spanner_admin_instance_grpc_service_config.json", + importpath = "cloud.google.com/go/spanner/admin/instance/apiv1;instance", + service_yaml = "spanner_admin_instance.yaml", deps = [ - ":spanner_admin_instance_go_proto", + ":instance_go_proto", "//google/iam/v1:iam_go_proto", "//google/longrunning:longrunning_go_gapic", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", ], ) go_test( - name = "spanner_admin_instance_go_gapic_test", - srcs = [":spanner_admin_instance_go_gapic_srcjar_test"], - embed = [":spanner_admin_instance_go_gapic"], + name = "instance_go_gapic_test", + srcs = [":instance_go_gapic_srcjar_test"], + embed = [":instance_go_gapic"], importpath = "cloud.google.com/go/spanner/admin/instance/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( - name = "gapi-cloud-spanner-admin-instance-v1-go", + name = "gapi-cloud-admin-instance-v1-go", + deps = [ + ":instance_go_gapic", + ":instance_go_gapic_srcjar-test.srcjar", + ":instance_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "instance_moved_proto", + srcs = [":instance_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "instance_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":instance_moved_proto"], +) + +py_grpc_library( + name = "instance_py_grpc", + srcs = [":instance_moved_proto"], + deps = [":instance_py_proto"], +) + +py_gapic_library( + name = "instance_py_gapic", + src = ":instance_proto_with_info", + gapic_yaml = "spanner_admin_instance_gapic.yaml", + package = "google.spanner.admin.instance.v1", + service_yaml = "spanner_admin_instance.yaml", deps = [ - ":spanner_admin_instance_go_gapic", - ":spanner_admin_instance_go_gapic_srcjar-smoke-test.srcjar", - ":spanner_admin_instance_go_gapic_srcjar-test.srcjar", - ":spanner_admin_instance_go_proto", + ":instance_py_grpc", + ":instance_py_proto", ], ) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "admin-instance-v1-py", + deps = [ + ":instance_py_gapic", + ":instance_py_grpc", + ":instance_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "instance_php_proto", + deps = [":instance_proto"], +) + +php_grpc_library( + name = "instance_php_grpc", + srcs = [":instance_proto"], + deps = [":instance_php_proto"], +) + +php_gapic_library( + name = "instance_php_gapic", + src = ":instance_proto_with_info", + gapic_yaml = "spanner_admin_instance_gapic.yaml", + package = "google.spanner.admin.instance.v1", + service_yaml = "spanner_admin_instance.yaml", + deps = [ + ":instance_php_grpc", + ":instance_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-admin-instance-v1-php", + deps = [ + ":instance_php_gapic", + ":instance_php_grpc", + ":instance_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "instance_nodejs_gapic", + src = ":instance_proto_with_info", + gapic_yaml = "spanner_admin_instance_gapic.yaml", + package = "google.spanner.admin.instance.v1", + service_yaml = "spanner_admin_instance.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "admin-instance-v1-nodejs", + deps = [ + ":instance_nodejs_gapic", + ":instance_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "instance_ruby_proto", + deps = [":instance_proto"], +) + +ruby_grpc_library( + name = "instance_ruby_grpc", + srcs = [":instance_proto"], + deps = [":instance_ruby_proto"], +) + +ruby_gapic_library( + name = "instance_ruby_gapic", + src = ":instance_proto_with_info", + gapic_yaml = "spanner_admin_instance_gapic.yaml", + package = "google.spanner.admin.instance.v1", + service_yaml = "spanner_admin_instance.yaml", + deps = [ + ":instance_ruby_grpc", + ":instance_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-admin-instance-v1-ruby", + deps = [ + ":instance_ruby_gapic", + ":instance_ruby_grpc", + ":instance_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "instance_csharp_proto", + deps = [":instance_proto"], +) + +csharp_grpc_library( + name = "instance_csharp_grpc", + srcs = [":instance_proto"], + deps = [":instance_csharp_proto"], +) + +csharp_gapic_library( + name = "instance_csharp_gapic", + src = ":instance_proto_with_info", + gapic_yaml = "spanner_admin_instance_gapic.yaml", + package = "google.spanner.admin.instance.v1", + service_yaml = "spanner_admin_instance.yaml", + deps = [ + ":instance_csharp_grpc", + ":instance_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-admin-instance-v1-csharp", + deps = [ + ":instance_csharp_gapic", + ":instance_csharp_grpc", + ":instance_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library") + +cc_proto_library( + name = "instance_cc_proto", + deps = [":instance_proto"], +) + +cc_grpc_library( + name = "instance_cc_grpc", + srcs = [":instance_proto"], + grpc_only = True, + deps = [":instance_cc_proto"], +) diff --git a/google/spanner/admin/instance/spanner_admin_instance.yaml b/google/spanner/admin/instance/v1/spanner_admin_instance.yaml similarity index 100% rename from google/spanner/admin/instance/spanner_admin_instance.yaml rename to google/spanner/admin/instance/v1/spanner_admin_instance.yaml diff --git a/google/spanner/admin/instance/v1/spanner_admin_instance_gapic.legacy.yaml b/google/spanner/admin/instance/v1/spanner_admin_instance_gapic.legacy.yaml new file mode 100644 index 000000000..1c0358db5 --- /dev/null +++ b/google/spanner/admin/instance/v1/spanner_admin_instance_gapic.legacy.yaml @@ -0,0 +1,242 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.spanner.admin.instance.v1 + python: + package_name: google.cloud.spanner_admin_instance_v1.gapic + go: + package_name: cloud.google.com/go/spanner/admin/instance/apiv1 + csharp: + package_name: Google.Cloud.Spanner.Admin.Instance.V1 + ruby: + package_name: Google::Cloud::Spanner::Admin::Instance::V1 + php: + package_name: Google\Cloud\Spanner\Admin\Instance\V1 + nodejs: + package_name: spanner.v1 + domain_layer_location: google-cloud +interfaces: +- name: google.spanner.admin.instance.v1.InstanceAdmin + collections: + - name_pattern: projects/{project} + entity_name: project + language_overrides: + - language: csharp + common_resource_name: Google.Api.Gax.ResourceNames.ProjectName + - name_pattern: projects/{project}/instanceConfigs/{instance_config} + entity_name: instance_config + - name_pattern: projects/{project}/instances/{instance} + entity_name: instance + language_overrides: + - language: csharp + common_resource_name: Google.Cloud.Spanner.Common.V1.InstanceName + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 1000 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 32000 + initial_rpc_timeout_millis: 60000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 60000 + total_timeout_millis: 600000 + methods: + - name: ListInstanceConfigs + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: instance_configs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + - name: GetInstanceConfig + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: instance_config + timeout_millis: 30000 + - name: ListInstances + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: instances + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + - name: GetInstance + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: instance + timeout_millis: 30000 + - name: CreateInstance + flattening: + groups: + - parameters: + - parent + - instance_id + - instance + required_fields: + - parent + - instance_id + - instance + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + long_running: + return_type: google.spanner.admin.instance.v1.Instance + metadata_type: google.spanner.admin.instance.v1.CreateInstanceMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + - name: UpdateInstance + flattening: + groups: + - parameters: + - instance + - field_mask + required_fields: + - instance + - field_mask + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + instance.name: instance + timeout_millis: 30000 + long_running: + return_type: google.spanner.admin.instance.v1.Instance + metadata_type: google.spanner.admin.instance.v1.UpdateInstanceMetadata + initial_poll_delay_millis: 20000 + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 45000 + total_poll_timeout_millis: 86400000 + - name: DeleteInstance + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: instance + timeout_millis: 30000 + - name: SetIamPolicy + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: instance + timeout_millis: 30000 + - name: GetIamPolicy + flattening: + groups: + - parameters: + - resource + required_fields: + - resource + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + resource: instance + timeout_millis: 30000 + - name: TestIamPermissions + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + resource: instance + timeout_millis: 30000 +resource_name_generation: +- message_name: InstanceConfig + field_entity_map: + name: instance_config +- message_name: Instance + field_entity_map: + name: instance + config: instance_config +- message_name: ListInstanceConfigsRequest + field_entity_map: + parent: project +- message_name: GetInstanceConfigRequest + field_entity_map: + name: instance_config +- message_name: GetInstanceRequest + field_entity_map: + name: instance +- message_name: CreateInstanceRequest + field_entity_map: + parent: project + instance_id: instance +- message_name: ListInstancesRequest + field_entity_map: + parent: project +- message_name: DeleteInstanceRequest + field_entity_map: + name: instance diff --git a/google/spanner/admin/instance/v1/spanner_admin_instance_gapic.yaml b/google/spanner/admin/instance/v1/spanner_admin_instance_gapic.yaml index 1c0358db5..0bfc10cdf 100644 --- a/google/spanner/admin/instance/v1/spanner_admin_instance_gapic.yaml +++ b/google/spanner/admin/instance/v1/spanner_admin_instance_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.spanner.admin.instance.v1 @@ -18,19 +18,6 @@ language_settings: domain_layer_location: google-cloud interfaces: - name: google.spanner.admin.instance.v1.InstanceAdmin - collections: - - name_pattern: projects/{project} - entity_name: project - language_overrides: - - language: csharp - common_resource_name: Google.Api.Gax.ResourceNames.ProjectName - - name_pattern: projects/{project}/instanceConfigs/{instance_config} - entity_name: instance_config - - name_pattern: projects/{project}/instances/{instance} - entity_name: instance - language_overrides: - - language: csharp - common_resource_name: Google.Cloud.Spanner.Common.V1.InstanceName retry_codes_def: - name: idempotent retry_codes: @@ -49,194 +36,36 @@ interfaces: total_timeout_millis: 600000 methods: - name: ListInstanceConfigs - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: instance_configs - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project timeout_millis: 30000 - name: GetInstanceConfig - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: instance_config timeout_millis: 30000 - name: ListInstances - flattening: - groups: - - parameters: - - parent - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: instances - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project timeout_millis: 30000 - name: GetInstance - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: instance timeout_millis: 30000 - name: CreateInstance - flattening: - groups: - - parameters: - - parent - - instance_id - - instance - required_fields: - - parent - - instance_id - - instance - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 30000 long_running: - return_type: google.spanner.admin.instance.v1.Instance - metadata_type: google.spanner.admin.instance.v1.CreateInstanceMetadata initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - - name: UpdateInstance - flattening: - groups: - - parameters: - - instance - - field_mask - required_fields: - - instance - - field_mask - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - instance.name: instance timeout_millis: 30000 + - name: UpdateInstance long_running: - return_type: google.spanner.admin.instance.v1.Instance - metadata_type: google.spanner.admin.instance.v1.UpdateInstanceMetadata initial_poll_delay_millis: 20000 poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 + timeout_millis: 30000 - name: DeleteInstance - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: instance timeout_millis: 30000 - name: SetIamPolicy - flattening: - groups: - - parameters: - - resource - - policy - required_fields: - - resource - - policy - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: instance timeout_millis: 30000 - name: GetIamPolicy - flattening: - groups: - - parameters: - - resource - required_fields: - - resource retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - resource: instance timeout_millis: 30000 - name: TestIamPermissions - flattening: - groups: - - parameters: - - resource - - permissions - required_fields: - - resource - - permissions - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - resource: instance timeout_millis: 30000 -resource_name_generation: -- message_name: InstanceConfig - field_entity_map: - name: instance_config -- message_name: Instance - field_entity_map: - name: instance - config: instance_config -- message_name: ListInstanceConfigsRequest - field_entity_map: - parent: project -- message_name: GetInstanceConfigRequest - field_entity_map: - name: instance_config -- message_name: GetInstanceRequest - field_entity_map: - name: instance -- message_name: CreateInstanceRequest - field_entity_map: - parent: project - instance_id: instance -- message_name: ListInstancesRequest - field_entity_map: - parent: project -- message_name: DeleteInstanceRequest - field_entity_map: - name: instance diff --git a/google/spanner/admin/instance/v1/spanner_admin_instance_grpc_service_config.json b/google/spanner/admin/instance/v1/spanner_admin_instance_grpc_service_config.json new file mode 100755 index 000000000..e44367443 --- /dev/null +++ b/google/spanner/admin/instance/v1/spanner_admin_instance_grpc_service_config.json @@ -0,0 +1,63 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.spanner.admin.instance.v1.InstanceAdmin", + "method": "ListInstanceConfigs" + }, + { + "service": "google.spanner.admin.instance.v1.InstanceAdmin", + "method": "GetInstanceConfig" + }, + { + "service": "google.spanner.admin.instance.v1.InstanceAdmin", + "method": "ListInstances" + }, + { + "service": "google.spanner.admin.instance.v1.InstanceAdmin", + "method": "GetInstance" + }, + { + "service": "google.spanner.admin.instance.v1.InstanceAdmin", + "method": "DeleteInstance" + }, + { + "service": "google.spanner.admin.instance.v1.InstanceAdmin", + "method": "GetIamPolicy" + } + ], + "timeout": "3600s", + "retryPolicy": { + "initialBackoff": "1s", + "maxBackoff": "32s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "google.spanner.admin.instance.v1.InstanceAdmin", + "method": "CreateInstance" + }, + { + "service": "google.spanner.admin.instance.v1.InstanceAdmin", + "method": "UpdateInstance" + }, + { + "service": "google.spanner.admin.instance.v1.InstanceAdmin", + "method": "SetIamPolicy" + }, + { + "service": "google.spanner.admin.instance.v1.InstanceAdmin", + "method": "TestIamPermissions" + } + ], + "timeout": "3600s" + } + ] +} diff --git a/google/spanner/admin/instance/v1/spanner_instance_admin.proto b/google/spanner/admin/instance/v1/spanner_instance_admin.proto index c6ca85c9c..6a068baca 100644 --- a/google/spanner/admin/instance/v1/spanner_instance_admin.proto +++ b/google/spanner/admin/instance/v1/spanner_instance_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,9 @@ syntax = "proto3"; package google.spanner.admin.instance.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/longrunning/operations.proto"; @@ -53,12 +56,17 @@ option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Instance\\V1"; // instance resources, fewer resources are available for other // databases in that instance, and their performance may suffer. service InstanceAdmin { + option (google.api.default_host) = "spanner.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/spanner.admin"; + // Lists the supported instance configurations for a given project. - rpc ListInstanceConfigs(ListInstanceConfigsRequest) - returns (ListInstanceConfigsResponse) { + rpc ListInstanceConfigs(ListInstanceConfigsRequest) returns (ListInstanceConfigsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*}/instanceConfigs" }; + option (google.api.method_signature) = "parent"; } // Gets information about a particular instance configuration. @@ -66,6 +74,7 @@ service InstanceAdmin { option (google.api.http) = { get: "/v1/{name=projects/*/instanceConfigs/*}" }; + option (google.api.method_signature) = "name"; } // Lists all instances in the given project. @@ -73,6 +82,7 @@ service InstanceAdmin { option (google.api.http) = { get: "/v1/{parent=projects/*}/instances" }; + option (google.api.method_signature) = "parent"; } // Gets information about a particular instance. @@ -80,6 +90,7 @@ service InstanceAdmin { option (google.api.http) = { get: "/v1/{name=projects/*/instances/*}" }; + option (google.api.method_signature) = "name"; } // Creates an instance and begins preparing it to begin serving. The @@ -116,12 +127,16 @@ service InstanceAdmin { // [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. // The [response][google.longrunning.Operation.response] field type is // [Instance][google.spanner.admin.instance.v1.Instance], if successful. - rpc CreateInstance(CreateInstanceRequest) - returns (google.longrunning.Operation) { + rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*}/instances" body: "*" }; + option (google.api.method_signature) = "parent,instance_id,instance"; + option (google.longrunning.operation_info) = { + response_type: "google.spanner.admin.instance.v1.Instance" + metadata_type: "google.spanner.admin.instance.v1.CreateInstanceMetadata" + }; } // Updates an instance, and begins allocating or releasing resources @@ -138,9 +153,9 @@ service InstanceAdmin { // Until completion of the returned operation: // // * Cancelling the operation sets its metadata's - // [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], - // and begins restoring resources to their pre-request values. The - // operation is guaranteed to succeed at undoing all resource changes, + // [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], and begins + // restoring resources to their pre-request values. The operation + // is guaranteed to succeed at undoing all resource changes, // after which point it terminates with a `CANCELLED` status. // * All other attempts to modify the instance are rejected. // * Reading the instance via the API continues to give the pre-request @@ -164,12 +179,16 @@ service InstanceAdmin { // // Authorization requires `spanner.instances.update` permission on // resource [name][google.spanner.admin.instance.v1.Instance.name]. - rpc UpdateInstance(UpdateInstanceRequest) - returns (google.longrunning.Operation) { + rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{instance.name=projects/*/instances/*}" body: "*" }; + option (google.api.method_signature) = "instance,field_mask"; + option (google.longrunning.operation_info) = { + response_type: "google.spanner.admin.instance.v1.Instance" + metadata_type: "google.spanner.admin.instance.v1.UpdateInstanceMetadata" + }; } // Deletes an instance. @@ -187,6 +206,7 @@ service InstanceAdmin { option (google.api.http) = { delete: "/v1/{name=projects/*/instances/*}" }; + option (google.api.method_signature) = "name"; } // Sets the access control policy on an instance resource. Replaces any @@ -194,12 +214,12 @@ service InstanceAdmin { // // Authorization requires `spanner.instances.setIamPolicy` on // [resource][google.iam.v1.SetIamPolicyRequest.resource]. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/instances/*}:setIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource,policy"; } // Gets the access control policy for an instance resource. Returns an empty @@ -207,12 +227,12 @@ service InstanceAdmin { // // Authorization requires `spanner.instances.getIamPolicy` on // [resource][google.iam.v1.GetIamPolicyRequest.resource]. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/instances/*}:getIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource"; } // Returns permissions that the caller has on the specified instance resource. @@ -221,18 +241,71 @@ service InstanceAdmin { // result in a NOT_FOUND error if the user has `spanner.instances.list` // permission on the containing Google Cloud Project. Otherwise returns an // empty set of permissions. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1/{resource=projects/*/instances/*}:testIamPermissions" body: "*" }; + option (google.api.method_signature) = "resource,permissions"; } } +message ReplicaInfo { + // Indicates the type of replica. See the [replica types + // documentation](https://cloud.google.com/spanner/docs/replication#replica_types) + // for more details. + enum ReplicaType { + // Not specified. + TYPE_UNSPECIFIED = 0; + + // Read-write replicas support both reads and writes. These replicas: + // + // * Maintain a full copy of your data. + // * Serve reads. + // * Can vote whether to commit a write. + // * Participate in leadership election. + // * Are eligible to become a leader. + READ_WRITE = 1; + + // Read-only replicas only support reads (not writes). Read-only replicas: + // + // * Maintain a full copy of your data. + // * Serve reads. + // * Do not participate in voting to commit writes. + // * Are not eligible to become a leader. + READ_ONLY = 2; + + // Witness replicas don't support reads but do participate in voting to + // commit writes. Witness replicas: + // + // * Do not maintain a full copy of data. + // * Do not serve reads. + // * Vote whether to commit writes. + // * Participate in leader election but are not eligible to become leader. + WITNESS = 3; + } + + // The location of the serving resources, e.g. "us-central1". + string location = 1; + + // The type of replica. + ReplicaType type = 2; + + // If true, this location is designated as the default leader location where + // leader replicas are placed. See the [region types + // documentation](https://cloud.google.com/spanner/docs/instances#region_types) + // for more details. + bool default_leader_location = 3; +} + // A possible configuration for a Cloud Spanner instance. Configurations // define the geographic placement of nodes and their replication. message InstanceConfig { + option (google.api.resource) = { + type: "spanner.googleapis.com/InstanceConfig" + pattern: "projects/{project}/instanceConfigs/{instance_config}" + }; + // A unique identifier for the instance configuration. Values // are of the form // `projects//instanceConfigs/[a-z][-a-z0-9]*` @@ -240,10 +313,19 @@ message InstanceConfig { // The name of this instance configuration as it appears in UIs. string display_name = 2; + + // The geographic placement of nodes in this instance configuration and their + // replication properties. + repeated ReplicaInfo replicas = 3; } // An isolated set of Cloud Spanner resources on which databases can be hosted. message Instance { + option (google.api.resource) = { + type: "spanner.googleapis.com/Instance" + pattern: "projects/{project}/instances/{instance}" + }; + // Indicates the current state of the instance. enum State { // Not specified. @@ -262,14 +344,16 @@ message Instance { // Required. A unique identifier for the instance, which cannot be changed // after the instance is created. Values are of the form // `projects//instances/[a-z][-a-z0-9]*[a-z0-9]`. The final - // segment of the name must be between 6 and 30 characters in length. + // segment of the name must be between 2 and 64 characters in length. string name = 1; // Required. The name of the instance's configuration. Values are of the form // `projects//instanceConfigs/`. See // also [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]. - string config = 2; + string config = 2 [(google.api.resource_reference) = { + type: "spanner.googleapis.com/InstanceConfig" + }]; // Required. The descriptive name for this instance as it appears in UIs. // Must be unique per project and between 4 and 30 characters in length. @@ -284,10 +368,10 @@ message Instance { int32 node_count = 5; // Output only. The current instance state. For - // [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance], - // the state must be either omitted or set to `CREATING`. For - // [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance], - // the state must be either omitted or set to `READY`. + // [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance], the state must be + // either omitted or set to `CREATING`. For + // [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance], the state must be + // either omitted or set to `READY`. State state = 6; // Cloud Labels are a flexible and lightweight mechanism for organizing cloud @@ -312,15 +396,22 @@ message Instance { // as the string: name + "_" + value would prove problematic if we were to // allow "_" in a future release. map labels = 7; + + // Deprecated. This field is not populated. + repeated string endpoint_uris = 8; } -// The request for -// [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]. +// The request for [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]. message ListInstanceConfigsRequest { // Required. The name of the project for which a list of supported instance // configurations is requested. Values are of the form // `projects/`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Number of instance configurations to be returned in the response. If 0 or // less, defaults to the server's maximum allowed page size. @@ -328,20 +419,18 @@ message ListInstanceConfigsRequest { // If non-empty, `page_token` should contain a // [next_page_token][google.spanner.admin.instance.v1.ListInstanceConfigsResponse.next_page_token] - // from a previous - // [ListInstanceConfigsResponse][google.spanner.admin.instance.v1.ListInstanceConfigsResponse]. + // from a previous [ListInstanceConfigsResponse][google.spanner.admin.instance.v1.ListInstanceConfigsResponse]. string page_token = 3; } -// The response for -// [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]. +// The response for [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]. message ListInstanceConfigsResponse { // The list of requested instance configurations. repeated InstanceConfig instance_configs = 1; // `next_page_token` can be sent in a subsequent - // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs] - // call to fetch more of the matching instance configurations. + // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs] call to + // fetch more of the matching instance configurations. string next_page_token = 2; } @@ -350,49 +439,70 @@ message ListInstanceConfigsResponse { message GetInstanceConfigRequest { // Required. The name of the requested instance configuration. Values are of // the form `projects//instanceConfigs/`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/InstanceConfig" + } + ]; } -// The request for -// [GetInstance][google.spanner.admin.instance.v1.InstanceAdmin.GetInstance]. +// The request for [GetInstance][google.spanner.admin.instance.v1.InstanceAdmin.GetInstance]. message GetInstanceRequest { // Required. The name of the requested instance. Values are of the form // `projects//instances/`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Instance" + } + ]; + + // If field_mask is present, specifies the subset of [Instance][google.spanner.admin.instance.v1.Instance] fields that + // should be returned. + // If absent, all [Instance][google.spanner.admin.instance.v1.Instance] fields are returned. + google.protobuf.FieldMask field_mask = 2; } -// The request for -// [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance]. +// The request for [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance]. message CreateInstanceRequest { // Required. The name of the project in which to create the instance. Values // are of the form `projects/`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Required. The ID of the instance to create. Valid identifiers are of the - // form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 6 and 30 characters in + // form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in // length. - string instance_id = 2; + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The instance to create. The name may be omitted, but if // specified must be `/instances/`. - Instance instance = 3; + Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; } -// The request for -// [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances]. +// The request for [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances]. message ListInstancesRequest { // Required. The name of the project for which a list of instances is // requested. Values are of the form `projects/`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Number of instances to be returned in the response. If 0 or less, defaults // to the server's maximum allowed page size. int32 page_size = 2; // If non-empty, `page_token` should contain a - // [next_page_token][google.spanner.admin.instance.v1.ListInstancesResponse.next_page_token] - // from a previous - // [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse]. + // [next_page_token][google.spanner.admin.instance.v1.ListInstancesResponse.next_page_token] from a + // previous [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse]. string page_token = 3; // An expression for filtering the results of the request. Filter rules are @@ -417,42 +527,40 @@ message ListInstancesRequest { string filter = 4; } -// The response for -// [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances]. +// The response for [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances]. message ListInstancesResponse { // The list of requested instances. repeated Instance instances = 1; // `next_page_token` can be sent in a subsequent - // [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances] - // call to fetch more of the matching instances. + // [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances] call to fetch more + // of the matching instances. string next_page_token = 2; } -// The request for -// [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance]. +// The request for [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance]. message UpdateInstanceRequest { // Required. The instance to update, which must always include the instance - // name. Otherwise, only fields mentioned in - // [][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask] need - // be included. - Instance instance = 1; - - // Required. A mask specifying which fields in - // [][google.spanner.admin.instance.v1.UpdateInstanceRequest.instance] should - // be updated. The field mask must always be specified; this prevents any - // future fields in - // [][google.spanner.admin.instance.v1.Instance] from being erased - // accidentally by clients that do not know about them. - google.protobuf.FieldMask field_mask = 2; + // name. Otherwise, only fields mentioned in [field_mask][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask] need be included. + Instance instance = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A mask specifying which fields in [Instance][google.spanner.admin.instance.v1.Instance] should be updated. + // The field mask must always be specified; this prevents any future fields in + // [Instance][google.spanner.admin.instance.v1.Instance] from being erased accidentally by clients that do not know + // about them. + google.protobuf.FieldMask field_mask = 2 [(google.api.field_behavior) = REQUIRED]; } -// The request for -// [DeleteInstance][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance]. +// The request for [DeleteInstance][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance]. message DeleteInstanceRequest { // Required. The name of the instance to be deleted. Values are of the form // `projects//instances/` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Instance" + } + ]; } // Metadata type for the operation returned by @@ -462,8 +570,8 @@ message CreateInstanceMetadata { Instance instance = 1; // The time at which the - // [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance] - // request was received. + // [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance] request was + // received. google.protobuf.Timestamp start_time = 2; // The time at which this operation was cancelled. If set, this operation is @@ -481,8 +589,7 @@ message UpdateInstanceMetadata { // The desired end state of the update. Instance instance = 1; - // The time at which - // [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance] + // The time at which [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance] // request was received. google.protobuf.Timestamp start_time = 2; diff --git a/google/spanner/artman_spanner.legacy.yaml b/google/spanner/artman_spanner.legacy.yaml new file mode 100644 index 000000000..77a976066 --- /dev/null +++ b/google/spanner/artman_spanner.legacy.yaml @@ -0,0 +1,20 @@ +common: + api_name: spanner + api_version: v1 + organization_name: google-cloud + service_yaml: v1/spanner.yaml + gapic_yaml: v1/spanner_gapic.legacy.yaml + proto_package: google.spanner.v1 + src_proto_paths: + - v1 + proto_deps: + - name: google-common-protos +artifacts: +- name: php_gapic + type: GAPIC + language: PHP + release_level: GA +- name: ruby_gapic + type: GAPIC + language: RUBY + release_level: GA diff --git a/google/spanner/artman_spanner.yaml b/google/spanner/artman_spanner.yaml index c5c417530..5b90a1257 100644 --- a/google/spanner/artman_spanner.yaml +++ b/google/spanner/artman_spanner.yaml @@ -2,8 +2,9 @@ common: api_name: spanner api_version: v1 organization_name: google-cloud - service_yaml: spanner.yaml + service_yaml: v1/spanner.yaml gapic_yaml: v1/spanner_gapic.yaml + proto_package: google.spanner.v1 src_proto_paths: - v1 proto_deps: @@ -17,14 +18,6 @@ artifacts: type: GAPIC language: PYTHON release_level: GA -- name: php_gapic - type: GAPIC - language: PHP - release_level: GA -- name: ruby_gapic - type: GAPIC - language: RUBY - release_level: GA - name: go_gapic type: GAPIC language: GO diff --git a/google/spanner/v1/BUILD.bazel b/google/spanner/v1/BUILD.bazel index dee071b7a..ad2819e47 100644 --- a/google/spanner/v1/BUILD.bazel +++ b/google/spanner/v1/BUILD.bazel @@ -1,9 +1,12 @@ +# This file was automatically generated by BuildFileGenerator + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( @@ -19,6 +22,9 @@ proto_library( ], deps = [ "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", "//google/rpc:status_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:empty_proto", @@ -29,7 +35,10 @@ proto_library( proto_library_with_info( name = "spanner_proto_with_info", - deps = [":spanner_proto"], + deps = [ + ":spanner_proto", + "//google/cloud:common_resources_proto", + ], ) ############################################################################## @@ -37,18 +46,13 @@ proto_library_with_info( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", - "java_grpc_library", - "java_gapic_library", "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", "java_proto_library", - "java_resource_name_proto_library", - "java_test", ) -_JAVA_GRPC_DEPS = [ - "@com_google_api_grpc_proto_google_common_protos//jar", -] - java_proto_library( name = "spanner_java_proto", deps = [":spanner_proto"], @@ -57,51 +61,40 @@ java_proto_library( java_grpc_library( name = "spanner_java_grpc", srcs = [":spanner_proto"], - deps = [":spanner_java_proto"] + _JAVA_GRPC_DEPS, -) - -java_resource_name_proto_library( - name = "spanner_resource_name_java_proto", - gapic_yaml = "spanner_gapic.yaml", - deps = [":spanner_proto"], + deps = [":spanner_java_proto"], ) java_gapic_library( name = "spanner_java_gapic", src = ":spanner_proto_with_info", gapic_yaml = "spanner_gapic.yaml", - service_yaml = "//google/spanner:spanner.yaml", - test_deps = [":spanner_java_grpc"], + package = "google.spanner.v1", + service_yaml = "spanner.yaml", + test_deps = [ + ":spanner_java_grpc", + ], deps = [ ":spanner_java_proto", - ":spanner_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, + ], ) -[java_test( - name = test_name, - test_class = test_name, - runtime_deps = [ - ":spanner_java_gapic_test", +java_gapic_test( + name = "spanner_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.spanner.v1.SpannerClientTest", ], -) for test_name in [ - "com.google.cloud.spanner.v1.SpannerClientTest", -]] + runtime_deps = [":spanner_java_gapic_test"], +) -# Opensource Packages +# Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-spanner-v1-java", - client_deps = [":spanner_java_gapic"], - client_group = "com.google.cloud", - client_test_deps = [":spanner_java_gapic_test"], - grpc_deps = [":spanner_java_grpc"], - grpc_group = "com.google.api.grpc", - proto_deps = [ + deps = [ + ":spanner_java_gapic", + ":spanner_java_grpc", ":spanner_java_proto", ":spanner_proto", - ":spanner_resource_name_java_proto", - ] + _JAVA_GRPC_DEPS, - version = "0.0.0-SNAPSHOT", + ], ) ############################################################################## @@ -109,10 +102,10 @@ java_gapic_assembly_gradle_pkg( ############################################################################## load( "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", "go_proto_library", "go_test", - "go_gapic_library", - "go_gapic_assembly_pkg", ) go_proto_library( @@ -128,11 +121,14 @@ go_proto_library( go_gapic_library( name = "spanner_go_gapic", - src = ":spanner_proto_with_info", - gapic_yaml = "spanner_gapic.yaml", - importpath = "cloud.google.com/go/spanner/apiv1", - service_yaml = "//google/spanner:spanner.yaml", - deps = [":spanner_go_proto"], + srcs = [":spanner_proto_with_info"], + grpc_service_config = "spanner_grpc_service_config.json", + importpath = "cloud.google.com/go/spanner/apiv1;spanner", + service_yaml = "spanner.yaml", + deps = [ + ":spanner_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], ) go_test( @@ -142,13 +138,252 @@ go_test( importpath = "cloud.google.com/go/spanner/apiv1", ) -# Opensource Packages +# Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-spanner-v1-go", deps = [ ":spanner_go_gapic", - ":spanner_go_gapic_srcjar-smoke-test.srcjar", ":spanner_go_gapic_srcjar-test.srcjar", ":spanner_go_proto", ], ) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "spanner_moved_proto", + srcs = [":spanner_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "spanner_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":spanner_moved_proto"], +) + +py_grpc_library( + name = "spanner_py_grpc", + srcs = [":spanner_moved_proto"], + deps = [":spanner_py_proto"], +) + +py_gapic_library( + name = "spanner_py_gapic", + src = ":spanner_proto_with_info", + gapic_yaml = "spanner_gapic.yaml", + package = "google.spanner.v1", + service_yaml = "spanner.yaml", + deps = [ + ":spanner_py_grpc", + ":spanner_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "spanner-v1-py", + deps = [ + ":spanner_py_gapic", + ":spanner_py_grpc", + ":spanner_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "spanner_php_proto", + deps = [":spanner_proto"], +) + +php_grpc_library( + name = "spanner_php_grpc", + srcs = [":spanner_proto"], + deps = [":spanner_php_proto"], +) + +php_gapic_library( + name = "spanner_php_gapic", + src = ":spanner_proto_with_info", + gapic_yaml = "spanner_gapic.yaml", + package = "google.spanner.v1", + service_yaml = "spanner.yaml", + deps = [ + ":spanner_php_grpc", + ":spanner_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-spanner-v1-php", + deps = [ + ":spanner_php_gapic", + ":spanner_php_grpc", + ":spanner_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "spanner_nodejs_gapic", + src = ":spanner_proto_with_info", + gapic_yaml = "spanner_gapic.yaml", + package = "google.spanner.v1", + service_yaml = "spanner.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "spanner-v1-nodejs", + deps = [ + ":spanner_nodejs_gapic", + ":spanner_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "spanner_ruby_proto", + deps = [":spanner_proto"], +) + +ruby_grpc_library( + name = "spanner_ruby_grpc", + srcs = [":spanner_proto"], + deps = [":spanner_ruby_proto"], +) + +ruby_gapic_library( + name = "spanner_ruby_gapic", + src = ":spanner_proto_with_info", + gapic_yaml = "spanner_gapic.yaml", + package = "google.spanner.v1", + service_yaml = "spanner.yaml", + deps = [ + ":spanner_ruby_grpc", + ":spanner_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-spanner-v1-ruby", + deps = [ + ":spanner_ruby_gapic", + ":spanner_ruby_grpc", + ":spanner_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "spanner_csharp_proto", + deps = [":spanner_proto"], +) + +csharp_grpc_library( + name = "spanner_csharp_grpc", + srcs = [":spanner_proto"], + deps = [":spanner_csharp_proto"], +) + +csharp_gapic_library( + name = "spanner_csharp_gapic", + src = ":spanner_proto_with_info", + gapic_yaml = "spanner_gapic.yaml", + package = "google.spanner.v1", + service_yaml = "spanner.yaml", + deps = [ + ":spanner_csharp_grpc", + ":spanner_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-spanner-v1-csharp", + deps = [ + ":spanner_csharp_gapic", + ":spanner_csharp_grpc", + ":spanner_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library") + +cc_proto_library( + name = "spanner_cc_proto", + deps = [":spanner_proto"], +) + +cc_grpc_library( + name = "spanner_cc_grpc", + srcs = [":spanner_proto"], + grpc_only = True, + deps = [":spanner_cc_proto"], +) diff --git a/google/spanner/v1/keys.proto b/google/spanner/v1/keys.proto index 1ae957493..d129255c4 100644 --- a/google/spanner/v1/keys.proto +++ b/google/spanner/v1/keys.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ syntax = "proto3"; package google.spanner.v1; -import "google/api/annotations.proto"; import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Spanner.V1"; option go_package = "google.golang.org/genproto/googleapis/spanner/v1;spanner"; @@ -152,8 +152,8 @@ message KeySet { // encoded as described [here][google.spanner.v1.TypeCode]. repeated google.protobuf.ListValue keys = 1; - // A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more - // information about key range specifications. + // A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about + // key range specifications. repeated KeyRange ranges = 2; // For convenience `all` can be set to `true` to indicate that this diff --git a/google/spanner/v1/mutation.proto b/google/spanner/v1/mutation.proto index 901e6cfe0..2c675830f 100644 --- a/google/spanner/v1/mutation.proto +++ b/google/spanner/v1/mutation.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,9 +16,9 @@ syntax = "proto3"; package google.spanner.v1; -import "google/api/annotations.proto"; import "google/protobuf/struct.proto"; import "google/spanner/v1/keys.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Spanner.V1"; option go_package = "google.golang.org/genproto/googleapis/spanner/v1;spanner"; @@ -31,16 +31,13 @@ option php_namespace = "Google\\Cloud\\Spanner\\V1"; // applied to a Cloud Spanner database by sending them in a // [Commit][google.spanner.v1.Spanner.Commit] call. message Mutation { - // Arguments to [insert][google.spanner.v1.Mutation.insert], - // [update][google.spanner.v1.Mutation.update], - // [insert_or_update][google.spanner.v1.Mutation.insert_or_update], and + // Arguments to [insert][google.spanner.v1.Mutation.insert], [update][google.spanner.v1.Mutation.update], [insert_or_update][google.spanner.v1.Mutation.insert_or_update], and // [replace][google.spanner.v1.Mutation.replace] operations. message Write { // Required. The table whose rows will be written. string table = 1; - // The names of the columns in - // [table][google.spanner.v1.Mutation.Write.table] to be written. + // The names of the columns in [table][google.spanner.v1.Mutation.Write.table] to be written. // // The list of columns must contain enough columns to allow // Cloud Spanner to derive values for all primary key columns in the @@ -50,13 +47,11 @@ message Mutation { // The values to be written. `values` can contain more than one // list of values. If it does, then multiple rows are written, one // for each entry in `values`. Each list in `values` must have - // exactly as many entries as there are entries in - // [columns][google.spanner.v1.Mutation.Write.columns] above. Sending - // multiple lists is equivalent to sending multiple `Mutation`s, each - // containing one `values` entry and repeating - // [table][google.spanner.v1.Mutation.Write.table] and - // [columns][google.spanner.v1.Mutation.Write.columns]. Individual values in - // each list are encoded as described [here][google.spanner.v1.TypeCode]. + // exactly as many entries as there are entries in [columns][google.spanner.v1.Mutation.Write.columns] + // above. Sending multiple lists is equivalent to sending multiple + // `Mutation`s, each containing one `values` entry and repeating + // [table][google.spanner.v1.Mutation.Write.table] and [columns][google.spanner.v1.Mutation.Write.columns]. Individual values in each list are + // encoded as described [here][google.spanner.v1.TypeCode]. repeated google.protobuf.ListValue values = 3; } @@ -65,10 +60,12 @@ message Mutation { // Required. The table whose rows will be deleted. string table = 1; - // Required. The primary keys of the rows within - // [table][google.spanner.v1.Mutation.Delete.table] to delete. Delete is - // idempotent. The transaction will succeed even if some or all rows do not - // exist. + // Required. The primary keys of the rows within [table][google.spanner.v1.Mutation.Delete.table] to delete. The + // primary keys must be specified in the order in which they appear in the + // `PRIMARY KEY()` clause of the table's equivalent DDL statement (the DDL + // statement used to create the table). + // Delete is idempotent. The transaction will succeed even if some or all + // rows do not exist. KeySet key_set = 2; } @@ -82,16 +79,24 @@ message Mutation { // already exist, the transaction fails with error `NOT_FOUND`. Write update = 2; - // Like [insert][google.spanner.v1.Mutation.insert], except that if the row - // already exists, then its column values are overwritten with the ones - // provided. Any column values not explicitly written are preserved. + // Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, then + // its column values are overwritten with the ones provided. Any + // column values not explicitly written are preserved. + // + // When using [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as when using [insert][google.spanner.v1.Mutation.insert], all `NOT + // NULL` columns in the table must be given a value. This holds true + // even when the row already exists and will therefore actually be updated. Write insert_or_update = 3; - // Like [insert][google.spanner.v1.Mutation.insert], except that if the row - // already exists, it is deleted, and the column values provided are - // inserted instead. Unlike - // [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this - // means any values not explicitly written become `NULL`. + // Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, it is + // deleted, and the column values provided are inserted + // instead. Unlike [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this means any values not + // explicitly written become `NULL`. + // + // In an interleaved table, if you create the child table with the + // `ON DELETE CASCADE` annotation, then replacing a parent row + // also deletes the child rows. Otherwise, you must delete the + // child rows before you replace the parent row. Write replace = 4; // Delete rows from a table. Succeeds whether or not the named diff --git a/google/spanner/v1/query_plan.proto b/google/spanner/v1/query_plan.proto index 3f3fe6733..6ad13a77b 100644 --- a/google/spanner/v1/query_plan.proto +++ b/google/spanner/v1/query_plan.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ syntax = "proto3"; package google.spanner.v1; -import "google/api/annotations.proto"; import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Spanner.V1"; option go_package = "google.golang.org/genproto/googleapis/spanner/v1;spanner"; @@ -26,8 +26,7 @@ option java_outer_classname = "QueryPlanProto"; option java_package = "com.google.spanner.v1"; option php_namespace = "Google\\Cloud\\Spanner\\V1"; -// Node information for nodes appearing in a -// [QueryPlan.plan_nodes][google.spanner.v1.QueryPlan.plan_nodes]. +// Node information for nodes appearing in a [QueryPlan.plan_nodes][google.spanner.v1.QueryPlan.plan_nodes]. message PlanNode { // Metadata associated with a parent-child relationship appearing in a // [PlanNode][google.spanner.v1.PlanNode]. @@ -41,14 +40,14 @@ message PlanNode { // with the output variable. string type = 2; - // Only present if the child node is - // [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] and corresponds to an - // output variable of the parent node. The field carries the name of the - // output variable. For example, a `TableScan` operator that reads rows from - // a table will have child links to the `SCALAR` nodes representing the - // output variables created for each column that is read by the operator. - // The corresponding `variable` fields will be set to the variable names - // assigned to the columns. + // Only present if the child node is [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] and corresponds + // to an output variable of the parent node. The field carries the name of + // the output variable. + // For example, a `TableScan` operator that reads rows from a table will + // have child links to the `SCALAR` nodes representing the output variables + // created for each column that is read by the operator. The corresponding + // `variable` fields will be set to the variable names assigned to the + // columns. string variable = 3; } @@ -66,8 +65,8 @@ message PlanNode { map subqueries = 2; } - // The kind of [PlanNode][google.spanner.v1.PlanNode]. Distinguishes between - // the two different kinds of nodes that can appear in a query plan. + // The kind of [PlanNode][google.spanner.v1.PlanNode]. Distinguishes between the two different kinds of + // nodes that can appear in a query plan. enum Kind { // Not specified. KIND_UNSPECIFIED = 0; @@ -84,15 +83,14 @@ message PlanNode { SCALAR = 2; } - // The `PlanNode`'s index in [node - // list][google.spanner.v1.QueryPlan.plan_nodes]. + // The `PlanNode`'s index in [node list][google.spanner.v1.QueryPlan.plan_nodes]. int32 index = 1; // Used to determine the type of node. May be needed for visualizing // different kinds of nodes differently. For example, If the node is a - // [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] node, it will have a - // condensed representation which can be used to directly embed a description - // of the node in its parent. + // [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] node, it will have a condensed representation + // which can be used to directly embed a description of the node in its + // parent. Kind kind = 2; // The display name for the node. @@ -101,8 +99,7 @@ message PlanNode { // List of child node `index`es and their relationship to this parent. repeated ChildLink child_links = 4; - // Condensed representation for - // [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] nodes. + // Condensed representation for [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] nodes. ShortRepresentation short_representation = 5; // Attributes relevant to the node contained in a group of key-value pairs. @@ -125,7 +122,7 @@ message PlanNode { // Contains an ordered list of nodes appearing in the query plan. message QueryPlan { // The nodes in the query plan. Plan nodes are returned in pre-order starting - // with the plan root. Each [PlanNode][google.spanner.v1.PlanNode]'s `id` - // corresponds to its index in `plan_nodes`. + // with the plan root. Each [PlanNode][google.spanner.v1.PlanNode]'s `id` corresponds to its index in + // `plan_nodes`. repeated PlanNode plan_nodes = 1; } diff --git a/google/spanner/v1/result_set.proto b/google/spanner/v1/result_set.proto index 55f612f1b..e24a35aaf 100644 --- a/google/spanner/v1/result_set.proto +++ b/google/spanner/v1/result_set.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ syntax = "proto3"; package google.spanner.v1; -import "google/api/annotations.proto"; import "google/protobuf/struct.proto"; import "google/spanner/v1/query_plan.proto"; import "google/spanner/v1/transaction.proto"; import "google/spanner/v1/type.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Spanner.V1"; @@ -37,10 +37,11 @@ message ResultSet { ResultSetMetadata metadata = 1; // Each element in `rows` is a row whose format is defined by - // [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. The ith - // element in each row matches the ith field in - // [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. Elements - // are encoded based on type as described [here][google.spanner.v1.TypeCode]. + // [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. The ith element + // in each row matches the ith field in + // [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. Elements are + // encoded based on type as described + // [here][google.spanner.v1.TypeCode]. repeated google.protobuf.ListValue rows = 2; // Query plan and execution statistics for the SQL statement that @@ -48,8 +49,7 @@ message ResultSet { // [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode]. // DML statements always produce stats containing the number of rows // modified, unless executed using the - // [ExecuteSqlRequest.QueryMode.PLAN][google.spanner.v1.ExecuteSqlRequest.QueryMode.PLAN] - // [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode]. + // [ExecuteSqlRequest.QueryMode.PLAN][google.spanner.v1.ExecuteSqlRequest.QueryMode.PLAN] [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode]. // Other fields may or may not be populated, based on the // [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode]. ResultSetStats stats = 3; @@ -74,10 +74,9 @@ message PartialResultSet { // // It is possible that the last value in values is "chunked", // meaning that the rest of the value is sent in subsequent - // `PartialResultSet`(s). This is denoted by the - // [chunked_value][google.spanner.v1.PartialResultSet.chunked_value] field. - // Two or more chunked values can be merged to form a complete value as - // follows: + // `PartialResultSet`(s). This is denoted by the [chunked_value][google.spanner.v1.PartialResultSet.chunked_value] + // field. Two or more chunked values can be merged to form a + // complete value as follows: // // * `bool/number/null`: cannot be chunked // * `string`: concatenate the strings @@ -139,10 +138,9 @@ message PartialResultSet { // field value `"World" = "W" + "orl" + "d"`. repeated google.protobuf.Value values = 2; - // If true, then the final value in - // [values][google.spanner.v1.PartialResultSet.values] is chunked, and must be - // combined with more values from subsequent `PartialResultSet`s to obtain a - // complete field value. + // If true, then the final value in [values][google.spanner.v1.PartialResultSet.values] is chunked, and must + // be combined with more values from subsequent `PartialResultSet`s + // to obtain a complete field value. bool chunked_value = 3; // Streaming calls might be interrupted for a variety of reasons, such @@ -154,14 +152,14 @@ message PartialResultSet { // Query plan and execution statistics for the statement that produced this // streaming result set. These can be requested by setting - // [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] - // and are sent only once with the last response in the stream. This field - // will also be present in the last response for DML statements. + // [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] and are sent + // only once with the last response in the stream. + // This field will also be present in the last response for DML + // statements. ResultSetStats stats = 5; } -// Metadata about a [ResultSet][google.spanner.v1.ResultSet] or -// [PartialResultSet][google.spanner.v1.PartialResultSet]. +// Metadata about a [ResultSet][google.spanner.v1.ResultSet] or [PartialResultSet][google.spanner.v1.PartialResultSet]. message ResultSetMetadata { // Indicates the field names and types for the rows in the result // set. For example, a SQL query like `"SELECT UserId, UserName FROM @@ -178,11 +176,9 @@ message ResultSetMetadata { Transaction transaction = 2; } -// Additional statistics about a [ResultSet][google.spanner.v1.ResultSet] or -// [PartialResultSet][google.spanner.v1.PartialResultSet]. +// Additional statistics about a [ResultSet][google.spanner.v1.ResultSet] or [PartialResultSet][google.spanner.v1.PartialResultSet]. message ResultSetStats { - // [QueryPlan][google.spanner.v1.QueryPlan] for the query associated with this - // result. + // [QueryPlan][google.spanner.v1.QueryPlan] for the query associated with this result. QueryPlan query_plan = 1; // Aggregated statistics from the execution of the query. Only present when diff --git a/google/spanner/v1/spanner.proto b/google/spanner/v1/spanner.proto index b2091c92f..0c7da37c7 100644 --- a/google/spanner/v1/spanner.proto +++ b/google/spanner/v1/spanner.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.spanner.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; @@ -34,12 +36,21 @@ option java_multiple_files = true; option java_outer_classname = "SpannerProto"; option java_package = "com.google.spanner.v1"; option php_namespace = "Google\\Cloud\\Spanner\\V1"; +option (google.api.resource_definition) = { + type: "spanner.googleapis.com/Database" + pattern: "projects/{project}/instances/{instance}/databases/{database}" +}; // Cloud Spanner API // // The Cloud Spanner API can be used to manage sessions and execute // transactions on data stored in Cloud Spanner databases. service Spanner { + option (google.api.default_host) = "spanner.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/spanner.data"; + // Creates a new session. A session can be used to perform // transactions that read and/or modify data in a Cloud Spanner database. // Sessions are meant to be reused for many consecutive @@ -51,9 +62,9 @@ service Spanner { // transaction internally, and count toward the one transaction // limit. // - // Cloud Spanner limits the number of sessions that can exist at any given - // time; thus, it is a good idea to delete idle and/or unneeded sessions. - // Aside from explicit deletes, Cloud Spanner can delete sessions for which no + // Active sessions use additional server resources, so it is a good idea to + // delete idle and unneeded sessions. + // Aside from explicit deletes, Cloud Spanner may delete sessions for which no // operations are sent for more than an hour. If a session is deleted, // requests to it return `NOT_FOUND`. // @@ -64,6 +75,19 @@ service Spanner { post: "/v1/{database=projects/*/instances/*/databases/*}/sessions" body: "*" }; + option (google.api.method_signature) = "database"; + } + + // Creates multiple new sessions. + // + // This API can be used to initialize a session cache on the clients. + // See https://goo.gl/TgSFN2 for best practices on session cache management. + rpc BatchCreateSessions(BatchCreateSessionsRequest) returns (BatchCreateSessionsResponse) { + option (google.api.http) = { + post: "/v1/{database=projects/*/instances/*/databases/*}/sessions:batchCreate" + body: "*" + }; + option (google.api.method_signature) = "database,session_count"; } // Gets a session. Returns `NOT_FOUND` if the session does not exist. @@ -73,6 +97,7 @@ service Spanner { option (google.api.http) = { get: "/v1/{name=projects/*/instances/*/databases/*/sessions/*}" }; + option (google.api.method_signature) = "name"; } // Lists all sessions in a given database. @@ -80,6 +105,7 @@ service Spanner { option (google.api.http) = { get: "/v1/{database=projects/*/instances/*/databases/*}/sessions" }; + option (google.api.method_signature) = "database"; } // Ends a session, releasing server resources associated with it. This will @@ -89,6 +115,7 @@ service Spanner { option (google.api.http) = { delete: "/v1/{name=projects/*/instances/*/databases/*/sessions/*}" }; + option (google.api.method_signature) = "name"; } // Executes an SQL statement, returning all results in a single reply. This @@ -98,12 +125,10 @@ service Spanner { // // Operations inside read-write transactions might return `ABORTED`. If // this occurs, the application should restart the transaction from - // the beginning. See [Transaction][google.spanner.v1.Transaction] for more - // details. + // the beginning. See [Transaction][google.spanner.v1.Transaction] for more details. // // Larger result sets can be fetched in streaming fashion by calling - // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] - // instead. + // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] instead. rpc ExecuteSql(ExecuteSqlRequest) returns (ResultSet) { option (google.api.http) = { post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeSql" @@ -111,11 +136,11 @@ service Spanner { }; } - // Like [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], except returns the - // result set as a stream. Unlike - // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there is no limit on - // the size of the returned result set. However, no individual row in the - // result set can exceed 100 MiB, and no column value can exceed 10 MiB. + // Like [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], except returns the result + // set as a stream. Unlike [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there + // is no limit on the size of the returned result set. However, no + // individual row in the result set can exceed 100 MiB, and no + // column value can exceed 10 MiB. rpc ExecuteStreamingSql(ExecuteSqlRequest) returns (stream PartialResultSet) { option (google.api.http) = { post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeStreamingSql" @@ -127,21 +152,13 @@ service Spanner { // to be run with lower latency than submitting them sequentially with // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. // - // Statements are executed in order, sequentially. - // [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse] will contain a - // [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has successfully executed. If a - // statement fails, its error status will be returned as part of the - // [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse]. Execution will - // stop at the first failed statement; the remaining statements will not run. - // - // ExecuteBatchDml is expected to return an OK status with a response even if - // there was an error while processing one of the DML statements. Clients must - // inspect response.status to determine if there were any errors while - // processing the request. - // - // See more details in - // [ExecuteBatchDmlRequest][Spanner.ExecuteBatchDmlRequest] and - // [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse]. + // Statements are executed in sequential order. A request can succeed even if + // a statement fails. The [ExecuteBatchDmlResponse.status][google.spanner.v1.ExecuteBatchDmlResponse.status] field in the + // response provides information about the statement that failed. Clients must + // inspect this field to determine whether an error occurred. + // + // Execution stops after the first failed statement; the remaining statements + // are not executed. rpc ExecuteBatchDml(ExecuteBatchDmlRequest) returns (ExecuteBatchDmlResponse) { option (google.api.http) = { post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeBatchDml" @@ -151,15 +168,14 @@ service Spanner { // Reads rows from the database using key lookups and scans, as a // simple key/value style alternative to - // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method cannot be - // used to return a result set larger than 10 MiB; if the read matches more + // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method cannot be used to + // return a result set larger than 10 MiB; if the read matches more // data than that, the read fails with a `FAILED_PRECONDITION` // error. // // Reads inside read-write transactions might return `ABORTED`. If // this occurs, the application should restart the transaction from - // the beginning. See [Transaction][google.spanner.v1.Transaction] for more - // details. + // the beginning. See [Transaction][google.spanner.v1.Transaction] for more details. // // Larger result sets can be yielded in streaming fashion by calling // [StreamingRead][google.spanner.v1.Spanner.StreamingRead] instead. @@ -170,9 +186,9 @@ service Spanner { }; } - // Like [Read][google.spanner.v1.Spanner.Read], except returns the result set - // as a stream. Unlike [Read][google.spanner.v1.Spanner.Read], there is no - // limit on the size of the returned result set. However, no individual row in + // Like [Read][google.spanner.v1.Spanner.Read], except returns the result set as a + // stream. Unlike [Read][google.spanner.v1.Spanner.Read], there is no limit on the + // size of the returned result set. However, no individual row in // the result set can exceed 100 MiB, and no column value can exceed // 10 MiB. rpc StreamingRead(ReadRequest) returns (stream PartialResultSet) { @@ -183,8 +199,7 @@ service Spanner { } // Begins a new transaction. This step can often be skipped: - // [Read][google.spanner.v1.Spanner.Read], - // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and + // [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and // [Commit][google.spanner.v1.Spanner.Commit] can begin a new transaction as a // side-effect. rpc BeginTransaction(BeginTransactionRequest) returns (Transaction) { @@ -192,6 +207,7 @@ service Spanner { post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:beginTransaction" body: "*" }; + option (google.api.method_signature) = "session,options"; } // Commits a transaction. The request includes the mutations to be @@ -207,13 +223,14 @@ service Spanner { post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:commit" body: "*" }; + option (google.api.method_signature) = "session,transaction_id,mutations"; + option (google.api.method_signature) = "session,single_use_transaction,mutations"; } // Rolls back a transaction, releasing any locks it holds. It is a good // idea to call this for any transaction that includes one or more - // [Read][google.spanner.v1.Spanner.Read] or - // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and ultimately - // decides not to commit. + // [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and + // ultimately decides not to commit. // // `Rollback` returns `OK` if it successfully aborts the transaction, the // transaction was already aborted, or the transaction is not @@ -223,15 +240,15 @@ service Spanner { post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:rollback" body: "*" }; + option (google.api.method_signature) = "session,transaction_id"; } // Creates a set of partition tokens that can be used to execute a query // operation in parallel. Each of the returned partition tokens can be used - // by [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] to - // specify a subset of the query result to read. The same session and - // read-only transaction must be used by the PartitionQueryRequest used to - // create the partition tokens and the ExecuteSqlRequests that use the - // partition tokens. + // by [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] to specify a subset + // of the query result to read. The same session and read-only transaction + // must be used by the PartitionQueryRequest used to create the + // partition tokens and the ExecuteSqlRequests that use the partition tokens. // // Partition tokens become invalid when the session used to create them // is deleted, is idle for too long, begins a new transaction, or becomes too @@ -246,13 +263,12 @@ service Spanner { // Creates a set of partition tokens that can be used to execute a read // operation in parallel. Each of the returned partition tokens can be used - // by [StreamingRead][google.spanner.v1.Spanner.StreamingRead] to specify a - // subset of the read result to read. The same session and read-only - // transaction must be used by the PartitionReadRequest used to create the - // partition tokens and the ReadRequests that use the partition tokens. There - // are no ordering guarantees on rows returned among the returned partition - // tokens, or even within each individual StreamingRead call issued with a - // partition_token. + // by [StreamingRead][google.spanner.v1.Spanner.StreamingRead] to specify a subset of the read + // result to read. The same session and read-only transaction must be used by + // the PartitionReadRequest used to create the partition tokens and the + // ReadRequests that use the partition tokens. There are no ordering + // guarantees on rows returned among the returned partition tokens, or even + // within each individual StreamingRead call issued with a partition_token. // // Partition tokens become invalid when the session used to create them // is deleted, is idle for too long, begins a new transaction, or becomes too @@ -269,14 +285,51 @@ service Spanner { // The request for [CreateSession][google.spanner.v1.Spanner.CreateSession]. message CreateSessionRequest { // Required. The database in which the new session is created. - string database = 1; + string database = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Database" + } + ]; // The session to create. Session session = 2; } +// The request for [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. +message BatchCreateSessionsRequest { + // Required. The database in which the new sessions are created. + string database = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Database" + } + ]; + + // Parameters to be applied to each created session. + Session session_template = 2; + + // Required. The number of sessions to be created in this batch call. + // The API may return fewer than the requested number of sessions. If a + // specific number of sessions are desired, the client can make additional + // calls to BatchCreateSessions (adjusting + // [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count] as necessary). + int32 session_count = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The response for [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. +message BatchCreateSessionsResponse { + // The freshly created sessions. + repeated Session session = 1; +} + // A session in the Cloud Spanner API. message Session { + option (google.api.resource) = { + type: "spanner.googleapis.com/Session" + pattern: "projects/{project}/instances/{instance}/databases/{database}/sessions/{session}" + }; + // The name of the session. This is always system-assigned; values provided // when creating a session are ignored. string name = 1; @@ -303,21 +356,30 @@ message Session { // The request for [GetSession][google.spanner.v1.Spanner.GetSession]. message GetSessionRequest { // Required. The name of the session to retrieve. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Session" + } + ]; } // The request for [ListSessions][google.spanner.v1.Spanner.ListSessions]. message ListSessionsRequest { // Required. The database in which to list sessions. - string database = 1; + string database = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Database" + } + ]; // Number of sessions to be returned in the response. If 0 or less, defaults // to the server's maximum allowed page size. int32 page_size = 2; // If non-empty, `page_token` should contain a - // [next_page_token][google.spanner.v1.ListSessionsResponse.next_page_token] - // from a previous + // [next_page_token][google.spanner.v1.ListSessionsResponse.next_page_token] from a previous // [ListSessionsResponse][google.spanner.v1.ListSessionsResponse]. string page_token = 3; @@ -340,20 +402,46 @@ message ListSessionsResponse { repeated Session sessions = 1; // `next_page_token` can be sent in a subsequent - // [ListSessions][google.spanner.v1.Spanner.ListSessions] call to fetch more - // of the matching sessions. + // [ListSessions][google.spanner.v1.Spanner.ListSessions] call to fetch more of the matching + // sessions. string next_page_token = 2; } // The request for [DeleteSession][google.spanner.v1.Spanner.DeleteSession]. message DeleteSessionRequest { // Required. The name of the session to delete. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Session" + } + ]; } // The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql]. message ExecuteSqlRequest { + // Query optimizer configuration. + message QueryOptions { + // An option to control the selection of optimizer version. + // + // This parameter allows individual queries to pick different query + // optimizer versions. + // + // Specifying "latest" as a value instructs Cloud Spanner to use the + // latest supported query optimizer version. If not specified, Cloud Spanner + // uses optimizer version set at the database level options. Any other + // positive integer (from the list of supported optimizer versions) + // overrides the default optimizer version for query execution. + // The list of supported optimizer versions can be queried from + // SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement + // with an invalid optimizer version will fail with a syntax error + // (`INVALID_ARGUMENT`) status. + // + // The `optimizer_version` statement hint has precedence over this setting. + string optimizer_version = 1; + } + // Mode in which the statement must be processed. enum QueryMode { // The default mode. Only the statement results are returned. @@ -369,46 +457,45 @@ message ExecuteSqlRequest { } // Required. The session in which the SQL query should be performed. - string session = 1; + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Session" + } + ]; - // The transaction to use. If none is provided, the default is a - // temporary read-only transaction with strong concurrency. - // // The transaction to use. // // For queries, if none is provided, the default is a temporary read-only // transaction with strong concurrency. // - // Standard DML statements require a ReadWrite transaction. Single-use - // transactions are not supported (to avoid replay). The caller must - // either supply an existing transaction ID or begin a new transaction. + // Standard DML statements require a read-write transaction. To protect + // against replays, single-use transactions are not supported. The caller + // must either supply an existing transaction ID or begin a new transaction. // - // Partitioned DML requires an existing PartitionedDml transaction ID. + // Partitioned DML requires an existing Partitioned DML transaction ID. TransactionSelector transaction = 2; // Required. The SQL string. - string sql = 3; + string sql = 3 [(google.api.field_behavior) = REQUIRED]; - // The SQL string can contain parameter placeholders. A parameter - // placeholder consists of `'@'` followed by the parameter - // name. Parameter names consist of any combination of letters, - // numbers, and underscores. + // Parameter names and values that bind to placeholders in the SQL string. + // + // A parameter placeholder consists of the `@` character followed by the + // parameter name (for example, `@firstName`). Parameter names can contain + // letters, numbers, and underscores. // // Parameters can appear anywhere that a literal value is expected. The same // parameter name can be used more than once, for example: - // `"WHERE id > @msg_id AND id < @msg_id + 100"` // - // It is an error to execute an SQL statement with unbound parameters. + // `"WHERE id > @msg_id AND id < @msg_id + 100"` // - // Parameter values are specified using `params`, which is a JSON - // object whose keys are parameter names, and whose values are the - // corresponding parameter values. + // It is an error to execute a SQL statement with unbound parameters. google.protobuf.Struct params = 4; // It is not always possible for Cloud Spanner to infer the right SQL type // from a JSON value. For example, values of type `BYTES` and values - // of type `STRING` both appear in - // [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings. + // of type `STRING` both appear in [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings. // // In these cases, `param_types` can be used to specify the exact // SQL type for some or all of the SQL statement parameters. See the @@ -418,18 +505,15 @@ message ExecuteSqlRequest { // If this request is resuming a previously interrupted SQL statement // execution, `resume_token` should be copied from the last - // [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the - // interruption. Doing this enables the new SQL statement execution to resume - // where the last one left off. The rest of the request parameters must - // exactly match the request that yielded this token. + // [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption. Doing this + // enables the new SQL statement execution to resume where the last one left + // off. The rest of the request parameters must exactly match the + // request that yielded this token. bytes resume_token = 6; // Used to control the amount of debugging information returned in - // [ResultSetStats][google.spanner.v1.ResultSetStats]. If - // [partition_token][google.spanner.v1.ExecuteSqlRequest.partition_token] is - // set, [query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] can only - // be set to - // [QueryMode.NORMAL][google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL]. + // [ResultSetStats][google.spanner.v1.ResultSetStats]. If [partition_token][google.spanner.v1.ExecuteSqlRequest.partition_token] is set, [query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] can only + // be set to [QueryMode.NORMAL][google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL]. QueryMode query_mode = 7; // If present, results will be restricted to the specified partition @@ -438,7 +522,7 @@ message ExecuteSqlRequest { // PartitionQueryRequest message used to create this partition_token. bytes partition_token = 8; - // A per-transaction sequence number used to identify this request. This + // A per-transaction sequence number used to identify this request. This field // makes each request idempotent such that if the request is received multiple // times, at most one will succeed. // @@ -449,29 +533,30 @@ message ExecuteSqlRequest { // // Required for DML statements. Ignored for queries. int64 seqno = 9; + + // Query optimizer configuration to use for the given query. + QueryOptions query_options = 10; } -// The request for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml] +// The request for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. message ExecuteBatchDmlRequest { // A single DML statement. message Statement { // Required. The DML string. string sql = 1; - // The DML string can contain parameter placeholders. A parameter - // placeholder consists of `'@'` followed by the parameter - // name. Parameter names consist of any combination of letters, - // numbers, and underscores. + // Parameter names and values that bind to placeholders in the DML string. + // + // A parameter placeholder consists of the `@` character followed by the + // parameter name (for example, `@firstName`). Parameter names can contain + // letters, numbers, and underscores. // // Parameters can appear anywhere that a literal value is expected. The // same parameter name can be used more than once, for example: - // `"WHERE id > @msg_id AND id < @msg_id + 100"` // - // It is an error to execute an SQL statement with unbound parameters. + // `"WHERE id > @msg_id AND id < @msg_id + 100"` // - // Parameter values are specified using `params`, which is a JSON - // object whose keys are parameter names, and whose values are the - // corresponding parameter values. + // It is an error to execute a SQL statement with unbound parameters. google.protobuf.Struct params = 2; // It is not always possible for Cloud Spanner to infer the right SQL type @@ -486,58 +571,74 @@ message ExecuteBatchDmlRequest { } // Required. The session in which the DML statements should be performed. - string session = 1; + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Session" + } + ]; - // The transaction to use. A ReadWrite transaction is required. Single-use - // transactions are not supported (to avoid replay). The caller must either - // supply an existing transaction ID or begin a new transaction. - TransactionSelector transaction = 2; + // Required. The transaction to use. Must be a read-write transaction. + // + // To protect against replays, single-use transactions are not supported. The + // caller must either supply an existing transaction ID or begin a new + // transaction. + TransactionSelector transaction = 2 [(google.api.field_behavior) = REQUIRED]; - // The list of statements to execute in this batch. Statements are executed - // serially, such that the effects of statement i are visible to statement - // i+1. Each statement must be a DML statement. Execution will stop at the - // first failed statement; the remaining statements will not run. + // Required. The list of statements to execute in this batch. Statements are executed + // serially, such that the effects of statement `i` are visible to statement + // `i+1`. Each statement must be a DML statement. Execution stops at the + // first failed statement; the remaining statements are not executed. // - // REQUIRES: statements_size() > 0. - repeated Statement statements = 3; + // Callers must provide at least one statement. + repeated Statement statements = 3 [(google.api.field_behavior) = REQUIRED]; - // A per-transaction sequence number used to identify this request. This is - // used in the same space as the seqno in - // [ExecuteSqlRequest][Spanner.ExecuteSqlRequest]. See more details - // in [ExecuteSqlRequest][Spanner.ExecuteSqlRequest]. - int64 seqno = 4; + // Required. A per-transaction sequence number used to identify this request. This field + // makes each request idempotent such that if the request is received multiple + // times, at most one will succeed. + // + // The sequence number must be monotonically increasing within the + // transaction. If a request arrives for the first time with an out-of-order + // sequence number, the transaction may be aborted. Replays of previously + // handled requests will yield the same response as the first execution. + int64 seqno = 4 [(google.api.field_behavior) = REQUIRED]; } // The response for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a list -// of [ResultSet][google.spanner.v1.ResultSet], one for each DML statement that has successfully executed. -// If a statement fails, the error is returned as part of the response payload. -// Clients can determine whether all DML statements have run successfully, or if -// a statement failed, using one of the following approaches: +// of [ResultSet][google.spanner.v1.ResultSet] messages, one for each DML statement that has successfully +// executed, in the same order as the statements in the request. If a statement +// fails, the status in the response body identifies the cause of the failure. +// +// To check for DML statements that failed, use the following approach: +// +// 1. Check the status in the response message. The [google.rpc.Code][google.rpc.Code] enum +// value `OK` indicates that all statements were executed successfully. +// 2. If the status was not `OK`, check the number of result sets in the +// response. If the response contains `N` [ResultSet][google.spanner.v1.ResultSet] messages, then +// statement `N+1` in the request failed. +// +// Example 1: // -// 1. Check if 'status' field is OkStatus. -// 2. Check if result_sets_size() equals the number of statements in -// [ExecuteBatchDmlRequest][Spanner.ExecuteBatchDmlRequest]. +// * Request: 5 DML statements, all executed successfully. +// * Response: 5 [ResultSet][google.spanner.v1.ResultSet] messages, with the status `OK`. // -// Example 1: A request with 5 DML statements, all executed successfully. -// Result: A response with 5 ResultSets, one for each statement in the same -// order, and an OK status. +// Example 2: // -// Example 2: A request with 5 DML statements. The 3rd statement has a syntax -// error. -// Result: A response with 2 ResultSets, for the first 2 statements that -// run successfully, and a syntax error (INVALID_ARGUMENT) status. From -// result_set_size() client can determine that the 3rd statement has failed. +// * Request: 5 DML statements. The third statement has a syntax error. +// * Response: 2 [ResultSet][google.spanner.v1.ResultSet] messages, and a syntax error (`INVALID_ARGUMENT`) +// status. The number of [ResultSet][google.spanner.v1.ResultSet] messages indicates that the third +// statement failed, and the fourth and fifth statements were not executed. message ExecuteBatchDmlResponse { - // ResultSets, one for each statement in the request that ran successfully, in - // the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will - // not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will - // contain the number of rows modified by the statement. + // One [ResultSet][google.spanner.v1.ResultSet] for each statement in the request that ran successfully, + // in the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] does + // not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] contain + // the number of rows modified by the statement. // - // Only the first ResultSet in the response contains a valid + // Only the first [ResultSet][google.spanner.v1.ResultSet] in the response contains valid // [ResultSetMetadata][google.spanner.v1.ResultSetMetadata]. repeated ResultSet result_sets = 1; - // If all DML statements are executed successfully, status will be OK. + // If all DML statements are executed successfully, the status is `OK`. // Otherwise, the error status of the first failed statement. google.rpc.Status status = 2; } @@ -567,13 +668,18 @@ message PartitionOptions { // The request for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery] message PartitionQueryRequest { // Required. The session used to create the partitions. - string session = 1; + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Session" + } + ]; // Read only snapshot transactions are supported, read/write and single use // transactions are not. TransactionSelector transaction = 2; - // The query request to generate partitions for. The request will fail if + // Required. The query request to generate partitions for. The request will fail if // the query is not root partitionable. The query plan of a root // partitionable query has a single distributed union operator. A distributed // union operator conceptually divides one or more tables into multiple @@ -581,31 +687,27 @@ message PartitionQueryRequest { // then unions all results. // // This must not contain DML commands, such as INSERT, UPDATE, or - // DELETE. Use - // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] with a + // DELETE. Use [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] with a // PartitionedDml transaction for large, partition-friendly DML operations. - string sql = 3; + string sql = 3 [(google.api.field_behavior) = REQUIRED]; - // The SQL query string can contain parameter placeholders. A parameter - // placeholder consists of `'@'` followed by the parameter - // name. Parameter names consist of any combination of letters, - // numbers, and underscores. + // Parameter names and values that bind to placeholders in the SQL string. + // + // A parameter placeholder consists of the `@` character followed by the + // parameter name (for example, `@firstName`). Parameter names can contain + // letters, numbers, and underscores. // // Parameters can appear anywhere that a literal value is expected. The same // parameter name can be used more than once, for example: - // `"WHERE id > @msg_id AND id < @msg_id + 100"` // - // It is an error to execute an SQL query with unbound parameters. + // `"WHERE id > @msg_id AND id < @msg_id + 100"` // - // Parameter values are specified using `params`, which is a JSON - // object whose keys are parameter names, and whose values are the - // corresponding parameter values. + // It is an error to execute a SQL statement with unbound parameters. google.protobuf.Struct params = 4; // It is not always possible for Cloud Spanner to infer the right SQL type // from a JSON value. For example, values of type `BYTES` and values - // of type `STRING` both appear in - // [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings. + // of type `STRING` both appear in [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings. // // In these cases, `param_types` can be used to specify the exact // SQL type for some or all of the SQL query parameters. See the @@ -620,38 +722,37 @@ message PartitionQueryRequest { // The request for [PartitionRead][google.spanner.v1.Spanner.PartitionRead] message PartitionReadRequest { // Required. The session used to create the partitions. - string session = 1; + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Session" + } + ]; // Read only snapshot transactions are supported, read/write and single use // transactions are not. TransactionSelector transaction = 2; // Required. The name of the table in the database to be read. - string table = 3; - - // If non-empty, the name of an index on - // [table][google.spanner.v1.PartitionReadRequest.table]. This index is used - // instead of the table primary key when interpreting - // [key_set][google.spanner.v1.PartitionReadRequest.key_set] and sorting - // result rows. See [key_set][google.spanner.v1.PartitionReadRequest.key_set] - // for further information. + string table = 3 [(google.api.field_behavior) = REQUIRED]; + + // If non-empty, the name of an index on [table][google.spanner.v1.PartitionReadRequest.table]. This index is + // used instead of the table primary key when interpreting [key_set][google.spanner.v1.PartitionReadRequest.key_set] + // and sorting result rows. See [key_set][google.spanner.v1.PartitionReadRequest.key_set] for further information. string index = 4; - // The columns of [table][google.spanner.v1.PartitionReadRequest.table] to be - // returned for each row matching this request. + // The columns of [table][google.spanner.v1.PartitionReadRequest.table] to be returned for each row matching + // this request. repeated string columns = 5; // Required. `key_set` identifies the rows to be yielded. `key_set` names the - // primary keys of the rows in - // [table][google.spanner.v1.PartitionReadRequest.table] to be yielded, unless - // [index][google.spanner.v1.PartitionReadRequest.index] is present. If - // [index][google.spanner.v1.PartitionReadRequest.index] is present, then - // [key_set][google.spanner.v1.PartitionReadRequest.key_set] instead names + // primary keys of the rows in [table][google.spanner.v1.PartitionReadRequest.table] to be yielded, unless [index][google.spanner.v1.PartitionReadRequest.index] + // is present. If [index][google.spanner.v1.PartitionReadRequest.index] is present, then [key_set][google.spanner.v1.PartitionReadRequest.key_set] instead names // index keys in [index][google.spanner.v1.PartitionReadRequest.index]. // // It is not an error for the `key_set` to name rows that do not // exist in the database. Read yields nothing for nonexistent rows. - KeySet key_set = 6; + KeySet key_set = 6 [(google.api.field_behavior) = REQUIRED]; // Additional options that affect how many partitions are created. PartitionOptions partition_options = 9; @@ -680,44 +781,42 @@ message PartitionResponse { // [StreamingRead][google.spanner.v1.Spanner.StreamingRead]. message ReadRequest { // Required. The session in which the read should be performed. - string session = 1; + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Session" + } + ]; // The transaction to use. If none is provided, the default is a // temporary read-only transaction with strong concurrency. TransactionSelector transaction = 2; // Required. The name of the table in the database to be read. - string table = 3; - - // If non-empty, the name of an index on - // [table][google.spanner.v1.ReadRequest.table]. This index is used instead of - // the table primary key when interpreting - // [key_set][google.spanner.v1.ReadRequest.key_set] and sorting result rows. - // See [key_set][google.spanner.v1.ReadRequest.key_set] for further - // information. + string table = 3 [(google.api.field_behavior) = REQUIRED]; + + // If non-empty, the name of an index on [table][google.spanner.v1.ReadRequest.table]. This index is + // used instead of the table primary key when interpreting [key_set][google.spanner.v1.ReadRequest.key_set] + // and sorting result rows. See [key_set][google.spanner.v1.ReadRequest.key_set] for further information. string index = 4; - // The columns of [table][google.spanner.v1.ReadRequest.table] to be returned - // for each row matching this request. - repeated string columns = 5; + // Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching + // this request. + repeated string columns = 5 [(google.api.field_behavior) = REQUIRED]; // Required. `key_set` identifies the rows to be yielded. `key_set` names the - // primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to - // be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present. - // If [index][google.spanner.v1.ReadRequest.index] is present, then - // [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys - // in [index][google.spanner.v1.ReadRequest.index]. - // - // If the [partition_token][google.spanner.v1.ReadRequest.partition_token] - // field is empty, rows are yielded in table primary key order (if - // [index][google.spanner.v1.ReadRequest.index] is empty) or index key order - // (if [index][google.spanner.v1.ReadRequest.index] is non-empty). If the - // [partition_token][google.spanner.v1.ReadRequest.partition_token] field is - // not empty, rows will be yielded in an unspecified order. + // primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to be yielded, unless [index][google.spanner.v1.ReadRequest.index] + // is present. If [index][google.spanner.v1.ReadRequest.index] is present, then [key_set][google.spanner.v1.ReadRequest.key_set] instead names + // index keys in [index][google.spanner.v1.ReadRequest.index]. + // + // If the [partition_token][google.spanner.v1.ReadRequest.partition_token] field is empty, rows are yielded + // in table primary key order (if [index][google.spanner.v1.ReadRequest.index] is empty) or index key order + // (if [index][google.spanner.v1.ReadRequest.index] is non-empty). If the [partition_token][google.spanner.v1.ReadRequest.partition_token] field is not + // empty, rows will be yielded in an unspecified order. // // It is not an error for the `key_set` to name rows that do not // exist in the database. Read yields nothing for nonexistent rows. - KeySet key_set = 6; + KeySet key_set = 6 [(google.api.field_behavior) = REQUIRED]; // If greater than zero, only the first `limit` rows are yielded. If `limit` // is zero, the default is no limit. A limit cannot be specified if @@ -726,9 +825,9 @@ message ReadRequest { // If this request is resuming a previously interrupted read, // `resume_token` should be copied from the last - // [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the - // interruption. Doing this enables the new read to resume where the last read - // left off. The rest of the request parameters must exactly match the request + // [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption. Doing this + // enables the new read to resume where the last read left off. The + // rest of the request parameters must exactly match the request // that yielded this token. bytes resume_token = 9; @@ -739,20 +838,29 @@ message ReadRequest { bytes partition_token = 10; } -// The request for -// [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. +// The request for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. message BeginTransactionRequest { // Required. The session in which the transaction runs. - string session = 1; + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Session" + } + ]; // Required. Options for the new transaction. - TransactionOptions options = 2; + TransactionOptions options = 2 [(google.api.field_behavior) = REQUIRED]; } // The request for [Commit][google.spanner.v1.Spanner.Commit]. message CommitRequest { // Required. The session in which the transaction to be committed is running. - string session = 1; + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Session" + } + ]; // Required. The transaction in which to commit. oneof transaction { @@ -786,8 +894,13 @@ message CommitResponse { // The request for [Rollback][google.spanner.v1.Spanner.Rollback]. message RollbackRequest { // Required. The session in which the transaction to roll back is running. - string session = 1; + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Session" + } + ]; // Required. The transaction to roll back. - bytes transaction_id = 2; + bytes transaction_id = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/spanner/spanner.yaml b/google/spanner/v1/spanner.yaml similarity index 100% rename from google/spanner/spanner.yaml rename to google/spanner/v1/spanner.yaml diff --git a/google/spanner/v1/spanner_gapic.legacy.yaml b/google/spanner/v1/spanner_gapic.legacy.yaml new file mode 100644 index 000000000..c274a40c2 --- /dev/null +++ b/google/spanner/v1/spanner_gapic.legacy.yaml @@ -0,0 +1,309 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.spanner.v1 + release_level: GA + python: + package_name: google.cloud.spanner_v1.gapic + release_level: GA + go: + package_name: cloud.google.com/go/spanner/apiv1 + domain_layer_location: cloud.google.com/go/spanner + release_level: GA + csharp: + package_name: Google.Cloud.Spanner.V1 + release_level: GA + ruby: + package_name: Google::Cloud::Spanner::V1 + release_level: GA + php: + package_name: Google\Cloud\Spanner\V1 + release_level: GA + nodejs: + package_name: spanner.v1 + domain_layer_location: google-cloud + release_level: GA +interfaces: +- name: google.spanner.v1.Spanner + collections: + - name_pattern: projects/{project}/instances/{instance}/databases/{database} + entity_name: database + language_overrides: + - language: csharp + common_resource_name: Google.Cloud.Spanner.Common.V1.DatabaseName + - name_pattern: projects/{project}/instances/{instance}/databases/{database}/sessions/{session} + entity_name: session + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - name: non_idempotent + retry_codes: [] + - name: long_running + retry_codes: + - UNAVAILABLE + retry_params_def: + - name: default + initial_retry_delay_millis: 250 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 32000 + initial_rpc_timeout_millis: 360000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 360000 + total_timeout_millis: 3600000 + - name: streaming + initial_retry_delay_millis: 250 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 32000 + initial_rpc_timeout_millis: 360000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 360000 + total_timeout_millis: 3600000 + - name: long_running + initial_retry_delay_millis: 250 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 32000 + initial_rpc_timeout_millis: 3600000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 3600000 + total_timeout_millis: 3600000 + methods: + - name: CreateSession + flattening: + groups: + - parameters: + - database + required_fields: + - database + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + database: database + timeout_millis: 30000 + - name: BatchCreateSessions + flattening: + groups: + - parameters: + - database + - session_count + required_fields: + - database + - session_count + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + database: database + timeout_millis: 60000 + - name: GetSession + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: session + timeout_millis: 30000 + - name: ListSessions + flattening: + groups: + - parameters: + - database + required_fields: + - database + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: sessions + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + database: database + timeout_millis: 3600000 + - name: DeleteSession + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: session + timeout_millis: 30000 + - name: ExecuteSql + required_fields: + - session + - sql + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + session: session + timeout_millis: 30000 + - name: ExecuteStreamingSql + required_fields: + - session + - sql + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: streaming + field_name_patterns: + session: session + timeout_millis: 3600000 + - name: ExecuteBatchDml + required_fields: + - session + - transaction + - statements + - seqno + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + session: session + timeout_millis: 30000 + - name: Read + required_fields: + - session + - table + - columns + - key_set + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + session: session + timeout_millis: 30000 + - name: StreamingRead + required_fields: + - session + - table + - columns + - key_set + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: streaming + field_name_patterns: + session: session + timeout_millis: 3600000 + - name: BeginTransaction + flattening: + groups: + - parameters: + - session + - options + required_fields: + - session + - options + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + session: session + timeout_millis: 30000 + - name: Commit + flattening: + groups: + - parameters: + - session + - transaction_id + - mutations + - parameters: + - session + - single_use_transaction + - mutations + required_fields: + - session + - mutations + resource_name_treatment: STATIC_TYPES + retry_codes_name: long_running + retry_params_name: long_running + field_name_patterns: + session: session + timeout_millis: 3600000 + - name: Rollback + flattening: + groups: + - parameters: + - session + - transaction_id + required_fields: + - session + - transaction_id + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + session: session + timeout_millis: 30000 + - name: PartitionQuery + required_fields: + - session + - sql + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + session: session + timeout_millis: 30000 + - name: PartitionRead + required_fields: + - session + - table + - key_set + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + session: session + timeout_millis: 30000 +resource_name_generation: +- message_name: CreateSessionRequest + field_entity_map: + database: database +- message_name: BatchCreateSessionsRequest + field_entity_map: + database: database +- message_name: Session + field_entity_map: + name: session +- message_name: GetSessionRequest + field_entity_map: + name: session +- message_name: DeleteSessionRequest + field_entity_map: + name: session +- message_name: ExecuteSqlRequest + field_entity_map: + session: session +- message_name: ExecuteBatchDmlRequest + field_entity_map: + session: session +- message_name: ReadRequest + field_entity_map: + session: session +- message_name: BeginTransactionRequest + field_entity_map: + session: session +- message_name: CommitRequest + field_entity_map: + session: session +- message_name: RollbackRequest + field_entity_map: + session: session +- message_name: PartitionReadRequest + field_entity_map: + session: session +- message_name: PartitionQueryRequest + field_entity_map: + session: session diff --git a/google/spanner/v1/spanner_gapic.yaml b/google/spanner/v1/spanner_gapic.yaml index a09c021c6..38a02706a 100644 --- a/google/spanner/v1/spanner_gapic.yaml +++ b/google/spanner/v1/spanner_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 language_settings: java: package_name: com.google.cloud.spanner.v1 @@ -26,14 +26,6 @@ language_settings: release_level: GA interfaces: - name: google.spanner.v1.Spanner - collections: - - name_pattern: projects/{project}/instances/{instance}/databases/{database} - entity_name: database - language_overrides: - - language: csharp - common_resource_name: Google.Cloud.Spanner.Common.V1.DatabaseName - - name_pattern: projects/{project}/instances/{instance}/databases/{database}/sessions/{session} - entity_name: session retry_codes_def: - name: idempotent retry_codes: @@ -48,18 +40,18 @@ interfaces: initial_retry_delay_millis: 250 retry_delay_multiplier: 1.3 max_retry_delay_millis: 32000 - initial_rpc_timeout_millis: 60000 + initial_rpc_timeout_millis: 3600000 rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 60000 - total_timeout_millis: 600000 + max_rpc_timeout_millis: 3600000 + total_timeout_millis: 3600000 - name: streaming initial_retry_delay_millis: 250 retry_delay_multiplier: 1.3 max_retry_delay_millis: 32000 - initial_rpc_timeout_millis: 120000 + initial_rpc_timeout_millis: 3600000 rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 120000 - total_timeout_millis: 1200000 + max_rpc_timeout_millis: 3600000 + total_timeout_millis: 3600000 - name: long_running initial_retry_delay_millis: 250 retry_delay_multiplier: 1.3 @@ -70,222 +62,62 @@ interfaces: total_timeout_millis: 3600000 methods: - name: CreateSession - flattening: - groups: - - parameters: - - database - required_fields: - - database - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - database: database timeout_millis: 30000 + - name: BatchCreateSessions + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 - name: GetSession - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: session timeout_millis: 30000 - name: ListSessions - flattening: - groups: - - parameters: - - database - required_fields: - - database - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: sessions retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - database: database timeout_millis: 3600000 - name: DeleteSession - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - name: session timeout_millis: 30000 - name: ExecuteSql - required_fields: - - session - - sql - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - session: session timeout_millis: 30000 - name: ExecuteStreamingSql - required_fields: - - session - - sql - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: streaming - field_name_patterns: - session: session timeout_millis: 3600000 - name: ExecuteBatchDml - required_fields: - - session - - transaction - - statements - - seqno - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - session: session timeout_millis: 30000 - name: Read - required_fields: - - session - - table - - columns - - key_set - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - session: session timeout_millis: 30000 - name: StreamingRead - required_fields: - - session - - table - - columns - - key_set - resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: streaming - field_name_patterns: - session: session timeout_millis: 3600000 - name: BeginTransaction - flattening: - groups: - - parameters: - - session - - options - required_fields: - - session - - options - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - session: session timeout_millis: 30000 - name: Commit - flattening: - groups: - - parameters: - - session - - transaction_id - - mutations - - parameters: - - session - - single_use_transaction - - mutations - required_fields: - - session - - mutations - resource_name_treatment: STATIC_TYPES retry_codes_name: long_running retry_params_name: long_running - field_name_patterns: - session: session timeout_millis: 3600000 - name: Rollback - flattening: - groups: - - parameters: - - session - - transaction_id - required_fields: - - session - - transaction_id - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - session: session timeout_millis: 30000 - name: PartitionQuery - required_fields: - - session - - sql retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - session: session timeout_millis: 30000 - name: PartitionRead - required_fields: - - session - - table - - key_set retry_codes_name: idempotent retry_params_name: default - field_name_patterns: - session: session timeout_millis: 30000 -resource_name_generation: -- message_name: CreateSessionRequest - field_entity_map: - database: database -- message_name: Session - field_entity_map: - name: session -- message_name: GetSessionRequest - field_entity_map: - name: session -- message_name: DeleteSessionRequest - field_entity_map: - name: session -- message_name: ExecuteSqlRequest - field_entity_map: - session: session -- message_name: ExecuteBatchDmlRequest - field_entity_map: - session: session -- message_name: ReadRequest - field_entity_map: - session: session -- message_name: BeginTransactionRequest - field_entity_map: - session: session -- message_name: CommitRequest - field_entity_map: - session: session -- message_name: RollbackRequest - field_entity_map: - session: session -- message_name: PartitionReadRequest - field_entity_map: - session: session -- message_name: PartitionQueryRequest - field_entity_map: - session: session diff --git a/google/spanner/v1/spanner_grpc_service_config.json b/google/spanner/v1/spanner_grpc_service_config.json new file mode 100755 index 000000000..8602c9425 --- /dev/null +++ b/google/spanner/v1/spanner_grpc_service_config.json @@ -0,0 +1,95 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.spanner.v1.Spanner", + "method": "ExecuteStreamingSql" + }, + { + "service": "google.spanner.v1.Spanner", + "method": "StreamingRead" + } + ], + "timeout": "3600s" + }, + { + "name": [ + { + "service": "google.spanner.v1.Spanner", + "method": "Commit" + } + ], + "timeout": "3600s", + "retryPolicy": { + "initialBackoff": "0.250s", + "maxBackoff": "32s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + }, + { + "name": [ + { + "service": "google.spanner.v1.Spanner", + "method": "CreateSession" + }, + { + "service": "google.spanner.v1.Spanner", + "method": "BatchCreateSessions" + }, + { + "service": "google.spanner.v1.Spanner", + "method": "GetSession" + }, + { + "service": "google.spanner.v1.Spanner", + "method": "ListSessions" + }, + { + "service": "google.spanner.v1.Spanner", + "method": "DeleteSession" + }, + { + "service": "google.spanner.v1.Spanner", + "method": "ExecuteSql" + }, + { + "service": "google.spanner.v1.Spanner", + "method": "ExecuteBatchDml" + }, + { + "service": "google.spanner.v1.Spanner", + "method": "Read" + }, + { + "service": "google.spanner.v1.Spanner", + "method": "BeginTransaction" + }, + { + "service": "google.spanner.v1.Spanner", + "method": "Rollback" + }, + { + "service": "google.spanner.v1.Spanner", + "method": "PartitionQuery" + }, + { + "service": "google.spanner.v1.Spanner", + "method": "PartitionRead" + } + ], + "timeout": "30s", + "retryPolicy": { + "initialBackoff": "0.250s", + "maxBackoff": "32s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/spanner/v1/transaction.proto b/google/spanner/v1/transaction.proto index 7253bcbe0..6a429f5d4 100644 --- a/google/spanner/v1/transaction.proto +++ b/google/spanner/v1/transaction.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,9 +16,9 @@ syntax = "proto3"; package google.spanner.v1; -import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Spanner.V1"; option go_package = "google.golang.org/genproto/googleapis/spanner/v1;spanner"; @@ -184,8 +184,7 @@ option php_namespace = "Google\\Cloud\\Spanner\\V1"; // reads should be executed within a transaction or at an exact read // timestamp. // -// See -// [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong]. +// See [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong]. // // ### Exact Staleness // @@ -206,9 +205,7 @@ option php_namespace = "Google\\Cloud\\Spanner\\V1"; // equivalent boundedly stale concurrency modes. On the other hand, // boundedly stale reads usually return fresher results. // -// See -// [TransactionOptions.ReadOnly.read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read_timestamp] -// and +// See [TransactionOptions.ReadOnly.read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read_timestamp] and // [TransactionOptions.ReadOnly.exact_staleness][google.spanner.v1.TransactionOptions.ReadOnly.exact_staleness]. // // ### Bounded Staleness @@ -238,9 +235,7 @@ option php_namespace = "Google\\Cloud\\Spanner\\V1"; // which rows will be read, it can only be used with single-use // read-only transactions. // -// See -// [TransactionOptions.ReadOnly.max_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max_staleness] -// and +// See [TransactionOptions.ReadOnly.max_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max_staleness] and // [TransactionOptions.ReadOnly.min_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.min_read_timestamp]. // // ### Old Read Timestamps and Garbage Collection @@ -312,10 +307,14 @@ option php_namespace = "Google\\Cloud\\Spanner\\V1"; message TransactionOptions { // Message type to initiate a read-write transaction. Currently this // transaction type has no options. - message ReadWrite {} + message ReadWrite { + + } // Message type to initiate a Partitioned DML transaction. - message PartitionedDml {} + message PartitionedDml { + + } // Message type to initiate a read-only transaction. message ReadOnly { @@ -381,8 +380,7 @@ message TransactionOptions { } // If true, the Cloud Spanner-selected read timestamp is included in - // the [Transaction][google.spanner.v1.Transaction] message that describes - // the transaction. + // the [Transaction][google.spanner.v1.Transaction] message that describes the transaction. bool return_read_timestamp = 6; } @@ -436,8 +434,7 @@ message Transaction { // [Read][google.spanner.v1.Spanner.Read] or // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] call runs. // -// See [TransactionOptions][google.spanner.v1.TransactionOptions] for more -// information about transactions. +// See [TransactionOptions][google.spanner.v1.TransactionOptions] for more information about transactions. message TransactionSelector { // If no fields are set, the default is a single use transaction // with strong concurrency. @@ -452,8 +449,7 @@ message TransactionSelector { // Begin a new transaction and execute this read or SQL query in // it. The transaction ID of the new transaction is returned in - // [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction], - // which is a [Transaction][google.spanner.v1.Transaction]. + // [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction], which is a [Transaction][google.spanner.v1.Transaction]. TransactionOptions begin = 3; } } diff --git a/google/spanner/v1/type.proto b/google/spanner/v1/type.proto index 1ddbd62be..b749d5084 100644 --- a/google/spanner/v1/type.proto +++ b/google/spanner/v1/type.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,50 +25,6 @@ option java_outer_classname = "TypeProto"; option java_package = "com.google.spanner.v1"; option php_namespace = "Google\\Cloud\\Spanner\\V1"; -// `Type` indicates the type of a Cloud Spanner value, as might be stored in a -// table cell or returned from an SQL query. -message Type { - // Required. The [TypeCode][google.spanner.v1.TypeCode] for this type. - TypeCode code = 1; - - // If [code][google.spanner.v1.Type.code] == - // [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` is the - // type of the array elements. - Type array_element_type = 2; - - // If [code][google.spanner.v1.Type.code] == - // [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` provides - // type information for the struct's fields. - StructType struct_type = 3; -} - -// `StructType` defines the fields of a -// [STRUCT][google.spanner.v1.TypeCode.STRUCT] type. -message StructType { - // Message representing a single field of a struct. - message Field { - // The name of the field. For reads, this is the column name. For - // SQL queries, it is the column alias (e.g., `"Word"` in the - // query `"SELECT 'hello' AS Word"`), or the column name (e.g., - // `"ColName"` in the query `"SELECT ColName FROM Table"`). Some - // columns might have an empty name (e.g., !"SELECT - // UPPER(ColName)"`). Note that a query result can contain - // multiple fields with the same name. - string name = 1; - - // The type of the field. - Type type = 2; - } - - // The list of fields that make up this struct. Order is - // significant, because values of this struct type are represented as - // lists, where the order of field values matches the order of - // fields in the [StructType][google.spanner.v1.StructType]. In turn, the - // order of fields matches the order of columns in a read request, or the - // order of fields in the `SELECT` clause of a query. - repeated Field fields = 1; -} - // `TypeCode` is used as part of [Type][google.spanner.v1.Type] to // indicate the type of a Cloud Spanner value. // @@ -119,3 +75,44 @@ enum TypeCode { // to [struct_type.fields[i]][google.spanner.v1.StructType.fields]. STRUCT = 9; } + +// `Type` indicates the type of a Cloud Spanner value, as might be stored in a +// table cell or returned from an SQL query. +message Type { + // Required. The [TypeCode][google.spanner.v1.TypeCode] for this type. + TypeCode code = 1; + + // If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` + // is the type of the array elements. + Type array_element_type = 2; + + // If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` + // provides type information for the struct's fields. + StructType struct_type = 3; +} + +// `StructType` defines the fields of a [STRUCT][google.spanner.v1.TypeCode.STRUCT] type. +message StructType { + // Message representing a single field of a struct. + message Field { + // The name of the field. For reads, this is the column name. For + // SQL queries, it is the column alias (e.g., `"Word"` in the + // query `"SELECT 'hello' AS Word"`), or the column name (e.g., + // `"ColName"` in the query `"SELECT ColName FROM Table"`). Some + // columns might have an empty name (e.g., !"SELECT + // UPPER(ColName)"`). Note that a query result can contain + // multiple fields with the same name. + string name = 1; + + // The type of the field. + Type type = 2; + } + + // The list of fields that make up this struct. Order is + // significant, because values of this struct type are represented as + // lists, where the order of field values matches the order of + // fields in the [StructType][google.spanner.v1.StructType]. In turn, the order of fields + // matches the order of columns in a read request, or the order of + // fields in the `SELECT` clause of a query. + repeated Field fields = 1; +} diff --git a/google/storage/v1/BUILD.bazel b/google/storage/v1/BUILD.bazel new file mode 100644 index 000000000..a098c0e52 --- /dev/null +++ b/google/storage/v1/BUILD.bazel @@ -0,0 +1,392 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "storage_proto", + srcs = [ + "storage.proto", + "storage_resources.proto", + ], + deps = [ + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library_with_info( + name = "storage_proto_with_info", + deps = [ + ":storage_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "storage_java_proto", + deps = [":storage_proto"], +) + +java_grpc_library( + name = "storage_java_grpc", + srcs = [":storage_proto"], + deps = [":storage_java_proto"], +) + +java_gapic_library( + name = "storage_java_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "storage_gapic.yaml", + package = "google.storage.v1", + service_yaml = "storage_v1.yaml", + test_deps = [ + ":storage_java_grpc", + "//google/iam/v1:iam_java_grpc", + ], + deps = [ + ":storage_java_proto", + "//google/iam/v1:iam_java_proto", + ], +) + +java_gapic_test( + name = "storage_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.google.storage.v1.StorageClientTest", + ], + runtime_deps = [":storage_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-storage-v1-java", + deps = [ + ":storage_java_gapic", + ":storage_java_grpc", + ":storage_java_proto", + ":storage_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "storage_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/storage/v1", + protos = [":storage_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_gapic_library( + name = "storage_go_gapic", + srcs = [":storage_proto_with_info"], + grpc_service_config = "storage_service_config.json", + importpath = "cloud.google.com/go/storage/apiv1;storage", + service_yaml = "storage_v1.yaml", + deps = [ + ":storage_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_test( + name = "storage_go_gapic_test", + srcs = [":storage_go_gapic_srcjar_test"], + embed = [":storage_go_gapic"], + importpath = "cloud.google.com/go/storage/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-storage-v1-go", + deps = [ + ":storage_go_gapic", + ":storage_go_gapic_srcjar-test.srcjar", + ":storage_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "storage_moved_proto", + srcs = [":storage_proto"], + deps = [ + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +py_proto_library( + name = "storage_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":storage_moved_proto"], +) + +py_grpc_library( + name = "storage_py_grpc", + srcs = [":storage_moved_proto"], + deps = [":storage_py_proto"], +) + +py_gapic_library( + name = "storage_py_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "storage_gapic.yaml", + package = "google.storage.v1", + service_yaml = "storage_v1.yaml", + deps = [ + ":storage_py_grpc", + ":storage_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "storage-v1-py", + deps = [ + ":storage_py_gapic", + ":storage_py_grpc", + ":storage_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +# Note: The GCS gRPC API is launching without PHP client library support (see +# https://buganizer.corp.google.com/issues/118459221#comment3), but we need to +# generate Bazel build rules for all languages must be present else the +# build_gen step will fail with NPE. We further needed to comment out the +# PHP lines here because building PHP clients requires all RPCs in the service +# definitions to contain http_rule annotations. +#load( +# "@com_google_googleapis_imports//:imports.bzl", +# "php_gapic_assembly_pkg", +# "php_gapic_library", +# "php_grpc_library", +# "php_proto_library", +#) +# +#php_proto_library( +# name = "storage_php_proto", +# deps = [":storage_proto"], +#) +# +#php_grpc_library( +# name = "storage_php_grpc", +# srcs = [":storage_proto"], +# deps = [":storage_php_proto"], +#) +# +#php_gapic_library( +# name = "storage_php_gapic", +# src = ":storage_proto_with_info", +# gapic_yaml = "storage_gapic.yaml", +# package = "google.storage.v1", +# service_yaml = "storage_v1.yaml", +# deps = [ +# ":storage_php_grpc", +# ":storage_php_proto", +# ], +#) +# +## Open Source Packages +#php_gapic_assembly_pkg( +# name = "google-cloud-storage-v1-php", +# deps = [ +# ":storage_php_gapic", +# ":storage_php_grpc", +# ":storage_php_proto", +# ], +#) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "storage_nodejs_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "storage_gapic.yaml", + package = "google.storage.v1", + service_yaml = "storage_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "storage-v1-nodejs", + deps = [ + ":storage_nodejs_gapic", + ":storage_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "storage_ruby_proto", + deps = [":storage_proto"], +) + +ruby_grpc_library( + name = "storage_ruby_grpc", + srcs = [":storage_proto"], + deps = [":storage_ruby_proto"], +) + +ruby_gapic_library( + name = "storage_ruby_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "storage_gapic.yaml", + package = "google.storage.v1", + service_yaml = "storage_v1.yaml", + deps = [ + ":storage_ruby_grpc", + ":storage_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-storage-v1-ruby", + deps = [ + ":storage_ruby_gapic", + ":storage_ruby_grpc", + ":storage_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "storage_csharp_proto", + deps = [":storage_proto"], +) + +csharp_grpc_library( + name = "storage_csharp_grpc", + srcs = [":storage_proto"], + deps = [":storage_csharp_proto"], +) + +csharp_gapic_library( + name = "storage_csharp_gapic", + src = ":storage_proto_with_info", + gapic_yaml = "storage_gapic.yaml", + package = "google.storage.v1", + service_yaml = "storage_v1.yaml", + deps = [ + ":storage_csharp_grpc", + ":storage_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-storage-v1-csharp", + deps = [ + ":storage_csharp_gapic", + ":storage_csharp_grpc", + ":storage_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "storage_cc_proto", + deps = [":storage_proto"], +) + +cc_grpc_library( + name = "storage_cc_grpc", + srcs = [":storage_proto"], + generate_mocks = True, + grpc_only = True, + deps = [":storage_cc_proto"], +) diff --git a/google/storage/v1/storage.proto b/google/storage/v1/storage.proto new file mode 100644 index 000000000..7ba34bffe --- /dev/null +++ b/google/storage/v1/storage.proto @@ -0,0 +1,1981 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.storage.v1; + +import "google/api/field_behavior.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/wrappers.proto"; +import "google/storage/v1/storage_resources.proto"; +import "google/api/client.proto"; + +option go_package = "google.golang.org/genproto/googleapis/storage/v1;storage"; +option java_multiple_files = true; +option java_package = "com.google.storage.v1"; + +// Manages Google Cloud Storage resources. +service Storage { + option (google.api.default_host) = "storage.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only," + "https://www.googleapis.com/auth/devstorage.full_control," + "https://www.googleapis.com/auth/devstorage.read_only," + "https://www.googleapis.com/auth/devstorage.read_write"; + + // Permanently deletes the ACL entry for the specified entity on the specified + // bucket. + rpc DeleteBucketAccessControl(DeleteBucketAccessControlRequest) returns (google.protobuf.Empty) { + } + + // Returns the ACL entry for the specified entity on the specified bucket. + rpc GetBucketAccessControl(GetBucketAccessControlRequest) returns (BucketAccessControl) { + } + + // Creates a new ACL entry on the specified bucket. + rpc InsertBucketAccessControl(InsertBucketAccessControlRequest) returns (BucketAccessControl) { + } + + // Retrieves ACL entries on the specified bucket. + rpc ListBucketAccessControls(ListBucketAccessControlsRequest) returns (ListBucketAccessControlsResponse) { + } + + // Updates an ACL entry on the specified bucket. Equivalent to + // PatchBucketAccessControl, but all unspecified fields will be + // reset to their default values. + rpc UpdateBucketAccessControl(UpdateBucketAccessControlRequest) returns (BucketAccessControl) { + } + + // Updates an ACL entry on the specified bucket. + rpc PatchBucketAccessControl(PatchBucketAccessControlRequest) returns (BucketAccessControl) { + } + + // Permanently deletes an empty bucket. + rpc DeleteBucket(DeleteBucketRequest) returns (google.protobuf.Empty) { + } + + // Returns metadata for the specified bucket. + rpc GetBucket(GetBucketRequest) returns (Bucket) { + } + + // Creates a new bucket. + rpc InsertBucket(InsertBucketRequest) returns (Bucket) { + } + + // List active object change notification channels for this bucket. + rpc ListChannels(ListChannelsRequest) returns (ListChannelsResponse) { + } + + // Retrieves a list of buckets for a given project. + rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) { + } + + // Locks retention policy on a bucket. + rpc LockBucketRetentionPolicy(LockRetentionPolicyRequest) returns (Bucket) { + } + + // Gets the IAM policy for the specified bucket. + rpc GetBucketIamPolicy(GetIamPolicyRequest) returns (google.iam.v1.Policy) { + } + + // Updates an IAM policy for the specified bucket. + rpc SetBucketIamPolicy(SetIamPolicyRequest) returns (google.iam.v1.Policy) { + } + + // Tests a set of permissions on the given bucket to see which, if + // any, are held by the caller. + rpc TestBucketIamPermissions(TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + } + + // Updates a bucket. Changes to the bucket will be readable immediately after + // writing, but configuration changes may take time to propagate. + rpc PatchBucket(PatchBucketRequest) returns (Bucket) { + } + + // Updates a bucket. Equivalent to PatchBucket, but always replaces all + // mutatable fields of the bucket with new values, reverting all + // unspecified fields to their default values. + // Like PatchBucket, Changes to the bucket will be readable immediately after + // writing, but configuration changes may take time to propagate. + rpc UpdateBucket(UpdateBucketRequest) returns (Bucket) { + } + + // Halts "Object Change Notification" push messagages. + // See https://cloud.google.com/storage/docs/object-change-notification + // Note: this is not related to the newer "Notifications" resource, which + // are stopped using DeleteNotification. + rpc StopChannel(StopChannelRequest) returns (google.protobuf.Empty) { + } + + // Permanently deletes the default object ACL entry for the specified entity + // on the specified bucket. + rpc DeleteDefaultObjectAccessControl(DeleteDefaultObjectAccessControlRequest) returns (google.protobuf.Empty) { + } + + // Returns the default object ACL entry for the specified entity on the + // specified bucket. + rpc GetDefaultObjectAccessControl(GetDefaultObjectAccessControlRequest) returns (ObjectAccessControl) { + } + + // Creates a new default object ACL entry on the specified bucket. + rpc InsertDefaultObjectAccessControl(InsertDefaultObjectAccessControlRequest) returns (ObjectAccessControl) { + } + + // Retrieves default object ACL entries on the specified bucket. + rpc ListDefaultObjectAccessControls(ListDefaultObjectAccessControlsRequest) returns (ListObjectAccessControlsResponse) { + } + + // Updates a default object ACL entry on the specified bucket. + rpc PatchDefaultObjectAccessControl(PatchDefaultObjectAccessControlRequest) returns (ObjectAccessControl) { + } + + // Updates a default object ACL entry on the specified bucket. Equivalent to + // PatchDefaultObjectAccessControl, but modifies all unspecified fields to + // their default values. + rpc UpdateDefaultObjectAccessControl(UpdateDefaultObjectAccessControlRequest) returns (ObjectAccessControl) { + } + + // Permanently deletes a notification subscription. + // Note: Older, "Object Change Notification" push subscriptions should be + // deleted using StopChannel instead. + rpc DeleteNotification(DeleteNotificationRequest) returns (google.protobuf.Empty) { + } + + // View a notification configuration. + rpc GetNotification(GetNotificationRequest) returns (Notification) { + } + + // Creates a notification subscription for a given bucket. + // These notifications, when triggered, publish messages to the specified + // Cloud Pub/Sub topics. + // See https://cloud.google.com/storage/docs/pubsub-notifications. + rpc InsertNotification(InsertNotificationRequest) returns (Notification) { + } + + // Retrieves a list of notification subscriptions for a given bucket. + rpc ListNotifications(ListNotificationsRequest) returns (ListNotificationsResponse) { + } + + // Permanently deletes the ACL entry for the specified entity on the specified + // object. + rpc DeleteObjectAccessControl(DeleteObjectAccessControlRequest) returns (google.protobuf.Empty) { + } + + // Returns the ACL entry for the specified entity on the specified object. + rpc GetObjectAccessControl(GetObjectAccessControlRequest) returns (ObjectAccessControl) { + } + + // Creates a new ACL entry on the specified object. + rpc InsertObjectAccessControl(InsertObjectAccessControlRequest) returns (ObjectAccessControl) { + } + + // Retrieves ACL entries on the specified object. + rpc ListObjectAccessControls(ListObjectAccessControlsRequest) returns (ListObjectAccessControlsResponse) { + } + + // Patches an ACL entry on the specified object. Patch is similar to update, + // but only applies or appends the specified fields in the + // object_access_control object. Other fields are unaffected. + rpc PatchObjectAccessControl(PatchObjectAccessControlRequest) returns (ObjectAccessControl) { + } + + // Updates an ACL entry on the specified object. + rpc UpdateObjectAccessControl(UpdateObjectAccessControlRequest) returns (ObjectAccessControl) { + } + + // Concatenates a list of existing objects into a new object in the same + // bucket. + rpc ComposeObject(ComposeObjectRequest) returns (Object) { + } + + // Copies a source object to a destination object. Optionally overrides + // metadata. + rpc CopyObject(CopyObjectRequest) returns (Object) { + } + + // Deletes an object and its metadata. Deletions are permanent if versioning + // is not enabled for the bucket, or if the `generation` parameter + // is used. + rpc DeleteObject(DeleteObjectRequest) returns (google.protobuf.Empty) { + } + + // Retrieves an object's metadata. + rpc GetObject(GetObjectRequest) returns (Object) { + } + + // Reads an object's data. + rpc GetObjectMedia(GetObjectMediaRequest) returns (stream GetObjectMediaResponse) { + } + + // Stores a new object and metadata. + // + // An object can be written either in a single message stream or in a + // resumable sequence of message streams. To write using a single stream, + // the client should include in the first message of the stream an + // `InsertObjectSpec` describing the destination bucket, object, and any + // preconditions. Additionally, the final message must set 'finish_write' to + // true, or else it is an error. + // + // For a resumable write, the client should instead call + // `StartResumableWrite()` and provide that method an `InsertObjectSpec.` + // They should then attach the returned `upload_id` to the first message of + // each following call to `Insert`. If there is an error or the connection is + // broken during the resumable `Insert()`, the client should check the status + // of the `Insert()` by calling `QueryWriteStatus()` and continue writing from + // the returned `committed_size`. This may be less than the amount of data the + // client previously sent. + // + // The service will not view the object as complete until the client has + // sent an `Insert` with `finish_write` set to `true`. Sending any + // requests on a stream after sending a request with `finish_write` set to + // `true` will cause an error. The client **should** check the + // `Object` it receives to determine how much data the service was + // able to commit and whether the service views the object as complete. + rpc InsertObject(stream InsertObjectRequest) returns (Object) { + } + + // Retrieves a list of objects matching the criteria. + rpc ListObjects(ListObjectsRequest) returns (ListObjectsResponse) { + } + + // Rewrites a source object to a destination object. Optionally overrides + // metadata. + rpc RewriteObject(RewriteObjectRequest) returns (RewriteResponse) { + } + + // Starts a resumable write. How long the write operation remains valid, and + // what happens when the write operation becomes invalid, are + // service-dependent. + rpc StartResumableWrite(StartResumableWriteRequest) returns (StartResumableWriteResponse) { + } + + // Determines the `committed_size` for an object that is being written, which + // can then be used as the `write_offset` for the next `Write()` call. + // + // If the object does not exist (i.e., the object has been deleted, or the + // first `Write()` has not yet reached the service), this method returns the + // error `NOT_FOUND`. + // + // The client **may** call `QueryWriteStatus()` at any time to determine how + // much data has been processed for this object. This is useful if the + // client is buffering data and needs to know which data can be safely + // evicted. For any sequence of `QueryWriteStatus()` calls for a given + // object name, the sequence of returned `committed_size` values will be + // non-decreasing. + rpc QueryWriteStatus(QueryWriteStatusRequest) returns (QueryWriteStatusResponse) { + } + + // Updates an object's metadata. + rpc PatchObject(PatchObjectRequest) returns (Object) { + } + + // Updates an object's metadata. Equivalent to PatchObject, but always + // replaces all mutatable fields of the bucket with new values, reverting all + // unspecified fields to their default values. + rpc UpdateObject(UpdateObjectRequest) returns (Object) { + } + + // Gets the IAM policy for the specified object. + rpc GetObjectIamPolicy(GetIamPolicyRequest) returns (google.iam.v1.Policy) { + } + + // Updates an IAM policy for the specified object. + rpc SetObjectIamPolicy(SetIamPolicyRequest) returns (google.iam.v1.Policy) { + } + + // Tests a set of permissions on the given object to see which, if + // any, are held by the caller. + rpc TestObjectIamPermissions(TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + } + + // Watch for changes on all objects in a bucket. + rpc WatchAllObjects(WatchAllObjectsRequest) returns (Channel) { + } + + // Retrieves the name of a project's Google Cloud Storage service account. + rpc GetServiceAccount(GetProjectServiceAccountRequest) returns (ServiceAccount) { + } + + // Creates a new HMAC key for the given service account. + rpc CreateHmacKey(CreateHmacKeyRequest) returns (CreateHmacKeyResponse) { + } + + // Deletes a given HMAC key. Key must be in an INACTIVE state. + rpc DeleteHmacKey(DeleteHmacKeyRequest) returns (google.protobuf.Empty) { + } + + // Gets an existing HMAC key metadata for the given id. + rpc GetHmacKey(GetHmacKeyRequest) returns (HmacKeyMetadata) { + } + + // Lists HMAC keys under a given project with the additional filters provided. + rpc ListHmacKeys(ListHmacKeysRequest) returns (ListHmacKeysResponse) { + } + + // Updates a given HMAC key state between ACTIVE and INACTIVE. + rpc UpdateHmacKey(UpdateHmacKeyRequest) returns (HmacKeyMetadata) { + } +} + +// Request message for DeleteBucketAccessControl. +message DeleteBucketAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entity holding the permission. Can be one of: + // * `user-`*userId* + // * `user-`*emailAddress* + // * `group-`*groupId* + // * `group-`*emailAddress* + // * `allUsers` + // * `allAuthenticatedUsers` + string entity = 2 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 4; +} + +// Request message for GetBucketAccessControl. +message GetBucketAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entity holding the permission. Can be one of: + // * `user-`*userId* + // * `user-`*emailAddress* + // * `group-`*groupId* + // * `group-`*emailAddress* + // * `allUsers` + // * `allAuthenticatedUsers` + string entity = 2 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 4; +} + +// Request message for InsertBucketAccessControl. +message InsertBucketAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Properties of the new bucket access control being inserted. + BucketAccessControl bucket_access_control = 3; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 4; +} + +// Request message for ListBucketAccessControl. +message ListBucketAccessControlsRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 3; +} + +// Request for PatchBucketAccessControl. +message PatchBucketAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entity holding the permission. Can be one of: + // * `user-`*userId* + // * `user-`*emailAddress* + // * `group-`*groupId* + // * `group-`*emailAddress* + // * `allUsers` + // * `allAuthenticatedUsers` + string entity = 2 [(google.api.field_behavior) = REQUIRED]; + + // The BucketAccessControl for updating. + BucketAccessControl bucket_access_control = 4; + + // List of fields to be updated. + // + // To specify ALL fields, equivalent to the JSON API's "update" function, + // specify a single field with the value `*`. + // + // + // Not specifying any fields is an error. + // Not specifying a field while setting that field to a non-default value is + // an error. + google.protobuf.FieldMask update_mask = 5; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 6; +} + +// Request for UpdateBucketAccessControl. +message UpdateBucketAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entity holding the permission. Can be one of: + // * `user-`*userId* + // * `user-`*emailAddress* + // * `group-`*groupId* + // * `group-`*emailAddress* + // * `allUsers` + // * `allAuthenticatedUsers` + string entity = 2 [(google.api.field_behavior) = REQUIRED]; + + // The BucketAccessControl for updating. + BucketAccessControl bucket_access_control = 4; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 5; +} + +// Request message for DeleteBucket. +message DeleteBucketRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // If set, only deletes the bucket if its metageneration matches this value. + google.protobuf.Int64Value if_metageneration_match = 2; + + // If set, only deletes the bucket if its metageneration does not match this + // value. + google.protobuf.Int64Value if_metageneration_not_match = 3; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 5; +} + +// Request message for GetBucket. +message GetBucketRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Makes the return of the bucket metadata conditional on whether the bucket's + // current metageneration matches the given value. + google.protobuf.Int64Value if_metageneration_match = 2; + + // Makes the return of the bucket metadata conditional on whether the bucket's + // current metageneration does not match the given value. + google.protobuf.Int64Value if_metageneration_not_match = 3; + + // Set of properties to return. Defaults to `NO_ACL`. + CommonEnums.Projection projection = 4; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 6; +} + +// Request message for InsertBucket. +message InsertBucketRequest { + // Apply a predefined set of access controls to this bucket. + CommonEnums.PredefinedBucketAcl predefined_acl = 1; + + // Apply a predefined set of default object access controls to this bucket. + CommonEnums.PredefinedObjectAcl predefined_default_object_acl = 2; + + // Required. A valid API project identifier. + string project = 3 [(google.api.field_behavior) = REQUIRED]; + + // Set of properties to return. Defaults to `NO_ACL`, unless the + // bucket resource specifies `acl` or `defaultObjectAcl` + // properties, when it defaults to `FULL`. + CommonEnums.Projection projection = 4; + + // Properties of the new bucket being inserted, including its name. + Bucket bucket = 6; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 7; +} + +// Request message for ListChannels. +message ListChannelsRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 3; +} + +// Request message for ListBuckets. +message ListBucketsRequest { + // Maximum number of buckets to return in a single response. The service will + // use this parameter or 1,000 items, whichever is smaller. + int32 max_results = 1; + + // A previously-returned page token representing part of the larger set of + // results to view. + string page_token = 2; + + // Filter results to buckets whose names begin with this prefix. + string prefix = 3; + + // Required. A valid API project identifier. + string project = 4 [(google.api.field_behavior) = REQUIRED]; + + // Set of properties to return. Defaults to `NO_ACL`. + CommonEnums.Projection projection = 5; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 7; +} + +// Request message for LockRetentionPolicy. +message LockRetentionPolicyRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Makes the operation conditional on whether bucket's current metageneration + // matches the given value. Must be positive. + int64 if_metageneration_match = 2; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 4; +} + +// Request for PatchBucket method. +message PatchBucketRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Makes the return of the bucket metadata conditional on whether the bucket's + // current metageneration matches the given value. + google.protobuf.Int64Value if_metageneration_match = 2; + + // Makes the return of the bucket metadata conditional on whether the bucket's + // current metageneration does not match the given value. + google.protobuf.Int64Value if_metageneration_not_match = 3; + + // Apply a predefined set of access controls to this bucket. + CommonEnums.PredefinedBucketAcl predefined_acl = 4; + + // Apply a predefined set of default object access controls to this bucket. + CommonEnums.PredefinedObjectAcl predefined_default_object_acl = 5; + + // Set of properties to return. Defaults to `FULL`. + CommonEnums.Projection projection = 6; + + // The Bucket metadata for updating. + Bucket metadata = 8; + + // List of fields to be updated. + // + // To specify ALL fields, equivalent to the JSON API's "update" function, + // specify a single field with the value `*`. Note: not recommended. If a new + // field is introduced at a later time, an older client updating with the `*` + // may accidentally reset the new field's value. + // + // Not specifying any fields is an error. + // Not specifying a field while setting that field to a non-default value is + // an error. + google.protobuf.FieldMask update_mask = 9; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 10; +} + +// Request for UpdateBucket method. +message UpdateBucketRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Makes the return of the bucket metadata conditional on whether the bucket's + // current metageneration matches the given value. + google.protobuf.Int64Value if_metageneration_match = 2; + + // Makes the return of the bucket metadata conditional on whether the bucket's + // current metageneration does not match the given value. + google.protobuf.Int64Value if_metageneration_not_match = 3; + + // Apply a predefined set of access controls to this bucket. + CommonEnums.PredefinedBucketAcl predefined_acl = 4; + + // Apply a predefined set of default object access controls to this bucket. + CommonEnums.PredefinedObjectAcl predefined_default_object_acl = 5; + + // Set of properties to return. Defaults to `FULL`. + CommonEnums.Projection projection = 6; + + // The Bucket metadata for updating. + Bucket metadata = 8; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 9; +} + +// Request message for StopChannel. +message StopChannelRequest { + // The channel to be stopped. + Channel channel = 1; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 2; +} + +// Request message for DeleteDefaultObjectAccessControl. +message DeleteDefaultObjectAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entity holding the permission. Can be one of: + // * `user-`*userId* + // * `user-`*emailAddress* + // * `group-`*groupId* + // * `group-`*emailAddress* + // * `allUsers` + // * `allAuthenticatedUsers` + string entity = 2 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 4; +} + +// Request message for GetDefaultObjectAccessControl. +message GetDefaultObjectAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entity holding the permission. Can be one of: + // * `user-`*userId* + // * `user-`*emailAddress* + // * `group-`*groupId* + // * `group-`*emailAddress* + // * `allUsers` + // * `allAuthenticatedUsers` + string entity = 2 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 4; +} + +// Request message for InsertDefaultObjectAccessControl. +message InsertDefaultObjectAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Properties of the object access control being inserted. + ObjectAccessControl object_access_control = 3; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 4; +} + +// Request message for ListDefaultObjectAccessControls. +message ListDefaultObjectAccessControlsRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // If present, only return default ACL listing if the bucket's current + // metageneration matches this value. + google.protobuf.Int64Value if_metageneration_match = 2; + + // If present, only return default ACL listing if the bucket's current + // metageneration does not match the given value. + google.protobuf.Int64Value if_metageneration_not_match = 3; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 5; +} + +// Request message for PatchDefaultObjectAccessControl. +message PatchDefaultObjectAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entity holding the permission. Can be one of: + // * `user-`*userId* + // * `user-`*emailAddress* + // * `group-`*groupId* + // * `group-`*emailAddress* + // * `allUsers` + // * `allAuthenticatedUsers` + string entity = 2 [(google.api.field_behavior) = REQUIRED]; + + // The ObjectAccessControl for updating. + ObjectAccessControl object_access_control = 4; + + // List of fields to be updated. + // + // To specify ALL fields, equivalent to the JSON API's "update" function, + // specify a single field with the value `*`. Note: not recommended. If a new + // field is introduced at a later time, an older client updating with the `*` + // may accidentally reset the new field's value. + // + // Not specifying any fields is an error. + // Not specifying a field while setting that field to a non-default value is + // an error. + google.protobuf.FieldMask update_mask = 5; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 6; +} + +// Request message for UpdateDefaultObjectAccessControl. +message UpdateDefaultObjectAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entity holding the permission. Can be one of: + // * `user-`*userId* + // * `user-`*emailAddress* + // * `group-`*groupId* + // * `group-`*emailAddress* + // * `allUsers` + // * `allAuthenticatedUsers` + string entity = 2 [(google.api.field_behavior) = REQUIRED]; + + // The ObjectAccessControl for updating. + ObjectAccessControl object_access_control = 4; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 5; +} + +// Request message for DeleteNotification. +message DeleteNotificationRequest { + // Required. The parent bucket of the notification. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the notification to delete. + string notification = 2 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 4; +} + +// Request message for GetNotification. +message GetNotificationRequest { + // Required. The parent bucket of the notification. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Notification ID. + // Required. + string notification = 2 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 4; +} + +// Request message for InsertNotification. +message InsertNotificationRequest { + // Required. The parent bucket of the notification. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Properties of the notification to be inserted. + Notification notification = 3; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 4; +} + +// Request message for ListNotifications. +message ListNotificationsRequest { + // Required. Name of a Google Cloud Storage bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 3; +} + +// Request message for DeleteObjectAccessControl. +message DeleteObjectAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entity holding the permission. Can be one of: + // * `user-`*userId* + // * `user-`*emailAddress* + // * `group-`*groupId* + // * `group-`*emailAddress* + // * `allUsers` + // * `allAuthenticatedUsers` + string entity = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the object. + string object = 3 [(google.api.field_behavior) = REQUIRED]; + + // If present, selects a specific revision of this object (as opposed to the + // latest version, the default). + int64 generation = 4; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 6; +} + +// Request message for GetObjectAccessControl. +message GetObjectAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entity holding the permission. Can be one of: + // * `user-`*userId* + // * `user-`*emailAddress* + // * `group-`*groupId* + // * `group-`*emailAddress* + // * `allUsers` + // * `allAuthenticatedUsers` + string entity = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the object. + string object = 3 [(google.api.field_behavior) = REQUIRED]; + + // If present, selects a specific revision of this object (as opposed to the + // latest version, the default). + int64 generation = 4; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 6; +} + +// Request message for InsertObjectAccessControl. +message InsertObjectAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the object. + string object = 2 [(google.api.field_behavior) = REQUIRED]; + + // If present, selects a specific revision of this object (as opposed to the + // latest version, the default). + int64 generation = 3; + + // Properties of the object access control to be inserted. + ObjectAccessControl object_access_control = 5; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 6; +} + +// Request message for ListObjectAccessControls. +message ListObjectAccessControlsRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the object. + string object = 2 [(google.api.field_behavior) = REQUIRED]; + + // If present, selects a specific revision of this object (as opposed to the + // latest version, the default). + int64 generation = 3; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 5; +} + +// Request message for PatchObjectAccessControl. +message PatchObjectAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entity holding the permission. Can be one of: + // * `user-`*userId* + // * `user-`*emailAddress* + // * `group-`*groupId* + // * `group-`*emailAddress* + // * `allUsers` + // * `allAuthenticatedUsers` + string entity = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the object. + // Required. + string object = 3 [(google.api.field_behavior) = REQUIRED]; + + // If present, selects a specific revision of this object (as opposed to the + // latest version, the default). + int64 generation = 4; + + // The ObjectAccessControl for updating. + ObjectAccessControl object_access_control = 5; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 6; + + // List of fields to be updated. + // + // To specify ALL fields, equivalent to the JSON API's "update" function, + // specify a single field with the value `*`. Note: not recommended. If a new + // field is introduced at a later time, an older client updating with the `*` + // may accidentally reset the new field's value. + // + // Not specifying any fields is an error. + // Not specifying a field while setting that field to a non-default value is + // an error. + google.protobuf.FieldMask update_mask = 7; +} + +// Request message for UpdateObjectAccessControl. +message UpdateObjectAccessControlRequest { + // Required. Name of a bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entity holding the permission. Can be one of: + // * `user-`*userId* + // * `user-`*emailAddress* + // * `group-`*groupId* + // * `group-`*emailAddress* + // * `allUsers` + // * `allAuthenticatedUsers` + string entity = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the object. + // Required. + string object = 3 [(google.api.field_behavior) = REQUIRED]; + + // If present, selects a specific revision of this object (as opposed to the + // latest version, the default). + int64 generation = 4; + + // The ObjectAccessControl for updating. + ObjectAccessControl object_access_control = 6; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 7; + + // List of fields to be updated. + // + // To specify ALL fields, equivalent to the JSON API's "update" function, + // specify a single field with the value `*`. Note: not recommended. If a new + // field is introduced at a later time, an older client updating with the `*` + // may accidentally reset the new field's value. + // + // Not specifying any fields is an error. + // Not specifying a field while setting that field to a non-default value is + // an error. + google.protobuf.FieldMask update_mask = 8; +} + +// Request message for ComposeObject. +message ComposeObjectRequest { + // Description of a source object for a composition request. + message SourceObjects { + // Preconditions for a source object of a composition request. + message ObjectPreconditions { + // Only perform the composition if the generation of the source object + // that would be used matches this value. If this value and a generation + // are both specified, they must be the same value or the call will fail. + google.protobuf.Int64Value if_generation_match = 1; + } + + // The source object's name. All source objects must reside in the same + // bucket. + string name = 1; + + // The generation of this object to use as the source. + int64 generation = 2; + + // Conditions that must be met for this operation to execute. + ObjectPreconditions object_preconditions = 3; + } + + // Required. Name of the bucket containing the source objects. The destination object is + // stored in this bucket. + string destination_bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the new object. + string destination_object = 2 [(google.api.field_behavior) = REQUIRED]; + + // Apply a predefined set of access controls to the destination object. + CommonEnums.PredefinedObjectAcl destination_predefined_acl = 3; + + // Properties of the resulting object. + Object destination = 11; + + // The list of source objects that will be concatenated into a single object. + repeated SourceObjects source_objects = 12; + + // Makes the operation conditional on whether the object's current generation + // matches the given value. Setting to 0 makes the operation succeed only if + // there are no live versions of the object. + google.protobuf.Int64Value if_generation_match = 4; + + // Makes the operation conditional on whether the object's current + // metageneration matches the given value. + google.protobuf.Int64Value if_metageneration_match = 5; + + // Resource name of the Cloud KMS key, of the form + // `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`, + // that will be used to encrypt the object. Overrides the object + // metadata's `kms_key_name` value, if any. + string kms_key_name = 6; + + // A set of parameters common to Storage API requests concerning an object. + CommonObjectRequestParams common_object_request_params = 9; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 10; +} + +// Request message for CopyObject. +message CopyObjectRequest { + // Required. Name of the bucket in which to store the new object. Overrides the provided + // object + // metadata's `bucket` value, if any. + string destination_bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the new object. + // Required when the object metadata is not otherwise provided. Overrides the + // object metadata's `name` value, if any. + string destination_object = 2 [(google.api.field_behavior) = REQUIRED]; + + // Apply a predefined set of access controls to the destination object. + CommonEnums.PredefinedObjectAcl destination_predefined_acl = 3; + + // Makes the operation conditional on whether the destination object's current + // generation matches the given value. Setting to 0 makes the operation + // succeed only if there are no live versions of the object. + google.protobuf.Int64Value if_generation_match = 4; + + // Makes the operation conditional on whether the destination object's current + // generation does not match the given value. If no live object exists, the + // precondition fails. Setting to 0 makes the operation succeed only if there + // is a live version of the object. + google.protobuf.Int64Value if_generation_not_match = 5; + + // Makes the operation conditional on whether the destination object's current + // metageneration matches the given value. + google.protobuf.Int64Value if_metageneration_match = 6; + + // Makes the operation conditional on whether the destination object's current + // metageneration does not match the given value. + google.protobuf.Int64Value if_metageneration_not_match = 7; + + // Makes the operation conditional on whether the source object's current + // generation matches the given value. + google.protobuf.Int64Value if_source_generation_match = 8; + + // Makes the operation conditional on whether the source object's current + // generation does not match the given value. + google.protobuf.Int64Value if_source_generation_not_match = 9; + + // Makes the operation conditional on whether the source object's current + // metageneration matches the given value. + google.protobuf.Int64Value if_source_metageneration_match = 10; + + // Makes the operation conditional on whether the source object's current + // metageneration does not match the given value. + google.protobuf.Int64Value if_source_metageneration_not_match = 11; + + // Set of properties to return. Defaults to `NO_ACL`, unless the + // object resource specifies the `acl` property, when it defaults + // to `full`. + CommonEnums.Projection projection = 12; + + // Required. Name of the bucket in which to find the source object. + string source_bucket = 13 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the source object. + string source_object = 14 [(google.api.field_behavior) = REQUIRED]; + + // If present, selects a specific revision of the source object (as opposed to + // the latest version, the default). + int64 source_generation = 15; + + // Properties of the resulting object. If not set, duplicate properties of + // source object. + Object destination = 17; + + // Resource name of the Cloud KMS key, of the form + // `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`, + // that will be used to encrypt the object. Overrides the object + // metadata's `kms_key_name` value, if any. + string destination_kms_key_name = 20; + + // A set of parameters common to Storage API requests concerning an object. + CommonObjectRequestParams common_object_request_params = 18; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 19; +} + +// Message for deleting an object. +// Either `bucket` and `object` *or* `upload_id` **must** be set (but not both). +message DeleteObjectRequest { + // Required. Name of the bucket in which the object resides. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the object to delete (when not using a resumable write). + string object = 2 [(google.api.field_behavior) = REQUIRED]; + + // The resumable upload_id of the object to delete (when using a + // resumable write). This should be copied from the `upload_id` field of + // `StartResumableWriteResponse`. + string upload_id = 3; + + // If present, permanently deletes a specific revision of this object (as + // opposed to the latest version, the default). + int64 generation = 4; + + // Makes the operation conditional on whether the object's current generation + // matches the given value. Setting to 0 makes the operation succeed only if + // there are no live versions of the object. + google.protobuf.Int64Value if_generation_match = 5; + + // Makes the operation conditional on whether the object's current generation + // does not match the given value. If no live object exists, the precondition + // fails. Setting to 0 makes the operation succeed only if there is a live + // version of the object. + google.protobuf.Int64Value if_generation_not_match = 6; + + // Makes the operation conditional on whether the object's current + // metageneration matches the given value. + google.protobuf.Int64Value if_metageneration_match = 7; + + // Makes the operation conditional on whether the object's current + // metageneration does not match the given value. + google.protobuf.Int64Value if_metageneration_not_match = 8; + + // A set of parameters common to Storage API requests concerning an object. + CommonObjectRequestParams common_object_request_params = 10; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 11; +} + +// Request message for GetObjectMedia. +message GetObjectMediaRequest { + // The name of the bucket containing the object to read. + string bucket = 1; + + // The name of the object to read. + string object = 2; + + // If present, selects a specific revision of this object (as opposed + // to the latest version, the default). + int64 generation = 3; + + // The offset for the first byte to return in the read, relative to the start + // of the object. + // + // A negative `read_offset` value will be interpreted as the number of bytes + // back from the end of the object to be returned. For example, if an object's + // length is 15 bytes, a GetObjectMediaRequest with `read_offset` = -5 and + // `read_limit` = 3 would return bytes 10 through 12 of the object. + int64 read_offset = 4; + + // The maximum number of `data` bytes the server is allowed to return in the + // sum of all `Object` messages. A `read_limit` of zero indicates that there + // is no limit, and a negative `read_limit` will cause an error. + // + // If the stream returns fewer bytes than allowed by the `read_limit` and no + // error occurred, the stream includes all data from the `read_offset` to the + // end of the resource. + int64 read_limit = 5; + + // Makes the operation conditional on whether the object's current generation + // matches the given value. Setting to 0 makes the operation succeed only if + // there are no live versions of the object. + google.protobuf.Int64Value if_generation_match = 6; + + // Makes the operation conditional on whether the object's current generation + // does not match the given value. If no live object exists, the precondition + // fails. Setting to 0 makes the operation succeed only if there is a live + // version of the object. + google.protobuf.Int64Value if_generation_not_match = 7; + + // Makes the operation conditional on whether the object's current + // metageneration matches the given value. + google.protobuf.Int64Value if_metageneration_match = 8; + + // Makes the operation conditional on whether the object's current + // metageneration does not match the given value. + google.protobuf.Int64Value if_metageneration_not_match = 9; + + // A set of parameters common to Storage API requests concerning an object. + CommonObjectRequestParams common_object_request_params = 11; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 12; +} + +// Request message for GetObject. +message GetObjectRequest { + // Required. Name of the bucket in which the object resides. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the object. + string object = 2 [(google.api.field_behavior) = REQUIRED]; + + // If present, selects a specific revision of this object (as opposed to the + // latest version, the default). + int64 generation = 3; + + // Makes the operation conditional on whether the object's current generation + // matches the given value. Setting to 0 makes the operation succeed only if + // there are no live versions of the object. + google.protobuf.Int64Value if_generation_match = 4; + + // Makes the operation conditional on whether the object's current generation + // does not match the given value. If no live object exists, the precondition + // fails. Setting to 0 makes the operation succeed only if there is a live + // version of the object. + google.protobuf.Int64Value if_generation_not_match = 5; + + // Makes the operation conditional on whether the object's current + // metageneration matches the given value. + google.protobuf.Int64Value if_metageneration_match = 6; + + // Makes the operation conditional on whether the object's current + // metageneration does not match the given value. + google.protobuf.Int64Value if_metageneration_not_match = 7; + + // Set of properties to return. Defaults to `NO_ACL`. + CommonEnums.Projection projection = 8; + + // A set of parameters common to Storage API requests concerning an object. + CommonObjectRequestParams common_object_request_params = 10; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 11; +} + +// Response message for GetObject. +message GetObjectMediaResponse { + // A portion of the data for the object. The service **may** leave `data` + // empty for any given `ReadResponse`. This enables the service to inform the + // client that the request is still live while it is running an operation to + // generate more data. + ChecksummedData checksummed_data = 1; + + // The checksums of the complete object. The client should compute one of + // these checksums over the downloaded object and compare it against the value + // provided here. + ObjectChecksums object_checksums = 2; + + // If read_offset and or read_limit was specified on the + // GetObjectMediaRequest, ContentRange will be populated on the first + // GetObjectMediaResponse message of the read stream. + ContentRange content_range = 3; + + // Metadata of the object whose media is being returned. + // Only populated in the first response in the stream. + Object metadata = 4; +} + +// Describes an attempt to insert an object, possibly over multiple requests. +message InsertObjectSpec { + // Destination object, including its name and its metadata. + Object resource = 1; + + // Apply a predefined set of access controls to this object. + CommonEnums.PredefinedObjectAcl predefined_acl = 2; + + // Makes the operation conditional on whether the object's current + // generation matches the given value. Setting to 0 makes the operation + // succeed only if there are no live versions of the object. + google.protobuf.Int64Value if_generation_match = 3; + + // Makes the operation conditional on whether the object's current + // generation does not match the given value. If no live object exists, the + // precondition fails. Setting to 0 makes the operation succeed only if + // there is a live version of the object. + google.protobuf.Int64Value if_generation_not_match = 4; + + // Makes the operation conditional on whether the object's current + // metageneration matches the given value. + google.protobuf.Int64Value if_metageneration_match = 5; + + // Makes the operation conditional on whether the object's current + // metageneration does not match the given value. + google.protobuf.Int64Value if_metageneration_not_match = 6; + + // Set of properties to return. Defaults to `NO_ACL`, unless the + // object resource specifies the `acl` property, when it defaults + // to `full`. + CommonEnums.Projection projection = 7; +} + +// Message for writing an object. +message InsertObjectRequest { + // The first message of each stream should set one of the following. + oneof first_message { + // For resumable uploads. This should be the `upload_id` returned from a + // call to `StartResumableWriteResponse`. + string upload_id = 1; + + // For non-resumable uploads. Describes the overall upload, including the + // destination bucket and object name, preconditions, etc. + InsertObjectSpec insert_object_spec = 2; + } + + // Required. The offset from the beginning of the object at which the data should be + // written. + // + // In the first `InsertObjectRequest` of a `InsertObject()` action, it + // indicates the initial offset for the `Insert()` call. The value **must** be + // equal to the `committed_size` that a call to `QueryWriteStatus()` would + // return (0 if this is the first write to the object). + // + // On subsequent calls, this value **must** be no larger than the sum of the + // first `write_offset` and the sizes of all `data` chunks sent previously on + // this stream. + // + // An incorrect value will cause an error. + int64 write_offset = 3 [(google.api.field_behavior) = REQUIRED]; + + // A portion of the data for the object. + oneof data { + // The data to insert. If a crc32c checksum is provided that doesn't match + // the checksum computed by the service, the request will fail. + ChecksummedData checksummed_data = 4; + + // A reference to an existing object. This can be used to support + // several use cases: + // - Writing a sequence of data buffers supports the basic use case of + // uploading a complete object, chunk by chunk. + // - Writing a sequence of references to existing objects allows an + // object to be composed from a collection of objects, which can be + // used to support parallel object writes. + // - Writing a single reference with a given offset and size can be used + // to create an object from a slice of an existing object. + // - Writing an object referencing a object slice (created as noted + // above) followed by a data buffer followed by another object + // slice can be used to support delta upload functionality. + GetObjectMediaRequest reference = 5; + } + + // Checksums for the complete object. If the checksums computed by the service + // don't match the specifified checksums the call will fail. May only be + // provided in the first or last request (either with first_message, or + // finish_write set). + ObjectChecksums object_checksums = 6; + + // If `true`, this indicates that the write is complete. Sending any + // `InsertObjectRequest`s subsequent to one in which `finish_write` is `true` + // will cause an error. + // For a non-resumable write (where the upload_id was not set in the first + // message), it is an error not to set this field in the final message of the + // stream. + bool finish_write = 7; + + // A set of parameters common to Storage API requests concerning an object. + CommonObjectRequestParams common_object_request_params = 8; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 9; +} + +// Request message for ListObjects. +message ListObjectsRequest { + // Required. Name of the bucket in which to look for objects. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Returns results in a directory-like mode. `items` will contain + // only objects whose names, aside from the `prefix`, do not + // contain `delimiter`. Objects whose names, aside from the + // `prefix`, contain `delimiter` will have their name, + // truncated after the `delimiter`, returned in + // `prefixes`. Duplicate `prefixes` are omitted. + string delimiter = 2; + + // If true, objects that end in exactly one instance of `delimiter` + // will have their metadata included in `items` in addition to + // `prefixes`. + bool include_trailing_delimiter = 3; + + // Maximum number of `items` plus `prefixes` to return + // in a single page of responses. As duplicate `prefixes` are + // omitted, fewer total results may be returned than requested. The service + // will use this parameter or 1,000 items, whichever is smaller. + int32 max_results = 4; + + // A previously-returned page token representing part of the larger set of + // results to view. + string page_token = 5; + + // Filter results to objects whose names begin with this prefix. + string prefix = 6; + + // Set of properties to return. Defaults to `NO_ACL`. + CommonEnums.Projection projection = 7; + + // If `true`, lists all versions of an object as distinct results. + // The default is `false`. For more information, see + // [Object + // Versioning](https://cloud.google.com/storage/docs/object-versioning). + bool versions = 9; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 10; +} + +// Request object for `ByteStream.QueryWriteStatus`. +message QueryWriteStatusRequest { + // Required. The name of the resume token for the object whose write status is being + // requested. + string upload_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to Storage API requests concerning an object. + CommonObjectRequestParams common_object_request_params = 2; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 3; +} + +// Response object for `ByteStream.QueryWriteStatus`. +message QueryWriteStatusResponse { + // The number of bytes that have been processed for the given object. + int64 committed_size = 1; + + // `complete` is `true` only if the client has sent a `InsertObjectRequest` + // with `finish_write` set to true, and the server has processed that request. + bool complete = 2; +} + +// Request message for RewriteObject. +message RewriteObjectRequest { + // Required. Name of the bucket in which to store the new object. Overrides the provided + // object metadata's `bucket` value, if any. + string destination_bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the new object. + // Required when the object metadata is not otherwise provided. Overrides the + // object metadata's `name` value, if any. + string destination_object = 2 [(google.api.field_behavior) = REQUIRED]; + + // Resource name of the Cloud KMS key, of the form + // `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`, + // that will be used to encrypt the object. Overrides the object + // metadata's `kms_key_name` value, if any. + string destination_kms_key_name = 3; + + // Apply a predefined set of access controls to the destination object. + CommonEnums.PredefinedObjectAcl destination_predefined_acl = 4; + + // Makes the operation conditional on whether the object's current generation + // matches the given value. Setting to 0 makes the operation succeed only if + // there are no live versions of the object. + google.protobuf.Int64Value if_generation_match = 5; + + // Makes the operation conditional on whether the object's current generation + // does not match the given value. If no live object exists, the precondition + // fails. Setting to 0 makes the operation succeed only if there is a live + // version of the object. + google.protobuf.Int64Value if_generation_not_match = 6; + + // Makes the operation conditional on whether the destination object's current + // metageneration matches the given value. + google.protobuf.Int64Value if_metageneration_match = 7; + + // Makes the operation conditional on whether the destination object's current + // metageneration does not match the given value. + google.protobuf.Int64Value if_metageneration_not_match = 8; + + // Makes the operation conditional on whether the source object's current + // generation matches the given value. + google.protobuf.Int64Value if_source_generation_match = 9; + + // Makes the operation conditional on whether the source object's current + // generation does not match the given value. + google.protobuf.Int64Value if_source_generation_not_match = 10; + + // Makes the operation conditional on whether the source object's current + // metageneration matches the given value. + google.protobuf.Int64Value if_source_metageneration_match = 11; + + // Makes the operation conditional on whether the source object's current + // metageneration does not match the given value. + google.protobuf.Int64Value if_source_metageneration_not_match = 12; + + // The maximum number of bytes that will be rewritten per rewrite request. + // Most callers + // shouldn't need to specify this parameter - it is primarily in place to + // support testing. If specified the value must be an integral multiple of + // 1 MiB (1048576). Also, this only applies to requests where the source and + // destination span locations and/or storage classes. Finally, this value must + // not change across rewrite calls else you'll get an error that the + // `rewriteToken` is invalid. + int64 max_bytes_rewritten_per_call = 13; + + // Set of properties to return. Defaults to `NO_ACL`, unless the + // object resource specifies the `acl` property, when it defaults + // to `full`. + CommonEnums.Projection projection = 14; + + // Include this field (from the previous rewrite response) on each rewrite + // request after the first one, until the rewrite response 'done' flag is + // true. Calls that provide a rewriteToken can omit all other request fields, + // but if included those fields must match the values provided in the first + // rewrite request. + string rewrite_token = 15; + + // Required. Name of the bucket in which to find the source object. + string source_bucket = 16 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the source object. + string source_object = 17 [(google.api.field_behavior) = REQUIRED]; + + // If present, selects a specific revision of the source object (as opposed to + // the latest version, the default). + int64 source_generation = 18; + + // Properties of the destination, post-rewrite object. + Object object = 20; + + // The algorithm used to encrypt the source object, if any. + string copy_source_encryption_algorithm = 21; + + // The encryption key used to encrypt the source object, if any. + string copy_source_encryption_key = 22; + + // The SHA-256 hash of the key used to encrypt the source object, if any. + string copy_source_encryption_key_sha256 = 23; + + // A set of parameters common to Storage API requests concerning an object. + CommonObjectRequestParams common_object_request_params = 24; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 25; +} + +// A rewrite response. +message RewriteResponse { + // The total bytes written so far, which can be used to provide a waiting user + // with a progress indicator. This property is always present in the response. + int64 total_bytes_rewritten = 1; + + // The total size of the object being copied in bytes. This property is always + // present in the response. + int64 object_size = 2; + + // `true` if the copy is finished; otherwise, `false` if + // the copy is in progress. This property is always present in the response. + bool done = 3; + + // A token to use in subsequent requests to continue copying data. This token + // is present in the response only when there is more data to copy. + string rewrite_token = 4; + + // A resource containing the metadata for the copied-to object. This property + // is present in the response only when copying completes. + Object resource = 5; +} + +// Request message StartResumableWrite. +message StartResumableWriteRequest { + // The destination bucket, object, and metadata, as well as any preconditions. + InsertObjectSpec insert_object_spec = 1; + + // A set of parameters common to Storage API requests concerning an object. + CommonObjectRequestParams common_object_request_params = 3; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 4; +} + +// Response object for ByteStream.StartResumableWrite. +message StartResumableWriteResponse { + // The upload_id of the newly started resumable write operation. This + // value should be copied into the `InsertObjectRequest.upload_id` field. + string upload_id = 1; +} + +// Request message for PatchObject. +message PatchObjectRequest { + // Required. Name of the bucket in which the object resides. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the object. + string object = 2 [(google.api.field_behavior) = REQUIRED]; + + // If present, selects a specific revision of this object (as opposed to the + // latest version, the default). + int64 generation = 3; + + // Makes the operation conditional on whether the object's current generation + // matches the given value. Setting to 0 makes the operation succeed only if + // there are no live versions of the object. + google.protobuf.Int64Value if_generation_match = 4; + + // Makes the operation conditional on whether the object's current generation + // does not match the given value. If no live object exists, the precondition + // fails. Setting to 0 makes the operation succeed only if there is a live + // version of the object. + google.protobuf.Int64Value if_generation_not_match = 5; + + // Makes the operation conditional on whether the object's current + // metageneration matches the given value. + google.protobuf.Int64Value if_metageneration_match = 6; + + // Makes the operation conditional on whether the object's current + // metageneration does not match the given value. + google.protobuf.Int64Value if_metageneration_not_match = 7; + + // Apply a predefined set of access controls to this object. + CommonEnums.PredefinedObjectAcl predefined_acl = 8; + + // Set of properties to return. Defaults to `FULL`. + CommonEnums.Projection projection = 9; + + // The Object metadata for updating. + Object metadata = 11; + + // List of fields to be updated. + // + // To specify ALL fields, equivalent to the JSON API's "update" function, + // specify a single field with the value `*`. Note: not recommended. If a new + // field is introduced at a later time, an older client updating with the `*` + // may accidentally reset the new field's value. + // + // Not specifying any fields is an error. + // Not specifying a field while setting that field to a non-default value is + // an error. + google.protobuf.FieldMask update_mask = 12; + + // A set of parameters common to Storage API requests concerning an object. + CommonObjectRequestParams common_object_request_params = 13; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 14; +} + +// Request message for UpdateObject. +message UpdateObjectRequest { + // Required. Name of the bucket in which the object resides. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the object. + string object = 2 [(google.api.field_behavior) = REQUIRED]; + + // If present, selects a specific revision of this object (as opposed to the + // latest version, the default). + int64 generation = 3; + + // Makes the operation conditional on whether the object's current generation + // matches the given value. Setting to 0 makes the operation succeed only if + // there are no live versions of the object. + google.protobuf.Int64Value if_generation_match = 4; + + // Makes the operation conditional on whether the object's current generation + // does not match the given value. If no live object exists, the precondition + // fails. Setting to 0 makes the operation succeed only if there is a live + // version of the object. + google.protobuf.Int64Value if_generation_not_match = 5; + + // Makes the operation conditional on whether the object's current + // metageneration matches the given value. + google.protobuf.Int64Value if_metageneration_match = 6; + + // Makes the operation conditional on whether the object's current + // metageneration does not match the given value. + google.protobuf.Int64Value if_metageneration_not_match = 7; + + // Apply a predefined set of access controls to this object. + CommonEnums.PredefinedObjectAcl predefined_acl = 8; + + // Set of properties to return. Defaults to `FULL`. + CommonEnums.Projection projection = 9; + + // The Object metadata for updating. + Object metadata = 11; + + // A set of parameters common to Storage API requests concerning an object. + CommonObjectRequestParams common_object_request_params = 12; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 13; +} + +// Request message for WatchAllObjects. +message WatchAllObjectsRequest { + // Name of the bucket in which to look for objects. + string bucket = 1; + + // If `true`, lists all versions of an object as distinct results. + // The default is `false`. For more information, see + // [Object + // Versioning](https://cloud.google.com/storage/docs/object-versioning). + bool versions = 2; + + // Returns results in a directory-like mode. `items` will contain + // only objects whose names, aside from the `prefix`, do not + // contain `delimiter`. Objects whose names, aside from the + // `prefix`, contain `delimiter` will have their name, + // truncated after the `delimiter`, returned in + // `prefixes`. Duplicate `prefixes` are omitted. + string delimiter = 3; + + // Maximum number of `items` plus `prefixes` to return + // in a single page of responses. As duplicate `prefixes` are + // omitted, fewer total results may be returned than requested. The service + // will use this parameter or 1,000 items, whichever is smaller. + int32 max_results = 4; + + // Filter results to objects whose names begin with this prefix. + string prefix = 5; + + // If true, objects that end in exactly one instance of `delimiter` + // will have their metadata included in `items` in addition to + // `prefixes`. + bool include_trailing_delimiter = 6; + + // A previously-returned page token representing part of the larger set of + // results to view. + string page_token = 7; + + // Set of properties to return. Defaults to `NO_ACL`. + CommonEnums.Projection projection = 8; + + // Properties of the channel to be inserted. + Channel channel = 10; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 11; +} + +// Request message for GetProjectServiceAccount. +message GetProjectServiceAccountRequest { + // Required. Project ID. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 3; +} + +message CreateHmacKeyRequest { + // Required. The project that the HMAC-owning service account lives in. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The service account to create the HMAC for. + string service_account_email = 2 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 3; +} + +// Create hmac response. The only time the secret for an HMAC will be returned. +message CreateHmacKeyResponse { + // Key metadata. + HmacKeyMetadata metadata = 1; + + // HMAC key secret material. + string secret = 2; +} + +// Request object to delete a given HMAC key. +message DeleteHmacKeyRequest { + // Required. The identifying key for the HMAC to delete. + string access_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The project id the HMAC key lies in. + string project_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 3; +} + +// Request object to get metadata on a given HMAC key. +message GetHmacKeyRequest { + // Required. The identifying key for the HMAC to delete. + string access_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The project id the HMAC key lies in. + string project_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 3; +} + +// Request to fetch a list of HMAC keys under a given project. +message ListHmacKeysRequest { + // Required. The project id to list HMAC keys for. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // An optional filter to only return HMAC keys for one service account. + string service_account_email = 2; + + // An optional bool to return deleted keys that have not been wiped out yet. + bool show_deleted_keys = 3; + + // The maximum number of keys to return. + int32 max_results = 4; + + // A previously returned token from ListHmacKeysResponse to get the next page. + string page_token = 5; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 6; +} + +// Hmac key list response with next page information. +message ListHmacKeysResponse { + // The continuation token, used to page through large result sets. Provide + // this value in a subsequent request to return the next page of results. + string next_page_token = 1; + + // The list of items. + repeated HmacKeyMetadata items = 2; +} + +// Request object to update an HMAC key state. +message UpdateHmacKeyRequest { + // Required. The id of the HMAC key. + string access_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The project id the HMAC's service account lies in. + string project_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The service account owner of the HMAC key. + HmacKeyMetadata metadata = 3 [(google.api.field_behavior) = REQUIRED]; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 5; +} + +// A wrapper around the IAM get policy request to support our +// common_request_params. +message GetIamPolicyRequest { + // The request sent to IAM. + google.iam.v1.GetIamPolicyRequest iam_request = 1; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 2; +} + +// A wrapper around the IAM set policy request to support our +// common_request_params. +message SetIamPolicyRequest { + // The request sent to IAM. + google.iam.v1.SetIamPolicyRequest iam_request = 1; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 2; +} + +// A wrapper around the IAM test iam permissions request to support our +// common_request_params. +message TestIamPermissionsRequest { + // The request sent to IAM. + google.iam.v1.TestIamPermissionsRequest iam_request = 1; + + // A set of parameters common to all Storage API requests. + CommonRequestParams common_request_params = 2; +} + +// Parameters that can be passed to any object request. +message CommonObjectRequestParams { + // Encryption algorithm used with Customer-Supplied Encryption Keys feature. + string encryption_algorithm = 1; + + // Encryption key used with Customer-Supplied Encryption Keys feature. + string encryption_key = 2; + + // SHA256 hash of encryption key used with Customer-Supplied Encryption Keys + // feature. + string encryption_key_sha256 = 3; +} + +// Parameters that can be passed to any request. +message CommonRequestParams { + // Required. Required when using buckets with Requestor Pays feature enabled. + string user_project = 1 [(google.api.field_behavior) = REQUIRED]; + + // Lets you enforce per-user quotas from a server-side application even in + // cases when the user's IP address is unknown. This can occur, for example, + // with applications that run cron jobs on App Engine on a user's behalf. + // You can choose any arbitrary string that uniquely identifies a user, but it + // is limited to 40 characters. + // Overrides user_ip if both are provided. + string quota_user = 2; + + // Subset of fields to include in the response. + google.protobuf.FieldMask fields = 4; +} + +// Shared constants. +message ServiceConstants { + // A collection of constant values meaningful to the Storage API. + enum Values { + option allow_alias = true; + + // Unused. Proto3 requires first enum to be 0. + VALUES_UNSPECIFIED = 0; + + // The maximum size chunk that can will be returned in a single + // ReadRequest. + // 2 MiB. + MAX_READ_CHUNK_BYTES = 2097152; + + // The maximum size chunk that can be sent in a single InsertObjectRequest. + // 2 MiB. + MAX_WRITE_CHUNK_BYTES = 2097152; + + // The maximum size of an object in MB - whether written in a single stream + // or composed from multiple other objects. + // 5 TiB. + MAX_OBJECT_SIZE_MB = 5242880; + + // The maximum length field name that can be sent in a single + // custom metadata field. + // 1 KiB. + MAX_CUSTOM_METADATA_FIELD_NAME_BYTES = 1024; + + // The maximum length field value that can be sent in a single + // custom_metadata field. + // 4 KiB. + MAX_CUSTOM_METADATA_FIELD_VALUE_BYTES = 4096; + + // The maximum total bytes that can be populated into all field names and + // values of the custom_metadata for one object. + // 8 KiB. + MAX_CUSTOM_METADATA_TOTAL_SIZE_BYTES = 8192; + + // The maximum total bytes that can be populated into all bucket metadata + // fields. + // 20 KiB. + MAX_BUCKET_METADATA_TOTAL_SIZE_BYTES = 20480; + + // The maximum number of NotificationConfigurations that can be registered + // for a given bucket. + MAX_NOTIFICATION_CONFIGS_PER_BUCKET = 100; + + // The maximum number of LifecycleRules that can be registered for a given + // bucket. + MAX_LIFECYCLE_RULES_PER_BUCKET = 100; + + // The maximum number of custom attributes per NotificationConfig. + MAX_NOTIFICATION_CUSTOM_ATTRIBUTES = 5; + + // The maximum length of a custom attribute key included in + // NotificationConfig. + MAX_NOTIFICATION_CUSTOM_ATTRIBUTE_KEY_LENGTH = 256; + + // The maximum length of a custom attribute value included in a + // NotificationConfig. + MAX_NOTIFICATION_CUSTOM_ATTRIBUTE_VALUE_LENGTH = 1024; + + // The maximum number of key/value entries per bucket label. + MAX_LABELS_ENTRIES_COUNT = 64; + + // The maximum character length of the key or value in a bucket + // label map. + MAX_LABELS_KEY_VALUE_LENGTH = 63; + + // The maximum byte size of the key or value in a bucket label + // map. + MAX_LABELS_KEY_VALUE_BYTES = 128; + + // The maximum number of object IDs that can be included in a + // DeleteObjectsRequest. + MAX_OBJECT_IDS_PER_DELETE_OBJECTS_REQUEST = 1000; + + // The maximum number of days for which a token returned by the + // GetListObjectsSplitPoints RPC is valid. + SPLIT_TOKEN_MAX_VALID_DAYS = 14; + } + + +} diff --git a/google/storage/v1/storage_gapic.yaml b/google/storage/v1/storage_gapic.yaml new file mode 100644 index 000000000..e8e4de287 --- /dev/null +++ b/google/storage/v1/storage_gapic.yaml @@ -0,0 +1,21 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 2.0.0 +language_settings: + java: + package_name: com.google.cloud.google.storage.v1 + # Note: We are launching the GCS gRPC API with only C++ and Java support, but + # settings for the other languages still must be present else the build_gen + # step will fail with NPE. + python: + package_name: google.cloud.storage_v1 + go: + package_name: cloud.google.com/go/storage/apiv1 + csharp: + package_name: Google.Cloud.Storage.V1 + ruby: + package_name: Google::Cloud::Storage::V1 + php: + package_name: Google\Cloud\Storage\V1 + nodejs: + package_name: storage.v1 + domain_layer_location: google-cloud diff --git a/google/storage/v1/storage_resources.proto b/google/storage/v1/storage_resources.proto new file mode 100644 index 000000000..45c0ce6ad --- /dev/null +++ b/google/storage/v1/storage_resources.proto @@ -0,0 +1,872 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.storage.v1; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option go_package = "google.golang.org/genproto/googleapis/storage/v1;storage"; +option java_multiple_files = true; +option java_outer_classname = "CloudStorageResourcesProto"; +option java_package = "com.google.storage.v1"; + +// A bucket. +message Bucket { + // Billing properties of a bucket. + message Billing { + // When set to true, Requester Pays is enabled for this bucket. + bool requester_pays = 1; + } + + // Cross-Origin Response sharing (CORS) properties for a bucket. + // For more on GCS and CORS, see + // https://cloud.google.com/storage/docs/cross-origin. + // For more on CORS in general, see https://tools.ietf.org/html/rfc6454. + message Cors { + // The list of Origins eligible to receive CORS response headers. See + // [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. + // Note: "*" is permitted in the list of origins, and means "any Origin". + repeated string origin = 1; + + // The list of HTTP methods on which to include CORS response headers, + // (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of + // methods, and means "any method". + repeated string method = 2; + + // The list of HTTP headers other than the + // [https://www.w3.org/TR/cors/#simple-response-header][simple response + // headers] to give permission for the user-agent to share across domains. + repeated string response_header = 3; + + // The value, in seconds, to return in the + // [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age + // header] used in preflight responses. + int32 max_age_seconds = 4; + } + + // Encryption properties of a bucket. + message Encryption { + // A Cloud KMS key that will be used to encrypt objects inserted into this + // bucket, if no encryption method is specified. + string default_kms_key_name = 1; + } + + // Bucket restriction options currently enforced on the bucket. + message IamConfiguration { + message UniformBucketLevelAccess { + // If set, access checks only use bucket-level IAM policies or above. + bool enabled = 1; + + // The deadline time for changing + // iamConfiguration.uniformBucketLevelAccess.enabled from + // true to false in [https://tools.ietf.org/html/rfc3339][RFC 3339]. After + // the deadline is passed the field is immutable. + google.protobuf.Timestamp locked_time = 2; + } + + UniformBucketLevelAccess uniform_bucket_level_access = 1; + } + + // Lifecycle properties of a bucket. + // For more information, see https://cloud.google.com/storage/docs/lifecycle. + message Lifecycle { + // A lifecycle Rule, combining an action to take on an object and a + // condition which will trigger that action. + message Rule { + // An action to take on an object. + message Action { + // Type of the action. Currently, only `Delete` and + // `SetStorageClass` are supported. + string type = 1; + + // Target storage class. Required iff the type of the action is + // SetStorageClass. + string storage_class = 2; + } + + // A condition of an object which triggers some action. + message Condition { + // Age of an object (in days). This condition is satisfied when an + // object reaches the specified age. + int32 age = 1; + + // A date in [RFC 3339][1] format with only the date part (for + // instance, "2013-01-15"). This condition is satisfied when an + // object is created before midnight of the specified date in UTC. + // [1]: https://tools.ietf.org/html/rfc3339 + google.protobuf.Timestamp created_before = 2; + + // Relevant only for versioned objects. If the value is + // `true`, this condition matches live objects; if the value + // is `false`, it matches archived objects. + google.protobuf.BoolValue is_live = 3; + + // Relevant only for versioned objects. If the value is N, this + // condition is satisfied when there are at least N versions (including + // the live version) newer than this version of the object. + int32 num_newer_versions = 4; + + // Objects having any of the storage classes specified by this condition + // will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`, + // `NEARLINE`, `COLDLINE`, `STANDARD`, and + // `DURABLE_REDUCED_AVAILABILITY`. + repeated string matches_storage_class = 5; + + // A regular expression that satisfies the RE2 syntax. This condition is + // satisfied when the name of the object matches the RE2 pattern. Note: + // This feature is currently in the "Early Access" launch stage and is + // only available to a whitelisted set of users; that means that this + // feature may be changed in backward-incompatible ways and that it is + // not guaranteed to be released. + string matches_pattern = 6; + } + + // The action to take. + Action action = 1; + + // The condition(s) under which the action will be taken. + Condition condition = 2; + } + + // A lifecycle management rule, which is made of an action to take and the + // condition(s) under which the action will be taken. + repeated Rule rule = 1; + } + + // Logging-related properties of a bucket. + message Logging { + // The destination bucket where the current bucket's logs should be placed. + string log_bucket = 1; + + // A prefix for log object names. + string log_object_prefix = 2; + } + + // Retention policy properties of a bucket. + message RetentionPolicy { + // Server-determined value that indicates the time from which policy was + // enforced and effective. This value is in + // [https://tools.ietf.org/html/rfc3339][RFC 3339] format. + google.protobuf.Timestamp effective_time = 1; + + // Once locked, an object retention policy cannot be modified. + bool is_locked = 2; + + // The duration in seconds that objects need to be retained. Retention + // duration must be greater than zero and less than 100 years. Note that + // enforcement of retention periods less than a day is not guaranteed. Such + // periods should only be used for testing purposes. + int64 retention_period = 3; + } + + // Properties of a bucket related to versioning. + // For more on GCS versioning, see + // https://cloud.google.com/storage/docs/object-versioning. + message Versioning { + // While set to true, versioning is fully enabled for this bucket. + bool enabled = 1; + } + + // Properties of a bucket related to accessing the contents as a static + // website. For more on hosting a static website via GCS, see + // https://cloud.google.com/storage/docs/hosting-static-website. + message Website { + // If the requested object path is missing, the service will ensure the path + // has a trailing '/', append this suffix, and attempt to retrieve the + // resulting object. This allows the creation of `index.html` + // objects to represent directory pages. + string main_page_suffix = 1; + + // If the requested object path is missing, and any + // `mainPageSuffix` object is missing, if applicable, the service + // will return the named object from this bucket as the content for a + // [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found] + // result. + string not_found_page = 2; + } + + // Access controls on the bucket. + repeated BucketAccessControl acl = 1; + + // Default access controls to apply to new objects when no ACL is provided. + repeated ObjectAccessControl default_object_acl = 2; + + // The bucket's lifecycle configuration. See + // [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management] + // for more information. + Lifecycle lifecycle = 3; + + // The creation time of the bucket in + // [https://tools.ietf.org/html/rfc3339][RFC 3339] format. + // Attempting to set this field will result in an error. + google.protobuf.Timestamp time_created = 4; + + // The ID of the bucket. For buckets, the `id` and `name` properties are the + // same. + // Attempting to update this field after the bucket is created will result in + // an error. + string id = 5; + + // The name of the bucket. + // Attempting to update this field after the bucket is created will result in + // an error. + string name = 6; + + // The project number of the project the bucket belongs to. + // Attempting to set this field will result in an error. + int64 project_number = 7; + + // The metadata generation of this bucket. + // Attempting to set this field will result in an error. + int64 metageneration = 8; + + // The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing] + // (CORS) configuration. + repeated Cors cors = 9; + + // The location of the bucket. Object data for objects in the bucket resides + // in physical storage within this region. Defaults to `US`. See the + // [https://developers.google.com/storage/docs/concepts-techniques#specifyinglocations"][developer's + // guide] for the authoritative list. Attempting to update this field after + // the bucket is created will result in an error. + string location = 10; + + // The bucket's default storage class, used whenever no storageClass is + // specified for a newly-created object. This defines how objects in the + // bucket are stored and determines the SLA and the cost of storage. + // If this value is not specified when the bucket is created, it will default + // to `STANDARD`. For more information, see + // https://developers.google.com/storage/docs/storage-classes. + string storage_class = 11; + + // HTTP 1.1 [https://tools.ietf.org/html/rfc7232#section-2.3"]Entity tag] + // for the bucket. + // Attempting to set this field will result in an error. + string etag = 12; + + // The modification time of the bucket. + // Attempting to set this field will result in an error. + google.protobuf.Timestamp updated = 13; + + // The default value for event-based hold on newly created objects in this + // bucket. Event-based hold is a way to retain objects indefinitely until an + // event occurs, signified by the + // hold's release. After being released, such objects will be subject to + // bucket-level retention (if any). One sample use case of this flag is for + // banks to hold loan documents for at least 3 years after loan is paid in + // full. Here, bucket-level retention is 3 years and the event is loan being + // paid in full. In this example, these objects will be held intact for any + // number of years until the event has occurred (event-based hold on the + // object is released) and then 3 more years after that. That means retention + // duration of the objects begins from the moment event-based hold + // transitioned from true to false. Objects under event-based hold cannot be + // deleted, overwritten or archived until the hold is removed. + bool default_event_based_hold = 14; + + // User-provided labels, in key/value pairs. + map labels = 15; + + // The bucket's website configuration, controlling how the service behaves + // when accessing bucket contents as a web site. See the + // [https://cloud.google.com/storage/docs/static-website][Static Website + // Examples] for more information. + Website website = 16; + + // The bucket's versioning configuration. + Versioning versioning = 17; + + // The bucket's logging configuration, which defines the destination bucket + // and optional name prefix for the current bucket's logs. + Logging logging = 18; + + // The owner of the bucket. This is always the project team's owner group. + Owner owner = 19; + + // Encryption configuration for a bucket. + Encryption encryption = 20; + + // The bucket's billing configuration. + Billing billing = 21; + + // The bucket's retention policy. The retention policy enforces a minimum + // retention time for all objects contained in the bucket, based on their + // creation time. Any attempt to overwrite or delete objects younger than the + // retention period will result in a PERMISSION_DENIED error. An unlocked + // retention policy can be modified or removed from the bucket via a + // storage.buckets.update operation. A locked retention policy cannot be + // removed or shortened in duration for the lifetime of the bucket. + // Attempting to remove or decrease period of a locked retention policy will + // result in a PERMISSION_DENIED error. + RetentionPolicy retention_policy = 22; + + // The location type of the bucket (region, dual-region, multi-region, etc). + string location_type = 23; + + // The bucket's IAM configuration. + IamConfiguration iam_configuration = 24; + + // The zone or zones from which the bucket is intended to use zonal quota. + // Requests for data from outside the specified affinities are still allowed + // but won’t be able to use zonal quota. The values are case-insensitive. + // Attempting to update this field after bucket is created will result in an + // error. + repeated string zone_affinity = 25; +} + +// An access-control entry. +message BucketAccessControl { + // The access permission for the entity. + string role = 1; + + // HTTP 1.1 ["https://tools.ietf.org/html/rfc7232#section-2.3][Entity tag] + // for the access-control entry. + string etag = 2; + + // The ID of the access-control entry. + string id = 3; + + // The name of the bucket. + string bucket = 4; + + // The entity holding the permission, in one of the following forms: + // * `user-{userid}` + // * `user-{email}` + // * `group-{groupid}` + // * `group-{email}` + // * `domain-{domain}` + // * `project-{team-projectid}` + // * `allUsers` + // * `allAuthenticatedUsers` + // Examples: + // * The user `liz@example.com` would be `user-liz@example.com`. + // * The group `example@googlegroups.com` would be + // `group-example@googlegroups.com` + // * All members of the Google Apps for Business domain `example.com` would be + // `domain-example.com` + string entity = 6; + + // The ID for the entity, if any. + string entity_id = 7; + + // The email address associated with the entity, if any. + string email = 8; + + // The domain associated with the entity, if any. + string domain = 9; + + // The project team associated with the entity, if any. + ProjectTeam project_team = 10; +} + +// The response to a call to BucketAccessControls.ListBucketAccessControls. +message ListBucketAccessControlsResponse { + // The list of items. + repeated BucketAccessControl items = 1; +} + +// The result of a call to Buckets.ListBuckets +message ListBucketsResponse { + // The list of items. + repeated Bucket items = 1; + + // The continuation token, used to page through large result sets. Provide + // this value in a subsequent request to return the next page of results. + string next_page_token = 2; +} + +// An notification channel used to watch for resource changes. +message Channel { + // A UUID or similar unique string that identifies this channel. + string id = 1; + + // An opaque ID that identifies the resource being watched on this channel. + // Stable across different API versions. + string resource_id = 2; + + // A version-specific identifier for the watched resource. + string resource_uri = 3; + + // An arbitrary string delivered to the target address with each notification + // delivered over this channel. Optional. + string token = 4; + + // Date and time of notification channel expiration. Optional. + google.protobuf.Timestamp expiration = 5; + + // The type of delivery mechanism used for this channel. + string type = 6; + + // The address where notifications are delivered for this channel. + string address = 7; + + // Additional parameters controlling delivery channel behavior. Optional. + map params = 8; + + // A Boolean value to indicate whether payload is wanted. Optional. + bool payload = 9; +} + +// The result of a call to Channels.ListChannels +message ListChannelsResponse { + message Items { + // User-specified name for a channel. Needed to unsubscribe. + string channel_id = 1; + + // Opaque value generated by GCS representing a bucket. Needed to + // unsubscribe. + string resource_id = 2; + + // Url used to identify where notifications are sent to. + string push_url = 3; + + // Email address of the subscriber. + string subscriber_email = 4; + + // Time when the channel was created. + google.protobuf.Timestamp creation_time = 5; + } + + // The list of notification channels for a bucket. + repeated Items items = 1; +} + +// Message used to convey content being read or written, along with its +// checksum. +message ChecksummedData { + // The data. + bytes content = 1; + + // CRC32C digest of the contents. + google.protobuf.UInt32Value crc32c = 2; +} + +// Message used for storing full (not subrange) object checksums. +message ObjectChecksums { + // CRC32C digest of the object data. Computed by the GCS service for + // all written objects, and validated by the GCS service against + // client-supplied values if present in an InsertObjectRequest. + google.protobuf.UInt32Value crc32c = 1; + + // Hex-encoded MD5 hash of the object data (hexdigest). Whether/how this + // checksum is provided and validated is service-dependent. + string md5_hash = 2; +} + +// A collection of enums used in multiple places throughout the API. +message CommonEnums { + // A set of properties to return in a response. + enum Projection { + // No specified projection. + PROJECTION_UNSPECIFIED = 0; + + // Omit `owner`, `acl`, and `defaultObjectAcl` properties. + NO_ACL = 1; + + // Include all properties. + FULL = 2; + } + + // Predefined or "canned" aliases for sets of specific bucket ACL entries. + enum PredefinedBucketAcl { + // No predefined ACL. + PREDEFINED_BUCKET_ACL_UNSPECIFIED = 0; + + // Project team owners get `OWNER` access, and + // `allAuthenticatedUsers` get `READER` access. + BUCKET_ACL_AUTHENTICATED_READ = 1; + + // Project team owners get `OWNER` access. + BUCKET_ACL_PRIVATE = 2; + + // Project team members get access according to their roles. + BUCKET_ACL_PROJECT_PRIVATE = 3; + + // Project team owners get `OWNER` access, and + // `allUsers` get `READER` access. + BUCKET_ACL_PUBLIC_READ = 4; + + // Project team owners get `OWNER` access, and + // `allUsers` get `WRITER` access. + BUCKET_ACL_PUBLIC_READ_WRITE = 5; + } + + // Predefined or "canned" aliases for sets of specific object ACL entries. + enum PredefinedObjectAcl { + // No predefined ACL. + PREDEFINED_OBJECT_ACL_UNSPECIFIED = 0; + + // Object owner gets `OWNER` access, and + // `allAuthenticatedUsers` get `READER` access. + OBJECT_ACL_AUTHENTICATED_READ = 1; + + // Object owner gets `OWNER` access, and project team owners get + // `OWNER` access. + OBJECT_ACL_BUCKET_OWNER_FULL_CONTROL = 2; + + // Object owner gets `OWNER` access, and project team owners get + // `READER` access. + OBJECT_ACL_BUCKET_OWNER_READ = 3; + + // Object owner gets `OWNER` access. + OBJECT_ACL_PRIVATE = 4; + + // Object owner gets `OWNER` access, and project team members get + // access according to their roles. + OBJECT_ACL_PROJECT_PRIVATE = 5; + + // Object owner gets `OWNER` access, and `allUsers` + // get `READER` access. + OBJECT_ACL_PUBLIC_READ = 6; + } + + +} + +// Specifies a requested range of bytes to download. +message ContentRange { + // The starting offset of the object data. + int64 start = 1; + + // The ending offset of the object data. + int64 end = 2; + + // The complete length of the object data. + int64 complete_length = 3; +} + +// Hmac Key Metadata, which includes all information other than the secret. +message HmacKeyMetadata { + // Resource name ID of the key in the format /. + string id = 1; + + // Globally unique id for keys. + string access_id = 2; + + // The project ID that the hmac key is contained in. + string project_id = 3; + + // Email of the service account the key authenticates as. + string service_account_email = 4; + + // State of the key. One of ACTIVE, INACTIVE, or DELETED. + string state = 5; + + // The creation time of the HMAC key in RFC 3339 format. + google.protobuf.Timestamp time_created = 6; + + // The last modification time of the HMAC key metadata in RFC 3339 format. + google.protobuf.Timestamp updated = 7; + + // Tag updated with each key update. + string etag = 8; +} + +// A subscription to receive Google PubSub notifications. +message Notification { + // The Cloud PubSub topic to which this subscription publishes. Formatted as: + // '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}' + string topic = 1; + + // If present, only send notifications about listed event types. If empty, + // sent notifications for all event types. + repeated string event_types = 2; + + // An optional list of additional attributes to attach to each Cloud PubSub + // message published for this notification subscription. + map custom_attributes = 3; + + // HTTP 1.1 [https://tools.ietf.org/html/rfc7232#section-2.3][Entity tag] + // for this subscription notification. + string etag = 4; + + // If present, only apply this notification configuration to object names that + // begin with this prefix. + string object_name_prefix = 5; + + // The desired content of the Payload. + string payload_format = 6; + + // The ID of the notification. + string id = 7; +} + +// The result of a call to Notifications.ListNotifications +message ListNotificationsResponse { + // The list of items. + repeated Notification items = 1; +} + +// An object. +message Object { + // Describes the customer-specified mechanism used to store the data at rest. + message CustomerEncryption { + // The encryption algorithm. + string encryption_algorithm = 1; + + // SHA256 hash value of the encryption key. + string key_sha256 = 2; + } + + // Content-Encoding of the object data, matching + // [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2] + string content_encoding = 1; + + // Content-Disposition of the object data, matching + // [https://tools.ietf.org/html/rfc6266][RFC 6266]. + string content_disposition = 2; + + // Cache-Control directive for the object data, matching + // [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2]. + // If omitted, and the object is accessible to all anonymous users, the + // default will be `public, max-age=3600`. + string cache_control = 3; + + // Access controls on the object. + repeated ObjectAccessControl acl = 4; + + // Content-Language of the object data, matching + // [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2]. + string content_language = 5; + + // The version of the metadata for this object at this generation. Used for + // preconditions and for detecting changes in metadata. A metageneration + // number is only meaningful in the context of a particular generation of a + // particular object. + // Attempting to set this field will result in an error. + int64 metageneration = 6; + + // The deletion time of the object. Will be returned if and only if this + // version of the object has been deleted. + // Attempting to set this field will result in an error. + google.protobuf.Timestamp time_deleted = 7; + + // Content-Type of the object data, matching + // [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5]. + // If an object is stored without a Content-Type, it is served as + // `application/octet-stream`. + string content_type = 8; + + // Content-Length of the object data in bytes, matching + // [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2]. + // Attempting to set this field will result in an error. + int64 size = 9; + + // The creation time of the object. + // Attempting to set this field will result in an error. + google.protobuf.Timestamp time_created = 10; + + // CRC32c checksum. For more information about using the CRC32c + // checksum, see + // [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and + // ETags: Best Practices]. This is a server determined value and should not be + // supplied by the user when sending an Object. The server will ignore any + // value provided. Users should instead use the object_checksums field on the + // InsertObjectRequest when uploading an object. + google.protobuf.UInt32Value crc32c = 11; + + // Number of underlying components that make up this object. Components are + // accumulated by compose operations. + // Attempting to set this field will result in an error. + int32 component_count = 12; + + // MD5 hash of the data; encoded using base64 as per + // [https://tools.ietf.org/html/rfc4648#section-4][RFC 4648 §4]. For more + // information about using the MD5 hash, see + // [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and + // ETags: Best Practices]. This is a server determined value and should not be + // supplied by the user when sending an Object. The server will ignore any + // value provided. Users should instead use the object_checksums field on the + // InsertObjectRequest when uploading an object. + string md5_hash = 13; + + // HTTP 1.1 Entity tag for the object. See + // [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3]. + // Attempting to set this field will result in an error. + string etag = 14; + + // The modification time of the object metadata. + // Attempting to set this field will result in an error. + google.protobuf.Timestamp updated = 15; + + // Storage class of the object. + string storage_class = 16; + + // Cloud KMS Key used to encrypt this object, if the object is encrypted by + // such a key. + string kms_key_name = 17; + + // The time at which the object's storage class was last changed. When the + // object is initially created, it will be set to time_created. + // Attempting to set this field will result in an error. + google.protobuf.Timestamp time_storage_class_updated = 18; + + // Whether an object is under temporary hold. While this flag is set to true, + // the object is protected against deletion and overwrites. A common use case + // of this flag is regulatory investigations where objects need to be retained + // while the investigation is ongoing. Note that unlike event-based hold, + // temporary hold does not impact retention expiration time of an object. + bool temporary_hold = 19; + + // A server-determined value that specifies the earliest time that the + // object's retention period expires. This value is in + // [https://tools.ietf.org/html/rfc3339][RFC 3339] format. + // Note 1: This field is not provided for objects with an active event-based + // hold, since retention expiration is unknown until the hold is removed. + // Note 2: This value can be provided even when temporary hold is set (so that + // the user can reason about policy without having to first unset the + // temporary hold). + google.protobuf.Timestamp retention_expiration_time = 20; + + // User-provided metadata, in key/value pairs. + map metadata = 21; + + // Whether an object is under event-based hold. Event-based hold is a way to + // retain objects until an event occurs, which is signified by the + // hold's release (i.e. this value is set to false). After being released (set + // to false), such objects will be subject to bucket-level retention (if any). + // One sample use case of this flag is for banks to hold loan documents for at + // least 3 years after loan is paid in full. Here, bucket-level retention is 3 + // years and the event is the loan being paid in full. In this example, these + // objects will be held intact for any number of years until the event has + // occurred (event-based hold on the object is released) and then 3 more years + // after that. That means retention duration of the objects begins from the + // moment event-based hold transitioned from true to false. + google.protobuf.BoolValue event_based_hold = 29; + + // The name of the object. + // Attempting to update this field after the object is created will result in + // an error. + string name = 23; + + // The ID of the object, including the bucket name, object name, and + // generation number. + // Attempting to update this field after the object is created will result in + // an error. + string id = 24; + + // The name of the bucket containing this object. + // Attempting to update this field after the object is created will result in + // an error. + string bucket = 25; + + // The content generation of this object. Used for object versioning. + // Attempting to set this field will result in an error. + int64 generation = 26; + + // The owner of the object. This will always be the uploader of the object. + // Attempting to set this field will result in an error. + Owner owner = 27; + + // Metadata of customer-supplied encryption key, if the object is encrypted by + // such a key. + CustomerEncryption customer_encryption = 28; +} + +// An access-control entry. +message ObjectAccessControl { + // The access permission for the entity. + string role = 1; + + // HTTP 1.1 Entity tag for the access-control entry. + // See [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3]. + string etag = 2; + + // The ID of the access-control entry. + string id = 3; + + // The name of the bucket. + string bucket = 4; + + // The name of the object, if applied to an object. + string object = 5; + + // The content generation of the object, if applied to an object. + int64 generation = 6; + + // The entity holding the permission, in one of the following forms: + // * `user-{userid}` + // * `user-{email}` + // * `group-{groupid}` + // * `group-{email}` + // * `domain-{domain}` + // * `project-{team-projectid}` + // * `allUsers` + // * `allAuthenticatedUsers` + // Examples: + // * The user `liz@example.com` would be `user-liz@example.com`. + // * The group `example@googlegroups.com` would be + // `group-example@googlegroups.com`. + // * All members of the Google Apps for Business domain `example.com` would be + // `domain-example.com`. + string entity = 7; + + // The ID for the entity, if any. + string entity_id = 8; + + // The email address associated with the entity, if any. + string email = 9; + + // The domain associated with the entity, if any. + string domain = 10; + + // The project team associated with the entity, if any. + ProjectTeam project_team = 11; +} + +// The result of a call to ObjectAccessControls.ListObjectAccessControls. +message ListObjectAccessControlsResponse { + // The list of items. + repeated ObjectAccessControl items = 1; +} + +// The result of a call to Objects.ListObjects +message ListObjectsResponse { + // The list of prefixes of objects matching-but-not-listed up to and including + // the requested delimiter. + repeated string prefixes = 1; + + // The list of items. + repeated Object items = 2; + + // The continuation token, used to page through large result sets. Provide + // this value in a subsequent request to return the next page of results. + string next_page_token = 3; +} + +// Represents the Viewers, Editors, or Owners of a given project. +message ProjectTeam { + // The project number. + string project_number = 1; + + // The team. + string team = 2; +} + +// A subscription to receive Google PubSub notifications. +message ServiceAccount { + // The ID of the notification. + string email_address = 1; +} + +// The owner of a specific resource. +message Owner { + // The entity, in the form `user-`*userId*. + string entity = 1; + + // The ID for the entity. + string entity_id = 2; +} diff --git a/google/storage/v1/storage_service_config.json b/google/storage/v1/storage_service_config.json new file mode 100644 index 000000000..75ee215d7 --- /dev/null +++ b/google/storage/v1/storage_service_config.json @@ -0,0 +1,15 @@ +{ + "methodConfig": [{ + "name": [{ "service": "google.storage.v1.Storage"}], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "60s", + "backoffMultiplier": 2, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", "UNAVAILABLE" + ] + } + }] +} diff --git a/google/storage/v1/storage_v1.yaml b/google/storage/v1/storage_v1.yaml new file mode 100644 index 000000000..95c36ab19 --- /dev/null +++ b/google/storage/v1/storage_v1.yaml @@ -0,0 +1,32 @@ +type: google.api.Service +config_version: 3 +name: storage.googleapis.com +title: Cloud Storage API + +apis: +- name: google.storage.v1.Storage + +enums: +- name: google.storage.v1.ServiceConstants.Values + +documentation: + summary: 'Lets you store and retrieve potentially-large, immutable data objects.' + overview: |- + The Google Cloud Storage API allows applications to read and write data + through the abstractions of buckets and objects, which are similar to + directories and files except that buckets cannot contain other buckets, + and directory-level operations (like directory rename) are not supported. + Buckets share a single global namespace, and each bucket belongs to a + specific project that has an associated owner that pays for the data + stored in the bucket. This API is accessed using standard gRPC requests. + +authentication: + rules: + - selector: 'google.storage.v1.Storage.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/devstorage.full_control, + https://www.googleapis.com/auth/devstorage.read_only, + https://www.googleapis.com/auth/devstorage.read_write diff --git a/google/streetview/publish/BUILD.bazel b/google/streetview/publish/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/streetview/publish/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/streetview/publish/v1/BUILD.bazel b/google/streetview/publish/v1/BUILD.bazel new file mode 100644 index 000000000..13abbcdcc --- /dev/null +++ b/google/streetview/publish/v1/BUILD.bazel @@ -0,0 +1,366 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "publish_proto", + srcs = [ + "resources.proto", + "rpcmessages.proto", + "streetview_publish.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/rpc:status_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "publish_proto_with_info", + deps = [ + ":publish_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "publish_java_proto", + deps = [":publish_proto"], +) + +java_grpc_library( + name = "publish_java_grpc", + srcs = [":publish_proto"], + deps = [":publish_java_proto"], +) + +java_gapic_library( + name = "publish_java_gapic", + src = ":publish_proto_with_info", + gapic_yaml = "//google/streetview/publish:streetview_publish_gapic.yaml", + package = "google.streetview.publish.v1", + service_yaml = "//google/streetview/publish:streetview_publish.yaml", + test_deps = [ + ":publish_java_grpc", + ], + deps = [ + ":publish_java_proto", + ], +) + +java_gapic_test( + name = "publish_java_gapic_test_suite", + test_classes = [ + "com.google.streetview.publish.v1.StreetViewPublishServiceClientTest", + ], + runtime_deps = [":publish_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-streetview-publish-v1-java", + deps = [ + ":publish_java_gapic", + ":publish_java_grpc", + ":publish_java_proto", + ":publish_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "publish_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/streetview/publish/v1", + protos = [":publish_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + "//google/type:latlng_go_proto", + ], +) + +#go_gapic_library( +# name = "publish_go_gapic", +# src = ":publish_proto_with_info", +# gapic_yaml = "//google/streetview/publish:streetview_publish_gapic.yaml", +# importpath = "google.golang.org/api/streetviewpublish/v1", +# package = "google.streetview.publish.v1", +# service_yaml = "//google/streetview/publish:streetview_publish.yaml", +# deps = [ +# ":publish_go_proto", +# ], +#) +# +#go_test( +# name = "publish_go_gapic_test", +# srcs = [":publish_go_gapic_srcjar_test"], +# embed = [":publish_go_gapic"], +# importpath = "google.golang.org/api/streetviewpublish/v1", +#) +# +## Open Source Packages +#go_gapic_assembly_pkg( +# name = "gapi-cloud-streetview-publish-v1-go", +# deps = [ +# ":publish_go_gapic", +# ":publish_go_gapic_srcjar-smoke-test.srcjar", +# ":publish_go_gapic_srcjar-test.srcjar", +# ":publish_go_proto", +# ], +#) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "publish_moved_proto", + srcs = [":publish_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/rpc:status_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "publish_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":publish_moved_proto"], +) + +py_grpc_library( + name = "publish_py_grpc", + srcs = [":publish_moved_proto"], + deps = [":publish_py_proto"], +) + +py_gapic_library( + name = "publish_py_gapic", + src = ":publish_proto_with_info", + gapic_yaml = "//google/streetview/publish:streetview_publish_gapic.yaml", + package = "google.streetview.publish.v1", + service_yaml = "//google/streetview/publish:streetview_publish.yaml", + deps = [ + ":publish_py_grpc", + ":publish_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "streetview-publish-v1-py", + deps = [ + ":publish_py_gapic", + ":publish_py_grpc", + ":publish_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "publish_php_proto", + deps = [":publish_proto"], +) + +php_grpc_library( + name = "publish_php_grpc", + srcs = [":publish_proto"], + deps = [":publish_php_proto"], +) + +php_gapic_library( + name = "publish_php_gapic", + src = ":publish_proto_with_info", + gapic_yaml = "//google/streetview/publish:streetview_publish_gapic.yaml", + package = "google.streetview.publish.v1", + service_yaml = "//google/streetview/publish:streetview_publish.yaml", + deps = [ + ":publish_php_grpc", + ":publish_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-streetview-publish-v1-php", + deps = [ + ":publish_php_gapic", + ":publish_php_grpc", + ":publish_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "publish_nodejs_gapic", + src = ":publish_proto_with_info", + gapic_yaml = "//google/streetview/publish:streetview_publish_gapic.yaml", + package = "google.streetview.publish.v1", + service_yaml = "//google/streetview/publish:streetview_publish.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "streetview-publish-v1-nodejs", + deps = [ + ":publish_nodejs_gapic", + ":publish_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "publish_ruby_proto", + deps = [":publish_proto"], +) + +ruby_grpc_library( + name = "publish_ruby_grpc", + srcs = [":publish_proto"], + deps = [":publish_ruby_proto"], +) + +ruby_gapic_library( + name = "publish_ruby_gapic", + src = ":publish_proto_with_info", + gapic_yaml = "//google/streetview/publish:streetview_publish_gapic.yaml", + package = "google.streetview.publish.v1", + service_yaml = "//google/streetview/publish:streetview_publish.yaml", + deps = [ + ":publish_ruby_grpc", + ":publish_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-streetview-publish-v1-ruby", + deps = [ + ":publish_ruby_gapic", + ":publish_ruby_grpc", + ":publish_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "publish_csharp_proto", + deps = [":publish_proto"], +) + +csharp_grpc_library( + name = "publish_csharp_grpc", + srcs = [":publish_proto"], + deps = [":publish_csharp_proto"], +) + +csharp_gapic_library( + name = "publish_csharp_gapic", + src = ":publish_proto_with_info", + gapic_yaml = "//google/streetview/publish:streetview_publish_gapic.yaml", + package = "google.streetview.publish.v1", + service_yaml = "//google/streetview/publish:streetview_publish.yaml", + deps = [ + ":publish_csharp_grpc", + ":publish_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-streetview-publish-v1-csharp", + deps = [ + ":publish_csharp_gapic", + ":publish_csharp_grpc", + ":publish_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/google/type/BUILD.bazel b/google/type/BUILD.bazel index df40256a1..3a870be66 100644 --- a/google/type/BUILD.bazel +++ b/google/type/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) @@ -22,6 +24,14 @@ proto_library( srcs = ["date.proto"], ) +proto_library( + name = "datetime_proto", + srcs = ["datetime.proto"], + deps = [ + "@com_google_protobuf//:duration_proto", + ], +) + proto_library( name = "dayofweek_proto", srcs = ["dayofweek.proto"], @@ -107,6 +117,12 @@ go_proto_library( protos = [":date_proto"], ) +go_proto_library( + name = "datetime_go_proto", + importpath = "google.golang.org/genproto/googleapis/type/date", + protos = [":datetime_proto"], +) + go_proto_library( name = "dayofweek_go_proto", importpath = "google.golang.org/genproto/googleapis/type/dayofweek", diff --git a/google/type/calendar_period.proto b/google/type/calendar_period.proto index 455b4c364..a91d0c35c 100644 --- a/google/type/calendar_period.proto +++ b/google/type/calendar_period.proto @@ -23,7 +23,6 @@ option java_outer_classname = "CalendarPeriodProto"; option java_package = "com.google.type"; option objc_class_prefix = "GTP"; - // A `CalendarPeriod` represents the abstract concept of a time period that has // a canonical start. Grammatically, "the start of the current // `CalendarPeriod`." All calendar times begin at midnight UTC. diff --git a/google/type/color.proto b/google/type/color.proto index 7982c8b05..417f1c4b1 100644 --- a/google/type/color.proto +++ b/google/type/color.proto @@ -26,7 +26,6 @@ option java_outer_classname = "ColorProto"; option java_package = "com.google.type"; option objc_class_prefix = "GTP"; - // Represents a color in the RGBA color space. This representation is designed // for simplicity of conversion to/from color representations in various // languages over compactness; for example, the fields of this representation diff --git a/google/type/date.proto b/google/type/date.proto index 630f620be..b958feeba 100644 --- a/google/type/date.proto +++ b/google/type/date.proto @@ -24,7 +24,6 @@ option java_outer_classname = "DateProto"; option java_package = "com.google.type"; option objc_class_prefix = "GTP"; - // Represents a whole or partial calendar date, e.g. a birthday. The time of day // and time zone are either specified elsewhere or are not significant. The date // is relative to the Proleptic Gregorian Calendar. This can represent: diff --git a/google/type/datetime.proto b/google/type/datetime.proto new file mode 100644 index 000000000..5aebc4b97 --- /dev/null +++ b/google/type/datetime.proto @@ -0,0 +1,97 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.type; + +import "google/protobuf/duration.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/type/datetime;datetime"; +option java_multiple_files = true; +option java_outer_classname = "DateTimeProto"; +option java_package = "com.google.type"; +option objc_class_prefix = "GTP"; + +// Represents civil time in one of a few possible ways: +// +// * When utc_offset is set and time_zone is unset: a civil time on a calendar +// day with a particular offset from UTC. +// * When time_zone is set and utc_offset is unset: a civil time on a calendar +// day in a particular time zone. +// * When neither time_zone nor utc_offset is set: a civil time on a calendar +// day in local time. +// +// The date is relative to the Proleptic Gregorian Calendar. +// +// If year is 0, the DateTime is considered not to have a specific year. month +// and day must have valid, non-zero values. +// +// This type is more flexible than some applications may want. Make sure to +// document and validate your application's limitations. +message DateTime { + // Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a + // datetime without a year. + int32 year = 1; + + // Required. Month of year. Must be from 1 to 12. + int32 month = 2; + + // Required. Day of month. Must be from 1 to 31 and valid for the year and + // month. + int32 day = 3; + + // Required. Hours of day in 24 hour format. Should be from 0 to 23. An API + // may choose to allow the value "24:00:00" for scenarios like business + // closing time. + int32 hours = 4; + + // Required. Minutes of hour of day. Must be from 0 to 59. + int32 minutes = 5; + + // Required. Seconds of minutes of the time. Must normally be from 0 to 59. An + // API may allow the value 60 if it allows leap-seconds. + int32 seconds = 6; + + // Required. Fractions of seconds in nanoseconds. Must be from 0 to + // 999,999,999. + int32 nanos = 7; + + // Optional. Specifies either the UTC offset or the time zone of the DateTime. + // Choose carefully between them, considering that time zone data may change + // in the future (for example, a country modifies their DST start/end dates, + // and future DateTimes in the affected range had already been stored). + // If omitted, the DateTime is considered to be in local time. + oneof time_offset { + // UTC offset. Must be whole seconds, between -18 hours and +18 hours. + // For example, a UTC offset of -4:00 would be represented as + // { seconds: -14400 }. + google.protobuf.Duration utc_offset = 8; + + // Time zone. + TimeZone time_zone = 9; + } +} + +// Represents a time zone from the +// [IANA Time Zone Database](https://www.iana.org/time-zones). +message TimeZone { + // IANA Time Zone Database time zone, e.g. "America/New_York". + string id = 1; + + // Optional. IANA Time Zone Database version number, e.g. "2019a". + string version = 2; +} diff --git a/google/type/dayofweek.proto b/google/type/dayofweek.proto index 951ec247e..7544e1516 100644 --- a/google/type/dayofweek.proto +++ b/google/type/dayofweek.proto @@ -23,7 +23,6 @@ option java_outer_classname = "DayOfWeekProto"; option java_package = "com.google.type"; option objc_class_prefix = "GTP"; - // Represents a day of week. enum DayOfWeek { // The unspecified day-of-week. diff --git a/google/type/expr.proto b/google/type/expr.proto index 444742513..5d4f2f71b 100644 --- a/google/type/expr.proto +++ b/google/type/expr.proto @@ -23,7 +23,6 @@ option java_outer_classname = "ExprProto"; option java_package = "com.google.type"; option objc_class_prefix = "GTP"; - // Represents an expression text. Example: // // title: "User account presence" diff --git a/google/type/fraction.proto b/google/type/fraction.proto index 031518884..8ad008dda 100644 --- a/google/type/fraction.proto +++ b/google/type/fraction.proto @@ -23,7 +23,6 @@ option java_outer_classname = "FractionProto"; option java_package = "com.google.type"; option objc_class_prefix = "GTP"; - // Represents a fraction in terms of a numerator divided by a denominator. message Fraction { // The portion of the denominator in the faction, e.g. 2 in 2/3. diff --git a/google/type/latlng.proto b/google/type/latlng.proto index 8aec8c0a0..e5d45f1eb 100644 --- a/google/type/latlng.proto +++ b/google/type/latlng.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -24,7 +23,6 @@ option java_outer_classname = "LatLngProto"; option java_package = "com.google.type"; option objc_class_prefix = "GTP"; - // An object representing a latitude/longitude pair. This is expressed as a pair // of doubles representing degrees latitude and degrees longitude. Unless // specified otherwise, this must conform to the diff --git a/google/type/money.proto b/google/type/money.proto index dd39c540c..ef41f1089 100644 --- a/google/type/money.proto +++ b/google/type/money.proto @@ -24,7 +24,6 @@ option java_outer_classname = "MoneyProto"; option java_package = "com.google.type"; option objc_class_prefix = "GTP"; - // Represents an amount of money with its currency type. message Money { // The 3-letter currency code defined in ISO 4217. diff --git a/google/type/month.proto b/google/type/month.proto new file mode 100644 index 000000000..54b7865f4 --- /dev/null +++ b/google/type/month.proto @@ -0,0 +1,66 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.type; + +option go_package = "google.golang.org/genproto/googleapis/type/month;month"; +option java_multiple_files = true; +option java_outer_classname = "MonthProto"; +option java_package = "com.google.type"; +option objc_class_prefix = "GTP"; + +// Represents a month in the Gregorian calendar. +enum Month { + // The unspecifed month. + MONTH_UNSPECIFIED = 0; + + // The month of January. + JANUARY = 1; + + // The month of February. + FEBRUARY = 2; + + // The month of March. + MARCH = 3; + + // The month of April. + APRIL = 4; + + // The month of May. + MAY = 5; + + // The month of June. + JUNE = 6; + + // The month of July. + JULY = 7; + + // The month of August. + AUGUST = 8; + + // The month of September. + SEPTEMBER = 9; + + // The month of October. + OCTOBER = 10; + + // The month of November. + NOVEMBER = 11; + + // The month of December. + DECEMBER = 12; +} diff --git a/google/type/postal_address.proto b/google/type/postal_address.proto index f36150501..688af8a1b 100644 --- a/google/type/postal_address.proto +++ b/google/type/postal_address.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,11 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.type; +option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/type/postaladdress;postaladdress"; option java_multiple_files = true; option java_outer_classname = "PostalAddressProto"; @@ -40,7 +42,9 @@ option objc_class_prefix = "GTP"; // For more guidance on how to use this schema, please see: // https://support.google.com/business/answer/6397478 message PostalAddress { - // The schema revision of the `PostalAddress`. + // The schema revision of the `PostalAddress`. This must be set to 0, which is + // the latest revision. + // // All new revisions **must** be backward compatible with old revisions. int32 revision = 1; diff --git a/google/type/quaternion.proto b/google/type/quaternion.proto index 9d0d98e00..7ab5dc728 100644 --- a/google/type/quaternion.proto +++ b/google/type/quaternion.proto @@ -24,7 +24,6 @@ option java_outer_classname = "QuaternionProto"; option java_package = "com.google.type"; option objc_class_prefix = "GTP"; - // A quaternion is defined as the quotient of two directed lines in a // three-dimensional space or equivalently as the quotient of two Euclidean // vectors (https://en.wikipedia.org/wiki/Quaternion). @@ -37,35 +36,35 @@ option objc_class_prefix = "GTP"; // // Quaternions are generally represented in this form: // -// w + xi + yj + zk +// w + xi + yj + zk // // where x, y, z, and w are real numbers, and i, j, and k are three imaginary // numbers. // -// Our naming choice (x, y, z, w) comes from the desire to avoid confusion for +// Our naming choice `(x, y, z, w)` comes from the desire to avoid confusion for // those interested in the geometric properties of the quaternion in the 3D // Cartesian space. Other texts often use alternative names or subscripts, such -// as (a, b, c, d), (1, i, j, k), or (0, 1, 2, 3), which are perhaps better -// suited for mathematical interpretations. +// as `(a, b, c, d)`, `(1, i, j, k)`, or `(0, 1, 2, 3)`, which are perhaps +// better suited for mathematical interpretations. // // To avoid any confusion, as well as to maintain compatibility with a large // number of software libraries, the quaternions represented using the protocol -// buffer below *must* follow the Hamilton convention, which defines ij = k +// buffer below *must* follow the Hamilton convention, which defines `ij = k` // (i.e. a right-handed algebra), and therefore: // -// i^2 = j^2 = k^2 = ijk = −1 -// ij = −ji = k -// jk = −kj = i -// ki = −ik = j +// i^2 = j^2 = k^2 = ijk = −1 +// ij = −ji = k +// jk = −kj = i +// ki = −ik = j // // Please DO NOT use this to represent quaternions that follow the JPL // convention, or any of the other quaternion flavors out there. // // Definitions: // -// - Quaternion norm (or magnitude): sqrt(x^2 + y^2 + z^2 + w^2). +// - Quaternion norm (or magnitude): `sqrt(x^2 + y^2 + z^2 + w^2)`. // - Unit (or normalized) quaternion: a quaternion whose norm is 1. -// - Pure quaternion: a quaternion whose scalar component (w) is 0. +// - Pure quaternion: a quaternion whose scalar component (`w`) is 0. // - Rotation quaternion: a unit quaternion used to represent rotation. // - Orientation quaternion: a unit quaternion used to represent orientation. // @@ -75,13 +74,12 @@ option objc_class_prefix = "GTP"; // quaternions, to avoid rounding errors: // https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions // -// Note that (x, y, z, w) and (-x, -y, -z, -w) represent the same rotation, but -// normalization would be even more useful, e.g. for comparison purposes, if it -// would produce a unique representation. It is thus recommended that w be kept -// positive, which can be achieved by changing all the signs when w is negative. -// +// Note that `(x, y, z, w)` and `(-x, -y, -z, -w)` represent the same rotation, +// but normalization would be even more useful, e.g. for comparison purposes, if +// it would produce a unique representation. It is thus recommended that `w` be +// kept positive, which can be achieved by changing all the signs when `w` is +// negative. // -// Next available tag: 5 message Quaternion { // The x component. double x = 1; diff --git a/google/type/timeofday.proto b/google/type/timeofday.proto index b8d43122b..b609a4879 100644 --- a/google/type/timeofday.proto +++ b/google/type/timeofday.proto @@ -24,7 +24,6 @@ option java_outer_classname = "TimeOfDayProto"; option java_package = "com.google.type"; option objc_class_prefix = "GTP"; - // Represents a time of day. The date and time zone are either not significant // or are specified elsewhere. An API may choose to allow leap seconds. Related // types are [google.type.Date][google.type.Date] and `google.protobuf.Timestamp`. diff --git a/google/type/type.yaml b/google/type/type.yaml index 726216cbf..3c2e20e67 100644 --- a/google/type/type.yaml +++ b/google/type/type.yaml @@ -4,30 +4,34 @@ name: type.googleapis.com title: Common Types types: - - name: google.type.Color - - name: google.type.Date - - name: google.type.Expr - - name: google.type.Fraction - - name: google.type.LatLng - - name: google.type.Money - - name: google.type.PostalAddress - - name: google.type.Quaternion - - name: google.type.TimeOfDay +- name: google.type.Color +- name: google.type.Date +- name: google.type.DateTime +- name: google.type.Expr +- name: google.type.Fraction +- name: google.type.LatLng +- name: google.type.Money +- name: google.type.PostalAddress +- name: google.type.Quaternion +- name: google.type.TimeOfDay +- name: google.type.TimeZone enums: - - name: google.type.CalendarPeriod - - name: google.type.DayOfWeek +- name: google.type.CalendarPeriod +- name: google.type.DayOfWeek +- name: google.type.Month documentation: summary: Defines common types for Google APIs. overview: |- # Google Common Types - This package contains definitions of common types for Google APIs. All types - defined in this package are suitable for different APIs to exchange data, - and will never break binary compatibility. They should have design quality - comparable to major programming languages like Java and C#. + This package contains definitions of common types for Google APIs. + All types defined in this package are suitable for different APIs to + exchange data, and will never break binary compatibility. They should + have design quality comparable to major programming languages like + Java and C#. - NOTE: Some common types are defined in the package `google.protobuf` as they - are directly supported by Protocol Buffers compiler and runtime. Those types - are called Well-Known Types. + NOTE: Some common types are defined in the package `google.protobuf` + as they are directly supported by Protocol Buffers compiler and + runtime. Those types are called Well-Known Types. diff --git a/grafeas/BUILD.bazel b/grafeas/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/grafeas/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/grafeas/v1/BUILD.bazel b/grafeas/v1/BUILD.bazel new file mode 100644 index 000000000..125d8adc8 --- /dev/null +++ b/grafeas/v1/BUILD.bazel @@ -0,0 +1,376 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "grafeas_proto", + srcs = [ + "attestation.proto", + "build.proto", + "common.proto", + "cvss.proto", + "deployment.proto", + "discovery.proto", + "grafeas.proto", + "image.proto", + "package.proto", + "provenance.proto", + "upgrade.proto", + "vulnerability.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "grafeas_proto_with_info", + deps = [ + ":grafeas_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "grafeas_java_proto", + deps = [":grafeas_proto"], +) + +java_grpc_library( + name = "grafeas_java_grpc", + srcs = [":grafeas_proto"], + deps = [":grafeas_java_proto"], +) + +java_gapic_library( + name = "grafeas_java_gapic", + src = ":grafeas_proto_with_info", + gapic_yaml = "grafeas_gapic.yaml", + package = "grafeas.v1", + service_yaml = "//grafeas:grafeas_v1.yaml", + test_deps = [ + ":grafeas_java_grpc", + ], + deps = [ + ":grafeas_java_proto", + ], +) + +java_gapic_test( + name = "grafeas_java_gapic_test_suite", + test_classes = [ + "io.grafeas.v1.GrafeasClientTest", + ], + runtime_deps = [":grafeas_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-grafeas-v1-java", + deps = [ + ":grafeas_java_gapic", + ":grafeas_java_grpc", + ":grafeas_java_proto", + ":grafeas_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "grafeas_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/grafeas/v1", + protos = [":grafeas_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + ], +) + +go_gapic_library( + name = "grafeas_go_gapic", + srcs = [":grafeas_proto_with_info"], + grpc_service_config = "grafeas_grpc_service_config.json", + importpath = "cloud.google.com/go/grafeas/apiv1;grafeas", + service_yaml = "//grafeas:grafeas_v1.yaml", + deps = [ + ":grafeas_go_proto", + ], +) + +go_test( + name = "grafeas_go_gapic_test", + srcs = [":grafeas_go_gapic_srcjar_test"], + embed = [":grafeas_go_gapic"], + importpath = "cloud.google.com/go/grafeas/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-grafeas-v1-go", + deps = [ + ":grafeas_go_gapic", + ":grafeas_go_gapic_srcjar-test.srcjar", + ":grafeas_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "grafeas_moved_proto", + srcs = [":grafeas_proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "grafeas_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":grafeas_moved_proto"], +) + +py_grpc_library( + name = "grafeas_py_grpc", + srcs = [":grafeas_moved_proto"], + deps = [":grafeas_py_proto"], +) + +py_gapic_library( + name = "grafeas_py_gapic", + src = ":grafeas_proto_with_info", + gapic_yaml = "grafeas_gapic.yaml", + package = "grafeas.v1", + service_yaml = "//grafeas:grafeas_v1.yaml", + deps = [ + ":grafeas_py_grpc", + ":grafeas_py_proto", + ], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "grafeas-v1-py", + deps = [ + ":grafeas_py_gapic", + ":grafeas_py_grpc", + ":grafeas_py_proto", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "grafeas_php_proto", + deps = [":grafeas_proto"], +) + +php_grpc_library( + name = "grafeas_php_grpc", + srcs = [":grafeas_proto"], + deps = [":grafeas_php_proto"], +) + +php_gapic_library( + name = "grafeas_php_gapic", + src = ":grafeas_proto_with_info", + gapic_yaml = "grafeas_gapic.yaml", + package = "grafeas.v1", + service_yaml = "//grafeas:grafeas_v1.yaml", + deps = [ + ":grafeas_php_grpc", + ":grafeas_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-grafeas-v1-php", + deps = [ + ":grafeas_php_gapic", + ":grafeas_php_grpc", + ":grafeas_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "grafeas_nodejs_gapic", + src = ":grafeas_proto_with_info", + gapic_yaml = "grafeas_gapic.yaml", + package = "grafeas.v1", + service_yaml = "//grafeas:grafeas_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "grafeas-v1-nodejs", + deps = [ + ":grafeas_nodejs_gapic", + ":grafeas_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "grafeas_ruby_proto", + deps = [":grafeas_proto"], +) + +ruby_grpc_library( + name = "grafeas_ruby_grpc", + srcs = [":grafeas_proto"], + deps = [":grafeas_ruby_proto"], +) + +ruby_gapic_library( + name = "grafeas_ruby_gapic", + src = ":grafeas_proto_with_info", + gapic_yaml = "grafeas_gapic.yaml", + package = "grafeas.v1", + service_yaml = "//grafeas:grafeas_v1.yaml", + deps = [ + ":grafeas_ruby_grpc", + ":grafeas_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-grafeas-v1-ruby", + deps = [ + ":grafeas_ruby_gapic", + ":grafeas_ruby_grpc", + ":grafeas_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "grafeas_csharp_proto", + deps = [":grafeas_proto"], +) + +csharp_grpc_library( + name = "grafeas_csharp_grpc", + srcs = [":grafeas_proto"], + deps = [":grafeas_csharp_proto"], +) + +csharp_gapic_library( + name = "grafeas_csharp_gapic", + src = ":grafeas_proto_with_info", + gapic_yaml = "grafeas_gapic.yaml", + package = "grafeas.v1", + service_yaml = "//grafeas:grafeas_v1.yaml", + deps = [ + ":grafeas_csharp_grpc", + ":grafeas_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-grafeas-v1-csharp", + deps = [ + ":grafeas_csharp_gapic", + ":grafeas_csharp_grpc", + ":grafeas_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ rules here diff --git a/grafeas/v1/common.proto b/grafeas/v1/common.proto index 846948a52..db780bb62 100644 --- a/grafeas/v1/common.proto +++ b/grafeas/v1/common.proto @@ -39,6 +39,8 @@ enum NoteKind { DISCOVERY = 6; // This represents a logical "role" that can attest to artifacts. ATTESTATION = 7; + // This represents an available package upgrade. + UPGRADE = 8; } // Metadata for any related URL information. diff --git a/grafeas/v1/discovery.proto b/grafeas/v1/discovery.proto index ba8034d38..e07992557 100644 --- a/grafeas/v1/discovery.proto +++ b/grafeas/v1/discovery.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package grafeas.v1; +import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; import "grafeas/v1/common.proto"; @@ -73,4 +74,10 @@ message DiscoveryOccurrence { // details to show to the user. The LocalizedMessage is output only and // populated by the API. google.rpc.Status analysis_status_error = 3; + + // The CPE of the resource being scanned. + string cpe = 4; + + // The last time this resource was scanned. + google.protobuf.Timestamp last_scan_time = 5; } diff --git a/grafeas/v1/grafeas.proto b/grafeas/v1/grafeas.proto index 1364b2aae..57b2fc23e 100644 --- a/grafeas/v1/grafeas.proto +++ b/grafeas/v1/grafeas.proto @@ -17,6 +17,9 @@ syntax = "proto3"; package grafeas.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -27,13 +30,17 @@ import "grafeas/v1/deployment.proto"; import "grafeas/v1/discovery.proto"; import "grafeas/v1/image.proto"; import "grafeas/v1/package.proto"; -import "grafeas/v1/provenance.proto"; +import "grafeas/v1/upgrade.proto"; import "grafeas/v1/vulnerability.proto"; option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; option java_multiple_files = true; option java_package = "io.grafeas.v1"; option objc_class_prefix = "GRA"; +option (google.api.resource_definition) = { + type: "grafeas.io/Project" + pattern: "projects/{project}" +}; // [Grafeas](https://grafeas.io) API. // @@ -50,11 +57,14 @@ option objc_class_prefix = "GRA"; // there would be one note for the vulnerability and an occurrence for each // image with the vulnerability referring to that note. service Grafeas { + option (google.api.default_host) = "containeranalysis.googleapis.com"; + // Gets the specified occurrence. rpc GetOccurrence(GetOccurrenceRequest) returns (Occurrence) { option (google.api.http) = { get: "/v1/{name=projects/*/occurrences/*}" }; + option (google.api.method_signature) = "name"; } // Lists occurrences for the specified project. @@ -63,6 +73,7 @@ service Grafeas { option (google.api.http) = { get: "/v1/{parent=projects/*}/occurrences" }; + option (google.api.method_signature) = "parent,filter"; } // Deletes the specified occurrence. For example, use this method to delete an @@ -73,6 +84,7 @@ service Grafeas { option (google.api.http) = { delete: "/v1/{name=projects/*/occurrences/*}" }; + option (google.api.method_signature) = "name"; } // Creates a new occurrence. @@ -81,6 +93,7 @@ service Grafeas { post: "/v1/{parent=projects/*}/occurrences" body: "occurrence" }; + option (google.api.method_signature) = "parent,occurrence"; } // Creates new occurrences in batch. @@ -90,6 +103,7 @@ service Grafeas { post: "/v1/{parent=projects/*}/occurrences:batchCreate" body: "*" }; + option (google.api.method_signature) = "parent,occurrences"; } // Updates the specified occurrence. @@ -98,6 +112,7 @@ service Grafeas { patch: "/v1/{name=projects/*/occurrences/*}" body: "occurrence" }; + option (google.api.method_signature) = "name,occurrence,update_mask"; } // Gets the note attached to the specified occurrence. Consumer projects can @@ -106,6 +121,7 @@ service Grafeas { option (google.api.http) = { get: "/v1/{name=projects/*/occurrences/*}/notes" }; + option (google.api.method_signature) = "name"; } // Gets the specified note. @@ -113,6 +129,7 @@ service Grafeas { option (google.api.http) = { get: "/v1/{name=projects/*/notes/*}" }; + option (google.api.method_signature) = "name"; } // Lists notes for the specified project. @@ -120,6 +137,7 @@ service Grafeas { option (google.api.http) = { get: "/v1/{parent=projects/*}/notes" }; + option (google.api.method_signature) = "parent,filter"; } // Deletes the specified note. @@ -127,6 +145,7 @@ service Grafeas { option (google.api.http) = { delete: "/v1/{name=projects/*/notes/*}" }; + option (google.api.method_signature) = "name"; } // Creates a new note. @@ -135,6 +154,7 @@ service Grafeas { post: "/v1/{parent=projects/*}/notes" body: "note" }; + option (google.api.method_signature) = "parent,note_id,note"; } // Creates new notes in batch. @@ -144,6 +164,7 @@ service Grafeas { post: "/v1/{parent=projects/*}/notes:batchCreate" body: "*" }; + option (google.api.method_signature) = "parent,notes"; } // Updates the specified note. @@ -152,6 +173,7 @@ service Grafeas { patch: "/v1/{name=projects/*/notes/*}" body: "note" }; + option (google.api.method_signature) = "name,note,update_mask"; } // Lists occurrences referencing the specified note. Provider projects can use @@ -162,11 +184,17 @@ service Grafeas { option (google.api.http) = { get: "/v1/{name=projects/*/notes/*}/occurrences" }; + option (google.api.method_signature) = "name,filter"; } } // An instance of an analysis type that has been found on a resource. message Occurrence { + option (google.api.resource) = { + type: "grafeas.io/Occurrence" + pattern: "projects/{project}/occurrences/{occurrence}" + }; + // Output only. The name of the occurrence in the form of // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. string name = 1; @@ -212,11 +240,18 @@ message Occurrence { grafeas.v1.DiscoveryOccurrence discovery = 13; // Describes an attestation of an artifact. grafeas.v1.AttestationOccurrence attestation = 14; + // Describes an available package upgrade on the linked resource. + grafeas.v1.UpgradeOccurrence upgrade = 15; } } // A type of analysis that can be done for a resource. message Note { + option (google.api.resource) = { + type: "grafeas.io/Note" + pattern: "projects/{project}/notes/{note}" + }; + // Output only. The name of the note in the form of // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. string name = 1; @@ -264,6 +299,8 @@ message Note { grafeas.v1.DiscoveryNote discovery = 15; // A note describing an attestation role. grafeas.v1.AttestationNote attestation = 16; + // A note describing available package upgrades. + grafeas.v1.UpgradeNote upgrade = 17; } } @@ -271,14 +308,20 @@ message Note { message GetOccurrenceRequest { // The name of the occurrence in the form of // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; } // Request to list occurrences. message ListOccurrencesRequest { // The name of the project to list occurrences for in the form of // `projects/[PROJECT_ID]`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; // The filter expression. string filter = 2; @@ -301,29 +344,38 @@ message ListOccurrencesResponse { string next_page_token = 2; } -// Request to delete a occurrence. +// Request to delete an occurrence. message DeleteOccurrenceRequest { // The name of the occurrence in the form of // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; } // Request to create a new occurrence. message CreateOccurrenceRequest { // The name of the project in the form of `projects/[PROJECT_ID]`, under which // the occurrence is to be created. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; // The occurrence to create. - Occurrence occurrence = 2; + Occurrence occurrence = 2 [(google.api.field_behavior) = REQUIRED]; } // Request to update an occurrence. message UpdateOccurrenceRequest { // The name of the occurrence in the form of // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; // The updated occurrence. - Occurrence occurrence = 2; + Occurrence occurrence = 2 [(google.api.field_behavior) = REQUIRED]; // The fields to update. google.protobuf.FieldMask update_mask = 3; } @@ -332,21 +384,30 @@ message UpdateOccurrenceRequest { message GetNoteRequest { // The name of the note in the form of // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; } // Request to get the note to which the specified occurrence is attached. message GetOccurrenceNoteRequest { // The name of the occurrence in the form of // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; } // Request to list notes. message ListNotesRequest { // The name of the project to list notes for in the form of // `projects/[PROJECT_ID]`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; // The filter expression. string filter = 2; @@ -373,27 +434,36 @@ message ListNotesResponse { message DeleteNoteRequest { // The name of the note in the form of // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; } // Request to create a new note. message CreateNoteRequest { // The name of the project in the form of `projects/[PROJECT_ID]`, under which // the note is to be created. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; // The ID to use for this note. - string note_id = 2; + string note_id = 2 [(google.api.field_behavior) = REQUIRED]; // The note to create. - Note note = 3; + Note note = 3 [(google.api.field_behavior) = REQUIRED]; } // Request to update a note. message UpdateNoteRequest { // The name of the note in the form of // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; // The updated note. - Note note = 2; + Note note = 2 [(google.api.field_behavior) = REQUIRED]; // The fields to update. google.protobuf.FieldMask update_mask = 3; } @@ -402,7 +472,10 @@ message UpdateNoteRequest { message ListNoteOccurrencesRequest { // The name of the note to list occurrences for in the form of // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; // The filter expression. string filter = 2; // Number of occurrences to return in the list. @@ -423,10 +496,13 @@ message ListNoteOccurrencesResponse { message BatchCreateNotesRequest { // The name of the project in the form of `projects/[PROJECT_ID]`, under which // the notes are to be created. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; // The notes to create. Max allowed length is 1000. - map notes = 2; + map notes = 2 [(google.api.field_behavior) = REQUIRED]; } // Response for creating notes in batch. @@ -439,10 +515,13 @@ message BatchCreateNotesResponse { message BatchCreateOccurrencesRequest { // The name of the project in the form of `projects/[PROJECT_ID]`, under which // the occurrences are to be created. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; // The occurrences to create. Max allowed length is 1000. - repeated Occurrence occurrences = 2; + repeated Occurrence occurrences = 2 [(google.api.field_behavior) = REQUIRED]; } // Response for creating occurrences in batch. diff --git a/grafeas/v1/grafeas_gapic.legacy.yaml b/grafeas/v1/grafeas_gapic.legacy.yaml new file mode 100644 index 000000000..af61e33eb --- /dev/null +++ b/grafeas/v1/grafeas_gapic.legacy.yaml @@ -0,0 +1,384 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: io.grafeas.v1 + python: + package_name: grafeas.grafeas_v1.gapic + go: + package_name: cloud.google.com/go/grafeas/apiv1 + csharp: + package_name: Grafeas.V1 + ruby: + package_name: Grafeas::V1 + php: + package_name: Grafeas\V1 + nodejs: + package_name: grafeas.v1 + domain_layer_location: google-cloud +# A list of resource collection configurations. +# Consists of a name_pattern and an entity_name. +# The name_pattern is a pattern to describe the names of the resources of this +# collection, using the platform's conventions for URI patterns. A generator +# may use this to generate methods to compose and decompose such names. The +# pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; +# those will be taken as hints for the parameter names of the generated +# methods. If empty, no name methods are generated. +# The entity_name is the name to be used as a basis for generated methods and +# classes. +collections: +- name_pattern: projects/{project} + entity_name: project +- name_pattern: projects/{project}/notes/{note} + entity_name: note +- name_pattern: projects/{project}/occurrences/{occurrence} + entity_name: occurrence +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: grafeas.v1.Grafeas + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: GetOccurrence + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: occurrence + timeout_millis: 30000 + - name: ListOccurrences + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: occurrences + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + - name: DeleteOccurrence + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: occurrence + timeout_millis: 30000 + - name: CreateOccurrence + flattening: + groups: + - parameters: + - parent + - occurrence + required_fields: + - parent + - occurrence + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + - name: BatchCreateOccurrences + flattening: + groups: + - parameters: + - parent + - occurrences + required_fields: + - parent + - occurrences + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + - name: UpdateOccurrence + flattening: + groups: + - parameters: + - name + - occurrence + - update_mask + required_fields: + - name + - occurrence + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: occurrence + timeout_millis: 30000 + - name: GetOccurrenceNote + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: occurrence + timeout_millis: 30000 + - name: GetNote + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: note + timeout_millis: 30000 + - name: ListNotes + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: notes + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + - name: DeleteNote + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: note + timeout_millis: 30000 + - name: CreateNote + flattening: + groups: + - parameters: + - parent + - note_id + - note + required_fields: + - parent + - note_id + - note + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + - name: BatchCreateNotes + flattening: + groups: + - parameters: + - parent + - notes + required_fields: + - parent + - notes + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + - name: UpdateNote + flattening: + groups: + - parameters: + - name + - note + - update_mask + required_fields: + - name + - note + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: note + timeout_millis: 30000 + - name: ListNoteOccurrences + flattening: + groups: + - parameters: + - name + - filter + required_fields: + - name + resource_name_treatment: STATIC_TYPES + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: occurrences + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: note + timeout_millis: 30000 +resource_name_generation: +- message_name: grafeas.v1.Occurrence + field_entity_map: + name: occurrence +- message_name: grafeas.v1.GetOccurrenceRequest + field_entity_map: + name: occurrence +- message_name: grafeas.v1.ListOccurrencesRequest + field_entity_map: + parent: project +- message_name: grafeas.v1.DeleteOccurrenceRequest + field_entity_map: + name: occurrence +- message_name: grafeas.v1.CreateOccurrenceRequest + field_entity_map: + parent: project +- message_name: grafeas.v1.UpdateOccurrenceRequest + field_entity_map: + name: occurrence +- message_name: grafeas.v1.BatchCreateOccurrencesRequest + field_entity_map: + parent: project +- message_name: grafeas.v1.Note + field_entity_map: + name: note +- message_name: grafeas.v1.GetNoteRequest + field_entity_map: + name: note +- message_name: grafeas.v1.ListNotesRequest + field_entity_map: + parent: project +- message_name: grafeas.v1.DeleteNoteRequest + field_entity_map: + name: note +- message_name: grafeas.v1.CreateNoteRequest + field_entity_map: + parent: project +- message_name: grafeas.v1.UpdateNoteRequest + field_entity_map: + name: note +- message_name: grafeas.v1.BatchCreateNotesRequest + field_entity_map: + parent: project +- message_name: grafeas.v1.GetOccurrenceNoteRequest + field_entity_map: + name: occurrence +- message_name: grafeas.v1.ListNoteOccurrencesRequest + field_entity_map: + name: note diff --git a/grafeas/v1/grafeas_gapic.yaml b/grafeas/v1/grafeas_gapic.yaml index af61e33eb..9f0f087d8 100644 --- a/grafeas/v1/grafeas_gapic.yaml +++ b/grafeas/v1/grafeas_gapic.yaml @@ -1,6 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 -# The settings of generated code in a specific language. +config_schema_version: 2.0.0 language_settings: java: package_name: io.grafeas.v1 @@ -17,368 +16,10 @@ language_settings: nodejs: package_name: grafeas.v1 domain_layer_location: google-cloud -# A list of resource collection configurations. -# Consists of a name_pattern and an entity_name. -# The name_pattern is a pattern to describe the names of the resources of this -# collection, using the platform's conventions for URI patterns. A generator -# may use this to generate methods to compose and decompose such names. The -# pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; -# those will be taken as hints for the parameter names of the generated -# methods. If empty, no name methods are generated. -# The entity_name is the name to be used as a basis for generated methods and -# classes. -collections: -- name_pattern: projects/{project} - entity_name: project -- name_pattern: projects/{project}/notes/{note} - entity_name: note -- name_pattern: projects/{project}/occurrences/{occurrence} - entity_name: occurrence -# A list of API interface configurations. interfaces: -# The fully qualified name of the API interface. - name: grafeas.v1.Grafeas - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. methods: - - name: GetOccurrence - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: occurrence - timeout_millis: 30000 - - name: ListOccurrences - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: occurrences - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 30000 - name: DeleteOccurrence - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: occurrence - timeout_millis: 30000 - - name: CreateOccurrence - flattening: - groups: - - parameters: - - parent - - occurrence - required_fields: - - parent - - occurrence - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 30000 - - name: BatchCreateOccurrences - flattening: - groups: - - parameters: - - parent - - occurrences - required_fields: - - parent - - occurrences - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 30000 - - name: UpdateOccurrence - flattening: - groups: - - parameters: - - name - - occurrence - - update_mask - required_fields: - - name - - occurrence - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: occurrence - timeout_millis: 30000 - - name: GetOccurrenceNote - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: occurrence - timeout_millis: 30000 - - name: GetNote - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: note - timeout_millis: 30000 - - name: ListNotes - flattening: - groups: - - parameters: - - parent - - filter - required_fields: - - parent - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: notes - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 30000 - name: DeleteNote - flattening: - groups: - - parameters: - - name - required_fields: - - name - resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: note - timeout_millis: 30000 - - name: CreateNote - flattening: - groups: - - parameters: - - parent - - note_id - - note - required_fields: - - parent - - note_id - - note - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 30000 - - name: BatchCreateNotes - flattening: - groups: - - parameters: - - parent - - notes - required_fields: - - parent - - notes - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - parent: project - timeout_millis: 30000 - - name: UpdateNote - flattening: - groups: - - parameters: - - name - - note - - update_mask - required_fields: - - name - - note - resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent - retry_params_name: default - field_name_patterns: - name: note - timeout_millis: 30000 - - name: ListNoteOccurrences - flattening: - groups: - - parameters: - - name - - filter - required_fields: - - name - resource_name_treatment: STATIC_TYPES - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: occurrences retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: note - timeout_millis: 30000 -resource_name_generation: -- message_name: grafeas.v1.Occurrence - field_entity_map: - name: occurrence -- message_name: grafeas.v1.GetOccurrenceRequest - field_entity_map: - name: occurrence -- message_name: grafeas.v1.ListOccurrencesRequest - field_entity_map: - parent: project -- message_name: grafeas.v1.DeleteOccurrenceRequest - field_entity_map: - name: occurrence -- message_name: grafeas.v1.CreateOccurrenceRequest - field_entity_map: - parent: project -- message_name: grafeas.v1.UpdateOccurrenceRequest - field_entity_map: - name: occurrence -- message_name: grafeas.v1.BatchCreateOccurrencesRequest - field_entity_map: - parent: project -- message_name: grafeas.v1.Note - field_entity_map: - name: note -- message_name: grafeas.v1.GetNoteRequest - field_entity_map: - name: note -- message_name: grafeas.v1.ListNotesRequest - field_entity_map: - parent: project -- message_name: grafeas.v1.DeleteNoteRequest - field_entity_map: - name: note -- message_name: grafeas.v1.CreateNoteRequest - field_entity_map: - parent: project -- message_name: grafeas.v1.UpdateNoteRequest - field_entity_map: - name: note -- message_name: grafeas.v1.BatchCreateNotesRequest - field_entity_map: - parent: project -- message_name: grafeas.v1.GetOccurrenceNoteRequest - field_entity_map: - name: occurrence -- message_name: grafeas.v1.ListNoteOccurrencesRequest - field_entity_map: - name: note diff --git a/grafeas/v1/grafeas_grpc_service_config.json b/grafeas/v1/grafeas_grpc_service_config.json new file mode 100755 index 000000000..1e53813bc --- /dev/null +++ b/grafeas/v1/grafeas_grpc_service_config.json @@ -0,0 +1,80 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "grafeas.v1.Grafeas", + "method": "GetOccurrence" + }, + { + "service": "grafeas.v1.Grafeas", + "method": "ListOccurrences" + }, + { + "service": "grafeas.v1.Grafeas", + "method": "DeleteOccurrence" + }, + { + "service": "grafeas.v1.Grafeas", + "method": "GetOccurrenceNote" + }, + { + "service": "grafeas.v1.Grafeas", + "method": "GetNote" + }, + { + "service": "grafeas.v1.Grafeas", + "method": "ListNotes" + }, + { + "service": "grafeas.v1.Grafeas", + "method": "DeleteNote" + }, + { + "service": "grafeas.v1.Grafeas", + "method": "ListNoteOccurrences" + } + ], + "timeout": "30s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + } + }, + { + "name": [ + { + "service": "grafeas.v1.Grafeas", + "method": "CreateOccurrence" + }, + { + "service": "grafeas.v1.Grafeas", + "method": "BatchCreateOccurrences" + }, + { + "service": "grafeas.v1.Grafeas", + "method": "UpdateOccurrence" + }, + { + "service": "grafeas.v1.Grafeas", + "method": "CreateNote" + }, + { + "service": "grafeas.v1.Grafeas", + "method": "BatchCreateNotes" + }, + { + "service": "grafeas.v1.Grafeas", + "method": "UpdateNote" + } + ], + "timeout": "30s" + } + ] +} diff --git a/grafeas/v1/upgrade.proto b/grafeas/v1/upgrade.proto new file mode 100644 index 000000000..89d389299 --- /dev/null +++ b/grafeas/v1/upgrade.proto @@ -0,0 +1,114 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/protobuf/timestamp.proto"; +import "grafeas/v1/package.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// An Upgrade Note represents a potential upgrade of a package to a given +// version. For each package version combination (i.e. bash 4.0, bash 4.1, +// bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field +// represents the information related to the update. +message UpgradeNote { + // Required for non-Windows OS. The package this Upgrade is for. + string package = 1; + // Required for non-Windows OS. The version of the package in machine + human + // readable form. + grafeas.v1.Version version = 2; + // Metadata about the upgrade for each specific operating system. + repeated UpgradeDistribution distributions = 3; + // Required for Windows OS. Represents the metadata about the Windows update. + WindowsUpdate windows_update = 4; +} + +// The Upgrade Distribution represents metadata about the Upgrade for each +// operating system (CPE). Some distributions have additional metadata around +// updates, classifying them into various categories and severities. +message UpgradeDistribution { + // Required - The specific operating system this metadata applies to. See + // https://cpe.mitre.org/specification/. + string cpe_uri = 1; + // The operating system classification of this Upgrade, as specified by the + // upstream operating system upgrade feed. For Windows the classification is + // one of the category_ids listed at + // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) + string classification = 2; + // The severity as specified by the upstream operating system. + string severity = 3; + // The cve tied to this Upgrade. + repeated string cve = 4; +} + +// Windows Update represents the metadata about the update for the Windows +// operating system. The fields in this message come from the Windows Update API +// documented at +// https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate. +message WindowsUpdate { + // The unique identifier of the update. + message Identity { + // The revision independent identifier of the update. + string update_id = 1; + // The revision number of the update. + int32 revision = 2; + } + // Required - The unique identifier for the update. + Identity identity = 1; + // The localized title of the update. + string title = 2; + // The localized description of the update. + string description = 3; + // The category to which the update belongs. + message Category { + // The identifier of the category. + string category_id = 1; + // The localized name of the category. + string name = 2; + } + // The list of categories to which the update belongs. + repeated Category categories = 4; + // The Microsoft Knowledge Base article IDs that are associated with the + // update. + repeated string kb_article_ids = 5; + // The hyperlink to the support information for the update. + string support_url = 6; + // The last published timestamp of the update. + google.protobuf.Timestamp last_published_timestamp = 7; +} + +// An Upgrade Occurrence represents that a specific resource_url could install a +// specific upgrade. This presence is supplied via local sources (i.e. it is +// present in the mirror and the running system has noticed its availability). +// For Windows, both distribution and windows_update contain information for the +// Windows update. +message UpgradeOccurrence { + // Required for non-Windows OS. The package this Upgrade is for. + string package = 1; + // Required for non-Windows OS. The version of the package in a machine + + // human readable form. + grafeas.v1.Version parsed_version = 3; + // Metadata about the upgrade for available for the specific operating system + // for the resource_url. This allows efficient filtering, as well as + // making it easier to use the occurrence. + UpgradeDistribution distribution = 4; + // Required for Windows OS. Represents the metadata about the Windows update. + WindowsUpdate windows_update = 5; +} diff --git a/grafeas/v1/vulnerability.proto b/grafeas/v1/vulnerability.proto index 27a5d238b..6c94cdf05 100644 --- a/grafeas/v1/vulnerability.proto +++ b/grafeas/v1/vulnerability.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package grafeas.v1; +import "google/protobuf/timestamp.proto"; import "grafeas/v1/common.proto"; import "grafeas/v1/cvss.proto"; import "grafeas/v1/package.proto"; @@ -109,6 +110,11 @@ message VulnerabilityNote { // Whether this detail is obsolete. Occurrences are expected not to point to // obsolete details. bool is_obsolete = 11; + + // The time this information was last changed at the source. This is an + // upstream timestamp from the underlying information source - e.g. Ubuntu + // security tracker. + google.protobuf.Timestamp source_update_time = 12; } // The full description of the CVSSv3 for this vulnerability. @@ -145,6 +151,11 @@ message VulnerabilityNote { string url = 2; } } + + // The time this information was last changed at the source. This is an + // upstream timestamp from the underlying information source - e.g. Ubuntu + // security tracker. + google.protobuf.Timestamp source_update_time = 6; } // An occurrence of a severity vulnerability on a resource. @@ -206,8 +217,7 @@ message VulnerabilityOccurrence { repeated grafeas.v1.RelatedUrl related_urls = 7; // The distro assigned severity for this vulnerability when it is available, - // and note provider assigned severity when distro has not yet assigned a - // severity for this vulnerability. + // otherwise this is the note provider assigned severity. Severity effective_severity = 8; // Output only. Whether at least one of the affected packages has a fix diff --git a/repository_rules.bzl b/repository_rules.bzl index e75ea9160..32d461e24 100644 --- a/repository_rules.bzl +++ b/repository_rules.bzl @@ -11,7 +11,7 @@ def {rule_name}(**kwargs): {rule_name} = {native_rule_name} """ enabled_rule_script = """ -load("{file_label}", _{rule_name} = "{rule_name}") +load("{file_label}", _{rule_name} = "{loaded_rule_name}") """ elabled_rule_scrip_alias = """ {rule_name} = _{rule_name} @@ -19,11 +19,18 @@ load("{file_label}", _{rule_name} = "{rule_name}") load_rules = [] # load() must go before everythin else in .bzl files since Bazel 0.25.0 rules = [] - for rule_name, value in ctx.attr.rules.items(): + for rule_name, value_and_name in ctx.attr.rules.items(): + value = value_and_name[0] + loaded_rule_name = value_and_name[1] if value_and_name[1] else rule_name + if not value: rules.append(disabled_rule_script.format(rule_name = rule_name)) elif value.startswith("@"): - load_rules.append(enabled_rule_script.format(file_label = value, rule_name = rule_name)) + load_rules.append(enabled_rule_script.format( + file_label = value, + rule_name = rule_name, + loaded_rule_name = loaded_rule_name, + )) rules.append(elabled_rule_scrip_alias.format(rule_name = rule_name)) elif value.startswith("native."): rules.append( @@ -38,7 +45,7 @@ load("{file_label}", _{rule_name} = "{rule_name}") switched_rules = repository_rule( implementation = _switched_rules_impl, attrs = { - "rules": attr.string_dict( + "rules": attr.string_list_dict( allow_empty = True, mandatory = False, default = {}, @@ -92,12 +99,13 @@ def switched_rules_by_language( this rule. False by default. java (bool): Enable Java specific rules. False by default. go (bool): Enable Go specific rules. False by default. - cc (bool): Enable C++ specific rules. False by default. Partially implemented. + cc (bool): Enable C++ specific rules. False by default. Partially implemented (no GAPIC + support). php (bool): Enable PHP specific rules. False by default. nodejs (bool): Enable Node.js specific rules. False by default. - ruby (bool): Enable Ruby specific rules. False by default. Not implemented yet. - python (bool): Enable Python-specific rules. False by default. Not implemented yet. - csharp (bool): Enable C# specific rules. False by default. Not implemented yet. + ruby (bool): Enable Ruby specific rules. False by default. + python (bool): Enable Python-specific rules. False by default. + csharp (bool): Enable C# specific rules. False by default. rules_override (dict): Custom rule overrides (for advanced usage). """ @@ -110,6 +118,10 @@ def switched_rules_by_language( gapic, "@com_google_api_codegen//rules_gapic:gapic.bzl", ) + rules["moved_proto_library"] = _switch( + gapic, + "@com_google_api_codegen//rules_gapic:gapic.bzl", + ) # # Java @@ -130,13 +142,43 @@ def switched_rules_by_language( java and grpc and gapic, "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", ) + rules["java_gapic_test"] = _switch( + java and grpc and gapic, + "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", + ) rules["java_gapic_assembly_gradle_pkg"] = _switch( java and grpc and gapic, "@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", ) - rules["java_test"] = _switch( - java and grpc and gapic, - "native.java_test", + + # + # Python + # + rules["py_proto_library"] = _switch( + python, + "@com_github_grpc_grpc//bazel:python_rules.bzl", + ) + rules["py_grpc_library"] = _switch( + python and grpc, + "@com_github_grpc_grpc//bazel:python_rules.bzl", + ) + rules["py_gapic_library"] = _switch( + python and grpc and gapic, + "@com_google_api_codegen//rules_gapic/python:py_gapic.bzl", + ) + rules["py_gapic_assembly_pkg"] = _switch( + python and grpc and gapic, + "@com_google_api_codegen//rules_gapic/python:py_gapic_pkg.bzl", + ) + rules["py_gapic_library2"] = _switch( + python and grpc and gapic, + "@gapic_generator_python//rules_python_gapic:py_gapic.bzl", + "py_gapic_library", + ) + rules["py_gapic_assembly_pkg2"] = _switch( + python and grpc and gapic, + "@gapic_generator_python//rules_python_gapic:py_gapic_pkg.bzl", + "py_gapic_assembly_pkg", ) # @@ -156,11 +198,11 @@ def switched_rules_by_language( ) rules["go_gapic_library"] = _switch( go and grpc and gapic, - "@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", + "@com_googleapis_gapic_generator_go//rules_go_gapic:go_gapic.bzl", ) rules["go_gapic_assembly_pkg"] = _switch( go and grpc and gapic, - "@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", + "@com_googleapis_gapic_generator_go//rules_go_gapic:go_gapic_pkg.bzl", ) # @@ -174,10 +216,7 @@ def switched_rules_by_language( cc and grpc, "@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", ) - rules["cc_gapic_library"] = _switch( - cc and grpc and gapic, - "@com_google_gapic_generator_cpp//rules_gapic/cpp:cc_gapic.bzl", - ) + rules["cc_gapic_library"] = _switch(False) # # PHP @@ -211,6 +250,46 @@ def switched_rules_by_language( "@com_google_api_codegen//rules_gapic/nodejs:nodejs_gapic_pkg.bzl", ) + # + # Ruby + # + rules["ruby_proto_library"] = _switch( + ruby, + "@com_google_api_codegen//rules_gapic/ruby:ruby_gapic.bzl", + ) + rules["ruby_grpc_library"] = _switch( + ruby and grpc, + "@com_google_api_codegen//rules_gapic/ruby:ruby_gapic.bzl", + ) + rules["ruby_gapic_library"] = _switch( + ruby and grpc and gapic, + "@com_google_api_codegen//rules_gapic/ruby:ruby_gapic.bzl", + ) + rules["ruby_gapic_assembly_pkg"] = _switch( + ruby and grpc and gapic, + "@com_google_api_codegen//rules_gapic/ruby:ruby_gapic_pkg.bzl", + ) + + # + # C# + # + rules["csharp_proto_library"] = _switch( + csharp, + "@com_google_api_codegen//rules_gapic/csharp:csharp_gapic.bzl", + ) + rules["csharp_grpc_library"] = _switch( + csharp and grpc, + "@com_google_api_codegen//rules_gapic/csharp:csharp_gapic.bzl", + ) + rules["csharp_gapic_library"] = _switch( + csharp and grpc and gapic, + "@com_google_api_codegen//rules_gapic/csharp:csharp_gapic.bzl", + ) + rules["csharp_gapic_assembly_pkg"] = _switch( + csharp and grpc and gapic, + "@com_google_api_codegen//rules_gapic/csharp:csharp_gapic_pkg.bzl", + ) + rules.update(rules_override) switched_rules( @@ -218,5 +297,8 @@ def switched_rules_by_language( rules = rules, ) -def _switch(enabled, enabled_value): - return enabled_value if enabled else "" +def _switch(enabled, enabled_value = "", actual_name = ""): + if enabled: + return [enabled_value, actual_name] + else: + return ["", actual_name]